[FFmpeg-cvslog] Forward interlaced field information from mov to v210 decoder.

Tim.Nicholson git at videolan.org
Sat Jul 27 21:10:02 CEST 2013


ffmpeg | branch: master | Tim.Nicholson <tim.nicholson at bbc.co.uk> | Sat Jul 27 18:57:28 2013 +0200| [84e345b38e581980b6ee2efb6d05ea3d25d4f88d] | committer: Carl Eugen Hoyos

Forward interlaced field information from mov to v210 decoder.

Reported and tested by Dave Rice.

Signed-off-by: Carl Eugen Hoyos <cehoyos at ag.or.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=84e345b38e581980b6ee2efb6d05ea3d25d4f88d
---

 libavcodec/v210dec.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 42e25cc..c6dba23 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -146,6 +146,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
         v += pic->linesize[2] / 2 - avctx->width / 2;
     }
 
+    if (avctx->field_order > AV_FIELD_PROGRESSIVE) {
+        /* we have interlaced material flagged in container */
+        pic->interlaced_frame = 1;
+        if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)
+            pic->top_field_first = 1;
+    }
+
     *got_frame      = 1;
 
     return avpkt->size;



More information about the ffmpeg-cvslog mailing list