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
12051205 static const AVOption options[] = {
12061206 {"dpi", "Set image resolution (in dots per inch)", OFFSET(dpi), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},
12071207 {"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" },
12091209 { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_NONE }, INT_MIN, INT_MAX, VE, .unit = "pred" },
12101210 { "sub", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_SUB }, INT_MIN, INT_MAX, VE, .unit = "pred" },
12111211 { "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 @@
1−a4c46fad7716ad094eb3c78b74ca0244 *tests/data/fate/copy-apng.apng
2−6209864 tests/data/fate/copy-apng.apng
1+963d078c8702a77b362c5b7c508fa447 *tests/data/fate/copy-apng.apng
2+3911913 tests/data/fate/copy-apng.apng
33 #tb 0: 1/25
44 #media_type 0: video
55 #codec_id 0: rawvideo
tests/ref/fate/cover-art-aiff-id3v2-remux+3−3
@@ -1,5 +1,5 @@
1−330ad2bf538e91a31752b38024461df1 *tests/data/fate/cover-art-aiff-id3v2-remux.aiff
2−608914 tests/data/fate/cover-art-aiff-id3v2-remux.aiff
1+85e67f867e9f3123dacb26535dfdc89e *tests/data/fate/cover-art-aiff-id3v2-remux.aiff
2+558518 tests/data/fate/cover-art-aiff-id3v2-remux.aiff
33 #tb 0: 1/44100
44 #media_type 0: audio
55 #codec_id 0: pcm_s16be
@@ -27,7 +27,7 @@ · 21 unmodified lines
2727 #sar 4: 1/1
2828 0, 0, 0, 1024, 4096, 0xdac4695d
2929 1, 0, 0, 0, 19650, 0xd5662610
30−2, 0, 0, 0, 184497, 0xc33f8d44
30+2, 0, 0, 0, 134100, 0x804dcb53
3131 3, 0, 0, 0, 368254, 0xfa7f4bd8
3232 4, 0, 0, 0, 19650, 0xd5662610
3333 0, 1024, 1024, 1024, 4096, 0xad05c909
tests/ref/fate/cover-art-flac-remux+3−3
@@ -1,5 +1,5 @@
1−6defc5081a59ab12c8a5f9e263b25068 *tests/data/fate/cover-art-flac-remux.flac
2−1098537 tests/data/fate/cover-art-flac-remux.flac
1+2535b1a3c759250e7f470ece217971a4 *tests/data/fate/cover-art-flac-remux.flac
2+964234 tests/data/fate/cover-art-flac-remux.flac
33 #extradata 0: 34, 0x8d830abd
44 #tb 0: 1/44100
55 #media_type 0: audio
@@ -38,7 +38,7 @@ · 32 unmodified lines
3838 #channel_layout_name 6: 2 channels (FL+FC)
3939 0, 0, 0, 4608, 14, 0x242b036d
4040 1, 0, 0, 0, 66888, 0x1fd72743
41−2, 0, 0, 0, 438706, 0x8bcb753b
41+2, 0, 0, 0, 304403, 0xaf7c7667
4242 3, 0, 0, 0, 21671, 0x7d1c6030
4343 4, 0, 0, 0, 522758, 0x7a63572f
4444 5, 0, 0, 0, 21671, 0x7d1c6030
tests/ref/fate/cover-art-mp3-id3v2-remux+3−3
@@ -1,5 +1,5 @@
1−94946f0efd5f9bb0061ac1fbff7d731f *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
2−399346 tests/data/fate/cover-art-mp3-id3v2-remux.mp3
1+a8dc078d174d5c4ae9769090b8404bae *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
2+346394 tests/data/fate/cover-art-mp3-id3v2-remux.mp3
33 #tb 0: 1/14112000
44 #media_type 0: audio
55 #codec_id 0: mp3
@@ -23,7 +23,7 @@ · 17 unmodified lines
2323 0, -353590, -353590, 368640, 417, 0x15848290, S=1, 10
2424 1, 0, 0, 0, 208350, 0x291b44d1
2525 2, 0, 0, 0, 15760, 0x71d5c418
26−3, 0, 0, 0, 165671, 0x7c1c8070
26+3, 0, 0, 0, 112719, 0x117b6853
2727 0, 15050, 15050, 368640, 418, 0x46f684a4
2828 0, 383690, 383690, 368640, 418, 0x46f684a4
2929 0, 752330, 752330, 368640, 418, 0x46f684a4
tests/ref/fate/mov-cover-image+3−3
@@ -1,5 +1,5 @@
1−54a8870d5d1e6cc4da28ae422aa70898 *tests/data/fate/mov-cover-image.mp4
2−1011919 tests/data/fate/mov-cover-image.mp4
1+9a5143f063aedb39fb1f080444cc19a0 *tests/data/fate/mov-cover-image.mp4
2+1023905 tests/data/fate/mov-cover-image.mp4
33 #extradata 0: 2, 0x00340022
44 #tb 0: 1/44100
55 #media_type 0: audio
@@ -20,7 +20,7 @@ · 14 unmodified lines
2020 0, -1088, -1088, 1024, 6, 0x027e00e8, F=0x5
2121 0, -64, -64, 1024, 6, 0x027e00e8
2222 1, 0, 0, 0, 25441, 0xe82503b0
23−2, 0, 0, 0, 32657, 0x080255d2
23+2, 0, 0, 0, 44643, 0xdb75ffb5
2424 0, 960, 960, 1024, 6, 0x027e00e8
2525 0, 1984, 1984, 1024, 6, 0x027e00e8
2626 0, 3008, 3008, 1024, 6, 0x027e00e8
tests/ref/fate/png-icc+3−3
@@ -1,5 +1,5 @@
1−c460cd06a88ace94d7c76a6309aa8fb8 *tests/data/fate/png-icc.image2
2−49441 tests/data/fate/png-icc.image2
1+f440d78534808744d4ce727cda3d3309 *tests/data/fate/png-icc.image2
2+38328 tests/data/fate/png-icc.image2
33 #tb 0: 1/25
44 #media_type 0: video
55 #codec_id 0: rawvideo
@@ -19,7 +19,7 @@ best_effort_timestamp_time=0.000000 · 13 unmodified lines
1919 duration=1
2020 duration_time=0.040000
2121 pkt_pos=0
22−pkt_size=49441
22+pkt_size=38328
2323 width=128
2424 height=128
2525 crop_top=0
tests/ref/fate/png-mdcv+2−2
@@ -1,5 +1,5 @@
1−b1837f5557ad969a3f9763840480d5c0 *tests/data/fate/png-mdcv.image2pipe
2−439248 tests/data/fate/png-mdcv.image2pipe
1+e486b461b9c408e616873db8ad93b450 *tests/data/fate/png-mdcv.image2pipe
2+493893 tests/data/fate/png-mdcv.image2pipe
33 #tb 0: 1/25
44 #media_type 0: video
55 #codec_id 0: rawvideo
tests/ref/lavf/apng+2−2
@@ -1,3 +1,3 @@
1−a4c46fad7716ad094eb3c78b74ca0244 *tests/data/lavf/lavf.apng
2−6209864 tests/data/lavf/lavf.apng
1+963d078c8702a77b362c5b7c508fa447 *tests/data/lavf/lavf.apng
2+3911913 tests/data/lavf/lavf.apng
33 tests/data/lavf/lavf.apng CRC=0x87b3c15f
tests/ref/lavf/apng.png+2−2
@@ -1,3 +1,3 @@
1−c5900fdd1b2fc30b985793f5226fd0c4 *tests/data/lavf/lavf.apng.png
2−248854 tests/data/lavf/lavf.apng.png
1+7dc975747cdcfc3d6a2586a6229767f4 *tests/data/lavf/lavf.apng.png
2+156647 tests/data/lavf/lavf.apng.png
33 tests/data/lavf/lavf.apng.png CRC=0xd8c7b7a1
tests/ref/lavf/gray16be.png+2−2
@@ -1,3 +1,3 @@
1−0e388f5a62d49c0197030c6d87026bca *tests/data/images/gray16be.png/02.gray16be.png
2−47171 tests/data/images/gray16be.png/02.gray16be.png
1+7b0b465ffc39b178a16a9d5d6a83fd13 *tests/data/images/gray16be.png/02.gray16be.png
2+66434 tests/data/images/gray16be.png/02.gray16be.png
33 tests/data/images/gray16be.png/%02d.gray16be.png CRC=0xd679c0f0
tests/ref/lavf/png+2−2
@@ -1,3 +1,3 @@
1−2af72da4468e61a37c220b25cb28618a *tests/data/images/png/02.png
2−248633 tests/data/images/png/02.png
1+a59706d17b3c6096bfb9c1963b9978db *tests/data/images/png/02.png
2+157081 tests/data/images/png/02.png
33 tests/data/images/png/%02d.png CRC=0x6da01946
tests/ref/lavf/rgb48be.png+2−2
@@ -1,3 +1,3 @@
1−b4e38244c97debe3f528e7d1adb283ef *tests/data/images/rgb48be.png/02.rgb48be.png
2−511900 tests/data/images/rgb48be.png/02.rgb48be.png
1+82b60351aa1409f4cac200955b16fe71 *tests/data/images/rgb48be.png/02.rgb48be.png
2+370698 tests/data/images/rgb48be.png/02.rgb48be.png
33 tests/data/images/rgb48be.png/%02d.rgb48be.png CRC=0x5984c023
tests/ref/vsynth/vsynth1-mpng+2−2
@@ -1,4 +1,4 @@
1−6a27410a07ed1c5556e15b7a7c6a586d *tests/data/fate/vsynth1-mpng.avi
2−12158280 tests/data/fate/vsynth1-mpng.avi
1+40e37e28a693ada8605ea24dce8c2420 *tests/data/fate/vsynth1-mpng.avi
2+7658772 tests/data/fate/vsynth1-mpng.avi
33 93695a27c24a61105076ca7b1f010bbd *tests/data/fate/vsynth1-mpng.out.rawvideo
44 stddev: 3.42 PSNR: 37.44 MAXDIFF: 48 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth2-mpng+2−2
@@ -1,4 +1,4 @@
1−481e2d148f411bb61783aa688ec22943 *tests/data/fate/vsynth2-mpng.avi
2−11816978 tests/data/fate/vsynth2-mpng.avi
1+72b7353224c03854583d5809dfd56a77 *tests/data/fate/vsynth2-mpng.avi
2+9754234 tests/data/fate/vsynth2-mpng.avi
33 32fae3e665407bb4317b3f90fedb903c *tests/data/fate/vsynth2-mpng.out.rawvideo
44 stddev: 1.54 PSNR: 44.37 MAXDIFF: 17 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth3-mpng+2−2
@@ -1,4 +1,4 @@
1−3f64b66a1f46e31d45dd7f5514422ed0 *tests/data/fate/vsynth3-mpng.avi
2−179804 tests/data/fate/vsynth3-mpng.avi
1+28177b90f3b5a90043f11dc14b84f3f0 *tests/data/fate/vsynth3-mpng.avi
2+132202 tests/data/fate/vsynth3-mpng.avi
33 693aff10c094f8bd31693f74cf79d2b2 *tests/data/fate/vsynth3-mpng.out.rawvideo
44 stddev: 3.67 PSNR: 36.82 MAXDIFF: 43 bytes: 86700/ 86700
tests/ref/vsynth/vsynth_lena-mpng+2−2
@@ -1,4 +1,4 @@
1−319ca02f8465a9c53128442f4b0dd528 *tests/data/fate/vsynth_lena-mpng.avi
2−12558334 tests/data/fate/vsynth_lena-mpng.avi
1+0e83d89b738f387cc747a772d1c2a3c0 *tests/data/fate/vsynth_lena-mpng.avi
2+9433204 tests/data/fate/vsynth_lena-mpng.avi
33 98d0e2854731472c5bf13d8638502d0a *tests/data/fate/vsynth_lena-mpng.out.rawvideo
44 stddev: 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