[XviD-devel] BUG: real n-vops with b-frames combination b0rks
Michael Militzer
michael at xvid.org
Wed Feb 15 21:59:19 CET 2006
Patch applied. Thanks!
Regards,
Michael
Quoting Andrew Dunstan <a_dunstan at hotmail.com>:
> >From: "bond" <b-o-n-d at gmx.net>
> >Reply-To: xvid-devel at xvid.org
> >To: <xvid-devel at xvid.org>
> >Subject: [XviD-devel] BUG: real n-vops with b-frames combination b0rks
> >Date: Tue, 31 Jan 2006 18:35:41 +0100
> >
> >for a long time xvid didnt insert real n-vops into the video stream when
> >b-frames have been enabled (be it packed bitstream or not). since 1.1 this
> >has been changed
> >you can get xvid to insert real n-vops by increasing the framedropratio
> >option (maximum is a value of 100)
>
> <snip>
>
> >3) the third problem is that when getting xvid to insert real n-vops the
> >targeted bitrate isnt hit at all anymore in 2pass.
>
> Here's a patch that seems to fix this issue (maybe reason 4 as well, not
> sure):
>
> --- src/encoder.c 19 Jan 2006 22:25:18 -0000 1.123
> +++ src/encoder.c 12 Feb 2006 07:36:42 -0000
> @@ -1384,7 +1384,8 @@
>
> if ( FrameCodeP(pEnc, &bs) == 0 ) {
> /* N-VOP, we mustn't code b-frames yet */
> - call_plugins(pEnc, pEnc->current, &pEnc->sOriginal, XVID_PLG_AFTER,
> NULL, NULL, stats);
> + if ((pEnc->mbParam.global_flags & XVID_GLOBAL_PACKED) ||
> pEnc->mbParam.max_bframes == 0)
> + call_plugins(pEnc, pEnc->current, &pEnc->sOriginal, XVID_PLG_AFTER,
> NULL, NULL, stats);
> goto done;
> }
> }
> @@ -1797,7 +1798,7 @@
> (pParam->frame_drop_ratio * mb_width * mb_height) / 100 &&
> ( (pEnc->bframenum_head >= pEnc->bframenum_tail) ||
> !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) )
> {
> - current->sStat.kblks = current->sStat.mblks = 0;
> + current->sStat.kblks = current->sStat.mblks = current->sStat.iTextBits =
> 0;
> current->sStat.ublks = mb_width * mb_height;
>
> BitstreamReset(bs);
>
>
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
More information about the XviD-devel
mailing list