[FFmpeg-devel] [PATCH] avcodec/dvenc: support encoding dvcprohd

Baptiste Coudurier baptiste.coudurier at gmail.com
Wed Nov 6 18:54:50 EET 2019


Hey Michael,

> On Nov 4, 2019, at 12:43 PM, Michael Niedermayer <michael at niedermayer.cc> wrote:
> 
> On Sat, Nov 02, 2019 at 12:06:19PM -0700, Baptiste Coudurier wrote:
>> ---
>> libavcodec/dv.h       |   1 +
>> libavcodec/dvenc.c    | 555 +++++++++++++++++++++++++++++++++++++-----
> 
>> tests/fate/vcodec.mak |  14 +-
> 
> here are the corresponding ref files i get:
> they are the same on x86-64/32, mingw 32/64 arm & mips (qemu)
> 
> new file mode 100644
> index 0000000000..b81141f340
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth1-dv-fhd
> @@ -0,0 +1,4 @@
> +74315a8678d12c7f592c02990dc8952d *tests/data/fate/vsynth1-dv-fhd.dv
> +28800000 tests/data/fate/vsynth1-dv-fhd.dv
> +c95b309bc128b162e5c8241374eb66a9 *tests/data/fate/vsynth1-dv-fhd.out.rawvideo
> +stddev:    2.53 PSNR: 40.03 MAXDIFF:   35 bytes:  7603200/  7603200
> diff --git a/tests/ref/vsynth/vsynth1-dv-hd b/tests/ref/vsynth/vsynth1-dv-hd
> new file mode 100644
> index 0000000000..c964b083b3
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth1-dv-hd
> @@ -0,0 +1,4 @@
> +12c07ee20aa824dc0ed589336647b195 *tests/data/fate/vsynth1-dv-hd.dv
> +14400000 tests/data/fate/vsynth1-dv-hd.dv
> +dbeb55cfe3ed47d25cbe4e0b45d9bb00 *tests/data/fate/vsynth1-dv-hd.out.rawvideo
> +stddev:   53.33 PSNR: 13.59 MAXDIFF:  238 bytes:  7603200/  7603200
> diff --git a/tests/ref/vsynth/vsynth2-dv-fhd b/tests/ref/vsynth/vsynth2-dv-fhd
> new file mode 100644
> index 0000000000..948bf2269f
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth2-dv-fhd
> @@ -0,0 +1,4 @@
> +1f96ce7c1a5f09ec9d30c51c7271cf77 *tests/data/fate/vsynth2-dv-fhd.dv
> +28800000 tests/data/fate/vsynth2-dv-fhd.dv
> +cff30e2430730522bf67c6d94cf1352e *tests/data/fate/vsynth2-dv-fhd.out.rawvideo
> +stddev:    1.16 PSNR: 46.82 MAXDIFF:   21 bytes:  7603200/  7603200
> diff --git a/tests/ref/vsynth/vsynth2-dv-hd b/tests/ref/vsynth/vsynth2-dv-hd
> new file mode 100644
> index 0000000000..2dce36b94b
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth2-dv-hd
> @@ -0,0 +1,4 @@
> +095db978dd76f36d5706c96f6dac65bd *tests/data/fate/vsynth2-dv-hd.dv
> +14400000 tests/data/fate/vsynth2-dv-hd.dv
> +a1c690626f90e0c79b1247ee560540ef *tests/data/fate/vsynth2-dv-hd.out.rawvideo
> +stddev:   79.63 PSNR: 10.11 MAXDIFF:  240 bytes:  7603200/  7603200
> diff --git a/tests/ref/vsynth/vsynth3-dv-fhd b/tests/ref/vsynth/vsynth3-dv-fhd
> new file mode 100644
> index 0000000000..08ca9ef889
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth3-dv-fhd
> @@ -0,0 +1,4 @@
> +5b8b7f1dc31d7076af891e94c2e88c06 *tests/data/fate/vsynth3-dv-fhd.dv
> +28800000 tests/data/fate/vsynth3-dv-fhd.dv
> +a038ad7c3c09f776304ef7accdea9c74 *tests/data/fate/vsynth3-dv-fhd.out.rawvideo
> +stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:    86700/    86700
> diff --git a/tests/ref/vsynth/vsynth3-dv-hd b/tests/ref/vsynth/vsynth3-dv-hd
> new file mode 100644
> index 0000000000..a42f4b4bb3
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth3-dv-hd
> @@ -0,0 +1,4 @@
> +c05f2a66f9a5090e016d24373c657fd2 *tests/data/fate/vsynth3-dv-hd.dv
> +14400000 tests/data/fate/vsynth3-dv-hd.dv
> +938db8c6ca3bc2d2a64d0f481960efd3 *tests/data/fate/vsynth3-dv-hd.out.rawvideo
> +stddev:   62.24 PSNR: 12.25 MAXDIFF:  218 bytes:    86700/    86700
> diff --git a/tests/ref/vsynth/vsynth_lena-dv-fhd b/tests/ref/vsynth/vsynth_lena-dv-fhd
> new file mode 100644
> index 0000000000..51a4505011
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth_lena-dv-fhd
> @@ -0,0 +1,4 @@
> +3a33e512f8b3f4213477c98d4e7e2559 *tests/data/fate/vsynth_lena-dv-fhd.dv
> +28800000 tests/data/fate/vsynth_lena-dv-fhd.dv
> +b97e0a057202359ef93f2ec0b9fdfec4 *tests/data/fate/vsynth_lena-dv-fhd.out.rawvideo
> +stddev:    1.03 PSNR: 47.80 MAXDIFF:   14 bytes:  7603200/  7603200
> diff --git a/tests/ref/vsynth/vsynth_lena-dv-hd b/tests/ref/vsynth/vsynth_lena-dv-hd
> new file mode 100644
> index 0000000000..c682c9eb2c
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth_lena-dv-hd
> @@ -0,0 +1,4 @@
> +4f289998e497e473a1522006bc6b3b74 *tests/data/fate/vsynth_lena-dv-hd.dv
> +14400000 tests/data/fate/vsynth_lena-dv-hd.dv
> +96e4669d6941c4366e6f599d77061d97 *tests/data/fate/vsynth_lena-dv-hd.out.rawvideo
> +stddev:   54.07 PSNR: 13.47 MAXDIFF:  199 bytes:  7603200/  7603200

Thanks! I actually merged the muxer change in the same patch so that we don’t create bad .dv files with HD.
Let me know if that’s fine.
I found a workaround for compilation on macOS Catalina finally so I added the fate ref files.

— 
Baptiste


More information about the ffmpeg-devel mailing list