libavcodec/mpegvideo_parser: improve detection of progressive mpeg2
authorAman Gupta <aman@tmm1.net>
Wed, 6 Dec 2017 22:54:12 +0000 (14:54 -0800)
committerAman Gupta <aman@tmm1.net>
Wed, 13 Dec 2017 00:37:58 +0000 (16:37 -0800)
commit88e2dc7d0448d1d4656c78454bc5f17063b867e7
tree2949a350b15079728bf1881b900d329d7bd32d3b
parent4280948702bc256e21c375790b889c735d233b0d
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@niedermayer.cc>
libavcodec/mpegvideo_parser.c