From patchwork Fri Nov 20 07:18:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23747 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id BA41A44A644 for ; Fri, 20 Nov 2020 09:24:16 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 94EBD68B994; Fri, 20 Nov 2020 09:24:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8C18768B900 for ; Fri, 20 Nov 2020 09:24:09 +0200 (EET) Received: by mail-ej1-f66.google.com with SMTP id k27so11452234ejs.10 for ; Thu, 19 Nov 2020 23:24:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=Sbe+Xlh8EuG8tp3oslVENvkxbbFc66/jCfMortypAyA=; b=DX0TQ8LOqPT/zd0GJEk8GDpuXjkoI/qED/E9/w0wfGhbWQ5MWjKMyQqdNCQwEZTVey HG+OM8Akr+o52wQlKKpFH6D2ufnKIba6JtA123DrzYhgfUtMK+qc2ZAHmO/jiDrPCLfl 39yKoBuS290jAABrBg9W2udP8gWJlFHz066fthH0WtPQVDe7R3QI8HDmYhT++WinIiAW yXFCWWd27HAUOLFjNHvDNJwrpzt/tQA8aglyjn3uIBYqbrCNsHxf+E3jaT35K9EZUOg+ pJdHb4kQChbDIyb6XOfB9DE3JzQBYssTcNsLGZDz912x9eUtEc2XL+xT7KyB2nS36ilu OLAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=Sbe+Xlh8EuG8tp3oslVENvkxbbFc66/jCfMortypAyA=; b=LZ/g8H8+M8L3MzcsFuhy1Kred6Lt+0pNpWhOGc6GkXUOlMQU5M598E0PyKD+SPyWLg R1N8hCNDAMvgJaZpL5Kla2/Y9LAgedU/RUIWPEr1UvB3j72FKK1qw3HZeIedJBSjMFr6 OMRwN+SCJkQE2qJqKsoDwW1xAcjybDKzxCTdsm5D5bZo5XQlEhpbxRJ4t5k6Nu7kBCFx vbhAw5cTPvgzTByQO0xE1YlYpEfe5xmXPCV94F1GXX6V0b0e8k4f/whchkDsMY6IbqtA 0BUm1xpywQSv69jtEKwdGWDTnIoQNN65sxL3zGwKg2WfQKwpDwYzFdUxPVtUMwqqfJHL 0WXA== X-Gm-Message-State: AOAM532ND0nNKf6y3LDQjCF7wgnl/+PJrpPwLVeCGa1NO4QDNNu7JWU1 NOozZQPzPz/MmZ6yh8ESR/szQniwvDiA1g== X-Google-Smtp-Source: ABdhPJwv0nVGoRNqYCLRTH2OBsGStAsbFyWZywDSVIy8qaFltedDqNyzpvDzICc97xYf+tvtzPilXQ== X-Received: by 2002:a17:906:2345:: with SMTP id m5mr183514eja.329.1605857048324; Thu, 19 Nov 2020 23:24:08 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id lz27sm779419ejb.39.2020.11.19.23.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 23:24:07 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 Nov 2020 08:18:36 +0100 Message-Id: <20201120072116.818090-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201120072116.818090-1-andreas.rheinhardt@gmail.com> References: <20201120072116.818090-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 003/162] avcodec/tscc2: Combine tables for initializing VLCs X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" Using one big table for the symbols and lengths makes it possible to remove the pointers to the individual tables. Signed-off-by: Andreas Rheinhardt --- libavcodec/tscc2.c | 8 ++- libavcodec/tscc2data.h | 116 ++++++++++------------------------------- 2 files changed, 34 insertions(+), 90 deletions(-) diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c index 2522324d94..10bdff9a4e 100644 --- a/libavcodec/tscc2.c +++ b/libavcodec/tscc2.c @@ -60,6 +60,8 @@ static av_cold void free_vlcs(TSCC2Context *c) static av_cold int init_vlcs(TSCC2Context *c) { + const uint16_t *ac_vlc_syms = tscc2_ac_vlc_syms; + const uint8_t *ac_vlc_lens = tscc2_ac_vlc_lens; int i, ret; ret = ff_init_vlc_from_lengths(&c->dc_vlc, 9, DC_VLC_COUNT, @@ -77,11 +79,13 @@ static av_cold int init_vlcs(TSCC2Context *c) if (ret) return ret; ret = ff_init_vlc_from_lengths(c->ac_vlc + i, 9, tscc2_ac_vlc_sizes[i], - tscc2_ac_vlc_bits[i], 1, - tscc2_ac_vlc_syms[i], 2, 2, + ac_vlc_lens, 1, + ac_vlc_syms, 2, 2, 0, INIT_VLC_OUTPUT_LE, c->avctx); if (ret) return ret; + ac_vlc_lens += tscc2_ac_vlc_sizes[i]; + ac_vlc_syms += tscc2_ac_vlc_sizes[i]; } return 0; diff --git a/libavcodec/tscc2data.h b/libavcodec/tscc2data.h index 2ccfa3b811..63f5619141 100644 --- a/libavcodec/tscc2data.h +++ b/libavcodec/tscc2data.h @@ -95,7 +95,8 @@ static const uint8_t tscc2_nc_vlc_lens[NUM_VLC_SETS][16] = { { 3, 3, 6, 7, 7, 6, 6, 8, 9, 9, 7, 6, 6, 6, 3, 1 }, }; -static const uint16_t ac_vlc_desc0_syms[172] = { +static const uint16_t tscc2_ac_vlc_syms[] = { + /* Descriptor 0 - 172 entries */ 0x0FC0, 0x0040, 0x0FF1, 0x0011, 0x0FA0, 0x0FE5, 0x0140, 0x0280, 0x0D60, 0x0210, 0x0FC6, 0x0FD6, 0x0200, 0x0F95, 0x0101, 0x0190, 0x0FF5, 0x0FF2, 0x0060, 0x0FE1, 0x0021, 0x0F41, 0x0270, 0x0D80, 0x0055, 0x0FB2, 0x00F1, @@ -116,9 +117,7 @@ static const uint16_t ac_vlc_desc0_syms[172] = { 0x01A0, 0x0036, 0x00D1, 0x0FD3, 0x0025, 0x0130, 0x1000, 0x0051, 0x0FF6, 0x0ED0, 0x0E60, 0x0042, 0x0DF0, 0x0F20, 0x00E0, 0x0033, 0x0F71, 0x0071, 0x00A0, -}; - -static const uint16_t ac_vlc_desc1_syms[169] = { + /* Descriptor 1 - 169 entries */ 0x00D0, 0x0E50, 0x00D1, 0x0091, 0x0160, 0x0F31, 0x0EE1, 0x0250, 0x0F70, 0x0051, 0x0F41, 0x0063, 0x0150, 0x0EF0, 0x01A0, 0x0F51, 0x0FD5, 0x0F93, 0x0DC0, 0x0240, 0x0095, 0x0FD2, 0x00C0, 0x0FC0, 0x0040, 0x0090, 0x0016, @@ -138,9 +137,7 @@ static const uint16_t ac_vlc_desc1_syms[169] = { 0x0F60, 0x0014, 0x0070, 0x0F90, 0x0030, 0x0FB1, 0x0075, 0x0E90, 0x0F91, 0x0FF4, 0x0013, 0x0FF3, 0x0EE0, 0x0FF8, 0x0065, 0x0E40, 0x01B0, 0x0F30, 0x0071, 0x0FE5, 0x0EA0, 0x0F71, 0x0110, 0x0FF0, 0x0010, -}; - -static const uint16_t ac_vlc_desc2_syms[165] = { + /* Descriptor 2 - 165 entries */ 0x0051, 0x0E61, 0x0E81, 0x0E80, 0x0FF7, 0x0E00, 0x0E30, 0x0F71, 0x0130, 0x00F0, 0x0170, 0x0E70, 0x0F81, 0x0F40, 0x0FF3, 0x0040, 0x0013, 0x0FA0, 0x0FC0, 0x0060, 0x0065, 0x0E40, 0x0ED0, 0x0043, 0x0086, 0x0F93, 0x0036, @@ -160,9 +157,7 @@ static const uint16_t ac_vlc_desc2_syms[165] = { 0x0FC5, 0x0EC0, 0x0F00, 0x0090, 0x0022, 0x0F06, 0x0F31, 0x0FA5, 0x00D1, 0x0E60, 0x0075, 0x0F70, 0x0014, 0x0FF4, 0x0025, 0x0FB1, 0x0FE6, 0x0EE0, 0x00C0, 0x0FF0, 0x0010, -}; - -static const uint16_t ac_vlc_desc3_syms[162] = { + /* Descriptor 3 - 162 entries */ 0x0FC5, 0x0EC1, 0x0033, 0x0FE3, 0x0FD6, 0x0110, 0x00E0, 0x0071, 0x0F36, 0x0095, 0x01A1, 0x0F71, 0x0060, 0x0FA0, 0x0FE2, 0x0F20, 0x0F21, 0x0085, 0x0150, 0x0053, 0x0023, 0x0022, 0x0FF4, 0x0043, 0x0E70, 0x0034, 0x0017, @@ -181,9 +176,7 @@ static const uint16_t ac_vlc_desc3_syms[162] = { 0x00B1, 0x0163, 0x0055, 0x0024, 0x0F56, 0x0FA3, 0x0FE4, 0x0F46, 0x0FE6, 0x0025, 0x0026, 0x0EE0, 0x0FA5, 0x01C1, 0x0F70, 0x0FD0, 0x0030, 0x1000, 0x0045, 0x0F11, 0x0066, 0x0F85, 0x0051, 0x0014, 0x0021, 0x0FF0, 0x0010, -}; - -static const uint16_t ac_vlc_desc4_syms[131] = { + /* Descriptor 4 - 131 entries */ 0x0010, 0x0FB0, 0x0050, 0x0070, 0x0FF5, 0x0FC1, 0x0090, 0x0FD1, 0x00E0, 0x0161, 0x0085, 0x0F41, 0x0F20, 0x0FD6, 0x0F70, 0x0FD3, 0x0032, 0x0FD2, 0x0055, 0x0191, 0x0063, 0x0091, 0x0081, 0x0F91, 0x0015, 0x0031, 0x0065, @@ -199,9 +192,7 @@ static const uint16_t ac_vlc_desc4_syms[131] = { 0x0F56, 0x0171, 0x0F10, 0x0FA1, 0x0EB0, 0x0056, 0x0026, 0x0035, 0x0FB5, 0x0FB3, 0x0EF1, 0x0FF3, 0x0013, 0x0F90, 0x0FA5, 0x0FC2, 0x0F11, 0x0F81, 0x0110, 0x0042, 0x0061, 0x0FE5, 0x0FF0, -}; - -static const uint16_t ac_vlc_desc5_syms[132] = { + /* Descriptor 5 - 132 entries */ 0x0010, 0x0F81, 0x0FC5, 0x0F20, 0x0F76, 0x0061, 0x0F41, 0x00D3, 0x0FB3, 0x0023, 0x0F31, 0x0EC0, 0x00B1, 0x0045, 0x0F50, 0x0FF5, 0x0042, 0x00C1, 0x0EC1, 0x00D0, 0x0F33, 0x0F93, 0x0FF8, 0x0EF0, 0x0140, 0x0035, 0x0071, @@ -217,9 +208,7 @@ static const uint16_t ac_vlc_desc5_syms[132] = { 0x0FE4, 0x0103, 0x0091, 0x0026, 0x0F10, 0x0014, 0x0FE2, 0x0022, 0x0070, 0x0090, 0x0100, 0x0FC2, 0x0151, 0x0FD3, 0x0FF4, 0x0050, 0x0F70, 0x0053, 0x0110, 0x0F71, 0x00B0, 0x0F90, 0x0FB0, 0x0FF0, -}; - -static const uint16_t ac_vlc_desc6_syms[130] = { + /* Descriptor 6 - 130 entries */ 0x0010, 0x0FF4, 0x0F96, 0x0F71, 0x00D1, 0x0FF7, 0x00E3, 0x0045, 0x0FC1, 0x1000, 0x00C0, 0x0042, 0x0120, 0x00A0, 0x0F80, 0x0FD1, 0x0F43, 0x0F63, 0x0EF0, 0x0F86, 0x0F60, 0x0023, 0x0080, 0x00F0, 0x0FB3, 0x00E0, 0x0063, @@ -235,9 +224,7 @@ static const uint16_t ac_vlc_desc6_syms[130] = { 0x0091, 0x0101, 0x0071, 0x0070, 0x0F90, 0x0FB0, 0x0FC3, 0x0065, 0x00F1, 0x0F53, 0x00D0, 0x0FE2, 0x0FA1, 0x0024, 0x0FE4, 0x0022, 0x0050, 0x0FE6, 0x0FD5, 0x0F70, 0x0014, 0x0FF0, -}; - -static const uint16_t ac_vlc_desc7_syms[125] = { + /* Descriptor 7 - 125 entries */ 0x0010, 0x0022, 0x0FD5, 0x0F71, 0x0F63, 0x0052, 0x0F31, 0x0042, 0x0024, 0x0FE4, 0x0F86, 0x0F93, 0x00C1, 0x0025, 0x0FD1, 0x0FE6, 0x0F95, 0x00D1, 0x0FA6, 0x0FD2, 0x00E1, 0x0017, 0x0FF7, 0x0081, 0x0FB3, 0x0046, 0x0014, @@ -252,9 +239,7 @@ static const uint16_t ac_vlc_desc7_syms[125] = { 0x0015, 0x0016, 0x00A0, 0x0FD3, 0x0065, 0x0111, 0x0FC3, 0x0091, 0x0018, 0x0F20, 0x0050, 0x1000, 0x0FF6, 0x0FB0, 0x0FA1, 0x0101, 0x0F53, 0x00E0, 0x0080, 0x0F60, 0x00D0, 0x0F41, 0x0F73, 0x0FE2, 0x0011, 0x0FF0, -}; - -static const uint16_t ac_vlc_desc8_syms[121] = { + /* Descriptor 8 - 121 entries */ 0x0010, 0x0F60, 0x0093, 0x00A3, 0x0F95, 0x0018, 0x0FE2, 0x0FA6, 0x0FA1, 0x0022, 0x0090, 0x0042, 0x0F86, 0x0F93, 0x0036, 0x0FE6, 0x0F50, 0x0FD1, 0x0060, 0x0FA0, 0x0025, 0x0FD2, 0x0046, 0x0F70, 0x0031, 0x0045, 0x0F40, @@ -269,9 +254,7 @@ static const uint16_t ac_vlc_desc8_syms[121] = { 0x0053, 0x00C0, 0x0FF1, 0x0FF2, 0x0FB0, 0x0016, 0x0FB5, 0x0F51, 0x0091, 0x0F21, 0x0FD3, 0x0FC3, 0x00D0, 0x0F83, 0x0F61, 0x0012, 0x0015, 0x0051, 0x0FE5, 0x0FF6, 0x0011, 0x0FF0, -}; - -static const uint16_t ac_vlc_desc9_syms[114] = { + /* Descriptor 9 - 114 entries */ 0x0010, 0x0015, 0x0042, 0x0091, 0x0FD2, 0x0036, 0x0FE2, 0x0022, 0x00C0, 0x0121, 0x0065, 0x0F31, 0x0018, 0x0F60, 0x0FF6, 0x0070, 0x00B0, 0x0045, 0x0F71, 0x0FD1, 0x0FC1, 0x0FA1, 0x0055, 0x0FB5, 0x0FB2, 0x0F93, 0x0FC5, @@ -285,9 +268,7 @@ static const uint16_t ac_vlc_desc9_syms[114] = { 0x00D0, 0x00F1, 0x0FC2, 0x0FE6, 0x0FA6, 0x0FB6, 0x0FA0, 0x0FF2, 0x0060, 0x0FD3, 0x0F30, 0x00A1, 0x0F96, 0x0053, 0x0035, 0x00A0, 0x0016, 0x00C1, 0x0FC3, 0x0F81, 0x0FE5, 0x0012, 0x0011, 0x0FF0, -}; - -static const uint16_t ac_vlc_descA_syms[110] = { + /* Descriptor A - 110 entries */ 0x0010, 0x0F60, 0x0051, 0x0F90, 0x0FE2, 0x0044, 0x0FA5, 0x0053, 0x00A1, 0x0035, 0x0022, 0x0026, 0x0073, 0x0080, 0x0FD1, 0x0015, 0x0FE5, 0x0090, 0x0091, 0x0055, 0x0F73, 0x0F51, 0x00D1, 0x0023, 0x0FA1, 0x0061, 0x0FB3, @@ -301,9 +282,7 @@ static const uint16_t ac_vlc_descA_syms[110] = { 0x0F71, 0x00E1, 0x0F40, 0x0FC3, 0x0FB5, 0x0070, 0x0042, 0x0F61, 0x0F83, 0x0FF7, 0x0017, 0x0FD2, 0x0036, 0x0FD3, 0x0016, 0x0FA0, 0x0FF2, 0x0012, 0x0011, 0x0FF0, -}; - -static const uint16_t ac_vlc_descB_syms[101] = { + /* Descriptor B - 101 entries */ 0x0010, 0x0012, 0x0023, 0x0091, 0x0061, 0x0FA1, 0x0FD1, 0x0015, 0x0030, 0x0FD0, 0x0FB3, 0x0F71, 0x0F60, 0x0FA6, 0x0063, 0x0032, 0x0FC1, 0x0031, 0x0040, 0x0080, 0x0FD5, 0x0FE3, 0x0050, 0x0FC0, 0x0FB0, 0x0FF6, 0x0F81, @@ -316,9 +295,7 @@ static const uint16_t ac_vlc_descB_syms[101] = { 0x0FF2, 0x0035, 0x0045, 0x0FC2, 0x00D1, 0x0FE2, 0x0016, 0x0FC3, 0x0FD2, 0x00B0, 0x0FE6, 0x0F93, 0x0F50, 0x0FF7, 0x0017, 0x0053, 0x0022, 0x0FE5, 0x0011, 0x0FF0, -}; - -static const uint16_t ac_vlc_descC_syms[96] = { + /* Descriptor C - 96 entries */ 0x0010, 0x0012, 0x0FC3, 0x00B1, 0x00A1, 0x0022, 0x0FE5, 0x0F93, 0x0090, 0x0061, 0x0055, 0x0042, 0x0FE6, 0x0040, 0x0030, 0x0FD1, 0x0050, 0x0015, 0x0FD0, 0x0FC0, 0x0023, 0x0FC1, 0x0017, 0x00C1, 0x0032, 0x0FB5, 0x0FF7, @@ -332,7 +309,8 @@ static const uint16_t ac_vlc_descC_syms[96] = { 0x0016, 0x0013, 0x0FF3, 0x0FF2, 0x0011, 0x0FF0, }; -static const uint8_t ac_vlc_desc0_bits[172] = { +static const uint8_t tscc2_ac_vlc_lens[] = { + /* Descriptor 0 - 172 entries */ 5, 5, 4, 4, 6, 9, 9, 12, 12, 11, 11, 11, 11, 12, 12, 10, 7, 6, 6, 6, 6, 11, 12, 12, 11, 12, 12, 9, 8, 7, 7, 9, 9, 11, 11, 10, 9, 7, 7, 12, 12, 11, 10, 9, 10, 11, 11, 9, 7, 6, 9, 11, 12, 12, @@ -343,9 +321,7 @@ static const uint8_t ac_vlc_desc0_bits[172] = { 11, 11, 10, 7, 7, 9, 9, 11, 12, 12, 11, 12, 12, 11, 11, 10, 7, 8, 11, 12, 12, 11, 12, 12, 9, 8, 11, 11, 12, 12, 11, 10, 10, 6, 9, 9, 10, 11, 12, 12, 9, 9, 11, 11, 10, 8, -}; - -static const uint8_t ac_vlc_desc1_bits[169] = { + /* Descriptor 1 - 169 entries */ 8, 11, 11, 10, 10, 11, 12, 12, 7, 8, 11, 11, 10, 9, 11, 11, 10, 12, 12, 12, 12, 10, 8, 5, 5, 7, 8, 8, 6, 10, 10, 12, 12, 11, 12, 12, 11, 8, 7, 6, 7, 11, 11, 10, 9, 12, 12, 11, 10, 9, 6, 4, 4, 6, @@ -356,9 +332,7 @@ static const uint8_t ac_vlc_desc1_bits[169] = { 11, 9, 9, 12, 12, 12, 12, 10, 5, 8, 11, 12, 12, 10, 10, 11, 12, 12, 8, 8, 7, 7, 5, 9, 11, 11, 10, 8, 7, 7, 10, 12, 12, 12, 12, 9, 10, 10, 11, 11, 10, 3, 3, -}; - -static const uint8_t ac_vlc_desc2_bits[165] = { + /* Descriptor 2 - 165 entries */ 8, 12, 12, 11, 12, 12, 11, 10, 10, 9, 11, 11, 10, 8, 6, 5, 6, 6, 5, 6, 11, 11, 10, 10, 12, 12, 11, 9, 9, 11, 12, 12, 10, 9, 11, 11, 12, 12, 11, 11, 11, 11, 11, 7, 7, 6, 8, 9, 10, 11, 12, 12, 7, 7, @@ -369,9 +343,7 @@ static const uint8_t ac_vlc_desc2_bits[165] = { 6, 4, 4, 5, 7, 9, 12, 12, 11, 12, 12, 11, 9, 9, 6, 5, 10, 10, 11, 11, 10, 8, 9, 12, 12, 11, 11, 12, 12, 8, 8, 8, 9, 9, 10, 10, 9, 3, 3, -}; - -static const uint8_t ac_vlc_desc3_bits[162] = { + /* Descriptor 3 - 162 entries */ 10, 10, 9, 8, 10, 10, 9, 9, 11, 12, 12, 10, 6, 6, 8, 9, 11, 11, 11, 11, 8, 8, 7, 10, 11, 12, 12, 11, 11, 10, 8, 7, 8, 12, 12, 11, 12, 12, 12, 12, 11, 11, 10, 5, 5, 7, 9, 9, 11, 11, 12, 12, 11, 9, @@ -381,9 +353,7 @@ static const uint8_t ac_vlc_desc3_bits[162] = { 6, 6, 10, 10, 11, 11, 12, 12, 11, 8, 7, 8, 9, 11, 11, 10, 8, 11, 11, 10, 9, 4, 4, 4, 4, 6, 8, 12, 12, 11, 11, 12, 12, 11, 11, 10, 9, 10, 11, 12, 12, 8, 5, 5, 7, 10, 12, 12, 11, 9, 8, 6, 3, 3, -}; - -static const uint8_t ac_vlc_desc4_bits[131] = { + /* Descriptor 4 - 131 entries */ 2, 6, 6, 7, 7, 8, 8, 7, 10, 12, 12, 11, 10, 10, 8, 9, 10, 10, 11, 12, 12, 10, 10, 10, 7, 7, 11, 12, 12, 11, 12, 12, 9, 8, 10, 11, 11, 9, 10, 10, 9, 6, 4, 6, 6, 11, 11, 12, 12, 11, 9, 9, 11, 11, @@ -392,9 +362,7 @@ static const uint8_t ac_vlc_desc4_bits[131] = { 11, 12, 12, 11, 8, 6, 9, 9, 9, 11, 12, 12, 12, 12, 11, 7, 9, 10, 12, 12, 11, 10, 12, 12, 11, 10, 12, 12, 11, 7, 7, 8, 11, 12, 12, 11, 12, 12, 10, 10, 3, -}; - -static const uint8_t ac_vlc_desc5_bits[132] = { + /* Descriptor 5 - 132 entries */ 2, 10, 10, 10, 10, 9, 10, 11, 11, 8, 11, 12, 12, 10, 9, 7, 11, 12, 12, 10, 11, 12, 12, 11, 11, 9, 9, 7, 8, 8, 6, 6, 12, 12, 11, 11, 11, 10, 10, 8, 7, 12, 12, 11, 10, 10, 10, 9, 11, 12, 12, 10, 7, 6, @@ -403,9 +371,7 @@ static const uint8_t ac_vlc_desc5_bits[132] = { 10, 8, 12, 12, 11, 11, 12, 12, 10, 10, 11, 11, 11, 11, 9, 4, 6, 9, 11, 12, 12, 11, 11, 8, 9, 9, 8, 9, 11, 12, 12, 10, 8, 7, 9, 12, 12, 11, 10, 8, 7, 3, -}; - -static const uint8_t ac_vlc_desc6_bits[130] = { + /* Descriptor 6 - 130 entries */ 2, 7, 10, 10, 12, 12, 11, 10, 8, 7, 10, 11, 11, 9, 8, 7, 11, 12, 12, 10, 9, 8, 8, 11, 11, 10, 12, 12, 11, 12, 12, 11, 7, 8, 10, 10, 10, 12, 12, 11, 7, 7, 9, 10, 10, 8, 6, 6, 4, 10, 12, 12, 11, 10, @@ -414,9 +380,7 @@ static const uint8_t ac_vlc_desc6_bits[130] = { 6, 7, 9, 11, 11, 11, 11, 8, 4, 4, 6, 8, 10, 12, 12, 12, 12, 10, 12, 12, 11, 8, 8, 7, 11, 12, 12, 11, 11, 9, 10, 11, 11, 9, 7, 10, 10, 9, 8, 3, -}; - -static const uint8_t ac_vlc_desc7_bits[125] = { + /* Descriptor 7 - 125 entries */ 2, 8, 9, 10, 10, 12, 12, 11, 10, 10, 11, 12, 12, 8, 7, 9, 11, 11, 10, 10, 11, 12, 12, 11, 11, 10, 7, 7, 8, 8, 7, 7, 7, 9, 10, 11, 12, 12, 8, 7, 8, 11, 11, 10, 9, 10, 10, 10, 10, 10, 12, 12, 11, 9, @@ -424,9 +388,7 @@ static const uint8_t ac_vlc_desc7_bits[125] = { 6, 6, 10, 10, 9, 12, 12, 11, 10, 10, 11, 12, 12, 10, 10, 10, 11, 12, 12, 10, 11, 11, 9, 6, 6, 4, 6, 7, 8, 10, 10, 12, 12, 11, 12, 12, 11, 7, 8, 8, 7, 10, 11, 12, 12, 9, 10, 11, 12, 12, 9, 4, 3, -}; - -static const uint8_t ac_vlc_desc8_bits[121] = { + /* Descriptor 8 - 121 entries */ 2, 9, 10, 12, 12, 11, 8, 9, 9, 8, 9, 11, 12, 12, 10, 9, 9, 7, 7, 7, 8, 10, 10, 9, 7, 10, 10, 10, 11, 12, 12, 8, 8, 10, 10, 11, 11, 10, 7, 7, 5, 5, 8, 8, 7, 10, 10, 10, 12, 12, 11, 10, 11, 12, @@ -434,9 +396,7 @@ static const uint8_t ac_vlc_desc8_bits[121] = { 8, 12, 12, 11, 11, 11, 10, 12, 12, 11, 8, 9, 11, 11, 12, 12, 12, 12, 6, 7, 10, 10, 10, 10, 9, 10, 12, 12, 11, 4, 6, 7, 8, 12, 12, 12, 12, 10, 11, 12, 12, 10, 6, 7, 9, 9, 8, 4, 3, -}; - -static const uint8_t ac_vlc_desc9_bits[114] = { + /* Descriptor 9 - 114 entries */ 2, 6, 11, 11, 10, 9, 8, 8, 11, 12, 12, 11, 11, 9, 7, 8, 10, 10, 9, 7, 8, 9, 11, 11, 12, 12, 11, 8, 9, 10, 10, 7, 8, 11, 11, 10, 9, 11, 11, 10, 12, 12, 11, 10, 8, 5, 5, 7, 7, 6, 4, 6, 9, 11, @@ -444,9 +404,7 @@ static const uint8_t ac_vlc_desc9_bits[114] = { 7, 4, 7, 7, 6, 6, 6, 4, 12, 12, 11, 10, 10, 11, 11, 9, 10, 10, 11, 12, 12, 10, 10, 10, 8, 6, 8, 10, 12, 12, 12, 12, 10, 10, 8, 11, 11, 10, 9, 6, 4, 3, -}; - -static const uint8_t ac_vlc_descA_bits[110] = { + /* Descriptor A - 110 entries */ 2, 9, 9, 8, 8, 12, 12, 11, 10, 9, 8, 10, 10, 9, 7, 6, 8, 9, 11, 11, 12, 12, 11, 8, 9, 10, 11, 11, 7, 7, 8, 9, 9, 8, 10, 11, 11, 10, 11, 12, 12, 5, 5, 6, 8, 9, 9, 8, 9, 10, 11, 12, 12, 4, @@ -454,18 +412,14 @@ static const uint8_t ac_vlc_descA_bits[110] = { 10, 10, 6, 7, 8, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 6, 4, 6, 11, 12, 12, 11, 11, 9, 12, 12, 11, 12, 12, 11, 10, 10, 8, 8, 6, 6, 4, 3, -}; - -static const uint8_t ac_vlc_descB_bits[101] = { + /* Descriptor B - 101 entries */ 2, 5, 8, 10, 10, 9, 7, 6, 5, 5, 11, 11, 10, 11, 11, 10, 8, 7, 6, 9, 9, 8, 7, 6, 7, 7, 9, 9, 9, 9, 8, 8, 6, 10, 11, 12, 12, 11, 11, 11, 11, 8, 8, 10, 10, 9, 4, 4, 6, 11, 12, 12, 10, 9, 10, 11, 11, 10, 11, 11, 7, 7, 9, 11, 12, 12, 10, 9, 10, 10, 7, 8, 12, 12, 11, 10, 10, 10, 4, 6, 6, 6, 10, 11, 12, 12, 9, 8, 11, 11, 11, 11, 10, 12, 12, 12, 12, 9, 9, 4, 3, -}; - -static const uint8_t ac_vlc_descC_bits[96] = { + /* Descriptor C - 96 entries */ 2, 5, 10, 10, 9, 8, 8, 10, 10, 10, 12, 12, 11, 6, 5, 7, 7, 6, 5, 6, 8, 8, 11, 11, 10, 11, 11, 10, 8, 7, 8, 8, 9, 10, 11, 11, 8, 7, 7, 9, 9, 8, 6, 4, 4, 6, 10, 10, 9, 11, 11, 11, 11, 9, @@ -478,18 +432,4 @@ static const int tscc2_ac_vlc_sizes[NUM_VLC_SETS] = { 172, 169, 165, 162, 131, 132, 130, 125, 121, 114, 110, 101, 96 }; -static const uint16_t * const tscc2_ac_vlc_syms[NUM_VLC_SETS] = { - ac_vlc_desc0_syms, ac_vlc_desc1_syms, ac_vlc_desc2_syms, ac_vlc_desc3_syms, - ac_vlc_desc4_syms, ac_vlc_desc5_syms, ac_vlc_desc6_syms, ac_vlc_desc7_syms, - ac_vlc_desc8_syms, ac_vlc_desc9_syms, ac_vlc_descA_syms, ac_vlc_descB_syms, - ac_vlc_descC_syms, -}; - -static const uint8_t * const tscc2_ac_vlc_bits[NUM_VLC_SETS] = { - ac_vlc_desc0_bits, ac_vlc_desc1_bits, ac_vlc_desc2_bits, ac_vlc_desc3_bits, - ac_vlc_desc4_bits, ac_vlc_desc5_bits, ac_vlc_desc6_bits, ac_vlc_desc7_bits, - ac_vlc_desc8_bits, ac_vlc_desc9_bits, ac_vlc_descA_bits, ac_vlc_descB_bits, - ac_vlc_descC_bits, -}; - #endif /* AVCODEC_TSCC2DATA_H */