[FFmpeg-cvslog] libavcodec/mpegvideo_parser: improve detection of progressive mpeg2

Aman Gupta git at videolan.org
Wed Dec 13 02:38:43 EET 2017


ffmpeg | branch: master | Aman Gupta <aman at tmm1.net> | Wed Dec  6 14:54:12 2017 -0800| [88e2dc7d0448d1d4656c78454bc5f17063b867e7] | committer: Aman Gupta

libavcodec/mpegvideo_parser: improve detection of progressive mpeg2

Previously many progressive mpeg2video samples were detected as interlaced
by ffmpeg/ffprobe. For example, https://tmm1.s3.amazonaws.com/720p.ts

Before:

    Input #0, mpegts, from 'https://tmm1.s3.amazonaws.com/720p.ts':
      Duration: 00:00:08.62, start: 18974.073233, bitrate: 9734 kb/s
      Program 2
    	Stream #0:0[0x12eb]: Video: mpeg2video (Main), yuv420p(tv, bottom first), 1280x720 ...

After:

    Input #0, mpegts, from 'https://tmm1.s3.amazonaws.com/720p.ts':
      Duration: 00:00:08.62, start: 18974.073233, bitrate: 9734 kb/s
      Program 2
    	Stream #0:0[0x12eb]: Video: mpeg2video (Main), yuv420p(tv, progressive), 1280x720 ...

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/mpegvideo_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index de70cd5632..be240b6890 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -131,7 +131,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
                             }
                         }
 
-                        if (!pc->progressive_sequence) {
+                        if (!pc->progressive_sequence && !progressive_frame) {
                             if (top_field_first)
                                 s->field_order = AV_FIELD_TT;
                             else



More information about the ffmpeg-cvslog mailing list