[libav-devel] Indeo4 B-frames decoding support

Dirk Ausserhaus dausserhaus at gmail.com
Fri Jun 20 20:46:11 CEST 2014


Here is my patch for decoding B-frames in Indeo4 at last. And another
patch to make things a bit simpler first.

I suppose I have to give some explanation what I did here and why.

First of all, every band has three buffers—current, reference and one
for scalability. I had to add the fourth buffer for the second
reference and change Indeo4 switch_buffers function to handle the
second reference frame.

Second, I had to add the second motion vector to the block
information. I chose a new name for it in order to have less impact on
existing code, since making mv_x and mv_y arrays would lead to more
changes in all places and more possible errors.

Third, I had to extend ivi_mc function to handle B-frames and add some
new functions for bidirectional motion compensation. Motion types are
distinguished by mc_type and mc_type2 variables. Normally they should
contain fractional offset for the motion compensation but I overloaded
it so -1 means no motion vector at all.

I've tested it on various Indeo4 and Indeo5 samples and it doesn't
seem to break anything.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-indeo45-use-is_indeo4-context-flag-instead-of-checki.patch
Type: text/x-patch
Size: 3460 bytes
Desc: not available
URL: <http://lists.libav.org/pipermail/libav-devel/attachments/20140620/e2acdd12/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-indeo4-B-frames-decoding.patch
Type: text/x-patch
Size: 23793 bytes
Desc: not available
URL: <http://lists.libav.org/pipermail/libav-devel/attachments/20140620/e2acdd12/attachment-0003.bin>


More information about the libav-devel mailing list