avcodec/j2kenc: Use JP2 format by default
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 19 Jun 2015 03:13:59 +0000 (05:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 19 Jun 2015 19:56:57 +0000 (21:56 +0200)
Without the JP2 fields its not possible to identify the colorspace

Fixes Ticket538

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/j2kenc.c
tests/ref/vsynth/vsynth1-jpeg2000
tests/ref/vsynth/vsynth1-jpeg2000-97
tests/ref/vsynth/vsynth2-jpeg2000
tests/ref/vsynth/vsynth2-jpeg2000-97
tests/ref/vsynth/vsynth3-jpeg2000
tests/ref/vsynth/vsynth3-jpeg2000-97
tests/ref/vsynth/vsynth_lena-jpeg2000
tests/ref/vsynth/vsynth_lena-jpeg2000-97

index ebf8cc7..293515c 100644 (file)
@@ -1109,7 +1109,7 @@ static int j2kenc_destroy(AVCodecContext *avctx)
 #define OFFSET(x) offsetof(Jpeg2000EncoderContext, x)
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 static const AVOption options[] = {
-    { "format",        "Codec Format",      OFFSET(format),        AV_OPT_TYPE_INT,   { .i64 = CODEC_J2K   }, CODEC_J2K, CODEC_JP2,   VE, "format"      },
+    { "format",        "Codec Format",      OFFSET(format),        AV_OPT_TYPE_INT,   { .i64 = CODEC_JP2   }, CODEC_J2K, CODEC_JP2,   VE, "format"      },
     { "j2k",           NULL,                0,                     AV_OPT_TYPE_CONST, { .i64 = CODEC_J2K   }, 0,         0,           VE, "format"      },
     { "jp2",           NULL,                0,                     AV_OPT_TYPE_CONST, { .i64 = CODEC_JP2   }, 0,         0,           VE, "format"      },
     { NULL }
index fec4c2e..5a93be0 100644 (file)
@@ -1,4 +1,4 @@
-445742f01d5ace759fef5c6bdcfda473 *tests/data/fate/vsynth1-jpeg2000.avi
-2257170 tests/data/fate/vsynth1-jpeg2000.avi
+5572e09ae6826a5671fc868da4b153f5 *tests/data/fate/vsynth1-jpeg2000.avi
+2261220 tests/data/fate/vsynth1-jpeg2000.avi
 5cdeb5efd2343994b949718e278819f2 *tests/data/fate/vsynth1-jpeg2000.out.rawvideo
 stddev:    5.37 PSNR: 33.53 MAXDIFF:   60 bytes:  7603200/  7603200
index 13b0050..a959e3b 100644 (file)
@@ -1,4 +1,4 @@
-a6d84f1c576f3eb7d4ea37d0e4a3b84b *tests/data/fate/vsynth1-jpeg2000-97.avi
-2195974 tests/data/fate/vsynth1-jpeg2000-97.avi
+26fdfa1bd7c072002ba9a8feefb8092a *tests/data/fate/vsynth1-jpeg2000-97.avi
+2200030 tests/data/fate/vsynth1-jpeg2000-97.avi
 99f8f9436e6d9d42a71e3d2a90de61d0 *tests/data/fate/vsynth1-jpeg2000-97.out.rawvideo
 stddev:    6.21 PSNR: 32.27 MAXDIFF:   60 bytes:  7603200/  7603200
index e06a5af..caedf80 100644 (file)
@@ -1,4 +1,4 @@
-5e6963f14c74c374158bca007f9fd704 *tests/data/fate/vsynth2-jpeg2000.avi
-1491518 tests/data/fate/vsynth2-jpeg2000.avi
+5118a520a8f776493ee6aeef9849e4a4 *tests/data/fate/vsynth2-jpeg2000.avi
+1495578 tests/data/fate/vsynth2-jpeg2000.avi
 025b1592f31bc71bb249af7e1124b50b *tests/data/fate/vsynth2-jpeg2000.out.rawvideo
 stddev:    5.00 PSNR: 34.14 MAXDIFF:   59 bytes:  7603200/  7603200
index 87dac4f..3bae07d 100644 (file)
@@ -1,4 +1,4 @@
-228d4e9f4fde3cd5ef78c65506a1f85b *tests/data/fate/vsynth2-jpeg2000-97.avi
-1447470 tests/data/fate/vsynth2-jpeg2000-97.avi
+f72998d38afd03608e918a73a122595f *tests/data/fate/vsynth2-jpeg2000-97.avi
+1451520 tests/data/fate/vsynth2-jpeg2000-97.avi
 3351e4a11b4da2971194be7f571f2655 *tests/data/fate/vsynth2-jpeg2000-97.out.rawvideo
 stddev:    5.40 PSNR: 33.47 MAXDIFF:   58 bytes:  7603200/  7603200
index 4bbb2d8..404cb18 100644 (file)
@@ -1,4 +1,4 @@
-9840f4a4fac08b00762fd377d6586772 *tests/data/fate/vsynth3-jpeg2000.avi
-61294 tests/data/fate/vsynth3-jpeg2000.avi
+a9f02a1a91b1c261835ad457a18960e4 *tests/data/fate/vsynth3-jpeg2000.avi
+65358 tests/data/fate/vsynth3-jpeg2000.avi
 861d660c6618202cbbc70b71d5eae25b *tests/data/fate/vsynth3-jpeg2000.out.rawvideo
 stddev:    5.49 PSNR: 33.32 MAXDIFF:   47 bytes:    86700/    86700
index 67b70df..c0b19c2 100644 (file)
@@ -1,4 +1,4 @@
-65bf9803b13ae90b71e0e3caaa68719b *tests/data/fate/vsynth3-jpeg2000-97.avi
-62672 tests/data/fate/vsynth3-jpeg2000-97.avi
+696175c8fe6673baa7f91d5e0844c053 *tests/data/fate/vsynth3-jpeg2000-97.avi
+66706 tests/data/fate/vsynth3-jpeg2000-97.avi
 38058e324177a0ff064b48497ac2af4b *tests/data/fate/vsynth3-jpeg2000-97.out.rawvideo
 stddev:    6.26 PSNR: 32.19 MAXDIFF:   54 bytes:    86700/    86700
index 04c4560..2b27899 100644 (file)
@@ -1,4 +1,4 @@
-b312f1eddda3aed23030495029d55888 *tests/data/fate/vsynth_lena-jpeg2000.avi
-1133188 tests/data/fate/vsynth_lena-jpeg2000.avi
+f47a18d3e5fc745e79d5677cbf65a66d *tests/data/fate/vsynth_lena-jpeg2000.avi
+1137232 tests/data/fate/vsynth_lena-jpeg2000.avi
 7630a7f2ae57be5827b4ade8323717e5 *tests/data/fate/vsynth_lena-jpeg2000.out.rawvideo
 stddev:    4.41 PSNR: 35.24 MAXDIFF:   58 bytes:  7603200/  7603200
index a82c9d6..bcdb758 100644 (file)
@@ -1,4 +1,4 @@
-8e34a7e90f1363994fc2ce071b9bfc0f *tests/data/fate/vsynth_lena-jpeg2000-97.avi
-1102144 tests/data/fate/vsynth_lena-jpeg2000-97.avi
+718f89507f5dfcf703290b9db796a073 *tests/data/fate/vsynth_lena-jpeg2000-97.avi
+1106208 tests/data/fate/vsynth_lena-jpeg2000-97.avi
 44f4d7a4cb6b0de932e2538fa75e983c *tests/data/fate/vsynth_lena-jpeg2000-97.out.rawvideo
 stddev:    4.91 PSNR: 34.30 MAXDIFF:   54 bytes:  7603200/  7603200