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

2019-11-13 Thread Baptiste Coudurier

> On Nov 12, 2019, at 1:13 PM, Baptiste Coudurier 
>  wrote:
> 
>> 
>> On Nov 9, 2019, at 4:11 PM, Baptiste Coudurier 
>>  wrote:
>> 
>> ---
>> libavcodec/dv.h |   1 +
>> libavcodec/dvenc.c  | 561 
>> tests/fate/vcodec.mak   |  14 +-
>> tests/ref/vsynth/vsynth1-dv-fhd |   4 +
>> tests/ref/vsynth/vsynth1-dv-hd  |   4 +
>> tests/ref/vsynth/vsynth2-dv-fhd |   4 +
>> tests/ref/vsynth/vsynth2-dv-hd  |   4 +
>> tests/ref/vsynth/vsynth3-dv-fhd |   4 +
>> tests/ref/vsynth/vsynth3-dv-hd  |   4 +
>> 9 files changed, 541 insertions(+), 59 deletions(-)
>> create mode 100644 tests/ref/vsynth/vsynth1-dv-fhd
>> create mode 100644 tests/ref/vsynth/vsynth1-dv-hd
>> create mode 100644 tests/ref/vsynth/vsynth2-dv-fhd
>> create mode 100644 tests/ref/vsynth/vsynth2-dv-hd
>> create mode 100644 tests/ref/vsynth/vsynth3-dv-fhd
>> create mode 100644 tests/ref/vsynth/vsynth3-dv-hd
>> 
> 
> Will apply
> 

Applied

— 
Baptiste

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-11-12 Thread Baptiste Coudurier

> On Nov 9, 2019, at 4:11 PM, Baptiste Coudurier  
> wrote:
> 
> ---
> libavcodec/dv.h |   1 +
> libavcodec/dvenc.c  | 561 
> tests/fate/vcodec.mak   |  14 +-
> tests/ref/vsynth/vsynth1-dv-fhd |   4 +
> tests/ref/vsynth/vsynth1-dv-hd  |   4 +
> tests/ref/vsynth/vsynth2-dv-fhd |   4 +
> tests/ref/vsynth/vsynth2-dv-hd  |   4 +
> tests/ref/vsynth/vsynth3-dv-fhd |   4 +
> tests/ref/vsynth/vsynth3-dv-hd  |   4 +
> 9 files changed, 541 insertions(+), 59 deletions(-)
> create mode 100644 tests/ref/vsynth/vsynth1-dv-fhd
> create mode 100644 tests/ref/vsynth/vsynth1-dv-hd
> create mode 100644 tests/ref/vsynth/vsynth2-dv-fhd
> create mode 100644 tests/ref/vsynth/vsynth2-dv-hd
> create mode 100644 tests/ref/vsynth/vsynth3-dv-fhd
> create mode 100644 tests/ref/vsynth/vsynth3-dv-hd
> 

Will apply

— 
Baptiste

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-11-09 Thread Baptiste Coudurier
Hi Michael,

