[libav-devel] [RFC] [PATCH] lavc: Drop exporting 2-pass encoding stats

Anton Khirnov anton at khirnov.net
Thu Dec 3 09:48:10 CET 2015


Quoting Vittorio Giovara (2015-11-30 18:19:36)
> These variables leaked from mpegvideoenc where are supposedly used for
> statistics. However they might very well be private, and, due to their
> absolute lack of documentation, they are hardly used in the wild. Despite
> being write-only there are options to initalize them, without any effect.
> 
> There is spurious frame_bits which is used in aacenc, again in
> write-only mode, where it can be replaced with a simple local variable.
> 
> Due to the extremely limited scope of use, inability to instruct
> applications how to use the values, and the presence of better means
> to share this kind of information (for example AV_PKT_DATA_QUALITY_FACTOR)
> these fields are removed from the global context.
> 

I'm generally fine with deprecating those things, but I don't like the
motivation described here.

You mention twice that they are "write-only" as if it was in some way a
problem. It's not! The entire point of those variables is to export
information to the caller. It's perfectly natural that they are
write-only for the codec.

Also, AV_PKT_DATA_QUALITY_FACTOR is really no replacement for this, so
mentioning it as a "better means" is misleading.

-- 
Anton Khirnov


More information about the libav-devel mailing list