[FFmpeg-devel] GreenMetadata complexity metric access through high level API
vittorio.giovara at gmail.com
Mon Nov 30 21:50:16 CET 2015
On Mon, Nov 30, 2015 at 8:21 AM, Nicolas Derouineau
<nicolas.derouineau at vitec.com> wrote:
>>you should look at avframesidedata
> Actually the issue is that the green metadatadata are concerning the upcoming frame (They are used to predict the upcoming complexity).
> The avframesidedata are concerning a frame which is already decoded (so it's not useful in the case of greenmetadata).
> We made a proof of concept using a home made parsing function (replacing av_read_frame() by a custom one), but we are thinking about a more portable solution.
I am definitely not familiar with what the green metadata is or does,
but from the sound of it I still think it is suited for
AVFrameSideData: it's data which is not essential for decoding, it's
frame bound, and applications outside lavc might need to act
differently depending on its contents.
Even if this green metadata is used within libavcodec and concerns the
upcoming frame, there is still a way to make it work: I believe that
frame side data in ffmpeg are ref counted (meaning you can just add a
reference to the side data rather than allocating/copying data), put
it in a queue of green metadata and apply it when the upcoming frame
is decoded or it's about to be decoded. You would have to be careful
only in frame reordering, but the rest should be pretty simple.
More information about the ffmpeg-devel