[FFmpeg-devel] [PATCH] PAFF: Derivation process for chroma motion vector
Carl Eugen Hoyos
cehoyos
Mon Oct 15 10:17:12 CEST 2007
M?ns Rullg?rd <mans <at> mansr.com> writes:
> > --- libavcodec/h264.c (Revision 10738)
> > +++ libavcodec/h264.c (Arbeitskopie)
> > @@ -1729,7 +1729,10 @@
> >
> > if(MB_FIELD){
> > // chroma offset when predicting from a field of opposite parity
> > + if(MB_MBAFF)
> > my += 2 * ((s->mb_y & 1) - (h->ref_cache[list][scan8[n]] & 1));
> > + else if(pic->reference != PICT_FRAME)
> > + my += 2 * ((s->mb_y & 1) - (pic->reference & 1));
> > emu |= (my>>3) < 0 || (my>>3) + 8 >= (pic_height>>1);
> > }
>
> Is that if() needed? Wouldn't pic->reference work also for MBAFF?
I don't think it would work: For the MBAFF sample I have (BBC HD Test)
pic->reference is always PICT_FRAME (which makes my original patch in this
thread wrong, of course), while h->ref_cache[list][scan8[n]] alternates between
even and odd (for one macroblock).
So if ref_cache can't be used for PAFF (that's what Michael says), the if() is
necessary IMO.
Carl Eugen
More information about the ffmpeg-devel
mailing list