History

avcodec/pngenc: set default prediction method to PAETH

this is a good compromise between speed and compression -rw-r----- 1 michael michael 180987 Feb 6 14:29 lena-def.png -rw-r----- 1 michael michael 128430 Feb 6 14:36 lena-pavg.png -rw-r----- 1 michael michael 126269 Feb 6 14:36 lena-pmixed.png -rw-r----- 1 michael michael 180987 Feb 6 14:35 lena-pnone.png -rw-r----- 1 michael michael 127758 Feb 6 14:35 lena-ppaeth.png

Michael Niedermayer committed 1 year ago

Commit fbf002d1 parent e47a3c717 files · +38 −38Browse files

Unified · Split

17 files
  1. libavcodec/pngenc.c +1 −1
  2. tests/ref/fate/copy-apng +2 −2
  3. tests/ref/fate/cover-art-aiff-id3v2-remux +3 −3
  4. tests/ref/fate/cover-art-flac-remux +3 −3
  5. tests/ref/fate/cover-art-mp3-id3v2-remux +3 −3
  6. tests/ref/fate/mov-cover-image +3 −3
  7. tests/ref/fate/png-icc +3 −3
  8. tests/ref/fate/png-mdcv +2 −2
  9. tests/ref/lavf/apng +2 −2
  10. tests/ref/lavf/apng.png +2 −2
  11. tests/ref/lavf/gray16be.png +2 −2
  12. tests/ref/lavf/png +2 −2
  13. tests/ref/lavf/rgb48be.png +2 −2
  14. tests/ref/vsynth/vsynth1-mpng +2 −2
  15. tests/ref/vsynth/vsynth2-mpng +2 −2
  16. tests/ref/vsynth/vsynth3-mpng +2 −2
  17. tests/ref/vsynth/vsynth_lena-mpng +2 −2
