You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
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 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -1205,7 +1205,7 @@ static av_cold int png_enc_close(AVCodecContext *avctx)
|
|||||||
static const AVOption options[] = {
|
static const AVOption options[] = {
|
||||||
{"dpi", "Set image resolution (in dots per inch)", OFFSET(dpi), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},
|
{"dpi", "Set image resolution (in dots per inch)", OFFSET(dpi), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},
|
||||||
{"dpm", "Set image resolution (in dots per meter)", OFFSET(dpm), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},
|
{"dpm", "Set image resolution (in dots per meter)", OFFSET(dpm), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},
|
||||||
{ "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" },
|
{ "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" },
|
||||||
{ "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_NONE }, INT_MIN, INT_MAX, VE, .unit = "pred" },
|
{ "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_NONE }, INT_MIN, INT_MAX, VE, .unit = "pred" },
|
||||||
{ "sub", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_SUB }, INT_MIN, INT_MAX, VE, .unit = "pred" },
|
{ "sub", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_SUB }, INT_MIN, INT_MAX, VE, .unit = "pred" },
|
||||||
{ "up", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_UP }, INT_MIN, INT_MAX, VE, .unit = "pred" },
|
{ "up", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PNG_FILTER_VALUE_UP }, INT_MIN, INT_MAX, VE, .unit = "pred" },
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
a4c46fad7716ad094eb3c78b74ca0244 *tests/data/fate/copy-apng.apng
|
963d078c8702a77b362c5b7c508fa447 *tests/data/fate/copy-apng.apng
|
||||||
6209864 tests/data/fate/copy-apng.apng
|
3911913 tests/data/fate/copy-apng.apng
|
||||||
#tb 0: 1/25
|
#tb 0: 1/25
|
||||||
#media_type 0: video
|
#media_type 0: video
|
||||||
#codec_id 0: rawvideo
|
#codec_id 0: rawvideo
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
330ad2bf538e91a31752b38024461df1 *tests/data/fate/cover-art-aiff-id3v2-remux.aiff
|
85e67f867e9f3123dacb26535dfdc89e *tests/data/fate/cover-art-aiff-id3v2-remux.aiff
|
||||||
608914 tests/data/fate/cover-art-aiff-id3v2-remux.aiff
|
558518 tests/data/fate/cover-art-aiff-id3v2-remux.aiff
|
||||||
#tb 0: 1/44100
|
#tb 0: 1/44100
|
||||||
#media_type 0: audio
|
#media_type 0: audio
|
||||||
#codec_id 0: pcm_s16be
|
#codec_id 0: pcm_s16be
|
||||||
@ -27,7 +27,7 @@
|
|||||||
#sar 4: 1/1
|
#sar 4: 1/1
|
||||||
0, 0, 0, 1024, 4096, 0xdac4695d
|
0, 0, 0, 1024, 4096, 0xdac4695d
|
||||||
1, 0, 0, 0, 19650, 0xd5662610
|
1, 0, 0, 0, 19650, 0xd5662610
|
||||||
2, 0, 0, 0, 184497, 0xc33f8d44
|
2, 0, 0, 0, 134100, 0x804dcb53
|
||||||
3, 0, 0, 0, 368254, 0xfa7f4bd8
|
3, 0, 0, 0, 368254, 0xfa7f4bd8
|
||||||
4, 0, 0, 0, 19650, 0xd5662610
|
4, 0, 0, 0, 19650, 0xd5662610
|
||||||
0, 1024, 1024, 1024, 4096, 0xad05c909
|
0, 1024, 1024, 1024, 4096, 0xad05c909
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
6defc5081a59ab12c8a5f9e263b25068 *tests/data/fate/cover-art-flac-remux.flac
|
2535b1a3c759250e7f470ece217971a4 *tests/data/fate/cover-art-flac-remux.flac
|
||||||
1098537 tests/data/fate/cover-art-flac-remux.flac
|
964234 tests/data/fate/cover-art-flac-remux.flac
|
||||||
#extradata 0: 34, 0x8d830abd
|
#extradata 0: 34, 0x8d830abd
|
||||||
#tb 0: 1/44100
|
#tb 0: 1/44100
|
||||||
#media_type 0: audio
|
#media_type 0: audio
|
||||||
@ -38,7 +38,7 @@
|
|||||||
#channel_layout_name 6: 2 channels (FL+FC)
|
#channel_layout_name 6: 2 channels (FL+FC)
|
||||||
0, 0, 0, 4608, 14, 0x242b036d
|
0, 0, 0, 4608, 14, 0x242b036d
|
||||||
1, 0, 0, 0, 66888, 0x1fd72743
|
1, 0, 0, 0, 66888, 0x1fd72743
|
||||||
2, 0, 0, 0, 438706, 0x8bcb753b
|
2, 0, 0, 0, 304403, 0xaf7c7667
|
||||||
3, 0, 0, 0, 21671, 0x7d1c6030
|
3, 0, 0, 0, 21671, 0x7d1c6030
|
||||||
4, 0, 0, 0, 522758, 0x7a63572f
|
4, 0, 0, 0, 522758, 0x7a63572f
|
||||||
5, 0, 0, 0, 21671, 0x7d1c6030
|
5, 0, 0, 0, 21671, 0x7d1c6030
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
94946f0efd5f9bb0061ac1fbff7d731f *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
|
a8dc078d174d5c4ae9769090b8404bae *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
|
||||||
399346 tests/data/fate/cover-art-mp3-id3v2-remux.mp3
|
346394 tests/data/fate/cover-art-mp3-id3v2-remux.mp3
|
||||||
#tb 0: 1/14112000
|
#tb 0: 1/14112000
|
||||||
#media_type 0: audio
|
#media_type 0: audio
|
||||||
#codec_id 0: mp3
|
#codec_id 0: mp3
|
||||||
@ -23,7 +23,7 @@
|
|||||||
0, -353590, -353590, 368640, 417, 0x15848290, S=1, 10
|
0, -353590, -353590, 368640, 417, 0x15848290, S=1, 10
|
||||||
1, 0, 0, 0, 208350, 0x291b44d1
|
1, 0, 0, 0, 208350, 0x291b44d1
|
||||||
2, 0, 0, 0, 15760, 0x71d5c418
|
2, 0, 0, 0, 15760, 0x71d5c418
|
||||||
3, 0, 0, 0, 165671, 0x7c1c8070
|
3, 0, 0, 0, 112719, 0x117b6853
|
||||||
0, 15050, 15050, 368640, 418, 0x46f684a4
|
0, 15050, 15050, 368640, 418, 0x46f684a4
|
||||||
0, 383690, 383690, 368640, 418, 0x46f684a4
|
0, 383690, 383690, 368640, 418, 0x46f684a4
|
||||||
0, 752330, 752330, 368640, 418, 0x46f684a4
|
0, 752330, 752330, 368640, 418, 0x46f684a4
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
54a8870d5d1e6cc4da28ae422aa70898 *tests/data/fate/mov-cover-image.mp4
|
9a5143f063aedb39fb1f080444cc19a0 *tests/data/fate/mov-cover-image.mp4
|
||||||
1011919 tests/data/fate/mov-cover-image.mp4
|
1023905 tests/data/fate/mov-cover-image.mp4
|
||||||
#extradata 0: 2, 0x00340022
|
#extradata 0: 2, 0x00340022
|
||||||
#tb 0: 1/44100
|
#tb 0: 1/44100
|
||||||
#media_type 0: audio
|
#media_type 0: audio
|
||||||
@ -20,7 +20,7 @@
|
|||||||
0, -1088, -1088, 1024, 6, 0x027e00e8, F=0x5
|
0, -1088, -1088, 1024, 6, 0x027e00e8, F=0x5
|
||||||
0, -64, -64, 1024, 6, 0x027e00e8
|
0, -64, -64, 1024, 6, 0x027e00e8
|
||||||
1, 0, 0, 0, 25441, 0xe82503b0
|
1, 0, 0, 0, 25441, 0xe82503b0
|
||||||
2, 0, 0, 0, 32657, 0x080255d2
|
2, 0, 0, 0, 44643, 0xdb75ffb5
|
||||||
0, 960, 960, 1024, 6, 0x027e00e8
|
0, 960, 960, 1024, 6, 0x027e00e8
|
||||||
0, 1984, 1984, 1024, 6, 0x027e00e8
|
0, 1984, 1984, 1024, 6, 0x027e00e8
|
||||||
0, 3008, 3008, 1024, 6, 0x027e00e8
|
0, 3008, 3008, 1024, 6, 0x027e00e8
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
c460cd06a88ace94d7c76a6309aa8fb8 *tests/data/fate/png-icc.image2
|
f440d78534808744d4ce727cda3d3309 *tests/data/fate/png-icc.image2
|
||||||
49441 tests/data/fate/png-icc.image2
|
38328 tests/data/fate/png-icc.image2
|
||||||
#tb 0: 1/25
|
#tb 0: 1/25
|
||||||
#media_type 0: video
|
#media_type 0: video
|
||||||
#codec_id 0: rawvideo
|
#codec_id 0: rawvideo
|
||||||
@ -19,7 +19,7 @@ best_effort_timestamp_time=0.000000
|
|||||||
duration=1
|
duration=1
|
||||||
duration_time=0.040000
|
duration_time=0.040000
|
||||||
pkt_pos=0
|
pkt_pos=0
|
||||||
pkt_size=49441
|
pkt_size=38328
|
||||||
width=128
|
width=128
|
||||||
height=128
|
height=128
|
||||||
crop_top=0
|
crop_top=0
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
b1837f5557ad969a3f9763840480d5c0 *tests/data/fate/png-mdcv.image2pipe
|
e486b461b9c408e616873db8ad93b450 *tests/data/fate/png-mdcv.image2pipe
|
||||||
439248 tests/data/fate/png-mdcv.image2pipe
|
493893 tests/data/fate/png-mdcv.image2pipe
|
||||||
#tb 0: 1/25
|
#tb 0: 1/25
|
||||||
#media_type 0: video
|
#media_type 0: video
|
||||||
#codec_id 0: rawvideo
|
#codec_id 0: rawvideo
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
a4c46fad7716ad094eb3c78b74ca0244 *tests/data/lavf/lavf.apng
|
963d078c8702a77b362c5b7c508fa447 *tests/data/lavf/lavf.apng
|
||||||
6209864 tests/data/lavf/lavf.apng
|
3911913 tests/data/lavf/lavf.apng
|
||||||
tests/data/lavf/lavf.apng CRC=0x87b3c15f
|
tests/data/lavf/lavf.apng CRC=0x87b3c15f
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
c5900fdd1b2fc30b985793f5226fd0c4 *tests/data/lavf/lavf.apng.png
|
7dc975747cdcfc3d6a2586a6229767f4 *tests/data/lavf/lavf.apng.png
|
||||||
248854 tests/data/lavf/lavf.apng.png
|
156647 tests/data/lavf/lavf.apng.png
|
||||||
tests/data/lavf/lavf.apng.png CRC=0xd8c7b7a1
|
tests/data/lavf/lavf.apng.png CRC=0xd8c7b7a1
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
0e388f5a62d49c0197030c6d87026bca *tests/data/images/gray16be.png/02.gray16be.png
|
7b0b465ffc39b178a16a9d5d6a83fd13 *tests/data/images/gray16be.png/02.gray16be.png
|
||||||
47171 tests/data/images/gray16be.png/02.gray16be.png
|
66434 tests/data/images/gray16be.png/02.gray16be.png
|
||||||
tests/data/images/gray16be.png/%02d.gray16be.png CRC=0xd679c0f0
|
tests/data/images/gray16be.png/%02d.gray16be.png CRC=0xd679c0f0
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
2af72da4468e61a37c220b25cb28618a *tests/data/images/png/02.png
|
a59706d17b3c6096bfb9c1963b9978db *tests/data/images/png/02.png
|
||||||
248633 tests/data/images/png/02.png
|
157081 tests/data/images/png/02.png
|
||||||
tests/data/images/png/%02d.png CRC=0x6da01946
|
tests/data/images/png/%02d.png CRC=0x6da01946
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
b4e38244c97debe3f528e7d1adb283ef *tests/data/images/rgb48be.png/02.rgb48be.png
|
82b60351aa1409f4cac200955b16fe71 *tests/data/images/rgb48be.png/02.rgb48be.png
|
||||||
511900 tests/data/images/rgb48be.png/02.rgb48be.png
|
370698 tests/data/images/rgb48be.png/02.rgb48be.png
|
||||||
tests/data/images/rgb48be.png/%02d.rgb48be.png CRC=0x5984c023
|
tests/data/images/rgb48be.png/%02d.rgb48be.png CRC=0x5984c023
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
6a27410a07ed1c5556e15b7a7c6a586d *tests/data/fate/vsynth1-mpng.avi
|
40e37e28a693ada8605ea24dce8c2420 *tests/data/fate/vsynth1-mpng.avi
|
||||||
12158280 tests/data/fate/vsynth1-mpng.avi
|
7658772 tests/data/fate/vsynth1-mpng.avi
|
||||||
93695a27c24a61105076ca7b1f010bbd *tests/data/fate/vsynth1-mpng.out.rawvideo
|
93695a27c24a61105076ca7b1f010bbd *tests/data/fate/vsynth1-mpng.out.rawvideo
|
||||||
stddev: 3.42 PSNR: 37.44 MAXDIFF: 48 bytes: 7603200/ 7603200
|
stddev: 3.42 PSNR: 37.44 MAXDIFF: 48 bytes: 7603200/ 7603200
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
481e2d148f411bb61783aa688ec22943 *tests/data/fate/vsynth2-mpng.avi
|
72b7353224c03854583d5809dfd56a77 *tests/data/fate/vsynth2-mpng.avi
|
||||||
11816978 tests/data/fate/vsynth2-mpng.avi
|
9754234 tests/data/fate/vsynth2-mpng.avi
|
||||||
32fae3e665407bb4317b3f90fedb903c *tests/data/fate/vsynth2-mpng.out.rawvideo
|
32fae3e665407bb4317b3f90fedb903c *tests/data/fate/vsynth2-mpng.out.rawvideo
|
||||||
stddev: 1.54 PSNR: 44.37 MAXDIFF: 17 bytes: 7603200/ 7603200
|
stddev: 1.54 PSNR: 44.37 MAXDIFF: 17 bytes: 7603200/ 7603200
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
3f64b66a1f46e31d45dd7f5514422ed0 *tests/data/fate/vsynth3-mpng.avi
|
28177b90f3b5a90043f11dc14b84f3f0 *tests/data/fate/vsynth3-mpng.avi
|
||||||
179804 tests/data/fate/vsynth3-mpng.avi
|
132202 tests/data/fate/vsynth3-mpng.avi
|
||||||
693aff10c094f8bd31693f74cf79d2b2 *tests/data/fate/vsynth3-mpng.out.rawvideo
|
693aff10c094f8bd31693f74cf79d2b2 *tests/data/fate/vsynth3-mpng.out.rawvideo
|
||||||
stddev: 3.67 PSNR: 36.82 MAXDIFF: 43 bytes: 86700/ 86700
|
stddev: 3.67 PSNR: 36.82 MAXDIFF: 43 bytes: 86700/ 86700
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
319ca02f8465a9c53128442f4b0dd528 *tests/data/fate/vsynth_lena-mpng.avi
|
0e83d89b738f387cc747a772d1c2a3c0 *tests/data/fate/vsynth_lena-mpng.avi
|
||||||
12558334 tests/data/fate/vsynth_lena-mpng.avi
|
9433204 tests/data/fate/vsynth_lena-mpng.avi
|
||||||
98d0e2854731472c5bf13d8638502d0a *tests/data/fate/vsynth_lena-mpng.out.rawvideo
|
98d0e2854731472c5bf13d8638502d0a *tests/data/fate/vsynth_lena-mpng.out.rawvideo
|
||||||
stddev: 1.26 PSNR: 46.10 MAXDIFF: 13 bytes: 7603200/ 7603200
|
stddev: 1.26 PSNR: 46.10 MAXDIFF: 13 bytes: 7603200/ 7603200
|
||||||
|
Reference in New Issue
Block a user