On Thu, 4 Oct 2007, Michael Niedermayer wrote:
Content-Description: Patch 1: mbaddress [...] @@ -3928,6 +3928,11 @@ } s->resync_mb_x = s->mb_x = first_mb_in_slice % s->mb_width; s->resync_mb_y = s->mb_y = (first_mb_in_slice / s->mb_width) << h->mb_aff_frame; + if (FIELD_PICTURE) { + s->resync_mb_y = s->mb_y = s->mb_y * 2; + if (s->picture_structure == PICT_BOTTOM_FIELD) + s->resync_mb_y = s->mb_y = s->mb_y + 1; + } assert(s->mb_y < s->mb_height);
i think this breaks the check above this hunk
It does - I missed that. Added proper check, and simplified this part using the new FIELD_OR_MBAFF macro.
[...]
@@ -6666,7 +6673,7 @@ s->mb_x = 0; ff_draw_horiz_band(s, 16*s->mb_y, 16); ++s->mb_y; - if(FRAME_MBAFF) { + if(FRAME_MBAFF || FIELD_PICTURE) {
this really should be FRAME_MBAFF_OR_FIELD or something like that
Made a FIELD_OR_MBAFF_PICTURE, using picture to coincide with spec "coded picture" definition. Revised paff-mbaddress.patch attached. Suggested commit message is: Modifies macroblock addressing and current macroblock y-position for field decoding. Adds convenience definition for pictures that are field or mbaff based. Part of PAFF implementation.