libavcodec/pngenc.c+1−1
@@ -1205,7 +1205,7 @@ static av_cold int png_enc_close(AVCodecContext *avctx) · 1204 unmodified lines
1205static const AVOption options[] = {1205static const AVOption options[] = {
1206 {"dpi", "Set image resolution (in dots per inch)", OFFSET(dpi), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},1206 {"dpi", "Set image resolution (in dots per inch)", OFFSET(dpi), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},
1207 {"dpm", "Set image resolution (in dots per meter)", OFFSET(dpm), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},1207 {"dpm", "Set image resolution (in dots per meter)", OFFSET(dpm), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},
1208 { "pred", "Prediction method", OFFSET(filter_type), AV_OPT_TYPE_INT, { .i64 = PNG_FILTER_VALUE_NONE }, PNG_FILTER_VALUE_NONE, PNG_FILTER_VALUE_MIXED, VE, .unit = "pred" },1208 { "pred", "Prediction method", OFFSET(filter_type), AV_OPT_TYPE_INT, { .i64 = PNG_FILTER_VALUE_PAETH }, PNG_FILTER_VALUE_NONE, PNG_FILTER_VALUE_MIXED, VE, .unit = "pred" },
1209 { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_NONE }, INT_MIN, INT_MAX, VE, .unit = "pred" },1209 { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_NONE }, INT_MIN, INT_MAX, VE, .unit = "pred" },
1210 { "sub", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_SUB }, INT_MIN, INT_MAX, VE, .unit = "pred" },1210 { "sub", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_SUB }, INT_MIN, INT_MAX, VE, .unit = "pred" },
1211 { "up", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_UP }, INT_MIN, INT_MAX, VE, .unit = "pred" },1211 { "up", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_UP }, INT_MIN, INT_MAX, VE, .unit = "pred" },
tests/ref/fate/copy-apng+2−2
@@ -1,5 +1,5 @@
1a4c46fad7716ad094eb3c78b74ca0244 *tests/data/fate/copy-apng.apng1963d078c8702a77b362c5b7c508fa447 *tests/data/fate/copy-apng.apng
26209864 tests/data/fate/copy-apng.apng23911913 tests/data/fate/copy-apng.apng
3#tb 0: 1/253#tb 0: 1/25
4#media_type 0: video4#media_type 0: video
5#codec_id 0: rawvideo5#codec_id 0: rawvideo
tests/ref/fate/cover-art-aiff-id3v2-remux+3−3
@@ -1,5 +1,5 @@
1330ad2bf538e91a31752b38024461df1 *tests/data/fate/cover-art-aiff-id3v2-remux.aiff185e67f867e9f3123dacb26535dfdc89e *tests/data/fate/cover-art-aiff-id3v2-remux.aiff
2608914 tests/data/fate/cover-art-aiff-id3v2-remux.aiff2558518 tests/data/fate/cover-art-aiff-id3v2-remux.aiff
3#tb 0: 1/441003#tb 0: 1/44100
4#media_type 0: audio4#media_type 0: audio
5#codec_id 0: pcm_s16be5#codec_id 0: pcm_s16be
@@ -27,7 +27,7 @@ · 21 unmodified lines
27#sar 4: 1/127#sar 4: 1/1
280, 0, 0, 1024, 4096, 0xdac4695d280, 0, 0, 1024, 4096, 0xdac4695d
291, 0, 0, 0, 19650, 0xd5662610291, 0, 0, 0, 19650, 0xd5662610
302, 0, 0, 0, 184497, 0xc33f8d44302, 0, 0, 0, 134100, 0x804dcb53
313, 0, 0, 0, 368254, 0xfa7f4bd8313, 0, 0, 0, 368254, 0xfa7f4bd8
324, 0, 0, 0, 19650, 0xd5662610324, 0, 0, 0, 19650, 0xd5662610
330, 1024, 1024, 1024, 4096, 0xad05c909330, 1024, 1024, 1024, 4096, 0xad05c909
tests/ref/fate/cover-art-flac-remux+3−3
@@ -1,5 +1,5 @@
16defc5081a59ab12c8a5f9e263b25068 *tests/data/fate/cover-art-flac-remux.flac12535b1a3c759250e7f470ece217971a4 *tests/data/fate/cover-art-flac-remux.flac
21098537 tests/data/fate/cover-art-flac-remux.flac2964234 tests/data/fate/cover-art-flac-remux.flac
3#extradata 0: 34, 0x8d830abd3#extradata 0: 34, 0x8d830abd
4#tb 0: 1/441004#tb 0: 1/44100
5#media_type 0: audio5#media_type 0: audio
@@ -38,7 +38,7 @@ · 32 unmodified lines
38#channel_layout_name 6: 2 channels (FL+FC)38#channel_layout_name 6: 2 channels (FL+FC)
390, 0, 0, 4608, 14, 0x242b036d390, 0, 0, 4608, 14, 0x242b036d
401, 0, 0, 0, 66888, 0x1fd72743401, 0, 0, 0, 66888, 0x1fd72743
412, 0, 0, 0, 438706, 0x8bcb753b412, 0, 0, 0, 304403, 0xaf7c7667
423, 0, 0, 0, 21671, 0x7d1c6030423, 0, 0, 0, 21671, 0x7d1c6030
434, 0, 0, 0, 522758, 0x7a63572f434, 0, 0, 0, 522758, 0x7a63572f
445, 0, 0, 0, 21671, 0x7d1c6030445, 0, 0, 0, 21671, 0x7d1c6030
tests/ref/fate/cover-art-mp3-id3v2-remux+3−3
@@ -1,5 +1,5 @@
194946f0efd5f9bb0061ac1fbff7d731f *tests/data/fate/cover-art-mp3-id3v2-remux.mp31a8dc078d174d5c4ae9769090b8404bae *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
2399346 tests/data/fate/cover-art-mp3-id3v2-remux.mp32346394 tests/data/fate/cover-art-mp3-id3v2-remux.mp3
3#tb 0: 1/141120003#tb 0: 1/14112000
4#media_type 0: audio4#media_type 0: audio
5#codec_id 0: mp35#codec_id 0: mp3
@@ -23,7 +23,7 @@ · 17 unmodified lines
230, -353590, -353590, 368640, 417, 0x15848290, S=1, 10230, -353590, -353590, 368640, 417, 0x15848290, S=1, 10
241, 0, 0, 0, 208350, 0x291b44d1241, 0, 0, 0, 208350, 0x291b44d1
252, 0, 0, 0, 15760, 0x71d5c418252, 0, 0, 0, 15760, 0x71d5c418
263, 0, 0, 0, 165671, 0x7c1c8070263, 0, 0, 0, 112719, 0x117b6853
270, 15050, 15050, 368640, 418, 0x46f684a4270, 15050, 15050, 368640, 418, 0x46f684a4
280, 383690, 383690, 368640, 418, 0x46f684a4280, 383690, 383690, 368640, 418, 0x46f684a4
290, 752330, 752330, 368640, 418, 0x46f684a4290, 752330, 752330, 368640, 418, 0x46f684a4
tests/ref/fate/mov-cover-image+3−3
@@ -1,5 +1,5 @@
154a8870d5d1e6cc4da28ae422aa70898 *tests/data/fate/mov-cover-image.mp419a5143f063aedb39fb1f080444cc19a0 *tests/data/fate/mov-cover-image.mp4
21011919 tests/data/fate/mov-cover-image.mp421023905 tests/data/fate/mov-cover-image.mp4
3#extradata 0: 2, 0x003400223#extradata 0: 2, 0x00340022
4#tb 0: 1/441004#tb 0: 1/44100
5#media_type 0: audio5#media_type 0: audio
@@ -20,7 +20,7 @@ · 14 unmodified lines
200, -1088, -1088, 1024, 6, 0x027e00e8, F=0x5200, -1088, -1088, 1024, 6, 0x027e00e8, F=0x5
210, -64, -64, 1024, 6, 0x027e00e8210, -64, -64, 1024, 6, 0x027e00e8
221, 0, 0, 0, 25441, 0xe82503b0221, 0, 0, 0, 25441, 0xe82503b0
232, 0, 0, 0, 32657, 0x080255d2232, 0, 0, 0, 44643, 0xdb75ffb5
240, 960, 960, 1024, 6, 0x027e00e8240, 960, 960, 1024, 6, 0x027e00e8
250, 1984, 1984, 1024, 6, 0x027e00e8250, 1984, 1984, 1024, 6, 0x027e00e8
260, 3008, 3008, 1024, 6, 0x027e00e8260, 3008, 3008, 1024, 6, 0x027e00e8
tests/ref/fate/png-icc+3−3
@@ -1,5 +1,5 @@
1c460cd06a88ace94d7c76a6309aa8fb8 *tests/data/fate/png-icc.image21f440d78534808744d4ce727cda3d3309 *tests/data/fate/png-icc.image2
249441 tests/data/fate/png-icc.image2238328 tests/data/fate/png-icc.image2
3#tb 0: 1/253#tb 0: 1/25
4#media_type 0: video4#media_type 0: video
5#codec_id 0: rawvideo5#codec_id 0: rawvideo
@@ -19,7 +19,7 @@ best_effort_timestamp_time=0.000000 · 13 unmodified lines
19duration=119duration=1
20duration_time=0.04000020duration_time=0.040000
21pkt_pos=021pkt_pos=0
22pkt_size=4944122pkt_size=38328
23width=12823width=128
24height=12824height=128
25crop_top=025crop_top=0
tests/ref/fate/png-mdcv+2−2
@@ -1,5 +1,5 @@
1b1837f5557ad969a3f9763840480d5c0 *tests/data/fate/png-mdcv.image2pipe1e486b461b9c408e616873db8ad93b450 *tests/data/fate/png-mdcv.image2pipe
2439248 tests/data/fate/png-mdcv.image2pipe2493893 tests/data/fate/png-mdcv.image2pipe
3#tb 0: 1/253#tb 0: 1/25
4#media_type 0: video4#media_type 0: video
5#codec_id 0: rawvideo5#codec_id 0: rawvideo
tests/ref/lavf/apng+2−2
@@ -1,3 +1,3 @@
1a4c46fad7716ad094eb3c78b74ca0244 *tests/data/lavf/lavf.apng1963d078c8702a77b362c5b7c508fa447 *tests/data/lavf/lavf.apng
26209864 tests/data/lavf/lavf.apng23911913 tests/data/lavf/lavf.apng
3tests/data/lavf/lavf.apng CRC=0x87b3c15f3tests/data/lavf/lavf.apng CRC=0x87b3c15f
tests/ref/lavf/apng.png+2−2
@@ -1,3 +1,3 @@
1c5900fdd1b2fc30b985793f5226fd0c4 *tests/data/lavf/lavf.apng.png17dc975747cdcfc3d6a2586a6229767f4 *tests/data/lavf/lavf.apng.png
2248854 tests/data/lavf/lavf.apng.png2156647 tests/data/lavf/lavf.apng.png
3tests/data/lavf/lavf.apng.png CRC=0xd8c7b7a13tests/data/lavf/lavf.apng.png CRC=0xd8c7b7a1
tests/ref/lavf/gray16be.png+2−2
@@ -1,3 +1,3 @@
10e388f5a62d49c0197030c6d87026bca *tests/data/images/gray16be.png/02.gray16be.png17b0b465ffc39b178a16a9d5d6a83fd13 *tests/data/images/gray16be.png/02.gray16be.png
247171 tests/data/images/gray16be.png/02.gray16be.png266434 tests/data/images/gray16be.png/02.gray16be.png
3tests/data/images/gray16be.png/%02d.gray16be.png CRC=0xd679c0f03tests/data/images/gray16be.png/%02d.gray16be.png CRC=0xd679c0f0
tests/ref/lavf/png+2−2
@@ -1,3 +1,3 @@
12af72da4468e61a37c220b25cb28618a *tests/data/images/png/02.png1a59706d17b3c6096bfb9c1963b9978db *tests/data/images/png/02.png
2248633 tests/data/images/png/02.png2157081 tests/data/images/png/02.png
3tests/data/images/png/%02d.png CRC=0x6da019463tests/data/images/png/%02d.png CRC=0x6da01946
tests/ref/lavf/rgb48be.png+2−2
@@ -1,3 +1,3 @@
1b4e38244c97debe3f528e7d1adb283ef *tests/data/images/rgb48be.png/02.rgb48be.png182b60351aa1409f4cac200955b16fe71 *tests/data/images/rgb48be.png/02.rgb48be.png
2511900 tests/data/images/rgb48be.png/02.rgb48be.png2370698 tests/data/images/rgb48be.png/02.rgb48be.png
3tests/data/images/rgb48be.png/%02d.rgb48be.png CRC=0x5984c0233tests/data/images/rgb48be.png/%02d.rgb48be.png CRC=0x5984c023
tests/ref/vsynth/vsynth1-mpng+2−2
@@ -1,4 +1,4 @@
16a27410a07ed1c5556e15b7a7c6a586d *tests/data/fate/vsynth1-mpng.avi140e37e28a693ada8605ea24dce8c2420 *tests/data/fate/vsynth1-mpng.avi
212158280 tests/data/fate/vsynth1-mpng.avi27658772 tests/data/fate/vsynth1-mpng.avi
393695a27c24a61105076ca7b1f010bbd *tests/data/fate/vsynth1-mpng.out.rawvideo393695a27c24a61105076ca7b1f010bbd *tests/data/fate/vsynth1-mpng.out.rawvideo
4stddev: 3.42 PSNR: 37.44 MAXDIFF: 48 bytes: 7603200/ 76032004stddev: 3.42 PSNR: 37.44 MAXDIFF: 48 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth2-mpng+2−2
@@ -1,4 +1,4 @@
1481e2d148f411bb61783aa688ec22943 *tests/data/fate/vsynth2-mpng.avi172b7353224c03854583d5809dfd56a77 *tests/data/fate/vsynth2-mpng.avi
211816978 tests/data/fate/vsynth2-mpng.avi29754234 tests/data/fate/vsynth2-mpng.avi
332fae3e665407bb4317b3f90fedb903c *tests/data/fate/vsynth2-mpng.out.rawvideo332fae3e665407bb4317b3f90fedb903c *tests/data/fate/vsynth2-mpng.out.rawvideo
4stddev: 1.54 PSNR: 44.37 MAXDIFF: 17 bytes: 7603200/ 76032004stddev: 1.54 PSNR: 44.37 MAXDIFF: 17 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth3-mpng+2−2
@@ -1,4 +1,4 @@
13f64b66a1f46e31d45dd7f5514422ed0 *tests/data/fate/vsynth3-mpng.avi128177b90f3b5a90043f11dc14b84f3f0 *tests/data/fate/vsynth3-mpng.avi
2179804 tests/data/fate/vsynth3-mpng.avi2132202 tests/data/fate/vsynth3-mpng.avi
3693aff10c094f8bd31693f74cf79d2b2 *tests/data/fate/vsynth3-mpng.out.rawvideo3693aff10c094f8bd31693f74cf79d2b2 *tests/data/fate/vsynth3-mpng.out.rawvideo
4stddev: 3.67 PSNR: 36.82 MAXDIFF: 43 bytes: 86700/ 867004stddev: 3.67 PSNR: 36.82 MAXDIFF: 43 bytes: 86700/ 86700
tests/ref/vsynth/vsynth_lena-mpng+2−2
@@ -1,4 +1,4 @@
1319ca02f8465a9c53128442f4b0dd528 *tests/data/fate/vsynth_lena-mpng.avi10e83d89b738f387cc747a772d1c2a3c0 *tests/data/fate/vsynth_lena-mpng.avi
212558334 tests/data/fate/vsynth_lena-mpng.avi29433204 tests/data/fate/vsynth_lena-mpng.avi
398d0e2854731472c5bf13d8638502d0a *tests/data/fate/vsynth_lena-mpng.out.rawvideo398d0e2854731472c5bf13d8638502d0a *tests/data/fate/vsynth_lena-mpng.out.rawvideo
4stddev: 1.26 PSNR: 46.10 MAXDIFF: 13 bytes: 7603200/ 76032004stddev: 1.26 PSNR: 46.10 MAXDIFF: 13 bytes: 7603200/ 7603200

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t