[FFmpeg-devel] [RFC] support for Cam_PAL_D1_inter_Field_25fps_2.5MBS.mp4

Michael Niedermayer michaelni
Thu Mar 20 19:26:20 CET 2008


On Thu, Mar 20, 2008 at 03:43:34PM +0100, Reimar D?ffinger wrote:
> Hello,
> I made a patch that works for:
> http://samples.mplayerhq.hu/V-codecs/h264/PAFF/Cam_PAL_D1_inter_Field_25fps_2.5MBS.mp4
> I think this is probably the wrong approach and instead we need an
> AVParser for H.264 in mov, but I am not entirely sure, so please
> have a look at attached patch.

Could you explain in english words what the problem with that file is
and what your patch does? I could guess that its something with multiple
fields in a packet ...


> And also while we are at it, please have a look at the
> "if(context_count) {" part, I think it is not necessary with the current
> code, but at least the comments are confusing and assuming that
> "context_count == h->max_contexts" is true whenever slice header
> decoding returns 1 at least seems a bit brittle to me (I might be
> missing something though).
> 
> Greetings,
> Reimar D?ffinger

> Index: libavcodec/h264.c
> ===================================================================
> --- libavcodec/h264.c	(revision 12478)
> +++ libavcodec/h264.c	(working copy)
> @@ -3884,6 +3884,7 @@
>  
>      if((s->flags2 & CODEC_FLAG2_CHUNKS) && first_mb_in_slice == 0){
>          h0->current_slice = 0;
> +        h0->block_available_fields = 0;

It does not seem that we have such a variable in the context, and your
patch doesnt add one ...


>          if (!s0->first_field)
>              s->current_picture_ptr= NULL;
>      }
> @@ -4003,7 +4004,20 @@
>          s->picture_structure= PICT_FRAME;
>      }else{
>          if(get_bits1(&s->gb)) { //field_pic_flag
> -            s->picture_structure= PICT_TOP_FIELD + get_bits1(&s->gb); //bottom_field_flag
> +            int next_picture_structure = PICT_TOP_FIELD + get_bits1(&s->gb); //bottom_field_flag

> +            int mask = next_picture_structure == PICT_TOP_FIELD ? 1 : 2;

this is just mask = next_picture_structure

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- 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/20080320/83e0db22/attachment.pgp>



More information about the ffmpeg-devel mailing list