diff mbox

[FFmpeg-devel,v2] libavcodec/mpegvideo_parser: improve detection of progressive mpeg2

Message ID 20171208000515.46049-1-ffmpeg@tmm1.net
State New
Headers show

Commit Message

Aman Karmani Dec. 8, 2017, 12:05 a.m. UTC
From: Aman Gupta <aman@tmm1.net>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Dec. 8, 2017, 5:10 p.m. UTC | #1
On Thu, Dec 07, 2017 at 04:05:15PM -0800, Aman Gupta wrote:
> From: Aman Gupta <aman@tmm1.net>
> 
> 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 ...

commit message sounds ok
no more comments from me, please wait a bit with applying so others
can comment too

[...]
Aman Karmani Dec. 13, 2017, 12:39 a.m. UTC | #2
On Fri, Dec 8, 2017 at 9:10 AM, Michael Niedermayer <michael@niedermayer.cc>
wrote:

> On Thu, Dec 07, 2017 at 04:05:15PM -0800, Aman Gupta wrote:
> > From: Aman Gupta <aman@tmm1.net>
> >
> > 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 ...
>
> commit message sounds ok
> no more comments from me, please wait a bit with applying so others
> can comment too
>

Applied. Thanks for the review.

Aman


>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The greatest way to live with honor in this world is to be what we pretend
> to be. -- Socrates
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
diff mbox

Patch

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