[FFmpeg-devel] [PATCH] Increase max_pic_num
Michael Niedermayer
michaelni
Tue Oct 9 17:34:22 CEST 2007
Hi
On Tue, Oct 09, 2007 at 11:17:01AM -0400, Jeff Downs wrote:
> Hi,
>
> On Tue, 9 Oct 2007, Carl Eugen Hoyos wrote:
>
> > Hi!
> >
> > After enabling PAFF decoding, for one sample (PREMIERE HD), I get these
> > errors together with heavy picture distortion:
> >
> > [h264 @ 0x894cef0]abs_diff_pic_num overflow
> > [h264 @ 0x894cef0]decode_slice_header error
> >
> > Attached patch fixes both the errors and the picture for this sample.
> >
>
> The distortion you receive is because the decoder drops those (reference)
> frames when this error trips.
>
> > Index: libavcodec/h264.c
> > ===================================================================
> > --- libavcodec/h264.c (Revision 10695)
> > +++ libavcodec/h264.c (Arbeitskopie)
> > @@ -4064,7 +4064,7 @@
> > h->max_pic_num= 1<< h->sps.log2_max_frame_num;
> > }else{
> > h->curr_pic_num= 2*h->frame_num + 1;
> > - h->max_pic_num= 1<<(h->sps.log2_max_frame_num + 1);
> > + h->max_pic_num= (1<<(h->sps.log2_max_frame_num + 1)) + 1;
> > }
> >
> > if(h->nal_unit_type == NAL_IDR_SLICE){
>
> This will likely cause issues with reference picture management and list
> building because max_pic_num will be wrong.
>
> I think the actual problem (has been there since before paff) is in the
> check that causes that error to post. The spec says its perfectly
> legitimate to have an abs_diff_pic_num == max_pic_num.
>
> The following patch should fix this.
patch ok (if it fixes it)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071009/1120d3ed/attachment.pgp>
More information about the ffmpeg-devel
mailing list