[FFmpeg-devel] H.264 + PAFF: BBC HD recording shows extreme interlacing artefacts

Reinhard Nissl rnissl
Mon Nov 5 20:53:12 CET 2007


Hi,

Jeff Downs schrieb:

>> Attached you'll find an updated version of the earlier released
>> top_field_first patches.
>>
>> It derives top_field_first by comparing poc.
> 
> [...]
> 
>> Index: libavcodec/h264.c
>> ===================================================================
>> --- libavcodec/h264.c	(revision 10931)
>> +++ libavcodec/h264.c	(working copy)
>> @@ -7763,6 +7763,12 @@
>>              *data_size = 0;
>>  
>>          } else {
>> +            /*
>> +             * Derive top_field_first from poc. Field pictures need to
>> +             * be tested against bottom field poc as we enter here for
>> +             * the second field.
>> +             */
>> +            cur->top_field_first = cur->poc == cur->field_poc[FIELD_PICTURE];
>>              cur->interlaced_frame = FIELD_OR_MBAFF_PICTURE;
>>  
>>          //FIXME do something with unavailable reference frames
> 
> I'm not sure I understand this. cur->poc is the lesser of the two field 
> pocs.

I've seen something like that near the end of init_poc().

> To me, when FIELD_PICTURE is true, the patch says:
> 
> top_field_first = MIN(top_poc, bottom_poc) == bottom_poc
> 
> or, more simply:
> 
> top_field_first = bottom_poc <= top_poc
> 
> Or do I miss something?

I've hacked in this equation and it works opposite to mine. What I have
seen in my previous tests was that for field pictures poc pointed to the
second decoded field at that source location and hence the
top_field_first had to be set when poc pointed to the bottom field.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:rnissl at gmx.de




More information about the ffmpeg-devel mailing list