On Thu, 20 Sep 2007, Martin Zlomek wrote:
The attached patch fixes CurrPicNum of short term reference fields/frames in reference picture list reordering.
--- h264.c.orig 2007-09-20 23:30:38.000000000 +0200 +++ h264.c 2007-09-20 23:30:53.000000000 +0200 @@ -3056,6 +3056,9 @@ add = 0; }
+ if (pred > h->curr_pic_num) + pred -= h->max_pic_num; + for(i= h->short_ref_count-1; i>=0; i--){ ref = h->short_ref[i]; assert(ref->reference == 3);
This doesn't look right -- shouldn't the wrap check come prior to the block at the start of the patch? At this point of insertion, frame number to look for has already been determined. Also, pred value can't be modified like this; it can be used in subsequent iterations of the loop and has to retain the unmodified value. This is actually not intimately tied to PAFF support; this was there all along so I'm guessing this should be kept distinct from the PAFF support patches. So, the attached patch is one more to add, to be applied after the PAFF patches. A different (smaller) patch is needed if we want to fix prior to PAFF. -Jeff