On Tue, Apr 21, 2015 at 4:18 PM, Vittorio Giovara
<[email protected]> wrote:
> This is not implemented for all codecs because there might be encoders
> that reference internal internal frames via coded_frame.
> Also is change affects encoders only since decoders should not use this
> context field.
>
> Signed-off-by: Vittorio Giovara <[email protected]>
> ---


Instead of adding more code to somehow handle coded_frame
inconsistently among codecs, I would rather see it being removed.
(NB: adding flags for minimal behavior changes is less than ideal
either, just make all encoders behave the same way, its not that many)

A quick look through all the encoders, in 99% of all the cases
coded_frame is only used to communicate key_frame, pict_type and
quality to the caller.
Furthermore, these values are not required for the encoding or muxing,
and only serve a pure statistical value. Additionally, its per-frame
statistics, and should ideally be directly associated with the frame
they belong to, ie. somehow link them directly to an AVPacket
(side-data?).

Of course its an API break to remove coded_frame, but I honestly don't
see a usecase for coded_frame, its a full-sized AVFrame container for
2-3 int-sized properties, which shouldn't even belong into the
AVCodecContext in the first place.
So instead of adding more code to deal with coded_frame, why not work
on removing it instead? :)

- Hendrik
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to