[FFmpeg-devel] Fwd: Re: [Libav-user] Motion estimation : replacement for deprecated AVFrame::motion_val ?
michaelni at gmx.at
Thu Mar 27 02:27:40 CET 2014
On Thu, Mar 27, 2014 at 02:13:33AM +0100, Vittorio Giovara wrote:
> 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.
The motion vector array itself could be stored in sidedata, iam not
sure how "pretty" this would be but it should work.
I still think though simply undeprecating the
motion_val + motion_subsample_log2 fields
and giving them a clear and well written documentation with whatever
else is needed (block size, stride, element type possibly, ...)
would be the simplest solution
all that could of course be put in side data instead if thats
what people prefer ...
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel