[FFmpeg-devel] [RFC] Interlaced material, pix_fmt change, auto-inserted scaler

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Jul 26 22:33:50 CEST 2011


On Tue, Jul 26, 2011 at 09:11:20PM +0100, Mark Himsley wrote:
> On 26/07/11 13:29, Michael Niedermayer wrote:
> >but not pushed, due to:
> >
> >  --- ./tests/ref/vsynth1/dnxhd_1080i    2011-07-14 21:41:40.425374187 +0200
> >+++ tests/data/fate/vsynth1-dnxhd_1080i 2011-07-26 13:45:49.895749789 +0200
> >@@ -1,4 +1,4 @@
> >  34949ea38da2cf6a8406ad600ad95cfa *./tests/data/vsynth1/dnxhd-1080i.mov
> >  3031875 ./tests/data/vsynth1/dnxhd-1080i.mov
> >-0c651e840f860592f0d5b66030d9fa32 *./tests/data/dnxhd_1080i.vsynth1.out.yuv
> >-stddev:    6.29 PSNR: 32.15 MAXDIFF:   64 bytes:   760320/  7603200
> >+3c3226518a0f56468bf56a6682e31fae *./tests/data/dnxhd_1080i.vsynth1.out.yuv
> >+stddev:   14.22 PSNR: 25.07 MAXDIFF:  119 bytes:   760320/  7603200
> >make: *** [fate-vsynth1-dnxhd_1080i] Error 1
> >make: *** Waiting for unfinished jobs....
> >--- ./tests/ref/vsynth1/dv  2011-07-11 03:51:36.225253709 +0200
> >+++ tests/data/fate/vsynth1-dv  2011-07-26 13:45:53.105749789 +0200
> >@@ -1,8 +1,8 @@
> >  27ade3031b17214cf81c19cbf70f37d7 *./tests/data/vsynth1/dv.dv
> >  7200000 ./tests/data/vsynth1/dv.dv
> >-02ac7cdeab91d4d5621e7ce96dddc498 *./tests/data/dv.vsynth1.out.yuv
> >-stddev:    6.90 PSNR: 31.34 MAXDIFF:   76 bytes:  7603200/  7603200
> >+31b3c8f0fa8ae336c561ccdee5738376 *./tests/data/dv.vsynth1.out.yuv
> >+stddev:   12.83 PSNR: 25.96 MAXDIFF:  125 bytes:  7603200/  7603200
> >  bd67f2431db160d4bb6dcd791cea6efd *./tests/data/vsynth1/dv411.dv
> >  7200000 ./tests/data/vsynth1/dv411.dv
> >-b6640a3a572353f51284acb746eb00c4 *./tests/data/dv.vsynth1.out.yuv
> >-stddev:   30.76 PSNR: 18.37 MAXDIFF:  205 bytes:  7603200/  7603200
> >+7baa332c913fc9b65b7b24830acd74e0 *./tests/data/dv.vsynth1.out.yuv
> >+stddev:   31.72 PSNR: 18.10 MAXDIFF:  206 bytes:  7603200/  7603200
> >make: *** [fate-vsynth1-dv] Error 1
> >--- ./tests/ref/vsynth1/dv50    2011-07-11 03:51:36.225253709 +0200
> >+++ tests/data/fate/vsynth1-dv50    2011-07-26 13:45:53.885749789 +0200
> >@@ -1,4 +1,4 @@
> >  26dba84f0ea895b914ef5b333d8394ac *./tests/data/vsynth1/dv50.dv
> >  14400000 ./tests/data/vsynth1/dv50.dv
> >-a2ff093e93ffed10f730fa21df02fc50 *./tests/data/dv50.vsynth1.out.yuv
> >-stddev:    1.72 PSNR: 43.38 MAXDIFF:   29 bytes:  7603200/  7603200
> >+0f612929578f4955c88690b36a783d79 *./tests/data/dv50.vsynth1.out.yuv
> >+stddev:   20.25 PSNR: 22.00 MAXDIFF:  224 bytes:  7603200/  7603200
> >
> >
> >[...]
> 
> I think I understand the output of fate. Taking the last example,
> it's suggesting that the PSNR has reduced from over 43 to 22, which
> would be a devastating difference.
> 
> So, that's DV, DV50, DV411 and dnxhd_1080i. I wonder - are these all
> formats where the decoder always flags the video as interlaced?

Probably yes. For DV that could be fixed, if you search for dv_video_control
in dv.c that should find you the location where the encoder writes the
interlaced flag and where you could add code to read it again.
However I'm not convinced how using interlaced scaling would explain
such a major PSNR loss.


More information about the ffmpeg-devel mailing list