From 54c8b4055b715725516a56a9b589e4e183bc599b Mon Sep 17 00:00:00 2001 From: wrapper Date: Mon, 14 Jul 2025 16:06:46 +0700 Subject: [PATCH] patch simplify --- .gitignore | 3 +- patches/0011-implement_lc_profile.patch | 742 ++++++++---------------- 2 files changed, 238 insertions(+), 507 deletions(-) diff --git a/.gitignore b/.gitignore index e50f805..d7256e6 100644 --- a/.gitignore +++ b/.gitignore @@ -183,4 +183,5 @@ src/ton_corr.h src/tran_det.h src/transform.h -frontend/aacplusenc \ No newline at end of file +frontend/aacplusenc +.vscode/ \ No newline at end of file diff --git a/patches/0011-implement_lc_profile.patch b/patches/0011-implement_lc_profile.patch index 9b23f42..1510eaf 100644 --- a/patches/0011-implement_lc_profile.patch +++ b/patches/0011-implement_lc_profile.patch @@ -1,6 +1,6 @@ -diff -Nupr src.old/aacenc.c src.new/aacenc.c ---- src.old/aacenc.c 2024-07-15 22:21:19.959429644 +0700 -+++ src.new/aacenc.c 2024-07-15 22:19:31.804414747 +0700 +diff -Nupr src.old/aacenc.c src.new.redone2/aacenc.c +--- src.old/aacenc.c 2025-07-13 20:56:34.301758060 +0700 ++++ src.new.redone2/aacenc.c 2025-07-13 20:56:34.209753269 +0700 @@ -33,6 +33,9 @@ void AacInitDefaultConfig(aacplusEncConf config->bitRate = 48000; config->bandWidth = 0; @@ -28,426 +28,216 @@ diff -Nupr src.old/aacenc.c src.new/aacenc.c break; default: -diff -Nupr src.old/aac_rom.c src.new/aac_rom.c ---- src.old/aac_rom.c 2024-07-15 22:21:19.835430794 +0700 -+++ src.new/aac_rom.c 2024-07-15 22:19:31.804414747 +0700 -@@ -945,93 +945,89 @@ const float pow4_3_tab[MAX_POW4_3_TABLE] - misc constants (sfb width) - */ +diff -Nupr src.old/aac_rom.c src.new.redone2/aac_rom.c +--- src.old/aac_rom.c 2025-07-13 20:56:34.301758060 +0700 ++++ src.new.redone2/aac_rom.c 2025-07-14 15:54:40.469904744 +0700 +@@ -947,6 +947,23 @@ const float pow4_3_tab[MAX_POW4_3_TABLE] -+/* + + /* + 8000 Hz +*/ ++const unsigned char sfb_8000_long_1024[] = { ++ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, ++ 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, ++ 20, 20, 20, 20, 24, 24, 24, 28, 28, 32, ++ 36, 36, 40, 44, 48, 52, 56, 60, 64, 80 ++}; ++const unsigned char sfb_8000_short_128[] = { ++ 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, ++ 8, 12, 16, 20, 20 ++}; + -+const unsigned char sfb_8000_long_1024[40] = {12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 24, 24, 24, 28, 28, 32, 36, 36, 40, 44, 48, 52, 56, 60, 64, 80}; -+const unsigned char sfb_8000_short_128[15] = {4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 16, 20, 20}; - - /* ++ ++ ++ ++/* 11025 Hz */ --const unsigned char sfb_11025_long_1024[] = { -- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, -- 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, -- 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, -- 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, -- 64, 64, 64 --}; --const unsigned char sfb_11025_short_128[] = { -- 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, -- 12, 12, 16, 20, 20 --}; + const unsigned char sfb_11025_long_1024[] = { +@@ -1034,6 +1051,113 @@ const unsigned char sfb_24000_short_128[ + }; -+const unsigned char sfb_11025_long_1024[43] = {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64, 64}; -+const unsigned char sfb_11025_short_128[15] = {4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 20}; - -+/* -+ 12000 Hz -+*/ - -+const unsigned char sfb_12000_long_1024[43] = {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64, 64}; -+const unsigned char sfb_12000_short_128[15] = {4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 20}; - - /* -- 12000 Hz -+ 16000 Hz - */ --const unsigned char sfb_12000_long_1024[] = { -- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, -- 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, -- 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, -- 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, -- 64, 64, 64 --}; - --const unsigned char sfb_12000_short_128[] = { -- 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, -- 12, 12, 16, 20, 20 --}; -+const unsigned char sfb_16000_long_1024[43] = {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64, 64}; -+const unsigned char sfb_16000_short_128[15] = {4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 20}; - -+/* -+ 22050 Hz -+*/ - -+const unsigned char sfb_22050_long_1024[47] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 20, 20, 24, 24, 28, 28, 32, 36, 36, 40, 44, 48, 52, 52, 64, 64, 64, 64, 64}; -+const unsigned char sfb_22050_short_128[15] = {4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 20}; - - /* -- 16000 Hz -+ 24000 Hz - */ --const unsigned char sfb_16000_long_1024[] = { -- -- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, -- 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, -- 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, -- 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, -- 64, 64, 64 --}; - --const unsigned char sfb_16000_short_128[] = { -- 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, -- 12, 12, 16, 20, 20 --}; -+const unsigned char sfb_24000_long_1024[47] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 20, 20, 24, 24, 28, 28, 32, 36, 36, 40, 44, 48, 52, 52, 64, 64, 64, 64, 64}; -+const unsigned char sfb_24000_short_128[15] = {4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 20}; +/* + 32000 Hz +*/ - -+const unsigned char sfb_32000_long_1024[51] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}; -+const unsigned char sfb_32000_short_128[14] = {4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16}; - - /* -- 22050 Hz -+ 44100 Hz - */ --const unsigned char sfb_22050_long_1024[] = { -- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -- 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, -- 8, 12, 12, 12, 12, 16, 16, 16, 20, 20, -- 24, 24, 28, 28, 32, 36, 36, 40, 44, 48, -- 52, 52, 64, 64, 64, 64, 64 -- --}; --const unsigned char sfb_22050_short_128[] = { -- 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, -- 12, 12, 16, 16, 20 --}; - -+const unsigned char sfb_44100_long_1024[49] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 96}; -+const unsigned char sfb_44100_short_128[14] = {4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16}; - - /* -- 24000 Hz -+ 48000 Hz - */ --const unsigned char sfb_24000_long_1024[] = { -- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -- 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, -- 8, 12, 12, 12, 12, 16, 16, 16, 20, 20, -- 24, 24, 28, 28, 32, 36, 36, 40, 44, 48, -- 52, 52, 64, 64, 64, 64, 64 --}; --const unsigned char sfb_24000_short_128[] = { -- 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, -- 12, 12, 16, 16, 20 --}; ++const unsigned char sfb_32000_long_1024[] = { ++ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ++ 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, ++ 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, ++ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, ++ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, ++ 32 ++}; ++const unsigned char sfb_32000_short_128[] = { ++ 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, ++ 12, 16, 16, 16 ++}; ++ ++ ++ ++ ++/* ++ 44100 Hz ++*/ ++const unsigned char sfb_44100_long_1024[] = { ++ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ++ 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, ++ 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, ++ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, ++ 32, 32, 32, 32, 32, 32, 32, 32, 96 ++}; ++const unsigned char sfb_44100_short_128[] = { ++ 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, ++ 12, 16, 16, 16 ++}; ++ ++ ++ ++ ++/* ++ 48000 Hz ++*/ ++const unsigned char sfb_48000_long_1024[] = { ++ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ++ 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, ++ 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, ++ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, ++ 32, 32, 32, 32, 32, 32, 32, 32, 96 ++}; ++const unsigned char sfb_48000_short_128[] = { ++ 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, ++ 12, 16, 16, 16 ++}; ++ ++ + -+const unsigned char sfb_48000_long_1024[49] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 96}; -+const unsigned char sfb_48000_short_128[14] = {4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16}; + +/* + 64000 Hz +*/ ++const unsigned char sfb_64000_long_1024[] = { ++ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ++ 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, ++ 12, 16, 16, 16, 20, 24, 24, 28, 36, 40, ++ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, ++ 40, 40, 40, 40, 40, 40, 40 ++}; ++const unsigned char sfb_64000_short_128[] = { ++ 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, ++ 28, 36 ++}; ++ ++ + -+const unsigned char sfb_64000_long_1024[47] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 24, 24, 28, 36, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40}; -+const unsigned char sfb_64000_short_128[12] = {4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36}; + +/* + 88200 Hz +*/ ++const unsigned char sfb_88200_long_1024[] = { ++ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ++ 4, 4, 4, 4, 8, 8, 8, 8, 8, 12, ++ 12, 12, 12, 12, 16, 16, 24, 28, 36, 44, ++ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, ++ 64 ++}; ++const unsigned char sfb_88200_short_128[] = { ++ 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, ++ 28, 36 ++}; ++ ++ + -+const unsigned char sfb_88200_long_1024[41] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 16, 16, 24, 28, 36, 44, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}; -+const unsigned char sfb_88200_short_128[12] = {4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36}; + +/* + 96000 Hz +*/ ++const unsigned char sfb_96000_long_1024[] = { ++ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ++ 4, 4, 4, 4, 8, 8, 8, 8, 8, 12, ++ 12, 12, 12, 12, 16, 16, 24, 28, 36, 44, ++ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, ++ 64 ++}; ++const unsigned char sfb_96000_short_128[] = { ++ 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, ++ 28, 36 ++}; ++ + -+const unsigned char sfb_96000_long_1024[41] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 16, 16, 24, 28, 36, 44, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}; -+const unsigned char sfb_96000_short_128[12] = {4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36}; - - -@@ -1781,124 +1777,209 @@ const float tnsCoeff4Borders[16]= + /* + these tables are used only for counting and +@@ -1806,13 +1930,13 @@ const TNS_CONFIG_TABULATED p_8000_stere + 0.6f }; - - --const TNS_CONFIG_TABULATED p_8000_mono_long ={ -- 1.2f, -- 1800, -- 16000, -- 0.6f --}; --const TNS_CONFIG_TABULATED p_8000_mono_short ={ -- 1.2f, -- 2500, -- 16000, -- 0.6f --}; --const TNS_CONFIG_TABULATED p_8000_stereo_long ={ -- 1.2f, -- 1800, -- 16000, -- 0.6f --}; --const TNS_CONFIG_TABULATED p_8000_stereo_short ={ -- 1.2f, -- 2500, -- 16000, -- 0.6f --}; --const TNS_CONFIG_TABULATED p_16000_mono_long ={ + const TNS_CONFIG_TABULATED p_16000_mono_long ={ - 1.2f, - 2000, -- 16000, -- 0.6f --}; --const TNS_CONFIG_TABULATED p_16000_mono_short ={ -- 1.2f, -- 3750, -- 16000, -- 0.6f --}; --const TNS_CONFIG_TABULATED p_16000_stereo_long ={ -- 1.41f, -- 2500, -- 16000, -- 0.6f --}; --const TNS_CONFIG_TABULATED p_16000_stereo_short ={ -- 1.41f, -- 3750, -- 16000, -- 0.6f --}; --const TNS_CONFIG_TABULATED p_24000_mono_long ={ -- 1.41f, -- 2500, -- 16000, -- 0.5f --}; --const TNS_CONFIG_TABULATED p_24000_mono_short ={ -- 1.41f, -- 3750, -- 16000, -- 0.5f --}; --const TNS_CONFIG_TABULATED p_24000_stereo_long ={ -- 1.41f, -- 2500, -- 16000, -- 0.5f --}; --const TNS_CONFIG_TABULATED p_24000_stereo_short ={ -- 1.41f, -- 3750, -- 16000, -- 0.5f --}; --const TNS_CONFIG_TABULATED p_32000_mono_long ={ -- 1.41f, -- 2500, -- 16000, -- 0.8f --}; --const TNS_CONFIG_TABULATED p_32000_mono_short ={ -- 1.41f, -- 3750, -- 16000, -- 0.3f --}; --const TNS_CONFIG_TABULATED p_32000_stereo_long ={ -- 1.41f, -- 2500, -- 16000, -- 0.5f --}; --const TNS_CONFIG_TABULATED p_32000_stereo_short ={ -- 1.41f, -- 3750, -- 16000, -- 0.3f -+const TNS_CONFIG_TABULATED p_8000_mono_long = { -+ 1.2f, -+ 1800, -+ 16000, -+ 0.6f -+}; -+ -+const TNS_CONFIG_TABULATED p_8000_mono_short = { -+ 1.2f, -+ 2500, -+ 16000, -+ 0.6f -+}; -+ -+const TNS_CONFIG_TABULATED p_8000_stereo_long = { -+ 1.2f, -+ 1800, -+ 16000, -+ 0.6f -+}; -+ -+const TNS_CONFIG_TABULATED p_8000_stereo_short = { -+ 1.2f, -+ 2500, -+ 16000, -+ 0.6f -+}; -+ -+const TNS_CONFIG_TABULATED p_16000_mono_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.6f -+}; -+ -+const TNS_CONFIG_TABULATED p_16000_mono_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.6f -+}; -+ -+const TNS_CONFIG_TABULATED p_16000_stereo_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.6f -+}; -+ -+const TNS_CONFIG_TABULATED p_16000_stereo_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.6f -+}; -+ -+const TNS_CONFIG_TABULATED p_24000_mono_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.5f -+}; -+ -+const TNS_CONFIG_TABULATED p_24000_mono_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.5f -+}; -+ -+const TNS_CONFIG_TABULATED p_24000_stereo_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.5f -+}; -+ -+const TNS_CONFIG_TABULATED p_24000_stereo_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.5f -+}; -+ -+const TNS_CONFIG_TABULATED p_32000_mono_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.8f -+}; -+ -+const TNS_CONFIG_TABULATED p_32000_mono_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.3f -+}; -+ -+const TNS_CONFIG_TABULATED p_32000_stereo_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.5f -+}; -+ -+const TNS_CONFIG_TABULATED p_32000_stereo_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.3f -+}; -+ -+const TNS_CONFIG_TABULATED p_48000_mono_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.5f -+}; -+ -+const TNS_CONFIG_TABULATED p_48000_mono_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.1f -+}; -+ -+const TNS_CONFIG_TABULATED p_48000_stereo_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.5f -+}; -+ -+const TNS_CONFIG_TABULATED p_48000_stereo_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.1f -+}; -+ -+const TNS_CONFIG_TABULATED p_96000_mono_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.3f -+}; -+ -+const TNS_CONFIG_TABULATED p_96000_mono_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.1f -+}; -+ -+const TNS_CONFIG_TABULATED p_96000_stereo_long = { -+ 1.41f, -+ 2500, -+ 16000, -+ 0.3f -+}; -+ -+const TNS_CONFIG_TABULATED p_96000_stereo_short = { -+ 1.41f, -+ 3750, -+ 16000, -+ 0.1f ++ 1.41f, ++ 2500, + 16000, + 0.6f }; + const TNS_CONFIG_TABULATED p_16000_mono_short ={ +- 1.2f, ++ 1.41f, + 3750, + 16000, + 0.6f +@@ -1877,12 +2001,63 @@ const TNS_CONFIG_TABULATED p_32000_stere + 16000, + 0.3f + }; ++const TNS_CONFIG_TABULATED p_48000_mono_long ={ ++ 1.41f, ++ 2500, ++ 16000, ++ 0.5f ++}; ++const TNS_CONFIG_TABULATED p_48000_mono_short ={ ++ 1.41f, ++ 3750, ++ 16000, ++ 0.1f ++}; ++const TNS_CONFIG_TABULATED p_48000_stereo_long ={ ++ 1.41f, ++ 2500, ++ 16000, ++ 0.5f ++}; ++const TNS_CONFIG_TABULATED p_48000_stereo_short ={ ++ 1.41f, ++ 3750, ++ 16000, ++ 0.1f ++}; ++const TNS_CONFIG_TABULATED p_96000_mono_long ={ ++ 1.41f, ++ 2500, ++ 16000, ++ 0.3f ++}; ++const TNS_CONFIG_TABULATED p_96000_mono_short ={ ++ 1.41f, ++ 3750, ++ 16000, ++ 0.1f ++}; ++const TNS_CONFIG_TABULATED p_96000_stereo_long ={ ++ 1.41f, ++ 2500, ++ 16000, ++ 0.3f ++}; ++const TNS_CONFIG_TABULATED p_96000_stereo_short ={ ++ 1.41f, ++ 3750, ++ 16000, ++ 0.1f ++}; const TNS_MAX_TAB_ENTRY -tnsMaxBandsTab[9] = { @@ -455,36 +245,13 @@ diff -Nupr src.old/aac_rom.c src.new/aac_rom.c /* entry for each sampling rate * 1 long window * 2 short window */ -- {48000,40, 14}, /* 48000 */ -- {44100,42, 14}, /* 44100 */ -- {32000,51, 14}, /* 32000 */ -- {24000,46, 14}, /* 24000 */ -- {22050,46, 14}, /* 22050 */ -- {16000,42, 14}, /* 16000 */ -- {12000,42, 14}, /* 12000 */ -- {11025,42, 14}, /* 11025 */ -- {8000, 39, 14} /* 8000 */ -+ // {48000,40, 14}, /* 48000 */ -+ // {44100,42, 14}, /* 44100 */ -+ // {32000,51, 14}, /* 32000 */ -+ // {24000,46, 14}, /* 24000 */ -+ // {22050,46, 14}, /* 22050 */ -+ // {16000,42, 14}, /* 16000 */ -+ // {12000,42, 14}, /* 12000 */ -+ // {11025,42, 14}, /* 11025 */ -+ // {8000, 39, 14} /* 8000 */ -+ { 96000, 31, 9}, -+ { 88200, 31, 9}, -+ { 64000, 34, 10}, -+ { 48000, 40, 14}, -+ { 44100, 42, 14}, -+ { 32000, 51, 14}, -+ { 24000, 46, 14}, -+ { 22050, 46, 14}, -+ { 16000, 42, 14}, -+ { 12000, 42, 14}, -+ { 11025, 42, 14}, -+ { 8000, 39, 14} ++ {96000,31, 9}, /* 96000 */ ++ {88200,31, 9}, /* 88200 */ ++ {64000,34, 10}, /* 64000 */ + {48000,40, 14}, /* 48000 */ + {44100,42, 14}, /* 44100 */ + {32000,51, 14}, /* 32000 */ +@@ -1895,10 +2070,12 @@ tnsMaxBandsTab[9] = { }; /* this table describes which parameter set is used for which bitrate */ @@ -499,102 +266,65 @@ diff -Nupr src.old/aac_rom.c src.new/aac_rom.c + { 52001, 384000, &p_96000_mono_long, &p_96000_mono_short, &p_96000_stereo_long, &p_96000_stereo_short} }; -diff -Nupr src.old/aac_rom.h src.new/aac_rom.h ---- src.old/aac_rom.h 2024-07-15 22:21:19.891430273 +0700 -+++ src.new/aac_rom.h 2024-07-15 22:19:31.804414747 +0700 -@@ -59,39 +59,61 @@ extern const unsigned long huff_ctabscf +diff -Nupr src.old/aac_rom.h src.new.redone2/aac_rom.h +--- src.old/aac_rom.h 2025-07-13 20:56:34.301758060 +0700 ++++ src.new.redone2/aac_rom.h 2025-07-14 15:45:36.165624433 +0700 +@@ -59,6 +59,8 @@ extern const unsigned long huff_ctabscf misc */ --extern const unsigned char sfb_11025_long_1024[]; --extern const unsigned char sfb_11025_short_128[]; --extern const unsigned char sfb_12000_long_1024[]; --extern const unsigned char sfb_12000_short_128[]; --extern const unsigned char sfb_16000_long_1024[]; --extern const unsigned char sfb_16000_short_128[]; --extern const unsigned char sfb_22050_long_1024[]; --extern const unsigned char sfb_22050_short_128[]; --extern const unsigned char sfb_24000_long_1024[]; --extern const unsigned char sfb_24000_short_128[]; -+extern const unsigned char sfb_8000_long_1024[40]; -+extern const unsigned char sfb_8000_short_128[15]; -+extern const unsigned char sfb_11025_long_1024[43]; -+extern const unsigned char sfb_11025_short_128[15]; -+extern const unsigned char sfb_12000_long_1024[43]; -+extern const unsigned char sfb_12000_short_128[15]; -+extern const unsigned char sfb_16000_long_1024[43]; -+extern const unsigned char sfb_16000_short_128[15]; -+extern const unsigned char sfb_22050_long_1024[47]; -+extern const unsigned char sfb_22050_short_128[15]; -+extern const unsigned char sfb_24000_long_1024[47]; -+extern const unsigned char sfb_24000_short_128[15]; -+extern const unsigned char sfb_32000_long_1024[51]; -+extern const unsigned char sfb_32000_short_128[14]; -+extern const unsigned char sfb_44100_long_1024[49]; -+extern const unsigned char sfb_44100_short_128[14]; -+extern const unsigned char sfb_48000_long_1024[49]; -+extern const unsigned char sfb_48000_short_128[14]; -+extern const unsigned char sfb_64000_long_1024[47]; -+extern const unsigned char sfb_64000_short_128[12]; -+extern const unsigned char sfb_88200_long_1024[41]; -+extern const unsigned char sfb_88200_short_128[12]; -+extern const unsigned char sfb_96000_long_1024[41]; -+extern const unsigned char sfb_96000_short_128[12]; ++extern const unsigned char sfb_8000_long_1024[]; ++extern const unsigned char sfb_8000_short_128[]; + extern const unsigned char sfb_11025_long_1024[]; + extern const unsigned char sfb_11025_short_128[]; + extern const unsigned char sfb_12000_long_1024[]; +@@ -69,12 +71,25 @@ extern const unsigned char sfb_22050_lon + extern const unsigned char sfb_22050_short_128[]; + extern const unsigned char sfb_24000_long_1024[]; + extern const unsigned char sfb_24000_short_128[]; ++extern const unsigned char sfb_32000_long_1024[]; ++extern const unsigned char sfb_32000_short_128[]; ++extern const unsigned char sfb_44100_long_1024[]; ++extern const unsigned char sfb_44100_short_128[]; ++extern const unsigned char sfb_48000_long_1024[]; ++extern const unsigned char sfb_48000_short_128[]; ++extern const unsigned char sfb_64000_long_1024[]; ++extern const unsigned char sfb_64000_short_128[]; ++extern const unsigned char sfb_88200_long_1024[]; ++extern const unsigned char sfb_88200_short_128[]; ++extern const unsigned char sfb_96000_long_1024[]; ++extern const unsigned char sfb_96000_short_128[]; ++ /* TNS */ -extern const TNS_MAX_TAB_ENTRY tnsMaxBandsTab[9]; --extern const TNS_CONFIG_TABULATED p_8000_mono_long; --extern const TNS_CONFIG_TABULATED p_8000_mono_short; --extern const TNS_CONFIG_TABULATED p_8000_stereo_long; --extern const TNS_CONFIG_TABULATED p_8000_stereo_short; --extern const TNS_CONFIG_TABULATED p_16000_mono_long; --extern const TNS_CONFIG_TABULATED p_16000_mono_short; --extern const TNS_CONFIG_TABULATED p_16000_stereo_long; --extern const TNS_CONFIG_TABULATED p_16000_stereo_short; --extern const TNS_CONFIG_TABULATED p_24000_mono_long; --extern const TNS_CONFIG_TABULATED p_24000_mono_short; --extern const TNS_CONFIG_TABULATED p_24000_stereo_long; --extern const TNS_CONFIG_TABULATED p_24000_stereo_short; --extern const TNS_CONFIG_TABULATED p_32000_mono_long; --extern const TNS_CONFIG_TABULATED p_32000_mono_short; --extern const TNS_CONFIG_TABULATED p_32000_stereo_long; --extern const TNS_CONFIG_TABULATED p_32000_stereo_short; --extern const TNS_INFO_TAB tnsInfoTab[4]; +extern const TNS_MAX_TAB_ENTRY tnsMaxBandsTab[12]; -+extern const TNS_CONFIG_TABULATED p_8000_mono_long; -+extern const TNS_CONFIG_TABULATED p_8000_mono_short; -+extern const TNS_CONFIG_TABULATED p_8000_stereo_long; -+extern const TNS_CONFIG_TABULATED p_8000_stereo_short; -+extern const TNS_CONFIG_TABULATED p_16000_mono_long; -+extern const TNS_CONFIG_TABULATED p_16000_mono_short; -+extern const TNS_CONFIG_TABULATED p_16000_stereo_long; -+extern const TNS_CONFIG_TABULATED p_16000_stereo_short; -+extern const TNS_CONFIG_TABULATED p_24000_mono_long; -+extern const TNS_CONFIG_TABULATED p_24000_mono_short; -+extern const TNS_CONFIG_TABULATED p_24000_stereo_long; -+extern const TNS_CONFIG_TABULATED p_24000_stereo_short; -+extern const TNS_CONFIG_TABULATED p_32000_mono_long; -+extern const TNS_CONFIG_TABULATED p_32000_mono_short; -+extern const TNS_CONFIG_TABULATED p_32000_stereo_long; -+extern const TNS_CONFIG_TABULATED p_32000_stereo_short; -+extern const TNS_CONFIG_TABULATED p_48000_mono_long; -+extern const TNS_CONFIG_TABULATED p_48000_mono_short; -+extern const TNS_CONFIG_TABULATED p_48000_stereo_long; -+extern const TNS_CONFIG_TABULATED p_48000_stereo_short; -+extern const TNS_CONFIG_TABULATED p_96000_mono_long; -+extern const TNS_CONFIG_TABULATED p_96000_mono_short; -+extern const TNS_CONFIG_TABULATED p_96000_stereo_long; -+extern const TNS_CONFIG_TABULATED p_96000_stereo_short; + extern const TNS_CONFIG_TABULATED p_8000_mono_long; + extern const TNS_CONFIG_TABULATED p_8000_mono_short; + extern const TNS_CONFIG_TABULATED p_8000_stereo_long; +@@ -91,7 +106,15 @@ extern const TNS_CONFIG_TABULATED p_320 + extern const TNS_CONFIG_TABULATED p_32000_mono_short; + extern const TNS_CONFIG_TABULATED p_32000_stereo_long; + extern const TNS_CONFIG_TABULATED p_32000_stereo_short; +-extern const TNS_INFO_TAB tnsInfoTab[4]; ++extern const TNS_CONFIG_TABULATED p_48000_mono_long; ++extern const TNS_CONFIG_TABULATED p_48000_mono_short; ++extern const TNS_CONFIG_TABULATED p_48000_stereo_long; ++extern const TNS_CONFIG_TABULATED p_48000_stereo_short; ++extern const TNS_CONFIG_TABULATED p_96000_mono_long; ++extern const TNS_CONFIG_TABULATED p_96000_mono_short; ++extern const TNS_CONFIG_TABULATED p_96000_stereo_long; ++extern const TNS_CONFIG_TABULATED p_96000_stereo_short; +extern const TNS_INFO_TAB tnsInfoTab[6]; extern const float tnsCoeff3[8]; extern const float tnsCoeff3Borders[8]; -diff -Nupr src.old/code_env.c src.new/code_env.c ---- src.old/code_env.c 2024-07-15 22:21:21.455415760 +0700 -+++ src.new/code_env.c 2024-07-15 22:19:31.816414640 +0700 +diff -Nupr src.old/code_env.c src.new.redone2/code_env.c +--- src.old/code_env.c 2025-07-13 20:56:34.321759101 +0700 ++++ src.new.redone2/code_env.c 2025-07-13 20:56:34.229754310 +0700 @@ -364,10 +364,14 @@ computeBits (int delta, @@ -640,9 +370,9 @@ diff -Nupr src.old/code_env.c src.new/code_env.c } -diff -Nupr src.old/psy_configuration.c src.new/psy_configuration.c ---- src.old/psy_configuration.c 2024-07-15 22:21:23.767394292 +0700 -+++ src.new/psy_configuration.c 2024-07-15 22:19:31.832414497 +0700 +diff -Nupr src.old/psy_configuration.c src.new.redone2/psy_configuration.c +--- src.old/psy_configuration.c 2025-07-13 20:56:34.329759518 +0700 ++++ src.new.redone2/psy_configuration.c 2025-07-13 20:56:34.233754518 +0700 @@ -23,12 +23,19 @@ static const float BARC_THR_QUIET[] = {1 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 5.0f, 10.0f, 20.0f, 30.0f};