From patchwork Tue Sep 26 22:17:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43961 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp2211383pzh; Tue, 26 Sep 2023 15:23:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEn6bgOwpZpE2rwo84F0EQAhx1H9rXNQPFYbzePBPuLsAuiQn/U7wBrdpqiDPRiLSR/UDZm X-Received: by 2002:adf:e791:0:b0:31f:fdcf:b2b6 with SMTP id n17-20020adfe791000000b0031ffdcfb2b6mr17332wrm.55.1695767023346; Tue, 26 Sep 2023 15:23:43 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v3-20020a17090606c300b0099cbfe8a383si11607180ejb.779.2023.09.26.15.23.42; Tue, 26 Sep 2023 15:23:43 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=nC37dfnY; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DBF1A68CB17; Wed, 27 Sep 2023 01:22:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01olkn2061.outbound.protection.outlook.com [40.92.64.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EDB3568CB15 for ; Wed, 27 Sep 2023 01:21:59 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i9oPBuIV0DXD/frUSKEdzHGRdOsqiX/Rxylc2pdCELTj+S+f48XRUW5c+WKZ7jg9yng21uZ8QShUQHMHobpL9DeSRHOTHurU3R72Rk+yInvDLwfGzexqjjblN77kM8EayFqIQ6C8PJB5zh8djuDp+GKU4/B35HiNMrjBDvWh/fpCksZreOX89pwUJ6/BT8tglS5xsHj9dWlSOI1x4E7ct+3/OM7C+mlUhR/41fm/czCXxAr5TNMsgur2fulMP7lLNLrh1JMahUIQF1SLHVrFxX2HDR8v3cJXM2Sjl2KbFzV1/qNa4tQ1ytGUH9NCwEGC9WW45O0FriFRCpLjgISM4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HUBU4UsgajBJv3vG748XnYPMtdJb5NRZ2p00FDvPFXo=; b=AT6DQgoEikDEfhq68iKefFohbOPF5ILdQTrEsXsQh4i0wlCr/QxbD0HFh/loZ6WciaebF5h8+O4VwMuveg+QP5pEf51tl2SD7x6z6qdkDsOIGwIlc8K6khZGDCn0Ny8UnxbX65J+XRWhRkJvWP3Kp6cVj1aJNlAyGi268RkJj6+0bKba68nT7TglkNeuT2dEaYOIj/xh8ROq90OnSv8VrGSMauPxxs+G/OPoD/VxkC9G41Wv1eWCn4t97CkKm14713Sc3Z5QqUPeosDJwl8FsZxpPdHcOWGNjO5h6TwTVIuUYUo3UKc3w/pJXC7zl8dRETouECvm0Gp8HA0c6hWk0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HUBU4UsgajBJv3vG748XnYPMtdJb5NRZ2p00FDvPFXo=; b=nC37dfnYeEb91cVyGPYGdmMjVWJHpxeqvr/wxQaQlkvb93hOxcyxY8PPWKoNlGZHoXHcnNRdKXJjnVLQIrehOjspucTLSaRtlKaSCSusTRwttrdqsFaBzMQZUKYRVAWLoezlQhmaeaaKthGUoBINJsiVGghsbcgiBlj7GEHT1FUV0MsMdtV5+II8FKnhYpXLAI9sLNPJFhFuvFzKu0/eqbv7PT+adGwfWKZTBlybQAke4/EbtJfgDfBYYGBvdhmg1qleaElnxWEu5xWqI0MZjFAp0lxQbguFXHrteVDJNQ+FhSp7wvm3kgoaz2+kU/mxlo+DJE5Qy8govyo0KwhSAA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS8P250MB0393.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Tue, 26 Sep 2023 22:21:57 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::9d42:7b4f:71ef:c76a]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::9d42:7b4f:71ef:c76a%3]) with mapi id 15.20.6813.027; Tue, 26 Sep 2023 22:21:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 27 Sep 2023 00:17:21 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [InOiaI3YVO6yyeYmOX0gdaKb7FnRZnx4] X-ClientProxiedBy: FR3P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20230926221732.3711507-49-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS8P250MB0393:EE_ X-MS-Office365-Filtering-Correlation-Id: db9c15f3-4ea6-44bc-6c9e-08dbbedeff0f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7KHchwF95WmWGhcUh9zKYRUAnARGpVeT/AqxrdI1KdqWh62RmOIbk02TFRNW9kMCnoCLHGS35EGIMKyNj5xJzAzYY6ZkF4cX6jt3I+48XOXuWX48njazFiMuQcIBITZdC+CVrMuHbn8nXLEeRp63C6i8HUZIe9qBLPblALlzwzaSIikHcjjtjWNQeSOSjq8/Z9kJPZaZWAihgbVusJsZPopdpMMA5gVBu+gtOZYn49rgJagrqqV4VPMnPI3uT2FV6oAtztkA9UlWkkqGrPzUsKcPTmFhgNywyd8IjUOYy8MTGqTF3nwY9uN5xpPuoGc3ZydppfE3CztklISo9BAveVHMXBFydxQbUyq8anq9Yjo7WRkmD2x1LPfFdmCwFkaT8OjjOP5ndI+VAYFFDg2MbrNOzJzZAU2w7W1bted3YKQ66ARFq6qdAeClpmFQfug5GrxzISkW25PbTr7aDzl0416MuLOej1Qq9EAEIIdErSWEPXju6RHomuZqItgUxuTPAc00m1ZO6PCGQOQ92Y3lyvyAghTeLX3/Fv7S6IWdApYCb1GlmG+Qqt1GSFhro2+gdSfC1PL2Y8S5p9AktBRDliQkms0utdyxiQ/p0VYxvaP9rhZGPavA7iPegWG2mln3 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yFJcS9MLHEZxhpVKxMG9MjvyJTm0zTE1yb7uJ6l0FY5XGzIlP98rEzc22oluikyrKS6Pp22AhndssZTkVDbThsnoZT+exGEEuOCd3J28i4yMYJvcmkTvQ6XfZBGtssc+haL5wthz/TDE+qV/hF0ROr7LfQsfcHBjnikskPHpYcCDdQCYCg4pnqWkezq4RoqXVYx8852mhWAdff4p2UXBgjRGc0PrTiZ/MLK+xsYhfG/ZwwCAwJ6oZGUSlRQdD2vm6apbQPtKzB131iXtT0RJwO6UT/GAlpp1PK+tmx0xpryFPvD6+efkZMRj/fvrx9XbeFwXlyVc4eE8Q5qi0imvvV5be+toBVBkYcaIKKeYuJfApCPNcfj0tBCIVuRaT0hyXhgI30cqjxo7WEfLNSs61RfT5ny2p2n2dyb8hpeHdHsaH8h772332KV6Twspc6/fNuiWajfm+g3IQibyPWQxI2Ek+U1NDO1Jngk6tQgl8aLyC/+9+l5nvMcg6Sj19dPdqdVHlmyDM/whbhn/BhUfg4YDii/ql31lpw0E0UTlXE71drObMUBhLuD2cg4T12ZJdJFDimIWqDfVmy3YtvQMz58NQkx4nwAK70hpLQauPtyXgS2Rlo9nQrKz79qk1K9Zr0Qy7FInDeIkXmj/CzGzMBsbblq3eLBpFxeRe6kxbyrVIeTJfjtjmeM9x9+Uwn2jsTE9oDT0aZdWkGBftxmV0YrzDEHcZ5kWmi65MCdpYeAU3iVPbriqOI/DbCLKH8f5RQ5mCNzx1jBRS4crx2HNT/hbJ1NNX6VTg0BX0Dow0DDyBiMiHV/loxg68fIDHoJNwjDmdN23XHJZ+U3nkpTVXbgepzO2Ydu5Bc38+lG4QiL5BtRJyxqUEnvybcmGwBZz2hJDQPiuXKStV6H5qgW3OtxJIUqUA6v+LS35XUiExXvI2d45OwA3Yj0Tgol+/KKkLozmEQ6wa0hKO8xMdohyh/cxc/S6ZsPaVYbBppns2XFmIh2VwIOaQzsZ7Pdxmb0LUvX0aw0ZVXb4FLnnQmfUd6Gr+ONcvBuhJPctlyZL3vKVpWuZ7Ueo09p9MDCewtSSUD7qpUSnxhBTgxdXxao/aVS1z4tmKJ8BX+WzGifZdZk8yGi5wUTK6t2u8VcVVi28O54AZkTZ5DuG6cUu7cHFI7BqmwO8gIP/lA0XL6e9auuaja4hFEK0FObIh7wHUwF4hNe2VYRnLUU9kFcwmPP+s0K3UJ4xZc8Et50boJgUs+jziKMY0fM6ggUN22N2545Q X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: db9c15f3-4ea6-44bc-6c9e-08dbbedeff0f X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2023 22:21:57.7066 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P250MB0393 Subject: [FFmpeg-devel] [PATCH 50/61] avcodec/aacdec_common: Combine huffman tabs X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tmw9ZyGwu4F1 This allows to avoid the relocations inherent in a table to individual tables; it also reduces padding. Signed-off-by: Andreas Rheinhardt --- libavcodec/aacdec_common.c | 59 +++++++------------------------------- 1 file changed, 10 insertions(+), 49 deletions(-) diff --git a/libavcodec/aacdec_common.c b/libavcodec/aacdec_common.c index d03fbdbaec..6a592600dc 100644 --- a/libavcodec/aacdec_common.c +++ b/libavcodec/aacdec_common.c @@ -128,8 +128,8 @@ const VLCElem *ff_vlc_spectral[11]; /// Huffman tables for SBR +static const uint8_t sbr_huffman_tab[][2] = { /* t_huffman_env_1_5dB - 121 entries */ -static const uint8_t t_huffman_env_1_5dB_tab[][2] = { { 60, 2 }, { 59, 2 }, { 61, 3 }, { 58, 3 }, { 62, 4 }, { 57, 4 }, { 63, 5 }, { 56, 5 }, { 64, 6 }, { 55, 6 }, { 65, 7 }, { 54, 7 }, { 66, 8 }, { 53, 8 }, { 67, 9 }, @@ -155,10 +155,7 @@ static const uint8_t t_huffman_env_1_5dB_tab[][2] = { { 110, 19 }, { 111, 19 }, { 112, 19 }, { 113, 19 }, { 114, 19 }, { 115, 19 }, { 116, 19 }, { 117, 19 }, { 118, 19 }, { 119, 19 }, { 120, 19 }, -}; - /* f_huffman_env_1_5dB - 121 entries */ -static const uint8_t f_huffman_env_1_5dB_tab[][2] = { { 60, 2 }, { 59, 2 }, { 61, 3 }, { 58, 3 }, { 57, 4 }, { 62, 4 }, { 56, 5 }, { 63, 5 }, { 55, 6 }, { 64, 6 }, { 54, 7 }, { 65, 8 }, { 53, 8 }, { 66, 8 }, { 52, 9 }, @@ -184,10 +181,7 @@ static const uint8_t f_huffman_env_1_5dB_tab[][2] = { { 110, 20 }, { 111, 20 }, { 112, 20 }, { 113, 20 }, { 114, 20 }, { 115, 20 }, { 116, 20 }, { 117, 20 }, { 118, 20 }, { 119, 20 }, { 120, 20 }, -}; - /* t_huffman_env_bal_1_5dB - 49 entries */ -static const uint8_t t_huffman_env_bal_1_5dB_tab[][2] = { { 24, 1 }, { 25, 2 }, { 23, 3 }, { 26, 4 }, { 22, 5 }, { 27, 6 }, { 21, 7 }, { 28, 8 }, { 20, 9 }, { 19, 11 }, { 29, 11 }, { 18, 12 }, { 30, 12 }, { 31, 15 }, { 17, 16 }, @@ -198,10 +192,7 @@ static const uint8_t t_huffman_env_bal_1_5dB_tab[][2] = { { 35, 16 }, { 36, 16 }, { 37, 16 }, { 38, 16 }, { 39, 17 }, { 40, 17 }, { 41, 17 }, { 42, 17 }, { 43, 17 }, { 44, 17 }, { 45, 17 }, { 46, 17 }, { 47, 17 }, { 48, 17 }, -}; - /* f_huffman_env_bal_1_5dB - 49 entries */ -static const uint8_t f_huffman_env_bal_1_5dB_tab[][2] = { { 24, 1 }, { 23, 2 }, { 25, 3 }, { 22, 4 }, { 26, 5 }, { 27, 6 }, { 21, 7 }, { 20, 8 }, { 28, 9 }, { 19, 11 }, { 29, 11 }, { 18, 11 }, { 30, 12 }, { 17, 14 }, { 31, 15 }, @@ -212,10 +203,7 @@ static const uint8_t f_huffman_env_bal_1_5dB_tab[][2] = { { 35, 18 }, { 36, 18 }, { 37, 18 }, { 38, 18 }, { 39, 18 }, { 40, 18 }, { 41, 18 }, { 42, 18 }, { 43, 18 }, { 44, 18 }, { 45, 18 }, { 46, 18 }, { 47, 19 }, { 48, 19 }, -}; - /* t_huffman_env_3_0dB - 63 entries */ -static const uint8_t t_huffman_env_3_0dB_tab[][2] = { { 31, 1 }, { 30, 2 }, { 32, 3 }, { 29, 4 }, { 33, 5 }, { 28, 6 }, { 34, 7 }, { 27, 8 }, { 35, 9 }, { 26, 11 }, { 36, 11 }, { 25, 12 }, { 24, 13 }, { 37, 13 }, { 23, 14 }, @@ -229,10 +217,7 @@ static const uint8_t t_huffman_env_3_0dB_tab[][2] = { { 50, 19 }, { 51, 19 }, { 52, 19 }, { 53, 19 }, { 54, 19 }, { 55, 19 }, { 56, 19 }, { 57, 19 }, { 58, 19 }, { 59, 19 }, { 60, 19 }, { 61, 19 }, { 62, 19 }, -}; - /* f_huffman_env_3_0dB - 63 entries */ -static const uint8_t f_huffman_env_3_0dB_tab[][2] = { { 31, 1 }, { 30, 2 }, { 32, 3 }, { 29, 4 }, { 33, 5 }, { 28, 6 }, { 34, 8 }, { 27, 8 }, { 35, 9 }, { 26, 9 }, { 36, 10 }, { 25, 10 }, { 37, 11 }, { 24, 11 }, { 38, 12 }, @@ -246,28 +231,19 @@ static const uint8_t f_huffman_env_3_0dB_tab[][2] = { { 3, 20 }, { 4, 20 }, { 5, 20 }, { 6, 20 }, { 14, 20 }, { 50, 20 }, { 54, 20 }, { 57, 20 }, { 58, 20 }, { 59, 20 }, { 60, 20 }, { 61, 20 }, { 62, 20 }, -}; - /* t_huffman_env_bal_3_0dB - 25 entries */ -static const uint8_t t_huffman_env_bal_3_0dB_tab[][2] = { { 12, 1 }, { 13, 2 }, { 11, 3 }, { 10, 4 }, { 14, 5 }, { 15, 6 }, { 9, 7 }, { 8, 8 }, { 16, 9 }, { 7, 12 }, { 0, 13 }, { 1, 13 }, { 2, 13 }, { 3, 13 }, { 4, 13 }, { 5, 13 }, { 6, 13 }, { 17, 13 }, { 18, 13 }, { 19, 13 }, { 20, 13 }, { 21, 13 }, { 22, 13 }, { 23, 14 }, { 24, 14 }, -}; - /* f_huffman_env_bal_3_0dB - 25 entries */ -static const uint8_t f_huffman_env_bal_3_0dB_tab[][2] = { { 12, 1 }, { 11, 2 }, { 13, 3 }, { 10, 4 }, { 14, 5 }, { 15, 6 }, { 9, 7 }, { 8, 8 }, { 16, 9 }, { 7, 11 }, { 17, 12 }, { 18, 13 }, { 0, 13 }, { 1, 13 }, { 2, 13 }, { 3, 13 }, { 4, 13 }, { 5, 14 }, { 6, 14 }, { 19, 14 }, { 20, 14 }, { 21, 14 }, { 22, 14 }, { 23, 14 }, { 24, 14 }, -}; - /* t_huffman_noise_3_0dB - 63 entries */ -static const uint8_t t_huffman_noise_3_0dB_tab[][2] = { { 31, 1 }, { 32, 2 }, { 30, 3 }, { 29, 4 }, { 33, 5 }, { 28, 6 }, { 34, 8 }, { 27, 8 }, { 35, 10 }, { 26, 11 }, { 36, 13 }, { 42, 13 }, { 0, 13 }, { 1, 13 }, { 2, 13 }, @@ -281,10 +257,7 @@ static const uint8_t t_huffman_noise_3_0dB_tab[][2] = { { 50, 13 }, { 51, 13 }, { 52, 13 }, { 53, 13 }, { 54, 13 }, { 55, 13 }, { 56, 13 }, { 57, 13 }, { 58, 13 }, { 59, 13 }, { 60, 13 }, { 61, 14 }, { 62, 14 }, -}; - /* t_huffman_noise_bal_3_0dB - 25 entries */ -static const uint8_t t_huffman_noise_bal_3_0dB_tab[][2] = { { 12, 1 }, { 11, 2 }, { 13, 3 }, { 10, 5 }, { 14, 6 }, { 0, 8 }, { 1, 8 }, { 2, 8 }, { 3, 8 }, { 4, 8 }, { 5, 8 }, { 6, 8 }, { 7, 8 }, { 8, 8 }, { 9, 8 }, @@ -292,33 +265,20 @@ static const uint8_t t_huffman_noise_bal_3_0dB_tab[][2] = { { 20, 8 }, { 21, 8 }, { 22, 8 }, { 23, 8 }, { 24, 8 }, }; +static const uint8_t sbr_huffman_nb_codes[] = { + 121, 121, 49, 49, 63, 63, 25, 25, 63, 25 +}; + const VLCElem *ff_aac_sbr_vlc[10]; static av_cold void aacdec_common_init(void) { -#define SBR_VLC_ROW(name) \ - { name ## _tab, FF_ARRAY_ELEMS(name ## _tab) } - static const struct { - const uint8_t (*sbr_tab)[2]; - const unsigned int table_size; - } sbr_tmp[] = { - SBR_VLC_ROW(t_huffman_env_1_5dB), - SBR_VLC_ROW(f_huffman_env_1_5dB), - SBR_VLC_ROW(t_huffman_env_bal_1_5dB), - SBR_VLC_ROW(f_huffman_env_bal_1_5dB), - SBR_VLC_ROW(t_huffman_env_3_0dB), - SBR_VLC_ROW(f_huffman_env_3_0dB), - SBR_VLC_ROW(t_huffman_env_bal_3_0dB), - SBR_VLC_ROW(f_huffman_env_bal_3_0dB), - SBR_VLC_ROW(t_huffman_noise_3_0dB), - SBR_VLC_ROW(t_huffman_noise_bal_3_0dB), - }; - static VLCElem vlc_buf[(304 + 270 + 550 + 300 + 328 + 294 + 306 + 268 + 510 + 366 + 462) + (1098 + 1092 + 768 + 1026 + 1058 + 1052 + 544 + 544 + 592 + 512)]; VLCInitState state = VLC_INIT_STATE(vlc_buf); + const uint8_t (*tab)[2] = sbr_huffman_tab; for (unsigned i = 0; i < 11; i++) { #define TAB_WRAP_SIZE(name) name[i], sizeof(name[i][0]), sizeof(name[i][0]) @@ -342,10 +302,11 @@ static av_cold void aacdec_common_init(void) // SBR VLC table initialization for (int i = 0; i < FF_ARRAY_ELEMS(ff_aac_sbr_vlc); i++) { ff_aac_sbr_vlc[i] = - ff_vlc_init_tables_from_lengths(&state, 9, sbr_tmp[i].table_size, - &sbr_tmp[i].sbr_tab[0][1], 2, - &sbr_tmp[i].sbr_tab[0][0], 2, 1, + ff_vlc_init_tables_from_lengths(&state, 9, sbr_huffman_nb_codes[i], + &tab[0][1], 2, + &tab[0][0], 2, 1, 0, 0); + tab += sbr_huffman_nb_codes[i]; } }