As I haven't heard any complaints concerning the proposal for retuning compression levels which I posted a few months ago, here's the patch that enables them, with the change proposed by lvqcl.

This patch changes the settings associated with compression levels 6, 7 and 8. With this patch, -e is no longer used, but instead apodization functions are added. This should improve compression with at least 95% of all material. Independent tests show that this is probably the case.

The encoding speed should stay about the same, however, 6 is slowed considerably, positioned between compression levels 5 and 7. This was done because level 6 was so close to level 5 that it wasn't really worth using. Decoding-wise, 6 and 8 stay the same, and 7 is slowed a bit, which makes it as fast as 8.
>From 53df962d7da3898fa98b20a6be6bf1f9dd9e109a Mon Sep 17 00:00:00 2001
From: Martijn van Beurden <[email protected]>
Date: Sun, 19 Oct 2014 23:43:29 +0200
Subject: [PATCH] Retune FLAC compression levels

This patch changes a the settings associated with compression
levels 6, 7 and 8. With this patch, -e is no longer used, but
instead apodization functions are added. This should improve
compression with at least 95% of all material while not changing
the speed much. Decoding ways, 6 and 8 stay the same, and 7 is
slowed a bit, which makes it as fast as 8.
---
 src/libFLAC/stream_encoder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c
index 3103fdf..f3141da 100644
--- a/src/libFLAC/stream_encoder.c
+++ b/src/libFLAC/stream_encoder.c
@@ -115,8 +115,8 @@ static struct CompressionLevels {
 	{ true , true ,  8, 0, false, false, false, 0, 4, 0, "tukey(5e-1)" },
 	{ true , false,  8, 0, false, false, false, 0, 5, 0, "tukey(5e-1)" },
 	{ true , false,  8, 0, false, false, false, 0, 6, 0, "tukey(5e-1)" },
-	{ true , false,  8, 0, false, false, true , 0, 6, 0, "tukey(5e-1)" },
-	{ true , false, 12, 0, false, false, true , 0, 6, 0, "tukey(5e-1)" }
+	{ true , false, 12, 0, false, false, false, 0, 6, 0, "tukey(5e-1);partial_tukey(2)" },
+	{ true , false, 12, 0, false, false, false, 0, 6, 0, "tukey(5e-1);partial_tukey(2);punchout_tukey(3)" }
 	/* here we use locale-independent 5e-1 instead of 0.5 or 0,5 */
 };
 
-- 
1.9.1

_______________________________________________
flac-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to