> On Nov 6, 2019, at 11:02 AM, Michael Niedermayer  
> wrote:
> 
> On Wed, Nov 06, 2019 at 08:54:50AM -0800, Baptiste Coudurier wrote:
>> Hey Michael,
>> 
>>> On Nov 4, 2019, at 12:43 PM, Michael Niedermayer  
>>> 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 00..b81141f340
>>> --- /dev/null
>>> +++ b/tests/ref/vsynth/vsynth1-dv-fhd
>>> @@ -0,0 +1,4 @@
>>> +74315a8678d12c7f592c02990dc8952d *tests/data/fate/vsynth1-dv-fhd.dv
>>> +2880 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 00..c964b083b3
>>> --- /dev/null
>>> +++ b/tests/ref/vsynth/vsynth1-dv-hd
>>> @@ -0,0 +1,4 @@
>>> +12c07ee20aa824dc0ed589336647b195 *tests/data/fate/vsynth1-dv-hd.dv
>>> +1440 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 00..948bf2269f
>>> --- /dev/null
>>> +++ b/tests/ref/vsynth/vsynth2-dv-fhd
>>> @@ -0,0 +1,4 @@
>>> +1f96ce7c1a5f09ec9d30c51c7271cf77 *tests/data/fate/vsynth2-dv-fhd.dv
>>> +2880 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 00..2dce36b94b
>>> --- /dev/null
>>> +++ b/tests/ref/vsynth/vsynth2-dv-hd
>>> @@ -0,0 +1,4 @@
>>> +095db978dd76f36d5706c96f6dac65bd *tests/data/fate/vsynth2-dv-hd.dv
>>> +1440 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 00..08ca9ef889
>>> --- /dev/null
>>> +++ b/tests/ref/vsynth/vsynth3-dv-fhd
>>> @@ -0,0 +1,4 @@
>>> +5b8b7f1dc31d7076af891e94c2e88c06 *tests/data/fate/vsynth3-dv-fhd.dv
>>> +2880 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 00..a42f4b4bb3
>>> --- /dev/null
>>> +++ b/tests/ref/vsynth/vsynth3-dv-hd
>>> @@ -0,0 +1,4 @@
>>> +c05f2a66f9a5090e016d24373c657fd2 *tests/data/fate/vsynth3-dv-hd.dv
>>> +1440 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 00..51a4505011
>>> --- /dev/null
>>> +++ b/tests/ref/vsynth/vsynth_lena-dv-fhd
>>> @@ -0,0 +1,4 @@
>>> +3a33e512f8b3f4213477c98d4e7e2559 *tests/data/fate/vsynth_lena-dv-fhd.dv
>>> +2880 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 00..c682c9eb2c
>>> --- /dev/null
>>> +++ b/tests/ref/vsynth/vsynth_lena-dv-hd
>>> @@ -0,0 +1,4 @@
>>> +4f289998e497e473a1522006bc6b3b74 *tests/data/fate/vsynth_lena-dv-hd.dv
>>> +1440 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.
> 
> as libavformat and libavcodec are seperate entities with their own version
> numbers (and also are packaged seperatly in some distributions)
> it is possible that libavcodec is updated without libavformat
> (libavformat couldnt be as it would have a 

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

2019-11-06 Thread Michael Niedermayer
On Wed, Nov 06, 2019 at 08:54:50AM -0800, Baptiste Coudurier wrote:
> Hey Michael,
> 
> > On Nov 4, 2019, at 12:43 PM, Michael Niedermayer  
> > 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 00..b81141f340
> > --- /dev/null
> > +++ b/tests/ref/vsynth/vsynth1-dv-fhd
> > @@ -0,0 +1,4 @@
> > +74315a8678d12c7f592c02990dc8952d *tests/data/fate/vsynth1-dv-fhd.dv
> > +2880 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 00..c964b083b3
> > --- /dev/null
> > +++ b/tests/ref/vsynth/vsynth1-dv-hd
> > @@ -0,0 +1,4 @@
> > +12c07ee20aa824dc0ed589336647b195 *tests/data/fate/vsynth1-dv-hd.dv
> > +1440 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 00..948bf2269f
> > --- /dev/null
> > +++ b/tests/ref/vsynth/vsynth2-dv-fhd
> > @@ -0,0 +1,4 @@
> > +1f96ce7c1a5f09ec9d30c51c7271cf77 *tests/data/fate/vsynth2-dv-fhd.dv
> > +2880 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 00..2dce36b94b
> > --- /dev/null
> > +++ b/tests/ref/vsynth/vsynth2-dv-hd
> > @@ -0,0 +1,4 @@
> > +095db978dd76f36d5706c96f6dac65bd *tests/data/fate/vsynth2-dv-hd.dv
> > +1440 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 00..08ca9ef889
> > --- /dev/null
> > +++ b/tests/ref/vsynth/vsynth3-dv-fhd
> > @@ -0,0 +1,4 @@
> > +5b8b7f1dc31d7076af891e94c2e88c06 *tests/data/fate/vsynth3-dv-fhd.dv
> > +2880 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 00..a42f4b4bb3
> > --- /dev/null
> > +++ b/tests/ref/vsynth/vsynth3-dv-hd
> > @@ -0,0 +1,4 @@
> > +c05f2a66f9a5090e016d24373c657fd2 *tests/data/fate/vsynth3-dv-hd.dv
> > +1440 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 00..51a4505011
> > --- /dev/null
> > +++ b/tests/ref/vsynth/vsynth_lena-dv-fhd
> > @@ -0,0 +1,4 @@
> > +3a33e512f8b3f4213477c98d4e7e2559 *tests/data/fate/vsynth_lena-dv-fhd.dv
> > +2880 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 00..c682c9eb2c
> > --- /dev/null
> > +++ b/tests/ref/vsynth/vsynth_lena-dv-hd
> > @@ -0,0 +1,4 @@
> > +4f289998e497e473a1522006bc6b3b74 *tests/data/fate/vsynth_lena-dv-hd.dv
> > +1440 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.

as libavformat and libavcodec are seperate entities with their own version
numbers (and also are packaged seperatly in some distributions)
it is possible that libavcodec is updated without libavformat
(libavformat couldnt be as it would have a dependancy on libavcodec pulling
 the matching version in)
 
so the situation of a newer libavcodec is 

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

2019-11-06 Thread Baptiste Coudurier
Hey Michael,

> On Nov 4, 2019, at 12:43 PM, Michael Niedermayer  
> 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 00..b81141f340
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth1-dv-fhd
> @@ -0,0 +1,4 @@
> +74315a8678d12c7f592c02990dc8952d *tests/data/fate/vsynth1-dv-fhd.dv
> +2880 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 00..c964b083b3
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth1-dv-hd
> @@ -0,0 +1,4 @@
> +12c07ee20aa824dc0ed589336647b195 *tests/data/fate/vsynth1-dv-hd.dv
> +1440 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 00..948bf2269f
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth2-dv-fhd
> @@ -0,0 +1,4 @@
> +1f96ce7c1a5f09ec9d30c51c7271cf77 *tests/data/fate/vsynth2-dv-fhd.dv
> +2880 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 00..2dce36b94b
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth2-dv-hd
> @@ -0,0 +1,4 @@
> +095db978dd76f36d5706c96f6dac65bd *tests/data/fate/vsynth2-dv-hd.dv
> +1440 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 00..08ca9ef889
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth3-dv-fhd
> @@ -0,0 +1,4 @@
> +5b8b7f1dc31d7076af891e94c2e88c06 *tests/data/fate/vsynth3-dv-fhd.dv
> +2880 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 00..a42f4b4bb3
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth3-dv-hd
> @@ -0,0 +1,4 @@
> +c05f2a66f9a5090e016d24373c657fd2 *tests/data/fate/vsynth3-dv-hd.dv
> +1440 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 00..51a4505011
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth_lena-dv-fhd
> @@ -0,0 +1,4 @@
> +3a33e512f8b3f4213477c98d4e7e2559 *tests/data/fate/vsynth_lena-dv-fhd.dv
> +2880 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 00..c682c9eb2c
> --- /dev/null
> +++ b/tests/ref/vsynth/vsynth_lena-dv-hd
> @@ -0,0 +1,4 @@
> +4f289998e497e473a1522006bc6b3b74 *tests/data/fate/vsynth_lena-dv-hd.dv
> +1440 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
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-11-04 Thread Michael Niedermayer
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 00..b81141f340
--- /dev/null
+++ b/tests/ref/vsynth/vsynth1-dv-fhd
@@ -0,0 +1,4 @@
+74315a8678d12c7f592c02990dc8952d *tests/data/fate/vsynth1-dv-fhd.dv
+2880 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 00..c964b083b3
--- /dev/null
+++ b/tests/ref/vsynth/vsynth1-dv-hd
@@ -0,0 +1,4 @@
+12c07ee20aa824dc0ed589336647b195 *tests/data/fate/vsynth1-dv-hd.dv
+1440 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 00..948bf2269f
--- /dev/null
+++ b/tests/ref/vsynth/vsynth2-dv-fhd
@@ -0,0 +1,4 @@
+1f96ce7c1a5f09ec9d30c51c7271cf77 *tests/data/fate/vsynth2-dv-fhd.dv
+2880 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 00..2dce36b94b
--- /dev/null
+++ b/tests/ref/vsynth/vsynth2-dv-hd
@@ -0,0 +1,4 @@
+095db978dd76f36d5706c96f6dac65bd *tests/data/fate/vsynth2-dv-hd.dv
+1440 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 00..08ca9ef889
--- /dev/null
+++ b/tests/ref/vsynth/vsynth3-dv-fhd
@@ -0,0 +1,4 @@
+5b8b7f1dc31d7076af891e94c2e88c06 *tests/data/fate/vsynth3-dv-fhd.dv
+2880 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 00..a42f4b4bb3
--- /dev/null
+++ b/tests/ref/vsynth/vsynth3-dv-hd
@@ -0,0 +1,4 @@
+c05f2a66f9a5090e016d24373c657fd2 *tests/data/fate/vsynth3-dv-hd.dv
+1440 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 00..51a4505011
--- /dev/null
+++ b/tests/ref/vsynth/vsynth_lena-dv-fhd
@@ -0,0 +1,4 @@
+3a33e512f8b3f4213477c98d4e7e2559 *tests/data/fate/vsynth_lena-dv-fhd.dv
+2880 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 00..c682c9eb2c
--- /dev/null
+++ b/tests/ref/vsynth/vsynth_lena-dv-hd
@@ -0,0 +1,4 @@
+4f289998e497e473a1522006bc6b3b74 *tests/data/fate/vsynth_lena-dv-hd.dv
+1440 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

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-11-03 Thread Carl Eugen Hoyos
Am Sa., 2. Nov. 2019 um 20:06 Uhr schrieb Baptiste Coudurier
:

> -if (avctx->height > 576) {
> -av_log(avctx, AV_LOG_ERROR, "DVCPRO HD encoding is not 
> supported.\n");
> -return AVERROR_PATCHWELCOME;
> -}

Please mention ticket #1370.

Thank you for the patch, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-11-02 Thread Baptiste Coudurier
On Thu, Sep 19, 2019 at 12:34 PM Michael Niedermayer 
wrote:

> On Wed, Sep 11, 2019 at 12:29:57PM -0700, Baptiste Coudurier wrote:
> > ---
> >  libavcodec/dv.h|   1 +
> >  libavcodec/dvenc.c | 576 -
> >  2 files changed, 522 insertions(+), 55 deletions(-)
>
> a fate test should be added for this if its not already planed or done
>

I'm having issues with fate on macOS catalina right now :(


> [...]
>


> > +/* LOOP1: weigh AC components and store to save[] */
> > +/* (i=0 is the DC component; we only include it to make the
> > +   number of loop iterations even, for future possible SIMD
> optimization) */
> > +for (i = 0; i < 64; i += 2) {
> > +int level0, level1;
> > +
> > +/* get the AC component (in zig-zag order) */
> > +level0 = blk[zigzag_scan[i+0]];
> > +level1 = blk[zigzag_scan[i+1]];
> > +
> > +/* extract sign and make it the lowest bit */
> > +bi->sign[i+0] = (level0>>31)&1;
> > +bi->sign[i+1] = (level1>>31)&1;
> > +
> > +/* take absolute value of the level */
> > +level0 = FFABS(level0);
> > +level1 = FFABS(level1);
> > +
> > +/* weigh it */
> > +level0 = (level0*weight[i+0] + 4096 + (1<<17)) >> 18;
> > +level1 = (level1*weight[i+1] + 4096 + (1<<17)) >> 18;
> > +
> > +/* save unquantized value */
> > +bi->save[i+0] = level0;
> > +bi->save[i+1] = level1;
> > +}
> > +
> > +/* find max component */
> > +for (i = 0; i < 64; i++) {
> > +int ac = bi->save[i];
> > +if (ac > max)
> > +max = ac;
> > +}
>
> these 2 loops can be merged avoiding a 2nd pass
>

Merged

[...]
> > +static inline void dv_guess_qnos_hd(EncBlockInfo *blks, int *qnos)
> > +{
> > +EncBlockInfo *b;
> > +int min_qlevel[5];
> > +int qlevels[5];
> > +int size[5];
> > +int i, j;
> > +/* cache block sizes at hypothetical qlevels */
> > +uint16_t size_cache[5*8][DV100_NUM_QLEVELS] = {{0}};
> > +
> > +/* get minimum qlevels */
> > +for (i = 0; i < 5; i++) {
> > +min_qlevel[i] = 1;
> > +for (j = 0; j < 8; j++) {
> > +if (blks[8*i+j].min_qlevel > min_qlevel[i])
> > +min_qlevel[i] = blks[8*i+j].min_qlevel;
> > +}
> > +}
> > +
> > +/* initialize sizes */
> > +for (i = 0; i < 5; i++) {
> > +qlevels[i] = dv100_starting_qno;
> > +if (qlevels[i] < min_qlevel[i])
> > +qlevels[i] = min_qlevel[i];
> > +
> > +qnos[i] = DV100_QLEVEL_QNO(dv100_qlevels[qlevels[i]]);
> > +size[i] = 0;
> > +for (j = 0; j < 8; j++) {
> > +size_cache[8*i+j][qlevels[i]] =
> dv100_actual_quantize([8*i+j], qlevels[i]);
> > +size[i] += size_cache[8*i+j][qlevels[i]];
> > +}
> > +}
> > +
> > +/* must we go coarser? */
> > +if (size[0]+size[1]+size[2]+size[3]+size[4] > vs_total_ac_bits_hd) {
> > +int largest = size[0] % 5; /* 'random' number */
> > +
>
> > +do {
> > +/* find the macroblock with the lowest qlevel */
> > +for (i = 0; i < 5; i++) {
> > +if (qlevels[i] < DV100_NUM_QLEVELS-1 &&
> > +qlevels[i] < qlevels[largest])
> > +largest = i;
> > +}
> > +
> > +i = largest;
> > +/* ensure that we don't enter infinite loop */
> > +largest = (largest+1) % 5;
> > +
> > +if (qlevels[i] >= DV100_NUM_QLEVELS-1) {
> > +/* can't quantize any more */
> > +continue;
> > +}
> > +
> > +/* quantize a little bit more */
> > +qlevels[i] += dv100_qlevel_inc;
> > +if (qlevels[i] > DV100_NUM_QLEVELS-1)
> > +qlevels[i] = DV100_NUM_QLEVELS-1;
> > +
> > +qnos[i] = DV100_QLEVEL_QNO(dv100_qlevels[qlevels[i]]);
> > +size[i] = 0;
> > +
> > +/* for each block */
> > +b = [8*i];
> > +for (j = 0; j < 8; j++, b++) {
> > +/* accumulate block size into macroblock */
> > +if(size_cache[8*i+j][qlevels[i]] == 0) {
> > +/* it is safe to use actual_quantize() here because
> we only go from finer to coarser,
> > +   and it saves the final actual_quantize() down
> below */
> > +size_cache[8*i+j][qlevels[i]] =
> dv100_actual_quantize(b, qlevels[i]);
> > +}
> > +size[i] += size_cache[8*i+j][qlevels[i]];
> > +} /* for each block */
> > +
> > +} while (vs_total_ac_bits_hd < size[0] + size[1] + size[2] +
> size[3] + size[4] &&
> > + (qlevels[0] < DV100_NUM_QLEVELS-1 ||
> > +  qlevels[1] < DV100_NUM_QLEVELS-1 ||
> > +  qlevels[2] < DV100_NUM_QLEVELS-1 ||
> > +  qlevels[3] < 

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

2019-09-19 Thread Michael Niedermayer
On Wed, Sep 11, 2019 at 12:29:57PM -0700, Baptiste Coudurier wrote:
> ---
>  libavcodec/dv.h|   1 +
>  libavcodec/dvenc.c | 576 -
>  2 files changed, 522 insertions(+), 55 deletions(-)

a fate test should be added for this if its not already planed or done


> 
> diff --git a/libavcodec/dv.h b/libavcodec/dv.h
> index 7ef5b7c552..0205d72347 100644
> --- a/libavcodec/dv.h
> +++ b/libavcodec/dv.h
> @@ -83,6 +83,7 @@ enum dv_pack_type {
>  
>  #define DV_PROFILE_IS_HD(p) ((p)->video_stype & 0x10)
>  #define DV_PROFILE_IS_1080i50(p) (((p)->video_stype == 0x14) && ((p)->dsf == 
> 1))
> +#define DV_PROFILE_IS_1080i60(p) (((p)->video_stype == 0x14) && ((p)->dsf == 
> 0))
>  #define DV_PROFILE_IS_720p50(p)  (((p)->video_stype == 0x18) && ((p)->dsf == 
> 1))
>  
>  /**
> diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c
> index ce2fc75daa..b7a771fa18 100644
> --- a/libavcodec/dvenc.c
> +++ b/libavcodec/dvenc.c
> @@ -60,10 +60,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext 
> *avctx)
>  ff_dv_print_profiles(avctx, AV_LOG_ERROR);
>  return AVERROR(EINVAL);
>  }
> -if (avctx->height > 576) {
> -av_log(avctx, AV_LOG_ERROR, "DVCPRO HD encoding is not 
> supported.\n");
> -return AVERROR_PATCHWELCOME;
> -}
> +
>  ret = ff_dv_init_dynamic_tables(s, s->sys);
>  if (ret < 0) {
>  av_log(avctx, AV_LOG_ERROR, "Error initializing work tables.\n");
> @@ -90,6 +87,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext 
> *avctx)
>  }
>  
>  /* bit budget for AC only in 5 MBs */
> +static const int vs_total_ac_bits_hd = (68 * 6 + 52*2) * 5;
>  static const int vs_total_ac_bits = (100 * 4 + 68 * 2) * 5;
>  static const int mb_area_start[5] = { 1, 6, 21, 43, 64 };
>  
> @@ -158,6 +156,11 @@ typedef struct EncBlockInfo {
>  uint8_t  sign[64];
>  uint8_t  partial_bit_count;
>  uint32_t partial_bit_buffer; /* we can't use uint16_t here */
> +/* used by DV100 only: a copy of the weighted and classified but
> +   not-yet-quantized AC coefficients. This is necessary for
> +   re-quantizing at different steps. */
> +int16_t  save[64];
> +int  min_qlevel; /* DV100 only: minimum qlevel (for AC coefficients 
> >255) */
>  } EncBlockInfo;
>  
>  static av_always_inline PutBitContext *dv_encode_ac(EncBlockInfo *bi,
> @@ -243,13 +246,135 @@ static const int dv_weight_248[64] = {
>  170627, 170627, 153560, 153560, 165371, 165371, 144651, 144651,
>  };
>  
> -static av_always_inline int dv_init_enc_block(EncBlockInfo *bi, uint8_t 
> *data,
> -  ptrdiff_t linesize,
> -  DVVideoContext *s, int bias)

> +/* setting this to 1 results in a faster codec but
> + * somewhat lower image quality */
> +#define DV100_SACRIFICE_QUALITY_FOR_SPEED 1
> +#define DV100_ENABLE_FINER 1

These could be changed to runtime user options
[...]

> +/* how much to increase qlevel when we need to compress more coarsely */
> +/* this is a tradeoff between encoding speed and space efficiency */
> +/* the highest-quality, lowest-speed option it to use 1 for all qlevels. */
> +static const uint8_t dv100_qstep_delta[16] = {
> +#if DV100_SACRIFICE_QUALITY_FOR_SPEED
> +0, 2, 0, 5, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 0,
> +#else
> +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> +#endif
> +};

This is unused


> +
> +static const int dv100_min_bias = 0;
> +static const int dv100_chroma_bias = 0;
> +static const int dv100_starting_qno = 1;

> +static const int dv100_min_qno = 1;

unused
[...]
>  
> +/* this function just copies the DCT coefficients and performs
> +   the initial (non-)quantization. */
> +static inline void dv_set_class_number_hd(DVVideoContext *s,
> +  int16_t *blk, EncBlockInfo *bi,
> +  const uint8_t *zigzag_scan,
> +  const int *weight, int bias)
> +{
> +int i, max = 0;
> +
> +/* the first quantization (none at all) */
> +bi->area_q[0] = 1;
> +

> +/* LOOP1: weigh AC components and store to save[] */
> +/* (i=0 is the DC component; we only include it to make the
> +   number of loop iterations even, for future possible SIMD 
> optimization) */
> +for (i = 0; i < 64; i += 2) {
> +int level0, level1;
> +
> +/* get the AC component (in zig-zag order) */
> +level0 = blk[zigzag_scan[i+0]];
> +level1 = blk[zigzag_scan[i+1]];
> +
> +/* extract sign and make it the lowest bit */
> +bi->sign[i+0] = (level0>>31)&1;
> +bi->sign[i+1] = (level1>>31)&1;
> +
> +/* take absolute value of the level */
> +level0 = FFABS(level0);
> +level1 = FFABS(level1);
> +
> +/* weigh it */
> +level0 = (level0*weight[i+0] + 4096 + (1<<17)) >> 18;
> +level1 = (level1*weight[i+1] + 4096 + 

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

2019-09-11 Thread Carl Eugen Hoyos
Am Mi., 11. Sept. 2019 um 21:30 Uhr schrieb Baptiste Coudurier
:
>
> ---
>  libavcodec/dv.h|   1 +
>  libavcodec/dvenc.c | 576 -
>  2 files changed, 522 insertions(+), 55 deletions(-)

Please mention ticket #1370.

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".