On 1/23/12, Mashiat Sarker Shakkhar <shahriman_...@yahoo.com> wrote: > > > Doesn't mach my copy of spec or the ref-code. BFRACTION is only present > in B-pictures, not P. My copy of ref-code says: > > if(vc1_InterlacedField == pPosition->ePictureFormat) > { > if(TRUE == pSeqParams->RefDistFlag) > { > if( (TRUE == vc1_PictureTypeIsRef(pParams->ePictureType[0])) > || > (TRUE == vc1_PictureTypeIsRef(pParams->ePictureType[1])) > ) > { > > which translates to (in lavc): > > if (v->fcm == ILACE_FIELD) > { > if (v->refdist_flag) > { > if (s->pict_type != AV_PICTURE_TYPE_B || > s->pict_type != AV_PICTURE_TYPE_BI) > { > .... >
Thats actually not the relevant part. The problem with the old code is that BFRACTION is not read if refdist_flag is 0, however in the spec/reference decoder those two elements are completely independent. All my patch does is change this, so that BFRACTION is read for b-frames, even if refdist_flag is zero. It does not change when refdist is read (on reference frames, so not B/BI), and does not change when BFRACTION is read (on B frames, B/BI) That part of the lavc code you paraphrased is still untouched, i just de-coupled refdist and bfraction. I could re-format the patch slightly so that its more obvious (and less things are changed) I guess it just seemed convenient to link refdist and bfraction at the time, because they use the same condition in inverse. - Hendrik _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel