Quoting Vittorio Giovara (2015-11-08 21:25:17) > On Sun, Nov 8, 2015 at 9:16 PM, Anton Khirnov <[email protected]> wrote: > > Quoting Vittorio Giovara (2015-11-08 21:08:36) > >> On Sun, Nov 8, 2015 at 9:01 PM, Anton Khirnov <[email protected]> wrote: > >> > Quoting Vittorio Giovara (2015-11-08 20:45:57) > >> >> On Sun, Nov 8, 2015 at 8:33 PM, Anton Khirnov <[email protected]> wrote: > >> >> > Quoting Vittorio Giovara (2015-11-08 20:26:36) > >> >> >> On Sun, Nov 8, 2015 at 3:31 PM, Anton Khirnov <[email protected]> > >> >> >> wrote: > >> >> >> > [ ... ] > >> >> >> > + { "b_strategy", "-1" }, > >> >> >> > { NULL }, > >> >> >> > }; > >> >> >> > >> >> >> would it be possible to use a codec private option for this? > >> >> >> b_frame_strategy is a flag rarely used and I have deprecated the > >> >> >> global usage in one of my branches. > >> >> > > >> >> > Well, the option would now be used by 4 codecs (and that if we count > >> >> > the > >> >> > whole of mpegvideo as one codec). That is a nontrivial number, so > >> >> > perhaps it should remain global. > >> >> > >> >> I don't think we should count the number of codecs this option is > >> >> used, but rather evaluate whether it makes sense to have a global > >> >> option which applies only to encoders, in the video encoders category, > >> >> and only for video encoders with reordering capabilities, in my > >> >> opinion. > >> > > >> > What other criterium than the number of codecs would you consider > >> > relevant. IMO, we need to find a reasonable compromise between polluting > >> > the global context with codec-specific things and duplicating the same > >> > options in multiple places. > >> > >> As i said, in my opinion number of codec is not a good metric > > > > Do you propose some better metric then? > > yes, evaluating option-by-option on which level it applies. If it's > video encoding or audio encoding only or if it applies to a very > specific subset of codecs, there are good changes that a private > option might be better suited for the task. > > >> this > >> particular option should not be global since it doesn't apply to > >> audio, and subtitle codecs, does not apply to video decoders, and only > >> a handful of video encoders actually support reordering. > > > > This reasoning would eliminate almost all options out there. > > Not quite, many options like global_quality, compression_level, and > many many others are perfectly suited for being in the global context. > Sample and pixel format despite being for audio and video are other > fine examples too, they apply globally to their subcategory.
I would say that those two are not exactly options. They are stream parameters. > > > I would > > also note that this "handful" of video codecs are also the most popular > > ones. > > One more reason to avoid adding an option which is under consideration > of being made codec private. So I should add a private option that exactly duplicates a global option, just because the global one _might_ get deprecated in the future. That doesn't sound very convincing to me. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
