[FFmpeg-devel] [PATCH] H.264: fix decoding of plain still images (broken since revision 14289)

Michael Niedermayer michaelni
Sun Jan 4 15:23:29 CET 2009

On Sat, Jan 03, 2009 at 07:01:32PM +0100, Reinhard Nissl wrote:
> Hi,
> the offending change in that revision seems to me the following:
> -            if(prev && pics <= s->avctx->has_b_frames ||
> out_of_order)
> -                out = prev;
> +            if(pics <= s->avctx->has_b_frames || out_of_order)
> +                out = NULL;
> In the case of a plain still image, there are no previous images.
>  Revision 14288 honored this by checking prev and therefore
> output the current image (the still image).
> In Revision 14289, this test is missing and therefore, no picture
> is output. I've to add that pics as well as has_b_frames was 1
> while out_of_order was 0 when checking the condition in both
> revisions.
> As you can see from the attached patch, the location of this test
> has moved meanwhile and the condition as well as the behavior has
> been inverted, but still lacks a test for "no previous image".
> I've added such a test by using outputted_poc and comparing it to
> INT_MIN, which is the initial value of this variable.
> For testing, I've uploaded two sample files into subdirectory
> rnissl: one with a still frame and one with a pair of fields. See
> readme.txt for more information.

this patch totally breaks h264 decoding, thus rejected.
id post the list of what it breaks but its as far as i can see
every single h264 file from the conformance suite so theres no point.

Besides i do not know what you mean by "still image" which page
of the h264 spec describes it?

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- 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/20090104/b39a1c0c/attachment.pgp>

More information about the ffmpeg-devel mailing list