[FFmpeg-devel] Fwd: Re: [Libav-user] Motion estimation : replacement for deprecated AVFrame::motion_val ?

Vittorio Giovara vittorio.giovara at gmail.com
Thu Mar 27 02:13:33 CET 2014

On Thu, Mar 27, 2014 at 1:51 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > But lets forget about that and just design a better system
>> > what issues do you see in it, what do you suggest to improve it?
>> > the addition of a AVBufferRef is obvious
>> I would definitely not store anything related to a decoder internal
>> inside an AVFrame, maybe an AVBufferRef like you suggest but in
>> AVCodecContext.
> that would be quite inconvenient, the motion vectors are associated
> with a frame not codec context.
> Consider a video filter that would want to display them or use them
> for some effects, its a lot more convenient if they are in the
> AVFrame for that. The same is true for a encoder which might want
> to use them as seeds for its motion estimation.
> Also with AVCodecContext and multithreading and frame reordering
> there would be the question of how to relate motion vectors stored
> in a AVCodecContext field to the frames
> It sure could be done somehow, i just dont think thats a design thats
> easy/convenient to use

You are right. How about AVFrameSideData? Even though it's not yet
been used to carry an AVBufferRef I think it could be doable.
Then again, many do not like to use side data at all, so it's a tough choice.


More information about the ffmpeg-devel mailing list