Lair Of The Multimedia Guru

2007-05-03

Small tasks #2 (Iterative motion estimation)

FFmpeg supports iterative motion estimation, but only for snow. It would be interresting to implement/port this code to the generic mpeg framework (motion_est.c/mpegvideo.c/h) in ffmpeg

This task requires:

  1. Reading and understanding the generic motion estimation code
  2. Reading and understanding the iterative motion estimation code in snow.c
  3. Porting/Implementing iterative ME for the generic code

The advantage of iterative ME is higher quality per bitrate (but at higher computational cost).

Normal motion estimation tries to optimize each motion vector so as to minimize the weighted sum of the distortion (difference to the input picture) and the rate (bits for the motion vector). And after doing that for vector i, its done with i+1, then i+2 and so on, where all past vectors are held constant and all future ones are ignored. This is of course not correct, iterative motion estimation OTOH does not ignore any vectors but rather considers the bits of the future vectors too and performs several passes over all blocks until no further improvement is achived (=the search found a local minimum)

Filed under: FFmpeg — Michael @ 01:07

2 Comments »

  1. A possible easier task to do before this would be to port/implement the uneven multi-hexagon search method from x264. If you could outline where code should go in libavcodec/motion_* and possibly talk through the code for one of the existing algorithms, or possibly link to a description of one of the current algorithms it may make initial understanding a little easier.

    I like the look of these small tasks though and I may try to tackle them when a spare moment comes my way.

    Comment by Robert Swain — 2007-05-19 @ 12:40

  2. > A possible easier task to do before this would be to port/implement the
    > uneven multi-hexagon search method from x264.

    that is already supported, see umh_search() in motion_est_template.c

    Comment by Michael — 2007-05-20 @ 22:28

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress