[FFmpeg-devel] [PATCH / RFC] Deshake / stabilize filter

Daniel G. Taylor dan
Mon Apr 12 21:16:13 CEST 2010


On 04/12/2010 01:26 PM, Michael Niedermayer wrote:
> On Mon, Apr 12, 2010 at 12:49:47PM -0400, Daniel G. Taylor wrote:
>> [...]
>
> this filter is very interresting but
> could you look at motion_est* please, the code there likely can be used.
> Changing or extending motion_est* so it has a nice public API would for
> this be required but i think its the better approuch than having
> each filter and codec duplicate motion estimation.

Yeah, I saw your mail the other day from the IRC log about this. I'll 
try to spend some of my free time reading over that code but when I 
tried to understand it recently it was still all a bit confusing.

It might be nice if people more in the know about this stuff could come 
up with some specs for such a public API - what it would look and act 
like and what features are required, which are nice to have, etc. I know 
Dark Shikari had mentioned something about having an ME API support both 
RD-minimizing ME searches and something more likely to find the actual 
motion of a block (for e.g. global motion vector calculation).

>> + * TODO:
>> + *   - Compensate for rotation (requires full transform, slower)
>> + *   - Zoom instead of filling frame edges (requires full transform, slower)
>
>> + *   - Fill frame edges based on previous/next reference frames
>
> 1. allocate a larger internal picture
> 2. for each frame match its contents to the larger picture and copy the new
>     frame in there. If no good match reset things and draw in the middle
> 3. output center portion of the larger internal picture or smooth motion
>     to compensate for panning and output the resulting rectangle
>
> With this you not only fill in cornrs fron the next/prev frames but even
> more distant frames.
> And it might work for something else too. If you pan a cammera over a static
> scene the internal picture should then contain the whole thing stitched
> together

This is a really cool idea. I will try to add this when I get a chance!

Thanks for the feedback,
-- 
Daniel G. Taylor
http://programmer-art.org/



More information about the ffmpeg-devel mailing list