[FFmpeg-devel] [PATCH] h264: fix direct temporal mvs for bottom-field-first poc order.

Ronald S. Bultje rsbultje at gmail.com
Sun Jul 13 00:38:13 CEST 2014


Fixes http://forum.doom9.org/showthread.php?t=170867.
---
 libavcodec/h264_direct.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index 3cc5f85..b83a279 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -48,7 +48,9 @@ static int get_scale_factor(H264Context * const h, int poc, int poc1, int i){
 }
 
 void ff_h264_direct_dist_scale_factor(H264Context * const h){
-    const int poc = h->cur_pic_ptr->field_poc[h->picture_structure == PICT_BOTTOM_FIELD];
+    const int poc = h->picture_structure == PICT_FRAME ?
+        h->cur_pic_ptr->poc :
+        h->cur_pic_ptr->field_poc[h->picture_structure == PICT_BOTTOM_FIELD];
     const int poc1 = h->ref_list[1][0].poc;
     int i, field;
 
-- 
1.8.5.5



More information about the ffmpeg-devel mailing list