Skip to content

Commit 9b8d11f

Browse files
committed
Fix -revert in tests
1 parent 1d3b119 commit 9b8d11f

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

CMakeLists.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ foreach(libtype ${TEST_LIBTYPES})
12551255
# Lossless (all arguments other than -lossless and -restart should have no
12561256
# effect)
12571257
add_bittest(cjpeg16 lossless
1258-
"-lossless;4;-restart;1;-quality;1;-grayscale;-optimize;-revert;-dct;float;-smooth;100;-baseline;-qslots;1,0,0;-sample;1x2,3x4,2x1"
1258+
"-revert;-lossless;4;-restart;1;-quality;1;-grayscale;-optimize;-dct;float;-smooth;100;-baseline;-qslots;1,0,0;-sample;1x2,3x4,2x1"
12591259
testout16_lossless.jpg ${TESTIMAGES}/testorig.ppm
12601260
${MD5_JPEG_LOSSLESS})
12611261
add_bittest(djpeg16 lossless
@@ -1418,7 +1418,7 @@ foreach(libtype ${TEST_LIBTYPES})
14181418
endif()
14191419

14201420
# CC: null SAMP: fullsize FDCT: islow ENT: huff
1421-
add_bittest(${cjpeg} rgb-islow "-rgb;-revert;-dct;int;-icc;${TESTIMAGES}/test1.icc"
1421+
add_bittest(${cjpeg} rgb-islow "-revert;-rgb;-dct;int;-icc;${TESTIMAGES}/test1.icc"
14221422
${testout}_rgb_islow.jpg ${TESTIMAGES}/testorig.ppm
14231423
${MD5_JPEG_RGB_ISLOW})
14241424

@@ -1433,7 +1433,7 @@ foreach(libtype ${TEST_LIBTYPES})
14331433
set_tests_properties(${djpeg}-${libtype}-rgb-islow-icc-cmp PROPERTIES
14341434
DEPENDS ${djpeg}-${libtype}-rgb-islow)
14351435

1436-
add_bittest(${jpegtran} icc "-copy;all;-icc;${TESTIMAGES}/test3.icc"
1436+
add_bittest(${jpegtran} icc "-revert;-copy;all;-icc;${TESTIMAGES}/test3.icc"
14371437
${testout}_rgb_islow2.jpg ${testout}_rgb_islow.jpg
14381438
${MD5_JPEG_RGB_ISLOW2} ${cjpeg}-${libtype}-rgb-islow)
14391439

@@ -1450,7 +1450,7 @@ foreach(libtype ${TEST_LIBTYPES})
14501450
endif()
14511451

14521452
# CC: RGB->YCC SAMP: fullsize/h2v1 FDCT: ifast ENT: 2-pass huff
1453-
add_bittest(${cjpeg} 422-ifast-opt "-sample;2x1;-revert;-dct;fast;-opt"
1453+
add_bittest(${cjpeg} 422-ifast-opt "-revert;-sample;2x1;-dct;fast;-opt"
14541454
${testout}_422_ifast_opt.jpg ${TESTIMAGES}/testorig.ppm
14551455
${MD5_JPEG_422_IFAST_OPT})
14561456

@@ -1460,7 +1460,7 @@ foreach(libtype ${TEST_LIBTYPES})
14601460
${MD5_PPM_422_IFAST} ${cjpeg}-${libtype}-422-ifast-opt)
14611461

14621462
# CC: RGB->YCC SAMP: fullsize/h1v2 FDCT: islow ENT: huff
1463-
add_bittest(${cjpeg} 440-islow "-sample;1x2;-revert;-dct;int"
1463+
add_bittest(${cjpeg} 440-islow "-revert;-sample;1x2;-dct;int"
14641464
${testout}_440_islow.jpg ${TESTIMAGES}/testorig.ppm
14651465
${MD5_JPEG_440_ISLOW})
14661466

@@ -1489,7 +1489,7 @@ foreach(libtype ${TEST_LIBTYPES})
14891489

14901490
# CC: RGB->YCC SAMP: fullsize/h2v2 FDCT: ifast ENT: prog huff
14911491
add_bittest(${cjpeg} 420-q100-ifast-prog
1492-
"-sample;2x2;-quality;100;-revert;-dct;fast;-scans;${TESTIMAGES}/test.scan"
1492+
"-revert;-sample;2x2;-quality;100;-dct;fast;-scans;${TESTIMAGES}/test.scan"
14931493
${testout}_420_q100_ifast_prog.jpg ${TESTIMAGES}/testorig.ppm
14941494
${MD5_JPEG_420_IFAST_Q100_PROG})
14951495

@@ -1504,7 +1504,7 @@ foreach(libtype ${TEST_LIBTYPES})
15041504
${MD5_PPM_420M_Q100_IFAST} ${cjpeg}-${libtype}-420-q100-ifast-prog)
15051505

15061506
# CC: RGB->Gray SAMP: fullsize FDCT: islow ENT: huff
1507-
add_bittest(${cjpeg} gray-islow "-gray;-revert;-dct;int"
1507+
add_bittest(${cjpeg} gray-islow "-revert;-gray;-dct;int"
15081508
${testout}_gray_islow.jpg ${TESTIMAGES}/testorig.ppm
15091509
${MD5_JPEG_GRAY_ISLOW})
15101510

@@ -1532,13 +1532,13 @@ foreach(libtype ${TEST_LIBTYPES})
15321532

15331533
# CC: RGB->YCC SAMP: fullsize smooth/h2v2 smooth FDCT: islow
15341534
# ENT: 2-pass huff
1535-
add_bittest(${cjpeg} 420s-ifast-opt "-sample;2x2;-smooth;1;-revert;-dct;int;-opt"
1535+
add_bittest(${cjpeg} 420s-ifast-opt "-revert;-sample;2x2;-smooth;1;-dct;int;-opt"
15361536
${testout}_420s_ifast_opt.jpg ${TESTIMAGES}/testorig.ppm
15371537
${MD5_JPEG_420S_IFAST_OPT})
15381538

15391539
if(FLOATTEST${sample_bits})
15401540
# CC: RGB->YCC SAMP: fullsize/int FDCT: float ENT: prog huff
1541-
add_bittest(${cjpeg} 3x2-float-prog "-sample;3x2;-revert;-dct;float;-prog"
1541+
add_bittest(${cjpeg} 3x2-float-prog "-revert;-sample;3x2;-dct;float;-prog"
15421542
${testout}_3x2_float_prog.jpg ${TESTIMAGES}/testorig.ppm
15431543
${MD5_JPEG_3x2_FLOAT_PROG_${FLOATTEST${sample_bits}_UC}})
15441544

@@ -1550,7 +1550,7 @@ foreach(libtype ${TEST_LIBTYPES})
15501550
endif()
15511551

15521552
# CC: RGB->YCC SAMP: fullsize/int FDCT: ifast ENT: prog huff
1553-
add_bittest(${cjpeg} 3x2-ifast-prog "-sample;3x2;-revert;-dct;fast;-prog"
1553+
add_bittest(${cjpeg} 3x2-ifast-prog "-revert;-sample;3x2;-dct;fast;-prog"
15541554
${testout}_3x2_ifast_prog.jpg ${TESTIMAGES}/testorig.ppm
15551555
${MD5_JPEG_3x2_IFAST_PROG})
15561556

@@ -1571,7 +1571,7 @@ foreach(libtype ${TEST_LIBTYPES})
15711571

15721572
# CC: YCC->RGB SAMP: fullsize FDCT: islow ENT: prog arith
15731573
add_bittest(${cjpeg} 444-islow-progari
1574-
"-sample;1x1;-revert;-dct;int;-prog;-arithmetic"
1574+
"-revert;-sample;1x1;-dct;int;-prog;-arithmetic"
15751575
${testout}_444_islow_progari.jpg ${TESTIMAGES}/testorig.ppm
15761576
${MD5_JPEG_444_ISLOW_PROGARI})
15771577
endif()
@@ -1645,7 +1645,7 @@ foreach(libtype ${TEST_LIBTYPES})
16451645
# Lossless (all arguments other than -lossless and -restart should have no
16461646
# effect)
16471647
add_bittest(${cjpeg} lossless
1648-
"-lossless;4;-restart;1;-quality;1;-grayscale;-optimize;-revert;-dct;float;-smooth;100;-baseline;-qslots;1,0,0;-sample;1x2,3x4,2x1"
1648+
"-revert;-lossless;4;-restart;1;-quality;1;-grayscale;-optimize;-dct;float;-smooth;100;-baseline;-qslots;1,0,0;-sample;1x2,3x4,2x1"
16491649
${testout}_lossless.jpg ${TESTIMAGES}/testorig.ppm
16501650
${MD5_JPEG_LOSSLESS})
16511651
add_bittest(${djpeg} lossless
@@ -1725,7 +1725,7 @@ foreach(libtype ${TEST_LIBTYPES})
17251725
endif()
17261726
endif()
17271727

1728-
add_bittest(${jpegtran} crop "-crop;120x90+20+50;-transpose;-perfect"
1728+
add_bittest(${jpegtran} crop "-revert;-crop;120x90+20+50;-transpose;-perfect"
17291729
${testout}_crop.jpg ${TESTIMAGES}/${TESTORIG}
17301730
${MD5_JPEG_CROP})
17311731

example.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ write_JPEG_file(char *filename, int quality, int data_precision)
131131
cinfo.err = jpeg_std_error(&jerr);
132132
/* Now we can initialize the JPEG compression object. */
133133
jpeg_create_compress(&cinfo);
134+
jpeg_c_set_int_param(&cinfo, JINT_COMPRESS_PROFILE, JCP_FASTEST);
134135

135136
/* Step 2: specify data destination (eg, a file) */
136137
/* Note: steps 2 and 3 can be done in either order. */

0 commit comments

Comments
 (0)