* [FFmpeg-devel] [PATCH 1/3] doc/encoders: Document compression_level for PNG
@ 2025-02-06 13:47 Michael Niedermayer
2025-02-06 13:47 ` [FFmpeg-devel] [PATCH 2/3] avcodec/pngenc: set default prediction method to PAETH Michael Niedermayer
2025-02-06 13:47 ` [FFmpeg-devel] [PATCH 3/3] doc/encoders: Document png pred Michael Niedermayer
0 siblings, 2 replies; 3+ messages in thread
From: Michael Niedermayer @ 2025-02-06 13:47 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
doc/encoders.texi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/encoders.texi b/doc/encoders.texi
index c0795fe5fd5..0005ade9c18 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -3395,6 +3395,13 @@ Default is 1 (on).
PNG image encoder.
+@subsection Options
+
+@table @option
+@item compression_level
+Sets the compression level, from 0 to 9(default)
+@end table
+
@subsection Private options
@table @option
--
2.48.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* [FFmpeg-devel] [PATCH 2/3] avcodec/pngenc: set default prediction method to PAETH
2025-02-06 13:47 [FFmpeg-devel] [PATCH 1/3] doc/encoders: Document compression_level for PNG Michael Niedermayer
@ 2025-02-06 13:47 ` Michael Niedermayer
2025-02-06 13:47 ` [FFmpeg-devel] [PATCH 3/3] doc/encoders: Document png pred Michael Niedermayer
1 sibling, 0 replies; 3+ messages in thread
From: Michael Niedermayer @ 2025-02-06 13:47 UTC (permalink / raw)
To: FFmpeg development discussions and patches
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>
---
libavcodec/pngenc.c | 2 +-
tests/ref/fate/copy-apng | 4 ++--
tests/ref/fate/cover-art-aiff-id3v2-remux | 6 +++---
tests/ref/fate/cover-art-flac-remux | 6 +++---
tests/ref/fate/cover-art-mp3-id3v2-remux | 6 +++---
tests/ref/fate/mov-cover-image | 6 +++---
tests/ref/fate/png-icc | 6 +++---
tests/ref/fate/png-mdcv | 4 ++--
tests/ref/lavf/apng | 4 ++--
tests/ref/lavf/apng.png | 4 ++--
tests/ref/lavf/gray16be.png | 4 ++--
tests/ref/lavf/png | 4 ++--
tests/ref/lavf/rgb48be.png | 4 ++--
tests/ref/vsynth/vsynth1-mpng | 4 ++--
tests/ref/vsynth/vsynth2-mpng | 4 ++--
tests/ref/vsynth/vsynth3-mpng | 4 ++--
tests/ref/vsynth/vsynth_lena-mpng | 4 ++--
17 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 37e8d5bfcf8..b9ef2a665a6 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -1205,7 +1205,7 @@ static av_cold int png_enc_close(AVCodecContext *avctx)
static const AVOption options[] = {
{"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},
- { "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" },
{ "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" },
diff --git a/tests/ref/fate/copy-apng b/tests/ref/fate/copy-apng
index 3057573cee1..659cec3d6e1 100644
--- a/tests/ref/fate/copy-apng
+++ b/tests/ref/fate/copy-apng
@@ -1,5 +1,5 @@
-a4c46fad7716ad094eb3c78b74ca0244 *tests/data/fate/copy-apng.apng
-6209864 tests/data/fate/copy-apng.apng
+963d078c8702a77b362c5b7c508fa447 *tests/data/fate/copy-apng.apng
+3911913 tests/data/fate/copy-apng.apng
#tb 0: 1/25
#media_type 0: video
#codec_id 0: rawvideo
diff --git a/tests/ref/fate/cover-art-aiff-id3v2-remux b/tests/ref/fate/cover-art-aiff-id3v2-remux
index 57c5a9f3873..096afb73e55 100644
--- a/tests/ref/fate/cover-art-aiff-id3v2-remux
+++ b/tests/ref/fate/cover-art-aiff-id3v2-remux
@@ -1,5 +1,5 @@
-d8caddad3af3879f5957f71adcaedd23 *tests/data/fate/cover-art-aiff-id3v2-remux.aiff
-608970 tests/data/fate/cover-art-aiff-id3v2-remux.aiff
+af437d72614dac36a80091f9f4182b75 *tests/data/fate/cover-art-aiff-id3v2-remux.aiff
+558574 tests/data/fate/cover-art-aiff-id3v2-remux.aiff
#tb 0: 1/44100
#media_type 0: audio
#codec_id 0: pcm_s16be
@@ -27,7 +27,7 @@ d8caddad3af3879f5957f71adcaedd23 *tests/data/fate/cover-art-aiff-id3v2-remux.aif
#sar 4: 1/1
0, 0, 0, 1024, 4096, 0xdac4695d
1, 0, 0, 0, 19650, 0xd5662610
-2, 0, 0, 0, 184497, 0xc33f8d44
+2, 0, 0, 0, 134100, 0x804dcb53
3, 0, 0, 0, 368254, 0xfa7f4bd8
4, 0, 0, 0, 19650, 0xd5662610
0, 1024, 1024, 1024, 4096, 0xad05c909
diff --git a/tests/ref/fate/cover-art-flac-remux b/tests/ref/fate/cover-art-flac-remux
index 109bf7395e2..35325b11a03 100644
--- a/tests/ref/fate/cover-art-flac-remux
+++ b/tests/ref/fate/cover-art-flac-remux
@@ -1,5 +1,5 @@
-6defc5081a59ab12c8a5f9e263b25068 *tests/data/fate/cover-art-flac-remux.flac
-1098537 tests/data/fate/cover-art-flac-remux.flac
+2535b1a3c759250e7f470ece217971a4 *tests/data/fate/cover-art-flac-remux.flac
+964234 tests/data/fate/cover-art-flac-remux.flac
#extradata 0: 34, 0x8d830abd
#tb 0: 1/44100
#media_type 0: audio
@@ -38,7 +38,7 @@
#channel_layout_name 6: 2 channels (FL+FC)
0, 0, 0, 4608, 14, 0x242b036d
1, 0, 0, 0, 66888, 0x1fd72743
-2, 0, 0, 0, 438706, 0x8bcb753b
+2, 0, 0, 0, 304403, 0xaf7c7667
3, 0, 0, 0, 21671, 0x7d1c6030
4, 0, 0, 0, 522758, 0x7a63572f
5, 0, 0, 0, 21671, 0x7d1c6030
diff --git a/tests/ref/fate/cover-art-mp3-id3v2-remux b/tests/ref/fate/cover-art-mp3-id3v2-remux
index 52b7e72a569..42b2d7450fe 100644
--- a/tests/ref/fate/cover-art-mp3-id3v2-remux
+++ b/tests/ref/fate/cover-art-mp3-id3v2-remux
@@ -1,5 +1,5 @@
-94946f0efd5f9bb0061ac1fbff7d731f *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
-399346 tests/data/fate/cover-art-mp3-id3v2-remux.mp3
+a8dc078d174d5c4ae9769090b8404bae *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
+346394 tests/data/fate/cover-art-mp3-id3v2-remux.mp3
#tb 0: 1/14112000
#media_type 0: audio
#codec_id 0: mp3
@@ -23,7 +23,7 @@
0, -353590, -353590, 368640, 417, 0x15848290, S=1, 10
1, 0, 0, 0, 208350, 0x291b44d1
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, 383690, 383690, 368640, 418, 0x46f684a4
0, 752330, 752330, 368640, 418, 0x46f684a4
diff --git a/tests/ref/fate/mov-cover-image b/tests/ref/fate/mov-cover-image
index 5f65c630ea2..6be45074916 100644
--- a/tests/ref/fate/mov-cover-image
+++ b/tests/ref/fate/mov-cover-image
@@ -1,5 +1,5 @@
-54a8870d5d1e6cc4da28ae422aa70898 *tests/data/fate/mov-cover-image.mp4
-1011919 tests/data/fate/mov-cover-image.mp4
+9a5143f063aedb39fb1f080444cc19a0 *tests/data/fate/mov-cover-image.mp4
+1023905 tests/data/fate/mov-cover-image.mp4
#extradata 0: 2, 0x00340022
#tb 0: 1/44100
#media_type 0: audio
@@ -20,7 +20,7 @@
0, -1088, -1088, 1024, 6, 0x027e00e8, F=0x5
0, -64, -64, 1024, 6, 0x027e00e8
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, 1984, 1984, 1024, 6, 0x027e00e8
0, 3008, 3008, 1024, 6, 0x027e00e8
diff --git a/tests/ref/fate/png-icc b/tests/ref/fate/png-icc
index 242ced5a13d..45e2426459b 100644
--- a/tests/ref/fate/png-icc
+++ b/tests/ref/fate/png-icc
@@ -1,5 +1,5 @@
-c460cd06a88ace94d7c76a6309aa8fb8 *tests/data/fate/png-icc.image2
-49441 tests/data/fate/png-icc.image2
+f440d78534808744d4ce727cda3d3309 *tests/data/fate/png-icc.image2
+38328 tests/data/fate/png-icc.image2
#tb 0: 1/25
#media_type 0: video
#codec_id 0: rawvideo
@@ -19,7 +19,7 @@ best_effort_timestamp_time=0.000000
duration=1
duration_time=0.040000
pkt_pos=0
-pkt_size=49441
+pkt_size=38328
width=128
height=128
crop_top=0
diff --git a/tests/ref/fate/png-mdcv b/tests/ref/fate/png-mdcv
index 4328c56349a..c570f354311 100644
--- a/tests/ref/fate/png-mdcv
+++ b/tests/ref/fate/png-mdcv
@@ -1,5 +1,5 @@
-b1837f5557ad969a3f9763840480d5c0 *tests/data/fate/png-mdcv.image2pipe
-439248 tests/data/fate/png-mdcv.image2pipe
+e486b461b9c408e616873db8ad93b450 *tests/data/fate/png-mdcv.image2pipe
+493893 tests/data/fate/png-mdcv.image2pipe
#tb 0: 1/25
#media_type 0: video
#codec_id 0: rawvideo
diff --git a/tests/ref/lavf/apng b/tests/ref/lavf/apng
index 95f1fbee6fa..3dd80b376df 100644
--- a/tests/ref/lavf/apng
+++ b/tests/ref/lavf/apng
@@ -1,3 +1,3 @@
-a4c46fad7716ad094eb3c78b74ca0244 *tests/data/lavf/lavf.apng
-6209864 tests/data/lavf/lavf.apng
+963d078c8702a77b362c5b7c508fa447 *tests/data/lavf/lavf.apng
+3911913 tests/data/lavf/lavf.apng
tests/data/lavf/lavf.apng CRC=0x87b3c15f
diff --git a/tests/ref/lavf/apng.png b/tests/ref/lavf/apng.png
index b42f5a8db8c..d375c18fc00 100644
--- a/tests/ref/lavf/apng.png
+++ b/tests/ref/lavf/apng.png
@@ -1,3 +1,3 @@
-c5900fdd1b2fc30b985793f5226fd0c4 *tests/data/lavf/lavf.apng.png
-248854 tests/data/lavf/lavf.apng.png
+7dc975747cdcfc3d6a2586a6229767f4 *tests/data/lavf/lavf.apng.png
+156647 tests/data/lavf/lavf.apng.png
tests/data/lavf/lavf.apng.png CRC=0xd8c7b7a1
diff --git a/tests/ref/lavf/gray16be.png b/tests/ref/lavf/gray16be.png
index 48d3b008783..7026f1bc6e8 100644
--- a/tests/ref/lavf/gray16be.png
+++ b/tests/ref/lavf/gray16be.png
@@ -1,3 +1,3 @@
-0e388f5a62d49c0197030c6d87026bca *tests/data/images/gray16be.png/02.gray16be.png
-47171 tests/data/images/gray16be.png/02.gray16be.png
+7b0b465ffc39b178a16a9d5d6a83fd13 *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
diff --git a/tests/ref/lavf/png b/tests/ref/lavf/png
index 2385ad1800c..91bcebc9c13 100644
--- a/tests/ref/lavf/png
+++ b/tests/ref/lavf/png
@@ -1,3 +1,3 @@
-2af72da4468e61a37c220b25cb28618a *tests/data/images/png/02.png
-248633 tests/data/images/png/02.png
+a59706d17b3c6096bfb9c1963b9978db *tests/data/images/png/02.png
+157081 tests/data/images/png/02.png
tests/data/images/png/%02d.png CRC=0x6da01946
diff --git a/tests/ref/lavf/rgb48be.png b/tests/ref/lavf/rgb48be.png
index b893401a8fb..89f4b647334 100644
--- a/tests/ref/lavf/rgb48be.png
+++ b/tests/ref/lavf/rgb48be.png
@@ -1,3 +1,3 @@
-b4e38244c97debe3f528e7d1adb283ef *tests/data/images/rgb48be.png/02.rgb48be.png
-511900 tests/data/images/rgb48be.png/02.rgb48be.png
+82b60351aa1409f4cac200955b16fe71 *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
diff --git a/tests/ref/vsynth/vsynth1-mpng b/tests/ref/vsynth/vsynth1-mpng
index 9b394d76299..64f2f2d4a1c 100644
--- a/tests/ref/vsynth/vsynth1-mpng
+++ b/tests/ref/vsynth/vsynth1-mpng
@@ -1,4 +1,4 @@
-6a27410a07ed1c5556e15b7a7c6a586d *tests/data/fate/vsynth1-mpng.avi
-12158280 tests/data/fate/vsynth1-mpng.avi
+40e37e28a693ada8605ea24dce8c2420 *tests/data/fate/vsynth1-mpng.avi
+7658772 tests/data/fate/vsynth1-mpng.avi
93695a27c24a61105076ca7b1f010bbd *tests/data/fate/vsynth1-mpng.out.rawvideo
stddev: 3.42 PSNR: 37.44 MAXDIFF: 48 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-mpng b/tests/ref/vsynth/vsynth2-mpng
index e49714a3b06..0e031f671de 100644
--- a/tests/ref/vsynth/vsynth2-mpng
+++ b/tests/ref/vsynth/vsynth2-mpng
@@ -1,4 +1,4 @@
-481e2d148f411bb61783aa688ec22943 *tests/data/fate/vsynth2-mpng.avi
-11816978 tests/data/fate/vsynth2-mpng.avi
+72b7353224c03854583d5809dfd56a77 *tests/data/fate/vsynth2-mpng.avi
+9754234 tests/data/fate/vsynth2-mpng.avi
32fae3e665407bb4317b3f90fedb903c *tests/data/fate/vsynth2-mpng.out.rawvideo
stddev: 1.54 PSNR: 44.37 MAXDIFF: 17 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth3-mpng b/tests/ref/vsynth/vsynth3-mpng
index e708a60d985..2948b50763f 100644
--- a/tests/ref/vsynth/vsynth3-mpng
+++ b/tests/ref/vsynth/vsynth3-mpng
@@ -1,4 +1,4 @@
-3f64b66a1f46e31d45dd7f5514422ed0 *tests/data/fate/vsynth3-mpng.avi
-179804 tests/data/fate/vsynth3-mpng.avi
+28177b90f3b5a90043f11dc14b84f3f0 *tests/data/fate/vsynth3-mpng.avi
+132202 tests/data/fate/vsynth3-mpng.avi
693aff10c094f8bd31693f74cf79d2b2 *tests/data/fate/vsynth3-mpng.out.rawvideo
stddev: 3.67 PSNR: 36.82 MAXDIFF: 43 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth_lena-mpng b/tests/ref/vsynth/vsynth_lena-mpng
index 20258433b0f..06e7d10618f 100644
--- a/tests/ref/vsynth/vsynth_lena-mpng
+++ b/tests/ref/vsynth/vsynth_lena-mpng
@@ -1,4 +1,4 @@
-319ca02f8465a9c53128442f4b0dd528 *tests/data/fate/vsynth_lena-mpng.avi
-12558334 tests/data/fate/vsynth_lena-mpng.avi
+0e83d89b738f387cc747a772d1c2a3c0 *tests/data/fate/vsynth_lena-mpng.avi
+9433204 tests/data/fate/vsynth_lena-mpng.avi
98d0e2854731472c5bf13d8638502d0a *tests/data/fate/vsynth_lena-mpng.out.rawvideo
stddev: 1.26 PSNR: 46.10 MAXDIFF: 13 bytes: 7603200/ 7603200
--
2.48.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* [FFmpeg-devel] [PATCH 3/3] doc/encoders: Document png pred
2025-02-06 13:47 [FFmpeg-devel] [PATCH 1/3] doc/encoders: Document compression_level for PNG Michael Niedermayer
2025-02-06 13:47 ` [FFmpeg-devel] [PATCH 2/3] avcodec/pngenc: set default prediction method to PAETH Michael Niedermayer
@ 2025-02-06 13:47 ` Michael Niedermayer
1 sibling, 0 replies; 3+ messages in thread
From: Michael Niedermayer @ 2025-02-06 13:47 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
doc/encoders.texi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/encoders.texi b/doc/encoders.texi
index 0005ade9c18..0bbdf5d6916 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -3409,6 +3409,8 @@ Sets the compression level, from 0 to 9(default)
Set physical density of pixels, in dots per inch, unset by default
@item dpm @var{integer}
Set physical density of pixels, in dots per meter, unset by default
+@item pred @var{method}
+Set prediction method (none, sub, up, avg, paeth, mixed), default is paeth
@end table
@section ProRes
--
2.48.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-06 13:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-06 13:47 [FFmpeg-devel] [PATCH 1/3] doc/encoders: Document compression_level for PNG Michael Niedermayer
2025-02-06 13:47 ` [FFmpeg-devel] [PATCH 2/3] avcodec/pngenc: set default prediction method to PAETH Michael Niedermayer
2025-02-06 13:47 ` [FFmpeg-devel] [PATCH 3/3] doc/encoders: Document png pred Michael Niedermayer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git