[FFmpeg-devel] [PATCH] H.264: Fix poc for field pairs
Jeff Downs
heydowns
Tue Nov 6 18:41:02 CET 2007
Hi,
Attached patch fixes assignment of poc for field pairs. Problem was
discovered by Reinhard Nissl during recent thread "H.264 + PAFF: BBC HD
recording shows extreme interlacing artefacts".
Currently, poc is getting assignment of lesser of the two local field poc
variables which are based on information from current coded field only.
Patch changes this to look at field pocs in current_picture_ptr, each
determined properly during decode of the individual fields.
-Jeff
-------------- next part --------------
Index: libavcodec/h264.c
===================================================================
--- libavcodec/h264.c (revision 10933)
+++ libavcodec/h264.c (working copy)
@@ -3767,8 +3767,10 @@
s->current_picture_ptr->field_poc[1]= field_poc[1];
s->current_picture_ptr->poc = field_poc[1];
}
- if(!FIELD_PICTURE || !s->first_field)
- s->current_picture_ptr->poc= FFMIN(field_poc[0], field_poc[1]);
+ if(!FIELD_PICTURE || !s->first_field) {
+ Picture *cur = s->current_picture_ptr;
+ cur->poc= FFMIN(cur->field_poc[0], cur->field_poc[1]);
+ }
return 0;
}
More information about the ffmpeg-devel
mailing list