From patchwork Tue Nov 10 10:46:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23467 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 DFCD8449B06 for ; Tue, 10 Nov 2020 12:49:28 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CAE0968BD53; Tue, 10 Nov 2020 12:49:28 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D824B68BD83 for ; Tue, 10 Nov 2020 12:49:20 +0200 (EET) Received: by mail-wm1-f52.google.com with SMTP id c9so2512453wml.5 for ; Tue, 10 Nov 2020 02:49:20 -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=lNrVElm4qKIlDaEOa4tX+DouBRSFJaRX9F8hpnaPNJU=; b=NdSUz1TLFoEywODt8RsnsmeNw6qodBHo0A22I5IHTgbBUYsFlwyBMUVnE9iRfMPzsn 46aJ2/pT3++KKpab6PLGSfgUYaQZVOrclHbqYBaVOwaq2dXPPORy5cU1+XzxzbKq+3Cr JYMq7ZrkVm5LviDzBiBA3h/CIAt2/18BRy3AUg3AeE9xBe2elx19T/bVBXLMmSA+PsJf BLtSNse+fDjqrsI03s3Lz+bk0FgNAiJpxKr0mb+83Ji26azkuF2R3JQWSEeBph7++lEu nwZfxm9/69WPLKasd8C9sCclW/EW2qZYoJtE5/wWUdvRFtRlv9Yxd/v0x3lGEAvC3sMF 06Uw== 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=lNrVElm4qKIlDaEOa4tX+DouBRSFJaRX9F8hpnaPNJU=; b=gyeLp3G5Rpj5hFTvoLvv7EkAMImRsId1MfJYc5YjEbuwt33WyrfYn2fEpf6w9AooFo txVs7kQOQtDq98uo/tl4vzoPPZdQvbi2vq4/azjXqJz4zh1+uCZMXDbD50q3evEz6A3+ f+GS72gXQ5XC+cHAO/oigaxMh38g1aTmMuQqo2zrrAfjkxiaePB/1T80IX14T/WqyqFP ywIxUITNvh4QIpAfpr0rlLnsnpIknB2NC1nkCUZWcZJ7tXWFiCY54dmC9lW4VqZ03vBG GU0uXPmKfBSuI8ArUYRt8ZHCT1VLUwdVp2Mph3AFQI8eSs5LeZw4VJ0WRgZ1xp+joVV+ aICw== X-Gm-Message-State: AOAM530zBLdnKp3MPDzqeEAEAGqFrdcFM129IprE0BwMJAjvBwAkYa6z NM4dyqd/rlUI9vtAWjhzcPuEdVSUsnA= X-Google-Smtp-Source: ABdhPJwGQ7mpyJnzabZr/P33lG0bT/mX3nffh15rLLq5wb+kun/4Bo81Q2NJQcqgyX0CDxKNmJzN/w== X-Received: by 2002:a1c:df89:: with SMTP id w131mr3881295wmg.164.1605005359901; Tue, 10 Nov 2020 02:49:19 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:19 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:46:58 +0100 Message-Id: <20201110104851.321029-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 001/114] avcodec/bitstream: Add second function to create 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" When using ff_init_vlc_sparse() to create a VLC, three input tables are used: A table for lengths, one for codes and one for symbols; the latter one can be omitted, then a default one will be used. These input tables will be traversed twice, once to get the long codes (which will be put into subtables) and once for the small codes. The long codes are then sorted so that entries that should be in the same subtable are contiguous. This commit adds an alternative to ff_init_vlc_sparse(): ff_init_vlc_from_lengths(). It is based upon the observation that if lengths, codes and symbols tables are permuted (in the same way) so that the codes are ordered from left to right in the corresponding tree and if said tree is complete (i.e. every non-leaf node has two children), the codes can be easily computed from the lengths and are therefore redundant. This means that if one initializes such a VLC with explicitly coded lengths, codes and symbols, the codes can be avoided; and even if one has no explicitly coded symbols, it might still be beneficial to remove the codes even when one has to add a new symbol table, because codes are typically longer than symbols so that the latter often fit into a smaller type, saving space. Furthermore, given that the codes here are by definition ordered from left to right, it is unnecessary to sort them again; for the same reason, one does not have to traverse the input twice. This function proved to be faster than ff_init_vlc_sparse() whenever it has been benchmarked. This function is usable for static tables (they can simply be permuted once) as well as in scenarios where the tables are naturally ordered from left to right in the tree; the latter e.g. happens with Smacker, Theora and several other formats. In order to make it also usable for (static) tables with incomplete trees, negative lengths are used to indicate that there is an open end of a certain length. Finally, ff_init_vlc_from_lengths() has one downside compared to ff_init_vlc_sparse(): The latter uses tables that can be reused by encoders. Of course, one could calculate the needed table at runtime if one so wishes, but it is nevertheless an obstacle. Signed-off-by: Andreas Rheinhardt --- libavcodec/bitstream.c | 138 ++++++++++++++++++++++++++++++----------- libavcodec/vlc.h | 47 ++++++++++++++ 2 files changed, 149 insertions(+), 36 deletions(-) diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index c7a87734e5..03d39ad88c 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -132,6 +132,8 @@ static int alloc_table(VLC *vlc, int size, int use_static) return index; } +#define LOCALBUF_ELEMS 1500 // the maximum currently needed is 1296 by rv34 + typedef struct VLCcode { uint8_t bits; VLC_TYPE symbol; @@ -140,6 +142,31 @@ typedef struct VLCcode { uint32_t code; } VLCcode; +static int vlc_common_init(VLC *vlc_arg, int nb_bits, int nb_codes, + VLC **vlc, VLC *localvlc, VLCcode **buf, + int flags) +{ + *vlc = vlc_arg; + (*vlc)->bits = nb_bits; + if (flags & INIT_VLC_USE_NEW_STATIC) { + av_assert0(nb_codes <= LOCALBUF_ELEMS); + *localvlc = *vlc_arg; + *vlc = localvlc; + (*vlc)->table_size = 0; + } else { + (*vlc)->table = NULL; + (*vlc)->table_allocated = 0; + (*vlc)->table_size = 0; + } + if (nb_codes > LOCALBUF_ELEMS) { + *buf = av_malloc_array(nb_codes, sizeof(VLCcode)); + if (!*buf) + return AVERROR(ENOMEM); + } + + return 0; +} + static int compare_vlcspec(const void *a, const void *b) { const VLCcode *sa = a, *sb = b; @@ -248,6 +275,27 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes, return table_index; } +static int vlc_common_end(VLC *vlc, int nb_bits, int nb_codes, VLCcode *codes, + int flags, VLC *vlc_arg, VLCcode localbuf[LOCALBUF_ELEMS]) +{ + int ret = build_table(vlc, nb_bits, nb_codes, codes, flags); + + if (flags & INIT_VLC_USE_NEW_STATIC) { + if(vlc->table_size != vlc->table_allocated) + av_log(NULL, AV_LOG_ERROR, "needed %d had %d\n", vlc->table_size, vlc->table_allocated); + + av_assert0(ret >= 0); + *vlc_arg = *vlc; + } else { + if (codes != localbuf) + av_free(codes); + if (ret < 0) { + av_freep(&vlc->table); + return ret; + } + } + return 0; +} /* Build VLC decoding tables suitable for use with get_vlc(). @@ -278,30 +326,14 @@ int ff_init_vlc_sparse(VLC *vlc_arg, int nb_bits, int nb_codes, const void *symbols, int symbols_wrap, int symbols_size, int flags) { - VLCcode *buf; + VLCcode localbuf[LOCALBUF_ELEMS], *buf = localbuf; int i, j, ret; - VLCcode localbuf[1500]; // the maximum currently needed is 1296 by rv34 VLC localvlc, *vlc; - vlc = vlc_arg; - vlc->bits = nb_bits; - if (flags & INIT_VLC_USE_NEW_STATIC) { - av_assert0(nb_codes <= FF_ARRAY_ELEMS(localbuf)); - localvlc = *vlc_arg; - vlc = &localvlc; - vlc->table_size = 0; - } else { - vlc->table = NULL; - vlc->table_allocated = 0; - vlc->table_size = 0; - } - if (nb_codes > FF_ARRAY_ELEMS(localbuf)) { - buf = av_malloc_array(nb_codes, sizeof(VLCcode)); - if (!buf) - return AVERROR(ENOMEM); - } else - buf = localbuf; - + ret = vlc_common_init(vlc_arg, nb_bits, nb_codes, &vlc, &localvlc, + &buf, flags); + if (ret < 0) + return ret; av_assert0(symbols_size <= 2 || !symbols); j = 0; @@ -342,26 +374,60 @@ int ff_init_vlc_sparse(VLC *vlc_arg, int nb_bits, int nb_codes, COPY(len && len <= nb_bits); nb_codes = j; - ret = build_table(vlc, nb_bits, nb_codes, buf, flags); - - if (flags & INIT_VLC_USE_NEW_STATIC) { - if(vlc->table_size != vlc->table_allocated) - av_log(NULL, AV_LOG_ERROR, "needed %d had %d\n", vlc->table_size, vlc->table_allocated); + return vlc_common_end(vlc, nb_bits, nb_codes, buf, + flags, vlc_arg, localbuf); +} - av_assert0(ret >= 0); - *vlc_arg = *vlc; - } else { - if (buf != localbuf) - av_free(buf); - if (ret < 0) { - av_freep(&vlc->table); - return ret; +int ff_init_vlc_from_lengths(VLC *vlc_arg, int nb_bits, int nb_codes, + const int8_t *lens, int lens_wrap, + const void *symbols, int symbols_wrap, int symbols_size, + int offset, int flags) +{ + VLCcode localbuf[LOCALBUF_ELEMS], *buf = localbuf; + VLC localvlc, *vlc; + uint64_t code; + int ret, j, len_max = FFMIN(32, 3 * nb_bits); + + ret = vlc_common_init(vlc_arg, nb_bits, nb_codes, &vlc, &localvlc, + &buf, flags); + if (ret < 0) + return ret; + + j = code = 0; + for (int i = 0; i < nb_codes; i++, lens += lens_wrap) { + int len = *lens; + if (len > 0) { + unsigned sym; + + buf[j].bits = len; + if (symbols) + GET_DATA(sym, symbols, i, symbols_wrap, symbols_size) + else + sym = i; + buf[j].symbol = sym + offset; + buf[j++].code = code; + } else if (len < 0) { + len = -len; + } else + continue; + if (len > len_max || code & ((1U << (32 - len)) - 1)) { + av_log(NULL, AV_LOG_ERROR, "Invalid VLC (length %u)\n", len); + goto fail; + } + code += 1U << (32 - len); + if (code > UINT32_MAX + 1ULL) { + av_log(NULL, AV_LOG_ERROR, "Overdetermined VLC tree\n"); + goto fail; } } - return 0; + return vlc_common_end(vlc, nb_bits, j, buf, + flags, vlc_arg, localbuf); +fail: + if (buf != localbuf) + av_free(buf); + return AVERROR_INVALIDDATA; } - void ff_free_vlc(VLC *vlc) { av_freep(&vlc->table); diff --git a/libavcodec/vlc.h b/libavcodec/vlc.h index 22d3e33485..b5a8c371bf 100644 --- a/libavcodec/vlc.h +++ b/libavcodec/vlc.h @@ -49,6 +49,41 @@ int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags); + +/** + * Build VLC decoding tables suitable for use with get_vlc2() + * + * This function takes lengths and symbols and calculates the codes from them. + * For this the input lengths and symbols have to be sorted according to "left + * nodes in the corresponding tree first". + * + * @param[in,out] vlc The VLC to be initialized; table and table_allocated + * must have been set when initializing a static VLC, + * otherwise this will be treated as uninitialized. + * @param[in] nb_bits The number of bits to use for the VLC table; + * higher values take up more memory and cache, but + * allow to read codes with fewer reads. + * @param[in] nb_codes The number of provided length and (if supplied) symbol + * entries. + * @param[in] lens The lengths of the codes. Entries > 0 correspond to + * valid codes; entries == 0 will be skipped and entries + * with len < 0 indicate that the tree is incomplete and + * has an open end of length -len at this position. + * @param[in] lens_wrap Stride (in bytes) of the lengths. + * @param[in] symbols The symbols, i.e. what is returned from get_vlc2() + * when the corresponding code is encountered. + * May be NULL, then 0, 1, 2, 3, 4,... will be used. + * @param[in] symbols_wrap Stride (in bytes) of the symbols. + * @param[in] symbols_size Size of the symbols. 1 and 2 are supported. + * @param[in] offset An offset to apply to all the valid symbols. + * @param[in] flags A combination of the INIT_VLC_* flags; notice that + * INIT_VLC_INPUT_LE is pointless and ignored. + */ +int ff_init_vlc_from_lengths(VLC *vlc, int nb_bits, int nb_codes, + const int8_t *lens, int lens_wrap, + const void *symbols, int symbols_wrap, int symbols_size, + int offset, int flags); + void ff_free_vlc(VLC *vlc); /* If INIT_VLC_INPUT_LE is set, the LSB bit of the codes used to @@ -87,4 +122,16 @@ void ff_free_vlc(VLC *vlc); #define INIT_LE_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \ INIT_LE_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size) +#define INIT_VLC_STATIC_FROM_LENGTHS(vlc, bits, nb_codes, lens, len_wrap, \ + symbols, symbols_wrap, symbols_size, \ + offset, flags, static_size) \ + do { \ + static VLC_TYPE table[static_size][2]; \ + (vlc)->table = table; \ + (vlc)->table_allocated = static_size; \ + ff_init_vlc_from_lengths(vlc, bits, nb_codes, lens, len_wrap, \ + symbols, symbols_wrap, symbols_size, \ + offset, flags | INIT_VLC_USE_NEW_STATIC); \ + } while (0) + #endif /* AVCODEC_VLC_H */ From patchwork Tue Nov 10 10:46:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23464 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 9F086449B06 for ; Tue, 10 Nov 2020 12:49:25 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7F11968BD4B; Tue, 10 Nov 2020 12:49:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D854768B581 for ; Tue, 10 Nov 2020 12:49:23 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id r17so8228889wrw.1 for ; Tue, 10 Nov 2020 02:49:23 -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=lm1WeD/s/DoHUuWQmPzyMhQBeijIAvwDPgK4JnIH7Bg=; b=nxWM8QkPYm1g025CniorpRl1xESoH3Ub9r4RAhTb2Mzr/2QEOBXgcCkAIxWRSDABOH tu/zH1Jpn7S0dTqP80GPWIKDFn3RyUqqynooUg6rQP4zYLVtmuqDBtSaC04zh5Mkfxi3 yh9VWPEVIGCkH/uxMZQHpcqsU4tIkgEK2Ez2HMFFjplu8i5exiGQfI15Q3Qiv9Kz97gy FA/WZ7oyLy8oF1OrNEzmGymYfE9P3+RlCsatOKicLnqt1/2alD39tuy1yWZKJn/cMBLU ZfGKlGrOD9/AKuZzZ00hq/kclQOt9/M9GbNIGDnf4BUZCwwC7QeNJl8wocCR5TaqWxzk NkyA== 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=lm1WeD/s/DoHUuWQmPzyMhQBeijIAvwDPgK4JnIH7Bg=; b=npAFuVk0SsRoU9tQNU1HhSgtY5mdFTwIzEE8JHCKR35bd/Vd1gpZdHpkhKyY4l/2dM r10wZNFRTWQ/PpZwhof1wGFJbKcmhZIJpHYTGad9IoaWysBAnh+X8Ew6CrG1+T3+lKJQ NZiJh0XHXYwOpeIVGNWk2wzuYu+x5lXvBNN5uIXuCtu3ccDYgUKslQ3SE3tDfERfhjEl G/Po2eEZ+JkK+6XhGvepxcHlWyoCq18bnRtx4oquLGQO3/3k7khpf5wX67MhJyvtS+n+ Z436N6XwLB8qwu+4mz4S8+CFJDNJQkrY9wuALP3ebSLsne7ZI6Zj8QP3Ix6MGmqqBHmk 3X5Q== X-Gm-Message-State: AOAM531t++qbiFKd7pTacpcj9JZiTyOZFUuj/JWnYg46AHRVrO/23F1F oCtkmIw0Q5BgMSQL+2pCmR9jEI7qZnE= X-Google-Smtp-Source: ABdhPJyzL3fzosXM6ZnXRKCHnIj1Fxf3o32xUM0OEpC1qycrN2bkD9sTctM1XySFMQX4qe4hTvQSSA== X-Received: by 2002:adf:f542:: with SMTP id j2mr6420668wrp.107.1605005360935; Tue, 10 Nov 2020 02:49:20 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:20 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:46:59 +0100 Message-Id: <20201110104851.321029-3-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 002/114] avcodec/tscc2: Reduce the size of the tables used to initialize 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" After permuting both the codes, lengths and symbols tables so that the codes tables are ordered from left to right in the tree, the codes tables can be easily computed from the lengths tables at runtime and therefore omitted. This saves about 2KB from the binary. Signed-off-by: Andreas Rheinhardt --- libavcodec/tscc2.c | 24 +- libavcodec/tscc2data.h | 1195 +++++++++++++--------------------------- 2 files changed, 393 insertions(+), 826 deletions(-) diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c index 9fa28fe9fc..0552d775c5 100644 --- a/libavcodec/tscc2.c +++ b/libavcodec/tscc2.c @@ -62,24 +62,24 @@ static av_cold int init_vlcs(TSCC2Context *c) { int i, ret; - ret = ff_init_vlc_sparse(&c->dc_vlc, 9, DC_VLC_COUNT, - tscc2_dc_vlc_bits, 1, 1, - tscc2_dc_vlc_codes, 2, 2, - tscc2_dc_vlc_syms, 2, 2, INIT_VLC_LE); + ret = ff_init_vlc_from_lengths(&c->dc_vlc, 9, DC_VLC_COUNT, + tscc2_dc_vlc_lens, 1, + tscc2_dc_vlc_syms, 2, 2, + 0, INIT_VLC_OUTPUT_LE); if (ret) return ret; for (i = 0; i < NUM_VLC_SETS; i++) { - ret = ff_init_vlc_sparse(c->nc_vlc + i, 9, 16, - tscc2_nc_vlc_bits[i], 1, 1, - tscc2_nc_vlc_codes[i], 2, 2, - tscc2_nc_vlc_syms, 1, 1, INIT_VLC_LE); + ret = ff_init_vlc_from_lengths(c->nc_vlc + i, 9, 16, + tscc2_nc_vlc_lens[i], 1, + tscc2_nc_vlc_syms[i], 1, 1, + 0, INIT_VLC_OUTPUT_LE); if (ret) return ret; - ret = ff_init_vlc_sparse(c->ac_vlc + i, 9, tscc2_ac_vlc_sizes[i], - tscc2_ac_vlc_bits[i], 1, 1, - tscc2_ac_vlc_codes[i], 2, 2, - tscc2_ac_vlc_syms[i], 2, 2, INIT_VLC_LE); + 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, + 0, INIT_VLC_OUTPUT_LE); if (ret) return ret; } diff --git a/libavcodec/tscc2data.h b/libavcodec/tscc2data.h index 5e8d18b3f5..2ccfa3b811 100644 --- a/libavcodec/tscc2data.h +++ b/libavcodec/tscc2data.h @@ -37,866 +37,441 @@ static const uint16_t tscc2_quants[NUM_VLC_SETS][3] = { #define DC_VLC_COUNT 47 static const uint16_t tscc2_dc_vlc_syms[DC_VLC_COUNT] = { - 0x100, 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9, - 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, - 0xF0, 0xEF, 0xEE, 0xED, 0xEC, 0xEB, 0xEA, 0x17, - 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, - 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, - 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, -}; - -static const uint16_t tscc2_dc_vlc_codes[DC_VLC_COUNT] = { - 0x000A, 0x0000, 0x0006, 0x002E, 0x0002, 0x000E, 0x001A, 0x007E, - 0x004E, 0x005A, 0x00E2, 0x01BE, 0x01BA, 0x00BA, 0x0072, 0x0022, - 0x02BE, 0x00BE, 0x033A, 0x03F2, 0x01F2, 0x03A2, 0x0122, 0x0322, - 0x01A2, 0x0172, 0x0372, 0x013A, 0x00CE, 0x02CE, 0x02FE, 0x00FE, - 0x00A2, 0x00F2, 0x003A, 0x01CE, 0x01FE, 0x0062, 0x00DA, 0x003E, - 0x0032, 0x007A, 0x0012, 0x001E, 0x0016, 0x0004, 0x0001, -}; - -static const uint8_t tscc2_dc_vlc_bits[DC_VLC_COUNT] = { - 5, 3, 5, 6, 6, 7, 7, 8, - 8, 8, 8, 9, 9, 9, 9, 9, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 9, 9, 9, 9, 9, 8, 8, 8, - 7, 7, 6, 6, 5, 3, 1, -}; - -static const uint8_t tscc2_nc_vlc_syms[16] = { - 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, -}; - -static const uint16_t tscc2_nc_vlc_codes[NUM_VLC_SETS][16] = { - { 0x0023, 0x0003, 0x0031, 0x0021, 0x0011, 0x0053, 0x0013, 0x0001, - 0x0009, 0x0029, 0x0033, 0x0019, 0x000B, 0x0005, 0x0007, 0x0000, }, - { 0x0030, 0x0022, 0x0028, 0x0020, 0x0008, 0x0000, 0x0032, 0x0072, - 0x0010, 0x0002, 0x0012, 0x0018, 0x000A, 0x0004, 0x0006, 0x0001, }, - { 0x0032, 0x0038, 0x0020, 0x0008, 0x0002, 0x0018, 0x0072, 0x0000, - 0x0028, 0x0022, 0x0012, 0x0010, 0x000A, 0x0004, 0x0006, 0x0001, }, - { 0x0032, 0x0010, 0x0072, 0x0030, 0x0022, 0x0038, 0x0008, 0x0028, - 0x0018, 0x0002, 0x0012, 0x0000, 0x000A, 0x0004, 0x0006, 0x0001, }, - { 0x0012, 0x0052, 0x0000, 0x0020, 0x0018, 0x0022, 0x0008, 0x0028, - 0x0038, 0x0002, 0x0032, 0x0010, 0x000A, 0x0004, 0x0006, 0x0001, }, - { 0x0016, 0x0096, 0x0006, 0x0046, 0x0056, 0x0002, 0x0036, 0x0076, - 0x0012, 0x0022, 0x0032, 0x0026, 0x000A, 0x000E, 0x0000, 0x0001, }, - { 0x001A, 0x009A, 0x0032, 0x0072, 0x005A, 0x007A, 0x003A, 0x0002, - 0x0012, 0x0022, 0x000A, 0x002A, 0x0006, 0x000E, 0x0000, 0x0001, }, - { 0x002A, 0x00AA, 0x0002, 0x0042, 0x006A, 0x003A, 0x007A, 0x0022, - 0x0032, 0x0012, 0x000A, 0x001A, 0x0006, 0x000E, 0x0000, 0x0001, }, - { 0x0042, 0x00C2, 0x0002, 0x000A, 0x004A, 0x003A, 0x007A, 0x0022, - 0x0012, 0x0032, 0x002A, 0x001A, 0x0006, 0x000E, 0x0000, 0x0001, }, - { 0x00BA, 0x01BA, 0x003A, 0x0012, 0x0052, 0x007A, 0x0002, 0x0022, - 0x0032, 0x000A, 0x002A, 0x001A, 0x0000, 0x0004, 0x0006, 0x0001, }, - { 0x00AA, 0x01AA, 0x002A, 0x0022, 0x0062, 0x006A, 0x0002, 0x0012, - 0x0032, 0x000A, 0x001A, 0x003A, 0x0000, 0x0004, 0x0006, 0x0001, }, - { 0x00AA, 0x01AA, 0x002A, 0x0022, 0x0062, 0x006A, 0x0002, 0x0012, - 0x0032, 0x000A, 0x003A, 0x001A, 0x0000, 0x0004, 0x0006, 0x0001, }, - { 0x008A, 0x018A, 0x000A, 0x0022, 0x0062, 0x004A, 0x0002, 0x0012, - 0x0032, 0x002A, 0x001A, 0x003A, 0x0000, 0x0004, 0x0006, 0x0001, }, -}; - -static const uint8_t tscc2_nc_vlc_bits[NUM_VLC_SETS][16] = { - { 6, 6, 6, 6, 6, 7, 7, 6, 6, 6, 6, 5, 4, 3, 3, 1 }, - { 6, 6, 6, 6, 6, 6, 7, 7, 6, 6, 6, 5, 4, 3, 3, 1 }, - { 7, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 5, 4, 3, 3, 1 }, - { 7, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 4, 3, 3, 1 }, - { 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 4, 3, 3, 1 }, - { 8, 8, 7, 7, 7, 6, 7, 7, 6, 6, 6, 6, 4, 4, 2, 1 }, - { 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 4, 4, 2, 1 }, - { 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 4, 4, 2, 1 }, - { 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 4, 4, 2, 1 }, - { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 }, - { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 }, - { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 }, - { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 }, + 0x0FF, 0x001, 0x0FC, 0x0F1, 0x0EA, 0x017, 0x00E, 0x016, 0x0EB, 0x009, + 0x0F6, 0x004, 0x006, 0x0F2, 0x015, 0x014, 0x00D, 0x0EC, 0x0ED, 0x100, + 0x0FA, 0x0F7, 0x008, 0x00C, 0x013, 0x0EE, 0x0F3, 0x0F4, 0x005, 0x0FE, + 0x002, 0x0FB, 0x0F8, 0x012, 0x011, 0x00B, 0x0FD, 0x003, 0x007, 0x0EF, + 0x0F0, 0x0F5, 0x0F9, 0x00F, 0x010, 0x00A, 0x000, +}; + +static const uint8_t tscc2_dc_vlc_lens[DC_VLC_COUNT] = { + 3, 3, 6, 9, 10, 10, 9, 10, 10, 8, 8, 6, 7, 9, 10, 10, 9, 10, + 10, 5, 7, 8, 8, 9, 10, 10, 9, 9, 7, 5, 5, 7, 8, 10, 10, 9, + 6, 6, 8, 10, 10, 9, 8, 10, 10, 9, 1, +}; + +static const uint8_t tscc2_nc_vlc_syms[NUM_VLC_SETS][16] = { + { 0x00, 0x08, 0x0C, 0x0B, 0x0D, 0x07, 0x06, 0x04, + 0x02, 0x0E, 0x0F, 0x09, 0x0A, 0x05, 0x03, 0x01 }, + { 0x0A, 0x0C, 0x07, 0x0F, 0x0B, 0x0D, 0x04, 0x02, + 0x06, 0x0E, 0x05, 0x09, 0x08, 0x03, 0x01, 0x00 }, + { 0x08, 0x0D, 0x04, 0x0C, 0x07, 0x0A, 0x0E, 0x02, + 0x0B, 0x06, 0x05, 0x0F, 0x09, 0x03, 0x01, 0x00 }, + { 0x04, 0x0E, 0x0C, 0x09, 0x08, 0x07, 0x0A, 0x02, + 0x06, 0x0B, 0x05, 0x0F, 0x0D, 0x03, 0x01, 0x00 }, + { 0x0D, 0x0C, 0x04, 0x09, 0x08, 0x0B, 0x07, 0x02, + 0x06, 0x0A, 0x0F, 0x0E, 0x05, 0x03, 0x01, 0x00 }, + { 0x01, 0x0A, 0x06, 0x07, 0x05, 0x03, 0x0D, 0x0C, + 0x04, 0x0F, 0x0E, 0x0B, 0x09, 0x08, 0x02, 0x00 }, + { 0x01, 0x08, 0x06, 0x07, 0x0D, 0x0C, 0x05, 0x04, + 0x0F, 0x0E, 0x0B, 0x09, 0x0A, 0x03, 0x02, 0x00 }, + { 0x01, 0x0D, 0x0C, 0x08, 0x06, 0x07, 0x05, 0x0F, + 0x0E, 0x0B, 0x04, 0x0A, 0x09, 0x03, 0x02, 0x00 }, + { 0x01, 0x0D, 0x0F, 0x0E, 0x08, 0x07, 0x06, 0x0C, + 0x0B, 0x05, 0x04, 0x0A, 0x09, 0x03, 0x02, 0x00 }, + { 0x03, 0x02, 0x09, 0x08, 0x0C, 0x0B, 0x07, 0x06, + 0x05, 0x04, 0x0D, 0x0F, 0x0E, 0x0A, 0x01, 0x00 }, + { 0x03, 0x02, 0x09, 0x0C, 0x0B, 0x08, 0x07, 0x06, + 0x0D, 0x0F, 0x0E, 0x0A, 0x05, 0x04, 0x01, 0x00 }, + { 0x03, 0x02, 0x09, 0x0C, 0x0B, 0x08, 0x07, 0x06, + 0x0D, 0x0F, 0x0E, 0x0A, 0x04, 0x05, 0x01, 0x00 }, + { 0x03, 0x02, 0x09, 0x0C, 0x0B, 0x08, 0x07, 0x0D, + 0x0F, 0x0E, 0x0A, 0x06, 0x05, 0x04, 0x01, 0x00 }, +}; + +static const uint8_t tscc2_nc_vlc_lens[NUM_VLC_SETS][16] = { + { 1, 6, 6, 6, 6, 6, 6, 5, 3, 6, 6, 7, 7, 6, 4, 3 }, + { 6, 6, 6, 6, 6, 6, 5, 3, 6, 6, 6, 7, 7, 4, 3, 1 }, + { 6, 6, 5, 6, 6, 6, 6, 3, 6, 6, 6, 7, 7, 4, 3, 1 }, + { 5, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 7, 7, 4, 3, 1 }, + { 6, 6, 5, 6, 6, 6, 6, 3, 6, 6, 7, 7, 6, 4, 3, 1 }, + { 2, 6, 6, 6, 6, 4, 7, 7, 6, 8, 8, 7, 7, 7, 4, 1 }, + { 2, 6, 6, 6, 7, 7, 6, 6, 8, 8, 7, 7, 7, 4, 4, 1 }, + { 2, 7, 7, 6, 6, 6, 6, 8, 8, 7, 6, 7, 7, 4, 4, 1 }, + { 2, 7, 8, 8, 6, 6, 6, 7, 7, 6, 6, 7, 7, 4, 4, 1 }, + { 3, 3, 6, 6, 7, 7, 6, 6, 6, 6, 8, 9, 9, 7, 3, 1 }, + { 3, 3, 6, 7, 7, 6, 6, 6, 8, 9, 9, 7, 6, 6, 3, 1 }, + { 3, 3, 6, 7, 7, 6, 6, 6, 8, 9, 9, 7, 6, 6, 3, 1 }, + { 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] = { - 0x1000, 0xFF8, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1, - 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0, - 0xFD6, 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, 0xFC5, - 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB2, 0xFB1, - 0xFB0, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95, 0xF91, 0xF90, - 0xF83, 0xF81, 0xF80, 0xF73, 0xF71, 0xF70, 0xF61, 0xF60, - 0xF51, 0xF50, 0xF45, 0xF41, 0xF40, 0xF31, 0xF30, 0xF21, - 0xF20, 0xF10, 0xF00, 0xEF0, 0xEE0, 0xED5, 0xED1, 0xED0, - 0xEC0, 0xEB0, 0xEA0, 0xE90, 0xE80, 0xE70, 0xE60, 0xE50, - 0xE40, 0xE30, 0xE20, 0xE10, 0xE00, 0xDF0, 0xDE0, 0xDD0, - 0xDC0, 0xDB0, 0xDA0, 0xD90, 0xD80, 0xD60, 0xCD1, 0x280, - 0x270, 0x260, 0x250, 0x240, 0x230, 0x220, 0x210, 0x200, - 0x1F0, 0x1E0, 0x1D0, 0x1C0, 0x1B0, 0x1A1, 0x1A0, 0x190, - 0x180, 0x170, 0x160, 0x150, 0x140, 0x130, 0x121, 0x120, - 0x111, 0x110, 0x101, 0x100, 0x0F1, 0x0F0, 0x0E1, 0x0E0, - 0x0D1, 0x0D0, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A5, 0x0A1, - 0x0A0, 0x091, 0x090, 0x081, 0x080, 0x075, 0x071, 0x070, - 0x065, 0x063, 0x061, 0x060, 0x055, 0x053, 0x052, 0x051, - 0x050, 0x046, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, - 0x035, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, - 0x023, 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, - 0x013, 0x012, 0x011, 0x010, -}; - -static const uint16_t ac_vlc_desc0_codes[172] = { - 0x001F, 0x0D71, 0x013F, 0x006C, 0x00A7, 0x0067, 0x001C, 0x0008, - 0x0005, 0x06F1, 0x002C, 0x04BA, 0x0072, 0x01AA, 0x0002, 0x0006, - 0x06AC, 0x02AF, 0x06EF, 0x018F, 0x000A, 0x0009, 0x02AC, 0x042A, - 0x06E1, 0x068F, 0x00B1, 0x0000, 0x0317, 0x0C17, 0x0612, 0x010F, - 0x0011, 0x0FBA, 0x002A, 0x0172, 0x000C, 0x05AC, 0x03D7, 0x0037, - 0x0E8F, 0x02F2, 0x0041, 0x0BE1, 0x057F, 0x004A, 0x00AF, 0x006F, - 0x06AA, 0x0097, 0x0101, 0x0012, 0x0081, 0x0571, 0x0092, 0x0EAF, - 0x01BF, 0x00D7, 0x0031, 0x0001, 0x01F2, 0x0F17, 0x053A, 0x00BF, - 0x038F, 0x0217, 0x0371, 0x01F1, 0x01BA, 0x022A, 0x02BF, 0x028F, - 0x008F, 0x03F1, 0x00E1, 0x00BA, 0x00F2, 0x0EBF, 0x06AF, 0x048F, - 0x0FE1, 0x0271, 0x07BA, 0x0D3A, 0x0C12, 0x08AC, 0x0717, 0x00AC, - 0x0412, 0x0901, 0x04E1, 0x07E1, 0x0417, 0x0CAF, 0x04AC, 0x01AC, - 0x04F2, 0x03BA, 0x05D7, 0x07F1, 0x01D7, 0x04AF, 0x04EF, 0x03AC, - 0x00AA, 0x01E1, 0x0071, 0x00F1, 0x012C, 0x03EF, 0x082A, 0x0112, - 0x03E1, 0x01FA, 0x0DAC, 0x0131, 0x0E12, 0x000F, 0x0B17, 0x007F, - 0x0AEF, 0x007A, 0x02AA, 0x0061, 0x0671, 0x0027, 0x013A, 0x058F, - 0x00FF, 0x033A, 0x0032, 0x0301, 0x0021, 0x0C8F, 0x037F, 0x0077, - 0x02F1, 0x02E1, 0x003A, 0x003C, 0x0212, 0x0817, 0x0CE1, 0x003F, - 0x0007, 0x0017, 0x0501, 0x02BA, 0x06BF, 0x0057, 0x0010, 0x02EF, - 0x0117, 0x017F, 0x00EF, 0x006A, 0x0019, 0x0171, 0x01EF, 0x06BA, - 0x012A, 0x00FA, 0x0022, 0x000E, 0x0AE1, 0x01AF, 0x0052, 0x002F, - 0x004F, 0x001A, 0x0004, 0x0003, + 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, + 0x0120, 0x0F30, 0x0015, 0x0090, 0x0FE3, 0x0FA1, 0x0E00, 0x01F0, 0x0F81, + 0x0EE0, 0x0FD1, 0x0F70, 0x0FA3, 0x0121, 0x0FC5, 0x0E70, 0x0023, 0x0180, + 0x00C1, 0x0F51, 0x0FE2, 0x0031, 0x0012, 0x0061, 0x00A5, 0x0ED1, 0x0D90, + 0x0091, 0x0E10, 0x0FE4, 0x0043, 0x0024, 0x0E80, 0x01E0, 0x0DA0, 0x0FA5, + 0x00D0, 0x0022, 0x0110, 0x0FE0, 0x0020, 0x0EF0, 0x0F45, 0x0260, 0x0045, + 0x0081, 0x0F40, 0x0F80, 0x0080, 0x00C0, 0x0E20, 0x0250, 0x0052, 0x0063, + 0x0018, 0x0FC3, 0x0170, 0x0111, 0x0F73, 0x0240, 0x0DC0, 0x0FB0, 0x0F00, + 0x0100, 0x0FC1, 0x0160, 0x0DB0, 0x00B1, 0x0026, 0x0F31, 0x0FF8, 0x0EA0, + 0x0150, 0x0065, 0x0FE6, 0x0E90, 0x0E30, 0x01C0, 0x0FD0, 0x0030, 0x0FF0, + 0x0010, 0x0050, 0x00B0, 0x0FF4, 0x0FF3, 0x0046, 0x0053, 0x0230, 0x0FB3, + 0x0EB0, 0x0035, 0x0FB5, 0x00E1, 0x0CD1, 0x0ED5, 0x0F50, 0x0041, 0x0F10, + 0x01B0, 0x01D0, 0x0F91, 0x0F90, 0x0070, 0x00F0, 0x0FB1, 0x0E40, 0x0DD0, + 0x0075, 0x0E50, 0x0FC2, 0x0F83, 0x0FD2, 0x00A1, 0x0EC0, 0x0013, 0x0014, + 0x0F61, 0x01A1, 0x0220, 0x0FD5, 0x0DE0, 0x0F21, 0x0016, 0x0F60, 0x0032, + 0x01A0, 0x0036, 0x00D1, 0x0FD3, 0x0025, 0x0130, 0x1000, 0x0051, 0x0FF6, + 0x0ED0, 0x0E60, 0x0042, 0x0DF0, 0x0F20, 0x00E0, 0x0033, 0x0F71, 0x0071, + 0x00A0, }; -static const uint8_t ac_vlc_desc0_bits[172] = { - 6, 12, 9, 7, 8, 7, 6, 4, - 3, 11, 9, 11, 9, 9, 6, 4, - 11, 11, 11, 11, 7, 5, 11, 11, - 11, 12, 8, 5, 12, 12, 12, 9, - 6, 12, 12, 9, 6, 12, 10, 7, - 12, 10, 7, 12, 11, 7, 11, 8, - 11, 8, 12, 11, 8, 12, 8, 12, - 9, 9, 9, 9, 9, 12, 12, 10, - 10, 10, 10, 10, 10, 10, 11, 11, - 11, 11, 11, 11, 11, 12, 12, 12, - 12, 11, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 11, 11, - 11, 11, 11, 11, 11, 12, 11, 10, - 10, 10, 10, 10, 9, 10, 12, 9, - 12, 9, 12, 9, 12, 9, 12, 9, - 12, 8, 11, 8, 11, 8, 11, 11, - 8, 10, 7, 10, 7, 12, 10, 7, - 11, 12, 9, 6, 11, 12, 12, 9, - 6, 12, 11, 11, 12, 8, 5, 12, - 10, 11, 11, 7, 5, 11, 10, 11, - 9, 9, 6, 4, 12, 9, 7, 8, - 7, 6, 4, 3, +static const uint16_t ac_vlc_desc1_syms[169] = { + 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, + 0x0F40, 0x0FA0, 0x0026, 0x0EB0, 0x0EF1, 0x0DF0, 0x0053, 0x0F01, 0x01F0, + 0x0FC2, 0x0FF6, 0x0FF5, 0x0060, 0x0015, 0x0F85, 0x0DE1, 0x0032, 0x0100, + 0x0046, 0x0DB0, 0x0FB5, 0x0F81, 0x0FA1, 0x0012, 0x0011, 0x0FF1, 0x0FF2, + 0x0F00, 0x0E00, 0x0F21, 0x0F45, 0x0FD3, 0x0E60, 0x00C1, 0x0E80, 0x0035, + 0x0045, 0x0140, 0x0042, 0x0FB2, 0x0EB6, 0x0033, 0x0FC5, 0x0190, 0x0FE6, + 0x0024, 0x0F61, 0x0085, 0x0E33, 0x0E70, 0x0EC0, 0x00B0, 0x0F50, 0x0F80, + 0x0080, 0x0023, 0x0FE4, 0x01E0, 0x0F11, 0x0081, 0x0FC1, 0x0FD1, 0x0052, + 0x0FA5, 0x0F95, 0x0EC6, 0x00B1, 0x0111, 0x0061, 0x00F0, 0x0FE3, 0x0FE1, + 0x0021, 0x0041, 0x0FE2, 0x0055, 0x0FC6, 0x0E10, 0x0180, 0x0E20, 0x0DE0, + 0x0022, 0x0025, 0x0FB3, 0x0FA3, 0x0036, 0x0FC3, 0x00E0, 0x0FE0, 0x0020, + 0x0050, 0x0FB0, 0x1000, 0x0031, 0x01D0, 0x0018, 0x00A1, 0x0FB6, 0x00C6, + 0x0043, 0x0F10, 0x0F20, 0x0101, 0x0E30, 0x0FA6, 0x00F1, 0x0ED0, 0x0FD0, + 0x00A0, 0x0FD6, 0x0DA0, 0x0E31, 0x0120, 0x0130, 0x0170, 0x01C0, 0x00E1, + 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_desc1_syms[169] = { - 0x1000, 0xFF8, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1, - 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0, - 0xFD6, 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, 0xFC5, - 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, 0xFB2, - 0xFB1, 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95, - 0xF93, 0xF91, 0xF90, 0xF85, 0xF81, 0xF80, 0xF71, 0xF70, - 0xF61, 0xF60, 0xF51, 0xF50, 0xF45, 0xF41, 0xF40, 0xF31, - 0xF30, 0xF21, 0xF20, 0xF11, 0xF10, 0xF01, 0xF00, 0xEF1, - 0xEF0, 0xEE1, 0xEE0, 0xED0, 0xEC6, 0xEC0, 0xEB6, 0xEB0, - 0xEA0, 0xE90, 0xE80, 0xE70, 0xE60, 0xE50, 0xE40, 0xE33, - 0xE31, 0xE30, 0xE20, 0xE10, 0xE00, 0xDF0, 0xDE1, 0xDE0, - 0xDC0, 0xDB0, 0xDA0, 0x250, 0x240, 0x1F0, 0x1E0, 0x1D0, - 0x1C0, 0x1B0, 0x1A0, 0x190, 0x180, 0x170, 0x160, 0x150, - 0x140, 0x130, 0x120, 0x111, 0x110, 0x101, 0x100, 0x0F1, - 0x0F0, 0x0E1, 0x0E0, 0x0D1, 0x0D0, 0x0C6, 0x0C1, 0x0C0, - 0x0B1, 0x0B0, 0x0A1, 0x0A0, 0x095, 0x091, 0x090, 0x085, - 0x081, 0x080, 0x075, 0x071, 0x070, 0x065, 0x063, 0x061, - 0x060, 0x055, 0x053, 0x052, 0x051, 0x050, 0x046, 0x045, - 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, 0x033, 0x032, - 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, - 0x020, 0x018, 0x016, 0x015, 0x014, 0x013, 0x012, 0x011, - 0x010, -}; - -static const uint16_t ac_vlc_desc1_codes[169] = { - 0x0019, 0x027D, 0x0084, 0x0044, 0x009D, 0x003D, 0x000A, 0x0002, - 0x0003, 0x00EA, 0x02FD, 0x017A, 0x01C6, 0x00B6, 0x0026, 0x000E, - 0x0095, 0x0260, 0x032A, 0x0360, 0x0006, 0x0005, 0x05B6, 0x036A, - 0x06F6, 0x0704, 0x00FA, 0x0010, 0x0279, 0x04D4, 0x00F6, 0x066A, - 0x001D, 0x0029, 0x05F9, 0x0846, 0x04F6, 0x01D4, 0x0038, 0x0446, - 0x0160, 0x031D, 0x0075, 0x0054, 0x02D4, 0x005A, 0x05FD, 0x0040, - 0x06EA, 0x0055, 0x0460, 0x009A, 0x052A, 0x00A0, 0x00D8, 0x0380, - 0x017D, 0x092A, 0x00F9, 0x0D7A, 0x0179, 0x0304, 0x002A, 0x0104, - 0x01A0, 0x0780, 0x007D, 0x03F9, 0x0C46, 0x03EA, 0x0E6A, 0x0204, - 0x01FD, 0x051D, 0x02AA, 0x05EA, 0x00AA, 0x0080, 0x067D, 0x09EA, - 0x0C95, 0x09F9, 0x07B6, 0x0DB6, 0x012A, 0x0904, 0x0454, 0x0FB6, - 0x0960, 0x08D4, 0x0495, 0x0F80, 0x0560, 0x0B04, 0x057A, 0x0079, - 0x0795, 0x0E7D, 0x0060, 0x076A, 0x03B6, 0x0395, 0x0180, 0x02A0, - 0x006A, 0x0195, 0x0295, 0x0646, 0x03FD, 0x01F9, 0x0154, 0x0DF9, - 0x00C6, 0x0F95, 0x01F6, 0x0480, 0x0000, 0x0A79, 0x04AA, 0x00E0, - 0x0246, 0x001A, 0x0479, 0x0015, 0x0D60, 0x0280, 0x0018, 0x01EA, - 0x037A, 0x003A, 0x011D, 0x00FD, 0x0035, 0x0A7D, 0x04A0, 0x0146, - 0x0024, 0x01B6, 0x0504, 0x0046, 0x0020, 0x0009, 0x00D4, 0x03AA, - 0x0679, 0x026A, 0x0036, 0x0008, 0x02F6, 0x01AA, 0x016A, 0x0254, - 0x0039, 0x000D, 0x0004, 0x0176, 0x02EA, 0x007A, 0x0076, 0x0016, - 0x0001, 0x0879, 0x0058, 0x0014, 0x00D5, 0x005D, 0x0034, 0x000C, - 0x0007, +static const uint16_t ac_vlc_desc2_syms[165] = { + 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, + 0x0035, 0x0F10, 0x0EA1, 0x01B3, 0x0F36, 0x0FD5, 0x0FA1, 0x0F41, 0x0096, + 0x0EB3, 0x0F26, 0x0F16, 0x0FB6, 0x0FB5, 0x0160, 0x0FD6, 0x0F80, 0x0080, + 0x1000, 0x00B0, 0x0FE5, 0x0091, 0x0E90, 0x0241, 0x0231, 0x0FF5, 0x0015, + 0x0081, 0x0120, 0x0EA0, 0x0053, 0x0F51, 0x0FC2, 0x0F50, 0x0FF6, 0x0061, + 0x0EB1, 0x0018, 0x0FF8, 0x0240, 0x0042, 0x0085, 0x0EF1, 0x0FD1, 0x0FF2, + 0x0012, 0x0016, 0x0FD2, 0x0FC6, 0x0063, 0x00A5, 0x0F20, 0x0055, 0x0052, + 0x0E10, 0x0150, 0x00C1, 0x01D0, 0x0F95, 0x0032, 0x00E0, 0x01A0, 0x0EE1, + 0x0024, 0x0EF0, 0x0FC1, 0x0F60, 0x0031, 0x0190, 0x0F11, 0x0FB2, 0x0F21, + 0x0110, 0x0FC3, 0x0FE4, 0x0F01, 0x0095, 0x0FD3, 0x0FB3, 0x0E71, 0x0F61, + 0x0EB0, 0x0026, 0x00A0, 0x00D0, 0x0045, 0x00A1, 0x00B1, 0x0180, 0x01C0, + 0x0FF1, 0x0011, 0x0FB0, 0x0050, 0x0F90, 0x0041, 0x0033, 0x0F91, 0x0F30, + 0x0FE1, 0x0FE0, 0x0020, 0x0FD0, 0x0070, 0x0FE2, 0x0E50, 0x0FA3, 0x0F75, + 0x0EA3, 0x01B0, 0x0140, 0x0023, 0x0FE3, 0x0021, 0x0030, 0x0100, 0x0071, + 0x0FC5, 0x0EC0, 0x0F00, 0x0090, 0x0022, 0x0F06, 0x0F31, 0x0FA5, 0x00D1, + 0x0E60, 0x0075, 0x0F70, 0x0014, 0x0FF4, 0x0025, 0x0FB1, 0x0FE6, 0x0EE0, + 0x00C0, 0x0FF0, 0x0010, }; -static const uint8_t ac_vlc_desc1_bits[169] = { - 6, 12, 8, 7, 8, 7, 6, 4, - 3, 10, 10, 11, 9, 9, 6, 4, - 11, 10, 10, 10, 7, 5, 12, 11, - 11, 11, 8, 5, 12, 11, 11, 12, - 9, 6, 12, 12, 11, 9, 6, 12, - 12, 10, 7, 11, 10, 7, 11, 7, - 11, 8, 11, 8, 11, 11, 8, 11, - 9, 12, 9, 12, 9, 12, 9, 12, - 9, 12, 10, 10, 12, 10, 12, 10, - 11, 11, 10, 11, 11, 11, 12, 12, - 12, 12, 12, 12, 12, 12, 11, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 11, 11, 11, 11, 10, 10, - 10, 10, 10, 11, 10, 12, 9, 12, - 9, 12, 9, 11, 8, 12, 11, 8, - 11, 8, 11, 8, 12, 10, 7, 12, - 10, 7, 11, 10, 7, 12, 11, 9, - 6, 11, 11, 12, 8, 6, 12, 10, - 11, 11, 8, 5, 11, 10, 10, 10, - 7, 5, 10, 9, 11, 9, 9, 6, - 4, 12, 8, 7, 8, 7, 6, 4, - 3, +static const uint16_t ac_vlc_desc3_syms[162] = { + 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, + 0x0140, 0x0170, 0x0EF0, 0x0F50, 0x0F80, 0x00B0, 0x0F26, 0x00D1, 0x0065, + 0x0113, 0x0FF7, 0x0073, 0x01E1, 0x0EF3, 0x0F31, 0x0FB5, 0x0FC0, 0x0040, + 0x0080, 0x0FA1, 0x0FD3, 0x0075, 0x0F41, 0x0FD4, 0x0F83, 0x0EB0, 0x0061, + 0x0013, 0x0FF3, 0x0F10, 0x0F30, 0x0100, 0x0EB1, 0x0F93, 0x0130, 0x00D0, + 0x00A0, 0x00C1, 0x0F95, 0x0FB3, 0x0FC3, 0x0FE5, 0x0FF5, 0x0F81, 0x0F00, + 0x0091, 0x0F66, 0x01B1, 0x0F51, 0x0F60, 0x0FD1, 0x0180, 0x0FF8, 0x0076, + 0x0FB2, 0x0063, 0x0042, 0x0081, 0x0052, 0x0EE1, 0x0FC2, 0x0160, 0x0036, + 0x01D0, 0x0FD2, 0x0EA0, 0x0018, 0x0E80, 0x0FD5, 0x0070, 0x0F90, 0x0FB0, + 0x0015, 0x0032, 0x0123, 0x0F01, 0x0EE3, 0x0ED1, 0x00C0, 0x0FC1, 0x0FF2, + 0x0012, 0x0050, 0x00A1, 0x00F0, 0x0ED0, 0x0FC6, 0x0ED3, 0x01D1, 0x0120, + 0x0016, 0x0031, 0x0FF6, 0x0F40, 0x0EC0, 0x0E90, 0x0F91, 0x0041, 0x0EF1, + 0x0F61, 0x0035, 0x0FB1, 0x0FF1, 0x0011, 0x0FE0, 0x0020, 0x0FE1, 0x0090, + 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_desc2_syms[165] = { - 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, - 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, - 0xFE0, 0xFD6, 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, - 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, - 0xFB2, 0xFB1, 0xFB0, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95, - 0xF93, 0xF91, 0xF90, 0xF81, 0xF80, 0xF75, 0xF71, 0xF70, - 0xF61, 0xF60, 0xF51, 0xF50, 0xF41, 0xF40, 0xF36, 0xF31, - 0xF30, 0xF26, 0xF21, 0xF20, 0xF16, 0xF11, 0xF10, 0xF06, - 0xF01, 0xF00, 0xEF1, 0xEF0, 0xEE1, 0xEE0, 0xED0, 0xEC0, - 0xEB3, 0xEB1, 0xEB0, 0xEA3, 0xEA1, 0xEA0, 0xE90, 0xE81, - 0xE80, 0xE71, 0xE70, 0xE61, 0xE60, 0xE50, 0xE40, 0xE30, - 0xE10, 0xE00, 0x241, 0x240, 0x231, 0x1D0, 0x1C0, 0x1B3, - 0x1B0, 0x1A0, 0x190, 0x180, 0x170, 0x160, 0x150, 0x140, - 0x130, 0x120, 0x110, 0x100, 0x0F0, 0x0E0, 0x0D1, 0x0D0, - 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A5, 0x0A1, 0x0A0, 0x096, - 0x095, 0x091, 0x090, 0x086, 0x085, 0x081, 0x080, 0x075, - 0x071, 0x070, 0x065, 0x063, 0x061, 0x060, 0x055, 0x053, - 0x052, 0x051, 0x050, 0x045, 0x043, 0x042, 0x041, 0x040, - 0x036, 0x035, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, - 0x024, 0x023, 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, - 0x014, 0x013, 0x012, 0x011, 0x010, -}; - -static const uint16_t ac_vlc_desc2_codes[165] = { - 0x0034, 0x059C, 0x0280, 0x001C, 0x004C, 0x00BD, 0x0020, 0x003C, - 0x000A, 0x0003, 0x00FD, 0x008C, 0x0332, 0x01D5, 0x0055, 0x003E, - 0x0001, 0x07E4, 0x0264, 0x00B2, 0x00A2, 0x005C, 0x0005, 0x02A2, - 0x011D, 0x0132, 0x076C, 0x0012, 0x0018, 0x01E4, 0x05E4, 0x02B2, - 0x0432, 0x017D, 0x000E, 0x055D, 0x0955, 0x0164, 0x0028, 0x0D62, - 0x0B24, 0x02DE, 0x001E, 0x0340, 0x0014, 0x0555, 0x0180, 0x00DD, - 0x01B2, 0x0092, 0x036C, 0x00EC, 0x00E4, 0x00C0, 0x0C64, 0x095D, - 0x01DE, 0x0AE4, 0x0C32, 0x01A2, 0x06E4, 0x0832, 0x01A4, 0x015D, - 0x0732, 0x031D, 0x0F9C, 0x03E2, 0x09E2, 0x02FD, 0x0224, 0x051D, - 0x02E4, 0x019C, 0x05B2, 0x0355, 0x0064, 0x016C, 0x038C, 0x0880, - 0x0480, 0x06B2, 0x0540, 0x0080, 0x075D, 0x0155, 0x0424, 0x0680, - 0x0A62, 0x0A80, 0x078C, 0x0D9C, 0x0F8C, 0x0562, 0x0FF2, 0x0464, - 0x0B55, 0x01E2, 0x0032, 0x07F2, 0x0140, 0x03E4, 0x0662, 0x0755, - 0x0380, 0x026C, 0x0232, 0x001D, 0x0040, 0x00E2, 0x035D, 0x00F2, - 0x0162, 0x01FD, 0x03F2, 0x000C, 0x0EA2, 0x05F2, 0x0072, 0x04E4, - 0x0F32, 0x018C, 0x009D, 0x0324, 0x079C, 0x006C, 0x0054, 0x0F5D, - 0x021D, 0x0015, 0x0024, 0x06A2, 0x009C, 0x0004, 0x0062, 0x056C, - 0x0262, 0x0000, 0x002E, 0x01F2, 0x0124, 0x039C, 0x005E, 0x0010, - 0x0724, 0x00A4, 0x00DE, 0x0362, 0x0052, 0x000D, 0x03B2, 0x007D, - 0x05E2, 0x00D5, 0x005D, 0x0035, 0x0009, 0x099C, 0x0022, 0x002C, - 0x003D, 0x0008, 0x0002, 0x0006, 0x0007, +static const uint16_t ac_vlc_desc4_syms[131] = { + 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, + 0x0036, 0x00B1, 0x0130, 0x0018, 0x0F93, 0x0F50, 0x0041, 0x0FD5, 0x0100, + 0x0F51, 0x00B0, 0x0FE6, 0x0FC5, 0x0F40, 0x0FF2, 0x0FE0, 0x0012, 0x0FE1, + 0x0043, 0x0F61, 0x0FA3, 0x0140, 0x0120, 0x0FB1, 0x0051, 0x0EE0, 0x0F21, + 0x0066, 0x0F03, 0x0F01, 0x0060, 0x0016, 0x0FF6, 0x0FA0, 0x0020, 0x0FF1, + 0x0FD0, 0x0030, 0x0011, 0x0021, 0x0071, 0x00D0, 0x0FE4, 0x0024, 0x0F30, + 0x0080, 0x0123, 0x00A1, 0x0F71, 0x0F00, 0x0180, 0x0EC0, 0x00F3, 0x0F31, + 0x0EF0, 0x0033, 0x0014, 0x0FC0, 0x0F80, 0x0FE3, 0x0FE2, 0x0025, 0x0FC3, + 0x00F0, 0x0053, 0x0075, 0x0F66, 0x0FF4, 0x0040, 0x0F60, 0x0022, 0x00A0, + 0x0ED0, 0x0F13, 0x0181, 0x0F76, 0x0F23, 0x0045, 0x1000, 0x0023, 0x00C0, + 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 uint8_t ac_vlc_desc2_bits[165] = { - 6, 12, 12, 8, 7, 8, 6, 6, - 4, 3, 10, 9, 11, 9, 9, 6, - 4, 11, 10, 10, 10, 7, 5, 11, - 11, 10, 11, 8, 5, 11, 11, 11, - 12, 9, 6, 11, 12, 9, 6, 12, - 12, 10, 7, 10, 7, 11, 10, 8, - 11, 8, 11, 8, 11, 8, 12, 12, - 9, 12, 12, 9, 11, 12, 9, 12, - 12, 10, 12, 10, 12, 10, 10, 11, - 12, 12, 11, 12, 11, 11, 11, 12, - 11, 11, 11, 12, 12, 12, 11, 11, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 11, 11, 11, 11, - 10, 10, 10, 10, 9, 9, 11, 9, - 11, 9, 11, 8, 12, 11, 8, 11, - 12, 10, 8, 12, 12, 10, 7, 12, - 10, 7, 11, 12, 9, 6, 10, 11, - 12, 8, 6, 11, 10, 11, 8, 5, - 11, 9, 10, 10, 7, 5, 10, 9, - 11, 9, 9, 6, 4, 12, 8, 7, - 8, 6, 6, 4, 3, +static const uint16_t ac_vlc_desc5_syms[132] = { + 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, + 0x0FD1, 0x0FE3, 0x0FC1, 0x0FF3, 0x0013, 0x0052, 0x0F85, 0x0F51, 0x0046, + 0x0065, 0x0F21, 0x0F30, 0x0041, 0x0031, 0x0034, 0x0FD4, 0x0F43, 0x0032, + 0x0FB5, 0x0FD2, 0x0FE5, 0x0EE0, 0x0120, 0x0F23, 0x0F00, 0x0015, 0x0FE1, + 0x0FE0, 0x0020, 0x1000, 0x0081, 0x0018, 0x0075, 0x0043, 0x00C3, 0x0121, + 0x00A0, 0x0080, 0x0FA0, 0x0060, 0x0FD0, 0x0030, 0x0FF2, 0x0012, 0x0FF1, + 0x0F80, 0x0F91, 0x0141, 0x00A1, 0x0F96, 0x0FB1, 0x00C0, 0x0111, 0x0F66, + 0x00F0, 0x0F40, 0x0FE6, 0x0016, 0x0021, 0x0FC0, 0x0051, 0x00E0, 0x0F86, + 0x0033, 0x0FF6, 0x0F75, 0x0F11, 0x0055, 0x0F61, 0x0FA3, 0x0131, 0x0FD5, + 0x0FA1, 0x0FC3, 0x0024, 0x0056, 0x0FD6, 0x0F60, 0x0011, 0x0040, 0x0025, + 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_desc3_syms[162] = { - 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, - 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, - 0xFE0, 0xFD6, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, - 0xFC6, 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, - 0xFB2, 0xFB1, 0xFB0, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95, - 0xF93, 0xF91, 0xF90, 0xF85, 0xF83, 0xF81, 0xF80, 0xF71, - 0xF70, 0xF66, 0xF61, 0xF60, 0xF56, 0xF51, 0xF50, 0xF46, - 0xF41, 0xF40, 0xF36, 0xF31, 0xF30, 0xF26, 0xF21, 0xF20, - 0xF11, 0xF10, 0xF01, 0xF00, 0xEF3, 0xEF1, 0xEF0, 0xEE3, - 0xEE1, 0xEE0, 0xED3, 0xED1, 0xED0, 0xEC1, 0xEC0, 0xEB1, - 0xEB0, 0xEA0, 0xE90, 0xE80, 0xE70, 0x1E1, 0x1D1, 0x1D0, - 0x1C1, 0x1B1, 0x1A1, 0x180, 0x170, 0x163, 0x160, 0x150, - 0x140, 0x130, 0x123, 0x120, 0x113, 0x110, 0x100, 0x0F0, - 0x0E0, 0x0D1, 0x0D0, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A1, - 0x0A0, 0x095, 0x091, 0x090, 0x085, 0x081, 0x080, 0x076, - 0x075, 0x073, 0x071, 0x070, 0x066, 0x065, 0x063, 0x061, - 0x060, 0x055, 0x053, 0x052, 0x051, 0x050, 0x045, 0x043, - 0x042, 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, - 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, - 0x020, 0x018, 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, - 0x011, 0x010, -}; - -static const uint16_t ac_vlc_desc3_codes[162] = { - 0x001D, 0x087C, 0x0AE8, 0x003A, 0x001C, 0x0008, 0x000C, 0x0032, - 0x0006, 0x0003, 0x03A5, 0x01EC, 0x01A5, 0x0080, 0x0030, 0x0005, - 0x0001, 0x0040, 0x03FC, 0x02D4, 0x0154, 0x02FC, 0x003C, 0x0015, - 0x051A, 0x0000, 0x02EC, 0x077C, 0x00D2, 0x0018, 0x03E8, 0x04EC, - 0x027C, 0x01FA, 0x0022, 0x0765, 0x0EA5, 0x0054, 0x0010, 0x08EC, - 0x0AAC, 0x03BA, 0x0042, 0x065D, 0x0AD4, 0x005C, 0x0028, 0x03C0, - 0x00E5, 0x035C, 0x04FA, 0x00DC, 0x06A5, 0x075C, 0x00C8, 0x05A5, - 0x04D4, 0x00BA, 0x01C0, 0x05E8, 0x012C, 0x00E8, 0x01B0, 0x00B0, - 0x025D, 0x002C, 0x0A52, 0x025C, 0x01E8, 0x00FA, 0x0348, 0x0652, - 0x0B7C, 0x0365, 0x031A, 0x0E52, 0x011A, 0x0200, 0x01BA, 0x02AC, - 0x06D4, 0x01FC, 0x05BA, 0x0DFC, 0x0248, 0x0EE8, 0x0B1A, 0x0CFC, - 0x0F65, 0x0B5C, 0x0DC0, 0x007C, 0x0548, 0x08A5, 0x00FC, 0x03B0, - 0x0148, 0x06AC, 0x0252, 0x071A, 0x02E8, 0x0240, 0x00AC, 0x021A, - 0x0140, 0x08E8, 0x01AC, 0x00EC, 0x0152, 0x00A5, 0x0068, 0x001A, - 0x006C, 0x05C0, 0x015C, 0x0025, 0x05B0, 0x017C, 0x0014, 0x047C, - 0x00D4, 0x06E8, 0x00C0, 0x0002, 0x0A5D, 0x04E8, 0x0A7C, 0x01D4, - 0x0020, 0x04A5, 0x07B0, 0x037C, 0x015D, 0x002A, 0x005D, 0x0048, - 0x067C, 0x007A, 0x0004, 0x04FC, 0x02FA, 0x0648, 0x0100, 0x0052, - 0x005A, 0x000D, 0x0165, 0x0065, 0x02A5, 0x0070, 0x00F0, 0x003D, - 0x0009, 0x05FC, 0x0E48, 0x009A, 0x0012, 0x00DD, 0x0034, 0x000A, - 0x000E, 0x0007, +static const uint16_t ac_vlc_desc6_syms[130] = { + 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, + 0x0110, 0x0F41, 0x0F93, 0x0FF8, 0x0081, 0x0FF5, 0x0041, 0x0FD2, 0x0F30, + 0x0F81, 0x00B1, 0x00E1, 0x0F00, 0x0031, 0x0060, 0x0035, 0x0F51, 0x0FB5, + 0x0FE3, 0x0FF3, 0x0013, 0x0FE0, 0x0032, 0x0075, 0x0FD4, 0x0046, 0x0F40, + 0x0F91, 0x0FE5, 0x00B3, 0x00C3, 0x0EE1, 0x0F31, 0x0FA0, 0x0FE1, 0x0FD0, + 0x0020, 0x0030, 0x0F10, 0x00A1, 0x0FA3, 0x0033, 0x0111, 0x0FA6, 0x0100, + 0x0F61, 0x0026, 0x0FB1, 0x0061, 0x0025, 0x0F95, 0x0FD6, 0x0036, 0x0034, + 0x0F20, 0x00B0, 0x0121, 0x0018, 0x0131, 0x0051, 0x0FF2, 0x0040, 0x0021, + 0x0FC0, 0x0015, 0x0090, 0x0043, 0x0FC5, 0x0056, 0x0055, 0x0016, 0x0FF1, + 0x0011, 0x0012, 0x0FF6, 0x0F50, 0x0FC2, 0x0053, 0x0F76, 0x0F85, 0x0FD3, + 0x0091, 0x0101, 0x0071, 0x0070, 0x0F90, 0x0FB0, 0x0FC3, 0x0065, 0x00F1, + 0x0F53, 0x00D0, 0x0FE2, 0x0FA1, 0x0024, 0x0FE4, 0x0022, 0x0050, 0x0FE6, + 0x0FD5, 0x0F70, 0x0014, 0x0FF0, }; -static const uint8_t ac_vlc_desc3_bits[162] = { - 7, 12, 12, 8, 7, 7, 6, 6, - 4, 3, 10, 9, 11, 8, 8, 6, - 4, 10, 10, 12, 9, 10, 7, 5, - 11, 10, 10, 11, 8, 5, 10, 11, - 12, 9, 6, 12, 12, 9, 6, 12, - 12, 10, 7, 11, 12, 10, 7, 10, - 8, 12, 11, 8, 12, 11, 8, 11, - 11, 9, 11, 11, 9, 12, 11, 9, - 12, 9, 12, 10, 11, 11, 10, 12, - 12, 11, 12, 12, 11, 10, 11, 12, - 11, 11, 11, 12, 11, 12, 12, 12, - 12, 12, 12, 12, 11, 12, 11, 11, - 11, 11, 12, 11, 12, 10, 10, 10, - 9, 12, 9, 12, 9, 12, 8, 10, - 8, 12, 10, 8, 11, 10, 7, 11, - 11, 12, 9, 7, 12, 11, 12, 9, - 6, 11, 11, 12, 9, 6, 10, 10, - 11, 8, 5, 12, 10, 12, 9, 10, - 7, 5, 10, 9, 11, 8, 8, 6, - 4, 12, 12, 8, 7, 8, 6, 6, - 4, 3, +static const uint16_t ac_vlc_desc7_syms[125] = { + 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, + 0x0FF4, 0x0FC1, 0x0023, 0x0031, 0x0060, 0x0FA0, 0x0061, 0x00B0, 0x00C3, + 0x0F00, 0x0121, 0x0F80, 0x0FF5, 0x0041, 0x0FF8, 0x0100, 0x0032, 0x0090, + 0x0F81, 0x0F30, 0x0045, 0x0F61, 0x00C0, 0x0063, 0x0FD4, 0x0055, 0x0F70, + 0x0FF3, 0x0FD0, 0x0030, 0x0FE0, 0x0020, 0x0013, 0x0FE1, 0x0FE3, 0x0FB1, + 0x0093, 0x00B1, 0x0026, 0x0F10, 0x00F0, 0x0FA5, 0x0FB5, 0x0070, 0x0F90, + 0x0FC0, 0x0040, 0x0033, 0x0F40, 0x0FE5, 0x00A1, 0x0034, 0x0036, 0x0F96, + 0x0F91, 0x0043, 0x0F01, 0x0053, 0x0FC5, 0x0035, 0x0F51, 0x00A3, 0x0FC2, + 0x0FA3, 0x0F50, 0x00F1, 0x0071, 0x0051, 0x0021, 0x0FF2, 0x0FF1, 0x0012, + 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_desc4_syms[131] = { - 0x1000, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1, 0xFF0, - 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0, 0xFD6, - 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, 0xFC3, 0xFC2, - 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, 0xFB0, 0xFA5, 0xFA3, - 0xFA1, 0xFA0, 0xF93, 0xF91, 0xF90, 0xF81, 0xF80, 0xF76, - 0xF71, 0xF70, 0xF66, 0xF61, 0xF60, 0xF56, 0xF51, 0xF50, - 0xF41, 0xF40, 0xF31, 0xF30, 0xF23, 0xF21, 0xF20, 0xF13, - 0xF11, 0xF10, 0xF03, 0xF01, 0xF00, 0xEF1, 0xEF0, 0xEE0, - 0xED0, 0xEC0, 0xEB0, 0x191, 0x181, 0x180, 0x171, 0x161, - 0x140, 0x130, 0x123, 0x120, 0x110, 0x100, 0x0F3, 0x0F0, - 0x0E0, 0x0D0, 0x0C0, 0x0B1, 0x0B0, 0x0A1, 0x0A0, 0x091, - 0x090, 0x085, 0x081, 0x080, 0x075, 0x071, 0x070, 0x066, - 0x065, 0x063, 0x061, 0x060, 0x056, 0x055, 0x053, 0x051, - 0x050, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, - 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, - 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, 0x013, - 0x012, 0x011, 0x010, -}; - -static const uint16_t ac_vlc_desc4_codes[131] = { - 0x006B, 0x00BE, 0x0052, 0x00F3, 0x005B, 0x003A, 0x0009, 0x0007, - 0x00DA, 0x03FB, 0x0123, 0x00B3, 0x01B3, 0x002E, 0x0006, 0x030A, - 0x005A, 0x004A, 0x034A, 0x0072, 0x0005, 0x02DA, 0x0173, 0x04FB, - 0x0032, 0x0013, 0x039B, 0x0B9B, 0x011E, 0x0002, 0x00FB, 0x021E, - 0x009B, 0x007E, 0x0E1A, 0x03CA, 0x007B, 0x02FB, 0x0033, 0x03AB, - 0x0463, 0x008A, 0x0773, 0x041E, 0x002B, 0x031B, 0x065A, 0x011A, - 0x060A, 0x01DA, 0x0963, 0x0323, 0x0BAB, 0x059E, 0x010A, 0x05AB, - 0x0CFB, 0x071B, 0x079E, 0x0F9E, 0x0263, 0x079B, 0x0563, 0x019E, - 0x01AB, 0x0E63, 0x029B, 0x04CA, 0x0DAB, 0x0663, 0x0B1B, 0x020A, - 0x0A1E, 0x021A, 0x0063, 0x061E, 0x06FB, 0x025A, 0x0163, 0x0573, - 0x000A, 0x0223, 0x011B, 0x0C1A, 0x015A, 0x0863, 0x00AB, 0x02CA, - 0x00B2, 0x0A0A, 0x01CA, 0x00A3, 0x0B73, 0x0023, 0x0012, 0x039E, - 0x001A, 0x0CCA, 0x01FB, 0x005E, 0x0A9B, 0x00CA, 0x0373, 0x009E, - 0x0022, 0x07AB, 0x001E, 0x0EFB, 0x009A, 0x000B, 0x041A, 0x019B, - 0x0363, 0x014A, 0x006A, 0x0015, 0x069B, 0x0073, 0x0523, 0x001B, - 0x012B, 0x0003, 0x0001, 0x061A, 0x003E, 0x002A, 0x00E3, 0x003B, - 0x000E, 0x000D, 0x0000, +static const uint16_t ac_vlc_desc8_syms[121] = { + 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, + 0x0F81, 0x0FB3, 0x0111, 0x0073, 0x0023, 0x0FC1, 0x0FE4, 0x0024, 0x0081, + 0x0FA5, 0x0032, 0x0014, 0x0FF4, 0x0FD0, 0x0030, 0x0041, 0x0070, 0x0FF5, + 0x00E1, 0x0061, 0x0F73, 0x0063, 0x0F41, 0x00B3, 0x0FD5, 0x00F1, 0x0017, + 0x0FF7, 0x00A0, 0x0055, 0x00C1, 0x0F30, 0x0043, 0x0FD4, 0x0065, 0x0FF8, + 0x0FB1, 0x1000, 0x0020, 0x0FE0, 0x0040, 0x0FC0, 0x0FE1, 0x0FF3, 0x0013, + 0x0FE3, 0x0FA3, 0x0083, 0x0F96, 0x00D1, 0x0026, 0x0033, 0x0101, 0x00B1, + 0x0FB6, 0x0F90, 0x0080, 0x00E0, 0x0071, 0x0034, 0x0FC2, 0x0F20, 0x00A1, + 0x0021, 0x0050, 0x00B0, 0x0F71, 0x0FC5, 0x0F91, 0x0F80, 0x0035, 0x0F63, + 0x0053, 0x00C0, 0x0FF1, 0x0FF2, 0x0FB0, 0x0016, 0x0FB5, 0x0F51, 0x0091, + 0x0F21, 0x0FD3, 0x0FC3, 0x00D0, 0x0F83, 0x0F61, 0x0012, 0x0015, 0x0051, + 0x0FE5, 0x0FF6, 0x0011, 0x0FF0, }; -static const uint8_t ac_vlc_desc4_bits[131] = { - 7, 8, 7, 8, 7, 6, 4, 3, - 10, 10, 11, 9, 9, 6, 4, 10, - 10, 9, 10, 7, 5, 10, 11, 12, - 8, 6, 12, 12, 9, 6, 11, 12, - 10, 7, 12, 10, 8, 11, 8, 12, - 11, 8, 11, 11, 9, 12, 11, 9, - 11, 9, 12, 10, 12, 11, 10, 12, - 12, 11, 12, 12, 11, 11, 11, 11, - 11, 12, 12, 12, 12, 12, 12, 12, - 12, 11, 12, 11, 12, 11, 12, 11, - 10, 10, 10, 12, 9, 12, 9, 10, - 8, 12, 10, 8, 12, 10, 7, 11, - 11, 12, 10, 7, 12, 11, 12, 9, - 6, 11, 11, 12, 8, 6, 12, 10, - 10, 10, 7, 5, 11, 9, 11, 9, - 9, 6, 4, 12, 8, 7, 8, 7, - 6, 4, 2, +static const uint16_t ac_vlc_desc9_syms[114] = { + 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, + 0x0023, 0x0F70, 0x0083, 0x0061, 0x0031, 0x0025, 0x0FA5, 0x0FB3, 0x0032, + 0x0FD5, 0x0081, 0x0F61, 0x0FE4, 0x0F21, 0x0073, 0x0F73, 0x0024, 0x0041, + 0x0030, 0x0FD0, 0x0014, 0x0FF4, 0x0040, 0x0FE0, 0x0FC0, 0x0080, 0x0043, + 0x00E1, 0x00D1, 0x0FE3, 0x1000, 0x0F90, 0x0FE1, 0x0FB1, 0x0026, 0x0FD4, + 0x0063, 0x0034, 0x0FA3, 0x00A3, 0x0F80, 0x0F40, 0x0017, 0x0FF7, 0x0F83, + 0x0FF5, 0x0020, 0x0050, 0x0FB0, 0x0021, 0x0013, 0x0FF3, 0x0FF1, 0x0F51, + 0x0093, 0x0FF8, 0x0F91, 0x0F50, 0x0071, 0x00B1, 0x0051, 0x0033, 0x0090, + 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_desc5_syms[132] = { - 0x1000, 0xFF8, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1, - 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0, - 0xFD6, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, - 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, 0xFB0, - 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF93, 0xF91, 0xF90, 0xF86, - 0xF85, 0xF81, 0xF80, 0xF76, 0xF75, 0xF71, 0xF70, 0xF66, - 0xF61, 0xF60, 0xF51, 0xF50, 0xF43, 0xF41, 0xF40, 0xF33, - 0xF31, 0xF30, 0xF23, 0xF21, 0xF20, 0xF11, 0xF10, 0xF00, - 0xEF0, 0xEE0, 0xEC1, 0xEC0, 0x151, 0x141, 0x140, 0x131, - 0x121, 0x120, 0x111, 0x110, 0x103, 0x100, 0x0F0, 0x0E0, - 0x0D3, 0x0D0, 0x0C3, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A1, - 0x0A0, 0x091, 0x090, 0x081, 0x080, 0x075, 0x071, 0x070, - 0x065, 0x061, 0x060, 0x056, 0x055, 0x053, 0x052, 0x051, - 0x050, 0x046, 0x045, 0x043, 0x042, 0x041, 0x040, 0x035, - 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, - 0x023, 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, - 0x013, 0x012, 0x011, 0x010, -}; - -static const uint16_t ac_vlc_desc5_codes[132] = { - 0x0001, 0x0D62, 0x00BD, 0x0022, 0x009B, 0x0032, 0x0019, 0x0005, - 0x0007, 0x034D, 0x009A, 0x012B, 0x0052, 0x006B, 0x003A, 0x0006, - 0x06FD, 0x017D, 0x081A, 0x031B, 0x031A, 0x0012, 0x0011, 0x0202, - 0x00FD, 0x051B, 0x00D2, 0x001D, 0x011A, 0x0782, 0x018D, 0x007B, - 0x067D, 0x037D, 0x0021, 0x0E8D, 0x0562, 0x008D, 0x00BB, 0x053D, - 0x082A, 0x0002, 0x000D, 0x0302, 0x007D, 0x053B, 0x003B, 0x0A4D, - 0x027D, 0x01FD, 0x042A, 0x01C2, 0x041A, 0x0182, 0x014D, 0x0162, - 0x00C2, 0x032A, 0x0D9A, 0x012A, 0x0102, 0x087D, 0x072B, 0x039A, - 0x0362, 0x019A, 0x0C62, 0x04C2, 0x0D1B, 0x028D, 0x0762, 0x0E7D, - 0x0E41, 0x059A, 0x024D, 0x093B, 0x052B, 0x011B, 0x064D, 0x013D, - 0x0382, 0x0262, 0x0641, 0x0462, 0x004D, 0x0CC2, 0x033B, 0x068D, - 0x0141, 0x0D2B, 0x001B, 0x0041, 0x00C1, 0x0C41, 0x01E2, 0x00EB, - 0x062A, 0x0082, 0x0061, 0x02FD, 0x047D, 0x013B, 0x002A, 0x003D, - 0x005B, 0x022A, 0x02C2, 0x0241, 0x0062, 0x00AA, 0x000B, 0x00E2, - 0x001A, 0x033D, 0x021A, 0x006A, 0x0009, 0x032B, 0x002B, 0x04FD, - 0x0042, 0x016B, 0x002D, 0x000E, 0x0441, 0x00CD, 0x005A, 0x00AB, - 0x000A, 0x0039, 0x0003, 0x0000, +static const uint16_t ac_vlc_descA_syms[110] = { + 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, + 0x0FC5, 0x0031, 0x0FF6, 0x1000, 0x0FD5, 0x0F91, 0x0FC1, 0x0032, 0x0F41, + 0x00B0, 0x00B1, 0x0081, 0x0FB2, 0x0F96, 0x0FD0, 0x0030, 0x0040, 0x0025, + 0x0F81, 0x0F70, 0x0FE3, 0x0FB6, 0x00A0, 0x0018, 0x0FA3, 0x0F31, 0x0FE0, + 0x0FC0, 0x0FB0, 0x0050, 0x0FE1, 0x0014, 0x0F80, 0x0FE6, 0x0FE4, 0x0043, + 0x0083, 0x0024, 0x0FB1, 0x0020, 0x0FF4, 0x0041, 0x0F50, 0x0FF8, 0x0F93, + 0x00C1, 0x0033, 0x0021, 0x0FF5, 0x0060, 0x0063, 0x0034, 0x0FD4, 0x0FC2, + 0x0071, 0x0FC6, 0x0093, 0x0045, 0x0FA6, 0x00C0, 0x0013, 0x0FF1, 0x0FF3, + 0x0F71, 0x00E1, 0x0F40, 0x0FC3, 0x0FB5, 0x0070, 0x0042, 0x0F61, 0x0F83, + 0x0FF7, 0x0017, 0x0FD2, 0x0036, 0x0FD3, 0x0016, 0x0FA0, 0x0FF2, 0x0012, + 0x0011, 0x0FF0, }; -static const uint8_t ac_vlc_desc5_bits[132] = { - 7, 12, 8, 7, 8, 6, 6, 4, - 3, 10, 9, 11, 8, 9, 6, 4, - 11, 10, 12, 10, 10, 7, 5, 10, - 11, 12, 8, 6, 10, 11, 9, 7, - 12, 10, 7, 12, 12, 10, 8, 11, - 12, 10, 8, 10, 12, 11, 9, 12, - 11, 9, 11, 9, 11, 10, 10, 11, - 11, 10, 12, 10, 10, 12, 11, 10, - 11, 11, 12, 12, 12, 11, 11, 12, - 12, 12, 12, 12, 12, 11, 11, 11, - 11, 10, 12, 12, 10, 12, 10, 12, - 9, 12, 9, 11, 8, 12, 9, 8, - 11, 9, 7, 11, 11, 12, 12, 9, - 7, 11, 10, 11, 11, 8, 6, 9, - 12, 10, 10, 7, 5, 11, 9, 11, - 8, 9, 6, 4, 12, 8, 7, 8, - 6, 6, 4, 2, +static const uint16_t ac_vlc_descB_syms[101] = { + 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, + 0x0FB6, 0x0F70, 0x0F91, 0x0025, 0x1000, 0x0FE1, 0x00A1, 0x0FA3, 0x00F1, + 0x0F61, 0x0F51, 0x0081, 0x00C1, 0x0018, 0x0060, 0x0041, 0x0073, 0x0FE4, + 0x0F80, 0x0FE0, 0x0020, 0x0021, 0x0FC5, 0x0055, 0x0042, 0x0026, 0x0070, + 0x0024, 0x0043, 0x00A0, 0x0033, 0x0FF8, 0x0071, 0x0014, 0x0FF4, 0x0FB1, + 0x0FB5, 0x0034, 0x0F41, 0x0036, 0x0F90, 0x0FC6, 0x0090, 0x0FF5, 0x0FA0, + 0x0FD4, 0x0F83, 0x0083, 0x0051, 0x00B1, 0x0FD3, 0x0FF1, 0x0013, 0x0FF3, + 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_desc6_syms[130] = { - 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, - 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, - 0xFE0, 0xFD6, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, - 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, - 0xFB0, 0xFA6, 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF95, 0xF93, - 0xF91, 0xF90, 0xF86, 0xF85, 0xF81, 0xF80, 0xF76, 0xF71, - 0xF70, 0xF63, 0xF61, 0xF60, 0xF53, 0xF51, 0xF50, 0xF43, - 0xF41, 0xF40, 0xF31, 0xF30, 0xF20, 0xF10, 0xF00, 0xEF0, - 0xEE1, 0x131, 0x121, 0x120, 0x111, 0x110, 0x101, 0x100, - 0x0F1, 0x0F0, 0x0E3, 0x0E1, 0x0E0, 0x0D1, 0x0D0, 0x0C3, - 0x0C0, 0x0B3, 0x0B1, 0x0B0, 0x0A1, 0x0A0, 0x091, 0x090, - 0x081, 0x080, 0x075, 0x071, 0x070, 0x065, 0x063, 0x061, - 0x060, 0x056, 0x055, 0x053, 0x051, 0x050, 0x046, 0x045, - 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, - 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, - 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, 0x013, 0x012, - 0x011, 0x010, -}; - -static const uint16_t ac_vlc_desc6_codes[130] = { - 0x0022, 0x0BB2, 0x0942, 0x002B, 0x0072, 0x0002, 0x001A, 0x0039, - 0x000D, 0x0007, 0x007B, 0x008E, 0x06DB, 0x00EA, 0x015B, 0x002E, - 0x0006, 0x0959, 0x027B, 0x0A0E, 0x01AB, 0x008A, 0x0012, 0x001E, - 0x0575, 0x005B, 0x02AB, 0x00C2, 0x0015, 0x036A, 0x04B2, 0x0099, - 0x001B, 0x0519, 0x0C19, 0x00DB, 0x004E, 0x0042, 0x0159, 0x03B2, - 0x030E, 0x00EB, 0x0252, 0x0EAB, 0x018A, 0x00E2, 0x06AB, 0x0242, - 0x017B, 0x0452, 0x0319, 0x0152, 0x025B, 0x016A, 0x00AB, 0x0052, - 0x05B2, 0x010E, 0x038E, 0x028A, 0x0359, 0x0019, 0x078A, 0x0C52, - 0x0D8E, 0x0ED9, 0x02D9, 0x0662, 0x0119, 0x09B2, 0x0BAB, 0x0D19, - 0x0C5B, 0x00B2, 0x0542, 0x0B8A, 0x02B2, 0x0142, 0x065B, 0x058E, - 0x0062, 0x018E, 0x038A, 0x00D9, 0x0419, 0x0162, 0x03AB, 0x0075, - 0x07B2, 0x0032, 0x020E, 0x07AB, 0x006B, 0x045B, 0x01B2, 0x0199, - 0x002A, 0x0375, 0x0775, 0x0AAB, 0x01D9, 0x003B, 0x060E, 0x0342, - 0x0175, 0x0262, 0x000A, 0x0005, 0x0559, 0x006A, 0x0D59, 0x0219, - 0x000E, 0x004A, 0x0009, 0x0719, 0x0059, 0x02DB, 0x00D2, 0x01DB, - 0x0025, 0x0001, 0x06D9, 0x00F5, 0x0035, 0x00FB, 0x003A, 0x000B, - 0x0003, 0x0000, +static const uint16_t ac_vlc_descC_syms[96] = { + 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, + 0x00A0, 0x0060, 0x0031, 0x0041, 0x0FE3, 0x0FD5, 0x0091, 0x0053, 0x0FF8, + 0x0FA0, 0x0FF6, 0x0FB0, 0x0070, 0x0080, 0x1000, 0x0FE1, 0x0FE0, 0x0020, + 0x0021, 0x0063, 0x0033, 0x0FA1, 0x0F60, 0x0F61, 0x0043, 0x0073, 0x0FC6, + 0x0FE4, 0x00E1, 0x0034, 0x0018, 0x0F91, 0x0F80, 0x0024, 0x0026, 0x0014, + 0x0FF4, 0x0FB1, 0x0FB6, 0x0071, 0x0FA6, 0x0FD4, 0x0035, 0x0F70, 0x0036, + 0x0051, 0x0FF5, 0x0FF1, 0x0FD3, 0x0045, 0x0F81, 0x0F90, 0x0083, 0x0081, + 0x0FA3, 0x0FE2, 0x0FC5, 0x0F51, 0x0F71, 0x0FD2, 0x0FB3, 0x0FC2, 0x0025, + 0x0016, 0x0013, 0x0FF3, 0x0FF2, 0x0011, 0x0FF0, }; -static const uint8_t ac_vlc_desc6_bits[130] = { - 7, 12, 12, 8, 7, 7, 6, 6, - 4, 3, 10, 9, 11, 8, 9, 6, - 4, 12, 10, 12, 10, 10, 7, 5, - 11, 11, 12, 8, 6, 10, 11, 9, - 7, 12, 12, 10, 7, 10, 12, 12, - 10, 8, 10, 12, 10, 8, 12, 10, - 9, 12, 11, 9, 11, 10, 10, 11, - 11, 10, 10, 10, 10, 11, 11, 12, - 12, 12, 11, 11, 11, 12, 12, 12, - 12, 11, 11, 12, 10, 12, 11, 12, - 10, 11, 12, 10, 12, 9, 12, 9, - 11, 8, 12, 11, 8, 12, 12, 9, - 7, 11, 11, 12, 9, 7, 11, 10, - 11, 11, 8, 6, 12, 9, 12, 10, - 10, 7, 5, 11, 9, 11, 8, 9, - 6, 4, 12, 8, 7, 8, 6, 6, - 4, 2, +static const uint8_t ac_vlc_desc0_bits[172] = { + 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, + 10, 11, 11, 11, 11, 10, 11, 12, 12, 8, 9, 9, 4, 4, 9, 12, 12, 11, + 10, 8, 7, 7, 8, 11, 12, 12, 12, 12, 11, 10, 12, 12, 12, 12, 6, 9, + 9, 8, 10, 11, 11, 11, 12, 12, 10, 10, 11, 11, 10, 11, 11, 5, 5, 3, + 3, 6, 8, 8, 7, 12, 12, 12, 12, 10, 10, 12, 12, 12, 12, 8, 8, 9, + 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 uint16_t ac_vlc_desc7_syms[125] = { - 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, - 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, - 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, - 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, 0xFB0, - 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF95, 0xF93, - 0xF91, 0xF90, 0xF86, 0xF81, 0xF80, 0xF73, 0xF71, 0xF70, - 0xF63, 0xF61, 0xF60, 0xF53, 0xF51, 0xF50, 0xF41, 0xF40, - 0xF31, 0xF30, 0xF20, 0xF10, 0xF01, 0xF00, 0x121, 0x111, - 0x101, 0x100, 0x0F1, 0x0F0, 0x0E1, 0x0E0, 0x0D1, 0x0D0, - 0x0C3, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A3, 0x0A1, 0x0A0, - 0x093, 0x091, 0x090, 0x081, 0x080, 0x071, 0x070, 0x065, - 0x063, 0x061, 0x060, 0x055, 0x053, 0x052, 0x051, 0x050, - 0x046, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, - 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, - 0x023, 0x022, 0x021, 0x020, 0x018, 0x017, 0x016, 0x015, - 0x014, 0x013, 0x012, 0x011, 0x010, -}; - -static const uint16_t ac_vlc_desc7_codes[125] = { - 0x0053, 0x009A, 0x0EE2, 0x00D3, 0x006A, 0x0052, 0x003A, 0x0035, - 0x000D, 0x0007, 0x0062, 0x0125, 0x0142, 0x0019, 0x01F3, 0x0029, - 0x000E, 0x0082, 0x0ADA, 0x02E3, 0x00E2, 0x0022, 0x0006, 0x0065, - 0x05E3, 0x0765, 0x0032, 0x0039, 0x0F99, 0x05E2, 0x0099, 0x0033, - 0x0362, 0x0799, 0x0F65, 0x0073, 0x004A, 0x02A5, 0x0162, 0x0742, - 0x01A5, 0x00D9, 0x0342, 0x005A, 0x00AA, 0x0EF3, 0x0182, 0x01DA, - 0x0382, 0x035A, 0x00F3, 0x0673, 0x0165, 0x00E5, 0x06F3, 0x0225, - 0x0842, 0x025A, 0x07E3, 0x0399, 0x07A5, 0x072A, 0x0F2A, 0x09E3, - 0x0273, 0x049A, 0x02E5, 0x0B99, 0x02E2, 0x0E73, 0x0562, 0x02F3, - 0x032A, 0x0F42, 0x00DA, 0x0999, 0x012A, 0x0365, 0x00A5, 0x00E3, - 0x0199, 0x03E3, 0x019A, 0x01E2, 0x0173, 0x06E5, 0x0059, 0x01E3, - 0x02DA, 0x002A, 0x000A, 0x06DA, 0x0FA5, 0x0042, 0x01E5, 0x0013, - 0x03E2, 0x015A, 0x03A5, 0x0442, 0x001A, 0x0005, 0x04A5, 0x0265, - 0x08A5, 0x0025, 0x029A, 0x0072, 0x0016, 0x0599, 0x00C2, 0x0242, - 0x00B2, 0x0002, 0x0015, 0x0001, 0x0BE3, 0x06E2, 0x0063, 0x0023, - 0x0012, 0x0009, 0x0003, 0x000B, 0x0000, +static const uint8_t ac_vlc_desc1_bits[169] = { + 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, + 9, 12, 12, 11, 10, 11, 11, 10, 10, 10, 10, 11, 12, 12, 10, 11, 11, 10, + 11, 11, 12, 12, 11, 10, 8, 8, 7, 7, 9, 11, 12, 12, 10, 8, 7, 12, + 12, 12, 12, 11, 11, 9, 9, 9, 6, 6, 8, 9, 11, 12, 12, 11, 12, 12, + 9, 9, 11, 11, 11, 11, 9, 4, 4, 6, 6, 6, 7, 12, 12, 11, 12, 12, + 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_desc7_bits[125] = { - 8, 11, 12, 8, 7, 7, 6, 6, - 4, 3, 9, 9, 10, 8, 9, 6, - 4, 9, 12, 10, 10, 7, 5, 10, - 11, 12, 8, 6, 12, 11, 9, 7, - 10, 12, 12, 10, 7, 10, 11, 12, - 10, 8, 11, 10, 8, 12, 10, 9, - 10, 10, 10, 12, 10, 10, 12, 10, - 12, 10, 11, 12, 12, 12, 12, 12, - 11, 11, 11, 12, 11, 12, 11, 11, - 11, 12, 10, 12, 10, 11, 12, 10, - 12, 12, 9, 11, 9, 11, 8, 12, - 12, 9, 7, 11, 12, 12, 9, 7, - 10, 10, 11, 11, 8, 6, 11, 10, - 12, 10, 10, 7, 5, 11, 8, 10, - 8, 8, 6, 4, 12, 12, 8, 7, - 7, 6, 6, 4, 2, +static const uint8_t ac_vlc_desc2_bits[165] = { + 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, + 10, 10, 11, 11, 11, 11, 8, 8, 9, 12, 12, 12, 12, 11, 12, 12, 7, 6, + 6, 8, 10, 11, 12, 12, 9, 10, 12, 12, 11, 11, 12, 12, 10, 9, 12, 12, + 11, 10, 8, 8, 7, 12, 12, 12, 12, 10, 10, 11, 12, 12, 10, 11, 11, 11, + 11, 10, 8, 9, 11, 11, 11, 12, 12, 4, 4, 6, 6, 7, 8, 10, 10, 9, + 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 uint16_t ac_vlc_desc8_syms[121] = { - 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, - 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, - 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, - 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, 0xFB1, - 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF95, - 0xF93, 0xF91, 0xF90, 0xF86, 0xF83, 0xF81, 0xF80, 0xF73, - 0xF71, 0xF70, 0xF63, 0xF61, 0xF60, 0xF51, 0xF50, 0xF41, - 0xF40, 0xF30, 0xF21, 0xF20, 0x111, 0x101, 0x0F1, 0x0E1, - 0x0E0, 0x0D1, 0x0D0, 0x0C1, 0x0C0, 0x0B3, 0x0B1, 0x0B0, - 0x0A3, 0x0A1, 0x0A0, 0x093, 0x091, 0x090, 0x083, 0x081, - 0x080, 0x073, 0x071, 0x070, 0x065, 0x063, 0x061, 0x060, - 0x055, 0x053, 0x051, 0x050, 0x046, 0x045, 0x043, 0x042, - 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, 0x031, - 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, 0x020, - 0x018, 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, 0x011, - 0x010, -}; - -static const uint16_t ac_vlc_desc8_codes[121] = { - 0x00F6, 0x0676, 0x0EB6, 0x00F3, 0x0056, 0x006A, 0x0039, 0x0003, - 0x000D, 0x0007, 0x00A2, 0x0173, 0x00CA, 0x0025, 0x0082, 0x0019, - 0x0001, 0x00B6, 0x0276, 0x02E3, 0x00B2, 0x0062, 0x001A, 0x0175, - 0x01E3, 0x0BE5, 0x004A, 0x0029, 0x07A5, 0x00E3, 0x030A, 0x0176, - 0x0023, 0x0042, 0x05CA, 0x00A5, 0x0142, 0x0052, 0x04A5, 0x0B02, - 0x0D22, 0x0375, 0x0065, 0x0522, 0x0DE3, 0x010A, 0x00F5, 0x0136, - 0x0275, 0x01B2, 0x03F5, 0x03E3, 0x0002, 0x08E3, 0x01A2, 0x0B36, - 0x020A, 0x0076, 0x0CE3, 0x07E5, 0x070A, 0x03A5, 0x02B6, 0x0036, - 0x01E5, 0x02A5, 0x05E3, 0x07B6, 0x07F5, 0x0736, 0x0BA5, 0x0075, - 0x0302, 0x0FE5, 0x01B6, 0x0102, 0x04E3, 0x0022, 0x08A5, 0x01CA, - 0x00E5, 0x0F0A, 0x05E5, 0x0096, 0x0A76, 0x0336, 0x0236, 0x0012, - 0x03B6, 0x0BF5, 0x0073, 0x0035, 0x02B2, 0x000A, 0x0476, 0x0122, - 0x0016, 0x0009, 0x0322, 0x01F5, 0x03E5, 0x01A5, 0x03CA, 0x0072, - 0x0006, 0x06A5, 0x0032, 0x02CA, 0x008A, 0x00C2, 0x0015, 0x000E, - 0x0702, 0x06B6, 0x0063, 0x0033, 0x002A, 0x0005, 0x0013, 0x000B, - 0x0000, +static const uint8_t ac_vlc_desc3_bits[162] = { + 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, + 6, 6, 9, 9, 10, 12, 12, 11, 9, 8, 12, 12, 11, 10, 9, 7, 10, 10, + 10, 12, 12, 11, 8, 7, 12, 12, 11, 12, 12, 11, 10, 12, 12, 11, 11, 12, + 12, 10, 11, 12, 12, 10, 7, 7, 6, 7, 10, 12, 12, 12, 12, 9, 8, 6, + 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_desc8_bits[121] = { - 8, 11, 12, 8, 7, 7, 6, 6, - 4, 3, 9, 9, 10, 8, 8, 6, - 4, 10, 12, 10, 10, 7, 5, 10, - 11, 12, 8, 6, 11, 12, 11, 9, - 7, 9, 11, 12, 9, 7, 11, 12, - 12, 10, 8, 12, 12, 10, 9, 10, - 10, 9, 12, 10, 9, 12, 9, 12, - 10, 11, 12, 12, 12, 12, 11, 10, - 11, 11, 12, 11, 11, 11, 12, 10, - 12, 12, 10, 10, 12, 9, 12, 11, - 9, 12, 11, 8, 12, 12, 10, 7, - 11, 12, 9, 7, 10, 10, 11, 11, - 8, 6, 10, 10, 12, 10, 10, 7, - 5, 11, 8, 10, 8, 8, 6, 4, - 11, 12, 8, 7, 7, 6, 6, 4, - 2, +static const uint8_t ac_vlc_desc4_bits[131] = { + 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, + 11, 12, 12, 7, 8, 8, 7, 4, 4, 5, 5, 4, 6, 10, 10, 11, 11, 10, + 8, 12, 12, 11, 11, 12, 12, 12, 12, 11, 10, 8, 6, 8, 9, 9, 9, 11, + 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 uint16_t ac_vlc_desc9_syms[114] = { - 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, - 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, - 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, - 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, 0xFB2, - 0xFB1, 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF96, - 0xF93, 0xF91, 0xF90, 0xF83, 0xF81, 0xF80, 0xF73, 0xF71, - 0xF70, 0xF61, 0xF60, 0xF51, 0xF50, 0xF40, 0xF31, 0xF30, - 0xF21, 0x121, 0x0F1, 0x0E1, 0x0D1, 0x0D0, 0x0C1, 0x0C0, - 0x0B1, 0x0B0, 0x0A3, 0x0A1, 0x0A0, 0x093, 0x091, 0x090, - 0x083, 0x081, 0x080, 0x073, 0x071, 0x070, 0x065, 0x063, - 0x061, 0x060, 0x055, 0x053, 0x051, 0x050, 0x045, 0x043, - 0x042, 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, - 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, - 0x020, 0x018, 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, - 0x011, 0x010, -}; - -static const uint16_t ac_vlc_desc9_codes[114] = { - 0x0061, 0x0403, 0x0DB1, 0x0012, 0x0071, 0x0056, 0x0035, 0x0023, - 0x000D, 0x0007, 0x0243, 0x01D3, 0x026A, 0x00A1, 0x00A2, 0x0011, - 0x000E, 0x01AA, 0x0531, 0x0093, 0x0222, 0x0032, 0x0006, 0x07F2, - 0x04D3, 0x0C43, 0x0072, 0x0001, 0x0343, 0x05F2, 0x04AA, 0x03F2, - 0x0031, 0x0045, 0x0143, 0x00AA, 0x0B31, 0x00F2, 0x00C3, 0x0693, - 0x0BF2, 0x0203, 0x00E1, 0x03B1, 0x02D3, 0x00B1, 0x056A, 0x01D2, - 0x008A, 0x046A, 0x01E2, 0x0003, 0x0103, 0x01B1, 0x02E2, 0x0293, - 0x016A, 0x04E2, 0x0443, 0x0521, 0x0321, 0x0043, 0x00D3, 0x00E2, - 0x0703, 0x00D2, 0x0731, 0x0A93, 0x0393, 0x0803, 0x0422, 0x0383, - 0x018A, 0x006A, 0x0021, 0x096A, 0x0303, 0x0052, 0x0CE2, 0x0D31, - 0x038A, 0x0013, 0x01F2, 0x0E93, 0x0083, 0x0005, 0x02D2, 0x0121, - 0x0022, 0x00EA, 0x0036, 0x0122, 0x0193, 0x0331, 0x0183, 0x02AA, - 0x004A, 0x001A, 0x0131, 0x002A, 0x036A, 0x000A, 0x0062, 0x0025, - 0x0009, 0x06E2, 0x05B1, 0x0053, 0x0002, 0x0016, 0x0015, 0x0033, - 0x000B, 0x0000, +static const uint8_t ac_vlc_desc5_bits[132] = { + 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, + 4, 4, 7, 11, 12, 12, 11, 12, 12, 9, 8, 7, 7, 5, 5, 6, 6, 4, + 8, 10, 11, 12, 12, 9, 10, 12, 12, 11, 10, 10, 8, 6, 6, 9, 11, 11, + 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_desc9_bits[114] = { - 8, 11, 12, 7, 7, 7, 6, 6, - 4, 3, 10, 9, 10, 8, 8, 6, - 4, 9, 12, 10, 10, 7, 5, 11, - 11, 12, 8, 6, 10, 11, 11, 12, - 9, 7, 10, 11, 12, 9, 8, 12, - 12, 10, 8, 10, 10, 9, 11, 9, - 9, 11, 9, 12, 10, 11, 11, 12, - 12, 12, 12, 11, 10, 11, 11, 11, - 11, 10, 11, 12, 10, 12, 11, 10, - 10, 11, 9, 12, 11, 8, 12, 12, - 10, 8, 11, 12, 9, 7, 10, 11, - 11, 8, 6, 9, 10, 12, 10, 10, - 7, 5, 11, 8, 10, 8, 8, 6, - 4, 11, 12, 8, 6, 7, 6, 6, - 4, 2, +static const uint8_t ac_vlc_desc6_bits[130] = { + 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, + 10, 9, 11, 12, 12, 10, 7, 6, 5, 4, 5, 11, 12, 12, 10, 11, 12, 12, + 11, 11, 9, 9, 9, 12, 12, 12, 12, 10, 10, 11, 12, 12, 9, 6, 6, 6, + 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 uint16_t ac_vlc_descA_syms[110] = { - 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, - 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, - 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, - 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, - 0xFB2, 0xFB1, 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, - 0xF96, 0xF93, 0xF91, 0xF90, 0xF83, 0xF81, 0xF80, 0xF73, - 0xF71, 0xF70, 0xF61, 0xF60, 0xF51, 0xF50, 0xF41, 0xF40, - 0xF31, 0x0E1, 0x0D1, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A1, - 0x0A0, 0x093, 0x091, 0x090, 0x083, 0x081, 0x080, 0x073, - 0x071, 0x070, 0x063, 0x061, 0x060, 0x055, 0x053, 0x051, - 0x050, 0x045, 0x044, 0x043, 0x042, 0x041, 0x040, 0x036, - 0x035, 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, - 0x024, 0x023, 0x022, 0x021, 0x020, 0x018, 0x017, 0x016, - 0x015, 0x014, 0x013, 0x012, 0x011, 0x010, -}; - -static const uint16_t ac_vlc_descA_codes[110] = { - 0x002A, 0x04C5, 0x02A3, 0x004A, 0x0015, 0x0005, 0x0003, 0x0013, - 0x000D, 0x0007, 0x0171, 0x0032, 0x0371, 0x0076, 0x0042, 0x0011, - 0x000E, 0x00AA, 0x04D5, 0x03A3, 0x06A3, 0x0062, 0x001A, 0x06D5, - 0x07F2, 0x0223, 0x0CD5, 0x006A, 0x0001, 0x00F6, 0x0623, 0x03F2, - 0x07EA, 0x01F1, 0x0021, 0x03D5, 0x08C2, 0x07F6, 0x00F2, 0x00E3, - 0x0FEA, 0x02C5, 0x01AA, 0x0082, 0x04A3, 0x00B6, 0x0071, 0x03B2, - 0x0023, 0x01B6, 0x08A3, 0x0002, 0x0BB2, 0x00C5, 0x02EA, 0x0C23, - 0x0FF6, 0x0423, 0x07B2, 0x01C5, 0x07D5, 0x01EA, 0x06EA, 0x02C2, - 0x01F6, 0x01D5, 0x01B2, 0x00B2, 0x04F1, 0x03EA, 0x01A2, 0x02A2, - 0x02D5, 0x0123, 0x00D5, 0x01F2, 0x0055, 0x05B2, 0x04C2, 0x0102, - 0x0061, 0x05D5, 0x00C2, 0x00F1, 0x00A3, 0x0045, 0x0016, 0x01A3, - 0x01C2, 0x08D5, 0x03C5, 0x00EA, 0x000A, 0x0006, 0x00A2, 0x0036, - 0x02F1, 0x0072, 0x0022, 0x0025, 0x0009, 0x03F6, 0x0AA3, 0x0063, - 0x0012, 0x0031, 0x0035, 0x0033, 0x000B, 0x0000, +static const uint8_t ac_vlc_desc7_bits[125] = { + 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, + 6, 5, 5, 4, 4, 6, 6, 8, 9, 12, 12, 11, 12, 12, 12, 12, 8, 8, + 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_descA_bits[110] = { - 8, 11, 12, 7, 7, 7, 6, 6, - 4, 3, 10, 8, 10, 8, 8, 6, - 4, 9, 12, 10, 11, 7, 5, 11, - 11, 11, 12, 8, 6, 9, 11, 11, - 12, 9, 7, 11, 12, 12, 9, 8, - 12, 10, 9, 8, 11, 9, 9, 12, - 11, 9, 12, 9, 12, 11, 11, 12, - 12, 12, 11, 10, 11, 10, 11, 10, - 10, 11, 11, 9, 11, 11, 9, 10, - 11, 9, 12, 10, 8, 11, 11, 9, - 7, 11, 12, 11, 12, 8, 6, 10, - 9, 12, 10, 10, 7, 5, 10, 8, - 10, 8, 8, 6, 4, 11, 12, 8, - 6, 7, 6, 6, 4, 2, +static const uint8_t ac_vlc_desc8_bits[121] = { + 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, + 12, 10, 11, 11, 11, 11, 12, 12, 11, 9, 8, 4, 4, 6, 6, 6, 6, 6, + 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 uint16_t ac_vlc_descB_syms[101] = { - 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, - 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, - 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, - 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, - 0xFB1, 0xFB0, 0xFA6, 0xFA3, 0xFA1, 0xFA0, 0xF93, 0xF91, - 0xF90, 0xF83, 0xF81, 0xF80, 0xF71, 0xF70, 0xF61, 0xF60, - 0xF51, 0xF50, 0xF41, 0x0F1, 0x0D1, 0x0C1, 0x0B1, 0x0B0, - 0x0A1, 0x0A0, 0x091, 0x090, 0x083, 0x081, 0x080, 0x073, - 0x071, 0x070, 0x063, 0x061, 0x060, 0x055, 0x053, 0x051, - 0x050, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, - 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, - 0x023, 0x022, 0x021, 0x020, 0x018, 0x017, 0x016, 0x015, - 0x014, 0x013, 0x012, 0x011, 0x010, -}; - -static const uint16_t ac_vlc_descB_codes[101] = { - 0x00EE, 0x03A5, 0x0B73, 0x004E, 0x0035, 0x0015, 0x0023, 0x0013, - 0x000D, 0x0007, 0x0673, 0x01F3, 0x02FE, 0x0096, 0x0133, 0x001E, - 0x0001, 0x0116, 0x00F5, 0x03F5, 0x0473, 0x0052, 0x001A, 0x01D5, - 0x0025, 0x0073, 0x0633, 0x0086, 0x0036, 0x012E, 0x0155, 0x0006, - 0x0055, 0x000E, 0x0106, 0x023E, 0x0192, 0x0075, 0x0173, 0x01AE, - 0x00D5, 0x08F5, 0x002E, 0x01FE, 0x0406, 0x00AE, 0x0E3E, 0x0206, - 0x013E, 0x0373, 0x0D55, 0x063E, 0x0E33, 0x033E, 0x01F5, 0x0273, - 0x003E, 0x06A5, 0x0092, 0x03D5, 0x04F5, 0x053E, 0x0016, 0x00FE, - 0x07A5, 0x0125, 0x0506, 0x0292, 0x00BE, 0x0425, 0x0F73, 0x02F5, - 0x0056, 0x0233, 0x02A5, 0x0C25, 0x007E, 0x0026, 0x0355, 0x0033, - 0x0555, 0x01A5, 0x0306, 0x0046, 0x000A, 0x0225, 0x006E, 0x00A5, - 0x0012, 0x00F3, 0x0005, 0x0009, 0x073E, 0x0773, 0x00B3, 0x0032, - 0x0065, 0x0003, 0x0002, 0x000B, 0x0000, +static const uint8_t ac_vlc_desc9_bits[114] = { + 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, + 11, 10, 8, 8, 8, 6, 9, 11, 12, 12, 12, 12, 11, 9, 11, 12, 12, 10, + 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_descB_bits[101] = { - 8, 11, 12, 7, 7, 7, 6, 6, - 4, 3, 11, 9, 10, 8, 9, 6, - 4, 9, 12, 10, 11, 7, 5, 10, - 11, 11, 12, 8, 6, 9, 11, 11, - 9, 7, 11, 11, 9, 8, 10, 9, - 9, 12, 9, 9, 11, 9, 12, 10, - 11, 12, 12, 12, 12, 11, 10, 11, - 10, 11, 10, 10, 11, 11, 9, 10, - 11, 9, 11, 10, 8, 12, 12, 10, - 7, 11, 11, 12, 8, 6, 10, 10, - 12, 10, 10, 7, 5, 10, 8, 10, - 8, 9, 6, 4, 11, 12, 8, 6, - 7, 6, 5, 4, 2, +static const uint8_t ac_vlc_descA_bits[110] = { + 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, + 6, 7, 7, 6, 7, 9, 10, 10, 11, 11, 10, 9, 4, 7, 8, 11, 11, 10, + 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 uint16_t ac_vlc_descC_syms[96] = { - 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, - 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, - 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, - 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, - 0xFB1, 0xFB0, 0xFA6, 0xFA3, 0xFA1, 0xFA0, 0xF93, 0xF91, - 0xF90, 0xF81, 0xF80, 0xF71, 0xF70, 0xF61, 0xF60, 0xF51, - 0x0E1, 0x0C1, 0x0B1, 0x0A1, 0x0A0, 0x091, 0x090, 0x083, - 0x081, 0x080, 0x073, 0x071, 0x070, 0x063, 0x061, 0x060, - 0x055, 0x053, 0x051, 0x050, 0x045, 0x043, 0x042, 0x041, - 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, 0x031, 0x030, - 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, 0x020, 0x018, - 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, 0x011, 0x010, -}; - -static const uint16_t ac_vlc_descC_codes[96] = { - 0x00DE, 0x072E, 0x0576, 0x006E, 0x0075, 0x0055, 0x0013, 0x0033, - 0x000D, 0x0007, 0x07D2, 0x0052, 0x0065, 0x00CE, 0x0183, 0x003E, - 0x0001, 0x002E, 0x0F35, 0x0003, 0x0243, 0x001A, 0x0006, 0x01A5, - 0x0043, 0x0012, 0x0E43, 0x00B6, 0x0016, 0x0135, 0x0176, 0x0643, - 0x0035, 0x001E, 0x0735, 0x0283, 0x0125, 0x00AE, 0x00D2, 0x0165, - 0x0103, 0x0603, 0x00E5, 0x0C43, 0x02B5, 0x04A5, 0x00A5, 0x0443, - 0x0265, 0x0476, 0x0212, 0x0112, 0x0376, 0x012E, 0x02D2, 0x0083, - 0x0483, 0x015E, 0x06A5, 0x0335, 0x005E, 0x0025, 0x01D2, 0x00F6, - 0x03D2, 0x032E, 0x03B5, 0x005A, 0x0203, 0x02A5, 0x0BD2, 0x004E, - 0x0032, 0x01B5, 0x00B5, 0x0A65, 0x0225, 0x0276, 0x000E, 0x000A, - 0x03E5, 0x0143, 0x01E5, 0x0036, 0x0092, 0x0005, 0x0009, 0x0665, - 0x0076, 0x00C3, 0x003A, 0x0015, 0x0023, 0x0002, 0x000B, 0x0000, +static const uint8_t ac_vlc_descB_bits[101] = { + 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] = { - 8, 11, 11, 7, 7, 7, 6, 6, - 4, 3, 11, 8, 10, 8, 9, 6, - 4, 9, 12, 10, 11, 7, 5, 9, - 11, 10, 12, 8, 6, 10, 11, 12, - 9, 7, 12, 10, 9, 8, 10, 9, - 9, 11, 9, 12, 10, 11, 11, 12, - 12, 11, 10, 9, 10, 10, 10, 11, - 11, 9, 11, 11, 9, 10, 10, 8, - 12, 11, 10, 7, 11, 11, 12, 8, - 6, 10, 10, 12, 10, 10, 7, 5, - 10, 9, 10, 8, 8, 6, 4, 11, - 11, 8, 6, 7, 6, 5, 4, 2, + 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, + 10, 12, 12, 11, 9, 9, 10, 10, 7, 7, 9, 10, 11, 12, 12, 10, 10, 10, + 10, 7, 4, 10, 11, 11, 9, 11, 11, 10, 9, 11, 12, 12, 11, 12, 12, 9, + 8, 6, 6, 6, 4, 3, }; static const int tscc2_ac_vlc_sizes[NUM_VLC_SETS] = { @@ -910,14 +485,6 @@ static const uint16_t * const tscc2_ac_vlc_syms[NUM_VLC_SETS] = { ac_vlc_descC_syms, }; -static const uint16_t * const tscc2_ac_vlc_codes[NUM_VLC_SETS] = { - ac_vlc_desc0_codes, ac_vlc_desc1_codes, ac_vlc_desc2_codes, - ac_vlc_desc3_codes, ac_vlc_desc4_codes, ac_vlc_desc5_codes, - ac_vlc_desc6_codes, ac_vlc_desc7_codes, ac_vlc_desc8_codes, - ac_vlc_desc9_codes, ac_vlc_descA_codes, ac_vlc_descB_codes, - ac_vlc_descC_codes, -}; - 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, From patchwork Tue Nov 10 10:47:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23469 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 082FE449B06 for ; Tue, 10 Nov 2020 12:49:32 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E456B68BDB1; Tue, 10 Nov 2020 12:49:31 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E60B68BD8D for ; Tue, 10 Nov 2020 12:49:23 +0200 (EET) Received: by mail-wm1-f65.google.com with SMTP id h2so2540576wmm.0 for ; Tue, 10 Nov 2020 02:49:23 -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=ISHRQGBufH2lqvgsT0lcTAxP6+4Bp62HGwKhTdVJZmc=; b=hsEco8goROOKXEQ2wAmYrPZMLFtLNcKNf0ZU/ZGk19j84Di0kSCJTwlz51nACBWv58 9J4BJC3T9EfaRWjpHb2PeS0+DbzHJkRMpWcNoLnaOhnx3Be5LLiy6AfQZJelAoHIC73o DjlvAx9ngjrZLZosanFG7yKfHCh0pIKPY85NUFJk3bRISikOGLarhyTs2fokr8YLWvFs fb2CclBhm3Ggzm5ygkeeNMybDCfIE7kZDvA25nzgGV7n4MWLSldp/Ddb2Dx6DMle+FFL NuwnHy/qxUcXbC3g5JlgPpJbxXxt8xK+OnBqAW4Ag39dFWSwh4J6kYtxf9yVUvOCeyai 8Dig== 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=ISHRQGBufH2lqvgsT0lcTAxP6+4Bp62HGwKhTdVJZmc=; b=n9ojyG0mpZk6lnUVZ1ZCwonV7CCWV3eORDrj+mKNN85mlP2XO4PR5g/kototc+QQG8 VTPnpTQneiecegVJODs6OPJJl0dtr9NhBzsPzUaHK6SfHKfP9MAoG8Y+HubkAe7M8Brl zGzGyZcxeMEG7Cs3/VQZ/bAACdft8r6z41KcEhDzjNhIIgIcz6V8FSO9iEoW1VNFB5No U+mM/dpXwwuKsgTiq0TZjBUnrSRXRA7ffm1EC+Dbi0IJYKvvB4ondooUTs87Ue660BUi sXD1vA725oTiPSGdP6kRW88uxzWwcpp4/ANvuxAawu+sOd8JLvMESnV0u9UGNaJZW9f3 7ynw== X-Gm-Message-State: AOAM5316J1hQAlXYGiW36cjx75xSkyYbVsfG6Prp64ddzR7VxxtBD/++ Nwlkw+3Eqs07fRsV7R6IrO9dPvt4u2c= X-Google-Smtp-Source: ABdhPJxspOZYL6CXtQxlPg/PdpK/rZKw6ECKmVA4FMLLQCjnJPiwTXDkSI5dVSku/65EJLMFJ3TuMg== X-Received: by 2002:a05:600c:4147:: with SMTP id h7mr3852696wmm.146.1605005361935; Tue, 10 Nov 2020 02:49:21 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:21 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:00 +0100 Message-Id: <20201110104851.321029-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 003/114] 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 0552d775c5..7a591899c1 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); 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 */ From patchwork Tue Nov 10 10:47:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23470 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 C4027449B06 for ; Tue, 10 Nov 2020 12:49:32 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1B9368BDAA; Tue, 10 Nov 2020 12:49:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9449868BD9D for ; Tue, 10 Nov 2020 12:49:23 +0200 (EET) Received: by mail-wm1-f67.google.com with SMTP id 10so2532332wml.2 for ; Tue, 10 Nov 2020 02:49:23 -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=kGiLO41i/fx/mCJwNEdS9v/rAIsFqjA044SDP/O7uho=; b=YMCq58w6qb+YIwrN7w/SKfbgihE078t8v35SVYhKnpj1GOC8XusGBVB8kdg2/llOrL chsfEU4mwid1u2l79rZ1XsLTx4Z4OELy1HzJKaMqxTWc4aewjc0C1o41sUKt7ITZfazN aomvVT8t6NoQKdoidx4p1tkSOloIuZkCPP9B6IYo33fdSXO++pkgNhRTqnEKpoILkSpd iz/T+5kKqGIWolWDLi01t2/eR2ghILgNudl/o6JfB9Z4E26OBD5uqJfwf8hNw6UpEBrQ zSpFXXCrJC1sxUVndLW6yPJ380hMXG0drw34WRNclMAmWD4iRbwQPl+/kCs1eblT7NOS 9d6A== 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=kGiLO41i/fx/mCJwNEdS9v/rAIsFqjA044SDP/O7uho=; b=HitkqufCcYY2JBkqWQEBikAJ0HBQu5CN8ZDuj73nVg1L5ZbnnkIvCMH27xBnvvYVZ8 yXIkysk0jCDCJ+BCG8KFUbl0dCeMvGB8Uw1ySsqZk9DexvV1ZI9T//rtM9c0BKErxhzo YDuNZerY4CHilaGPcWuObSp14i3hIApqn8gbAw0EABHHYvKlanlHj+6tgkZyxrB3SSbE PPmhm1DksY3+d2/UFUxzdYmrMeOb8QS7F879gmlwgfp/ITbwPLU8J7SnTIzJ52iq2BF0 aqFYyZGxIisjDe41Hju+RssqEcu+flh9otyj6MQ4ne692uH8qvC+/9PWYsyrVQDYIIG6 Liyg== X-Gm-Message-State: AOAM532bWIgklqOBmlSCRUvKeZvbk8bHerSt2/ViTpqRwjhImbXtPq2v cShNG7MuXMeeYTaXYgXUYBYvB+RP3/k= X-Google-Smtp-Source: ABdhPJzxKuYAhlSHRghE+3R37F/TbNi+/AX9/Hso1L6l2YslEliPsdCYV9DWeofDCTSQg6BfZx18Tw== X-Received: by 2002:a1c:3907:: with SMTP id g7mr4023574wma.176.1605005362780; Tue, 10 Nov 2020 02:49:22 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:22 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:01 +0100 Message-Id: <20201110104851.321029-5-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 004/114] avcodec/bitstream: Allow static VLC tables to be bigger than needed 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" Right now the allocated size of the VLC table of a static VLC has to exactly match the size actually used for the VLC: If it is not enough, abort is called; if it is more than enough, an error message is emitted. This is no problem when one wants to initialize an individual VLC via one of the INIT_VLC macros as one just hardcodes the needed size. Yet it is an obstacle when one wants to initialize several VLCs in a loop as one then needs to add an array for the sizes/offsets of the VLC tables (unless max_depth of all arrays is one in which case the sizes are derivable from the number of bits used). Yet said size array is not necessary if one removes the warning for too big buffers. The reason is that the amount of entries needed for the table is of course generated as a byproduct of initializing the VLC. So one can proceed as follows: static VLC vlcs[NUM]; static VLC_TYPE vlc_table[BUF_SIZE][2]; for (int i = 0, offset = 0; i < NUM; i++) { vlcs[i].table = &vlc_table[offset]; vlcs[i].table_allocated = BUF_SIZE - offset; init_vlc(); offset += vlcs[i].table_size; } Of course, BUF_SIZE should be equal to the number of entries actually needed. Signed-off-by: Andreas Rheinhardt --- libavcodec/bitstream.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 03d39ad88c..4ffec7e17a 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -281,9 +281,6 @@ static int vlc_common_end(VLC *vlc, int nb_bits, int nb_codes, VLCcode *codes, int ret = build_table(vlc, nb_bits, nb_codes, codes, flags); if (flags & INIT_VLC_USE_NEW_STATIC) { - if(vlc->table_size != vlc->table_allocated) - av_log(NULL, AV_LOG_ERROR, "needed %d had %d\n", vlc->table_size, vlc->table_allocated); - av_assert0(ret >= 0); *vlc_arg = *vlc; } else { From patchwork Tue Nov 10 10:47:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23465 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 9C7D0449B06 for ; Tue, 10 Nov 2020 12:49:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7F51D68BD8A; Tue, 10 Nov 2020 12:49:26 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A4DDE68B581 for ; Tue, 10 Nov 2020 12:49:24 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id 23so12136370wrc.8 for ; Tue, 10 Nov 2020 02:49:24 -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=8zxx6CkEZE+MjIXO1hr3yCJNUKqEpn8G/3VmhC0W6WY=; b=lyZfMxC3t8udhPymVJCksAgbW/kbAwzDtGTQ+ZN8dFpkuPJWl0yrbUS2wtxQP9a6gW QbaHARJBEB2KKQMLKPiolFKiwGFot2hcfCnJjU5BziRCWKltLrQ1Mb5qePRVJ2WImMS1 +nvAI5frEnIMIKWTyvVQR+3GwzK/PhQEjKkdKf+4rPxsAMSY7wvd9HQywXtFDyAU5JSa v5UzyuXsppnwzfj5RTnorVwjH1nyUTNnixCaucBuE5bKClbHdNd4T/8cDE4X4dRA1p8S 0GEVjEu1XTtBV+UAaYKITBoYSdgf+JaRl4OzrAIsYYSe6x+J/KwOMMm1M6/1UBis1Nf+ /AlA== 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=8zxx6CkEZE+MjIXO1hr3yCJNUKqEpn8G/3VmhC0W6WY=; b=Cj+DQzAjZFJB1aZvvXWMzRNb8XY0NCCmoye/9wTgrmVT09L9obtQHdVNExU8HCyY+6 mqtefiRxuQPmNkwXcKRgEfEg7I1A/Gq+ZrqpXdqUy7VgmxhUT6AAv+p+ll/2Ng9IPQo0 S65Z0wkGfMTy9sP5Y60WFkA7sQsNMfeaWOgzsDR8SazkTchXvbR0wQj9hMEsKf6o2ILI 7plyok1sfYQvrYXBZC7PpH1tPjzwo7kDjwC3krN5zwORVXwXvjDpMwGfYAaGvnAc1n6u jk2mBD9dYv9FVpEu0+PgscTIA7jyLLxzANXE4wRvc0IN1eB5jt+0YiLIvRF5lAFbhIJ/ NKIQ== X-Gm-Message-State: AOAM533A3PZS9qcqRfShibGCXpfYo7P6nbQKX0rvmfH971jEht6G6HSj axqlUvJaBlAMMyWi76GCZfw5BlVllPM= X-Google-Smtp-Source: ABdhPJzdqyEfmFr4xrPMUfO9CY4iotzIAO1L0mymQzzU4xE0HUs8p450A2c+giTy6aqB1watqhWIRQ== X-Received: by 2002:adf:a315:: with SMTP id c21mr23014027wrb.272.1605005363686; Tue, 10 Nov 2020 02:49:23 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:23 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:02 +0100 Message-Id: <20201110104851.321029-6-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 005/114] avcodec/tscc2: Make VLC tables static 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" Also use a named constant for the number of bits of the VLC tables. Signed-off-by: Andreas Rheinhardt --- libavcodec/tscc2.c | 73 ++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 41 deletions(-) diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c index 7a591899c1..c5ce1cb74b 100644 --- a/libavcodec/tscc2.c +++ b/libavcodec/tscc2.c @@ -34,6 +34,8 @@ #include "mathops.h" #include "tscc2data.h" +#define TSCC2_VLC_BITS 9 + typedef struct TSCC2Context { AVCodecContext *avctx; AVFrame *pic; @@ -43,52 +45,46 @@ typedef struct TSCC2Context { int q[2][3]; GetBitContext gb; - VLC dc_vlc, nc_vlc[NUM_VLC_SETS], ac_vlc[NUM_VLC_SETS]; int block[16]; } TSCC2Context; -static av_cold void free_vlcs(TSCC2Context *c) -{ - int i; +static VLC dc_vlc, nc_vlc[NUM_VLC_SETS], ac_vlc[NUM_VLC_SETS]; - ff_free_vlc(&c->dc_vlc); - for (i = 0; i < NUM_VLC_SETS; i++) { - ff_free_vlc(c->nc_vlc + i); - ff_free_vlc(c->ac_vlc + i); - } +static av_cold void tscc2_init_vlc(VLC *vlc, int *offset, int nb_codes, + const uint8_t *lens, const void *syms, + int sym_length) +{ + static VLC_TYPE vlc_buf[15442][2]; + + vlc->table = &vlc_buf[*offset]; + vlc->table_allocated = FF_ARRAY_ELEMS(vlc_buf) - *offset; + ff_init_vlc_from_lengths(vlc, TSCC2_VLC_BITS, nb_codes, + lens, 1, syms, sym_length, sym_length, + 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_OUTPUT_LE); + *offset += vlc->table_size; } -static av_cold int init_vlcs(TSCC2Context *c) +static av_cold void tscc2_init_vlcs(void) { const uint16_t *ac_vlc_syms = tscc2_ac_vlc_syms; const uint8_t *ac_vlc_lens = tscc2_ac_vlc_lens; - int i, ret; + int i, offset = 0; - ret = ff_init_vlc_from_lengths(&c->dc_vlc, 9, DC_VLC_COUNT, - tscc2_dc_vlc_lens, 1, - tscc2_dc_vlc_syms, 2, 2, - 0, INIT_VLC_OUTPUT_LE); - if (ret) - return ret; + if (ac_vlc[NUM_VLC_SETS - 1].table_size) + return; + + tscc2_init_vlc(&dc_vlc, &offset, DC_VLC_COUNT, + tscc2_dc_vlc_lens, tscc2_dc_vlc_syms, 2); for (i = 0; i < NUM_VLC_SETS; i++) { - ret = ff_init_vlc_from_lengths(c->nc_vlc + i, 9, 16, - tscc2_nc_vlc_lens[i], 1, - tscc2_nc_vlc_syms[i], 1, 1, - 0, INIT_VLC_OUTPUT_LE); - if (ret) - return ret; - ret = ff_init_vlc_from_lengths(c->ac_vlc + i, 9, tscc2_ac_vlc_sizes[i], - ac_vlc_lens, 1, - ac_vlc_syms, 2, 2, - 0, INIT_VLC_OUTPUT_LE); - if (ret) - return ret; + tscc2_init_vlc(&nc_vlc[i], &offset, 16, + tscc2_nc_vlc_lens[i], tscc2_nc_vlc_syms[i], 1); + + tscc2_init_vlc(&ac_vlc[i], &offset, tscc2_ac_vlc_sizes[i], + ac_vlc_lens, ac_vlc_syms, 2); ac_vlc_lens += tscc2_ac_vlc_sizes[i]; ac_vlc_syms += tscc2_ac_vlc_sizes[i]; } - - return 0; } #define DEQUANT(val, q) (((q) * (val) + 0x80) >> 8) @@ -154,7 +150,7 @@ static int tscc2_decode_mb(TSCC2Context *c, int *q, int vlc_set, if (!(j | k)) { dc = get_bits(gb, 8); } else { - dc = get_vlc2(gb, c->dc_vlc.table, 9, 2); + dc = get_vlc2(gb, dc_vlc.table, TSCC2_VLC_BITS, 2); if (dc == 0x100) dc = get_bits(gb, 8); } @@ -162,12 +158,12 @@ static int tscc2_decode_mb(TSCC2Context *c, int *q, int vlc_set, prev_dc = dc; c->block[0] = dc; - nc = get_vlc2(gb, c->nc_vlc[vlc_set].table, 9, 1); + nc = get_vlc2(gb, nc_vlc[vlc_set].table, TSCC2_VLC_BITS, 1); bpos = 1; memset(c->block + 1, 0, 15 * sizeof(*c->block)); for (l = 0; l < nc; l++) { - ac = get_vlc2(gb, c->ac_vlc[vlc_set].table, 9, 2); + ac = get_vlc2(gb, ac_vlc[vlc_set].table, TSCC2_VLC_BITS, 2); if (ac == 0x1000) ac = get_bits(gb, 12); bpos += ac & 0xF; @@ -330,7 +326,6 @@ static av_cold int tscc2_decode_end(AVCodecContext *avctx) av_frame_free(&c->pic); av_freep(&c->slice_quants); - free_vlcs(c); return 0; } @@ -338,17 +333,11 @@ static av_cold int tscc2_decode_end(AVCodecContext *avctx) static av_cold int tscc2_decode_init(AVCodecContext *avctx) { TSCC2Context * const c = avctx->priv_data; - int ret; c->avctx = avctx; avctx->pix_fmt = AV_PIX_FMT_YUV444P; - if ((ret = init_vlcs(c)) < 0) { - av_log(avctx, AV_LOG_ERROR, "Cannot initialise VLCs\n"); - return ret; - } - c->mb_width = FFALIGN(avctx->width, 16) >> 4; c->mb_height = FFALIGN(avctx->height, 8) >> 3; c->slice_quants = av_malloc(c->mb_width * c->mb_height); @@ -361,6 +350,8 @@ static av_cold int tscc2_decode_init(AVCodecContext *avctx) if (!c->pic) return AVERROR(ENOMEM); + tscc2_init_vlcs(); + return 0; } From patchwork Tue Nov 10 10:47:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23466 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 BBE97449B06 for ; Tue, 10 Nov 2020 12:49:27 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A349668BD91; Tue, 10 Nov 2020 12:49:27 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AD58D68BD80 for ; Tue, 10 Nov 2020 12:49:25 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id j7so4888244wrp.3 for ; Tue, 10 Nov 2020 02:49:25 -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=HOtGGl8mX34eGqfZi23QVrKjyFSwhg3yECk8ssX2N5E=; b=tS+HRwk4ILZ3AafwById2lPGWt/1Qgl84uMd44oHreZGx4KYGdPqOhaAyzxPHIMHxg asM0kFY1NQXEsl9oH3TZKpEtAgiBJbuM6U9vYFZOQcd8/WJ9vNZ4LuvAZOVEqnIDvRpG +1yT9ZKBUhnYK93iqwEzecyFgbEkUxyOPFvMBmymGYxYXyvubSr9Yvjap4pYl1CqXJxf FCL2t1sy7RvJvG5BKxWPXoyUDmcJARXGEl9V4wuElwzTRJ491EizNHXwq3eyhdfazQE/ kppCP1/RR+CZhep9VPTov/T6TIOBfFD30+Ck2IkXII6baiEW5v+2kH9N6pj+PBErjS1h Pt+g== 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=HOtGGl8mX34eGqfZi23QVrKjyFSwhg3yECk8ssX2N5E=; b=N3IKcgoyGyQ2UdnURIVk7K/Woel1mIFWYzAhEKCnJtNMKi7YUu1OSjcCu21kc1Tly9 qcb7XkR8D2/Ffu/JyfJztUGgsiNrvA29OtU/TYlffOYW0C5VU1E6fX6aq7jmVubujYCg kjVtEUsVhb4qMUlhb1KEKEq9XPt7m62OhESjSyQR5E7Uf5g5HunkTyPfejeJzw5p/IWo 8e/P9x78FFYZOBiTjcgtbWuUQEJR4JXH9uDYQEPZvKG69P/8QxNov1xFgmzcAc5Vu8JG IYRZh4bgfiK/BlsUgjgVaFiCTLv/AE/c4kMGy7W2gqmTvj4b4IfuWfaWE4P2L3gI+mAA 8oEA== X-Gm-Message-State: AOAM530adP53rzu+0qob/klKjQlyYXo2KPBIicx6J1yITc+pSWP+jN/w HBP7HqeFrKx/BAbaM39RFjl3Ayw9/eI= X-Google-Smtp-Source: ABdhPJyH0+wr1BnMhr1N1yM19TASSGgMXJ6GDL1GDHIjf0aDiUQ5DaRzuAsmieD7K2LKO12/ye6RPA== X-Received: by 2002:adf:e3cf:: with SMTP id k15mr7067759wrm.259.1605005364735; Tue, 10 Nov 2020 02:49:24 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:24 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:03 +0100 Message-Id: <20201110104851.321029-7-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 006/114] avcodec/cllc: Improve creating 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" One can offload the computation of the codes to ff_init_vlc_from_lengths(); this also improves performance: The number of decicycles for one call to read_code_table() decreased from 198343 to 148338 with the sample sample-cllc-rgb.avi from the FATE suite; it has been looped 100 times and the test repeated ten times to test it sufficiently often. Signed-off-by: Andreas Rheinhardt --- libavcodec/cllc.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c index 8b1bc75faa..24821f8c16 100644 --- a/libavcodec/cllc.c +++ b/libavcodec/cllc.c @@ -46,11 +46,9 @@ static int read_code_table(CLLCContext *ctx, GetBitContext *gb, VLC *vlc) { uint8_t symbols[256]; uint8_t bits[256]; - uint16_t codes[256]; - int num_lens, num_codes, num_codes_sum, prefix; + int num_lens, num_codes, num_codes_sum; int i, j, count; - prefix = 0; count = 0; num_codes_sum = 0; @@ -74,19 +72,13 @@ static int read_code_table(CLLCContext *ctx, GetBitContext *gb, VLC *vlc) for (j = 0; j < num_codes; j++) { symbols[count] = get_bits(gb, 8); bits[count] = i + 1; - codes[count] = prefix++; count++; } - if (prefix > (65535 - 256)/2) { - return AVERROR_INVALIDDATA; - } - - prefix <<= 1; } - return ff_init_vlc_sparse(vlc, VLC_BITS, count, bits, 1, 1, - codes, 2, 2, symbols, 1, 1, 0); + return ff_init_vlc_from_lengths(vlc, VLC_BITS, count, bits, 1, + symbols, 1, 1, 0, 0); } /* From patchwork Tue Nov 10 10:47:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23468 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 D3800449B06 for ; Tue, 10 Nov 2020 12:49:29 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B05ED68BD9F; Tue, 10 Nov 2020 12:49:29 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7D6A468BD89 for ; Tue, 10 Nov 2020 12:49:26 +0200 (EET) Received: by mail-wm1-f67.google.com with SMTP id w24so2550144wmi.0 for ; Tue, 10 Nov 2020 02:49:26 -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=PrsJLGJA9tsJg/R1fYEhFLlUcxqj7RJe6NVg0YYCAnQ=; b=Tt6BQOcIHStZteCMbU18OvU5AUBGVt1/XOcFgYK91cNyBWimh0LzAKRSyYgg15+YI3 fQ8HolN4LagB/yPGhH17roj+rKvfhnWtto1tcuSAt3jQsAwtyQfuvdcF/kFM77N4STxa CnZpefYEmdK7TxU83C1K6o9ofzvOxnVcaAxFQgvSvxRX7qUv5z55sLPjuNo32vvK5Dts hyMCN1TZeuh7V9Mqr54kuOaiRU/0vBT5vajpA50pajk7ogfnEuH3PZAenD05NTRZrTUt 6rz0HFf28tkli4GUaUSwYd4tL8aOJwulmJWdimIK4WHLQqpNXmP8/DBVCAZhRdHaeepK pBug== 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=PrsJLGJA9tsJg/R1fYEhFLlUcxqj7RJe6NVg0YYCAnQ=; b=SalzCl6W8on/5C7oCiFjwBx2ZA6r9xcHCXF+blhjIjIibSS31NLmi5RymLlhsU7UP0 nhsPdD3Uw0pC+iyqG9KRRGnQTY2RMLL2i12G+nN/XcX4NDLnD+I964jfRB5WST16jw35 IQxZA+bKXtJI9vdqNNGt0K43NcuOcF62lGw28gxt0Vd0uj3OMMacMx0N0nntOV8cf0c4 sLrqm6gGeUmP6iH992HuVR/nJLVYoYB42mLoOTdQN1QfSkuGBoBMtt2bdEjqp+f2+8E4 VrooidQuOn6V6ORCVDW/oMEz4Olq1kea/ZbH3yv5zSaqtztkbNRxnWP2EfkkX8zr0J4y u/lA== X-Gm-Message-State: AOAM531n+EyLVo5J8UC79slRy2aNOHcp4lpYvjiye7bY794CVEMsHXAc 6BBBSGKnmMMpRXcSc5tdxkPrrker6uc= X-Google-Smtp-Source: ABdhPJz1WqZAsRSXI3DlNcZAh52I57R3KuIckBB0/jbiENh/K8yC/19fByxOcc08jXmN2njMXVwWeQ== X-Received: by 2002:a1c:a752:: with SMTP id q79mr3962649wme.24.1605005365654; Tue, 10 Nov 2020 02:49:25 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:25 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:04 +0100 Message-Id: <20201110104851.321029-8-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 007/114] avcodec/smacker: Improve creating Huffman VLC tables 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" The Smacker Huffman tables are already stored in a tree-like structure; in particular, they are naturally ordered from left to right in the tree and are therefore suitable to be initialized by ff_init_vlc_from_lengths() which avoids traversing the data twice in order to sort only the codes that are so long that they need into a subtable. This improves performance (and reduces codesize): For the sample from ticket #2425 the number of decicycles for parsing and creating the VLCs in smka_decode_frame() decreased from 412322 to 359152 (tested with 10 runs each looping 20 times over the file). Signed-off-by: Andreas Rheinhardt --- libavcodec/smacker.c | 46 +++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 6b1faec09e..19429f3b3e 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -62,14 +62,17 @@ typedef struct SmackVContext { int mmap_last[3], mclr_last[3], full_last[3], type_last[3]; } SmackVContext; +typedef struct HuffEntry { + uint8_t value; + uint8_t length; +} HuffEntry; + /** * Context used for code reconstructing */ typedef struct HuffContext { int current; - uint32_t bits[256]; - uint8_t lengths[256]; - uint8_t values[256]; + HuffEntry entries[256]; } HuffContext; /* common parameters used for decode_bigtree */ @@ -105,7 +108,7 @@ enum SmkBlockTypes { * Can read SMKTREE_DECODE_MAX_RECURSION before the first check; * does not overread gb on success. */ -static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, uint32_t prefix, int length) +static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) { if (length > SMKTREE_DECODE_MAX_RECURSION || length > 3 * SMKTREE_BITS) { av_log(NULL, AV_LOG_ERROR, "Maximum tree recursion level exceeded.\n"); @@ -119,18 +122,15 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, uint32_t pref } if (get_bits_left(gb) < 8) return AVERROR_INVALIDDATA; - hc->bits[hc->current] = prefix; - hc->lengths[hc->current] = length; - hc->values[hc->current] = get_bits(gb, 8); - hc->current++; + hc->entries[hc->current++] = (HuffEntry){ get_bits(gb, 8), length }; return 0; } else { //Node int r; length++; - r = smacker_decode_tree(gb, hc, prefix, length); + r = smacker_decode_tree(gb, hc, length); if(r) return r; - return smacker_decode_tree(gb, hc, prefix | (1U << (length - 1)), length); + return smacker_decode_tree(gb, hc, length); } } @@ -216,22 +216,21 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int i ? "high" : "low"); continue; } - err = smacker_decode_tree(gb, &h, 0, 0); + err = smacker_decode_tree(gb, &h, 0); if (err < 0) goto error; skip_bits1(gb); if (h.current > 1) { - err = ff_init_vlc_sparse(&vlc[i], SMKTREE_BITS, h.current, - h.lengths, sizeof(*h.lengths), sizeof(*h.lengths), - h.bits, sizeof(*h.bits), sizeof(*h.bits), - h.values, sizeof(*h.values), sizeof(*h.values), - INIT_VLC_LE); + err = ff_init_vlc_from_lengths(&vlc[i], SMKTREE_BITS, h.current, + &h.entries[0].length, sizeof(*h.entries), + &h.entries[0].value, sizeof(*h.entries), 1, + 0, INIT_VLC_OUTPUT_LE); if (err < 0) { av_log(smk->avctx, AV_LOG_ERROR, "Cannot build VLC table\n"); goto error; } } else - ctx.vals[i] = h.values[0]; + ctx.vals[i] = h.entries[0].value; } escapes[0] = get_bits(gb, 16); @@ -650,21 +649,20 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, HuffContext h; h.current = 0; skip_bits1(&gb); - if ((ret = smacker_decode_tree(&gb, &h, 0, 0)) < 0) + if ((ret = smacker_decode_tree(&gb, &h, 0)) < 0) goto error; skip_bits1(&gb); if (h.current > 1) { - ret = ff_init_vlc_sparse(&vlc[i], SMKTREE_BITS, h.current, - h.lengths, sizeof(*h.lengths), sizeof(*h.lengths), - h.bits, sizeof(*h.bits), sizeof(*h.bits), - h.values, sizeof(*h.values), sizeof(*h.values), - INIT_VLC_LE); + ret = ff_init_vlc_from_lengths(&vlc[i], SMKTREE_BITS, h.current, + &h.entries[0].length, sizeof(*h.entries), + &h.entries[0].value, sizeof(*h.entries), 1, + 0, INIT_VLC_OUTPUT_LE); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Cannot build VLC table\n"); goto error; } } else - values[i] = h.values[0]; + values[i] = h.entries[0].value; } /* this codec relies on wraparound instead of clipping audio */ if(bits) { //decode 16-bit data From patchwork Tue Nov 10 10:47:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23474 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 924DE449B06 for ; Tue, 10 Nov 2020 12:49:41 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 720E468BDC7; Tue, 10 Nov 2020 12:49:41 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A1A6068BD49 for ; Tue, 10 Nov 2020 12:49:31 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id p8so11336803wrx.5 for ; Tue, 10 Nov 2020 02:49:31 -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=ByED1vzkM8zKe83UgpLK87A5I5+Gw+qX2trXpVaMRjE=; b=ad/7AywIqKYB7ykjIAd3BNn3n1o21ienkDaM4xQD3QXLZcppZuh1t067SYTwN+mIb/ /BsQ2BtfNY5DfHkhTKI95XSPzvO8pBY7Yih7unZhNClOVOov8XH7G4rj4LM+HanrLnxB EJTIdSnsD5vCbgiifK9ucrgX+aH+T9RTHW1Mcqrc9oq/7KkiS6QtvmIe+V9NgwjRMLil wCkWhEJ8lWMik78aasr79QtyrUs3ctXbaOGo6M2xFnuqeCdXyL6y6w2Rn+7/r9cnIHhe 380vrxp8EqAlQ62eHuFUhIdusqYkpamaC97nqpPvVXYWRwWPGKLHbqx2AI3FnvYGWYCB krtg== 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=ByED1vzkM8zKe83UgpLK87A5I5+Gw+qX2trXpVaMRjE=; b=pRlIB3U8uwKiNFvNObQ2tXsuYw2VIEayRwR63xccZ8tERZd61hucYzQh4qaipBKgZM O1855r5CLeKxIwUehUUZNJKlWhV5w0uBCTE7weEMCgRcrrsnoY+VxrbkeCWFi14lKtHy mGxXvZO+08+FO/YfNNCGzWy5IGZc3pVAAdP8uOAHkLcRdLIxsx3x12gJ8o5O1gdRcKrq scUdAAzUOAEPTN8q9AQznSG9o/qh7S9uhnIdEZJIvx6RcEtZJBE1vnp0yq7VUKUOEPHW AwyeESy0+L17k/qJJoAsUPEwPnjHyZWMC3NkwRoGgAdIffWXvlDr/FIHsleqxg6JxCwm 269w== X-Gm-Message-State: AOAM53269n22iMy7nud4dTkkTOY8rtOUOw1lTQQ7xDYfBHEcn+OizPAe APCgziFSZWI21l64DY2ANqUcEul5aoE= X-Google-Smtp-Source: ABdhPJyDOXUhmVW4jek5E3mIK8CNbMrDYYp1+2iN4e0uIy3gE2oiCS9HctFM+ME+cWwcxDjaZZF0RQ== X-Received: by 2002:a5d:4448:: with SMTP id x8mr22811930wrr.364.1605005367596; Tue, 10 Nov 2020 02:49:27 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:26 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:05 +0100 Message-Id: <20201110104851.321029-9-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 008/114] avcodec/on2avc: Use smaller tables for 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" The On2 audio decoder uses huge tables to initialize VLC tables. These tables (mostly) use symbols tables in addition to the codes tables and the lengths tables. This commit makes the codes tables redundant and removes them: If all tables are permuted so that the codes are ordered from left to right in the Huffman tree, the codes become redundant and can be easily calculated at runtime from the lengths (via ff_init_vlc_from_lengths()); this also avoids sorting the codes in ff_init_vlc_sparse()*. The symbols tables are always 16bit, the codes tables are 32bit, 16bit or (rarely) 8bit, the lengths tables are always 8bit. Even though some symbols tables have been used twice (which is no longer possible now because different permutations need to be performed on the code tables sharing the same symbol table in order to order them from left to right), this nevertheless saves about 28KB. *: If the initializations of the VLCs are repeated 2048 times (interleaved with calls to free the VLCs which have not been timed), the number of decicycles spent on each round of initializations improves from 27669656 to 7356159. Signed-off-by: Andreas Rheinhardt --- libavcodec/on2avc.c | 23 +- libavcodec/on2avcdata.c | 8050 +++++++++++---------------------------- libavcodec/on2avcdata.h | 6 +- 3 files changed, 2224 insertions(+), 5855 deletions(-) diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c index 60adc32b9f..5e86c4d11a 100644 --- a/libavcodec/on2avc.c +++ b/libavcodec/on2avc.c @@ -906,7 +906,7 @@ static av_cold void on2avc_free_vlcs(On2AVCContext *c) static av_cold int on2avc_decode_init(AVCodecContext *avctx) { On2AVCContext *c = avctx->priv_data; - int i; + int i, ret; if (avctx->channels > 2U) { avpriv_request_sample(avctx, "Decoding more than 2 channels"); @@ -956,25 +956,24 @@ static av_cold int on2avc_decode_init(AVCodecContext *avctx) if (!c->fdsp) return AVERROR(ENOMEM); - if (init_vlc(&c->scale_diff, 9, ON2AVC_SCALE_DIFFS, - ff_on2avc_scale_diff_bits, 1, 1, - ff_on2avc_scale_diff_codes, 4, 4, 0)) { + ret = ff_init_vlc_from_lengths(&c->scale_diff, 9, ON2AVC_SCALE_DIFFS, + ff_on2avc_scale_diff_bits, 1, + ff_on2avc_scale_diff_syms, 1, 1, 0, 0); + if (ret < 0) goto vlc_fail; - } for (i = 1; i < 16; i++) { - int idx = i - 1, codes_size = ff_on2avc_cb_codes_sizes[idx]; - if (ff_init_vlc_sparse(&c->cb_vlc[i], 9, ff_on2avc_cb_elems[idx], - ff_on2avc_cb_bits[idx], 1, 1, - ff_on2avc_cb_codes[idx], codes_size, codes_size, - ff_on2avc_cb_syms[idx], 2, 2, 0)) { + int idx = i - 1; + ret = ff_init_vlc_from_lengths(&c->cb_vlc[i], 9, ff_on2avc_cb_elems[idx], + ff_on2avc_cb_bits[idx], 1, + ff_on2avc_cb_syms[idx], 2, 2, 0, 0); + if (ret < 0) goto vlc_fail; - } } return 0; vlc_fail: av_log(avctx, AV_LOG_ERROR, "Cannot init VLC\n"); - return AVERROR(ENOMEM); + return ret; } static av_cold int on2avc_decode_close(AVCodecContext *avctx) diff --git a/libavcodec/on2avcdata.c b/libavcodec/on2avcdata.c index 482cf5e5e9..52ede3f4da 100644 --- a/libavcodec/on2avcdata.c +++ b/libavcodec/on2avcdata.c @@ -110,5900 +110,2275 @@ const On2AVCMode ff_on2avc_modes_44[8] = { { 1, 49, on2avc_swb_start_long }, }; -const uint32_t ff_on2avc_scale_diff_codes[ON2AVC_SCALE_DIFFS] = { - 0x6FFFF, 0xBFFF2, 0xBFFF3, 0xBFFF4, 0xBFFF5, 0xBFFF6, - 0xBFFF7, 0xBFFF8, 0xBFFF9, 0xBFFFA, 0xBFFFB, 0xBFFFC, - 0xBFFFD, 0xBFFFE, 0xBFFFF, 0xDF9A0, 0xDF9A1, 0xDF9A2, - 0xDF9A3, 0xDF9A4, 0xDF9A5, 0xDF9A6, 0xDF9A7, 0xDF9A8, - 0xDF9A9, 0x37FFE, 0x6FCDE, 0x6FFFA, 0x0BFF7, 0x0B7FF, - 0x0DF9F, 0x05FF8, 0x0B7FE, 0x05FF9, 0x06FCE, 0x05BFE, - 0x037FE, 0x02DFE, 0x00DFA, 0x00DFE, 0x017FC, 0x00DBE, - 0x00B7E, 0x005FE, 0x0037D, 0x002DE, 0x0017E, 0x0016C, - 0x000DE, 0x000BE, 0x0006C, 0x0005A, 0x0003E, 0x00034, - 0x0002C, 0x0001F, 0x0000E, 0x0000E, 0x00006, 0x00002, - 0x00000, 0x00004, 0x0000A, 0x0000C, 0x0001E, 0x0001E, - 0x0002E, 0x00035, 0x0003F, 0x0005E, 0x0006E, 0x000DA, - 0x0016D, 0x0016E, 0x001B6, 0x002FE, 0x0036E, 0x0037C, - 0x005BE, 0x006DE, 0x006FE, 0x00DBF, 0x00DFB, 0x016FE, - 0x017FD, 0x01BFE, 0x01BF2, 0x02FFE, 0x06FCC, 0x05FFE, - 0x05FFA, 0x06FFE, 0x0BFF6, 0x0BFFE, 0x0DF9E, 0x00DF8, - 0x0DFFE, 0x37FFC, 0x6FFFB, 0x5FFF8, 0xDF9AA, 0xDF9AB, - 0xDF9AC, 0xDF9AD, 0xDF9AE, 0xDF9AF, 0xDF9B0, 0xDF9B1, - 0xDF9B2, 0xDF9B3, 0x6FFFE, 0xDF9B4, 0xDF9B5, 0xDF9B6, - 0xDF9B7, 0xDF9B8, 0xDF9B9, 0xDF9BA, 0xDF9BB, 0xDF9BE, - 0xDF9BF, +const uint8_t ff_on2avc_scale_diff_syms[ON2AVC_SCALE_DIFFS] = { + 60, 59, 63, 53, 67, 50, 71, 74, 76, 79, 41, 81, 70, 48, 77, + 44, 95, 86, 88, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 116, + 117, 118, 26, 119, 120, 34, 94, 30, 38, 82, 80, 39, 85, 36, 91, + 96, 97, 27, 98, 25, 110, 0, 56, 65, 52, 68, 61, 62, 54, 51, + 47, 72, 73, 45, 78, 42, 83, 37, 35, 32, 29, 66, 69, 49, 46, + 75, 43, 40, 84, 31, 33, 90, 92, 28, 87, 89, 93, 99, 1, 2, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 58, 57, 64, + 55 }; const uint8_t ff_on2avc_scale_diff_bits[ON2AVC_SCALE_DIFFS] = { - 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, - 20, 20, 20, 21, 21, 21, - 21, 21, 21, 21, 21, 21, - 21, 19, 20, 20, 16, 16, - 17, 15, 16, 15, 16, 15, - 15, 14, 13, 13, 13, 13, - 12, 11, 11, 10, 9, 9, - 9, 8, 8, 7, 7, 7, - 6, 5, 5, 4, 3, 3, - 2, 3, 4, 5, 5, 6, - 6, 7, 7, 7, 8, 9, - 9, 9, 10, 10, 11, 11, - 11, 12, 12, 13, 13, 13, - 13, 14, 14, 14, 16, 15, - 15, 16, 16, 16, 17, 13, - 17, 19, 20, 19, 21, 21, - 21, 21, 21, 21, 21, 21, - 21, 21, 20, 21, 21, 21, - 21, 21, 21, 21, 21, 21, - 21, + 2, 3, 5, 7, 7, 8, 9, 10, 11, 12, 13, 13, 8, 9, 11, 11, 13, 14, 16, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 21, 21, 16, 17, 17, 13, 13, 12, 13, + 14, 15, 16, 17, 19, 20, 20, 19, 20, 20, 5, 6, 7, 7, 3, 4, 6, 7, 9, + 9, 9, 10, 11, 12, 13, 14, 15, 16, 16, 6, 7, 8, 9, 10, 11, 13, 13, 15, + 15, 15, 16, 16, 14, 15, 16, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 3, 4, 5, 5 }; -#define ON2AVC_CB1_2_CODES 41 -static const uint16_t on2avc_cb1_codes[ON2AVC_CB1_2_CODES] = { - 0x0000, 0x0022, 0x001C, 0x001B, 0x0024, 0x0030, - 0x0029, 0x0027, 0x0021, 0x002B, 0x002E, 0x0020, - 0x0026, 0x0033, 0x0031, 0x002C, 0x002A, 0x001E, - 0x0094, 0x01FF, 0x01F7, 0x012E, 0x001A, 0x01F5, - 0x007E, 0x012C, 0x01FC, 0x002D, 0x0032, 0x0028, - 0x002F, 0x001D, 0x01FD, 0x012D, 0x007C, 0x01F4, - 0x0023, 0x012F, 0x01F6, 0x01FE, 0x0095, -}; - -static const uint8_t on2avc_cb1_bits[ON2AVC_CB1_2_CODES] = { - 1, 6, 5, 5, 6, 6, - 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 5, - 8, 9, 9, 9, 5, 9, - 7, 9, 9, 6, 6, 6, - 6, 5, 9, 9, 7, 9, - 6, 9, 9, 9, 8, -}; - -static const uint16_t on2avc_cb1_2_syms[ON2AVC_CB1_2_CODES] = { - 0x0000, 0x0011, 0x001F, 0x00F1, 0x00FF, 0x0101, - 0x010F, 0x0110, 0x01F0, 0x0F01, 0x0F0F, 0x0F10, - 0x0FF0, 0x1001, 0x100F, 0x1010, 0x10F0, 0x1100, - 0x1111, 0x111F, 0x11F1, 0x11FF, 0x1F00, 0x1F11, - 0x1F1F, 0x1FF1, 0x1FFF, 0xF001, 0xF00F, 0xF010, - 0xF0F0, 0xF100, 0xF111, 0xF11F, 0xF1F1, 0xF1FF, - 0xFF00, 0xFF11, 0xFF1F, 0xFFF1, 0xFFFF, -}; - -static const uint8_t on2avc_cb2_codes[ON2AVC_CB1_2_CODES] = { - 0x06, 0x03, 0x1F, 0x1E, 0x00, 0x14, - 0x09, 0x0E, 0x0D, 0x0C, 0x15, 0x08, - 0x10, 0x0F, 0x04, 0x12, 0x07, 0x16, - 0x05, 0x2F, 0x17, 0x06, 0x1D, 0x2C, - 0x5E, 0x14, 0x16, 0x06, 0x11, 0x0A, - 0x13, 0x1C, 0x2D, 0x15, 0x5F, 0x2E, - 0x02, 0x07, 0x5D, 0x5C, 0x04, -}; - -static const uint8_t on2avc_cb2_bits[ON2AVC_CB1_2_CODES] = { - 3, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, - 7, 7, 7, 7, 5, 7, - 7, 7, 7, 5, 5, 5, - 5, 5, 7, 7, 7, 7, - 5, 7, 7, 7, 7, -}; - -#define ON2AVC_CB3_4_CODES 313 -static const uint32_t on2avc_cb3_codes[ON2AVC_CB3_4_CODES] = { - 0x00000, 0x00044, 0x00042, 0x00034, 0x0002E, 0x000CD, - 0x002DF, 0x0024A, 0x000CC, 0x0022E, 0x002D6, 0x00031, - 0x0003B, 0x00048, 0x00052, 0x00056, 0x001B8, 0x00160, - 0x001FA, 0x0015E, 0x0015C, 0x0014E, 0x0003C, 0x0010C, - 0x00166, 0x000CA, 0x0324C, 0x00FDA, 0x003DE, 0x002DB, - 0x0057F, 0x02C9E, 0x008BF, 0x0037F, 0x021DC, 0x00B1E, - 0x002DE, 0x002D2, 0x000C8, 0x014D6, 0x03576, 0x002CA, - 0x002CF, 0x003DB, 0x007FE, 0x01F7E, 0x005A3, 0x008BE, - 0x02D7E, 0x002D3, 0x0037E, 0x0004D, 0x0004C, 0x00041, - 0x0016A, 0x0010D, 0x0015D, 0x0011F, 0x00162, 0x0021E, - 0x00055, 0x00161, 0x001BE, 0x0004E, 0x0004A, 0x0004B, - 0x003EE, 0x00352, 0x0043A, 0x0033E, 0x0035C, 0x0036C, - 0x00050, 0x0032F, 0x003D6, 0x00039, 0x0067E, 0x00536, - 0x000FE, 0x001F4, 0x0036D, 0x007EF, 0x00CFE, 0x002D0, - 0x00F8C, 0x00D96, 0x001E9, 0x001F6, 0x00476, 0x00367, - 0x001F2, 0x01FF6, 0x016BB, 0x007FC, 0x00D5C, 0x00B24, - 0x00C92, 0x0014F, 0x01EA6, 0x01936, 0x00366, 0x0035E, - 0x00116, 0x00FBE, 0x01B5E, 0x0092F, 0x007EE, 0x00CEE, - 0x00B26, 0x0011E, 0x014DF, 0x035DE, 0x00030, 0x00473, - 0x005A2, 0x001BC, 0x000D6, 0x002DA, 0x00B5E, 0x007AA, - 0x002C8, 0x00D94, 0x00D97, 0x001AA, 0x001EE, 0x0003A, - 0x035DF, 0x03D4F, 0x0064F, 0x0064A, 0x02D73, 0x1ABBE, - 0x0B1CF, 0x00F8E, 0x06AFF, 0x0475E, 0x00472, 0x00596, - 0x003E7, 0x0036E, 0x00196, 0x0357E, 0x03F6E, 0x0324E, - 0x0324F, 0x0163B, 0x0192F, 0x001B4, 0x0326A, 0x02C9F, - 0x0021F, 0x0F8FF, 0x064D6, 0x007BE, 0x00DDF, 0x033BC, - 0x033BD, 0x06AEE, 0x00876, 0x07C7E, 0x0B1CE, 0x00D76, - 0x00DDC, 0x001EC, 0x0649B, 0x0B1CD, 0x00F8D, 0x007D6, - 0x01AEE, 0x0163F, 0x03E3E, 0x00A6A, 0x06D7E, 0x0DDDF, - 0x00F7E, 0x00DAE, 0x0036F, 0x00338, 0x0016C, 0x033BF, - 0x036BE, 0x01FF7, 0x01937, 0x01ABA, 0x014D7, 0x0014C, - 0x01F7F, 0x0475F, 0x00040, 0x07FFC, 0x03F6F, 0x00477, - 0x00496, 0x014DE, 0x0649A, 0x064D7, 0x02C9C, 0x0B1CC, - 0x1ABBF, 0x00648, 0x006BA, 0x00364, 0x0032E, 0x00126, - 0x03D4E, 0x02C72, 0x011D6, 0x01638, 0x01934, 0x02C9D, - 0x0016E, 0x021DD, 0x03DFF, 0x001F0, 0x07FFE, 0x043BF, - 0x00D5E, 0x00FAE, 0x0092E, 0x07FFF, 0x0F8FE, 0x02D7F, - 0x043BE, 0x06D7F, 0x008E9, 0x00FFA, 0x0021C, 0x06EEE, - 0x0D5DE, 0x00F57, 0x00CFF, 0x016BA, 0x07FFD, 0x06AFE, - 0x021DE, 0x0DDDE, 0x023AE, 0x00FAF, 0x006D6, 0x0037B, - 0x003E6, 0x001B9, 0x01F1E, 0x033BE, 0x0192E, 0x016BE, - 0x01FB6, 0x01BBA, 0x0019E, 0x03776, 0x03DFE, 0x00046, - 0x00051, 0x0004F, 0x003D7, 0x0033A, 0x00376, 0x00353, - 0x00356, 0x003EA, 0x00054, 0x00339, 0x003E2, 0x0002F, - 0x0064C, 0x00534, 0x00238, 0x001A8, 0x002C6, 0x00D95, - 0x00F52, 0x002CE, 0x007DE, 0x00B2F, 0x000D8, 0x001BA, - 0x0036A, 0x0035F, 0x00127, 0x01EFE, 0x016B8, 0x008EA, - 0x00CEC, 0x007EC, 0x00A6E, 0x00114, 0x01ABE, 0x00FFE, - 0x0037A, 0x0045E, 0x00124, 0x0163E, 0x02D72, 0x00CED, - 0x00B2E, 0x00C96, 0x007A8, 0x001FE, 0x0163A, 0x01FFE, - 0x00038, 0x0057E, 0x0064E, 0x001F8, 0x001E8, 0x002BE, - 0x00DDE, 0x00F56, 0x003DA, 0x00B25, 0x008E8, 0x001F9, - 0x00115, -}; - -static const uint8_t on2avc_cb3_bits[ON2AVC_CB3_4_CODES] = { - 1, 7, 7, 6, 6, 8, - 10, 10, 8, 10, 10, 6, - 6, 7, 7, 7, 9, 9, - 9, 9, 9, 9, 6, 9, - 9, 8, 14, 12, 10, 10, - 11, 14, 12, 10, 14, 12, - 10, 10, 8, 13, 14, 10, - 10, 10, 11, 13, 11, 12, - 14, 10, 10, 7, 7, 7, - 9, 9, 9, 9, 9, 10, - 7, 9, 9, 7, 7, 7, - 10, 10, 11, 10, 10, 10, - 7, 10, 10, 6, 11, 11, - 8, 9, 10, 11, 12, 10, - 12, 12, 9, 9, 11, 10, - 9, 13, 13, 11, 12, 12, - 12, 9, 13, 13, 10, 10, - 9, 12, 13, 12, 11, 12, - 12, 9, 13, 14, 6, 11, - 11, 9, 8, 10, 12, 11, - 10, 12, 12, 9, 9, 6, - 14, 14, 11, 11, 14, 17, - 16, 12, 15, 15, 11, 11, - 10, 10, 9, 14, 14, 14, - 14, 13, 13, 9, 14, 14, - 10, 16, 15, 11, 12, 14, - 14, 15, 12, 15, 16, 12, - 12, 9, 15, 16, 12, 11, - 13, 13, 14, 12, 15, 16, - 12, 12, 10, 10, 9, 14, - 14, 13, 13, 13, 13, 9, - 13, 15, 7, 15, 14, 11, - 11, 13, 15, 15, 14, 16, - 17, 11, 11, 10, 10, 9, - 14, 14, 13, 13, 13, 14, - 9, 14, 14, 9, 15, 15, - 12, 12, 12, 15, 16, 14, - 15, 15, 12, 12, 10, 15, - 16, 12, 12, 13, 15, 15, - 14, 16, 14, 12, 11, 10, - 10, 9, 13, 14, 13, 13, - 13, 13, 9, 14, 14, 7, - 7, 7, 10, 10, 10, 10, - 10, 10, 7, 10, 10, 6, - 11, 11, 10, 9, 10, 12, - 12, 10, 11, 12, 8, 9, - 10, 10, 9, 13, 13, 12, - 12, 11, 12, 9, 13, 12, - 10, 11, 9, 13, 14, 12, - 12, 12, 11, 9, 13, 13, - 6, 11, 11, 9, 9, 10, - 12, 12, 10, 12, 12, 9, - 9, -}; - -static const uint16_t on2avc_cb3_4_syms[ON2AVC_CB3_4_CODES] = { - 0x0000, 0x0002, 0x000E, 0x0011, 0x001F, 0x0020, - 0x0022, 0x002E, 0x00E0, 0x00E2, 0x00EE, 0x00F1, - 0x00FF, 0x0101, 0x010F, 0x0110, 0x0112, 0x011E, - 0x0121, 0x012F, 0x01E1, 0x01EF, 0x01F0, 0x01F2, - 0x01FE, 0x0200, 0x0202, 0x020E, 0x0211, 0x021F, - 0x0220, 0x0222, 0x022E, 0x02E0, 0x02E2, 0x02EE, - 0x02F1, 0x02FF, 0x0E00, 0x0E02, 0x0E0E, 0x0E11, - 0x0E1F, 0x0E20, 0x0E22, 0x0E2E, 0x0EE0, 0x0EE2, - 0x0EEE, 0x0EF1, 0x0EFF, 0x0F01, 0x0F0F, 0x0F10, - 0x0F12, 0x0F1E, 0x0F21, 0x0F2F, 0x0FE1, 0x0FEF, - 0x0FF0, 0x0FF2, 0x0FFE, 0x1001, 0x100F, 0x1010, - 0x1012, 0x101E, 0x1021, 0x102F, 0x10E1, 0x10EF, - 0x10F0, 0x10F2, 0x10FE, 0x1100, 0x1102, 0x110E, - 0x1111, 0x111F, 0x1120, 0x1122, 0x112E, 0x11E0, - 0x11E2, 0x11EE, 0x11F1, 0x11FF, 0x1201, 0x120F, - 0x1210, 0x1212, 0x121E, 0x1221, 0x122F, 0x12E1, - 0x12EF, 0x12F0, 0x12F2, 0x12FE, 0x1E01, 0x1E0F, - 0x1E10, 0x1E12, 0x1E1E, 0x1E21, 0x1E2F, 0x1EE1, - 0x1EEF, 0x1EF0, 0x1EF2, 0x1EFE, 0x1F00, 0x1F02, - 0x1F0E, 0x1F11, 0x1F1F, 0x1F20, 0x1F22, 0x1F2E, - 0x1FE0, 0x1FE2, 0x1FEE, 0x1FF1, 0x1FFF, 0x2000, - 0x2002, 0x200E, 0x2011, 0x201F, 0x2020, 0x2022, - 0x202E, 0x20E0, 0x20E2, 0x20EE, 0x20F1, 0x20FF, - 0x2101, 0x210F, 0x2110, 0x2112, 0x211E, 0x2121, - 0x212F, 0x21E1, 0x21EF, 0x21F0, 0x21F2, 0x21FE, - 0x2200, 0x2202, 0x220E, 0x2211, 0x221F, 0x2220, - 0x2222, 0x222E, 0x22E0, 0x22E2, 0x22EE, 0x22F1, - 0x22FF, 0x2E00, 0x2E02, 0x2E0E, 0x2E11, 0x2E1F, - 0x2E20, 0x2E22, 0x2E2E, 0x2EE0, 0x2EE2, 0x2EEE, - 0x2EF1, 0x2EFF, 0x2F01, 0x2F0F, 0x2F10, 0x2F12, - 0x2F1E, 0x2F21, 0x2F2F, 0x2FE1, 0x2FEF, 0x2FF0, - 0x2FF2, 0x2FFE, 0xE000, 0xE002, 0xE00E, 0xE011, - 0xE01F, 0xE020, 0xE022, 0xE02E, 0xE0E0, 0xE0E2, - 0xE0EE, 0xE0F1, 0xE0FF, 0xE101, 0xE10F, 0xE110, - 0xE112, 0xE11E, 0xE121, 0xE12F, 0xE1E1, 0xE1EF, - 0xE1F0, 0xE1F2, 0xE1FE, 0xE200, 0xE202, 0xE20E, - 0xE211, 0xE21F, 0xE220, 0xE222, 0xE22E, 0xE2E0, - 0xE2E2, 0xE2EE, 0xE2F1, 0xE2FF, 0xEE00, 0xEE02, - 0xEE0E, 0xEE11, 0xEE1F, 0xEE20, 0xEE22, 0xEE2E, - 0xEEE0, 0xEEE2, 0xEEEE, 0xEEF1, 0xEEFF, 0xEF01, - 0xEF0F, 0xEF10, 0xEF12, 0xEF1E, 0xEF21, 0xEF2F, - 0xEFE1, 0xEFEF, 0xEFF0, 0xEFF2, 0xEFFE, 0xF001, - 0xF00F, 0xF010, 0xF012, 0xF01E, 0xF021, 0xF02F, - 0xF0E1, 0xF0EF, 0xF0F0, 0xF0F2, 0xF0FE, 0xF100, - 0xF102, 0xF10E, 0xF111, 0xF11F, 0xF120, 0xF122, - 0xF12E, 0xF1E0, 0xF1E2, 0xF1EE, 0xF1F1, 0xF1FF, - 0xF201, 0xF20F, 0xF210, 0xF212, 0xF21E, 0xF221, - 0xF22F, 0xF2E1, 0xF2EF, 0xF2F0, 0xF2F2, 0xF2FE, - 0xFE01, 0xFE0F, 0xFE10, 0xFE12, 0xFE1E, 0xFE21, - 0xFE2F, 0xFEE1, 0xFEEF, 0xFEF0, 0xFEF2, 0xFEFE, - 0xFF00, 0xFF02, 0xFF0E, 0xFF11, 0xFF1F, 0xFF20, - 0xFF22, 0xFF2E, 0xFFE0, 0xFFE2, 0xFFEE, 0xFFF1, - 0xFFFF, -}; - -static const uint16_t on2avc_cb4_codes[ON2AVC_CB3_4_CODES] = { - 0x000A, 0x013B, 0x0127, 0x0004, 0x0015, 0x012C, - 0x065F, 0x08CD, 0x016A, 0x08E7, 0x06BA, 0x001B, - 0x001D, 0x0018, 0x000A, 0x0002, 0x00C0, 0x012B, - 0x00CE, 0x013C, 0x012A, 0x012D, 0x0020, 0x0128, - 0x0121, 0x00FC, 0x066B, 0x0472, 0x010A, 0x004E, - 0x06AE, 0x063F, 0x1ABF, 0x0B4E, 0x084E, 0x1ABE, - 0x010E, 0x0094, 0x00C8, 0x0464, 0x069A, 0x00C9, - 0x00FA, 0x041B, 0x2FDE, 0x08CB, 0x05B7, 0x1ABD, - 0x066A, 0x008D, 0x00F8, 0x0003, 0x001A, 0x001E, - 0x0120, 0x011E, 0x0138, 0x0125, 0x0170, 0x00C4, - 0x000B, 0x013E, 0x00C5, 0x000C, 0x000E, 0x001C, - 0x00FE, 0x009C, 0x010F, 0x0115, 0x009F, 0x008C, - 0x0008, 0x002E, 0x00CF, 0x001C, 0x0110, 0x002F, - 0x002C, 0x0002, 0x0116, 0x01FE, 0x032D, 0x00CB, - 0x030D, 0x02EC, 0x002E, 0x0037, 0x00CF, 0x0086, - 0x00C8, 0x032C, 0x031E, 0x01AC, 0x030C, 0x02ED, - 0x035C, 0x013A, 0x02FF, 0x02E2, 0x00BE, 0x00CE, - 0x0126, 0x0356, 0x034E, 0x0347, 0x025F, 0x0306, - 0x02DA, 0x0168, 0x02E7, 0x020F, 0x0016, 0x0081, - 0x0114, 0x0024, 0x001B, 0x010C, 0x03FE, 0x027F, - 0x0084, 0x02F9, 0x0237, 0x0000, 0x001A, 0x011A, - 0x05A6, 0x04A6, 0x00F9, 0x00CC, 0x05B6, 0x0BF6, - 0x0B96, 0x0446, 0x08CE, 0x007F, 0x002C, 0x000E, - 0x0080, 0x00C9, 0x00BA, 0x035E, 0x03EF, 0x0345, - 0x02FE, 0x02FB, 0x02E6, 0x00D2, 0x021C, 0x0238, - 0x06BB, 0x0B97, 0x007E, 0x01AA, 0x023A, 0x05BE, - 0x031D, 0x094E, 0x1ABC, 0x0948, 0x088E, 0x02E4, - 0x0273, 0x084C, 0x08CC, 0x094B, 0x02D2, 0x023B, - 0x043E, 0x2FDF, 0x063E, 0x109B, 0x08CA, 0x08E6, - 0x02DE, 0x02F4, 0x00D4, 0x002D, 0x00CA, 0x020E, - 0x0344, 0x02FD, 0x030F, 0x02EE, 0x02D6, 0x0123, - 0x02F7, 0x03ED, 0x009E, 0x05CA, 0x060E, 0x000D, - 0x004D, 0x0444, 0x043F, 0x094A, 0x05FA, 0x109A, - 0x0B4F, 0x00FD, 0x0117, 0x0096, 0x0082, 0x0122, - 0x025D, 0x0304, 0x034C, 0x027B, 0x035B, 0x02FC, - 0x00FC, 0x035F, 0x03EE, 0x088B, 0x0C1E, 0x088A, - 0x02F5, 0x0272, 0x17EE, 0x0C1F, 0x084F, 0x088F, - 0x069B, 0x0949, 0x023F, 0x02E3, 0x07FE, 0x041A, - 0x0B7E, 0x027A, 0x0336, 0x07FF, 0x08CF, 0x094F, - 0x065E, 0x0B7F, 0x02DD, 0x0212, 0x01FB, 0x00C6, - 0x0095, 0x00D0, 0x023E, 0x025C, 0x02FC, 0x032E, - 0x025E, 0x021E, 0x00BC, 0x021D, 0x035A, 0x0007, - 0x000F, 0x0006, 0x00C2, 0x000C, 0x00BD, 0x00CD, - 0x0113, 0x0118, 0x001D, 0x00CA, 0x008E, 0x0014, - 0x010D, 0x0085, 0x0001, 0x003E, 0x008F, 0x0236, - 0x030E, 0x00FF, 0x025E, 0x0337, 0x000A, 0x0026, - 0x010B, 0x009D, 0x012E, 0x025F, 0x02EF, 0x0305, - 0x02DC, 0x027E, 0x02FE, 0x0124, 0x034F, 0x003E, - 0x004F, 0x00BC, 0x016C, 0x02D7, 0x03EC, 0x02FA, - 0x02F8, 0x02F6, 0x01FA, 0x00CC, 0x02FF, 0x0334, - 0x001E, 0x004C, 0x0112, 0x0036, 0x0022, 0x00FE, - 0x031C, 0x0346, 0x0108, 0x020C, 0x001E, 0x0012, - 0x0026, -}; - -static const uint8_t on2avc_cb4_bits[ON2AVC_CB3_4_CODES] = { - 4, 9, 9, 6, 6, 9, - 11, 12, 9, 12, 11, 6, - 5, 6, 6, 6, 8, 9, - 8, 9, 9, 9, 6, 9, - 9, 9, 11, 11, 9, 9, - 11, 11, 13, 12, 12, 13, - 9, 9, 9, 11, 11, 9, - 9, 12, 14, 12, 11, 13, - 11, 9, 9, 6, 6, 6, - 9, 9, 9, 9, 9, 8, - 6, 9, 8, 6, 6, 6, - 8, 9, 9, 9, 9, 9, - 6, 9, 8, 5, 9, 9, - 6, 7, 9, 9, 10, 9, - 10, 10, 7, 6, 9, 9, - 8, 10, 10, 9, 10, 10, - 10, 9, 11, 10, 9, 9, - 9, 10, 10, 10, 10, 10, - 10, 9, 10, 11, 6, 9, - 9, 7, 7, 9, 10, 10, - 9, 10, 10, 7, 7, 9, - 11, 11, 9, 9, 11, 12, - 12, 11, 12, 12, 9, 9, - 9, 8, 8, 10, 11, 10, - 11, 10, 10, 8, 11, 10, - 11, 12, 12, 9, 10, 11, - 10, 12, 13, 12, 12, 10, - 10, 12, 12, 12, 10, 10, - 12, 14, 11, 13, 12, 12, - 10, 10, 8, 9, 8, 11, - 10, 11, 10, 10, 10, 9, - 10, 11, 9, 11, 11, 9, - 9, 11, 12, 12, 11, 13, - 12, 9, 9, 9, 9, 9, - 11, 10, 10, 10, 10, 11, - 8, 10, 11, 12, 12, 12, - 10, 10, 13, 12, 12, 12, - 11, 12, 10, 10, 11, 12, - 12, 10, 10, 11, 12, 12, - 11, 12, 10, 10, 9, 8, - 9, 8, 10, 11, 10, 10, - 11, 11, 8, 11, 10, 6, - 6, 6, 8, 9, 9, 9, - 9, 9, 6, 9, 9, 6, - 9, 9, 7, 6, 9, 10, - 10, 9, 10, 10, 7, 7, - 9, 9, 9, 11, 10, 10, - 10, 10, 10, 9, 10, 11, - 9, 9, 9, 10, 11, 10, - 10, 10, 9, 8, 10, 10, - 5, 9, 9, 6, 7, 9, - 10, 10, 9, 11, 10, 7, - 6, -}; - -#define ON2AVC_CB5_6_CODES 1201 -static const uint32_t on2avc_cb5_codes[ON2AVC_CB5_6_CODES] = { - 0x00000, 0x000D6, 0x000E2, 0x00044, 0x0009E, 0x0009A, - 0x0003A, 0x004E6, 0x00A29, 0x007FE, 0x0024A, 0x004EE, - 0x00496, 0x001EE, 0x001C8, 0x008FA, 0x0050F, 0x001EF, - 0x00486, 0x00906, 0x00904, 0x0003E, 0x00094, 0x000A6, - 0x00046, 0x00061, 0x0012A, 0x0020D, 0x00060, 0x00066, - 0x00452, 0x00692, 0x0087E, 0x00242, 0x0050C, 0x008BE, - 0x0024C, 0x0045A, 0x0025A, 0x001C6, 0x002EE, 0x00294, - 0x006CE, 0x001EC, 0x00492, 0x00690, 0x00055, 0x00474, - 0x0063E, 0x00524, 0x04802, 0x04DC5, 0x00DEF, 0x01A62, - 0x00E6A, 0x00A7F, 0x027FB, 0x034B5, 0x036C5, 0x00A3A, - 0x036C6, 0x0219B, 0x00296, 0x0090F, 0x027FA, 0x028C8, - 0x0052A, 0x0127E, 0x0598E, 0x034B4, 0x00C78, 0x0146E, - 0x00F5F, 0x00BAA, 0x00432, 0x0FF63, 0x0598F, 0x0091C, - 0x00257, 0x0240B, 0x014E6, 0x00E6B, 0x05173, 0x01647, - 0x007F9, 0x022F3, 0x04DC6, 0x022F2, 0x0087F, 0x036C7, - 0x01AB9, 0x00C79, 0x06944, 0x043C6, 0x0043E, 0x00218, - 0x031C4, 0x014E5, 0x0093E, 0x0FF62, 0x3FAE0, 0x00328, - 0x00228, 0x01428, 0x03FEA, 0x007A3, 0x034B3, 0x0D23B, - 0x00B29, 0x01AB8, 0x028C7, 0x0598D, 0x00B28, 0x0149B, - 0x0149A, 0x008EE, 0x027F9, 0x07FC0, 0x00CFE, 0x0025E, - 0x01CBB, 0x026EF, 0x00512, 0x0297B, 0x05172, 0x00D36, - 0x00FCA, 0x01EA5, 0x00D86, 0x01FC5, 0x031C3, 0x02CD6, - 0x00276, 0x01F8A, 0x04801, 0x00B2A, 0x00329, 0x00FC9, - 0x03F0C, 0x00D35, 0x01971, 0x04DC4, 0x036C4, 0x00A4F, - 0x00FEA, 0x01FC4, 0x0122A, 0x00058, 0x001CA, 0x0013A, - 0x0005E, 0x00054, 0x0053E, 0x0039E, 0x006C6, 0x00284, - 0x001C2, 0x0087A, 0x0020E, 0x0050E, 0x006F2, 0x00288, - 0x0029E, 0x00457, 0x006F9, 0x005D3, 0x00248, 0x008F7, - 0x00068, 0x0069D, 0x00497, 0x0005F, 0x0091D, 0x00738, - 0x00057, 0x0005A, 0x00A3E, 0x009CF, 0x00D3E, 0x00D87, - 0x00C6B, 0x00CBD, 0x003F6, 0x00A74, 0x00C6E, 0x0049C, - 0x012FE, 0x0137F, 0x00DBB, 0x010DA, 0x00CAB, 0x0127F, - 0x00056, 0x00A2A, 0x0083E, 0x00040, 0x00BAE, 0x00BA2, - 0x0012E, 0x006F0, 0x0096E, 0x0022C, 0x00FDE, 0x011EB, - 0x01ABE, 0x007EA, 0x014E7, 0x011F2, 0x00256, 0x009FC, - 0x0297C, 0x01C13, 0x006F4, 0x00B26, 0x0144E, 0x021EE, - 0x001C0, 0x00707, 0x00B3F, 0x00244, 0x00E0B, 0x02CD8, - 0x034B6, 0x00B2B, 0x00914, 0x027FD, 0x028CA, 0x01396, - 0x014EB, 0x01972, 0x01B71, 0x013BE, 0x00D9A, 0x00D3F, - 0x009C9, 0x014EA, 0x031C6, 0x022F5, 0x027FC, 0x0240D, - 0x0297D, 0x006F5, 0x02CD7, 0x0396A, 0x0018C, 0x04DC7, - 0x028CB, 0x007E7, 0x0D23C, 0x043C8, 0x008FC, 0x00C7A, - 0x031C7, 0x018EB, 0x0396B, 0x0D23D, 0x036C9, 0x01973, - 0x018EA, 0x07FC1, 0x08FD8, 0x01673, 0x0067C, 0x027FE, - 0x036C8, 0x004BE, 0x08FD9, 0x07FC2, 0x009B6, 0x00148, - 0x026F0, 0x05174, 0x0071C, 0x07279, 0x08FD7, 0x005D4, - 0x00E0A, 0x01A63, 0x01F8B, 0x0114E, 0x01ABA, 0x05990, - 0x043C7, 0x01BEE, 0x3FAE1, 0x1FE94, 0x01CBE, 0x006F3, - 0x018E7, 0x0240C, 0x006FA, 0x03967, 0x08FD6, 0x0045B, - 0x00DBA, 0x01A65, 0x03969, 0x00CFF, 0x0067E, 0x026F1, - 0x028C9, 0x022F4, 0x018D2, 0x01B70, 0x011EA, 0x00BBF, - 0x00B3E, 0x0144D, 0x00D3D, 0x0146F, 0x01A64, 0x01FFF, - 0x01B6F, 0x03968, 0x024EB, 0x00656, 0x031C5, 0x0727A, - 0x0003C, 0x00D22, 0x00D99, 0x0021A, 0x00706, 0x007EE, - 0x0013E, 0x00CBC, 0x01C12, 0x01A66, 0x0022E, 0x00E77, - 0x01672, 0x004D8, 0x006D3, 0x01CBF, 0x01ABB, 0x008BF, - 0x00E76, 0x01BEF, 0x01FC6, 0x001B2, 0x00736, 0x008FB, - 0x0021D, 0x000D7, 0x04804, 0x06948, 0x00D37, 0x0396E, - 0x06949, 0x0120A, 0x03F0F, 0x1437E, 0x043CB, 0x028D0, - 0x0A2BE, 0x08FDD, 0x05996, 0x022F6, 0x1FE96, 0x0FF64, - 0x026F2, 0x028CF, 0x04DCB, 0x03F0E, 0x00A3F, 0x05178, - 0x05995, 0x00BA3, 0x00A4A, 0x07FC8, 0x0727E, 0x007AA, - 0x003D0, 0x0599A, 0x02CDB, 0x034BB, 0x07FC9, 0x0D261, - 0x04805, 0x04806, 0x0727F, 0x022F7, 0x018FE, 0x0240F, - 0x02CDA, 0x031CB, 0x04DCC, 0x034BA, 0x036CB, 0x0052B, - 0x05997, 0x036CE, 0x00907, 0x08FDF, 0x043CD, 0x00E7E, - 0x0517A, 0x04DCD, 0x0197E, 0x0A2BF, 0x028D1, 0x04807, - 0x028D2, 0x04808, 0x0D262, 0x024ED, 0x01ABF, 0x072C0, - 0x1437F, 0x034BE, 0x05179, 0x144F0, 0x072C1, 0x029C1, - 0x08FDE, 0x043CC, 0x023AE, 0x00A3B, 0x1FE97, 0x08FE1, - 0x0142A, 0x006AC, 0x04809, 0x024EE, 0x00C7B, 0x3FAE3, - 0x08FE2, 0x01F8F, 0x0A2C0, 0x023AF, 0x08FE3, 0x02416, - 0x072C2, 0x0FF65, 0x00FCB, 0x08FE0, 0x144F1, 0x01EA6, - 0x00590, 0x04DCE, 0x0396F, 0x01FC7, 0x05991, 0x3FAE2, - 0x0096C, 0x00657, 0x034B8, 0x05992, 0x0240E, 0x0A2BC, - 0x08FDA, 0x0114F, 0x0727C, 0x06945, 0x05175, 0x01B72, - 0x0727B, 0x07FC3, 0x01472, 0x0A2BB, 0x0D23E, 0x00CBE, - 0x00636, 0x034B7, 0x043C9, 0x008AA, 0x08FDB, 0x0D23F, - 0x02852, 0x0727D, 0x05994, 0x00E3E, 0x031CA, 0x06947, - 0x04DC8, 0x02CD9, 0x1FE95, 0x0D260, 0x028CD, 0x024EC, - 0x04803, 0x07FC4, 0x01976, 0x028CC, 0x05993, 0x07FC5, - 0x027FF, 0x06946, 0x03FEB, 0x03F0D, 0x0096D, 0x08FDC, - 0x04DC9, 0x0097E, 0x003D3, 0x0A2BD, 0x0286E, 0x07FC6, - 0x07FC7, 0x034B9, 0x029C0, 0x01F8E, 0x04DCA, 0x05177, - 0x01977, 0x03FEE, 0x0297E, 0x028CE, 0x036CA, 0x05176, - 0x0297F, 0x00596, 0x02853, 0x043CA, 0x0090E, 0x144FA, - 0x0D26A, 0x008AB, 0x000CE, 0x072C3, 0x034BF, 0x02417, - 0x3FAF0, 0x3FAEF, 0x026F3, 0x1FEA0, 0x3FAF1, 0x1FE9F, - 0x0D269, 0x0FF6A, 0x1FE9D, 0x029C6, 0x3FAEE, 0x1FE9E, - 0x036CF, 0x001AA, 0x0480E, 0x0A2C7, 0x000A0, 0x07FCE, - 0x3FAF4, 0x008F8, 0x3FAF5, 0x144FB, 0x00A16, 0x024EF, - 0x04DD3, 0x0694E, 0x1FEA2, 0x3FAF7, 0x3FAF6, 0x0D26B, - 0x04DD2, 0x3FAF2, 0x1FEA1, 0x08FE6, 0x0122B, 0x08FE7, - 0x0480F, 0x00C6F, 0x0FF6B, 0x3FAF3, 0x008EF, 0x00C7E, - 0x3FAF8, 0x1FEA4, 0x00DF6, 0x00362, 0x0694F, 0x0599B, - 0x0142B, 0x1FEA6, 0x1FEA5, 0x03FEF, 0x07FCF, 0x1FEA7, - 0x3FAF9, 0x029C7, 0x0D26E, 0x144FE, 0x01C3E, 0x1FEA3, - 0x0A2CA, 0x01CE6, 0x0049E, 0x043CF, 0x04EFE, 0x0036B, - 0x3FAFE, 0x11F32, 0x01EAE, 0x1FEAA, 0x0D26F, 0x049D2, - 0x02EAE, 0x0356A, 0x08FEA, 0x07ABE, 0x08FEB, 0x3FAFF, - 0x1FEAB, 0x0292E, 0x144FF, 0x3FAFA, 0x08FE8, 0x01EA7, - 0x0B27A, 0x0A2CB, 0x0164E, 0x3FAFB, 0x08FE9, 0x021EF, - 0x00A76, 0x1FE9A, 0x144F2, 0x029C3, 0x3FAE8, 0x3FAE7, - 0x014EE, 0x03F12, 0x0D264, 0x08FE4, 0x0FF67, 0x1FE9B, - 0x144F3, 0x0FF66, 0x0D263, 0x3FAE5, 0x3FAE4, 0x029C2, - 0x031FE, 0x0A2C1, 0x1FE98, 0x01FD6, 0x3FAE6, 0x1FE99, - 0x01473, 0x00D9B, 0x144F5, 0x144F4, 0x00FD2, 0x0036A, - 0x043CE, 0x03F13, 0x0517B, 0x0D267, 0x144F6, 0x01756, - 0x0A2C2, 0x144F8, 0x144F7, 0x0480A, 0x0FF68, 0x0D265, - 0x01B73, 0x0D266, 0x3FAE9, 0x01A67, 0x00493, 0x0694B, - 0x0694A, 0x00082, 0x03F7E, 0x04DCF, 0x009B7, 0x3FAEB, - 0x1FE9C, 0x0071D, 0x028D3, 0x0D268, 0x0A2C5, 0x0A2C6, - 0x3FAED, 0x3FAEC, 0x08FE5, 0x07FCA, 0x3FAEA, 0x144F9, - 0x0A2C3, 0x00D3C, 0x07FCB, 0x0480B, 0x009CA, 0x0FF69, - 0x0A2C4, 0x0091E, 0x007EB, 0x1FE85, 0x0FF56, 0x0091F, - 0x0019E, 0x0693A, 0x0593E, 0x020FC, 0x1FE86, 0x0FF57, - 0x027F4, 0x0146A, 0x04BFC, 0x0CBF9, 0x0CBF8, 0x1FE83, - 0x3F7F5, 0x08F9E, 0x3F7F6, 0x1FE84, 0x036C0, 0x00098, - 0x0593C, 0x071F9, 0x0006E, 0x0593F, 0x03963, 0x00A3C, - 0x13BFD, 0x1FE89, 0x007F2, 0x00FD3, 0x03F08, 0x03D5E, - 0x034A9, 0x13BFF, 0x13BFE, 0x071FA, 0x011E8, 0x1FE87, - 0x3F7F7, 0x0FF58, 0x01B66, 0x07FB8, 0x05168, 0x0070E, - 0x0FF59, 0x1FE88, 0x009B3, 0x00BBC, 0x1FE8B, 0x3F7F8, - 0x00FE6, 0x004FC, 0x0CBFC, 0x03FE6, 0x022F0, 0x1FE8C, - 0x0CBFD, 0x01CE7, 0x08F9F, 0x0FF5A, 0x071FD, 0x1FE8A, - 0x071FB, 0x14378, 0x01AB4, 0x0CBFB, 0x0CBFA, 0x036C1, - 0x0037E, 0x05980, 0x071FC, 0x00D5E, 0x3F7FC, 0x08FD0, - 0x014EF, 0x3F7FE, 0x3F7FD, 0x01CFE, 0x01FBE, 0x05982, - 0x1437A, 0x04BFD, 0x1FE8E, 0x3F7FF, 0x071FF, 0x0FF5B, - 0x1FE8D, 0x3F7F9, 0x14379, 0x047F7, 0x05981, 0x071FE, - 0x014E2, 0x3F7FB, 0x3F7FA, 0x02CCE, 0x0037F, 0x0A27E, - 0x3D5FA, 0x02CCC, 0x1FE80, 0x1FD7E, 0x01496, 0x018E4, - 0x3D5FB, 0x05164, 0x070FD, 0x3D5FC, 0x11F33, 0x0277E, - 0x0FF54, 0x08F98, 0x07FB6, 0x070FC, 0x026E8, 0x07FB7, - 0x034A6, 0x0356B, 0x3D5F9, 0x3D5F8, 0x034A8, 0x0114C, - 0x3F7F0, 0x3D5FF, 0x00C74, 0x0024D, 0x05167, 0x049D3, - 0x0292F, 0x08F9C, 0x3F7F1, 0x01CB6, 0x03962, 0x070FF, - 0x08F9D, 0x08F9A, 0x3D5FD, 0x0A2B0, 0x024E8, 0x070FE, - 0x3D5FE, 0x01A5E, 0x00392, 0x08F9B, 0x05166, 0x00099, - 0x06939, 0x06938, 0x009B2, 0x0C7FE, 0x3F7F4, 0x007F7, - 0x011D6, 0x02EAF, 0x028BE, 0x071F8, 0x0C7FF, 0x1FE82, - 0x047F6, 0x06936, 0x3F7F3, 0x3F7F2, 0x1FE81, 0x026EA, - 0x0C7FC, 0x0B27B, 0x009FA, 0x0C7FD, 0x13BFC, 0x007A8, - 0x000D4, 0x08FD1, 0x0D234, 0x00D34, 0x07274, 0x05988, - 0x00F5C, 0x0516D, 0x0516E, 0x0516C, 0x036C3, 0x0A2B4, - 0x0D235, 0x036C2, 0x034AC, 0x0D233, 0x07FBA, 0x034AB, - 0x0A2B3, 0x1437D, 0x1437C, 0x00B3B, 0x07273, 0x0516B, - 0x00D84, 0x009FB, 0x0693F, 0x0598A, 0x007F8, 0x005D6, - 0x047FB, 0x024EA, 0x026EC, 0x0516F, 0x047FC, 0x031A7, - 0x01397, 0x026ED, 0x02975, 0x02CD1, 0x034AD, 0x07275, - 0x027F6, 0x05989, 0x043C1, 0x0693E, 0x00454, 0x034AE, - 0x043C2, 0x007F6, 0x0A2B7, 0x07FBB, 0x02408, 0x0598B, - 0x047FD, 0x01B6A, 0x04DC1, 0x0FF5F, 0x07FBC, 0x01B6B, - 0x07277, 0x0D236, 0x020FD, 0x01B68, 0x0A2B5, 0x0FF5E, - 0x02976, 0x043C3, 0x02977, 0x0A2B6, 0x012DE, 0x07276, - 0x03FE9, 0x01B69, 0x00A4C, 0x0FF60, 0x1FE93, 0x013BC, - 0x00592, 0x02978, 0x02CD3, 0x00D8E, 0x0D237, 0x05170, - 0x01FC1, 0x028C2, 0x06941, 0x0D238, 0x07278, 0x034AF, - 0x06940, 0x00E5E, 0x08FD2, 0x07FBD, 0x020FE, 0x007E6, - 0x043C4, 0x02CD2, 0x0166E, 0x0CBFF, 0x0CBFE, 0x00A5C, - 0x005D0, 0x026EB, 0x047F8, 0x01F88, 0x1FE90, 0x1FE8F, - 0x00C68, 0x021EC, 0x0A2B1, 0x0D230, 0x04BFE, 0x0693B, - 0x028BF, 0x028C0, 0x07270, 0x0FF5C, 0x00E08, 0x00360, - 0x0436C, 0x05983, 0x009BE, 0x0FF5D, 0x1FE91, 0x01A60, - 0x04BFF, 0x0A2B2, 0x0436E, 0x03F0A, 0x07FB9, 0x05984, - 0x01FC0, 0x1FE92, 0x1437B, 0x01646, 0x03F09, 0x0693C, - 0x027F5, 0x047F9, 0x034AA, 0x0D231, 0x0436D, 0x01AB6, - 0x047FA, 0x07271, 0x00CFA, 0x006CF, 0x07272, 0x05986, - 0x00B3A, 0x00654, 0x028C1, 0x0436F, 0x02CD0, 0x03FE8, - 0x05987, 0x043C0, 0x0146B, 0x02974, 0x031A6, 0x02CCF, - 0x03964, 0x04DC0, 0x0516A, 0x05985, 0x05169, 0x02406, - 0x003D6, 0x0D232, 0x0693D, 0x0005C, 0x006F6, 0x0086E, - 0x00062, 0x0005B, 0x006F1, 0x007E0, 0x00D98, 0x00BBE, - 0x00E72, 0x00D8F, 0x004DA, 0x0137B, 0x0137A, 0x00386, - 0x00A7E, 0x00C6A, 0x00CBA, 0x00F5E, 0x00F5D, 0x013BD, - 0x00064, 0x009CE, 0x008EC, 0x0003B, 0x00F56, 0x00CAA, - 0x00246, 0x008ED, 0x0086C, 0x001ED, 0x00C77, 0x0240A, - 0x01B6D, 0x0086F, 0x02CD5, 0x01FC3, 0x0073E, 0x005D2, - 0x01970, 0x014E4, 0x00456, 0x00B22, 0x0114D, 0x02198, - 0x00138, 0x0069C, 0x00737, 0x0020C, 0x00A4E, 0x04DC2, - 0x018E6, 0x00E1E, 0x006D2, 0x047FF, 0x02979, 0x01FFE, - 0x04800, 0x021ED, 0x028C6, 0x00917, 0x01671, 0x01CFF, - 0x00CFB, 0x00FE7, 0x00A1A, 0x0146D, 0x01670, 0x01B6E, - 0x0137E, 0x006D1, 0x01FFD, 0x028C5, 0x00176, 0x05171, - 0x0219A, 0x0023C, 0x0A2BA, 0x043C5, 0x006F8, 0x006DF, - 0x01EA4, 0x01CBA, 0x027F8, 0x0FF61, 0x08FD5, 0x0177B, - 0x02199, 0x0D23A, 0x03966, 0x0297A, 0x00A38, 0x0177A, - 0x01A61, 0x00597, 0x07FBF, 0x04DC3, 0x007F4, 0x00196, - 0x034B0, 0x03F0B, 0x008F6, 0x0598C, 0x08FD3, 0x003D2, - 0x006D0, 0x01FC2, 0x031C1, 0x026EE, 0x0A2B9, 0x0D239, - 0x0175F, 0x0175E, 0x031C0, 0x06942, 0x01FF6, 0x00A3D, - 0x0166F, 0x027F7, 0x009C8, 0x0A2B8, 0x07FBE, 0x00734, - 0x00FC6, 0x03965, 0x06943, 0x010CF, 0x006DE, 0x02CD4, - 0x08FD4, 0x034B2, 0x01CB8, 0x028C3, 0x01FFC, 0x0041E, - 0x0146C, 0x01B6C, 0x00C76, 0x00B3C, 0x010CE, 0x022F1, - 0x0144C, 0x012DF, 0x01436, 0x0073A, 0x034B1, 0x031C2, - 0x00042, 0x00DEE, 0x00B3D, 0x001CC, 0x00A17, 0x007E8, - 0x0021C, 0x00A28, 0x01CB9, 0x02409, 0x00916, 0x020FF, - 0x047FE, 0x00726, 0x00238, 0x011E9, 0x01AB7, 0x0071E, - 0x00FC8, 0x028C4, 0x00D85, 0x00239, 0x008EA, 0x007A2, - 0x0012C, -}; +#define ON2AVC_CB_1_2_CODES 41 +#define ON2AVC_CB_3_4_CODES 313 +#define ON2AVC_CB_5_6_CODES 1201 +#define ON2AVC_CB_7_8_CODES 3281 +#define ON2AVC_CB_9_10_CODES 121 +#define ON2AVC_CB_11_CODES 225 +#define ON2AVC_CB_12_CODES 441 +#define ON2AVC_CB_13_CODES 625 +#define ON2AVC_CB_14_CODES 729 +#define ON2AVC_CB_15_CODES 1089 -static const uint8_t on2avc_cb5_bits[ON2AVC_CB5_6_CODES] = { - 1, 8, 8, 7, 8, 8, - 6, 11, 12, 11, 10, 11, - 11, 9, 9, 12, 11, 9, - 11, 12, 12, 6, 8, 8, - 7, 7, 9, 10, 7, 7, - 11, 11, 12, 10, 11, 12, - 10, 11, 10, 9, 10, 10, - 11, 9, 11, 11, 7, 11, - 11, 11, 15, 15, 12, 13, - 12, 12, 14, 14, 14, 12, - 14, 14, 10, 12, 14, 14, - 11, 13, 15, 14, 12, 13, - 12, 12, 11, 16, 15, 12, - 10, 14, 13, 12, 15, 13, - 11, 14, 15, 14, 12, 14, - 13, 12, 15, 15, 11, 10, - 14, 13, 12, 16, 18, 10, - 10, 13, 14, 11, 14, 16, - 12, 13, 14, 15, 12, 13, - 13, 12, 14, 15, 12, 10, - 13, 14, 11, 14, 15, 12, - 12, 13, 12, 13, 14, 14, - 10, 13, 15, 12, 10, 12, - 14, 12, 13, 15, 14, 12, - 12, 13, 13, 7, 9, 9, - 7, 7, 11, 10, 11, 10, - 9, 12, 10, 11, 11, 10, - 10, 11, 11, 11, 10, 12, - 7, 11, 11, 7, 12, 11, - 7, 7, 12, 12, 12, 12, - 12, 12, 10, 12, 12, 11, - 13, 13, 12, 13, 12, 13, - 7, 12, 12, 7, 12, 12, - 9, 11, 12, 10, 12, 13, - 13, 11, 13, 13, 10, 12, - 14, 13, 11, 12, 13, 14, - 9, 11, 12, 10, 12, 14, - 14, 12, 12, 14, 14, 13, - 13, 13, 13, 13, 12, 12, - 12, 13, 14, 14, 14, 14, - 14, 11, 14, 14, 9, 15, - 14, 11, 16, 15, 12, 12, - 14, 13, 14, 16, 14, 13, - 13, 15, 16, 13, 11, 14, - 14, 11, 16, 15, 12, 9, - 14, 15, 11, 15, 16, 11, - 12, 13, 13, 13, 13, 15, - 15, 13, 18, 17, 13, 11, - 13, 14, 11, 14, 16, 11, - 12, 13, 14, 12, 11, 14, - 14, 14, 13, 13, 13, 12, - 12, 13, 12, 13, 13, 13, - 13, 14, 14, 11, 14, 15, - 6, 12, 12, 10, 11, 11, - 9, 12, 13, 13, 10, 12, - 13, 11, 11, 13, 13, 12, - 12, 13, 13, 9, 11, 12, - 10, 8, 15, 15, 12, 14, - 15, 13, 14, 17, 15, 14, - 16, 16, 15, 14, 17, 16, - 14, 14, 15, 14, 12, 15, - 15, 12, 12, 15, 15, 11, - 10, 15, 14, 14, 15, 16, - 15, 15, 15, 14, 13, 14, - 14, 14, 15, 14, 14, 11, - 15, 14, 12, 16, 15, 12, - 15, 15, 13, 16, 14, 15, - 14, 15, 16, 14, 13, 15, - 17, 14, 15, 17, 15, 14, - 16, 15, 14, 12, 17, 16, - 13, 11, 15, 14, 12, 18, - 16, 13, 16, 14, 16, 14, - 15, 16, 12, 16, 17, 13, - 11, 15, 14, 13, 15, 18, - 12, 11, 14, 15, 14, 16, - 16, 13, 15, 15, 15, 13, - 15, 15, 13, 16, 16, 12, - 11, 14, 15, 12, 16, 16, - 14, 15, 15, 12, 14, 15, - 15, 14, 17, 16, 14, 14, - 15, 15, 13, 14, 15, 15, - 14, 15, 14, 14, 12, 16, - 15, 12, 10, 16, 14, 15, - 15, 14, 14, 13, 15, 15, - 13, 14, 14, 14, 14, 15, - 14, 11, 14, 15, 12, 17, - 16, 12, 8, 15, 14, 14, - 18, 18, 14, 17, 18, 17, - 16, 16, 17, 14, 18, 17, - 14, 9, 15, 16, 8, 15, - 18, 12, 18, 17, 12, 14, - 15, 15, 17, 18, 18, 16, - 15, 18, 17, 16, 13, 16, - 15, 12, 16, 18, 12, 12, - 18, 17, 12, 10, 15, 15, - 13, 17, 17, 14, 15, 17, - 18, 14, 16, 17, 13, 17, - 16, 13, 11, 15, 15, 10, - 18, 17, 13, 17, 16, 15, - 14, 14, 16, 15, 16, 18, - 17, 14, 17, 18, 16, 13, - 16, 16, 13, 18, 16, 14, - 12, 17, 17, 14, 18, 18, - 13, 14, 16, 16, 16, 17, - 17, 16, 16, 18, 18, 14, - 14, 16, 17, 13, 18, 17, - 13, 12, 17, 17, 12, 10, - 15, 14, 15, 16, 17, 13, - 16, 17, 17, 15, 16, 16, - 13, 16, 18, 13, 11, 15, - 15, 8, 14, 15, 12, 18, - 17, 11, 14, 16, 16, 16, - 18, 18, 16, 15, 18, 17, - 16, 12, 15, 15, 12, 16, - 16, 12, 11, 17, 16, 12, - 9, 15, 15, 14, 17, 16, - 14, 13, 15, 16, 16, 17, - 18, 16, 18, 17, 14, 8, - 15, 15, 7, 15, 14, 12, - 17, 17, 11, 12, 14, 14, - 14, 17, 17, 15, 13, 17, - 18, 16, 13, 15, 15, 11, - 16, 17, 12, 12, 17, 18, - 12, 11, 16, 14, 14, 17, - 16, 13, 16, 16, 15, 17, - 15, 17, 13, 16, 16, 14, - 10, 15, 15, 12, 18, 16, - 13, 18, 18, 13, 13, 15, - 17, 15, 17, 18, 15, 16, - 17, 18, 17, 15, 15, 15, - 13, 18, 18, 14, 10, 16, - 18, 14, 17, 17, 13, 13, - 18, 15, 15, 18, 17, 14, - 16, 16, 15, 15, 14, 15, - 14, 14, 18, 18, 14, 13, - 18, 18, 12, 10, 15, 15, - 14, 16, 18, 13, 14, 15, - 16, 16, 18, 16, 14, 15, - 18, 13, 10, 16, 15, 8, - 15, 15, 12, 16, 18, 11, - 13, 14, 14, 15, 16, 17, - 15, 15, 18, 18, 17, 14, - 16, 16, 12, 16, 17, 11, - 8, 16, 16, 12, 15, 15, - 12, 15, 15, 15, 14, 16, - 16, 14, 14, 16, 15, 14, - 16, 17, 17, 12, 15, 15, - 12, 12, 15, 15, 11, 11, - 15, 14, 14, 15, 15, 14, - 13, 14, 14, 14, 14, 15, - 14, 15, 15, 15, 11, 14, - 15, 11, 16, 15, 14, 15, - 15, 13, 15, 16, 15, 13, - 15, 16, 14, 13, 16, 16, - 14, 15, 14, 16, 13, 15, - 14, 13, 12, 16, 17, 13, - 11, 14, 14, 12, 16, 15, - 13, 14, 15, 16, 15, 14, - 15, 12, 16, 15, 14, 11, - 15, 14, 13, 16, 16, 12, - 11, 14, 15, 13, 17, 17, - 12, 14, 16, 16, 15, 15, - 14, 14, 15, 16, 12, 10, - 15, 15, 12, 16, 17, 13, - 15, 16, 15, 14, 15, 15, - 13, 17, 17, 13, 14, 15, - 14, 15, 14, 16, 15, 13, - 15, 15, 12, 11, 15, 15, - 12, 11, 14, 15, 14, 14, - 15, 15, 13, 14, 14, 14, - 14, 15, 15, 15, 15, 14, - 10, 16, 15, 7, 11, 12, - 7, 7, 11, 11, 12, 12, - 12, 12, 11, 13, 13, 10, - 12, 12, 12, 12, 12, 13, - 7, 12, 12, 6, 12, 12, - 10, 12, 12, 9, 12, 14, - 13, 12, 14, 13, 11, 11, - 13, 13, 11, 12, 13, 14, - 9, 11, 11, 10, 12, 15, - 13, 12, 11, 15, 14, 13, - 15, 14, 14, 12, 13, 13, - 12, 12, 12, 13, 13, 13, - 13, 11, 13, 14, 9, 15, - 14, 10, 16, 15, 11, 11, - 13, 13, 14, 16, 16, 13, - 14, 16, 14, 14, 12, 13, - 13, 11, 15, 15, 11, 9, - 14, 14, 12, 15, 16, 10, - 11, 13, 14, 14, 16, 16, - 13, 13, 14, 15, 13, 12, - 13, 14, 12, 16, 15, 11, - 12, 14, 15, 13, 11, 14, - 16, 14, 13, 14, 13, 11, - 13, 13, 12, 12, 13, 14, - 13, 13, 13, 11, 14, 14, - 7, 12, 12, 9, 12, 11, - 10, 12, 13, 14, 12, 14, - 15, 11, 10, 13, 13, 11, - 12, 14, 12, 10, 12, 11, - 9, +static const uint8_t on2avc_cb1_bits[ON2AVC_CB_1_2_CODES] = { + 1, 6, 6, 6, 6, 6, 8, 8, 9, 9, 9, 9, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 7, 9, 9, 9, 9, 7, 9, + 9, 9, 9, }; -static const uint16_t on2avc_cb5_6_syms[ON2AVC_CB5_6_CODES] = { - 0x0000, 0x0002, 0x000E, 0x0011, 0x0013, 0x001D, - 0x001F, 0x0020, 0x0022, 0x002E, 0x0031, 0x0033, - 0x003D, 0x003F, 0x00D1, 0x00D3, 0x00DD, 0x00DF, - 0x00E0, 0x00E2, 0x00EE, 0x00F1, 0x00F3, 0x00FD, - 0x00FF, 0x0101, 0x0103, 0x010D, 0x010F, 0x0110, - 0x0112, 0x011E, 0x0121, 0x0123, 0x012D, 0x012F, - 0x0130, 0x0132, 0x013E, 0x01D0, 0x01D2, 0x01DE, - 0x01E1, 0x01E3, 0x01ED, 0x01EF, 0x01F0, 0x01F2, - 0x01FE, 0x0200, 0x0202, 0x020E, 0x0211, 0x0213, - 0x021D, 0x021F, 0x0220, 0x0222, 0x022E, 0x0231, - 0x0233, 0x023D, 0x023F, 0x02D1, 0x02D3, 0x02DD, - 0x02DF, 0x02E0, 0x02E2, 0x02EE, 0x02F1, 0x02F3, - 0x02FD, 0x02FF, 0x0301, 0x0303, 0x030D, 0x030F, - 0x0310, 0x0312, 0x031E, 0x0321, 0x0323, 0x032D, - 0x032F, 0x0330, 0x0332, 0x033E, 0x03D0, 0x03D2, - 0x03DE, 0x03E1, 0x03E3, 0x03ED, 0x03EF, 0x03F0, - 0x03F2, 0x03FE, 0x0D01, 0x0D03, 0x0D0D, 0x0D0F, - 0x0D10, 0x0D12, 0x0D1E, 0x0D21, 0x0D23, 0x0D2D, - 0x0D2F, 0x0D30, 0x0D32, 0x0D3E, 0x0DD0, 0x0DD2, - 0x0DDE, 0x0DE1, 0x0DE3, 0x0DED, 0x0DEF, 0x0DF0, - 0x0DF2, 0x0DFE, 0x0E00, 0x0E02, 0x0E0E, 0x0E11, - 0x0E13, 0x0E1D, 0x0E1F, 0x0E20, 0x0E22, 0x0E2E, - 0x0E31, 0x0E33, 0x0E3D, 0x0E3F, 0x0ED1, 0x0ED3, - 0x0EDD, 0x0EDF, 0x0EE0, 0x0EE2, 0x0EEE, 0x0EF1, - 0x0EF3, 0x0EFD, 0x0EFF, 0x0F01, 0x0F03, 0x0F0D, - 0x0F0F, 0x0F10, 0x0F12, 0x0F1E, 0x0F21, 0x0F23, - 0x0F2D, 0x0F2F, 0x0F30, 0x0F32, 0x0F3E, 0x0FD0, - 0x0FD2, 0x0FDE, 0x0FE1, 0x0FE3, 0x0FED, 0x0FEF, - 0x0FF0, 0x0FF2, 0x0FFE, 0x1001, 0x1003, 0x100D, - 0x100F, 0x1010, 0x1012, 0x101E, 0x1021, 0x1023, - 0x102D, 0x102F, 0x1030, 0x1032, 0x103E, 0x10D0, - 0x10D2, 0x10DE, 0x10E1, 0x10E3, 0x10ED, 0x10EF, - 0x10F0, 0x10F2, 0x10FE, 0x1100, 0x1102, 0x110E, - 0x1111, 0x1113, 0x111D, 0x111F, 0x1120, 0x1122, - 0x112E, 0x1131, 0x1133, 0x113D, 0x113F, 0x11D1, - 0x11D3, 0x11DD, 0x11DF, 0x11E0, 0x11E2, 0x11EE, - 0x11F1, 0x11F3, 0x11FD, 0x11FF, 0x1201, 0x1203, - 0x120D, 0x120F, 0x1210, 0x1212, 0x121E, 0x1221, - 0x1223, 0x122D, 0x122F, 0x1230, 0x1232, 0x123E, - 0x12D0, 0x12D2, 0x12DE, 0x12E1, 0x12E3, 0x12ED, - 0x12EF, 0x12F0, 0x12F2, 0x12FE, 0x1300, 0x1302, - 0x130E, 0x1311, 0x1313, 0x131D, 0x131F, 0x1320, - 0x1322, 0x132E, 0x1331, 0x1333, 0x133D, 0x133F, - 0x13D1, 0x13D3, 0x13DD, 0x13DF, 0x13E0, 0x13E2, - 0x13EE, 0x13F1, 0x13F3, 0x13FD, 0x13FF, 0x1D00, - 0x1D02, 0x1D0E, 0x1D11, 0x1D13, 0x1D1D, 0x1D1F, - 0x1D20, 0x1D22, 0x1D2E, 0x1D31, 0x1D33, 0x1D3D, - 0x1D3F, 0x1DD1, 0x1DD3, 0x1DDD, 0x1DDF, 0x1DE0, - 0x1DE2, 0x1DEE, 0x1DF1, 0x1DF3, 0x1DFD, 0x1DFF, - 0x1E01, 0x1E03, 0x1E0D, 0x1E0F, 0x1E10, 0x1E12, - 0x1E1E, 0x1E21, 0x1E23, 0x1E2D, 0x1E2F, 0x1E30, - 0x1E32, 0x1E3E, 0x1ED0, 0x1ED2, 0x1EDE, 0x1EE1, - 0x1EE3, 0x1EED, 0x1EEF, 0x1EF0, 0x1EF2, 0x1EFE, - 0x1F00, 0x1F02, 0x1F0E, 0x1F11, 0x1F13, 0x1F1D, - 0x1F1F, 0x1F20, 0x1F22, 0x1F2E, 0x1F31, 0x1F33, - 0x1F3D, 0x1F3F, 0x1FD1, 0x1FD3, 0x1FDD, 0x1FDF, - 0x1FE0, 0x1FE2, 0x1FEE, 0x1FF1, 0x1FF3, 0x1FFD, - 0x1FFF, 0x2000, 0x2002, 0x200E, 0x2011, 0x2013, - 0x201D, 0x201F, 0x2020, 0x2022, 0x202E, 0x2031, - 0x2033, 0x203D, 0x203F, 0x20D1, 0x20D3, 0x20DD, - 0x20DF, 0x20E0, 0x20E2, 0x20EE, 0x20F1, 0x20F3, - 0x20FD, 0x20FF, 0x2101, 0x2103, 0x210D, 0x210F, - 0x2110, 0x2112, 0x211E, 0x2121, 0x2123, 0x212D, - 0x212F, 0x2130, 0x2132, 0x213E, 0x21D0, 0x21D2, - 0x21DE, 0x21E1, 0x21E3, 0x21ED, 0x21EF, 0x21F0, - 0x21F2, 0x21FE, 0x2200, 0x2202, 0x220E, 0x2211, - 0x2213, 0x221D, 0x221F, 0x2220, 0x2222, 0x222E, - 0x2231, 0x2233, 0x223D, 0x223F, 0x22D1, 0x22D3, - 0x22DD, 0x22DF, 0x22E0, 0x22E2, 0x22EE, 0x22F1, - 0x22F3, 0x22FD, 0x22FF, 0x2301, 0x2303, 0x230D, - 0x230F, 0x2310, 0x2312, 0x231E, 0x2321, 0x2323, - 0x232D, 0x232F, 0x2330, 0x2332, 0x233E, 0x23D0, - 0x23D2, 0x23DE, 0x23E1, 0x23E3, 0x23ED, 0x23EF, - 0x23F0, 0x23F2, 0x23FE, 0x2D01, 0x2D03, 0x2D0D, - 0x2D0F, 0x2D10, 0x2D12, 0x2D1E, 0x2D21, 0x2D23, - 0x2D2D, 0x2D2F, 0x2D30, 0x2D32, 0x2D3E, 0x2DD0, - 0x2DD2, 0x2DDE, 0x2DE1, 0x2DE3, 0x2DED, 0x2DEF, - 0x2DF0, 0x2DF2, 0x2DFE, 0x2E00, 0x2E02, 0x2E0E, - 0x2E11, 0x2E13, 0x2E1D, 0x2E1F, 0x2E20, 0x2E22, - 0x2E2E, 0x2E31, 0x2E33, 0x2E3D, 0x2E3F, 0x2ED1, - 0x2ED3, 0x2EDD, 0x2EDF, 0x2EE0, 0x2EE2, 0x2EEE, - 0x2EF1, 0x2EF3, 0x2EFD, 0x2EFF, 0x2F01, 0x2F03, - 0x2F0D, 0x2F0F, 0x2F10, 0x2F12, 0x2F1E, 0x2F21, - 0x2F23, 0x2F2D, 0x2F2F, 0x2F30, 0x2F32, 0x2F3E, - 0x2FD0, 0x2FD2, 0x2FDE, 0x2FE1, 0x2FE3, 0x2FED, - 0x2FEF, 0x2FF0, 0x2FF2, 0x2FFE, 0x3001, 0x3003, - 0x300D, 0x300F, 0x3010, 0x3012, 0x301E, 0x3021, - 0x3023, 0x302D, 0x302F, 0x3030, 0x3032, 0x303E, - 0x30D0, 0x30D2, 0x30DE, 0x30E1, 0x30E3, 0x30ED, - 0x30EF, 0x30F0, 0x30F2, 0x30FE, 0x3100, 0x3102, - 0x310E, 0x3111, 0x3113, 0x311D, 0x311F, 0x3120, - 0x3122, 0x312E, 0x3131, 0x3133, 0x313D, 0x313F, - 0x31D1, 0x31D3, 0x31DD, 0x31DF, 0x31E0, 0x31E2, - 0x31EE, 0x31F1, 0x31F3, 0x31FD, 0x31FF, 0x3201, - 0x3203, 0x320D, 0x320F, 0x3210, 0x3212, 0x321E, - 0x3221, 0x3223, 0x322D, 0x322F, 0x3230, 0x3232, - 0x323E, 0x32D0, 0x32D2, 0x32DE, 0x32E1, 0x32E3, - 0x32ED, 0x32EF, 0x32F0, 0x32F2, 0x32FE, 0x3300, - 0x3302, 0x330E, 0x3311, 0x3313, 0x331D, 0x331F, - 0x3320, 0x3322, 0x332E, 0x3331, 0x3333, 0x333D, - 0x333F, 0x33D1, 0x33D3, 0x33DD, 0x33DF, 0x33E0, - 0x33E2, 0x33EE, 0x33F1, 0x33F3, 0x33FD, 0x33FF, - 0x3D00, 0x3D02, 0x3D0E, 0x3D11, 0x3D13, 0x3D1D, - 0x3D1F, 0x3D20, 0x3D22, 0x3D2E, 0x3D31, 0x3D33, - 0x3D3D, 0x3D3F, 0x3DD1, 0x3DD3, 0x3DDD, 0x3DDF, - 0x3DE0, 0x3DE2, 0x3DEE, 0x3DF1, 0x3DF3, 0x3DFD, - 0x3DFF, 0x3E01, 0x3E03, 0x3E0D, 0x3E0F, 0x3E10, - 0x3E12, 0x3E1E, 0x3E21, 0x3E23, 0x3E2D, 0x3E2F, - 0x3E30, 0x3E32, 0x3E3E, 0x3ED0, 0x3ED2, 0x3EDE, - 0x3EE1, 0x3EE3, 0x3EED, 0x3EEF, 0x3EF0, 0x3EF2, - 0x3EFE, 0x3F00, 0x3F02, 0x3F0E, 0x3F11, 0x3F13, - 0x3F1D, 0x3F1F, 0x3F20, 0x3F22, 0x3F2E, 0x3F31, - 0x3F33, 0x3F3D, 0x3F3F, 0x3FD1, 0x3FD3, 0x3FDD, - 0x3FDF, 0x3FE0, 0x3FE2, 0x3FEE, 0x3FF1, 0x3FF3, - 0x3FFD, 0x3FFF, 0xD001, 0xD003, 0xD00D, 0xD00F, - 0xD010, 0xD012, 0xD01E, 0xD021, 0xD023, 0xD02D, - 0xD02F, 0xD030, 0xD032, 0xD03E, 0xD0D0, 0xD0D2, - 0xD0DE, 0xD0E1, 0xD0E3, 0xD0ED, 0xD0EF, 0xD0F0, - 0xD0F2, 0xD0FE, 0xD100, 0xD102, 0xD10E, 0xD111, - 0xD113, 0xD11D, 0xD11F, 0xD120, 0xD122, 0xD12E, - 0xD131, 0xD133, 0xD13D, 0xD13F, 0xD1D1, 0xD1D3, - 0xD1DD, 0xD1DF, 0xD1E0, 0xD1E2, 0xD1EE, 0xD1F1, - 0xD1F3, 0xD1FD, 0xD1FF, 0xD201, 0xD203, 0xD20D, - 0xD20F, 0xD210, 0xD212, 0xD21E, 0xD221, 0xD223, - 0xD22D, 0xD22F, 0xD230, 0xD232, 0xD23E, 0xD2D0, - 0xD2D2, 0xD2DE, 0xD2E1, 0xD2E3, 0xD2ED, 0xD2EF, - 0xD2F0, 0xD2F2, 0xD2FE, 0xD300, 0xD302, 0xD30E, - 0xD311, 0xD313, 0xD31D, 0xD31F, 0xD320, 0xD322, - 0xD32E, 0xD331, 0xD333, 0xD33D, 0xD33F, 0xD3D1, - 0xD3D3, 0xD3DD, 0xD3DF, 0xD3E0, 0xD3E2, 0xD3EE, - 0xD3F1, 0xD3F3, 0xD3FD, 0xD3FF, 0xDD00, 0xDD02, - 0xDD0E, 0xDD11, 0xDD13, 0xDD1D, 0xDD1F, 0xDD20, - 0xDD22, 0xDD2E, 0xDD31, 0xDD33, 0xDD3D, 0xDD3F, - 0xDDD1, 0xDDD3, 0xDDDD, 0xDDDF, 0xDDE0, 0xDDE2, - 0xDDEE, 0xDDF1, 0xDDF3, 0xDDFD, 0xDDFF, 0xDE01, - 0xDE03, 0xDE0D, 0xDE0F, 0xDE10, 0xDE12, 0xDE1E, - 0xDE21, 0xDE23, 0xDE2D, 0xDE2F, 0xDE30, 0xDE32, - 0xDE3E, 0xDED0, 0xDED2, 0xDEDE, 0xDEE1, 0xDEE3, - 0xDEED, 0xDEEF, 0xDEF0, 0xDEF2, 0xDEFE, 0xDF00, - 0xDF02, 0xDF0E, 0xDF11, 0xDF13, 0xDF1D, 0xDF1F, - 0xDF20, 0xDF22, 0xDF2E, 0xDF31, 0xDF33, 0xDF3D, - 0xDF3F, 0xDFD1, 0xDFD3, 0xDFDD, 0xDFDF, 0xDFE0, - 0xDFE2, 0xDFEE, 0xDFF1, 0xDFF3, 0xDFFD, 0xDFFF, - 0xE000, 0xE002, 0xE00E, 0xE011, 0xE013, 0xE01D, - 0xE01F, 0xE020, 0xE022, 0xE02E, 0xE031, 0xE033, - 0xE03D, 0xE03F, 0xE0D1, 0xE0D3, 0xE0DD, 0xE0DF, - 0xE0E0, 0xE0E2, 0xE0EE, 0xE0F1, 0xE0F3, 0xE0FD, - 0xE0FF, 0xE101, 0xE103, 0xE10D, 0xE10F, 0xE110, - 0xE112, 0xE11E, 0xE121, 0xE123, 0xE12D, 0xE12F, - 0xE130, 0xE132, 0xE13E, 0xE1D0, 0xE1D2, 0xE1DE, - 0xE1E1, 0xE1E3, 0xE1ED, 0xE1EF, 0xE1F0, 0xE1F2, - 0xE1FE, 0xE200, 0xE202, 0xE20E, 0xE211, 0xE213, - 0xE21D, 0xE21F, 0xE220, 0xE222, 0xE22E, 0xE231, - 0xE233, 0xE23D, 0xE23F, 0xE2D1, 0xE2D3, 0xE2DD, - 0xE2DF, 0xE2E0, 0xE2E2, 0xE2EE, 0xE2F1, 0xE2F3, - 0xE2FD, 0xE2FF, 0xE301, 0xE303, 0xE30D, 0xE30F, - 0xE310, 0xE312, 0xE31E, 0xE321, 0xE323, 0xE32D, - 0xE32F, 0xE330, 0xE332, 0xE33E, 0xE3D0, 0xE3D2, - 0xE3DE, 0xE3E1, 0xE3E3, 0xE3ED, 0xE3EF, 0xE3F0, - 0xE3F2, 0xE3FE, 0xED01, 0xED03, 0xED0D, 0xED0F, - 0xED10, 0xED12, 0xED1E, 0xED21, 0xED23, 0xED2D, - 0xED2F, 0xED30, 0xED32, 0xED3E, 0xEDD0, 0xEDD2, - 0xEDDE, 0xEDE1, 0xEDE3, 0xEDED, 0xEDEF, 0xEDF0, - 0xEDF2, 0xEDFE, 0xEE00, 0xEE02, 0xEE0E, 0xEE11, - 0xEE13, 0xEE1D, 0xEE1F, 0xEE20, 0xEE22, 0xEE2E, - 0xEE31, 0xEE33, 0xEE3D, 0xEE3F, 0xEED1, 0xEED3, - 0xEEDD, 0xEEDF, 0xEEE0, 0xEEE2, 0xEEEE, 0xEEF1, - 0xEEF3, 0xEEFD, 0xEEFF, 0xEF01, 0xEF03, 0xEF0D, - 0xEF0F, 0xEF10, 0xEF12, 0xEF1E, 0xEF21, 0xEF23, - 0xEF2D, 0xEF2F, 0xEF30, 0xEF32, 0xEF3E, 0xEFD0, - 0xEFD2, 0xEFDE, 0xEFE1, 0xEFE3, 0xEFED, 0xEFEF, - 0xEFF0, 0xEFF2, 0xEFFE, 0xF001, 0xF003, 0xF00D, - 0xF00F, 0xF010, 0xF012, 0xF01E, 0xF021, 0xF023, - 0xF02D, 0xF02F, 0xF030, 0xF032, 0xF03E, 0xF0D0, - 0xF0D2, 0xF0DE, 0xF0E1, 0xF0E3, 0xF0ED, 0xF0EF, - 0xF0F0, 0xF0F2, 0xF0FE, 0xF100, 0xF102, 0xF10E, - 0xF111, 0xF113, 0xF11D, 0xF11F, 0xF120, 0xF122, - 0xF12E, 0xF131, 0xF133, 0xF13D, 0xF13F, 0xF1D1, - 0xF1D3, 0xF1DD, 0xF1DF, 0xF1E0, 0xF1E2, 0xF1EE, - 0xF1F1, 0xF1F3, 0xF1FD, 0xF1FF, 0xF201, 0xF203, - 0xF20D, 0xF20F, 0xF210, 0xF212, 0xF21E, 0xF221, - 0xF223, 0xF22D, 0xF22F, 0xF230, 0xF232, 0xF23E, - 0xF2D0, 0xF2D2, 0xF2DE, 0xF2E1, 0xF2E3, 0xF2ED, - 0xF2EF, 0xF2F0, 0xF2F2, 0xF2FE, 0xF300, 0xF302, - 0xF30E, 0xF311, 0xF313, 0xF31D, 0xF31F, 0xF320, - 0xF322, 0xF32E, 0xF331, 0xF333, 0xF33D, 0xF33F, - 0xF3D1, 0xF3D3, 0xF3DD, 0xF3DF, 0xF3E0, 0xF3E2, - 0xF3EE, 0xF3F1, 0xF3F3, 0xF3FD, 0xF3FF, 0xFD00, - 0xFD02, 0xFD0E, 0xFD11, 0xFD13, 0xFD1D, 0xFD1F, - 0xFD20, 0xFD22, 0xFD2E, 0xFD31, 0xFD33, 0xFD3D, - 0xFD3F, 0xFDD1, 0xFDD3, 0xFDDD, 0xFDDF, 0xFDE0, - 0xFDE2, 0xFDEE, 0xFDF1, 0xFDF3, 0xFDFD, 0xFDFF, - 0xFE01, 0xFE03, 0xFE0D, 0xFE0F, 0xFE10, 0xFE12, - 0xFE1E, 0xFE21, 0xFE23, 0xFE2D, 0xFE2F, 0xFE30, - 0xFE32, 0xFE3E, 0xFED0, 0xFED2, 0xFEDE, 0xFEE1, - 0xFEE3, 0xFEED, 0xFEEF, 0xFEF0, 0xFEF2, 0xFEFE, - 0xFF00, 0xFF02, 0xFF0E, 0xFF11, 0xFF13, 0xFF1D, - 0xFF1F, 0xFF20, 0xFF22, 0xFF2E, 0xFF31, 0xFF33, - 0xFF3D, 0xFF3F, 0xFFD1, 0xFFD3, 0xFFDD, 0xFFDF, - 0xFFE0, 0xFFE2, 0xFFEE, 0xFFF1, 0xFFF3, 0xFFFD, - 0xFFFF, +static const uint8_t on2avc_cb2_bits[ON2AVC_CB_1_2_CODES] = { + 5, 7, 7, 7, 7, 5, 5, 5, 7, 7, 7, 7, 5, 5, 5, 5, 5, 7, 7, + 7, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 3, 5, + 5, 5, 5, }; -static const uint32_t on2avc_cb6_codes[ON2AVC_CB5_6_CODES] = { - 0x0018, 0x0088, 0x0082, 0x0024, 0x05B4, 0x08DF, - 0x0044, 0x0197, 0x01DE, 0x021F, 0x0D77, 0x0A72, - 0x7E77, 0x0B8B, 0x03F1, 0x0433, 0x073F, 0x1E5C, - 0x016A, 0x01C5, 0x00D2, 0x0062, 0x0CE4, 0x0096, - 0x0020, 0x0052, 0x00B7, 0x0127, 0x003A, 0x0041, - 0x00CC, 0x01B6, 0x0124, 0x07D3, 0x01AE, 0x01C4, - 0x00DA, 0x03D8, 0x03F3, 0x1638, 0x03F2, 0x12FC, - 0x01E2, 0x0DBC, 0x026C, 0x008A, 0x0054, 0x01A6, - 0x0195, 0x0164, 0x01E2, 0x026D, 0x0051, 0x049F, - 0x01B3, 0x01E0, 0x01B4, 0x026E, 0x07DE, 0x0129, - 0x0292, 0x0DBD, 0x013E, 0x00F3, 0x05B5, 0x09A6, - 0x01FB, 0x02CF, 0x01FF, 0x037C, 0x004A, 0x067E, - 0x016B, 0x002A, 0x09A7, 0x10EE, 0x1639, 0x0135, - 0x0CCA, 0x016A, 0x011B, 0x03EE, 0x07A2, 0x0D7E, - 0x028F, 0x0FE2, 0x07DA, 0x0357, 0x92F6, 0x0F31, - 0x0217, 0x036A, 0x0CE5, 0x07A1, 0x0229, 0x03D9, - 0x0377, 0x00B7, 0x01A6, 0x0655, 0x012E, 0x002B, - 0x002E, 0x00F2, 0x06F2, 0x02D0, 0x0F98, 0x07A0, - 0x009C, 0x0332, 0x0014, 0x01BD, 0x017E, 0x0331, - 0x0371, 0x025B, 0x0498, 0x161F, 0x039E, 0x0654, - 0x00C2, 0x06BA, 0x0140, 0x021E, 0x02F8, 0x01B4, - 0x0134, 0x03FF, 0x0066, 0x0477, 0x01DF, 0x01FE, - 0x0A14, 0x029E, 0x0356, 0x038F, 0x035A, 0x3CB3, - 0x01B2, 0x016A, 0x011A, 0x00B6, 0x02DE, 0x01DD, - 0x017C, 0x0376, 0x002F, 0x0039, 0x03D7, 0x01BE, - 0x0056, 0x0050, 0x017C, 0x01CC, 0x0034, 0x0B3E, - 0x0499, 0x0014, 0x08DE, 0x037B, 0x03EB, 0x08BF, - 0x186E, 0x050F, 0x0030, 0x0169, 0x07F2, 0x00F6, - 0x0042, 0x0198, 0x00BC, 0x002E, 0x023A, 0x01E3, - 0x0036, 0x004C, 0x012E, 0x01A1, 0x007D, 0x00C3, - 0x0392, 0x0063, 0x0F33, 0x016C, 0x01A7, 0x0E77, - 0x01DF, 0x0177, 0x0032, 0x03FE, 0x0322, 0x01AC, - 0x0030, 0x017E, 0x011E, 0x0022, 0x01FB, 0x012A, - 0x002B, 0x0068, 0x00D4, 0x006E, 0x0015, 0x001C, - 0x00E5, 0x01A9, 0x0436, 0x053F, 0x05AE, 0x00B2, - 0x072A, 0x02EA, 0x008E, 0x0175, 0x02BE, 0x018E, - 0x0002, 0x005E, 0x01D6, 0x0055, 0x006A, 0x07F3, - 0x02F9, 0x01D4, 0x016E, 0x03AB, 0x00FF, 0x003C, - 0x0192, 0x01D6, 0x0256, 0x0137, 0x0148, 0x022A, - 0x039C, 0x016D, 0x0116, 0x038A, 0x033E, 0x0156, - 0x03CF, 0x004B, 0x00E6, 0x018F, 0x1E5D, 0x03DA, - 0x0292, 0x0108, 0x06F5, 0x03DB, 0x0092, 0x0178, - 0x014A, 0x03FF, 0x03EE, 0x0A79, 0x0A16, 0x00F7, - 0x01B5, 0x0A15, 0x0D7F, 0x02FA, 0x01E4, 0x0157, - 0x01E2, 0x0185, 0x057E, 0x07DB, 0x0098, 0x0DBE, - 0x019A, 0x05FE, 0x003B, 0x03F5, 0x01BF, 0x01E4, - 0x011E, 0x001B, 0x03AA, 0x0337, 0x1F9C, 0x0942, - 0x05AB, 0x0430, 0x24BF, 0x163A, 0x037E, 0x014E, - 0x00F4, 0x0217, 0x0059, 0x0F32, 0x03F4, 0x01F2, - 0x0031, 0x0136, 0x05C6, 0x0076, 0x0006, 0x02FE, - 0x03FB, 0x009D, 0x013F, 0x002E, 0x02E6, 0x00AD, - 0x0234, 0x021E, 0x0253, 0x012A, 0x0346, 0x029A, - 0x012B, 0x021C, 0x02DA, 0x0004, 0x013C, 0x00F5, - 0x004E, 0x017D, 0x01F8, 0x0006, 0x01FA, 0x01F9, - 0x007A, 0x0067, 0x033B, 0x033A, 0x0586, 0x05C7, - 0x05FF, 0x00C8, 0x014B, 0x024F, 0x02C5, 0x00E7, - 0x014C, 0x035C, 0x00A2, 0x006A, 0x01F3, 0x0071, - 0x005E, 0x0084, 0x063A, 0x03EF, 0x0064, 0x02FE, - 0x0255, 0x003A, 0x061A, 0x0333, 0x037F, 0x00FE, - 0x115B, 0x0F9A, 0x00A6, 0x027D, 0x0B5F, 0x013F, - 0x029E, 0x0293, 0x07B6, 0x000F, 0x0196, 0x02FB, - 0x033F, 0x01FE, 0x019E, 0x01B3, 0x037F, 0x00C4, - 0x00DE, 0x02D2, 0x007A, 0x03CA, 0x01E3, 0x02F7, - 0x00AE, 0x05AF, 0x02FF, 0x026F, 0x00CA, 0x0356, - 0x02C7, 0x02D1, 0x0256, 0x006B, 0x0141, 0x012C, - 0x03BE, 0x0026, 0x00F0, 0x03A3, 0x02D6, 0x005F, - 0x00FF, 0x03F2, 0x00AE, 0x0257, 0x01FE, 0x035E, - 0x01B6, 0x00EE, 0x0658, 0x008F, 0x0232, 0x0657, - 0x12FD, 0x00AF, 0x00E6, 0x0426, 0x0666, 0x009E, - 0x0467, 0x003F, 0x014A, 0x02D3, 0x12FE, 0x099A, - 0x03BF, 0x00DD, 0x04DF, 0x009F, 0x00B8, 0x0863, - 0x06F7, 0x01B8, 0x0346, 0x0179, 0x0FE3, 0x0667, - 0x0659, 0x01CE, 0x00B3, 0x0372, 0x065A, 0x025E, - 0x01AA, 0x0276, 0x027E, 0x02DB, 0x0CE6, 0x115A, - 0x02E7, 0x0139, 0x03DA, 0x01FA, 0x021C, 0x0943, - 0x0862, 0x011F, 0x08B6, 0x07E6, 0x029F, 0x00E5, - 0x0656, 0x049A, 0x000E, 0x0F99, 0x06F6, 0x00DC, - 0x00EC, 0x014B, 0x0230, 0x04A2, 0x0016, 0x02EB, - 0x03AE, 0x02DF, 0x01AA, 0x033E, 0x0196, 0x092E, - 0x06F3, 0x00E7, 0x0B5E, 0x03F2, 0x0086, 0x0347, - 0x022A, 0x0A17, 0x01EF, 0x067F, 0x004A, 0x037E, - 0x02EE, 0x015E, 0x0696, 0x006A, 0x01CD, 0x0077, - 0x073F, 0x0016, 0x01E3, 0x012E, 0x00DB, 0x03BD, - 0x0496, 0x01C6, 0x0323, 0x005E, 0x02F6, 0x027C, - 0x0235, 0x0231, 0x00DA, 0x01EB, 0x0232, 0x02C6, - 0x01F2, 0x016F, 0x02C6, 0x036B, 0x0050, 0x0AFE, - 0x0F9B, 0x00C6, 0x014E, 0x02BC, 0x01CA, 0x027F, - 0x07A5, 0x0DE1, 0x01F1, 0x039E, 0x0DE2, 0x1E5E, - 0x065E, 0x0DE0, 0x115F, 0x00F7, 0x02AB, 0x116E, - 0x019B, 0x04CE, 0x00D3, 0x01C7, 0x02D6, 0x01F3, - 0x016F, 0x014E, 0x05B7, 0x0FA3, 0x0118, 0x025F, - 0x017E, 0x0437, 0x049B, 0x05AE, 0x497A, 0x0D2E, - 0x05B6, 0x1E5F, 0x0DE3, 0x0512, 0x031A, 0x01F2, - 0x007E, 0x015C, 0x035E, 0x04CF, 0x01C8, 0x0194, - 0x12FF, 0x1F7F, 0x00E0, 0x01A2, 0x012F, 0x0087, - 0x014C, 0x0643, 0x0D5E, 0x017F, 0x07A6, 0x0513, - 0x0D5F, 0x022B, 0x065F, 0x03F6, 0x022E, 0x03F7, - 0x0642, 0x036E, 0x00D0, 0x01CB, 0x0378, 0x125EE, - 0x035F, 0x014F, 0x035F, 0x116F, 0x0A4F, 0x0102, - 0x032A, 0x0173, 0x0536, 0x03A7, 0x075E, 0x1F9F, - 0x163B, 0x14DA, 0x526E, 0x165F, 0x0A6E, 0x0596, - 0x07A7, 0x042A, 0x0172, 0x19C2, 0x07E6, 0x04A3, - 0x0327, 0x02A8, 0x07A3, 0x046E, 0x012F, 0x2EFF, - 0x01D7, 0x0266, 0x0BBE, 0x066E, 0x186F, 0x0A73, - 0x1336, 0x02A9, 0x0373, 0x017F, 0x1F9E, 0x0B62, - 0x03A6, 0x0DBF, 0x035B, 0x063B, 0x053B, 0x10EF, - 0x016E, 0x011B, 0x115D, 0x115C, 0x00F2, 0x0176, - 0x0393, 0x034A, 0x0107, 0x115E, 0x0B63, 0x023F, - 0x002A, 0x0CE7, 0x0A7A, 0x06FA, 0x06FB, 0x02AA, - 0x02C2, 0x065B, 0x07A4, 0x02D4, 0x0130, 0x0106, - 0x01FB, 0x0B3F, 0x01B7, 0x00F6, 0x0056, 0x053F, - 0x0126, 0x0048, 0x0233, 0x017D, 0x00A4, 0x08BE, - 0x165E, 0x165D, 0x0A7B, 0x0427, 0x078F, 0x1F7E, - 0x0641, 0x02E4, 0x01E6, 0x01DA, 0x00F8, 0x043A, - 0x02BE, 0x011C, 0x006F, 0x036D, 0x19C3, 0x0020, - 0x06AE, 0x0372, 0x0288, 0x00C0, 0x079D, 0x036E, - 0x0117, 0x02FB, 0x0538, 0x06F2, 0x12F9, 0x1337, - 0x1E58, 0x0214, 0x005E, 0x0CE0, 0x01EE, 0x0A6E, - 0x0215, 0x01C2, 0x12FA, 0x033A, 0x009A, 0x0174, - 0x0CE2, 0x09A1, 0x00FE, 0x0250, 0x02CA, 0x035E, - 0x03A2, 0x0D7D, 0x2EFE, 0x02E8, 0x24BE, 0x1F7C, - 0x10EC, 0x04A2, 0x0052, 0x010D, 0x0277, 0x003A, - 0x0CDE, 0x0A6F, 0x0086, 0x00E4, 0x12FB, 0x14DE, - 0x009E, 0x0062, 0x03CA, 0x03BC, 0x02CA, 0x14DF, - 0x0FE0, 0x030C, 0x03F0, 0x06F3, 0x0796, 0x0B1E, - 0x05B0, 0x15FE, 0x013A, 0x0CDF, 0x079E, 0x01E2, - 0x0166, 0x02BD, 0x0151, 0x0153, 0x0650, 0x0940, - 0x010F, 0x3CB2, 0x10ED, 0x057E, 0x03D4, 0x029E, - 0x0358, 0x06F4, 0x7E76, 0x017C, 0x15FF, 0x047D, - 0x1158, 0x3F3A, 0x0CE3, 0x005F, 0x043A, 0x032F, - 0x010E, 0x1E5A, 0x0A4C, 0x0152, 0x125EF, 0x0B88, - 0x057F, 0x059E, 0x042B, 0x2936, 0x0138, 0x03A1, - 0x03C6, 0x0E56, 0x12F8, 0x149A, 0x526F, 0x0F2E, - 0x079C, 0x02FA, 0x0476, 0x0267, 0x0636, 0x03A0, - 0x014E, 0x0092, 0x0D7C, 0x05AF, 0x010C, 0x011C, - 0x0A10, 0x177E, 0x0131, 0x09A0, 0x03EA, 0x02C2, - 0x02D6, 0x0B89, 0x032E, 0x01E8, 0x0F30, 0x01BA, - 0x0532, 0x0A6C, 0x0F6E, 0x04CC, 0x008E, 0x036C, - 0x0E57, 0x00D6, 0x0162, 0x0024, 0x0252, 0x0F6F, - 0x01AE, 0x0150, 0x0038, 0x07CE, 0x01BB, 0x01F6, - 0x026A, 0x038B, 0x01DB, 0x07CF, 0x14DB, 0x24BC, - 0x0272, 0x053E, 0x073E, 0x078E, 0x0C36, 0x0176, - 0x032B, 0x017A, 0x0190, 0x0CCB, 0x047C, 0x0170, - 0x0054, 0x03EC, 0x049D, 0x0197, 0x043B, 0x0432, - 0x0192, 0x026A, 0x01F0, 0x0076, 0x0216, 0x0A11, - 0x1F7D, 0x02C4, 0x0298, 0x1159, 0x0A4E, 0x0116, - 0x00E4, 0x0216, 0x029A, 0x000F, 0x04DA, 0x04D2, - 0x002B, 0x0011, 0x049E, 0x045A, 0x01BF, 0x01EF, - 0x03CE, 0x01F8, 0x026E, 0x0466, 0x02DC, 0x0168, - 0x030E, 0x00B4, 0x01C3, 0x03CC, 0x028D, 0x01AE, - 0x038E, 0x01B0, 0x0664, 0x0119, 0x01BE, 0x035B, - 0x035F, 0x028E, 0x0A78, 0x01DE, 0x0397, 0x03FE, - 0x01B1, 0x028E, 0x07D2, 0x09A2, 0x033C, 0x02C1, - 0x0FA0, 0x0359, 0x031E, 0x00C1, 0x03D6, 0x0A12, - 0x01C4, 0x0330, 0x075F, 0x0B1F, 0x025A, 0x027B, - 0x04DB, 0x02E5, 0x01FA, 0x036F, 0x0A13, 0x02BB, - 0x00FA, 0x01D4, 0x01F8, 0x018A, 0x161E, 0x0E75, - 0x026B, 0x05B3, 0x01BC, 0x05B2, 0x09A3, 0x0424, - 0x047E, 0x01EE, 0x0FE1, 0x161D, 0x024C, 0x017E, - 0x026B, 0x01DC, 0x00A5, 0x0F2F, 0x161C, 0x028B, - 0x0196, 0x0168, 0x01EF, 0x0394, 0x0E74, 0x013C, - 0x00C9, 0x032E, 0x0941, 0x0D76, 0x050C, 0x0228, - 0x006C, 0x0236, 0x0D2F, 0x0156, 0x00D2, 0x0B8A, - 0x0148, 0x028A, 0x028B, 0x033B, 0x0214, 0x01E9, - 0x03C2, 0x049C, 0x02BA, 0x02E9, 0x028C, 0x01FC, - 0x0103, 0x0B5C, 0x050D, 0x031C, 0x0268, 0x0651, - 0x013A, 0x013B, 0x0118, 0x03D5, 0x0252, 0x0044, - 0x0637, 0x01D2, 0x000E, 0x00F0, 0x0323, 0x02C3, - 0x019A, 0x016C, 0x0046, 0x03E3, 0x024A, 0x00AC, - 0x0269, 0x02C0, 0x0396, 0x027A, 0x0253, 0x0273, - 0x073E, 0x0322, 0x003A, 0x025E, 0x0336, 0x0257, - 0x00D6, 0x0026, 0x03C3, 0x0034, 0x019A, 0x00FB, - 0x0038, 0x0040, 0x0096, 0x01F0, 0x0184, 0x021A, - 0x003E, 0x0042, 0x050E, 0x03CE, 0x035E, 0x0FA1, - 0x017B, 0x02CD, 0x0058, 0x0326, 0x00E4, 0x002E, - 0x004F, 0x000C, 0x0164, 0x0048, 0x0048, 0x0194, - 0x0074, 0x006E, 0x0070, 0x006C, 0x01A4, 0x00A3, - 0x034F, 0x011E, 0x0374, 0x0157, 0x0138, 0x011D, - 0x03CF, 0x033D, 0x0132, 0x0050, 0x023E, 0x005A, - 0x0076, 0x01EC, 0x005D, 0x0008, 0x004C, 0x024E, - 0x0154, 0x001E, 0x01C6, 0x0027, 0x00FE, 0x01EA, - 0x02CE, 0x01DD, 0x02CB, 0x035A, 0x0318, 0x013E, - 0x009B, 0x0288, 0x0339, 0x024D, 0x031F, 0x0128, - 0x00B6, 0x0028, 0x028A, 0x0289, 0x029F, 0x01FD, - 0x029A, 0x00F6, 0x0FA2, 0x0347, 0x0080, 0x01A8, - 0x028F, 0x0326, 0x0327, 0x0370, 0x165C, 0x043F, - 0x0375, 0x013D, 0x1E5B, 0x04DE, 0x0155, 0x00D8, - 0x0319, 0x0096, 0x0640, 0x07E7, 0x007C, 0x0652, - 0x0373, 0x05DE, 0x00CF, 0x0E76, 0x0653, 0x01A0, - 0x0160, 0x0169, 0x01D5, 0x05AA, 0x053A, 0x0B5D, - 0x0254, 0x079A, 0x0533, 0x0425, 0x053E, 0x00A6, - 0x030F, 0x01A2, 0x00B0, 0x04A3, 0x079F, 0x011A, - 0x01EE, 0x02CC, 0x045E, 0x005C, 0x0024, 0x022C, - 0x001A, 0x0338, 0x0132, 0x026C, 0x004E, 0x047F, - 0x01B2, 0x0113, 0x043E, 0x0336, 0x00F0, 0x02CE, - 0x0112, 0x018B, 0x0010, 0x0114, 0x01BE, 0x03FA, - 0x002A, 0x00FA, 0x0033, 0x0060, 0x0146, 0x01DC, - 0x0000, 0x0025, 0x037A, 0x034E, 0x012E, 0x029B, - 0x079B, 0x00E6, 0x03CD, 0x02DD, 0x0117, 0x017A, - 0x002C, 0x03E2, 0x003E, 0x0070, 0x00CE, 0x00B1, - 0x003B, +static const uint8_t on2avc_cb3_bits[ON2AVC_CB_3_4_CODES] = { + 1, 7, 7, 7, 9, 9, 10, 11, 12, 14, 14, 14, 15, 15, 10, 10, 7, 9, 9, + 9, 10, 11, 12, 12, 7, 10, 11, 11, 12, 12, 12, 13, 14, 15, 15, 11, 11, 9, + 9, 7, 9, 10, 11, 12, 12, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, + 11, 12, 13, 13, 11, 12, 13, 13, 9, 9, 7, 7, 7, 9, 9, 9, 10, 11, 11, + 9, 9, 9, 10, 13, 14, 16, 16, 16, 16, 13, 13, 12, 13, 13, 10, 12, 12, 12, + 14, 14, 14, 14, 10, 11, 12, 12, 9, 10, 10, 10, 11, 11, 10, 10, 9, 10, 13, + 14, 14, 13, 13, 12, 13, 14, 14, 9, 10, 10, 9, 10, 10, 6, 6, 6, 6, 8, + 11, 12, 14, 15, 15, 14, 14, 11, 12, 13, 13, 11, 13, 14, 15, 15, 13, 13, 11, + 11, 8, 9, 10, 10, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 14, 9, 10, + 11, 12, 12, 6, 9, 10, 10, 9, 10, 12, 13, 14, 15, 16, 17, 17, 12, 13, 14, + 15, 15, 8, 10, 11, 12, 13, 14, 14, 10, 10, 8, 10, 12, 12, 12, 12, 10, 10, + 9, 10, 11, 12, 13, 14, 15, 15, 10, 10, 10, 10, 9, 9, 9, 10, 12, 13, 14, + 15, 16, 16, 12, 12, 9, 10, 10, 9, 10, 10, 6, 6, 6, 6, 6, 9, 9, 11, + 12, 13, 14, 14, 11, 12, 12, 10, 10, 9, 10, 10, 9, 10, 11, 12, 13, 14, 14, + 9, 10, 12, 12, 12, 13, 14, 15, 16, 16, 9, 10, 10, 9, 10, 11, 12, 12, 9, + 10, 11, 12, 13, 13, 9, 9, 9, 11, 12, 13, 14, 14, 11, 11, 8, 9, 11, 12, + 13, 13, 11, 12, 13, 15, 15, 15, 15, }; -static const uint8_t on2avc_cb6_bits[ON2AVC_CB5_6_CODES] = { - 7, 10, 10, 7, 12, 12, - 7, 10, 11, 11, 12, 15, - 17, 12, 13, 11, 15, 13, - 10, 11, 11, 7, 13, 13, - 7, 7, 12, 12, 7, 7, - 9, 9, 9, 11, 10, 9, - 12, 12, 13, 13, 13, 13, - 9, 12, 10, 10, 7, 9, - 9, 10, 12, 11, 10, 11, - 11, 9, 11, 11, 11, 11, - 12, 12, 13, 11, 12, 12, - 10, 11, 12, 12, 10, 11, - 11, 10, 12, 14, 13, 11, - 12, 12, 11, 10, 13, 14, - 10, 12, 12, 12, 16, 12, - 12, 10, 13, 13, 13, 12, - 11, 11, 11, 13, 14, 13, - 13, 11, 11, 10, 13, 13, - 11, 12, 12, 13, 16, 12, - 14, 10, 13, 13, 10, 13, - 11, 11, 10, 11, 11, 9, - 11, 11, 10, 11, 12, 12, - 13, 12, 12, 10, 13, 14, - 12, 11, 11, 12, 11, 9, - 11, 11, 10, 7, 12, 13, - 7, 7, 9, 9, 10, 12, - 13, 10, 12, 10, 10, 12, - 13, 12, 10, 10, 11, 9, - 7, 9, 9, 7, 10, 10, - 7, 7, 9, 9, 10, 11, - 10, 10, 12, 11, 11, 12, - 11, 11, 10, 10, 10, 9, - 7, 9, 9, 7, 9, 9, - 7, 10, 10, 7, 10, 10, - 11, 10, 11, 11, 11, 10, - 11, 12, 10, 9, 10, 10, - 8, 10, 9, 7, 10, 11, - 11, 9, 9, 10, 10, 10, - 10, 11, 10, 11, 10, 10, - 10, 11, 11, 10, 11, 11, - 10, 10, 11, 10, 13, 12, - 11, 10, 13, 12, 10, 11, - 11, 10, 11, 12, 13, 12, - 11, 13, 14, 11, 10, 11, - 11, 9, 13, 12, 10, 12, - 11, 11, 10, 13, 13, 9, - 11, 11, 10, 11, 15, 13, - 11, 11, 14, 13, 11, 10, - 11, 11, 10, 12, 13, 9, - 10, 11, 11, 10, 10, 10, - 10, 11, 11, 11, 10, 11, - 10, 10, 10, 11, 10, 10, - 11, 11, 10, 10, 10, 11, - 7, 9, 9, 8, 9, 9, - 7, 10, 10, 10, 11, 11, - 11, 10, 10, 12, 11, 10, - 9, 10, 10, 7, 9, 10, - 7, 10, 11, 11, 10, 11, - 11, 10, 11, 12, 12, 12, - 13, 13, 12, 11, 13, 13, - 11, 11, 11, 11, 9, 11, - 11, 9, 9, 12, 11, 9, - 9, 10, 11, 10, 11, 11, - 11, 11, 11, 11, 11, 11, - 11, 10, 11, 11, 10, 9, - 10, 10, 11, 12, 11, 10, - 12, 11, 10, 11, 10, 12, - 11, 11, 13, 11, 10, 13, - 13, 11, 12, 12, 11, 11, - 11, 11, 10, 10, 13, 13, - 10, 10, 11, 11, 10, 12, - 13, 10, 12, 11, 12, 11, - 13, 13, 10, 14, 13, 10, - 10, 11, 11, 10, 13, 13, - 10, 10, 10, 11, 10, 13, - 12, 10, 12, 12, 12, 12, - 13, 13, 11, 13, 13, 10, - 10, 11, 11, 11, 12, 12, - 10, 11, 11, 10, 12, 12, - 11, 11, 13, 12, 11, 10, - 13, 13, 10, 11, 12, 12, - 10, 11, 11, 11, 9, 12, - 11, 10, 9, 11, 11, 10, - 11, 11, 10, 12, 11, 11, - 10, 11, 11, 10, 11, 11, - 10, 9, 10, 10, 9, 12, - 13, 9, 13, 10, 11, 11, - 13, 14, 11, 14, 14, 13, - 13, 14, 13, 11, 13, 13, - 11, 12, 11, 11, 13, 11, - 11, 9, 12, 12, 9, 11, - 11, 11, 13, 14, 15, 12, - 12, 13, 14, 12, 10, 11, - 11, 9, 13, 12, 9, 10, - 13, 13, 10, 9, 11, 11, - 10, 12, 13, 11, 13, 12, - 13, 13, 13, 13, 10, 13, - 12, 10, 10, 11, 10, 17, - 13, 13, 11, 13, 14, 11, - 11, 11, 12, 12, 11, 15, - 13, 13, 17, 14, 13, 12, - 13, 13, 11, 14, 13, 11, - 10, 13, 13, 11, 14, 14, - 11, 12, 12, 11, 13, 15, - 14, 13, 14, 16, 15, 13, - 12, 12, 13, 11, 14, 14, - 11, 10, 13, 13, 10, 9, - 10, 10, 11, 13, 13, 10, - 13, 13, 12, 13, 13, 13, - 10, 13, 13, 10, 10, 11, - 11, 12, 11, 11, 9, 12, - 12, 9, 11, 11, 11, 12, - 14, 14, 12, 12, 14, 13, - 12, 10, 11, 11, 9, 12, - 12, 9, 10, 14, 14, 9, - 12, 11, 11, 11, 13, 14, - 11, 17, 14, 13, 13, 14, - 13, 11, 14, 13, 11, 12, - 11, 11, 13, 11, 11, 9, - 13, 12, 9, 10, 11, 10, - 12, 14, 14, 12, 14, 13, - 14, 12, 11, 11, 11, 9, - 12, 12, 9, 10, 13, 14, - 10, 10, 11, 10, 10, 14, - 12, 10, 13, 13, 12, 12, - 12, 13, 10, 12, 13, 10, - 9, 10, 11, 11, 13, 13, - 11, 14, 14, 11, 12, 13, - 13, 13, 17, 16, 13, 13, - 13, 16, 13, 12, 11, 13, - 11, 13, 14, 11, 17, 12, - 13, 11, 13, 16, 11, 12, - 13, 12, 13, 15, 17, 13, - 13, 17, 11, 12, 11, 12, - 11, 11, 14, 14, 11, 10, - 13, 13, 10, 12, 10, 11, - 10, 12, 13, 10, 12, 13, - 13, 12, 12, 12, 11, 14, - 12, 10, 9, 11, 11, 12, - 11, 11, 10, 12, 13, 9, - 10, 10, 11, 12, 13, 14, - 12, 12, 15, 14, 12, 11, - 11, 11, 9, 12, 13, 9, - 10, 11, 11, 9, 11, 11, - 9, 11, 11, 12, 11, 13, - 13, 11, 12, 13, 14, 12, - 12, 12, 12, 10, 11, 11, - 10, 10, 11, 11, 9, 9, - 10, 10, 10, 11, 11, 10, - 10, 11, 11, 11, 11, 12, - 10, 11, 11, 11, 9, 10, - 10, 11, 12, 12, 10, 11, - 11, 10, 11, 12, 11, 10, - 12, 13, 10, 11, 12, 13, - 11, 12, 11, 12, 10, 11, - 11, 10, 10, 14, 13, 10, - 10, 11, 11, 10, 13, 12, - 10, 12, 13, 12, 12, 12, - 13, 10, 12, 13, 10, 10, - 11, 11, 11, 13, 13, 10, - 10, 11, 11, 10, 12, 13, - 10, 12, 13, 12, 12, 13, - 11, 10, 12, 12, 10, 12, - 11, 11, 11, 11, 12, 10, - 10, 11, 10, 12, 11, 12, - 11, 13, 12, 10, 11, 13, - 11, 11, 11, 12, 10, 10, - 11, 11, 10, 9, 11, 11, - 9, 9, 10, 10, 10, 11, - 11, 10, 10, 11, 11, 12, - 11, 11, 11, 11, 11, 10, - 9, 11, 10, 7, 10, 10, - 7, 7, 9, 9, 9, 10, - 11, 10, 12, 11, 11, 12, - 11, 11, 10, 10, 11, 10, - 7, 10, 9, 7, 10, 9, - 7, 10, 10, 7, 9, 10, - 10, 10, 11, 12, 10, 10, - 11, 11, 10, 10, 10, 11, - 7, 9, 10, 8, 10, 12, - 11, 10, 9, 11, 10, 10, - 11, 11, 10, 10, 10, 11, - 11, 10, 10, 10, 10, 11, - 11, 10, 10, 10, 13, 12, - 11, 12, 12, 12, 10, 10, - 11, 11, 11, 14, 14, 11, - 11, 13, 13, 11, 11, 11, - 10, 10, 12, 12, 10, 13, - 11, 11, 10, 12, 13, 9, - 10, 11, 11, 11, 14, 13, - 11, 11, 13, 12, 11, 11, - 10, 11, 10, 12, 13, 10, - 9, 11, 11, 10, 10, 10, - 11, 10, 11, 11, 11, 13, - 11, 11, 11, 10, 10, 10, - 11, 10, 10, 9, 10, 10, - 7, 9, 10, 7, 9, 9, - 8, 10, 10, 10, 10, 12, - 11, 10, 11, 11, 12, 10, - 10, 10, 10, 7, 10, 10, - 7, +static const uint8_t on2avc_cb4_bits[ON2AVC_CB_3_4_CODES] = { + 7, 7, 7, 9, 9, 9, 10, 11, 12, 12, 6, 6, 6, 7, 9, 9, 9, 9, 6, + 6, 6, 7, 9, 9, 9, 9, 6, 6, 6, 7, 7, 6, 6, 9, 9, 9, 11, 12, + 12, 11, 11, 9, 9, 9, 11, 11, 11, 12, 12, 7, 9, 9, 9, 9, 7, 9, 9, + 9, 11, 11, 11, 11, 7, 9, 9, 9, 9, 6, 6, 6, 7, 9, 9, 9, 11, 11, + 11, 11, 6, 9, 9, 9, 9, 9, 9, 9, 9, 6, 6, 6, 6, 6, 9, 9, 9, + 11, 11, 11, 11, 9, 9, 9, 9, 6, 9, 10, 12, 13, 13, 12, 12, 9, 9, 9, + 9, 9, 9, 9, 11, 12, 12, 11, 12, 12, 9, 9, 9, 9, 9, 9, 9, 11, 12, + 12, 12, 12, 12, 12, 9, 10, 10, 10, 11, 12, 12, 10, 10, 9, 10, 10, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 12, 12, 12, 12, 11, 12, 12, 9, 9, 9, 9, 9, + 10, 10, 6, 9, 10, 10, 9, 9, 9, 10, 10, 9, 10, 10, 4, 6, 9, 10, 11, + 12, 12, 9, 10, 10, 9, 10, 11, 11, 10, 10, 10, 11, 12, 12, 9, 10, 10, 10, + 11, 12, 12, 10, 10, 8, 10, 10, 10, 10, 8, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 11, 12, 13, 14, 14, 10, 10, 8, 10, 10, 10, 11, 12, 12, 8, 10, 10, 10, + 10, 8, 8, 8, 10, 10, 10, 11, 11, 8, 8, 8, 10, 10, 10, 11, 11, 8, 10, + 11, 11, 10, 10, 8, 8, 8, 10, 10, 10, 10, 8, 10, 11, 11, 10, 10, 8, 9, + 10, 11, 13, 13, 13, 13, 9, 10, 10, 10, 11, 11, 10, 10, 6, 6, 5, 5, 5, + 6, 8, 9, 9, 8, 9, 10, 11, 11, }; -#define ON2AVC_CB7_8_CODES 3281 -static const uint32_t on2avc_cb7_codes[ON2AVC_CB7_8_CODES] = { - 0x00000, 0x000EA, 0x000E6, 0x000F4, 0x000F6, 0x00047, - 0x003E2, 0x004A7, 0x00044, 0x004D3, 0x0082A, 0x0026E, - 0x0020E, 0x008A5, 0x02603, 0x02895, 0x049B0, 0x02894, - 0x007BE, 0x0069E, 0x01154, 0x01153, 0x0095F, 0x0038E, - 0x004AC, 0x0128E, 0x00E5E, 0x00992, 0x02A84, 0x0386A, - 0x03F6F, 0x01C54, 0x005D4, 0x00AFB, 0x001BE, 0x00258, - 0x00A59, 0x00043, 0x004A6, 0x004D7, 0x00040, 0x0006C, - 0x007FF, 0x00D39, 0x0005B, 0x00066, 0x0034A, 0x00124, - 0x004B6, 0x00626, 0x0071F, 0x014A3, 0x014A2, 0x0083E, - 0x032D4, 0x049B3, 0x0045E, 0x00ED5, 0x02896, 0x00ABA, - 0x0107B, 0x009EC, 0x0082C, 0x0082B, 0x00D38, 0x0072B, - 0x004FC, 0x049B2, 0x050B1, 0x003FE, 0x009EB, 0x049B1, - 0x00966, 0x00F75, 0x03F70, 0x007BC, 0x00054, 0x00394, - 0x000E8, 0x0052F, 0x0057A, 0x00458, 0x0FB4B, 0x01C55, - 0x00948, 0x032D6, 0x00ED6, 0x0A05F, 0x050B3, 0x00BBD, - 0x0197E, 0x024FC, 0x020C6, 0x0094A, 0x0386B, 0x1F2FF, - 0x050B4, 0x0A060, 0x0FB4C, 0x009ED, 0x02A85, 0x0FB4D, - 0x02605, 0x00ABB, 0x009A2, 0x0145B, 0x0A05D, 0x03F71, - 0x00BFF, 0x1F2FE, 0x0FB49, 0x0FB48, 0x050B2, 0x01155, - 0x01FD6, 0x032D5, 0x00976, 0x02604, 0x00A5A, 0x0A05E, - 0x0FB4A, 0x00DB9, 0x0A063, 0x1F307, 0x0FB4F, 0x1F306, - 0x049B4, 0x0FB50, 0x0FB51, 0x050B6, 0x1F308, 0x050B7, - 0x1F30A, 0x1F309, 0x0A064, 0x1F30B, 0x0A066, 0x06535, - 0x020C7, 0x0A065, 0x032D7, 0x0FB52, 0x02897, 0x0077A, - 0x03F72, 0x0FB4E, 0x050B5, 0x0076E, 0x1F301, 0x1F302, - 0x06533, 0x01FD7, 0x1F300, 0x0A061, 0x1F304, 0x1F303, - 0x07E54, 0x024FD, 0x1F305, 0x06534, 0x02606, 0x0A062, - 0x007C0, 0x0A06A, 0x1F30F, 0x0FB54, 0x0386D, 0x009E6, - 0x1F310, 0x06538, 0x00DBA, 0x014A4, 0x050B9, 0x1F311, - 0x0A06B, 0x0128F, 0x07E55, 0x1F312, 0x0FB55, 0x01C56, - 0x07E56, 0x0FB56, 0x1F313, 0x050BA, 0x01C57, 0x02608, - 0x0A067, 0x1F30D, 0x1F30C, 0x02607, 0x0386C, 0x0A069, - 0x0A068, 0x01557, 0x00ED7, 0x06536, 0x1F30E, 0x0FB53, - 0x02609, 0x007BF, 0x050B8, 0x06537, 0x00DE5, 0x00392, - 0x03F69, 0x0A055, 0x0FB3C, 0x0A054, 0x00AB7, 0x050AB, - 0x0FB3D, 0x00CE6, 0x009E8, 0x014A1, 0x049A8, 0x1F2ED, - 0x02890, 0x009E9, 0x049A9, 0x1F2EE, 0x032D1, 0x020C4, - 0x049AA, 0x0A056, 0x0FB3E, 0x0FB3F, 0x0A051, 0x0A052, - 0x0A053, 0x0FB39, 0x0A050, 0x0096E, 0x0FB3A, 0x1F2EB, - 0x029FE, 0x007FE, 0x0128D, 0x049A7, 0x1F2EC, 0x07E50, - 0x00E36, 0x03867, 0x0FB3B, 0x006EA, 0x03F6B, 0x1F2F4, - 0x1F2F3, 0x03868, 0x049AB, 0x1F2F6, 0x029FF, 0x1F2F5, - 0x0A05A, 0x07E52, 0x1F2F7, 0x07E51, 0x03F6C, 0x1F2FA, - 0x07E53, 0x025FF, 0x1F2F8, 0x1F2F9, 0x009A0, 0x06532, - 0x0FB45, 0x024FB, 0x008B9, 0x01D7D, 0x0FB40, 0x01FD3, - 0x0FB42, 0x0A058, 0x050AC, 0x0A057, 0x0FB41, 0x0A059, - 0x1F2F0, 0x1F2EF, 0x0FB43, 0x03F6A, 0x0FB44, 0x020C5, - 0x1F2F1, 0x1F2F2, 0x004FE, 0x02601, 0x00A58, 0x01FD5, - 0x049AD, 0x00A46, 0x02A80, 0x050AD, 0x009E5, 0x01B56, - 0x02A81, 0x00A36, 0x01556, 0x032D3, 0x02A82, 0x0FB47, - 0x1F2FD, 0x050AE, 0x004BA, 0x00A6B, 0x03F6D, 0x049AE, - 0x01317, 0x009A1, 0x00AB8, 0x02891, 0x03869, 0x01FD4, - 0x049AC, 0x1F2FB, 0x0FB46, 0x0A05B, 0x02600, 0x032D2, - 0x0137E, 0x01C53, 0x02892, 0x00BFE, 0x0A05C, 0x1F2FC, - 0x00CE7, 0x00058, 0x00FF7, 0x009EA, 0x00068, 0x00060, - 0x004D2, 0x004BD, 0x000EE, 0x003A4, 0x006E2, 0x0137F, - 0x0197D, 0x006EB, 0x050B0, 0x03F6E, 0x00E37, 0x00316, - 0x02893, 0x004CB, 0x006EE, 0x01152, 0x008AE, 0x0067E, - 0x00991, 0x0145A, 0x00AB9, 0x049AF, 0x02A83, 0x00A6C, - 0x0045F, 0x02602, 0x006E1, 0x050AF, 0x012D2, 0x0073F, - 0x00061, 0x00526, 0x004D6, 0x0013E, 0x003AE, 0x0005E, - 0x01D7E, 0x0289F, 0x00059, 0x0006A, 0x0082D, 0x00F77, - 0x009EE, 0x006E3, 0x00D3F, 0x1F32B, 0x02A8B, 0x00D3E, - 0x032DE, 0x0FB60, 0x02A8C, 0x020CC, 0x03874, 0x0045B, - 0x00DE8, 0x0082E, 0x00636, 0x012D6, 0x049B9, 0x0260C, - 0x01157, 0x06540, 0x0A073, 0x02504, 0x0289D, 0x050C2, - 0x00AFE, 0x0260D, 0x0289E, 0x00A6F, 0x0004E, 0x006EF, - 0x0099C, 0x00EDA, 0x0062E, 0x00048, 0x00A3A, 0x01292, - 0x013C2, 0x00A72, 0x0012A, 0x028A0, 0x02507, 0x00174, - 0x00DE9, 0x00ABF, 0x00EDE, 0x01146, 0x013C3, 0x032E1, - 0x049BA, 0x03875, 0x03876, 0x00824, 0x0077B, 0x032E2, - 0x01050, 0x00677, 0x00EDB, 0x0145C, 0x02505, 0x032DF, - 0x019C0, 0x050C3, 0x06541, 0x0A074, 0x032E0, 0x00A37, - 0x02506, 0x00ABE, 0x00E78, 0x02A8D, 0x001B4, 0x02A8E, - 0x01D7F, 0x001A4, 0x00DEA, 0x1F32F, 0x050C5, 0x009EF, - 0x00977, 0x020CD, 0x01B60, 0x019C3, 0x017DE, 0x0131A, - 0x0260F, 0x0A075, 0x01C5C, 0x0FB61, 0x07E62, 0x00E79, - 0x02610, 0x0A076, 0x014A7, 0x02611, 0x009FA, 0x007C1, - 0x0145D, 0x1F32C, 0x049BB, 0x019C1, 0x06543, 0x1F32D, - 0x06544, 0x01FD8, 0x06542, 0x01B5E, 0x06545, 0x1F32E, - 0x019C2, 0x005F4, 0x0260E, 0x050C4, 0x01B5F, 0x01C5B, - 0x032E3, 0x1F339, 0x1F33A, 0x1F338, 0x0FB63, 0x028A1, - 0x1F33B, 0x0FB64, 0x049BC, 0x0A07A, 0x1F33C, 0x0A07B, - 0x032E4, 0x07E63, 0x1F33E, 0x07E64, 0x1F33D, 0x0FB65, - 0x028A2, 0x02612, 0x02613, 0x050C6, 0x00967, 0x0155A, - 0x03F78, 0x1F330, 0x0A077, 0x03877, 0x0A078, 0x1F333, - 0x1F331, 0x1F332, 0x03878, 0x1F335, 0x1F336, 0x06546, - 0x1F334, 0x06547, 0x1F337, 0x0A079, 0x0FB62, 0x006FE, - 0x1F342, 0x0FB69, 0x008A7, 0x009FB, 0x1F343, 0x1F344, - 0x050C7, 0x0654A, 0x020CF, 0x1F345, 0x020CE, 0x01FD9, - 0x028A5, 0x0A07C, 0x0A07D, 0x050C8, 0x013C6, 0x03F7A, - 0x0A07E, 0x0387B, 0x01C5D, 0x03879, 0x06548, 0x1F33F, - 0x028A3, 0x00DBE, 0x03F79, 0x1F340, 0x0FB66, 0x028A4, - 0x008B2, 0x0FB67, 0x0387A, 0x0131B, 0x005D5, 0x06549, - 0x1F341, 0x0FB68, 0x0155B, 0x00DE6, 0x07E59, 0x1F318, - 0x00266, 0x00823, 0x01B57, 0x0FB58, 0x1F319, 0x0386F, - 0x01B58, 0x02899, 0x050BB, 0x00DBB, 0x01B59, 0x032D9, - 0x050BC, 0x1F31A, 0x03F74, 0x032DA, 0x0A06D, 0x06539, - 0x03870, 0x0386E, 0x1F315, 0x1F314, 0x024FE, 0x0176A, - 0x032D8, 0x0A06C, 0x1F316, 0x07E57, 0x014A5, 0x049B5, - 0x07E58, 0x00D3A, 0x0075B, 0x02898, 0x1F317, 0x0FB57, - 0x03F73, 0x01B5A, 0x0FB5B, 0x050BE, 0x1F31F, 0x0FB5A, - 0x0653B, 0x1F320, 0x0FB5C, 0x07E5C, 0x07E5D, 0x1F322, - 0x050BF, 0x0A06F, 0x1F321, 0x0FB5D, 0x1F325, 0x1F323, - 0x1F324, 0x01C58, 0x00ED8, 0x0289A, 0x1F326, 0x03F77, - 0x013C0, 0x0653A, 0x03F75, 0x1F31B, 0x024FF, 0x03F76, - 0x0FB59, 0x07E5A, 0x0A06E, 0x02500, 0x07E5B, 0x02A86, - 0x050BD, 0x1F31C, 0x032DB, 0x1F31E, 0x1F31D, 0x049B6, - 0x00C49, 0x1F329, 0x1F328, 0x00BBE, 0x008A6, 0x03871, - 0x01B5B, 0x02A88, 0x01558, 0x020C9, 0x0FB5F, 0x049B7, - 0x014A6, 0x07E5F, 0x1F32A, 0x0197F, 0x01B5C, 0x03872, - 0x00726, 0x01156, 0x02501, 0x0104F, 0x00C48, 0x032DC, - 0x0653C, 0x0176B, 0x1F327, 0x0653D, 0x0289B, 0x07E5E, - 0x0FB5E, 0x0176E, 0x0A071, 0x0A070, 0x0260A, 0x00993, - 0x020C8, 0x0176F, 0x02A87, 0x0289C, 0x00042, 0x00CE8, - 0x01C5A, 0x00F76, 0x008BA, 0x001C8, 0x02A8A, 0x02503, - 0x00136, 0x00A6E, 0x020CB, 0x00A5B, 0x008AF, 0x00ED9, - 0x03873, 0x0653F, 0x07E61, 0x050C1, 0x007A9, 0x0067F, - 0x013C1, 0x01559, 0x00D3B, 0x00DE7, 0x01B5D, 0x050C0, - 0x0260B, 0x02A89, 0x0653E, 0x0A072, 0x07E60, 0x049B8, - 0x00A6D, 0x02502, 0x00E5F, 0x012D3, 0x020CA, 0x0015D, - 0x032DD, 0x01C59, 0x0018E, 0x000E0, 0x07E77, 0x07E78, - 0x07E76, 0x049C5, 0x00BEA, 0x0A090, 0x0A08F, 0x00A3B, - 0x03F80, 0x0655A, 0x0655B, 0x050D1, 0x0A091, 0x1F37E, - 0x1F37F, 0x1F37C, 0x1F37D, 0x0FB77, 0x0655D, 0x050D2, - 0x1F380, 0x0655C, 0x02618, 0x049C3, 0x1F379, 0x0A08D, - 0x07E72, 0x07E73, 0x1F37B, 0x1F37A, 0x0A08E, 0x0145E, - 0x06558, 0x06559, 0x07E74, 0x049C4, 0x0083F, 0x07E75, - 0x0FB76, 0x007AA, 0x008A8, 0x1F382, 0x0FB7B, 0x007AB, - 0x004B2, 0x050D5, 0x07E7C, 0x07E7B, 0x032E8, 0x0261A, - 0x07E7D, 0x1F383, 0x03F81, 0x1F384, 0x0655F, 0x0FB7C, - 0x0A094, 0x0A095, 0x020D3, 0x1F385, 0x050D6, 0x050D7, - 0x01B61, 0x0FB78, 0x07E79, 0x028A7, 0x07E7A, 0x0A092, - 0x1F381, 0x050D3, 0x0FB79, 0x032E7, 0x0655E, 0x0A093, - 0x01DA2, 0x0053B, 0x02619, 0x050D4, 0x0FB7A, 0x020D2, - 0x0094B, 0x0A09A, 0x0FB7F, 0x0FB7E, 0x03884, 0x00C4A, - 0x0FB80, 0x1F38B, 0x019C6, 0x032E9, 0x01C5F, 0x0FB82, - 0x1F38C, 0x0FB81, 0x050D9, 0x07E7E, 0x1F38D, 0x1F38E, - 0x03885, 0x050DB, 0x07E7F, 0x06562, 0x050DA, 0x00E7A, - 0x02A92, 0x1F386, 0x0A096, 0x06560, 0x06561, 0x1F389, - 0x1F387, 0x1F388, 0x050D8, 0x0A098, 0x0FB7D, 0x02A93, - 0x0A097, 0x01FDC, 0x1F38A, 0x0A099, 0x020D4, 0x07E82, - 0x0FB89, 0x1F394, 0x07E81, 0x0A09E, 0x0FB8B, 0x1F395, - 0x07E83, 0x0FB8A, 0x028A8, 0x1F397, 0x1F396, 0x0A09F, - 0x0FB8C, 0x03F82, 0x049C6, 0x1F398, 0x1F399, 0x06563, - 0x02508, 0x03886, 0x07E84, 0x012E6, 0x0A09B, 0x1F38F, - 0x032EA, 0x0FB85, 0x1F390, 0x0FB86, 0x0FB83, 0x0FB84, - 0x0A09C, 0x1F392, 0x1F391, 0x0FB87, 0x02A94, 0x1F393, - 0x0A09D, 0x07E80, 0x0FB88, 0x006B6, 0x1F39D, 0x1F39E, - 0x0A0A1, 0x0A0A2, 0x0155E, 0x1F39F, 0x0A0A3, 0x02509, - 0x020D5, 0x0A0A4, 0x1F3A0, 0x07E86, 0x06564, 0x01FDE, - 0x0FB90, 0x049C8, 0x06565, 0x050DE, 0x0A0A6, 0x07E87, - 0x0A0A5, 0x06566, 0x00E7B, 0x049C7, 0x1F39A, 0x0A0A0, - 0x050DC, 0x00DEC, 0x07E85, 0x0FB8D, 0x01FDD, 0x00CE9, - 0x050DD, 0x0FB8E, 0x1F39B, 0x03F83, 0x0051F, 0x1F39C, - 0x0FB8F, 0x01293, 0x009A3, 0x049BE, 0x1F34E, 0x1F34D, - 0x0654B, 0x0115A, 0x0A07F, 0x0654C, 0x00A47, 0x01C5E, - 0x049BF, 0x1F350, 0x1F34F, 0x0387C, 0x07E67, 0x1F351, - 0x07E66, 0x02A8F, 0x1F353, 0x07E68, 0x1F354, 0x1F352, - 0x0A080, 0x00BBF, 0x1F347, 0x1F348, 0x1F346, 0x0FB6A, - 0x032E5, 0x07E65, 0x1F349, 0x006E4, 0x012D7, 0x049BD, - 0x1F34A, 0x0FB6B, 0x050C9, 0x00DEB, 0x1F34C, 0x1F34B, - 0x0052E, 0x07E6A, 0x1F35F, 0x1F35E, 0x0A081, 0x0387D, - 0x1F361, 0x0654F, 0x1F360, 0x0A082, 0x0387E, 0x1F363, - 0x1F362, 0x050CA, 0x0A084, 0x1F365, 0x03F7D, 0x0A083, - 0x1F364, 0x032E6, 0x1F366, 0x0A085, 0x06550, 0x020D0, - 0x1F356, 0x1F355, 0x00A73, 0x1F357, 0x1F358, 0x1F359, - 0x07E69, 0x0654D, 0x1F35B, 0x0FB6C, 0x1F35A, 0x0654E, - 0x03F7B, 0x1F35D, 0x03F7C, 0x0FB6D, 0x1F35C, 0x009AA, - 0x03880, 0x1F36B, 0x0A086, 0x1F36A, 0x01FDA, 0x1F36C, - 0x0A087, 0x01051, 0x049C2, 0x0FB71, 0x07E6E, 0x0A088, - 0x03F7E, 0x06553, 0x1F36E, 0x1F36D, 0x06552, 0x028A6, - 0x02A90, 0x0A089, 0x1F36F, 0x03881, 0x0074A, 0x049C0, - 0x0FB6F, 0x0FB6E, 0x02614, 0x0FB70, 0x1F368, 0x1F367, - 0x07E6B, 0x0387F, 0x049C1, 0x07E6C, 0x06551, 0x050CB, - 0x014AA, 0x07E6D, 0x1F369, 0x02615, 0x0072C, 0x1F373, - 0x1F372, 0x008BB, 0x00450, 0x07E70, 0x1F375, 0x1F374, - 0x050CE, 0x03882, 0x1F376, 0x0FB74, 0x02617, 0x1F377, - 0x1F378, 0x07E71, 0x06557, 0x0FB75, 0x050CF, 0x050D0, - 0x0A08C, 0x03883, 0x02A91, 0x06555, 0x050CC, 0x06554, - 0x0A08A, 0x1F370, 0x050CD, 0x06556, 0x0FB72, 0x02616, - 0x07E6F, 0x0A08B, 0x01FDB, 0x0053A, 0x03F7F, 0x0FB73, - 0x1F371, 0x020D1, 0x01FE0, 0x1F3F9, 0x1F3F8, 0x02A98, - 0x00C4E, 0x0A0B6, 0x0FBB1, 0x1F3FA, 0x0FBB0, 0x1F3FC, - 0x1F3FD, 0x1F3FB, 0x0A0B7, 0x1F400, 0x1F401, 0x1F402, - 0x1F3FE, 0x1F3FF, 0x1F404, 0x1F405, 0x0FBB2, 0x1F403, - 0x1F3EF, 0x1F3F0, 0x1F3ED, 0x1F3EE, 0x1F3F3, 0x1F3F4, - 0x0FBAB, 0x1F3F1, 0x1F3F2, 0x0A0B5, 0x1F3F6, 0x1F3F5, - 0x0FBAC, 0x01052, 0x0FBAF, 0x1F3F7, 0x0FBAD, 0x0FBAE, - 0x004BC, 0x1F40D, 0x1F40E, 0x1F40C, 0x0FBB8, 0x049CC, - 0x1F410, 0x1F40F, 0x03F87, 0x0A0B9, 0x0A0BA, 0x1F412, - 0x0FBB9, 0x1F411, 0x1F415, 0x1F416, 0x1F413, 0x1F414, - 0x1F418, 0x0A0BB, 0x0FBBA, 0x1F417, 0x07E95, 0x07E93, - 0x1F406, 0x1F407, 0x0A0B8, 0x07E92, 0x0FBB5, 0x1F408, - 0x0FBB3, 0x0FBB4, 0x07E94, 0x0FBB7, 0x1F409, 0x0FBB6, - 0x03F86, 0x01DA3, 0x1F40B, 0x1F40A, 0x019C7, 0x06572, - 0x1F421, 0x1F420, 0x0250F, 0x00DBF, 0x1F422, 0x1F423, - 0x0FBBE, 0x050E2, 0x049CD, 0x1F425, 0x1F424, 0x07E97, - 0x1F427, 0x0FBC0, 0x1F428, 0x0FBBF, 0x1F426, 0x1F42A, - 0x1F42B, 0x1F429, 0x0A0C0, 0x013C7, 0x0A0BD, 0x1F419, - 0x0A0BC, 0x1F41C, 0x1F41D, 0x1F41E, 0x1F41A, 0x1F41B, - 0x0FBBC, 0x1F41F, 0x06571, 0x0FBBB, 0x01FE1, 0x0FBBD, - 0x0A0BF, 0x0A0BE, 0x07E96, 0x0FBC6, 0x1F437, 0x1F438, - 0x1F435, 0x1F436, 0x0A0C3, 0x1F43A, 0x1F439, 0x0FBC7, - 0x1F43B, 0x0FBC9, 0x0FBCA, 0x0FBC8, 0x07E99, 0x0A0C4, - 0x07E9A, 0x1F43C, 0x1F43D, 0x1F43E, 0x0A0C5, 0x050E4, - 0x0FBCB, 0x0FBCC, 0x050E3, 0x07E98, 0x0FBC2, 0x1F42C, - 0x0FBC1, 0x1F42F, 0x1F430, 0x1F42D, 0x1F42E, 0x0A0C1, - 0x1F432, 0x1F433, 0x0FBC3, 0x1F431, 0x0FBC5, 0x1F434, - 0x0FBC4, 0x0A0C2, 0x00AF6, 0x1F444, 0x0FBCF, 0x0261C, - 0x014AB, 0x0A0C8, 0x1F446, 0x1F445, 0x06573, 0x0261D, - 0x1F448, 0x1F447, 0x02A99, 0x0FBD1, 0x0A0C9, 0x1F449, - 0x0FBD0, 0x06574, 0x1F44C, 0x049CF, 0x1F44A, 0x1F44B, - 0x032EC, 0x1F440, 0x1F43F, 0x07E9B, 0x01B62, 0x0388A, - 0x1F441, 0x07E9C, 0x0A0C6, 0x00D6A, 0x0A0C7, 0x0FBCD, - 0x049CE, 0x00EDF, 0x0FBCE, 0x1F443, 0x1F442, 0x07E9D, - 0x03888, 0x0FB91, 0x1F3A8, 0x00E96, 0x00CEA, 0x0FB93, - 0x0FB94, 0x0FB92, 0x1F3A9, 0x03889, 0x0FB95, 0x0A0A7, - 0x0155F, 0x050E0, 0x0A0A8, 0x1F3AB, 0x1F3AA, 0x07E89, - 0x07E8A, 0x0A0AA, 0x0FB96, 0x0A0A9, 0x06567, 0x1F3A2, - 0x1F3A1, 0x02A95, 0x0250A, 0x06568, 0x1F3A4, 0x1F3A3, - 0x050DF, 0x02A96, 0x1F3A5, 0x06569, 0x00C4B, 0x00AFF, - 0x03887, 0x1F3A7, 0x1F3A6, 0x07E88, 0x0261B, 0x1F3BC, - 0x1F3BD, 0x1F3BA, 0x1F3BB, 0x0656C, 0x0FB97, 0x1F3BE, - 0x0656B, 0x1F3C0, 0x0FB98, 0x1F3C1, 0x07E8C, 0x1F3BF, - 0x1F3C2, 0x0FB9A, 0x0FB99, 0x0A0AC, 0x0656D, 0x0FB9B, - 0x1F3C4, 0x1F3C3, 0x07E8D, 0x049C9, 0x0A0AB, 0x1F3AE, - 0x1F3AC, 0x1F3AD, 0x1F3B1, 0x1F3B2, 0x1F3AF, 0x1F3B0, - 0x1F3B5, 0x1F3B6, 0x1F3B7, 0x1F3B3, 0x1F3B4, 0x0656A, - 0x1F3B9, 0x1F3B8, 0x07E8B, 0x03F84, 0x1F3CF, 0x1F3CE, - 0x032EB, 0x0250B, 0x0FB9E, 0x0A0AF, 0x1F3D0, 0x0A0AE, - 0x0A0B1, 0x1F3D1, 0x0A0B0, 0x049CA, 0x1F3D3, 0x1F3D4, - 0x0FBA0, 0x0FB9F, 0x1F3D2, 0x0FBA1, 0x0A0B2, 0x1F3D5, - 0x07E90, 0x07E8E, 0x1F3C6, 0x1F3C5, 0x0656E, 0x1F3C7, - 0x1F3C8, 0x0656F, 0x07E8F, 0x0FB9C, 0x0A0AD, 0x0FB9D, - 0x1F3C9, 0x050E1, 0x01FDF, 0x1F3CC, 0x1F3CD, 0x1F3CA, - 0x1F3CB, 0x00410, 0x0FBA9, 0x1F3DF, 0x1F3DE, 0x0FBA8, - 0x02A97, 0x1F3E1, 0x1F3E0, 0x0250E, 0x0FBAA, 0x1F3E3, - 0x1F3E4, 0x07E91, 0x1F3E2, 0x1F3E7, 0x1F3E8, 0x1F3E5, - 0x1F3E6, 0x1F3EA, 0x1F3EB, 0x1F3EC, 0x1F3E9, 0x0A0B4, - 0x03F85, 0x0FBA4, 0x1F3D6, 0x0FBA2, 0x0FBA3, 0x1F3D8, - 0x0FBA6, 0x1F3D7, 0x0FBA5, 0x1F3DB, 0x0A0B3, 0x1F3DC, - 0x1F3D9, 0x1F3DA, 0x049CB, 0x0FBA7, 0x1F3DD, 0x06570, - 0x0014C, 0x1F4A6, 0x1F4A7, 0x1F4A5, 0x0FBE7, 0x00DEF, - 0x1F4A9, 0x1F4A8, 0x01166, 0x050EB, 0x050EC, 0x1F4AB, - 0x1F4AA, 0x0A0D7, 0x0FBE8, 0x1F4AD, 0x1F4AC, 0x0A0D8, - 0x0A0D9, 0x1F4B0, 0x1F4B1, 0x1F4AE, 0x1F4AF, 0x0FBE6, - 0x1F49C, 0x1F49D, 0x1F49B, 0x0FBE5, 0x07EA2, 0x1F49F, - 0x1F49E, 0x0A0D6, 0x019F6, 0x1F4A1, 0x1F4A2, 0x1F4A0, - 0x050EA, 0x01C9E, 0x1F4A4, 0x1F4A3, 0x0133A, 0x00E4E, - 0x1F4BE, 0x1F4BD, 0x00BEE, 0x001AE, 0x050EE, 0x1F4C0, - 0x1F4BF, 0x050ED, 0x020DA, 0x1F4C2, 0x1F4C1, 0x050EF, - 0x0FBEB, 0x1F4C3, 0x1F4C4, 0x0FBE9, 0x0FBEA, 0x1F4C6, - 0x1F4C7, 0x1F4C5, 0x0A0DC, 0x1F4B4, 0x1F4B5, 0x1F4B2, - 0x1F4B3, 0x03F8A, 0x1F4B7, 0x1F4B8, 0x1F4B6, 0x0A0DA, - 0x02A9B, 0x1F4BA, 0x1F4B9, 0x0145F, 0x004AD, 0x0A0DB, - 0x1F4BC, 0x1F4BB, 0x03F8B, 0x003A6, 0x0A0DE, 0x1F4D1, - 0x1F4D0, 0x0FBED, 0x00DCA, 0x0FBEE, 0x1F4D2, 0x00EFE, - 0x02096, 0x0A0DF, 0x1F4D4, 0x1F4D3, 0x07EA6, 0x0FBEF, - 0x1F4D6, 0x1F4D5, 0x0A0E0, 0x1F4D9, 0x1F4DA, 0x1F4DB, - 0x1F4D7, 0x1F4D8, 0x07EA3, 0x1F4CA, 0x1F4CB, 0x1F4C8, - 0x1F4C9, 0x0388E, 0x0FBEC, 0x1F4CC, 0x049D8, 0x00CEB, - 0x0657A, 0x0A0DD, 0x1F4CD, 0x049D9, 0x00521, 0x1F4CF, - 0x1F4CE, 0x00CFA, 0x01B67, 0x1F4E4, 0x1F4E3, 0x032EF, - 0x00292, 0x0FBF2, 0x1F4E6, 0x1F4E5, 0x0FBF1, 0x014D2, - 0x0A0E5, 0x0A0E4, 0x028AA, 0x1F4E9, 0x0657F, 0x1F4EA, - 0x1F4E7, 0x1F4E8, 0x1F4ED, 0x1F4EE, 0x1F4EB, 0x1F4EC, - 0x0412E, 0x1F4DC, 0x0A0E1, 0x0A0E2, 0x049DA, 0x1F4DE, - 0x1F4DF, 0x1F4DD, 0x0657B, 0x01B66, 0x1F4E0, 0x0FBF0, - 0x0388F, 0x00522, 0x0A0E3, 0x1F4E2, 0x1F4E1, 0x0657E, - 0x007C2, 0x0A0EB, 0x1F4F8, 0x1F4F7, 0x0FBF5, 0x00F7A, - 0x1F4F9, 0x0FBF6, 0x020DB, 0x028AB, 0x1F4FB, 0x1F4FC, - 0x1F4FA, 0x0FBF7, 0x01DFE, 0x0BEFA, 0x1F4FD, 0x07EA7, - 0x1F502, 0x13FC2, 0x1F503, 0x1F4FE, 0x1F4FF, 0x1F4F1, - 0x0FBF3, 0x1F4F2, 0x1F4EF, 0x1F4F0, 0x02576, 0x0A0E7, - 0x1F4F3, 0x0A0E6, 0x07092, 0x0FBF4, 0x1F4F5, 0x1F4F4, - 0x049DB, 0x0096F, 0x1F4F6, 0x0A0EA, 0x02623, 0x006FF, - 0x1F45C, 0x1F45D, 0x1F45B, 0x07E9E, 0x03F88, 0x1F45F, - 0x1F45E, 0x020D7, 0x06575, 0x1F462, 0x0FBD2, 0x1F460, - 0x1F461, 0x1F464, 0x0FBD4, 0x0FBD3, 0x1F463, 0x1F467, - 0x1F468, 0x1F469, 0x1F465, 0x1F466, 0x1F44F, 0x1F450, - 0x1F451, 0x1F44D, 0x1F44E, 0x1F453, 0x1F454, 0x1F452, - 0x020D6, 0x0388B, 0x1F457, 0x1F458, 0x1F455, 0x1F456, - 0x028A9, 0x1F45A, 0x1F459, 0x00DED, 0x020D8, 0x1F472, - 0x1F471, 0x0261F, 0x006F0, 0x0FBD6, 0x1F474, 0x1F473, - 0x050E5, 0x049D3, 0x0FBD7, 0x1F475, 0x015EE, 0x1F477, - 0x0A0CD, 0x1F478, 0x1F476, 0x050E6, 0x1F47A, 0x1F47B, - 0x1F479, 0x0A0CE, 0x0A0CB, 0x1F46A, 0x0A0CA, 0x0261E, - 0x049D0, 0x0A0CC, 0x1F46C, 0x1F46B, 0x06576, 0x049D1, - 0x1F46E, 0x1F46D, 0x01FE2, 0x004DE, 0x049D2, 0x1F470, - 0x1F46F, 0x0FBD5, 0x00376, 0x0FBDB, 0x0FBDC, 0x1F482, - 0x0A0D0, 0x00C5E, 0x1F484, 0x1F483, 0x00BEB, 0x020D9, - 0x06578, 0x1F486, 0x1F485, 0x07E9F, 0x0A0D1, 0x1F487, - 0x07EA0, 0x050E8, 0x1F488, 0x0FBDF, 0x1F489, 0x0FBDD, - 0x0FBDE, 0x050E7, 0x0A0CF, 0x1F47D, 0x1F47C, 0x0FBD8, - 0x06577, 0x1F47F, 0x1F47E, 0x032ED, 0x012BA, 0x03F89, - 0x0FBD9, 0x1F480, 0x032EE, 0x00C4F, 0x1F481, 0x0FBDA, - 0x01B63, 0x00DEE, 0x0FBE1, 0x1F491, 0x0115B, 0x001CE, - 0x049D6, 0x1F493, 0x1F492, 0x0A0D4, 0x049D7, 0x1F495, - 0x1F494, 0x02A9A, 0x0A0D5, 0x0FBE3, 0x1F497, 0x1F496, - 0x0FBE2, 0x0FBE4, 0x1F49A, 0x1F498, 0x1F499, 0x049D4, - 0x1F48A, 0x0A0D2, 0x0FBE0, 0x049D5, 0x0A0D3, 0x1F48C, - 0x1F48B, 0x07EA1, 0x01FE3, 0x1F48E, 0x1F48D, 0x02622, - 0x00520, 0x050E9, 0x1F490, 0x1F48F, 0x06579, 0x0018A, - 0x09FE6, 0x1F0E6, 0x1F0E5, 0x0459C, 0x00DCB, 0x1F0E7, - 0x0FA96, 0x012D0, 0x020A6, 0x1F0E9, 0x1F0EA, 0x1F0E8, - 0x0FA97, 0x09FE7, 0x1F0EC, 0x1F0EB, 0x06370, 0x09FE8, - 0x1F0EE, 0x1F0EF, 0x0FA98, 0x1F0ED, 0x1F0DC, 0x1F0DD, - 0x1F0DE, 0x1F0DA, 0x1F0DB, 0x1F0DF, 0x1F0E0, 0x0FA93, - 0x0FA94, 0x0507C, 0x1F0E2, 0x1F0E3, 0x1F0E1, 0x0507B, - 0x00AAE, 0x1F0E4, 0x0FA95, 0x00F5D, 0x00DB4, 0x0FA9C, - 0x1F0F9, 0x00FF2, 0x003AC, 0x1F0FB, 0x1F0FC, 0x1F0FA, - 0x029E0, 0x025CF, 0x1F0FE, 0x1F0FD, 0x029E1, 0x029E2, - 0x09FE9, 0x1F180, 0x1F0FF, 0x07E04, 0x0FA9D, 0x1F183, - 0x1F181, 0x1F182, 0x0FA9A, 0x1F0F1, 0x0FA99, 0x1F0F0, - 0x0384C, 0x1F0F3, 0x1F0F4, 0x1F0F2, 0x0FA9B, 0x019F7, - 0x1F0F6, 0x1F0F5, 0x02878, 0x0018C, 0x06371, 0x1F0F8, - 0x1F0F7, 0x07E03, 0x002FC, 0x0507E, 0x1F18E, 0x1F18D, - 0x06373, 0x00D2C, 0x1F190, 0x1F18F, 0x01356, 0x01357, - 0x0FAA0, 0x1F192, 0x1F191, 0x0507F, 0x02879, 0x1F194, - 0x1F193, 0x0384D, 0x1F197, 0x0FAA1, 0x0FAA2, 0x1F195, - 0x1F196, 0x1F186, 0x1F187, 0x1F188, 0x1F184, 0x1F185, - 0x0507D, 0x1F189, 0x0FA9E, 0x06372, 0x020A7, 0x07E05, - 0x1F18B, 0x1F18A, 0x09FEA, 0x00AF8, 0x0FA9F, 0x1F18C, - 0x00A30, 0x0106F, 0x1F19F, 0x1F19E, 0x01AD6, 0x005F6, - 0x1F1A1, 0x1F1A2, 0x1F1A0, 0x0FAA8, 0x0099E, 0x0FAA9, - 0x1F1A3, 0x06375, 0x0459E, 0x07E07, 0x1F1A6, 0x1F1A4, - 0x1F1A5, 0x09FEC, 0x0FAAA, 0x1F1A7, 0x09FEB, 0x0FAA4, - 0x1F199, 0x1F198, 0x0FAA3, 0x0FAA6, 0x0459D, 0x1F19B, - 0x1F19A, 0x0FAA5, 0x01C49, 0x07E06, 0x1F19C, 0x03F56, - 0x0077E, 0x05080, 0x1F19D, 0x0FAA7, 0x06374, 0x008A2, - 0x1F1B3, 0x1F1B4, 0x0FAAE, 0x1F1B2, 0x00AB0, 0x1F1B6, - 0x1F1B5, 0x04980, 0x0384E, 0x0FAAF, 0x1F1B8, 0x1F1B7, - 0x06377, 0x04981, 0x1F1BA, 0x1F1B9, 0x07E09, 0x07E0A, - 0x1F1BC, 0x1F1BD, 0x1F1BB, 0x0FAB0, 0x1F1AA, 0x1F1AB, - 0x1F1AC, 0x1F1A8, 0x1F1A9, 0x0FAAC, 0x07E08, 0x0FAAB, - 0x1F1AD, 0x029E3, 0x06376, 0x0FAAD, 0x1F1AE, 0x1F1AF, - 0x0459F, 0x1F1B1, 0x1F1B0, 0x01AD7, 0x00822, 0x1DFF2, - 0x1DFF3, 0x1DFF1, 0x0FA82, 0x03F52, 0x1DFF5, 0x1DFF4, - 0x00BF6, 0x062F8, 0x07DFD, 0x1DFF7, 0x1DFF6, 0x09FE0, - 0x062F9, 0x1DFF9, 0x1DFF8, 0x029A6, 0x0FA83, 0x1DFFC, - 0x1DFFD, 0x1DFFA, 0x1DFFB, 0x13FC3, 0x17DF6, 0x17DF7, - 0x0FA80, 0x0412F, 0x05074, 0x1C24C, 0x05F7C, 0x05F7E, - 0x03848, 0x05F7F, 0x1C24E, 0x1C24D, 0x07DFC, 0x01FC6, - 0x1DFF0, 0x1C24F, 0x02577, 0x029A7, 0x1EF67, 0x1EF66, - 0x024EE, 0x003BE, 0x0FA88, 0x1EF69, 0x1EF68, 0x062FA, - 0x0384B, 0x1EF6B, 0x1EF6A, 0x015EF, 0x05076, 0x0FA89, - 0x1EF6D, 0x1EF6C, 0x07E00, 0x1EF6F, 0x0FA8A, 0x1EF6E, - 0x062FB, 0x1EF60, 0x0FA84, 0x1DFFE, 0x1DFFF, 0x07DFE, - 0x0FA85, 0x1EF62, 0x1EF61, 0x03F54, 0x0384A, 0x1EF63, - 0x0FA86, 0x00E30, 0x002EC, 0x0FA87, 0x1EF65, 0x1EF64, - 0x07DFF, 0x002FE, 0x09FE3, 0x1EF7C, 0x1EF7B, 0x07E01, - 0x0095C, 0x1EF7E, 0x1EF7D, 0x01456, 0x0133B, 0x05077, - 0x1F0C0, 0x1EF7F, 0x062FD, 0x05078, 0x1F0C2, 0x1F0C1, - 0x01C46, 0x03F55, 0x1F0C4, 0x1F0C5, 0x1F0C3, 0x0FA8D, - 0x1EF72, 0x1EF73, 0x1EF74, 0x1EF70, 0x1EF71, 0x062FC, - 0x1EF75, 0x0FA8B, 0x09FE2, 0x0154E, 0x1EF78, 0x0FA8C, - 0x1EF76, 0x1EF77, 0x00F5C, 0x1EF7A, 0x1EF79, 0x00DB2, - 0x0106E, 0x1F0D3, 0x1F0D2, 0x00ED0, 0x0045A, 0x07E02, - 0x0FA8F, 0x1F0D4, 0x1F0D5, 0x01C48, 0x0FA91, 0x0FA90, - 0x025CE, 0x032BE, 0x062FF, 0x1F0D7, 0x1F0D6, 0x0FA92, - 0x09FE5, 0x1F0D9, 0x1F0D8, 0x09FE4, 0x1F0C8, 0x1F0C9, - 0x1F0C6, 0x1F0C7, 0x05079, 0x1F0CB, 0x1F0CC, 0x1F0CA, - 0x0FA8E, 0x0507A, 0x1F0CE, 0x1F0CD, 0x024EF, 0x0018F, - 0x1F0D0, 0x1F0D1, 0x1F0CF, 0x062FE, 0x04986, 0x1F211, - 0x1F210, 0x029E5, 0x0149C, 0x09FFF, 0x1F212, 0x0FAD5, - 0x0FAD6, 0x0FAD8, 0x1F214, 0x1F213, 0x0FAD7, 0x0A000, - 0x0A001, 0x1F216, 0x1F215, 0x0FAD9, 0x0A003, 0x0FADA, - 0x1F217, 0x0A002, 0x0FAD1, 0x1F205, 0x1F203, 0x1F204, - 0x1F207, 0x1F208, 0x1F209, 0x1F206, 0x0FAD2, 0x1F20C, - 0x0FAD3, 0x1F20A, 0x1F20B, 0x00E31, 0x0FAD4, 0x1F20F, - 0x1F20D, 0x1F20E, 0x003BC, 0x1F221, 0x0FADD, 0x1F21F, - 0x1F220, 0x01D2E, 0x1F223, 0x1F222, 0x0384F, 0x0A007, - 0x1F225, 0x1F226, 0x07E18, 0x1F224, 0x1F229, 0x1F22A, - 0x1F227, 0x1F228, 0x01ADD, 0x0A009, 0x1F22B, 0x0A008, - 0x04987, 0x0FADC, 0x07E16, 0x1F218, 0x0FADB, 0x07E15, - 0x1F21B, 0x1F21C, 0x1F219, 0x1F21A, 0x0637A, 0x0A005, - 0x0A006, 0x07E17, 0x0A004, 0x025F0, 0x1F21E, 0x1F21D, - 0x01ADC, 0x05088, 0x1F235, 0x1F234, 0x05087, 0x01978, - 0x1F238, 0x07E1A, 0x1F236, 0x1F237, 0x07E1C, 0x1F239, - 0x0FAE2, 0x07E1B, 0x1F23B, 0x0A00D, 0x1F23C, 0x1F23A, - 0x0FAE3, 0x01979, 0x0A00E, 0x1F23D, 0x04989, 0x1F22E, - 0x1F22F, 0x1F22C, 0x1F22D, 0x1F231, 0x0A00A, 0x1F232, - 0x0FADE, 0x1F230, 0x04988, 0x0FADF, 0x1F233, 0x07E19, - 0x01ADE, 0x0A00C, 0x0FAE1, 0x0FAE0, 0x0A00B, 0x032C2, - 0x1F249, 0x1F24A, 0x1F248, 0x0A010, 0x05089, 0x1F24C, - 0x0A011, 0x1F24B, 0x0A012, 0x0FAEA, 0x1F24E, 0x0508A, - 0x1F24D, 0x0A014, 0x1F250, 0x0A013, 0x1F24F, 0x029E6, - 0x07E1D, 0x1F253, 0x1F251, 0x1F252, 0x0FAE4, 0x0FAE5, - 0x0FAE6, 0x1F23E, 0x1F23F, 0x1F242, 0x0A00F, 0x1F240, - 0x1F241, 0x0FAE8, 0x1F244, 0x1F245, 0x0FAE7, 0x1F243, - 0x0FAE9, 0x1F247, 0x1F246, 0x03850, 0x01286, 0x1F25E, - 0x1F25D, 0x03851, 0x00D2D, 0x1F260, 0x1F261, 0x1F25F, - 0x07E1E, 0x00A68, 0x1F262, 0x0A015, 0x0637C, 0x0508C, - 0x0498A, 0x1F265, 0x1F263, 0x1F264, 0x03852, 0x0FAEE, - 0x1F266, 0x0A016, 0x0FAEB, 0x0FAEC, 0x1F254, 0x1F255, - 0x1F258, 0x0637B, 0x1F259, 0x1F256, 0x1F257, 0x032C3, - 0x0FAED, 0x0508B, 0x03F59, 0x01310, 0x032C4, 0x1F25C, - 0x1F25A, 0x1F25B, 0x04982, 0x09FEE, 0x1F1C4, 0x00FF3, - 0x01457, 0x06378, 0x1F1C6, 0x1F1C5, 0x0FAB4, 0x0287B, - 0x0FAB6, 0x0FAB5, 0x00FF6, 0x03F57, 0x0FAB7, 0x09FEF, - 0x1F1C7, 0x05083, 0x09FF0, 0x1F1C8, 0x0FAB8, 0x01FC8, - 0x09FED, 0x0FAB2, 0x0FAB1, 0x1F1BE, 0x07E0B, 0x05081, - 0x0FAB3, 0x1F1BF, 0x024F0, 0x0287A, 0x1F1C1, 0x1F1C0, - 0x01FC7, 0x00E5A, 0x05082, 0x1F1C3, 0x1F1C2, 0x07E0C, - 0x032C0, 0x0FABE, 0x0FABF, 0x1F1D1, 0x1F1D2, 0x07E10, - 0x1F1D5, 0x1F1D3, 0x1F1D4, 0x0FAC2, 0x0FAC3, 0x1F1D6, - 0x0FAC0, 0x0FAC1, 0x1F1D9, 0x1F1DA, 0x1F1D7, 0x1F1D8, - 0x05085, 0x09FF2, 0x1F1DC, 0x1F1DB, 0x0FAC4, 0x0FAB9, - 0x0FABA, 0x1F1CA, 0x07E0D, 0x1F1C9, 0x1F1CB, 0x1F1CC, - 0x07E0E, 0x0FABB, 0x0FABD, 0x1F1CD, 0x1F1CE, 0x0FABC, - 0x09FF1, 0x07E0F, 0x1F1D0, 0x1F1CF, 0x05084, 0x0287C, - 0x1F1E6, 0x1F1E5, 0x03F58, 0x0287D, 0x09FF6, 0x1F1E9, - 0x1F1E7, 0x1F1E8, 0x07E13, 0x09FF8, 0x1F1EA, 0x09FF7, - 0x1F1ED, 0x09FF9, 0x0FAC8, 0x1F1EB, 0x1F1EC, 0x09FFB, - 0x04984, 0x09FFA, 0x04983, 0x09FF3, 0x1F1DE, 0x1F1DD, - 0x07E11, 0x1F1DF, 0x1F1E0, 0x0FAC6, 0x09FF4, 0x0FAC5, - 0x07E12, 0x1F1E2, 0x1F1E1, 0x05086, 0x00ED2, 0x09FF5, - 0x1F1E4, 0x1F1E3, 0x0FAC7, 0x004D4, 0x1F1F9, 0x1F1FA, - 0x09FFC, 0x0FACD, 0x029E4, 0x0FACE, 0x1F1FB, 0x0287E, - 0x09FFD, 0x0FAD0, 0x1F1FC, 0x0FACF, 0x06379, 0x1F1FE, - 0x1F1FF, 0x1F1FD, 0x09FFE, 0x04985, 0x07E14, 0x1F202, - 0x1F200, 0x1F201, 0x1F1EF, 0x1F1F0, 0x1F1F1, 0x1F1EE, - 0x0FAC9, 0x1F1F3, 0x1F1F4, 0x1F1F2, 0x0FACA, 0x032C1, - 0x1F1F6, 0x0FACC, 0x1F1F5, 0x0FACB, 0x01C9F, 0x1F1F8, - 0x1F1F7, 0x01FC9, 0x000EC, 0x0650B, 0x0650C, 0x07E2B, - 0x029EC, 0x00DB6, 0x0FB04, 0x1F298, 0x0098C, 0x01FCC, - 0x0650D, 0x07E2C, 0x0FB05, 0x0FB06, 0x0FB08, 0x1F29A, - 0x1F299, 0x0FB07, 0x00ED3, 0x05094, 0x1F29B, 0x07E2D, - 0x0FB09, 0x03855, 0x06508, 0x0FB02, 0x1F292, 0x0FB01, - 0x1F295, 0x1F296, 0x1F293, 0x1F294, 0x05093, 0x0FB03, - 0x0650A, 0x07E2A, 0x06509, 0x00BB6, 0x0A02B, 0x1F297, - 0x00A54, 0x00708, 0x1F2A2, 0x1F2A1, 0x007A8, 0x004CA, - 0x029EE, 0x07E2F, 0x05095, 0x0197B, 0x01C4A, 0x0A02D, - 0x07E30, 0x01FCD, 0x0FB0C, 0x0650F, 0x0FB0D, 0x1F2A3, - 0x0650E, 0x01D78, 0x06510, 0x07E31, 0x07E32, 0x04993, - 0x07E2E, 0x0A02C, 0x03F5D, 0x1F29E, 0x1F29F, 0x03856, - 0x1F29C, 0x1F29D, 0x03857, 0x0FB0A, 0x1F2A0, 0x029ED, - 0x004B8, 0x024F5, 0x03F5E, 0x0FB0B, 0x03858, 0x008AC, - 0x0FB13, 0x07E35, 0x0FB12, 0x06512, 0x01C4C, 0x07E36, - 0x0FB14, 0x01550, 0x02882, 0x07E37, 0x07E38, 0x06513, - 0x05096, 0x06514, 0x0A032, 0x1F2A7, 0x1F2A8, 0x006E7, - 0x032CA, 0x1F2A9, 0x0FB15, 0x029EF, 0x07E34, 0x0A02E, - 0x0A02F, 0x0FB0E, 0x07E33, 0x0FB10, 0x06511, 0x1F2A4, - 0x0FB0F, 0x04994, 0x02881, 0x0A031, 0x0A030, 0x0FB11, - 0x01289, 0x1F2A6, 0x1F2A5, 0x01C4B, 0x05098, 0x1F2AE, - 0x1F2AD, 0x07E3A, 0x06519, 0x1F2AF, 0x1F2B0, 0x0FB19, - 0x0A038, 0x05099, 0x1F2B2, 0x1F2B1, 0x07E3B, 0x0FB1A, - 0x1F2B4, 0x1F2B5, 0x04995, 0x1F2B3, 0x0149D, 0x03F60, - 0x0FB1B, 0x025F2, 0x0A033, 0x06516, 0x06515, 0x03F5F, - 0x0A035, 0x1F2AA, 0x07E39, 0x0A034, 0x0FB16, 0x06517, - 0x1F2AC, 0x1F2AB, 0x0FB17, 0x05097, 0x0A036, 0x0A037, - 0x0FB18, 0x06518, 0x0031A, 0x0A03C, 0x1F2BA, 0x1F2B9, - 0x07E3F, 0x0057E, 0x0FB1C, 0x1F2BB, 0x00F5E, 0x01551, - 0x025F3, 0x1F2BC, 0x07E40, 0x04996, 0x00BB8, 0x1F2BD, - 0x04997, 0x0385A, 0x00E32, 0x0651D, 0x1F2BF, 0x1F2BE, - 0x07E41, 0x0651A, 0x0A03A, 0x1F2B7, 0x1F2B6, 0x0A039, - 0x03859, 0x07E3D, 0x07E3C, 0x0509A, 0x029F0, 0x0651C, - 0x0A03B, 0x0651B, 0x07E3E, 0x0096A, 0x1F2B8, 0x0509B, - 0x01D79, 0x0073E, 0x0A01C, 0x1F26B, 0x1F26A, 0x0FAF0, - 0x01312, 0x0FAF1, 0x1F26C, 0x0074E, 0x00DE2, 0x0637D, - 0x0FAF2, 0x1F26D, 0x029E9, 0x025F1, 0x0508D, 0x1F26E, - 0x0072A, 0x01288, 0x1F270, 0x1F271, 0x1F26F, 0x0637E, - 0x1F267, 0x0A018, 0x0498B, 0x0A017, 0x029E7, 0x0A019, - 0x0A01A, 0x1F268, 0x029E8, 0x0175C, 0x0287F, 0x0A01B, - 0x1F269, 0x03F5A, 0x02880, 0x0498C, 0x0FAEF, 0x00DB5, - 0x07E1F, 0x1F27B, 0x1F27A, 0x0FAF4, 0x024F1, 0x1F27E, - 0x0A01F, 0x1F27C, 0x1F27D, 0x0FAF5, 0x1F280, 0x1F27F, - 0x06502, 0x0FAF6, 0x1F282, 0x07E21, 0x07E20, 0x1F281, - 0x029EA, 0x07E23, 0x07E22, 0x0154F, 0x0637F, 0x06500, - 0x0498D, 0x0FAF3, 0x1F272, 0x1F273, 0x0A01D, 0x0508E, - 0x032C5, 0x1F275, 0x1F276, 0x1F274, 0x06501, 0x03853, - 0x0A01E, 0x1F279, 0x1F277, 0x1F278, 0x0074F, 0x03854, - 0x032C7, 0x0FAFA, 0x1F286, 0x029EB, 0x07E25, 0x0A024, - 0x024F3, 0x01FCA, 0x0508F, 0x032C8, 0x1F287, 0x0A025, - 0x07E26, 0x0A026, 0x1F288, 0x1F289, 0x006E6, 0x0498E, - 0x1F28B, 0x1F28A, 0x032C9, 0x032C6, 0x0A021, 0x0A022, - 0x0A020, 0x03F5B, 0x1F283, 0x1F284, 0x06503, 0x0FAF7, - 0x024F2, 0x07E24, 0x1F285, 0x0FAF8, 0x01313, 0x01ADF, - 0x0FAF9, 0x0A023, 0x00AB1, 0x0055E, 0x1F28F, 0x1F28E, - 0x00972, 0x005FA, 0x024F4, 0x0FAFE, 0x1F290, 0x04990, - 0x020BC, 0x0FAFF, 0x1F291, 0x01D2F, 0x04991, 0x0A02A, - 0x05092, 0x0A029, 0x0FB00, 0x04992, 0x06507, 0x06506, - 0x01FCB, 0x03F5C, 0x05090, 0x06504, 0x0A027, 0x1F28C, - 0x1F28D, 0x07E28, 0x07E27, 0x0A028, 0x05091, 0x0FAFC, - 0x0FAFB, 0x0197A, 0x003D6, 0x0FAFD, 0x07E29, 0x0498F, - 0x06505, 0x00056, 0x020C0, 0x02888, 0x0005C, 0x0005A, - 0x0071E, 0x00CE4, 0x00A32, 0x005D6, 0x00A34, 0x0288A, - 0x02889, 0x00A33, 0x049A2, 0x0A046, 0x01D7A, 0x025F9, - 0x0A045, 0x01315, 0x01316, 0x07E4B, 0x01458, 0x00676, - 0x00F71, 0x01B51, 0x006FD, 0x07E4A, 0x06529, 0x01768, - 0x00AB3, 0x07E49, 0x009E4, 0x03F64, 0x050A1, 0x00DE3, - 0x00064, 0x008B8, 0x00AB4, 0x00BBB, 0x007FA, 0x0003C, - 0x009E7, 0x00AFA, 0x01459, 0x00AB5, 0x001AF, 0x03862, - 0x0288C, 0x0019E, 0x00BFD, 0x01C51, 0x0149F, 0x00F73, - 0x029FA, 0x07E4C, 0x0A047, 0x1F2D4, 0x03863, 0x00F74, - 0x01B52, 0x01B53, 0x050A2, 0x0137D, 0x006E8, 0x008A4, - 0x029F9, 0x00E33, 0x006E0, 0x03F65, 0x049A3, 0x1F2D3, - 0x03861, 0x00A35, 0x0197C, 0x00F72, 0x012D1, 0x0288B, - 0x0015C, 0x01FCF, 0x049A4, 0x001A6, 0x00BBC, 0x1F2D5, - 0x0A048, 0x00AB6, 0x0075A, 0x020C2, 0x03864, 0x0104E, - 0x050A5, 0x01D7B, 0x0A049, 0x1F2D6, 0x024F8, 0x0652B, - 0x1F2D7, 0x03865, 0x025FA, 0x07E4E, 0x014A0, 0x0652C, - 0x029FC, 0x00E5D, 0x00CE5, 0x0288D, 0x0098F, 0x006E9, - 0x0FB2C, 0x0652A, 0x01C52, 0x0104D, 0x0FB2B, 0x0128B, - 0x050A3, 0x07E4D, 0x029FB, 0x00990, 0x01FD0, 0x024F7, - 0x050A4, 0x020C1, 0x01B54, 0x1F2DD, 0x0FB30, 0x0FB2E, - 0x0FB2F, 0x049A6, 0x1F2DF, 0x1F2DE, 0x0288E, 0x029FD, - 0x0FB31, 0x025FD, 0x07E4F, 0x1F2E0, 0x0652E, 0x1F2E2, - 0x1F2E1, 0x0A04D, 0x0128C, 0x03F67, 0x0FB33, 0x0FB32, - 0x01B55, 0x025FC, 0x03F66, 0x0652D, 0x025FB, 0x0083C, - 0x1F2DA, 0x0FB2D, 0x1F2D8, 0x1F2D9, 0x0A04B, 0x050A6, - 0x050A7, 0x024F9, 0x0A04A, 0x0A04C, 0x1F2DC, 0x1F2DB, - 0x049A5, 0x00538, 0x0FB35, 0x0FB34, 0x01147, 0x0051E, - 0x03866, 0x0A04F, 0x1F2E7, 0x024FA, 0x002BC, 0x1F2E8, - 0x0FB36, 0x00DE4, 0x01555, 0x050AA, 0x1F2E9, 0x0FB37, - 0x0288F, 0x01FD2, 0x1F2EA, 0x0FB38, 0x032D0, 0x0652F, - 0x1F2E3, 0x020C3, 0x01FD1, 0x025FE, 0x03F68, 0x0A04E, - 0x06530, 0x01769, 0x01D7C, 0x1F2E4, 0x050A8, 0x00ED4, - 0x0099F, 0x050A9, 0x1F2E6, 0x1F2E5, 0x06531, 0x00F5F, - 0x0FB20, 0x0FB1F, 0x006B4, 0x0067C, 0x029F1, 0x1F2C2, - 0x1F2C1, 0x032CB, 0x0149E, 0x0509E, 0x1F2C3, 0x00A6A, - 0x00E5B, 0x025F4, 0x0FB21, 0x1F2C4, 0x1F2C5, 0x02883, - 0x0651F, 0x0FB22, 0x03F61, 0x0509C, 0x04998, 0x0FB1D, - 0x07E42, 0x0175D, 0x0107A, 0x0A03D, 0x07E43, 0x04999, - 0x01B50, 0x0509D, 0x0651E, 0x0104A, 0x0137C, 0x0499A, - 0x0FB1E, 0x1F2C0, 0x07E44, 0x0385C, 0x07E45, 0x0A040, - 0x1F2CA, 0x1F2CB, 0x032CC, 0x1F2CD, 0x1F2CC, 0x0385D, - 0x02884, 0x06523, 0x03F63, 0x1F2CE, 0x0FB24, 0x0FB25, - 0x1F2D1, 0x1F2CF, 0x1F2D0, 0x00F70, 0x07E46, 0x0FB26, - 0x1F2D2, 0x0499C, 0x03F62, 0x0095E, 0x01C4D, 0x0499B, - 0x00BF7, 0x06520, 0x1F2C6, 0x0FB23, 0x0A03E, 0x0A03F, - 0x1F2C7, 0x025F5, 0x0385B, 0x06521, 0x0509F, 0x1F2C9, - 0x1F2C8, 0x06522, 0x00AF9, 0x0A042, 0x0FB27, 0x00A56, - 0x006DE, 0x029F2, 0x029F3, 0x032CD, 0x032CE, 0x02886, - 0x0385E, 0x07E48, 0x0175F, 0x050A0, 0x0FB29, 0x01C4F, - 0x029F4, 0x0FB28, 0x01553, 0x0A043, 0x025F6, 0x01314, - 0x006FC, 0x0098E, 0x02885, 0x01552, 0x0A041, 0x06525, - 0x0128A, 0x020BD, 0x06524, 0x01C4E, 0x07E47, 0x0499D, - 0x00CE2, 0x0071A, 0x06526, 0x01FCE, 0x0175E, 0x024F6, - 0x00046, 0x009E2, 0x01C50, 0x00DB7, 0x00BB9, 0x00188, - 0x06527, 0x0499E, 0x0017C, 0x00D2F, 0x025F7, 0x00BBA, - 0x00DB8, 0x02887, 0x049A1, 0x06528, 0x0499F, 0x049A0, - 0x0104C, 0x020BF, 0x0FB2A, 0x029F8, 0x025F8, 0x00A31, - 0x0051C, 0x01554, 0x029F5, 0x00BFC, 0x032CF, 0x0A044, - 0x0385F, 0x029F6, 0x00AB2, 0x020BE, 0x00E5C, 0x00A57, - 0x00D2E, 0x001AC, 0x029F7, 0x03860, 0x00125, +static const uint8_t on2avc_cb5_bits[ON2AVC_CB_5_6_CODES] = { + 1, 7, 8, 10, 10, 10, 11, 12, 14, 14, 14, 14, 7, 10, 11, 14, 14, 14, 14, + 13, 13, 10, 12, 13, 15, 15, 15, 15, 12, 12, 10, 10, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 12, 14, 14, 14, 14, 11, 12, 12, 7, + 10, 11, 13, 13, 13, 13, 11, 12, 12, 11, 11, 10, 11, 11, 10, 14, 14, 14, 14, + 14, 14, 14, 14, 12, 12, 7, 10, 10, 11, 12, 13, 14, 14, 12, 12, 12, 12, 10, + 13, 13, 13, 13, 12, 12, 12, 13, 16, 17, 17, 16, 16, 16, 16, 16, 16, 12, 12, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, 14, 14, 14, + 14, 14, 14, 14, 14, 12, 13, 14, 14, 12, 12, 10, 11, 12, 12, 10, 12, 13, 13, + 12, 12, 10, 12, 12, 12, 12, 10, 11, 11, 10, 11, 11, 10, 10, 11, 14, 15, 15, + 14, 14, 14, 14, 14, 14, 11, 12, 13, 13, 8, 9, 10, 10, 9, 10, 12, 12, 12, + 13, 13, 9, 10, 11, 12, 13, 15, 15, 15, 15, 8, 8, 8, 11, 12, 12, 11, 12, + 12, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, + 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 12, 13, 13, 9, 12, 12, + 12, 13, 13, 11, 12, 12, 9, 10, 11, 13, 13, 13, 14, 15, 17, 17, 17, 17, 8, + 9, 11, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 8, 10, + 13, 14, 14, 13, 13, 12, 12, 11, 12, 13, 14, 17, 17, 17, 17, 17, 17, 17, 17, + 11, 11, 10, 11, 13, 13, 13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 16, 17, 17, 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 9, 11, 12, + 13, 14, 14, 12, 13, 13, 12, 12, 10, 11, 11, 10, 12, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 8, 14, 14, 14, 14, 13, 14, 14, 13, 13, 13, 13, 12, + 13, 13, 12, 13, 13, 10, 11, 12, 12, 7, 7, 7, 7, 7, 11, 12, 13, 13, 11, + 12, 13, 15, 16, 16, 15, 15, 12, 12, 12, 12, 11, 11, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, + 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, + 13, 13, 13, 12, 12, 12, 12, 12, 12, 7, 7, 7, 11, 12, 12, 11, 11, 11, 12, + 13, 14, 14, 11, 12, 13, 13, 9, 10, 12, 13, 13, 12, 12, 7, 7, 7, 7, 7, + 9, 12, 13, 14, 14, 12, 12, 11, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 13, + 14, 14, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 11, 12, 13, 14, 16, 16, + 16, 16, 7, 10, 10, 11, 12, 12, 11, 11, 9, 13, 13, 13, 13, 12, 13, 13, 12, + 12, 12, 13, 16, 16, 16, 16, 16, 16, 16, 16, 7, 8, 9, 11, 12, 12, 11, 12, + 12, 7, 11, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, + 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 13, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 11, + 11, 12, 12, 12, 12, 8, 9, 11, 13, 14, 14, 13, 13, 13, 13, 13, 13, 12, 13, + 13, 8, 8, 10, 12, 12, 12, 12, 10, 11, 12, 12, 9, 12, 12, 12, 12, 11, 11, + 11, 11, 11, 11, 10, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, + 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 11, 11, 7, + 11, 11, 11, 11, 11, 11, 11, 12, 12, 11, 11, 11, 12, 13, 13, 10, 10, 9, 12, + 13, 13, 12, 12, 11, 11, 9, 10, 11, 12, 13, 15, 15, 15, 15, 8, 9, 11, 11, + 11, 12, 15, 15, 15, 15, 15, 15, 15, 15, 9, 10, 11, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 9, 15, 15, 15, 15, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 13, 14, 14, 13, 13, 13, 13, 12, 13, 13, 9, 11, 12, + 12, 11, 11, 11, 12, 13, 13, 11, 12, 12, 10, 11, 12, 13, 13, 6, 6, 6, 10, + 11, 11, 10, 10, 11, 13, 13, 13, 13, 11, 12, 13, 14, 15, 18, 18, 18, 18, 18, + 18, 18, 18, 10, 12, 12, 12, 12, 9, 9, 9, 9, 6, 11, 14, 14, 14, 14, 14, + 14, 14, 14, 13, 14, 14, 13, 13, 12, 13, 13, 12, 12, 12, 12, 11, 11, 11, 12, + 12, 11, 11, 10, 11, 12, 13, 14, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 13, 13, 13, 13, 13, 13, 13, 13, 11, 12, 12, 11, 12, 13, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 17, 18, 18, 11, 11, 11, 11, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 16, + 17, 17, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, 14, 14, 14, 14, 13, 14, 14, 11, + 13, 13, 13, 13, }; -static const uint8_t on2avc_cb7_bits[ON2AVC_CB7_8_CODES] = { - 1, 8, 8, 8, 8, 7, - 10, 11, 7, 11, 12, 10, - 10, 12, 14, 14, 15, 14, - 11, 11, 13, 13, 12, 10, - 11, 13, 12, 12, 14, 14, - 14, 13, 11, 12, 9, 10, - 12, 7, 11, 11, 7, 7, - 11, 12, 7, 7, 10, 9, - 11, 11, 11, 13, 13, 12, - 14, 15, 11, 12, 14, 12, - 13, 12, 12, 12, 12, 11, - 11, 15, 15, 10, 12, 15, - 12, 12, 14, 11, 7, 10, - 8, 11, 11, 11, 16, 13, - 12, 14, 12, 16, 15, 12, - 13, 14, 14, 12, 14, 17, - 15, 16, 16, 12, 14, 16, - 14, 12, 12, 13, 16, 14, - 12, 17, 16, 16, 15, 13, - 13, 14, 12, 14, 12, 16, - 16, 12, 16, 17, 16, 17, - 15, 16, 16, 15, 17, 15, - 17, 17, 16, 17, 16, 15, - 14, 16, 14, 16, 14, 11, - 14, 16, 15, 11, 17, 17, - 15, 13, 17, 16, 17, 17, - 15, 14, 17, 15, 14, 16, - 11, 16, 17, 16, 14, 12, - 17, 15, 12, 13, 15, 17, - 16, 13, 15, 17, 16, 13, - 15, 16, 17, 15, 13, 14, - 16, 17, 17, 14, 14, 16, - 16, 13, 12, 15, 17, 16, - 14, 11, 15, 15, 12, 10, - 14, 16, 16, 16, 12, 15, - 16, 12, 12, 13, 15, 17, - 14, 12, 15, 17, 14, 14, - 15, 16, 16, 16, 16, 16, - 16, 16, 16, 12, 16, 17, - 14, 11, 13, 15, 17, 15, - 12, 14, 16, 11, 14, 17, - 17, 14, 15, 17, 14, 17, - 16, 15, 17, 15, 14, 17, - 15, 14, 17, 17, 12, 15, - 16, 14, 12, 13, 16, 13, - 16, 16, 15, 16, 16, 16, - 17, 17, 16, 14, 16, 14, - 17, 17, 11, 14, 12, 13, - 15, 12, 14, 15, 12, 13, - 14, 12, 13, 14, 14, 16, - 17, 15, 11, 12, 14, 15, - 13, 12, 12, 14, 14, 13, - 15, 17, 16, 16, 14, 14, - 13, 13, 14, 12, 16, 17, - 12, 7, 12, 12, 7, 7, - 11, 11, 8, 10, 11, 13, - 13, 11, 15, 14, 12, 10, - 14, 11, 11, 13, 12, 11, - 12, 13, 12, 15, 14, 12, - 11, 14, 11, 15, 13, 11, - 7, 11, 11, 9, 10, 7, - 13, 14, 7, 7, 12, 12, - 12, 11, 12, 17, 14, 12, - 14, 16, 14, 14, 14, 11, - 12, 12, 11, 13, 15, 14, - 13, 15, 16, 14, 14, 15, - 12, 14, 14, 12, 7, 11, - 12, 12, 11, 7, 12, 13, - 13, 12, 9, 14, 14, 9, - 12, 12, 12, 13, 13, 14, - 15, 14, 14, 12, 11, 14, - 13, 11, 12, 13, 14, 14, - 13, 15, 15, 16, 14, 12, - 14, 12, 12, 14, 9, 14, - 13, 9, 12, 17, 15, 12, - 12, 14, 13, 13, 13, 13, - 14, 16, 13, 16, 15, 12, - 14, 16, 13, 14, 12, 11, - 13, 17, 15, 13, 15, 17, - 15, 13, 15, 13, 15, 17, - 13, 11, 14, 15, 13, 13, - 14, 17, 17, 17, 16, 14, - 17, 16, 15, 16, 17, 16, - 14, 15, 17, 15, 17, 16, - 14, 14, 14, 15, 12, 13, - 14, 17, 16, 14, 16, 17, - 17, 17, 14, 17, 17, 15, - 17, 15, 17, 16, 16, 11, - 17, 16, 12, 12, 17, 17, - 15, 15, 14, 17, 14, 13, - 14, 16, 16, 15, 13, 14, - 16, 14, 13, 14, 15, 17, - 14, 12, 14, 17, 16, 14, - 12, 16, 14, 13, 11, 15, - 17, 16, 13, 12, 15, 17, - 10, 12, 13, 16, 17, 14, - 13, 14, 15, 12, 13, 14, - 15, 17, 14, 14, 16, 15, - 14, 14, 17, 17, 14, 13, - 14, 16, 17, 15, 13, 15, - 15, 12, 11, 14, 17, 16, - 14, 13, 16, 15, 17, 16, - 15, 17, 16, 15, 15, 17, - 15, 16, 17, 16, 17, 17, - 17, 13, 12, 14, 17, 14, - 13, 15, 14, 17, 14, 14, - 16, 15, 16, 14, 15, 14, - 15, 17, 14, 17, 17, 15, - 12, 17, 17, 12, 12, 14, - 13, 14, 13, 14, 16, 15, - 13, 15, 17, 13, 13, 14, - 11, 13, 14, 13, 12, 14, - 15, 13, 17, 15, 14, 15, - 16, 13, 16, 16, 14, 12, - 14, 13, 14, 14, 7, 12, - 13, 12, 12, 9, 14, 14, - 9, 12, 14, 12, 12, 12, - 14, 15, 15, 15, 11, 11, - 13, 13, 12, 12, 13, 15, - 14, 14, 15, 16, 15, 15, - 12, 14, 12, 13, 14, 9, - 14, 13, 9, 8, 15, 15, - 15, 15, 12, 16, 16, 12, - 14, 15, 15, 15, 16, 17, - 17, 17, 17, 16, 15, 15, - 17, 15, 14, 15, 17, 16, - 15, 15, 17, 17, 16, 13, - 15, 15, 15, 15, 12, 15, - 16, 11, 12, 17, 16, 11, - 11, 15, 15, 15, 14, 14, - 15, 17, 14, 17, 15, 16, - 16, 16, 14, 17, 15, 15, - 13, 16, 15, 14, 15, 16, - 17, 15, 16, 14, 15, 16, - 13, 11, 14, 15, 16, 14, - 12, 16, 16, 16, 14, 12, - 16, 17, 13, 14, 13, 16, - 17, 16, 15, 15, 17, 17, - 14, 15, 15, 15, 15, 12, - 14, 17, 16, 15, 15, 17, - 17, 17, 15, 16, 16, 14, - 16, 13, 17, 16, 14, 15, - 16, 17, 15, 16, 16, 17, - 15, 16, 14, 17, 17, 16, - 16, 14, 15, 17, 17, 15, - 14, 14, 15, 13, 16, 17, - 14, 16, 17, 16, 16, 16, - 16, 17, 17, 16, 14, 17, - 16, 15, 16, 11, 17, 17, - 16, 16, 13, 17, 16, 14, - 14, 16, 17, 15, 15, 13, - 16, 15, 15, 15, 16, 15, - 16, 15, 12, 15, 17, 16, - 15, 12, 15, 16, 13, 12, - 15, 16, 17, 14, 11, 17, - 16, 13, 12, 15, 17, 17, - 15, 13, 16, 15, 12, 13, - 15, 17, 17, 14, 15, 17, - 15, 14, 17, 15, 17, 17, - 16, 12, 17, 17, 17, 16, - 14, 15, 17, 11, 13, 15, - 17, 16, 15, 12, 17, 17, - 11, 15, 17, 17, 16, 14, - 17, 15, 17, 16, 14, 17, - 17, 15, 16, 17, 14, 16, - 17, 14, 17, 16, 15, 14, - 17, 17, 12, 17, 17, 17, - 15, 15, 17, 16, 17, 15, - 14, 17, 14, 16, 17, 12, - 14, 17, 16, 17, 13, 17, - 16, 13, 15, 16, 15, 16, - 14, 15, 17, 17, 15, 14, - 14, 16, 17, 14, 11, 15, - 16, 16, 14, 16, 17, 17, - 15, 14, 15, 15, 15, 15, - 13, 15, 17, 14, 11, 17, - 17, 12, 11, 15, 17, 17, - 15, 14, 17, 16, 14, 17, - 17, 15, 15, 16, 15, 15, - 16, 14, 14, 15, 15, 15, - 16, 17, 15, 15, 16, 14, - 15, 16, 13, 11, 14, 16, - 17, 14, 13, 17, 17, 14, - 12, 16, 16, 17, 16, 17, - 17, 17, 16, 17, 17, 17, - 17, 17, 17, 17, 16, 17, - 17, 17, 17, 17, 17, 17, - 16, 17, 17, 16, 17, 17, - 16, 13, 16, 17, 16, 16, - 11, 17, 17, 17, 16, 15, - 17, 17, 14, 16, 16, 17, - 16, 17, 17, 17, 17, 17, - 17, 16, 16, 17, 15, 15, - 17, 17, 16, 15, 16, 17, - 16, 16, 15, 16, 17, 16, - 14, 13, 17, 17, 13, 15, - 17, 17, 14, 12, 17, 17, - 16, 15, 15, 17, 17, 15, - 17, 16, 17, 16, 17, 17, - 17, 17, 16, 13, 16, 17, - 16, 17, 17, 17, 17, 17, - 16, 17, 15, 16, 13, 16, - 16, 16, 15, 16, 17, 17, - 17, 17, 16, 17, 17, 16, - 17, 16, 16, 16, 15, 16, - 15, 17, 17, 17, 16, 15, - 16, 16, 15, 15, 16, 17, - 16, 17, 17, 17, 17, 16, - 17, 17, 16, 17, 16, 17, - 16, 16, 12, 17, 16, 14, - 13, 16, 17, 17, 15, 14, - 17, 17, 14, 16, 16, 17, - 16, 15, 17, 15, 17, 17, - 14, 17, 17, 15, 13, 14, - 17, 15, 16, 12, 16, 16, - 15, 12, 16, 17, 17, 15, - 14, 16, 17, 12, 12, 16, - 16, 16, 17, 14, 16, 16, - 13, 15, 16, 17, 17, 15, - 15, 16, 16, 16, 15, 17, - 17, 14, 14, 15, 17, 17, - 15, 14, 17, 15, 12, 12, - 14, 17, 17, 15, 14, 17, - 17, 17, 17, 15, 16, 17, - 15, 17, 16, 17, 15, 17, - 17, 16, 16, 16, 15, 16, - 17, 17, 15, 15, 16, 17, - 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 15, - 17, 17, 15, 14, 17, 17, - 14, 14, 16, 16, 17, 16, - 16, 17, 16, 15, 17, 17, - 16, 16, 17, 16, 16, 17, - 15, 15, 17, 17, 15, 17, - 17, 15, 15, 16, 16, 16, - 17, 15, 13, 17, 17, 17, - 17, 11, 16, 17, 17, 16, - 14, 17, 17, 14, 16, 17, - 17, 15, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 16, - 14, 16, 17, 16, 16, 17, - 16, 17, 16, 17, 16, 17, - 17, 17, 15, 16, 17, 15, - 9, 17, 17, 17, 16, 12, - 17, 17, 13, 15, 15, 17, - 17, 16, 16, 17, 17, 16, - 16, 17, 17, 17, 17, 16, - 17, 17, 17, 16, 15, 17, - 17, 16, 13, 17, 17, 17, - 15, 13, 17, 17, 13, 12, - 17, 17, 12, 9, 15, 17, - 17, 15, 14, 17, 17, 15, - 16, 17, 17, 16, 16, 17, - 17, 17, 16, 17, 17, 17, - 17, 14, 17, 17, 17, 16, - 14, 17, 17, 13, 11, 16, - 17, 17, 14, 10, 16, 17, - 17, 16, 12, 16, 17, 12, - 14, 16, 17, 17, 15, 16, - 17, 17, 16, 17, 17, 17, - 17, 17, 15, 17, 17, 17, - 17, 14, 16, 17, 15, 12, - 15, 16, 17, 15, 11, 17, - 17, 12, 13, 17, 17, 14, - 10, 16, 17, 17, 16, 13, - 16, 16, 14, 17, 15, 17, - 17, 17, 17, 17, 17, 17, - 15, 17, 16, 16, 15, 17, - 17, 17, 15, 13, 17, 16, - 14, 11, 16, 17, 17, 15, - 11, 16, 17, 17, 16, 12, - 17, 16, 14, 14, 17, 17, - 17, 16, 13, 16, 17, 15, - 17, 17, 17, 17, 17, 17, - 16, 17, 17, 17, 14, 16, - 17, 16, 15, 16, 17, 17, - 15, 12, 17, 16, 14, 11, - 17, 17, 17, 15, 14, 17, - 17, 14, 15, 17, 16, 17, - 17, 17, 16, 16, 17, 17, - 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, - 14, 14, 17, 17, 17, 17, - 14, 17, 17, 12, 14, 17, - 17, 14, 11, 16, 17, 17, - 15, 15, 16, 17, 13, 17, - 16, 17, 17, 15, 17, 17, - 17, 16, 16, 17, 16, 14, - 15, 16, 17, 17, 15, 15, - 17, 17, 13, 11, 15, 17, - 17, 16, 10, 16, 16, 17, - 16, 12, 17, 17, 12, 14, - 15, 17, 17, 15, 16, 17, - 15, 15, 17, 16, 17, 16, - 16, 15, 16, 17, 17, 16, - 15, 17, 17, 14, 13, 14, - 16, 17, 14, 12, 17, 16, - 13, 12, 16, 17, 13, 9, - 15, 17, 17, 16, 15, 17, - 17, 14, 16, 16, 17, 17, - 16, 16, 17, 17, 17, 15, - 17, 16, 16, 15, 16, 17, - 17, 15, 13, 17, 17, 14, - 11, 15, 17, 17, 15, 9, - 16, 17, 17, 15, 12, 17, - 16, 13, 14, 17, 17, 17, - 16, 16, 17, 17, 15, 16, - 17, 17, 16, 17, 17, 17, - 17, 17, 17, 17, 17, 16, - 16, 15, 17, 17, 17, 15, - 12, 17, 16, 12, 12, 16, - 17, 12, 10, 17, 17, 17, - 14, 14, 17, 17, 14, 14, - 16, 17, 17, 15, 16, 17, - 17, 17, 16, 17, 16, 17, - 14, 17, 17, 17, 16, 13, - 17, 17, 14, 9, 15, 17, - 17, 15, 10, 15, 17, 17, - 15, 12, 17, 17, 13, 13, - 16, 17, 17, 15, 14, 17, - 17, 14, 17, 16, 16, 17, - 17, 17, 17, 17, 17, 17, - 15, 17, 16, 15, 14, 15, - 17, 17, 16, 12, 16, 17, - 12, 13, 17, 17, 13, 11, - 17, 17, 17, 16, 12, 16, - 17, 15, 15, 15, 17, 17, - 17, 16, 16, 17, 16, 16, - 17, 17, 16, 16, 15, 17, - 17, 16, 13, 15, 17, 14, - 11, 15, 17, 16, 15, 12, - 17, 17, 16, 17, 12, 17, - 17, 15, 14, 16, 17, 17, - 15, 15, 17, 17, 15, 15, - 17, 17, 17, 16, 17, 17, - 17, 17, 17, 16, 15, 16, - 17, 14, 15, 16, 17, 17, - 15, 17, 17, 13, 12, 17, - 17, 17, 16, 14, 17, 17, - 12, 15, 15, 17, 17, 16, - 15, 17, 17, 14, 16, 17, - 17, 17, 17, 17, 17, 17, - 16, 15, 15, 17, 15, 15, - 14, 15, 17, 17, 15, 13, - 17, 17, 14, 14, 17, 17, - 14, 10, 16, 17, 17, 15, - 14, 17, 17, 13, 15, 16, - 17, 17, 15, 17, 16, 17, - 15, 17, 16, 17, 17, 15, - 16, 17, 17, 14, 14, 17, - 16, 12, 10, 16, 17, 17, - 15, 10, 16, 17, 17, 15, - 12, 17, 17, 13, 13, 15, - 17, 17, 15, 15, 17, 17, - 13, 14, 17, 17, 17, 16, - 17, 17, 17, 17, 17, 15, - 17, 16, 16, 13, 17, 16, - 17, 17, 12, 17, 17, 12, - 13, 17, 17, 12, 11, 15, - 16, 17, 17, 13, 16, 16, - 14, 14, 15, 17, 17, 16, - 16, 17, 17, 16, 17, 17, - 17, 17, 15, 17, 17, 17, - 16, 15, 17, 17, 14, 9, - 17, 17, 17, 15, 15, 17, - 17, 14, 13, 16, 17, 16, - 16, 16, 17, 17, 16, 16, - 16, 17, 17, 16, 16, 16, - 17, 16, 16, 17, 17, 17, - 17, 17, 17, 17, 16, 17, - 16, 17, 17, 12, 16, 17, - 17, 17, 10, 17, 16, 17, - 17, 13, 17, 17, 14, 16, - 17, 17, 15, 17, 17, 17, - 17, 17, 13, 16, 17, 16, - 15, 16, 15, 17, 16, 15, - 17, 17, 17, 17, 15, 16, - 16, 15, 16, 14, 17, 17, - 13, 15, 17, 17, 15, 13, - 17, 15, 17, 17, 15, 17, - 16, 15, 17, 16, 17, 17, - 16, 13, 16, 17, 15, 17, - 17, 17, 17, 17, 16, 17, - 16, 17, 15, 16, 17, 15, - 13, 16, 16, 16, 16, 14, - 17, 17, 17, 16, 15, 17, - 16, 17, 16, 16, 17, 15, - 17, 16, 17, 16, 17, 14, - 15, 17, 17, 17, 16, 16, - 16, 17, 17, 17, 16, 17, - 17, 16, 17, 17, 16, 17, - 16, 17, 17, 14, 13, 17, - 17, 14, 12, 17, 17, 17, - 15, 12, 17, 16, 15, 15, - 15, 17, 17, 17, 14, 16, - 17, 16, 16, 16, 17, 17, - 17, 15, 17, 17, 17, 14, - 16, 15, 14, 13, 14, 17, - 17, 17, 15, 16, 17, 12, - 13, 15, 17, 17, 16, 14, - 16, 16, 12, 14, 16, 16, - 17, 15, 16, 17, 16, 13, - 16, 16, 16, 17, 15, 15, - 16, 17, 14, 14, 17, 17, - 13, 12, 15, 17, 17, 15, - 14, 16, 16, 17, 17, 15, - 17, 17, 17, 16, 16, 17, - 16, 16, 17, 17, 17, 17, - 15, 16, 17, 17, 16, 16, - 16, 17, 15, 17, 17, 17, - 15, 16, 16, 17, 17, 16, - 16, 15, 17, 17, 15, 14, - 17, 17, 14, 14, 16, 17, - 17, 17, 15, 16, 17, 16, - 17, 16, 16, 17, 17, 16, - 15, 16, 15, 16, 17, 17, - 15, 17, 17, 16, 16, 16, - 15, 17, 17, 15, 12, 16, - 17, 17, 16, 11, 17, 17, - 16, 16, 14, 16, 17, 14, - 16, 16, 17, 16, 15, 17, - 17, 17, 16, 15, 15, 17, - 17, 17, 17, 17, 17, 17, - 16, 17, 17, 17, 16, 14, - 17, 16, 17, 16, 13, 17, - 17, 13, 8, 15, 15, 15, - 14, 12, 16, 17, 12, 13, - 15, 15, 16, 16, 16, 17, - 17, 16, 12, 15, 17, 15, - 16, 14, 15, 16, 17, 16, - 17, 17, 17, 17, 15, 16, - 15, 15, 15, 12, 16, 17, - 12, 11, 17, 17, 11, 11, - 14, 15, 15, 13, 13, 16, - 15, 13, 16, 15, 16, 17, - 15, 13, 15, 15, 15, 15, - 15, 16, 14, 17, 17, 14, - 17, 17, 14, 16, 17, 14, - 11, 14, 14, 16, 14, 12, - 16, 15, 16, 15, 13, 15, - 16, 13, 14, 15, 15, 15, - 15, 15, 16, 17, 17, 11, - 14, 17, 16, 14, 15, 16, - 16, 16, 15, 16, 15, 17, - 16, 15, 14, 16, 16, 16, - 13, 17, 17, 13, 15, 17, - 17, 15, 15, 17, 17, 16, - 16, 15, 17, 17, 15, 16, - 17, 17, 15, 17, 13, 14, - 16, 14, 16, 15, 15, 14, - 16, 17, 15, 16, 16, 15, - 17, 17, 16, 15, 16, 16, - 16, 15, 10, 16, 17, 17, - 15, 11, 16, 17, 12, 13, - 14, 17, 15, 15, 12, 17, - 15, 14, 12, 15, 17, 17, - 15, 15, 16, 17, 17, 16, - 14, 15, 15, 15, 14, 15, - 16, 15, 15, 12, 17, 15, - 13, 11, 16, 17, 17, 16, - 13, 16, 17, 11, 12, 15, - 16, 17, 14, 14, 15, 17, - 11, 13, 17, 17, 17, 15, - 17, 16, 15, 16, 14, 16, - 16, 17, 14, 13, 14, 16, - 17, 14, 14, 15, 16, 12, - 15, 17, 17, 16, 14, 17, - 16, 17, 17, 16, 17, 17, - 15, 16, 17, 15, 15, 17, - 14, 15, 15, 13, 15, 15, - 15, 16, 17, 17, 16, 15, - 14, 17, 17, 17, 15, 14, - 16, 17, 17, 17, 11, 14, - 14, 16, 17, 14, 15, 16, - 14, 13, 15, 14, 17, 16, - 15, 16, 17, 17, 11, 15, - 17, 17, 14, 14, 16, 16, - 16, 14, 17, 17, 15, 16, - 14, 15, 17, 16, 13, 13, - 16, 16, 12, 11, 17, 17, - 12, 11, 14, 16, 17, 15, - 14, 16, 17, 13, 15, 16, - 15, 16, 16, 15, 15, 15, - 13, 14, 15, 15, 16, 17, - 17, 15, 15, 16, 15, 16, - 16, 13, 10, 16, 15, 15, - 15, 7, 14, 14, 7, 7, - 11, 12, 12, 11, 12, 14, - 14, 12, 15, 16, 13, 14, - 16, 13, 13, 15, 13, 11, - 12, 13, 11, 15, 15, 13, - 12, 15, 12, 14, 15, 12, - 7, 12, 12, 12, 11, 6, - 12, 12, 13, 12, 9, 14, - 14, 9, 12, 13, 13, 12, - 14, 15, 16, 17, 14, 12, - 13, 13, 15, 13, 11, 12, - 14, 12, 11, 14, 15, 17, - 14, 12, 13, 12, 13, 14, - 9, 13, 15, 9, 12, 17, - 16, 12, 11, 14, 14, 13, - 15, 13, 16, 17, 14, 15, - 17, 14, 14, 15, 13, 15, - 14, 12, 12, 14, 12, 11, - 16, 15, 13, 13, 16, 13, - 15, 15, 14, 12, 13, 14, - 15, 14, 13, 17, 16, 16, - 16, 15, 17, 17, 14, 14, - 16, 14, 15, 17, 15, 17, - 17, 16, 13, 14, 16, 16, - 13, 14, 14, 15, 14, 12, - 17, 16, 17, 17, 16, 15, - 15, 14, 16, 16, 17, 17, - 15, 11, 16, 16, 13, 11, - 14, 16, 17, 14, 10, 17, - 16, 12, 13, 15, 17, 16, - 14, 13, 17, 16, 14, 15, - 17, 14, 13, 14, 14, 16, - 15, 13, 13, 17, 15, 12, - 12, 15, 17, 17, 15, 12, - 16, 16, 11, 11, 14, 17, - 17, 14, 13, 15, 17, 12, - 12, 14, 16, 17, 17, 14, - 15, 16, 14, 15, 15, 16, - 15, 13, 13, 16, 15, 15, - 13, 15, 15, 13, 13, 15, - 16, 17, 15, 14, 15, 16, - 17, 17, 14, 17, 17, 14, - 14, 15, 14, 17, 16, 16, - 17, 17, 17, 12, 15, 16, - 17, 15, 14, 12, 13, 15, - 12, 15, 17, 16, 16, 16, - 17, 14, 14, 15, 15, 17, - 17, 15, 12, 16, 16, 12, - 11, 14, 14, 14, 14, 14, - 14, 15, 13, 15, 16, 13, - 14, 16, 13, 16, 14, 13, - 11, 12, 14, 13, 16, 15, - 13, 14, 15, 13, 15, 15, - 12, 11, 15, 13, 13, 14, - 7, 12, 13, 12, 12, 9, - 15, 15, 9, 12, 14, 12, - 12, 14, 15, 15, 15, 15, - 13, 14, 16, 14, 14, 12, - 11, 13, 14, 12, 14, 16, - 14, 14, 12, 14, 12, 12, - 12, 9, 14, 14, 9, +static const uint8_t on2avc_cb6_bits[ON2AVC_CB_5_6_CODES] = { + 8, 10, 12, 13, 13, 12, 13, 14, 16, 17, 17, 16, 16, 10, 11, 11, 8, 10, 11, + 11, 10, 10, 10, 10, 11, 12, 13, 14, 14, 11, 11, 10, 10, 10, 11, 12, 12, 8, + 10, 11, 12, 12, 10, 11, 11, 8, 10, 10, 10, 11, 13, 13, 13, 13, 10, 11, 12, + 13, 13, 10, 10, 10, 11, 12, 12, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 12, + 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 10, 12, 12, 12, 13, + 14, 15, 15, 10, 10, 10, 11, 12, 12, 10, 11, 12, 12, 9, 10, 11, 11, 10, 13, + 13, 13, 13, 12, 12, 10, 11, 11, 10, 11, 12, 12, 10, 10, 10, 11, 11, 11, 11, + 11, 11, 10, 10, 11, 11, 11, 14, 15, 15, 14, 14, 13, 13, 10, 13, 13, 13, 13, + 12, 12, 11, 11, 11, 11, 10, 10, 11, 12, 13, 14, 14, 11, 11, 10, 10, 10, 10, + 11, 11, 11, 11, 10, 10, 10, 11, 12, 13, 13, 10, 10, 10, 11, 11, 10, 13, 13, + 13, 13, 12, 13, 13, 11, 12, 12, 11, 11, 10, 10, 10, 10, 11, 11, 11, 11, 9, + 10, 11, 12, 12, 11, 12, 13, 14, 14, 11, 11, 11, 11, 11, 11, 10, 10, 13, 13, + 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 10, 11, 11, 10, 11, 11, 10, 12, 13, + 13, 12, 12, 11, 11, 11, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 10, 11, + 13, 13, 13, 13, 9, 10, 13, 13, 13, 13, 12, 12, 11, 11, 11, 11, 10, 11, 11, + 10, 11, 12, 12, 11, 11, 11, 11, 11, 12, 12, 11, 11, 10, 11, 11, 9, 10, 10, + 11, 12, 14, 15, 16, 17, 17, 14, 14, 11, 11, 12, 13, 13, 12, 12, 11, 12, 12, + 11, 11, 11, 11, 11, 11, 11, 11, 9, 10, 11, 12, 13, 13, 10, 10, 10, 10, 11, + 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 12, 12, 12, 12, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 7, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 12, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 10, 11, 12, 12, 10, 11, 11, + 10, 11, 12, 12, 10, 11, 12, 14, 14, 14, 14, 11, 11, 11, 11, 11, 11, 11, 11, + 10, 10, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 10, 11, + 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 12, 12, 12, 12, 11, 12, 12, 11, 11, + 11, 11, 10, 11, 11, 11, 11, 11, 11, 10, 11, 11, 10, 11, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, + 11, 11, 10, 10, 11, 12, 13, 15, 16, 17, 17, 15, 15, 11, 11, 10, 10, 7, 10, + 12, 12, 12, 12, 11, 11, 11, 11, 9, 11, 12, 14, 14, 14, 14, 11, 11, 7, 11, + 11, 11, 11, 10, 10, 10, 10, 10, 10, 7, 13, 13, 13, 13, 12, 12, 11, 11, 11, + 11, 11, 11, 9, 10, 11, 11, 10, 10, 10, 12, 13, 14, 14, 12, 12, 11, 11, 11, + 11, 11, 11, 11, 11, 10, 10, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 10, 10, + 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, + 11, 11, 10, 11, 11, 10, 10, 10, 11, 12, 13, 14, 14, 10, 11, 12, 12, 7, 7, + 10, 11, 11, 11, 11, 11, 11, 10, 11, 12, 14, 14, 14, 14, 11, 11, 11, 11, 10, + 10, 10, 11, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, + 11, 7, 9, 10, 11, 11, 11, 11, 11, 11, 10, 11, 11, 7, 9, 10, 10, 9, 10, + 10, 12, 12, 12, 12, 11, 11, 10, 11, 11, 10, 11, 11, 10, 10, 9, 10, 11, 11, + 13, 14, 14, 13, 13, 13, 13, 13, 13, 11, 11, 11, 11, 11, 11, 7, 10, 10, 10, + 11, 12, 13, 13, 9, 10, 11, 11, 7, 10, 11, 11, 11, 11, 11, 11, 9, 10, 11, + 11, 7, 7, 7, 7, 9, 10, 10, 10, 11, 12, 13, 13, 11, 11, 11, 11, 10, 10, + 10, 10, 9, 10, 10, 9, 10, 13, 13, 13, 13, 12, 12, 9, 11, 12, 12, 11, 11, + 10, 11, 12, 12, 10, 10, 9, 10, 11, 11, 7, 7, 7, 11, 12, 12, 11, 11, 10, + 11, 11, 10, 11, 11, 10, 11, 11, 7, 9, 10, 13, 13, 13, 13, 13, 13, 13, 13, + 10, 11, 12, 13, 13, 10, 11, 12, 12, 9, 10, 11, 11, 10, 10, 10, 11, 12, 12, + 9, 10, 11, 11, 9, 10, 10, 7, 9, 10, 11, 12, 14, 15, 16, 17, 17, 14, 14, + 10, 10, 11, 11, 11, 11, 10, 11, 11, 10, 10, 9, 10, 10, 9, 10, 10, 9, 10, + 13, 13, 13, 13, 13, 13, 13, 13, 7, 12, 12, 12, 12, 11, 12, 12, 10, 10, 10, + 11, 11, 10, 11, 11, 7, 7, 7, 10, 10, 10, 10, 9, 10, 10, 7, 9, 10, 12, + 13, 13, 12, 12, 9, 12, 12, 12, 12, 11, 11, 7, 7, 7, 9, 10, 10, 10, 10, + 10, 11, 12, 13, 13, 10, 10, 10, 11, 13, 13, 13, 13, 9, 10, 13, 13, 13, 13, + 12, 12, 9, 10, 10, 9, 10, 11, 12, 12, 10, 10, 10, 10, 10, 11, 11, 10, 11, + 11, 9, 10, 10, 9, 9, 9, 12, 12, 12, 12, 11, 11, 10, 10, 10, 10, 9, 9, + 9, 10, 11, 12, 13, 14, 14, 7, 9, 9, 9, 10, 11, 11, 7, 9, 9, 10, 11, + 12, 13, 13, 10, 10, 7, 10, 10, 10, 11, 11, 10, 11, 11, 10, 10, 9, 10, 10, + 9, 10, 10, 9, 9, 9, 9, 9, 11, 12, 12, 11, 11, 9, 10, 11, 12, 12, 10, + 10, 10, 10, 9, 10, 11, 11, 9, 9, 9, 10, 10, 9, 10, 11, 12, 12, 9, 10, + 10, 7, 9, 10, 10, 10, 11, 12, 12, 10, 10, 7, 9, 10, 10, 9, 10, 12, 12, + 12, 12, 7, 10, 11, 11, 10, 10, 9, 9, 7, 9, 10, 10, 9, 10, 10, 9, 10, + 10, 10, 11, 12, 12, 10, 10, 9, 9, 10, 12, 12, 12, 12, 10, 11, 11, 7, 9, + 10, 10, 9, 10, 11, 11, 7, 9, 9, 10, 10, 10, 10, 9, 10, 10, 9, 9, 9, + 10, 13, 14, 14, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 7, + 9, 10, 11, 12, 12, 9, 9, 9, 10, 10, 9, 9, 12, 12, 12, 12, 11, 11, 10, + 10, 9, 10, 11, 13, 13, 13, 13, 9, 9, 9, 9, 12, 12, 12, 12, 11, 11, 10, + 10, 9, 10, 10, }; -static const uint16_t on2avc_cb7_8_syms[ON2AVC_CB7_8_CODES] = { - 0x0000, 0x0002, 0x0004, 0x000C, 0x000E, 0x0011, - 0x0013, 0x001D, 0x001F, 0x0020, 0x0022, 0x0024, - 0x002C, 0x002E, 0x0031, 0x0033, 0x003D, 0x003F, - 0x0040, 0x0042, 0x0044, 0x004C, 0x004E, 0x00C0, - 0x00C2, 0x00C4, 0x00CC, 0x00CE, 0x00D1, 0x00D3, - 0x00DD, 0x00DF, 0x00E0, 0x00E2, 0x00E4, 0x00EC, - 0x00EE, 0x00F1, 0x00F3, 0x00FD, 0x00FF, 0x0101, - 0x0103, 0x010D, 0x010F, 0x0110, 0x0112, 0x0114, - 0x011C, 0x011E, 0x0121, 0x0123, 0x012D, 0x012F, - 0x0130, 0x0132, 0x0134, 0x013C, 0x013E, 0x0141, - 0x0143, 0x014D, 0x014F, 0x01C1, 0x01C3, 0x01CD, - 0x01CF, 0x01D0, 0x01D2, 0x01D4, 0x01DC, 0x01DE, - 0x01E1, 0x01E3, 0x01ED, 0x01EF, 0x01F0, 0x01F2, - 0x01F4, 0x01FC, 0x01FE, 0x0200, 0x0202, 0x0204, - 0x020C, 0x020E, 0x0211, 0x0213, 0x021D, 0x021F, - 0x0220, 0x0222, 0x0224, 0x022C, 0x022E, 0x0231, - 0x0233, 0x023D, 0x023F, 0x0240, 0x0242, 0x0244, - 0x024C, 0x024E, 0x02C0, 0x02C2, 0x02C4, 0x02CC, - 0x02CE, 0x02D1, 0x02D3, 0x02DD, 0x02DF, 0x02E0, - 0x02E2, 0x02E4, 0x02EC, 0x02EE, 0x02F1, 0x02F3, - 0x02FD, 0x02FF, 0x0301, 0x0303, 0x030D, 0x030F, - 0x0310, 0x0312, 0x0314, 0x031C, 0x031E, 0x0321, - 0x0323, 0x032D, 0x032F, 0x0330, 0x0332, 0x0334, - 0x033C, 0x033E, 0x0341, 0x0343, 0x034D, 0x034F, - 0x03C1, 0x03C3, 0x03CD, 0x03CF, 0x03D0, 0x03D2, - 0x03D4, 0x03DC, 0x03DE, 0x03E1, 0x03E3, 0x03ED, - 0x03EF, 0x03F0, 0x03F2, 0x03F4, 0x03FC, 0x03FE, - 0x0400, 0x0402, 0x0404, 0x040C, 0x040E, 0x0411, - 0x0413, 0x041D, 0x041F, 0x0420, 0x0422, 0x0424, - 0x042C, 0x042E, 0x0431, 0x0433, 0x043D, 0x043F, - 0x0440, 0x0442, 0x0444, 0x044C, 0x044E, 0x04C0, - 0x04C2, 0x04C4, 0x04CC, 0x04CE, 0x04D1, 0x04D3, - 0x04DD, 0x04DF, 0x04E0, 0x04E2, 0x04E4, 0x04EC, - 0x04EE, 0x04F1, 0x04F3, 0x04FD, 0x04FF, 0x0C00, - 0x0C02, 0x0C04, 0x0C0C, 0x0C0E, 0x0C11, 0x0C13, - 0x0C1D, 0x0C1F, 0x0C20, 0x0C22, 0x0C24, 0x0C2C, - 0x0C2E, 0x0C31, 0x0C33, 0x0C3D, 0x0C3F, 0x0C40, - 0x0C42, 0x0C44, 0x0C4C, 0x0C4E, 0x0CC0, 0x0CC2, - 0x0CC4, 0x0CCC, 0x0CCE, 0x0CD1, 0x0CD3, 0x0CDD, - 0x0CDF, 0x0CE0, 0x0CE2, 0x0CE4, 0x0CEC, 0x0CEE, - 0x0CF1, 0x0CF3, 0x0CFD, 0x0CFF, 0x0D01, 0x0D03, - 0x0D0D, 0x0D0F, 0x0D10, 0x0D12, 0x0D14, 0x0D1C, - 0x0D1E, 0x0D21, 0x0D23, 0x0D2D, 0x0D2F, 0x0D30, - 0x0D32, 0x0D34, 0x0D3C, 0x0D3E, 0x0D41, 0x0D43, - 0x0D4D, 0x0D4F, 0x0DC1, 0x0DC3, 0x0DCD, 0x0DCF, - 0x0DD0, 0x0DD2, 0x0DD4, 0x0DDC, 0x0DDE, 0x0DE1, - 0x0DE3, 0x0DED, 0x0DEF, 0x0DF0, 0x0DF2, 0x0DF4, - 0x0DFC, 0x0DFE, 0x0E00, 0x0E02, 0x0E04, 0x0E0C, - 0x0E0E, 0x0E11, 0x0E13, 0x0E1D, 0x0E1F, 0x0E20, - 0x0E22, 0x0E24, 0x0E2C, 0x0E2E, 0x0E31, 0x0E33, - 0x0E3D, 0x0E3F, 0x0E40, 0x0E42, 0x0E44, 0x0E4C, - 0x0E4E, 0x0EC0, 0x0EC2, 0x0EC4, 0x0ECC, 0x0ECE, - 0x0ED1, 0x0ED3, 0x0EDD, 0x0EDF, 0x0EE0, 0x0EE2, - 0x0EE4, 0x0EEC, 0x0EEE, 0x0EF1, 0x0EF3, 0x0EFD, - 0x0EFF, 0x0F01, 0x0F03, 0x0F0D, 0x0F0F, 0x0F10, - 0x0F12, 0x0F14, 0x0F1C, 0x0F1E, 0x0F21, 0x0F23, - 0x0F2D, 0x0F2F, 0x0F30, 0x0F32, 0x0F34, 0x0F3C, - 0x0F3E, 0x0F41, 0x0F43, 0x0F4D, 0x0F4F, 0x0FC1, - 0x0FC3, 0x0FCD, 0x0FCF, 0x0FD0, 0x0FD2, 0x0FD4, - 0x0FDC, 0x0FDE, 0x0FE1, 0x0FE3, 0x0FED, 0x0FEF, - 0x0FF0, 0x0FF2, 0x0FF4, 0x0FFC, 0x0FFE, 0x1001, - 0x1003, 0x100D, 0x100F, 0x1010, 0x1012, 0x1014, - 0x101C, 0x101E, 0x1021, 0x1023, 0x102D, 0x102F, - 0x1030, 0x1032, 0x1034, 0x103C, 0x103E, 0x1041, - 0x1043, 0x104D, 0x104F, 0x10C1, 0x10C3, 0x10CD, - 0x10CF, 0x10D0, 0x10D2, 0x10D4, 0x10DC, 0x10DE, - 0x10E1, 0x10E3, 0x10ED, 0x10EF, 0x10F0, 0x10F2, - 0x10F4, 0x10FC, 0x10FE, 0x1100, 0x1102, 0x1104, - 0x110C, 0x110E, 0x1111, 0x1113, 0x111D, 0x111F, - 0x1120, 0x1122, 0x1124, 0x112C, 0x112E, 0x1131, - 0x1133, 0x113D, 0x113F, 0x1140, 0x1142, 0x1144, - 0x114C, 0x114E, 0x11C0, 0x11C2, 0x11C4, 0x11CC, - 0x11CE, 0x11D1, 0x11D3, 0x11DD, 0x11DF, 0x11E0, - 0x11E2, 0x11E4, 0x11EC, 0x11EE, 0x11F1, 0x11F3, - 0x11FD, 0x11FF, 0x1201, 0x1203, 0x120D, 0x120F, - 0x1210, 0x1212, 0x1214, 0x121C, 0x121E, 0x1221, - 0x1223, 0x122D, 0x122F, 0x1230, 0x1232, 0x1234, - 0x123C, 0x123E, 0x1241, 0x1243, 0x124D, 0x124F, - 0x12C1, 0x12C3, 0x12CD, 0x12CF, 0x12D0, 0x12D2, - 0x12D4, 0x12DC, 0x12DE, 0x12E1, 0x12E3, 0x12ED, - 0x12EF, 0x12F0, 0x12F2, 0x12F4, 0x12FC, 0x12FE, - 0x1300, 0x1302, 0x1304, 0x130C, 0x130E, 0x1311, - 0x1313, 0x131D, 0x131F, 0x1320, 0x1322, 0x1324, - 0x132C, 0x132E, 0x1331, 0x1333, 0x133D, 0x133F, - 0x1340, 0x1342, 0x1344, 0x134C, 0x134E, 0x13C0, - 0x13C2, 0x13C4, 0x13CC, 0x13CE, 0x13D1, 0x13D3, - 0x13DD, 0x13DF, 0x13E0, 0x13E2, 0x13E4, 0x13EC, - 0x13EE, 0x13F1, 0x13F3, 0x13FD, 0x13FF, 0x1401, - 0x1403, 0x140D, 0x140F, 0x1410, 0x1412, 0x1414, - 0x141C, 0x141E, 0x1421, 0x1423, 0x142D, 0x142F, - 0x1430, 0x1432, 0x1434, 0x143C, 0x143E, 0x1441, - 0x1443, 0x144D, 0x144F, 0x14C1, 0x14C3, 0x14CD, - 0x14CF, 0x14D0, 0x14D2, 0x14D4, 0x14DC, 0x14DE, - 0x14E1, 0x14E3, 0x14ED, 0x14EF, 0x14F0, 0x14F2, - 0x14F4, 0x14FC, 0x14FE, 0x1C01, 0x1C03, 0x1C0D, - 0x1C0F, 0x1C10, 0x1C12, 0x1C14, 0x1C1C, 0x1C1E, - 0x1C21, 0x1C23, 0x1C2D, 0x1C2F, 0x1C30, 0x1C32, - 0x1C34, 0x1C3C, 0x1C3E, 0x1C41, 0x1C43, 0x1C4D, - 0x1C4F, 0x1CC1, 0x1CC3, 0x1CCD, 0x1CCF, 0x1CD0, - 0x1CD2, 0x1CD4, 0x1CDC, 0x1CDE, 0x1CE1, 0x1CE3, - 0x1CED, 0x1CEF, 0x1CF0, 0x1CF2, 0x1CF4, 0x1CFC, - 0x1CFE, 0x1D00, 0x1D02, 0x1D04, 0x1D0C, 0x1D0E, - 0x1D11, 0x1D13, 0x1D1D, 0x1D1F, 0x1D20, 0x1D22, - 0x1D24, 0x1D2C, 0x1D2E, 0x1D31, 0x1D33, 0x1D3D, - 0x1D3F, 0x1D40, 0x1D42, 0x1D44, 0x1D4C, 0x1D4E, - 0x1DC0, 0x1DC2, 0x1DC4, 0x1DCC, 0x1DCE, 0x1DD1, - 0x1DD3, 0x1DDD, 0x1DDF, 0x1DE0, 0x1DE2, 0x1DE4, - 0x1DEC, 0x1DEE, 0x1DF1, 0x1DF3, 0x1DFD, 0x1DFF, - 0x1E01, 0x1E03, 0x1E0D, 0x1E0F, 0x1E10, 0x1E12, - 0x1E14, 0x1E1C, 0x1E1E, 0x1E21, 0x1E23, 0x1E2D, - 0x1E2F, 0x1E30, 0x1E32, 0x1E34, 0x1E3C, 0x1E3E, - 0x1E41, 0x1E43, 0x1E4D, 0x1E4F, 0x1EC1, 0x1EC3, - 0x1ECD, 0x1ECF, 0x1ED0, 0x1ED2, 0x1ED4, 0x1EDC, - 0x1EDE, 0x1EE1, 0x1EE3, 0x1EED, 0x1EEF, 0x1EF0, - 0x1EF2, 0x1EF4, 0x1EFC, 0x1EFE, 0x1F00, 0x1F02, - 0x1F04, 0x1F0C, 0x1F0E, 0x1F11, 0x1F13, 0x1F1D, - 0x1F1F, 0x1F20, 0x1F22, 0x1F24, 0x1F2C, 0x1F2E, - 0x1F31, 0x1F33, 0x1F3D, 0x1F3F, 0x1F40, 0x1F42, - 0x1F44, 0x1F4C, 0x1F4E, 0x1FC0, 0x1FC2, 0x1FC4, - 0x1FCC, 0x1FCE, 0x1FD1, 0x1FD3, 0x1FDD, 0x1FDF, - 0x1FE0, 0x1FE2, 0x1FE4, 0x1FEC, 0x1FEE, 0x1FF1, - 0x1FF3, 0x1FFD, 0x1FFF, 0x2000, 0x2002, 0x2004, - 0x200C, 0x200E, 0x2011, 0x2013, 0x201D, 0x201F, - 0x2020, 0x2022, 0x2024, 0x202C, 0x202E, 0x2031, - 0x2033, 0x203D, 0x203F, 0x2040, 0x2042, 0x2044, - 0x204C, 0x204E, 0x20C0, 0x20C2, 0x20C4, 0x20CC, - 0x20CE, 0x20D1, 0x20D3, 0x20DD, 0x20DF, 0x20E0, - 0x20E2, 0x20E4, 0x20EC, 0x20EE, 0x20F1, 0x20F3, - 0x20FD, 0x20FF, 0x2101, 0x2103, 0x210D, 0x210F, - 0x2110, 0x2112, 0x2114, 0x211C, 0x211E, 0x2121, - 0x2123, 0x212D, 0x212F, 0x2130, 0x2132, 0x2134, - 0x213C, 0x213E, 0x2141, 0x2143, 0x214D, 0x214F, - 0x21C1, 0x21C3, 0x21CD, 0x21CF, 0x21D0, 0x21D2, - 0x21D4, 0x21DC, 0x21DE, 0x21E1, 0x21E3, 0x21ED, - 0x21EF, 0x21F0, 0x21F2, 0x21F4, 0x21FC, 0x21FE, - 0x2200, 0x2202, 0x2204, 0x220C, 0x220E, 0x2211, - 0x2213, 0x221D, 0x221F, 0x2220, 0x2222, 0x2224, - 0x222C, 0x222E, 0x2231, 0x2233, 0x223D, 0x223F, - 0x2240, 0x2242, 0x2244, 0x224C, 0x224E, 0x22C0, - 0x22C2, 0x22C4, 0x22CC, 0x22CE, 0x22D1, 0x22D3, - 0x22DD, 0x22DF, 0x22E0, 0x22E2, 0x22E4, 0x22EC, - 0x22EE, 0x22F1, 0x22F3, 0x22FD, 0x22FF, 0x2301, - 0x2303, 0x230D, 0x230F, 0x2310, 0x2312, 0x2314, - 0x231C, 0x231E, 0x2321, 0x2323, 0x232D, 0x232F, - 0x2330, 0x2332, 0x2334, 0x233C, 0x233E, 0x2341, - 0x2343, 0x234D, 0x234F, 0x23C1, 0x23C3, 0x23CD, - 0x23CF, 0x23D0, 0x23D2, 0x23D4, 0x23DC, 0x23DE, - 0x23E1, 0x23E3, 0x23ED, 0x23EF, 0x23F0, 0x23F2, - 0x23F4, 0x23FC, 0x23FE, 0x2400, 0x2402, 0x2404, - 0x240C, 0x240E, 0x2411, 0x2413, 0x241D, 0x241F, - 0x2420, 0x2422, 0x2424, 0x242C, 0x242E, 0x2431, - 0x2433, 0x243D, 0x243F, 0x2440, 0x2442, 0x2444, - 0x244C, 0x244E, 0x24C0, 0x24C2, 0x24C4, 0x24CC, - 0x24CE, 0x24D1, 0x24D3, 0x24DD, 0x24DF, 0x24E0, - 0x24E2, 0x24E4, 0x24EC, 0x24EE, 0x24F1, 0x24F3, - 0x24FD, 0x24FF, 0x2C00, 0x2C02, 0x2C04, 0x2C0C, - 0x2C0E, 0x2C11, 0x2C13, 0x2C1D, 0x2C1F, 0x2C20, - 0x2C22, 0x2C24, 0x2C2C, 0x2C2E, 0x2C31, 0x2C33, - 0x2C3D, 0x2C3F, 0x2C40, 0x2C42, 0x2C44, 0x2C4C, - 0x2C4E, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CCC, 0x2CCE, - 0x2CD1, 0x2CD3, 0x2CDD, 0x2CDF, 0x2CE0, 0x2CE2, - 0x2CE4, 0x2CEC, 0x2CEE, 0x2CF1, 0x2CF3, 0x2CFD, - 0x2CFF, 0x2D01, 0x2D03, 0x2D0D, 0x2D0F, 0x2D10, - 0x2D12, 0x2D14, 0x2D1C, 0x2D1E, 0x2D21, 0x2D23, - 0x2D2D, 0x2D2F, 0x2D30, 0x2D32, 0x2D34, 0x2D3C, - 0x2D3E, 0x2D41, 0x2D43, 0x2D4D, 0x2D4F, 0x2DC1, - 0x2DC3, 0x2DCD, 0x2DCF, 0x2DD0, 0x2DD2, 0x2DD4, - 0x2DDC, 0x2DDE, 0x2DE1, 0x2DE3, 0x2DED, 0x2DEF, - 0x2DF0, 0x2DF2, 0x2DF4, 0x2DFC, 0x2DFE, 0x2E00, - 0x2E02, 0x2E04, 0x2E0C, 0x2E0E, 0x2E11, 0x2E13, - 0x2E1D, 0x2E1F, 0x2E20, 0x2E22, 0x2E24, 0x2E2C, - 0x2E2E, 0x2E31, 0x2E33, 0x2E3D, 0x2E3F, 0x2E40, - 0x2E42, 0x2E44, 0x2E4C, 0x2E4E, 0x2EC0, 0x2EC2, - 0x2EC4, 0x2ECC, 0x2ECE, 0x2ED1, 0x2ED3, 0x2EDD, - 0x2EDF, 0x2EE0, 0x2EE2, 0x2EE4, 0x2EEC, 0x2EEE, - 0x2EF1, 0x2EF3, 0x2EFD, 0x2EFF, 0x2F01, 0x2F03, - 0x2F0D, 0x2F0F, 0x2F10, 0x2F12, 0x2F14, 0x2F1C, - 0x2F1E, 0x2F21, 0x2F23, 0x2F2D, 0x2F2F, 0x2F30, - 0x2F32, 0x2F34, 0x2F3C, 0x2F3E, 0x2F41, 0x2F43, - 0x2F4D, 0x2F4F, 0x2FC1, 0x2FC3, 0x2FCD, 0x2FCF, - 0x2FD0, 0x2FD2, 0x2FD4, 0x2FDC, 0x2FDE, 0x2FE1, - 0x2FE3, 0x2FED, 0x2FEF, 0x2FF0, 0x2FF2, 0x2FF4, - 0x2FFC, 0x2FFE, 0x3001, 0x3003, 0x300D, 0x300F, - 0x3010, 0x3012, 0x3014, 0x301C, 0x301E, 0x3021, - 0x3023, 0x302D, 0x302F, 0x3030, 0x3032, 0x3034, - 0x303C, 0x303E, 0x3041, 0x3043, 0x304D, 0x304F, - 0x30C1, 0x30C3, 0x30CD, 0x30CF, 0x30D0, 0x30D2, - 0x30D4, 0x30DC, 0x30DE, 0x30E1, 0x30E3, 0x30ED, - 0x30EF, 0x30F0, 0x30F2, 0x30F4, 0x30FC, 0x30FE, - 0x3100, 0x3102, 0x3104, 0x310C, 0x310E, 0x3111, - 0x3113, 0x311D, 0x311F, 0x3120, 0x3122, 0x3124, - 0x312C, 0x312E, 0x3131, 0x3133, 0x313D, 0x313F, - 0x3140, 0x3142, 0x3144, 0x314C, 0x314E, 0x31C0, - 0x31C2, 0x31C4, 0x31CC, 0x31CE, 0x31D1, 0x31D3, - 0x31DD, 0x31DF, 0x31E0, 0x31E2, 0x31E4, 0x31EC, - 0x31EE, 0x31F1, 0x31F3, 0x31FD, 0x31FF, 0x3201, - 0x3203, 0x320D, 0x320F, 0x3210, 0x3212, 0x3214, - 0x321C, 0x321E, 0x3221, 0x3223, 0x322D, 0x322F, - 0x3230, 0x3232, 0x3234, 0x323C, 0x323E, 0x3241, - 0x3243, 0x324D, 0x324F, 0x32C1, 0x32C3, 0x32CD, - 0x32CF, 0x32D0, 0x32D2, 0x32D4, 0x32DC, 0x32DE, - 0x32E1, 0x32E3, 0x32ED, 0x32EF, 0x32F0, 0x32F2, - 0x32F4, 0x32FC, 0x32FE, 0x3300, 0x3302, 0x3304, - 0x330C, 0x330E, 0x3311, 0x3313, 0x331D, 0x331F, - 0x3320, 0x3322, 0x3324, 0x332C, 0x332E, 0x3331, - 0x3333, 0x333D, 0x333F, 0x3340, 0x3342, 0x3344, - 0x334C, 0x334E, 0x33C0, 0x33C2, 0x33C4, 0x33CC, - 0x33CE, 0x33D1, 0x33D3, 0x33DD, 0x33DF, 0x33E0, - 0x33E2, 0x33E4, 0x33EC, 0x33EE, 0x33F1, 0x33F3, - 0x33FD, 0x33FF, 0x3401, 0x3403, 0x340D, 0x340F, - 0x3410, 0x3412, 0x3414, 0x341C, 0x341E, 0x3421, - 0x3423, 0x342D, 0x342F, 0x3430, 0x3432, 0x3434, - 0x343C, 0x343E, 0x3441, 0x3443, 0x344D, 0x344F, - 0x34C1, 0x34C3, 0x34CD, 0x34CF, 0x34D0, 0x34D2, - 0x34D4, 0x34DC, 0x34DE, 0x34E1, 0x34E3, 0x34ED, - 0x34EF, 0x34F0, 0x34F2, 0x34F4, 0x34FC, 0x34FE, - 0x3C01, 0x3C03, 0x3C0D, 0x3C0F, 0x3C10, 0x3C12, - 0x3C14, 0x3C1C, 0x3C1E, 0x3C21, 0x3C23, 0x3C2D, - 0x3C2F, 0x3C30, 0x3C32, 0x3C34, 0x3C3C, 0x3C3E, - 0x3C41, 0x3C43, 0x3C4D, 0x3C4F, 0x3CC1, 0x3CC3, - 0x3CCD, 0x3CCF, 0x3CD0, 0x3CD2, 0x3CD4, 0x3CDC, - 0x3CDE, 0x3CE1, 0x3CE3, 0x3CED, 0x3CEF, 0x3CF0, - 0x3CF2, 0x3CF4, 0x3CFC, 0x3CFE, 0x3D00, 0x3D02, - 0x3D04, 0x3D0C, 0x3D0E, 0x3D11, 0x3D13, 0x3D1D, - 0x3D1F, 0x3D20, 0x3D22, 0x3D24, 0x3D2C, 0x3D2E, - 0x3D31, 0x3D33, 0x3D3D, 0x3D3F, 0x3D40, 0x3D42, - 0x3D44, 0x3D4C, 0x3D4E, 0x3DC0, 0x3DC2, 0x3DC4, - 0x3DCC, 0x3DCE, 0x3DD1, 0x3DD3, 0x3DDD, 0x3DDF, - 0x3DE0, 0x3DE2, 0x3DE4, 0x3DEC, 0x3DEE, 0x3DF1, - 0x3DF3, 0x3DFD, 0x3DFF, 0x3E01, 0x3E03, 0x3E0D, - 0x3E0F, 0x3E10, 0x3E12, 0x3E14, 0x3E1C, 0x3E1E, - 0x3E21, 0x3E23, 0x3E2D, 0x3E2F, 0x3E30, 0x3E32, - 0x3E34, 0x3E3C, 0x3E3E, 0x3E41, 0x3E43, 0x3E4D, - 0x3E4F, 0x3EC1, 0x3EC3, 0x3ECD, 0x3ECF, 0x3ED0, - 0x3ED2, 0x3ED4, 0x3EDC, 0x3EDE, 0x3EE1, 0x3EE3, - 0x3EED, 0x3EEF, 0x3EF0, 0x3EF2, 0x3EF4, 0x3EFC, - 0x3EFE, 0x3F00, 0x3F02, 0x3F04, 0x3F0C, 0x3F0E, - 0x3F11, 0x3F13, 0x3F1D, 0x3F1F, 0x3F20, 0x3F22, - 0x3F24, 0x3F2C, 0x3F2E, 0x3F31, 0x3F33, 0x3F3D, - 0x3F3F, 0x3F40, 0x3F42, 0x3F44, 0x3F4C, 0x3F4E, - 0x3FC0, 0x3FC2, 0x3FC4, 0x3FCC, 0x3FCE, 0x3FD1, - 0x3FD3, 0x3FDD, 0x3FDF, 0x3FE0, 0x3FE2, 0x3FE4, - 0x3FEC, 0x3FEE, 0x3FF1, 0x3FF3, 0x3FFD, 0x3FFF, - 0x4000, 0x4002, 0x4004, 0x400C, 0x400E, 0x4011, - 0x4013, 0x401D, 0x401F, 0x4020, 0x4022, 0x4024, - 0x402C, 0x402E, 0x4031, 0x4033, 0x403D, 0x403F, - 0x4040, 0x4042, 0x4044, 0x404C, 0x404E, 0x40C0, - 0x40C2, 0x40C4, 0x40CC, 0x40CE, 0x40D1, 0x40D3, - 0x40DD, 0x40DF, 0x40E0, 0x40E2, 0x40E4, 0x40EC, - 0x40EE, 0x40F1, 0x40F3, 0x40FD, 0x40FF, 0x4101, - 0x4103, 0x410D, 0x410F, 0x4110, 0x4112, 0x4114, - 0x411C, 0x411E, 0x4121, 0x4123, 0x412D, 0x412F, - 0x4130, 0x4132, 0x4134, 0x413C, 0x413E, 0x4141, - 0x4143, 0x414D, 0x414F, 0x41C1, 0x41C3, 0x41CD, - 0x41CF, 0x41D0, 0x41D2, 0x41D4, 0x41DC, 0x41DE, - 0x41E1, 0x41E3, 0x41ED, 0x41EF, 0x41F0, 0x41F2, - 0x41F4, 0x41FC, 0x41FE, 0x4200, 0x4202, 0x4204, - 0x420C, 0x420E, 0x4211, 0x4213, 0x421D, 0x421F, - 0x4220, 0x4222, 0x4224, 0x422C, 0x422E, 0x4231, - 0x4233, 0x423D, 0x423F, 0x4240, 0x4242, 0x4244, - 0x424C, 0x424E, 0x42C0, 0x42C2, 0x42C4, 0x42CC, - 0x42CE, 0x42D1, 0x42D3, 0x42DD, 0x42DF, 0x42E0, - 0x42E2, 0x42E4, 0x42EC, 0x42EE, 0x42F1, 0x42F3, - 0x42FD, 0x42FF, 0x4301, 0x4303, 0x430D, 0x430F, - 0x4310, 0x4312, 0x4314, 0x431C, 0x431E, 0x4321, - 0x4323, 0x432D, 0x432F, 0x4330, 0x4332, 0x4334, - 0x433C, 0x433E, 0x4341, 0x4343, 0x434D, 0x434F, - 0x43C1, 0x43C3, 0x43CD, 0x43CF, 0x43D0, 0x43D2, - 0x43D4, 0x43DC, 0x43DE, 0x43E1, 0x43E3, 0x43ED, - 0x43EF, 0x43F0, 0x43F2, 0x43F4, 0x43FC, 0x43FE, - 0x4400, 0x4402, 0x4404, 0x440C, 0x440E, 0x4411, - 0x4413, 0x441D, 0x441F, 0x4420, 0x4422, 0x4424, - 0x442C, 0x442E, 0x4431, 0x4433, 0x443D, 0x443F, - 0x4440, 0x4442, 0x4444, 0x444C, 0x444E, 0x44C0, - 0x44C2, 0x44C4, 0x44CC, 0x44CE, 0x44D1, 0x44D3, - 0x44DD, 0x44DF, 0x44E0, 0x44E2, 0x44E4, 0x44EC, - 0x44EE, 0x44F1, 0x44F3, 0x44FD, 0x44FF, 0x4C00, - 0x4C02, 0x4C04, 0x4C0C, 0x4C0E, 0x4C11, 0x4C13, - 0x4C1D, 0x4C1F, 0x4C20, 0x4C22, 0x4C24, 0x4C2C, - 0x4C2E, 0x4C31, 0x4C33, 0x4C3D, 0x4C3F, 0x4C40, - 0x4C42, 0x4C44, 0x4C4C, 0x4C4E, 0x4CC0, 0x4CC2, - 0x4CC4, 0x4CCC, 0x4CCE, 0x4CD1, 0x4CD3, 0x4CDD, - 0x4CDF, 0x4CE0, 0x4CE2, 0x4CE4, 0x4CEC, 0x4CEE, - 0x4CF1, 0x4CF3, 0x4CFD, 0x4CFF, 0x4D01, 0x4D03, - 0x4D0D, 0x4D0F, 0x4D10, 0x4D12, 0x4D14, 0x4D1C, - 0x4D1E, 0x4D21, 0x4D23, 0x4D2D, 0x4D2F, 0x4D30, - 0x4D32, 0x4D34, 0x4D3C, 0x4D3E, 0x4D41, 0x4D43, - 0x4D4D, 0x4D4F, 0x4DC1, 0x4DC3, 0x4DCD, 0x4DCF, - 0x4DD0, 0x4DD2, 0x4DD4, 0x4DDC, 0x4DDE, 0x4DE1, - 0x4DE3, 0x4DED, 0x4DEF, 0x4DF0, 0x4DF2, 0x4DF4, - 0x4DFC, 0x4DFE, 0x4E00, 0x4E02, 0x4E04, 0x4E0C, - 0x4E0E, 0x4E11, 0x4E13, 0x4E1D, 0x4E1F, 0x4E20, - 0x4E22, 0x4E24, 0x4E2C, 0x4E2E, 0x4E31, 0x4E33, - 0x4E3D, 0x4E3F, 0x4E40, 0x4E42, 0x4E44, 0x4E4C, - 0x4E4E, 0x4EC0, 0x4EC2, 0x4EC4, 0x4ECC, 0x4ECE, - 0x4ED1, 0x4ED3, 0x4EDD, 0x4EDF, 0x4EE0, 0x4EE2, - 0x4EE4, 0x4EEC, 0x4EEE, 0x4EF1, 0x4EF3, 0x4EFD, - 0x4EFF, 0x4F01, 0x4F03, 0x4F0D, 0x4F0F, 0x4F10, - 0x4F12, 0x4F14, 0x4F1C, 0x4F1E, 0x4F21, 0x4F23, - 0x4F2D, 0x4F2F, 0x4F30, 0x4F32, 0x4F34, 0x4F3C, - 0x4F3E, 0x4F41, 0x4F43, 0x4F4D, 0x4F4F, 0x4FC1, - 0x4FC3, 0x4FCD, 0x4FCF, 0x4FD0, 0x4FD2, 0x4FD4, - 0x4FDC, 0x4FDE, 0x4FE1, 0x4FE3, 0x4FED, 0x4FEF, - 0x4FF0, 0x4FF2, 0x4FF4, 0x4FFC, 0x4FFE, 0xC000, - 0xC002, 0xC004, 0xC00C, 0xC00E, 0xC011, 0xC013, - 0xC01D, 0xC01F, 0xC020, 0xC022, 0xC024, 0xC02C, - 0xC02E, 0xC031, 0xC033, 0xC03D, 0xC03F, 0xC040, - 0xC042, 0xC044, 0xC04C, 0xC04E, 0xC0C0, 0xC0C2, - 0xC0C4, 0xC0CC, 0xC0CE, 0xC0D1, 0xC0D3, 0xC0DD, - 0xC0DF, 0xC0E0, 0xC0E2, 0xC0E4, 0xC0EC, 0xC0EE, - 0xC0F1, 0xC0F3, 0xC0FD, 0xC0FF, 0xC101, 0xC103, - 0xC10D, 0xC10F, 0xC110, 0xC112, 0xC114, 0xC11C, - 0xC11E, 0xC121, 0xC123, 0xC12D, 0xC12F, 0xC130, - 0xC132, 0xC134, 0xC13C, 0xC13E, 0xC141, 0xC143, - 0xC14D, 0xC14F, 0xC1C1, 0xC1C3, 0xC1CD, 0xC1CF, - 0xC1D0, 0xC1D2, 0xC1D4, 0xC1DC, 0xC1DE, 0xC1E1, - 0xC1E3, 0xC1ED, 0xC1EF, 0xC1F0, 0xC1F2, 0xC1F4, - 0xC1FC, 0xC1FE, 0xC200, 0xC202, 0xC204, 0xC20C, - 0xC20E, 0xC211, 0xC213, 0xC21D, 0xC21F, 0xC220, - 0xC222, 0xC224, 0xC22C, 0xC22E, 0xC231, 0xC233, - 0xC23D, 0xC23F, 0xC240, 0xC242, 0xC244, 0xC24C, - 0xC24E, 0xC2C0, 0xC2C2, 0xC2C4, 0xC2CC, 0xC2CE, - 0xC2D1, 0xC2D3, 0xC2DD, 0xC2DF, 0xC2E0, 0xC2E2, - 0xC2E4, 0xC2EC, 0xC2EE, 0xC2F1, 0xC2F3, 0xC2FD, - 0xC2FF, 0xC301, 0xC303, 0xC30D, 0xC30F, 0xC310, - 0xC312, 0xC314, 0xC31C, 0xC31E, 0xC321, 0xC323, - 0xC32D, 0xC32F, 0xC330, 0xC332, 0xC334, 0xC33C, - 0xC33E, 0xC341, 0xC343, 0xC34D, 0xC34F, 0xC3C1, - 0xC3C3, 0xC3CD, 0xC3CF, 0xC3D0, 0xC3D2, 0xC3D4, - 0xC3DC, 0xC3DE, 0xC3E1, 0xC3E3, 0xC3ED, 0xC3EF, - 0xC3F0, 0xC3F2, 0xC3F4, 0xC3FC, 0xC3FE, 0xC400, - 0xC402, 0xC404, 0xC40C, 0xC40E, 0xC411, 0xC413, - 0xC41D, 0xC41F, 0xC420, 0xC422, 0xC424, 0xC42C, - 0xC42E, 0xC431, 0xC433, 0xC43D, 0xC43F, 0xC440, - 0xC442, 0xC444, 0xC44C, 0xC44E, 0xC4C0, 0xC4C2, - 0xC4C4, 0xC4CC, 0xC4CE, 0xC4D1, 0xC4D3, 0xC4DD, - 0xC4DF, 0xC4E0, 0xC4E2, 0xC4E4, 0xC4EC, 0xC4EE, - 0xC4F1, 0xC4F3, 0xC4FD, 0xC4FF, 0xCC00, 0xCC02, - 0xCC04, 0xCC0C, 0xCC0E, 0xCC11, 0xCC13, 0xCC1D, - 0xCC1F, 0xCC20, 0xCC22, 0xCC24, 0xCC2C, 0xCC2E, - 0xCC31, 0xCC33, 0xCC3D, 0xCC3F, 0xCC40, 0xCC42, - 0xCC44, 0xCC4C, 0xCC4E, 0xCCC0, 0xCCC2, 0xCCC4, - 0xCCCC, 0xCCCE, 0xCCD1, 0xCCD3, 0xCCDD, 0xCCDF, - 0xCCE0, 0xCCE2, 0xCCE4, 0xCCEC, 0xCCEE, 0xCCF1, - 0xCCF3, 0xCCFD, 0xCCFF, 0xCD01, 0xCD03, 0xCD0D, - 0xCD0F, 0xCD10, 0xCD12, 0xCD14, 0xCD1C, 0xCD1E, - 0xCD21, 0xCD23, 0xCD2D, 0xCD2F, 0xCD30, 0xCD32, - 0xCD34, 0xCD3C, 0xCD3E, 0xCD41, 0xCD43, 0xCD4D, - 0xCD4F, 0xCDC1, 0xCDC3, 0xCDCD, 0xCDCF, 0xCDD0, - 0xCDD2, 0xCDD4, 0xCDDC, 0xCDDE, 0xCDE1, 0xCDE3, - 0xCDED, 0xCDEF, 0xCDF0, 0xCDF2, 0xCDF4, 0xCDFC, - 0xCDFE, 0xCE00, 0xCE02, 0xCE04, 0xCE0C, 0xCE0E, - 0xCE11, 0xCE13, 0xCE1D, 0xCE1F, 0xCE20, 0xCE22, - 0xCE24, 0xCE2C, 0xCE2E, 0xCE31, 0xCE33, 0xCE3D, - 0xCE3F, 0xCE40, 0xCE42, 0xCE44, 0xCE4C, 0xCE4E, - 0xCEC0, 0xCEC2, 0xCEC4, 0xCECC, 0xCECE, 0xCED1, - 0xCED3, 0xCEDD, 0xCEDF, 0xCEE0, 0xCEE2, 0xCEE4, - 0xCEEC, 0xCEEE, 0xCEF1, 0xCEF3, 0xCEFD, 0xCEFF, - 0xCF01, 0xCF03, 0xCF0D, 0xCF0F, 0xCF10, 0xCF12, - 0xCF14, 0xCF1C, 0xCF1E, 0xCF21, 0xCF23, 0xCF2D, - 0xCF2F, 0xCF30, 0xCF32, 0xCF34, 0xCF3C, 0xCF3E, - 0xCF41, 0xCF43, 0xCF4D, 0xCF4F, 0xCFC1, 0xCFC3, - 0xCFCD, 0xCFCF, 0xCFD0, 0xCFD2, 0xCFD4, 0xCFDC, - 0xCFDE, 0xCFE1, 0xCFE3, 0xCFED, 0xCFEF, 0xCFF0, - 0xCFF2, 0xCFF4, 0xCFFC, 0xCFFE, 0xD001, 0xD003, - 0xD00D, 0xD00F, 0xD010, 0xD012, 0xD014, 0xD01C, - 0xD01E, 0xD021, 0xD023, 0xD02D, 0xD02F, 0xD030, - 0xD032, 0xD034, 0xD03C, 0xD03E, 0xD041, 0xD043, - 0xD04D, 0xD04F, 0xD0C1, 0xD0C3, 0xD0CD, 0xD0CF, - 0xD0D0, 0xD0D2, 0xD0D4, 0xD0DC, 0xD0DE, 0xD0E1, - 0xD0E3, 0xD0ED, 0xD0EF, 0xD0F0, 0xD0F2, 0xD0F4, - 0xD0FC, 0xD0FE, 0xD100, 0xD102, 0xD104, 0xD10C, - 0xD10E, 0xD111, 0xD113, 0xD11D, 0xD11F, 0xD120, - 0xD122, 0xD124, 0xD12C, 0xD12E, 0xD131, 0xD133, - 0xD13D, 0xD13F, 0xD140, 0xD142, 0xD144, 0xD14C, - 0xD14E, 0xD1C0, 0xD1C2, 0xD1C4, 0xD1CC, 0xD1CE, - 0xD1D1, 0xD1D3, 0xD1DD, 0xD1DF, 0xD1E0, 0xD1E2, - 0xD1E4, 0xD1EC, 0xD1EE, 0xD1F1, 0xD1F3, 0xD1FD, - 0xD1FF, 0xD201, 0xD203, 0xD20D, 0xD20F, 0xD210, - 0xD212, 0xD214, 0xD21C, 0xD21E, 0xD221, 0xD223, - 0xD22D, 0xD22F, 0xD230, 0xD232, 0xD234, 0xD23C, - 0xD23E, 0xD241, 0xD243, 0xD24D, 0xD24F, 0xD2C1, - 0xD2C3, 0xD2CD, 0xD2CF, 0xD2D0, 0xD2D2, 0xD2D4, - 0xD2DC, 0xD2DE, 0xD2E1, 0xD2E3, 0xD2ED, 0xD2EF, - 0xD2F0, 0xD2F2, 0xD2F4, 0xD2FC, 0xD2FE, 0xD300, - 0xD302, 0xD304, 0xD30C, 0xD30E, 0xD311, 0xD313, - 0xD31D, 0xD31F, 0xD320, 0xD322, 0xD324, 0xD32C, - 0xD32E, 0xD331, 0xD333, 0xD33D, 0xD33F, 0xD340, - 0xD342, 0xD344, 0xD34C, 0xD34E, 0xD3C0, 0xD3C2, - 0xD3C4, 0xD3CC, 0xD3CE, 0xD3D1, 0xD3D3, 0xD3DD, - 0xD3DF, 0xD3E0, 0xD3E2, 0xD3E4, 0xD3EC, 0xD3EE, - 0xD3F1, 0xD3F3, 0xD3FD, 0xD3FF, 0xD401, 0xD403, - 0xD40D, 0xD40F, 0xD410, 0xD412, 0xD414, 0xD41C, - 0xD41E, 0xD421, 0xD423, 0xD42D, 0xD42F, 0xD430, - 0xD432, 0xD434, 0xD43C, 0xD43E, 0xD441, 0xD443, - 0xD44D, 0xD44F, 0xD4C1, 0xD4C3, 0xD4CD, 0xD4CF, - 0xD4D0, 0xD4D2, 0xD4D4, 0xD4DC, 0xD4DE, 0xD4E1, - 0xD4E3, 0xD4ED, 0xD4EF, 0xD4F0, 0xD4F2, 0xD4F4, - 0xD4FC, 0xD4FE, 0xDC01, 0xDC03, 0xDC0D, 0xDC0F, - 0xDC10, 0xDC12, 0xDC14, 0xDC1C, 0xDC1E, 0xDC21, - 0xDC23, 0xDC2D, 0xDC2F, 0xDC30, 0xDC32, 0xDC34, - 0xDC3C, 0xDC3E, 0xDC41, 0xDC43, 0xDC4D, 0xDC4F, - 0xDCC1, 0xDCC3, 0xDCCD, 0xDCCF, 0xDCD0, 0xDCD2, - 0xDCD4, 0xDCDC, 0xDCDE, 0xDCE1, 0xDCE3, 0xDCED, - 0xDCEF, 0xDCF0, 0xDCF2, 0xDCF4, 0xDCFC, 0xDCFE, - 0xDD00, 0xDD02, 0xDD04, 0xDD0C, 0xDD0E, 0xDD11, - 0xDD13, 0xDD1D, 0xDD1F, 0xDD20, 0xDD22, 0xDD24, - 0xDD2C, 0xDD2E, 0xDD31, 0xDD33, 0xDD3D, 0xDD3F, - 0xDD40, 0xDD42, 0xDD44, 0xDD4C, 0xDD4E, 0xDDC0, - 0xDDC2, 0xDDC4, 0xDDCC, 0xDDCE, 0xDDD1, 0xDDD3, - 0xDDDD, 0xDDDF, 0xDDE0, 0xDDE2, 0xDDE4, 0xDDEC, - 0xDDEE, 0xDDF1, 0xDDF3, 0xDDFD, 0xDDFF, 0xDE01, - 0xDE03, 0xDE0D, 0xDE0F, 0xDE10, 0xDE12, 0xDE14, - 0xDE1C, 0xDE1E, 0xDE21, 0xDE23, 0xDE2D, 0xDE2F, - 0xDE30, 0xDE32, 0xDE34, 0xDE3C, 0xDE3E, 0xDE41, - 0xDE43, 0xDE4D, 0xDE4F, 0xDEC1, 0xDEC3, 0xDECD, - 0xDECF, 0xDED0, 0xDED2, 0xDED4, 0xDEDC, 0xDEDE, - 0xDEE1, 0xDEE3, 0xDEED, 0xDEEF, 0xDEF0, 0xDEF2, - 0xDEF4, 0xDEFC, 0xDEFE, 0xDF00, 0xDF02, 0xDF04, - 0xDF0C, 0xDF0E, 0xDF11, 0xDF13, 0xDF1D, 0xDF1F, - 0xDF20, 0xDF22, 0xDF24, 0xDF2C, 0xDF2E, 0xDF31, - 0xDF33, 0xDF3D, 0xDF3F, 0xDF40, 0xDF42, 0xDF44, - 0xDF4C, 0xDF4E, 0xDFC0, 0xDFC2, 0xDFC4, 0xDFCC, - 0xDFCE, 0xDFD1, 0xDFD3, 0xDFDD, 0xDFDF, 0xDFE0, - 0xDFE2, 0xDFE4, 0xDFEC, 0xDFEE, 0xDFF1, 0xDFF3, - 0xDFFD, 0xDFFF, 0xE000, 0xE002, 0xE004, 0xE00C, - 0xE00E, 0xE011, 0xE013, 0xE01D, 0xE01F, 0xE020, - 0xE022, 0xE024, 0xE02C, 0xE02E, 0xE031, 0xE033, - 0xE03D, 0xE03F, 0xE040, 0xE042, 0xE044, 0xE04C, - 0xE04E, 0xE0C0, 0xE0C2, 0xE0C4, 0xE0CC, 0xE0CE, - 0xE0D1, 0xE0D3, 0xE0DD, 0xE0DF, 0xE0E0, 0xE0E2, - 0xE0E4, 0xE0EC, 0xE0EE, 0xE0F1, 0xE0F3, 0xE0FD, - 0xE0FF, 0xE101, 0xE103, 0xE10D, 0xE10F, 0xE110, - 0xE112, 0xE114, 0xE11C, 0xE11E, 0xE121, 0xE123, - 0xE12D, 0xE12F, 0xE130, 0xE132, 0xE134, 0xE13C, - 0xE13E, 0xE141, 0xE143, 0xE14D, 0xE14F, 0xE1C1, - 0xE1C3, 0xE1CD, 0xE1CF, 0xE1D0, 0xE1D2, 0xE1D4, - 0xE1DC, 0xE1DE, 0xE1E1, 0xE1E3, 0xE1ED, 0xE1EF, - 0xE1F0, 0xE1F2, 0xE1F4, 0xE1FC, 0xE1FE, 0xE200, - 0xE202, 0xE204, 0xE20C, 0xE20E, 0xE211, 0xE213, - 0xE21D, 0xE21F, 0xE220, 0xE222, 0xE224, 0xE22C, - 0xE22E, 0xE231, 0xE233, 0xE23D, 0xE23F, 0xE240, - 0xE242, 0xE244, 0xE24C, 0xE24E, 0xE2C0, 0xE2C2, - 0xE2C4, 0xE2CC, 0xE2CE, 0xE2D1, 0xE2D3, 0xE2DD, - 0xE2DF, 0xE2E0, 0xE2E2, 0xE2E4, 0xE2EC, 0xE2EE, - 0xE2F1, 0xE2F3, 0xE2FD, 0xE2FF, 0xE301, 0xE303, - 0xE30D, 0xE30F, 0xE310, 0xE312, 0xE314, 0xE31C, - 0xE31E, 0xE321, 0xE323, 0xE32D, 0xE32F, 0xE330, - 0xE332, 0xE334, 0xE33C, 0xE33E, 0xE341, 0xE343, - 0xE34D, 0xE34F, 0xE3C1, 0xE3C3, 0xE3CD, 0xE3CF, - 0xE3D0, 0xE3D2, 0xE3D4, 0xE3DC, 0xE3DE, 0xE3E1, - 0xE3E3, 0xE3ED, 0xE3EF, 0xE3F0, 0xE3F2, 0xE3F4, - 0xE3FC, 0xE3FE, 0xE400, 0xE402, 0xE404, 0xE40C, - 0xE40E, 0xE411, 0xE413, 0xE41D, 0xE41F, 0xE420, - 0xE422, 0xE424, 0xE42C, 0xE42E, 0xE431, 0xE433, - 0xE43D, 0xE43F, 0xE440, 0xE442, 0xE444, 0xE44C, - 0xE44E, 0xE4C0, 0xE4C2, 0xE4C4, 0xE4CC, 0xE4CE, - 0xE4D1, 0xE4D3, 0xE4DD, 0xE4DF, 0xE4E0, 0xE4E2, - 0xE4E4, 0xE4EC, 0xE4EE, 0xE4F1, 0xE4F3, 0xE4FD, - 0xE4FF, 0xEC00, 0xEC02, 0xEC04, 0xEC0C, 0xEC0E, - 0xEC11, 0xEC13, 0xEC1D, 0xEC1F, 0xEC20, 0xEC22, - 0xEC24, 0xEC2C, 0xEC2E, 0xEC31, 0xEC33, 0xEC3D, - 0xEC3F, 0xEC40, 0xEC42, 0xEC44, 0xEC4C, 0xEC4E, - 0xECC0, 0xECC2, 0xECC4, 0xECCC, 0xECCE, 0xECD1, - 0xECD3, 0xECDD, 0xECDF, 0xECE0, 0xECE2, 0xECE4, - 0xECEC, 0xECEE, 0xECF1, 0xECF3, 0xECFD, 0xECFF, - 0xED01, 0xED03, 0xED0D, 0xED0F, 0xED10, 0xED12, - 0xED14, 0xED1C, 0xED1E, 0xED21, 0xED23, 0xED2D, - 0xED2F, 0xED30, 0xED32, 0xED34, 0xED3C, 0xED3E, - 0xED41, 0xED43, 0xED4D, 0xED4F, 0xEDC1, 0xEDC3, - 0xEDCD, 0xEDCF, 0xEDD0, 0xEDD2, 0xEDD4, 0xEDDC, - 0xEDDE, 0xEDE1, 0xEDE3, 0xEDED, 0xEDEF, 0xEDF0, - 0xEDF2, 0xEDF4, 0xEDFC, 0xEDFE, 0xEE00, 0xEE02, - 0xEE04, 0xEE0C, 0xEE0E, 0xEE11, 0xEE13, 0xEE1D, - 0xEE1F, 0xEE20, 0xEE22, 0xEE24, 0xEE2C, 0xEE2E, - 0xEE31, 0xEE33, 0xEE3D, 0xEE3F, 0xEE40, 0xEE42, - 0xEE44, 0xEE4C, 0xEE4E, 0xEEC0, 0xEEC2, 0xEEC4, - 0xEECC, 0xEECE, 0xEED1, 0xEED3, 0xEEDD, 0xEEDF, - 0xEEE0, 0xEEE2, 0xEEE4, 0xEEEC, 0xEEEE, 0xEEF1, - 0xEEF3, 0xEEFD, 0xEEFF, 0xEF01, 0xEF03, 0xEF0D, - 0xEF0F, 0xEF10, 0xEF12, 0xEF14, 0xEF1C, 0xEF1E, - 0xEF21, 0xEF23, 0xEF2D, 0xEF2F, 0xEF30, 0xEF32, - 0xEF34, 0xEF3C, 0xEF3E, 0xEF41, 0xEF43, 0xEF4D, - 0xEF4F, 0xEFC1, 0xEFC3, 0xEFCD, 0xEFCF, 0xEFD0, - 0xEFD2, 0xEFD4, 0xEFDC, 0xEFDE, 0xEFE1, 0xEFE3, - 0xEFED, 0xEFEF, 0xEFF0, 0xEFF2, 0xEFF4, 0xEFFC, - 0xEFFE, 0xF001, 0xF003, 0xF00D, 0xF00F, 0xF010, - 0xF012, 0xF014, 0xF01C, 0xF01E, 0xF021, 0xF023, - 0xF02D, 0xF02F, 0xF030, 0xF032, 0xF034, 0xF03C, - 0xF03E, 0xF041, 0xF043, 0xF04D, 0xF04F, 0xF0C1, - 0xF0C3, 0xF0CD, 0xF0CF, 0xF0D0, 0xF0D2, 0xF0D4, - 0xF0DC, 0xF0DE, 0xF0E1, 0xF0E3, 0xF0ED, 0xF0EF, - 0xF0F0, 0xF0F2, 0xF0F4, 0xF0FC, 0xF0FE, 0xF100, - 0xF102, 0xF104, 0xF10C, 0xF10E, 0xF111, 0xF113, - 0xF11D, 0xF11F, 0xF120, 0xF122, 0xF124, 0xF12C, - 0xF12E, 0xF131, 0xF133, 0xF13D, 0xF13F, 0xF140, - 0xF142, 0xF144, 0xF14C, 0xF14E, 0xF1C0, 0xF1C2, - 0xF1C4, 0xF1CC, 0xF1CE, 0xF1D1, 0xF1D3, 0xF1DD, - 0xF1DF, 0xF1E0, 0xF1E2, 0xF1E4, 0xF1EC, 0xF1EE, - 0xF1F1, 0xF1F3, 0xF1FD, 0xF1FF, 0xF201, 0xF203, - 0xF20D, 0xF20F, 0xF210, 0xF212, 0xF214, 0xF21C, - 0xF21E, 0xF221, 0xF223, 0xF22D, 0xF22F, 0xF230, - 0xF232, 0xF234, 0xF23C, 0xF23E, 0xF241, 0xF243, - 0xF24D, 0xF24F, 0xF2C1, 0xF2C3, 0xF2CD, 0xF2CF, - 0xF2D0, 0xF2D2, 0xF2D4, 0xF2DC, 0xF2DE, 0xF2E1, - 0xF2E3, 0xF2ED, 0xF2EF, 0xF2F0, 0xF2F2, 0xF2F4, - 0xF2FC, 0xF2FE, 0xF300, 0xF302, 0xF304, 0xF30C, - 0xF30E, 0xF311, 0xF313, 0xF31D, 0xF31F, 0xF320, - 0xF322, 0xF324, 0xF32C, 0xF32E, 0xF331, 0xF333, - 0xF33D, 0xF33F, 0xF340, 0xF342, 0xF344, 0xF34C, - 0xF34E, 0xF3C0, 0xF3C2, 0xF3C4, 0xF3CC, 0xF3CE, - 0xF3D1, 0xF3D3, 0xF3DD, 0xF3DF, 0xF3E0, 0xF3E2, - 0xF3E4, 0xF3EC, 0xF3EE, 0xF3F1, 0xF3F3, 0xF3FD, - 0xF3FF, 0xF401, 0xF403, 0xF40D, 0xF40F, 0xF410, - 0xF412, 0xF414, 0xF41C, 0xF41E, 0xF421, 0xF423, - 0xF42D, 0xF42F, 0xF430, 0xF432, 0xF434, 0xF43C, - 0xF43E, 0xF441, 0xF443, 0xF44D, 0xF44F, 0xF4C1, - 0xF4C3, 0xF4CD, 0xF4CF, 0xF4D0, 0xF4D2, 0xF4D4, - 0xF4DC, 0xF4DE, 0xF4E1, 0xF4E3, 0xF4ED, 0xF4EF, - 0xF4F0, 0xF4F2, 0xF4F4, 0xF4FC, 0xF4FE, 0xFC01, - 0xFC03, 0xFC0D, 0xFC0F, 0xFC10, 0xFC12, 0xFC14, - 0xFC1C, 0xFC1E, 0xFC21, 0xFC23, 0xFC2D, 0xFC2F, - 0xFC30, 0xFC32, 0xFC34, 0xFC3C, 0xFC3E, 0xFC41, - 0xFC43, 0xFC4D, 0xFC4F, 0xFCC1, 0xFCC3, 0xFCCD, - 0xFCCF, 0xFCD0, 0xFCD2, 0xFCD4, 0xFCDC, 0xFCDE, - 0xFCE1, 0xFCE3, 0xFCED, 0xFCEF, 0xFCF0, 0xFCF2, - 0xFCF4, 0xFCFC, 0xFCFE, 0xFD00, 0xFD02, 0xFD04, - 0xFD0C, 0xFD0E, 0xFD11, 0xFD13, 0xFD1D, 0xFD1F, - 0xFD20, 0xFD22, 0xFD24, 0xFD2C, 0xFD2E, 0xFD31, - 0xFD33, 0xFD3D, 0xFD3F, 0xFD40, 0xFD42, 0xFD44, - 0xFD4C, 0xFD4E, 0xFDC0, 0xFDC2, 0xFDC4, 0xFDCC, - 0xFDCE, 0xFDD1, 0xFDD3, 0xFDDD, 0xFDDF, 0xFDE0, - 0xFDE2, 0xFDE4, 0xFDEC, 0xFDEE, 0xFDF1, 0xFDF3, - 0xFDFD, 0xFDFF, 0xFE01, 0xFE03, 0xFE0D, 0xFE0F, - 0xFE10, 0xFE12, 0xFE14, 0xFE1C, 0xFE1E, 0xFE21, - 0xFE23, 0xFE2D, 0xFE2F, 0xFE30, 0xFE32, 0xFE34, - 0xFE3C, 0xFE3E, 0xFE41, 0xFE43, 0xFE4D, 0xFE4F, - 0xFEC1, 0xFEC3, 0xFECD, 0xFECF, 0xFED0, 0xFED2, - 0xFED4, 0xFEDC, 0xFEDE, 0xFEE1, 0xFEE3, 0xFEED, - 0xFEEF, 0xFEF0, 0xFEF2, 0xFEF4, 0xFEFC, 0xFEFE, - 0xFF00, 0xFF02, 0xFF04, 0xFF0C, 0xFF0E, 0xFF11, - 0xFF13, 0xFF1D, 0xFF1F, 0xFF20, 0xFF22, 0xFF24, - 0xFF2C, 0xFF2E, 0xFF31, 0xFF33, 0xFF3D, 0xFF3F, - 0xFF40, 0xFF42, 0xFF44, 0xFF4C, 0xFF4E, 0xFFC0, - 0xFFC2, 0xFFC4, 0xFFCC, 0xFFCE, 0xFFD1, 0xFFD3, - 0xFFDD, 0xFFDF, 0xFFE0, 0xFFE2, 0xFFE4, 0xFFEC, - 0xFFEE, 0xFFF1, 0xFFF3, 0xFFFD, 0xFFFF, +static const uint8_t on2avc_cb7_bits[ON2AVC_CB_7_8_CODES] = { + 1, 7, 11, 12, 12, 12, 13, 14, 15, 15, 13, 13, 13, 13, 13, 13, 13, 14, 14, + 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, + 13, 10, 12, 13, 13, 12, 12, 7, 7, 7, 11, 12, 13, 13, 12, 12, 12, 12, 12, + 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 11, 12, 13, 15, 15, 15, 15, 11, + 11, 12, 12, 12, 12, 11, 11, 7, 7, 7, 9, 9, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 13, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 11, 11, + 9, 11, 11, 12, 13, 14, 14, 12, 12, 10, 11, 12, 12, 13, 13, 13, 13, 12, 13, + 13, 11, 12, 12, 11, 12, 13, 14, 14, 11, 12, 12, 11, 11, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 13, 14, 14, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, + 12, 12, 12, 12, 11, 11, 10, 12, 13, 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, + 12, 13, 13, 11, 11, 9, 10, 11, 13, 13, 13, 13, 7, 13, 13, 13, 13, 12, 13, + 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 9, 11, 12, 12, 11, 16, + 17, 17, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, + 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, + 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, 11, 12, 12, 10, 11, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 11, 11, + 9, 12, 13, 14, 14, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 7, 9, 9, 10, 11, + 12, 13, 13, 12, 12, 12, 12, 11, 12, 12, 7, 7, 7, 7, 7, 9, 11, 11, 11, + 13, 13, 13, 13, 10, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, + 12, 7, 9, 11, 12, 12, 11, 12, 13, 15, 16, 17, 17, 15, 15, 10, 11, 12, 12, + 10, 12, 12, 12, 12, 7, 7, 9, 12, 12, 12, 12, 11, 12, 12, 9, 10, 11, 12, + 15, 15, 15, 15, 15, 15, 15, 15, 9, 10, 11, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 9, 9, 7, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 14, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, + 13, 13, 13, 13, 7, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, + 12, 11, 11, 9, 11, 12, 13, 13, 11, 11, 7, 9, 10, 12, 12, 12, 12, 9, 12, + 12, 12, 12, 11, 12, 12, 7, 9, 11, 12, 13, 13, 11, 13, 13, 13, 13, 9, 9, + 7, 9, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, + 11, 11, 11, 12, 12, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 9, 11, 11, 11, 11, 8, 11, 14, 15, + 17, 17, 17, 17, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 14, 14, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 12, 12, 12, 12, 11, 12, 12, 10, 11, 11, 9, 10, 11, 12, 13, 13, 10, + 11, 11, 11, 12, 12, 12, 12, 12, 12, 8, 9, 12, 12, 12, 12, 11, 11, 8, 10, + 11, 12, 13, 13, 10, 11, 11, 8, 10, 11, 11, 10, 13, 13, 13, 13, 13, 13, 13, + 13, 8, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 8, + 10, 11, 11, 10, 11, 12, 13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 6, 8, 11, 11, 11, 11, 10, 12, 12, 12, 12, 8, 12, 12, 12, + 12, 12, 12, 12, 12, 11, 12, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 11, 11, 11, 11, 11, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 10, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 16, 17, + 17, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 12, 12, 11, 12, 12, 10, 11, 11, }; -static const uint16_t on2avc_cb8_codes[ON2AVC_CB7_8_CODES] = { - 0x028C, 0x05E6, 0xFAD9, 0x7DEF, 0x06CE, 0x004C, - 0x0178, 0x0A1D, 0x00AE, 0x046E, 0x03D5, 0x3F58, - 0x0EAA, 0x0233, 0x1A6A, 0x271F, 0x05CE, 0x0179, - 0x02FB, 0x0029, 0x237D, 0x7DF0, 0x03BA, 0xFAD6, - 0xFAD7, 0x7DEE, 0xFAD5, 0x0081, 0x033C, 0x1A69, - 0xFAD8, 0x05A1, 0x01F1, 0x063D, 0x237C, 0x003E, - 0x0323, 0x010C, 0x05A3, 0x05A2, 0x0051, 0x019D, - 0xFADB, 0x0EAB, 0x00AA, 0x003E, 0x01A6, 0x7DF2, - 0x0058, 0x01F1, 0x029B, 0x03C0, 0x122D, 0x0075, - 0x3F5A, 0x0B98, 0x0005, 0x058B, 0x0D68, 0x013F, - 0x00D0, 0x05CF, 0x01C0, 0x03BB, 0x046F, 0xFADA, - 0x01A0, 0x0972, 0x122C, 0x3F59, 0x0766, 0x05A4, - 0x00ED, 0x05A5, 0x0D67, 0x03D0, 0x0046, 0x01FF, - 0x7DF1, 0x00D6, 0x017C, 0x0034, 0x08B5, 0x0234, - 0x237E, 0x0033, 0x0083, 0x0B99, 0x0EAC, 0x0202, - 0x0714, 0x0715, 0x01C3, 0x05A6, 0x0324, 0x13EC, - 0x02F8, 0x7DF3, 0x13EB, 0x0140, 0x0470, 0x04F8, - 0x0007, 0x0377, 0x0208, 0x04A3, 0x13EA, 0x0006, - 0x0188, 0x033D, 0x122E, 0x1A6B, 0x0A1E, 0x0126, - 0x03C1, 0x05E7, 0x05D0, 0x04F7, 0x03DB, 0x033E, - 0x122F, 0x0082, 0x1A6F, 0x2380, 0x05D2, 0x0009, - 0x05A9, 0x1A70, 0x1233, 0x05A7, 0x05A8, 0x0975, - 0x2381, 0x1234, 0x0788, 0x2720, 0x1235, 0x05D3, - 0xFADD, 0x3F5B, 0x0789, 0x0D69, 0xFADE, 0xFADF, - 0x01C4, 0x0EAD, 0x0EA1, 0x1230, 0x0008, 0x13ED, - 0x1A6C, 0xFADC, 0x1231, 0x0973, 0x1232, 0x1A6D, - 0x13EE, 0x1A6E, 0x0974, 0x237F, 0x05D1, 0x033F, - 0x0267, 0x078A, 0xFAE3, 0xFAE2, 0x0B9A, 0x00FC, - 0x0EAE, 0x05D6, 0x0325, 0x0326, 0x0B9B, 0x3F5F, - 0x3F5E, 0x0471, 0x02F9, 0xFAE4, 0x1A72, 0x03C2, - 0x05D7, 0x2721, 0x3F60, 0xFAE5, 0x2382, 0xFAE0, - 0x7DF5, 0xFAE1, 0x7DF4, 0x000A, 0x0235, 0x3F5C, - 0x1A71, 0x0716, 0x036C, 0x0767, 0x05D4, 0x3F5D, - 0x0717, 0x01BF, 0x000B, 0x05D5, 0x0243, 0xFAD0, - 0x04F6, 0x7DE5, 0xFACF, 0x0E9E, 0x0074, 0x271A, - 0x1A61, 0x015B, 0x0046, 0x06CA, 0x237A, 0x7DE6, - 0x0070, 0x1A62, 0x1227, 0x7DE7, 0x0032, 0xFAD1, - 0x05CA, 0x7DE8, 0x237B, 0x13E6, 0x05C8, 0x1226, - 0x2377, 0x2719, 0x3F54, 0x3F55, 0x13E5, 0x2378, - 0x03BF, 0x05C9, 0x01C0, 0x7DE4, 0x7DE3, 0x0A19, - 0x0045, 0x1A60, 0x2379, 0x021B, 0x271C, 0x13E7, - 0x271B, 0x1A67, 0x059D, 0x0EA6, 0x0EA7, 0x0174, - 0x0EA5, 0x0A1A, 0x1FFD, 0x033A, 0x0E9F, 0x3F57, - 0x122B, 0xFAD2, 0x0D64, 0x05CC, 0x06CB, 0x1FFE, - 0x059E, 0x02F7, 0x1228, 0x7DE9, 0x059B, 0x096C, - 0x1A63, 0x1A64, 0x1A65, 0x1229, 0x0EA3, 0x059C, - 0x096D, 0x05CB, 0x003C, 0x1A66, 0x0D63, 0x3F56, - 0x122A, 0x0EA4, 0x0712, 0x0232, 0x13E8, 0x061E, - 0x08B4, 0x016E, 0x0176, 0x033B, 0x0028, 0x05E5, - 0x061F, 0x0000, 0x0376, 0x0071, 0x096F, 0x7DEB, - 0x0001, 0x05CD, 0xFAD3, 0x0186, 0x0EA9, 0x13E9, - 0x06CD, 0x7DEA, 0x0340, 0x271D, 0x0175, 0x01C1, - 0x0D65, 0x1FFF, 0x0B97, 0x0EA8, 0x06CC, 0x0375, - 0x05E4, 0x08B3, 0x05E3, 0x0341, 0x0EA0, 0x096E, - 0x03CF, 0x0056, 0x0970, 0x1A68, 0x029A, 0x010A, - 0x00A8, 0x01CA, 0x7DED, 0x00A5, 0x001E, 0x05A0, - 0x0D66, 0x0047, 0x0971, 0x0A1C, 0x02CE, 0xFAD4, - 0x0004, 0x010F, 0x271E, 0x0415, 0x0212, 0x019F, - 0x7DEC, 0x01C2, 0x0187, 0x059F, 0x0A1B, 0x0527, - 0x0002, 0x003D, 0x0041, 0x0177, 0x0713, 0x010E, - 0x0102, 0x02CF, 0x00CA, 0x0003, 0x01BF, 0x0120, - 0x05DE, 0x0043, 0x01D0, 0x018C, 0x00AB, 0x029F, - 0x03DF, 0x03C5, 0x0247, 0x08BB, 0x0013, 0x03D2, - 0x0015, 0x0EB0, 0x02FA, 0x05E8, 0x0014, 0x0EB1, - 0x0476, 0x1A78, 0x01F4, 0x06D1, 0x017C, 0x0042, - 0x063F, 0x0011, 0x0012, 0x01C7, 0x04FB, 0x1A77, - 0x01AA, 0x04FC, 0x0A21, 0x021D, 0x01EE, 0x02BC, - 0x01C2, 0x021E, 0x00AA, 0x00D6, 0x021F, 0x016F, - 0x0077, 0x01AB, 0x00AC, 0x0073, 0x078D, 0x00AF, - 0x002E, 0x0220, 0x0086, 0x0103, 0x0086, 0x0127, - 0x0BA0, 0x05DF, 0x0EA5, 0x03D3, 0x05E0, 0x017D, - 0xFAE7, 0x015A, 0x03C6, 0x0768, 0xFAE6, 0x3F65, - 0x01F3, 0x0B9F, 0x0016, 0x0EA4, 0x078C, 0x02BD, - 0x004D, 0x0116, 0x037A, 0x0076, 0x0056, 0x058E, - 0x06D2, 0x0014, 0x009F, 0x0A23, 0x0346, 0x014E, - 0x02BF, 0x00A7, 0x0528, 0x0378, 0x0106, 0x01C3, - 0x017E, 0x0044, 0x03C7, 0x097F, 0x04A5, 0x020B, - 0x05E9, 0x0A24, 0x03D9, 0x0661, 0x0660, 0x014F, - 0x02BE, 0x023B, 0x04FD, 0x0313, 0x0017, 0x08BC, - 0x0769, 0x0622, 0x0D6C, 0x03D7, 0x01C8, 0x0A22, - 0x01AB, 0x0203, 0x076A, 0x03D8, 0x02D1, 0x00A6, - 0x05E3, 0x1A79, 0x1A7A, 0x0981, 0x05B1, 0x04FF, - 0x0982, 0x0348, 0x0128, 0x08BD, 0x0D6D, 0x13F4, - 0x05B2, 0x0624, 0x05B3, 0x0EB2, 0x2729, 0x1237, - 0x05B4, 0x0129, 0x0349, 0x2386, 0x0019, 0x04FE, - 0x05B0, 0xFAE8, 0x3F66, 0x0623, 0x05E1, 0x05E2, - 0x3F67, 0x0980, 0x0347, 0x0BA1, 0x0046, 0x0045, - 0x0EA6, 0x01C9, 0x0018, 0x13F3, 0x078E, 0x0152, - 0x0983, 0x1238, 0x272B, 0x01F2, 0x028F, 0x05E5, - 0x3F69, 0x0418, 0x02FC, 0x017F, 0x0EB3, 0x00EF, - 0x0790, 0x0791, 0x1239, 0x05E6, 0x05E7, 0x1A7C, - 0x034A, 0x001A, 0x0984, 0x05B5, 0x272A, 0x1A7B, - 0x0EA7, 0x0529, 0x02FB, 0x2387, 0x3F68, 0x078F, - 0x006D, 0x0D6E, 0x05B6, 0x039F, 0x014E, 0x058F, - 0x13F5, 0x05E4, 0x020C, 0x0342, 0x1A73, 0x7DF7, - 0x2724, 0x0082, 0x0209, 0x1A74, 0x05DB, 0x03D6, - 0x001F, 0x0B9C, 0x04F9, 0x0096, 0x03C3, 0x0620, - 0x7DF9, 0x7DF8, 0x0EA2, 0x000C, 0x2725, 0x3F61, - 0x0977, 0x0976, 0x2723, 0x05D8, 0x2722, 0x058C, - 0x08B6, 0x05D9, 0x2383, 0x0236, 0x036D, 0x0A1F, - 0x05AA, 0x019C, 0x01C0, 0x0327, 0x05DA, 0x7DF6, - 0x02CF, 0x05DD, 0x0341, 0x05AE, 0x0EAF, 0x2384, - 0x0342, 0x13F0, 0x000D, 0x08B7, 0x000E, 0x003F, - 0x097B, 0x0343, 0x0D6A, 0x1A75, 0x000F, 0x3F63, - 0x05AF, 0x06CF, 0x06D0, 0x2385, 0x13F1, 0x058D, - 0x0237, 0x05AB, 0x7DFA, 0x0EA3, 0x03C4, 0x13EF, - 0x05DC, 0x2726, 0x1236, 0x017A, 0x0978, 0x05AD, - 0x05AC, 0x0340, 0x0238, 0x097A, 0x3F62, 0x0979, - 0x03DE, 0x0010, 0x0345, 0x002A, 0x03D1, 0x01A7, - 0x01F2, 0x009E, 0x020A, 0x0189, 0x0D6B, 0x03C6, - 0x00EE, 0x0A20, 0x017B, 0x04FA, 0x0472, 0x0040, - 0x00CB, 0x08B9, 0x02D0, 0x029E, 0x0020, 0x0344, - 0x0239, 0x02D0, 0x0B9D, 0x023A, 0x0B9E, 0x028D, - 0x03C5, 0x03BE, 0x08B8, 0x078B, 0x0337, 0x0246, - 0x004C, 0x0416, 0x0141, 0x04A4, 0x00E2, 0x0213, - 0x028E, 0x01A7, 0x021C, 0x00D4, 0x01C6, 0x0072, - 0x0067, 0x002B, 0x0473, 0x036F, 0x01E0, 0x036E, - 0x0041, 0x3F64, 0x097E, 0x0621, 0x02BB, 0x00D7, - 0x2728, 0x2727, 0x01C1, 0x0129, 0x0417, 0x13F2, - 0x097C, 0x0142, 0x097D, 0x1A76, 0x08BA, 0x063E, - 0x0100, 0x01AA, 0x018A, 0x00EA, 0x014D, 0x001E, - 0x01C5, 0x03C7, 0x0053, 0x05EC, 0x012D, 0x004C, - 0x0D71, 0x01D0, 0x0023, 0x0D72, 0x0185, 0x02D2, - 0x0719, 0x012F, 0x0502, 0x012E, 0x0A28, 0x098E, - 0x238B, 0x272D, 0x05EE, 0x05BE, 0x0130, 0xFAEE, - 0x272E, 0x0BA2, 0x05EB, 0x01CF, 0xFAED, 0x238A, - 0x01CE, 0x098C, 0x7DFD, 0x05BD, 0x004A, 0x0036, - 0x0037, 0x0628, 0x02FD, 0x048A, 0x017E, 0x004B, - 0x098D, 0x0153, 0x0216, 0x0D73, 0x1A82, 0x0042, - 0x017F, 0x026C, 0x020D, 0x0794, 0x0143, 0x007E, - 0x062A, 0x0798, 0x004F, 0x0EBA, 0x0BA4, 0x023E, - 0x05BF, 0x0EB9, 0x0592, 0x03CC, 0x004E, 0x018E, - 0x032C, 0x0629, 0x0BA3, 0x01F7, 0x0EB8, 0x004D, - 0x0990, 0x0350, 0x098F, 0x0343, 0x0023, 0x052B, - 0x004E, 0x0178, 0x04A6, 0x0291, 0x05ED, 0x00DC, - 0x032D, 0x0504, 0x0991, 0x0A29, 0x0593, 0x01F3, - 0x0A2A, 0x0505, 0x015B, 0x0666, 0x0087, 0x03DA, - 0x0BA5, 0x076D, 0x05C1, 0x03CD, 0x0024, 0x0992, - 0x04A7, 0x0131, 0x05C2, 0x272F, 0x01D1, 0x076B, - 0x076C, 0x1242, 0x05EF, 0x062B, 0x0EAE, 0x13FD, - 0x05C0, 0x0EBB, 0x023F, 0x0D74, 0x0503, 0x02FE, - 0x041A, 0x037B, 0x08BE, 0x0240, 0x0316, 0x0EBD, - 0x3F70, 0x0EBC, 0x0A2B, 0x0BA7, 0x0053, 0x05C5, - 0x13FE, 0x0506, 0x03CE, 0x0026, 0x0994, 0x0038, - 0x0027, 0x0132, 0x020E, 0x2731, 0x0EBE, 0x0796, - 0x018F, 0x05C6, 0x02FF, 0x0795, 0x1A83, 0x3F6E, - 0x0BA6, 0x0025, 0x1243, 0x3F6F, 0x004F, 0x2730, - 0x062C, 0x0993, 0x05C3, 0x05C4, 0x0051, 0x0052, - 0x0351, 0x062D, 0x0050, 0x01F6, 0x08BF, 0x3F71, - 0x238E, 0x05C7, 0x01F7, 0x05C8, 0x062E, 0x012A, - 0x032F, 0x0077, 0x1A86, 0x0EBF, 0x03DB, 0x04AA, - 0x0BA8, 0x13FF, 0x062F, 0xFAF2, 0x071A, 0x0054, - 0xFAF1, 0x2732, 0xFAF0, 0x238C, 0x238D, 0xFAEF, - 0x1A84, 0x0392, 0x1244, 0x0995, 0x0799, 0x007F, - 0x032E, 0x7DFE, 0x1A85, 0x05EE, 0x018A, 0x0996, - 0x0028, 0x0152, 0x025A, 0x0A25, 0x7DFC, 0x3F6B, - 0x023C, 0x018B, 0x05B7, 0x0180, 0x00FD, 0x01BA, - 0x05EA, 0x123D, 0x05E8, 0x002F, 0x0625, 0x05B9, - 0x05B8, 0x0477, 0x13F7, 0x0D6F, 0x3F6C, 0xFAEA, - 0x01CB, 0xFAE9, 0x0985, 0x2388, 0x7DFB, 0x034B, - 0x01CA, 0x0047, 0x123A, 0x3F6A, 0x017D, 0x0662, - 0x123C, 0x123B, 0x0379, 0x024A, 0x13F6, 0x1A7D, - 0x016A, 0x0EAA, 0x123F, 0xFAEC, 0x0EA9, 0x13FB, - 0x0182, 0x0792, 0x05BA, 0x0181, 0x0D70, 0x001F, - 0x001E, 0x05BB, 0x3F6D, 0x0020, 0x2389, 0x1240, - 0x0183, 0x0501, 0x1A7F, 0x06D6, 0x0663, 0x06D3, - 0x13F8, 0x034C, 0x0EB4, 0x123E, 0x1A7E, 0x13F9, - 0x001B, 0x05E9, 0x0EA8, 0x001C, 0xFAEB, 0x05EA, - 0x034D, 0x0500, 0x13FA, 0x001D, 0x0048, 0x0794, - 0x0075, 0x0795, 0x0793, 0x0074, 0x008A, 0x03C9, - 0x05EB, 0x0087, 0x0076, 0x012B, 0x012C, 0x037A, - 0x0718, 0x0022, 0x272C, 0x0988, 0x0EB5, 0x0328, - 0x03CA, 0x05EC, 0x0EAB, 0x06D7, 0x0021, 0x0664, - 0x1A80, 0x0986, 0x0419, 0x03C8, 0x034E, 0x0987, - 0x0626, 0x02FC, 0x00AE, 0x01CC, 0x023D, 0x012A, - 0x0021, 0x0A26, 0x05BC, 0x01F6, 0x0221, 0x0049, - 0x0EB6, 0x0042, 0x02D2, 0x00F2, 0x00AF, 0x0290, - 0x0043, 0x052A, 0x13FC, 0x0A27, 0x032A, 0x1241, - 0x0EB7, 0x0EAD, 0x034F, 0x0EAC, 0x0022, 0x05ED, - 0x0797, 0x032B, 0x0035, 0x0989, 0x0184, 0x037B, - 0x098A, 0x1A81, 0x098B, 0x0796, 0x01CD, 0x025B, - 0x03CB, 0x0627, 0x02DA, 0x010C, 0x02D1, 0x06EA, - 0x0665, 0x0329, 0x0D78, 0x7E05, 0x7E04, 0x140A, - 0x0EB3, 0x0ECF, 0x3F7C, 0x1256, 0x05FB, 0x05CF, - 0xFAFF, 0x3F7D, 0x0ED0, 0x7E06, 0x3F7E, 0x3F7F, - 0xFB00, 0x239B, 0x0ED2, 0x1257, 0x7E07, 0x0ED1, - 0x002D, 0x1255, 0x273A, 0x09A4, 0x239A, 0x0ECD, - 0x273B, 0x1A8C, 0x002E, 0x09A5, 0xFAFE, 0x273C, - 0x0BAF, 0x0BB0, 0x05CE, 0x09A6, 0x00D1, 0x0ECE, - 0x09A8, 0x0030, 0x1A8E, 0x0ED3, 0x09A7, 0x0667, - 0x1258, 0x2740, 0x0D79, 0x3F80, 0x0189, 0x09A9, - 0x0EB5, 0x0359, 0x0ED4, 0x125A, 0x239D, 0x1259, - 0x05D1, 0x0D7A, 0x7E0A, 0x7E09, 0x09AA, 0x273D, - 0x0EB4, 0x273E, 0x002F, 0x0354, 0x05FC, 0x239C, - 0x1A8D, 0x0355, 0x0357, 0x05D0, 0x0358, 0x0356, - 0x01D2, 0x0508, 0x7E08, 0x273F, 0x0302, 0x0ED7, - 0x239E, 0x3F84, 0x08C4, 0x01D3, 0x0BB1, 0x0509, - 0x239F, 0x0303, 0x0133, 0x035C, 0x125B, 0x03D1, - 0x0ED8, 0x035D, 0x035E, 0x2743, 0x2744, 0x09AD, - 0x018A, 0x0031, 0x09AC, 0x3F82, 0x2741, 0x3F81, - 0x035A, 0x3F83, 0x05FD, 0x09AB, 0x0ED5, 0x0ED6, - 0x0633, 0x2742, 0x0055, 0x08C3, 0x0636, 0x035B, - 0x05FE, 0x0D7B, 0x0039, 0xFB05, 0x7E0B, 0x7E0C, - 0x140D, 0x018B, 0x09AF, 0x2746, 0x0032, 0x0056, - 0x09B0, 0x03D2, 0x0A30, 0x2747, 0x0057, 0x0EDA, - 0x050A, 0x125E, 0x0033, 0x2748, 0x0D7C, 0x03D3, - 0x3F85, 0x0034, 0xFB01, 0x140B, 0xFB02, 0x05FF, - 0x125C, 0xFB03, 0x125D, 0x1A8F, 0x0600, 0x05D2, - 0x0602, 0x2745, 0x0601, 0x0ED9, 0x1A90, 0xFB04, - 0x140C, 0x09AE, 0x033A, 0x7E0F, 0x23A2, 0x0A31, - 0x0EB6, 0x0058, 0x3F8A, 0x23A3, 0x01D6, 0x04AB, - 0x0059, 0x0EDB, 0x02D3, 0x018C, 0x04C6, 0x1260, - 0x3F8B, 0x125F, 0x1261, 0x071E, 0x7E10, 0x2749, - 0x140E, 0x3F87, 0x3F86, 0x0035, 0x3F88, 0x3F89, - 0x7E0D, 0x23A0, 0x1A91, 0x0797, 0x0603, 0x1A92, - 0x050B, 0x066A, 0x0306, 0x7E0E, 0x23A1, 0x079B, - 0x0BAA, 0x3F73, 0x7E01, 0x0292, 0x0216, 0x0998, - 0x1247, 0x2390, 0x0301, 0x0999, 0x1400, 0x1A87, - 0x041E, 0x1401, 0x0EC1, 0x2391, 0x3F74, 0x0A2C, - 0x1248, 0x3F75, 0x05C9, 0x0EC2, 0x2733, 0x238F, - 0xFAF3, 0xFAF4, 0x0EC0, 0x0997, 0x3F72, 0xFAF5, - 0x1245, 0x08C0, 0x0BA9, 0x1246, 0x020F, 0x041B, - 0x0186, 0x7E00, 0x7DFF, 0x0300, 0xFAFA, 0x2734, - 0x05F2, 0x124D, 0x2395, 0x099A, 0x2735, 0x3F77, - 0x0EC4, 0x0EC5, 0x1403, 0x0EC6, 0x1402, 0x1A89, - 0x3F78, 0x05F5, 0x05F3, 0x05F4, 0x2736, 0x1404, - 0x7E02, 0x124E, 0x0D75, 0x0029, 0x2392, 0xFAF7, - 0xFAF6, 0x0EC3, 0x1249, 0x2394, 0x2393, 0x05F0, - 0xFAF8, 0x124B, 0x124C, 0x124A, 0x3F76, 0x05CA, - 0x05F1, 0xFAF9, 0x1A88, 0x0187, 0x05F7, 0x124F, - 0x0631, 0x0D76, 0x0EAF, 0x2737, 0x0BAC, 0x099D, - 0x0A2D, 0x1250, 0x1407, 0x0BAD, 0x3F7A, 0x2396, - 0x2397, 0x0353, 0x1A8B, 0x08C2, 0x05CD, 0x099E, - 0x05CC, 0x0352, 0x002A, 0x05CB, 0x03CF, 0x1A8A, - 0x1405, 0x1406, 0x099B, 0x0EC7, 0x0630, 0x002B, - 0x3F79, 0x08C1, 0x0BAB, 0x0507, 0x05F6, 0x0EC8, - 0x099C, 0x0EB0, 0x0A2F, 0x0EB1, 0x2739, 0x09A1, - 0x03D0, 0x1252, 0x7E03, 0x0241, 0x0188, 0x0EB2, - 0x0BAE, 0x05FA, 0x09A2, 0x1254, 0x2398, 0xFAFB, - 0x1253, 0x2399, 0x0ECC, 0xFAFD, 0xFAFC, 0x09A3, - 0x1408, 0x09A0, 0x05F8, 0x3F7B, 0x099F, 0x0D77, - 0x1409, 0x002C, 0x0EC9, 0x0ECB, 0x0A2E, 0x1251, - 0x0ECA, 0x079A, 0x071B, 0x05F9, 0x2738, 0x0632, - 0x002E, 0x0012, 0x7E25, 0xFB1C, 0x0262, 0x001C, - 0x03D6, 0x018E, 0x007C, 0x0342, 0x052E, 0x7E26, - 0xFB1D, 0x01D7, 0x0D7F, 0x126A, 0x2756, 0x09B6, - 0xFB20, 0x3F97, 0xFB21, 0xFB1E, 0xFB1F, 0x23AF, - 0xFB19, 0xFB1A, 0x23AE, 0x7E24, 0x1A95, 0x2755, - 0x2754, 0x05D7, 0x050D, 0x0EE3, 0xFB1B, 0x0EE2, - 0x0BB5, 0x00E3, 0x08CB, 0x05D8, 0x01B9, 0x00E7, - 0x1412, 0x1A96, 0x015A, 0x009A, 0x007B, 0xFB24, - 0x3F99, 0x026D, 0x0026, 0x0EE5, 0x0EE4, 0x0222, - 0x05D9, 0x0D82, 0x7E28, 0x3F9A, 0x0A36, 0xFB25, - 0xFB26, 0x23B1, 0x7E29, 0x126B, 0x7E27, 0x23B0, - 0xFB22, 0x1411, 0x0BB6, 0x3F98, 0x126C, 0x09B7, - 0x02C2, 0x0442, 0x0A33, 0x012B, 0x01C1, 0x0034, - 0xFB23, 0x126D, 0x03DF, 0x0084, 0x0EB7, 0x23B2, - 0x7E2A, 0x052F, 0x018D, 0x0B16, 0x7E2B, 0x01A2, - 0x0736, 0x00F3, 0x060F, 0x003B, 0x003B, 0x081A, - 0x003F, 0x1416, 0x003E, 0x3F9D, 0x126E, 0x7E2E, - 0x7E2C, 0x7E2D, 0x2757, 0x060E, 0xFB28, 0xFB27, - 0x3F9B, 0x050E, 0x0EE6, 0x018F, 0x05DA, 0x0136, - 0x071F, 0xFB29, 0x1413, 0x0137, 0x3F9C, 0x0EE7, - 0x05DB, 0x02DB, 0x05EF, 0x23B5, 0x0EBB, 0x0243, - 0xFB2D, 0x0307, 0xFB2E, 0x275A, 0x0293, 0x041F, - 0x0686, 0x3F9E, 0x0217, 0x0612, 0x05FA, 0x23B6, - 0x7E2F, 0x1A97, 0x275B, 0x0613, 0xFB2F, 0x7E30, - 0xFB2A, 0x23B4, 0x126F, 0x23B3, 0x1270, 0x2758, - 0xFB2B, 0x0610, 0x0BB7, 0x03D7, 0x2759, 0x0916, - 0x050F, 0x0EBA, 0x0BF6, 0xFB2C, 0x0611, 0x00D3, - 0x2C5E, 0x7E36, 0xFB34, 0xFB33, 0x3FA2, 0xFB35, - 0x2FDE, 0x1417, 0x0A37, 0x3FA3, 0x02A2, 0x7E37, - 0xFB36, 0x005E, 0x058A, 0x076F, 0x0886, 0x005F, - 0xFB3B, 0x0686, 0x0342, 0xFB37, 0xFB3A, 0x3F9F, - 0x3FA0, 0xFB31, 0xFB30, 0x23B7, 0x3FA1, 0x23BB, - 0x23BA, 0x1271, 0x0D83, 0x1036, 0x7E32, 0x1272, - 0x7E31, 0x7E33, 0x162E, 0x1273, 0xFB32, 0xFB0C, - 0x1262, 0xFB0D, 0xFB0B, 0x3F8F, 0x0037, 0x1263, - 0x3F90, 0x0EDD, 0x0038, 0x05D3, 0xFB0E, 0x23A7, - 0x0606, 0x1265, 0x3F91, 0x1264, 0x0039, 0xFB0F, - 0x7E14, 0xFB10, 0x274A, 0x274B, 0xFB07, 0xFB08, - 0x23A5, 0xFB06, 0x23A4, 0x0EDC, 0xFB0A, 0xFB09, - 0x7E11, 0x0036, 0x0605, 0x3F8C, 0x7E12, 0x0604, - 0x3F8E, 0x23A6, 0x7E13, 0x3F8D, 0x03DE, 0x7E19, - 0x7E18, 0x0242, 0x0097, 0x08C5, 0xFB13, 0x7E1A, - 0x005A, 0x079B, 0x0607, 0x09B2, 0x033B, 0x05D4, - 0x09B3, 0xFB14, 0x23A8, 0x0637, 0x7E1B, 0x23AA, - 0x23A9, 0x0608, 0x274C, 0xFB12, 0xFB11, 0x7E15, - 0x1266, 0x140F, 0x1267, 0x7E16, 0x274D, 0x079E, - 0x274E, 0x0EDE, 0x066B, 0x09B1, 0x0D7D, 0x3F92, - 0x7E17, 0x079A, 0x002A, 0x00D2, 0x23AC, 0x23AB, - 0x02F2, 0x00B6, 0x0BB2, 0x05D5, 0x0066, 0x03A2, - 0x003A, 0x060B, 0x060A, 0x0317, 0x079F, 0x0362, - 0x2750, 0x050C, 0x3F95, 0x7E1D, 0x7E1E, 0xFB15, - 0x23AD, 0x274F, 0x3F93, 0x3F94, 0x7E1C, 0x0609, - 0x08C6, 0x0EE0, 0x0EDF, 0x035F, 0x0136, 0x076E, - 0x1A93, 0x1268, 0x0A32, 0x024B, 0x08C7, 0x1410, - 0x01EC, 0x0036, 0x0EE1, 0x0363, 0x0072, 0x0030, - 0x003E, 0x2753, 0x7E21, 0x00D7, 0x0117, 0x003A, - 0x0BB4, 0x0126, 0x018D, 0x05D6, 0x7E22, 0xFB16, - 0x0D7E, 0x060D, 0xFB18, 0xFB17, 0x7E23, 0x7E1F, - 0x2752, 0x1269, 0x2751, 0x09B4, 0x08CA, 0x1A94, - 0x3F96, 0x0BB3, 0x0107, 0x09B5, 0x005B, 0x03D6, - 0x00B0, 0x0101, 0x7E20, 0x060C, 0x03D7, 0x0032, - 0x04DE, 0xFA91, 0x7DA8, 0x088E, 0x0374, 0x7DA9, - 0x054E, 0x007A, 0x0223, 0x0152, 0x3F26, 0x7DAA, - 0x0610, 0x1A36, 0x13B3, 0x0E58, 0x1A35, 0x7DAD, - 0x3F27, 0x7DAE, 0x7DAB, 0x7DAC, 0xFA8D, 0x2347, - 0xFA8E, 0xFA8C, 0x7DA6, 0x3F24, 0x2348, 0x7DA7, - 0x0E4F, 0x02C8, 0x0376, 0xFA90, 0xFA8F, 0x0116, - 0x008A, 0x059A, 0x3F25, 0x0044, 0x00AC, 0x1A37, - 0x0153, 0x0066, 0x01DE, 0x049C, 0xFA96, 0x3F28, - 0x0370, 0x00EA, 0x054F, 0x3F29, 0x006B, 0x093C, - 0x0570, 0x11E2, 0x26E0, 0x1A38, 0x26E1, 0x234A, - 0x7DB1, 0x093D, 0x1FD7, 0x2349, 0x7DAF, 0x7DB0, - 0x0310, 0x0775, 0xFA93, 0xFA92, 0x13B4, 0x009A, - 0x0022, 0x093B, 0x020E, 0x002A, 0x003C, 0xFA95, - 0xFA94, 0x033C, 0x00A8, 0x00C9, 0x26E3, 0xFA99, - 0x051D, 0x00FA, 0x0154, 0x093E, 0x00DE, 0x0371, - 0x002E, 0xFA9A, 0x11E3, 0x0377, 0x0776, 0x7DB2, - 0x11E4, 0x11E5, 0x7DB3, 0x3F2B, 0xFA9B, 0x234E, - 0x11E6, 0x26E2, 0x059B, 0xFA98, 0xFA97, 0x234B, - 0x0A0D, 0x059C, 0x234C, 0x0571, 0x006C, 0x075C, - 0x234D, 0x3F2A, 0x06C2, 0x00FE, 0x0311, 0x059D, - 0x010A, 0x031C, 0x059E, 0x11E8, 0x0587, 0x2352, - 0x0312, 0x7DB6, 0xFA9E, 0x04DF, 0x1FD8, 0x11E9, - 0x093F, 0x0A0E, 0x0E5A, 0x11EA, 0x2353, 0x1FD9, - 0x0573, 0x11EB, 0x7DB7, 0xFA9F, 0x0E5B, 0xFA9C, - 0xFA9D, 0x7DB4, 0x234F, 0x0E59, 0x0572, 0x2351, - 0x2350, 0x11E7, 0x049D, 0x3F2D, 0x3F2C, 0x0023, - 0x010D, 0x088F, 0x7DB5, 0x26E4, 0x0611, 0xFAA4, - 0x1A39, 0xFAA5, 0xFAA3, 0x26E7, 0xFAA6, 0x3F2F, - 0x2356, 0x2357, 0x0940, 0x13B8, 0xFAA7, 0x7DBC, - 0x1FDA, 0x2358, 0xFAA8, 0x3F30, 0x26E8, 0xFAA9, - 0xFAAA, 0xFAAB, 0x2359, 0x7DBD, 0x7DB9, 0x2354, - 0x11EC, 0xFAA0, 0x7DB8, 0x13B5, 0x11ED, 0x2355, - 0x7DBA, 0x13B6, 0x13B7, 0x7DBB, 0xFAA1, 0x26E5, - 0x0612, 0x3F2E, 0x26E6, 0xFAA2, 0x7D9E, 0x0590, - 0x7D9F, 0xBF7D, 0x0D0F, 0x13AF, 0x0591, 0x1A1C, - 0x1FD3, 0x17EE, 0x0592, 0x3F1A, 0xBF7E, 0x11DC, - 0x0593, 0x206F, 0x7DA0, 0x3F1C, 0xBF7F, 0x1A1E, - 0x3F1D, 0x1A1D, 0x245C, 0x110E, 0x110F, 0x58BE, - 0x0220, 0x0150, 0x1FD2, 0x7D9C, 0x04DC, 0x05E6, - 0x0D0E, 0x001E, 0xBF7C, 0x58BF, 0x0B80, 0x054C, - 0x13AE, 0x206E, 0x02A3, 0x051C, 0x1A30, 0x245F, - 0x0466, 0x7DA1, 0x030A, 0x3F1F, 0xFA82, 0x088C, - 0x05E7, 0x04DD, 0x13B0, 0x0790, 0x1A31, 0x1FD4, - 0x13B1, 0x7DA2, 0x2638, 0x1A32, 0x2341, 0x2340, - 0x2639, 0x3F1E, 0xFA80, 0x0594, 0x11DE, 0x11DF, - 0x0596, 0x1A1F, 0x0595, 0x02C4, 0x051A, 0x0E4D, - 0x0E4C, 0x040C, 0x245E, 0x0464, 0xFA81, 0x245D, - 0x0222, 0x0074, 0x031A, 0x3F21, 0x263B, 0x06EB, - 0x0254, 0x0774, 0x0020, 0x0078, 0x0410, 0x02EE, - 0x13B2, 0xFA84, 0x06C0, 0x0A0A, 0x0E4E, 0x0597, - 0xFA85, 0xFA87, 0x0598, 0x11E0, 0xFA86, 0x263C, - 0x1FD5, 0x2343, 0xFA83, 0x3F20, 0x2342, 0x030B, - 0x263A, 0x0B81, 0x0586, 0x040E, 0x040F, 0x2345, - 0x2344, 0x02C6, 0x0130, 0x030C, 0x054D, 0x01BE, - 0x0132, 0x0599, 0x3F23, 0x00FA, 0x012E, 0x03CE, - 0xFA8B, 0x263E, 0x02C7, 0x006A, 0x093A, 0x0E6E, - 0x0182, 0x0021, 0x00C8, 0x1A33, 0x7DA5, 0x0E6F, - 0x1FD6, 0x1A34, 0x2346, 0x263F, 0x3F22, 0x7DA4, - 0xFA88, 0x7DA3, 0x030D, 0x0A0C, 0xFA89, 0x11E1, - 0x088D, 0x0256, 0x030F, 0x030E, 0x02F8, 0x0060, - 0x02B8, 0xFA8A, 0x263D, 0x0257, 0x13BE, 0x7DCD, - 0xFAB4, 0x0E83, 0x13BF, 0x015B, 0x26F8, 0x26F7, - 0x0B89, 0x0947, 0x3F39, 0x11F9, 0x13C0, 0x26F9, - 0x05AF, 0x11FC, 0x11FA, 0x11FB, 0x0E84, 0x11FE, - 0xFAB5, 0x11FD, 0x26F5, 0xFAB2, 0x235F, 0x05AC, - 0x26F6, 0x05AD, 0x7DCB, 0x7DCA, 0x2360, 0x0946, - 0x7DCC, 0xFAB3, 0x057A, 0x0318, 0x11F8, 0x05AE, - 0x2361, 0x0B88, 0x26FB, 0x1203, 0x1204, 0x0E85, - 0x0E86, 0x0D4F, 0x0E87, 0x0948, 0x0A10, 0x1FE2, - 0x057C, 0x1A3F, 0x0D50, 0x015D, 0x057D, 0x1205, - 0x1A40, 0x13C2, 0x26FC, 0x26FD, 0x1206, 0x3F3A, - 0x1A41, 0x1FE1, 0x0E8E, 0x26FA, 0xFAB6, 0x11FF, - 0x1201, 0x7DCE, 0x1200, 0x05B0, 0x13C1, 0x089E, - 0x0319, 0x015C, 0x057B, 0x070A, 0x1A3E, 0x1202, - 0x011D, 0x031A, 0x7DCF, 0x1209, 0x0E90, 0x015F, - 0x002B, 0x05B1, 0x0D54, 0x04E5, 0x0160, 0x05B2, - 0x13C4, 0x0E88, 0x1FE5, 0x1FE6, 0x2362, 0x3F3B, - 0x13C5, 0x26FF, 0x0161, 0x057E, 0x0779, 0x0D51, - 0x13C3, 0x1A42, 0x04E4, 0x1208, 0x1A44, 0x1FE3, - 0x1207, 0x1A43, 0x0225, 0x26FE, 0x1FE4, 0x015E, - 0x0D53, 0x002A, 0x0E8F, 0x0D52, 0x0778, 0x2701, - 0x2363, 0x3F3E, 0x1FE8, 0xFAB8, 0x13C9, 0x2365, - 0x2364, 0x031B, 0x120A, 0x0E8B, 0x05B8, 0x0E8A, - 0x13CA, 0x3F3F, 0x2702, 0x1FE9, 0x120B, 0x7DD0, - 0x094A, 0x2366, 0xFAB9, 0x13CB, 0x1A45, 0x13C7, - 0x05B3, 0xFAB7, 0x13C6, 0x3F3D, 0x05B4, 0x3F3C, - 0x1FE7, 0x05B5, 0x13C8, 0x0E89, 0x1A46, 0x1A47, - 0x05B6, 0x05B7, 0x2700, 0x0949, 0x0122, 0x05B9, - 0x2704, 0x031D, 0x0469, 0x094C, 0xFABA, 0x120F, - 0x1A48, 0x0638, 0x1210, 0x13CC, 0x01B3, 0x3F42, - 0x1A49, 0xFABB, 0x3F41, 0x0E8C, 0x1A4A, 0x2367, - 0x3F43, 0x094D, 0x2703, 0x094B, 0x7DD1, 0x3F40, - 0x031C, 0x0226, 0x1FEA, 0x7DD2, 0x120C, 0x03DA, - 0x0B8A, 0x120D, 0x002C, 0x03CC, 0x04E6, 0x7DD3, - 0x120E, 0x089F, 0x04E2, 0x059F, 0xFAAD, 0x0117, - 0x0137, 0x0613, 0x235C, 0x3F31, 0x0899, 0x02EF, - 0x0025, 0x0942, 0x0468, 0x0E8C, 0x0A0F, 0x13BA, - 0x7DBE, 0x13B9, 0x05A0, 0x7DC0, 0x26EB, 0x7DBF, - 0x235A, 0x235B, 0x0372, 0x0313, 0x0941, 0x0898, - 0x26E9, 0x0574, 0x02C9, 0x051E, 0x0024, 0x1FDB, - 0x0467, 0x0791, 0x04E1, 0x26EA, 0xFAAC, 0x04E0, - 0x3F34, 0x0E5D, 0x26ED, 0xFAAE, 0x1FDC, 0x0575, - 0x0314, 0x7DC4, 0x1FDD, 0x1FDE, 0x05A1, 0x0E5E, - 0x26EE, 0x26EF, 0x7DC5, 0x11EE, 0xFAAF, 0x3F35, - 0x11EF, 0x26F0, 0x7DC6, 0xFAB0, 0x05A2, 0x7DC1, - 0x0E5C, 0x7DC2, 0x00CA, 0x01B0, 0x235D, 0x3F32, - 0x075E, 0x0B82, 0x0155, 0x0156, 0x3F33, 0x26EC, - 0x0708, 0x0B83, 0x1A3B, 0x7DC3, 0x1A3A, 0x089B, - 0x11F2, 0x05A5, 0x0E5F, 0x0027, 0x01B2, 0x089C, - 0x26F3, 0x0B85, 0x0157, 0x011C, 0x0944, 0x0577, - 0x7DC8, 0x13BB, 0x089D, 0x05A6, 0x0315, 0x0E8D, - 0xFAB1, 0x1A3C, 0x03AC, 0x0576, 0x7DC7, 0x0B84, - 0x05A3, 0x26F1, 0x26F2, 0x05A4, 0x0224, 0x0943, - 0x0D4C, 0x11F0, 0x1FDF, 0x089A, 0x02F0, 0x0D4D, - 0x0026, 0x11F1, 0x0777, 0x0E82, 0x0029, 0x05A8, - 0x1A3D, 0x0028, 0x00CB, 0x0159, 0x11F6, 0x0709, - 0x0614, 0x04E3, 0x015A, 0x0578, 0x0B87, 0x1FE0, - 0x05AA, 0x7DC9, 0x05A9, 0x05AB, 0x0579, 0x11F7, - 0x3F38, 0x0945, 0x13BC, 0x26F4, 0x235E, 0x3F36, - 0x0158, 0x05A7, 0x3F37, 0x0E80, 0x11F3, 0x13BD, - 0x0B86, 0x0E81, 0x0316, 0x0317, 0x0D4E, 0x11F5, - 0x11F4, 0x075F, 0x06C3, 0x08A6, 0x0B8D, 0x0584, - 0x022A, 0x02CA, 0x13D5, 0x0E93, 0x0217, 0x011F, - 0x0124, 0x0120, 0x0B8E, 0x06C4, 0x0326, 0x0327, - 0x05BC, 0x0B8F, 0xFAC1, 0x0955, 0x1217, 0x7DD9, - 0x0328, 0x0323, 0x0324, 0x2369, 0x7DD8, 0x0031, - 0x1FF3, 0x1216, 0xFAC0, 0x1215, 0x0032, 0x00CD, - 0x03AF, 0x0A12, 0x01BC, 0x0070, 0x0325, 0x0E92, - 0x038E, 0x02D7, 0x2708, 0x13D7, 0x0296, 0x039A, - 0x00FE, 0x070D, 0x01ED, 0x02D8, 0x0398, 0x077E, - 0x0167, 0x0244, 0x0329, 0x01BD, 0x0521, 0x022B, - 0x1A50, 0x0122, 0x08A9, 0x0A13, 0x05DD, 0x070C, - 0x04E9, 0x0033, 0x0121, 0x13D6, 0x0956, 0x08A7, - 0x0585, 0x0166, 0x0204, 0x08A8, 0x0586, 0x04A0, - 0x02CB, 0x003D, 0x0588, 0x0289, 0x03C2, 0x03B8, - 0x077F, 0x0587, 0x04EB, 0x00CF, 0x01A3, 0x13D9, - 0x0617, 0x01A2, 0x06C5, 0x0522, 0x03B9, 0x070E, - 0x0762, 0x08AA, 0x1A51, 0x0169, 0x03BA, 0x1218, - 0x0523, 0x04EC, 0x3F49, 0x0E96, 0x04EA, 0x02CA, - 0x0D59, 0x13D8, 0x03D2, 0x0E95, 0x0957, 0x0E94, - 0x0168, 0x0123, 0x031E, 0x0412, 0x032A, 0x00CE, - 0x039C, 0x0E95, 0x0D5A, 0x0071, 0x13DC, 0x7DDA, - 0x236C, 0x0E96, 0x13DD, 0x032C, 0x1A52, 0x0B90, - 0x0589, 0x032D, 0x2709, 0x1FF6, 0x058A, 0x1219, - 0x05BD, 0x058B, 0x0035, 0x270A, 0x05DE, 0x095A, - 0x1A53, 0x016B, 0x022C, 0x070F, 0x13DA, 0x0958, - 0x3F4A, 0x0588, 0x0D5B, 0x13DB, 0x236A, 0x0780, - 0x3F4B, 0x1FF4, 0x0959, 0x0034, 0x016A, 0x236B, - 0x1FF5, 0x032B, 0x270B, 0x02F3, 0xFAC4, 0x7DDC, - 0x1FF7, 0x0124, 0x095C, 0x016C, 0x0072, 0x016A, - 0x04EE, 0x270D, 0x270C, 0x022D, 0x04A1, 0x270E, - 0x0E97, 0x0618, 0xFAC5, 0x0E98, 0x3F4C, 0x236E, - 0x1A54, 0x05BF, 0x032E, 0x121A, 0xFAC2, 0x05BE, - 0x01EE, 0x04ED, 0x236D, 0x03BB, 0x0125, 0x00EC, - 0x7DDB, 0xFAC3, 0x05DF, 0x00C9, 0x08AB, 0x095B, - 0x013C, 0x01FE, 0x0B8B, 0xFABD, 0x7DD4, 0x0615, - 0x01EA, 0x0E91, 0x057F, 0x016E, 0x0156, 0x08A1, - 0x094E, 0x7DD5, 0x03D1, 0x01B6, 0x1FEC, 0x1FEB, - 0xFABE, 0x7DD6, 0x1212, 0x7DD7, 0xFABF, 0x1A4C, - 0x0E8D, 0x3F44, 0xFABC, 0x002D, 0x006A, 0x01B5, - 0x13CD, 0x08A0, 0x01B4, 0x03D0, 0x006B, 0x1211, - 0x3F45, 0x0227, 0x02FE, 0x077A, 0x1A4B, 0x014A, - 0x0E91, 0x1FED, 0x2705, 0x0162, 0x094F, 0x002E, - 0x04E8, 0x1FEE, 0x0A11, 0x0950, 0x0581, 0x1FEF, - 0x1FF0, 0x2706, 0x3F47, 0x1A4F, 0x0582, 0x05BA, - 0x002F, 0x031E, 0x13CF, 0x0760, 0x0580, 0x0E92, - 0x031D, 0x04E7, 0x1A4D, 0x1A4E, 0x0E8E, 0x01B7, - 0x02F1, 0x02F2, 0x3F46, 0x0E8F, 0x0616, 0x0D55, - 0x006C, 0x0E93, 0x0E90, 0x13CE, 0x049E, 0x0411, - 0x13D0, 0x08A2, 0x03AD, 0x02D3, 0x0228, 0x13D1, - 0x006D, 0x006D, 0x0792, 0x01B8, 0x077C, 0x0229, - 0x0320, 0x1FF1, 0x3F48, 0x0D56, 0x13D2, 0x01B9, - 0x2707, 0x2368, 0x0D57, 0x00CC, 0x0520, 0x1213, - 0x0163, 0x051F, 0x0951, 0x1214, 0x0E94, 0x0164, - 0x00FC, 0x070B, 0x077B, 0x0761, 0x00C6, 0x017A, - 0x031F, 0x0583, 0x01EE, 0x00D4, 0x0165, 0x0952, - 0x02C8, 0x00C8, 0x023A, 0x0030, 0x01EC, 0x00FD, - 0x02F9, 0x01BB, 0x0953, 0x01A0, 0x13D4, 0x08A5, - 0x0030, 0x08A4, 0x077D, 0x006E, 0x0D58, 0x0954, - 0x05DC, 0x0123, 0x0321, 0x01BA, 0x0288, 0x05BB, - 0x13D3, 0x0322, 0x03AE, 0x0B8C, 0x049F, 0x1FF2, - 0x08A3, 0x006E, 0x02D6, 0x006F, 0x011E, 0x0373, - 0x03BF, 0x01EA, 0x08AF, 0x0595, 0x0100, 0x0112, - 0x0050, 0x02B9, 0x014C, 0x01A4, 0x0258, 0x04F2, - 0x0596, 0x00A4, 0x13E1, 0x0124, 0x08B0, 0x04F3, - 0x0171, 0x0413, 0x2713, 0x0E9B, 0x046C, 0x00A2, - 0x0765, 0x05E0, 0x019C, 0x0964, 0x0335, 0x061C, - 0x3F4F, 0x0E9A, 0x009A, 0x0170, 0x0784, 0x003E, - 0x012F, 0x01A3, 0x023D, 0x01F0, 0x016B, 0x00A3, - 0x023F, 0x03C4, 0x03D4, 0x0377, 0x0052, 0x01BE, - 0x0031, 0x0012, 0x0157, 0x021A, 0x0242, 0x039E, - 0x04A2, 0x05E1, 0x02F6, 0x1A5D, 0x0336, 0x0126, - 0x05E2, 0x2374, 0x05C4, 0x046D, 0x0311, 0x01A5, - 0x04F4, 0xFAC8, 0x023E, 0x0A17, 0x0D5F, 0x05C3, - 0x08B1, 0x009C, 0x02CD, 0x0299, 0x036A, 0x0376, - 0x006C, 0x0037, 0x0785, 0x0076, 0x0040, 0x0965, - 0x13E2, 0x02CC, 0x0259, 0x0414, 0x06C6, 0x01A6, - 0x033F, 0x0334, 0x0E9C, 0x0786, 0x0127, 0x0966, - 0x06C7, 0x063B, 0x0039, 0x0172, 0x0374, 0x003A, - 0x0597, 0x0128, 0x00FF, 0x0526, 0x2375, 0x0044, - 0x0337, 0x0B95, 0x0230, 0x7DDE, 0x0D60, 0x0185, - 0x0D61, 0x0038, 0x0321, 0x003F, 0x009D, 0x0101, - 0x03B9, 0x0312, 0x0969, 0x1A5E, 0x1220, 0x2714, - 0x003B, 0x0598, 0x2715, 0x1FFB, 0x08B2, 0x096A, - 0x0EA1, 0x7DDF, 0x1FFC, 0x0A18, 0x1A5F, 0x1222, - 0x1221, 0x0173, 0x0793, 0x061D, 0x096B, 0x7DE0, - 0x0787, 0x0231, 0x0711, 0x0EA0, 0xFAC9, 0x121D, - 0x05C5, 0x121F, 0x121E, 0x3F50, 0x0E9D, 0x0338, - 0x0968, 0x0967, 0x04F5, 0x0B96, 0x05C7, 0x05C6, - 0x03BE, 0x01B8, 0x1225, 0x1224, 0x02CE, 0x0160, - 0x0102, 0xFACD, 0x3F51, 0x0322, 0xFACE, 0x0339, - 0x059A, 0x019E, 0x063C, 0x01BF, 0x7DE2, 0x3F52, - 0x0D62, 0x2718, 0x3F53, 0x2717, 0x0EA2, 0x0599, - 0x13E3, 0xFACA, 0xFACB, 0x06C8, 0x06C9, 0xFACC, - 0x7DE1, 0x0125, 0x01BC, 0x13E4, 0x1223, 0x0336, - 0x02BA, 0x028B, 0x2716, 0x2376, 0x02CD, 0x013D, - 0x095E, 0x05C0, 0x0016, 0x016F, 0x0525, 0x2371, - 0x2370, 0x0205, 0x01C8, 0x058C, 0x0B91, 0x00E6, - 0x0639, 0x0330, 0x2372, 0x3F4D, 0x0763, 0x016E, - 0x121B, 0x1FF9, 0x058D, 0x016D, 0x1A55, 0x270F, - 0x13DE, 0xFAC6, 0x1FF8, 0x236F, 0x1A56, 0x04EF, - 0x0298, 0x0E99, 0x095D, 0x01BE, 0x02CC, 0x0524, - 0x032F, 0x7DDD, 0x0589, 0x095F, 0x03BC, 0x1A59, - 0x0E9A, 0x0E9B, 0x061A, 0x13E0, 0x0E9C, 0x08AD, - 0x0332, 0x0A15, 0x0591, 0x0D5D, 0x0590, 0x0960, - 0x2373, 0x2711, 0x1A5A, 0x058A, 0x006F, 0x3F4E, - 0x2712, 0x0764, 0x08AC, 0x05C1, 0xFAC7, 0x0331, - 0x1FFA, 0x13DF, 0x2710, 0x1A57, 0x0E97, 0x058E, - 0x0619, 0x0A14, 0x1A58, 0x0D5C, 0x0782, 0x058F, - 0x121C, 0x0781, 0x0210, 0x0594, 0x0962, 0x0080, - 0x0399, 0x03C3, 0x02F5, 0x0184, 0x028A, 0x046B, - 0x0963, 0x0B92, 0x0100, 0x1A5B, 0x0A16, 0x0E9D, - 0x03BD, 0x0B93, 0x01A4, 0x0333, 0x0783, 0x033E, - 0x00FE, 0x0592, 0x031F, 0x046A, 0x0593, 0x0961, - 0x04F0, 0x00FF, 0x02F4, 0x0073, 0x0E98, 0x04F1, - 0x033D, 0x0266, 0x02FF, 0x03D3, 0x0320, 0x0206, - 0x004E, 0x023C, 0x01EF, 0x0211, 0x0027, 0x000C, - 0x063A, 0x08AE, 0x008C, 0x03CE, 0x02D9, 0x02FA, - 0x01A2, 0x01A5, 0x061B, 0x0E9E, 0x05C2, 0x022F, - 0x039D, 0x01F0, 0x1A5C, 0x0E9F, 0x02CB, 0x03B8, - 0x014B, 0x0B94, 0x0E99, 0x013E, 0x016F, 0x0036, - 0x0334, 0x0D5E, 0x0310, 0x0207, 0x0044, 0x017B, - 0x00DF, 0x0042, 0x022E, 0x0710, 0x007E, +static const uint8_t on2avc_cb8_bits[ON2AVC_CB_7_8_CODES] = { + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 13, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 11, 11, 11, 10, + 11, 11, 9, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 9, 11, 11, 11, 11, 9, 13, 14, + 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 9, 10, 11, 11, 11, 11, + 11, 11, 10, 11, 11, 10, 11, 12, 12, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, + 11, 11, 11, 10, 10, 11, 11, 11, 11, 9, 10, 11, 11, 10, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, 10, 11, 11, 10, 10, 9, 11, 11, 11, + 11, 11, 11, 11, 11, 10, 11, 11, 9, 10, 10, 12, 13, 14, 15, 15, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 10, 10, 9, 10, 11, 11, 9, 11, 11, 11, 11, 11, 11, 11, 11, 10, + 10, 9, 9, 10, 11, 13, 13, 13, 13, 10, 10, 9, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, 11, 11, 11, + 11, 10, 11, 11, 10, 10, 10, 10, 9, 9, 11, 12, 13, 15, 15, 15, 15, 11, 11, + 11, 11, 11, 11, 10, 11, 11, 10, 10, 9, 9, 10, 11, 12, 12, 10, 10, 7, 9, + 10, 12, 12, 12, 12, 9, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, + 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 9, 10, 11, 11, 10, 10, 10, 10, 8, 9, + 10, 10, 9, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 9, 10, 10, + 9, 10, 10, 9, 10, 10, 9, 9, 9, 11, 12, 13, 14, 15, 16, 16, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 9, 10, 10, 7, 10, 11, + 12, 12, 10, 10, 10, 10, 10, 10, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 8, 10, 11, 11, 10, 10, 10, 11, + 12, 13, 13, 10, 10, 10, 10, 10, 10, 9, 10, 10, 9, 9, 7, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 9, 9, 10, 11, 13, + 13, 13, 13, 10, 13, 13, 13, 13, 13, 13, 13, 13, 9, 9, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 10, 11, 11, 10, 10, 10, 10, 9, 10, 10, 8, 9, 10, 10, 9, 10, 10, + 9, 11, 12, 13, 14, 14, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 10, 11, 11, 10, 10, 10, 10, 9, 10, 10, 9, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 12, 12, 12, 12, 9, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, + 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 10, + 10, 10, 10, 9, 10, 10, 10, 11, 12, 14, 14, 14, 14, 10, 10, 9, 10, 10, 9, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 10, 10, + 10, 10, 9, 9, 9, 10, 11, 14, 14, 14, 14, 14, 14, 14, 14, 9, 10, 10, 8, + 10, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 10, 10, 9, 10, 10, 6, 8, 9, 9, + 10, 10, 10, 10, 10, 10, 10, 10, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 10, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 10, 10, 10, 10, + 10, 10, 9, 9, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 10, 10, 10, 10, 10, 11, 12, 13, 14, 16, 16, 16, 16, 10, 10, + 6, 10, 10, 10, 10, 9, 10, 10, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 6, + 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 9, 9, 10, 10, 10, 10, + 10, 10, 10, 10, 9, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 10, 10, 9, + 9, 10, 11, 11, 10, 10, 9, 10, 10, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 7, 10, + 10, 10, 11, 12, 12, 10, 10, 10, 10, 9, 10, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, + 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 10, 10, 10, 10, 9, 10, 10, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, + 11, 11, 11, 10, 11, 11, 10, 10, 10, 10, 10, 10, 9, 10, 10, 9, 10, 10, 9, + 10, 10, 7, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, + 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, + 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, }; -static const uint8_t on2avc_cb8_bits[ON2AVC_CB7_8_CODES] = { - 11, 11, 16, 15, 11, 9, - 13, 12, 9, 11, 11, 14, - 13, 12, 13, 14, 14, 13, - 10, 11, 15, 15, 10, 16, - 16, 15, 16, 11, 13, 13, - 16, 13, 11, 11, 15, 13, - 11, 9, 13, 13, 10, 9, - 16, 13, 9, 10, 10, 15, - 10, 10, 10, 12, 14, 11, - 14, 12, 14, 11, 12, 11, - 12, 14, 10, 10, 11, 16, - 10, 13, 14, 14, 11, 13, - 11, 13, 12, 10, 10, 10, - 15, 10, 10, 12, 12, 12, - 15, 12, 11, 12, 13, 10, - 11, 11, 12, 13, 11, 13, - 12, 15, 13, 11, 11, 12, - 14, 11, 11, 11, 13, 14, - 11, 13, 14, 13, 12, 12, - 12, 11, 14, 12, 10, 13, - 14, 11, 13, 15, 14, 14, - 13, 13, 14, 13, 13, 13, - 15, 14, 12, 14, 14, 14, - 16, 14, 12, 12, 16, 16, - 12, 13, 12, 14, 14, 13, - 13, 16, 14, 13, 14, 13, - 13, 13, 13, 15, 14, 13, - 10, 12, 16, 16, 12, 10, - 13, 14, 11, 11, 12, 14, - 14, 11, 12, 16, 13, 12, - 14, 14, 14, 16, 15, 16, - 15, 16, 15, 14, 12, 14, - 13, 11, 10, 11, 14, 14, - 11, 9, 14, 14, 10, 16, - 12, 15, 16, 12, 11, 14, - 13, 9, 11, 11, 15, 15, - 12, 13, 14, 15, 12, 16, - 14, 15, 15, 13, 14, 14, - 15, 14, 14, 14, 13, 15, - 12, 14, 12, 15, 15, 12, - 11, 13, 15, 10, 14, 13, - 14, 13, 13, 13, 13, 13, - 13, 12, 13, 13, 12, 14, - 14, 16, 12, 14, 11, 13, - 13, 12, 14, 15, 13, 13, - 13, 13, 13, 14, 13, 13, - 13, 14, 13, 13, 12, 14, - 14, 13, 11, 12, 13, 12, - 12, 10, 13, 13, 11, 11, - 12, 14, 11, 12, 13, 15, - 14, 14, 16, 11, 13, 13, - 11, 15, 10, 14, 13, 12, - 12, 13, 12, 13, 11, 11, - 11, 12, 11, 10, 12, 13, - 10, 10, 13, 13, 10, 10, - 10, 10, 15, 11, 11, 13, - 12, 11, 13, 12, 11, 16, - 14, 10, 14, 11, 10, 10, - 15, 12, 11, 13, 12, 11, - 14, 13, 11, 13, 11, 10, - 9, 10, 10, 14, 10, 9, - 14, 13, 9, 9, 10, 10, - 10, 10, 10, 12, 14, 10, - 14, 13, 12, 11, 14, 13, - 11, 13, 9, 11, 13, 13, - 11, 14, 14, 12, 12, 13, - 10, 12, 12, 10, 9, 10, - 10, 10, 10, 9, 10, 10, - 11, 10, 8, 12, 12, 9, - 11, 10, 10, 11, 11, 12, - 12, 14, 12, 10, 14, 13, - 16, 10, 10, 11, 16, 14, - 11, 12, 14, 12, 12, 10, - 11, 10, 10, 11, 9, 11, - 11, 9, 11, 12, 13, 10, - 10, 11, 11, 11, 11, 10, - 13, 13, 10, 13, 11, 11, - 11, 12, 11, 11, 11, 10, - 10, 12, 12, 10, 14, 12, - 11, 12, 12, 11, 12, 12, - 11, 10, 11, 11, 11, 11, - 14, 13, 13, 13, 13, 12, - 13, 13, 12, 12, 12, 13, - 13, 12, 13, 13, 14, 14, - 13, 12, 13, 15, 14, 12, - 13, 16, 14, 12, 14, 14, - 14, 13, 13, 12, 13, 13, - 12, 12, 14, 13, 12, 10, - 13, 14, 14, 10, 11, 14, - 14, 11, 10, 13, 13, 11, - 12, 12, 14, 14, 14, 13, - 13, 14, 13, 13, 14, 13, - 12, 11, 12, 15, 14, 12, - 9, 12, 13, 10, 9, 11, - 13, 14, 11, 10, 13, 15, - 14, 10, 11, 13, 14, 11, - 11, 12, 12, 10, 12, 12, - 15, 15, 12, 14, 14, 14, - 13, 13, 14, 14, 14, 11, - 12, 14, 15, 12, 10, 12, - 13, 9, 9, 11, 14, 15, - 11, 14, 13, 13, 13, 15, - 13, 13, 14, 12, 14, 13, - 13, 13, 12, 13, 14, 14, - 13, 11, 11, 15, 13, 11, - 12, 13, 15, 12, 12, 13, - 14, 14, 14, 13, 13, 13, - 13, 13, 12, 13, 14, 13, - 10, 14, 13, 11, 10, 11, - 11, 11, 11, 11, 12, 12, - 11, 12, 13, 12, 11, 13, - 10, 12, 11, 10, 11, 13, - 12, 10, 12, 12, 12, 11, - 12, 10, 12, 12, 10, 10, - 11, 11, 11, 11, 9, 10, - 11, 10, 10, 9, 12, 12, - 9, 11, 11, 10, 9, 10, - 13, 14, 13, 12, 10, 10, - 14, 14, 10, 11, 11, 13, - 13, 11, 13, 13, 12, 11, - 10, 11, 11, 10, 10, 9, - 12, 12, 9, 11, 12, 13, - 12, 12, 11, 12, 13, 11, - 11, 12, 12, 12, 12, 13, - 15, 14, 14, 13, 12, 16, - 14, 12, 11, 12, 16, 15, - 12, 13, 15, 13, 13, 12, - 12, 12, 12, 11, 10, 13, - 13, 10, 10, 12, 13, 10, - 10, 10, 11, 11, 11, 11, - 12, 12, 11, 13, 12, 12, - 13, 13, 11, 12, 13, 11, - 11, 12, 12, 11, 13, 13, - 13, 13, 13, 10, 14, 11, - 11, 10, 11, 11, 11, 10, - 11, 12, 13, 12, 11, 10, - 12, 12, 10, 11, 10, 11, - 12, 11, 13, 12, 14, 13, - 11, 12, 13, 14, 12, 11, - 11, 14, 14, 12, 12, 13, - 13, 13, 12, 12, 12, 12, - 11, 10, 12, 12, 10, 13, - 14, 13, 12, 12, 13, 13, - 13, 12, 12, 14, 13, 12, - 14, 12, 11, 14, 13, 11, - 11, 13, 12, 11, 13, 14, - 12, 14, 14, 14, 13, 14, - 12, 13, 13, 13, 13, 13, - 13, 12, 13, 10, 12, 14, - 15, 13, 10, 13, 12, 11, - 11, 12, 13, 13, 11, 11, - 12, 13, 12, 16, 11, 13, - 16, 14, 16, 15, 15, 16, - 13, 11, 14, 13, 12, 11, - 11, 15, 13, 11, 9, 13, - 14, 11, 10, 12, 15, 14, - 12, 11, 13, 13, 10, 11, - 11, 14, 14, 11, 12, 13, - 13, 11, 13, 12, 14, 16, - 12, 16, 13, 15, 15, 13, - 12, 13, 14, 14, 10, 11, - 14, 14, 11, 10, 13, 13, - 9, 12, 14, 16, 12, 13, - 13, 12, 13, 13, 12, 14, - 14, 13, 14, 14, 15, 14, - 13, 12, 13, 11, 11, 11, - 13, 13, 13, 14, 13, 13, - 14, 14, 12, 14, 16, 14, - 13, 12, 13, 14, 13, 12, - 12, 12, 12, 12, 11, 12, - 14, 11, 12, 12, 12, 11, - 11, 14, 14, 13, 13, 11, - 12, 14, 12, 11, 14, 11, - 13, 13, 11, 12, 13, 13, - 12, 12, 11, 12, 12, 12, - 11, 12, 13, 11, 10, 13, - 13, 11, 10, 11, 11, 11, - 11, 11, 13, 12, 11, 14, - 13, 12, 13, 12, 11, 14, - 12, 11, 12, 13, 13, 11, - 13, 13, 13, 12, 12, 10, - 12, 12, 10, 10, 10, 11, - 11, 11, 12, 15, 15, 13, - 12, 13, 14, 14, 14, 13, - 16, 14, 13, 15, 14, 14, - 16, 15, 13, 14, 15, 13, - 14, 14, 14, 13, 15, 13, - 14, 13, 14, 13, 16, 14, - 12, 12, 13, 13, 12, 13, - 13, 14, 13, 13, 13, 11, - 14, 14, 12, 14, 13, 13, - 12, 13, 13, 14, 15, 14, - 13, 12, 15, 15, 13, 14, - 12, 14, 14, 13, 14, 15, - 13, 13, 13, 13, 13, 13, - 12, 12, 15, 14, 12, 13, - 15, 14, 12, 12, 12, 12, - 15, 12, 12, 13, 14, 12, - 13, 13, 13, 14, 14, 13, - 13, 14, 13, 14, 14, 14, - 13, 14, 14, 13, 13, 13, - 12, 14, 13, 12, 12, 13, - 14, 12, 12, 16, 15, 15, - 13, 13, 13, 14, 14, 13, - 13, 12, 12, 14, 13, 13, - 12, 14, 14, 14, 12, 12, - 14, 14, 16, 13, 16, 14, - 14, 16, 14, 13, 14, 13, - 14, 14, 14, 13, 13, 16, - 13, 13, 11, 15, 15, 12, - 12, 13, 14, 15, 12, 11, - 13, 13, 11, 13, 11, 14, - 14, 14, 14, 11, 15, 14, - 13, 14, 14, 14, 14, 14, - 15, 15, 13, 11, 14, 13, - 12, 11, 12, 15, 15, 12, - 12, 14, 15, 11, 11, 13, - 14, 15, 12, 13, 13, 13, - 11, 13, 13, 15, 14, 12, - 14, 14, 13, 13, 14, 15, - 16, 16, 13, 13, 14, 16, - 14, 12, 12, 14, 11, 11, - 13, 15, 15, 12, 16, 14, - 14, 14, 15, 13, 14, 14, - 13, 13, 13, 13, 13, 13, - 14, 14, 14, 14, 14, 13, - 15, 14, 12, 14, 15, 16, - 16, 13, 14, 15, 15, 14, - 16, 14, 14, 14, 14, 13, - 14, 16, 13, 13, 14, 14, - 12, 12, 12, 14, 12, 13, - 12, 14, 13, 12, 14, 15, - 15, 13, 13, 12, 13, 13, - 13, 13, 14, 13, 12, 13, - 13, 13, 13, 13, 12, 14, - 14, 12, 12, 12, 14, 13, - 13, 12, 12, 12, 14, 13, - 12, 14, 15, 12, 13, 12, - 12, 14, 13, 14, 15, 16, - 14, 15, 13, 16, 16, 13, - 13, 13, 14, 14, 13, 12, - 13, 14, 13, 13, 12, 14, - 13, 12, 11, 14, 14, 12, - 7, 10, 15, 16, 10, 7, - 12, 13, 7, 11, 11, 15, - 16, 12, 12, 14, 14, 13, - 16, 14, 16, 16, 16, 15, - 16, 16, 15, 15, 13, 14, - 14, 13, 12, 13, 16, 13, - 12, 9, 12, 13, 9, 9, - 13, 13, 9, 8, 10, 16, - 14, 10, 11, 13, 13, 10, - 13, 12, 15, 14, 12, 16, - 16, 15, 15, 14, 15, 15, - 16, 13, 12, 14, 14, 13, - 10, 13, 12, 11, 9, 11, - 16, 14, 11, 9, 12, 15, - 15, 11, 9, 13, 15, 9, - 11, 11, 14, 14, 12, 12, - 14, 13, 14, 14, 14, 15, - 15, 15, 14, 14, 16, 16, - 14, 12, 13, 13, 13, 11, - 11, 16, 13, 12, 14, 13, - 13, 10, 11, 15, 12, 12, - 16, 12, 16, 14, 11, 11, - 13, 14, 11, 14, 11, 15, - 15, 13, 14, 14, 16, 15, - 16, 15, 14, 15, 14, 14, - 16, 14, 12, 12, 14, 12, - 12, 12, 12, 16, 14, 12, - 15, 15, 16, 16, 14, 16, - 14, 13, 12, 14, 14, 15, - 16, 13, 12, 11, 14, 13, - 16, 12, 12, 16, 16, 14, - 14, 16, 16, 15, 14, 15, - 15, 14, 12, 13, 15, 14, - 15, 15, 14, 14, 16, 16, - 14, 16, 16, 14, 14, 14, - 14, 13, 14, 13, 16, 15, - 14, 14, 14, 14, 14, 16, - 15, 16, 14, 14, 16, 16, - 15, 16, 15, 13, 16, 16, - 15, 14, 14, 14, 15, 14, - 14, 15, 15, 14, 11, 15, - 15, 12, 10, 12, 16, 15, - 13, 11, 14, 13, 11, 13, - 13, 16, 15, 12, 15, 15, - 15, 14, 14, 16, 16, 15, - 14, 13, 14, 15, 14, 12, - 14, 13, 11, 13, 12, 14, - 15, 11, 9, 12, 15, 15, - 11, 9, 12, 13, 9, 10, - 12, 14, 14, 10, 12, 13, - 14, 12, 14, 15, 15, 16, - 15, 14, 14, 14, 15, 14, - 12, 13, 13, 13, 12, 11, - 13, 14, 12, 10, 12, 13, - 9, 7, 13, 13, 7, 6, - 9, 14, 15, 9, 10, 14, - 12, 9, 13, 13, 15, 16, - 12, 14, 16, 16, 15, 15, - 14, 14, 14, 13, 12, 13, - 14, 12, 11, 13, 13, 10, - 9, 10, 15, 14, 10, 6, - 12, 16, 15, 12, 10, 15, - 13, 10, 12, 13, 14, 15, - 12, 13, 13, 13, 13, 15, - 14, 15, 15, 15, 16, 15, - 16, 16, 15, 14, 15, 15, - 13, 11, 12, 16, 16, 12, - 9, 14, 14, 8, 9, 13, - 13, 8, 9, 11, 16, 14, - 11, 11, 13, 14, 11, 13, - 13, 14, 14, 13, 14, 15, - 15, 13, 13, 15, 15, 15, - 13, 12, 16, 16, 13, 10, - 13, 13, 10, 6, 11, 16, - 16, 10, 9, 12, 14, 16, - 11, 10, 13, 13, 10, 11, - 12, 16, 14, 12, 12, 15, - 14, 14, 15, 14, 16, 15, - 14, 14, 14, 16, 16, 15, - 12, 14, 15, 13, 11, 11, - 15, 14, 11, 9, 13, 14, - 9, 11, 14, 14, 11, 15, - 13, 15, 16, 12, 13, 14, - 13, 12, 13, 14, 15, 13, - 13, 14, 15, 16, 13, 16, - 16, 15, 15, 13, 13, 15, - 15, 14, 11, 14, 14, 13, - 10, 12, 15, 14, 12, 16, - 13, 16, 16, 14, 16, 14, - 15, 15, 13, 13, 16, 15, - 13, 15, 16, 14, 14, 16, - 16, 16, 15, 15, 15, 15, - 14, 16, 15, 13, 14, 15, - 15, 13, 13, 15, 16, 14, - 12, 14, 14, 16, 15, 14, - 15, 16, 13, 13, 14, 15, - 13, 13, 14, 14, 16, 14, - 14, 14, 15, 14, 16, 15, - 14, 15, 14, 15, 15, 16, - 12, 13, 13, 15, 12, 12, - 13, 13, 16, 16, 12, 13, - 13, 14, 14, 11, 13, 14, - 11, 15, 13, 14, 16, 12, - 12, 12, 13, 11, 13, 13, - 13, 15, 14, 13, 15, 15, - 14, 14, 16, 14, 14, 14, - 14, 15, 14, 11, 11, 13, - 13, 11, 14, 11, 16, 14, - 12, 9, 11, 14, 14, 11, - 10, 12, 13, 10, 11, 12, - 13, 16, 11, 12, 13, 14, - 16, 16, 14, 14, 16, 14, - 13, 15, 16, 14, 15, 13, - 14, 12, 11, 11, 11, 15, - 15, 11, 9, 13, 13, 9, - 9, 14, 14, 9, 9, 11, - 16, 14, 11, 11, 13, 12, - 11, 13, 12, 13, 15, 12, - 13, 13, 15, 14, 14, 15, - 16, 15, 13, 12, 16, 14, - 12, 10, 13, 13, 10, 8, - 10, 16, 14, 10, 13, 15, - 16, 13, 13, 13, 14, 14, - 12, 13, 14, 14, 13, 14, - 14, 14, 14, 14, 13, 14, - 16, 14, 14, 16, 15, 14, - 14, 14, 15, 15, 15, 13, - 15, 16, 13, 13, 14, 14, - 15, 12, 14, 14, 14, 13, - 13, 12, 13, 13, 12, 13, - 13, 13, 12, 13, 13, 14, - 13, 13, 14, 14, 14, 14, - 13, 13, 12, 14, 16, 14, - 14, 15, 14, 14, 13, 12, - 13, 13, 13, 11, 13, 14, - 12, 13, 15, 14, 12, 13, - 13, 14, 12, 12, 13, 14, - 13, 13, 13, 13, 15, 14, - 13, 14, 13, 13, 12, 12, - 13, 13, 12, 14, 13, 13, - 14, 13, 12, 14, 13, 13, - 12, 13, 12, 12, 12, 14, - 15, 14, 13, 16, 13, 15, - 15, 13, 14, 13, 14, 13, - 13, 14, 14, 13, 14, 15, - 13, 15, 16, 13, 13, 13, - 14, 16, 13, 14, 14, 14, - 13, 14, 13, 13, 13, 13, - 14, 14, 14, 13, 11, 14, - 14, 13, 11, 13, 16, 14, - 13, 11, 14, 13, 12, 14, - 13, 16, 14, 13, 13, 15, - 14, 13, 14, 13, 15, 14, - 13, 12, 13, 15, 14, 10, - 12, 14, 13, 10, 12, 15, - 14, 12, 12, 14, 16, 12, - 11, 12, 15, 14, 12, 12, - 13, 13, 11, 12, 12, 13, - 15, 13, 14, 15, 14, 15, - 15, 15, 11, 13, 13, 12, - 14, 13, 11, 11, 13, 13, - 11, 11, 12, 14, 16, 12, - 14, 13, 14, 16, 13, 13, - 13, 15, 13, 13, 14, 13, - 14, 14, 15, 14, 16, 14, - 14, 14, 15, 16, 14, 15, - 13, 15, 12, 12, 15, 14, - 11, 12, 13, 13, 14, 14, - 11, 12, 13, 15, 13, 12, - 14, 14, 13, 13, 12, 12, - 14, 12, 13, 12, 13, 13, - 15, 13, 12, 14, 13, 12, - 16, 13, 12, 13, 15, 12, - 14, 14, 14, 14, 12, 13, - 12, 14, 13, 12, 12, 12, - 13, 14, 12, 13, 13, 14, - 13, 13, 12, 13, 14, 11, - 12, 12, 13, 13, 12, 13, - 14, 15, 14, 14, 13, 14, - 14, 13, 13, 14, 15, 14, - 13, 14, 14, 13, 14, 13, - 12, 13, 13, 13, 12, 14, - 14, 11, 11, 12, 12, 13, - 12, 10, 13, 13, 10, 12, - 11, 12, 12, 11, 13, 13, - 14, 12, 16, 13, 14, 15, - 13, 13, 13, 15, 15, 13, - 13, 14, 16, 14, 13, 12, - 12, 12, 12, 11, 13, 13, - 10, 10, 14, 13, 10, 10, - 11, 11, 11, 10, 10, 12, - 13, 10, 13, 12, 11, 12, - 13, 12, 12, 12, 11, 11, - 12, 13, 12, 13, 13, 12, - 13, 13, 11, 12, 13, 11, - 10, 11, 11, 11, 10, 12, - 12, 13, 12, 12, 11, 13, - 12, 11, 11, 11, 12, 11, - 11, 12, 13, 13, 12, 14, - 11, 12, 14, 12, 12, 11, - 12, 13, 11, 12, 13, 13, - 13, 12, 11, 11, 13, 12, - 10, 13, 12, 11, 13, 15, - 15, 13, 13, 13, 13, 12, - 13, 13, 14, 13, 13, 14, - 14, 13, 13, 14, 11, 13, - 13, 13, 12, 11, 13, 13, - 14, 13, 12, 13, 15, 12, - 14, 13, 13, 13, 13, 15, - 13, 13, 14, 12, 16, 15, - 13, 9, 13, 13, 11, 10, - 12, 14, 14, 12, 11, 14, - 13, 12, 16, 13, 14, 15, - 13, 14, 13, 14, 16, 14, - 11, 12, 15, 12, 11, 11, - 15, 16, 11, 10, 12, 13, - 11, 10, 12, 16, 15, 12, - 11, 12, 13, 9, 10, 12, - 13, 15, 11, 12, 13, 13, - 16, 15, 14, 15, 16, 13, - 13, 14, 16, 13, 12, 12, - 13, 12, 12, 11, 12, 14, - 14, 12, 10, 12, 13, 10, - 13, 13, 14, 13, 13, 13, - 12, 13, 12, 13, 13, 13, - 13, 14, 14, 13, 13, 14, - 13, 13, 13, 11, 13, 12, - 11, 12, 13, 13, 13, 12, - 12, 12, 14, 13, 12, 12, - 12, 12, 13, 13, 11, 11, - 13, 12, 12, 10, 12, 13, - 11, 12, 11, 12, 12, 12, - 13, 13, 14, 12, 13, 12, - 14, 15, 12, 12, 11, 14, - 13, 11, 13, 14, 12, 13, - 11, 11, 12, 11, 10, 10, - 13, 13, 10, 10, 13, 13, - 10, 10, 10, 12, 11, 11, - 10, 12, 13, 11, 13, 12, - 13, 12, 12, 12, 12, 13, - 11, 11, 13, 12, 11, 14, - 13, 13, 12, 12, 11, 13, - 12, 11, 10, 11, 12, 11, - 10, 9, 12, 13, 9, 9, - 10, 10, 10, 10, 10, 12, - 13, 11, 13, 12, 12, 12, - 13, 11, 14, 12, 11, 10, - 11, 11, 10, 13, 13, 12, - 14, 12, 11, 13, 12, 11, - 9, 10, 10, 10, 10, 10, - 10, 10, 11, 10, 9, 12, - 12, 9, 10, 10, 10, 10, - 11, 11, 12, 13, 13, 11, - 11, 15, 14, 11, 10, 10, - 12, 16, 10, 12, 12, 14, - 12, 11, 10, 10, 10, 10, - 9, 13, 12, 9, 11, 13, - 13, 11, 10, 11, 11, 11, - 10, 10, 12, 12, 11, 13, - 11, 11, 13, 13, 11, 13, - 13, 11, 10, 11, 15, 10, - 13, 12, 12, 15, 12, 11, - 12, 13, 11, 11, 11, 11, - 10, 10, 13, 13, 14, 14, - 13, 13, 14, 13, 12, 13, - 13, 15, 13, 12, 13, 14, - 14, 13, 11, 12, 13, 15, - 12, 12, 11, 13, 16, 14, - 14, 14, 14, 14, 12, 13, - 13, 13, 12, 12, 14, 14, - 12, 9, 14, 14, 10, 9, - 11, 16, 14, 11, 16, 13, - 13, 10, 11, 12, 15, 14, - 12, 14, 14, 14, 13, 13, - 13, 16, 16, 11, 11, 16, - 15, 12, 9, 13, 14, 10, - 10, 11, 14, 15, 11, 11, - 13, 14, 10, 9, 11, 15, - 15, 11, 10, 13, 12, 9, - 11, 13, 15, 14, 11, 13, - 14, 13, 13, 13, 13, 14, - 13, 16, 13, 15, 13, 12, - 10, 13, 13, 10, 10, 11, - 13, 15, 11, 13, 12, 13, - 13, 13, 12, 13, 13, 12, - 13, 12, 13, 12, 13, 13, - 15, 14, 13, 11, 12, 14, - 14, 11, 12, 14, 16, 13, - 13, 13, 14, 13, 12, 13, - 12, 12, 13, 12, 12, 13, - 14, 12, 10, 13, 13, 11, - 10, 10, 12, 11, 11, 11, - 13, 12, 11, 13, 12, 13, - 12, 12, 11, 13, 12, 10, - 10, 13, 11, 11, 13, 13, - 12, 11, 12, 11, 12, 12, - 10, 10, 10, 11, 11, 11, - 9, 10, 11, 10, 11, 9, - 11, 12, 9, 10, 10, 10, - 10, 11, 12, 13, 14, 12, - 10, 11, 13, 13, 11, 10, - 10, 12, 12, 11, 13, 13, - 13, 12, 10, 11, 11, 10, - 10, 9, 12, 11, 8, +static const uint8_t on2avc_cb9_bits[ON2AVC_CB_9_10_CODES] = { + 1, 5, 8, 9, 10, 11, 11, 9, 10, 11, 11, 10, 12, 12, 12, 12, 11, 11, 11, + 11, 9, 10, 11, 12, 13, 13, 10, 11, 11, 10, 10, 8, 9, 11, 12, 12, 11, 11, + 5, 8, 9, 10, 10, 8, 9, 10, 10, 8, 8, 8, 9, 10, 11, 12, 12, 8, 9, + 9, 8, 9, 9, 8, 8, 8, 11, 12, 12, 11, 11, 10, 11, 11, 7, 8, 9, 10, + 10, 8, 8, 8, 9, 9, 5, 9, 10, 11, 11, 9, 10, 11, 11, 8, 9, 9, 8, + 8, 8, 8, 5, 5, 5, 9, 11, 12, 12, 11, 11, 9, 9, 8, 9, 10, 10, 8, + 8, 8, 9, 10, 10, 4, 4, }; -#define ON2AVC_CB9_10_CODES 121 -static const uint16_t on2avc_cb9_codes[ON2AVC_CB9_10_CODES] = { - 0x0000, 0x000F, 0x0098, 0x026E, 0x045C, 0x00A6, - 0x00AC, 0x045D, 0x027E, 0x009A, 0x0012, 0x000E, - 0x001A, 0x00DE, 0x022C, 0x053E, 0x00A2, 0x009E, - 0x0538, 0x01B2, 0x00BA, 0x0018, 0x00AD, 0x00BF, - 0x01BE, 0x037E, 0x05C6, 0x0132, 0x0112, 0x08B5, - 0x0457, 0x01B6, 0x00BC, 0x02AE, 0x022A, 0x045E, - 0x08B6, 0x08FA, 0x0147, 0x013E, 0x119F, 0x05C7, - 0x044F, 0x0170, 0x0456, 0x047F, 0x06C7, 0x0A72, - 0x0D8B, 0x0267, 0x0266, 0x0D8A, 0x08B7, 0x05CF, - 0x045F, 0x0054, 0x00A4, 0x0118, 0x0142, 0x0234, - 0x036F, 0x036E, 0x029E, 0x0156, 0x0114, 0x0088, - 0x00A0, 0x00A5, 0x00DA, 0x015F, 0x026F, 0x02E2, - 0x02E6, 0x0236, 0x015E, 0x0143, 0x00AA, 0x053A, - 0x0466, 0x04FE, 0x09FE, 0x119E, 0x0232, 0x0237, - 0x0A73, 0x09FF, 0x08B4, 0x046B, 0x02AF, 0x01B0, - 0x037F, 0x053F, 0x08FB, 0x0136, 0x0146, 0x08CE, - 0x05CE, 0x044E, 0x01B3, 0x008E, 0x00DD, 0x0226, - 0x047E, 0x06C6, 0x00AE, 0x011E, 0x06C4, 0x047C, - 0x0172, 0x00BE, 0x0010, 0x0016, 0x00BD, 0x0176, - 0x053B, 0x009D, 0x009C, 0x046A, 0x0177, 0x00DC, - 0x0019, +static const uint8_t on2avc_cb10_bits[ON2AVC_CB_9_10_CODES] = { + 9, 9, 9, 9, 8, 9, 9, 7, 8, 9, 9, 8, 9, 9, 8, 8, 8, 8, 8, + 8, 5, 6, 8, 8, 8, 8, 7, 8, 8, 7, 7, 7, 8, 9, 9, 7, 8, 8, + 7, 7, 7, 8, 9, 9, 6, 7, 7, 5, 6, 7, 7, 6, 7, 8, 9, 9, 6, + 6, 5, 6, 6, 5, 7, 7, 7, 7, 6, 7, 7, 6, 7, 8, 8, 5, 7, 7, + 7, 7, 5, 7, 8, 8, 8, 8, 8, 8, 5, 6, 7, 7, 6, 7, 8, 8, 6, + 7, 8, 8, 5, 6, 7, 8, 8, 7, 7, 8, 9, 9, 8, 8, 6, 7, 8, 8, + 6, 7, 8, 8, 6, 7, 7, }; -static const uint8_t on2avc_cb9_bits[ON2AVC_CB9_10_CODES] = { - 1, 4, 8, 10, 11, 8, - 8, 11, 10, 8, 5, 4, - 5, 8, 10, 11, 8, 8, - 11, 9, 8, 5, 8, 8, - 9, 10, 11, 9, 9, 12, - 11, 9, 8, 10, 10, 11, - 12, 12, 9, 9, 13, 11, - 11, 9, 11, 11, 11, 12, - 12, 10, 10, 12, 12, 11, - 11, 7, 8, 9, 9, 10, - 10, 10, 10, 9, 9, 8, - 8, 8, 8, 9, 10, 10, - 10, 10, 9, 9, 8, 11, - 11, 11, 12, 13, 10, 10, - 12, 12, 12, 11, 10, 9, - 10, 11, 12, 9, 9, 12, - 11, 11, 9, 8, 8, 10, - 11, 11, 8, 9, 11, 11, - 9, 8, 5, 5, 8, 9, - 11, 8, 8, 11, 9, 8, - 5, +static const uint8_t on2avc_cb11_bits[ON2AVC_CB_11_CODES] = { + 2, 10, 10, 10, 10, 9, 10, 11, 11, 10, 10, 10, 10, 9, 9, 9, 10, 11, 11, + 9, 10, 10, 10, 11, 12, 12, 10, 11, 11, 9, 9, 9, 10, 10, 9, 9, 8, 10, + 11, 11, 10, 10, 9, 10, 10, 10, 10, 10, 11, 11, 9, 10, 10, 9, 10, 10, 8, + 9, 10, 10, 9, 10, 11, 11, 9, 10, 10, 9, 10, 11, 11, 9, 10, 10, 9, 10, + 10, 10, 10, 10, 10, 8, 9, 10, 11, 11, 8, 9, 9, 9, 10, 10, 9, 10, 11, + 11, 9, 10, 10, 9, 10, 11, 11, 9, 10, 10, 9, 10, 10, 9, 10, 11, 11, 9, + 9, 9, 10, 10, 9, 9, 9, 9, 9, 10, 11, 11, 7, 9, 10, 10, 9, 9, 7, + 9, 10, 10, 10, 10, 10, 10, 5, 7, 7, 7, 7, 5, 5, 5, 9, 10, 10, 9, + 10, 10, 9, 9, 10, 11, 11, 10, 10, 7, 7, 9, 10, 10, 9, 10, 10, 8, 10, + 10, 10, 10, 9, 10, 10, 9, 9, 8, 9, 9, 7, 8, 10, 10, 10, 10, 7, 8, + 9, 10, 10, 7, 9, 10, 10, 9, 10, 10, 8, 8, 9, 9, 9, 10, 10, 7, 8, + 9, 10, 10, 8, 9, 10, 10, 9, 9, 9, 10, 10, 4, 4, 4, 4, }; -static const uint16_t on2avc_cb9_10_syms[ON2AVC_CB9_10_CODES] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF, 0x0100, - 0x0101, 0x0102, 0x0103, 0x0104, 0x0105, 0x01FB, - 0x01FC, 0x01FD, 0x01FE, 0x01FF, 0x0200, 0x0201, - 0x0202, 0x0203, 0x0204, 0x0205, 0x02FB, 0x02FC, - 0x02FD, 0x02FE, 0x02FF, 0x0300, 0x0301, 0x0302, - 0x0303, 0x0304, 0x0305, 0x03FB, 0x03FC, 0x03FD, - 0x03FE, 0x03FF, 0x0400, 0x0401, 0x0402, 0x0403, - 0x0404, 0x0405, 0x04FB, 0x04FC, 0x04FD, 0x04FE, - 0x04FF, 0x0500, 0x0501, 0x0502, 0x0503, 0x0504, - 0x0505, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF, - 0xFB00, 0xFB01, 0xFB02, 0xFB03, 0xFB04, 0xFB05, - 0xFBFB, 0xFBFC, 0xFBFD, 0xFBFE, 0xFBFF, 0xFC00, - 0xFC01, 0xFC02, 0xFC03, 0xFC04, 0xFC05, 0xFCFB, - 0xFCFC, 0xFCFD, 0xFCFE, 0xFCFF, 0xFD00, 0xFD01, - 0xFD02, 0xFD03, 0xFD04, 0xFD05, 0xFDFB, 0xFDFC, - 0xFDFD, 0xFDFE, 0xFDFF, 0xFE00, 0xFE01, 0xFE02, - 0xFE03, 0xFE04, 0xFE05, 0xFEFB, 0xFEFC, 0xFEFD, - 0xFEFE, 0xFEFF, 0xFF00, 0xFF01, 0xFF02, 0xFF03, - 0xFF04, 0xFF05, 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE, - 0xFFFF, +static const uint8_t on2avc_cb12_bits[ON2AVC_CB_12_CODES] = { + 2, 10, 11, 11, 11, 12, 12, 11, 11, 10, 12, 12, 12, 12, 10, 11, 11, 12, 12, + 12, 12, 11, 11, 10, 11, 11, 10, 12, 13, 13, 12, 12, 10, 12, 12, 12, 12, 10, + 11, 12, 12, 10, 12, 12, 12, 12, 11, 12, 12, 11, 12, 12, 11, 11, 11, 11, 10, + 11, 11, 10, 10, 12, 12, 12, 12, 11, 12, 12, 10, 11, 12, 12, 10, 11, 11, 10, + 11, 11, 11, 12, 12, 11, 11, 10, 10, 10, 10, 10, 11, 12, 13, 13, 10, 11, 12, + 12, 12, 12, 12, 12, 11, 11, 10, 11, 11, 11, 12, 13, 13, 12, 12, 12, 12, 11, + 12, 12, 11, 11, 10, 11, 12, 12, 9, 10, 10, 10, 11, 12, 12, 11, 11, 11, 11, + 10, 11, 11, 10, 10, 9, 11, 11, 11, 11, 9, 10, 11, 11, 9, 10, 11, 13, 14, + 14, 13, 13, 8, 9, 12, 12, 12, 12, 11, 11, 9, 10, 11, 11, 9, 10, 11, 12, + 12, 8, 10, 11, 12, 12, 10, 11, 11, 10, 11, 12, 12, 10, 10, 11, 11, 11, 11, + 10, 11, 12, 12, 10, 11, 11, 11, 11, 11, 11, 9, 10, 11, 11, 8, 9, 10, 11, + 11, 5, 10, 11, 12, 12, 10, 11, 11, 9, 10, 10, 8, 10, 11, 12, 12, 10, 11, + 11, 11, 11, 11, 11, 10, 10, 9, 9, 9, 11, 12, 13, 13, 12, 12, 12, 12, 11, + 11, 11, 11, 10, 10, 5, 5, 5, 9, 10, 11, 12, 12, 11, 11, 11, 12, 12, 11, + 11, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11, 10, 12, 12, 12, 12, 11, 12, + 12, 11, 11, 10, 10, 9, 10, 10, 10, 11, 11, 11, 11, 11, 11, 10, 11, 12, 12, + 10, 11, 11, 7, 9, 9, 10, 11, 11, 10, 10, 7, 7, 7, 10, 11, 11, 10, 10, + 10, 10, 10, 11, 12, 12, 7, 7, 7, 7, 7, 10, 11, 12, 12, 10, 11, 11, 10, + 11, 11, 10, 11, 11, 7, 10, 10, 10, 10, 9, 10, 10, 7, 10, 10, 10, 11, 11, + 10, 10, 10, 11, 12, 12, 7, 10, 11, 11, 10, 11, 11, 9, 10, 10, 11, 11, 11, + 11, 11, 11, 11, 11, 9, 10, 11, 11, 10, 10, 10, 10, 9, 11, 11, 11, 11, 10, + 11, 11, 10, 11, 12, 12, 9, 10, 11, 11, 10, 11, 11, 10, 10, 10, 11, 12, 12, + 10, 11, 11, 10, 10, 10, 10, 9, 9, 10, 11, 11, 10, 10, 9, 11, 11, 11, 11, + 4, 4, 4, 4, }; -static const uint16_t on2avc_cb10_codes[ON2AVC_CB9_10_CODES] = { - 0x002E, 0x001A, 0x003C, 0x001F, 0x006E, 0x002E, - 0x00AE, 0x006F, 0x002A, 0x003E, 0x0014, 0x0016, - 0x0002, 0x000E, 0x004E, 0x00F7, 0x0042, 0x0027, - 0x00F6, 0x0046, 0x0014, 0x0008, 0x0032, 0x0016, - 0x0030, 0x0012, 0x0056, 0x0018, 0x005F, 0x00DE, - 0x006E, 0x0036, 0x001A, 0x0023, 0x003D, 0x003F, - 0x007A, 0x008E, 0x0071, 0x0006, 0x0012, 0x000F, - 0x0043, 0x003E, 0x00AE, 0x0001, 0x00AB, 0x00C7, - 0x0013, 0x000A, 0x0002, 0x01CA, 0x0003, 0x0000, - 0x000F, 0x0022, 0x0016, 0x002A, 0x007F, 0x001C, - 0x0036, 0x00AF, 0x00C6, 0x000E, 0x0010, 0x0006, - 0x008F, 0x001E, 0x0054, 0x000D, 0x00AA, 0x0056, - 0x00AC, 0x001D, 0x0076, 0x0013, 0x004F, 0x0057, - 0x00E6, 0x00EE, 0x000E, 0x01CB, 0x00AF, 0x000B, - 0x0007, 0x00EF, 0x00AD, 0x00E4, 0x0008, 0x005E, - 0x0070, 0x001E, 0x00DF, 0x000C, 0x007E, 0x00CE, - 0x0002, 0x001A, 0x003C, 0x0002, 0x0020, 0x003A, - 0x004D, 0x00CF, 0x0066, 0x0026, 0x002F, 0x001F, - 0x0022, 0x001B, 0x0012, 0x000E, 0x0017, 0x0062, - 0x00E7, 0x0019, 0x0014, 0x0006, 0x004C, 0x0012, - 0x000C, +static const uint8_t on2avc_cb13_bits[ON2AVC_CB_13_CODES] = { + 1, 8, 10, 10, 10, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 13, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 12, 12, 9, 12, 12, 12, 12, 11, 12, 12, 8, 9, 10, 11, + 12, 12, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 11, 12, 12, 11, 11, 10, 11, 12, 13, 13, 11, 11, 11, 11, 11, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 8, 8, 8, 13, 13, 13, 13, 13, 13, + 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 5, 8, 11, 12, 12, + 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 10, 11, 11, 10, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 10, 11, 11, 8, 8, 11, 11, 11, 11, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 14, 14, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 5, 5, 5, 11, 11, 11, 11, 10, 11, 11, 11, 11, + 11, 11, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, + 11, 11, 11, 11, 11, 10, 11, 11, 11, 11, 11, 11, 10, 11, 13, 14, 16, 16, 16, + 16, 13, 13, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 12, 12, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 11, 12, 12, 11, 11, 10, 11, 12, 15, 15, 15, 15, 14, 14, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 14, 14, 14, 14, 14, 14, 14, 14, 13, 14, 14, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 10, 11, 11, + 10, 11, 12, 13, 14, 15, 15, 11, 11, 11, 11, 11, 11, 11, 11, 10, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, 11, + 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 11, 12, 13, 13, 11, 11, 11, 11, 11, + 11, 10, 11, 11, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 5, 12, 12, + 12, 12, 11, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 11, + 12, 13, 14, 14, 10, 11, 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 10, 10, 10, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, + 10, 11, 11, 10, 10, 5, 5, 5, 7, 8, 10, 10, 11, 12, 14, 14, 14, 14, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 8, 9, 9, }; -static const uint8_t on2avc_cb10_bits[ON2AVC_CB9_10_CODES] = { - 6, 5, 6, 8, 9, 8, - 8, 9, 8, 6, 5, 5, - 5, 6, 7, 8, 7, 7, - 8, 7, 6, 5, 6, 6, - 6, 7, 8, 7, 7, 8, - 7, 6, 6, 8, 7, 7, - 7, 8, 7, 8, 9, 8, - 7, 7, 9, 9, 8, 8, - 9, 8, 9, 9, 9, 9, - 9, 8, 7, 7, 7, 8, - 8, 9, 8, 8, 7, 6, - 8, 7, 7, 8, 8, 9, - 8, 8, 7, 7, 7, 9, - 8, 8, 9, 9, 8, 8, - 9, 8, 8, 8, 8, 7, - 7, 8, 8, 8, 7, 8, - 8, 7, 7, 7, 6, 6, - 7, 8, 7, 7, 8, 7, - 6, 6, 5, 5, 6, 7, - 8, 7, 7, 9, 7, 6, - 5, +static const uint8_t on2avc_cb14_bits[ON2AVC_CB_14_CODES] = { + 1, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, + 11, 11, 11, 11, 11, 11, 6, 8, 10, 11, 11, 10, 11, 12, 13, 13, 8, 11, 11, + 11, 11, 10, 10, 6, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 9, + 10, 10, 8, 8, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 5, 8, 10, 11, 11, 10, 11, + 12, 13, 13, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 5, 5, 5, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 10, 11, 11, 9, 10, 10, 9, 10, 10, 10, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 9, 10, 12, 12, 12, + 12, 9, 9, 9, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, + 10, 7, 9, 10, 10, 9, 9, 7, 9, 10, 10, 10, 10, 10, 10, 8, 9, 10, 11, + 11, 8, 9, 11, 11, 11, 11, 8, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 10, 10, 10, 10, 10, 10, 9, 10, 10, 9, 9, 9, 10, 10, 9, 9, 5, 9, + 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, }; -#define ON2AVC_CB11_CODES 225 -static const uint16_t on2avc_cb11_codes[ON2AVC_CB11_CODES] = { - 0x0000, 0x000E, 0x0056, 0x00CD, 0x0173, 0x0232, - 0x00C7, 0x014F, 0x01AA, 0x00BE, 0x026F, 0x0192, - 0x00BC, 0x0058, 0x000F, 0x000C, 0x0010, 0x004E, - 0x0082, 0x0142, 0x01BF, 0x0098, 0x015E, 0x0136, - 0x0086, 0x01BB, 0x014E, 0x00BA, 0x003E, 0x0012, - 0x0054, 0x0036, 0x0050, 0x008F, 0x014B, 0x0262, - 0x00AA, 0x015C, 0x013E, 0x00B7, 0x02BE, 0x0176, - 0x00A2, 0x0058, 0x003C, 0x00C2, 0x00A6, 0x008A, - 0x00B2, 0x0122, 0x02AC, 0x00CA, 0x012F, 0x014A, - 0x00DC, 0x02DE, 0x017A, 0x0134, 0x0092, 0x00B4, - 0x0166, 0x0148, 0x016E, 0x013F, 0x0134, 0x02FF, - 0x014F, 0x019E, 0x0267, 0x016C, 0x02A6, 0x02CE, - 0x013A, 0x010A, 0x0108, 0x026E, 0x02CB, 0x028E, - 0x02CF, 0x020F, 0x02DF, 0x010B, 0x02AD, 0x0227, - 0x018A, 0x04DB, 0x02A7, 0x02FE, 0x0236, 0x026C, - 0x00C6, 0x009C, 0x00C4, 0x00CE, 0x00D6, 0x0135, - 0x0156, 0x025A, 0x02FF, 0x0286, 0x015F, 0x0132, - 0x00D7, 0x00AC, 0x00A2, 0x0176, 0x0118, 0x0123, - 0x0157, 0x01BC, 0x02AE, 0x02EE, 0x04DA, 0x0467, - 0x033F, 0x0287, 0x0193, 0x0182, 0x013B, 0x0112, - 0x0133, 0x017D, 0x0117, 0x0186, 0x026E, 0x025B, - 0x02EF, 0x0466, 0x0316, 0x0237, 0x02F6, 0x01BA, - 0x015D, 0x012E, 0x015A, 0x014A, 0x008E, 0x00B6, - 0x0135, 0x0100, 0x017B, 0x028C, 0x033E, 0x0297, - 0x015B, 0x0102, 0x0140, 0x00D4, 0x00BA, 0x0088, - 0x02EE, 0x0283, 0x02BF, 0x020E, 0x02CE, 0x0317, - 0x0172, 0x0296, 0x026F, 0x0101, 0x02CF, 0x02F7, - 0x01BD, 0x02EF, 0x028F, 0x0263, 0x0164, 0x011A, - 0x0147, 0x0292, 0x02FE, 0x015E, 0x02AF, 0x01AB, - 0x0130, 0x02CA, 0x0183, 0x014E, 0x017C, 0x017E, - 0x00C8, 0x00AA, 0x009E, 0x0132, 0x0152, 0x0226, - 0x00CC, 0x017E, 0x0187, 0x00CB, 0x0293, 0x0106, - 0x00C0, 0x0087, 0x00BC, 0x005C, 0x003D, 0x005A, - 0x00A8, 0x0103, 0x028D, 0x00A4, 0x0116, 0x0146, - 0x00B8, 0x01BE, 0x016D, 0x0093, 0x004A, 0x003F, - 0x000D, 0x0011, 0x004F, 0x00AE, 0x0166, 0x0266, - 0x0090, 0x0109, 0x012C, 0x00A6, 0x0282, 0x017A, - 0x00B5, 0x0034, 0x000E, +static const uint8_t on2avc_cb15_bits[ON2AVC_CB_15_CODES] = { + 2, 5, 8, 8, 12, 12, 12, 12, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 12, 12, 11, 11, 11, 11, 8, 11, 12, 13, 14, 14, 11, 12, 12, 11, + 11, 11, 11, 11, 11, 11, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 13, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 5, 5, 5, 6, 6, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 11, + 11, 11, 11, 11, 11, 11, 11, 10, 11, 12, 12, 10, 11, 12, 12, 11, 12, 13, 14, + 17, 17, 17, 17, 16, 16, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 11, 12, 12, 10, 11, 11, 9, 9, 9, 11, 11, 12, 12, 12, 12, 11, 12, 12, + 11, 11, 11, 11, 11, 11, 9, 10, 11, 11, 9, 10, 11, 11, 16, 16, 16, 16, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 9, 12, 13, 13, 12, 12, 11, 12, + 13, 14, 14, 11, 12, 12, 12, 12, 12, 12, 10, 11, 12, 12, 9, 10, 11, 11, 10, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 11, 12, 12, 11, 11, 10, + 11, 12, 12, 9, 11, 11, 11, 11, 10, 11, 11, 10, 10, 12, 12, 12, 12, 12, 12, + 12, 12, 10, 11, 12, 12, 9, 10, 11, 12, 14, 14, 14, 14, 9, 10, 11, 11, 9, + 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 9, 11, 12, 12, 12, + 12, 12, 12, 9, 9, 8, 12, 12, 12, 12, 11, 11, 10, 10, 5, 9, 10, 11, 13, + 13, 13, 13, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 9, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 8, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, + 12, 11, 11, 10, 11, 11, 10, 10, 5, 5, 5, 5, 5, 7, 10, 10, 10, 10, 10, + 12, 13, 15, 15, 15, 15, 12, 12, 10, 10, 8, 10, 10, 12, 12, 12, 12, 12, 12, + 12, 12, 8, 12, 12, 12, 12, 12, 12, 12, 12, 10, 11, 12, 12, 10, 10, 10, 11, + 11, 10, 10, 10, 10, 9, 10, 10, 14, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 13, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 11, 12, 12, 10, 10, 10, 11, 12, 12, 9, 10, 10, 9, 11, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 11, 12, 12, 10, 11, 11, 10, 11, 11, + 9, 10, 10, 7, 10, 11, 13, 14, 14, 13, 13, 10, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, + 12, 12, 10, 11, 11, 10, 10, 10, 11, 12, 12, 7, 10, 10, 10, 10, 10, 10, 10, + 10, 7, 9, 10, 10, 10, 10, 10, 10, 7, 7, 7, 10, 10, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 7, + 10, 10, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 7, 10, 10, 10, 10, 9, 10, + 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 14, 14, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, + 11, 10, 11, 11, 10, 10 }; -static const uint8_t on2avc_cb11_bits[ON2AVC_CB11_CODES] = { - 2, 4, 7, 9, 10, 11, - 9, 10, 10, 9, 11, 10, - 9, 7, 4, 4, 5, 7, - 9, 9, 10, 9, 10, 10, - 9, 10, 9, 8, 7, 5, - 7, 7, 8, 9, 9, 10, - 9, 10, 10, 9, 10, 9, - 9, 8, 7, 9, 8, 9, - 9, 10, 10, 9, 10, 10, - 9, 10, 10, 9, 9, 8, - 10, 9, 9, 10, 10, 10, - 9, 10, 10, 9, 11, 10, - 10, 10, 10, 11, 10, 10, - 10, 11, 10, 10, 10, 11, - 10, 11, 11, 10, 11, 10, - 9, 9, 9, 9, 9, 10, - 10, 11, 11, 10, 10, 10, - 9, 9, 8, 10, 10, 10, - 10, 10, 10, 10, 11, 12, - 11, 10, 10, 10, 10, 10, - 10, 9, 10, 10, 10, 11, - 11, 12, 11, 11, 10, 10, - 10, 10, 10, 9, 9, 9, - 9, 10, 10, 10, 11, 11, - 10, 10, 9, 9, 9, 9, - 11, 10, 10, 11, 11, 11, - 10, 11, 10, 10, 11, 10, - 10, 10, 10, 10, 9, 10, - 10, 10, 11, 9, 10, 10, - 9, 10, 10, 10, 9, 9, - 9, 8, 9, 9, 10, 11, - 9, 10, 10, 9, 10, 10, - 9, 9, 8, 7, 7, 8, - 9, 10, 10, 9, 10, 10, - 9, 10, 9, 9, 8, 7, - 4, 5, 7, 8, 9, 10, - 9, 10, 10, 9, 10, 9, - 8, 7, 5, +static const uint16_t on2avc_cb_1_syms[ON2AVC_CB_1_2_CODES] = { + 0x0000, 0x0F10, 0x01F0, 0x0011, 0xFF00, 0x00FF, 0x1111, 0xFFFF, 0x1FF1, + 0xF11F, 0x11FF, 0xFF11, 0x0FF0, 0x0110, 0xF010, 0x010F, 0x10F0, 0x0F01, + 0x1010, 0xF001, 0x0F0F, 0xF0F0, 0x0101, 0x100F, 0xF00F, 0x1001, 0x1F00, + 0x00F1, 0x001F, 0xF100, 0x1100, 0xF1F1, 0xF1FF, 0x1F11, 0xFF1F, 0x11F1, + 0x1F1F, 0x1FFF, 0xF111, 0xFFF1, 0x111F, }; -static const uint16_t on2avc_cb11_syms[ON2AVC_CB11_CODES] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x00F9, 0x00FA, 0x00FB, 0x00FC, - 0x00FD, 0x00FE, 0x00FF, 0x0100, 0x0101, 0x0102, - 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0x01F9, - 0x01FA, 0x01FB, 0x01FC, 0x01FD, 0x01FE, 0x01FF, - 0x0200, 0x0201, 0x0202, 0x0203, 0x0204, 0x0205, - 0x0206, 0x0207, 0x02F9, 0x02FA, 0x02FB, 0x02FC, - 0x02FD, 0x02FE, 0x02FF, 0x0300, 0x0301, 0x0302, - 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, 0x03F9, - 0x03FA, 0x03FB, 0x03FC, 0x03FD, 0x03FE, 0x03FF, - 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, - 0x0406, 0x0407, 0x04F9, 0x04FA, 0x04FB, 0x04FC, - 0x04FD, 0x04FE, 0x04FF, 0x0500, 0x0501, 0x0502, - 0x0503, 0x0504, 0x0505, 0x0506, 0x0507, 0x05F9, - 0x05FA, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF, - 0x0600, 0x0601, 0x0602, 0x0603, 0x0604, 0x0605, - 0x0606, 0x0607, 0x06F9, 0x06FA, 0x06FB, 0x06FC, - 0x06FD, 0x06FE, 0x06FF, 0x0700, 0x0701, 0x0702, - 0x0703, 0x0704, 0x0705, 0x0706, 0x0707, 0x07F9, - 0x07FA, 0x07FB, 0x07FC, 0x07FD, 0x07FE, 0x07FF, - 0xF900, 0xF901, 0xF902, 0xF903, 0xF904, 0xF905, - 0xF906, 0xF907, 0xF9F9, 0xF9FA, 0xF9FB, 0xF9FC, - 0xF9FD, 0xF9FE, 0xF9FF, 0xFA00, 0xFA01, 0xFA02, - 0xFA03, 0xFA04, 0xFA05, 0xFA06, 0xFA07, 0xFAF9, - 0xFAFA, 0xFAFB, 0xFAFC, 0xFAFD, 0xFAFE, 0xFAFF, - 0xFB00, 0xFB01, 0xFB02, 0xFB03, 0xFB04, 0xFB05, - 0xFB06, 0xFB07, 0xFBF9, 0xFBFA, 0xFBFB, 0xFBFC, - 0xFBFD, 0xFBFE, 0xFBFF, 0xFC00, 0xFC01, 0xFC02, - 0xFC03, 0xFC04, 0xFC05, 0xFC06, 0xFC07, 0xFCF9, - 0xFCFA, 0xFCFB, 0xFCFC, 0xFCFD, 0xFCFE, 0xFCFF, - 0xFD00, 0xFD01, 0xFD02, 0xFD03, 0xFD04, 0xFD05, - 0xFD06, 0xFD07, 0xFDF9, 0xFDFA, 0xFDFB, 0xFDFC, - 0xFDFD, 0xFDFE, 0xFDFF, 0xFE00, 0xFE01, 0xFE02, - 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07, 0xFEF9, - 0xFEFA, 0xFEFB, 0xFEFC, 0xFEFD, 0xFEFE, 0xFEFF, - 0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, - 0xFF06, 0xFF07, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, - 0xFFFD, 0xFFFE, 0xFFFF, +static const uint16_t on2avc_cb_2_syms[ON2AVC_CB_1_2_CODES] = { + 0x00FF, 0xFFFF, 0x1111, 0x11FF, 0xFF11, 0xFF00, 0x0011, 0x100F, 0x1FF1, + 0xF11F, 0x1FFF, 0x11F1, 0xF001, 0x10F0, 0x0F10, 0x010F, 0xF010, 0x1F11, + 0xF111, 0xF1FF, 0x111F, 0x0F01, 0x01F0, 0x0110, 0x1001, 0x0FF0, 0xF00F, + 0x1010, 0xF0F0, 0x0101, 0x0F0F, 0x1100, 0xFFF1, 0xFF1F, 0x1F1F, 0xF1F1, + 0x0000, 0xF100, 0x1F00, 0x00F1, 0x001F, }; -#define ON2AVC_CB12_CODES 441 -static const uint16_t on2avc_cb12_codes[ON2AVC_CB12_CODES] = { - 0x0000, 0x000C, 0x004F, 0x0156, 0x02E6, 0x0462, - 0x044C, 0x086A, 0x0222, 0x0228, 0x047F, 0x037A, - 0x028F, 0x02B8, 0x0BB7, 0x04B7, 0x02DA, 0x0262, - 0x0124, 0x0052, 0x000F, 0x000D, 0x000E, 0x0058, - 0x00A2, 0x0129, 0x02C8, 0x0256, 0x044D, 0x016E, - 0x02AA, 0x02BE, 0x027F, 0x02A9, 0x016E, 0x0597, - 0x02EE, 0x02EE, 0x013A, 0x00A4, 0x004E, 0x000C, - 0x0056, 0x004B, 0x0058, 0x0125, 0x010E, 0x01A7, - 0x026A, 0x0415, 0x010C, 0x0228, 0x0446, 0x0232, - 0x017E, 0x0128, 0x0473, 0x035E, 0x026A, 0x015E, - 0x00DB, 0x005E, 0x0048, 0x017A, 0x00AE, 0x00BA, - 0x0172, 0x0229, 0x02FB, 0x0458, 0x05A4, 0x015A, - 0x0296, 0x05BE, 0x044E, 0x0216, 0x012A, 0x0423, - 0x053E, 0x02F0, 0x02F1, 0x011E, 0x0110, 0x009C, - 0x026B, 0x0112, 0x011B, 0x01B3, 0x01BF, 0x0263, - 0x057E, 0x04B8, 0x016B, 0x02DE, 0x04DE, 0x0416, - 0x02DB, 0x02AB, 0x06EE, 0x04CF, 0x025F, 0x02EB, - 0x022A, 0x011A, 0x010A, 0x05A5, 0x0238, 0x0217, - 0x02D6, 0x025A, 0x0282, 0x044F, 0x043D, 0x01AE, - 0x026B, 0x05C2, 0x043C, 0x044F, 0x02DB, 0x05A7, - 0x044E, 0x05BF, 0x0297, 0x022A, 0x026C, 0x02BD, - 0x0897, 0x0283, 0x02B6, 0x02B7, 0x0264, 0x0459, - 0x040B, 0x04DF, 0x0298, 0x0456, 0x0AFF, 0x06B7, - 0x0448, 0x0449, 0x08BE, 0x06EF, 0x04B9, 0x0597, - 0x049A, 0x02D2, 0x02F8, 0x08F7, 0x0476, 0x0452, - 0x0453, 0x045A, 0x05BE, 0x043E, 0x04D2, 0x02F2, - 0x02E4, 0x0477, 0x0AFE, 0x05A6, 0x02E3, 0x0BB6, - 0x0A7E, 0x05A6, 0x0A66, 0x08BF, 0x05FF, 0x0492, - 0x0170, 0x0106, 0x0140, 0x0142, 0x022E, 0x02CF, - 0x02B9, 0x02E2, 0x02F3, 0x05A0, 0x088E, 0x0DD7, - 0x04F6, 0x047E, 0x045B, 0x0347, 0x029E, 0x026D, - 0x01AC, 0x013B, 0x0104, 0x035F, 0x02EC, 0x026E, - 0x0233, 0x0207, 0x023E, 0x026E, 0x053F, 0x05A7, - 0x0456, 0x04AE, 0x0DD6, 0x0A67, 0x0493, 0x04BA, - 0x05D3, 0x05C3, 0x0246, 0x0247, 0x0202, 0x02E8, - 0x05AE, 0x0374, 0x0537, 0x05C6, 0x04BB, 0x0686, - 0x04D3, 0x04DE, 0x08C3, 0x05BF, 0x04F7, 0x14FB, - 0x0997, 0x0A7F, 0x08C2, 0x0417, 0x0434, 0x0477, - 0x037B, 0x0463, 0x02EF, 0x0592, 0x02E5, 0x049B, - 0x035A, 0x0436, 0x05AF, 0x0687, 0x0896, 0x095F, - 0x09BE, 0x0996, 0x0558, 0x088F, 0x0B8E, 0x057E, - 0x04CA, 0x05CE, 0x05F3, 0x047A, 0x05A1, 0x02E2, - 0x02FA, 0x0204, 0x022C, 0x020E, 0x0360, 0x02AE, - 0x05FC, 0x0457, 0x05DA, 0x086B, 0x14FA, 0x04B6, - 0x02FE, 0x040A, 0x02E6, 0x0576, 0x044A, 0x028C, - 0x0212, 0x0248, 0x02E0, 0x029A, 0x0126, 0x017E, - 0x0130, 0x024C, 0x0232, 0x0596, 0x0378, 0x053A, - 0x04CC, 0x0A7C, 0x0470, 0x0593, 0x02D8, 0x029C, - 0x02D9, 0x02BE, 0x01A0, 0x014E, 0x0120, 0x013C, - 0x06EC, 0x04CD, 0x0559, 0x06B6, 0x0420, 0x057F, - 0x0596, 0x09BF, 0x0532, 0x055A, 0x095E, 0x08BC, - 0x0472, 0x02CA, 0x05F2, 0x05FD, 0x047E, 0x05A2, - 0x06EA, 0x05CF, 0x04D2, 0x043F, 0x028E, 0x0422, - 0x0460, 0x05DE, 0x053B, 0x08F6, 0x0B8F, 0x02CE, - 0x0473, 0x06ED, 0x0421, 0x028D, 0x023C, 0x047F, - 0x05A3, 0x044C, 0x044D, 0x0457, 0x02CA, 0x02D8, - 0x027C, 0x029E, 0x023E, 0x027D, 0x0361, 0x0414, - 0x05BC, 0x08BD, 0x02DA, 0x024A, 0x0437, 0x055B, - 0x0379, 0x01BE, 0x05DF, 0x04D3, 0x0268, 0x0206, - 0x0213, 0x02BA, 0x0203, 0x0236, 0x0127, 0x0136, - 0x0268, 0x0242, 0x02CF, 0x05FE, 0x05D2, 0x0237, - 0x0243, 0x0472, 0x0362, 0x027A, 0x02AE, 0x0471, - 0x0474, 0x024B, 0x02AF, 0x01A6, 0x012C, 0x0166, - 0x0166, 0x00A6, 0x00AC, 0x0100, 0x01B2, 0x020F, - 0x0363, 0x0446, 0x016A, 0x022E, 0x0577, 0x02FF, - 0x022D, 0x0168, 0x0475, 0x027E, 0x0222, 0x01A2, - 0x017B, 0x00D2, 0x00BE, 0x0050, 0x0054, 0x006A, - 0x011A, 0x0143, 0x024F, 0x02E7, 0x0447, 0x0110, - 0x0233, 0x02D9, 0x02AF, 0x024E, 0x016A, 0x0536, - 0x0342, 0x02BC, 0x0176, 0x00DA, 0x0054, 0x004A, - 0x000E, 0x0010, 0x004C, 0x00DC, 0x0164, 0x023A, - 0x0476, 0x04CE, 0x0118, 0x02CE, 0x025E, 0x0346, - 0x02A8, 0x0122, 0x05BD, 0x022F, 0x02EA, 0x014A, - 0x00AA, 0x0051, 0x000F, +static const uint16_t on2avc_cb_3_syms[ON2AVC_CB_3_4_CODES] = { + 0x0000, 0xE000, 0x0F10, 0x000E, 0x01F2, 0x0F1E, 0xEE00, 0x1021, 0x22E0, + 0x02E2, 0xE1F2, 0xEEE0, 0xE2E2, 0xE20E, 0x0FEF, 0x2200, 0x0002, 0xF2F0, + 0xFFFF, 0x1E10, 0x00E2, 0xFE0F, 0x0EE2, 0x022E, 0xF001, 0xF111, 0x20F1, + 0x1F02, 0xFFEE, 0xE2F1, 0xF221, 0xE121, 0xEEEE, 0x20EE, 0x2FFE, 0x1201, + 0xE011, 0x1EF0, 0x0F2F, 0x0101, 0xFE10, 0x002E, 0xE01F, 0xE220, 0x1E21, + 0xE110, 0xF210, 0x100F, 0x1010, 0x0F0F, 0x0F01, 0x1001, 0xF010, 0x10F0, + 0xF00F, 0x010F, 0x2FF0, 0xF10E, 0x2EE0, 0x0E02, 0x2FEF, 0x110E, 0xF2EF, + 0xE020, 0x1EF2, 0x01EF, 0x12F0, 0xF0F0, 0x0FF0, 0x0110, 0x01E1, 0x0F21, + 0x012F, 0xFF20, 0xFF02, 0x0220, 0x011E, 0x0FF2, 0x0FE1, 0xF120, 0xE12F, + 0xE11E, 0xE0E2, 0x2E0E, 0x22EE, 0x202E, 0xFEF2, 0x21E1, 0x02EE, 0xFE12, + 0x2E22, 0x1FE0, 0x12E1, 0xFFE2, 0x1EEF, 0xE0E0, 0xE1EF, 0x0222, 0x21FE, + 0x0E11, 0x20FF, 0xFE2F, 0xF1EE, 0x01FE, 0xF1E0, 0x0E1F, 0x11E0, 0x1F0E, + 0x0EE0, 0x02FF, 0x0EF1, 0x0F12, 0x00EE, 0xF21E, 0xFE1E, 0x2020, 0xEE20, + 0x121E, 0x1F22, 0xEF2F, 0x0EEE, 0xE2E0, 0x2F10, 0x1F20, 0x021F, 0xE1F0, + 0x02F1, 0x0022, 0x001F, 0xF100, 0x1F00, 0x00F1, 0x0E00, 0xE0F1, 0x12EF, + 0x0202, 0xE022, 0x2E02, 0x2121, 0x212F, 0x201F, 0xFEE1, 0xEF21, 0x21EF, + 0xF102, 0xE1E1, 0x21F2, 0x220E, 0xE02E, 0x12FE, 0x2F2F, 0xFF0E, 0x2011, + 0x0200, 0x2110, 0xE10F, 0x10F2, 0x00E0, 0x0020, 0x2F0F, 0xF0F2, 0xF01E, + 0xF22F, 0xFE21, 0x1EE1, 0x2220, 0x2222, 0xEF1E, 0x2F12, 0xEFF0, 0x102F, + 0x1102, 0x112E, 0xEE1F, 0x0011, 0xF11F, 0x101E, 0xF02F, 0x1FF1, 0xF0E1, + 0x122F, 0x2FE1, 0x0E0E, 0x222E, 0xEE0E, 0x2022, 0xE0EE, 0xE211, 0xF2F2, + 0x2112, 0xEE2E, 0x20E2, 0x1F1F, 0x10E1, 0xE0FF, 0x22F1, 0x2E20, 0x1EFE, + 0x2002, 0x1E0F, 0xF20F, 0xF1F1, 0xE101, 0x1FE2, 0xF122, 0x11EE, 0x1FEE, + 0x1E01, 0x120F, 0x21F0, 0xF201, 0xEEFF, 0x2EFF, 0x1E1E, 0x2F1E, 0x2EE2, + 0xE2EE, 0x10EF, 0x1120, 0x210F, 0x2F01, 0x0112, 0xEF10, 0xF1FF, 0xF021, + 0x22FF, 0xEFEF, 0xEFF2, 0xEE02, 0xEEE2, 0x2EEE, 0xFF22, 0x221F, 0x1F11, + 0xFE01, 0xEF01, 0x0FFE, 0x0EFF, 0x02E0, 0xFF00, 0x1100, 0x2000, 0x00FF, + 0x01F0, 0xFF1F, 0x11F1, 0xFEEF, 0xF12E, 0x12F2, 0xE112, 0x200E, 0x1F2E, + 0xFF2E, 0xEE11, 0x10FE, 0xF012, 0x2E00, 0xFFE0, 0x0E20, 0x1FFF, 0x0211, + 0x2211, 0x2EF1, 0xF212, 0xEFFE, 0xE1FE, 0xE200, 0xF0FE, 0x11E2, 0x2E11, + 0x20E0, 0xEF12, 0x2E2E, 0x22E2, 0xE22E, 0x2202, 0x1210, 0xEF0F, 0x2101, + 0x111F, 0xF0EF, 0x2E1F, 0xE21F, 0xEEF1, 0x11FF, 0x1012, 0xF1E2, 0x1E12, + 0x0E2E, 0x2FF2, 0xFF11, 0xFFF1, 0x0121, 0xF2E1, 0x020E, 0xEFE1, 0x211E, + 0xE00E, 0x1E2F, 0x1122, 0x1111, 0xFEF0, 0x1221, 0xE2FF, 0x1212, 0x2F21, + 0x0E22, 0xF2FE, 0xFEFE, 0xE002, 0xEE22, 0xE202, 0xE222, }; -static const uint8_t on2avc_cb12_bits[ON2AVC_CB12_CODES] = { - 2, 4, 7, 9, 10, 11, - 12, 13, 10, 11, 11, 11, - 11, 10, 12, 12, 11, 11, - 9, 7, 4, 4, 5, 7, - 9, 10, 10, 11, 12, 10, - 10, 11, 11, 10, 9, 12, - 11, 10, 10, 9, 7, 5, - 7, 7, 8, 9, 10, 10, - 11, 12, 10, 10, 11, 11, - 10, 10, 12, 11, 10, 10, - 9, 8, 7, 9, 9, 9, - 9, 10, 10, 11, 11, 10, - 11, 11, 11, 11, 10, 12, - 11, 10, 10, 10, 9, 9, - 10, 10, 10, 10, 10, 11, - 11, 12, 10, 11, 11, 12, - 11, 10, 12, 12, 11, 10, - 10, 10, 10, 11, 10, 11, - 10, 11, 11, 12, 12, 10, - 11, 11, 12, 11, 10, 12, - 12, 11, 11, 11, 10, 10, - 12, 11, 11, 11, 11, 11, - 12, 12, 10, 11, 12, 12, - 11, 11, 12, 12, 12, 11, - 11, 11, 10, 12, 12, 12, - 12, 11, 12, 12, 12, 10, - 11, 12, 12, 11, 11, 12, - 13, 12, 12, 12, 11, 12, - 10, 10, 10, 10, 10, 10, - 10, 10, 10, 11, 12, 13, - 12, 12, 11, 11, 11, 10, - 10, 10, 10, 11, 10, 10, - 11, 11, 11, 11, 11, 11, - 12, 12, 13, 12, 12, 12, - 11, 11, 11, 11, 11, 10, - 11, 11, 11, 11, 12, 12, - 12, 12, 12, 12, 12, 14, - 13, 13, 12, 12, 12, 11, - 11, 11, 11, 11, 11, 11, - 11, 12, 11, 12, 12, 13, - 12, 13, 12, 12, 12, 12, - 12, 11, 11, 11, 11, 11, - 10, 11, 11, 11, 11, 11, - 11, 12, 11, 13, 14, 12, - 11, 12, 11, 11, 11, 11, - 11, 11, 10, 10, 10, 9, - 10, 10, 10, 11, 11, 11, - 12, 13, 12, 11, 10, 10, - 10, 10, 10, 10, 10, 10, - 12, 12, 12, 12, 12, 12, - 12, 12, 11, 12, 13, 12, - 11, 10, 11, 11, 11, 11, - 12, 11, 11, 12, 11, 12, - 11, 11, 11, 12, 12, 11, - 11, 12, 12, 11, 10, 12, - 11, 11, 11, 11, 11, 11, - 11, 10, 10, 11, 11, 12, - 11, 12, 10, 11, 12, 12, - 11, 10, 11, 11, 11, 11, - 11, 10, 11, 10, 10, 10, - 10, 11, 11, 11, 11, 10, - 11, 12, 11, 11, 10, 12, - 11, 11, 10, 10, 10, 10, - 9, 9, 9, 10, 10, 11, - 11, 12, 10, 11, 11, 11, - 11, 10, 11, 11, 11, 10, - 9, 9, 9, 7, 7, 8, - 9, 10, 10, 11, 12, 10, - 10, 11, 11, 10, 9, 11, - 11, 10, 10, 9, 8, 7, - 4, 5, 7, 9, 10, 11, - 11, 12, 10, 10, 11, 11, - 10, 10, 11, 11, 10, 10, - 9, 7, 5, +static const uint16_t on2avc_cb_4_syms[ON2AVC_CB_3_4_CODES] = { + 0x1FF1, 0xF111, 0x111F, 0xF01E, 0xE011, 0x20FF, 0xFFEE, 0xF2FE, 0x220E, + 0x20EE, 0x0110, 0x0F01, 0x0011, 0xF1F1, 0x20F1, 0x2F0F, 0x10F2, 0x110E, + 0xF010, 0xF001, 0x10F0, 0xFFF1, 0xFF02, 0xE01F, 0x021F, 0xFE01, 0x010F, + 0x0FF0, 0x1001, 0x1FFF, 0x1F1F, 0x100F, 0xF00F, 0x2101, 0x1F02, 0xE10F, + 0xFFE2, 0xEE02, 0x0E20, 0x2F12, 0x1EFE, 0x1FE0, 0xF10E, 0x120F, 0x21F2, + 0xEFF2, 0xEFEF, 0x2E20, 0xE022, 0xFF1F, 0x10EF, 0x0EF1, 0xF0FE, 0xF120, + 0x1F11, 0x02FF, 0xEF0F, 0xE101, 0xEF1E, 0xE112, 0xEFE1, 0xF212, 0xF1FF, + 0x101E, 0xF20F, 0xE000, 0x10E1, 0xF100, 0x001F, 0x1F00, 0x11F1, 0xFE0F, + 0xF021, 0x1E01, 0xE1EF, 0x2F21, 0x212F, 0x12F2, 0x0101, 0x0E00, 0x0E11, + 0xF0F2, 0x11E0, 0x201F, 0xF02F, 0x1E0F, 0x1201, 0x0F0F, 0x00F1, 0x1010, + 0xF0F0, 0x0F10, 0x0EFF, 0x2011, 0x0E1F, 0xFE1E, 0x2FFE, 0xE1FE, 0x211E, + 0x0200, 0xE0F1, 0xFF20, 0xF1E0, 0x01F0, 0xFFE0, 0xEEF1, 0x2E00, 0xE0E2, + 0x2EE0, 0x02E2, 0xE22E, 0x0211, 0xF201, 0x1F20, 0xF102, 0x02F1, 0x1021, + 0x1102, 0xE020, 0xE20E, 0xE200, 0x20E0, 0x22EE, 0xE2E0, 0xFF0E, 0xF0E1, + 0x1F0E, 0x102F, 0x1120, 0xE0FF, 0xF0EF, 0x0E02, 0x2EE2, 0x0E2E, 0x2E02, + 0x002E, 0x20E2, 0xEE22, 0x2000, 0xF122, 0x1FEE, 0x21FE, 0x020E, 0x2EEE, + 0x00E2, 0x221F, 0x2E1F, 0x0F1E, 0xEF12, 0xE2F1, 0x0F12, 0x01FE, 0xE110, + 0x2FF0, 0xF2F0, 0x0F2F, 0x1E10, 0x000E, 0x01F2, 0x22E2, 0xE2EE, 0xE02E, + 0x2E0E, 0x200E, 0x222E, 0xEE2E, 0x01E1, 0x011E, 0x0020, 0x01EF, 0xF210, + 0xF1E2, 0x1E2F, 0xFFFF, 0x0F21, 0xE21F, 0x22FF, 0x12F0, 0x0002, 0x012F, + 0xEE11, 0xE12F, 0x0FF2, 0xF2E1, 0x1F2E, 0x0000, 0x1111, 0x1EF0, 0x2E11, + 0x2002, 0x02E0, 0xE0EE, 0x00E0, 0x2FEF, 0xFE12, 0xFE10, 0x1EEF, 0x2020, + 0x0EE0, 0xF22F, 0xEEEE, 0x2EF1, 0x2220, 0xEE0E, 0xEEE2, 0x0FE1, 0x12FE, + 0xE2FF, 0x22F1, 0xE002, 0x202E, 0x2202, 0x21EF, 0x1EF2, 0x2110, 0x11EE, + 0x12E1, 0x2FE1, 0xF21E, 0xEFF0, 0x2EFF, 0xE211, 0xFEE1, 0x2FF2, 0xFE2F, + 0x1FE2, 0xFE21, 0x21E1, 0xEF21, 0xE0E0, 0x2022, 0xE220, 0x0E22, 0x2E22, + 0xF2EF, 0xFEF2, 0x0112, 0xE11E, 0xF221, 0x1EE1, 0xE00E, 0xE202, 0xE222, + 0xF012, 0x122F, 0x11E2, 0xF12E, 0x2F2F, 0x0FEF, 0x0FFE, 0xEF01, 0xFF22, + 0x2222, 0x121E, 0x2E2E, 0x0222, 0x1210, 0x210F, 0x2F10, 0x1212, 0x112E, + 0xEF2F, 0xEEE0, 0x0022, 0xFEF0, 0xFEFE, 0x0EEE, 0x0202, 0xEE1F, 0xF1EE, + 0x0121, 0x10FE, 0xEF10, 0x2F1E, 0x2121, 0xFF2E, 0x1E21, 0x21F0, 0xE121, + 0x0E0E, 0xE2E2, 0x1E1E, 0xF2F2, 0x2F01, 0x2211, 0x1E12, 0x0220, 0x22E0, + 0x0EE2, 0x02EE, 0x022E, 0x1221, 0xEFFE, 0xE1E1, 0x12EF, 0x00EE, 0x2200, + 0x2112, 0xE1F2, 0xFF11, 0x11FF, 0x1100, 0x00FF, 0xFF00, 0xF11F, 0xE1F0, + 0xFEEF, 0xEEFF, 0x1012, 0x1122, 0x1F22, 0xEE00, 0xEE20, }; -static const uint16_t on2avc_cb12_syms[ON2AVC_CB12_CODES] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x00F6, - 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, - 0x00FD, 0x00FE, 0x00FF, 0x0100, 0x0101, 0x0102, - 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0x0108, - 0x0109, 0x010A, 0x01F6, 0x01F7, 0x01F8, 0x01F9, - 0x01FA, 0x01FB, 0x01FC, 0x01FD, 0x01FE, 0x01FF, - 0x0200, 0x0201, 0x0202, 0x0203, 0x0204, 0x0205, - 0x0206, 0x0207, 0x0208, 0x0209, 0x020A, 0x02F6, - 0x02F7, 0x02F8, 0x02F9, 0x02FA, 0x02FB, 0x02FC, - 0x02FD, 0x02FE, 0x02FF, 0x0300, 0x0301, 0x0302, - 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, 0x0308, - 0x0309, 0x030A, 0x03F6, 0x03F7, 0x03F8, 0x03F9, - 0x03FA, 0x03FB, 0x03FC, 0x03FD, 0x03FE, 0x03FF, - 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, - 0x0406, 0x0407, 0x0408, 0x0409, 0x040A, 0x04F6, - 0x04F7, 0x04F8, 0x04F9, 0x04FA, 0x04FB, 0x04FC, - 0x04FD, 0x04FE, 0x04FF, 0x0500, 0x0501, 0x0502, - 0x0503, 0x0504, 0x0505, 0x0506, 0x0507, 0x0508, - 0x0509, 0x050A, 0x05F6, 0x05F7, 0x05F8, 0x05F9, - 0x05FA, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF, - 0x0600, 0x0601, 0x0602, 0x0603, 0x0604, 0x0605, - 0x0606, 0x0607, 0x0608, 0x0609, 0x060A, 0x06F6, - 0x06F7, 0x06F8, 0x06F9, 0x06FA, 0x06FB, 0x06FC, - 0x06FD, 0x06FE, 0x06FF, 0x0700, 0x0701, 0x0702, - 0x0703, 0x0704, 0x0705, 0x0706, 0x0707, 0x0708, - 0x0709, 0x070A, 0x07F6, 0x07F7, 0x07F8, 0x07F9, - 0x07FA, 0x07FB, 0x07FC, 0x07FD, 0x07FE, 0x07FF, - 0x0800, 0x0801, 0x0802, 0x0803, 0x0804, 0x0805, - 0x0806, 0x0807, 0x0808, 0x0809, 0x080A, 0x08F6, - 0x08F7, 0x08F8, 0x08F9, 0x08FA, 0x08FB, 0x08FC, - 0x08FD, 0x08FE, 0x08FF, 0x0900, 0x0901, 0x0902, - 0x0903, 0x0904, 0x0905, 0x0906, 0x0907, 0x0908, - 0x0909, 0x090A, 0x09F6, 0x09F7, 0x09F8, 0x09F9, - 0x09FA, 0x09FB, 0x09FC, 0x09FD, 0x09FE, 0x09FF, - 0x0A00, 0x0A01, 0x0A02, 0x0A03, 0x0A04, 0x0A05, - 0x0A06, 0x0A07, 0x0A08, 0x0A09, 0x0A0A, 0x0AF6, - 0x0AF7, 0x0AF8, 0x0AF9, 0x0AFA, 0x0AFB, 0x0AFC, - 0x0AFD, 0x0AFE, 0x0AFF, 0xF600, 0xF601, 0xF602, - 0xF603, 0xF604, 0xF605, 0xF606, 0xF607, 0xF608, - 0xF609, 0xF60A, 0xF6F6, 0xF6F7, 0xF6F8, 0xF6F9, - 0xF6FA, 0xF6FB, 0xF6FC, 0xF6FD, 0xF6FE, 0xF6FF, - 0xF700, 0xF701, 0xF702, 0xF703, 0xF704, 0xF705, - 0xF706, 0xF707, 0xF708, 0xF709, 0xF70A, 0xF7F6, - 0xF7F7, 0xF7F8, 0xF7F9, 0xF7FA, 0xF7FB, 0xF7FC, - 0xF7FD, 0xF7FE, 0xF7FF, 0xF800, 0xF801, 0xF802, - 0xF803, 0xF804, 0xF805, 0xF806, 0xF807, 0xF808, - 0xF809, 0xF80A, 0xF8F6, 0xF8F7, 0xF8F8, 0xF8F9, - 0xF8FA, 0xF8FB, 0xF8FC, 0xF8FD, 0xF8FE, 0xF8FF, - 0xF900, 0xF901, 0xF902, 0xF903, 0xF904, 0xF905, - 0xF906, 0xF907, 0xF908, 0xF909, 0xF90A, 0xF9F6, - 0xF9F7, 0xF9F8, 0xF9F9, 0xF9FA, 0xF9FB, 0xF9FC, - 0xF9FD, 0xF9FE, 0xF9FF, 0xFA00, 0xFA01, 0xFA02, - 0xFA03, 0xFA04, 0xFA05, 0xFA06, 0xFA07, 0xFA08, - 0xFA09, 0xFA0A, 0xFAF6, 0xFAF7, 0xFAF8, 0xFAF9, - 0xFAFA, 0xFAFB, 0xFAFC, 0xFAFD, 0xFAFE, 0xFAFF, - 0xFB00, 0xFB01, 0xFB02, 0xFB03, 0xFB04, 0xFB05, - 0xFB06, 0xFB07, 0xFB08, 0xFB09, 0xFB0A, 0xFBF6, - 0xFBF7, 0xFBF8, 0xFBF9, 0xFBFA, 0xFBFB, 0xFBFC, - 0xFBFD, 0xFBFE, 0xFBFF, 0xFC00, 0xFC01, 0xFC02, - 0xFC03, 0xFC04, 0xFC05, 0xFC06, 0xFC07, 0xFC08, - 0xFC09, 0xFC0A, 0xFCF6, 0xFCF7, 0xFCF8, 0xFCF9, - 0xFCFA, 0xFCFB, 0xFCFC, 0xFCFD, 0xFCFE, 0xFCFF, - 0xFD00, 0xFD01, 0xFD02, 0xFD03, 0xFD04, 0xFD05, - 0xFD06, 0xFD07, 0xFD08, 0xFD09, 0xFD0A, 0xFDF6, - 0xFDF7, 0xFDF8, 0xFDF9, 0xFDFA, 0xFDFB, 0xFDFC, - 0xFDFD, 0xFDFE, 0xFDFF, 0xFE00, 0xFE01, 0xFE02, - 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07, 0xFE08, - 0xFE09, 0xFE0A, 0xFEF6, 0xFEF7, 0xFEF8, 0xFEF9, - 0xFEFA, 0xFEFB, 0xFEFC, 0xFEFD, 0xFEFE, 0xFEFF, - 0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, - 0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFFF6, - 0xFFF7, 0xFFF8, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, - 0xFFFD, 0xFFFE, 0xFFFF, +static const uint16_t on2avc_cb_5_syms[ON2AVC_CB_5_6_CODES] = { + 0x0000, 0x1100, 0x3F00, 0xF1FF, 0x010D, 0x0F30, 0xFE30, 0x10FE, 0xD021, + 0xE23F, 0xE3EF, 0xFF33, 0xFF00, 0x03F0, 0x0301, 0xF1EE, 0xF3D1, 0xF30E, + 0x023D, 0xFEDE, 0xFE0F, 0x1F11, 0xF11D, 0x10E3, 0xEDF2, 0xEEEE, 0xEE1F, + 0xEF1E, 0xF00D, 0xF131, 0xFF1F, 0x1FFF, 0xEF2F, 0xE1ED, 0xE1FE, 0xE2E0, + 0xE3F2, 0xF31D, 0x03ED, 0x1D3F, 0x131D, 0x2DFE, 0x2FFE, 0x202E, 0x22FD, + 0x220E, 0x3E12, 0x32F2, 0x0F2F, 0xED30, 0xF22D, 0x11EE, 0x33FF, 0x03EF, + 0x0121, 0x03D0, 0x0011, 0x0D10, 0x0112, 0xDE01, 0xF1E2, 0x1D31, 0x2D2F, + 0xE1F0, 0x2E00, 0x300F, 0xF1DF, 0x0FDE, 0x111F, 0x0132, 0x1DFF, 0x1F31, + 0xD221, 0xFEE1, 0x033E, 0x0330, 0x1E21, 0x12E1, 0x20D1, 0x213E, 0x012F, + 0x1FDF, 0x00FF, 0xFFD1, 0xFFF1, 0x01F2, 0xFFF3, 0xDF20, 0x22FF, 0x2332, + 0xF0FE, 0xF113, 0x0DE1, 0x31FF, 0xF311, 0xD1D1, 0xFFD3, 0x1E2F, 0x1122, + 0xFD11, 0x0FEF, 0x3111, 0x113D, 0xDDD3, 0x330E, 0xDD3D, 0xDED0, 0xDEF2, + 0xDE23, 0xDE3E, 0xD0E1, 0xD230, 0x00D3, 0x1FFD, 0x131F, 0xD30E, 0xE002, + 0xE3E3, 0xFD1D, 0xFE1E, 0xF33D, 0x1DFD, 0x1D1D, 0x13DD, 0x13F3, 0x2D2D, + 0x2E02, 0x2F03, 0x203D, 0x22F3, 0x2202, 0x23E3, 0x230D, 0x232D, 0x233E, + 0x3D2E, 0x3F3F, 0x31DF, 0x31E2, 0x33DF, 0x33FD, 0x332E, 0x3333, 0xDF3F, + 0xD3E0, 0xED1E, 0xEEDF, 0xEEF3, 0xE112, 0xE12D, 0xE21D, 0xFF3D, 0xF212, + 0xF223, 0x0E3D, 0x0202, 0x2ED3, 0x2002, 0x212F, 0x2130, 0x222E, 0x2233, + 0x2312, 0x3ED0, 0x3FEE, 0xEFEF, 0x30F2, 0x31EE, 0xE211, 0xFF2E, 0xF122, + 0x0312, 0x1DEE, 0x12ED, 0x2D21, 0x21D2, 0x00EE, 0x201F, 0x23D0, 0x3021, + 0x00E2, 0x2200, 0x0123, 0x00E0, 0x3001, 0x02D1, 0x11FF, 0x1210, 0x0EFF, + 0x31E0, 0xFF31, 0xF230, 0xF111, 0x030F, 0x1003, 0x3FFF, 0xD00F, 0x0FED, + 0x01ED, 0x3EF0, 0x0031, 0x003D, 0x0FFE, 0x0130, 0xDE10, 0x10D0, 0xDEE1, + 0x331F, 0xDE1E, 0xE11E, 0x1EEF, 0x2ED1, 0x223F, 0x231E, 0x3120, 0x32F0, + 0x0D01, 0x02E0, 0x10EF, 0x00F3, 0x0103, 0x113F, 0x0310, 0xFFFF, 0x013E, + 0x2D0F, 0x2F01, 0x111D, 0xE2F1, 0xFEED, 0x1111, 0x0DF0, 0x13F1, 0x2F0F, + 0x10D2, 0xD032, 0xD331, 0xEDD0, 0xEE13, 0xD0F0, 0xDF00, 0x001D, 0x1F3F, + 0xDF11, 0xD1FF, 0xF030, 0x13FF, 0x3F11, 0xEFDE, 0xE220, 0xF203, 0xF3FD, + 0x0EE2, 0x020E, 0x0332, 0x1302, 0x2E2E, 0x2F0D, 0x2F32, 0x20E2, 0x21E3, + 0x221D, 0x23F2, 0x3F0E, 0xDDE0, 0x31D1, 0x3122, 0xDFE0, 0xED12, 0xE121, + 0xE132, 0xFD31, 0x0DFE, 0x1D02, 0x1E12, 0x20DF, 0x302F, 0xF03E, 0xF032, + 0xEE00, 0xF2EF, 0x10DE, 0xF1F1, 0xFDF1, 0x12D0, 0x3FF1, 0x1221, 0xE130, + 0x0020, 0xF0F2, 0x101E, 0x0F0D, 0x0E31, 0x0033, 0xE30F, 0xF0EF, 0x1230, + 0xDD3F, 0x32FE, 0xDFFD, 0xD113, 0xD13D, 0xD133, 0x0013, 0x1F1F, 0xD210, + 0xDFF1, 0xE101, 0x11D1, 0xD02F, 0xEEDD, 0xE1E1, 0xFDEE, 0xF331, 0x0DE3, + 0x02D3, 0x0220, 0x12E3, 0x1212, 0x13E2, 0x2EF1, 0x3100, 0x0F23, 0x0D12, + 0x2E11, 0x2FF2, 0x230F, 0x3221, 0x311F, 0xFF13, 0x012D, 0xF2DE, 0xFEEF, + 0x2F1E, 0xD2DE, 0xD3DF, 0xD32E, 0xEE3D, 0xE0EE, 0xE0E2, 0x2022, 0x22DD, + 0x0F32, 0x00DD, 0x0FD0, 0x0E00, 0xFEE3, 0x1E3E, 0x11E2, 0x22E2, 0x23ED, + 0x3D0E, 0x3D3D, 0x3E0D, 0x3E03, 0x3E2D, 0x3E3E, 0x3E32, 0x3FDD, 0x3003, + 0x311D, 0xDD02, 0x32DE, 0x33D3, 0xFF20, 0x0022, 0x10F2, 0xDEDE, 0xED32, + 0xEE1D, 0xE0E0, 0xE033, 0xE2D3, 0xE2EE, 0xE202, 0xFDF3, 0xFD33, 0xF313, + 0x2DE3, 0x2D23, 0x2F12, 0x2033, 0x2220, 0x2330, 0x3DE2, 0x3E30, 0x3FDF, + 0x3FFD, 0x3F2E, 0x3F31, 0x30FE, 0xDD2E, 0x32ED, 0x33EE, 0xDEFE, 0xDE12, + 0xD1EE, 0xEFED, 0xEFE1, 0xE0FD, 0xE02E, 0xE020, 0xE022, 0xE123, 0xE32D, + 0xF302, 0x0E0E, 0x0323, 0x1D0E, 0x2D3E, 0x2FED, 0x2F3E, 0x20F3, 0x22E0, + 0x2213, 0x3E21, 0xDF2E, 0xEDDE, 0xEDE1, 0xEF12, 0xE330, 0xFE2D, 0xFFE2, + 0xF2FE, 0xF22F, 0x0D32, 0x02DD, 0x1E1E, 0x121E, 0x130E, 0x2EE0, 0x2E3F, + 0x2FE1, 0x20E0, 0x2031, 0x2222, 0x2231, 0x3F20, 0xD030, 0xEF30, 0xFE32, + 0xF2E1, 0x02F3, 0x1ED2, 0xF3E0, 0x2DE1, 0x3DFF, 0x0231, 0x2301, 0xD111, + 0xFDE0, 0x1012, 0x20F1, 0x1D00, 0x0200, 0x2101, 0xDD1F, 0x33D1, 0xDE21, + 0xE301, 0x0DDE, 0x0DD2, 0xF201, 0x0EF1, 0x01DE, 0x02DF, 0x21F0, 0x023F, + 0xED0F, 0xEF32, 0xE13E, 0xE2DF, 0xE2E2, 0xE312, 0xF21E, 0xF3DF, 0x0E02, + 0x11D3, 0x12EF, 0x2FDE, 0x2FEF, 0x00FD, 0x2F2F, 0x22F1, 0x3DDF, 0x3D11, + 0xD3F1, 0x30E1, 0x32D0, 0xF1DD, 0x03FE, 0x031E, 0x1133, 0x1032, 0x12D2, + 0x1223, 0x3D00, 0x3D1F, 0xD311, 0x0FD2, 0x0F12, 0xF0D2, 0x021F, 0x0F10, + 0x01F0, 0x10F0, 0x100F, 0x0F01, 0x23F0, 0xF1E0, 0xEE3F, 0x032D, 0xE310, + 0x11E0, 0x33F1, 0xD0F2, 0x33E2, 0xDFEE, 0xD01E, 0xD102, 0x0DD0, 0x0D2F, + 0x0E3F, 0x120F, 0x2FF0, 0xF3F1, 0xD2F2, 0xD3E2, 0xD322, 0xEDFE, 0xEE2E, + 0xEFE3, 0xEF0D, 0xEF2D, 0xE01D, 0xE1E3, 0xE10D, 0xE213, 0xFD13, 0x0D3E, + 0x02E2, 0x030D, 0x1D3D, 0x2D03, 0x2D1E, 0x2EE2, 0x2E1D, 0x20FD, 0x203F, + 0x21F2, 0xDD11, 0x2112, 0x321E, 0xD3FF, 0xEFD0, 0xEF21, 0xE1D0, 0xE3FE, + 0xE31E, 0xFE12, 0xF133, 0x0E2E, 0x12F2, 0x1203, 0x2E31, 0x21DE, 0x211E, + 0xED01, 0xFDE2, 0xF2E3, 0xF232, 0x1F3D, 0x13DF, 0xEF0F, 0xE0F1, 0xFED2, + 0xFF0E, 0x1E32, 0x11FD, 0x1010, 0xF010, 0xF001, 0xED10, 0x110E, 0x20FF, + 0xF1D1, 0x0FE3, 0x1D1F, 0x02FF, 0x3E2F, 0x3320, 0xDF22, 0xE110, 0x1102, + 0xFDD1, 0xFD3F, 0xF300, 0x01D2, 0xD201, 0xF3E2, 0xF33F, 0xF023, 0x1E30, + 0x0F0F, 0x1001, 0x010F, 0x0101, 0xF00F, 0x1300, 0xED2F, 0x1E23, 0xEF3E, + 0xE12F, 0xF0DE, 0x102D, 0x2DF0, 0x103E, 0x31F1, 0xFDD3, 0xFD2E, 0xFEFE, + 0x0E22, 0x03F2, 0x1EF2, 0x12DE, 0x1322, 0xDD20, 0x2E20, 0x21E1, 0xF20D, + 0x1DE2, 0xDE0F, 0x13D1, 0x132E, 0xFED0, 0xF120, 0x02F1, 0x03E1, 0x1320, + 0x2321, 0x01FE, 0x3201, 0x21D0, 0x3DE0, 0xDFE2, 0xDFF3, 0xDF13, 0xDF33, + 0xF0F0, 0x0D0F, 0x0ED1, 0xEF10, 0xF10E, 0x10ED, 0x1EF0, 0x2D10, 0xFD00, + 0xF1D3, 0x0EE0, 0x122D, 0x133F, 0xF0E1, 0x2EDF, 0x2FD0, 0x1F20, 0x102F, + 0x2DEF, 0x221F, 0xD0D0, 0xD03E, 0xD2ED, 0xD2E3, 0xD212, 0xD22D, 0xED0D, + 0xED03, 0x0110, 0x3010, 0xD010, 0x13E0, 0xEEFF, 0xF2D0, 0x1E10, 0x0DEF, + 0x1E0F, 0x0FF0, 0x01EF, 0x1F02, 0xED3E, 0xEEE2, 0xEFF2, 0xE0D3, 0xE00E, + 0xE03D, 0xE23D, 0xE323, 0xE33E, 0xFD3D, 0xF3D3, 0x0D2D, 0x1313, 0x1333, + 0x2DED, 0x2E0E, 0x011E, 0x2E3D, 0x212D, 0x223D, 0x3DD1, 0x3D22, 0x3EDE, + 0x3EE3, 0x3E23, 0x3F22, 0x30D0, 0x300D, 0x313F, 0xDFD1, 0x32D2, 0x331D, + 0xDF0E, 0xDF02, 0xD012, 0xEDD2, 0xEED3, 0xEFFE, 0xE1EF, 0xE103, 0xE3DE, + 0xE332, 0xFDDD, 0xFE0D, 0x03E3, 0x2D32, 0x2EF3, 0x2E22, 0x200E, 0x201D, + 0x3EFE, 0x3EF2, 0xDDEE, 0x312E, 0x3212, 0xDDFF, 0xD131, 0xEEE0, 0xE0DF, + 0xE0D1, 0xE1D2, 0xE1F2, 0xE3D2, 0xFD02, 0xFEF2, 0xFE21, 0x0D23, 0x02EE, + 0x0222, 0x120D, 0x2DF2, 0x2D12, 0x2F2D, 0x21ED, 0x2121, 0xDEEF, 0x22DF, + 0x301E, 0xEE11, 0xF3EE, 0x0213, 0x1D22, 0x1EDE, 0x1E03, 0x1F2E, 0x3EEF, + 0xE011, 0x0EDF, 0x0E11, 0x2011, 0xF1F3, 0x0FF2, 0x3FE0, 0x1ED0, 0x1021, + 0x123E, 0xE000, 0x30F0, 0x2310, 0xD2E1, 0x3322, 0xDDF1, 0xEEF1, 0xFFDD, + 0x0D30, 0x03DE, 0x1D33, 0x1FDD, 0xD300, 0x112E, 0x22D1, 0x0002, 0x2000, + 0xEDF0, 0xE0FF, 0xFFEE, 0x0E1F, 0x1023, 0x3210, 0x0F21, 0xE321, 0xF02F, + 0x1FF1, 0xF021, 0x1F0E, 0x1232, 0x3E01, 0x01E1, 0xEF01, 0xFD20, 0xF2F0, + 0xF210, 0x1FD1, 0x3E10, 0x3300, 0xD0EF, 0xD2EF, 0xE03F, 0xE031, 0x0EEE, + 0x022E, 0x0233, 0x03D2, 0x13EE, 0x133D, 0x2FE3, 0x21EF, 0xD1E0, 0x21FE, + 0x30EF, 0xE2D1, 0xE2FF, 0xE21F, 0xE231, 0xFE3E, 0xF12E, 0xF2ED, 0x1EE3, + 0x1E2D, 0x122F, 0x2DD0, 0x3EE1, 0x1E01, 0x10E1, 0xFE10, 0xF320, 0xD100, + 0x1113, 0xF012, 0x0F3E, 0x1DE0, 0x11DF, 0x12F0, 0xF003, 0xFF02, 0x0211, + 0xF31F, 0x0FE1, 0x1DF1, 0x320F, 0x1DD1, 0x1FE2, 0xD2F0, 0xDD00, 0x11F1, + 0xEDEF, 0x1F22, 0x11DD, 0x1D20, 0x1201, 0x1F13, 0x11F3, 0x0F2D, 0xF0D0, + 0xD1F1, 0xF20F, 0x32E1, 0xDDDF, 0xDD31, 0xDEE3, 0xDE32, 0x000E, 0x01D0, + 0x1D11, 0x3F1F, 0xFFDF, 0x2E1F, 0xDF31, 0xD0FE, 0xD13F, 0xD2D2, 0xD2FE, + 0xD23E, 0xD3EE, 0xD33F, 0x00D1, 0xDEF0, 0xFF3F, 0xEDE3, 0xEEFD, 0xEF03, + 0xE0F3, 0xE013, 0xE1DE, 0xE2F3, 0xE233, 0xE3D0, 0x1D13, 0x1EFE, 0x2DD2, + 0x2D30, 0x2E13, 0x210D, 0x2132, 0x0F03, 0x22D3, 0x22EE, 0x23D2, 0x3012, + 0xDE30, 0xD10E, 0xEFD2, 0xFE03, 0xF3DD, 0x1DF3, 0x1EED, 0x1E0D, 0x12FE, + 0x1331, 0xDE2F, 0x2013, 0x23FE, 0xFE23, 0xFF22, 0xF32E, 0x0DF2, 0xE3E1, + 0x1DDF, 0x1FD3, 0xFF11, 0xFDFF, 0x021D, 0x0321, 0x1FF3, 0xF1FD, 0x100D, + 0xF02D, 0x32EF, 0xD22F, 0xFEF0, 0x1FE0, 0x1F33, 0x0F1E, 0xF13F, 0x2211, + 0xD31F, 0xF23E, 0x001F, 0xF100, 0x1F00, 0x2110, 0xFFFD, 0x0D21, 0xFD1F, + 0x2F10, 0xDFFF, 0xF322, 0x0E1D, 0x23EF, 0x33E0, 0x210F, 0xF102, 0x3311, + 0xD12E, 0x3331, 0xDDFD, 0xDDF3, 0xDD0E, 0xDD22, 0xDD33, 0xDED2, 0xDEED, + 0xDE0D, 0xEFF0, 0xE01F, 0xF0ED, 0xF0E3, 0x02FD, 0x01E3, 0xF11F, 0x003F, + 0x00DF, 0x00F1, 0xF01E, 0xD122, 0xEED1, 0xEE20, 0xFD0E, 0x0EDD, 0x2EFF, + 0x20EE, 0x2020, 0xED21, 0x3D20, 0x3E1E, 0x0E33, 0x1D2E, 0xFE01, 0x2F30, + 0x232F, 0xFFE0, 0x0ED3, 0x0E13, 0x23E1, 0xE3F0, 0x1311, 0xFF1D, 0x3E0F, + 0xD120, 0x1131, 0xD001, 0x1030, 0x1F1D, 0x1120, 0xD320, 0x3F02, 0xDE03, + 0xDE2D, 0xDFDD, 0xDFD3, 0xDF1D, 0xD0DE, 0xD0E3, 0xD1DD, 0xD20D, 0xD3DD, + 0xD3FD, 0xD3F3, 0xD302, 0xD31D, 0xD313, 0xD33D, 0xEE31, 0xE32F, 0xFD22, + 0xF13D, 0x0EFD, 0x0E20, 0x1FEE, 0x2D01, 0xD11F, 0xD20F, 0xF2D2, 0xF3FF, + 0x0EF3, 0x3DF1, 0x0D0D, 0x1DD3, 0x2D0D, 0x2323, 0x3DDD, 0x3DD3, 0x3DF3, + 0x3D1D, 0x3D13, 0x3EED, 0x3FD3, 0x3F13, 0x3F3D, 0x3F33, 0x30E3, 0x302D, + 0x3023, 0x3032, 0x31D3, 0x31FD, 0x310E, 0x3113, 0x313D, 0x3133, 0x3203, + 0x323E, 0x33DD, 0x33F3, 0xDD1D, 0x3302, 0x333D, 0xE200, 0xDF1F, 0xE10F, + 0x032F, 0xDD13, 0xDFDF, 0xDF3D, 0xD0D2, 0xD0ED, 0xD003, 0xD023, 0xD1D3, + 0xD1FD, 0xD11D, 0xD2D0, 0xD203, 0xD223, 0xD3D3, 0xD333, 0xED2D, 0xED23, + 0xEE0E, 0xEE33, 0xE30D, 0x1DDD, 0x2E33, 0x20D3, 0x2303, 0x3DEE, 0x3DFD, + 0x3D02, 0x3D33, 0x3F1D, 0x30DE, 0x30ED, 0x303E, 0x3030, 0x31DD, 0x3131, + 0x32E3, 0x320D, 0x322D, 0x3223, 0x3232, 0xDDD1, 0x3313, 0x333F, 0xD00D, + 0xD02D, 0xD1DF, 0xD1F3, 0xD232, 0xD3D1, 0xEDED, 0xEE02, 0xE2DD, 0xE222, + 0xE303, 0xF333, 0x0D03, 0x0303, 0x20DD, 0x23DE, 0x3D3F, 0x3D31, 0x3ED2, + 0x3FF3, 0x30D2, 0x31F3, 0xDDDD, 0xDDE2, 0xD1E2, 0xEE22, 0xE0DD, 0xE20E, + 0xE22E, 0xE3ED, 0xFDFD, 0xF3F3, 0x0DED, 0x13D3, 0x13FD, 0x2DDE, 0x2EDD, + 0x2EEE, 0x2F21, 0x2F23, 0x2103, 0x2123, 0x3FD1, 0x3FE2, 0xD21E, 0x3102, + 0x3230, 0xEF23, 0xE2FD, 0x0D1E, 0x2EFD, 0xFDDF, 0x2FD2, 0x322F, 0x002E, + 0xFE2F, 0xF2F2, 0xF221, 0x1EE1, }; -#define ON2AVC_CB13_CODES 625 -static const uint16_t on2avc_cb13_codes[ON2AVC_CB13_CODES] = { - 0x0000, 0x0015, 0x008E, 0x0338, 0x09FB, 0x0BEC, - 0x0C61, 0x13E1, 0x18A7, 0x313B, 0x61BB, 0x05D9, - 0x0896, 0x066B, 0x05C6, 0x18A6, 0x40E4, 0x2081, - 0x104F, 0x13E0, 0x0C22, 0x07E4, 0x03F7, 0x0087, - 0x0014, 0x0016, 0x001D, 0x009C, 0x02E2, 0x037E, - 0x0897, 0x0898, 0x0C63, 0x117D, 0x2082, 0x27AA, - 0x033B, 0x06C5, 0x04F2, 0x0331, 0x19EB, 0x18A8, - 0x13E2, 0x0DE7, 0x0C62, 0x06DF, 0x05C7, 0x02F4, - 0x0098, 0x001A, 0x007C, 0x0080, 0x0106, 0x02F5, - 0x03EC, 0x0617, 0x0621, 0x08F9, 0x1050, 0x117F, - 0x11E0, 0x036A, 0x045A, 0x06C6, 0x037F, 0x117E, - 0x2083, 0x0BED, 0x0C9E, 0x0658, 0x04F3, 0x0368, - 0x02EE, 0x00FA, 0x008D, 0x031C, 0x01FF, 0x0206, - 0x031E, 0x06C8, 0x0659, 0x09B5, 0x0C23, 0x0BEF, - 0x0C9F, 0x19EC, 0x04CC, 0x0623, 0x06C7, 0x0622, - 0x313C, 0x17BB, 0x11E1, 0x0C64, 0x0BEE, 0x07DC, - 0x04CB, 0x0375, 0x0205, 0x026E, 0x0C24, 0x06C9, - 0x0324, 0x04DF, 0x0642, 0x09B6, 0x0643, 0x0BF2, - 0x083B, 0x1051, 0x27AB, 0x036C, 0x0607, 0x06E2, - 0x045B, 0x313D, 0x2084, 0x18A9, 0x13E3, 0x0CA0, - 0x0899, 0x066E, 0x06E3, 0x0369, 0x0606, 0x0DE8, - 0x061A, 0x0453, 0x065A, 0x065B, 0x089B, 0x089C, - 0x09FD, 0x0BA5, 0x18AA, 0x11E2, 0x05C8, 0x09B7, - 0x066F, 0x06CA, 0x19ED, 0x2085, 0x2086, 0x0D83, - 0x1052, 0x1053, 0x09FC, 0x089A, 0x0644, 0x083E, - 0x13E4, 0x08FC, 0x0624, 0x1055, 0x0C65, 0x089D, - 0x0645, 0x08FD, 0x0C66, 0x0CA1, 0x1056, 0x05E1, - 0x089E, 0x08FA, 0x07E5, 0x313E, 0x2087, 0x11E3, - 0x19EE, 0x18AB, 0x1054, 0x19EF, 0x17BC, 0x08FB, - 0x07E6, 0x18AD, 0x0BF3, 0x07E7, 0x0C67, 0x1057, - 0x07EA, 0x08FF, 0x1058, 0x0DE9, 0x18AE, 0x19F0, - 0x0608, 0x089F, 0x08FE, 0x06CB, 0x313F, 0x2088, - 0x13E5, 0x3142, 0x11E4, 0x18AC, 0x11E5, 0x0CA2, - 0x065E, 0x13E6, 0x27AD, 0x19F1, 0x0D86, 0x0DEA, - 0x0CA3, 0x0DEB, 0x17BE, 0x0C2A, 0x13E8, 0x0CA6, - 0x0DEE, 0x05FD, 0x0992, 0x0C25, 0x063E, 0x40E5, - 0x11E6, 0x3143, 0x18AF, 0x27AC, 0x0C26, 0x17BD, - 0x13E7, 0x0C27, 0x11E7, 0x27B2, 0x40E8, 0x18B3, - 0x17C0, 0x18FE, 0x19F2, 0x19F3, 0x31FE, 0x17C1, - 0x19F6, 0x0BA6, 0x09FE, 0x0DEF, 0x17BF, 0x0C2B, - 0x40E6, 0x18B0, 0x40E7, 0x13E9, 0x2089, 0x27AE, - 0x27AF, 0x208A, 0x18B1, 0x18B2, 0x27B3, 0xBCEF, - 0x2F3A, 0x40EA, 0x17C5, 0x17C6, 0x17C7, 0x19F7, - 0x133E, 0x105A, 0x17CA, 0x065F, 0x0CA7, 0x0C7E, - 0x1059, 0xBCED, 0x40E9, 0xBCEE, 0x17C2, 0x63FE, - 0x208B, 0x208E, 0x208F, 0x17C3, 0x17C4, 0x0625, - 0x03ED, 0x045C, 0x04CD, 0x05DA, 0x05CE, 0x05FF, - 0x0626, 0x060A, 0x05E3, 0x083F, 0x0BA8, 0x0BA9, - 0x40EB, 0x13EA, 0x0CCA, 0x0BA7, 0x08A2, 0x0646, - 0x0609, 0x05E2, 0x041E, 0x05FE, 0x0373, 0x0376, - 0x099E, 0x05DE, 0x0647, 0x05E6, 0x06D6, 0x07EB, - 0x09FF, 0x1B5E, 0x0BAB, 0x08AE, 0x0C36, 0x0FBA, - 0x17CB, 0x4CFE, 0x105B, 0x0D87, 0x0DAE, 0x13EB, - 0x0BAA, 0x0993, 0x08A3, 0x085E, 0x0600, 0x0601, - 0x05DB, 0x0664, 0x04F0, 0x05F8, 0x0634, 0x085F, - 0x06F6, 0x08F4, 0x0C5A, 0x0CFC, 0x0DDC, 0x09F6, - 0x0C16, 0x115E, 0x13D8, 0x13DA, 0x0C94, 0x0CFA, - 0x082E, 0x0B9E, 0x06C2, 0x0BE4, 0x06DA, 0x05C0, - 0x0614, 0x05C9, 0x05DF, 0x033A, 0x0336, 0x05FA, - 0x04CE, 0x05C1, 0x0890, 0x0891, 0x0838, 0x0839, - 0x0CFD, 0x0BA0, 0x61B8, 0x07DE, 0x0635, 0x0B9F, - 0x0640, 0x06DB, 0x082F, 0x09AC, 0x04C8, 0x0666, - 0x04DE, 0x03F4, 0x0339, 0x2079, 0x267E, 0x179E, - 0x30DE, 0x63FF, 0x27A0, 0x1997, 0x36BF, 0x3EEC, - 0x99FE, 0x99FF, 0x0C95, 0x1048, 0x0C5B, 0x0636, - 0x0C5C, 0x2076, 0x13DB, 0x115F, 0x179C, 0x2077, - 0x1046, 0x36BE, 0x1996, 0x2078, 0x61B9, 0x1175, - 0x17B0, 0x3EED, 0x19E1, 0x19E2, 0x207A, 0x3EEE, - 0xBCEC, 0x3138, 0x3139, 0x07DF, 0x1176, 0x0892, - 0x0667, 0x18A0, 0x18A2, 0x13DC, 0x1174, 0x13DD, - 0x179F, 0x30DF, 0x19E0, 0x18A3, 0x1049, 0x17B2, - 0x207B, 0x17B3, 0x0C17, 0x19E3, 0x17B4, 0x207C, - 0x3EEF, 0x207D, 0x19E4, 0x27A1, 0x0C5F, 0x08F5, - 0x0DDD, 0x0652, 0x18A4, 0x0C96, 0x0C5D, 0x104A, - 0x1177, 0x0CFE, 0x0C5E, 0x0DDE, 0x09F7, 0x17B1, - 0x19E6, 0x0C1E, 0x09AE, 0x1179, 0x0DE0, 0x17B5, - 0x0BA2, 0x17B6, 0x27A3, 0x40E0, 0x40E1, 0x06DC, - 0x09AF, 0x09AD, 0x05C2, 0x19E5, 0x27A2, 0x0DDF, - 0x0C1C, 0x0C1D, 0x0BE6, 0x0BA1, 0x1178, 0x0654, - 0x13DE, 0x40E2, 0x0893, 0x0668, 0x07E1, 0x0BE7, - 0x08F6, 0x0DE1, 0x27A4, 0x104B, 0x19E7, 0x40E3, - 0x05D6, 0x09F9, 0x06DD, 0x04CA, 0x17B7, 0x17B8, - 0x0C97, 0x0C98, 0x07E0, 0x0C99, 0x0655, 0x09F8, - 0x0656, 0x0C9A, 0x0DE2, 0x0669, 0x04D3, 0x061C, - 0x0894, 0x13DF, 0x0C1F, 0x104C, 0x27A6, 0x61BA, - 0x27A7, 0x066A, 0x061D, 0x0637, 0x04D2, 0x27A5, - 0x117A, 0x0C9B, 0x09B0, 0x09B1, 0x05E0, 0x0602, - 0x05FB, 0x04F1, 0x08F7, 0x06FA, 0x0603, 0x037C, - 0x05C3, 0x0BE8, 0x0895, 0x0C60, 0x117B, 0x19E8, - 0x27A8, 0x19E9, 0x0657, 0x083A, 0x06C4, 0x05D7, - 0x17B9, 0x0CFF, 0x0DE3, 0x104D, 0x07E2, 0x0641, - 0x061E, 0x05D8, 0x0366, 0x0616, 0x032E, 0x0268, - 0x02E6, 0x0456, 0x0BA3, 0x06FB, 0x0D80, 0x0DE5, - 0x104E, 0x17BA, 0x27A9, 0x0330, 0x07E3, 0x061F, - 0x0367, 0x207E, 0x0C9C, 0x117C, 0x0DE4, 0x06DE, - 0x0620, 0x0450, 0x042E, 0x02F2, 0x0204, 0x0086, - 0x008C, 0x00FE, 0x022A, 0x0372, 0x05CA, 0x0452, - 0x08F8, 0x0BA4, 0x19EA, 0x18A5, 0x0306, 0x05FC, - 0x03F6, 0x0458, 0x0D81, 0x0BE9, 0x09B2, 0x0C20, - 0x09FA, 0x0604, 0x0370, 0x01FE, 0x010A, 0x0084, - 0x0012, 0x001C, 0x0088, 0x026A, 0x05CB, 0x063B, - 0x09B4, 0x0D82, 0x0DE6, 0x207F, 0x2080, 0x030C, - 0x0605, 0x0459, 0x0374, 0x313A, 0x0C9D, 0x0BEA, - 0x0BEB, 0x0C21, 0x09B3, 0x063A, 0x0216, 0x009D, - 0x001E, +static const uint16_t on2avc_cb_6_syms[ON2AVC_CB_5_6_CODES] = { + 0xFF1F, 0x1EF0, 0x0D32, 0x3E30, 0x0D0F, 0x2E02, 0x0D10, 0xD0E3, 0xD33D, + 0xDDD3, 0xD030, 0x0DD0, 0x3DD3, 0x1E10, 0x2DE1, 0x20EE, 0x11F1, 0xF0F2, + 0xFE1E, 0x1D22, 0xEEFF, 0xE0F1, 0xFEEF, 0xE101, 0xDEF2, 0x2EE2, 0x00FD, + 0x0D0D, 0x3D13, 0xEFF2, 0xF212, 0x0F2F, 0x1120, 0x2F0F, 0x1E2D, 0x2F30, + 0xD3E0, 0x1F11, 0x1122, 0xEFE1, 0xE02E, 0x2F03, 0xF20F, 0xF02D, 0x22FD, + 0xF1FF, 0xFE10, 0xFF20, 0x21FE, 0xFE2F, 0xED2D, 0xF3D3, 0x023F, 0x20DD, + 0xF2F0, 0xD1E0, 0x203F, 0x3010, 0x330E, 0x02FF, 0xE0FF, 0xFFE0, 0xF1EE, + 0x0EE2, 0x0103, 0xF0EF, 0x0EFF, 0x0FE1, 0x1E01, 0x10E1, 0xFF0E, 0x0F21, + 0x2EFF, 0x21ED, 0xEDDE, 0x0130, 0xDEE3, 0xD003, 0xD02D, 0xE303, 0xF333, + 0x0DDE, 0x23E3, 0x3DD1, 0xDE32, 0xDF1D, 0xE332, 0x0D3E, 0x0F0D, 0x1D1D, + 0xDF11, 0xE0E0, 0x2DD0, 0x22E0, 0x23DE, 0x3030, 0xDFD3, 0x00DD, 0x201F, + 0x1D11, 0x1221, 0x211E, 0xF311, 0x133F, 0xFFEE, 0x31EE, 0x2031, 0x2213, + 0xD00F, 0xF02F, 0x2E3F, 0x321E, 0xEEF1, 0xEDD2, 0x03EF, 0x2ED3, 0x32D0, + 0xE0DF, 0xFFDD, 0xEF12, 0xDEE1, 0x223F, 0xF102, 0xDDF1, 0x3F1D, 0x010D, + 0x02F1, 0x12F0, 0xF201, 0xD10E, 0xF2D0, 0x0D2F, 0x1E21, 0x22F1, 0x231E, + 0xF1E0, 0x0211, 0x3F2E, 0xED01, 0xFDE0, 0xD032, 0x0033, 0x3D33, 0xFD33, + 0x3DF3, 0xD322, 0xF300, 0xE000, 0x3D02, 0x3D3F, 0x3EDE, 0x30E3, 0xEDED, + 0xF13D, 0xEF23, 0x1E30, 0x212F, 0x22DF, 0xF0E1, 0x1DF1, 0xE132, 0x0312, + 0x3100, 0x3133, 0xDDFD, 0xF2EF, 0x03FE, 0xFE0F, 0xF1FD, 0x11F3, 0x2211, + 0xD021, 0xE2D1, 0x0DF2, 0x1023, 0xD210, 0x102F, 0x2011, 0x21D0, 0x2E20, + 0xDE2D, 0xD3EE, 0x0E1F, 0x1F20, 0x1113, 0x00EE, 0x30F2, 0x1201, 0xD32E, + 0xE23D, 0x0ED1, 0x3DEE, 0xE1DE, 0x31F3, 0x3302, 0xF3E2, 0x0EDD, 0x2103, + 0x2FDE, 0x2F1E, 0xF113, 0xD001, 0xF11D, 0x1FFD, 0xF0ED, 0x112E, 0x12F2, + 0x2E31, 0xD1F1, 0x1E0F, 0x2233, 0xE20E, 0x0E22, 0x2200, 0x0202, 0xDD22, + 0xDFDD, 0x3FD3, 0x0D12, 0x02D1, 0x1DE2, 0x1EFE, 0x3F0E, 0x30E1, 0xF3FF, + 0x1021, 0xD230, 0x00D1, 0x01D2, 0x013E, 0x1DFD, 0x1D13, 0x32DE, 0x32E3, + 0xEE2E, 0xF302, 0x0E2E, 0x02E2, 0xF31F, 0x331F, 0xEE31, 0x000E, 0x3EF2, + 0x3E21, 0x2000, 0xEE0E, 0x33EE, 0xDD13, 0xE0E2, 0x03DE, 0xDDFF, 0xD1E2, + 0xD3F1, 0xD311, 0x0002, 0xFEE3, 0xFE3E, 0x01EF, 0x12DE, 0xD02F, 0xEEE0, + 0xE1EF, 0x0EE0, 0x031E, 0x11DF, 0x1D20, 0xDFFD, 0xD3D1, 0xE3DE, 0xFE30, + 0x3F1F, 0x131F, 0x0DE3, 0x0F2D, 0x2DDE, 0x3131, 0xF203, 0x1FD3, 0xF2ED, + 0x0231, 0x1ED2, 0x1EE3, 0xF3F1, 0x2F12, 0x3212, 0x13FF, 0xFE23, 0x3D20, + 0xDDDF, 0x0E13, 0x030F, 0x1E03, 0x1230, 0xDD1F, 0xDF3F, 0xEFD0, 0xEEDD, + 0xEEDF, 0xD20F, 0xF23E, 0x1E23, 0x3001, 0x1FEE, 0xF122, 0xEDF2, 0x0233, + 0xD3FD, 0xDD33, 0xDD1D, 0x33D3, 0xDD3D, 0xE0DD, 0x331D, 0x1322, 0x2DF2, + 0xE0D1, 0xDE3E, 0xFDD3, 0xE0EE, 0xFF33, 0xDDEE, 0x0E33, 0x2D3E, 0xDF0E, + 0xD2FE, 0xD3FF, 0xD300, 0xF20D, 0xF3E0, 0x12ED, 0x13E2, 0x3F11, 0x221F, + 0x2EF3, 0x3FFD, 0x13F3, 0xDD0E, 0xFDF1, 0xFFFD, 0x11D1, 0x23E1, 0xED12, + 0xFD22, 0x0EDF, 0x02FD, 0x1032, 0x12D2, 0x3DFF, 0x310E, 0x2321, 0x33F1, + 0x3322, 0xD13F, 0xEE20, 0x11DD, 0x2E0E, 0xDFE0, 0x10DE, 0x1320, 0x2332, + 0xDFEE, 0xF0D2, 0x0EF3, 0x3F22, 0x3122, 0x322F, 0x0000, 0x1F3F, 0xED2F, + 0xD302, 0xEED3, 0xFD00, 0xFD1D, 0x0DF0, 0x0D03, 0x2DD2, 0x22D3, 0x223D, + 0x23D2, 0x23ED, 0x3EE3, 0xED30, 0x30D0, 0x32D2, 0xE2E0, 0x0DD2, 0x0D30, + 0x2022, 0x1D02, 0x30EF, 0xFFF3, 0xFD11, 0x32F0, 0xFDEE, 0x2330, 0xF31D, + 0xEDEF, 0x0D01, 0x103E, 0x111D, 0x2E1D, 0x0E3D, 0x033E, 0xDEEF, 0xDF02, + 0x222E, 0xDDF3, 0xD133, 0x032D, 0x13DD, 0xE1E3, 0xE21D, 0xFE32, 0x021D, + 0x0220, 0x13D1, 0x2231, 0x3F02, 0x2DEF, 0x2310, 0x30D2, 0x302D, 0x3032, + 0x31DD, 0xD03E, 0xD232, 0xD331, 0x1313, 0x2DED, 0x232D, 0x02EE, 0x3ED0, + 0x3ED2, 0x2EEE, 0x202E, 0x320F, 0xD0FE, 0xE13E, 0xE2DF, 0x00E2, 0x2F2D, + 0x30FE, 0xD201, 0x301E, 0x32F2, 0xFF3F, 0x1FDF, 0xDDE2, 0xDD20, 0xD131, + 0x2202, 0xEEFD, 0x3DE0, 0x3331, 0xE312, 0xFD2E, 0x122D, 0x3D1F, 0x2DF0, + 0x3FEE, 0xDF2E, 0xE3FE, 0xF22D, 0x0022, 0x10D2, 0xFEDE, 0x13EE, 0x2123, + 0x3E0F, 0x3FE2, 0xDDD1, 0xD023, 0xD2ED, 0xFDFD, 0x0D2D, 0x03ED, 0x0323, + 0x3D0E, 0x3EED, 0x3023, 0x3230, 0x33E2, 0xD320, 0xEEE2, 0xE2D3, 0x0F03, + 0x0132, 0x03F0, 0x1302, 0x131D, 0xD0EF, 0xED1E, 0xE022, 0x302F, 0x31E2, + 0x3102, 0xE310, 0xF00D, 0xE31E, 0x2E3D, 0x33FD, 0x1D33, 0xD3DD, 0xD333, + 0x003D, 0x3DDD, 0x333D, 0x2D1E, 0x3EFE, 0xF21E, 0x121E, 0x00FF, 0x1311, + 0xE3D2, 0xFDDD, 0x22E2, 0x3FD1, 0xD0E1, 0xD0F2, 0xE031, 0x1DEE, 0xD1FF, + 0x1EED, 0x3FF3, 0xD1DD, 0xD31D, 0x0303, 0x3DFD, 0x0E02, 0x002E, 0x1100, + 0x2DFE, 0x2FD2, 0x2FE3, 0x3F20, 0xFDFF, 0x3E01, 0xDE01, 0xF1D1, 0xF131, + 0x2D2F, 0x0011, 0xD30E, 0xED32, 0x1D3D, 0x2D23, 0xD1DF, 0xFDF3, 0xDEFE, + 0xEF3E, 0xFD3F, 0x201D, 0x21E3, 0x2220, 0xF012, 0xFF31, 0xEFE3, 0x3120, + 0x3EF0, 0xDE0F, 0xF1DF, 0xDEDE, 0x230D, 0x3D3D, 0xD0D2, 0x30F0, 0x31FD, + 0xEED1, 0xEF2D, 0xE020, 0xE3F2, 0xFE2D, 0x020E, 0x0222, 0x213E, 0xF13F, + 0x2D10, 0xD2E1, 0x23F2, 0xD1EE, 0x1EF2, 0xEF32, 0xE2F3, 0x2F3E, 0x20D1, + 0x23FE, 0x3021, 0x0E00, 0x21EF, 0xDE03, 0xE033, 0xE2DD, 0xE30D, 0x0E31, + 0x13D3, 0x133D, 0x2EDD, 0xEDD0, 0xEE3D, 0xF030, 0x0FDE, 0xD01E, 0x31DF, + 0x3232, 0xEDFE, 0xEE00, 0xEE22, 0xE1D2, 0xE200, 0xF322, 0x1232, 0x130E, + 0x20E0, 0x22FF, 0x1FD1, 0x3221, 0xF30E, 0x332E, 0x33DF, 0xD20D, 0xD223, + 0x1DE0, 0x20DF, 0xDFD1, 0x3F13, 0xFF00, 0x1111, 0xFD20, 0xDE1E, 0xEF0D, + 0xE03F, 0x1FDD, 0x2FED, 0x21DE, 0x0200, 0xD122, 0x33E0, 0xF33D, 0x3F3D, + 0x3F33, 0x33DD, 0xFE03, 0xF0DE, 0xF223, 0x02E0, 0xE12F, 0x0FE3, 0x00E0, + 0x220E, 0xEE33, 0xFD3D, 0x2E33, 0x20D3, 0xD2D2, 0x3DDF, 0x3E2D, 0xE33E, + 0xE330, 0x0013, 0x02D3, 0x31D1, 0x3113, 0xE12D, 0xFFD3, 0x0EEE, 0x2E13, + 0x1001, 0x0FFE, 0xFFDF, 0x2F32, 0x212D, 0x0E0E, 0x120D, 0x13DF, 0x20F3, + 0xE3F0, 0x2013, 0x2132, 0x10F0, 0x210F, 0xE321, 0xFEED, 0x300F, 0x11EE, + 0x12FE, 0xF3F3, 0x3FDF, 0x32ED, 0x3223, 0xEFDE, 0xEF03, 0x1223, 0xF32E, + 0xF331, 0x3201, 0x3320, 0xDFE2, 0xED10, 0x0020, 0x0112, 0xF003, 0xEFED, + 0x1D31, 0xD0ED, 0x33F3, 0xD00D, 0xD113, 0xD3DF, 0x00F3, 0x03E3, 0x2D03, + 0x3E32, 0xD102, 0xEE02, 0xE22E, 0xF1DD, 0x12E3, 0x20FD, 0xF001, 0xF320, + 0x1131, 0x23F0, 0x21D2, 0xD010, 0x322D, 0x323E, 0xEFF0, 0x012D, 0xF03E, + 0x3311, 0x100F, 0x232F, 0xD012, 0xFD02, 0xF133, 0xF3D1, 0x0EFD, 0x03F2, + 0x2110, 0xFEF2, 0x1DDF, 0x210D, 0xF00F, 0x0F01, 0x010F, 0xFFFF, 0xEF01, + 0xD2EF, 0x100D, 0x13E0, 0xD212, 0xD23E, 0xDD3F, 0xED03, 0xE1D0, 0xFFD1, + 0xF032, 0xF1D3, 0xDE2F, 0xEE11, 0xF221, 0x2FE1, 0x0FEF, 0xE3E1, 0x2EDF, + 0x3FF1, 0x2FEF, 0x0D23, 0x2DE3, 0x203D, 0x300D, 0xDF13, 0xDF31, 0xFF02, + 0xE002, 0x0332, 0x13FD, 0x1331, 0x200E, 0xE11E, 0x221D, 0x2D32, 0xF3FD, + 0xE301, 0x02DF, 0xD11F, 0x2222, 0xE213, 0x0E1D, 0xF010, 0x0110, 0x0FF0, + 0x1DD1, 0x2D2D, 0x2323, 0xE01D, 0x00D3, 0xF023, 0x1133, 0x312E, 0x2D21, + 0xD3E2, 0xE013, 0x1E3E, 0xFED0, 0xF33F, 0x001F, 0xFEF0, 0x123E, 0xD3D3, + 0xE0D3, 0x2D0D, 0x2033, 0x3E0D, 0x3E03, 0x3E23, 0x30DE, 0xFE12, 0xE10D, + 0x2D30, 0x30ED, 0x3313, 0x32E1, 0xFE0D, 0x3F31, 0x0FD0, 0x311F, 0x22D1, + 0xE123, 0x22F3, 0x1E32, 0x2FD0, 0xEDE1, 0x3D11, 0x0F30, 0x001D, 0x3FFF, + 0x1003, 0xDDDD, 0x0E20, 0x10FE, 0xF1E2, 0x3E2F, 0xF100, 0x0121, 0xEF21, + 0x2F23, 0x2E22, 0xDF3D, 0x313D, 0x03D0, 0x3300, 0xDD00, 0xD1D1, 0x1DD3, + 0xE3EF, 0xF2E1, 0xEE1D, 0xE00E, 0xE103, 0x0213, 0xD120, 0x2E00, 0x33FF, + 0xEEEE, 0x1ED0, 0x110E, 0x122F, 0xEFEF, 0x21F0, 0xE2F1, 0x0DE1, 0x1012, + 0x23EF, 0xDD31, 0xD0D0, 0xD100, 0xD203, 0x01DE, 0x22DD, 0x2303, 0x3203, + 0x1010, 0xDE10, 0xD11D, 0xE222, 0xE3D0, 0xE0FD, 0x02DD, 0x0301, 0xDF20, + 0xE32F, 0x01ED, 0xE0F3, 0xE2FD, 0xE121, 0xF3DF, 0x2312, 0x1F00, 0xF0F0, + 0x0F10, 0xF2D2, 0xF2FE, 0xF2F2, 0xED0F, 0xFF13, 0xE21F, 0x032F, 0x0101, + 0x1FE0, 0x1EE1, 0xDED0, 0x33D1, 0xDF33, 0xD0F0, 0xD1FD, 0x3111, 0xE202, + 0x1333, 0x3E3E, 0x3F3F, 0xFDDF, 0x113D, 0x01F0, 0x11FF, 0x0F0F, 0x31F1, + 0xEE1F, 0xE30F, 0x3012, 0xD2F2, 0x11E2, 0xD31F, 0x3003, 0xD2DE, 0xD33F, + 0xEF2F, 0xE231, 0x3EE1, 0x1F31, 0xED0D, 0xE3ED, 0xE323, 0x0DED, 0xDEF0, + 0x2FF2, 0x01D0, 0x030D, 0x1DDD, 0x333F, 0xD2D0, 0xE2EE, 0xF0FE, 0xD221, + 0xF22F, 0xD2F0, 0xFEE1, 0xDD11, 0x0F23, 0x3F00, 0x0D21, 0x21E1, 0x2112, + 0x2301, 0x3EEF, 0xFD31, 0x1D3F, 0xDE21, 0x113F, 0x2130, 0xEF10, 0x1EEF, + 0x2D01, 0x1210, 0x2FF0, 0xDFFF, 0xDD02, 0xDE23, 0xEDF0, 0x003F, 0x1E0D, + 0x1F33, 0x3FE0, 0xE2FF, 0x1E2F, 0x2D0F, 0xD111, 0x11E0, 0x3E10, 0x2EF1, + 0xFD0E, 0x3D22, 0xDE0D, 0xD13D, 0x3D1D, 0x1FFF, 0x0F12, 0x1F02, 0x10F2, + 0x1E12, 0x1D0E, 0x1F3D, 0xFF11, 0xF021, 0x13F1, 0xD22F, 0x2020, 0xDFDF, + 0x0FD2, 0x3D31, 0xE130, 0xFDE2, 0x00F1, 0xF232, 0xF3EE, 0x31E0, 0xDDE0, + 0xEEF3, 0xEE3F, 0x2002, 0x3DF1, 0xE23F, 0xF2E3, 0xDFF1, 0x10ED, 0x2F2F, + 0xE01F, 0xF0E3, 0x3D00, 0xF10E, 0x01FE, 0x20F1, 0xE011, 0x0FF2, 0xE1ED, + 0x0310, 0xDFF3, 0x22EE, 0x23D0, 0xEF0F, 0xFED2, 0x3D2E, 0xD1F3, 0xD2E3, + 0xFE21, 0xF2DE, 0x1F2E, 0x1F22, 0x2101, 0x2E1F, 0x02F3, 0x2EE0, 0xFD1F, + 0x101E, 0x3210, 0x1EDE, 0x2ED1, 0xF120, 0x3E1E, 0x2EFD, 0x313F, 0xEDE3, + 0x01F2, 0xFF2E, 0xF12E, 0x1FF1, 0x10EF, 0xF230, 0xE1F2, 0x1FE2, 0x0DFE, + 0xED3E, 0x0031, 0xD12E, 0xE1FE, 0xF11F, 0x0E11, 0x03E1, 0x2FFE, 0x011E, + 0x32EF, 0x01E3, 0x023D, 0x1D00, 0x3DE2, 0x111F, 0x32FE, 0x0D1E, 0x2E2E, + 0xFF22, 0x0F32, 0xE1F0, 0xE10F, 0xFFF1, 0x012F, 0x12E1, 0xDF22, 0xF210, + 0xE1E1, 0x0E3F, 0x31FF, 0x102D, 0x3E12, 0xED21, 0x11D3, 0xDD2E, 0xDEED, + 0xEF30, 0xE211, 0x0F1E, 0x2F01, 0x12D0, 0xED23, 0xE32D, 0xFD13, 0x10D0, + 0x0DEF, 0xEFD2, 0x2F0D, 0xF111, 0x120F, 0x1D2E, 0x1212, 0x11FD, 0x2E11, + 0x3333, 0xE2E2, 0xF1F1, 0xFF1D, 0x0EF1, 0xD21E, 0x2F21, 0x21F2, 0x230F, + 0x021F, 0xEE13, 0xEFFE, 0x01E1, 0x2F10, 0x1D1F, 0x2121, 0xD0DE, 0xD313, + 0x0ED3, 0xD3F3, 0xF3DD, 0x00DF, 0x1300, 0x303E, 0x31D3, 0xDE30, 0x03D2, + 0x1DF3, 0x1030, 0xFDD1, 0xFF3D, 0xE112, 0x12EF, 0x1F1F, 0xF1F3, 0x2D12, + 0x20E2, 0xDED2, 0xDF00, 0xFE01, 0xE110, 0xF01E, 0xFFE2, 0xEF1E, 0x1DFF, + 0x1FF3, 0xE233, 0xF0D0, 0xF313, 0x311D, 0xE220, 0x0123, 0xDE12, 0x0F3E, + 0xDF1F, 0x0321, 0x022E, 0xD1D3, 0xE03D, 0x3FDD, 0x320D, 0x1F0E, 0x1F1D, + 0x1F13, 0x1102, 0xD22D, 0xE3E3, 0x0330, 0x233E, 0x0FED, 0x1203, 0xFEFE, + 0x1E1E, 0x20FF, 0x10E3, 0x132E, }; -static const uint8_t on2avc_cb13_bits[ON2AVC_CB13_CODES] = { - 1, 5, 8, 10, 12, 12, - 12, 13, 13, 14, 15, 11, - 12, 11, 11, 13, 15, 14, - 13, 13, 12, 11, 10, 8, - 5, 5, 5, 8, 10, 10, - 12, 12, 12, 13, 14, 14, - 10, 11, 11, 10, 13, 13, - 13, 12, 12, 11, 11, 10, - 8, 5, 7, 8, 9, 10, - 10, 11, 11, 12, 13, 13, - 13, 10, 11, 11, 10, 13, - 14, 12, 12, 11, 11, 10, - 10, 8, 8, 10, 9, 10, - 10, 11, 11, 12, 12, 12, - 12, 13, 11, 11, 11, 11, - 14, 13, 13, 12, 12, 11, - 11, 10, 10, 10, 12, 11, - 10, 11, 11, 12, 11, 12, - 12, 13, 14, 10, 11, 11, - 11, 14, 14, 13, 13, 12, - 12, 11, 11, 10, 11, 12, - 11, 11, 11, 11, 12, 12, - 12, 12, 13, 13, 11, 12, - 11, 11, 13, 14, 14, 12, - 13, 13, 12, 12, 11, 12, - 13, 12, 11, 13, 12, 12, - 11, 12, 12, 12, 13, 11, - 12, 12, 11, 14, 14, 13, - 13, 13, 13, 13, 13, 12, - 11, 13, 12, 11, 12, 13, - 11, 12, 13, 12, 13, 13, - 11, 12, 12, 11, 14, 14, - 13, 14, 13, 13, 13, 12, - 11, 13, 14, 13, 12, 12, - 12, 12, 13, 12, 13, 12, - 12, 11, 12, 12, 11, 15, - 13, 14, 13, 14, 12, 13, - 13, 12, 13, 14, 15, 13, - 13, 13, 13, 13, 14, 13, - 13, 12, 12, 12, 13, 12, - 15, 13, 15, 13, 14, 14, - 14, 14, 13, 13, 14, 16, - 14, 15, 13, 13, 13, 13, - 13, 13, 13, 11, 12, 12, - 13, 16, 15, 16, 13, 15, - 14, 14, 14, 13, 13, 11, - 10, 11, 11, 11, 11, 11, - 11, 11, 11, 12, 12, 12, - 15, 13, 12, 12, 12, 11, - 11, 11, 11, 11, 10, 10, - 12, 11, 11, 11, 11, 11, - 12, 13, 12, 12, 12, 12, - 13, 15, 13, 12, 12, 13, - 12, 12, 12, 12, 11, 11, - 11, 11, 11, 11, 11, 12, - 11, 12, 12, 12, 12, 12, - 12, 13, 13, 13, 12, 12, - 12, 12, 11, 12, 11, 11, - 11, 11, 11, 10, 10, 11, - 11, 11, 12, 12, 12, 12, - 12, 12, 15, 11, 11, 12, - 11, 11, 12, 12, 11, 11, - 11, 10, 10, 14, 14, 13, - 14, 15, 14, 13, 14, 14, - 16, 16, 12, 13, 12, 11, - 12, 14, 13, 13, 13, 14, - 13, 14, 13, 14, 15, 13, - 13, 14, 13, 13, 14, 14, - 16, 14, 14, 11, 13, 12, - 11, 13, 13, 13, 13, 13, - 13, 14, 13, 13, 13, 13, - 14, 13, 12, 13, 13, 14, - 14, 14, 13, 14, 12, 12, - 12, 11, 13, 12, 12, 13, - 13, 12, 12, 12, 12, 13, - 13, 12, 12, 13, 12, 13, - 12, 13, 14, 15, 15, 11, - 12, 12, 11, 13, 14, 12, - 12, 12, 12, 12, 13, 11, - 13, 15, 12, 11, 11, 12, - 12, 12, 14, 13, 13, 15, - 11, 12, 11, 11, 13, 13, - 12, 12, 11, 12, 11, 12, - 11, 12, 12, 11, 11, 11, - 12, 13, 12, 13, 14, 15, - 14, 11, 11, 11, 11, 14, - 13, 12, 12, 12, 11, 11, - 11, 11, 12, 11, 11, 10, - 11, 12, 12, 12, 13, 13, - 14, 13, 11, 12, 11, 11, - 13, 12, 12, 13, 11, 11, - 11, 11, 10, 11, 10, 10, - 10, 11, 12, 11, 12, 12, - 13, 13, 14, 10, 11, 11, - 10, 14, 12, 13, 12, 11, - 11, 11, 11, 10, 10, 8, - 8, 8, 10, 10, 11, 11, - 12, 12, 13, 13, 10, 11, - 10, 11, 12, 12, 12, 12, - 12, 11, 10, 9, 9, 8, - 5, 5, 8, 10, 11, 11, - 12, 12, 12, 14, 14, 10, - 11, 11, 10, 14, 12, 12, - 12, 12, 12, 11, 10, 8, - 5, +static const uint16_t on2avc_cb_7_syms[ON2AVC_CB_7_8_CODES] = { + 0x0000, 0x00FF, 0x3F00, 0xCC00, 0x1C10, 0x1140, 0xFCEF, 0x4220, 0x43C1, + 0xCCCE, 0xFF40, 0xF2DC, 0xF21C, 0x1E4F, 0x114C, 0x2E1F, 0x30F0, 0xC020, + 0xC2E0, 0x0022, 0x01C1, 0x014F, 0x1012, 0x104D, 0xEF21, 0xFEDC, 0xFFE2, + 0xFF42, 0xF003, 0xF2FE, 0xF212, 0xF4CD, 0x0C40, 0x0DF4, 0x0224, 0x033C, + 0x1EF2, 0x1E21, 0x1FEE, 0x1F22, 0x103C, 0x1212, 0x142D, 0x1421, 0x2DC1, + 0x2FFE, 0x21FE, 0x2141, 0x22FF, 0x2420, 0x4CDF, 0x4C1F, 0x4D01, 0x4E20, + 0x4121, 0x441F, 0xCF01, 0xC301, 0x002C, 0xF3CE, 0xFCD2, 0x0143, 0x012F, + 0x20F1, 0x1F00, 0x00F1, 0x001F, 0x2F10, 0xC400, 0x112C, 0xF40F, 0xF1C2, + 0x002E, 0x1E10, 0x140F, 0x2101, 0x0F4D, 0x004C, 0x0044, 0x02E0, 0x1E43, + 0x10CF, 0xE200, 0x2C11, 0x4F0F, 0x0F4F, 0x1F2C, 0x0200, 0x14E1, 0x401F, + 0xC00E, 0xC3D2, 0xC330, 0xC4F1, 0xCF10, 0x1041, 0xF0F2, 0x0DC1, 0x1F0E, + 0x2F0F, 0x0134, 0x0FDC, 0xFF00, 0x0011, 0x1100, 0x0114, 0xFFFF, 0xC41F, + 0xC431, 0xDC01, 0xDE4F, 0xDE43, 0xDF40, 0xD001, 0xD14E, 0xD2E1, 0xD24F, + 0xD432, 0xECC4, 0xECF3, 0xEDCD, 0xEE42, 0xEFFC, 0xEF1E, 0xEF30, 0xEF41, + 0xE1C1, 0xE2E0, 0xE33C, 0xE42E, 0xE43D, 0xFCC3, 0xFCDE, 0xFCF2, 0xFDCC, + 0xFD4E, 0xFEED, 0xFF1D, 0xFF3D, 0xFF3F, 0xFF31, 0xF030, 0xF1D3, 0xF1FD, + 0xF3FF, 0xF311, 0x0CE4, 0x0C24, 0x0C33, 0x0C42, 0x0D10, 0x0ED1, 0x0E0E, + 0x0E4C, 0x0FD0, 0x003D, 0x01DE, 0x01D0, 0x0132, 0x0310, 0x1CE3, 0x1DFF, + 0x1E2D, 0x1FDF, 0x10C3, 0x1133, 0x12CD, 0x131F, 0x2CE2, 0x2C02, 0x2C22, + 0x2EC2, 0x2EE2, 0x2E20, 0x20C2, 0x20EE, 0x200E, 0x2334, 0x24C2, 0x243D, + 0x3DC0, 0x3E2F, 0x3FF1, 0x3111, 0x3221, 0x34EF, 0x3443, 0x4DD0, 0x4DE1, + 0x4DF2, 0x4D21, 0x4FC1, 0x4FD0, 0x4F12, 0x4F21, 0x42DF, 0x42EE, 0x43D0, + 0x44EE, 0xCD0F, 0xCFEF, 0xDCDE, 0xED10, 0xEEE0, 0xEE1F, 0xEF12, 0xE1F2, + 0xFEFE, 0xF2F4, 0xF22F, 0xF3EC, 0xF41E, 0x0D4F, 0x0222, 0x03F0, 0x1CCF, + 0x1DCE, 0x1DE0, 0x1E4D, 0x1FE2, 0x1F1D, 0x10D4, 0x11C4, 0x11E2, 0x111D, + 0x2343, 0x241F, 0x3CD0, 0x3E10, 0xD401, 0x3F1F, 0x320F, 0xEC40, 0xE2F1, + 0xFED4, 0xF2E1, 0xF340, 0x0CE2, 0x00C4, 0x042E, 0x020C, 0x1104, 0x24FF, + 0x022C, 0x2200, 0x00F3, 0x001D, 0x1111, 0x00C2, 0x41F0, 0xCE11, 0x4EE0, + 0x44D1, 0xCCFF, 0xFDC2, 0x004E, 0x00EC, 0x2110, 0x01E1, 0x134E, 0xC01F, + 0xF1EC, 0x0FED, 0x1FEC, 0xE4F1, 0x10C1, 0x2CE0, 0x011C, 0x0CD1, 0x44F1, + 0xE1F0, 0xEF0F, 0x23C1, 0xCF2F, 0xC121, 0x0E40, 0x02EC, 0x1210, 0x3100, + 0x0F14, 0xD1F1, 0xEC31, 0xE34F, 0xE422, 0xFC32, 0xFDE4, 0xFE4D, 0xFF22, + 0xFF4E, 0xF03C, 0xF23C, 0xF3CC, 0xF3C0, 0xF324, 0xF4D0, 0x0D34, 0x0EE0, + 0x0E02, 0x0FDE, 0x0031, 0x02EE, 0x024C, 0x03FC, 0x04CE, 0x04C0, 0x04EE, + 0x1EEF, 0x1FCC, 0x10CD, 0x10E3, 0x12F2, 0x1223, 0x123C, 0x1243, 0x1342, + 0x1344, 0x2ECE, 0x2EFF, 0x2FE1, 0x2F2F, 0x20C0, 0x21F2, 0x2121, 0x3D00, + 0x340F, 0x3421, 0x4DCF, 0x4D0F, 0xD4F0, 0x4FEF, 0x44FF, 0xEC11, 0xEEEE, + 0xFE4F, 0xF041, 0xF043, 0x0E4E, 0xE01F, 0x1221, 0x14EF, 0xFEC3, 0xF2CD, + 0xF2F0, 0x0FC3, 0x00CE, 0x1EF0, 0xE110, 0x0F41, 0x1C0F, 0x10F4, 0x40FF, + 0xCE20, 0xC321, 0xF4F0, 0x0D41, 0x0EC0, 0x02C0, 0x2C00, 0x0F12, 0x0020, + 0xDF00, 0x2E00, 0xC21F, 0xC220, 0x0FF4, 0x00FD, 0x1F1F, 0x0024, 0x4DF0, + 0xFCF0, 0xF14E, 0x0EE4, 0x0F23, 0x10F0, 0x1DC0, 0x1F44, 0x110C, 0x112E, + 0xFF02, 0x143E, 0x32C1, 0xF0E1, 0x0E1F, 0x0411, 0xF102, 0x0C20, 0x0C31, + 0x0F0D, 0x01DC, 0x014D, 0x0240, 0x101C, 0x120F, 0x0FFC, 0x01CF, 0x124D, + 0x1410, 0x0E00, 0xCC2E, 0x4442, 0xCCC0, 0xCEDF, 0xCE02, 0xCF4F, 0xCF41, + 0xC002, 0xC031, 0xC040, 0xC132, 0xC2EE, 0xC34F, 0xC341, 0xDCC1, 0xDC03, + 0xDC34, 0xDC41, 0xDDEE, 0xDD42, 0xDEC1, 0xDEDC, 0xDEF2, 0xDE12, 0xDE2F, + 0xDE23, 0xDE32, 0xDE4D, 0xDE41, 0xDF0C, 0xDF20, 0xDF3F, 0xD012, 0xD030, + 0xD032, 0xD04F, 0xD041, 0xD1EE, 0xD1E2, 0xD1E4, 0xD120, 0xD14C, 0xD142, + 0xD2D2, 0xD2FE, 0xD2F2, 0xD232, 0xD243, 0xD3D3, 0xD30E, 0xD31D, 0xD320, + 0xD33D, 0xD331, 0xD42D, 0xD44F, 0xECCC, 0xECC2, 0xECD1, 0xECD3, 0xECE4, + 0xEC02, 0xEDD4, 0xEDF2, 0xED14, 0xEECC, 0xEEC2, 0xEEC4, 0xEEFD, 0xEE1D, + 0xEE2E, 0xEE33, 0xEFCF, 0xEFDE, 0xEF3C, 0xEF32, 0xE0F3, 0xE1CD, 0xE123, + 0xE2C2, 0xE2C4, 0xE2EC, 0xE2E4, 0xE233, 0xE3C1, 0xE3DC, 0xE3D0, 0xE3F2, + 0xE3F4, 0xE31E, 0xE4CE, 0xE4C2, 0xE4E4, 0xE402, 0xFCD4, 0xFDDF, 0xFDE0, + 0xFD04, 0xFED0, 0xFE03, 0xFE43, 0xFFD3, 0xF03E, 0xF032, 0xF133, 0xF20D, + 0xF223, 0xF3EE, 0xF3E0, 0xF3F1, 0xF33F, 0xF4D4, 0xF414, 0x0CCE, 0x0CC0, + 0x0CC2, 0x0CC4, 0x0C0E, 0x0C04, 0x0C44, 0x0DDC, 0x0DD2, 0x0DE1, 0x0D1E, + 0x0EDF, 0x0EF3, 0x02C4, 0x02F3, 0x0213, 0x023D, 0x03E1, 0x03FE, 0x0301, + 0x032F, 0x033E, 0x0332, 0x04C2, 0x04DD, 0x04D3, 0x0402, 0x042C, 0x1CD4, + 0x1C43, 0x1DDF, 0x1D2C, 0x1EED, 0x1EE3, 0x1FD3, 0x10D2, 0x11DD, 0x122D, + 0x123E, 0x13CC, 0x13D1, 0x13FD, 0x1320, 0x1324, 0x1432, 0x1434, 0x1443, + 0x2C13, 0x2C4E, 0x2D0F, 0x2D1E, 0x2D3C, 0x2D30, 0x2D4D, 0x2E0C, 0x2E1D, + 0x2E2C, 0x2E44, 0x2FD0, 0x2FED, 0x2F4D, 0x20CC, 0x20DF, 0x201D, 0x2013, + 0x202E, 0x21D2, 0x21ED, 0x213C, 0x213E, 0x22CC, 0x22EE, 0x22E2, 0x22FD, + 0x2202, 0x23C3, 0x23E1, 0x23F4, 0x2310, 0x232F, 0x24CC, 0x240C, 0x240E, + 0x241D, 0x2422, 0x244C, 0x2442, 0x3C2D, 0x3C32, 0x3C4F, 0x3C43, 0x3DC2, + 0x3D3F, 0x3EE1, 0x3E1E, 0x3E14, 0x3E2D, 0x3E21, 0x3E43, 0x3FE2, 0x3F4E, + 0x30E1, 0x3012, 0x302F, 0x31CC, 0x3120, 0x3122, 0x3142, 0x32CF, 0x32C3, + 0x32FC, 0x32F4, 0x324F, 0x33E0, 0x33FF, 0x3311, 0x3331, 0x3342, 0x34DE, + 0x34E3, 0x3412, 0x3432, 0x4DCD, 0x4DC1, 0x4DD2, 0x4D32, 0x4D4F, 0x4EC2, + 0x4E0E, 0x4E31, 0x4FCD, 0x4FD2, 0x4F1E, 0x4F30, 0x40DF, 0x402E, 0x403F, + 0x4040, 0x41DE, 0x41F2, 0x414F, 0x42E4, 0x4202, 0x4222, 0x423F, 0x43CD, + 0x43CF, 0x43F2, 0x432D, 0x4323, 0x44DF, 0x44D3, 0xCCD1, 0x44FD, 0x4402, + 0xCD30, 0xCE22, 0xCE31, 0xCFD0, 0xCFE1, 0xC0EE, 0xC0E0, 0xC2D1, 0xC202, + 0xC22E, 0xC3F2, 0xDCD2, 0xDCF2, 0xDC3E, 0xDDFF, 0xDD40, 0xDEEF, 0xD20F, + 0xD201, 0xD311, 0xD32C, 0xD4ED, 0xD430, 0xEC33, 0xEDDC, 0xEE22, 0xEFC3, + 0xEFE1, 0xEF34, 0xE0E0, 0xE042, 0xE11C, 0xE22E, 0xE3F0, 0xE301, 0xE321, + 0xE4DF, 0xE4FD, 0xFCC1, 0xFCE3, 0xFC23, 0xFDF1, 0xFE30, 0xF0ED, 0xF14C, + 0xF2E3, 0xF2FC, 0xF21E, 0xF3E2, 0xF3E4, 0xF4ED, 0xF4F2, 0xF432, 0x0C13, + 0x0DD4, 0x0E1D, 0x0E3F, 0x0FE3, 0x0F30, 0x01D2, 0x02DF, 0x021D, 0x0233, + 0x03CD, 0x031C, 0x0321, 0x04F3, 0x0422, 0x044C, 0x1C2D, 0x1C34, 0x1DEC, + 0x1D04, 0x1D24, 0x1FC4, 0x1F3F, 0x10DE, 0x11D1, 0x12F4, 0x120D, 0x134C, + 0x141C, 0x143C, 0x2CEE, 0x2D2F, 0x2EEE, 0x2FCD, 0x2FD4, 0x2F1E, 0x2F41, + 0x2F43, 0x202C, 0x2044, 0x21DC, 0x21F4, 0x2112, 0x214D, 0x214F, 0x22E0, + 0x2231, 0x224E, 0x2242, 0x24CE, 0x24E2, 0x2440, 0x3CDE, 0x3C30, 0x3EEF, + 0x321E, 0x33C0, 0x3344, 0x4D1E, 0x4D3E, 0x4EC0, 0x4E3F, 0x4FF2, 0x40EE, + 0x4020, 0x4022, 0x411E, 0x4112, 0x412F, 0xC1EF, 0xC231, 0xDCE1, 0xDC21, + 0xDE01, 0xDE10, 0xDF1F, 0xECE2, 0xECF1, 0xE2E2, 0xE220, 0xFC41, 0xFD20, + 0xFECD, 0xFE21, 0xFF2E, 0xF00D, 0xF02D, 0xF023, 0xF1EE, 0xF11D, 0xF2C3, + 0xF31F, 0xF43E, 0x0C2E, 0x0EC4, 0x0EEE, 0x0F3E, 0x003F, 0x0033, 0x013E, + 0x034D, 0x1CF2, 0x1C23, 0x1D44, 0x1ED4, 0x1EFE, 0x10DC, 0x10ED, 0x100D, + 0x1113, 0x1311, 0x1340, 0x14CF, 0x14DE, 0x1430, 0x2E40, 0x21CF, 0x2321, + 0x4CF1, 0x432F, 0x4420, 0xCE1F, 0xDC10, 0xF04F, 0xF10C, 0x0FCD, 0x02C2, + 0x11C2, 0x12C1, 0x20E0, 0x41EF, 0xC2FF, 0xFFC0, 0xF01C, 0xF02F, 0xF021, + 0xF1E0, 0x0E24, 0x11E0, 0xFFC2, 0x1102, 0x201F, 0xF410, 0x24F1, 0x4FF0, + 0x42F1, 0x43F0, 0x0E11, 0x2C1F, 0x4310, 0x0FF2, 0xD010, 0xE341, 0xFC21, + 0xF124, 0xF241, 0x0C22, 0x012D, 0x0123, 0x0420, 0x1CE1, 0x1E2F, 0x1241, + 0xE0FF, 0x2EF1, 0x3410, 0xFE0F, 0xFFEC, 0x0E04, 0x00EE, 0x02F1, 0x1F24, + 0x2CFF, 0x01FC, 0x4000, 0xD421, 0x4321, 0xCC3F, 0xCD01, 0xFC2F, 0x0E42, + 0x0FD4, 0x1FE0, 0x1F20, 0x10EF, 0xF401, 0x110E, 0x2DCF, 0x2FF0, 0x21F0, + 0xC11E, 0xC12F, 0xC130, 0xC4E0, 0xDF11, 0xD00F, 0xD340, 0xECCE, 0xECDF, + 0xEC2E, 0xED41, 0xEE11, 0xE00E, 0xE1EF, 0xE112, 0xE24E, 0xE4E0, 0xFC12, + 0xFE12, 0xFE14, 0xFE3C, 0xFFCC, 0xFFDF, 0xFFF3, 0xFF4C, 0xF1C4, 0xF12E, + 0xF2EF, 0xF24D, 0xF320, 0x0CDF, 0x0D14, 0x01F0, 0x0E13, 0x0E22, 0x0E31, + 0x0FD2, 0x00D1, 0x0242, 0x1DE4, 0x1EFC, 0x1E1C, 0x1FCE, 0x1F13, 0x102D, + 0x1034, 0x11EE, 0x11F3, 0x2C3F, 0x2E42, 0x2FC1, 0x22C2, 0x22EC, 0x23F0, + 0x3CCF, 0x3CE1, 0x3F11, 0x300F, 0x342F, 0x4F2F, 0x41E1, 0xCEE0, 0xED4F, + 0xE21F, 0xE420, 0xFECF, 0xFE41, 0xFFC4, 0xF430, 0x0E2C, 0x04DF, 0x1E1E, + 0x1F4C, 0x13C0, 0x14FE, 0xC0F1, 0x2411, 0x3C2F, 0xC411, 0xEEFF, 0xFFE0, + 0xF0DC, 0xF0F4, 0xF10E, 0xF20F, 0x0C11, 0x0EC2, 0x0FCF, 0x0141, 0x024E, + 0xEF01, 0x11E4, 0x1122, 0xF001, 0xF1F1, 0x1FF1, 0xF421, 0x01FE, 0x3401, + 0x4D2F, 0xCD2F, 0xC2F1, 0xFE01, 0xF104, 0x00E2, 0xE411, 0x10E1, 0x3CF0, + 0x0F01, 0x100F, 0xF010, 0x010F, 0xF00F, 0x111F, 0x00E0, 0x14F0, 0xF01E, + 0xECE0, 0xFCD0, 0xFEFC, 0xFE2F, 0xCDF0, 0xF0D4, 0xF4DE, 0x1CD0, 0x1ECF, + 0xE0F1, 0x1EE1, 0x1EF4, 0xE431, 0xFF0E, 0xFF24, 0xF0FC, 0xF201, 0x021F, + 0x1E0F, 0x2CC0, 0x1001, 0xFF1F, 0x12F0, 0x2011, 0x4E1F, 0xC310, 0x410F, + 0x121E, 0xCCDD, 0x4433, 0xCCC2, 0xCCC4, 0xCCDF, 0xCCE2, 0xC200, 0xEF10, + 0xCC1F, 0xFDCE, 0xCE00, 0xFFCE, 0xF120, 0x0EF1, 0x02CE, 0x0F10, 0x0FF0, + 0xFF11, 0x1EC1, 0x1E01, 0x2211, 0x3CEF, 0x011E, 0x3010, 0x4EF1, 0xC000, + 0x0F3C, 0x10FE, 0x4E11, 0xCC20, 0xCC31, 0xCD1E, 0xCD4F, 0xCED1, 0xCE2E, + 0xCFFE, 0xCF32, 0xC1F0, 0xE400, 0x104F, 0xC03F, 0xC1F2, 0xC2DF, 0xC20E, + 0xC3FE, 0xC32F, 0xC4E2, 0xC42E, 0xDC12, 0xDF2E, 0xD1E0, 0xD4D2, 0xD42F, + 0xEC22, 0xEC4E, 0xEDC1, 0x1FFF, 0xCFF0, 0xF0F0, 0xEDC3, 0xEDEF, 0xED2F, + 0xEEDD, 0xEFCD, 0xEFFE, 0xEF4D, 0xEF43, 0xE0C2, 0xE0EE, 0xE0E4, 0xE002, + 0xE004, 0xE022, 0xE13E, 0xE132, 0xE143, 0xE2D3, 0xE20E, 0xE22C, 0xE231, + 0xE3CD, 0xE3C3, 0xE3E1, 0xE3FE, 0xE310, 0xE4C0, 0xE4EC, 0xE4E2, 0xE442, + 0xFCED, 0xFC43, 0xFDD1, 0xFDEE, 0xFDFF, 0xFD22, 0xFEDE, 0xFED2, 0xFEF2, + 0xFF13, 0xFF33, 0xF0D2, 0xF2D2, 0xF230, 0xF243, 0xF3C4, 0xF331, 0xF4C1, + 0xF4DC, 0xF4FE, 0x0D43, 0x03D4, 0x03F4, 0x0334, 0x04E2, 0x04FD, 0x041D, + 0x1C4D, 0x1DC2, 0x1D11, 0x1ECD, 0x1ED2, 0x1FD1, 0x1F33, 0x10D0, 0x11D3, + 0x12DE, 0x12D0, 0x12D4, 0x12E3, 0x13EC, 0x13F1, 0x14C3, 0x14F2, 0x141E, + 0x2C0E, 0x2C1D, 0x2DDE, 0x2DEF, 0x2D14, 0x2D4F, 0x2EEC, 0x2E3F, 0x2E31, + 0x2FCF, 0x2FC3, 0x2FDC, 0x2F3C, 0x20E2, 0x20E4, 0x2022, 0x2024, 0x204E, + 0x2042, 0x21E3, 0x2132, 0x22CE, 0x22D1, 0x224C, 0x2341, 0x242E, 0x243F, + 0x244E, 0x3CC1, 0x3CD2, 0x3CED, 0x3DF1, 0x3D1F, 0x3D11, 0x3D40, 0x3ECF, + 0x3ED4, 0x3FFF, 0x32ED, 0x3201, 0x341E, 0x343E, 0x4C20, 0x4DDE, 0x4ED1, + 0x4E22, 0x4FFE, 0x42E2, 0x43DE, 0xCF30, 0x43FE, 0x4332, 0xDD00, 0xDFE0, + 0xD300, 0xD4E1, 0xD4F2, 0xEDDE, 0xEEC0, 0xEE04, 0xEE24, 0xEE4E, 0xE242, + 0xFC1E, 0xFD11, 0xFE1C, 0xFE1E, 0xFFD1, 0xF44F, 0x0C3F, 0x0EE2, 0x0E2E, + 0x0130, 0x02E4, 0x020E, 0x0341, 0x1CD2, 0x1C32, 0x1C41, 0x1DF1, 0x1EC3, + 0x1FF3, 0x1030, 0x11CC, 0x11DF, 0x1131, 0x1144, 0x1300, 0x132C, 0x2CD1, + 0x2D41, 0x21E1, 0x211E, 0x2220, 0x23CF, 0x3E0F, 0x34C1, 0x4EDF, 0x4EEE, + 0x430F, 0xD210, 0xD241, 0xEFEF, 0xE11E, 0xF1E2, 0x0F2D, 0x0220, 0x1E34, + 0x0110, 0x11CE, 0x12CF, 0x12EF, 0x121C, 0xFEEF, 0x221F, 0x31FF, 0xF014, + 0xF2C1, 0x0C1F, 0x0EFF, 0x1F02, 0x24E0, 0x3C10, 0x42E0, 0xF0C1, 0x114E, + 0xF11F, 0xFC10, 0x42FF, 0x40E0, 0xC1E1, 0x0FC1, 0x1F42, 0x0F0F, 0x11FF, + 0x0112, 0xC211, 0xD410, 0xFFEE, 0xFF20, 0xF1FF, 0x01C3, 0x010D, 0x1CEF, + 0x1F4E, 0x0042, 0x102F, 0x1021, 0x1010, 0xFFF1, 0xFC0F, 0x34E1, 0xC30F, + 0xC4FF, 0x2400, 0xD1FF, 0xD140, 0xD2F0, 0xEEF1, 0x4110, 0xF111, 0x0101, + 0x11F1, 0xFCE1, 0xF0CD, 0xF142, 0xF144, 0xF300, 0xF34E, 0x0E20, 0x1C12, + 0x1C21, 0x1C30, 0x1D00, 0x1E14, 0x1E3C, 0x1FC2, 0x12E1, 0x12FC, 0x1214, + 0x21C1, 0x34D0, 0x4EFF, 0xCEFF, 0x43E1, 0x4301, 0xC101, 0xECFF, 0xE011, + 0xFF0C, 0xFF2C, 0x02FF, 0x041F, 0x1C2F, 0xFE10, 0x14D0, 0x3210, 0xF1CE, + 0x0FE1, 0x0F21, 0x101E, 0x2CDF, 0x4211, 0xC011, 0xEE40, 0xE240, 0xF1C0, + 0xF2CF, 0x0CFF, 0x0F2F, 0x4E00, 0x0F43, 0x10F2, 0x4D10, 0xEC20, 0xF0EF, + 0xF42F, 0x04FF, 0x1C01, 0x1FC0, 0x1043, 0x1120, 0x1201, 0x2CF1, 0x24D1, + 0x4CFF, 0x4F01, 0x4011, 0x00E4, 0xFEC1, 0xF0CF, 0x1401, 0x4C00, 0x2000, + 0xE101, 0xCCE0, 0x44E0, 0xCCD3, 0xCCEC, 0xCCE4, 0xCCFD, 0xCDE1, 0xCD21, + 0xC1D0, 0xC23F, 0xC420, 0xD11F, 0xD3FF, 0xD40F, 0xD441, 0xEDF0, 0xEE02, + 0xE0C0, 0xE1D4, 0xE1E1, 0xE1FE, 0xE4D1, 0xE43F, 0xFDEC, 0xFD00, 0xFD1F, + 0xFE23, 0xFFDD, 0xFFFD, 0xF1DF, 0xF113, 0xF13F, 0xF214, 0xF234, 0xF412, + 0x0CF3, 0x0D0F, 0x0ECC, 0x00D3, 0x022E, 0x04D1, 0x040E, 0x1CC1, 0x1C1E, + 0x1C4F, 0x1E12, 0x1E3E, 0x1F31, 0x103E, 0x113D, 0x113F, 0x13CE, 0x13E0, + 0x14C1, 0x14ED, 0x144D, 0x2C2E, 0x2D10, 0x2D21, 0x2EE0, 0x2E02, 0x2E4E, + 0x2F21, 0x2F4F, 0x220E, 0x2240, 0x234D, 0x3CF2, 0x3C01, 0x3C21, 0x34D2, + 0x4CE0, 0xCE3F, 0x42D1, 0x43EF, 0xCF21, 0xC3E1, 0xE121, 0xE2FF, 0xE211, + 0xFDC4, 0xFEE1, 0xFE34, 0xFF04, 0xF122, 0xF2D4, 0x0EEC, 0x00DF, 0x0204, + 0x043F, 0x044E, 0x1D40, 0x1FFD, 0x1F04, 0x12FE, 0x122F, 0x144F, 0x2C20, + 0x2222, 0xCDEF, 0xD0F0, 0xE440, 0xF1CC, 0xFEF0, 0x0CF1, 0x0F34, 0x00C0, + 0xF012, 0x0121, 0x1F11, 0x0C00, 0x1E41, 0x4101, 0x40F1, 0xDFF1, 0x01F2, + 0xEC3F, 0x01CD, 0x2F01, 0xDCF0, 0xFC30, 0xFFE4, 0xF24F, 0x00CC, 0x1FE4, + 0x0004, 0x4F10, 0x11EC, 0x1234, 0x22C0, 0x24C0, 0xEC00, 0x0FEF, 0x01F4, + 0x0F1E, 0x2EC0, 0x3C0F, 0xD111, 0xEF2F, 0x4200, 0xEC1F, 0xEE00, 0x0002, + 0xC110, 0xF210, 0x1CF0, 0x0FFE, 0xE141, 0xE4FF, 0xF034, 0xF221, 0xF4E1, + 0x0DC3, 0x1003, 0x11FD, 0xE000, 0xCF0F, 0x21EF, 0x31F1, 0xDEF0, 0xE040, + 0xF4EF, 0x013C, 0x0211, 0x04E0, 0x1D42, 0x1F2E, 0x10FC, 0x11C0, 0x03CF, + 0x1124, 0x34F0, 0x0F1C, 0xD100, 0x034F, 0x1142, 0xCD10, 0xC3F0, 0x421F, + 0x4431, 0xCCF3, 0xCC0C, 0xCC02, 0xCC04, 0xCC1D, 0xCC13, 0xCC2C, 0xCC24, + 0xCC3D, 0xCC33, 0xCC4C, 0xCC4E, 0xCC42, 0xCC44, 0xCDCD, 0xCDCF, 0xF100, + 0x000C, 0xE10F, 0x1F40, 0x20FF, 0x210F, 0xEFF0, 0xCEF1, 0xC0FF, 0xE41F, + 0xFC01, 0x000E, 0xFD40, 0xF0C3, 0xF1E4, 0xF12C, 0xF140, 0x01E3, 0x1F0C, + 0x1014, 0x01EF, 0x4411, 0xCDC1, 0xCDDC, 0xCDD4, 0xCDE3, 0xCDFC, 0xCDF4, + 0xCD0D, 0xCD03, 0xCD1C, 0xCD14, 0xCD2D, 0xCD23, 0xCD3C, 0xCD34, 0xCD4D, + 0xCD41, 0xCECC, 0xCECE, 0xCEC0, 0xCEC2, 0xCEC4, 0xCED3, 0xCEEC, 0xCEEE, + 0xCEE2, 0xCEFD, 0xCEF3, 0xCE0C, 0xCE04, 0xCE1D, 0xCE13, 0xCE2C, 0x0040, + 0x04F1, 0x0400, 0x124F, 0x4400, 0xCE24, 0xCE3D, 0xCE33, 0xCE4C, 0xCE42, + 0xCE44, 0xCFCD, 0xCFCF, 0xCFC1, 0xCFC3, 0xCFDC, 0xCFD2, 0xCFD4, 0xCFED, + 0xCFE3, 0xCFFC, 0xCFF2, 0xCFF4, 0xCF0D, 0xCF03, 0xCF1C, 0xCF1E, 0xCF3C, + 0xCF34, 0xCF4D, 0xCF43, 0xC0CC, 0xC0CE, 0xC0C0, 0xC0C2, 0xC0C4, 0xC0D1, + 0xC0D3, 0xC0EC, 0xC0E2, 0xC0E4, 0xC0F3, 0xC00C, 0xC004, 0xC013, 0xC02C, + 0xC022, 0xC024, 0xC03D, 0xC033, 0xC04E, 0xC042, 0xC044, 0xC1CF, 0xC1C3, + 0xC1DC, 0xC1D2, 0xC1D4, 0xC1ED, 0xC1E3, 0xC1FC, 0xC1F4, 0xC10D, 0xC11C, + 0xC112, 0xC114, 0xC12D, 0xC123, 0xC13C, 0x0013, 0xC134, 0xC14D, 0xC14F, + 0xC143, 0xC2CC, 0xC2CE, 0xC2C0, 0xC2C2, 0xC2C4, 0xC2D3, 0xC2EC, 0xC2E4, + 0xC2FD, 0xC20C, 0xC204, 0xC21D, 0xC213, 0xC22C, 0xC224, 0xC23D, 0xC233, + 0xC24C, 0xC24E, 0xC240, 0xC3CD, 0xC3C3, 0xC3DC, 0xC3D4, 0xC3ED, 0xC3F4, + 0xC30D, 0xC303, 0xC31C, 0xC312, 0xC314, 0xC32D, 0xC33C, 0xC33E, 0xC334, + 0xC34D, 0xC4CC, 0xC4CE, 0xC4C0, 0xC4C2, 0xC4C4, 0xC4DF, 0xC4EC, 0xC4EE, + 0xC4FD, 0xC4F3, 0xC40E, 0xC402, 0xC404, 0xC41D, 0xC413, 0xC42C, 0xC424, + 0xC43D, 0xC433, 0xC44C, 0xC442, 0xC444, 0xDCCF, 0xDCDC, 0xDCED, 0xDCE3, + 0xDCFC, 0xDCF4, 0xDC0D, 0xDC1C, 0xDC14, 0xDC3C, 0xDC43, 0xDDCE, 0xDDC4, + 0xDDD1, 0xDDD3, 0xDDE2, 0xDDE4, 0xDDFD, 0xDDF3, 0xDD0C, 0xDD0E, 0xDD1D, + 0xDD1F, 0xDD13, 0xDD24, 0xDD3D, 0xDD3F, 0xDD31, 0xDD33, 0xDD4C, 0xDD44, + 0xDECD, 0xDEC3, 0xDED0, 0xDED2, 0xDEED, 0xDEE3, 0xDEFC, 0xDEF4, 0xDE0D, + 0xDE03, 0xDE1C, 0xDE1E, 0xDE14, 0xDE2D, 0xDE3C, 0xDE3E, 0xDE30, 0xDFCC, + 0xDFC0, 0xDFC2, 0xDFC4, 0xDFDD, 0xDFD1, 0xDFD3, 0xDFEC, 0xDFE2, 0xDFFD, + 0xDFF3, 0xDF02, 0xDF04, 0xDF1D, 0xDF24, 0xDF3D, 0xDF31, 0xDF33, 0xDF4C, + 0xDF4E, 0xDF44, 0xD0CD, 0xD0CF, 0xD0C3, 0xD0DC, 0xD0D0, 0xD0D2, 0xD0D4, + 0xD0ED, 0xD0EF, 0xD0E1, 0xD0FC, 0xD0FE, 0xD0F4, 0xD00D, 0xD003, 0xD014, + 0xD02D, 0xD023, 0xD03C, 0xD034, 0xD04D, 0xD1C4, 0xD1DD, 0xD1DF, 0xD1D1, + 0xD1D3, 0xD1FD, 0xD1F3, 0xD10C, 0xD10E, 0xD102, 0xD11D, 0xD113, 0xD12E, + 0xD122, 0xD124, 0xD13D, 0xD13F, 0xD131, 0xD133, 0xD144, 0xD2CD, 0xD2CF, + 0xD2C1, 0xD2C3, 0xD2DE, 0xD2D0, 0xD2D4, 0xD2ED, 0xD20D, 0xD203, 0xD21C, + 0xD21E, 0xD212, 0xD223, 0xD23C, 0xD230, 0xD234, 0xD24D, 0xD3CC, 0xD3CE, + 0xD3DD, 0xD3DF, 0xD3D1, 0xD3EE, 0xD3E2, 0xD3E4, 0xD3FD, 0xD3F3, 0xD30C, + 0xD302, 0xD304, 0xD31F, 0xD313, 0xD32E, 0xD324, 0xD33F, 0xD333, 0xD34C, + 0xD34E, 0xD344, 0xD4CD, 0xD4CF, 0xD4DC, 0xD4DE, 0xD4D0, 0xD4D4, 0xD4FC, + 0xD4FE, 0xD4F4, 0xD40D, 0xD403, 0xD41C, 0xD412, 0xD414, 0xD423, 0xD43C, + 0xD43E, 0xD434, 0xD44D, 0xECC0, 0xECDD, 0xECEC, 0xEC0C, 0xEC04, 0xEC1D, + 0xEC2C, 0xEC3D, 0xEC4C, 0xEC42, 0xEC44, 0xEDD0, 0xEDD2, 0xEDED, 0xEDE1, + 0xEDE3, 0xEDFC, 0xEDFE, 0xEDF4, 0xED0D, 0xED03, 0xED1C, 0xED1E, 0xED12, + 0xED2D, 0xED23, 0xED3E, 0xED32, 0xEED1, 0xEED3, 0xEEE4, 0xEE0E, 0xEE2C, + 0xEE3D, 0xEE3F, 0xEE4C, 0xEE44, 0xEFD0, 0xEFD2, 0xEF0D, 0xEF03, 0xEF1C, + 0xEF2D, 0xE0CC, 0xE0DD, 0xE0DF, 0xE0D1, 0xE0D3, 0xE0FD, 0xE01D, 0xE03D, + 0xE033, 0xE044, 0xE1DC, 0xE1DE, 0xE1D0, 0xE1D2, 0xE1ED, 0xE10D, 0xE103, + 0xE13C, 0xE2DD, 0xE2FD, 0xE2F3, 0xE23D, 0xE23F, 0xE244, 0xE3D2, 0xE3ED, + 0xE3E3, 0xE30D, 0xE303, 0xE312, 0xE314, 0xE32D, 0xE323, 0xE33E, 0xE332, + 0xE334, 0xE4CC, 0xE4C4, 0xE4F3, 0xE40C, 0xE404, 0xE41D, 0xE424, 0xE433, + 0xE44C, 0xE444, 0xFCFC, 0xFC1C, 0xFC14, 0xFC2D, 0xFC3C, 0xFC3E, 0xFDD3, + 0xFDE2, 0xFDFD, 0xFDF3, 0xFD0C, 0xFD0E, 0xFD1D, 0xFD13, 0xFD2C, 0xFD3D, + 0xFD3F, 0xFD33, 0xFD4C, 0xF1DD, 0xF13D, 0xF203, 0xF22D, 0xF232, 0xF3DD, + 0xF3DF, 0xF3D1, 0xF3FD, 0xF3F3, 0xF302, 0xF31D, 0xF313, 0xF32E, 0xF33D, + 0xF333, 0xF4C3, 0xF4E3, 0xF4FC, 0xF4F4, 0xF41C, 0xF423, 0xF434, 0xF443, + 0x0CDD, 0x0CEC, 0x0C2C, 0x0C3D, 0x0DED, 0x0DE3, 0x0DFC, 0x0DFE, 0x0D0D, + 0x0D03, 0x0D1C, 0x0D12, 0x0D23, 0x0D3C, 0x0D3E, 0x0D30, 0x0ED3, 0x0EFD, + 0x0E3D, 0x02D1, 0x0231, 0x03DE, 0x03D0, 0x03D2, 0x03ED, 0x03E3, 0x03F2, + 0x030F, 0x0303, 0x031E, 0x032D, 0x0323, 0x0330, 0x04CC, 0x04C4, 0x04E4, + 0x0404, 0x0413, 0x0424, 0x0433, 0x0444, 0x1CCD, 0x1CC3, 0x1CDC, 0x1CF4, + 0x1C0D, 0x1C1C, 0x1C3C, 0x1DCC, 0x1DEE, 0x1DFD, 0x1DF3, 0x1D0C, 0x1D13, + 0x1D2E, 0x1D22, 0x1D3D, 0x1D3F, 0x1D33, 0x1D4C, 0x1ED0, 0x1E0D, 0x1E03, + 0x1E32, 0x1023, 0x12C3, 0x12D2, 0x12ED, 0x1203, 0x13C4, 0x13DD, 0x13DF, + 0x13D3, 0x13EE, 0x13E2, 0x13E4, 0x13F3, 0x130C, 0x1302, 0x1304, 0x1313, + 0x1322, 0x133D, 0x1331, 0x14CD, 0x14D4, 0x14F4, 0x1403, 0x1412, 0x1414, + 0x1423, 0x2CCC, 0x2CC2, 0x2CC4, 0x2CDD, 0x2CE4, 0x2CFD, 0x2CF3, 0x2C0C, + 0x2C04, 0x2C2C, 0x2C24, 0x2C33, 0x2C4C, 0x2C40, 0x2C44, 0x2DCD, 0x2DC3, + 0x2DD0, 0x2DD2, 0x2DD4, 0x2DED, 0x2DE1, 0x2DFE, 0x2DF2, 0x2D0D, 0x2D03, + 0x2D1C, 0x2D12, 0x2D2D, 0x2D23, 0x2D3E, 0x2D32, 0x2D43, 0x2EDD, 0x2ED3, + 0x2EFD, 0x2E0E, 0x2E04, 0x2E13, 0x2E3D, 0x2E33, 0x2E4C, 0x2FD2, 0x2FFC, + 0x2F0D, 0x2F03, 0x2F1C, 0x2F14, 0x2F23, 0x2F30, 0x2F32, 0x20C4, 0x20DD, + 0x20D3, 0x203D, 0x203F, 0x2031, 0x2033, 0x204C, 0x21D4, 0x2103, 0x212D, + 0x2130, 0x2143, 0x22C4, 0x22DD, 0x22DF, 0x22D3, 0x22F3, 0x221D, 0x222C, + 0x223D, 0x223F, 0x23CD, 0x23D2, 0x23ED, 0x23E3, 0x23F2, 0x230D, 0x2314, + 0x232D, 0x2323, 0x233C, 0x233E, 0x24C4, 0x24EC, 0x24F3, 0x2402, 0x2404, + 0x2413, 0x2424, 0x3CCD, 0x3CC3, 0x3CDC, 0x3CD4, 0x3CE3, 0x3CFC, 0x3CF4, + 0x3C0D, 0x3C1E, 0x3C3C, 0x3C34, 0x3DCC, 0x3DCE, 0x3DC4, 0x3DDD, 0x3DDF, + 0x3DD1, 0x3DD3, 0x3DEC, 0x3DEE, 0x3DE0, 0x3DE2, 0x3DE4, 0x3DFD, 0x3DF3, + 0x3D0C, 0x3D0E, 0x3D02, 0x3D04, 0x3D1D, 0x3D2E, 0x3D20, 0x3D24, 0x3D31, + 0x3D4C, 0x3D44, 0x3ECD, 0x3EC3, 0x3ED0, 0x3ED2, 0x3EED, 0x3EFC, 0x3EFE, + 0x3EF2, 0x3EF4, 0x3E0D, 0x3E03, 0x3E1C, 0x3E23, 0x3E3E, 0x3E30, 0x3E32, + 0x3E4D, 0x3FC4, 0x3FDD, 0x3FD1, 0x3FEC, 0x3FEE, 0x3FE0, 0x3FE4, 0x3FFD, + 0x3F0C, 0x3F04, 0x3F1D, 0x3F13, 0x3F2E, 0x3F22, 0x3F24, 0x3F3D, 0x3F3F, + 0x3F31, 0x3F33, 0x3F4C, 0x3F40, 0x3F42, 0x3F44, 0x30CD, 0x30CF, 0x30C1, + 0x30C3, 0x30DC, 0x30DE, 0x30D0, 0x30D2, 0x30ED, 0x30E3, 0x30F4, 0x300D, + 0x3003, 0x301C, 0x302D, 0x3021, 0x3023, 0x303C, 0x303E, 0x3030, 0x3032, + 0x3034, 0x304F, 0x3041, 0x3043, 0x31C2, 0x31C4, 0x31D3, 0x31E4, 0x31FD, + 0x31F3, 0x310C, 0x3102, 0x3104, 0x311D, 0x3113, 0x312E, 0x3124, 0x313D, + 0x313F, 0x3131, 0x3133, 0x314C, 0x3140, 0x32CD, 0x32DC, 0x32DE, 0x32D0, + 0x32D2, 0x32D4, 0x32E3, 0x320D, 0x3203, 0x3212, 0x3214, 0x322D, 0x3223, + 0x323E, 0x3230, 0x3234, 0x324D, 0x3241, 0x3243, 0x33CC, 0x33DD, 0x33DF, + 0x33D1, 0x33D3, 0x33EE, 0x33E2, 0x33E4, 0x33F3, 0x330C, 0x330E, 0x3302, + 0x3304, 0x331D, 0x3313, 0x3320, 0x333D, 0x333F, 0x3340, 0x34CD, 0x34C3, + 0x34D4, 0x34FC, 0x34F4, 0x3403, 0x341C, 0x3414, 0x342D, 0x3423, 0x3434, + 0x344D, 0x344F, 0x3441, 0x4CCC, 0x4CCE, 0x4CC0, 0x4CC2, 0x4CC4, 0x4CDD, + 0x4CD1, 0x4CD3, 0x4CEC, 0x4CEE, 0x4CE2, 0x4CE4, 0x4CFD, 0x4CF3, 0x4C0C, + 0x4C02, 0x4C04, 0x4C1D, 0x4C13, 0x4C2C, 0x4C2E, 0x4C22, 0x4C3F, 0x4C31, + 0x4C4C, 0x4C4E, 0x4C40, 0x4C42, 0x4C44, 0x4DC3, 0x4DDC, 0x4DD4, 0x4DED, + 0x4DE3, 0x4DFC, 0x4DF4, 0x4D0D, 0x4D03, 0x4D1C, 0x4D14, 0x4D2D, 0x4D3C, + 0x4D30, 0x4D34, 0x4D4D, 0x4D41, 0x4D43, 0x4ECC, 0x4EC4, 0x4EDD, 0x4ED3, + 0x4EEC, 0x4EF3, 0x4E0C, 0x4E1D, 0x4E13, 0x4E2C, 0x4E24, 0x4E33, 0x4E40, + 0x4E44, 0x4FC3, 0x4FDC, 0x4FD4, 0x4FED, 0x4FE3, 0x4FFC, 0x4FF4, 0x4F0D, + 0x4F1C, 0x4F14, 0x4F2D, 0x4F23, 0x4F3C, 0x4F34, 0x4F4D, 0x4F4F, 0x4F43, + 0x40CC, 0x40C2, 0x40C4, 0x40DD, 0x40D3, 0x40EC, 0x40E2, 0x40E4, 0x40FD, + 0x40F3, 0x400C, 0x4002, 0x4004, 0x401D, 0x4013, 0x402C, 0x4024, 0x403D, + 0x4033, 0x404C, 0x404E, 0x4042, 0x4044, 0x41CD, 0x41CF, 0x41C1, 0x41C3, + 0x41DC, 0x41D2, 0x41D4, 0x41ED, 0x41E3, 0x41FC, 0x41F4, 0x410D, 0x4103, + 0x411C, 0x4114, 0x412D, 0x4123, 0x4132, 0x4134, 0x414D, 0x4141, 0x4143, + 0x42CC, 0x42CE, 0x42C2, 0x42C4, 0x42DD, 0x42EC, 0x42FD, 0x42F3, 0x420C, + 0x4204, 0x421D, 0x422C, 0x4224, 0x423D, 0x4233, 0x424C, 0x424E, 0x4240, + 0x4242, 0x4244, 0x43C3, 0x43DC, 0x43D2, 0x43D4, 0x43E3, 0x43FC, 0x43F4, + 0x430D, 0x4303, 0x431C, 0x4314, 0x433C, 0x433E, 0x4330, 0x4334, 0x434D, + 0x434F, 0x4341, 0x4343, 0x44CC, 0x44CE, 0x44C0, 0x44C4, 0x44DD, 0x44EC, + 0x44E4, 0x44F3, 0x440C, 0x4404, 0x4413, 0x442C, 0x4422, 0x4424, 0x443D, + 0x444C, 0x444E, 0xCCCC, 0x4440, 0x4444, 0xCC0E, 0xCC40, 0xCDC3, 0xCDD2, + 0xCDED, 0xCDF2, 0xCD12, 0xCD32, 0xCD43, 0xCEDD, 0xCEE4, 0xCE4E, 0xCFDE, + 0xCF14, 0xCF2D, 0xCF23, 0xCF3E, 0xC0DD, 0xC0DF, 0xC0FD, 0xC01D, 0xC02E, + 0xC04C, 0xC1CD, 0xC1C1, 0xC1DE, 0xC103, 0xC141, 0xC2DD, 0xC2F3, 0xC222, + 0xC242, 0xC244, 0xC3CF, 0xC3C1, 0xC3DE, 0xC3D0, 0xC3FC, 0xC31E, 0xC323, + 0xC343, 0xC4DD, 0xC4D1, 0xC4E4, 0xC40C, 0xC422, 0xC44E, 0xDCCD, 0xDCC3, + 0xDCD4, 0xDC1E, 0xDC2D, 0xDC23, 0xDC32, 0xDC4D, 0xDDC0, 0xDDC2, 0xDDDF, + 0xDDEC, 0xDDE0, 0xDD02, 0xDD04, 0xDD2C, 0xDD2E, 0xDD20, 0xDD22, 0xDD4E, + 0xDEDE, 0xDED4, 0xDEFE, 0xDE34, 0xDFCE, 0xDFDF, 0xDFEE, 0xDFE4, 0xDF0E, + 0xDF13, 0xDF2C, 0xDF22, 0xD0C1, 0xD0DE, 0xD0E3, 0xD0F2, 0xD01C, 0xD01E, + 0xD02F, 0xD021, 0xD03E, 0xD043, 0xD1CC, 0xD1C0, 0xD104, 0xD2DC, 0xD2E3, + 0xD2FC, 0xD2F4, 0xD22D, 0xD23E, 0xD3C0, 0xD3C2, 0xD3C4, 0xD3EC, 0xD3E0, + 0xD3F1, 0xD322, 0xD4C1, 0xD4C3, 0xD4E3, 0xD443, 0xECFD, 0xEC0E, 0xEC13, + 0xEC24, 0xEDCF, 0xED0F, 0xED21, 0xED30, 0xEEDF, 0xEEEC, 0xEEF3, 0xEE0C, + 0xEFED, 0xEFE3, 0xEFF2, 0xEF14, 0xEF23, 0xEF3E, 0xE0CE, 0xE0C4, 0xE0E2, + 0xE013, 0xE02C, 0xE02E, 0xE03F, 0xE031, 0xE04E, 0xE1E3, 0xE1FC, 0xE130, + 0xE134, 0xE2CC, 0xE2DF, 0xE2D1, 0xE2EE, 0xE20C, 0xE202, 0xE21D, 0xE24C, + 0xE3DE, 0xE3EF, 0xE3FC, 0xE31C, 0xE330, 0xE34D, 0xE413, 0xFCCD, 0xFCF4, + 0xFC0D, 0xFC03, 0xFC34, 0xFC4D, 0xFDDD, 0xFD2E, 0xFD31, 0xFD44, 0xFE0D, + 0xFE3E, 0xFE32, 0xFF44, 0xF2DE, 0xF2D0, 0xF3D3, 0xF30C, 0xF30E, 0xF304, + 0xF322, 0xF34C, 0xF344, 0xF40D, 0xF403, 0xF42D, 0xF43C, 0xF44D, 0x0CCC, + 0x0CD3, 0x0CFD, 0x0C0C, 0x0C1D, 0x0C4C, 0x0C4E, 0x0DCD, 0x0DDE, 0x0DD0, + 0x0DEF, 0x0DF2, 0x0D4D, 0x0EDD, 0x0E33, 0x02DD, 0x02D3, 0x02FD, 0x0202, + 0x023F, 0x0244, 0x03C3, 0x030D, 0x0312, 0x0314, 0x0343, 0x04EC, 0x040C, + 0x043D, 0x0442, 0x1CFC, 0x1C14, 0x1DD3, 0x1D0E, 0x1D02, 0x1D1D, 0x1D31, + 0x1EDE, 0x1E23, 0x1032, 0x1230, 0x13FF, 0x130E, 0x131D, 0x133F, 0x14DC, + 0x14E3, 0x14FC, 0x140D, 0x2CCE, 0x2CEC, 0x2DE3, 0x2DFC, 0x2ECC, 0x2EC4, + 0x2ED1, 0x2E22, 0x2FDE, 0x2FF4, 0x2F2D, 0x2F3E, 0x20FD, 0x2040, 0x21C3, + 0x21DE, 0x21FC, 0x210D, 0x2134, 0x22E4, 0x220C, 0x2204, 0x2213, 0x222E, + 0x2224, 0x23DC, 0x23DE, 0x23D0, 0x23D4, 0x23EF, 0x23FE, 0x2303, 0x231E, + 0x2312, 0x2330, 0x24DD, 0x24E4, 0x24FD, 0x2433, 0x3C03, 0x3C1C, 0x3C12, + 0x3C14, 0x3C23, 0x3C4D, 0x3D13, 0x3D22, 0x3D3D, 0x3D33, 0x3D42, 0x3EDE, + 0x3EE3, 0x3E12, 0x3E3C, 0x3E34, 0x3E41, 0x3FCC, 0x3FCE, 0x3FC2, 0x3FDF, + 0x3FD3, 0x3FF3, 0x3F0E, 0x3F02, 0x3F20, 0x30D4, 0x30EF, 0x30FC, 0x30FE, + 0x30F2, 0x301E, 0x3014, 0x304D, 0x31DD, 0x31DF, 0x31D1, 0x31EC, 0x31E2, + 0x310E, 0x312C, 0x3144, 0x32EF, 0x32E1, 0x32F2, 0x321C, 0x323C, 0x3232, + 0x33CE, 0x33C4, 0x33EC, 0x33FD, 0x33F1, 0x3300, 0x331F, 0x332C, 0x3322, + 0x3324, 0x334C, 0x334E, 0x34ED, 0x34F2, 0x340D, 0x343C, 0x3430, 0x4C24, + 0x4C3D, 0x4C33, 0x4DFE, 0x4D12, 0x4D23, 0x4ECE, 0x4EE4, 0x4EFD, 0x4E02, + 0x4E04, 0x4E4C, 0x4E4E, 0x4E42, 0x4FCF, 0x4F03, 0x4F3E, 0x4F32, 0x4F41, + 0x40CE, 0x40C0, 0x400E, 0x4031, 0x413C, 0x413E, 0x4130, 0x42D3, 0x420E, + 0x4213, 0x4231, 0x43ED, 0x431E, 0x4312, 0x44C2, 0x44E2, 0x440E, 0x441D, + 0x442E, 0xCCEE, 0xCC22, 0xCDD0, 0xCDFE, 0xCD3E, 0xCE0E, 0xCF12, 0xC1FE, + 0xC13E, 0xC2E2, 0xC3E3, 0xC332, 0xC4D3, 0xC43F, 0xC440, 0xDCD0, 0xDCFE, + 0xDDCC, 0xDDDD, 0xDDF1, 0xDD11, 0xDECF, 0xDEE1, 0xDE21, 0xDF42, 0xD1CE, + 0xD1C2, 0xD1EC, 0xD12C, 0xD2EF, 0xD214, 0xD22F, 0xD221, 0xD342, 0xD41E, + 0xED01, 0xED3C, 0xED34, 0xED4D, 0xED43, 0xEEE2, 0xEE13, 0xEE31, 0xEFDC, + 0xEFD4, 0xEFF4, 0xE0EC, 0xE00C, 0xE024, 0xE04C, 0xE1C3, 0xE114, 0xE12D, + 0xE14D, 0xE14F, 0xE2CE, 0xE2C0, 0xE204, 0xE213, 0xE222, 0xE224, 0xE3D4, + 0xE30F, 0xE32F, 0xE4DD, 0xE4D3, 0xE4EE, 0xE40E, 0xE42C, 0xE44E, 0xFCCF, + 0xFCDC, 0xFCFE, 0xFD02, 0xFD42, 0xFEE3, 0xFE2D, 0xF0DE, 0xF0D0, 0xF04D, + 0xF131, 0xF2ED, 0xF23E, 0xF32C, 0x0CEE, 0x0D2D, 0x0D21, 0x0D32, 0x03EF, + 0x0431, 0x0440, 0x1CDE, 0x1CED, 0x1C03, 0x1DDD, 0x1DE2, 0x1D1F, 0x1D20, + 0x1EDC, 0x1E30, 0x1FDD, 0x1F3D, 0x1232, 0x132E, 0x1333, 0x2CD3, 0x2C3D, + 0x2C31, 0x2C42, 0x2DDC, 0x2D01, 0x2EDF, 0x2EE4, 0x2EF3, 0x2E24, 0x2FE3, + 0x2F12, 0x2F34, 0x20CE, 0x20D1, 0x20EC, 0x20F3, 0x200C, 0x2002, 0x2004, + 0x21CD, 0x21D0, 0x211C, 0x2114, 0x2123, 0x2233, 0x2244, 0x23FC, 0x230F, + 0x2301, 0x231C, 0x234F, 0x24D3, 0x242C, 0x2444, 0x3CFE, 0x3C3E, 0x3C41, + 0x3DFF, 0x3D2C, 0x3D4E, 0x3EC1, 0x3EDC, 0x3E4F, 0x3F2C, 0x31CE, 0x31C0, + 0x31E0, 0x314E, 0x32FE, 0x322F, 0x33C2, 0x332E, 0x3333, 0x34CF, 0x34DC, + 0x34FE, 0x4C0E, 0x4E2E, 0x4E3D, 0x4FDE, 0x40D1, 0x42C0, 0xCC11, 0x422E, + 0x443F, 0xCDDE, 0xCE40, 0xC3EF, 0xDC30, 0xDE0F, 0xD4EF, 0xECEE, 0xEECE, + 0xEFC1, 0xE1CF, 0xE1F4, 0xE3CF, 0xE343, 0xFC4F, 0xFDC0, 0xFD24, 0xF0E3, + 0xF1D1, 0xF3C2, 0xF342, 0xF4D2, 0x0C02, 0x0DF0, 0x0D01, 0x0D2F, 0x0E44, + 0x0F32, 0x00DD, 0x01ED, 0x02CC, 0x03C1, 0x1CFE, 0x1C3E, 0x1DC4, 0x1DD1, + 0x1D4E, 0x13C2, 0x14D2, 0x1441, 0x2DF0, 0x2DF4, 0x2D34, 0x2E2E, 0x2FF2, + 0x2020, 0x212F, 0x2332, 0x24EE, 0x3E01, 0x3FC0, 0x31EE, 0x311F, 0x4C11, + 0x4EE2, 0x41D0, 0x41FE, 0xCCF1, 0xDCEF, 0xDC4F, 0xDFFF, 0xEE20, 0xEF4F, + 0xE020, 0xE12F, 0xFEF4, 0xF1F3, 0xF2F2, 0xF4CF, 0xF441, 0x0DCF, 0x0ECE, + 0x0E0C, 0x02E2, 0x03DC, 0x12DC, 0x142F, 0x2E11, 0x2FEF, 0x22F1, 0x24DF, + 0x2431, 0x3EF0, 0x3001, 0x32F0, 0x4DEF, 0x4FE1, 0xC10F, 0xDC0F, 0xF0FE, + 0xDC2F, 0x0F03, 0x01D4, 0x0CE0, 0x0103, }; -static const uint16_t on2avc_cb13_syms[ON2AVC_CB13_CODES] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, - 0x000C, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, - 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, - 0x00FF, 0x0100, 0x0101, 0x0102, 0x0103, 0x0104, - 0x0105, 0x0106, 0x0107, 0x0108, 0x0109, 0x010A, - 0x010B, 0x010C, 0x01F4, 0x01F5, 0x01F6, 0x01F7, - 0x01F8, 0x01F9, 0x01FA, 0x01FB, 0x01FC, 0x01FD, - 0x01FE, 0x01FF, 0x0200, 0x0201, 0x0202, 0x0203, - 0x0204, 0x0205, 0x0206, 0x0207, 0x0208, 0x0209, - 0x020A, 0x020B, 0x020C, 0x02F4, 0x02F5, 0x02F6, - 0x02F7, 0x02F8, 0x02F9, 0x02FA, 0x02FB, 0x02FC, - 0x02FD, 0x02FE, 0x02FF, 0x0300, 0x0301, 0x0302, - 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, 0x0308, - 0x0309, 0x030A, 0x030B, 0x030C, 0x03F4, 0x03F5, - 0x03F6, 0x03F7, 0x03F8, 0x03F9, 0x03FA, 0x03FB, - 0x03FC, 0x03FD, 0x03FE, 0x03FF, 0x0400, 0x0401, - 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, - 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x04F4, - 0x04F5, 0x04F6, 0x04F7, 0x04F8, 0x04F9, 0x04FA, - 0x04FB, 0x04FC, 0x04FD, 0x04FE, 0x04FF, 0x0500, - 0x0501, 0x0502, 0x0503, 0x0504, 0x0505, 0x0506, - 0x0507, 0x0508, 0x0509, 0x050A, 0x050B, 0x050C, - 0x05F4, 0x05F5, 0x05F6, 0x05F7, 0x05F8, 0x05F9, - 0x05FA, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF, - 0x0600, 0x0601, 0x0602, 0x0603, 0x0604, 0x0605, - 0x0606, 0x0607, 0x0608, 0x0609, 0x060A, 0x060B, - 0x060C, 0x06F4, 0x06F5, 0x06F6, 0x06F7, 0x06F8, - 0x06F9, 0x06FA, 0x06FB, 0x06FC, 0x06FD, 0x06FE, - 0x06FF, 0x0700, 0x0701, 0x0702, 0x0703, 0x0704, - 0x0705, 0x0706, 0x0707, 0x0708, 0x0709, 0x070A, - 0x070B, 0x070C, 0x07F4, 0x07F5, 0x07F6, 0x07F7, - 0x07F8, 0x07F9, 0x07FA, 0x07FB, 0x07FC, 0x07FD, - 0x07FE, 0x07FF, 0x0800, 0x0801, 0x0802, 0x0803, - 0x0804, 0x0805, 0x0806, 0x0807, 0x0808, 0x0809, - 0x080A, 0x080B, 0x080C, 0x08F4, 0x08F5, 0x08F6, - 0x08F7, 0x08F8, 0x08F9, 0x08FA, 0x08FB, 0x08FC, - 0x08FD, 0x08FE, 0x08FF, 0x0900, 0x0901, 0x0902, - 0x0903, 0x0904, 0x0905, 0x0906, 0x0907, 0x0908, - 0x0909, 0x090A, 0x090B, 0x090C, 0x09F4, 0x09F5, - 0x09F6, 0x09F7, 0x09F8, 0x09F9, 0x09FA, 0x09FB, - 0x09FC, 0x09FD, 0x09FE, 0x09FF, 0x0A00, 0x0A01, - 0x0A02, 0x0A03, 0x0A04, 0x0A05, 0x0A06, 0x0A07, - 0x0A08, 0x0A09, 0x0A0A, 0x0A0B, 0x0A0C, 0x0AF4, - 0x0AF5, 0x0AF6, 0x0AF7, 0x0AF8, 0x0AF9, 0x0AFA, - 0x0AFB, 0x0AFC, 0x0AFD, 0x0AFE, 0x0AFF, 0x0B00, - 0x0B01, 0x0B02, 0x0B03, 0x0B04, 0x0B05, 0x0B06, - 0x0B07, 0x0B08, 0x0B09, 0x0B0A, 0x0B0B, 0x0B0C, - 0x0BF4, 0x0BF5, 0x0BF6, 0x0BF7, 0x0BF8, 0x0BF9, - 0x0BFA, 0x0BFB, 0x0BFC, 0x0BFD, 0x0BFE, 0x0BFF, - 0x0C00, 0x0C01, 0x0C02, 0x0C03, 0x0C04, 0x0C05, - 0x0C06, 0x0C07, 0x0C08, 0x0C09, 0x0C0A, 0x0C0B, - 0x0C0C, 0x0CF4, 0x0CF5, 0x0CF6, 0x0CF7, 0x0CF8, - 0x0CF9, 0x0CFA, 0x0CFB, 0x0CFC, 0x0CFD, 0x0CFE, - 0x0CFF, 0xF400, 0xF401, 0xF402, 0xF403, 0xF404, - 0xF405, 0xF406, 0xF407, 0xF408, 0xF409, 0xF40A, - 0xF40B, 0xF40C, 0xF4F4, 0xF4F5, 0xF4F6, 0xF4F7, - 0xF4F8, 0xF4F9, 0xF4FA, 0xF4FB, 0xF4FC, 0xF4FD, - 0xF4FE, 0xF4FF, 0xF500, 0xF501, 0xF502, 0xF503, - 0xF504, 0xF505, 0xF506, 0xF507, 0xF508, 0xF509, - 0xF50A, 0xF50B, 0xF50C, 0xF5F4, 0xF5F5, 0xF5F6, - 0xF5F7, 0xF5F8, 0xF5F9, 0xF5FA, 0xF5FB, 0xF5FC, - 0xF5FD, 0xF5FE, 0xF5FF, 0xF600, 0xF601, 0xF602, - 0xF603, 0xF604, 0xF605, 0xF606, 0xF607, 0xF608, - 0xF609, 0xF60A, 0xF60B, 0xF60C, 0xF6F4, 0xF6F5, - 0xF6F6, 0xF6F7, 0xF6F8, 0xF6F9, 0xF6FA, 0xF6FB, - 0xF6FC, 0xF6FD, 0xF6FE, 0xF6FF, 0xF700, 0xF701, - 0xF702, 0xF703, 0xF704, 0xF705, 0xF706, 0xF707, - 0xF708, 0xF709, 0xF70A, 0xF70B, 0xF70C, 0xF7F4, - 0xF7F5, 0xF7F6, 0xF7F7, 0xF7F8, 0xF7F9, 0xF7FA, - 0xF7FB, 0xF7FC, 0xF7FD, 0xF7FE, 0xF7FF, 0xF800, - 0xF801, 0xF802, 0xF803, 0xF804, 0xF805, 0xF806, - 0xF807, 0xF808, 0xF809, 0xF80A, 0xF80B, 0xF80C, - 0xF8F4, 0xF8F5, 0xF8F6, 0xF8F7, 0xF8F8, 0xF8F9, - 0xF8FA, 0xF8FB, 0xF8FC, 0xF8FD, 0xF8FE, 0xF8FF, - 0xF900, 0xF901, 0xF902, 0xF903, 0xF904, 0xF905, - 0xF906, 0xF907, 0xF908, 0xF909, 0xF90A, 0xF90B, - 0xF90C, 0xF9F4, 0xF9F5, 0xF9F6, 0xF9F7, 0xF9F8, - 0xF9F9, 0xF9FA, 0xF9FB, 0xF9FC, 0xF9FD, 0xF9FE, - 0xF9FF, 0xFA00, 0xFA01, 0xFA02, 0xFA03, 0xFA04, - 0xFA05, 0xFA06, 0xFA07, 0xFA08, 0xFA09, 0xFA0A, - 0xFA0B, 0xFA0C, 0xFAF4, 0xFAF5, 0xFAF6, 0xFAF7, - 0xFAF8, 0xFAF9, 0xFAFA, 0xFAFB, 0xFAFC, 0xFAFD, - 0xFAFE, 0xFAFF, 0xFB00, 0xFB01, 0xFB02, 0xFB03, - 0xFB04, 0xFB05, 0xFB06, 0xFB07, 0xFB08, 0xFB09, - 0xFB0A, 0xFB0B, 0xFB0C, 0xFBF4, 0xFBF5, 0xFBF6, - 0xFBF7, 0xFBF8, 0xFBF9, 0xFBFA, 0xFBFB, 0xFBFC, - 0xFBFD, 0xFBFE, 0xFBFF, 0xFC00, 0xFC01, 0xFC02, - 0xFC03, 0xFC04, 0xFC05, 0xFC06, 0xFC07, 0xFC08, - 0xFC09, 0xFC0A, 0xFC0B, 0xFC0C, 0xFCF4, 0xFCF5, - 0xFCF6, 0xFCF7, 0xFCF8, 0xFCF9, 0xFCFA, 0xFCFB, - 0xFCFC, 0xFCFD, 0xFCFE, 0xFCFF, 0xFD00, 0xFD01, - 0xFD02, 0xFD03, 0xFD04, 0xFD05, 0xFD06, 0xFD07, - 0xFD08, 0xFD09, 0xFD0A, 0xFD0B, 0xFD0C, 0xFDF4, - 0xFDF5, 0xFDF6, 0xFDF7, 0xFDF8, 0xFDF9, 0xFDFA, - 0xFDFB, 0xFDFC, 0xFDFD, 0xFDFE, 0xFDFF, 0xFE00, - 0xFE01, 0xFE02, 0xFE03, 0xFE04, 0xFE05, 0xFE06, - 0xFE07, 0xFE08, 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, - 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7, 0xFEF8, 0xFEF9, - 0xFEFA, 0xFEFB, 0xFEFC, 0xFEFD, 0xFEFE, 0xFEFF, - 0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, - 0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0B, - 0xFF0C, 0xFFF4, 0xFFF5, 0xFFF6, 0xFFF7, 0xFFF8, - 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE, - 0xFFFF, +static const uint16_t on2avc_cb_8_syms[ON2AVC_CB_7_8_CODES] = { + 0x0E24, 0x0E3D, 0x0FDC, 0x0FFC, 0x0F3E, 0x0134, 0x02CC, 0x024C, 0x03D0, + 0x030F, 0x04CE, 0x04F3, 0x1C41, 0x1D1D, 0x1D20, 0x1D33, 0x1E03, 0x10D0, + 0x10D2, 0x102D, 0x103E, 0x1030, 0x11D3, 0x12D0, 0x13F3, 0x134E, 0x144D, + 0x2DDC, 0x2DE3, 0x2DFC, 0x2D2D, 0x2D23, 0x2D32, 0x2EC0, 0x2E31, 0x21E3, + 0x223D, 0x23D0, 0x2323, 0x2330, 0x24FD, 0x3DC0, 0x3EC3, 0x3EE3, 0x3FDD, + 0x30C1, 0x30DE, 0x31CC, 0x3102, 0x324D, 0x331D, 0x333F, 0x334E, 0x34CF, + 0x4CE0, 0x4C11, 0x4C20, 0x4C3F, 0x4F23, 0x422C, 0xCCE2, 0x423F, 0x4233, + 0xCE1D, 0xCF30, 0xC1E3, 0xC3EF, 0xDCE3, 0xDC23, 0xDEF4, 0xDE10, 0xDF0E, + 0xDF02, 0xD2F2, 0xD212, 0xD4EF, 0xECCC, 0xED12, 0xED41, 0xEF34, 0xE0CE, + 0xE0E0, 0xE1CD, 0xE3F0, 0xE33C, 0xFFD3, 0xF1F3, 0xF2ED, 0xF23C, 0xF243, + 0xF30E, 0x0DEF, 0x0FDE, 0x00EC, 0x1D22, 0x1E3E, 0x1F31, 0x10CD, 0x100D, + 0x122D, 0x13EC, 0x13E4, 0x2CD3, 0x2DFE, 0x2F03, 0x20DF, 0x20F3, 0x2004, + 0x21D2, 0x214D, 0x23DC, 0x23FE, 0x23F0, 0x23F2, 0x2312, 0x2444, 0x32ED, + 0x331F, 0x332E, 0x3412, 0x3423, 0x4D1E, 0x4FED, 0xC222, 0x442E, 0x443F, + 0xEF14, 0xF11D, 0x0C3F, 0x020E, 0x0200, 0x2FC1, 0x20E0, 0x20E2, 0x232F, + 0x32FE, 0x4E22, 0x422E, 0x0F21, 0x1C21, 0x1EC1, 0x2EF1, 0x2F41, 0x2011, + 0x4002, 0x4121, 0xFF0E, 0x0E1F, 0x0042, 0x1E0F, 0x1F20, 0xFC0F, 0x1120, + 0x2C2E, 0xFF11, 0x41F2, 0xECCE, 0xECE2, 0xEDF2, 0xEE20, 0xEF41, 0xFD42, + 0x0C2E, 0x0E2E, 0x1F1D, 0x1113, 0x2E0E, 0x2E02, 0x2E20, 0x2422, 0xC1F2, + 0xE1F2, 0xF0EF, 0xF2F0, 0xF201, 0x0FE1, 0x2F0F, 0x2F1E, 0xFFE4, 0x0CF1, + 0x0C20, 0x0F2F, 0xF11F, 0x1EF2, 0x11E2, 0x21EF, 0x212F, 0x11FF, 0xCCCE, + 0x4422, 0xCCFF, 0xC022, 0xC10D, 0xC213, 0xDDE0, 0xDDE2, 0xDE21, 0xDFCE, + 0xDF13, 0xDF24, 0xD012, 0xD1EC, 0xD12E, 0xD2EF, 0xD210, 0xD221, 0xD243, + 0xED0F, 0xEECC, 0xEEDF, 0xEF03, 0xE1DE, 0xE12D, 0xE2DF, 0xE23D, 0xE3F2, + 0xE34F, 0xE41D, 0xFCC1, 0xFC41, 0xFFD1, 0xF0E3, 0xF03E, 0xF23E, 0xF33F, + 0x0D1C, 0x0ECC, 0x0E13, 0x0FE3, 0x0013, 0x003F, 0x1DE0, 0x1E32, 0x10C3, + 0x1144, 0x1223, 0x1423, 0x2C1D, 0x2D1E, 0x2D12, 0x2D3E, 0x2FCD, 0x201D, + 0x3CF2, 0x3E01, 0x3F20, 0x3122, 0x3243, 0x330E, 0x3430, 0x4F30, 0x401D, + 0x42DD, 0xCF32, 0xC202, 0xDDCC, 0xDF11, 0xEEC0, 0xE0E2, 0xE2EE, 0xE20E, + 0x0143, 0x30FC, 0x4E02, 0x43FE, 0xCF21, 0xC12F, 0xC2E0, 0xEE1F, 0xEFEF, + 0xEFF2, 0xE0F1, 0xE2FF, 0xE41F, 0xFEE1, 0x0C11, 0x012F, 0x11EE, 0x110C, + 0x1FF1, 0x0110, 0x2121, 0x24E0, 0xFE0F, 0x00CE, 0x02FF, 0x0211, 0x210F, + 0x112E, 0x2E1F, 0xF2CF, 0x2E11, 0xC0EE, 0xDC0F, 0x01F0, 0xDE23, 0xD1FF, + 0xEFF4, 0xE020, 0xE024, 0xE1CF, 0xE141, 0xE2E0, 0xF032, 0xF4DE, 0x02E0, + 0x1131, 0x131F, 0x1342, 0x2EEE, 0x2E22, 0x2E24, 0x2002, 0x202C, 0x2022, + 0x2042, 0x2242, 0x2332, 0x3221, 0xF0E1, 0x4EE0, 0x42EE, 0xF1E0, 0xF2F2, + 0x1E1C, 0x1201, 0xF012, 0x00FF, 0xF02F, 0x0F1E, 0x12FE, 0x1212, 0x4E00, + 0x0F01, 0x2EE2, 0x2F14, 0x011C, 0xCC02, 0xCC13, 0xCC22, 0xCC31, 0xCDCD, + 0xCDDC, 0xCDD2, 0xCE3D, 0xCE42, 0xCF03, 0xC0F3, 0xC2C2, 0xC2D3, 0xC2FD, + 0xC303, 0xDC03, 0xDC41, 0xDD22, 0xDD4E, 0xDECF, 0xDED4, 0xDE0D, 0xDE3C, + 0xDFD1, 0xDF04, 0xDF3F, 0xDF33, 0xDF40, 0xD0CF, 0xD0D2, 0xD0F4, 0xD032, + 0xD1DF, 0xD214, 0xD223, 0xD3C4, 0xD3D3, 0xD3E0, 0xD3F1, 0xD3F3, 0xD324, + 0xD403, 0xED3E, 0xEFD0, 0xE03D, 0xE332, 0xE4CE, 0xE4C0, 0xFC0D, 0xFDC2, + 0xFF3D, 0xF1DD, 0xF14C, 0xF3D1, 0xF3FD, 0xF3F3, 0x0CC0, 0x0CE0, 0x0C42, + 0x0DED, 0x0D3E, 0x0E3F, 0x003D, 0x014D, 0x02EC, 0x03FC, 0x030D, 0x0334, + 0x04E4, 0x04FD, 0x041D, 0x0440, 0x1CCD, 0x1CD4, 0x1CF4, 0x1C1C, 0x1DD3, + 0x1D00, 0x1003, 0x113D, 0x1142, 0x13D1, 0x13D3, 0x1300, 0x14FC, 0x1414, + 0x143C, 0x143E, 0x2C2C, 0x2DDE, 0x2DEF, 0x2E1D, 0x2E44, 0x2F43, 0x203F, + 0x22CC, 0x3DDF, 0x3DF3, 0x3D04, 0x3D3D, 0x3D3F, 0x3D33, 0x3EF4, 0x3E03, + 0x3FC4, 0x3FF3, 0x3F2C, 0x301E, 0x31D1, 0x32D2, 0x32F4, 0x33CC, 0x33DF, + 0x33EC, 0x33E2, 0x34E3, 0x4CEE, 0x4CE2, 0x4C2E, 0x4D23, 0x4D4F, 0x4ECE, + 0x4E2C, 0x4E24, 0x4FFC, 0x4F41, 0x42C2, 0x4224, 0x43DC, 0x43FC, 0x4330, + 0x4343, 0xCD12, 0xCED1, 0xCEF3, 0xCFD0, 0xCFED, 0xCFE3, 0xC1D0, 0xC2F3, + 0xC312, 0xDCCF, 0xDD13, 0xDE3E, 0xDFEC, 0xDFEE, 0xD0F0, 0xD1E4, 0xD201, + 0xD31F, 0xD4D0, 0xD40F, 0xED43, 0xEEF3, 0xEE31, 0xEFC3, 0xEFD4, 0xE0C0, + 0xE0C2, 0xE0F3, 0xE031, 0xE033, 0xE04E, 0xE130, 0xE2EC, 0xE3FE, 0xE312, + 0xE321, 0xE4C2, 0xFCF4, 0xFC32, 0xFDCC, 0xFD20, 0xFE43, 0xFFDD, 0xF0D2, + 0xF13F, 0xF2D0, 0xF3E2, 0xF423, 0x0D2D, 0x0E1D, 0x00D1, 0x02D1, 0x02F3, + 0x03FE, 0x1DEE, 0x1D02, 0x1D11, 0x1D2C, 0x1EC3, 0x1E0D, 0x120D, 0x13E0, + 0x131D, 0x1344, 0x1443, 0x2CCE, 0x2DCD, 0x2DF0, 0x2ED3, 0x2F3C, 0x21DC, + 0x23F4, 0x3EC1, 0x3E3C, 0x31CE, 0x31DF, 0x31EC, 0x31E0, 0x31E4, 0x312E, + 0x32CF, 0x32F2, 0x3223, 0x3232, 0x3234, 0x4EDF, 0xDDCE, 0x4E33, 0x4F0D, + 0xDE12, 0xD42F, 0xECDF, 0xECD1, 0xEC31, 0xEDDC, 0xEE24, 0xEE42, 0xEFCD, + 0xEF23, 0xE0EE, 0xE132, 0xF113, 0xF432, 0x0CE2, 0x0ECE, 0x0FCD, 0x0224, + 0x03C1, 0x1FF3, 0x1F13, 0x10D4, 0x12E3, 0x13F1, 0x2CD1, 0x2C4E, 0x2EE4, + 0x2FDE, 0x20CE, 0x20C2, 0x200E, 0x224E, 0x31EE, 0x3210, 0xC121, 0x341E, + 0x402E, 0xE4E2, 0x01E1, 0x1E2F, 0x142F, 0xCE1F, 0x2F12, 0x4222, 0xC01F, + 0x4112, 0x4F12, 0xEEE0, 0xEF1E, 0xE112, 0xFEDC, 0xFE2F, 0xF2F4, 0xF412, + 0x112C, 0x1C10, 0x121E, 0x4FE1, 0xFFF1, 0x1124, 0x2222, 0xCCCC, 0x41E3, + 0x443D, 0xCCC0, 0xCCC2, 0xCDFE, 0xC020, 0xDEDC, 0xD2E1, 0xD4D2, 0xECEE, + 0xEE13, 0xEE2E, 0xE00E, 0xE13C, 0xE3C1, 0xE42E, 0xFFF3, 0xFF3F, 0xF2D4, + 0xF3C0, 0x0E02, 0x002E, 0x0204, 0x04D1, 0x1CDE, 0x1DC0, 0x1DF1, 0x1ECD, + 0x1ED2, 0x12C3, 0x2C0E, 0x2EEC, 0x2134, 0x22E0, 0x22FD, 0x3F1F, 0x4D0F, + 0x430F, 0xD401, 0xEFC1, 0xE022, 0xE4E0, 0xF140, 0xF22F, 0xF24F, 0x1FC0, + 0x241F, 0x41EF, 0x1C2F, 0x4D10, 0x0011, 0xC1E1, 0x42E0, 0xDC10, 0xFF00, + 0xE4FF, 0xFC01, 0xFFCE, 0x0141, 0x0240, 0x1EFC, 0x1FCE, 0x211E, 0xF0C1, + 0xF100, 0xF111, 0x1FFF, 0x0F12, 0x24FF, 0xCCF1, 0xCEFD, 0xC01D, 0xC123, + 0x10FE, 0x1012, 0x11F1, 0xC132, 0xC2DF, 0xC3D2, 0xC33E, 0xDCDC, 0xDD11, + 0xDEC1, 0xDE2F, 0xDF2C, 0xDF42, 0xD0EF, 0xD1EE, 0xD122, 0xD131, 0xD24D, + 0xEC1D, 0xEDC1, 0xED23, 0xED3C, 0xEEFD, 0xE00C, 0xE1DC, 0xE1ED, 0xE204, + 0xE3D2, 0xE31E, 0xE32F, 0xE334, 0xFC23, 0xFC4F, 0xFDE0, 0xFDF3, 0xFD2E, + 0xFD24, 0xFEC3, 0xFED0, 0xFE03, 0xF00D, 0xF02D, 0xF24D, 0xF311, 0xF4C1, + 0xF42D, 0x0DCD, 0x0DE1, 0x0D10, 0x0D4D, 0x0FD0, 0x0F23, 0x00DF, 0x00FD, + 0x00F3, 0x01DE, 0x01E3, 0x022C, 0x031C, 0x031E, 0x0310, 0x1CED, 0x1DC2, + 0x1DEC, 0x1DE4, 0x1D04, 0x1D3F, 0x13C2, 0x130E, 0x132C, 0x1331, 0x1340, + 0x14C1, 0x14ED, 0x2C13, 0x2C3D, 0x2C33, 0x2D1C, 0x2D2F, 0x2EFD, 0x20DD, + 0x2040, 0x213C, 0x22DD, 0x2231, 0x2244, 0x23ED, 0x23EF, 0x2314, 0x234D, + 0x240E, 0x2413, 0x3C4D, 0x3DF1, 0x3ECD, 0x3E4F, 0x3E43, 0x30F2, 0x3021, + 0x31E2, 0x3140, 0x33E0, 0x4C22, 0x4D30, 0x4E1D, 0x4F32, 0x40DF, 0x40FD, + 0x4130, 0x42DF, 0x42FD, 0xCE22, 0xDC21, 0xDEF0, 0xEDDE, 0xEDE1, 0xE402, + 0xFEDE, 0xFE14, 0xF133, 0x0D4F, 0x0233, 0x0431, 0x1034, 0x14D2, 0x2EE0, + 0x20EC, 0x22EC, 0x234F, 0x3CFE, 0x3C1E, 0x31FF, 0x321E, 0xCF2F, 0x34F2, + 0x4312, 0xFE1C, 0xF2E1, 0x0E42, 0x0FCF, 0x02CE, 0x1E21, 0x1FE4, 0x2C11, + 0xEEEE, 0x214F, 0x2343, 0xEF10, 0xE4F1, 0x0FF4, 0x1E41, 0x4E1F, 0x1F1F, + 0xEF2F, 0x4444, 0x4323, 0xCC1D, 0xCC4C, 0xCC42, 0xCDD4, 0xE21F, 0xE211, + 0xFE41, 0xFF2E, 0xF21C, 0x1E12, 0xEF01, 0x1FE2, 0x12EF, 0x01FC, 0x1F42, + 0xF1F1, 0x14E1, 0x21FE, 0x2C20, 0xC0E2, 0xC22E, 0xC21F, 0xFFEE, 0x4011, + 0xCE00, 0x1FEC, 0xDE4F, 0xEE0E, 0xEFDC, 0xE0E4, 0xF1FF, 0xE200, 0xE224, + 0xE23F, 0xE4DF, 0xFD02, 0xFE3C, 0xF3FF, 0x0CDF, 0x0123, 0x02E2, 0x043F, + 0x1C30, 0x1DCE, 0x1EDE, 0x1E2D, 0x1FFD, 0x2ED1, 0x2E13, 0x2E42, 0x2FE3, + 0x2143, 0x2233, 0x2321, 0x3ECF, 0x3F11, 0x322F, 0x3322, 0x3344, 0xEC11, + 0x4013, 0x43E1, 0xEF1C, 0xE11C, 0xE4D1, 0xFF04, 0xFF42, 0x00E0, 0x1E14, + 0x11CE, 0xC211, 0x2EFF, 0x21CF, 0x0411, 0x2C1F, 0xFEC1, 0xF2C1, 0x1FE0, + 0x4FF2, 0xE1E1, 0xFC1E, 0xFEFE, 0xFFE2, 0x02C0, 0x1C12, 0x1E1E, 0x1234, + 0x14FE, 0x2114, 0x2334, 0x3CEF, 0x4200, 0x0F10, 0x3C10, 0x432F, 0x2FF0, + 0xC3F0, 0x0FEF, 0x0F41, 0xC0FF, 0xC0F1, 0x11E4, 0x4F21, 0xFF1F, 0xCD4D, + 0xCD43, 0xCECE, 0xCEC2, 0xCEEC, 0xCEE4, 0xCF4D, 0xC0C2, 0xC0D3, 0xC1C3, + 0xC143, 0xC2CE, 0xC2DD, 0xC2E4, 0xC24C, 0xC3CF, 0xC3DC, 0xC3D4, 0xC310, + 0xC334, 0xC4C2, 0xC4DD, 0xC41D, 0xC41F, 0xC431, 0xC44C, 0xDCC1, 0xDCC3, + 0xDC14, 0xDDD1, 0xDFC4, 0xD0CD, 0xD0DE, 0xD0FC, 0xD234, 0xD302, 0xD31D, + 0xD313, 0xD344, 0xD443, 0xEE4C, 0xE0C4, 0xE3DE, 0xE3F4, 0xE30D, 0xE4DD, + 0xE44C, 0xFCD4, 0xFC1C, 0xFC14, 0xFC34, 0xFD33, 0xF144, 0xF2CD, 0xF4FC, + 0x0CC4, 0x0CDD, 0x0CFD, 0x0C24, 0x0C4C, 0x00E4, 0x0044, 0x020C, 0x03F4, + 0x0303, 0x0323, 0x044E, 0x1CDC, 0x1D0E, 0x1D44, 0x134C, 0x14D4, 0x2CC4, + 0x2D34, 0x20CC, 0x2033, 0x24C2, 0x24C4, 0x240C, 0x3CC3, 0x3C1C, 0x3C34, + 0x3DC2, 0x3DDD, 0x3DD3, 0x3D0E, 0x3E32, 0x3E34, 0x3F33, 0x3F40, 0x30D0, + 0x303E, 0x31D3, 0x313D, 0x3203, 0x321C, 0x34DC, 0x34FC, 0x340D, 0x341C, + 0x4CCE, 0x4CC4, 0x4CF3, 0x4C2C, 0x4D3C, 0x4D4D, 0x4D43, 0x4E0C, 0x4E04, + 0x4E4E, 0x40CC, 0x40C0, 0x41CD, 0x414D, 0x4204, 0x43CF, 0x43C3, 0x4303, + 0x4334, 0x44CE, 0xCC2E, 0x44DD, 0x44D3, 0xCDCF, 0xCDD0, 0xCE44, 0xCFDC, + 0xC134, 0xC22C, 0xC23D, 0xC23F, 0xC24E, 0xC3DE, 0xC30D, 0xC323, 0xC332, + 0xC341, 0xC4C4, 0xC4D3, 0xDD33, 0xDD40, 0xDEE3, 0xDEFC, 0xDE03, 0xDFDF, + 0xDFFD, 0xDFF3, 0xDF1D, 0xDF44, 0xD0F2, 0xD02D, 0xD03C, 0xD03E, 0xD034, + 0xD04F, 0xD043, 0xD1CE, 0xD1DD, 0xD1D1, 0xD1FD, 0xD102, 0xD104, 0xD133, + 0xD144, 0xD2DC, 0xD2D0, 0xD20D, 0xD320, 0xD33F, 0xD4DE, 0xD4ED, 0xD4FC, + 0xD41C, 0xD423, 0xECE4, 0xEC42, 0xEEC4, 0xEED3, 0xE0DF, 0xE0D3, 0xE044, + 0xE240, 0xE330, 0xE4C4, 0xFC43, 0xFDFD, 0xF3CE, 0xF3DD, 0xF3D3, 0xF304, + 0xF33D, 0xF333, 0xF4ED, 0xF40D, 0xF403, 0x0CC2, 0x0C33, 0x0DC1, 0x0DDC, + 0x0DFC, 0x0D32, 0x01D2, 0x012D, 0x02D3, 0x02FD, 0x03CF, 0x03DE, 0x03E3, + 0x0314, 0x032D, 0x0332, 0x1DDF, 0x133F, 0x140D, 0x1434, 0x2CDD, 0x2CEC, + 0x2CE4, 0x2C24, 0x2DD0, 0x2D03, 0x2D3C, 0x2F30, 0x22C4, 0x23D2, 0x24D3, + 0x3CDE, 0x3CED, 0x3C14, 0x3C41, 0x3DD1, 0x3DEC, 0x3DE2, 0x3DE4, 0x3D0C, + 0x3D4C, 0x3E0D, 0x3E23, 0x3FE4, 0x3F13, 0x3F3F, 0x3F31, 0x30C3, 0x301C, + 0x3043, 0x3113, 0x313F, 0x3133, 0x322D, 0x33CE, 0x33D3, 0x333D, 0x343E, + 0x3434, 0x3441, 0x4C02, 0x4C13, 0x4C3D, 0x4C31, 0x4DD0, 0x4DD4, 0x4EEC, + 0x4FCD, 0x4033, 0x41C1, 0x41DC, 0x41FC, 0x4242, 0x43CD, 0x43D0, 0x44DF, + 0x44EC, 0x44FD, 0xCF23, 0xC1ED, 0xC130, 0xC14F, 0xC21D, 0xC32D, 0xC420, + 0xDCD0, 0xDC2D, 0xDEDE, 0xDE2D, 0xDF4E, 0xD0E1, 0xD021, 0xD11D, 0xD3FF, + 0xD342, 0xD4C3, 0xD412, 0xD44F, 0xEC24, 0xED10, 0xED21, 0xEED1, 0xEF0D, + 0xEF2D, 0xEF4D, 0xE042, 0xE1D2, 0xE2D3, 0xE3CF, 0xE3EF, 0xE343, 0xE4FD, + 0xE413, 0xFCED, 0xFC03, 0xFD00, 0xFD31, 0xFED2, 0xFE0D, 0xFE23, 0xF0D0, + 0xF203, 0xF230, 0xF3EC, 0xF3E4, 0xF300, 0xF320, 0xF344, 0x0DCF, 0x0DE3, + 0x0EFD, 0x0E31, 0x0F03, 0x0F30, 0x01D0, 0x03E1, 0x03F2, 0x0321, 0x1CC1, + 0x1C4F, 0x1DE2, 0x1DFF, 0x1DF3, 0x1D24, 0x1FCC, 0x1FD1, 0x1F3D, 0x1230, + 0x13DF, 0x130C, 0x1313, 0x1403, 0x144F, 0x2CC2, 0x2ECC, 0x2EDD, 0x2E3D, + 0x2FC3, 0x2FD0, 0x2FD4, 0x20D1, 0x20FD, 0x2031, 0x21DE, 0x21D4, 0x2204, + 0x223F, 0x23E3, 0x232D, 0x24DD, 0x24F3, 0x3CD2, 0x3C12, 0x3C21, 0x3D11, + 0x3EDC, 0x3EFE, 0x3E1E, 0x3E4D, 0x3FCE, 0x3FC2, 0x3F0E, 0x3F2E, 0x3F4E, + 0x30CF, 0x30E1, 0x30F4, 0x310E, 0x3100, 0x3124, 0x314E, 0x32D4, 0x324F, + 0x3241, 0x33FF, 0x3311, 0x3320, 0x4DF0, 0x4D2D, 0x4D32, 0x4FD0, 0x4FE3, + 0x403F, 0x41DE, 0xCCDD, 0xCD23, 0xC002, 0xC31E, 0xDCFE, 0xDCF2, 0xDC01, + 0xDF22, 0xD2CF, 0xD21E, 0xD4F2, 0xEDCF, 0xED14, 0xE1C3, 0xE2C0, 0xE20C, + 0xE244, 0xE4D3, 0xE422, 0xFCDE, 0xFED4, 0xFEED, 0xF023, 0xF03C, 0xF1C4, + 0xF3EE, 0x0C02, 0x02EE, 0x0244, 0x1C2D, 0x1E34, 0x10DC, 0x10E3, 0x12CD, + 0x13C0, 0x1311, 0x2DF2, 0x2D41, 0x2024, 0x22E4, 0x2202, 0x221D, 0x231E, + 0x3EF2, 0x31F1, 0x3214, 0x3333, 0x34EF, 0x4E3F, 0x40E0, 0x42D1, 0x43EF, + 0xEFCF, 0xE1FC, 0xFE1E, 0xF4F2, 0x0000, 0x1EDC, 0x1F04, 0x1412, 0x2F1C, + 0x21F4, 0x3C0F, 0x431E, 0xECFF, 0xFFC2, 0xF01C, 0x1FEE, 0x120F, 0x124F, + 0xC200, 0x1401, 0x20FF, 0x010F, 0xEC20, 0xF120, 0xC101, 0x114E, 0x221F, + 0x001F, 0x111F, 0x4FF0, 0xCDDE, 0x4431, 0x4213, 0x44F3, 0x4400, 0xCCC4, + 0xCCEC, 0xCEEE, 0xCF1E, 0xC0E0, 0xDCDE, 0xE2C2, 0xFF4E, 0xF20F, 0xF4FE, + 0x0F34, 0x1CFE, 0x1E4D, 0x12FC, 0x201F, 0x342F, 0xE420, 0xF0FE, 0x4E11, + 0x0E11, 0x1104, 0x4000, 0x21F0, 0x4E0E, 0xCCDF, 0xCD21, 0xEEF1, 0xFFEC, + 0x01FE, 0x2CE0, 0x20F1, 0x2110, 0xCFF0, 0xC02E, 0xC3FE, 0xC4F1, 0xDC12, + 0xDF20, 0xEC0E, 0xEDEF, 0xE21D, 0xE43F, 0xFDE2, 0xFD11, 0xFF31, 0xF0D4, + 0xF342, 0x0E0C, 0x0E22, 0x1C32, 0x1F3F, 0x12DC, 0x13CE, 0x132E, 0x2C31, + 0x2EDF, 0x2FED, 0x20E4, 0x21C3, 0x2123, 0x22CE, 0x23E1, 0x23FC, 0x241D, + 0x243F, 0x3EE1, 0x3E0F, 0x3FFF, 0x32E1, 0xCE02, 0x32F0, 0x4D3E, 0xC301, + 0xEDCD, 0xE2E2, 0xFECD, 0xFEFC, 0xF2EF, 0xF41E, 0x00EE, 0x022E, 0x041F, + 0x0420, 0x1CF2, 0x2E40, 0x2FFE, 0x2F2F, 0x2F4F, 0x21C1, 0x2200, 0x24E2, + 0x2420, 0xC10F, 0xF0CF, 0x3401, 0x4D2F, 0xF42F, 0x0FC1, 0x01CF, 0x4020, + 0x4442, 0xCCE0, 0xCC0E, 0xFF2C, 0xF0F2, 0xF01E, 0xF1C2, 0x0112, 0x1F0C, + 0x1F11, 0x10E1, 0x110E, 0x1100, 0x4F1E, 0x4F01, 0xC11E, 0xC220, 0xDCCD, + 0xEFFC, 0xF241, 0x0EE2, 0x0E2C, 0x024E, 0x121C, 0x2CEE, 0x2E2C, 0x2FCF, + 0xFCEF, 0x0FFE, 0x014F, 0x1F4E, 0x10F4, 0x1221, 0x1F00, 0x40F1, 0xFC21, + 0x24D1, 0xCDED, 0xCDE3, 0xCE33, 0xC0DF, 0x0F14, 0xC03D, 0xC3D0, 0xC330, + 0xC34F, 0xDDC2, 0xDD02, 0xDD24, 0xDE0F, 0xFC2F, 0x4101, 0xDFDD, 0xDFE4, + 0xDF00, 0xD00F, 0xD041, 0xD10C, 0xD10E, 0xD113, 0xD22F, 0xD3E4, 0xD32C, + 0xD322, 0xD43E, 0xECC0, 0xEDD4, 0xEDED, 0xEDFC, 0xED01, 0xE0FD, 0xE01D, + 0xE2DD, 0xE2F3, 0xE30F, 0xE43D, 0xE442, 0xFCE3, 0xFD0C, 0xFD0E, 0xFD1D, + 0xFE34, 0xFF33, 0xFF4C, 0xF3C4, 0xF322, 0xF44F, 0x0DDE, 0x0DFE, 0x0D1E, + 0x0D12, 0x0D14, 0x0EDF, 0x0E44, 0x002C, 0x010D, 0x021D, 0x03C3, 0x0413, + 0x1D0C, 0x1032, 0x1041, 0x1333, 0x142D, 0x2DCF, 0x2E3F, 0x2F0D, 0x2F32, + 0x21D0, 0x213E, 0x2130, 0x22DF, 0x230D, 0x2301, 0x233E, 0x242C, 0x3CD0, + 0x3C32, 0x3C4F, 0x3DCE, 0x3D1F, 0x3D20, 0x3D24, 0x3EDE, 0x3EFC, 0x3FDF, + 0x3FEC, 0x3FE0, 0x3F42, 0x30D2, 0x30FE, 0x3012, 0x302F, 0x304F, 0x3041, + 0x310C, 0x3131, 0x32DC, 0x32DE, 0x3201, 0x3230, 0x33EE, 0x3331, 0x342D, + 0x4CD1, 0x4C1F, 0x4DED, 0x4EDD, 0x4ED3, 0x4F03, 0x40EC, 0x40E2, 0x412D, + 0x4123, 0x42D3, 0x42F3, 0xCE13, 0xC1D2, 0xC231, 0xDEFE, 0xD2FE, 0xD24F, + 0xECF3, 0xEEE4, 0xEE2C, 0xEF3E, 0xE123, 0xE202, 0xE3E1, 0xFDFF, 0xFDF1, + 0xFE4D, 0xF0ED, 0xF1FD, 0xF22D, 0xF34E, 0x032F, 0x0341, 0x0402, 0x1EED, + 0x11DF, 0x111D, 0x13FF, 0x14DE, 0x1430, 0x1432, 0x2D14, 0x2E0C, 0x2E00, + 0x2E04, 0x2FDC, 0x2F4D, 0x212D, 0x24DF, 0x3FEE, 0x34FE, 0xCF12, 0x4DE1, + 0x4E31, 0xECE0, 0xEC2E, 0xE2CE, 0xFEF4, 0xF10C, 0x0022, 0x1C1E, 0x12E1, + 0x12F4, 0x1241, 0x2224, 0x242E, 0xEEFF, 0x4D01, 0x41FE, 0xF0FC, 0x011E, + 0x1410, 0x2211, 0xCF0F, 0x2400, 0x2411, 0xFFFF, 0xC2F1, 0xEC00, 0x01F2, + 0xF00F, 0x021F, 0x12F0, 0x0FF0, 0xCDEF, 0x4231, 0x44E2, 0xCCFD, 0xCC33, + 0xCEE0, 0xCEE2, 0xCE20, 0xEE02, 0xE2E4, 0xF041, 0xF212, 0x0F4D, 0x1EF4, + 0x1FC2, 0x141E, 0x2ECE, 0x22EE, 0x3CF0, 0xC1EF, 0x3C2F, 0x4321, 0xFE01, + 0xFF0C, 0x0F4F, 0x1F02, 0xC2FF, 0x2101, 0xE01F, 0x00F1, 0xF122, 0x0CFF, + 0x1F0E, 0x10EF, 0x10FC, 0x1102, 0x1122, 0x2F01, 0x412F, 0xCD1E, 0xCFDE, + 0xC00E, 0xC3F2, 0xF010, 0xDCD2, 0xDC1E, 0xDEEF, 0xDE01, 0xDE14, 0xDE34, + 0xD1E2, 0xD4FE, 0xECDD, 0xEC22, 0xEE0C, 0xEFED, 0xEF3C, 0xEF32, 0xE002, + 0xE1D4, 0xE1E3, 0xE143, 0xE231, 0xE4F3, 0xFDC0, 0xFD1F, 0xFF1D, 0xF003, + 0xF034, 0xF1DF, 0xF31F, 0x0EEC, 0x0E0E, 0x0202, 0x1CD2, 0x1D1F, 0x1EE3, + 0x1E43, 0x1FDD, 0x1023, 0x12D2, 0x1320, 0x22F3, 0x2402, 0x3CE1, 0x3EEF, + 0x3E41, 0x32EF, 0x320F, 0x4D12, 0x4ED1, 0x4EF3, 0xCDF2, 0x4FD2, 0x40F3, + 0xCD0F, 0xDCEF, 0xDC2F, 0xD410, 0xFECF, 0xFE21, 0xF04F, 0xF14E, 0x0020, + 0x01C3, 0x0242, 0x042E, 0x1E3C, 0x1F22, 0xEF12, 0x1043, 0x2C3F, 0xFF02, + 0xF0F4, 0xF1CE, 0xF102, 0x1001, 0xF124, 0x04FF, 0xE12F, 0x20EE, 0x43ED, + 0xCC4E, 0xCDFC, 0xCDF0, 0xCD0D, 0x1EF0, 0x1021, 0xE411, 0x2CF1, 0x4EF1, + 0x4F2F, 0xC112, 0xC3E1, 0xEE00, 0xEFE1, 0xE1EF, 0xE431, 0xF12E, 0x02C2, + 0x1EFE, 0x1232, 0x21F2, 0x2240, 0xCE11, 0x2431, 0x3421, 0xCFE1, 0xCFFE, + 0xF021, 0xF210, 0x2C00, 0x2FE1, 0xCF10, 0xF0F0, 0xCEF1, 0x400E, 0x3432, + 0xCD3E, 0xCD4F, 0xCED3, 0xCE0C, 0xCE4E, 0xCFFC, 0xCF1C, 0xCF4F, 0xCF01, + 0xFEF0, 0x0400, 0x4110, 0x2112, 0x411E, 0xC13C, 0xC141, 0xC2C0, 0xC204, + 0xC3FC, 0xC4EE, 0xC4FD, 0xC40E, 0xC43F, 0xDCD4, 0xDCF4, 0xDC4D, 0xDDEC, + 0xDD04, 0xDD2C, 0xDD2E, 0xDD42, 0xDED0, 0xDED2, 0xDE1C, 0xDFC2, 0xD0C1, + 0xD0D0, 0xD01C, 0xD014, 0xD030, 0xD1C4, 0xD100, 0xD140, 0xD142, 0xD2E3, + 0xD241, 0xD3FD, 0xD300, 0xD333, 0xD4C1, 0xD40D, 0xED0D, 0xED30, 0xEE44, + 0xE103, 0xE323, 0xE33E, 0xE400, 0xE42C, 0xE424, 0xE433, 0xFCCD, 0xFDD3, + 0xFD3D, 0xFD4C, 0xF043, 0xF30C, 0xF313, 0xF4F4, 0xF44D, 0xF441, 0x0CCC, + 0x0C13, 0x0D0D, 0x0D01, 0x0EC4, 0x0F43, 0x0033, 0x0330, 0x0442, 0x1CCF, + 0x1CC3, 0x1C0F, 0x1C43, 0x1DDD, 0x1F4C, 0x1F44, 0x133D, 0x14C3, 0x140F, + 0x2E33, 0x203D, 0x204C, 0x224C, 0x23DE, 0x233C, 0x244E, 0x3CC1, 0x3D02, + 0x3D13, 0x3D40, 0x3E14, 0x3FFD, 0x3F0C, 0x30CD, 0x30D4, 0x30ED, 0x31C0, + 0x31C4, 0x31FD, 0x311D, 0x32C3, 0x32E3, 0x323C, 0x323E, 0x33E4, 0x3313, + 0x332C, 0x3340, 0x344F, 0x4C4C, 0x4C4E, 0x4DC1, 0x4DDE, 0x4DE3, 0x4EC0, + 0x4E3D, 0x4FCF, 0x4FC3, 0x4F14, 0x40DD, 0x40D3, 0x403D, 0x42C0, 0x43D2, + 0x43E3, 0x431C, 0x4341, 0xCCF3, 0xCC11, 0xCD2D, 0xCD34, 0xCE24, 0xC033, + 0xC1DE, 0xC4D1, 0xC4E0, 0xC4E2, 0xC422, 0xDC3E, 0xDC34, 0xDE32, 0xDFC0, + 0xDFE0, 0xD001, 0xD010, 0xD02F, 0xD1E0, 0xD13F, 0xD2C3, 0xD22D, 0xD23E, + 0xD3CE, 0xD3C2, 0xD3E2, 0xD311, 0xD32E, 0xD34E, 0xD42D, 0xECD3, 0xEDFE, + 0xED4D, 0xEE04, 0xEE1D, 0xEE40, 0xEFD2, 0xEF30, 0xE013, 0xE1D0, 0xE10D, + 0xE2CC, 0xE213, 0xE3CD, 0xE3DC, 0xE301, 0xE310, 0xFCCF, 0xFDD1, 0xFD13, + 0xF030, 0xF20D, 0xF4C3, 0xF4E3, 0x0CD3, 0x0C4E, 0x0D03, 0x0E04, 0x0E4C, + 0x02C4, 0x023F, 0x0231, 0x03D2, 0x03EF, 0x1DD1, 0x1D13, 0x1D4C, 0x1FC4, + 0x13FD, 0x1324, 0x14F4, 0x2CF3, 0x2C40, 0x2DC3, 0x2DD4, 0x2DF4, 0x2D10, + 0x2F23, 0x22D3, 0x231C, 0x243D, 0x3C23, 0x3C30, 0x3D2C, 0x3D22, 0x3D42, + 0x3ED2, 0x3ED4, 0x3E2D, 0x3FC0, 0x3FD3, 0x300F, 0x33C2, 0x33FD, 0x330C, + 0x34C1, 0x4DD2, 0x4EFD, 0x41D0, 0x4103, 0x42EC, 0xCE31, 0x423D, 0x441D, + 0xCFD2, 0xC2D1, 0xC32F, 0xDC32, 0xD11F, 0xED1E, 0xE0EC, 0xE14D, 0xFDE4, + 0xFD22, 0xFE32, 0xF1D1, 0xF32E, 0x0CEE, 0x0D21, 0x0FD2, 0x0F32, 0x001D, + 0x02DF, 0x1CE3, 0x1E30, 0x10ED, 0x12ED, 0x1203, 0x123E, 0x2C02, 0x2EF3, + 0x2F2D, 0x202E, 0x220C, 0x2213, 0x230F, 0x3C3E, 0x3E21, 0x3FE2, 0x3F02, + 0x3324, 0x340F, 0x4EEE, 0x41ED, 0xCDE1, 0x413E, 0x441F, 0xCD01, 0xC20E, + 0xDCE1, 0xEECE, 0xEEC2, 0xE134, 0xE222, 0xE242, 0xFCF2, 0xFC12, 0xF2C3, + 0x0FD4, 0x1214, 0x14D0, 0x2F21, 0x21ED, 0xE10F, 0x4022, 0x420E, 0xFCE1, + 0xF1E4, 0x0F0F, 0x0121, 0x14F0, 0x1E4F, 0x1014, 0xC1F0, 0x1111, 0x410F, + 0x0C1F, 0xCFF2, 0xF014, 0xF4F0, 0x1F40, 0x10F2, 0x11E0, 0x12C1, 0x1210, + 0xF410, 0x41E1, 0xCEDF, 0xC30F, 0xE1F4, 0xFCFE, 0xFD40, 0x013C, 0x1CD0, + 0x1D4E, 0x11F3, 0x14F2, 0xEF0F, 0x2141, 0x220E, 0xE011, 0xE1F0, 0xFCF0, + 0xF1E2, 0xF40F, 0x0FF2, 0x1ECF, 0x2FF2, 0x2F10, 0xEE11, 0x2CFF, 0xEFF0, + 0xE101, 0xE11E, 0xFF22, 0x2FEF, 0x42FF, 0xEC1F, 0xFC10, 0xCCEE, 0xCEDD, + 0xDDDF, 0xDDF1, 0xDECD, 0xDE1E, 0xDFE2, 0xDF2E, 0xD0FE, 0xD01E, 0xD4E3, + 0xEC02, 0xEFDE, 0xE004, 0xE02C, 0xE03F, 0xE31C, 0xFC2D, 0xFE2D, 0xFE3E, + 0xFFC4, 0xF2D2, 0xF3F1, 0x0EDD, 0x0132, 0x0213, 0x040E, 0x0422, 0x1C23, + 0x1ED0, 0x1ED4, 0x11D1, 0x1133, 0x13E2, 0x204E, 0x21CD, 0x2132, 0x222C, + 0x23CF, 0x2310, 0x2433, 0x3CE3, 0x3C01, 0x3EF0, 0x3E1C, 0x3E2F, 0x3F24, + 0x30EF, 0x30F0, 0x3212, 0x4E13, 0x4FDE, 0x4F2D, 0x40EE, 0x41D2, 0x43DE, + 0xEF4F, 0xE14F, 0xE341, 0xE4EE, 0xF0CD, 0xF131, 0xF142, 0x0EEE, 0x0EE4, + 0x0E20, 0x0002, 0x02E4, 0x103C, 0x123C, 0x2C22, 0x20C0, 0x2000, 0x21FC, + 0x24EE, 0x4301, 0xCFEF, 0xEF21, 0xFF24, 0x0040, 0x1421, 0x4332, 0x43F2, + 0xCC20, 0x4413, 0xCCE4, 0xCC0C, 0xCC2C, 0xCC40, 0xECF1, 0xFEF2, 0x4F10, + 0xFFE0, 0xF1C0, 0xF2FE, 0x12CF, 0x24F1, 0x22FF, 0x4E2E, 0x1010, 0x4211, + 0xD421, 0xFC30, 0xFF13, 0xF234, 0xF430, 0x00E2, 0x1FDF, 0x10CF, 0xC000, + 0x124D, 0x1243, 0x2CE2, 0x2D4F, 0x2EC2, 0x2FFC, 0x2220, 0x3111, 0xF221, + 0x34F0, 0x4DEF, 0xF4EF, 0x1EEF, 0x1CEF, 0x0101, 0xC1FE, 0xFEEF, 0xFE4F, + 0xF21E, 0x0EC2, 0x0EF1, 0x1C01, 0x21E1, 0x421F, 0xCD03, 0xCD30, 0xCD41, + 0xCF34, 0xCF43, 0xC03F, 0xC031, 0xC103, 0xC13E, 0xC402, 0xDDFF, 0xDDF3, + 0xDE4D, 0xDF0C, 0xD1F3, 0xD124, 0xD13D, 0xD14E, 0xD2CD, 0xD2DE, 0xD2D2, + 0xD3C0, 0xD3EC, 0xD3EE, 0xD41E, 0xD432, 0xD441, 0xECFD, 0xEC4E, 0xEDD0, + 0xEDD2, 0xED34, 0xE13E, 0xE233, 0xE314, 0xE34D, 0xE44E, 0xFCC3, 0xFCDC, + 0xFDDD, 0xFDEC, 0xFD04, 0xFD3F, 0xFE30, 0xFF44, 0xF13D, 0xF302, 0xF331, + 0x0CF3, 0x0C1D, 0x0C31, 0x0DD0, 0x0DD2, 0x0DD4, 0x0DF0, 0x0D0F, 0x0F0D, + 0x00D3, 0x0031, 0x02DD, 0x03D4, 0x03ED, 0x03F0, 0x0301, 0x0312, 0x04DD, + 0x043D, 0x1C03, 0x1C14, 0x1D31, 0x1FD3, 0x10DE, 0x104D, 0x1302, 0x1304, + 0x14CD, 0x1441, 0x2CFD, 0x2DD2, 0x2D43, 0x2EC4, 0x2FD2, 0x210D, 0x23C3, + 0x24CE, 0x24EC, 0x2424, 0x3C2D, 0x3DFF, 0x3D2E, 0x3ED0, 0x3E3E, 0x30DC, + 0x31DD, 0x3104, 0x33DD, 0x33F1, 0x34DE, 0x34ED, 0x4EE4, 0x4FD4, 0x40D1, + 0x410D, 0x433E, 0xDEE1, 0xDEF2, 0xDFF1, 0xD111, 0xD12C, 0xD2C1, 0xD2FC, + 0xD2F0, 0xD21C, 0xEDF0, 0xEE3F, 0xEE4E, 0xEF43, 0xE2C4, 0xE2FD, 0xE3D4, + 0xFDEE, 0xFD2C, 0xFFDF, 0xF1D3, 0xF2DE, 0xF2E3, 0xF43E, 0x0DF2, 0x0D3C, + 0x0ED1, 0x0F2D, 0x01ED, 0x013E, 0x0343, 0x1D2E, 0x1E23, 0x12DE, 0x1322, + 0x14E3, 0x2C42, 0x2D21, 0x200C, 0x2013, 0x2103, 0x22E2, 0x3D4E, 0x3E10, + 0x3FD1, 0x3001, 0x311F, 0x3142, 0x32FC, 0x3342, 0x4DF2, 0x4F3E, 0x4031, + 0xCE2E, 0x4132, 0x44E0, 0xC2EE, 0xE000, 0xE02E, 0xE220, 0xF214, 0xF232, + 0xF4D0, 0xF4D2, 0x0C22, 0x0D41, 0x0EE0, 0x0E4E, 0x000E, 0x1D40, 0x1D42, + 0x10C1, 0x11FD, 0x2DC1, 0xF1EC, 0x2D4D, 0x2E4E, 0x04E0, 0x1CE1, 0x1F2E, + 0x1F24, 0xF401, 0x40FF, 0xC011, 0x2FF4, 0xCE0E, 0xF1EE, 0xF10E, 0xF4E1, + 0x11EC, 0x22F1, 0xCEFF, 0x04F1, 0x1CF0, 0x41F0, 0xDDEE, 0xDF1F, 0xD1F1, + 0xEEE2, 0xE1C1, 0xE114, 0xE22C, 0xE3C3, 0xFFFD, 0xF3C2, 0x0E00, 0x0FED, + 0x0220, 0x0222, 0x04DF, 0x04EE, 0x2E2E, 0x2020, 0x2442, 0x3FF1, 0xE0FF, + 0x3443, 0x42E2, 0x4F0F, 0xE121, 0xFE10, 0xE110, 0x4220, 0xCF2D, 0xCF3E, + 0xE2F1, 0xFF40, 0xF12C, 0x14EF, 0x100F, 0x4E20, 0xDC30, 0xDE41, 0xD1C2, + 0xD2F4, 0xD20F, 0xEC13, 0xEDC3, 0xEDF4, 0xEEDD, 0xE2D1, 0xE24E, 0xFDDF, + 0xFEE3, 0xFFCC, 0xF0DE, 0xF04D, 0xF223, 0xF3E0, 0x0C0E, 0x0D2F, 0x0EF3, + 0x03CD, 0x1C3E, 0x1DCC, 0x11DD, 0x113F, 0x13EE, 0x14CF, 0x2DE1, 0x2D0F, + 0x2D01, 0x2E4C, 0x2F3E, 0x2F34, 0x22D1, 0x3E12, 0x3F00, 0x3F04, 0x3F22, + 0x3010, 0x31C2, 0x312C, 0x3410, 0x4202, 0xC2E2, 0x43F0, 0x430D, 0xDDDD, + 0xDFFF, 0xED4F, 0xEEEC, 0xE22E, 0xFC3E, 0xFD4E, 0xF0C3, 0x01DC, 0x04E2, + 0x11C2, 0x12D4, 0x12F2, 0x22C0, 0x22C2, 0x222E, 0x4EE2, 0x4433, 0xFFC0, + 0xF2FC, 0x004E, 0x01C1, 0xC110, 0x1EE1, 0xEFFE, 0x1F2C, 0xE1FE, 0xFE12, + 0xF104, 0x101E, 0x11C0, 0x122F, 0xCD2F, 0xDCF0, 0xEE22, 0xF340, 0x211C, + 0x23C1, 0x2341, 0x34E1, 0xD4F0, 0x4DFE, 0x4D21, 0xFF20, 0x0EFF, 0x01EF, + 0x1E10, 0x102F, 0x1140, 0xF001, 0x4FEF, 0x4FFE, 0x4EFF, 0xD4E1, 0x02F1, + 0x10F0, 0x1E01, 0x101C, 0x401F, 0x104F, 0xCDC3, 0xCDF4, 0xCD1C, 0xCEC4, + 0xCE2C, 0xCE3F, 0xCE4C, 0xCE40, 0xCFCD, 0xCFD4, 0xCFF4, 0xCF14, 0xC0CC, + 0xC0C0, 0xC0C4, 0xC0EC, 0xC0E4, 0xC004, 0xC1DC, 0xC1D4, 0xC1FC, 0xC1F4, + 0xC114, 0xC2CC, 0xC2C4, 0xC20C, 0xC224, 0xC244, 0xC3C1, 0xC3C3, 0xC31C, + 0xC34D, 0xC4CC, 0xC4EC, 0xC4FF, 0xC40C, 0xC400, 0xC404, 0xC411, 0xC424, + 0xC433, 0xC440, 0xC442, 0xC444, 0xDCFC, 0xDC0D, 0xDD0C, 0xDD3D, 0xDD4C, + 0xDE43, 0xD0C3, 0xD0ED, 0xD00D, 0xD04D, 0xD1CC, 0xD3CC, 0xD30E, 0xD34C, + 0xD414, 0xD434, 0xECC4, 0xEC04, 0xEC3F, 0xEC4C, 0xE0DD, 0xE040, 0xE4CC, + 0xE4EC, 0xE404, 0xE440, 0xFCD0, 0xFDC4, 0xF1CC, 0xF3CC, 0xF4CD, 0xF4CF, + 0xF4D4, 0xF414, 0xF421, 0x0C0C, 0x0C00, 0x0C40, 0x0D34, 0x0E40, 0x0F3C, + 0x00CC, 0x00C0, 0x00C2, 0x00DD, 0x0004, 0x01CD, 0x0103, 0x03DC, 0x033C, + 0x034D, 0x034F, 0x04C0, 0x04C4, 0x040C, 0x0404, 0x0433, 0x044C, 0x11C4, + 0x114C, 0x13C4, 0x2CC0, 0x2C4C, 0x2DED, 0x2D0D, 0x20C4, 0x2044, 0x24CC, + 0x24C0, 0x244C, 0x2440, 0x3CCD, 0x3CCF, 0x3CDC, 0x3DCC, 0x3DC4, 0x3DE0, + 0x3DFD, 0x3D00, 0x3F3D, 0x3F4C, 0x3F44, 0x30E3, 0x3023, 0x303C, 0x33C0, + 0x33C4, 0x33D1, 0x33F3, 0x3300, 0x4CCC, 0x4CC0, 0x4CC2, 0x4CDD, 0x4CD3, + 0x4C0C, 0x4C00, 0x4C04, 0x4C24, 0x4C40, 0x4C44, 0x4DCD, 0x4DC3, 0x4D14, + 0x4D34, 0x4E4C, 0x4F3C, 0x4F4D, 0x4F43, 0x40C2, 0x40C4, 0x40E4, 0x400C, + 0x402C, 0x404C, 0x404E, 0x4040, 0x4044, 0x41CF, 0x41F4, 0x4114, 0x4141, + 0x4143, 0x42CC, 0x42C4, 0x42E4, 0x43C1, 0x43D4, 0x43F4, 0x4310, 0x4314, + 0x434D, 0x44CC, 0x44C4, 0x44FF, 0x440C, 0x4404, 0x4411, 0x442C, 0x444C, + 0xCCD3, 0x444E, 0x4440, 0xCC00, 0xCC04, 0xCC3D, 0xCD10, 0xCD3C, 0xCFCF, + 0xCFC3, 0xCF3C, 0xC0CE, 0xC0DD, 0xC00C, 0xC013, 0xC02C, 0xC04C, 0xC04E, + 0xC040, 0xC044, 0xC1CD, 0xC1CF, 0xC14D, 0xC233, 0xC240, 0xC3CD, 0xC3F4, + 0xC314, 0xC343, 0xC4CE, 0xC4C0, 0xC4DF, 0xC4E4, 0xC42C, 0xC44E, 0xDC3C, + 0xDC4F, 0xDC43, 0xDDC0, 0xDDC4, 0xDDFD, 0xDD1D, 0xDD31, 0xDD44, 0xDEC3, + 0xDE30, 0xDF3D, 0xD0DC, 0xD0D4, 0xD0E3, 0xD003, 0xD1D3, 0xD203, 0xD340, + 0xD4CD, 0xD4DC, 0xD4F4, 0xEC0C, 0xEC2C, 0xEC40, 0xEC44, 0xE0CC, 0xE04C, + 0xE303, 0xE4E4, 0xE40C, 0xFCFC, 0xF2DC, 0xF324, 0xF34C, 0xF4DC, 0xF434, + 0x0CEC, 0x0CE4, 0x0C04, 0x0C2C, 0x0C3D, 0x0C44, 0x0DC3, 0x0EC0, 0x0E33, + 0x0FC3, 0x0F1C, 0x00C4, 0x000C, 0x004C, 0x01F4, 0x0114, 0x023D, 0x04CC, + 0x04C2, 0x1CFC, 0x1C0D, 0x1C3C, 0x1C34, 0x1DC4, 0x2CCC, 0x2C04, 0x20D3, + 0x24E4, 0x3CFC, 0x3CF4, 0x3C0D, 0x3D44, 0x3F1D, 0x300D, 0x3003, 0x3030, + 0x304D, 0x31F3, 0x314C, 0x3144, 0x3302, 0x3304, 0x34D4, 0x34F4, 0x3403, + 0x344D, 0x4CDF, 0x4CEC, 0x4CFD, 0x4C42, 0x4DCF, 0x4DDC, 0x4DFC, 0x4D0D, + 0x4D03, 0x4D1C, 0x4D41, 0x4ECC, 0x4E42, 0x4E44, 0x4FC1, 0x4FF4, 0x4F1C, + 0x4F34, 0x4F4F, 0x40CE, 0x4004, 0x4024, 0x41C3, 0x4134, 0x414F, 0x420C, + 0x421D, 0x424C, 0x424E, 0x4244, 0x433C, 0x434F, 0x44EE, 0x44E4, 0x44F1, + 0xCC24, 0x4402, 0x4424, 0xCC3F, 0xCC44, 0xCDC1, 0xCD14, 0xCECC, 0xCE04, + 0xCFC1, 0xCF0D, 0xC0D1, 0xC0FD, 0xC024, 0xC042, 0xC11C, 0xC12D, 0xC2EC, + 0xC242, 0xC3ED, 0xC3E3, 0xC4F3, 0xC413, 0xC43D, 0xDC1C, 0xDDD3, 0xDDE4, + 0xDD00, 0xDD3F, 0xDFCC, 0xDFD3, 0xDF4C, 0xD023, 0xD14C, 0xD23C, 0xD3DD, + 0xD3D1, 0xD304, 0xD331, 0xD4CF, 0xD43C, 0xD430, 0xD44D, 0xECC2, 0xECEC, + 0xEDE3, 0xED32, 0xEE3D, 0xE24C, 0xE3D0, 0xE3E3, 0xE444, 0xFC3C, 0xFD44, + 0xF0DC, 0xF3DF, 0xF41C, 0xF43C, 0xF443, 0x0CCE, 0x0CD1, 0x0DF4, 0x0D30, + 0x0024, 0x01D4, 0x0130, 0x033E, 0x04D3, 0x04EC, 0x042C, 0x0424, 0x0444, + 0x1C4D, 0x1DFD, 0x1D3D, 0x1F33, 0x11CC, 0x13CC, 0x13DD, 0x14DC, 0x141C, + 0x2CDF, 0x2C0C, 0x2C44, 0x2D30, 0x23CD, 0x23D4, 0x2303, 0x2404, 0x3CD4, + 0x3C03, 0x3C3C, 0x3C43, 0x3DEE, 0x3D1D, 0x3D31, 0x3EED, 0x3E30, 0x3FCC, + 0x3014, 0x302D, 0x3032, 0x3034, 0x3120, 0x32CD, 0x32C1, 0x32D0, 0x320D, + 0x334C, 0x34CD, 0x34C3, 0x34D0, 0x34D2, 0x3414, 0x343C, 0x4CE4, 0x4CFF, + 0x4CF1, 0x4C0E, 0x4C1D, 0x4C33, 0x4DF4, 0x4EC2, 0x4EC4, 0x4E40, 0x4FDC, + 0x4042, 0x41D4, 0x411C, 0x413C, 0x42CE, 0x42F1, 0x4240, 0x432D, 0x44C0, + 0x44C2, 0x44D1, 0x440E, 0x4420, 0xCCD1, 0xCC1F, 0xCD32, 0xCEC0, 0xCF41, + 0xC1C1, 0xC321, 0xC33C, 0xC42E, 0xDCED, 0xDD0E, 0xDD1F, 0xDD20, 0xDEED, + 0xDF31, 0xD1C0, 0xD120, 0xD2D4, 0xD2ED, 0xD230, 0xD232, 0xD3DF, 0xD30C, + 0xD33D, 0xD4D4, 0xEC3D, 0xEC33, 0xED03, 0xED1C, 0xED2D, 0xED2F, 0xEE33, + 0xEFE3, 0xE0D1, 0xE3ED, 0xE3FC, 0xE32D, 0xE40E, 0xFCD2, 0xFC4D, 0xFDCE, + 0xF31D, 0xF32C, 0x0D23, 0x0D43, 0x0ED3, }; -#define ON2AVC_CB14_CODES 729 -static const uint16_t on2avc_cb14_codes[ON2AVC_CB14_CODES] = { - 0x0000, 0x0018, 0x009C, 0x033F, 0x06CF, 0x0860, - 0x3ED2, 0x15F8, 0x0CA3, 0x15F9, 0x3ED3, 0x3ED4, - 0x3ED5, 0x03B3, 0x0336, 0x3ECF, 0x3ED0, 0x15F5, - 0x15F6, 0x3ED1, 0x1FB6, 0x15F7, 0x0D6D, 0x074E, - 0x02A4, 0x008C, 0x0017, 0x0016, 0x0024, 0x00A8, - 0x02AB, 0x043C, 0x038D, 0x15FA, 0x0CA4, 0x1FB8, - 0x15FB, 0x3ED9, 0x1FB9, 0x15FC, 0x01D8, 0x01F1, - 0x3ED6, 0x1090, 0x1FB7, 0x0D6E, 0x3ED7, 0x3ED8, - 0x074F, 0x0D6F, 0x0750, 0x01F2, 0x0098, 0x0020, - 0x0070, 0x009D, 0x00E4, 0x026F, 0x03AE, 0x055D, - 0x06D0, 0x0862, 0x0667, 0x09ED, 0x1900, 0x3EDA, - 0x1901, 0x01DE, 0x026B, 0x15FD, 0x15FE, 0x1091, - 0x15FF, 0x0D70, 0x0666, 0x0689, 0x0861, 0x034E, - 0x026E, 0x00E8, 0x008E, 0x019E, 0x01BF, 0x01F3, - 0x02B5, 0x054E, 0x0669, 0x09EE, 0x09EF, 0x0D71, - 0x0CA5, 0x1FBB, 0x1FBC, 0x3EDF, 0x02A6, 0x01CA, - 0x3EDB, 0x3EDC, 0x3EDD, 0x3EDE, 0x1FBA, 0x1092, - 0x0863, 0x0751, 0x0668, 0x038E, 0x02B4, 0x01C4, - 0x068A, 0x0CA7, 0x06D1, 0x055F, 0x043E, 0x09F0, - 0x0865, 0x0866, 0x0867, 0x0752, 0x1902, 0x3EE2, - 0x1096, 0x0278, 0x02B6, 0x3EE0, 0x1FBD, 0x3EE1, - 0x0864, 0x1FBE, 0x0CA6, 0x1093, 0x1094, 0x1095, - 0x0478, 0x043D, 0x055E, 0x3EE5, 0x0CA9, 0x066A, - 0x0D75, 0x0560, 0x0561, 0x0868, 0x0D76, 0x0CAA, - 0x0CAB, 0x3EE6, 0x3EE7, 0x3EE8, 0x02AC, 0x038F, - 0x3EE3, 0x1FBF, 0x3EE4, 0x0D72, 0x0D73, 0x0D74, - 0x09F1, 0x068B, 0x0CA8, 0x0479, 0x06D2, 0x1097, - 0x1099, 0x09F3, 0x066B, 0x06D3, 0x0CAD, 0x109A, - 0x06D4, 0x068C, 0x06D5, 0x0D79, 0x0D7A, 0x109B, - 0x1FC1, 0x02B2, 0x0396, 0x3EE9, 0x1903, 0x3EEA, - 0x1904, 0x1905, 0x1FC0, 0x09F2, 0x0D77, 0x0D78, - 0x1098, 0x0562, 0x0CAC, 0x190C, 0x109C, 0x06D6, - 0x0D7C, 0x1FC4, 0x0D7D, 0x09F4, 0x06D7, 0x09F5, - 0x3EEE, 0x0CAE, 0x0D7E, 0x3EEF, 0x03AF, 0x043F, - 0x3EEB, 0x1906, 0x1FC2, 0x1907, 0x3EEC, 0x1908, - 0x1909, 0x190A, 0x1FC3, 0x3EED, 0x0D7B, 0x190B, - 0x1FC6, 0x10A1, 0x10A2, 0x0D7F, 0x0CB0, 0x190E, - 0x0D80, 0x10A3, 0x0869, 0x190F, 0x1910, 0x10A4, - 0x10A5, 0x0753, 0x068D, 0x3EF0, 0x3EF1, 0x190D, - 0x1FC5, 0x3EF2, 0x3EF3, 0x109D, 0x109E, 0x0CAF, - 0x109F, 0x3EF4, 0x10A0, 0x10A7, 0x3EFC, 0x0CB1, - 0x09F7, 0x1911, 0x10A8, 0x09F8, 0x10A9, 0x1912, - 0x06D9, 0x09F9, 0x3EFD, 0x1913, 0x068E, 0x06D8, - 0x3EF5, 0x3EF6, 0x3EF7, 0x3EF8, 0x3EF9, 0x0D81, - 0x3EFA, 0x1FC7, 0x1FC8, 0x10A6, 0x09F6, 0x3EFB, - 0x1FCE, 0x0CB2, 0x3F02, 0x10AA, 0x3F03, 0x1FCF, - 0x10AB, 0x10AC, 0x1916, 0x3F04, 0x09FA, 0x0D83, - 0x3F05, 0x068F, 0x086A, 0x1914, 0x3EFE, 0x1FC9, - 0x1FCA, 0x3EFF, 0x0D82, 0x1FCB, 0x1FCC, 0x3F00, - 0x1FCD, 0x3F01, 0x1915, 0x3F0F, 0x1918, 0x10AD, - 0x0CB3, 0x3F10, 0x1919, 0x3F11, 0x191A, 0x1FD2, - 0x0CB4, 0x0CB5, 0x10AE, 0x191B, 0x047A, 0x06DA, - 0x3F06, 0x3F07, 0x1917, 0x3F08, 0x3F09, 0x3F0A, - 0x3F0B, 0x3F0C, 0x3F0D, 0x3F0E, 0x1FD0, 0x1FD1, - 0x3F18, 0x191F, 0x1FDA, 0x3F19, 0x3F1A, 0x10AF, - 0x3F1B, 0x10B2, 0x1FDB, 0x0D86, 0x0D87, 0x10B3, - 0x0CB6, 0x086B, 0x09FB, 0x3F12, 0x1FD3, 0x1FD4, - 0x3F13, 0x1FD5, 0x191E, 0x1FD6, 0x3F14, 0x3F15, - 0x3F16, 0x1FD7, 0x3F17, 0x033A, 0x01AA, 0x02B8, - 0x01DF, 0x02B9, 0x02BA, 0x086F, 0x03BB, 0x03B2, - 0x046A, 0x066F, 0x08DE, 0x0563, 0x046B, 0x0CB7, - 0x11BE, 0x086E, 0x066E, 0x06DB, 0x047B, 0x03BA, - 0x0A9E, 0x02B7, 0x0340, 0x0264, 0x01CE, 0x01A9, - 0x0265, 0x01A8, 0x0266, 0x02A8, 0x036F, 0x03AB, - 0x037A, 0x04FE, 0x0683, 0x06C4, 0x0C90, 0x065D, - 0x0D3C, 0x0FEC, 0x0436, 0x06C2, 0x0682, 0x0C8E, - 0x055A, 0x033B, 0x065C, 0x0348, 0x03AA, 0x0234, - 0x036E, 0x01F0, 0x01A6, 0x3E86, 0x3E87, 0x153E, - 0x3E88, 0x3E89, 0x0FEF, 0x3E8A, 0x3E8B, 0x3E8C, - 0x3E8D, 0x3E8E, 0x3E8F, 0x3E90, 0x09E4, 0x03AC, - 0x11BF, 0x1F8E, 0x1F8F, 0x0FEE, 0x3E80, 0x3E81, - 0x3E82, 0x3E83, 0x3E84, 0x3E85, 0x1F90, 0x1F91, - 0x3E95, 0x3E96, 0x0C91, 0x3E97, 0x3E98, 0x3E99, - 0x3E9A, 0x3E9B, 0x3E9C, 0x3E9D, 0x3E9E, 0x3E9F, - 0x3EA0, 0x0858, 0x04FF, 0x0FF0, 0x0FF1, 0x153F, - 0x0FF2, 0x3E91, 0x1F92, 0x3E92, 0x1F93, 0x3E93, - 0x1F94, 0x3E94, 0x0D3D, 0x3EA3, 0x1F99, 0x0FF7, - 0x0D3E, 0x3EA4, 0x1F9A, 0x15D9, 0x0D3F, 0x3EA5, - 0x3EA6, 0x3EA7, 0x0D58, 0x3EA8, 0x06C5, 0x072E, - 0x3EA1, 0x1F95, 0x1F96, 0x0C92, 0x0FF3, 0x0FF4, - 0x0FF5, 0x15D8, 0x1F97, 0x0FF6, 0x1F98, 0x3EA2, - 0x3EAC, 0x0FF9, 0x1F9C, 0x15DB, 0x1F9D, 0x15DC, - 0x0FFA, 0x1F9E, 0x3EAD, 0x3EAE, 0x3EAF, 0x3EB0, - 0x3EB1, 0x065E, 0x055B, 0x3EA9, 0x0D59, 0x15DA, - 0x0FF8, 0x3EAA, 0x0D5A, 0x3EAB, 0x0D5B, 0x0D5C, - 0x0D5D, 0x072F, 0x1F9B, 0x3EB4, 0x1FA0, 0x073C, - 0x0D5F, 0x1FA1, 0x1FA2, 0x0FFE, 0x1FA3, 0x1FA4, - 0x3EB5, 0x3EB6, 0x3EB7, 0x3EB8, 0x065F, 0x06C6, - 0x3EB2, 0x15DD, 0x0FFB, 0x3EB3, 0x1F9F, 0x0D5E, - 0x0C93, 0x0C94, 0x0FFC, 0x0FFD, 0x15DE, 0x15DF, - 0x1FA7, 0x15E1, 0x06C7, 0x0D62, 0x15E2, 0x0C96, - 0x15E3, 0x1082, 0x15E4, 0x1FA8, 0x3EBA, 0x3EBB, - 0x3EBC, 0x0660, 0x046E, 0x3EB9, 0x1FA5, 0x0FFF, - 0x1FA6, 0x1080, 0x1081, 0x0D60, 0x0C95, 0x15E0, - 0x0D61, 0x073D, 0x085A, 0x15E6, 0x09E9, 0x085B, - 0x0C97, 0x1083, 0x0C98, 0x0D63, 0x0D64, 0x0C99, - 0x15E7, 0x15E8, 0x1FAC, 0x3EBE, 0x0684, 0x037B, - 0x1FA9, 0x1FAA, 0x3EBD, 0x073E, 0x1FAB, 0x15E5, - 0x06C8, 0x09E5, 0x09E6, 0x09E7, 0x0661, 0x09E8, - 0x1FAE, 0x0C9A, 0x06CA, 0x055C, 0x0C9B, 0x3EC0, - 0x15EB, 0x1085, 0x1086, 0x15EC, 0x1087, 0x3EC1, - 0x3EC2, 0x02A9, 0x02B3, 0x1FAD, 0x15E9, 0x3EBF, - 0x15EA, 0x1084, 0x0D65, 0x0662, 0x0D66, 0x06C9, - 0x0438, 0x054A, 0x073F, 0x085D, 0x0663, 0x0439, - 0x0686, 0x06CB, 0x0C9E, 0x0C9F, 0x1088, 0x15EF, - 0x3EC6, 0x1089, 0x1FAF, 0x3EC7, 0x0349, 0x0267, - 0x3EC3, 0x3EC4, 0x15ED, 0x15EE, 0x3EC5, 0x09EA, - 0x0C9C, 0x0C9D, 0x054B, 0x0685, 0x085C, 0x09EB, - 0x01BC, 0x01DC, 0x01BE, 0x03AD, 0x038A, 0x0749, - 0x0688, 0x0665, 0x074A, 0x0CA1, 0x0D68, 0x3EC8, - 0x1FB1, 0x0236, 0x034A, 0x1FB0, 0x108A, 0x108B, - 0x0CA0, 0x0D67, 0x0687, 0x0748, 0x0664, 0x038B, - 0x023E, 0x01DA, 0x01DB, 0x006E, 0x0094, 0x00E6, - 0x033E, 0x043A, 0x06CD, 0x085E, 0x085F, 0x0D69, - 0x0D6A, 0x1FB3, 0x1FB4, 0x3ECA, 0x034B, 0x023F, - 0x3EC9, 0x108C, 0x1FB2, 0x15F0, 0x15F1, 0x074B, - 0x06CC, 0x074C, 0x038C, 0x0268, 0x0136, 0x0095, - 0x0014, 0x001E, 0x0097, 0x019C, 0x074D, 0x0D6C, - 0x06CE, 0x0CA2, 0x108E, 0x09EC, 0x3ECD, 0x108F, - 0x3ECE, 0x026A, 0x02AA, 0x3ECB, 0x1FB5, 0x15F2, - 0x3ECC, 0x15F3, 0x15F4, 0x0D6B, 0x108D, 0x043B, - 0x0269, 0x0096, 0x0022, +static const uint16_t on2avc_cb_9_syms[ON2AVC_CB_9_10_CODES] = { + 0x0000, 0xFF00, 0x05FF, 0x02FB, 0xFE02, 0xFDFE, 0x03FE, 0x05FE, 0x0301, + 0x0400, 0x02FD, 0x0103, 0xFCFE, 0x02FC, 0x0303, 0x04FD, 0x0004, 0x00FC, + 0x0302, 0x04FF, 0x0502, 0xFC05, 0xFC01, 0xFDFC, 0xFC04, 0x03FC, 0x0504, + 0xFFFC, 0xFCFF, 0xFBFC, 0xFCFB, 0xFE00, 0xFEFB, 0xFEFD, 0x0304, 0xFD04, + 0xFE03, 0x0401, 0x00FF, 0x0002, 0x0205, 0x04FB, 0x0405, 0x00FE, 0xFD05, + 0x0003, 0xFB04, 0xFFFB, 0xFF05, 0x01FB, 0x03FB, 0x00FD, 0xFC02, 0xFC03, + 0xFCFD, 0xFB00, 0x0503, 0xFBFE, 0x0105, 0xFDFB, 0x0305, 0x0501, 0xFB01, + 0x0005, 0x01FC, 0x0403, 0xFCFC, 0xFC00, 0xFF04, 0x05FC, 0x0104, 0xFD03, + 0x0500, 0xFBFF, 0x05FD, 0x0300, 0xFD00, 0x00FB, 0x0200, 0xFE05, 0xFBFD, + 0xFB03, 0xFF01, 0x03FF, 0xFB05, 0x0204, 0x03FD, 0xFEFE, 0xFBFB, 0xFDFD, + 0x04FE, 0x01FE, 0xFF03, 0xFFFD, 0x02FF, 0xFF02, 0xFEFF, 0x0201, 0x01FF, + 0xFFFF, 0x0101, 0xFD01, 0xFEFC, 0x04FC, 0x0404, 0xFE04, 0x0402, 0x01FD, + 0xFDFF, 0xFB02, 0x02FE, 0x05FB, 0x0505, 0xFFFE, 0xFE01, 0x0102, 0x0202, + 0x0203, 0xFD02, 0x0100, 0x0001, }; -static const uint8_t on2avc_cb14_bits[ON2AVC_CB14_CODES] = { - 1, 5, 8, 10, 11, 12, - 14, 13, 12, 13, 14, 14, - 14, 10, 10, 14, 14, 13, - 13, 14, 13, 13, 12, 11, - 10, 8, 5, 5, 6, 8, - 10, 11, 10, 13, 12, 13, - 13, 14, 13, 13, 9, 9, - 14, 13, 13, 12, 14, 14, - 11, 12, 11, 9, 8, 6, - 7, 8, 8, 10, 10, 11, - 11, 12, 11, 12, 13, 14, - 13, 9, 10, 13, 13, 13, - 13, 12, 11, 11, 12, 10, - 10, 8, 8, 9, 9, 9, - 10, 11, 11, 12, 12, 12, - 12, 13, 13, 14, 10, 9, - 14, 14, 14, 14, 13, 13, - 12, 11, 11, 10, 10, 9, - 11, 12, 11, 11, 11, 12, - 12, 12, 12, 11, 13, 14, - 13, 10, 10, 14, 13, 14, - 12, 13, 12, 13, 13, 13, - 11, 11, 11, 14, 12, 11, - 12, 11, 11, 12, 12, 12, - 12, 14, 14, 14, 10, 10, - 14, 13, 14, 12, 12, 12, - 12, 11, 12, 11, 11, 13, - 13, 12, 11, 11, 12, 13, - 11, 11, 11, 12, 12, 13, - 13, 10, 10, 14, 13, 14, - 13, 13, 13, 12, 12, 12, - 13, 11, 12, 13, 13, 11, - 12, 13, 12, 12, 11, 12, - 14, 12, 12, 14, 10, 11, - 14, 13, 13, 13, 14, 13, - 13, 13, 13, 14, 12, 13, - 13, 13, 13, 12, 12, 13, - 12, 13, 12, 13, 13, 13, - 13, 11, 11, 14, 14, 13, - 13, 14, 14, 13, 13, 12, - 13, 14, 13, 13, 14, 12, - 12, 13, 13, 12, 13, 13, - 11, 12, 14, 13, 11, 11, - 14, 14, 14, 14, 14, 12, - 14, 13, 13, 13, 12, 14, - 13, 12, 14, 13, 14, 13, - 13, 13, 13, 14, 12, 12, - 14, 11, 12, 13, 14, 13, - 13, 14, 12, 13, 13, 14, - 13, 14, 13, 14, 13, 13, - 12, 14, 13, 14, 13, 13, - 12, 12, 13, 13, 11, 11, - 14, 14, 13, 14, 14, 14, - 14, 14, 14, 14, 13, 13, - 14, 13, 13, 14, 14, 13, - 14, 13, 13, 12, 12, 13, - 12, 12, 12, 14, 13, 13, - 14, 13, 13, 13, 14, 14, - 14, 13, 14, 10, 9, 10, - 9, 10, 10, 12, 10, 10, - 11, 11, 12, 11, 11, 12, - 13, 12, 11, 11, 11, 10, - 12, 10, 10, 10, 9, 9, - 10, 9, 10, 10, 10, 10, - 10, 11, 11, 11, 12, 11, - 12, 12, 11, 11, 11, 12, - 11, 10, 11, 10, 10, 10, - 10, 9, 9, 14, 14, 13, - 14, 14, 12, 14, 14, 14, - 14, 14, 14, 14, 12, 10, - 13, 13, 13, 12, 14, 14, - 14, 14, 14, 14, 13, 13, - 14, 14, 12, 14, 14, 14, - 14, 14, 14, 14, 14, 14, - 14, 12, 11, 12, 12, 13, - 12, 14, 13, 14, 13, 14, - 13, 14, 12, 14, 13, 12, - 12, 14, 13, 13, 12, 14, - 14, 14, 12, 14, 11, 11, - 14, 13, 13, 12, 12, 12, - 12, 13, 13, 12, 13, 14, - 14, 12, 13, 13, 13, 13, - 12, 13, 14, 14, 14, 14, - 14, 11, 11, 14, 12, 13, - 12, 14, 12, 14, 12, 12, - 12, 11, 13, 14, 13, 11, - 12, 13, 13, 12, 13, 13, - 14, 14, 14, 14, 11, 11, - 14, 13, 12, 14, 13, 12, - 12, 12, 12, 12, 13, 13, - 13, 13, 11, 12, 13, 12, - 13, 13, 13, 13, 14, 14, - 14, 11, 11, 14, 13, 12, - 13, 13, 13, 12, 12, 13, - 12, 11, 12, 13, 12, 12, - 12, 13, 12, 12, 12, 12, - 13, 13, 13, 14, 11, 10, - 13, 13, 14, 11, 13, 13, - 11, 12, 12, 12, 11, 12, - 13, 12, 11, 11, 12, 14, - 13, 13, 13, 13, 13, 14, - 14, 10, 10, 13, 13, 14, - 13, 13, 12, 11, 12, 11, - 11, 11, 11, 12, 11, 11, - 11, 11, 12, 12, 13, 13, - 14, 13, 13, 14, 10, 10, - 14, 14, 13, 13, 14, 12, - 12, 12, 11, 11, 12, 12, - 9, 9, 9, 10, 10, 11, - 11, 11, 11, 12, 12, 14, - 13, 10, 10, 13, 13, 13, - 12, 12, 11, 11, 11, 10, - 10, 9, 9, 7, 8, 8, - 10, 11, 11, 12, 12, 12, - 12, 13, 13, 14, 10, 10, - 14, 13, 13, 13, 13, 11, - 11, 11, 10, 10, 9, 8, - 5, 5, 8, 9, 11, 12, - 11, 12, 13, 12, 14, 13, - 14, 10, 10, 14, 13, 13, - 14, 13, 13, 12, 13, 11, - 10, 8, 6, +static const uint16_t on2avc_cb_10_syms[ON2AVC_CB_9_10_CODES] = { + 0x04FE, 0x0401, 0x04FB, 0x04FD, 0xFDFD, 0xFFFC, 0xFCFC, 0xFE00, 0x03FB, + 0xFC03, 0x04FF, 0xFD00, 0x03FC, 0x0404, 0x0405, 0xFCFB, 0xFD05, 0xFB03, + 0x05FD, 0x03FD, 0x0101, 0x05FF, 0x0504, 0xFBFC, 0xFD03, 0x0003, 0x05FE, + 0x0500, 0x0300, 0x0203, 0xFBFE, 0xFFFB, 0x00FD, 0xFB05, 0xFC00, 0x0501, + 0x0005, 0xFEFC, 0x0205, 0xFF05, 0xFDFE, 0x0505, 0x0004, 0x00FC, 0x0102, + 0xFB01, 0xFEFD, 0x01FF, 0xFFFE, 0xFEFB, 0x01FB, 0x01FE, 0x0502, 0x0204, + 0x0400, 0x05FB, 0x0201, 0xFF02, 0xFFFF, 0x02FF, 0xFEFF, 0xFF01, 0xFDFF, + 0x0301, 0x03FF, 0x0302, 0xFE01, 0x0105, 0x03FE, 0xFEFE, 0x01FD, 0x0304, + 0xFB00, 0xFF00, 0xFFFD, 0xFE03, 0x0103, 0xFBFF, 0x00FF, 0xFB02, 0xFB04, + 0x0402, 0xFBFB, 0xFCFE, 0x00FB, 0xFC05, 0x0100, 0x0000, 0xFD01, 0x02FB, + 0x0202, 0xFF03, 0x05FC, 0x0403, 0x0200, 0xFE05, 0xFDFC, 0xFE04, 0x0001, + 0x02FE, 0x02FD, 0x02FC, 0xFD04, 0xFD02, 0x0305, 0xFCFF, 0x04FC, 0xFC04, + 0xFC01, 0xFF04, 0xFE02, 0xFBFD, 0xFC02, 0xFCFD, 0x0002, 0x0303, 0x01FC, + 0x0104, 0x00FE, 0xFDFB, 0x0503, }; -static const uint16_t on2avc_cb14_syms[ON2AVC_CB14_CODES] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, - 0x000C, 0x000D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, - 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, - 0x00FD, 0x00FE, 0x00FF, 0x0100, 0x0101, 0x0102, - 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0x0108, - 0x0109, 0x010A, 0x010B, 0x010C, 0x010D, 0x01F3, - 0x01F4, 0x01F5, 0x01F6, 0x01F7, 0x01F8, 0x01F9, - 0x01FA, 0x01FB, 0x01FC, 0x01FD, 0x01FE, 0x01FF, - 0x0200, 0x0201, 0x0202, 0x0203, 0x0204, 0x0205, - 0x0206, 0x0207, 0x0208, 0x0209, 0x020A, 0x020B, - 0x020C, 0x020D, 0x02F3, 0x02F4, 0x02F5, 0x02F6, - 0x02F7, 0x02F8, 0x02F9, 0x02FA, 0x02FB, 0x02FC, - 0x02FD, 0x02FE, 0x02FF, 0x0300, 0x0301, 0x0302, - 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, 0x0308, - 0x0309, 0x030A, 0x030B, 0x030C, 0x030D, 0x03F3, - 0x03F4, 0x03F5, 0x03F6, 0x03F7, 0x03F8, 0x03F9, - 0x03FA, 0x03FB, 0x03FC, 0x03FD, 0x03FE, 0x03FF, - 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, - 0x0406, 0x0407, 0x0408, 0x0409, 0x040A, 0x040B, - 0x040C, 0x040D, 0x04F3, 0x04F4, 0x04F5, 0x04F6, - 0x04F7, 0x04F8, 0x04F9, 0x04FA, 0x04FB, 0x04FC, - 0x04FD, 0x04FE, 0x04FF, 0x0500, 0x0501, 0x0502, - 0x0503, 0x0504, 0x0505, 0x0506, 0x0507, 0x0508, - 0x0509, 0x050A, 0x050B, 0x050C, 0x050D, 0x05F3, - 0x05F4, 0x05F5, 0x05F6, 0x05F7, 0x05F8, 0x05F9, - 0x05FA, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF, - 0x0600, 0x0601, 0x0602, 0x0603, 0x0604, 0x0605, - 0x0606, 0x0607, 0x0608, 0x0609, 0x060A, 0x060B, - 0x060C, 0x060D, 0x06F3, 0x06F4, 0x06F5, 0x06F6, - 0x06F7, 0x06F8, 0x06F9, 0x06FA, 0x06FB, 0x06FC, - 0x06FD, 0x06FE, 0x06FF, 0x0700, 0x0701, 0x0702, - 0x0703, 0x0704, 0x0705, 0x0706, 0x0707, 0x0708, - 0x0709, 0x070A, 0x070B, 0x070C, 0x070D, 0x07F3, - 0x07F4, 0x07F5, 0x07F6, 0x07F7, 0x07F8, 0x07F9, - 0x07FA, 0x07FB, 0x07FC, 0x07FD, 0x07FE, 0x07FF, - 0x0800, 0x0801, 0x0802, 0x0803, 0x0804, 0x0805, - 0x0806, 0x0807, 0x0808, 0x0809, 0x080A, 0x080B, - 0x080C, 0x080D, 0x08F3, 0x08F4, 0x08F5, 0x08F6, - 0x08F7, 0x08F8, 0x08F9, 0x08FA, 0x08FB, 0x08FC, - 0x08FD, 0x08FE, 0x08FF, 0x0900, 0x0901, 0x0902, - 0x0903, 0x0904, 0x0905, 0x0906, 0x0907, 0x0908, - 0x0909, 0x090A, 0x090B, 0x090C, 0x090D, 0x09F3, - 0x09F4, 0x09F5, 0x09F6, 0x09F7, 0x09F8, 0x09F9, - 0x09FA, 0x09FB, 0x09FC, 0x09FD, 0x09FE, 0x09FF, - 0x0A00, 0x0A01, 0x0A02, 0x0A03, 0x0A04, 0x0A05, - 0x0A06, 0x0A07, 0x0A08, 0x0A09, 0x0A0A, 0x0A0B, - 0x0A0C, 0x0A0D, 0x0AF3, 0x0AF4, 0x0AF5, 0x0AF6, - 0x0AF7, 0x0AF8, 0x0AF9, 0x0AFA, 0x0AFB, 0x0AFC, - 0x0AFD, 0x0AFE, 0x0AFF, 0x0B00, 0x0B01, 0x0B02, - 0x0B03, 0x0B04, 0x0B05, 0x0B06, 0x0B07, 0x0B08, - 0x0B09, 0x0B0A, 0x0B0B, 0x0B0C, 0x0B0D, 0x0BF3, - 0x0BF4, 0x0BF5, 0x0BF6, 0x0BF7, 0x0BF8, 0x0BF9, - 0x0BFA, 0x0BFB, 0x0BFC, 0x0BFD, 0x0BFE, 0x0BFF, - 0x0C00, 0x0C01, 0x0C02, 0x0C03, 0x0C04, 0x0C05, - 0x0C06, 0x0C07, 0x0C08, 0x0C09, 0x0C0A, 0x0C0B, - 0x0C0C, 0x0C0D, 0x0CF3, 0x0CF4, 0x0CF5, 0x0CF6, - 0x0CF7, 0x0CF8, 0x0CF9, 0x0CFA, 0x0CFB, 0x0CFC, - 0x0CFD, 0x0CFE, 0x0CFF, 0x0D00, 0x0D01, 0x0D02, - 0x0D03, 0x0D04, 0x0D05, 0x0D06, 0x0D07, 0x0D08, - 0x0D09, 0x0D0A, 0x0D0B, 0x0D0C, 0x0D0D, 0x0DF3, - 0x0DF4, 0x0DF5, 0x0DF6, 0x0DF7, 0x0DF8, 0x0DF9, - 0x0DFA, 0x0DFB, 0x0DFC, 0x0DFD, 0x0DFE, 0x0DFF, - 0xF300, 0xF301, 0xF302, 0xF303, 0xF304, 0xF305, - 0xF306, 0xF307, 0xF308, 0xF309, 0xF30A, 0xF30B, - 0xF30C, 0xF30D, 0xF3F3, 0xF3F4, 0xF3F5, 0xF3F6, - 0xF3F7, 0xF3F8, 0xF3F9, 0xF3FA, 0xF3FB, 0xF3FC, - 0xF3FD, 0xF3FE, 0xF3FF, 0xF400, 0xF401, 0xF402, - 0xF403, 0xF404, 0xF405, 0xF406, 0xF407, 0xF408, - 0xF409, 0xF40A, 0xF40B, 0xF40C, 0xF40D, 0xF4F3, - 0xF4F4, 0xF4F5, 0xF4F6, 0xF4F7, 0xF4F8, 0xF4F9, - 0xF4FA, 0xF4FB, 0xF4FC, 0xF4FD, 0xF4FE, 0xF4FF, - 0xF500, 0xF501, 0xF502, 0xF503, 0xF504, 0xF505, - 0xF506, 0xF507, 0xF508, 0xF509, 0xF50A, 0xF50B, - 0xF50C, 0xF50D, 0xF5F3, 0xF5F4, 0xF5F5, 0xF5F6, - 0xF5F7, 0xF5F8, 0xF5F9, 0xF5FA, 0xF5FB, 0xF5FC, - 0xF5FD, 0xF5FE, 0xF5FF, 0xF600, 0xF601, 0xF602, - 0xF603, 0xF604, 0xF605, 0xF606, 0xF607, 0xF608, - 0xF609, 0xF60A, 0xF60B, 0xF60C, 0xF60D, 0xF6F3, - 0xF6F4, 0xF6F5, 0xF6F6, 0xF6F7, 0xF6F8, 0xF6F9, - 0xF6FA, 0xF6FB, 0xF6FC, 0xF6FD, 0xF6FE, 0xF6FF, - 0xF700, 0xF701, 0xF702, 0xF703, 0xF704, 0xF705, - 0xF706, 0xF707, 0xF708, 0xF709, 0xF70A, 0xF70B, - 0xF70C, 0xF70D, 0xF7F3, 0xF7F4, 0xF7F5, 0xF7F6, - 0xF7F7, 0xF7F8, 0xF7F9, 0xF7FA, 0xF7FB, 0xF7FC, - 0xF7FD, 0xF7FE, 0xF7FF, 0xF800, 0xF801, 0xF802, - 0xF803, 0xF804, 0xF805, 0xF806, 0xF807, 0xF808, - 0xF809, 0xF80A, 0xF80B, 0xF80C, 0xF80D, 0xF8F3, - 0xF8F4, 0xF8F5, 0xF8F6, 0xF8F7, 0xF8F8, 0xF8F9, - 0xF8FA, 0xF8FB, 0xF8FC, 0xF8FD, 0xF8FE, 0xF8FF, - 0xF900, 0xF901, 0xF902, 0xF903, 0xF904, 0xF905, - 0xF906, 0xF907, 0xF908, 0xF909, 0xF90A, 0xF90B, - 0xF90C, 0xF90D, 0xF9F3, 0xF9F4, 0xF9F5, 0xF9F6, - 0xF9F7, 0xF9F8, 0xF9F9, 0xF9FA, 0xF9FB, 0xF9FC, - 0xF9FD, 0xF9FE, 0xF9FF, 0xFA00, 0xFA01, 0xFA02, - 0xFA03, 0xFA04, 0xFA05, 0xFA06, 0xFA07, 0xFA08, - 0xFA09, 0xFA0A, 0xFA0B, 0xFA0C, 0xFA0D, 0xFAF3, - 0xFAF4, 0xFAF5, 0xFAF6, 0xFAF7, 0xFAF8, 0xFAF9, - 0xFAFA, 0xFAFB, 0xFAFC, 0xFAFD, 0xFAFE, 0xFAFF, - 0xFB00, 0xFB01, 0xFB02, 0xFB03, 0xFB04, 0xFB05, - 0xFB06, 0xFB07, 0xFB08, 0xFB09, 0xFB0A, 0xFB0B, - 0xFB0C, 0xFB0D, 0xFBF3, 0xFBF4, 0xFBF5, 0xFBF6, - 0xFBF7, 0xFBF8, 0xFBF9, 0xFBFA, 0xFBFB, 0xFBFC, - 0xFBFD, 0xFBFE, 0xFBFF, 0xFC00, 0xFC01, 0xFC02, - 0xFC03, 0xFC04, 0xFC05, 0xFC06, 0xFC07, 0xFC08, - 0xFC09, 0xFC0A, 0xFC0B, 0xFC0C, 0xFC0D, 0xFCF3, - 0xFCF4, 0xFCF5, 0xFCF6, 0xFCF7, 0xFCF8, 0xFCF9, - 0xFCFA, 0xFCFB, 0xFCFC, 0xFCFD, 0xFCFE, 0xFCFF, - 0xFD00, 0xFD01, 0xFD02, 0xFD03, 0xFD04, 0xFD05, - 0xFD06, 0xFD07, 0xFD08, 0xFD09, 0xFD0A, 0xFD0B, - 0xFD0C, 0xFD0D, 0xFDF3, 0xFDF4, 0xFDF5, 0xFDF6, - 0xFDF7, 0xFDF8, 0xFDF9, 0xFDFA, 0xFDFB, 0xFDFC, - 0xFDFD, 0xFDFE, 0xFDFF, 0xFE00, 0xFE01, 0xFE02, - 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07, 0xFE08, - 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFEF3, - 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7, 0xFEF8, 0xFEF9, - 0xFEFA, 0xFEFB, 0xFEFC, 0xFEFD, 0xFEFE, 0xFEFF, - 0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, - 0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0B, - 0xFF0C, 0xFF0D, 0xFFF3, 0xFFF4, 0xFFF5, 0xFFF6, - 0xFFF7, 0xFFF8, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, - 0xFFFD, 0xFFFE, 0xFFFF, +static const uint16_t on2avc_cb11_syms[ON2AVC_CB_11_CODES] = { + 0x0000, 0xFA04, 0xFBFA, 0xFAFB, 0xFE04, 0x0103, 0xFDFC, 0xFB03, 0x0504, + 0x04FF, 0xFF07, 0x04FE, 0x0506, 0x01FA, 0xFDFE, 0xFAFF, 0x07FF, 0xFD05, + 0x05F9, 0x0302, 0xFE07, 0xF902, 0x0701, 0x0005, 0xF907, 0x07F9, 0xFC02, + 0x05FE, 0xF9FA, 0xFA01, 0x0203, 0xFF06, 0x0304, 0x0702, 0x03FE, 0xFEFD, + 0xFEFE, 0xFFF9, 0x0607, 0xF905, 0xF9FE, 0x0307, 0x0106, 0x06FC, 0xF900, + 0x0404, 0x0605, 0x01F9, 0x0500, 0x00FB, 0x0601, 0x04FD, 0x07FE, 0xFD02, + 0x02F9, 0x0403, 0x0202, 0x02FD, 0xFEF9, 0xFC03, 0xFE06, 0x03F9, 0xFB07, + 0xFAF9, 0xFFFA, 0xFCFD, 0x0007, 0xFE03, 0xFD04, 0x04FB, 0x05FC, 0x0206, + 0x0606, 0x0703, 0x06FE, 0xF9FF, 0xFAFA, 0x0207, 0xF9FD, 0x0107, 0x06FB, + 0x02FE, 0x0303, 0x0400, 0xFB04, 0xFBFB, 0xFE02, 0xFA02, 0x02FA, 0xFEFA, + 0xFB06, 0x0004, 0xFAFE, 0x0700, 0xFB00, 0xF906, 0x00FD, 0x03FC, 0xFA05, + 0x00FA, 0xFD07, 0xFC05, 0x06F9, 0xFDFD, 0x07FD, 0xFCFC, 0x0300, 0xF903, + 0xFDF9, 0x0602, 0x05FA, 0xF9F9, 0xFB05, 0x0600, 0x0006, 0xFD00, 0x00FC, + 0x07FC, 0x0306, 0xFDFA, 0xFD06, 0x0003, 0x0603, 0x0407, 0xFA07, 0x07FA, + 0xFFFE, 0xFAFD, 0x00F9, 0xFCF9, 0x0604, 0x06FD, 0x0201, 0x03FA, 0xF9FC, + 0x01FB, 0x0704, 0xFBFD, 0xFEFB, 0x0105, 0xFFFF, 0x02FF, 0xFE01, 0x01FE, + 0xFEFF, 0x0101, 0xFF01, 0x01FF, 0xFCFA, 0x0205, 0xFC00, 0xFD03, 0xFF05, + 0x04F9, 0x03FD, 0xFA03, 0x05FF, 0x0707, 0x05FB, 0xF904, 0xFBF9, 0x0102, + 0xFF02, 0xFAFC, 0xFFFB, 0xFB01, 0x0104, 0x06FA, 0x07FB, 0x06FF, 0xFA06, + 0xFE05, 0x0502, 0xFBFF, 0x0401, 0xFC04, 0xFDFB, 0xFA00, 0x0204, 0x0301, + 0x01FC, 0x0406, 0x0200, 0xFD01, 0x0305, 0x0507, 0x0705, 0xFC07, 0x0002, + 0xFF03, 0xFC06, 0x02FB, 0xFB02, 0x00FE, 0xFC01, 0xFCFB, 0x0501, 0xFF04, + 0x04FC, 0x0503, 0x03FF, 0xFFFD, 0x04FA, 0xFEFC, 0x0402, 0x03FB, 0x0505, + 0xFE00, 0x01FD, 0x02FC, 0x0706, 0xFBFE, 0xFDFF, 0xFFFC, 0xF9FB, 0xFBFC, + 0xFCFE, 0xF901, 0xFCFF, 0x05FD, 0x0405, 0x0100, 0xFF00, 0x0001, 0x00FF, }; -#define ON2AVC_CB15_CODES 1089 -static const uint16_t on2avc_cb15_codes[ON2AVC_CB15_CODES] = { - 0x00000, 0x0000A, 0x00064, 0x00104, 0x0034B, 0x0047B, - 0x007D7, 0x00E14, 0x00957, 0x021FD, 0x013B0, 0x03F08, - 0x07A01, 0x0E579, 0x00E15, 0x013A1, 0x003A2, 0x00397, - 0x0137F, 0x01F96, 0x021FC, 0x034CD, 0x01E97, 0x01A82, - 0x013A0, 0x01A83, 0x0089D, 0x00F6B, 0x0076C, 0x0026A, - 0x00118, 0x0006E, 0x00008, 0x0000B, 0x00015, 0x00076, - 0x000EC, 0x001D2, 0x003A6, 0x00716, 0x00726, 0x01F98, - 0x00E77, 0x01BF0, 0x01A84, 0x021FE, 0x021FF, 0x00D93, - 0x01A85, 0x0036E, 0x003B4, 0x00FFE, 0x00FDF, 0x07A02, - 0x065AF, 0x01E98, 0x01F97, 0x00E16, 0x00F30, 0x00CF0, - 0x00846, 0x00398, 0x0020F, 0x000EB, 0x00074, 0x00012, - 0x0007C, 0x00049, 0x0009C, 0x00136, 0x00344, 0x0026D, - 0x0076E, 0x00847, 0x00F6C, 0x00958, 0x01A86, 0x00F6D, - 0x013A3, 0x013B1, 0x009F8, 0x00F31, 0x0032F, 0x00268, - 0x00FE0, 0x0076D, 0x01F99, 0x013A2, 0x03D05, 0x0111A, - 0x00FFF, 0x00CF1, 0x0080D, 0x004FA, 0x0040B, 0x0023E, - 0x0011B, 0x0008E, 0x00077, 0x0010A, 0x000F8, 0x001B0, - 0x001D4, 0x003D9, 0x004C6, 0x006AE, 0x007DE, 0x0080E, - 0x00F33, 0x00E78, 0x01BF1, 0x0111B, 0x034CE, 0x00959, - 0x0111C, 0x00262, 0x001FA, 0x00F32, 0x00FE1, 0x02200, - 0x01F9A, 0x013A4, 0x00E17, 0x00FE2, 0x004B7, 0x00FE3, - 0x00717, 0x00453, 0x00366, 0x001C6, 0x0011A, 0x0010E, - 0x0032B, 0x0023F, 0x00345, 0x0035A, 0x0036F, 0x007B6, - 0x00E19, 0x00705, 0x0076F, 0x0111D, 0x00E79, 0x00D57, - 0x01BF4, 0x01A87, 0x0095B, 0x0095C, 0x00216, 0x0039A, - 0x00F34, 0x0095A, 0x01BF2, 0x01BF3, 0x01000, 0x00F6E, - 0x00F6F, 0x00E18, 0x007DF, 0x008F1, 0x007BE, 0x003BD, - 0x003EB, 0x00342, 0x0022D, 0x00772, 0x007BF, 0x00454, - 0x00455, 0x0071E, 0x004FB, 0x00727, 0x0080F, 0x009E7, - 0x00E7C, 0x01BF6, 0x01A89, 0x01001, 0x01BF7, 0x0089E, - 0x00E1A, 0x0027F, 0x00334, 0x00F35, 0x00F36, 0x01BF5, - 0x01F9B, 0x013A5, 0x00E7A, 0x0095D, 0x00D58, 0x00E7B, - 0x01A88, 0x00FE4, 0x006CE, 0x0040E, 0x00687, 0x006D2, - 0x00E1C, 0x00706, 0x00747, 0x006B6, 0x0084E, 0x00CF2, - 0x006F2, 0x00D59, 0x00CF3, 0x01004, 0x013A6, 0x00F71, - 0x01A8B, 0x01E99, 0x00D5A, 0x00D94, 0x00335, 0x0022E, - 0x0095E, 0x00E1B, 0x01A8A, 0x01BF8, 0x01BF9, 0x01002, - 0x009F9, 0x00F70, 0x01003, 0x00773, 0x00F37, 0x00812, - 0x004D2, 0x004A3, 0x0089F, 0x013A9, 0x013AA, 0x00813, - 0x0081E, 0x00707, 0x008A0, 0x00E1E, 0x00D95, 0x008F2, - 0x009FB, 0x00E7D, 0x00E7E, 0x00F39, 0x01F9C, 0x00CF4, - 0x00F75, 0x00346, 0x0026E, 0x01005, 0x00F72, 0x013A7, - 0x0111E, 0x01BFA, 0x00F73, 0x013A8, 0x00F38, 0x00F74, - 0x009FA, 0x00FE5, 0x0084F, 0x0095F, 0x00E1D, 0x009EA, - 0x01A8D, 0x00E20, 0x00E21, 0x007CE, 0x00D96, 0x01008, - 0x00E22, 0x00960, 0x01121, 0x00E7F, 0x01122, 0x01A8E, - 0x01BFB, 0x01A8F, 0x008A1, 0x01009, 0x0035F, 0x00368, - 0x013B2, 0x01A8C, 0x01F9D, 0x02201, 0x01006, 0x0111F, - 0x013AB, 0x013AC, 0x01120, 0x00F76, 0x01007, 0x009FC, - 0x008F3, 0x00E1F, 0x01E9A, 0x01F9F, 0x013B3, 0x00F3B, - 0x00F77, 0x00F78, 0x00FE7, 0x009FD, 0x00FE8, 0x01123, - 0x00D97, 0x01BFF, 0x00E80, 0x01A93, 0x01124, 0x00D9E, - 0x00D5B, 0x003DA, 0x003A7, 0x00961, 0x01BFC, 0x01F9E, - 0x01BFD, 0x01BFE, 0x01A90, 0x01A91, 0x013AD, 0x00F3A, - 0x01A92, 0x00FE6, 0x00962, 0x0085E, 0x00963, 0x013AE, - 0x03D06, 0x01C01, 0x013B5, 0x00965, 0x01FA2, 0x02202, - 0x009FE, 0x00F79, 0x00F7A, 0x00E23, 0x00E26, 0x00966, - 0x013B1, 0x01E9C, 0x00F7B, 0x008A2, 0x003FE, 0x003AB, - 0x00964, 0x013B4, 0x01C00, 0x01E9B, 0x01FA0, 0x01FA1, - 0x0100A, 0x013AF, 0x03F09, 0x00E81, 0x01A94, 0x01125, - 0x01126, 0x01A95, 0x013B0, 0x03D08, 0x01E9E, 0x01FA3, - 0x013B4, 0x01A99, 0x0100B, 0x013B9, 0x00F3E, 0x00967, - 0x00E27, 0x0100C, 0x01E9F, 0x00968, 0x01C05, 0x00F3F, - 0x00E82, 0x0039B, 0x00386, 0x01A96, 0x01C02, 0x03D07, - 0x013B6, 0x01C03, 0x01E9D, 0x01127, 0x01A97, 0x01C04, - 0x013B2, 0x013B3, 0x013B7, 0x01A98, 0x013B8, 0x03F0A, - 0x0E57A, 0x07A03, 0x013BB, 0x01FA4, 0x01A9C, 0x01FA5, - 0x01FA6, 0x013BC, 0x0100D, 0x01FA7, 0x013B5, 0x0100E, - 0x01A9D, 0x0100F, 0x0096A, 0x01128, 0x00328, 0x003FF, - 0x00969, 0x01EA0, 0x01C06, 0x013BA, 0x01A9A, 0x034CF, - 0x00F7C, 0x02203, 0x034D2, 0x01EA1, 0x01C07, 0x02204, - 0x01A9B, 0x01EA2, 0x06982, 0x03D09, 0x0E57B, 0x01FA8, - 0x013C2, 0x013C3, 0x01129, 0x01FA9, 0x0112A, 0x01010, - 0x01FAA, 0x01EA6, 0x03F0F, 0x013B6, 0x00CF5, 0x0072A, - 0x00F7D, 0x00340, 0x0025F, 0x02205, 0x02206, 0x06983, - 0x01C08, 0x013BD, 0x013BE, 0x01EA3, 0x013BF, 0x034D3, - 0x01EA4, 0x02207, 0x01A9E, 0x01EA5, 0x03F0B, 0x03F0E, - 0x01AA2, 0x00E00, 0x00E3E, 0x00D9F, 0x00D5F, 0x00CF7, - 0x00CFE, 0x01011, 0x00E85, 0x00E01, 0x00E02, 0x0096B, - 0x00CFF, 0x00F92, 0x00D6E, 0x008CA, 0x00359, 0x00456, - 0x01CAE, 0x03D0A, 0x01A9F, 0x0112B, 0x00E83, 0x013B7, - 0x00F7E, 0x009FF, 0x00E84, 0x00FE9, 0x009EB, 0x00F7F, - 0x008A3, 0x00D5E, 0x00CF6, 0x0112E, 0x0112F, 0x01016, - 0x00F93, 0x01FAE, 0x00FEA, 0x00FEB, 0x009A6, 0x00E03, - 0x01C0A, 0x01017, 0x01C0B, 0x01FAF, 0x00F9E, 0x013BB, - 0x0196A, 0x0039C, 0x003F6, 0x0379A, 0x03D0B, 0x01FAB, - 0x01EA7, 0x013B8, 0x01012, 0x01AA3, 0x01C09, 0x013B9, - 0x01013, 0x00CB4, 0x00E86, 0x01F3E, 0x013BA, 0x00E87, - 0x007FB, 0x003CF, 0x0037A, 0x003AD, 0x00387, 0x0038A, - 0x003B5, 0x0039E, 0x0026F, 0x0038B, 0x00272, 0x0039F, - 0x00399, 0x0038E, 0x00252, 0x0039A, 0x00018, 0x0001B, - 0x003CE, 0x00457, 0x003E8, 0x0067E, 0x0041A, 0x003BE, - 0x003BF, 0x003EE, 0x00437, 0x0039D, 0x003AC, 0x00464, - 0x003C6, 0x003C7, 0x0041B, 0x007F6, 0x0042E, 0x0025C, - 0x0038C, 0x003BA, 0x003E9, 0x003EA, 0x00271, 0x003BB, - 0x0026A, 0x0025D, 0x0025E, 0x00389, 0x003EE, 0x004F4, - 0x00415, 0x0001A, 0x00017, 0x00388, 0x0038E, 0x003FC, - 0x00270, 0x00378, 0x0038A, 0x003AE, 0x003AA, 0x00398, - 0x003E8, 0x00358, 0x00414, 0x00384, 0x003B8, 0x006D3, - 0x01A6B, 0x00FEA, 0x01BCE, 0x009E4, 0x00E56, 0x01BCF, - 0x0131D, 0x009E5, 0x01BD8, 0x01BD9, 0x034C0, 0x01F86, - 0x01A6C, 0x01F3F, 0x065AC, 0x072BE, 0x00436, 0x0022C, - 0x009E0, 0x00F54, 0x009E2, 0x01104, 0x01105, 0x00FE8, - 0x009E3, 0x00FE9, 0x00F55, 0x0131C, 0x01A68, 0x01A6A, - 0x00E06, 0x01106, 0x01BCC, 0x00E6E, 0x00E3F, 0x00CB7, - 0x00F28, 0x00702, 0x0094E, 0x00F29, 0x00FEC, 0x00F2A, - 0x0131E, 0x00F56, 0x0131F, 0x00F57, 0x0110A, 0x0134E, - 0x01E86, 0x00712, 0x001F6, 0x0081F, 0x00D6F, 0x00FEB, - 0x01107, 0x00CB6, 0x0094C, 0x01BDA, 0x01108, 0x01109, - 0x009E6, 0x00E6C, 0x01F88, 0x00E6D, 0x00896, 0x0094D, - 0x03F00, 0x01E88, 0x0217C, 0x03F01, 0x03F02, 0x01399, - 0x01E89, 0x0E578, 0x0139A, 0x01E8A, 0x01F8A, 0x01F8B, - 0x01E8B, 0x03D02, 0x01F8C, 0x0139B, 0x00392, 0x0035E, - 0x00F58, 0x009DE, 0x0094F, 0x01358, 0x01359, 0x0135A, - 0x0134F, 0x01BDB, 0x0135B, 0x0379B, 0x01F89, 0x01398, - 0x034C2, 0x065AD, 0x01E87, 0x03F04, 0x07A00, 0x0217D, - 0x01A6D, 0x065AE, 0x01E8C, 0x0217E, 0x01BDD, 0x0135C, - 0x01A6E, 0x034C4, 0x01E8D, 0x03F05, 0x01E8E, 0x0217F, - 0x0139D, 0x003F7, 0x0032C, 0x034C3, 0x00E07, 0x0110B, - 0x009E7, 0x00F59, 0x03D03, 0x00D8A, 0x01F8D, 0x00E6F, - 0x00FED, 0x03F03, 0x00FEE, 0x01BDC, 0x0139C, 0x072BF, - 0x03F06, 0x021F2, 0x01A70, 0x021F3, 0x0135E, 0x0139E, - 0x01F8E, 0x01F8F, 0x0139F, 0x01E91, 0x013A0, 0x0135F, - 0x034C6, 0x0110E, 0x01A71, 0x021F4, 0x0026C, 0x00206, - 0x0110C, 0x009E8, 0x01BDE, 0x00F5A, 0x00FEF, 0x0135D, - 0x00FF0, 0x01E8F, 0x021F0, 0x009E9, 0x01E90, 0x021F1, - 0x01A6F, 0x0110D, 0x034C5, 0x021F5, 0x01A73, 0x01BE2, - 0x01BE3, 0x01F91, 0x01A74, 0x00E70, 0x021F6, 0x034C8, - 0x00FF3, 0x01F92, 0x013A1, 0x013A2, 0x013A3, 0x01A75, - 0x01372, 0x003BC, 0x00341, 0x034C7, 0x00950, 0x00FF1, - 0x00FF2, 0x009EA, 0x00F5B, 0x01370, 0x01BDF, 0x01371, - 0x01A72, 0x01BE0, 0x009EB, 0x01F90, 0x0110F, 0x01BE1, - 0x01E92, 0x013A6, 0x00D8B, 0x00FD8, 0x01BE5, 0x00FF4, - 0x00FF5, 0x01BE6, 0x013A7, 0x00F5F, 0x01BE7, 0x021F7, - 0x021F8, 0x034C9, 0x009EC, 0x013A8, 0x003EF, 0x00269, - 0x00CD8, 0x00FD6, 0x00F5C, 0x013A4, 0x00F5D, 0x00F2B, - 0x00E08, 0x01110, 0x01BE4, 0x00E09, 0x013A5, 0x00F2C, - 0x00898, 0x00F5E, 0x01A76, 0x013A9, 0x00D8C, 0x009DF, - 0x009E0, 0x00FF8, 0x00D8D, 0x01374, 0x01A78, 0x01112, - 0x01BE8, 0x01A79, 0x01F93, 0x01113, 0x01375, 0x00F61, - 0x01376, 0x00399, 0x0027C, 0x009ED, 0x00F60, 0x01373, - 0x01A77, 0x00951, 0x009EE, 0x00D50, 0x00CD9, 0x00FF6, - 0x00FD9, 0x00FF7, 0x00899, 0x007C8, 0x00D52, 0x01111, - 0x009EF, 0x007D3, 0x007D4, 0x0071E, 0x00CDB, 0x00746, - 0x00E0A, 0x00E0B, 0x021F9, 0x00FF9, 0x01A7A, 0x00952, - 0x013AB, 0x01377, 0x009F0, 0x01E93, 0x003AF, 0x0032E, - 0x009E1, 0x007CA, 0x013AA, 0x01114, 0x00F62, 0x00E71, - 0x008CB, 0x008CC, 0x0089A, 0x008CD, 0x00840, 0x00CDA, - 0x007D2, 0x009E2, 0x00E72, 0x00F63, 0x006D6, 0x00841, - 0x0079E, 0x00D53, 0x008CE, 0x00955, 0x00E0C, 0x0137A, - 0x00E74, 0x01115, 0x01F94, 0x01116, 0x01BEA, 0x00E0D, - 0x01A7B, 0x0038D, 0x0033E, 0x00CDC, 0x00D8E, 0x01BE9, - 0x01378, 0x01379, 0x00FDA, 0x00E73, 0x00953, 0x00954, - 0x009E3, 0x004D6, 0x007B7, 0x007BA, 0x007BB, 0x004A0, - 0x0089B, 0x006D7, 0x0047A, 0x00408, 0x007F7, 0x00E0E, - 0x009E4, 0x007D5, 0x00842, 0x00D90, 0x009F1, 0x034CA, - 0x01A7C, 0x01A7D, 0x00E0F, 0x01A7E, 0x00329, 0x0021E, - 0x00F64, 0x01117, 0x021FA, 0x01118, 0x013AC, 0x013AD, - 0x00D8F, 0x008CF, 0x008F0, 0x0071F, 0x004A1, 0x00686, - 0x00426, 0x00416, 0x007CB, 0x003D8, 0x00264, 0x00347, - 0x003DC, 0x004F6, 0x004D7, 0x00F2D, 0x00F65, 0x009F3, - 0x00FDB, 0x00E75, 0x009F4, 0x0137B, 0x013AE, 0x009E5, - 0x00E10, 0x0027E, 0x0020C, 0x00FFA, 0x00956, 0x01BEB, - 0x01E94, 0x01E95, 0x00D91, 0x009F2, 0x00D54, 0x007BC, - 0x007BD, 0x0040A, 0x00385, 0x0036A, 0x0022F, 0x0020E, - 0x000FC, 0x000F2, 0x001AE, 0x001C8, 0x0034A, 0x004F7, - 0x00452, 0x00CDE, 0x00843, 0x00E76, 0x00F2E, 0x00F67, - 0x0137C, 0x01A7F, 0x0080C, 0x00FDC, 0x0021A, 0x001FC, - 0x00E11, 0x009F5, 0x01BEC, 0x00F66, 0x013AF, 0x00CDD, - 0x00E12, 0x00D55, 0x00703, 0x0080A, 0x00394, 0x00265, - 0x001F6, 0x001B6, 0x0010C, 0x00078, 0x0004C, 0x000CC, - 0x001A4, 0x00212, 0x00396, 0x006C4, 0x0089C, 0x00CDF, - 0x01A80, 0x00F68, 0x00FFD, 0x0137D, 0x01F95, 0x00845, - 0x00E13, 0x00267, 0x00266, 0x00FFB, 0x009F6, 0x03D04, - 0x01BED, 0x01BEE, 0x034CB, 0x00FFC, 0x00844, 0x007D6, - 0x00704, 0x003C8, 0x0032A, 0x00130, 0x000CE, 0x00048, - 0x0000C, 0x00014, 0x0007A, 0x000F0, 0x001E6, 0x00417, - 0x004A2, 0x004B6, 0x00D92, 0x01A81, 0x009F7, 0x0137E, - 0x01E96, 0x03F07, 0x009E6, 0x00FDE, 0x003C9, 0x00268, - 0x00F2F, 0x00D56, 0x021FB, 0x034CC, 0x01BEF, 0x00F69, - 0x01119, 0x00F6A, 0x00FDD, 0x007FA, 0x003E6, 0x001E2, - 0x000EA, 0x00072, 0x00016, +static const uint16_t on2avc_cb12_syms[ON2AVC_CB_12_CODES] = { + 0x0000, 0xFD03, 0x09FE, 0xFBFF, 0xF701, 0xF7F8, 0x0606, 0xFBFC, 0x0904, + 0x08FF, 0xFB05, 0x0207, 0x04F6, 0x0AFA, 0x0801, 0xF703, 0xFD05, 0xF904, + 0xFAF6, 0xFA02, 0x03F9, 0xF7FD, 0xFBFD, 0x04FF, 0x03F7, 0x0502, 0x0208, + 0x0AFB, 0x0007, 0xF709, 0xF604, 0xFB0A, 0x0204, 0x05F6, 0x0507, 0x0706, + 0xFA00, 0xFE08, 0xFDFB, 0xFD07, 0xFE07, 0x0401, 0x0006, 0x0107, 0x05FA, + 0x0506, 0x0009, 0x0702, 0x0703, 0x05FD, 0x0909, 0xF707, 0xF702, 0xFDF7, + 0xFD09, 0xFFFA, 0xFF08, 0x02F6, 0x0903, 0x04FE, 0x0402, 0xF8F6, 0xFCF9, + 0xFC0A, 0x02F9, 0xFF05, 0x0701, 0x070A, 0x03FD, 0x0905, 0x08F8, 0xFAF9, + 0xF8FE, 0xFC04, 0xFC09, 0xFFF8, 0x09FC, 0x09FD, 0xF7FE, 0x07FF, 0x09F8, + 0xFB09, 0xFCFB, 0xF801, 0xFC01, 0x02F8, 0x0104, 0x03F8, 0x0106, 0x090A, + 0xF90A, 0xF608, 0xFCFE, 0x0504, 0xF7F6, 0x00FA, 0x0407, 0x06FB, 0x09F9, + 0x0A04, 0xFF0A, 0x04FB, 0xF803, 0x00FC, 0x0405, 0x0604, 0xF6FA, 0xF60A, + 0x0AF7, 0xF809, 0xF901, 0xFF07, 0x04FA, 0xFBFB, 0x0707, 0x0A06, 0x0206, + 0x0509, 0xFC02, 0x0906, 0x0A07, 0x0607, 0x03FF, 0x01FC, 0x08FE, 0xF8FF, + 0xFCF7, 0x08F7, 0x0A0A, 0xFB00, 0xFB03, 0xFDFA, 0x01F6, 0x0802, 0x0505, + 0x0601, 0x0803, 0xFE04, 0x0103, 0xF7FC, 0xFAF7, 0xFA01, 0x00F7, 0x01FD, + 0xFFFC, 0x0309, 0x05FC, 0xFD01, 0xF8FD, 0x08FB, 0xF80A, 0xF70A, 0x0AF6, + 0x07FA, 0x0AF8, 0xFEFE, 0xFFFD, 0xF6F6, 0xF902, 0xF909, 0xFBF6, 0xF705, + 0xFEF6, 0xFD02, 0x0308, 0x0602, 0x0603, 0x0301, 0x02FC, 0x010A, 0xF6F9, + 0xF905, 0x0202, 0xFF04, 0xFAFE, 0xF906, 0x01F9, 0xFCFF, 0xFA08, 0xFC05, + 0xFDF8, 0x06FE, 0x07FB, 0x05F9, 0xFD08, 0x0408, 0xFAFF, 0xFE0A, 0x00FB, + 0x04F7, 0x0108, 0x0409, 0x0705, 0x0A09, 0x0800, 0xF6FF, 0x07F8, 0x0709, + 0xF601, 0xF7F9, 0xFE06, 0x0302, 0xFEFC, 0x01FA, 0x0AFF, 0x02FE, 0xFDFF, + 0x02F7, 0xF7F7, 0xFDF6, 0x01FF, 0xF8FC, 0xFEFA, 0x0A05, 0xF606, 0xFDFC, + 0xFFF6, 0x08FA, 0xFDFE, 0xFCFD, 0x0205, 0xFE02, 0x08FD, 0xF603, 0xF903, + 0x06F6, 0x0508, 0x02FA, 0x0900, 0xF704, 0xFB04, 0xFCF6, 0xFD06, 0xFD04, + 0x0403, 0xFEFD, 0x02FD, 0xFF03, 0x0A01, 0xF9FD, 0x09F6, 0x08F6, 0xF900, + 0xFA0A, 0x04F9, 0x06FA, 0xF807, 0xFBF7, 0x00F6, 0x0AFD, 0xFBF8, 0x0404, + 0x0101, 0xFFFF, 0xFF01, 0x03FE, 0x0008, 0x020A, 0x080A, 0xF6F7, 0x06F7, + 0x06F8, 0xF7FB, 0xF607, 0x0600, 0xFAFB, 0xFAFC, 0x03F6, 0x05F7, 0x0209, + 0x0304, 0x04FD, 0x0609, 0xFAFD, 0x0306, 0x0605, 0x0704, 0x08F9, 0x0804, + 0xF9F6, 0xFB07, 0x06F9, 0x07FD, 0xFA03, 0x0AF9, 0x0A08, 0x0005, 0x0AFE, + 0xF805, 0xFE09, 0xFE03, 0xFC00, 0xFC08, 0x0501, 0xF9F7, 0xFA09, 0xFCFA, + 0xFDF9, 0xFF06, 0x0AFC, 0xFAF8, 0xF6FD, 0xFA06, 0x0700, 0xFB02, 0xF9FB, + 0x000A, 0x02FF, 0x00FD, 0x0203, 0xF804, 0x06FD, 0xF602, 0xFEF7, 0xFE05, + 0xFEFF, 0x0201, 0xFF02, 0xFC03, 0xF9FF, 0xFBFA, 0x02FB, 0x0400, 0x05FE, + 0x08FC, 0x0902, 0x040A, 0xF609, 0xF907, 0x01FE, 0x0002, 0xFE00, 0xFFFE, + 0x00FE, 0x0608, 0xF908, 0x07FC, 0x09F7, 0xF800, 0xFEF9, 0x0A02, 0xF8F9, + 0xF808, 0xFA05, 0xFB01, 0x03FA, 0x0907, 0xFE01, 0xFFF7, 0x01F7, 0x0109, + 0x04F8, 0x0003, 0xFCF8, 0xFCFC, 0x0200, 0x00F8, 0x0806, 0xFBFE, 0xF7FA, + 0xFD0A, 0xFEFB, 0x05FF, 0xF8FB, 0x0406, 0x07F6, 0x060A, 0x0102, 0x0105, + 0xF600, 0xF8F7, 0xF9F8, 0xF806, 0x06FC, 0xFD00, 0xFF09, 0x0805, 0x0809, + 0xF6FE, 0xF9FC, 0xFAFA, 0x0307, 0x0500, 0x07F7, 0x0908, 0xFEF8, 0x0503, + 0x0A00, 0xF605, 0xF8F8, 0xF8FA, 0xFB08, 0x05F8, 0x01F8, 0xFB06, 0xFFF9, + 0x030A, 0x05FB, 0xF7FF, 0x050A, 0x09FB, 0x0807, 0x0A03, 0xF6F8, 0xFA07, + 0x0303, 0x0004, 0xF6FB, 0xF9FE, 0x09FF, 0xFC07, 0x09FA, 0xFFFB, 0x04FC, + 0x0901, 0xF708, 0x07F9, 0x00F9, 0x01FB, 0xFA04, 0xFBF9, 0x03FB, 0x03FC, + 0x0708, 0x0808, 0x0300, 0xFDFD, 0x06FF, 0xF9F9, 0xF6FC, 0xF700, 0x0305, + 0xF802, 0xF706, 0xF9FA, 0xFC06, 0x07FE, 0x0001, 0x0100, 0xFF00, 0x00FF, }; -static const uint8_t on2avc_cb15_bits[ON2AVC_CB15_CODES] = { - 2, 5, 7, 9, 10, 11, - 12, 12, 13, 14, 14, 14, - 16, 17, 12, 13, 11, 11, - 13, 13, 14, 14, 14, 13, - 13, 13, 12, 13, 12, 10, - 9, 7, 5, 5, 5, 7, - 9, 10, 11, 11, 12, 13, - 13, 13, 13, 14, 14, 12, - 13, 10, 11, 13, 12, 16, - 15, 14, 13, 12, 12, 12, - 12, 11, 10, 9, 7, 5, - 7, 8, 8, 9, 10, 11, - 12, 12, 13, 13, 13, 13, - 13, 14, 13, 12, 10, 10, - 12, 12, 13, 13, 15, 13, - 13, 12, 12, 11, 11, 10, - 9, 8, 7, 9, 9, 9, - 9, 10, 11, 11, 12, 12, - 12, 13, 13, 13, 14, 13, - 13, 10, 10, 12, 12, 14, - 13, 13, 12, 12, 12, 12, - 11, 11, 10, 10, 9, 9, - 10, 10, 10, 10, 10, 11, - 12, 12, 12, 13, 13, 12, - 13, 13, 13, 13, 10, 10, - 12, 13, 13, 13, 13, 13, - 13, 12, 12, 12, 11, 11, - 10, 10, 10, 12, 11, 11, - 11, 11, 11, 12, 12, 12, - 13, 13, 13, 13, 13, 12, - 12, 10, 10, 12, 12, 13, - 13, 13, 13, 13, 12, 13, - 13, 12, 11, 11, 11, 11, - 12, 12, 12, 11, 12, 12, - 11, 12, 12, 13, 13, 13, - 13, 14, 12, 12, 10, 10, - 13, 12, 13, 13, 13, 13, - 13, 13, 13, 12, 12, 12, - 12, 12, 12, 13, 13, 12, - 12, 12, 12, 12, 12, 12, - 13, 13, 13, 12, 13, 12, - 13, 10, 11, 13, 13, 13, - 13, 13, 13, 13, 12, 13, - 13, 12, 12, 13, 12, 12, - 13, 12, 12, 12, 12, 13, - 12, 13, 13, 13, 13, 13, - 13, 13, 12, 13, 10, 10, - 14, 13, 13, 14, 13, 13, - 13, 13, 13, 13, 13, 13, - 12, 12, 14, 13, 14, 12, - 13, 13, 12, 13, 12, 13, - 12, 13, 13, 13, 13, 12, - 12, 10, 11, 13, 13, 13, - 13, 13, 13, 13, 13, 12, - 13, 12, 13, 12, 13, 13, - 15, 13, 14, 13, 13, 14, - 13, 13, 13, 12, 12, 13, - 13, 14, 13, 12, 10, 10, - 13, 14, 13, 14, 13, 13, - 13, 13, 14, 13, 13, 13, - 13, 13, 13, 15, 14, 13, - 13, 13, 13, 14, 12, 13, - 12, 13, 14, 13, 13, 12, - 13, 10, 11, 13, 13, 15, - 14, 13, 14, 13, 13, 13, - 13, 13, 14, 13, 14, 14, - 17, 16, 14, 13, 13, 13, - 13, 14, 13, 13, 13, 13, - 13, 13, 13, 13, 10, 10, - 13, 14, 13, 14, 13, 14, - 13, 14, 14, 14, 13, 14, - 13, 14, 15, 15, 17, 13, - 14, 14, 13, 13, 13, 13, - 13, 14, 14, 13, 12, 12, - 13, 10, 11, 14, 14, 15, - 13, 14, 14, 14, 14, 14, - 14, 14, 13, 14, 14, 14, - 13, 13, 12, 12, 12, 12, - 12, 13, 13, 13, 13, 13, - 12, 13, 12, 12, 10, 11, - 14, 15, 13, 13, 13, 13, - 13, 13, 13, 12, 12, 13, - 12, 12, 12, 13, 13, 13, - 13, 13, 12, 12, 13, 13, - 13, 13, 13, 13, 13, 13, - 13, 10, 11, 14, 15, 13, - 14, 13, 13, 13, 13, 13, - 13, 12, 13, 14, 13, 13, - 11, 11, 10, 10, 11, 11, - 11, 10, 11, 11, 11, 10, - 11, 11, 11, 11, 5, 6, - 11, 11, 11, 11, 11, 11, - 11, 10, 11, 10, 10, 11, - 11, 11, 11, 11, 11, 11, - 10, 11, 10, 10, 11, 11, - 11, 11, 11, 11, 11, 11, - 11, 6, 5, 11, 10, 10, - 11, 10, 10, 10, 10, 10, - 10, 10, 11, 11, 11, 11, - 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 14, 13, - 13, 14, 15, 16, 11, 10, - 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, - 12, 13, 13, 13, 12, 12, - 12, 12, 13, 12, 13, 12, - 13, 13, 13, 13, 13, 14, - 14, 11, 10, 12, 12, 13, - 13, 12, 13, 13, 13, 13, - 13, 13, 13, 13, 12, 13, - 14, 14, 14, 14, 14, 14, - 14, 17, 14, 14, 13, 13, - 14, 15, 13, 14, 11, 10, - 13, 12, 13, 13, 13, 13, - 14, 13, 13, 14, 13, 14, - 14, 15, 14, 14, 16, 14, - 13, 15, 14, 14, 13, 13, - 13, 14, 14, 14, 14, 14, - 14, 11, 10, 14, 12, 13, - 13, 13, 15, 12, 13, 13, - 13, 14, 13, 13, 14, 16, - 14, 14, 13, 14, 13, 14, - 13, 13, 14, 14, 14, 13, - 14, 13, 13, 14, 11, 10, - 13, 13, 13, 13, 13, 13, - 13, 14, 14, 13, 14, 14, - 13, 13, 14, 14, 13, 13, - 13, 13, 13, 13, 14, 14, - 13, 13, 14, 14, 14, 13, - 13, 11, 10, 14, 13, 13, - 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, - 14, 14, 12, 12, 13, 13, - 13, 13, 14, 13, 13, 14, - 14, 14, 13, 14, 10, 10, - 12, 12, 13, 14, 13, 12, - 12, 13, 13, 12, 14, 12, - 12, 13, 13, 14, 12, 12, - 12, 13, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, - 13, 10, 10, 13, 13, 13, - 13, 13, 13, 12, 12, 13, - 12, 13, 12, 12, 12, 13, - 13, 12, 12, 12, 12, 12, - 12, 12, 14, 13, 13, 13, - 14, 13, 13, 14, 10, 10, - 12, 12, 14, 13, 13, 13, - 12, 12, 12, 12, 12, 12, - 12, 12, 13, 13, 11, 12, - 11, 12, 12, 13, 12, 13, - 13, 13, 13, 13, 13, 12, - 13, 10, 10, 12, 12, 13, - 13, 13, 12, 13, 13, 13, - 12, 12, 11, 11, 11, 12, - 12, 11, 11, 11, 11, 12, - 12, 12, 12, 12, 13, 14, - 13, 13, 12, 13, 10, 10, - 13, 13, 14, 13, 14, 14, - 12, 12, 12, 12, 12, 11, - 11, 11, 12, 10, 10, 10, - 10, 11, 12, 12, 13, 13, - 12, 13, 13, 13, 14, 12, - 12, 10, 10, 13, 13, 13, - 14, 14, 12, 13, 12, 11, - 11, 11, 11, 10, 10, 10, - 9, 9, 9, 10, 10, 11, - 11, 12, 12, 13, 12, 13, - 13, 13, 12, 12, 10, 10, - 12, 13, 13, 13, 14, 12, - 12, 12, 12, 12, 11, 10, - 9, 9, 9, 7, 8, 8, - 9, 10, 11, 11, 12, 12, - 13, 13, 13, 13, 13, 12, - 12, 10, 10, 13, 13, 15, - 13, 13, 14, 13, 12, 12, - 12, 10, 10, 9, 8, 8, - 5, 5, 7, 9, 10, 11, - 12, 12, 12, 13, 13, 13, - 14, 14, 12, 12, 10, 11, - 12, 12, 14, 14, 13, 13, - 13, 13, 12, 11, 11, 10, - 9, 7, 5, +static const uint16_t on2avc_cb13_syms[ON2AVC_CB_13_CODES] = { + 0x0000, 0x0201, 0xFDFF, 0x03FE, 0x0302, 0xF909, 0xF90A, 0xFA00, 0xFA0A, + 0x00F7, 0x08F6, 0x09F6, 0x09F8, 0x0901, 0x0AF7, 0x0A03, 0x0BF4, 0xF6F7, + 0xF6FB, 0xF6FF, 0xF600, 0xF706, 0xF801, 0xF806, 0xF808, 0xFDF6, 0xFF09, + 0xFF0A, 0x00F8, 0x0109, 0x02F7, 0x04F7, 0x05F7, 0x05F8, 0x06F7, 0x07F7, + 0x09FA, 0x09FD, 0x0AFB, 0xF6FC, 0x0AFC, 0x0AFD, 0xF60C, 0xF7FF, 0xF8F9, + 0xFA08, 0xFB07, 0xFCF9, 0xFD08, 0x00F9, 0x0208, 0x0409, 0x05FA, 0x05FB, + 0x06FB, 0x0603, 0x060A, 0x0704, 0x0707, 0x0AF5, 0x0A09, 0x0CF5, 0xF4F8, + 0xF5F9, 0x0202, 0xF508, 0xF509, 0xFC0C, 0x0408, 0x0BFC, 0x05FF, 0x0B0A, + 0xFEFF, 0xFEFE, 0xFFFD, 0xFDFD, 0x0CFC, 0xF404, 0xFE00, 0x00FE, 0xFF02, + 0xF506, 0xF507, 0xF7F4, 0xFA01, 0xFB04, 0xFC05, 0x000C, 0x0105, 0x0106, + 0x04FB, 0x05FD, 0x0505, 0x0506, 0x0605, 0x060C, 0x070C, 0xFDFC, 0x0BF8, + 0x0CFB, 0xFE06, 0x0502, 0xFE03, 0xFD03, 0x0C09, 0xF40C, 0xF6F9, 0xFEF5, + 0xFFF4, 0x020C, 0x04F5, 0x0B02, 0xF7F9, 0xF701, 0xF70C, 0xF8FA, 0xF9FD, + 0xF903, 0xFBF7, 0xFC07, 0xFDF8, 0x0108, 0x02F6, 0x0209, 0xFE01, 0x02FF, + 0x0002, 0x020A, 0x03F8, 0x050A, 0x06F8, 0x07FA, 0x07FC, 0x08F7, 0x08FF, + 0xF406, 0xF80C, 0xFA05, 0xFBFF, 0xFE07, 0x0207, 0x06F4, 0x06FE, 0x0601, + 0x0607, 0x07F4, 0x0706, 0xFF00, 0x01FE, 0xF5FB, 0x080C, 0x0CFA, 0xFAF5, + 0x03FC, 0x030B, 0x0B03, 0xF504, 0x0C00, 0x0A08, 0xF601, 0x0CF4, 0xF609, + 0xF60A, 0xFD01, 0xFBF5, 0xFB02, 0xFF03, 0xF5FA, 0xF9F4, 0xF902, 0xF90C, + 0xFBF9, 0xFBFA, 0xFEF8, 0xFFFB, 0xFF06, 0x0306, 0x0405, 0x050C, 0x03FF, + 0xF5FD, 0x0403, 0x0102, 0xFFFE, 0xF401, 0xFBFE, 0x01F4, 0x02FB, 0xF605, + 0xF80A, 0xF9F7, 0xF908, 0xFA07, 0xFBF6, 0xFB08, 0xFB0A, 0xFC09, 0xFD0A, + 0x010A, 0x040A, 0x08FA, 0x0800, 0x09FB, 0x09FC, 0xF4F4, 0x0900, 0x0A00, + 0xF4F5, 0xF6F8, 0xF7F8, 0xF7FA, 0xF9FF, 0xFB05, 0x00FA, 0x0007, 0x01F8, + 0x04F9, 0x0600, 0x07F8, 0x07FF, 0x08FD, 0x0808, 0x09F9, 0x0BF5, 0x0CF8, + 0xF40A, 0xF8FE, 0xFAFD, 0xFA0C, 0xFEFA, 0x0004, 0x05FC, 0x0507, 0x090B, + 0x0C06, 0x00FF, 0x0001, 0x0100, 0xF4FD, 0xF505, 0xF9F5, 0xFC03, 0x0103, + 0x00F5, 0x01FC, 0x050B, 0xF4FF, 0xFE05, 0xFF04, 0xFD02, 0x0B05, 0xF4F9, + 0xF5F6, 0xF50B, 0xF9FC, 0xF906, 0xFD04, 0xFE08, 0x0508, 0x090A, 0x0BF7, + 0x0B0B, 0x0B0C, 0x0CF9, 0x0C08, 0xFA0B, 0xFCF5, 0xFCFD, 0x000B, 0x0B04, + 0x0CFF, 0x02FD, 0x0C01, 0xF500, 0xFBFB, 0x060B, 0x0BFB, 0x0B09, 0xFDFE, + 0x0C03, 0xF6FA, 0x0A02, 0xF708, 0x0AF6, 0x0AF8, 0x0A01, 0xF602, 0xF7FB, + 0x01FD, 0x0203, 0xF702, 0xF8FF, 0xF800, 0xF802, 0xF805, 0xF905, 0xF907, + 0xFAF6, 0xFAF7, 0xFCF6, 0xFD09, 0x03F7, 0x06FD, 0x08FC, 0x0806, 0x09F4, + 0x0903, 0x0908, 0x0AF9, 0x0AFE, 0x0AFF, 0x0A04, 0x0A05, 0x0A06, 0xF4FB, + 0x0A0A, 0x0C0C, 0xF9FB, 0xFA04, 0xFC04, 0xFEF7, 0xFFF8, 0xFFF9, 0x0005, + 0x02F8, 0x03FA, 0x0308, 0xF402, 0x0407, 0x0701, 0xF503, 0xFBFD, 0xFE0C, + 0x080B, 0x0BFD, 0x0B06, 0x0CFD, 0x0CFE, 0xFBFC, 0xFC01, 0xFEFB, 0xFF0C, + 0x04FF, 0x040C, 0x070B, 0x0BFA, 0x0B08, 0xF40B, 0xF803, 0xFE0B, 0xF9F9, + 0xF9FA, 0xF901, 0xFB06, 0xFEF9, 0xFFFA, 0x00FB, 0x0307, 0x0400, 0x08F4, + 0x08FB, 0x08FE, 0xF4FE, 0x0807, 0x09F5, 0xFCFF, 0x0205, 0xFF0B, 0x0501, + 0x0C0A, 0xF50C, 0xF700, 0xFB09, 0x000A, 0xF603, 0xF7FC, 0xFB03, 0xFB0C, + 0xFCFC, 0xFDF4, 0xFDFB, 0x0206, 0x03F5, 0x030C, 0x0602, 0x0B00, 0x0B07, + 0xF709, 0xF70A, 0xFFF6, 0x0009, 0x03F6, 0x04F6, 0x06F6, 0x07F6, 0xF7F6, + 0x07F9, 0x08F8, 0xF7F7, 0xF7FE, 0xF8F6, 0xFE0A, 0x00F6, 0x0008, 0x01F7, + 0x04F8, 0x0509, 0x06FA, 0x07FB, 0x0700, 0x0709, 0x08F9, 0x09F7, 0x09FE, + 0x09FF, 0x0902, 0xF407, 0xF6F4, 0xF6F6, 0xF8F8, 0xF8FC, 0xF80B, 0xFC06, + 0x0006, 0x01FA, 0x0107, 0x03F9, 0x0604, 0x0608, 0x0703, 0xF403, 0xF5F5, + 0xF6F5, 0xFBF4, 0x0300, 0xFFFC, 0xFF05, 0x0303, 0x08F5, 0x0AF4, 0x0904, + 0x0907, 0x0AFA, 0xF604, 0xF5F7, 0xFCFB, 0x0404, 0x0406, 0x05FE, 0x0606, + 0x0BF9, 0x0C02, 0x0402, 0xF4F6, 0xF60B, 0xF8F7, 0xFAF8, 0xFAF9, 0xFAFB, + 0xFAFF, 0xFBF8, 0xFDF7, 0xFFF7, 0x02F9, 0x0309, 0x04FA, 0x0609, 0x07FD, + 0x0804, 0xF8F5, 0x0809, 0x0A0C, 0xF9FE, 0xFAFC, 0xFAFE, 0xFC0B, 0x02FA, + 0x0305, 0x0503, 0x0504, 0xFD00, 0x07FE, 0x0A0B, 0xFD0B, 0x01F5, 0xF400, + 0x0BF6, 0xF6FE, 0xF606, 0xF5FC, 0xF7F5, 0xFA02, 0xFB01, 0xFB0B, 0x00F4, + 0xF502, 0x04FC, 0x05F4, 0x0003, 0xF5FF, 0xF501, 0x010B, 0xF7FD, 0xF704, + 0xF705, 0xF804, 0xF809, 0xF9F6, 0xF900, 0xFA09, 0xFC08, 0xFC0A, 0xFE09, + 0x01F6, 0x030A, 0x05F6, 0x06F9, 0x06FC, 0x070A, 0x0801, 0x0905, 0x0906, + 0xF4F7, 0x0909, 0x0A07, 0xF408, 0xF50A, 0xF8FB, 0xFCF7, 0x01FF, 0xFD06, + 0xFEF6, 0xFF07, 0x05F9, 0xF4FA, 0x0802, 0x0CF6, 0xFCF4, 0x010C, 0x02F4, + 0x03F4, 0x0304, 0x0401, 0x05F5, 0x07F5, 0xFCFE, 0xFDF5, 0x02FC, 0x04FE, + 0x020B, 0x0C04, 0x0CF7, 0x0C07, 0xF6FD, 0xF607, 0x040B, 0xF4FC, 0xF5F8, + 0xF90B, 0xFAF4, 0xFDFA, 0x01FB, 0xFEFC, 0x04F4, 0x04FD, 0xFE04, 0x0BFE, + 0xFFF5, 0x03FD, 0x0BFF, 0xF409, 0xF8F4, 0xF8FD, 0xF9F8, 0xF904, 0xFA06, + 0xFB00, 0xFCF8, 0xFDF9, 0xFD07, 0xFF08, 0x01F9, 0x0500, 0x0708, 0x0803, + 0x0805, 0xF405, 0x080A, 0x090C, 0xFC02, 0xFC00, 0xFD05, 0x0104, 0x02F5, + 0xFF01, 0x0101, 0xFFFF, 0x0200, 0x02FE, 0x0204, 0x0B01, 0x03FB, 0x0C0B, + 0xF608, 0xF703, 0xF707, 0xF807, 0xF5F4, 0xF70B, 0xFAFA, 0xFA03, 0xFCFA, + 0xFD0C, 0x00FC, 0x06F5, 0x06FF, 0x0702, 0xF5FE, 0x0705, 0x0C05, 0xFEF4, + 0x00FD, 0xFE02, 0xFEFD, 0x0301, }; -static const uint16_t on2avc_cb15_syms[ON2AVC_CB15_CODES] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, - 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x00F0, - 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, - 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, - 0x00FD, 0x00FE, 0x00FF, 0x0100, 0x0101, 0x0102, - 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0x0108, - 0x0109, 0x010A, 0x010B, 0x010C, 0x010D, 0x010E, - 0x010F, 0x0110, 0x01F0, 0x01F1, 0x01F2, 0x01F3, - 0x01F4, 0x01F5, 0x01F6, 0x01F7, 0x01F8, 0x01F9, - 0x01FA, 0x01FB, 0x01FC, 0x01FD, 0x01FE, 0x01FF, - 0x0200, 0x0201, 0x0202, 0x0203, 0x0204, 0x0205, - 0x0206, 0x0207, 0x0208, 0x0209, 0x020A, 0x020B, - 0x020C, 0x020D, 0x020E, 0x020F, 0x0210, 0x02F0, - 0x02F1, 0x02F2, 0x02F3, 0x02F4, 0x02F5, 0x02F6, - 0x02F7, 0x02F8, 0x02F9, 0x02FA, 0x02FB, 0x02FC, - 0x02FD, 0x02FE, 0x02FF, 0x0300, 0x0301, 0x0302, - 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, 0x0308, - 0x0309, 0x030A, 0x030B, 0x030C, 0x030D, 0x030E, - 0x030F, 0x0310, 0x03F0, 0x03F1, 0x03F2, 0x03F3, - 0x03F4, 0x03F5, 0x03F6, 0x03F7, 0x03F8, 0x03F9, - 0x03FA, 0x03FB, 0x03FC, 0x03FD, 0x03FE, 0x03FF, - 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, - 0x0406, 0x0407, 0x0408, 0x0409, 0x040A, 0x040B, - 0x040C, 0x040D, 0x040E, 0x040F, 0x0410, 0x04F0, - 0x04F1, 0x04F2, 0x04F3, 0x04F4, 0x04F5, 0x04F6, - 0x04F7, 0x04F8, 0x04F9, 0x04FA, 0x04FB, 0x04FC, - 0x04FD, 0x04FE, 0x04FF, 0x0500, 0x0501, 0x0502, - 0x0503, 0x0504, 0x0505, 0x0506, 0x0507, 0x0508, - 0x0509, 0x050A, 0x050B, 0x050C, 0x050D, 0x050E, - 0x050F, 0x0510, 0x05F0, 0x05F1, 0x05F2, 0x05F3, - 0x05F4, 0x05F5, 0x05F6, 0x05F7, 0x05F8, 0x05F9, - 0x05FA, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF, - 0x0600, 0x0601, 0x0602, 0x0603, 0x0604, 0x0605, - 0x0606, 0x0607, 0x0608, 0x0609, 0x060A, 0x060B, - 0x060C, 0x060D, 0x060E, 0x060F, 0x0610, 0x06F0, - 0x06F1, 0x06F2, 0x06F3, 0x06F4, 0x06F5, 0x06F6, - 0x06F7, 0x06F8, 0x06F9, 0x06FA, 0x06FB, 0x06FC, - 0x06FD, 0x06FE, 0x06FF, 0x0700, 0x0701, 0x0702, - 0x0703, 0x0704, 0x0705, 0x0706, 0x0707, 0x0708, - 0x0709, 0x070A, 0x070B, 0x070C, 0x070D, 0x070E, - 0x070F, 0x0710, 0x07F0, 0x07F1, 0x07F2, 0x07F3, - 0x07F4, 0x07F5, 0x07F6, 0x07F7, 0x07F8, 0x07F9, - 0x07FA, 0x07FB, 0x07FC, 0x07FD, 0x07FE, 0x07FF, - 0x0800, 0x0801, 0x0802, 0x0803, 0x0804, 0x0805, - 0x0806, 0x0807, 0x0808, 0x0809, 0x080A, 0x080B, - 0x080C, 0x080D, 0x080E, 0x080F, 0x0810, 0x08F0, - 0x08F1, 0x08F2, 0x08F3, 0x08F4, 0x08F5, 0x08F6, - 0x08F7, 0x08F8, 0x08F9, 0x08FA, 0x08FB, 0x08FC, - 0x08FD, 0x08FE, 0x08FF, 0x0900, 0x0901, 0x0902, - 0x0903, 0x0904, 0x0905, 0x0906, 0x0907, 0x0908, - 0x0909, 0x090A, 0x090B, 0x090C, 0x090D, 0x090E, - 0x090F, 0x0910, 0x09F0, 0x09F1, 0x09F2, 0x09F3, - 0x09F4, 0x09F5, 0x09F6, 0x09F7, 0x09F8, 0x09F9, - 0x09FA, 0x09FB, 0x09FC, 0x09FD, 0x09FE, 0x09FF, - 0x0A00, 0x0A01, 0x0A02, 0x0A03, 0x0A04, 0x0A05, - 0x0A06, 0x0A07, 0x0A08, 0x0A09, 0x0A0A, 0x0A0B, - 0x0A0C, 0x0A0D, 0x0A0E, 0x0A0F, 0x0A10, 0x0AF0, - 0x0AF1, 0x0AF2, 0x0AF3, 0x0AF4, 0x0AF5, 0x0AF6, - 0x0AF7, 0x0AF8, 0x0AF9, 0x0AFA, 0x0AFB, 0x0AFC, - 0x0AFD, 0x0AFE, 0x0AFF, 0x0B00, 0x0B01, 0x0B02, - 0x0B03, 0x0B04, 0x0B05, 0x0B06, 0x0B07, 0x0B08, - 0x0B09, 0x0B0A, 0x0B0B, 0x0B0C, 0x0B0D, 0x0B0E, - 0x0B0F, 0x0B10, 0x0BF0, 0x0BF1, 0x0BF2, 0x0BF3, - 0x0BF4, 0x0BF5, 0x0BF6, 0x0BF7, 0x0BF8, 0x0BF9, - 0x0BFA, 0x0BFB, 0x0BFC, 0x0BFD, 0x0BFE, 0x0BFF, - 0x0C00, 0x0C01, 0x0C02, 0x0C03, 0x0C04, 0x0C05, - 0x0C06, 0x0C07, 0x0C08, 0x0C09, 0x0C0A, 0x0C0B, - 0x0C0C, 0x0C0D, 0x0C0E, 0x0C0F, 0x0C10, 0x0CF0, - 0x0CF1, 0x0CF2, 0x0CF3, 0x0CF4, 0x0CF5, 0x0CF6, - 0x0CF7, 0x0CF8, 0x0CF9, 0x0CFA, 0x0CFB, 0x0CFC, - 0x0CFD, 0x0CFE, 0x0CFF, 0x0D00, 0x0D01, 0x0D02, - 0x0D03, 0x0D04, 0x0D05, 0x0D06, 0x0D07, 0x0D08, - 0x0D09, 0x0D0A, 0x0D0B, 0x0D0C, 0x0D0D, 0x0D0E, - 0x0D0F, 0x0D10, 0x0DF0, 0x0DF1, 0x0DF2, 0x0DF3, - 0x0DF4, 0x0DF5, 0x0DF6, 0x0DF7, 0x0DF8, 0x0DF9, - 0x0DFA, 0x0DFB, 0x0DFC, 0x0DFD, 0x0DFE, 0x0DFF, - 0x0E00, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, - 0x0E06, 0x0E07, 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, - 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F, 0x0E10, 0x0EF0, - 0x0EF1, 0x0EF2, 0x0EF3, 0x0EF4, 0x0EF5, 0x0EF6, - 0x0EF7, 0x0EF8, 0x0EF9, 0x0EFA, 0x0EFB, 0x0EFC, - 0x0EFD, 0x0EFE, 0x0EFF, 0x0F00, 0x0F01, 0x0F02, - 0x0F03, 0x0F04, 0x0F05, 0x0F06, 0x0F07, 0x0F08, - 0x0F09, 0x0F0A, 0x0F0B, 0x0F0C, 0x0F0D, 0x0F0E, - 0x0F0F, 0x0F10, 0x0FF0, 0x0FF1, 0x0FF2, 0x0FF3, - 0x0FF4, 0x0FF5, 0x0FF6, 0x0FF7, 0x0FF8, 0x0FF9, - 0x0FFA, 0x0FFB, 0x0FFC, 0x0FFD, 0x0FFE, 0x0FFF, - 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, - 0x1006, 0x1007, 0x1008, 0x1009, 0x100A, 0x100B, - 0x100C, 0x100D, 0x100E, 0x100F, 0x1010, 0x10F0, - 0x10F1, 0x10F2, 0x10F3, 0x10F4, 0x10F5, 0x10F6, - 0x10F7, 0x10F8, 0x10F9, 0x10FA, 0x10FB, 0x10FC, - 0x10FD, 0x10FE, 0x10FF, 0xF000, 0xF001, 0xF002, - 0xF003, 0xF004, 0xF005, 0xF006, 0xF007, 0xF008, - 0xF009, 0xF00A, 0xF00B, 0xF00C, 0xF00D, 0xF00E, - 0xF00F, 0xF010, 0xF0F0, 0xF0F1, 0xF0F2, 0xF0F3, - 0xF0F4, 0xF0F5, 0xF0F6, 0xF0F7, 0xF0F8, 0xF0F9, - 0xF0FA, 0xF0FB, 0xF0FC, 0xF0FD, 0xF0FE, 0xF0FF, - 0xF100, 0xF101, 0xF102, 0xF103, 0xF104, 0xF105, - 0xF106, 0xF107, 0xF108, 0xF109, 0xF10A, 0xF10B, - 0xF10C, 0xF10D, 0xF10E, 0xF10F, 0xF110, 0xF1F0, - 0xF1F1, 0xF1F2, 0xF1F3, 0xF1F4, 0xF1F5, 0xF1F6, - 0xF1F7, 0xF1F8, 0xF1F9, 0xF1FA, 0xF1FB, 0xF1FC, - 0xF1FD, 0xF1FE, 0xF1FF, 0xF200, 0xF201, 0xF202, - 0xF203, 0xF204, 0xF205, 0xF206, 0xF207, 0xF208, - 0xF209, 0xF20A, 0xF20B, 0xF20C, 0xF20D, 0xF20E, - 0xF20F, 0xF210, 0xF2F0, 0xF2F1, 0xF2F2, 0xF2F3, - 0xF2F4, 0xF2F5, 0xF2F6, 0xF2F7, 0xF2F8, 0xF2F9, - 0xF2FA, 0xF2FB, 0xF2FC, 0xF2FD, 0xF2FE, 0xF2FF, - 0xF300, 0xF301, 0xF302, 0xF303, 0xF304, 0xF305, - 0xF306, 0xF307, 0xF308, 0xF309, 0xF30A, 0xF30B, - 0xF30C, 0xF30D, 0xF30E, 0xF30F, 0xF310, 0xF3F0, - 0xF3F1, 0xF3F2, 0xF3F3, 0xF3F4, 0xF3F5, 0xF3F6, - 0xF3F7, 0xF3F8, 0xF3F9, 0xF3FA, 0xF3FB, 0xF3FC, - 0xF3FD, 0xF3FE, 0xF3FF, 0xF400, 0xF401, 0xF402, - 0xF403, 0xF404, 0xF405, 0xF406, 0xF407, 0xF408, - 0xF409, 0xF40A, 0xF40B, 0xF40C, 0xF40D, 0xF40E, - 0xF40F, 0xF410, 0xF4F0, 0xF4F1, 0xF4F2, 0xF4F3, - 0xF4F4, 0xF4F5, 0xF4F6, 0xF4F7, 0xF4F8, 0xF4F9, - 0xF4FA, 0xF4FB, 0xF4FC, 0xF4FD, 0xF4FE, 0xF4FF, - 0xF500, 0xF501, 0xF502, 0xF503, 0xF504, 0xF505, - 0xF506, 0xF507, 0xF508, 0xF509, 0xF50A, 0xF50B, - 0xF50C, 0xF50D, 0xF50E, 0xF50F, 0xF510, 0xF5F0, - 0xF5F1, 0xF5F2, 0xF5F3, 0xF5F4, 0xF5F5, 0xF5F6, - 0xF5F7, 0xF5F8, 0xF5F9, 0xF5FA, 0xF5FB, 0xF5FC, - 0xF5FD, 0xF5FE, 0xF5FF, 0xF600, 0xF601, 0xF602, - 0xF603, 0xF604, 0xF605, 0xF606, 0xF607, 0xF608, - 0xF609, 0xF60A, 0xF60B, 0xF60C, 0xF60D, 0xF60E, - 0xF60F, 0xF610, 0xF6F0, 0xF6F1, 0xF6F2, 0xF6F3, - 0xF6F4, 0xF6F5, 0xF6F6, 0xF6F7, 0xF6F8, 0xF6F9, - 0xF6FA, 0xF6FB, 0xF6FC, 0xF6FD, 0xF6FE, 0xF6FF, - 0xF700, 0xF701, 0xF702, 0xF703, 0xF704, 0xF705, - 0xF706, 0xF707, 0xF708, 0xF709, 0xF70A, 0xF70B, - 0xF70C, 0xF70D, 0xF70E, 0xF70F, 0xF710, 0xF7F0, - 0xF7F1, 0xF7F2, 0xF7F3, 0xF7F4, 0xF7F5, 0xF7F6, - 0xF7F7, 0xF7F8, 0xF7F9, 0xF7FA, 0xF7FB, 0xF7FC, - 0xF7FD, 0xF7FE, 0xF7FF, 0xF800, 0xF801, 0xF802, - 0xF803, 0xF804, 0xF805, 0xF806, 0xF807, 0xF808, - 0xF809, 0xF80A, 0xF80B, 0xF80C, 0xF80D, 0xF80E, - 0xF80F, 0xF810, 0xF8F0, 0xF8F1, 0xF8F2, 0xF8F3, - 0xF8F4, 0xF8F5, 0xF8F6, 0xF8F7, 0xF8F8, 0xF8F9, - 0xF8FA, 0xF8FB, 0xF8FC, 0xF8FD, 0xF8FE, 0xF8FF, - 0xF900, 0xF901, 0xF902, 0xF903, 0xF904, 0xF905, - 0xF906, 0xF907, 0xF908, 0xF909, 0xF90A, 0xF90B, - 0xF90C, 0xF90D, 0xF90E, 0xF90F, 0xF910, 0xF9F0, - 0xF9F1, 0xF9F2, 0xF9F3, 0xF9F4, 0xF9F5, 0xF9F6, - 0xF9F7, 0xF9F8, 0xF9F9, 0xF9FA, 0xF9FB, 0xF9FC, - 0xF9FD, 0xF9FE, 0xF9FF, 0xFA00, 0xFA01, 0xFA02, - 0xFA03, 0xFA04, 0xFA05, 0xFA06, 0xFA07, 0xFA08, - 0xFA09, 0xFA0A, 0xFA0B, 0xFA0C, 0xFA0D, 0xFA0E, - 0xFA0F, 0xFA10, 0xFAF0, 0xFAF1, 0xFAF2, 0xFAF3, - 0xFAF4, 0xFAF5, 0xFAF6, 0xFAF7, 0xFAF8, 0xFAF9, - 0xFAFA, 0xFAFB, 0xFAFC, 0xFAFD, 0xFAFE, 0xFAFF, - 0xFB00, 0xFB01, 0xFB02, 0xFB03, 0xFB04, 0xFB05, - 0xFB06, 0xFB07, 0xFB08, 0xFB09, 0xFB0A, 0xFB0B, - 0xFB0C, 0xFB0D, 0xFB0E, 0xFB0F, 0xFB10, 0xFBF0, - 0xFBF1, 0xFBF2, 0xFBF3, 0xFBF4, 0xFBF5, 0xFBF6, - 0xFBF7, 0xFBF8, 0xFBF9, 0xFBFA, 0xFBFB, 0xFBFC, - 0xFBFD, 0xFBFE, 0xFBFF, 0xFC00, 0xFC01, 0xFC02, - 0xFC03, 0xFC04, 0xFC05, 0xFC06, 0xFC07, 0xFC08, - 0xFC09, 0xFC0A, 0xFC0B, 0xFC0C, 0xFC0D, 0xFC0E, - 0xFC0F, 0xFC10, 0xFCF0, 0xFCF1, 0xFCF2, 0xFCF3, - 0xFCF4, 0xFCF5, 0xFCF6, 0xFCF7, 0xFCF8, 0xFCF9, - 0xFCFA, 0xFCFB, 0xFCFC, 0xFCFD, 0xFCFE, 0xFCFF, - 0xFD00, 0xFD01, 0xFD02, 0xFD03, 0xFD04, 0xFD05, - 0xFD06, 0xFD07, 0xFD08, 0xFD09, 0xFD0A, 0xFD0B, - 0xFD0C, 0xFD0D, 0xFD0E, 0xFD0F, 0xFD10, 0xFDF0, - 0xFDF1, 0xFDF2, 0xFDF3, 0xFDF4, 0xFDF5, 0xFDF6, - 0xFDF7, 0xFDF8, 0xFDF9, 0xFDFA, 0xFDFB, 0xFDFC, - 0xFDFD, 0xFDFE, 0xFDFF, 0xFE00, 0xFE01, 0xFE02, - 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07, 0xFE08, - 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFE0E, - 0xFE0F, 0xFE10, 0xFEF0, 0xFEF1, 0xFEF2, 0xFEF3, - 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7, 0xFEF8, 0xFEF9, - 0xFEFA, 0xFEFB, 0xFEFC, 0xFEFD, 0xFEFE, 0xFEFF, - 0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, - 0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0B, - 0xFF0C, 0xFF0D, 0xFF0E, 0xFF0F, 0xFF10, 0xFFF0, - 0xFFF1, 0xFFF2, 0xFFF3, 0xFFF4, 0xFFF5, 0xFFF6, - 0xFFF7, 0xFFF8, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, - 0xFFFD, 0xFFFE, 0xFFFF, +static const uint16_t on2avc_cb14_syms[ON2AVC_CB_14_CODES] = { + 0x0000, 0x01FF, 0xF9F8, 0xF9F9, 0xF907, 0xFA04, 0xFBF8, 0xFB07, 0xFB08, + 0xFB0A, 0xFC07, 0xFC0A, 0xFDF5, 0xFDF6, 0xFEF5, 0xFFFB, 0xFF08, 0xFF0B, + 0x01F5, 0x02F6, 0x03F9, 0x04FA, 0x04FB, 0x04FC, 0x040C, 0x05FF, 0x06FD, + 0x0600, 0x0605, 0x060B, 0x0701, 0x08FA, 0x08FB, 0x08FD, 0x08FF, 0x0801, + 0x0802, 0x0807, 0x080B, 0x080C, 0x09FD, 0x0900, 0x0905, 0x0907, 0x0A03, + 0x0A06, 0x0A07, 0x0B02, 0x0B0B, 0x0C05, 0xF50D, 0x0C07, 0x0C0B, 0xF9FF, + 0xFA02, 0xFCFE, 0xFC00, 0xFE06, 0xFE07, 0x0005, 0x02FB, 0x0207, 0x03FA, + 0x04F7, 0x0406, 0x0407, 0x0408, 0x0506, 0x0808, 0x0AF3, 0x0C0D, 0xF3F3, + 0x0DF5, 0x0D06, 0xFBFD, 0xFC02, 0xFE04, 0xFFFC, 0x0104, 0x04FE, 0x0404, + 0x07F3, 0xFFFF, 0x00FE, 0xF3FC, 0x0D09, 0x0D0D, 0xFD0D, 0xF9F3, 0x0D0B, + 0x0DF4, 0xF4F4, 0x02FF, 0x04FD, 0x05FD, 0x0B0D, 0x0DF8, 0xFDFD, 0xFEF3, + 0x0101, 0xFE01, 0xFEFF, 0xFFFE, 0xFF02, 0x01FE, 0x0DFD, 0xF300, 0xF302, + 0xFCF3, 0xFEFD, 0xFFFD, 0xFF0D, 0x02F3, 0xFEFE, 0x02FD, 0x0203, 0x0002, + 0x0201, 0x040D, 0xF40D, 0xFAFB, 0xFAFC, 0xFAFD, 0xFAFF, 0xFA01, 0xFCF9, + 0xFCFF, 0xFF09, 0x0209, 0x0306, 0x0307, 0x0405, 0x05FA, 0x06FA, 0x0601, + 0x0706, 0x0708, 0x09FE, 0x0903, 0x0906, 0x090A, 0x0A0A, 0x0CF3, 0xF307, + 0xF5F3, 0xFF00, 0x0102, 0x00FD, 0xFBFE, 0xFCFC, 0x030D, 0x0304, 0x0DFA, + 0xF402, 0xF5F6, 0xF303, 0xFB0D, 0xFFF3, 0x0103, 0x050D, 0xF3F7, 0xF7F3, + 0xFB03, 0x0205, 0x04FF, 0x0403, 0x0504, 0x0505, 0x06FE, 0x0D0C, 0x060D, + 0xFBF3, 0x03FE, 0x0303, 0x04F3, 0x0DFB, 0x0D02, 0x0D04, 0x0D05, 0xF6FB, + 0xF606, 0xF7F6, 0xF703, 0xF705, 0xF8F5, 0xF8FE, 0xF8FF, 0xF9FC, 0xF901, + 0xF904, 0xF906, 0xF908, 0xFAF9, 0xFA00, 0xFA09, 0xFA0A, 0xFBF5, 0xFBF7, + 0xFB06, 0xFB09, 0xFCF6, 0xFCF7, 0xFC08, 0xFEF7, 0xFEF8, 0xFFF6, 0xFFF8, + 0xFFF9, 0x00F6, 0x00F7, 0x00FA, 0x0007, 0x0009, 0x0106, 0x0109, 0x010C, + 0x02F4, 0x02F5, 0x02F7, 0x0100, 0x00FF, 0x0001, 0x020A, 0x020C, 0x040A, + 0x06F5, 0x06F7, 0x06F8, 0x07F5, 0x07F7, 0x07F9, 0x07FA, 0x07FB, 0x07FF, + 0x0700, 0x08F6, 0x0805, 0x0809, 0x080A, 0x0904, 0x0908, 0x090C, 0x0AF4, + 0x0AFF, 0x0A08, 0x0BF6, 0x0B01, 0x0B05, 0x0B07, 0x0B0C, 0xF3F6, 0x0CF9, + 0x0C01, 0xF30A, 0xF502, 0xF6F7, 0xF8FA, 0xF8FB, 0xF9FB, 0xF905, 0xFA03, + 0xFA05, 0xFA08, 0xFB01, 0xFB04, 0xFCFA, 0xFCFB, 0xFC05, 0xFC06, 0xFDF7, + 0xFD09, 0xFF07, 0x0008, 0x0107, 0x0309, 0x04F9, 0x0401, 0x05FC, 0x0501, + 0x0508, 0x0509, 0x06FF, 0x0604, 0x070A, 0x08FC, 0x0804, 0x0902, 0x0A01, + 0x0B03, 0x0B09, 0x0B0A, 0x0C0C, 0x0DF3, 0xF3F9, 0xF30B, 0xF70D, 0xF80D, + 0xF90D, 0xFAFE, 0xFBFA, 0xFC01, 0xFDFB, 0xFD07, 0x02F9, 0x0208, 0x03FC, + 0x0305, 0x0502, 0x0602, 0x00F3, 0x0DF6, 0x0D0A, 0xFF03, 0x0D00, 0xF3F8, + 0x0300, 0xFE03, 0x0003, 0x0DFC, 0xF3F5, 0xF308, 0xFA0D, 0xFCFD, 0xFC03, + 0xFDF9, 0xFD06, 0x02FA, 0x0400, 0x05FB, 0x0607, 0x08F3, 0x090D, 0x0A0D, + 0xF3FA, 0xFC0D, 0xFDF3, 0xFE0D, 0xF3FF, 0x02FC, 0xF30C, 0xF5FF, 0xF603, + 0xF607, 0xF301, 0x0DFF, 0x0D01, 0xF60B, 0xF7F5, 0xF7F9, 0xF7FB, 0xF7FC, + 0xF7FD, 0xF8F9, 0xF803, 0xF9FA, 0xF9FD, 0xF903, 0xFA06, 0xFA07, 0xFBF9, + 0xFBFB, 0xFDF8, 0xFD0A, 0xFE08, 0xFE09, 0xFFFA, 0xFF05, 0x00FB, 0x01F7, + 0x01FB, 0x02F8, 0x0308, 0x05F7, 0x05F8, 0x05F9, 0x0503, 0x0507, 0x06FB, + 0x06FC, 0x0609, 0x060A, 0x07FE, 0x0703, 0x0705, 0x070B, 0x0803, 0x0806, + 0x09F9, 0x0AF9, 0x0A0B, 0xF3F4, 0x0C09, 0x0C0A, 0xF309, 0xF60D, 0xF8F3, + 0xF902, 0xFAFA, 0xFBFC, 0xFB02, 0xFC04, 0xFEFA, 0xFE05, 0xFF06, 0x0004, + 0x0206, 0x0402, 0x05FE, 0x0603, 0x0606, 0x0608, 0x0702, 0x0707, 0x09F3, + 0x0909, 0x0BF3, 0x0DF7, 0xF3FD, 0xF304, 0xFE00, 0xFD00, 0xF306, 0xFAF3, + 0xFD02, 0x0301, 0x0200, 0x03FF, 0xFD04, 0xFDFC, 0xFEFC, 0x0105, 0x03FD, + 0x05F3, 0x0202, 0x03F3, 0x06F3, 0xF6F3, 0xF7FE, 0xFE02, 0x0DFE, 0xF802, + 0xF9FE, 0xFAF7, 0xFBFF, 0x02FE, 0xFDFA, 0xFD05, 0xFD08, 0xFEF9, 0xFEFB, + 0xFF04, 0x00FC, 0x01FA, 0x01FC, 0x03FB, 0x0409, 0x080D, 0xF3FB, 0xF305, + 0xF4F3, 0xFD03, 0x0204, 0x070D, 0x010D, 0x0D08, 0x000D, 0xFDFE, 0xFDFF, + 0xFD01, 0x0DF9, 0x0D07, 0x020D, 0x0D03, 0xFF01, 0xF3FE, 0x01F3, 0x01FD, + 0x0302, 0xF4F8, 0xF4F9, 0xF4FA, 0xF4FB, 0xF4FC, 0xF4FD, 0xF400, 0xF401, + 0xF403, 0xF404, 0xF406, 0xF407, 0xF408, 0xF409, 0xF40A, 0xF40B, 0xF40C, + 0xF5F8, 0xF5FA, 0xF5FC, 0xF5FE, 0xF500, 0xF501, 0xF503, 0xF504, 0xF505, + 0xF506, 0xF507, 0xF508, 0xF509, 0xF50A, 0xF50B, 0xF50C, 0xF6F4, 0xF6FF, + 0xF600, 0xF604, 0xF608, 0xF609, 0xF60A, 0xF60C, 0xF7F4, 0xF7F8, 0xF7FA, + 0xF700, 0xF708, 0xF709, 0xF70A, 0xF70B, 0xF70C, 0xF8F4, 0xF8F7, 0xF800, + 0xF809, 0xF80A, 0xF80B, 0xF80C, 0xF9F4, 0xF90A, 0xF90B, 0xF90C, 0xFAF6, + 0xFA0C, 0xFBF6, 0xFB05, 0xFB0B, 0xFB0C, 0xFCF4, 0xFCF5, 0xFCF8, 0xFC09, + 0xFC0C, 0xFD0B, 0xFEF4, 0xFE0C, 0xFFF4, 0xFFF7, 0xFF0A, 0xFF0C, 0x00F4, + 0x00F5, 0x00F8, 0x0006, 0x000A, 0x000B, 0x000C, 0x01F4, 0x01F8, 0x01F9, + 0x010A, 0x020B, 0x03F4, 0x03F5, 0x03F6, 0x03F7, 0x030C, 0x04F4, 0x04F6, + 0x040B, 0x05F4, 0x05F6, 0x0500, 0x050A, 0x050B, 0x050C, 0x06F4, 0x06F6, + 0x07F4, 0x07F8, 0x07FD, 0x0709, 0x070C, 0x08F4, 0x08F5, 0x08F8, 0x08F9, + 0x08FE, 0x09F4, 0x09F5, 0x09F6, 0x09F7, 0x09F8, 0x09FA, 0x09FF, 0x0901, + 0x090B, 0x0AF5, 0x0AF8, 0x0AFC, 0x0AFE, 0x0A02, 0x0A04, 0x0A09, 0x0A0C, + 0x0BF4, 0x0BF5, 0x0BF7, 0x0BF8, 0x0BF9, 0x0BFA, 0x0BFB, 0x0BFC, 0x0BFD, + 0x0B00, 0x0B04, 0x0B06, 0x0CF4, 0x0CF7, 0x0CFB, 0x0CFC, 0x0CFD, 0x0CFF, + 0x0C00, 0x0C03, 0x0C04, 0x0C06, 0xF4F5, 0xF4F6, 0xF4FE, 0xF4FF, 0xF5F9, + 0xF5FB, 0xF5FD, 0xF6F5, 0xF6F6, 0xF6FC, 0xF6FE, 0xF601, 0xF605, 0xF7FF, + 0xF702, 0xF704, 0xF707, 0xF8F8, 0xF801, 0xF804, 0xF805, 0xF807, 0xF808, + 0xF9F5, 0xF9F7, 0xF900, 0xF909, 0xFAF4, 0xFAF5, 0xFAF8, 0xFA0B, 0xFBF4, + 0xFB00, 0xFC0B, 0xFDF4, 0xFD0C, 0xFEF6, 0xFE0A, 0xFE0B, 0xFFF5, 0x00F9, + 0x01F6, 0x0108, 0x010B, 0x03F8, 0x030A, 0x030B, 0x04F5, 0x04F8, 0x05F5, + 0x06F9, 0x060C, 0x07F6, 0x07FC, 0x0704, 0x08F7, 0x0800, 0x09FB, 0x09FC, + 0x0AF6, 0x0AF7, 0x0AFA, 0x0AFB, 0x0AFD, 0x0A00, 0x0A05, 0x0BFE, 0x0BFF, + 0x0B08, 0x0CF5, 0x0CF6, 0x0CF8, 0x0CFA, 0x0CFE, 0xF30D, 0x0C02, 0x0C08, + 0xF4F7, 0xF405, 0xF5F4, 0xF5F5, 0xF5F7, 0xF6F8, 0xF6F9, 0xF6FA, 0xF6FD, + 0xF602, 0xF7F7, 0xF701, 0xF706, 0xF8F6, 0xF8FC, 0xF8FD, 0xF806, 0xF9F6, }; -const void * const ff_on2avc_cb_codes[] = { - on2avc_cb1_codes, on2avc_cb2_codes, on2avc_cb3_codes, on2avc_cb4_codes, - on2avc_cb5_codes, on2avc_cb6_codes, on2avc_cb7_codes, on2avc_cb8_codes, - on2avc_cb9_codes, on2avc_cb10_codes, on2avc_cb11_codes, on2avc_cb12_codes, - on2avc_cb13_codes, on2avc_cb14_codes, on2avc_cb15_codes +static const uint16_t on2avc_cb15_syms[ON2AVC_CB_15_CODES] = { + 0x0000, 0x00FF, 0xFEFF, 0x0201, 0xFAFF, 0xFBFB, 0xFF06, 0x06FE, 0x100E, + 0xF2F6, 0xF2FF, 0xF205, 0xF3F3, 0xF6F2, 0xF8F5, 0xF90B, 0xFAF8, 0xFAF9, + 0xFA06, 0xFCF2, 0x0008, 0x0209, 0x030E, 0x04F2, 0x040E, 0x040F, 0x05F7, + 0x06F1, 0x07FD, 0x0807, 0x09F1, 0x09FC, 0x09FE, 0x0AF1, 0x0A03, 0x0A0B, + 0x0B08, 0x0B0C, 0x0CF1, 0x0C0E, 0x0E0B, 0xFF07, 0x03F8, 0xF002, 0xF00A, + 0xF00B, 0x0DF0, 0xFE01, 0xFFF0, 0x06FD, 0x0F07, 0xF20E, 0xF3F7, 0xF009, + 0xFAFB, 0xFC05, 0xF510, 0x0205, 0x07F0, 0x1008, 0xF0F4, 0xF007, 0x100A, + 0xF3FC, 0xF305, 0xF308, 0xF30F, 0xF4FE, 0xF40F, 0xF505, 0xF508, 0xF50A, + 0xF60B, 0xF60C, 0xF60D, 0xF7F4, 0xF7FB, 0xF701, 0xF708, 0xF70F, 0xF800, + 0xF9F3, 0xF90C, 0xFBF5, 0xFBF6, 0xFC0D, 0xFDF5, 0x000A, 0x020D, 0x08F1, + 0x0901, 0x0AF2, 0x0A02, 0x0BF4, 0x0BFC, 0x0BFE, 0x0B06, 0x0CF4, 0x0C02, + 0x0C07, 0x0DF5, 0x0DF6, 0x0DF8, 0xF1F1, 0x0D03, 0x0D04, 0xF1F3, 0xF1F7, + 0xF103, 0xF107, 0xF2FA, 0xF4F4, 0xF5F2, 0xF5FA, 0xF6F5, 0xF6FC, 0xF70E, + 0xF8F1, 0xF8F6, 0xF900, 0xF90E, 0xFB0A, 0xFCF7, 0xFC08, 0xFC0B, 0xFDF2, + 0xFEF2, 0xFF0A, 0x020E, 0x06F7, 0x07FA, 0x0709, 0x08FC, 0x0906, 0x0A06, + 0x0EF8, 0x0001, 0x0100, 0xFF00, 0xF010, 0x10F0, 0x0E01, 0x0E09, 0x0E0A, + 0x0F08, 0xF204, 0xFDF9, 0xFEFA, 0x0407, 0x0601, 0x0704, 0xF0FD, 0xFCFC, + 0x0BF0, 0x1004, 0xF0F1, 0xF00C, 0x1005, 0x1009, 0x03FD, 0x100D, 0xF903, + 0xFBFA, 0xFD03, 0xF310, 0x0107, 0x0506, 0xFDFB, 0x0D0E, 0xF104, 0x0EF1, + 0xF307, 0x000D, 0x0C00, 0x0D01, 0xF10F, 0xF4FF, 0xFE05, 0x00F0, 0x01FB, + 0x100C, 0x100F, 0xF2FB, 0xF2FD, 0xF200, 0xF4F9, 0xF606, 0xF9F6, 0xF9FF, + 0xFAF7, 0xFA09, 0xFC0A, 0xFD09, 0x0109, 0x030A, 0x040A, 0x05F6, 0x05F9, + 0x0509, 0x070A, 0x070B, 0x0809, 0x090B, 0x0AFA, 0x0B0F, 0x0EF5, 0x0EF9, + 0x0E08, 0x0FFC, 0x0FFF, 0x0010, 0xF905, 0x0602, 0x0104, 0x0105, 0x09F0, + 0xFFFD, 0x01FD, 0x0103, 0x01F0, 0x1006, 0x00FB, 0x02F2, 0x0206, 0x0408, + 0xF0FE, 0x0500, 0x06FA, 0xF004, 0xF008, 0xF610, 0x04FC, 0x10F6, 0x10F7, + 0xFF03, 0xFFFC, 0x10FD, 0x10FE, 0xFD01, 0xFF04, 0x10F1, 0x1001, 0xF401, + 0x000C, 0x01F3, 0x0C01, 0xF30D, 0xF4F6, 0xFEF3, 0x02F5, 0x0A00, 0x0BF3, + 0x0B00, 0x0D00, 0x0EF2, 0x0FF2, 0xF20F, 0xF3FF, 0xF301, 0xF306, 0xF309, + 0xF30C, 0xF405, 0xF40B, 0xF40D, 0xF5F8, 0xF5FB, 0xF509, 0xF700, 0xF90F, + 0xFCF4, 0xFCF5, 0xFF0C, 0x00F5, 0x01F5, 0x060D, 0x08FF, 0x0AF4, 0x0A0D, + 0x0BF6, 0x0B01, 0x0B0B, 0x0CF2, 0x0CFA, 0x0CFE, 0x0DF7, 0x0DFA, 0x0DFD, + 0x0D0A, 0x0FF4, 0xF1F2, 0xF1F9, 0xF20A, 0xF20C, 0xF3F1, 0xF4F5, 0xF5F4, + 0xF6F6, 0xF7F3, 0xF7F5, 0xF7FE, 0xF709, 0xF8F2, 0xF80E, 0xF9F5, 0xFA00, + 0xFBF1, 0xFC07, 0xFDF4, 0xFD0B, 0xFE0A, 0xFFF6, 0xFFF8, 0x00FA, 0x0208, + 0x020B, 0x04F6, 0x04F7, 0x06F8, 0x060B, 0x07F2, 0x07F6, 0x07F9, 0x070F, + 0x08FA, 0x0903, 0x0904, 0x0A07, 0x0A08, 0x0A0E, 0x0CF7, 0x0D0F, 0x0EF7, + 0x0EFC, 0x0301, 0xF8FD, 0x0E0D, 0x0F03, 0xF9F2, 0xFBFF, 0xFFFB, 0x0803, + 0x0F0D, 0x0FFD, 0xF10D, 0x10F3, 0xF9FD, 0xF901, 0xF902, 0xFB07, 0xFEF9, + 0x0006, 0xF2F0, 0xF00D, 0x0307, 0x04F9, 0xFD00, 0x03F0, 0x0FF0, 0xF410, + 0xFDF0, 0xF1F6, 0xF1F8, 0xF101, 0xF2F3, 0xF207, 0xF4FA, 0xF4FC, 0xF5F5, + 0xF5F7, 0xF6F3, 0xF6F4, 0xF609, 0xF705, 0xF706, 0xF8F9, 0xF8FB, 0xF804, + 0xF909, 0xFCF1, 0xFEF1, 0xFEF7, 0xFE0B, 0x01F1, 0x02F7, 0x04F5, 0x050C, + 0x06F6, 0x06F9, 0x0609, 0x07F1, 0x08F5, 0x08FB, 0x0805, 0x080F, 0x0AF7, + 0x0B05, 0x0B0A, 0x0C08, 0x0C0B, 0x0C0D, 0x0D08, 0x0E07, 0x0FF6, 0x0FFA, + 0xFDFA, 0x0F02, 0x0F0A, 0xFD0E, 0x02F9, 0x0308, 0x0507, 0xFB03, 0x06FC, + 0x0702, 0xFCFB, 0x02FB, 0xF5F0, 0x05FD, 0x0703, 0xF2F1, 0x0003, 0xF0FC, + 0xF00F, 0xFBFE, 0xFF05, 0xFCF0, 0x10F5, 0x10FF, 0xFCFF, 0x01FC, 0xF9FB, + 0xFA02, 0xFB08, 0xFD08, 0xFEF8, 0xFE0E, 0x01FA, 0x0207, 0xFE04, 0xFBFD, + 0x0604, 0x07FC, 0x0300, 0x0410, 0xF001, 0x09FD, 0xF302, 0xF402, 0xF406, + 0xF40E, 0xFDFF, 0xFD10, 0xF110, 0x10F9, 0x03FF, 0xFBF0, 0xF5F9, 0xF5FC, + 0xF501, 0xF503, 0xF50F, 0xF600, 0xF607, 0xF70B, 0xF70C, 0xF908, 0xFBF3, + 0xFFF3, 0x00F3, 0x0009, 0x010C, 0x010D, 0x03F3, 0x08F4, 0x0A05, 0x0CF8, + 0x0CFC, 0x0DF1, 0x0DF2, 0x0DFB, 0xF1F4, 0xF1F5, 0xF1FE, 0xF2F4, 0xF2F8, + 0xF2F9, 0xF20D, 0xF4F3, 0xF5F1, 0xF5FE, 0xF50D, 0xF6FE, 0xF7F8, 0xF8FF, + 0xF808, 0xF80C, 0xF9F4, 0xFA0A, 0xFA0C, 0xFBF2, 0xFBF4, 0xFFF7, 0x02F6, + 0x030C, 0x030F, 0x0409, 0x07F4, 0x08F6, 0x08F9, 0x0808, 0x080A, 0x0908, + 0x090D, 0x0AFC, 0x0AFD, 0x0BF7, 0x0C0F, 0x0D05, 0x0D07, 0x0EF4, 0xF2FE, + 0x0F00, 0x0F01, 0xF7FD, 0xF8FC, 0xF9F9, 0xFB00, 0xFE07, 0x00F9, 0x050E, + 0x06FF, 0x0705, 0x080E, 0x0A0F, 0x0EFD, 0xFD06, 0x03FB, 0x0502, 0x0503, + 0x0EF0, 0x10F2, 0xF1F0, 0x04FF, 0x06F0, 0xFCFE, 0x00FD, 0x10FC, 0x0E0F, + 0xF9F7, 0xF9F8, 0xF9FA, 0xFA05, 0xFBF8, 0x03FE, 0x02FD, 0x02FE, 0xFBF9, + 0x04FA, 0x0708, 0x08FD, 0xFB02, 0x0005, 0x02FC, 0x0401, 0x01FF, 0xFEFD, + 0x0310, 0x0305, 0xF1FA, 0xF106, 0xF209, 0xF20B, 0xFC01, 0xFDFC, 0xFEF0, + 0xFE10, 0x02F0, 0xF7F0, 0x00FC, 0xF3F4, 0xF3F5, 0xF3F6, 0xF3F9, 0xF408, + 0xF5F6, 0xF504, 0xF50B, 0x0203, 0xF6F7, 0xF6F9, 0xF60F, 0xF8F3, 0xF806, + 0xF80D, 0xF80F, 0xF90D, 0xFAF4, 0xFAF5, 0xFA08, 0xFC0C, 0xFD0C, 0xFE0C, + 0xFF0B, 0x00F1, 0x0202, 0x00F7, 0x000F, 0x02F4, 0x020C, 0x03F5, 0x05F5, + 0x060A, 0x07F3, 0x07F7, 0x0700, 0x0701, 0x08F7, 0x08F8, 0x09F8, 0x09FF, + 0x0AF8, 0x0AFF, 0x0A0C, 0x0BFA, 0x0BFB, 0x0B03, 0x0C0A, 0x0D0C, 0x0EF6, + 0x0FF5, 0x0FF9, 0x0FFE, 0x0F0E, 0xF3F2, 0xF802, 0xF803, 0xF9F1, 0xF9FE, + 0xFAFA, 0xFB06, 0xFC0E, 0xFF0E, 0x0508, 0xF00E, 0x07FF, 0x0EFB, 0xFC04, + 0xFD05, 0xF8F0, 0x02FA, 0x0505, 0xFC10, 0x0510, 0xFF01, 0x0101, 0xFFFF, + 0xF0F0, 0x1010, 0x0002, 0x0C10, 0xFB10, 0xFEFC, 0x0400, 0xF4F0, 0x0FFB, + 0x0F0F, 0xF10E, 0xF3FE, 0xF404, 0x01F4, 0xF2F5, 0xF202, 0xF9F0, 0x0210, + 0xFE02, 0x05F0, 0x0610, 0xF7F1, 0xF8F8, 0xF9FC, 0xF904, 0xFAF1, 0xFDF6, + 0xFD07, 0xFE08, 0xFEFE, 0x01F9, 0x02F8, 0x0605, 0x0608, 0x070E, 0x0D0D, + 0x0EFF, 0x0E05, 0xFAF0, 0x10F4, 0x0E06, 0x0E0C, 0x0D10, 0xF6F0, 0x04FE, + 0xFBFC, 0x05FE, 0x0204, 0x0402, 0x0710, 0xFC02, 0xFE03, 0xFD04, 0x0004, + 0xF10A, 0x0CFF, 0x0DF3, 0xF3FD, 0xF4F1, 0xF40A, 0xF5FF, 0xF50C, 0xF6F1, + 0xF608, 0xF70D, 0xFB0B, 0xFEF6, 0xFFF4, 0x00F4, 0x030D, 0x0CF6, 0xF1FB, + 0x0CF9, 0x0DF9, 0xF1FC, 0xF100, 0xF10C, 0xF403, 0xF409, 0xF5FD, 0xF502, + 0xF50E, 0xF6FA, 0xF601, 0xF605, 0xF60E, 0xF7FF, 0xF8F4, 0xF807, 0xF80A, + 0xF90A, 0xFA0F, 0xFB0C, 0xFB0D, 0xFB0F, 0xFD0D, 0xFE09, 0xFF09, 0x00F6, + 0x00F8, 0x010B, 0x010F, 0x020A, 0x040D, 0x05FA, 0x050B, 0x06F3, 0x060C, + 0x08F2, 0x0800, 0x080B, 0x080D, 0x09F6, 0x09F7, 0x09FA, 0x090C, 0x0AFB, + 0x0AFE, 0x0BF1, 0x0BF8, 0x0BFD, 0x0B04, 0x0CF5, 0x0CFD, 0x0C04, 0x0C0C, + 0x0DFC, 0x0EF3, 0xF8F7, 0x0E00, 0x0FF7, 0xF8FE, 0xFA04, 0xFCF8, 0xFDF8, + 0xFFF2, 0x040B, 0x05F8, 0x0607, 0x060E, 0x090F, 0x0306, 0x0EFE, 0x0E04, + 0xF0FB, 0x0E10, 0x0403, 0x0603, 0x0E0E, 0xF2F2, 0xFD02, 0xF3F0, 0x0810, + 0x0302, 0xFE06, 0xF4F7, 0xF702, 0xF801, 0xF805, 0xFAF2, 0xFBF7, 0xFB09, + 0xFCF6, 0xFF08, 0x010E, 0x060F, 0x0707, 0x0804, 0x0909, 0x03FC, 0x05FC, + 0x090E, 0x0E03, 0x08F0, 0x05FF, 0xF0FF, 0xFCFD, 0xFA01, 0xFB01, 0xFDFE, + 0x0110, 0x0404, 0x00FE, 0xF0F5, 0x0606, 0xF1FF, 0x0FF1, 0xF3FA, 0xF102, + 0xF105, 0x1002, 0xF108, 0xF109, 0xF2F7, 0xF3F8, 0xF4FD, 0xF407, 0xF5F3, + 0xF6F8, 0xF6FB, 0xF6FF, 0xF602, 0xF603, 0xF7F9, 0xF704, 0xF707, 0xF70A, + 0xF809, 0xFAF3, 0xFA0D, 0xFCF3, 0xFDF3, 0xFEF4, 0xFEF5, 0xFFF5, 0x010A, + 0x030B, 0x04F3, 0x04F4, 0x040C, 0x05F3, 0x050A, 0x050D, 0x06F4, 0x06F5, + 0x07F5, 0x080C, 0x09F2, 0x09F4, 0x09F5, 0x090A, 0x0AF3, 0x0A01, 0x0BF2, + 0x0BF5, 0x0BF9, 0x0B0D, 0x0CF3, 0x0CFB, 0x0DF4, 0x0FF8, 0x0F09, 0x0F0B, + 0xF1FD, 0xF4F2, 0xF7F7, 0xF7FA, 0xF906, 0xF907, 0xFA07, 0xFA0E, 0xFB05, + 0xFB0E, 0xFC0F, 0xFDF1, 0xFDF7, 0xFE0F, 0x0007, 0x000E, 0x01F7, 0x03F6, + 0x04F8, 0x0406, 0x050F, 0x06F2, 0x0600, 0x07FE, 0x0706, 0x08FE, 0x0801, + 0x0802, 0x0806, 0x0A09, 0xF210, 0x0A0A, 0x0B09, 0xF0F6, 0x0106, 0x03FA, + 0xF003, 0xFA10, 0xF0F2, 0x0504, 0x0E02, 0xF201, 0xFFFE, 0xF0F9, 0xF810, + 0x04F0, 0x0B10, 0x0F10, 0x10FA, 0x1007, 0x100B, 0x01FE, 0x0303, 0xF0F8, + 0x0AF0, 0x10FB, 0x1003, 0xF0F7, 0xF910, 0x0102, 0x02FF, 0xFE00, 0xFEFB, + 0xFF10, 0xF203, 0xF206, 0xF208, 0xF7F6, 0xF7FC, 0xFC06, 0xFD0A, 0xFFF1, + 0x01F8, 0x020F, 0x03F1, 0x0309, 0x04F1, 0x05F1, 0x05F2, 0x06FB, 0x07F8, + 0x070C, 0x09F9, 0x0902, 0xFA03, 0x0B07, 0x0B0E, 0xFF02, 0xFC00, 0x0304, + 0x0910, 0x0405, 0xFAFC, 0xFC03, 0xFAFD, 0xFAFE, 0xFCF9, 0xFCFA, 0x04FB, + 0x0501, 0x0200, 0xF0FA, 0xF005, 0xF006, 0x04FD, 0xFDFD, 0x10F8, 0xF710, + 0xF300, 0xF303, 0xF304, 0xF4FB, 0xF400, 0xF40C, 0xF500, 0xFF0D, 0x000B, + 0x0AF9, 0x0BFF, 0x0DFE, 0xF10B, 0x0DFF, 0x0D0B, 0xF2FC, 0xF3FB, 0xF30A, + 0xF30B, 0xF30E, 0xF4F8, 0xF506, 0xF507, 0xF6FD, 0xF604, 0xF60A, 0xF80B, + 0xFA0B, 0xFE0D, 0x00F2, 0x01F6, 0x0108, 0x02F3, 0x03F4, 0x05F4, 0x070D, + 0x08F3, 0x09F3, 0x0900, 0x0AF5, 0x0AF6, 0x0A04, 0x0B02, 0x0C03, 0x0C05, + 0x0C06, 0x0C09, 0x0D02, 0x0D06, 0x0D09, 0x0FF3, 0xF7F2, 0x0F04, 0x0F0C, + 0xF703, 0xF8FA, 0xFAF6, 0xFC09, 0xFD0F, 0xFFF9, 0xFF0F, 0x01F2, 0x02F1, + 0x03F2, 0x03F7, 0x03F9, 0x05FB, 0x07FB, 0x09FB, 0x0905, 0x0907, 0x0EFA, + 0x0F05, 0x0F06, 0xF000, 0xFB04, 0xF0F3, 0xFFFA, 0x1000, 0x0A10, 0x0CF0 }; - const uint8_t * const ff_on2avc_cb_bits[] = { on2avc_cb1_bits, on2avc_cb2_bits, on2avc_cb3_bits, on2avc_cb4_bits, on2avc_cb5_bits, on2avc_cb6_bits, on2avc_cb7_bits, on2avc_cb8_bits, @@ -6012,21 +2387,18 @@ const uint8_t * const ff_on2avc_cb_bits[] = { }; const uint16_t * const ff_on2avc_cb_syms[] = { - on2avc_cb1_2_syms, on2avc_cb1_2_syms, on2avc_cb3_4_syms, on2avc_cb3_4_syms, - on2avc_cb5_6_syms, on2avc_cb5_6_syms, on2avc_cb7_8_syms, on2avc_cb7_8_syms, - on2avc_cb9_10_syms, on2avc_cb9_10_syms, on2avc_cb11_syms, on2avc_cb12_syms, + on2avc_cb_1_syms, on2avc_cb_2_syms, on2avc_cb_3_syms, on2avc_cb_4_syms, + on2avc_cb_5_syms, on2avc_cb_6_syms, on2avc_cb_7_syms, on2avc_cb_8_syms, + on2avc_cb_9_syms, on2avc_cb_10_syms, on2avc_cb11_syms, on2avc_cb12_syms, on2avc_cb13_syms, on2avc_cb14_syms, on2avc_cb15_syms }; -const uint8_t ff_on2avc_cb_codes_sizes[] = { - 2, 1, 4, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2 -}; - const int ff_on2avc_cb_elems[] = { - ON2AVC_CB1_2_CODES, ON2AVC_CB1_2_CODES, ON2AVC_CB3_4_CODES, ON2AVC_CB3_4_CODES, - ON2AVC_CB5_6_CODES, ON2AVC_CB5_6_CODES, ON2AVC_CB7_8_CODES, ON2AVC_CB7_8_CODES, - ON2AVC_CB9_10_CODES, ON2AVC_CB9_10_CODES, ON2AVC_CB11_CODES, ON2AVC_CB12_CODES, - ON2AVC_CB13_CODES, ON2AVC_CB14_CODES, ON2AVC_CB15_CODES, + ON2AVC_CB_1_2_CODES, ON2AVC_CB_1_2_CODES, ON2AVC_CB_3_4_CODES, + ON2AVC_CB_3_4_CODES, ON2AVC_CB_5_6_CODES, ON2AVC_CB_5_6_CODES, + ON2AVC_CB_7_8_CODES, ON2AVC_CB_7_8_CODES, ON2AVC_CB_9_10_CODES, + ON2AVC_CB_9_10_CODES, ON2AVC_CB_11_CODES, ON2AVC_CB_12_CODES, + ON2AVC_CB_13_CODES, ON2AVC_CB_14_CODES, ON2AVC_CB_15_CODES }; const float ff_on2avc_window_long_32000[1024] = { diff --git a/libavcodec/on2avcdata.h b/libavcodec/on2avcdata.h index 2395b80e68..dee8c3e102 100644 --- a/libavcodec/on2avcdata.h +++ b/libavcodec/on2avcdata.h @@ -38,13 +38,11 @@ extern const On2AVCMode ff_on2avc_modes_40[8]; extern const On2AVCMode ff_on2avc_modes_44[8]; #define ON2AVC_SCALE_DIFFS 121 -extern const uint32_t ff_on2avc_scale_diff_codes[]; -extern const uint8_t ff_on2avc_scale_diff_bits[]; +extern const uint8_t ff_on2avc_scale_diff_syms[]; +extern const uint8_t ff_on2avc_scale_diff_bits[]; -extern const void * const ff_on2avc_cb_codes[]; extern const uint8_t * const ff_on2avc_cb_bits[]; extern const uint16_t * const ff_on2avc_cb_syms[]; -extern const uint8_t ff_on2avc_cb_codes_sizes[]; extern const int ff_on2avc_cb_elems[]; extern const float ff_on2avc_window_long_32000[1024]; From patchwork Tue Nov 10 10:47:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23471 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 1367F449B06 for ; Tue, 10 Nov 2020 12:49:38 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E7EF368BD8B; Tue, 10 Nov 2020 12:49:37 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DB31E68BDA7 for ; Tue, 10 Nov 2020 12:49:29 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id p1so12125464wrf.12 for ; Tue, 10 Nov 2020 02:49:29 -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=VwkTYpIvfIijeBDJ9zVbXELQmYMCe4XfOpCpn2n45rU=; b=R6xs+C58ief2YMzZsWYkyYeA7fHZGxkWqv8jG3wO4Tmi8W/bKDq4L5YsmbrRdnmsJa qglARosNG1MLopqt+zGi6QOjthFTHUk/LQesR2zac2WEA4U3q56KSVO5jSirRDYq7dhP OcoQCKRmElMNWH10bfPjdqKZ67caEtnoalPYy67TDJPz1TRFEWOZRnENedEMzQhwfKzg NwdW7mEZEMiSWqjRf72CXJ6BLldejBqNAJwe8MoVVBNrHe1ZIphn9KXkjbxQy5G+BWwJ Fblnw23XanLUGzAlqqAbtdgJLQ/qJrkJXvaTzNO7LAvVryf4fzOfPgVOd04g+c2Le8f4 82vA== 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=VwkTYpIvfIijeBDJ9zVbXELQmYMCe4XfOpCpn2n45rU=; b=ZnHJJeRL0pRN3BSJvj2+9NJzZLqb3XCt8jj7o3DEb8QYLtfqbsheJb/9e5it2k9nfA QjbF4+mTUqBlIeHI2tBQVnY6nEQhTnv5HTCbZP358FiG7NowVcLds8yaVKtlxL5++Ggt 6oAzatIn7aX3xrmzUEm9RLu4ZuxxD6lBg/6aqY3Tjh6ju40hn6bIYxN5k2E99Kl3IWkN mBIIxRelrYohL7DTSWB8LZDKVbV8ugbEWd8BkyFy1cjqi+ATpMxm6mIdeW0GysAeLQDV FBse4vj7Ix+zSOcXjyeras9FRdxHHaZuJFnKt2LWsmEALGNWfNhrJTZHcDOPJP9eVFLS 3Dbg== X-Gm-Message-State: AOAM533lSAvcrFP/JkeQpvuqJuuTydOruz9/qCdabVrdzE982/laeCP7 DYjZ5yjVwtH9hMeyEiiA1Q7fb03+AqM= X-Google-Smtp-Source: ABdhPJyAYAxUd1kegR/YBC8ho2zqVSFfu1DkL8Wr6SiKxdLDcnX877flTVNEP+cyeoMduRPGIBJisA== X-Received: by 2002:a05:6000:107:: with SMTP id o7mr22875873wrx.354.1605005368494; Tue, 10 Nov 2020 02:49:28 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:28 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:06 +0100 Message-Id: <20201110104851.321029-10-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 009/114] avcodec/on2avcdata: Combine tables for codebooks 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 codebook symbols and lengths makes it possible to remove the pointers to the individual tables. Signed-off-by: Andreas Rheinhardt --- libavcodec/on2avc.c | 8 ++- libavcodec/on2avcdata.c | 132 ++++++++++------------------------------ libavcodec/on2avcdata.h | 4 +- 3 files changed, 40 insertions(+), 104 deletions(-) diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c index 5e86c4d11a..54afe8b13a 100644 --- a/libavcodec/on2avc.c +++ b/libavcodec/on2avc.c @@ -906,6 +906,8 @@ static av_cold void on2avc_free_vlcs(On2AVCContext *c) static av_cold int on2avc_decode_init(AVCodecContext *avctx) { On2AVCContext *c = avctx->priv_data; + const uint8_t *lens = ff_on2avc_cb_lens; + const uint16_t *syms = ff_on2avc_cb_syms; int i, ret; if (avctx->channels > 2U) { @@ -964,10 +966,12 @@ static av_cold int on2avc_decode_init(AVCodecContext *avctx) for (i = 1; i < 16; i++) { int idx = i - 1; ret = ff_init_vlc_from_lengths(&c->cb_vlc[i], 9, ff_on2avc_cb_elems[idx], - ff_on2avc_cb_bits[idx], 1, - ff_on2avc_cb_syms[idx], 2, 2, 0, 0); + lens, 1, + syms, 2, 2, 0, 0); if (ret < 0) goto vlc_fail; + lens += ff_on2avc_cb_elems[idx]; + syms += ff_on2avc_cb_elems[idx]; } return 0; diff --git a/libavcodec/on2avcdata.c b/libavcodec/on2avcdata.c index 52ede3f4da..bde50615ce 100644 --- a/libavcodec/on2avcdata.c +++ b/libavcodec/on2avcdata.c @@ -143,19 +143,16 @@ const uint8_t ff_on2avc_scale_diff_bits[ON2AVC_SCALE_DIFFS] = { #define ON2AVC_CB_14_CODES 729 #define ON2AVC_CB_15_CODES 1089 -static const uint8_t on2avc_cb1_bits[ON2AVC_CB_1_2_CODES] = { +const uint8_t ff_on2avc_cb_lens[] = { + /* Codebook 1 - 41 entries */ 1, 6, 6, 6, 6, 6, 8, 8, 9, 9, 9, 9, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 7, 9, 9, 9, 9, 7, 9, 9, 9, 9, -}; - -static const uint8_t on2avc_cb2_bits[ON2AVC_CB_1_2_CODES] = { + /* Codebook 2 - 41 entries */ 5, 7, 7, 7, 7, 5, 5, 5, 7, 7, 7, 7, 5, 5, 5, 5, 5, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 3, 5, 5, 5, 5, -}; - -static const uint8_t on2avc_cb3_bits[ON2AVC_CB_3_4_CODES] = { + /* Codebook 3 - 313 entries */ 1, 7, 7, 7, 9, 9, 10, 11, 12, 14, 14, 14, 15, 15, 10, 10, 7, 9, 9, 9, 10, 11, 12, 12, 7, 10, 11, 11, 12, 12, 12, 13, 14, 15, 15, 11, 11, 9, 9, 7, 9, 10, 11, 12, 12, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, @@ -173,9 +170,7 @@ static const uint8_t on2avc_cb3_bits[ON2AVC_CB_3_4_CODES] = { 9, 10, 12, 12, 12, 13, 14, 15, 16, 16, 9, 10, 10, 9, 10, 11, 12, 12, 9, 10, 11, 12, 13, 13, 9, 9, 9, 11, 12, 13, 14, 14, 11, 11, 8, 9, 11, 12, 13, 13, 11, 12, 13, 15, 15, 15, 15, -}; - -static const uint8_t on2avc_cb4_bits[ON2AVC_CB_3_4_CODES] = { + /* Codebook 4 - 313 entries */ 7, 7, 7, 9, 9, 9, 10, 11, 12, 12, 6, 6, 6, 7, 9, 9, 9, 9, 6, 6, 6, 7, 9, 9, 9, 9, 6, 6, 6, 7, 7, 6, 6, 9, 9, 9, 11, 12, 12, 11, 11, 9, 9, 9, 11, 11, 11, 12, 12, 7, 9, 9, 9, 9, 7, 9, 9, @@ -193,9 +188,7 @@ static const uint8_t on2avc_cb4_bits[ON2AVC_CB_3_4_CODES] = { 11, 11, 10, 10, 8, 8, 8, 10, 10, 10, 10, 8, 10, 11, 11, 10, 10, 8, 9, 10, 11, 13, 13, 13, 13, 9, 10, 10, 10, 11, 11, 10, 10, 6, 6, 5, 5, 5, 6, 8, 9, 9, 8, 9, 10, 11, 11, -}; - -static const uint8_t on2avc_cb5_bits[ON2AVC_CB_5_6_CODES] = { + /* Codebook 5 - 1201 entries */ 1, 7, 8, 10, 10, 10, 11, 12, 14, 14, 14, 14, 7, 10, 11, 14, 14, 14, 14, 13, 13, 10, 12, 13, 15, 15, 15, 15, 12, 12, 10, 10, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 12, 14, 14, 14, 14, 11, 12, 12, 7, @@ -260,9 +253,7 @@ static const uint8_t on2avc_cb5_bits[ON2AVC_CB_5_6_CODES] = { 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, 14, 14, 14, 14, 13, 14, 14, 11, 13, 13, 13, 13, -}; - -static const uint8_t on2avc_cb6_bits[ON2AVC_CB_5_6_CODES] = { + /* Codebook 6 - 1201 entries */ 8, 10, 12, 13, 13, 12, 13, 14, 16, 17, 17, 16, 16, 10, 11, 11, 8, 10, 11, 11, 10, 10, 10, 10, 11, 12, 13, 14, 14, 11, 11, 10, 10, 10, 11, 12, 12, 8, 10, 11, 12, 12, 10, 11, 11, 8, 10, 10, 10, 11, 13, 13, 13, 13, 10, 11, 12, @@ -327,9 +318,7 @@ static const uint8_t on2avc_cb6_bits[ON2AVC_CB_5_6_CODES] = { 9, 10, 11, 12, 12, 9, 9, 9, 10, 10, 9, 9, 12, 12, 12, 12, 11, 11, 10, 10, 9, 10, 11, 13, 13, 13, 13, 9, 9, 9, 9, 12, 12, 12, 12, 11, 11, 10, 10, 9, 10, 10, -}; - -static const uint8_t on2avc_cb7_bits[ON2AVC_CB_7_8_CODES] = { + /* Codebook 7 - 3281 entries */ 1, 7, 11, 12, 12, 12, 13, 14, 15, 15, 13, 13, 13, 13, 13, 13, 13, 14, 14, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, @@ -503,9 +492,7 @@ static const uint8_t on2avc_cb7_bits[ON2AVC_CB_7_8_CODES] = { 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 11, 12, 12, 10, 11, 11, -}; - -static const uint8_t on2avc_cb8_bits[ON2AVC_CB_7_8_CODES] = { + /* Codebook 8 - 3281 entries */ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, @@ -679,9 +666,7 @@ static const uint8_t on2avc_cb8_bits[ON2AVC_CB_7_8_CODES] = { 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -}; - -static const uint8_t on2avc_cb9_bits[ON2AVC_CB_9_10_CODES] = { + /* Codebook 9 - 121 entries */ 1, 5, 8, 9, 10, 11, 11, 9, 10, 11, 11, 10, 12, 12, 12, 12, 11, 11, 11, 11, 9, 10, 11, 12, 13, 13, 10, 11, 11, 10, 10, 8, 9, 11, 12, 12, 11, 11, 5, 8, 9, 10, 10, 8, 9, 10, 10, 8, 8, 8, 9, 10, 11, 12, 12, 8, 9, @@ -689,9 +674,7 @@ static const uint8_t on2avc_cb9_bits[ON2AVC_CB_9_10_CODES] = { 10, 8, 8, 8, 9, 9, 5, 9, 10, 11, 11, 9, 10, 11, 11, 8, 9, 9, 8, 8, 8, 8, 5, 5, 5, 9, 11, 12, 12, 11, 11, 9, 9, 8, 9, 10, 10, 8, 8, 8, 9, 10, 10, 4, 4, -}; - -static const uint8_t on2avc_cb10_bits[ON2AVC_CB_9_10_CODES] = { + /* Codebook 10 - 121 entries */ 9, 9, 9, 9, 8, 9, 9, 7, 8, 9, 9, 8, 9, 9, 8, 8, 8, 8, 8, 8, 5, 6, 8, 8, 8, 8, 7, 8, 8, 7, 7, 7, 8, 9, 9, 7, 8, 8, 7, 7, 7, 8, 9, 9, 6, 7, 7, 5, 6, 7, 7, 6, 7, 8, 9, 9, 6, @@ -699,9 +682,7 @@ static const uint8_t on2avc_cb10_bits[ON2AVC_CB_9_10_CODES] = { 7, 7, 5, 7, 8, 8, 8, 8, 8, 8, 5, 6, 7, 7, 6, 7, 8, 8, 6, 7, 8, 8, 5, 6, 7, 8, 8, 7, 7, 8, 9, 9, 8, 8, 6, 7, 8, 8, 6, 7, 8, 8, 6, 7, 7, -}; - -static const uint8_t on2avc_cb11_bits[ON2AVC_CB_11_CODES] = { + /* Codebook 11 - 225 entries */ 2, 10, 10, 10, 10, 9, 10, 11, 11, 10, 10, 10, 10, 9, 9, 9, 10, 11, 11, 9, 10, 10, 10, 11, 12, 12, 10, 11, 11, 9, 9, 9, 10, 10, 9, 9, 8, 10, 11, 11, 10, 10, 9, 10, 10, 10, 10, 10, 11, 11, 9, 10, 10, 9, 10, 10, 8, @@ -714,9 +695,7 @@ static const uint8_t on2avc_cb11_bits[ON2AVC_CB_11_CODES] = { 10, 10, 10, 9, 10, 10, 9, 9, 8, 9, 9, 7, 8, 10, 10, 10, 10, 7, 8, 9, 10, 10, 7, 9, 10, 10, 9, 10, 10, 8, 8, 9, 9, 9, 10, 10, 7, 8, 9, 10, 10, 8, 9, 10, 10, 9, 9, 9, 10, 10, 4, 4, 4, 4, -}; - -static const uint8_t on2avc_cb12_bits[ON2AVC_CB_12_CODES] = { + /* Codebook 12 - 441 entries */ 2, 10, 11, 11, 11, 12, 12, 11, 11, 10, 12, 12, 12, 12, 10, 11, 11, 12, 12, 12, 12, 11, 11, 10, 11, 11, 10, 12, 13, 13, 12, 12, 10, 12, 12, 12, 12, 10, 11, 12, 12, 10, 12, 12, 12, 12, 11, 12, 12, 11, 12, 12, 11, 11, 11, 11, 10, @@ -741,9 +720,7 @@ static const uint8_t on2avc_cb12_bits[ON2AVC_CB_12_CODES] = { 11, 11, 10, 11, 12, 12, 9, 10, 11, 11, 10, 11, 11, 10, 10, 10, 11, 12, 12, 10, 11, 11, 10, 10, 10, 10, 9, 9, 10, 11, 11, 10, 10, 9, 11, 11, 11, 11, 4, 4, 4, 4, -}; - -static const uint8_t on2avc_cb13_bits[ON2AVC_CB_13_CODES] = { + /* Codebook 13 - 625 entries */ 1, 8, 10, 10, 10, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, @@ -777,9 +754,7 @@ static const uint8_t on2avc_cb13_bits[ON2AVC_CB_13_CODES] = { 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 10, 11, 11, 10, 10, 5, 5, 5, 7, 8, 10, 10, 11, 12, 14, 14, 14, 14, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 10, 10, 8, 9, 9, -}; - -static const uint8_t on2avc_cb14_bits[ON2AVC_CB_14_CODES] = { + /* Codebook 14 - 729 entries */ 1, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, @@ -819,9 +794,7 @@ static const uint8_t on2avc_cb14_bits[ON2AVC_CB_14_CODES] = { 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, -}; - -static const uint8_t on2avc_cb15_bits[ON2AVC_CB_15_CODES] = { + /* Codebook 15 - 1089 entries */ 2, 5, 8, 8, 12, 12, 12, 12, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 11, 11, 11, 11, 8, 11, 12, 13, 14, 14, 11, 12, 12, 11, @@ -882,23 +855,20 @@ static const uint8_t on2avc_cb15_bits[ON2AVC_CB_15_CODES] = { 11, 10, 11, 11, 10, 10 }; -static const uint16_t on2avc_cb_1_syms[ON2AVC_CB_1_2_CODES] = { +const uint16_t ff_on2avc_cb_syms[] = { + /* Codebook 1 - 41 entries */ 0x0000, 0x0F10, 0x01F0, 0x0011, 0xFF00, 0x00FF, 0x1111, 0xFFFF, 0x1FF1, 0xF11F, 0x11FF, 0xFF11, 0x0FF0, 0x0110, 0xF010, 0x010F, 0x10F0, 0x0F01, 0x1010, 0xF001, 0x0F0F, 0xF0F0, 0x0101, 0x100F, 0xF00F, 0x1001, 0x1F00, 0x00F1, 0x001F, 0xF100, 0x1100, 0xF1F1, 0xF1FF, 0x1F11, 0xFF1F, 0x11F1, 0x1F1F, 0x1FFF, 0xF111, 0xFFF1, 0x111F, -}; - -static const uint16_t on2avc_cb_2_syms[ON2AVC_CB_1_2_CODES] = { + /* Codebook 2 - 41 entries */ 0x00FF, 0xFFFF, 0x1111, 0x11FF, 0xFF11, 0xFF00, 0x0011, 0x100F, 0x1FF1, 0xF11F, 0x1FFF, 0x11F1, 0xF001, 0x10F0, 0x0F10, 0x010F, 0xF010, 0x1F11, 0xF111, 0xF1FF, 0x111F, 0x0F01, 0x01F0, 0x0110, 0x1001, 0x0FF0, 0xF00F, 0x1010, 0xF0F0, 0x0101, 0x0F0F, 0x1100, 0xFFF1, 0xFF1F, 0x1F1F, 0xF1F1, 0x0000, 0xF100, 0x1F00, 0x00F1, 0x001F, -}; - -static const uint16_t on2avc_cb_3_syms[ON2AVC_CB_3_4_CODES] = { + /* Codebook 3 - 313 entries */ 0x0000, 0xE000, 0x0F10, 0x000E, 0x01F2, 0x0F1E, 0xEE00, 0x1021, 0x22E0, 0x02E2, 0xE1F2, 0xEEE0, 0xE2E2, 0xE20E, 0x0FEF, 0x2200, 0x0002, 0xF2F0, 0xFFFF, 0x1E10, 0x00E2, 0xFE0F, 0x0EE2, 0x022E, 0xF001, 0xF111, 0x20F1, @@ -934,9 +904,7 @@ static const uint16_t on2avc_cb_3_syms[ON2AVC_CB_3_4_CODES] = { 0x0E2E, 0x2FF2, 0xFF11, 0xFFF1, 0x0121, 0xF2E1, 0x020E, 0xEFE1, 0x211E, 0xE00E, 0x1E2F, 0x1122, 0x1111, 0xFEF0, 0x1221, 0xE2FF, 0x1212, 0x2F21, 0x0E22, 0xF2FE, 0xFEFE, 0xE002, 0xEE22, 0xE202, 0xE222, -}; - -static const uint16_t on2avc_cb_4_syms[ON2AVC_CB_3_4_CODES] = { + /* Codebook 4 - 313 entries */ 0x1FF1, 0xF111, 0x111F, 0xF01E, 0xE011, 0x20FF, 0xFFEE, 0xF2FE, 0x220E, 0x20EE, 0x0110, 0x0F01, 0x0011, 0xF1F1, 0x20F1, 0x2F0F, 0x10F2, 0x110E, 0xF010, 0xF001, 0x10F0, 0xFFF1, 0xFF02, 0xE01F, 0x021F, 0xFE01, 0x010F, @@ -972,9 +940,7 @@ static const uint16_t on2avc_cb_4_syms[ON2AVC_CB_3_4_CODES] = { 0x0EE2, 0x02EE, 0x022E, 0x1221, 0xEFFE, 0xE1E1, 0x12EF, 0x00EE, 0x2200, 0x2112, 0xE1F2, 0xFF11, 0x11FF, 0x1100, 0x00FF, 0xFF00, 0xF11F, 0xE1F0, 0xFEEF, 0xEEFF, 0x1012, 0x1122, 0x1F22, 0xEE00, 0xEE20, -}; - -static const uint16_t on2avc_cb_5_syms[ON2AVC_CB_5_6_CODES] = { + /* Codebook 5 - 1201 entries */ 0x0000, 0x1100, 0x3F00, 0xF1FF, 0x010D, 0x0F30, 0xFE30, 0x10FE, 0xD021, 0xE23F, 0xE3EF, 0xFF33, 0xFF00, 0x03F0, 0x0301, 0xF1EE, 0xF3D1, 0xF30E, 0x023D, 0xFEDE, 0xFE0F, 0x1F11, 0xF11D, 0x10E3, 0xEDF2, 0xEEEE, 0xEE1F, @@ -1109,9 +1075,7 @@ static const uint16_t on2avc_cb_5_syms[ON2AVC_CB_5_6_CODES] = { 0x2EEE, 0x2F21, 0x2F23, 0x2103, 0x2123, 0x3FD1, 0x3FE2, 0xD21E, 0x3102, 0x3230, 0xEF23, 0xE2FD, 0x0D1E, 0x2EFD, 0xFDDF, 0x2FD2, 0x322F, 0x002E, 0xFE2F, 0xF2F2, 0xF221, 0x1EE1, -}; - -static const uint16_t on2avc_cb_6_syms[ON2AVC_CB_5_6_CODES] = { + /* Codebook 6 - 1201 entries */ 0xFF1F, 0x1EF0, 0x0D32, 0x3E30, 0x0D0F, 0x2E02, 0x0D10, 0xD0E3, 0xD33D, 0xDDD3, 0xD030, 0x0DD0, 0x3DD3, 0x1E10, 0x2DE1, 0x20EE, 0x11F1, 0xF0F2, 0xFE1E, 0x1D22, 0xEEFF, 0xE0F1, 0xFEEF, 0xE101, 0xDEF2, 0x2EE2, 0x00FD, @@ -1246,9 +1210,7 @@ static const uint16_t on2avc_cb_6_syms[ON2AVC_CB_5_6_CODES] = { 0xDF1F, 0x0321, 0x022E, 0xD1D3, 0xE03D, 0x3FDD, 0x320D, 0x1F0E, 0x1F1D, 0x1F13, 0x1102, 0xD22D, 0xE3E3, 0x0330, 0x233E, 0x0FED, 0x1203, 0xFEFE, 0x1E1E, 0x20FF, 0x10E3, 0x132E, -}; - -static const uint16_t on2avc_cb_7_syms[ON2AVC_CB_7_8_CODES] = { + /* Codebook 7 - 3281 entries */ 0x0000, 0x00FF, 0x3F00, 0xCC00, 0x1C10, 0x1140, 0xFCEF, 0x4220, 0x43C1, 0xCCCE, 0xFF40, 0xF2DC, 0xF21C, 0x1E4F, 0x114C, 0x2E1F, 0x30F0, 0xC020, 0xC2E0, 0x0022, 0x01C1, 0x014F, 0x1012, 0x104D, 0xEF21, 0xFEDC, 0xFFE2, @@ -1614,9 +1576,7 @@ static const uint16_t on2avc_cb_7_syms[ON2AVC_CB_7_8_CODES] = { 0x0E0C, 0x02E2, 0x03DC, 0x12DC, 0x142F, 0x2E11, 0x2FEF, 0x22F1, 0x24DF, 0x2431, 0x3EF0, 0x3001, 0x32F0, 0x4DEF, 0x4FE1, 0xC10F, 0xDC0F, 0xF0FE, 0xDC2F, 0x0F03, 0x01D4, 0x0CE0, 0x0103, -}; - -static const uint16_t on2avc_cb_8_syms[ON2AVC_CB_7_8_CODES] = { + /* Codebook 8 - 3281 entries */ 0x0E24, 0x0E3D, 0x0FDC, 0x0FFC, 0x0F3E, 0x0134, 0x02CC, 0x024C, 0x03D0, 0x030F, 0x04CE, 0x04F3, 0x1C41, 0x1D1D, 0x1D20, 0x1D33, 0x1E03, 0x10D0, 0x10D2, 0x102D, 0x103E, 0x1030, 0x11D3, 0x12D0, 0x13F3, 0x134E, 0x144D, @@ -1982,9 +1942,7 @@ static const uint16_t on2avc_cb_8_syms[ON2AVC_CB_7_8_CODES] = { 0xD33D, 0xD4D4, 0xEC3D, 0xEC33, 0xED03, 0xED1C, 0xED2D, 0xED2F, 0xEE33, 0xEFE3, 0xE0D1, 0xE3ED, 0xE3FC, 0xE32D, 0xE40E, 0xFCD2, 0xFC4D, 0xFDCE, 0xF31D, 0xF32C, 0x0D23, 0x0D43, 0x0ED3, -}; - -static const uint16_t on2avc_cb_9_syms[ON2AVC_CB_9_10_CODES] = { + /* Codebook 9 - 121 entries */ 0x0000, 0xFF00, 0x05FF, 0x02FB, 0xFE02, 0xFDFE, 0x03FE, 0x05FE, 0x0301, 0x0400, 0x02FD, 0x0103, 0xFCFE, 0x02FC, 0x0303, 0x04FD, 0x0004, 0x00FC, 0x0302, 0x04FF, 0x0502, 0xFC05, 0xFC01, 0xFDFC, 0xFC04, 0x03FC, 0x0504, @@ -1999,9 +1957,7 @@ static const uint16_t on2avc_cb_9_syms[ON2AVC_CB_9_10_CODES] = { 0xFFFF, 0x0101, 0xFD01, 0xFEFC, 0x04FC, 0x0404, 0xFE04, 0x0402, 0x01FD, 0xFDFF, 0xFB02, 0x02FE, 0x05FB, 0x0505, 0xFFFE, 0xFE01, 0x0102, 0x0202, 0x0203, 0xFD02, 0x0100, 0x0001, -}; - -static const uint16_t on2avc_cb_10_syms[ON2AVC_CB_9_10_CODES] = { + /* Codebook 10 - 121 entries */ 0x04FE, 0x0401, 0x04FB, 0x04FD, 0xFDFD, 0xFFFC, 0xFCFC, 0xFE00, 0x03FB, 0xFC03, 0x04FF, 0xFD00, 0x03FC, 0x0404, 0x0405, 0xFCFB, 0xFD05, 0xFB03, 0x05FD, 0x03FD, 0x0101, 0x05FF, 0x0504, 0xFBFC, 0xFD03, 0x0003, 0x05FE, @@ -2016,9 +1972,7 @@ static const uint16_t on2avc_cb_10_syms[ON2AVC_CB_9_10_CODES] = { 0x02FE, 0x02FD, 0x02FC, 0xFD04, 0xFD02, 0x0305, 0xFCFF, 0x04FC, 0xFC04, 0xFC01, 0xFF04, 0xFE02, 0xFBFD, 0xFC02, 0xFCFD, 0x0002, 0x0303, 0x01FC, 0x0104, 0x00FE, 0xFDFB, 0x0503, -}; - -static const uint16_t on2avc_cb11_syms[ON2AVC_CB_11_CODES] = { + /* Codebook 11 - 225 entries */ 0x0000, 0xFA04, 0xFBFA, 0xFAFB, 0xFE04, 0x0103, 0xFDFC, 0xFB03, 0x0504, 0x04FF, 0xFF07, 0x04FE, 0x0506, 0x01FA, 0xFDFE, 0xFAFF, 0x07FF, 0xFD05, 0x05F9, 0x0302, 0xFE07, 0xF902, 0x0701, 0x0005, 0xF907, 0x07F9, 0xFC02, @@ -2044,9 +1998,7 @@ static const uint16_t on2avc_cb11_syms[ON2AVC_CB_11_CODES] = { 0x04FC, 0x0503, 0x03FF, 0xFFFD, 0x04FA, 0xFEFC, 0x0402, 0x03FB, 0x0505, 0xFE00, 0x01FD, 0x02FC, 0x0706, 0xFBFE, 0xFDFF, 0xFFFC, 0xF9FB, 0xFBFC, 0xFCFE, 0xF901, 0xFCFF, 0x05FD, 0x0405, 0x0100, 0xFF00, 0x0001, 0x00FF, -}; - -static const uint16_t on2avc_cb12_syms[ON2AVC_CB_12_CODES] = { + /* Codebook 12 - 441 entries */ 0x0000, 0xFD03, 0x09FE, 0xFBFF, 0xF701, 0xF7F8, 0x0606, 0xFBFC, 0x0904, 0x08FF, 0xFB05, 0x0207, 0x04F6, 0x0AFA, 0x0801, 0xF703, 0xFD05, 0xF904, 0xFAF6, 0xFA02, 0x03F9, 0xF7FD, 0xFBFD, 0x04FF, 0x03F7, 0x0502, 0x0208, @@ -2096,9 +2048,7 @@ static const uint16_t on2avc_cb12_syms[ON2AVC_CB_12_CODES] = { 0x0901, 0xF708, 0x07F9, 0x00F9, 0x01FB, 0xFA04, 0xFBF9, 0x03FB, 0x03FC, 0x0708, 0x0808, 0x0300, 0xFDFD, 0x06FF, 0xF9F9, 0xF6FC, 0xF700, 0x0305, 0xF802, 0xF706, 0xF9FA, 0xFC06, 0x07FE, 0x0001, 0x0100, 0xFF00, 0x00FF, -}; - -static const uint16_t on2avc_cb13_syms[ON2AVC_CB_13_CODES] = { + /* Codebook 13 - 625 entries */ 0x0000, 0x0201, 0xFDFF, 0x03FE, 0x0302, 0xF909, 0xF90A, 0xFA00, 0xFA0A, 0x00F7, 0x08F6, 0x09F6, 0x09F8, 0x0901, 0x0AF7, 0x0A03, 0x0BF4, 0xF6F7, 0xF6FB, 0xF6FF, 0xF600, 0xF706, 0xF801, 0xF806, 0xF808, 0xFDF6, 0xFF09, @@ -2169,9 +2119,7 @@ static const uint16_t on2avc_cb13_syms[ON2AVC_CB_13_CODES] = { 0xF608, 0xF703, 0xF707, 0xF807, 0xF5F4, 0xF70B, 0xFAFA, 0xFA03, 0xFCFA, 0xFD0C, 0x00FC, 0x06F5, 0x06FF, 0x0702, 0xF5FE, 0x0705, 0x0C05, 0xFEF4, 0x00FD, 0xFE02, 0xFEFD, 0x0301, -}; - -static const uint16_t on2avc_cb14_syms[ON2AVC_CB_14_CODES] = { + /* Codebook 14 - 729 entries */ 0x0000, 0x01FF, 0xF9F8, 0xF9F9, 0xF907, 0xFA04, 0xFBF8, 0xFB07, 0xFB08, 0xFB0A, 0xFC07, 0xFC0A, 0xFDF5, 0xFDF6, 0xFEF5, 0xFFFB, 0xFF08, 0xFF0B, 0x01F5, 0x02F6, 0x03F9, 0x04FA, 0x04FB, 0x04FC, 0x040C, 0x05FF, 0x06FD, @@ -2253,9 +2201,7 @@ static const uint16_t on2avc_cb14_syms[ON2AVC_CB_14_CODES] = { 0x0B08, 0x0CF5, 0x0CF6, 0x0CF8, 0x0CFA, 0x0CFE, 0xF30D, 0x0C02, 0x0C08, 0xF4F7, 0xF405, 0xF5F4, 0xF5F5, 0xF5F7, 0xF6F8, 0xF6F9, 0xF6FA, 0xF6FD, 0xF602, 0xF7F7, 0xF701, 0xF706, 0xF8F6, 0xF8FC, 0xF8FD, 0xF806, 0xF9F6, -}; - -static const uint16_t on2avc_cb15_syms[ON2AVC_CB_15_CODES] = { + /* Codebook 15 - 1089 entries */ 0x0000, 0x00FF, 0xFEFF, 0x0201, 0xFAFF, 0xFBFB, 0xFF06, 0x06FE, 0x100E, 0xF2F6, 0xF2FF, 0xF205, 0xF3F3, 0xF6F2, 0xF8F5, 0xF90B, 0xFAF8, 0xFAF9, 0xFA06, 0xFCF2, 0x0008, 0x0209, 0x030E, 0x04F2, 0x040E, 0x040F, 0x05F7, @@ -2379,20 +2325,6 @@ static const uint16_t on2avc_cb15_syms[ON2AVC_CB_15_CODES] = { 0x0F05, 0x0F06, 0xF000, 0xFB04, 0xF0F3, 0xFFFA, 0x1000, 0x0A10, 0x0CF0 }; -const uint8_t * const ff_on2avc_cb_bits[] = { - on2avc_cb1_bits, on2avc_cb2_bits, on2avc_cb3_bits, on2avc_cb4_bits, - on2avc_cb5_bits, on2avc_cb6_bits, on2avc_cb7_bits, on2avc_cb8_bits, - on2avc_cb9_bits, on2avc_cb10_bits, on2avc_cb11_bits, on2avc_cb12_bits, - on2avc_cb13_bits, on2avc_cb14_bits, on2avc_cb15_bits -}; - -const uint16_t * const ff_on2avc_cb_syms[] = { - on2avc_cb_1_syms, on2avc_cb_2_syms, on2avc_cb_3_syms, on2avc_cb_4_syms, - on2avc_cb_5_syms, on2avc_cb_6_syms, on2avc_cb_7_syms, on2avc_cb_8_syms, - on2avc_cb_9_syms, on2avc_cb_10_syms, on2avc_cb11_syms, on2avc_cb12_syms, - on2avc_cb13_syms, on2avc_cb14_syms, on2avc_cb15_syms -}; - const int ff_on2avc_cb_elems[] = { ON2AVC_CB_1_2_CODES, ON2AVC_CB_1_2_CODES, ON2AVC_CB_3_4_CODES, ON2AVC_CB_3_4_CODES, ON2AVC_CB_5_6_CODES, ON2AVC_CB_5_6_CODES, diff --git a/libavcodec/on2avcdata.h b/libavcodec/on2avcdata.h index dee8c3e102..c5e7c80b68 100644 --- a/libavcodec/on2avcdata.h +++ b/libavcodec/on2avcdata.h @@ -41,8 +41,8 @@ extern const On2AVCMode ff_on2avc_modes_44[8]; extern const uint8_t ff_on2avc_scale_diff_syms[]; extern const uint8_t ff_on2avc_scale_diff_bits[]; -extern const uint8_t * const ff_on2avc_cb_bits[]; -extern const uint16_t * const ff_on2avc_cb_syms[]; +extern const uint8_t ff_on2avc_cb_lens[]; +extern const uint16_t ff_on2avc_cb_syms[]; extern const int ff_on2avc_cb_elems[]; extern const float ff_on2avc_window_long_32000[1024]; From patchwork Tue Nov 10 10:47:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23472 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 43B45449B06 for ; Tue, 10 Nov 2020 12:49:39 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2B7E368BDCC; Tue, 10 Nov 2020 12:49:39 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0C9BA68BD9E for ; Tue, 10 Nov 2020 12:49:30 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id b8so12145616wrn.0 for ; Tue, 10 Nov 2020 02:49:29 -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=tyn1DTecBKX/qW94YUb/YME7qUBDC2n8j5tBFnzCA84=; b=tXD0l4OcuMTZwZG1SaX3j85TlosZ4rVBAswrFDrmedGdWaVMZ1WzrBFeOsLyt7F0Nq T7UErqirscKHFuooF3z5g1OsigdCMfHXT7J9gyQybwHuLnulrjaDTY9KtKi2RYON9wic 4WVo4b/0/z3EeoL0gnSdSiTYJrOamOkvdYytZTAy0qG9Ka42bKAQhoWVZkCEWoFDUq8X kXy2EF05H543IjAFq1njQftE+Da0eVNW4h22P/jZhl/1z3ZgQpqedVK4iM/g1vU5aOng NntDESDacLPDIOoaWWWhEhDH+GpqH+7+Z3jw4I69Qn/71oSDotb/lxfn/tXqEZ8sSNIQ pp/Q== 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=tyn1DTecBKX/qW94YUb/YME7qUBDC2n8j5tBFnzCA84=; b=uYGvA3FoxM0PJApwADmjFGea4zm1RinfzTdlN6Uz5dMkCG2H3Q8RkR68cX3oe/yol5 bVJrcpKIa77Lg7rvkWd99Lo8IPmXoZ/7Wwj5MiETWkFjkteSEsaWoSUiObn5grqE3O+F 98w0K91bwFqtdaKLI+hLLPMp8onOkgWBjThJzR8wpxAfm8iArZeeWfHlZRslXYyXnoH5 3DkYI1bn76t0TIqWDPoEcLxwB/95BvJPui3eUr5FWVsqoa+iU26W9tQjJclndwM2KbGb 2zdP70pDmj/TkT4z+voHv0Yt7YLufC79z1Mj22OdgZEMM8WRTAVZZfbspO+rt3pKQY2k 5oXg== X-Gm-Message-State: AOAM530ndQcnObpifRUCjMeg0QBC2Jf5z9bdEm21/7wo0BxQjuGV2GEx yR17AQkUc0zmedu5jA+9zkl122jAuoA= X-Google-Smtp-Source: ABdhPJzUevYZQqLYntKgYLi+1bxp84xWVdSYNeyJ1HDETphhGHMFjkMo/ToSiwWTg3Xo5sNc6Kthug== X-Received: by 2002:a05:6000:345:: with SMTP id e5mr22194330wre.333.1605005369331; Tue, 10 Nov 2020 02:49:29 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:28 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:07 +0100 Message-Id: <20201110104851.321029-11-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 010/114] avcodec/on2avc: Apply offset when initializing VLC 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/on2avc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c index 54afe8b13a..c79d3d64fb 100644 --- a/libavcodec/on2avc.c +++ b/libavcodec/on2avc.c @@ -169,7 +169,7 @@ static int on2avc_decode_band_scales(On2AVCContext *c, GetBitContext *gb) scale = get_bits(gb, 7); first = 0; } else { - scale += get_vlc2(gb, c->scale_diff.table, 9, 3) - 60; + scale += get_vlc2(gb, c->scale_diff.table, 9, 3); } if (scale < 0 || scale > 127) { av_log(c->avctx, AV_LOG_ERROR, "Invalid scale value %d\n", @@ -960,7 +960,7 @@ static av_cold int on2avc_decode_init(AVCodecContext *avctx) ret = ff_init_vlc_from_lengths(&c->scale_diff, 9, ON2AVC_SCALE_DIFFS, ff_on2avc_scale_diff_bits, 1, - ff_on2avc_scale_diff_syms, 1, 1, 0, 0); + ff_on2avc_scale_diff_syms, 1, 1, -60, 0); if (ret < 0) goto vlc_fail; for (i = 1; i < 16; i++) { From patchwork Tue Nov 10 10:47:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23473 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 4E511449B06 for ; Tue, 10 Nov 2020 12:49:40 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 35A3968BDD4; Tue, 10 Nov 2020 12:49:40 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 38AE468BD49 for ; Tue, 10 Nov 2020 12:49:31 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id 23so12136700wrc.8 for ; Tue, 10 Nov 2020 02:49:31 -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=VLppVoIdb10TlgXWveMMOcE7KoD6uWQXV/R8jEaZQ04=; b=POEoR8HxrM3WipQ+jLwDYKuCL9HY6nquugvYTHpHjR5kdtRtq47b9p5tNg8nwT0799 KBMd7U3K0EEsTtsK1+OuPeM2zhmvPvSF47tb2VUde6wtCluLgicNvOWjkdPRZFclKNWG fAI+3NIq8sP72QgXdJ8JKhrl0WC9TalNkheIxDqwyWVCbOLRDk/PSbfCiY/Wy6+nLuZe 97nSqrYPdW0ummjVwEjId8iFcU3aPTlj44XWoRi9mlvnECJpb8+7GE6to0O9kywx6CYw ul5mc/RdavshCehiImg57iZkbg4LwZ+rWkk17UFp73DwXAcjC9wYNA5ZAtvco5whM0Gb MThQ== 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=VLppVoIdb10TlgXWveMMOcE7KoD6uWQXV/R8jEaZQ04=; b=Bf8f27LmXwqX6inbbER4kSTwHXhB6ZALu69cT+Wi22hfyR6+2sm6aN9oPqPjNuMO8h FGSLpuJgDeA8mnVWrc+vDIHqvynwNZ8yQ5sQ9A66Hxy735ftiNXJNdZ7BbkAX9Z8EGGq LdOxSsNUG4F4yOq4eXiPrrjWch0S6kEbEjXbRWbAPL1ijPViHMB4deqMlMtT+hyiZsRg XQhzYauTYrFDGmTqIcPltz2cBmH6OG42P3MN2EyLWFmGts0OZ3h9B9zR9FLbzqW0enNa 4rrPRJopeD3OY2uejinbj923duIEiMrmEwX+A8LlOlCQlp4cjN94BP8Lk+SB9yzWOCEF oNGQ== X-Gm-Message-State: AOAM53311BEDwfOi/LDMeWfhn7iFrYbjSkGDrLU+Dq4i96OdJBsE8ddU yL52vU0I212fkGXiHWifdGOoE+hqIgY= X-Google-Smtp-Source: ABdhPJxby4kBtNBjD2tK0qPSJhFF03+SMQSVKCTa6C8BSDrc02wEtCT0vI2gQcFE+GmDJPhDVFQ2OA== X-Received: by 2002:adf:dc0a:: with SMTP id t10mr23257390wri.314.1605005370234; Tue, 10 Nov 2020 02:49:30 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:29 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:08 +0100 Message-Id: <20201110104851.321029-12-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 011/114] avcodec/imc: Make Huffman tables smaller 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" The IMC decoder uses Huffman tables which are created at runtime from length tables of type uint8_t and code tables of type uint16_t together with an implicit symbols table (i.e. symbol[i] == i). This commit changes this: All three tables are subjected to the same permutation to order the codes from left to right in the tree; afterwards the codes can be omitted because they are easily computable at runtime from the lengths, whereas the symbols need to be explicitly coded now. But said symbols fit into an uint8_t, so one saves space. Signed-off-by: Andreas Rheinhardt --- libavcodec/imc.c | 7 +++-- libavcodec/imcdata.h | 66 ++++++++++++++++++++++---------------------- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 70ad5b1dbd..19a323e17d 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -239,9 +239,10 @@ static av_cold int imc_decode_init(AVCodecContext *avctx) for (j = 0; j < 4; j++) { huffman_vlc[i][j].table = &vlc_tables[vlc_offsets[i * 4 + j]]; huffman_vlc[i][j].table_allocated = vlc_offsets[i * 4 + j + 1] - vlc_offsets[i * 4 + j]; - init_vlc(&huffman_vlc[i][j], IMC_VLC_BITS, imc_huffman_sizes[i], - imc_huffman_lens[i][j], 1, 1, - imc_huffman_bits[i][j], 2, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&huffman_vlc[i][j], IMC_VLC_BITS, imc_huffman_sizes[i], + imc_huffman_lens[i][j], 1, + imc_huffman_syms[i][j], 1, 1, + 0, INIT_VLC_USE_NEW_STATIC); } } diff --git a/libavcodec/imcdata.h b/libavcodec/imcdata.h index 64e7c7185e..46037bd555 100644 --- a/libavcodec/imcdata.h +++ b/libavcodec/imcdata.h @@ -114,55 +114,55 @@ static const uint8_t imc_huffman_sizes[4] = { static const uint8_t imc_huffman_lens[4][4][18] = { { - { 16, 15, 13, 11, 8, 5, 3, 1, 2, 4, 6, 9, 10, 12, 14, 16, 7, 0 }, - { 10, 8, 7, 6, 4, 4, 3, 2, 2, 3, 4, 6, 7, 9, 11, 11, 7, 0 }, - { 15, 15, 14, 11, 8, 6, 4, 2, 1, 4, 5, 7, 9, 10, 12, 13, 4, 0 }, - { 13, 11, 10, 8, 6, 4, 2, 2, 2, 3, 5, 7, 9, 12, 15, 15, 14, 0 }, + { 1, 2, 5, 6, 11, 12, 15, 16, 16, 14, 13, 10, 9, 8, 7, 4, 3 }, + { 2, 3, 3, 4, 4, 4, 6, 6, 7, 7, 7, 8, 9, 10, 11, 11, 2 }, + { 1, 4, 4, 7, 9, 10, 12, 15, 15, 14, 13, 11, 8, 6, 5, 4, 2 }, + { 2, 2, 4, 8, 9, 14, 15, 15, 13, 12, 11, 10, 7, 6, 5, 3, 2 }, }, { - { 14, 12, 10, 8, 7, 4, 2, 2, 2, 3, 5, 7, 9, 11, 13, 14, 7, 0 }, - { 14, 13, 11, 8, 6, 4, 3, 2, 2, 3, 5, 7, 9, 10, 12, 14, 3, 0 }, - { 13, 12, 10, 7, 5, 4, 3, 2, 2, 3, 4, 6, 8, 9, 11, 13, 4, 0 }, - { 13, 12, 10, 7, 5, 4, 3, 2, 2, 3, 4, 6, 8, 9, 11, 13, 4, 0 }, + { 2, 2, 3, 4, 7, 7, 10, 11, 12, 14, 14, 13, 9, 8, 7, 5, 2 }, + { 2, 3, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 3, 2 }, + { 2, 3, 3, 4, 4, 5, 7, 9, 11, 12, 13, 13, 10, 8, 6, 4, 2 }, + { 2, 3, 3, 4, 4, 5, 7, 9, 11, 12, 13, 13, 10, 8, 6, 4, 2 }, }, { - { 16, 14, 12, 10, 8, 5, 3, 1, 2, 4, 7, 9, 11, 13, 15, 17, 6, 17 }, - { 15, 13, 11, 8, 6, 4, 2, 2, 2, 3, 5, 7, 10, 12, 14, 16, 9, 16 }, - { 14, 12, 11, 9, 8, 6, 3, 1, 2, 5, 7, 10, 13, 15, 16, 17, 4, 17 }, - { 16, 14, 12, 9, 7, 5, 2, 2, 2, 3, 4, 6, 8, 11, 13, 15, 10, 16 }, + { 3, 5, 8, 9, 12, 15, 17, 17, 16, 14, 13, 11, 10, 7, 6, 4, 2, 1 }, + { 4, 7, 8, 10, 11, 12, 15, 16, 16, 14, 13, 9, 6, 5, 3, 2, 2, 2 }, + { 4, 5, 6, 7, 12, 13, 17, 17, 16, 15, 14, 11, 10, 9, 8, 3, 2, 1 }, + { 2, 5, 7, 8, 14, 15, 16, 16, 13, 12, 11, 10, 9, 6, 4, 3, 2, 2 }, }, { - { 13, 11, 10, 8, 7, 5, 2, 2, 2, 4, 6, 9, 12, 14, 15, 16, 3, 16 }, - { 11, 11, 10, 9, 8, 7, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 6, 5 }, - { 9, 9, 7, 6, 5, 4, 3, 3, 2, 3, 4, 5, 4, 5, 5, 6, 8, 6 }, - { 13, 12, 10, 8, 5, 3, 3, 2, 2, 3, 4, 7, 9, 11, 14, 15, 6, 15 }, + { 2, 4, 7, 9, 10, 12, 13, 15, 16, 16, 14, 11, 8, 6, 5, 3, 2, 2 }, + { 3, 5, 5, 7, 10, 11, 11, 9, 8, 6, 5, 4, 4, 3, 3, 3, 3, 3 }, + { 5, 8, 9, 9, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2 }, + { 2, 3, 5, 7, 8, 11, 12, 13, 15, 15, 14, 10, 9, 6, 4, 3, 3, 2 }, } }; -static const uint16_t imc_huffman_bits[4][4][18] = { +static const uint8_t imc_huffman_syms[4][4][18] = { { - { 0xCC32, 0x6618, 0x1987, 0x0660, 0x00CD, 0x0018, 0x0007, 0x0000, 0x0002, 0x000D, 0x0032, 0x0199, 0x0331, 0x0CC2, 0x330D, 0xCC33, 0x0067, 0x0000 }, - { 0x02FE, 0x00BE, 0x005E, 0x002D, 0x000A, 0x0009, 0x0003, 0x0003, 0x0000, 0x0002, 0x0008, 0x002C, 0x005D, 0x017E, 0x05FE, 0x05FF, 0x005C, 0x0000 }, - { 0x5169, 0x5168, 0x28B5, 0x0517, 0x00A3, 0x0029, 0x0008, 0x0003, 0x0000, 0x0009, 0x0015, 0x0050, 0x0144, 0x028A, 0x0A2C, 0x145B, 0x000B, 0x0000 }, - { 0x1231, 0x048D, 0x0247, 0x0090, 0x0025, 0x0008, 0x0001, 0x0003, 0x0000, 0x0005, 0x0013, 0x0049, 0x0122, 0x0919, 0x48C3, 0x48C2, 0x2460, 0x0000 }, + { 7, 8, 5, 10, 3, 13, 1, 0, 15, 14, 2, 12, 11, 4, 16, 9, 6 }, + { 8, 9, 6, 10, 5, 4, 11, 3, 16, 12, 2, 1, 13, 0, 14, 15, 7 }, + { 8, 6, 9, 11, 12, 13, 14, 1, 0, 2, 15, 3, 4, 5, 10, 16, 7 }, + { 8, 6, 5, 3, 12, 16, 15, 14, 0, 13, 1, 2, 11, 4, 10, 9, 7 }, }, { - { 0x2D1D, 0x0B46, 0x02D0, 0x00B5, 0x0059, 0x000A, 0x0003, 0x0001, 0x0000, 0x0004, 0x0017, 0x005B, 0x0169, 0x05A2, 0x168F, 0x2D1C, 0x0058, 0x0000 }, - { 0x1800, 0x0C01, 0x0301, 0x0061, 0x0019, 0x0007, 0x0004, 0x0003, 0x0000, 0x0005, 0x000D, 0x0031, 0x00C1, 0x0181, 0x0601, 0x1801, 0x0002, 0x0000 }, - { 0x1556, 0x0AAA, 0x02AB, 0x0054, 0x0014, 0x000B, 0x0002, 0x0003, 0x0000, 0x0003, 0x0008, 0x002B, 0x00AB, 0x0154, 0x0554, 0x1557, 0x0009, 0x0000 }, - { 0x1556, 0x0AAA, 0x02AB, 0x0054, 0x0014, 0x000B, 0x0002, 0x0003, 0x0000, 0x0003, 0x0008, 0x002B, 0x00AB, 0x0154, 0x0554, 0x1557, 0x0009, 0x0000 }, + { 8, 7, 9, 5, 16, 4, 2, 13, 1, 15, 0, 14, 12, 3, 11, 10, 6 }, + { 8, 16, 0, 15, 1, 14, 2, 13, 12, 3, 11, 4, 10, 5, 6, 9, 7 }, + { 8, 6, 9, 10, 16, 4, 3, 13, 14, 1, 0, 15, 2, 12, 11, 5, 7 }, + { 8, 6, 9, 10, 16, 4, 3, 13, 14, 1, 0, 15, 2, 12, 11, 5, 7 }, }, { - { 0x2993, 0x0A65, 0x0298, 0x00A7, 0x0028, 0x0004, 0x0000, 0x0001, 0x0001, 0x0003, 0x0015, 0x0052, 0x014D, 0x0533, 0x14C8, 0x5324, 0x000B, 0x5325 }, - { 0x09B8, 0x026F, 0x009A, 0x0012, 0x0005, 0x0000, 0x0001, 0x0002, 0x0003, 0x0001, 0x0003, 0x0008, 0x004C, 0x0136, 0x04DD, 0x1373, 0x0027, 0x1372 }, - { 0x0787, 0x01E0, 0x00F1, 0x003D, 0x001F, 0x0006, 0x0001, 0x0001, 0x0001, 0x0002, 0x000E, 0x0079, 0x03C2, 0x0F0D, 0x1E19, 0x3C30, 0x0000, 0x3C31 }, - { 0x4B06, 0x12C0, 0x04B1, 0x0097, 0x0024, 0x0008, 0x0002, 0x0003, 0x0000, 0x0003, 0x0005, 0x0013, 0x004A, 0x0259, 0x0961, 0x2582, 0x012D, 0x4B07 }, + { 6, 5, 4, 11, 2, 14, 15, 17, 0, 1, 13, 12, 3, 10, 16, 9, 8, 7 }, + { 5, 11, 3, 12, 2, 13, 0, 17, 15, 14, 1, 16, 4, 10, 9, 6, 7, 8 }, + { 16, 9, 5, 10, 1, 12, 15, 17, 14, 13, 0, 2, 11, 3, 4, 6, 8, 7 }, + { 8, 5, 4, 12, 1, 15, 0, 17, 14, 2, 13, 16, 3, 11, 10, 9, 6, 7 }, }, { - { 0x0A5A, 0x0297, 0x014A, 0x0053, 0x0028, 0x000B, 0x0003, 0x0000, 0x0002, 0x0004, 0x0015, 0x00A4, 0x052C, 0x14B7, 0x296C, 0x52DB, 0x0003, 0x52DA }, - { 0x0193, 0x0192, 0x00C8, 0x0065, 0x0033, 0x0018, 0x0007, 0x0004, 0x0000, 0x0004, 0x0005, 0x0007, 0x0006, 0x0003, 0x0005, 0x0005, 0x000D, 0x0004 }, - { 0x0012, 0x0013, 0x0005, 0x0003, 0x0000, 0x0003, 0x0005, 0x0004, 0x0003, 0x0003, 0x0005, 0x0005, 0x0004, 0x0004, 0x0003, 0x0005, 0x0008, 0x0004 }, - { 0x0D66, 0x06B2, 0x01AD, 0x006A, 0x000C, 0x0005, 0x0004, 0x0000, 0x0003, 0x0002, 0x0007, 0x0034, 0x00D7, 0x0358, 0x1ACF, 0x359C, 0x001B, 0x359D }, + { 7, 9, 4, 11, 2, 12, 0, 14, 17, 15, 13, 1, 3, 10, 5, 16, 8, 6 }, + { 8, 17, 15, 5, 2, 1, 0, 3, 4, 16, 6, 7, 14, 13, 9, 10, 12, 11 }, + { 4, 16, 0, 1, 2, 3, 17, 15, 14, 13, 11, 5, 12, 10, 9, 7, 6, 8 }, + { 7, 9, 4, 11, 3, 13, 1, 0, 15, 17, 14, 2, 12, 16, 10, 6, 5, 8 }, } }; From patchwork Tue Nov 10 10:47:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23475 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 B2146449B06 for ; Tue, 10 Nov 2020 12:49:42 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9D54B68BDF3; Tue, 10 Nov 2020 12:49:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6351368BDB7 for ; Tue, 10 Nov 2020 12:49:32 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id h62so2532947wme.3 for ; Tue, 10 Nov 2020 02:49:32 -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=fms6BVsb9lAjMcYe3YHbXwMNWhCV5cwv3KNn8k9w+Qs=; b=DsS/+6DeimlH5ILsXS5pCHkJOV0zAIvBZGVs6TGYVDbL5lGdE0TyctsDhmP2UxGR3O beXbbQDLJdS7tJo5Ijz5w/i2ckBJX0xIgr+B4Szg2Mk6fjmGFNu+hkFL6Bxjd9TXp9vw pZ0kyl48OOX6sZ3P/BozYFCvDJ2hZwnBvB8eJFxvVjtxdlgdaf0fN8J51EoER+N7xpix 28D38kx/fLEFIFeqfhlVj6bw8tp1zZV9e+yZFRSMlyFP9kylsf/Yw5N197SNKRdvzDzp hYzgdJh9kz4vXbZt1zhWVlZQRm16gW31XZPBo4R9weCVWO+FiGSJOPuweIMY8bbRf5eF fxUw== 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=fms6BVsb9lAjMcYe3YHbXwMNWhCV5cwv3KNn8k9w+Qs=; b=e6/Xn0kmqT6nCnJW3of7vL5svD6XgOwbWfyFCLCAuP3IXP16maZTYaHTVPMeCCsEUl m/l+I4x3FC4zWSSg44cgjMqY9AANSx+/07QgEMh1Sd1t6+6wqm+X6Sl7+Jptv586lprW LVf0nxRBtYhek0o2VAzGb5YNO5FuyWHVY8Uho1Tmw5w7IfSt5KEUH7hsWlz4jpj6PI19 A3zCCSD5f0r0w5Gjv+FHBifWMPKJ9PZXqjZXCGiDBYVwBoL6tEbJpjrhzM84knn17KvP NuzYpAE3vCsqRzYuToxU6Oxv+LHp3fC/W+5A7KCxKUZfnjum+eTCMQ+cxrkDkqP94okk wD0g== X-Gm-Message-State: AOAM530lIWqDN0+C/i6/85/IZUbg3fVOgDKDs4Hx9m02ejlVd4cRiB/p psGYcmMJX+rkxsy1v90z8Y8yLu+H9s4= X-Google-Smtp-Source: ABdhPJzYKoOMR60NGl92qFdAVT85Xmt9t6ObgYFOsQ88oGSBkFzEcOaL/8NlcEvrXy+xGfuWYqUFJg== X-Received: by 2002:a7b:cc13:: with SMTP id f19mr3970364wmh.44.1605005371529; Tue, 10 Nov 2020 02:49:31 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:30 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:09 +0100 Message-Id: <20201110104851.321029-13-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 012/114] avcodec/imc: Avoid offsets table when creating 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/imc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 19a323e17d..a9e8a9c7e3 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -113,11 +113,6 @@ static VLC huffman_vlc[4][4]; #define IMC_VLC_BITS 9 #define VLC_TABLES_SIZE 9512 -static const int vlc_offsets[17] = { - 0, 640, 1156, 1732, 2308, 2852, 3396, 3924, - 4452, 5220, 5860, 6628, 7268, 7908, 8424, 8936, VLC_TABLES_SIZE -}; - static VLC_TYPE vlc_tables[VLC_TABLES_SIZE][2]; static inline double freq2bark(double freq) @@ -235,14 +230,15 @@ static av_cold int imc_decode_init(AVCodecContext *avctx) q->sqrt_tab[i] = sqrt(i); /* initialize the VLC tables */ - for (i = 0; i < 4 ; i++) { + for (int i = 0, offset = 0; i < 4 ; i++) { for (j = 0; j < 4; j++) { - huffman_vlc[i][j].table = &vlc_tables[vlc_offsets[i * 4 + j]]; - huffman_vlc[i][j].table_allocated = vlc_offsets[i * 4 + j + 1] - vlc_offsets[i * 4 + j]; + huffman_vlc[i][j].table = &vlc_tables[offset]; + huffman_vlc[i][j].table_allocated = VLC_TABLES_SIZE - offset;; ff_init_vlc_from_lengths(&huffman_vlc[i][j], IMC_VLC_BITS, imc_huffman_sizes[i], imc_huffman_lens[i][j], 1, imc_huffman_syms[i][j], 1, 1, 0, INIT_VLC_USE_NEW_STATIC); + offset += huffman_vlc[i][j].table_size; } } From patchwork Tue Nov 10 10:47:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23485 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 F1ED844B2CF for ; Tue, 10 Nov 2020 12:53:06 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 147F668BDBF; Tue, 10 Nov 2020 12:49:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 76E1568BD8B for ; Tue, 10 Nov 2020 12:49:37 +0200 (EET) Received: by mail-wm1-f51.google.com with SMTP id s13so2525676wmh.4 for ; Tue, 10 Nov 2020 02:49:37 -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=WDn1EEHxaY4UNYXGwAq+stnl5yjRWPgEOe4s1xTBHVI=; b=ZJ29ilzRsHckREm6YyLyMyoQi9zGJAUAZ0bCQluRiyPWbu614dUR3gNGAS+vlnVI+2 y3y61r0WUYOBybDpoy5cGaWOZMluhPZtAfRdBey7awTEL0yni0KP4endEX0C5wufk2yv IptFRIJ0O5mfaTf67DSLJZxEgHV4Jk0SLZtYU9cjsDnKwWxjJspEx9/WaXxbi266u0PL kV9zCR13t4C214xli62J4r6TOG6tq6lki30aNogIABsJaSmHRTai0LEpE6rYxGoCikwV JTvNllnVhh62LNrsvGjYlMR3tjXoQyF1Qe6V2Yc/5u6BsxVRft7pTMBgm+/vWRNipDdn v7dQ== 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=WDn1EEHxaY4UNYXGwAq+stnl5yjRWPgEOe4s1xTBHVI=; b=ESrOzbh6monzUMj4mQv4A99bSYHQOUx0mh0Eq08AKCIQif6GAQ03lhHrFffjK8Ld/M 3QBIDxr0u17ubReBca0exEuw43deQlOpZtVsX8Dj48jb8R8n27VIj1g9MMgTVF6Wxhtu 2LAWT4W7Q0M1xN9/5vytLjLgkhI38JtR2ZkJmu6rnQBBhB3etcLogaRliiVz+q3JerYK Jz6hJhCxZ+IO6g2IH5m9h2mSn9+im0psAmSqAPZiNT4N7Wu/gddJVpQXr9RUfKgAV7tV 3EgL0t5CA6sL9n7bniGLnYGxogJhsBGuByRRsOHJy4JC4eY/OQ1hcq5ZmnCixSAS+KOw yeng== X-Gm-Message-State: AOAM5313u4XakZif239DpWmeM6YWuQcALuctmRKvyO/Vffr6NGBH3pVo 3nrSsTMPUhTJfUlZg2SxCGTcvewLwMg= X-Google-Smtp-Source: ABdhPJy+2o5tm3riY/7WUWzd69SaYc8aYfT00/9TNzTEuMnhRF2+PN1sAga42y53sCgzu+zMUT564w== X-Received: by 2002:a7b:c8c9:: with SMTP id f9mr3915973wml.3.1605005373059; Tue, 10 Nov 2020 02:49:33 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:32 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:10 +0100 Message-Id: <20201110104851.321029-14-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 013/114] avcodec/clearvideo: Avoid code 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" The ClearVideo decoder uses VLC tables that are initialized at runtime from static length, symbol and codes tables. Yet the code tables can be omitted by subjecting all of these tables to the permutation that orders the codes from left to right in the tree. After this is done, the codes can be easily computed at runtime from the lengths and therefore omitted. This saves about 10KB. Only one minor complication is met when doing so: The tree corresponding to the AC VLC codes is incomplete; but ff_init_vlc_from_lengths() can handle this by adding an entry with negative length. Furthermore, there are also VLCs that are only initialized with lengths and codes tables with codes of type uint16_t. These have also been switched to ff_init_vlc_from_lengths() as this means that one can replace the uint16_t codes tables with uint8_t symbols tables. Signed-off-by: Andreas Rheinhardt --- libavcodec/clearvideo.c | 154 +-- libavcodec/clearvideodata.h | 2477 ++++++++++++----------------------- 2 files changed, 910 insertions(+), 1721 deletions(-) diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index 73c0367f71..fd11d88b7a 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -696,159 +696,143 @@ static av_cold int clv_decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "Error initialising DC VLC\n"); return ret; } - ret = ff_init_vlc_sparse(&c->ac_vlc, 9, NUM_AC_CODES, - clv_ac_bits, 1, 1, - clv_ac_codes, 1, 1, - clv_ac_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ac_vlc, 9, NUM_AC_CODES, + clv_ac_bits, 1, + clv_ac_syms, 2, 2, 0, 0); if (ret) { av_log(avctx, AV_LOG_ERROR, "Error initialising AC VLC\n"); return ret; } - ret = init_vlc(&c->ylev[0].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsy_0_bits), - clv_flagsy_0_bits, 1, 1, - clv_flagsy_0_codes, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[0].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsy_0_bits), + clv_flagsy_0_bits, 1, + clv_flagsy_0_syms, 1, 1, 0, 0); if (ret) return ret; - ret = init_vlc(&c->ylev[1].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsy_1_bits), - clv_flagsy_1_bits, 1, 1, - clv_flagsy_1_codes, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[1].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsy_1_bits), + clv_flagsy_1_bits, 1, + clv_flagsy_1_syms, 1, 1, 0, 0); if (ret) return ret; - ret = init_vlc(&c->ylev[2].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsy_2_bits), - clv_flagsy_2_bits, 1, 1, - clv_flagsy_2_codes, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[2].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsy_2_bits), + clv_flagsy_2_bits, 1, + clv_flagsy_2_syms, 1, 1, 0, 0); if (ret) return ret; - ret = init_vlc(&c->ulev[0].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsu_0_bits), - clv_flagsu_0_bits, 1, 1, - clv_flagsu_0_codes, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ulev[0].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsu_0_bits), + clv_flagsu_0_bits, 1, + clv_flagsu_0_syms, 1, 1, 0, 0); if (ret) return ret; - ret = init_vlc(&c->ulev[1].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsu_1_bits), - clv_flagsu_1_bits, 1, 1, - clv_flagsu_1_codes, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ulev[1].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsu_1_bits), + clv_flagsu_1_bits, 1, + clv_flagsu_1_syms, 1, 1, 0, 0); if (ret) return ret; - ret = init_vlc(&c->vlev[0].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsv_0_bits), - clv_flagsv_0_bits, 1, 1, - clv_flagsv_0_codes, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->vlev[0].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsv_0_bits), + clv_flagsv_0_bits, 1, + clv_flagsv_0_syms, 1, 1, 0, 0); if (ret) return ret; - ret = init_vlc(&c->vlev[1].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsv_1_bits), - clv_flagsv_1_bits, 1, 1, - clv_flagsv_1_codes, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->vlev[1].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsv_1_bits), + clv_flagsv_1_bits, 1, + clv_flagsv_1_syms, 1, 1, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ylev[0].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_0_bits), - clv_mvy_0_bits, 1, 1, - clv_mvy_0_codes, 2, 2, - clv_mvy_0_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[0].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_0_bits), + clv_mvy_0_bits, 1, + clv_mvy_0_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ylev[1].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_1_bits), - clv_mvy_1_bits, 1, 1, - clv_mvy_1_codes, 2, 2, - clv_mvy_1_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[1].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_1_bits), + clv_mvy_1_bits, 1, + clv_mvy_1_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ylev[2].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_2_bits), - clv_mvy_2_bits, 1, 1, - clv_mvy_2_codes, 2, 2, - clv_mvy_2_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[2].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_2_bits), + clv_mvy_2_bits, 1, + clv_mvy_2_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ylev[3].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_3_bits), - clv_mvy_3_bits, 1, 1, - clv_mvy_3_codes, 2, 2, - clv_mvy_3_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[3].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_3_bits), + clv_mvy_3_bits, 1, + clv_mvy_3_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ulev[1].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvu_1_bits), - clv_mvu_1_bits, 1, 1, - clv_mvu_1_codes, 2, 2, - clv_mvu_1_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ulev[1].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvu_1_bits), + clv_mvu_1_bits, 1, + clv_mvu_1_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ulev[2].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvu_2_bits), - clv_mvu_2_bits, 1, 1, - clv_mvu_2_codes, 2, 2, - clv_mvu_2_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ulev[2].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvu_2_bits), + clv_mvu_2_bits, 1, + clv_mvu_2_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->vlev[1].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvv_1_bits), - clv_mvv_1_bits, 1, 1, - clv_mvv_1_codes, 2, 2, - clv_mvv_1_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->vlev[1].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvv_1_bits), + clv_mvv_1_bits, 1, + clv_mvv_1_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->vlev[2].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvv_2_bits), - clv_mvv_2_bits, 1, 1, - clv_mvv_2_codes, 2, 2, - clv_mvv_2_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->vlev[2].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvv_2_bits), + clv_mvv_2_bits, 1, + clv_mvv_2_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ylev[1].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasy_1_bits), - clv_biasy_1_bits, 1, 1, - clv_biasy_1_codes, 2, 2, - clv_biasy_1_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[1].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasy_1_bits), + clv_biasy_1_bits, 1, + clv_biasy_1_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ylev[2].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasy_2_bits), - clv_biasy_2_bits, 1, 1, - clv_biasy_2_codes, 2, 2, - clv_biasy_2_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[2].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasy_2_bits), + clv_biasy_2_bits, 1, + clv_biasy_2_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ylev[3].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasy_3_bits), - clv_biasy_3_bits, 1, 1, - clv_biasy_3_codes, 2, 2, - clv_biasy_3_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ylev[3].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasy_3_bits), + clv_biasy_3_bits, 1, + clv_biasy_3_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ulev[1].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasu_1_bits), - clv_biasu_1_bits, 1, 1, - clv_biasu_1_codes, 2, 2, - clv_biasu_1_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ulev[1].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasu_1_bits), + clv_biasu_1_bits, 1, + clv_biasu_1_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->ulev[2].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasu_2_bits), - clv_biasu_2_bits, 1, 1, - clv_biasu_2_codes, 2, 2, - clv_biasu_2_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->ulev[2].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasu_2_bits), + clv_biasu_2_bits, 1, + clv_biasu_2_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->vlev[1].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasv_1_bits), - clv_biasv_1_bits, 1, 1, - clv_biasv_1_codes, 2, 2, - clv_biasv_1_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->vlev[1].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasv_1_bits), + clv_biasv_1_bits, 1, + clv_biasv_1_syms, 2, 2, 0, 0); if (ret) return ret; - ret = ff_init_vlc_sparse(&c->vlev[2].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasv_2_bits), - clv_biasv_2_bits, 1, 1, - clv_biasv_2_codes, 2, 2, - clv_biasv_2_syms, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&c->vlev[2].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasv_2_bits), + clv_biasv_2_bits, 1, + clv_biasv_2_syms, 2, 2, 0, 0); if (ret) return ret; diff --git a/libavcodec/clearvideodata.h b/libavcodec/clearvideodata.h index 43d12dee43..b4893b3bf7 100644 --- a/libavcodec/clearvideodata.h +++ b/libavcodec/clearvideodata.h @@ -25,7 +25,7 @@ #include "libavutil/common.h" #define NUM_DC_CODES 127 -#define NUM_AC_CODES 103 +#define NUM_AC_CODES 104 static const uint8_t clv_dc_codes[NUM_DC_CODES] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, @@ -66,1767 +66,972 @@ static const uint8_t clv_dc_bits[NUM_DC_CODES] = { }; static const uint16_t clv_ac_syms[NUM_AC_CODES] = { - 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, - 0x0009, 0x000A, 0x000B, 0x000C, 0x0011, 0x0012, 0x0013, 0x0014, - 0x0015, 0x0016, 0x0021, 0x0022, 0x0023, 0x0024, 0x0031, 0x0032, - 0x0033, 0x0041, 0x0042, 0x0043, 0x0051, 0x0052, 0x0053, 0x0061, - 0x0062, 0x0063, 0x0071, 0x0072, 0x0081, 0x0082, 0x0091, 0x0092, - 0x00A1, 0x00A2, 0x00B1, 0x00C1, 0x00D1, 0x00E1, 0x00F1, 0x0101, - 0x0111, 0x0121, 0x0131, 0x0141, 0x0151, 0x0161, 0x0171, 0x0181, - 0x0191, 0x01A1, 0x1001, 0x1002, 0x1003, 0x1011, 0x1012, 0x1021, - 0x1031, 0x1041, 0x1051, 0x1061, 0x1071, 0x1081, 0x1091, 0x10A1, - 0x10B1, 0x10C1, 0x10D1, 0x10E1, 0x10F1, 0x1101, 0x1111, 0x1121, - 0x1131, 0x1141, 0x1151, 0x1161, 0x1171, 0x1181, 0x1191, 0x11A1, - 0x11B1, 0x11C1, 0x11D1, 0x11E1, 0x11F1, 0x1201, 0x1211, 0x1221, - 0x1231, 0x1241, 0x1251, 0x1261, 0x1271, 0x1281, 0x1BFF, -}; - -static const uint8_t clv_ac_codes[NUM_AC_CODES] = { - 0x02, 0x0F, 0x15, 0x17, 0x1F, 0x25, 0x24, 0x21, - 0x20, 0x07, 0x06, 0x20, 0x06, 0x14, 0x1E, 0x0F, - 0x21, 0x50, 0x0E, 0x1D, 0x0E, 0x51, 0x0D, 0x23, - 0x0D, 0x0C, 0x22, 0x52, 0x0B, 0x0C, 0x53, 0x13, - 0x0B, 0x54, 0x12, 0x0A, 0x11, 0x09, 0x10, 0x08, - 0x16, 0x55, 0x15, 0x14, 0x1C, 0x1B, 0x21, 0x20, - 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x22, 0x23, - 0x56, 0x57, 0x07, 0x19, 0x05, 0x0F, 0x04, 0x0E, - 0x0D, 0x0C, 0x13, 0x12, 0x11, 0x10, 0x1A, 0x19, - 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x18, 0x17, - 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x07, 0x06, - 0x05, 0x04, 0x24, 0x25, 0x26, 0x27, 0x58, 0x59, - 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x03, -}; - + 0x0000, 0x1012, 0x1003, 0x000B, 0x000A, 0x11C1, 0x11B1, 0x11A1, 0x1191, + 0x0092, 0x0082, 0x0072, 0x0062, 0x0052, 0x0033, 0x0023, 0x0014, 0x000C, + 0x0015, 0x0171, 0x0181, 0x11D1, 0x11E1, 0x11F1, 0x1201, 0x0016, 0x0024, + 0x0043, 0x0053, 0x0063, 0x00A2, 0x0191, 0x01A1, 0x1211, 0x1221, 0x1231, + 0x1241, 0x1251, 0x1261, 0x1271, 0x1281, 0x1BFF, 0x0009, 0x0008, 0x1181, + 0x1171, 0x1161, 0x1151, 0x1141, 0x1131, 0x1121, 0x1111, 0x1002, 0x0161, + 0x0151, 0x0141, 0x0131, 0x0121, 0x0111, 0x0101, 0x00F1, 0x0042, 0x0032, + 0x0007, 0x0006, 0x1101, 0x10F1, 0x10E1, 0x10D1, 0x10C1, 0x10B1, 0x10A1, + 0x1091, 0x00E1, 0x00D1, 0x0022, 0x0013, 0x0005, 0x1081, 0x1071, 0x1061, + 0x1051, 0x00C1, 0x00B1, 0x00A1, 0x0004, 0x1041, 0x1031, 0x1021, 0x1011, + 0x0091, 0x0081, 0x0071, 0x0061, 0x0012, 0x0003, 0x0051, 0x0041, 0x0031, + 0x1001, 0x0001, 0x0011, 0x0021, 0x0002 +}; + +/* The -9 refers to an open end in the tree. */ static const uint8_t clv_ac_bits[NUM_AC_CODES] = { - 2, 4, 6, 7, 8, 9, 9, 10, - 10, 11, 11, 11, 3, 6, 8, 10, - 11, 12, 4, 8, 10, 12, 5, 9, - 10, 5, 9, 12, 5, 10, 12, 6, - 10, 12, 6, 10, 6, 10, 6, 10, - 7, 12, 7, 7, 8, 8, 9, 9, - 9, 9, 9, 9, 9, 9, 11, 11, - 12, 12, 4, 9, 11, 6, 11, 6, - 6, 6, 7, 7, 7, 7, 8, 8, - 8, 8, 8, 8, 8, 8, 9, 9, - 9, 9, 9, 9, 9, 9, 10, 10, - 10, 10, 11, 11, 11, 11, 12, 12, - 12, 12, 12, 12, 12, 12, 7, + -9, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, + 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 7, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 5, 5, 5, 4, 2, 3, 4, 4 }; static const uint8_t clv_flagsy_0_bits[] = { - 3, 4, 4, 4, 4, 4, 6, 5, 4, 7, 4, 5, 4, 7, 5, 2, + 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 7, 7 }; -static const uint16_t clv_flagsy_0_codes[] = { - 0x0002, 0x0009, 0x000B, 0x0006, 0x000C, 0x0007, 0x003E, 0x001C, - 0x000D, 0x007E, 0x000A, 0x001D, 0x0008, 0x007F, 0x001E, 0x0000, +static const uint8_t clv_flagsy_0_syms[] = { + 15, 0, 3, 5, 12, 1, 10, 2, 4, 8, 7, 11, 14, 6, 9, 13 }; static const uint8_t clv_flagsy_1_bits[] = { - 2, 4, 4, 3, 4, 4, 7, 6, 4, 6, 4, 6, 4, 8, 8, 3, + 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 7, 8, 8 }; -static const uint16_t clv_flagsy_1_codes[] = { - 0x0000, 0x000A, 0x000C, 0x0003, 0x000B, 0x0009, 0x007E, 0x003D, - 0x000D, 0x003E, 0x000E, 0x003C, 0x0008, 0x00FE, 0x00FF, 0x0002, +static const uint8_t clv_flagsy_1_syms[] = { + 0, 15, 3, 12, 5, 1, 4, 2, 8, 10, 11, 7, 9, 6, 13, 14 }; static const uint8_t clv_flagsy_2_bits[] = { - 1, 4, 4, 4, 4, 5, 7, 5, 4, 6, 5, 8, 4, 9, 10, 10, + 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 7, 8, 9, 10, 10 }; -static const uint16_t clv_flagsy_2_codes[] = { - 0x0000, 0x000C, 0x000B, 0x0008, 0x000A, 0x001C, 0x007E, 0x001D, - 0x000D, 0x003E, 0x001E, 0x00FE, 0x0009, 0x01FE, 0x03FE, 0x03FF, +static const uint8_t clv_flagsy_2_syms[] = { + 0, 3, 12, 4, 2, 1, 8, 5, 7, 10, 9, 6, 11, 13, 14, 15 }; static const uint8_t clv_flagsu_0_bits[] = { - 1, 4, 4, 4, 5, 5, 9, 7, 5, 9, 4, 7, 4, 8, 7, 4, + 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 7, 7, 7, 8, 9, 9 }; -static const uint16_t clv_flagsu_0_codes[] = { - 0x0000, 0x000B, 0x000D, 0x0009, 0x001D, 0x001C, 0x01FF, 0x007D, - 0x001E, 0x01FE, 0x000C, 0x007C, 0x000A, 0x00FE, 0x007E, 0x0008, +static const uint8_t clv_flagsu_0_syms[] = { + 0, 15, 3, 12, 1, 10, 2, 5, 4, 8, 11, 7, 14, 13, 9, 6 }; static const uint8_t clv_flagsu_1_bits[] = { - 1, 4, 4, 4, 4, 4, 8, 6, 4, 8, 5, 8, 4, 10, 9, 10, + 1, 4, 4, 4, 4, 4, 4, 4, 5, 6, 8, 8, 8, 9, 10, 10 }; -static const uint16_t clv_flagsu_1_codes[] = { - 0x0000, 0x000C, 0x0008, 0x000A, 0x000B, 0x000E, 0x00FD, 0x003E, - 0x000D, 0x00FC, 0x001E, 0x00FE, 0x0009, 0x03FE, 0x01FE, 0x03FF, +static const uint8_t clv_flagsu_1_syms[] = { + 0, 2, 12, 3, 4, 1, 8, 5, 10, 7, 9, 6, 11, 14, 13, 15 }; static const uint8_t clv_flagsv_0_bits[] = { - 1, 4, 5, 4, 5, 5, 8, 10, 5, 9, 5, 6, 4, 10, 7, 3, + 1, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 10 }; -static const uint16_t clv_flagsv_0_codes[] = { - 0x0000, 0x000A, 0x001B, 0x000C, 0x001E, 0x001C, 0x00FE, 0x03FE, - 0x001D, 0x01FE, 0x001A, 0x003E, 0x000B, 0x03FF, 0x007E, 0x0004, +static const uint8_t clv_flagsv_0_syms[] = { + 0, 15, 1, 12, 3, 10, 2, 5, 8, 4, 11, 14, 6, 9, 7, 13 }; static const uint8_t clv_flagsv_1_bits[] = { - 1, 4, 4, 4, 4, 5, 8, 6, 3, 7, 5, 10, 5, 11, 9, 11, + 1, 3, 4, 4, 4, 4, 5, 5, 5, 6, 7, 8, 9, 10, 11, 11 }; -static const uint16_t clv_flagsv_1_codes[] = { - 0x0000, 0x000D, 0x000C, 0x000A, 0x000B, 0x001D, 0x00FE, 0x003E, - 0x0004, 0x007E, 0x001E, 0x03FE, 0x001C, 0x07FE, 0x01FE, 0x07FF, +static const uint8_t clv_flagsv_1_syms[] = { + 0, 8, 3, 4, 2, 1, 12, 5, 10, 7, 9, 6, 14, 11, 13, 15 }; static const uint8_t clv_mvy_0_bits[] = { - 16, 14, 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, 13, 14, - 16, 15, 14, 14, 14, 13, 13, 12, 10, 7, 10, 12, 13, 13, 14, 14, - 14, 15, 15, 14, 14, 14, 13, 13, 11, 10, 7, 10, 11, 13, 13, 14, - 14, 14, 15, 15, 14, 14, 13, 13, 12, 11, 10, 7, 10, 11, 12, 13, - 13, 14, 14, 15, 16, 15, 14, 12, 12, 12, 11, 10, 6, 10, 11, 12, - 12, 12, 14, 15, 16, 15, 14, 13, 13, 12, 11, 10, 9, 6, 9, 10, - 11, 12, 13, 13, 14, 15, 14, 14, 13, 12, 12, 11, 10, 8, 6, 8, - 10, 11, 12, 12, 13, 14, 14, 14, 13, 13, 13, 11, 11, 9, 7, 4, - 7, 9, 11, 11, 12, 13, 13, 14, 11, 10, 10, 9, 9, 8, 7, 5, - 1, 5, 7, 8, 9, 9, 10, 10, 11, 14, 13, 13, 12, 11, 11, 9, - 7, 4, 7, 9, 11, 11, 13, 13, 13, 14, 14, 14, 13, 12, 12, 11, - 10, 8, 6, 8, 10, 11, 12, 12, 13, 14, 14, 15, 14, 13, 13, 12, - 11, 10, 9, 7, 9, 10, 11, 12, 13, 13, 14, 15, 16, 15, 14, 12, - 12, 12, 11, 10, 6, 10, 11, 12, 12, 12, 14, 15, 16, 15, 14, 14, - 13, 13, 12, 11, 10, 7, 10, 11, 12, 13, 13, 14, 14, 15, 15, 14, - 14, 14, 13, 13, 11, 10, 7, 10, 11, 13, 13, 14, 14, 14, 15, 15, - 14, 14, 14, 13, 13, 12, 10, 7, 10, 12, 13, 13, 14, 14, 14, 15, - 16, 14, 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, 13, 14, - 16, 6, -}; - -static const uint16_t clv_mvy_0_codes[] = { - 0xFFFD, 0x3FE5, 0x1FD8, 0x1FC4, 0x1FBC, 0x0FCB, 0x07CF, 0x07C4, - 0x01D7, 0x07C6, 0x07CE, 0x0FCA, 0x1FBD, 0x1FC2, 0x1FD9, 0x3FE4, - 0xFFFE, 0x7FF0, 0x3FEF, 0x3FD2, 0x3FC9, 0x1FCC, 0x1FC0, 0x0FB6, - 0x03D6, 0x0070, 0x03D7, 0x0FB7, 0x1FC1, 0x1FCD, 0x3FCB, 0x3FD0, - 0x3FED, 0x7FF2, 0x7FFB, 0x3FDC, 0x3FD9, 0x3FD4, 0x1FB6, 0x1FAE, - 0x07C0, 0x03BC, 0x006D, 0x03BD, 0x07C1, 0x1FAF, 0x1FB7, 0x3FD1, - 0x3FDB, 0x3FDF, 0x7FF9, 0x7FEE, 0x3FF0, 0x3FC7, 0x1FC9, 0x1FA7, - 0x0FAD, 0x07D2, 0x03CE, 0x006C, 0x03CF, 0x07D0, 0x0FAF, 0x1FA6, - 0x1FC6, 0x3FC4, 0x3FF1, 0x7FED, 0xFFFB, 0x7FF6, 0x3FE6, 0x0FCC, - 0x0FC4, 0x0FB0, 0x07B0, 0x03C6, 0x0031, 0x03C7, 0x07B1, 0x0FB1, - 0x0FC5, 0x0FCD, 0x3FEA, 0x7FF7, 0xFFF9, 0x7FE9, 0x3FCE, 0x1FCF, - 0x1FB2, 0x0FB8, 0x07BC, 0x03D0, 0x01DA, 0x002F, 0x01DB, 0x03D1, - 0x07BE, 0x0FBA, 0x1FB4, 0x1FD0, 0x3FCD, 0x7FEB, 0x3FE1, 0x3FC1, - 0x1FD3, 0x0FC3, 0x0FBE, 0x07B6, 0x03C4, 0x00E4, 0x002D, 0x00E5, - 0x03C5, 0x07B7, 0x0FBF, 0x0FC1, 0x1FD2, 0x3FC3, 0x3FE2, 0x3FBF, - 0x1FDB, 0x1FAD, 0x1FA5, 0x07CB, 0x07BB, 0x01D5, 0x0068, 0x0008, - 0x0065, 0x01D2, 0x07B8, 0x07C8, 0x0FD0, 0x1FAA, 0x1FDA, 0x3FBC, - 0x07D4, 0x03CA, 0x03C0, 0x01D8, 0x01D0, 0x00E6, 0x0069, 0x0014, - 0x0000, 0x0015, 0x006A, 0x00E7, 0x01D1, 0x01D9, 0x03C1, 0x03CB, - 0x07D5, 0x3FBE, 0x1FDC, 0x1FAB, 0x0FD1, 0x07C9, 0x07B9, 0x01D3, - 0x0066, 0x0009, 0x0067, 0x01D4, 0x07BA, 0x07CA, 0x1FA4, 0x1FAC, - 0x1FDD, 0x3FBD, 0x3FE0, 0x3FC0, 0x1FD5, 0x0FC0, 0x0FBC, 0x07B4, - 0x03C2, 0x00E2, 0x002C, 0x00E3, 0x03C3, 0x07B5, 0x0FBD, 0x0FC2, - 0x1FD7, 0x3FC2, 0x3FE3, 0x7FEA, 0x3FCC, 0x1FCE, 0x1FB3, 0x0FB9, - 0x07BD, 0x03D2, 0x01DC, 0x0064, 0x01DD, 0x03D3, 0x07BF, 0x0FBB, - 0x1FB5, 0x1FD1, 0x3FCF, 0x7FE8, 0xFFFA, 0x7FF4, 0x3FEB, 0x0FCE, - 0x0FC6, 0x0FB2, 0x07B2, 0x03C8, 0x0030, 0x03C9, 0x07B3, 0x0FB3, - 0x0FC7, 0x0FCF, 0x3FE9, 0x7FF5, 0xFFF8, 0x7FF3, 0x3FF3, 0x3FC6, - 0x1FC8, 0x1FA8, 0x0FAC, 0x07D1, 0x03CC, 0x006B, 0x03CD, 0x07D3, - 0x0FAE, 0x1FA9, 0x1FC7, 0x3FC5, 0x3FF2, 0x7FEC, 0x7FFA, 0x3FDE, - 0x3FDA, 0x3FD7, 0x1FB9, 0x1FB0, 0x07C2, 0x03BE, 0x006E, 0x03BF, - 0x07C3, 0x1FB1, 0x1FB8, 0x3FD3, 0x3FD8, 0x3FDD, 0x7FF8, 0x7FEF, - 0x3FEE, 0x3FD6, 0x3FC8, 0x1FCB, 0x1FBE, 0x0FB5, 0x03D4, 0x006F, - 0x03D5, 0x0FB4, 0x1FBF, 0x1FCA, 0x3FCA, 0x3FD5, 0x3FEC, 0x7FF1, - 0xFFFF, 0x3FE8, 0x1FD4, 0x1FC5, 0x1FBA, 0x0FC9, 0x07CD, 0x07C7, - 0x01D6, 0x07C5, 0x07CC, 0x0FC8, 0x1FBB, 0x1FC3, 0x1FD6, 0x3FE7, - 0xFFFC, 0x002E, + 1, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, + 16, 16, 16, 16, 16 }; static const uint16_t clv_mvy_0_syms[] = { - 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, - 0x00F8, 0x01F8, 0x02F8, 0x03F8, 0x04F8, 0x05F8, 0x06F8, 0x07F8, - 0x08F8, 0xF8F9, 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, - 0xFFF9, 0x00F9, 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, - 0x07F9, 0x08F9, 0xF8FA, 0xF9FA, 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, - 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, 0x02FA, 0x03FA, 0x04FA, 0x05FA, - 0x06FA, 0x07FA, 0x08FA, 0xF8FB, 0xF9FB, 0xFAFB, 0xFBFB, 0xFCFB, - 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, 0x03FB, 0x04FB, - 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, - 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, 0x00FC, 0x01FC, 0x02FC, 0x03FC, - 0x04FC, 0x05FC, 0x06FC, 0x07FC, 0x08FC, 0xF8FD, 0xF9FD, 0xFAFD, - 0xFBFD, 0xFCFD, 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, - 0x03FD, 0x04FD, 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0xF8FE, 0xF9FE, - 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, - 0x02FE, 0x03FE, 0x04FE, 0x05FE, 0x06FE, 0x07FE, 0x08FE, 0xF8FF, - 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, 0xFFFF, 0x00FF, - 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, 0x07FF, 0x08FF, - 0xF800, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00, - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, - 0x0800, 0xF801, 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, - 0xFF01, 0x0001, 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, - 0x0701, 0x0801, 0xF802, 0xF902, 0xFA02, 0xFB02, 0xFC02, 0xFD02, - 0xFE02, 0xFF02, 0x0002, 0x0102, 0x0202, 0x0302, 0x0402, 0x0502, - 0x0602, 0x0702, 0x0802, 0xF803, 0xF903, 0xFA03, 0xFB03, 0xFC03, - 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, 0x0303, 0x0403, - 0x0503, 0x0603, 0x0703, 0x0803, 0xF804, 0xF904, 0xFA04, 0xFB04, - 0xFC04, 0xFD04, 0xFE04, 0xFF04, 0x0004, 0x0104, 0x0204, 0x0304, - 0x0404, 0x0504, 0x0604, 0x0704, 0x0804, 0xF805, 0xF905, 0xFA05, - 0xFB05, 0xFC05, 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, - 0x0305, 0x0405, 0x0505, 0x0605, 0x0705, 0x0805, 0xF806, 0xF906, - 0xFA06, 0xFB06, 0xFC06, 0xFD06, 0xFE06, 0xFF06, 0x0006, 0x0106, - 0x0206, 0x0306, 0x0406, 0x0506, 0x0606, 0x0706, 0x0806, 0xF807, - 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, 0xFF07, 0x0007, - 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, 0x0707, 0x0807, - 0xF808, 0xF908, 0xFA08, 0xFB08, 0xFC08, 0xFD08, 0xFE08, 0xFF08, - 0x0008, 0x0108, 0x0208, 0x0308, 0x0408, 0x0508, 0x0608, 0x0708, - 0x0808, 0x0909, + 0x0000, 0x00FF, 0x0001, 0xFF00, 0x0100, 0x0002, 0x00FE, 0x0909, 0x00FD, + 0x0004, 0x00FC, 0x0003, 0x01FF, 0xFF01, 0x0101, 0xFFFF, 0xFE00, 0x0200, + 0x0005, 0x00FB, 0x00FA, 0x0006, 0x0007, 0x00F9, 0xFF02, 0x0102, 0xFFFE, + 0x01FE, 0xFD00, 0x0300, 0xFC00, 0x0400, 0x02FF, 0xFE01, 0x0201, 0xFEFF, + 0x0008, 0x00F8, 0xFB00, 0x0500, 0xFFFD, 0x01FD, 0xFF03, 0x0103, 0xFFFA, + 0x01FA, 0xFF06, 0x0106, 0xFA00, 0x0600, 0xFE02, 0x0202, 0xFEFE, 0x02FE, + 0xFFFC, 0x01FC, 0xFF04, 0x0104, 0xF900, 0x0700, 0xFF05, 0x0105, 0xFFFB, + 0x01FB, 0xFEFD, 0x02FD, 0xFE03, 0x0203, 0xFF07, 0x0107, 0xFFF9, 0x01F9, + 0xFEFC, 0x02FC, 0xFE04, 0x0204, 0xFD02, 0x0302, 0xFDFE, 0x03FE, 0x03FF, + 0xFD01, 0x0301, 0xFDFF, 0xFDFD, 0xFD03, 0x03FD, 0x0303, 0xFEFA, 0x02FA, + 0xFE06, 0x0206, 0xFFF8, 0x0108, 0x01F8, 0xFF08, 0x04FF, 0xFC01, 0x0401, + 0xFCFF, 0x0208, 0xFE08, 0x02F8, 0xFEF8, 0x02FB, 0xFE05, 0xFEFB, 0x0205, + 0xF800, 0x0800, 0xFD05, 0xFDFB, 0x0305, 0x03FB, 0xFDFC, 0x03FC, 0xFD04, + 0x0304, 0x0207, 0xFE07, 0xFEF9, 0x02F9, 0xFCFD, 0xFC03, 0x04FD, 0x0403, + 0xFC02, 0x0402, 0xFCFE, 0x04FE, 0xFB02, 0x05FE, 0x0502, 0xFBFE, 0xFCFC, + 0x04FC, 0xFC04, 0x0404, 0x0308, 0xFD08, 0x03F8, 0xFDF8, 0xFBFC, 0x05FC, + 0xFB04, 0x0504, 0x05FF, 0xFB01, 0x0501, 0xFBFF, 0x04FB, 0xFCFB, 0xFC05, + 0x0405, 0x06FF, 0xFA01, 0x0601, 0xFAFF, 0xFDFA, 0x03FA, 0xFD06, 0x0306, + 0xFBFD, 0xFB03, 0x05FD, 0x0503, 0xFCFA, 0x04FA, 0x0406, 0xFC06, 0xFC08, + 0x0408, 0xFCF8, 0x04F8, 0xFD07, 0x0307, 0xFDF9, 0x03F9, 0x05F8, 0x0508, + 0xFBF8, 0xFB08, 0x05FB, 0x0505, 0xFB05, 0xFBFB, 0x0407, 0xFC07, 0xFCF9, + 0x04F9, 0xFA03, 0xFAFD, 0x06FD, 0x0603, 0x06FE, 0xFAFE, 0xFA08, 0xFA02, + 0x0608, 0x0602, 0xFAF8, 0x06F8, 0x07FF, 0xF9FF, 0xF901, 0x0701, 0x08FF, + 0x0801, 0xF801, 0xF8FF, 0xF902, 0xF9FE, 0x0702, 0x07FE, 0x06FB, 0x0605, + 0xFA05, 0xFAFB, 0xFB07, 0xFBF9, 0x0507, 0x05F9, 0xF903, 0x07FD, 0xF9FD, + 0x0703, 0x06F9, 0x05FA, 0xFAF9, 0x0506, 0xFBFA, 0x0607, 0xFA07, 0xFB06, + 0x0606, 0xFAFA, 0xFA06, 0x06FA, 0xF9FA, 0x0706, 0xF906, 0x07FA, 0xF802, + 0xF8FE, 0x08FE, 0x0802, 0x07F8, 0xF9F8, 0xFAFC, 0x0708, 0xF908, 0x0604, + 0x06FC, 0xFA04, 0x0707, 0x07F9, 0xF907, 0xF9F9, 0xF9FB, 0x07FB, 0x0705, + 0xF905, 0x0803, 0xF8FD, 0xF803, 0x08FD, 0x0805, 0x08FB, 0xF8FB, 0xF807, + 0xF8F9, 0x0807, 0x08F9, 0xF805, 0xF904, 0x0704, 0xF9FC, 0x07FC, 0x0806, + 0x08FA, 0xF806, 0xF8FA, 0x0804, 0x08FC, 0xF804, 0xF8FC, 0x0808, 0xF8F8, + 0x08F8, 0xF808, }; static const uint8_t clv_mvy_1_bits[] = { - 15, 15, 15, 15, 14, 14, 13, 13, 11, 9, 11, 13, 13, 14, 14, 15, - 15, 15, 15, 15, 14, 14, 13, 13, 12, 12, 12, 10, 9, 10, 12, 12, - 12, 13, 13, 14, 14, 15, 15, 15, 14, 14, 13, 13, 13, 12, 11, 8, - 11, 12, 13, 13, 13, 14, 14, 15, 15, 14, 14, 14, 14, 13, 12, 12, - 12, 10, 8, 10, 12, 12, 12, 13, 14, 14, 14, 14, 15, 14, 14, 13, - 13, 12, 12, 11, 10, 8, 10, 11, 12, 12, 13, 13, 14, 14, 15, 14, - 14, 13, 13, 13, 12, 12, 11, 9, 7, 9, 11, 12, 12, 13, 13, 13, - 14, 14, 14, 14, 13, 13, 13, 12, 11, 10, 9, 7, 9, 10, 11, 12, - 13, 13, 13, 14, 14, 14, 13, 13, 12, 12, 11, 11, 10, 8, 7, 8, - 10, 11, 11, 12, 12, 13, 13, 14, 13, 13, 13, 12, 11, 11, 10, 9, - 6, 4, 6, 9, 10, 11, 12, 12, 13, 13, 13, 12, 11, 10, 10, 10, - 9, 9, 7, 5, 1, 5, 7, 9, 9, 10, 10, 10, 11, 12, 13, 13, - 13, 12, 11, 11, 10, 9, 6, 4, 6, 9, 10, 11, 11, 12, 13, 13, - 13, 14, 13, 13, 12, 12, 11, 11, 10, 8, 7, 8, 10, 11, 11, 12, - 12, 13, 13, 14, 14, 14, 13, 13, 13, 12, 11, 10, 9, 7, 9, 10, - 11, 12, 13, 13, 13, 14, 14, 14, 14, 13, 13, 13, 12, 12, 11, 9, - 7, 9, 11, 12, 12, 13, 13, 13, 14, 14, 15, 14, 14, 13, 13, 12, - 12, 11, 10, 8, 10, 11, 12, 12, 13, 13, 14, 14, 15, 14, 14, 14, - 14, 13, 12, 12, 12, 10, 8, 10, 12, 12, 12, 13, 14, 14, 14, 14, - 15, 15, 14, 14, 13, 13, 13, 12, 11, 8, 11, 12, 13, 13, 13, 14, - 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 12, 10, 9, 10, 12, 12, - 12, 13, 13, 14, 14, 15, 15, 15, 15, 15, 14, 14, 13, 13, 11, 9, - 11, 13, 13, 14, 14, 15, 15, 15, 15, 5, -}; - -static const uint16_t clv_mvy_1_codes[] = { - 0x7FF9, 0x7FF6, 0x7FEB, 0x7FE3, 0x3FCF, 0x3FB3, 0x1FBD, 0x1FA1, - 0x07AD, 0x01CE, 0x07AF, 0x1FA0, 0x1FBB, 0x3FB0, 0x3FCC, 0x7FE2, - 0x7FE9, 0x7FF4, 0x7FFB, 0x7FF1, 0x3FE7, 0x3FBD, 0x1FA5, 0x1F9B, - 0x0FB4, 0x0FAF, 0x0FAA, 0x03CC, 0x01CD, 0x03CD, 0x0FAB, 0x0FAD, - 0x0FB1, 0x1F9C, 0x1FA3, 0x3FBE, 0x3FE6, 0x7FF0, 0x7FFC, 0x7FE5, - 0x3FB5, 0x3FAE, 0x1FB4, 0x1FAA, 0x1F97, 0x0F85, 0x07A2, 0x00DD, - 0x07A3, 0x0F86, 0x1F99, 0x1FAD, 0x1FB2, 0x3FAC, 0x3FB7, 0x7FE4, - 0x7FFD, 0x3FEA, 0x3FD8, 0x3FC3, 0x3FBB, 0x1FC9, 0x0FBC, 0x0F97, - 0x0F8F, 0x03B8, 0x00DA, 0x03B9, 0x0F90, 0x0F98, 0x0FB9, 0x1FC6, - 0x3FBA, 0x3FC0, 0x3FD9, 0x3FEB, 0x7FEF, 0x3FEE, 0x3FD7, 0x1FC3, - 0x1F96, 0x0FC0, 0x0FA8, 0x07AA, 0x03BE, 0x00D9, 0x03BF, 0x07AB, - 0x0FA7, 0x0FBF, 0x1F98, 0x1FC5, 0x3FD6, 0x3FEF, 0x7FEE, 0x3FDC, - 0x3FCA, 0x1FBF, 0x1F8B, 0x1F87, 0x0FA2, 0x0F94, 0x07A5, 0x01D4, - 0x0069, 0x01D5, 0x07A6, 0x0F95, 0x0FA3, 0x1F89, 0x1F8D, 0x1FC0, - 0x3FC6, 0x3FDE, 0x3FE0, 0x3FD3, 0x1FB8, 0x1F8F, 0x1F84, 0x0F89, - 0x07BC, 0x03C6, 0x01C6, 0x0067, 0x01C7, 0x03C7, 0x07BD, 0x0F87, - 0x1F82, 0x1F8A, 0x1FB6, 0x3FD1, 0x3FE2, 0x3FC5, 0x1FCE, 0x1FAE, - 0x0FB5, 0x0F8B, 0x07B4, 0x07B0, 0x03B4, 0x00DE, 0x0064, 0x00DF, - 0x03B5, 0x07B1, 0x07B5, 0x0F8C, 0x0FB6, 0x1FAF, 0x1FD1, 0x3FCB, - 0x1FD3, 0x1FCC, 0x1FA7, 0x0F9B, 0x07BE, 0x079C, 0x03C0, 0x01C8, - 0x002E, 0x0008, 0x002F, 0x01C9, 0x03C1, 0x079D, 0x0F82, 0x0F9A, - 0x1FA9, 0x1FCA, 0x1FD4, 0x0F9F, 0x07B6, 0x03C8, 0x03B2, 0x03B0, - 0x01D6, 0x01D0, 0x006A, 0x0014, 0x0000, 0x0015, 0x006B, 0x01D1, - 0x01D7, 0x03B1, 0x03B3, 0x03C9, 0x07B7, 0x0FA0, 0x1FD5, 0x1FCB, - 0x1FAB, 0x0F9C, 0x07BF, 0x079E, 0x03C2, 0x01CA, 0x0030, 0x0009, - 0x0031, 0x01CB, 0x03C3, 0x079F, 0x07C0, 0x0F9D, 0x1FAC, 0x1FCD, - 0x1FD2, 0x3FC8, 0x1FD0, 0x1FB0, 0x0FB7, 0x0F8D, 0x07B8, 0x07B2, - 0x03B6, 0x00E0, 0x0065, 0x00E1, 0x03B7, 0x07B3, 0x07B9, 0x0F8E, - 0x0FB8, 0x1FB1, 0x1FCF, 0x3FC9, 0x3FE1, 0x3FD2, 0x1FB7, 0x1F8E, - 0x1F83, 0x0F88, 0x07BA, 0x03C4, 0x01C4, 0x0066, 0x01C5, 0x03C5, - 0x07BB, 0x0F8A, 0x1F85, 0x1F90, 0x1FB9, 0x3FD0, 0x3FE3, 0x3FDD, - 0x3FC7, 0x1FC1, 0x1F91, 0x1F88, 0x0FA4, 0x0F96, 0x07A7, 0x01D2, - 0x0068, 0x01D3, 0x07A4, 0x0F93, 0x0FA1, 0x1F86, 0x1F8C, 0x1FBE, - 0x3FC4, 0x3FDF, 0x7FED, 0x3FEC, 0x3FD4, 0x1FC4, 0x1F92, 0x0FBD, - 0x0FA5, 0x07A8, 0x03BC, 0x00D8, 0x03BD, 0x07A9, 0x0FA6, 0x0FBE, - 0x1F93, 0x1FC2, 0x3FD5, 0x3FED, 0x7FEC, 0x3FE8, 0x3FDB, 0x3FC1, - 0x3FB9, 0x1FC7, 0x0FBA, 0x0F9E, 0x0F91, 0x03BA, 0x00DB, 0x03BB, - 0x0F92, 0x0F99, 0x0FBB, 0x1FC8, 0x3FB8, 0x3FC2, 0x3FDA, 0x3FE9, - 0x7FFF, 0x7FE7, 0x3FB6, 0x3FAF, 0x1FB3, 0x1FA6, 0x1F94, 0x0F83, - 0x07A0, 0x00DC, 0x07A1, 0x0F84, 0x1F95, 0x1FA8, 0x1FB5, 0x3FAD, - 0x3FB4, 0x7FE6, 0x7FFE, 0x7FF3, 0x3FE5, 0x3FBC, 0x1FA4, 0x1F9D, - 0x0FB2, 0x0FAE, 0x0FA9, 0x03CA, 0x01CC, 0x03CB, 0x0FAC, 0x0FB0, - 0x0FB3, 0x1F9A, 0x1FA2, 0x3FBF, 0x3FE4, 0x7FF2, 0x7FF8, 0x7FF5, - 0x7FEA, 0x7FE0, 0x3FCD, 0x3FB1, 0x1FBA, 0x1F9F, 0x07AE, 0x01CF, - 0x07AC, 0x1F9E, 0x1FBC, 0x3FB2, 0x3FCE, 0x7FE1, 0x7FE8, 0x7FF7, - 0x7FFA, 0x0016, + 1, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15 }; static const uint16_t clv_mvy_1_syms[] = { - 0xF7F7, 0xF8F7, 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, - 0xFFF7, 0x00F7, 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, - 0x07F7, 0x08F7, 0x09F7, 0xF7F8, 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, - 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, 0x00F8, 0x01F8, 0x02F8, 0x03F8, - 0x04F8, 0x05F8, 0x06F8, 0x07F8, 0x08F8, 0x09F8, 0xF7F9, 0xF8F9, - 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, 0xFFF9, 0x00F9, - 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, 0x07F9, 0x08F9, - 0x09F9, 0xF7FA, 0xF8FA, 0xF9FA, 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, - 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, 0x02FA, 0x03FA, 0x04FA, 0x05FA, - 0x06FA, 0x07FA, 0x08FA, 0x09FA, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, - 0xFBFB, 0xFCFB, 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, - 0x03FB, 0x04FB, 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0xF7FC, - 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, - 0x00FC, 0x01FC, 0x02FC, 0x03FC, 0x04FC, 0x05FC, 0x06FC, 0x07FC, - 0x08FC, 0x09FC, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, 0xFBFD, 0xFCFD, - 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, 0x03FD, 0x04FD, - 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0xF7FE, 0xF8FE, 0xF9FE, - 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, - 0x02FE, 0x03FE, 0x04FE, 0x05FE, 0x06FE, 0x07FE, 0x08FE, 0x09FE, - 0xF7FF, 0xF8FF, 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, - 0xFFFF, 0x00FF, 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, - 0x07FF, 0x08FF, 0x09FF, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, - 0xFC00, 0xFD00, 0xFE00, 0xFF00, 0x0000, 0x0100, 0x0200, 0x0300, - 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0xF701, 0xF801, - 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, 0xFF01, 0x0001, - 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, 0x0701, 0x0801, - 0x0901, 0xF702, 0xF802, 0xF902, 0xFA02, 0xFB02, 0xFC02, 0xFD02, - 0xFE02, 0xFF02, 0x0002, 0x0102, 0x0202, 0x0302, 0x0402, 0x0502, - 0x0602, 0x0702, 0x0802, 0x0902, 0xF703, 0xF803, 0xF903, 0xFA03, - 0xFB03, 0xFC03, 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, - 0x0303, 0x0403, 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0xF704, - 0xF804, 0xF904, 0xFA04, 0xFB04, 0xFC04, 0xFD04, 0xFE04, 0xFF04, - 0x0004, 0x0104, 0x0204, 0x0304, 0x0404, 0x0504, 0x0604, 0x0704, - 0x0804, 0x0904, 0xF705, 0xF805, 0xF905, 0xFA05, 0xFB05, 0xFC05, - 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, 0x0305, 0x0405, - 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0xF706, 0xF806, 0xF906, - 0xFA06, 0xFB06, 0xFC06, 0xFD06, 0xFE06, 0xFF06, 0x0006, 0x0106, - 0x0206, 0x0306, 0x0406, 0x0506, 0x0606, 0x0706, 0x0806, 0x0906, - 0xF707, 0xF807, 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, - 0xFF07, 0x0007, 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, - 0x0707, 0x0807, 0x0907, 0xF708, 0xF808, 0xF908, 0xFA08, 0xFB08, - 0xFC08, 0xFD08, 0xFE08, 0xFF08, 0x0008, 0x0108, 0x0208, 0x0308, - 0x0408, 0x0508, 0x0608, 0x0708, 0x0808, 0x0908, 0xF709, 0xF809, - 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, 0xFF09, 0x0009, - 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, 0x0709, 0x0809, - 0x0909, 0x0A0A, + 0x0000, 0x00FF, 0x0001, 0xFF00, 0x0100, 0x0A0A, 0xFFFF, 0x01FF, 0xFF01, + 0x0101, 0x00FE, 0x0002, 0x0003, 0x00FD, 0x0004, 0x00FC, 0xFE00, 0x0200, + 0x0005, 0x00FB, 0x00FA, 0x0006, 0x0007, 0x00F9, 0xFFFE, 0x01FE, 0xFF02, + 0x0102, 0xFF03, 0x0103, 0xFFFD, 0x01FD, 0xFEFF, 0x02FF, 0xFE01, 0x0201, + 0x0008, 0x00F8, 0x00F7, 0x0009, 0xFD00, 0x0300, 0xFF04, 0x0104, 0xFFFC, + 0x01FC, 0xFC00, 0x0400, 0xFB00, 0x0500, 0xFA00, 0x0600, 0xFEFE, 0x02FE, + 0xFE02, 0x0202, 0xFFFA, 0x01FA, 0xFF06, 0x0106, 0xFF05, 0x0105, 0xFFFB, + 0x01FB, 0xFDFF, 0x03FF, 0xFD01, 0x0301, 0xFE03, 0x0203, 0xFEFD, 0x02FD, + 0xF900, 0x0700, 0xFF08, 0x0108, 0xFFF8, 0x01F8, 0xFCFF, 0x04FF, 0xFC01, + 0x0401, 0xFF07, 0x0107, 0xFFF9, 0x01F9, 0x0204, 0xFEFC, 0x02FC, 0xFE04, + 0xFE05, 0x0205, 0xFEFB, 0x02FB, 0x0109, 0xFFF7, 0xFF09, 0x01F7, 0xFDFE, + 0x03FE, 0xFD02, 0x0302, 0xFCFE, 0x04FE, 0xF800, 0x0800, 0xFC02, 0x0402, + 0xFD03, 0x0303, 0xFDFD, 0x03FD, 0xFBFF, 0xFB01, 0x0501, 0x05FF, 0xFE07, + 0x0207, 0xFEF9, 0x02F9, 0x04FD, 0xFC03, 0xFCFD, 0x0403, 0xFBFE, 0x05FE, + 0xFB02, 0x0502, 0xFEFA, 0x02FA, 0xFE06, 0x0206, 0x0304, 0xFDFC, 0x03FC, + 0xFD04, 0xFDFA, 0x03FA, 0x0306, 0x06FF, 0xFAFF, 0xFA01, 0x0601, 0xFD06, + 0xF700, 0x0900, 0x0404, 0xFCFC, 0x04FC, 0xFC04, 0xFD05, 0x0305, 0x03FB, + 0xFDFB, 0xFE08, 0xFEF8, 0x02F8, 0x0208, 0x03F8, 0xFD08, 0xFDF8, 0x0308, + 0x04F8, 0xFC08, 0x0408, 0xFCF8, 0xFAFE, 0x06FE, 0xFA02, 0x0602, 0x04FA, + 0xFC06, 0x0406, 0xFCFA, 0xFC05, 0x0405, 0x04FB, 0xFCFB, 0x05FD, 0xFB03, + 0xFBFD, 0x0503, 0x0504, 0xFBFC, 0xFB04, 0x05FC, 0x06FD, 0xFAFC, 0x0604, + 0x06FC, 0xFA03, 0xFAFD, 0x0603, 0xFA04, 0xFB05, 0x0505, 0xFD07, 0x0307, + 0xFBFB, 0xFDF9, 0x05FB, 0x03F9, 0x0508, 0xFBF8, 0x05F8, 0xFB08, 0x0209, + 0xFE09, 0x02F7, 0xFEF7, 0x0608, 0x06F8, 0xFA08, 0xFAF8, 0xFC07, 0xF9FF, + 0x0407, 0x07FF, 0xFCF9, 0xF901, 0x0701, 0x04F9, 0xF9FE, 0x07FE, 0xF902, + 0x0702, 0x05F9, 0xFB07, 0xFBF9, 0x0507, 0x07FD, 0xF903, 0xF9FD, 0x0703, + 0xFD09, 0x03F7, 0x0309, 0xFDF7, 0x0704, 0xF9FC, 0x07FC, 0xF904, 0x0605, + 0xFAFB, 0xFA05, 0x06FB, 0x05FA, 0xFB06, 0x0506, 0xFBFA, 0x08FF, 0xF801, + 0xF8FF, 0x0801, 0xF8FE, 0x0802, 0xF802, 0x08FE, 0x0901, 0xF7FF, 0x09FF, + 0xF701, 0x06F9, 0x0607, 0xFAF9, 0xFA07, 0x04F7, 0xFC09, 0x0409, 0xFCF7, + 0x0707, 0xF9F9, 0xF907, 0x07F9, 0x0606, 0xFA06, 0x06FA, 0xFAFA, 0xF908, + 0xF9F8, 0x07F8, 0x0708, 0x07FA, 0xF906, 0x0706, 0xF9FA, 0x0804, 0xF7FE, + 0x08FC, 0xF804, 0xF702, 0x0902, 0xF8FC, 0x09FE, 0x05F7, 0xFB09, 0x0509, + 0xFBF7, 0x0803, 0x08FD, 0xF803, 0xF8FD, 0xF905, 0x0705, 0x07FB, 0xF9FB, + 0xF8FA, 0x08FA, 0x0806, 0xF806, 0xF7FC, 0xF704, 0x09FC, 0x0904, 0xF7FD, + 0xF703, 0x09FD, 0x0903, 0x0808, 0xF808, 0x08F8, 0xF8F8, 0xF706, 0x0906, + 0xF7FA, 0x09FA, 0xF805, 0x0805, 0xF8FB, 0x08FB, 0xFA09, 0x0609, 0x06F7, + 0xFAF7, 0x08F9, 0xF8F9, 0x0807, 0xF807, 0x0709, 0x07F7, 0xF909, 0xF9F7, + 0x0905, 0xF705, 0x09FB, 0xF7FB, 0x09F8, 0xF7F8, 0x0908, 0xF708, 0x08F7, + 0xF809, 0xF8F7, 0x0809, 0xF709, 0xF7F7, 0x0909, 0x09F7, 0xF7F9, 0x09F9, + 0x0907, 0xF707, }; static const uint8_t clv_mvy_2_bits[] = { - 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, - 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, - 15, 15, 15, 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 11, 10, 11, - 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 15, - 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, 13, 13, 11, 10, 11, 13, - 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 15, 15, - 15, 14, 14, 14, 14, 14, 14, 13, 13, 13, 12, 11, 9, 11, 12, 13, - 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 15, 15, 14, - 14, 13, 13, 13, 13, 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, - 13, 13, 13, 13, 13, 13, 14, 14, 14, 15, 16, 16, 15, 15, 15, 14, - 13, 13, 13, 13, 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, - 13, 13, 13, 13, 13, 14, 15, 15, 15, 16, 16, 15, 15, 15, 15, 14, - 14, 13, 13, 13, 12, 12, 12, 11, 11, 9, 11, 11, 12, 12, 12, 13, - 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 15, 15, 14, 14, 14, 13, - 13, 13, 12, 12, 12, 12, 11, 10, 8, 10, 11, 12, 12, 12, 12, 13, - 13, 13, 14, 14, 14, 15, 15, 16, 16, 15, 14, 14, 14, 13, 13, 13, - 13, 12, 12, 12, 11, 11, 10, 8, 10, 11, 11, 12, 12, 12, 13, 13, - 13, 13, 14, 14, 14, 15, 16, 15, 15, 14, 14, 13, 13, 13, 13, 13, - 12, 12, 12, 11, 10, 9, 8, 9, 10, 11, 12, 12, 12, 13, 13, 13, - 13, 13, 14, 14, 15, 15, 15, 15, 14, 14, 13, 13, 13, 13, 13, 12, - 12, 11, 11, 10, 10, 7, 10, 10, 11, 11, 12, 12, 13, 13, 13, 13, - 13, 14, 14, 15, 15, 14, 14, 14, 14, 13, 13, 12, 12, 12, 12, 12, - 11, 11, 10, 9, 7, 9, 10, 11, 11, 12, 12, 12, 12, 12, 13, 13, - 14, 14, 14, 14, 15, 13, 13, 13, 13, 13, 12, 12, 12, 11, 11, 11, - 11, 10, 8, 7, 8, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, - 13, 13, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, - 9, 8, 6, 8, 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 14, - 14, 14, 16, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 9, 9, 8, - 6, 4, 6, 8, 9, 9, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, - 16, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 4, - 2, 4, 7, 8, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, - 16, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 9, 9, 8, 6, 4, - 6, 8, 9, 9, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 16, 14, - 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 9, 8, 6, 8, - 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 13, - 13, 13, 13, 13, 12, 12, 12, 11, 11, 11, 11, 10, 8, 7, 8, 10, - 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 15, 14, 14, 14, - 14, 13, 13, 12, 12, 12, 12, 12, 11, 11, 10, 9, 7, 9, 10, 11, - 11, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 14, 14, - 13, 13, 13, 13, 13, 12, 12, 11, 11, 10, 10, 7, 10, 10, 11, 11, - 12, 12, 13, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 14, 14, 13, - 13, 13, 13, 13, 12, 12, 12, 11, 10, 9, 8, 9, 10, 11, 12, 12, - 12, 13, 13, 13, 13, 13, 14, 14, 15, 15, 16, 15, 14, 14, 14, 13, - 13, 13, 13, 12, 12, 12, 11, 11, 10, 8, 10, 11, 11, 12, 12, 12, - 13, 13, 13, 13, 14, 14, 14, 15, 16, 16, 15, 15, 14, 14, 14, 13, - 13, 13, 12, 12, 12, 12, 11, 10, 8, 10, 11, 12, 12, 12, 12, 13, - 13, 13, 14, 14, 14, 15, 15, 16, 16, 15, 15, 15, 15, 14, 14, 13, - 13, 13, 12, 12, 12, 11, 11, 9, 11, 11, 12, 12, 12, 13, 13, 13, - 14, 14, 15, 15, 15, 15, 16, 16, 15, 15, 15, 14, 13, 13, 13, 13, - 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, 13, 13, 13, 13, - 13, 14, 15, 15, 15, 16, 16, 15, 15, 14, 14, 13, 13, 13, 13, 13, - 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, 13, 13, 13, 13, 13, - 14, 14, 14, 15, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, - 13, 13, 12, 11, 9, 11, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, - 15, 15, 15, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, - 13, 13, 11, 10, 11, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, - 15, 15, 16, 16, 15, 15, 15, 15, 15, 14, 14, 14, 14, 13, 13, 13, - 13, 12, 10, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, - 15, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, - 12, 11, 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, - 16, 7, -}; - -static const uint16_t clv_mvy_2_codes[] = { - 0xFFF5, 0xFFD8, 0x7FE6, 0x7FB9, 0x7FB5, 0x7FB0, 0x7FA0, 0x7F99, - 0x7F93, 0x3FAA, 0x3F9B, 0x3F52, 0x1F76, 0x1EF5, 0x0F0B, 0x06F0, - 0x0F08, 0x1EF0, 0x1F75, 0x3F53, 0x3F9A, 0x3FA8, 0x7F94, 0x7F98, - 0x7F9E, 0x7FAE, 0x7FAF, 0x7FB7, 0x7FE9, 0xFFDB, 0xFFF6, 0xFFFD, - 0x7FD9, 0x7FCC, 0x7FC6, 0x7F9C, 0x7F80, 0x3FA5, 0x3F80, 0x3F6A, - 0x3F31, 0x1F54, 0x1F40, 0x1F11, 0x1F05, 0x075E, 0x0360, 0x075F, - 0x1F07, 0x1F12, 0x1F43, 0x1F56, 0x3F33, 0x3F68, 0x3F83, 0x3FA6, - 0x7F7F, 0x7F9A, 0x7FC9, 0x7FCA, 0x7FDB, 0xFFF8, 0xFFEC, 0x7FDE, - 0x7FE2, 0x7FA6, 0x7F6F, 0x3FA1, 0x3F8D, 0x3F5C, 0x3F39, 0x3F21, - 0x3F18, 0x1F58, 0x1F1E, 0x1EF1, 0x0740, 0x035A, 0x0741, 0x1EF2, - 0x1F1F, 0x1F5A, 0x3F19, 0x3F22, 0x3F3B, 0x3F5E, 0x3F8E, 0x3FA3, - 0x7F6B, 0x7FA2, 0x7FE3, 0x7FE1, 0xFFEE, 0xFFFC, 0x7FC3, 0x7FBC, - 0x7F71, 0x3F96, 0x3F86, 0x3F7A, 0x3F72, 0x3F59, 0x3F46, 0x1F0A, - 0x1EFD, 0x1ED0, 0x0F02, 0x0712, 0x019F, 0x0713, 0x0F03, 0x1ED3, - 0x1EFF, 0x1F09, 0x3F4A, 0x3F5A, 0x3F76, 0x3F7B, 0x3F87, 0x3F97, - 0x7F73, 0x7FBB, 0x7FBF, 0xFFFB, 0xFFEB, 0x7F88, 0x7F5C, 0x3F7C, - 0x3F3C, 0x1F60, 0x1F4C, 0x1F14, 0x1F0C, 0x1F00, 0x1EF9, 0x1ED8, - 0x0F42, 0x075A, 0x0714, 0x0186, 0x0715, 0x075B, 0x0F43, 0x1EDA, - 0x1EFA, 0x1F01, 0x1F0E, 0x1F15, 0x1F4D, 0x1F62, 0x3F3D, 0x3F7D, - 0x3FAC, 0x7F86, 0xFFE8, 0xFFE7, 0x7FA7, 0x7F8C, 0x7F68, 0x3F9C, - 0x1F7C, 0x1F6C, 0x1F69, 0x1EEC, 0x1EE4, 0x1ED5, 0x1ECD, 0x0EF0, - 0x0752, 0x06F6, 0x018C, 0x06F7, 0x0753, 0x0EF1, 0x1ECE, 0x1ED6, - 0x1EE5, 0x1EED, 0x1F6A, 0x1F6E, 0x1F7D, 0x3F9F, 0x7F66, 0x7F8A, - 0x7FA5, 0xFFE6, 0xFFDC, 0x7FDA, 0x7FC0, 0x7FAC, 0x7F61, 0x3F42, - 0x3F0E, 0x1F45, 0x1F2C, 0x1ECA, 0x0F27, 0x0EF6, 0x0EEE, 0x072E, - 0x06F4, 0x0185, 0x06F5, 0x072F, 0x0EEF, 0x0EF7, 0x0F28, 0x1ECB, - 0x1F2F, 0x1F46, 0x3F0F, 0x3F40, 0x7F5F, 0x7FB4, 0x7FC2, 0x7FDC, - 0xFFDA, 0xFFE0, 0x7F72, 0x7F63, 0x3F70, 0x3F1C, 0x3F16, 0x1F82, - 0x1EE2, 0x1EB2, 0x0F4C, 0x0EFC, 0x0EE0, 0x0ED3, 0x0722, 0x036C, - 0x00BF, 0x036D, 0x0723, 0x0ECC, 0x0EE1, 0x0EFF, 0x0F4D, 0x1EB3, - 0x1EE3, 0x1F83, 0x3F17, 0x3F1F, 0x3F75, 0x7F65, 0x7F70, 0xFFE2, - 0xFFD7, 0x7F76, 0x3F2B, 0x3F13, 0x3F0A, 0x1F33, 0x1F23, 0x1EB4, - 0x1EA0, 0x0F46, 0x0F32, 0x0F1A, 0x0756, 0x0728, 0x0356, 0x00B0, - 0x0357, 0x0729, 0x0757, 0x0F1B, 0x0F33, 0x0F47, 0x1EA1, 0x1EB5, - 0x1F20, 0x1F30, 0x3F08, 0x3F10, 0x3F28, 0x7F77, 0xFFD5, 0x7FD5, - 0x7FD1, 0x3F5D, 0x3F25, 0x1F34, 0x1F24, 0x1EE8, 0x1EBC, 0x1EA8, - 0x0F3A, 0x0F2E, 0x0EE2, 0x071C, 0x0374, 0x01A0, 0x00AE, 0x01A1, - 0x0375, 0x071D, 0x0EE3, 0x0F2F, 0x0F3C, 0x1EA9, 0x1EBD, 0x1EE9, - 0x1F25, 0x1F36, 0x3F24, 0x3F61, 0x7FCE, 0x7FD2, 0x7F91, 0x7F7D, - 0x3F6C, 0x3F34, 0x1F72, 0x1F61, 0x1EDD, 0x1EC5, 0x1EA5, 0x0F05, - 0x0ED6, 0x0750, 0x073E, 0x0368, 0x034A, 0x0052, 0x034B, 0x0369, - 0x073F, 0x0751, 0x0ED7, 0x0F07, 0x1EA7, 0x1EC7, 0x1EDF, 0x1F65, - 0x1F70, 0x3F36, 0x3F6F, 0x7F7C, 0x7F8F, 0x3F90, 0x3F66, 0x3F58, - 0x3F4E, 0x1F48, 0x1EBB, 0x0F40, 0x0F18, 0x0F10, 0x0EDA, 0x0ECF, - 0x0732, 0x0704, 0x0354, 0x0190, 0x004F, 0x0191, 0x0355, 0x0705, - 0x0733, 0x0ED0, 0x0EDB, 0x0F11, 0x0F19, 0x0F41, 0x1EB8, 0x1F4B, - 0x3F4F, 0x3F55, 0x3F65, 0x3F92, 0x7F85, 0x1F51, 0x1F39, 0x1F2B, - 0x1F18, 0x1EC2, 0x0F38, 0x0F14, 0x0ECA, 0x074C, 0x0736, 0x0700, - 0x06FC, 0x0350, 0x00BA, 0x004D, 0x00BB, 0x0351, 0x06FD, 0x0701, - 0x0737, 0x074D, 0x0ECB, 0x0F15, 0x0F39, 0x1EC3, 0x1F1B, 0x1F2E, - 0x1F3A, 0x1F53, 0x7F82, 0x3F8A, 0x3F47, 0x3F2E, 0x1F5E, 0x1E9E, - 0x0F24, 0x0F20, 0x0EC6, 0x0746, 0x0726, 0x070E, 0x0370, 0x035E, - 0x018A, 0x00AC, 0x0021, 0x00AD, 0x018B, 0x035F, 0x0371, 0x070F, - 0x0727, 0x0747, 0x0EC7, 0x0F21, 0x0F25, 0x1E9F, 0x1F5F, 0x3F2D, - 0x3F48, 0x3F8B, 0xFFF1, 0x1F78, 0x1F3D, 0x1EAD, 0x0F2B, 0x0EF9, - 0x0EE9, 0x0739, 0x0719, 0x0709, 0x0363, 0x019B, 0x0195, 0x00B3, - 0x0023, 0x0005, 0x0024, 0x00B4, 0x0196, 0x019C, 0x0364, 0x070A, - 0x071A, 0x073A, 0x0EEA, 0x0EFA, 0x0F2C, 0x1EAE, 0x1F3E, 0x1F79, - 0xFFF0, 0x0F0C, 0x0EE6, 0x0EDC, 0x0EC2, 0x0748, 0x0706, 0x0372, - 0x034C, 0x0198, 0x0192, 0x00C0, 0x00BC, 0x00B6, 0x0053, 0x0006, - 0x0000, 0x0007, 0x0054, 0x00B7, 0x00BD, 0x00C1, 0x0193, 0x0199, - 0x034D, 0x0373, 0x0707, 0x0749, 0x0EC3, 0x0EDD, 0x0EE7, 0x0F0D, - 0xFFF2, 0x1F7A, 0x1F3F, 0x1EAF, 0x0F2D, 0x0EFB, 0x0EEB, 0x073B, - 0x071B, 0x070B, 0x0365, 0x019D, 0x0197, 0x00B5, 0x0025, 0x0004, - 0x0022, 0x00B2, 0x0194, 0x019A, 0x0362, 0x0708, 0x0718, 0x0738, - 0x0EE8, 0x0EF8, 0x0F2A, 0x1EAC, 0x1F3C, 0x1F7B, 0xFFF3, 0x3F89, - 0x3F44, 0x3F2F, 0x1F5C, 0x1E9C, 0x0F22, 0x0F1E, 0x0EC4, 0x0744, - 0x0724, 0x070C, 0x036E, 0x035C, 0x0188, 0x00AA, 0x0020, 0x00AB, - 0x0189, 0x035D, 0x036F, 0x070D, 0x0725, 0x0745, 0x0EC5, 0x0F1F, - 0x0F23, 0x1E9D, 0x1F5D, 0x3F2C, 0x3F45, 0x3F88, 0x7F81, 0x1F52, - 0x1F38, 0x1F28, 0x1F19, 0x1EC0, 0x0F36, 0x0F12, 0x0EC8, 0x074A, - 0x0734, 0x06FE, 0x06FA, 0x034E, 0x00B8, 0x004C, 0x00B9, 0x034F, - 0x06FB, 0x06FF, 0x0735, 0x074B, 0x0EC9, 0x0F13, 0x0F37, 0x1EC1, - 0x1F1A, 0x1F29, 0x1F3B, 0x1F50, 0x7F84, 0x3F91, 0x3F64, 0x3F54, - 0x3F4C, 0x1F49, 0x1EB9, 0x0F3B, 0x0F16, 0x0F0E, 0x0ED8, 0x0ECD, - 0x0730, 0x0702, 0x0352, 0x018E, 0x004E, 0x018F, 0x0353, 0x0703, - 0x0731, 0x0ECE, 0x0ED9, 0x0F0F, 0x0F17, 0x0F3D, 0x1EBA, 0x1F4A, - 0x3F4D, 0x3F51, 0x3F67, 0x3F93, 0x7F90, 0x7F7A, 0x3F6E, 0x3F37, - 0x1F71, 0x1F63, 0x1EDC, 0x1EC4, 0x1EA4, 0x0F04, 0x0ED4, 0x074E, - 0x073C, 0x0366, 0x0348, 0x0051, 0x0349, 0x0367, 0x073D, 0x074F, - 0x0ED5, 0x0F06, 0x1EA6, 0x1EC6, 0x1EDE, 0x1F64, 0x1F73, 0x3F35, - 0x3F6D, 0x7F7B, 0x7F8E, 0x7FD4, 0x7FD0, 0x3F5F, 0x3F26, 0x1F35, - 0x1F27, 0x1EEA, 0x1EBE, 0x1EAA, 0x0F3E, 0x0F30, 0x0EE4, 0x071E, - 0x0376, 0x01A2, 0x00AF, 0x01A3, 0x0377, 0x071F, 0x0EE5, 0x0F31, - 0x0F3F, 0x1EAB, 0x1EBF, 0x1EEB, 0x1F26, 0x1F37, 0x3F27, 0x3F62, - 0x7FCF, 0x7FD3, 0xFFD4, 0x7F78, 0x3F29, 0x3F11, 0x3F0B, 0x1F32, - 0x1F22, 0x1EB6, 0x1EA2, 0x0F48, 0x0F34, 0x0F1C, 0x0758, 0x072A, - 0x0358, 0x00B1, 0x0359, 0x072B, 0x0759, 0x0F1D, 0x0F35, 0x0F49, - 0x1EA3, 0x1EB7, 0x1F21, 0x1F31, 0x3F09, 0x3F12, 0x3F2A, 0x7F79, - 0xFFD6, 0xFFE1, 0x7F6D, 0x7F64, 0x3F73, 0x3F1D, 0x3F14, 0x1F81, - 0x1EE0, 0x1EB0, 0x0F4A, 0x0EFD, 0x0EDE, 0x0ED1, 0x0720, 0x036A, - 0x00BE, 0x036B, 0x0721, 0x0ED2, 0x0EDF, 0x0EFE, 0x0F4B, 0x1EB1, - 0x1EE1, 0x1F7E, 0x3F15, 0x3F1E, 0x3F74, 0x7F62, 0x7F75, 0xFFE3, - 0xFFDE, 0x7FDD, 0x7FBE, 0x7FB3, 0x7F60, 0x3F43, 0x3F0C, 0x1F47, - 0x1F2D, 0x1EC8, 0x0F26, 0x0EF4, 0x0EEC, 0x072C, 0x06F2, 0x0184, - 0x06F3, 0x072D, 0x0EED, 0x0EF5, 0x0F29, 0x1EC9, 0x1F2A, 0x1F44, - 0x3F0D, 0x3F41, 0x7F5E, 0x7FB1, 0x7FC1, 0x7FD7, 0xFFDF, 0xFFEA, - 0x7FA3, 0x7F8B, 0x7F69, 0x3F9E, 0x1F7F, 0x1F6D, 0x1F6B, 0x1EEE, - 0x1EE6, 0x1ED4, 0x1ECF, 0x0EF2, 0x0754, 0x06F8, 0x018D, 0x06F9, - 0x0755, 0x0EF3, 0x1ECC, 0x1ED7, 0x1EE7, 0x1EEF, 0x1F68, 0x1F6F, - 0x1F80, 0x3F9D, 0x7F67, 0x7F8D, 0x7FA8, 0xFFE9, 0xFFE5, 0x7F89, - 0x7F5D, 0x3F7F, 0x3F3F, 0x1F67, 0x1F4F, 0x1F17, 0x1F0F, 0x1F02, - 0x1EFB, 0x1ED9, 0x0F45, 0x075C, 0x0716, 0x0187, 0x0717, 0x075D, - 0x0F44, 0x1EDB, 0x1EF8, 0x1F03, 0x1F0D, 0x1F16, 0x1F4E, 0x1F66, - 0x3F3E, 0x3F7E, 0x3FAD, 0x7F87, 0xFFE4, 0xFFF9, 0x7FC4, 0x7FBA, - 0x7F6E, 0x3F95, 0x3F85, 0x3F78, 0x3F77, 0x3F5B, 0x3F49, 0x1F08, - 0x1EFE, 0x1ED2, 0x0F01, 0x0710, 0x019E, 0x0711, 0x0F00, 0x1ED1, - 0x1EFC, 0x1F0B, 0x3F4B, 0x3F57, 0x3F71, 0x3F79, 0x3F84, 0x3F94, - 0x7F74, 0x7FBD, 0x7FC5, 0xFFFE, 0xFFED, 0x7FE0, 0x7FDF, 0x7FA4, - 0x7F6A, 0x3FA0, 0x3F8F, 0x3F63, 0x3F3A, 0x3F23, 0x3F1A, 0x1F59, - 0x1F1D, 0x1EF3, 0x0743, 0x035B, 0x0742, 0x1EF7, 0x1F1C, 0x1F5B, - 0x3F1B, 0x3F20, 0x3F38, 0x3F60, 0x3F8C, 0x3FA2, 0x7F6C, 0x7FA9, - 0x7FE5, 0x7FE4, 0xFFEF, 0xFFFF, 0x7FD6, 0x7FCB, 0x7FC7, 0x7F9B, - 0x7F83, 0x3FA4, 0x3F81, 0x3F69, 0x3F30, 0x1F57, 0x1F41, 0x1F13, - 0x1F06, 0x0EC0, 0x0361, 0x0EC1, 0x1F04, 0x1F10, 0x1F42, 0x1F55, - 0x3F32, 0x3F6B, 0x3F82, 0x3FA7, 0x7F7E, 0x7F9D, 0x7FC8, 0x7FCD, - 0x7FD8, 0xFFFA, 0xFFF7, 0xFFD9, 0x7FE8, 0x7FB6, 0x7FAB, 0x7FAA, - 0x7FA1, 0x7F96, 0x7F95, 0x3FAB, 0x3F98, 0x3F50, 0x1F77, 0x1EF4, - 0x0F0A, 0x06F1, 0x0F09, 0x1EF6, 0x1F74, 0x3F56, 0x3F99, 0x3FA9, - 0x7F92, 0x7F97, 0x7F9F, 0x7FAD, 0x7FB2, 0x7FB8, 0x7FE7, 0xFFDD, - 0xFFF4, 0x0050, + 2, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 }; static const uint16_t clv_mvy_2_syms[] = { - 0xF1F1, 0xF2F1, 0xF3F1, 0xF4F1, 0xF5F1, 0xF6F1, 0xF7F1, 0xF8F1, - 0xF9F1, 0xFAF1, 0xFBF1, 0xFCF1, 0xFDF1, 0xFEF1, 0xFFF1, 0x00F1, - 0x01F1, 0x02F1, 0x03F1, 0x04F1, 0x05F1, 0x06F1, 0x07F1, 0x08F1, - 0x09F1, 0x0AF1, 0x0BF1, 0x0CF1, 0x0DF1, 0x0EF1, 0x0FF1, 0xF1F2, - 0xF2F2, 0xF3F2, 0xF4F2, 0xF5F2, 0xF6F2, 0xF7F2, 0xF8F2, 0xF9F2, - 0xFAF2, 0xFBF2, 0xFCF2, 0xFDF2, 0xFEF2, 0xFFF2, 0x00F2, 0x01F2, - 0x02F2, 0x03F2, 0x04F2, 0x05F2, 0x06F2, 0x07F2, 0x08F2, 0x09F2, - 0x0AF2, 0x0BF2, 0x0CF2, 0x0DF2, 0x0EF2, 0x0FF2, 0xF1F3, 0xF2F3, - 0xF3F3, 0xF4F3, 0xF5F3, 0xF6F3, 0xF7F3, 0xF8F3, 0xF9F3, 0xFAF3, - 0xFBF3, 0xFCF3, 0xFDF3, 0xFEF3, 0xFFF3, 0x00F3, 0x01F3, 0x02F3, - 0x03F3, 0x04F3, 0x05F3, 0x06F3, 0x07F3, 0x08F3, 0x09F3, 0x0AF3, - 0x0BF3, 0x0CF3, 0x0DF3, 0x0EF3, 0x0FF3, 0xF1F4, 0xF2F4, 0xF3F4, - 0xF4F4, 0xF5F4, 0xF6F4, 0xF7F4, 0xF8F4, 0xF9F4, 0xFAF4, 0xFBF4, - 0xFCF4, 0xFDF4, 0xFEF4, 0xFFF4, 0x00F4, 0x01F4, 0x02F4, 0x03F4, - 0x04F4, 0x05F4, 0x06F4, 0x07F4, 0x08F4, 0x09F4, 0x0AF4, 0x0BF4, - 0x0CF4, 0x0DF4, 0x0EF4, 0x0FF4, 0xF1F5, 0xF2F5, 0xF3F5, 0xF4F5, - 0xF5F5, 0xF6F5, 0xF7F5, 0xF8F5, 0xF9F5, 0xFAF5, 0xFBF5, 0xFCF5, - 0xFDF5, 0xFEF5, 0xFFF5, 0x00F5, 0x01F5, 0x02F5, 0x03F5, 0x04F5, - 0x05F5, 0x06F5, 0x07F5, 0x08F5, 0x09F5, 0x0AF5, 0x0BF5, 0x0CF5, - 0x0DF5, 0x0EF5, 0x0FF5, 0xF1F6, 0xF2F6, 0xF3F6, 0xF4F6, 0xF5F6, - 0xF6F6, 0xF7F6, 0xF8F6, 0xF9F6, 0xFAF6, 0xFBF6, 0xFCF6, 0xFDF6, - 0xFEF6, 0xFFF6, 0x00F6, 0x01F6, 0x02F6, 0x03F6, 0x04F6, 0x05F6, - 0x06F6, 0x07F6, 0x08F6, 0x09F6, 0x0AF6, 0x0BF6, 0x0CF6, 0x0DF6, - 0x0EF6, 0x0FF6, 0xF1F7, 0xF2F7, 0xF3F7, 0xF4F7, 0xF5F7, 0xF6F7, - 0xF7F7, 0xF8F7, 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, - 0xFFF7, 0x00F7, 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, - 0x07F7, 0x08F7, 0x09F7, 0x0AF7, 0x0BF7, 0x0CF7, 0x0DF7, 0x0EF7, - 0x0FF7, 0xF1F8, 0xF2F8, 0xF3F8, 0xF4F8, 0xF5F8, 0xF6F8, 0xF7F8, - 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, - 0x00F8, 0x01F8, 0x02F8, 0x03F8, 0x04F8, 0x05F8, 0x06F8, 0x07F8, - 0x08F8, 0x09F8, 0x0AF8, 0x0BF8, 0x0CF8, 0x0DF8, 0x0EF8, 0x0FF8, - 0xF1F9, 0xF2F9, 0xF3F9, 0xF4F9, 0xF5F9, 0xF6F9, 0xF7F9, 0xF8F9, - 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, 0xFFF9, 0x00F9, - 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, 0x07F9, 0x08F9, - 0x09F9, 0x0AF9, 0x0BF9, 0x0CF9, 0x0DF9, 0x0EF9, 0x0FF9, 0xF1FA, - 0xF2FA, 0xF3FA, 0xF4FA, 0xF5FA, 0xF6FA, 0xF7FA, 0xF8FA, 0xF9FA, - 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, - 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0x08FA, 0x09FA, - 0x0AFA, 0x0BFA, 0x0CFA, 0x0DFA, 0x0EFA, 0x0FFA, 0xF1FB, 0xF2FB, - 0xF3FB, 0xF4FB, 0xF5FB, 0xF6FB, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, - 0xFBFB, 0xFCFB, 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, - 0x03FB, 0x04FB, 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0x0AFB, - 0x0BFB, 0x0CFB, 0x0DFB, 0x0EFB, 0x0FFB, 0xF1FC, 0xF2FC, 0xF3FC, - 0xF4FC, 0xF5FC, 0xF6FC, 0xF7FC, 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, - 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, 0x00FC, 0x01FC, 0x02FC, 0x03FC, - 0x04FC, 0x05FC, 0x06FC, 0x07FC, 0x08FC, 0x09FC, 0x0AFC, 0x0BFC, - 0x0CFC, 0x0DFC, 0x0EFC, 0x0FFC, 0xF1FD, 0xF2FD, 0xF3FD, 0xF4FD, - 0xF5FD, 0xF6FD, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, 0xFBFD, 0xFCFD, - 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, 0x03FD, 0x04FD, - 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0x0AFD, 0x0BFD, 0x0CFD, - 0x0DFD, 0x0EFD, 0x0FFD, 0xF1FE, 0xF2FE, 0xF3FE, 0xF4FE, 0xF5FE, - 0xF6FE, 0xF7FE, 0xF8FE, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, - 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, - 0x06FE, 0x07FE, 0x08FE, 0x09FE, 0x0AFE, 0x0BFE, 0x0CFE, 0x0DFE, - 0x0EFE, 0x0FFE, 0xF1FF, 0xF2FF, 0xF3FF, 0xF4FF, 0xF5FF, 0xF6FF, - 0xF7FF, 0xF8FF, 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, - 0xFFFF, 0x00FF, 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, - 0x07FF, 0x08FF, 0x09FF, 0x0AFF, 0x0BFF, 0x0CFF, 0x0DFF, 0x0EFF, - 0x0FFF, 0xF100, 0xF200, 0xF300, 0xF400, 0xF500, 0xF600, 0xF700, - 0xF800, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00, - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0A00, 0x0B00, 0x0C00, 0x0D00, 0x0E00, 0x0F00, - 0xF101, 0xF201, 0xF301, 0xF401, 0xF501, 0xF601, 0xF701, 0xF801, - 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, 0xFF01, 0x0001, - 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, 0x0701, 0x0801, - 0x0901, 0x0A01, 0x0B01, 0x0C01, 0x0D01, 0x0E01, 0x0F01, 0xF102, - 0xF202, 0xF302, 0xF402, 0xF502, 0xF602, 0xF702, 0xF802, 0xF902, - 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, - 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0x0802, 0x0902, - 0x0A02, 0x0B02, 0x0C02, 0x0D02, 0x0E02, 0x0F02, 0xF103, 0xF203, - 0xF303, 0xF403, 0xF503, 0xF603, 0xF703, 0xF803, 0xF903, 0xFA03, - 0xFB03, 0xFC03, 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, - 0x0303, 0x0403, 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0x0A03, - 0x0B03, 0x0C03, 0x0D03, 0x0E03, 0x0F03, 0xF104, 0xF204, 0xF304, - 0xF404, 0xF504, 0xF604, 0xF704, 0xF804, 0xF904, 0xFA04, 0xFB04, - 0xFC04, 0xFD04, 0xFE04, 0xFF04, 0x0004, 0x0104, 0x0204, 0x0304, - 0x0404, 0x0504, 0x0604, 0x0704, 0x0804, 0x0904, 0x0A04, 0x0B04, - 0x0C04, 0x0D04, 0x0E04, 0x0F04, 0xF105, 0xF205, 0xF305, 0xF405, - 0xF505, 0xF605, 0xF705, 0xF805, 0xF905, 0xFA05, 0xFB05, 0xFC05, - 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, 0x0305, 0x0405, - 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0x0A05, 0x0B05, 0x0C05, - 0x0D05, 0x0E05, 0x0F05, 0xF106, 0xF206, 0xF306, 0xF406, 0xF506, - 0xF606, 0xF706, 0xF806, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, - 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, - 0x0606, 0x0706, 0x0806, 0x0906, 0x0A06, 0x0B06, 0x0C06, 0x0D06, - 0x0E06, 0x0F06, 0xF107, 0xF207, 0xF307, 0xF407, 0xF507, 0xF607, - 0xF707, 0xF807, 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, - 0xFF07, 0x0007, 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, - 0x0707, 0x0807, 0x0907, 0x0A07, 0x0B07, 0x0C07, 0x0D07, 0x0E07, - 0x0F07, 0xF108, 0xF208, 0xF308, 0xF408, 0xF508, 0xF608, 0xF708, - 0xF808, 0xF908, 0xFA08, 0xFB08, 0xFC08, 0xFD08, 0xFE08, 0xFF08, - 0x0008, 0x0108, 0x0208, 0x0308, 0x0408, 0x0508, 0x0608, 0x0708, - 0x0808, 0x0908, 0x0A08, 0x0B08, 0x0C08, 0x0D08, 0x0E08, 0x0F08, - 0xF109, 0xF209, 0xF309, 0xF409, 0xF509, 0xF609, 0xF709, 0xF809, - 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, 0xFF09, 0x0009, - 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, 0x0709, 0x0809, - 0x0909, 0x0A09, 0x0B09, 0x0C09, 0x0D09, 0x0E09, 0x0F09, 0xF10A, - 0xF20A, 0xF30A, 0xF40A, 0xF50A, 0xF60A, 0xF70A, 0xF80A, 0xF90A, - 0xFA0A, 0xFB0A, 0xFC0A, 0xFD0A, 0xFE0A, 0xFF0A, 0x000A, 0x010A, - 0x020A, 0x030A, 0x040A, 0x050A, 0x060A, 0x070A, 0x080A, 0x090A, - 0x0A0A, 0x0B0A, 0x0C0A, 0x0D0A, 0x0E0A, 0x0F0A, 0xF10B, 0xF20B, - 0xF30B, 0xF40B, 0xF50B, 0xF60B, 0xF70B, 0xF80B, 0xF90B, 0xFA0B, - 0xFB0B, 0xFC0B, 0xFD0B, 0xFE0B, 0xFF0B, 0x000B, 0x010B, 0x020B, - 0x030B, 0x040B, 0x050B, 0x060B, 0x070B, 0x080B, 0x090B, 0x0A0B, - 0x0B0B, 0x0C0B, 0x0D0B, 0x0E0B, 0x0F0B, 0xF10C, 0xF20C, 0xF30C, - 0xF40C, 0xF50C, 0xF60C, 0xF70C, 0xF80C, 0xF90C, 0xFA0C, 0xFB0C, - 0xFC0C, 0xFD0C, 0xFE0C, 0xFF0C, 0x000C, 0x010C, 0x020C, 0x030C, - 0x040C, 0x050C, 0x060C, 0x070C, 0x080C, 0x090C, 0x0A0C, 0x0B0C, - 0x0C0C, 0x0D0C, 0x0E0C, 0x0F0C, 0xF10D, 0xF20D, 0xF30D, 0xF40D, - 0xF50D, 0xF60D, 0xF70D, 0xF80D, 0xF90D, 0xFA0D, 0xFB0D, 0xFC0D, - 0xFD0D, 0xFE0D, 0xFF0D, 0x000D, 0x010D, 0x020D, 0x030D, 0x040D, - 0x050D, 0x060D, 0x070D, 0x080D, 0x090D, 0x0A0D, 0x0B0D, 0x0C0D, - 0x0D0D, 0x0E0D, 0x0F0D, 0xF10E, 0xF20E, 0xF30E, 0xF40E, 0xF50E, - 0xF60E, 0xF70E, 0xF80E, 0xF90E, 0xFA0E, 0xFB0E, 0xFC0E, 0xFD0E, - 0xFE0E, 0xFF0E, 0x000E, 0x010E, 0x020E, 0x030E, 0x040E, 0x050E, - 0x060E, 0x070E, 0x080E, 0x090E, 0x0A0E, 0x0B0E, 0x0C0E, 0x0D0E, - 0x0E0E, 0x0F0E, 0xF10F, 0xF20F, 0xF30F, 0xF40F, 0xF50F, 0xF60F, - 0xF70F, 0xF80F, 0xF90F, 0xFA0F, 0xFB0F, 0xFC0F, 0xFD0F, 0xFE0F, - 0xFF0F, 0x000F, 0x010F, 0x020F, 0x030F, 0x040F, 0x050F, 0x060F, - 0x070F, 0x080F, 0x090F, 0x0A0F, 0x0B0F, 0x0C0F, 0x0D0F, 0x0E0F, - 0x0F0F, 0x1010, + 0x0000, 0x0001, 0x00FF, 0xFF00, 0x0100, 0x0002, 0x00FE, 0x0101, 0xFFFF, + 0x01FF, 0xFF01, 0x0003, 0x00FD, 0x0004, 0x00FC, 0x1010, 0x0005, 0x00FB, + 0xFE00, 0x0200, 0xFF02, 0x0102, 0xFFFE, 0x01FE, 0x00FA, 0x0006, 0x00F9, + 0x0007, 0x0201, 0xFEFF, 0x02FF, 0xFE01, 0xFD00, 0x0300, 0xFF03, 0x0103, + 0xFFFD, 0x01FD, 0xFC00, 0x0400, 0x0008, 0x00F8, 0xFB00, 0x0500, 0x0009, + 0x00F7, 0x00F5, 0x000B, 0xFE02, 0x0202, 0xFEFE, 0x02FE, 0x00F6, 0x000A, + 0xFF04, 0x0104, 0xFFFC, 0x01FC, 0xFA00, 0x0600, 0x0301, 0xFDFF, 0x03FF, + 0xFD01, 0xF900, 0x0700, 0x0401, 0xFCFF, 0x04FF, 0xFC01, 0x000C, 0x00F4, + 0xFFFA, 0x01FA, 0xFF06, 0x0106, 0xFF05, 0x0105, 0xFFFB, 0x01FB, 0xF800, + 0x0800, 0xFE03, 0x0203, 0xFEFD, 0x02FD, 0xFE04, 0x0204, 0xFEFC, 0x02FC, + 0xFFF9, 0x01F9, 0xFF07, 0x0107, 0x00F3, 0x000D, 0xFD02, 0x0302, 0xFDFE, + 0x03FE, 0x00F2, 0x000E, 0x0501, 0xFBFF, 0x05FF, 0xFB01, 0xFE05, 0x0205, + 0xFEFB, 0x02FB, 0xFF08, 0x0108, 0xFFF8, 0x01F8, 0xFC02, 0x0402, 0xFCFE, + 0x04FE, 0xF700, 0x0900, 0xFEFA, 0x02FA, 0xFE06, 0x0206, 0x00F1, 0x000F, + 0xFF09, 0x0109, 0xFFF7, 0x01F7, 0xFFF6, 0x01F6, 0xFF0A, 0x010A, 0xFD03, + 0x0303, 0xFDFD, 0x03FD, 0xFC03, 0x0403, 0xFCFD, 0x04FD, 0xFD04, 0x0304, + 0xFDFC, 0x03FC, 0xF600, 0x0A00, 0x0601, 0xFAFF, 0x06FF, 0xFA01, 0xFB02, + 0x0502, 0xFBFE, 0x05FE, 0xFF0C, 0x010C, 0xFFF4, 0x01F4, 0xFFF5, 0x01F5, + 0xFF0B, 0x010B, 0x0701, 0xF9FF, 0x07FF, 0xF901, 0xFDFA, 0x03FA, 0xFD06, + 0x0306, 0xFE08, 0x0208, 0xFEF8, 0x02F8, 0xFA02, 0x0602, 0xFAFE, 0x06FE, + 0xFEF9, 0x02F9, 0xFE07, 0x0207, 0xFE09, 0x0209, 0xFEF7, 0x02F7, 0xFC04, + 0x0404, 0xFCFC, 0x04FC, 0xFB03, 0x0503, 0xFBFD, 0x05FD, 0x0801, 0xF8FF, + 0x08FF, 0xF801, 0xFD05, 0x0305, 0xFDFB, 0x03FB, 0xFFF3, 0x01F3, 0x010D, + 0xFF0D, 0xF902, 0x0702, 0xF9FE, 0x07FE, 0xF500, 0x0B00, 0xFA03, 0x0603, + 0xFAFD, 0x06FD, 0xFC05, 0x0405, 0xFCFB, 0x04FB, 0xFEF6, 0x02F6, 0xFE0A, + 0x020A, 0xFDF9, 0x03F9, 0xFD07, 0x0307, 0xFEF5, 0x02F5, 0xFE0B, 0x020B, + 0xFFF2, 0x01F2, 0xFF0E, 0x010E, 0xF400, 0x0C00, 0xF802, 0x0802, 0xF8FE, + 0x08FE, 0xF903, 0x0703, 0xF9FD, 0x07FD, 0x03F8, 0xFB04, 0x0504, 0xFBFC, + 0x05FC, 0xFD08, 0x0308, 0xFDF8, 0xFB05, 0x0505, 0xFBFB, 0x05FB, 0xFA04, + 0x0604, 0xFAFC, 0x06FC, 0xF300, 0x0D00, 0xFC08, 0x0408, 0xFCF8, 0x04F8, + 0xFCFA, 0x04FA, 0xFC06, 0x0406, 0xF200, 0x0E00, 0x0901, 0xF7FF, 0x09FF, + 0xF701, 0xFD09, 0x0309, 0xFDF7, 0x03F7, 0xFDF6, 0x03F6, 0xFD0A, 0x030A, + 0xFC09, 0x0409, 0xFCF7, 0x04F7, 0x0A01, 0xF6FF, 0x0AFF, 0xF601, 0xFBF8, + 0xFB08, 0x0508, 0x05F8, 0x020C, 0xFE0C, 0xFEF4, 0x02F4, 0xFA05, 0xFAFB, + 0x0605, 0x06FB, 0x01F1, 0x010F, 0xFF0F, 0xFFF1, 0xF100, 0x0F00, 0xF904, + 0x0704, 0xF9FC, 0x07FC, 0xF803, 0x0803, 0xF8FD, 0x08FD, 0xF804, 0x0804, + 0xF8FC, 0x08FC, 0xFCF9, 0x04F9, 0xFC07, 0x0407, 0xF702, 0x0902, 0xF7FE, + 0x09FE, 0xF602, 0x0A02, 0xF6FE, 0x0AFE, 0xFB09, 0xFBF7, 0x05F7, 0x0509, + 0x0B01, 0xF5FF, 0x0BFF, 0xF501, 0xFBFA, 0x05FA, 0xFB06, 0x0506, 0xFBF9, + 0x05F9, 0xFB07, 0x0507, 0xF703, 0x0903, 0xF7FD, 0x09FD, 0xFAFA, 0xF704, + 0x06FA, 0x0904, 0xFA06, 0x0606, 0xF7FC, 0x09FC, 0xFDF5, 0x03F5, 0x030B, + 0xFD0B, 0xFAF9, 0x06F9, 0xFA07, 0x0607, 0xFA08, 0x0608, 0xFAF8, 0x06F8, + 0xF502, 0x0B02, 0xF5FE, 0x0BFE, 0xF9F9, 0x07F9, 0xF907, 0x0707, 0xF905, + 0xF9FB, 0x0705, 0x07FB, 0xF9FA, 0x07FA, 0xF906, 0x0706, 0x0C01, 0xF4FF, + 0x0CFF, 0xF401, 0xF908, 0x0708, 0xF9F8, 0x07F8, 0xF8F9, 0x08F9, 0xF807, + 0x0807, 0x0AFC, 0xF604, 0x0A04, 0xF6FC, 0xF8FA, 0x08FA, 0xF806, 0x0806, + 0xF603, 0x0A03, 0xF6FD, 0x0AFD, 0xF805, 0xF8FB, 0x0805, 0x08FB, 0xFA09, + 0x0609, 0xFAF7, 0x06F7, 0x040A, 0xFCF6, 0x04F6, 0xFC0A, 0xFDF4, 0x030C, + 0xFD0C, 0x03F4, 0xFB0A, 0xFBF6, 0x05F6, 0x050A, 0xFCF5, 0xFC0B, 0x04F5, + 0x040B, 0xF705, 0xF7FB, 0x0905, 0x09FB, 0xF808, 0x0808, 0xF8F8, 0x08F8, + 0xFAF6, 0x06F6, 0xFA0A, 0x060A, 0xF7FA, 0x09FA, 0xF706, 0x0906, 0xF9F6, + 0x07F6, 0xF90A, 0x070A, 0x02F1, 0xFEF3, 0x02F3, 0xFE0D, 0xFE0F, 0xFEF1, + 0x020F, 0x020D, 0x050B, 0xFBF5, 0x05F5, 0xFB0B, 0x040C, 0xFCF4, 0xFC0C, + 0x04F4, 0xFAF5, 0x06F5, 0xFA0B, 0x060B, 0x020E, 0xFEF2, 0xFE0E, 0x02F2, + 0xFB0C, 0x05F4, 0xFBF4, 0x050C, 0xF9F5, 0x070B, 0x07F5, 0xF90B, 0x030E, + 0xFDF2, 0x03F2, 0xFD0E, 0xF8F5, 0x08F5, 0x080B, 0xF80B, 0xF5FD, 0xF503, + 0x0B03, 0x0BFD, 0x030D, 0xFD0D, 0xFDF3, 0x03F3, 0x09F9, 0x0907, 0xF707, + 0xF7F9, 0xF6FA, 0x0AFA, 0x0A06, 0xF606, 0xF403, 0x0C03, 0x0709, 0xF4FD, + 0xF9F7, 0xF909, 0x0CFD, 0x07F7, 0x0AF9, 0x0A07, 0xF607, 0xF6F9, 0xF5FA, + 0xF506, 0x0BFA, 0x0B06, 0xF303, 0xF3FD, 0x0DFD, 0x0D03, 0x0D01, 0xF3FF, + 0x0DFF, 0xF301, 0xFCF2, 0xFC0E, 0x040E, 0x04F2, 0x0809, 0xF8F7, 0x08F7, + 0xF809, 0xF5FC, 0xF504, 0x0B04, 0x0BFC, 0xF7F5, 0x09F5, 0x090B, 0xF70B, + 0x0E03, 0xF2FD, 0xF203, 0x0EFD, 0xFBF2, 0x050E, 0x05F2, 0xFB0E, 0xFCF3, + 0xFC0D, 0x04F3, 0x040D, 0xF402, 0x0C02, 0xF4FE, 0x0CFE, 0xF6F5, 0xF6FB, + 0x0AF5, 0xF605, 0x0A05, 0x0AFB, 0x0A0B, 0xF60B, 0x080A, 0xF8F6, 0x08F6, + 0xF80A, 0xF7F6, 0xF70A, 0x09F6, 0x090A, 0x0BFB, 0xF505, 0xF5FB, 0x0B05, + 0x030F, 0x03F1, 0xFDF1, 0xFD0F, 0xF2FF, 0x0EFF, 0xF201, 0x0E01, 0xF6F6, + 0x0AF6, 0x0908, 0xF60A, 0x0A0A, 0xF708, 0xF7F8, 0x09F8, 0x0BF9, 0x0B07, + 0xF5F9, 0xF507, 0xF709, 0x0909, 0xF7F7, 0x09F7, 0x0CF9, 0xF407, 0x0C07, + 0xF4F9, 0xF608, 0x0A08, 0xF6F8, 0x0AF8, 0xFBF3, 0x05F3, 0xFB0D, 0x050D, + 0xF5F8, 0xF508, 0x0B08, 0x0BF8, 0x060D, 0xFAF3, 0x06F3, 0xFA0D, 0x0CFA, + 0xF4FA, 0xF406, 0x0C06, 0x0DF9, 0xF307, 0x0D07, 0xF3F9, 0x0D02, 0x0DFE, + 0xF3FE, 0xF302, 0xFA0E, 0xFAF2, 0x060E, 0x06F2, 0xF4FB, 0x0C05, 0x0CFB, + 0xF405, 0x070D, 0xF9F3, 0xF90D, 0x07F3, 0xF5F5, 0x0BF5, 0x0B0B, 0xF50B, + 0x0AF7, 0x0A09, 0xF6F7, 0xF609, 0xF202, 0x0E02, 0xFAF4, 0xF2FE, 0x0EFE, + 0xFA0C, 0x06F4, 0x060C, 0xF404, 0x0C04, 0xF4FC, 0x0CFC, 0xFC0F, 0x0D04, + 0xFCF1, 0x04F1, 0xF304, 0x0DFC, 0x040F, 0x070C, 0xF3FC, 0xF9F4, 0x07F4, + 0xF90C, 0xF8F3, 0xF3FA, 0x08F3, 0xF306, 0x080D, 0x0DFA, 0x0D06, 0xF80D, + 0xF204, 0x0EFC, 0xF2FC, 0x0E04, 0x07F2, 0xF90E, 0xF9F2, 0x070E, 0xF3FB, + 0x0D05, 0xF305, 0x0DFB, 0xF4F8, 0x080C, 0xF8F4, 0xF408, 0x0C08, 0x0CF8, + 0x08F4, 0xF80C, 0xF70C, 0x090C, 0xF7F4, 0x09F4, 0xF4F5, 0x0CF5, 0x0C0B, + 0xF40B, 0xF8F2, 0xF80E, 0x080E, 0x08F2, 0x0A0C, 0xF60C, 0xF6F4, 0x0AF4, + 0x0F02, 0xF102, 0xF1FE, 0x0FFE, 0x090D, 0xF7F3, 0x09F3, 0xF70D, 0xF1FC, + 0xF104, 0x0FFC, 0x0F04, 0x0B0C, 0xF50C, 0xF5F4, 0x0BF4, 0xFB0F, 0x050F, + 0x05F1, 0xFBF1, 0xF5F6, 0x0B0A, 0xF50A, 0x0BF6, 0xF60D, 0xF6F3, 0x0A0D, + 0x0AF3, 0xF70E, 0xF7F2, 0x09F2, 0x090E, 0x06F1, 0x060F, 0xFAF1, 0xFA0F, + 0x0DF5, 0x0D0B, 0xF3F5, 0xF30B, 0x0B09, 0x0BF7, 0xF509, 0xF5F7, 0x0D08, + 0xF3F8, 0xF308, 0x0DF8, 0x0CF6, 0x0C0A, 0xF4F6, 0xF40A, 0xF50D, 0x0BF3, + 0x0B0D, 0xF208, 0xF40C, 0xF5F3, 0x0EF8, 0xF4F4, 0xF2F8, 0x0CF4, 0x0C0C, + 0x0E08, 0xF2F9, 0x0EF9, 0xF207, 0x0E07, 0xF205, 0x0E05, 0x0EFB, 0xF2FB, + 0x0A0E, 0x0AF2, 0xF6F2, 0xF103, 0x0FFD, 0xF60E, 0x0F03, 0xF1FD, 0x0EF5, + 0x0E0B, 0xF2F5, 0xF20B, 0x0DF6, 0xF30A, 0xF3F6, 0x0D0A, 0x0F05, 0x0FFB, + 0xF105, 0xF1FB, 0x070F, 0xF9F1, 0x07F1, 0xF90F, 0xF80F, 0x080F, 0x08F1, + 0xF8F1, 0x0BF2, 0xF50E, 0xF5F2, 0x0B0E, 0x09F1, 0x090F, 0xF7F1, 0xF70F, + 0x0CF3, 0xF20A, 0xF40D, 0x0EF6, 0xF4F3, 0xF2F6, 0x0E0A, 0x0C0D, 0xF60F, + 0xF50F, 0xF4F7, 0x0A0F, 0x0AF1, 0x0BF1, 0xF6F1, 0x0C09, 0x0B0F, 0xF409, + 0x0CF7, 0xF5F1, 0xF40F, 0x0CF1, 0x0C0F, 0xF4F1, 0xF30C, 0x0DF4, 0xF3F4, + 0x0D0C, 0xF309, 0x0EF4, 0xF3F7, 0x0D09, 0x0DF7, 0xF2F4, 0xF20C, 0x0E0C, + 0xF4F2, 0xF40E, 0x0C0E, 0x0CF2, 0x0DF2, 0xF30E, 0xF3F2, 0x0D0E, 0x0EFA, + 0x0E06, 0xF206, 0xF2FA, 0x0FFA, 0x0F06, 0xF106, 0xF1FA, 0xF20E, 0x0E09, + 0x0E0E, 0xF2F2, 0xF2F7, 0x0EF2, 0x0EF7, 0xF209, 0xF2F3, 0xF30D, 0xF20D, + 0x0EF3, 0xF3F3, 0x0DF3, 0x0E0D, 0x0D0D, 0xF3F1, 0x0D0F, 0xF30F, 0x0DF1, + 0xF107, 0x0FF9, 0x0F07, 0xF1F9, 0xF2F1, 0xF20F, 0x0FF7, 0x0EF1, 0xF1F7, + 0x0E0F, 0xF109, 0x0F09, 0xF1F8, 0xF108, 0x0FF8, 0x0F08, 0x0F0B, 0xF10B, + 0x0FF6, 0xF1F6, 0x0FF5, 0x0F0A, 0xF10A, 0xF1F5, 0xF1F3, 0xF10D, 0x0FF3, + 0x0F0D, 0x0FFF, 0xF1FF, 0xF101, 0x0F01, 0x0F0F, 0xF1F1, 0x0FF1, 0xF10F, + 0x0FF2, 0xF10C, 0x0F0E, 0x0FF4, 0xF1F4, 0xF1F2, 0x0F0C, 0xF10E, }; static const uint8_t clv_mvy_3_bits[] = { - 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 14, 14, 13, - 13, 12, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, - 15, 15, 14, 14, 14, 13, 12, 11, 12, 13, 14, 14, 14, 15, 15, 15, - 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, - 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 12, 11, 12, 14, 14, - 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, - 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, - 12, 11, 12, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, - 15, 16, 16, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 13, 13, 12, 10, 12, 13, 13, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 15, 15, 15, 15, - 14, 14, 14, 14, 13, 13, 13, 13, 13, 12, 12, 10, 12, 12, 13, 13, - 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 15, 15, - 15, 15, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 11, - 10, 11, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, - 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, - 12, 12, 12, 11, 10, 9, 10, 11, 12, 12, 12, 12, 12, 13, 13, 13, - 13, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, - 12, 12, 12, 12, 12, 12, 12, 11, 11, 10, 9, 10, 11, 11, 12, 12, - 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 16, 15, 15, - 15, 15, 14, 14, 13, 13, 12, 12, 12, 12, 12, 11, 11, 11, 10, 9, - 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, - 15, 16, 15, 15, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 12, 12, - 11, 11, 11, 10, 9, 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, - 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, - 12, 12, 12, 12, 12, 11, 11, 11, 10, 8, 10, 11, 11, 11, 12, 12, - 12, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 15, 14, 14, - 14, 14, 13, 13, 12, 12, 12, 12, 12, 11, 11, 11, 10, 10, 8, 10, - 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, - 15, 15, 14, 14, 14, 14, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, - 10, 10, 9, 7, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, - 13, 14, 14, 14, 14, 15, 15, 14, 14, 14, 14, 13, 13, 13, 12, 12, - 12, 12, 11, 11, 11, 10, 10, 9, 7, 9, 10, 10, 11, 11, 11, 12, - 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 14, 14, 14, 14, - 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 10, 9, 9, 7, 9, 9, - 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, - 15, 14, 14, 14, 13, 13, 13, 13, 12, 11, 11, 11, 11, 10, 10, 10, - 9, 8, 6, 8, 9, 10, 10, 10, 11, 11, 11, 11, 12, 13, 13, 13, - 13, 14, 14, 14, 15, 15, 14, 14, 14, 13, 13, 12, 12, 11, 11, 11, - 11, 10, 10, 9, 9, 8, 6, 4, 6, 8, 9, 9, 10, 10, 11, 11, - 11, 11, 12, 12, 13, 13, 14, 14, 14, 15, 13, 13, 13, 12, 12, 12, - 12, 11, 10, 10, 10, 10, 9, 9, 8, 8, 7, 5, 2, 5, 7, 8, - 8, 9, 9, 10, 10, 10, 10, 11, 12, 12, 12, 12, 13, 13, 13, 15, - 14, 14, 14, 13, 13, 12, 12, 11, 11, 11, 11, 10, 10, 9, 9, 8, - 6, 4, 6, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, - 14, 14, 14, 15, 15, 14, 14, 14, 13, 13, 13, 13, 12, 11, 11, 11, - 11, 10, 10, 10, 9, 8, 6, 8, 9, 10, 10, 10, 11, 11, 11, 11, - 12, 13, 13, 13, 13, 14, 14, 14, 15, 15, 14, 14, 14, 14, 13, 13, - 12, 12, 12, 12, 11, 11, 11, 11, 10, 9, 9, 7, 9, 9, 10, 11, - 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 14, - 14, 14, 14, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 10, 10, 9, - 7, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, - 14, 14, 15, 15, 14, 14, 14, 14, 13, 13, 13, 12, 12, 12, 12, 11, - 11, 11, 10, 10, 9, 7, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, - 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 14, 14, 14, 14, 13, 13, - 12, 12, 12, 12, 12, 11, 11, 11, 10, 10, 8, 10, 10, 11, 11, 11, - 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, - 14, 14, 14, 13, 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, 10, 8, - 10, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 15, - 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 12, 12, - 11, 11, 11, 10, 9, 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, - 14, 14, 14, 14, 14, 15, 15, 16, 15, 15, 15, 15, 14, 14, 13, 13, - 12, 12, 12, 12, 12, 11, 11, 11, 10, 9, 10, 11, 11, 11, 12, 12, - 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 15, 15, 14, - 14, 14, 13, 13, 12, 12, 12, 12, 12, 12, 12, 11, 11, 10, 9, 10, - 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, - 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, - 12, 11, 10, 9, 10, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, - 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, - 13, 13, 13, 13, 13, 13, 13, 11, 10, 11, 13, 13, 13, 13, 13, 13, - 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 15, 15, - 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 13, 12, 12, 10, 12, 12, - 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, - 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, - 13, 12, 10, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, - 15, 15, 15, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, - 14, 14, 14, 14, 13, 13, 12, 11, 12, 13, 13, 14, 14, 14, 14, 14, - 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 15, 15, 15, - 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 12, 11, 12, 14, 14, - 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, - 12, 11, 12, 13, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, - 15, 14, 14, 13, 13, 12, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, - 15, 15, 16, 16, 16, 16, 16, 16, 16, 7, -}; - -static const uint16_t clv_mvy_3_codes[] = { - 0xFFF6, 0xFFEE, 0xFFDC, 0xFFD7, 0xFFB4, 0xFFAA, 0xFFA0, 0x7FCC, - 0x7F8E, 0x7F7B, 0x7F77, 0x7F13, 0x7F11, 0x3F56, 0x3F48, 0x1F16, - 0x1E94, 0x0F28, 0x06F0, 0x0F2A, 0x1E96, 0x1F1C, 0x3F46, 0x3F58, - 0x7F15, 0x7F0E, 0x7F76, 0x7F80, 0x7F90, 0x7FC8, 0xFFA2, 0xFFA7, - 0xFFB5, 0xFFD8, 0xFFDD, 0xFFEC, 0xFFF5, 0xFFF1, 0xFFEA, 0xFFE4, - 0xFFD1, 0xFFC1, 0xFFA8, 0x7F70, 0x7F5C, 0x7F44, 0x7F40, 0x7F2A, - 0x7F16, 0x7EDF, 0x3ED6, 0x3ECA, 0x3ECC, 0x1EB5, 0x0EDE, 0x06D3, - 0x0EDF, 0x1EB6, 0x3ECE, 0x3ED0, 0x3ED8, 0x7EE5, 0x7F19, 0x7F31, - 0x7F3E, 0x7F45, 0x7F5B, 0x7F6F, 0xFFA9, 0xFFC0, 0xFFCE, 0xFFE5, - 0xFFE8, 0xFFF2, 0xFFFE, 0xFFE2, 0xFFBE, 0x7FBB, 0x7F75, 0x7F6B, - 0x7F58, 0x7EF9, 0x7EDC, 0x3F68, 0x3F27, 0x3F28, 0x3EDF, 0x3ED2, - 0x3EC1, 0x3EA6, 0x3E87, 0x0F0F, 0x06B3, 0x0F10, 0x3E89, 0x3EA8, - 0x3EC3, 0x3ED5, 0x3EE0, 0x3F2B, 0x3F26, 0x3F67, 0x7EDA, 0x7EFB, - 0x7F56, 0x7F6A, 0x7F72, 0x7FC1, 0xFFBC, 0xFFE0, 0xFFFF, 0xFFF8, - 0xFFD3, 0xFFB9, 0x7FAC, 0x7F94, 0x7F8B, 0x7F62, 0x7F4A, 0x7F05, - 0x7EEE, 0x3F44, 0x3EA4, 0x3E78, 0x3E6F, 0x3E54, 0x1EEF, 0x1EA9, - 0x0ED4, 0x06A8, 0x0ED5, 0x1EA8, 0x1EEC, 0x3E51, 0x3E69, 0x3E75, - 0x3EA3, 0x3F43, 0x7EF1, 0x7F04, 0x7F4B, 0x7F5D, 0x7F89, 0x7F95, - 0x7FAA, 0xFFBB, 0xFFC8, 0xFFF9, 0xFFD9, 0xFFCA, 0x7FC3, 0x7F8C, - 0x7F38, 0x7F02, 0x3F5A, 0x3F4A, 0x3F30, 0x3EFF, 0x3EF4, 0x3EE9, - 0x3E95, 0x3E73, 0x3E43, 0x1F08, 0x1E81, 0x0E84, 0x0349, 0x0E85, - 0x1E82, 0x1F07, 0x3E45, 0x3E74, 0x3E96, 0x3EEA, 0x3EF1, 0x3F00, - 0x3F32, 0x3F4F, 0x3F5C, 0x7F01, 0x7F3B, 0x7F8D, 0x7FC2, 0xFFCF, - 0xFFD6, 0xFFC7, 0xFFB1, 0xFFA6, 0x7FA1, 0x7F2F, 0x7F24, 0x7F0A, - 0x3EF6, 0x3E97, 0x3E83, 0x3E7F, 0x1F04, 0x1EE1, 0x1ECB, 0x1EAE, - 0x1E7E, 0x0EBA, 0x0E8C, 0x0333, 0x0E8D, 0x0EBB, 0x1E7F, 0x1EAF, - 0x1ECC, 0x1EE2, 0x1F05, 0x3E80, 0x3E84, 0x3E98, 0x3EF9, 0x7F06, - 0x7F1B, 0x7F2D, 0x7F9F, 0xFFAF, 0xFFB0, 0xFFC6, 0x7FB5, 0x7FB1, - 0x7F36, 0x7F25, 0x3F63, 0x3F3A, 0x3F1B, 0x3EBB, 0x3E63, 0x3E5B, - 0x3E40, 0x1F14, 0x1EF5, 0x1EEB, 0x1EBE, 0x1E92, 0x1E6A, 0x070C, - 0x032D, 0x070D, 0x1E6B, 0x1E93, 0x1EBF, 0x1EE8, 0x1EF3, 0x1F15, - 0x3E3F, 0x3E5C, 0x3E64, 0x3EB9, 0x3F1C, 0x3F3C, 0x3F62, 0x7F22, - 0x7F39, 0x7FAF, 0x7FAE, 0x7FC6, 0x7F7F, 0x7F53, 0x7F32, 0x3F66, - 0x3EF0, 0x3E65, 0x1EDA, 0x1ED3, 0x1E98, 0x1E74, 0x0F20, 0x0F1D, - 0x0EEA, 0x0EA9, 0x0E70, 0x0718, 0x033E, 0x0179, 0x033F, 0x0719, - 0x0E71, 0x0EAB, 0x0EE9, 0x0F1F, 0x0F22, 0x1E76, 0x1E9B, 0x1ED5, - 0x1EDD, 0x3E68, 0x3EF3, 0x3F6C, 0x7F33, 0x7F4E, 0x7F7D, 0x7FCB, - 0x7FBD, 0x7F21, 0x7EF6, 0x3F0C, 0x3EBE, 0x3EAE, 0x1EA3, 0x1E85, - 0x0F0C, 0x0F06, 0x0EEE, 0x0EE6, 0x0ECA, 0x0EA2, 0x0E78, 0x0720, - 0x06BA, 0x0326, 0x015D, 0x0327, 0x06BB, 0x0721, 0x0E79, 0x0EA3, - 0x0ECB, 0x0EE7, 0x0EEF, 0x0F07, 0x0F0D, 0x1E86, 0x1EA4, 0x3EAF, - 0x3EBF, 0x3F0A, 0x7EF8, 0x7F1E, 0x7FBF, 0xFF9F, 0x7FB3, 0x7F96, - 0x7F0B, 0x7EF5, 0x3E85, 0x3E4E, 0x1EB3, 0x1E6E, 0x0F2D, 0x0EBD, - 0x0E97, 0x0E93, 0x0E86, 0x071A, 0x06E4, 0x06BC, 0x0338, 0x015A, - 0x0339, 0x06BD, 0x06E5, 0x071B, 0x0E87, 0x0E94, 0x0E98, 0x0EBE, - 0x0F2E, 0x1E6F, 0x1EB4, 0x3E4F, 0x3E88, 0x7EF4, 0x7F07, 0x7F99, - 0x7FB7, 0xFF9D, 0x7FA8, 0x7EEB, 0x3F5D, 0x3EB2, 0x3EAA, 0x3E5D, - 0x3E49, 0x1EFE, 0x1E89, 0x0F16, 0x0F12, 0x0EE0, 0x0E7A, 0x0E6A, - 0x070E, 0x06FA, 0x06B4, 0x0314, 0x0158, 0x0315, 0x06B5, 0x06FB, - 0x070F, 0x0E6B, 0x0E7B, 0x0EE1, 0x0F13, 0x0F17, 0x1E8A, 0x1EFF, - 0x3E4A, 0x3E5E, 0x3EAB, 0x3EB3, 0x3F59, 0x7EEC, 0x7FA2, 0x7F82, - 0x7F5E, 0x7F28, 0x3EDA, 0x3EC9, 0x3E7A, 0x1ED6, 0x1ECE, 0x0EFC, - 0x0EF0, 0x0E9A, 0x0E7E, 0x0E66, 0x0E5E, 0x0722, 0x06C0, 0x06A0, - 0x02FA, 0x00A8, 0x02FB, 0x06A1, 0x06C1, 0x0723, 0x0E5F, 0x0E67, - 0x0E7F, 0x0E9B, 0x0EF1, 0x0EFD, 0x1ECF, 0x1ED7, 0x3E79, 0x3ECD, - 0x3EDB, 0x7F26, 0x7F5A, 0x7F83, 0x7F54, 0x7EE8, 0x3F54, 0x3F0E, - 0x3EFB, 0x3E47, 0x1EC1, 0x1EB9, 0x0EF9, 0x0EF3, 0x0EC1, 0x0E8F, - 0x0E74, 0x0714, 0x06F4, 0x06B0, 0x0336, 0x030A, 0x009F, 0x030B, - 0x0337, 0x06B1, 0x06F5, 0x0715, 0x0E75, 0x0E91, 0x0EC3, 0x0EF6, - 0x0EFB, 0x1EBB, 0x1EC3, 0x3E41, 0x3EF8, 0x3F10, 0x3F4D, 0x7EE9, - 0x7F52, 0x7F9A, 0x3F3F, 0x3F1F, 0x3F03, 0x3EA0, 0x1F0F, 0x1E72, - 0x1E62, 0x0EDA, 0x0ED2, 0x0EB2, 0x0E64, 0x0708, 0x06EA, 0x06DA, - 0x0346, 0x032A, 0x0176, 0x004B, 0x0177, 0x032B, 0x0347, 0x06DB, - 0x06EB, 0x0709, 0x0E65, 0x0EB3, 0x0ED3, 0x0EDB, 0x1E63, 0x1E6C, - 0x1F0E, 0x3E9E, 0x3F01, 0x3F1D, 0x3F3D, 0x7F9B, 0x7EDE, 0x3F36, - 0x3F2E, 0x3F07, 0x3E99, 0x1F0D, 0x1EA1, 0x1E8C, 0x0EB4, 0x0EAC, - 0x0E5A, 0x0E50, 0x0702, 0x06D4, 0x06C6, 0x032E, 0x0310, 0x0162, - 0x0046, 0x0163, 0x0311, 0x032F, 0x06C7, 0x06D5, 0x0703, 0x0E51, - 0x0E5B, 0x0EAD, 0x0EB5, 0x1E8F, 0x1EA7, 0x1F0C, 0x3E9A, 0x3F02, - 0x3F2D, 0x3F35, 0x7EE0, 0x7F66, 0x3F11, 0x3EE1, 0x3EBC, 0x3E56, - 0x1EC4, 0x1E64, 0x0F04, 0x0EC7, 0x0E56, 0x0E4C, 0x06EC, 0x06DC, - 0x069C, 0x0694, 0x0320, 0x016C, 0x0154, 0x0044, 0x0155, 0x016D, - 0x0321, 0x0695, 0x069D, 0x06DD, 0x06ED, 0x0E4D, 0x0E57, 0x0EC4, - 0x0F05, 0x1E65, 0x1EC5, 0x3E55, 0x3EB7, 0x3EE3, 0x3F13, 0x7F67, - 0x7FA7, 0x3F49, 0x3F22, 0x3EE5, 0x1EF6, 0x1EE5, 0x1E9C, 0x1E78, - 0x0EA4, 0x06F6, 0x06DE, 0x06CE, 0x06AA, 0x0340, 0x0318, 0x02FE, - 0x015E, 0x009A, 0x001C, 0x009B, 0x015F, 0x02FF, 0x0319, 0x0341, - 0x06AB, 0x06CF, 0x06DF, 0x06F7, 0x0EA5, 0x1E79, 0x1E9D, 0x1EE7, - 0x1EF7, 0x3EE6, 0x3F23, 0x3F4B, 0x7FA3, 0x7F49, 0x3F14, 0x3E8D, - 0x3E6B, 0x1F17, 0x1EF8, 0x0F24, 0x0ECC, 0x06FE, 0x06CA, 0x06A4, - 0x0698, 0x030C, 0x0302, 0x0170, 0x0168, 0x00A0, 0x001E, 0x0004, - 0x001F, 0x00A1, 0x0169, 0x0171, 0x0303, 0x030D, 0x0699, 0x06A5, - 0x06CB, 0x06FF, 0x0ECD, 0x0F25, 0x1EF9, 0x1F18, 0x3E6C, 0x3E8E, - 0x3F15, 0x7F46, 0x1EF0, 0x1EDE, 0x1EC8, 0x0F1A, 0x0F00, 0x0E9E, - 0x0E54, 0x06C4, 0x031E, 0x031C, 0x0306, 0x02F8, 0x017A, 0x0166, - 0x00A6, 0x00A4, 0x0048, 0x000C, 0x0000, 0x000D, 0x0049, 0x00A5, - 0x00A7, 0x0167, 0x017B, 0x02F9, 0x0307, 0x031D, 0x031F, 0x06C5, - 0x0E55, 0x0E9F, 0x0F01, 0x0F1B, 0x1EC9, 0x1EDF, 0x1EF1, 0x7F47, - 0x3F12, 0x3E8F, 0x3E6D, 0x1F1B, 0x1EFA, 0x0F26, 0x0ECE, 0x0700, - 0x06CC, 0x06A6, 0x069A, 0x030E, 0x0304, 0x0172, 0x016A, 0x00A2, - 0x0020, 0x0005, 0x0021, 0x00A3, 0x016B, 0x0173, 0x0305, 0x030F, - 0x069B, 0x06A7, 0x06CD, 0x0701, 0x0ECF, 0x0F27, 0x1EFB, 0x1F1D, - 0x3E6E, 0x3E90, 0x3F17, 0x7F48, 0x7FA9, 0x3F50, 0x3F24, 0x3EE7, - 0x1EFC, 0x1EE9, 0x1E9E, 0x1E7A, 0x0EA6, 0x06F8, 0x06E0, 0x06D0, - 0x06AC, 0x0342, 0x031A, 0x0300, 0x0160, 0x009C, 0x001D, 0x009D, - 0x0161, 0x0301, 0x031B, 0x0343, 0x06AD, 0x06D1, 0x06E1, 0x06F9, - 0x0EA7, 0x1E7B, 0x1E9F, 0x1EEA, 0x1EFD, 0x3EE8, 0x3F21, 0x3F52, - 0x7F9E, 0x7F68, 0x3F16, 0x3EE2, 0x3EBA, 0x3E57, 0x1EC6, 0x1E66, - 0x0F08, 0x0EC5, 0x0E58, 0x0E4E, 0x06EE, 0x06E2, 0x069E, 0x0696, - 0x0322, 0x016E, 0x0156, 0x0045, 0x0157, 0x016F, 0x0323, 0x0697, - 0x069F, 0x06E3, 0x06EF, 0x0E4F, 0x0E59, 0x0EC6, 0x0F09, 0x1E67, - 0x1EC7, 0x3E58, 0x3EB8, 0x3EE4, 0x3F18, 0x7F69, 0x7EE2, 0x3F38, - 0x3F33, 0x3F04, 0x3E9C, 0x1F0A, 0x1EA5, 0x1E8D, 0x0EB6, 0x0EAE, - 0x0E5C, 0x0E52, 0x0704, 0x06D6, 0x06C8, 0x0330, 0x0312, 0x0164, - 0x0047, 0x0165, 0x0313, 0x0331, 0x06C9, 0x06D7, 0x0705, 0x0E53, - 0x0E5D, 0x0EAF, 0x0EB7, 0x1E8E, 0x1EA6, 0x1F0B, 0x3E9B, 0x3F05, - 0x3F31, 0x3F39, 0x7EE1, 0x7F9C, 0x3F40, 0x3F1E, 0x3F06, 0x3E9D, - 0x1F10, 0x1E70, 0x1E60, 0x0ED8, 0x0ED0, 0x0EB0, 0x0E62, 0x0706, - 0x06E8, 0x06D8, 0x0344, 0x0328, 0x0174, 0x004A, 0x0175, 0x0329, - 0x0345, 0x06D9, 0x06E9, 0x0707, 0x0E63, 0x0EB1, 0x0ED1, 0x0ED9, - 0x1E61, 0x1E71, 0x1F11, 0x3E9F, 0x3F08, 0x3F20, 0x3F3E, 0x7F9D, - 0x7F4F, 0x7EE6, 0x3F53, 0x3F0D, 0x3EFA, 0x3E46, 0x1EC0, 0x1EB8, - 0x0EF8, 0x0EF2, 0x0EC0, 0x0E8E, 0x0E72, 0x0712, 0x06F2, 0x06AE, - 0x0334, 0x0308, 0x009E, 0x0309, 0x0335, 0x06AF, 0x06F3, 0x0713, - 0x0E73, 0x0E90, 0x0EC2, 0x0EF4, 0x0EFA, 0x1EBA, 0x1EC2, 0x3E48, - 0x3EFC, 0x3F0B, 0x3F51, 0x7EE7, 0x7F51, 0x7F84, 0x7F61, 0x7F27, - 0x3EDC, 0x3EC5, 0x3E7C, 0x1ED8, 0x1ED0, 0x0EFE, 0x0EF5, 0x0E9C, - 0x0E80, 0x0E68, 0x0E60, 0x0724, 0x06C2, 0x06A2, 0x02FC, 0x00A9, - 0x02FD, 0x06A3, 0x06C3, 0x0725, 0x0E61, 0x0E69, 0x0E81, 0x0E9D, - 0x0EF7, 0x0EFF, 0x1ED1, 0x1ED9, 0x3E7B, 0x3ECF, 0x3ED9, 0x7F29, - 0x7F65, 0x7F85, 0x7FA0, 0x7EEA, 0x3F60, 0x3EB4, 0x3EAC, 0x3E5F, - 0x3E4B, 0x1F00, 0x1E8B, 0x0F18, 0x0F14, 0x0EE2, 0x0E7C, 0x0E6C, - 0x0710, 0x06FC, 0x06B6, 0x0316, 0x0159, 0x0317, 0x06B7, 0x06FD, - 0x0711, 0x0E6D, 0x0E7D, 0x0EE3, 0x0F15, 0x0F19, 0x1E88, 0x1F01, - 0x3E4C, 0x3E60, 0x3EA9, 0x3EB1, 0x3F5B, 0x7EED, 0x7FA5, 0xFF9E, - 0x7FBE, 0x7F98, 0x7F0D, 0x7EF3, 0x3E8C, 0x3E50, 0x1EB7, 0x1E73, - 0x0F2F, 0x0EBF, 0x0E99, 0x0E95, 0x0E88, 0x071C, 0x06E6, 0x06BE, - 0x033A, 0x015B, 0x033B, 0x06BF, 0x06E7, 0x071D, 0x0E89, 0x0E92, - 0x0E96, 0x0EBC, 0x0F2C, 0x1E6D, 0x1EB0, 0x3E4D, 0x3E8B, 0x7EF2, - 0x7F08, 0x7F97, 0x7FB0, 0xFF9C, 0x7FB2, 0x7F23, 0x7EFA, 0x3F0F, - 0x3EBD, 0x3EAD, 0x1EA0, 0x1E87, 0x0F0A, 0x0F02, 0x0EED, 0x0EE4, - 0x0EC8, 0x0EA0, 0x0E76, 0x071E, 0x06B8, 0x0324, 0x015C, 0x0325, - 0x06B9, 0x071F, 0x0E77, 0x0EA1, 0x0EC9, 0x0EE5, 0x0EEC, 0x0F03, - 0x0F0B, 0x1E84, 0x1EA2, 0x3EB0, 0x3EC4, 0x3F09, 0x7EF7, 0x7F1D, - 0x7FBC, 0x7FCD, 0x7F81, 0x7F50, 0x7F34, 0x3F65, 0x3EED, 0x3E67, - 0x1EDB, 0x1ED2, 0x1E99, 0x1E77, 0x0F21, 0x0F1C, 0x0EE8, 0x0EA8, - 0x0E6E, 0x0716, 0x033C, 0x0178, 0x033D, 0x0717, 0x0E6F, 0x0EAA, - 0x0EEB, 0x0F1E, 0x0F23, 0x1E75, 0x1E9A, 0x1ED4, 0x1EDC, 0x3E66, - 0x3EEE, 0x3F6B, 0x7F35, 0x7F55, 0x7F7A, 0x7FCA, 0x7FB6, 0x7FB8, - 0x7F37, 0x7F1F, 0x3F61, 0x3F37, 0x3F1A, 0x3EB5, 0x3E62, 0x3E5A, - 0x1F1E, 0x1F13, 0x1EF2, 0x1EE6, 0x1EBC, 0x1E91, 0x1E68, 0x070A, - 0x032C, 0x070B, 0x1E69, 0x1E90, 0x1EBD, 0x1EE4, 0x1EF4, 0x1F12, - 0x3E3E, 0x3E59, 0x3E61, 0x3EB6, 0x3F19, 0x3F3B, 0x3F64, 0x7F1C, - 0x7F3D, 0x7FB4, 0x7FB9, 0xFFC5, 0xFFB6, 0xFFAD, 0x7FA4, 0x7F2C, - 0x7F20, 0x7F09, 0x3EF5, 0x3E93, 0x3E82, 0x3E7E, 0x1F02, 0x1EE3, - 0x1ECA, 0x1EAD, 0x1E7C, 0x0EB8, 0x0E8A, 0x0332, 0x0E8B, 0x0EB9, - 0x1E7D, 0x1EAC, 0x1ECD, 0x1EE0, 0x1F03, 0x3E7D, 0x3E81, 0x3E91, - 0x3EF7, 0x7F0C, 0x7F1A, 0x7F2E, 0x7FA6, 0xFFA4, 0xFFB7, 0xFFC4, - 0xFFD4, 0xFFCC, 0x7FC5, 0x7F8A, 0x7F3C, 0x7EFF, 0x3F5E, 0x3F4E, - 0x3F2F, 0x3EFD, 0x3EEF, 0x3EEB, 0x3E92, 0x3E71, 0x3E42, 0x1F09, - 0x1E83, 0x0E82, 0x0348, 0x0E83, 0x1E80, 0x1F06, 0x3E44, 0x3E72, - 0x3E94, 0x3EEC, 0x3EF2, 0x3EFE, 0x3F34, 0x3F4C, 0x3F5F, 0x7EFE, - 0x7F3A, 0x7F86, 0x7FC4, 0xFFD2, 0xFFD5, 0xFFFA, 0xFFCD, 0xFFBA, - 0x7FAB, 0x7F92, 0x7F87, 0x7F63, 0x7F4C, 0x7F03, 0x7EF0, 0x3F42, - 0x3EA1, 0x3E76, 0x3E6A, 0x3E52, 0x1EEE, 0x1EAB, 0x0ED6, 0x06A9, - 0x0ED7, 0x1EAA, 0x1EED, 0x3E53, 0x3E70, 0x3E77, 0x3EA2, 0x3F41, - 0x7EEF, 0x7F00, 0x7F4D, 0x7F60, 0x7F88, 0x7F93, 0x7FAD, 0xFFB8, - 0xFFCB, 0xFFFB, 0xFFFC, 0xFFE1, 0xFFBF, 0x7FBA, 0x7F73, 0x7F6C, - 0x7F57, 0x7EFC, 0x7EDD, 0x3F6A, 0x3F2A, 0x3F25, 0x3EDD, 0x3ED3, - 0x3EC2, 0x3EA7, 0x3E86, 0x0F11, 0x06B2, 0x0F0E, 0x3E8A, 0x3EA5, - 0x3EC0, 0x3ED1, 0x3EDE, 0x3F2C, 0x3F29, 0x3F69, 0x7EDB, 0x7EFD, - 0x7F59, 0x7F6D, 0x7F74, 0x7FC0, 0xFFC3, 0xFFE3, 0xFFFD, 0xFFF0, - 0xFFE9, 0xFFE7, 0xFFC9, 0xFFBD, 0xFFAE, 0x7F71, 0x7F5F, 0x7F42, - 0x7F41, 0x7F30, 0x7F17, 0x7EE4, 0x3ED7, 0x3EC7, 0x3ECB, 0x1EB1, - 0x0EDC, 0x06D2, 0x0EDD, 0x1EB2, 0x3EC6, 0x3EC8, 0x3ED4, 0x7EE3, - 0x7F18, 0x7F2B, 0x7F3F, 0x7F43, 0x7F64, 0x7F6E, 0xFFAB, 0xFFC2, - 0xFFD0, 0xFFE6, 0xFFEF, 0xFFF3, 0xFFF7, 0xFFEB, 0xFFDE, 0xFFDA, - 0xFFB3, 0xFFAC, 0xFFA3, 0x7FC9, 0x7F8F, 0x7F7C, 0x7F79, 0x7F0F, - 0x7F10, 0x3F55, 0x3F45, 0x1F1A, 0x1E95, 0x0F2B, 0x06F1, 0x0F29, - 0x1E97, 0x1F19, 0x3F47, 0x3F57, 0x7F14, 0x7F12, 0x7F78, 0x7F7E, - 0x7F91, 0x7FC7, 0xFFA1, 0xFFA5, 0xFFB2, 0xFFDB, 0xFFDF, 0xFFED, - 0xFFF4, 0x004C, + 2, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16 }; static const uint16_t clv_mvy_3_syms[] = { - 0xEEEE, 0xEFEE, 0xF0EE, 0xF1EE, 0xF2EE, 0xF3EE, 0xF4EE, 0xF5EE, - 0xF6EE, 0xF7EE, 0xF8EE, 0xF9EE, 0xFAEE, 0xFBEE, 0xFCEE, 0xFDEE, - 0xFEEE, 0xFFEE, 0x00EE, 0x01EE, 0x02EE, 0x03EE, 0x04EE, 0x05EE, - 0x06EE, 0x07EE, 0x08EE, 0x09EE, 0x0AEE, 0x0BEE, 0x0CEE, 0x0DEE, - 0x0EEE, 0x0FEE, 0x10EE, 0x11EE, 0x12EE, 0xEEEF, 0xEFEF, 0xF0EF, - 0xF1EF, 0xF2EF, 0xF3EF, 0xF4EF, 0xF5EF, 0xF6EF, 0xF7EF, 0xF8EF, - 0xF9EF, 0xFAEF, 0xFBEF, 0xFCEF, 0xFDEF, 0xFEEF, 0xFFEF, 0x00EF, - 0x01EF, 0x02EF, 0x03EF, 0x04EF, 0x05EF, 0x06EF, 0x07EF, 0x08EF, - 0x09EF, 0x0AEF, 0x0BEF, 0x0CEF, 0x0DEF, 0x0EEF, 0x0FEF, 0x10EF, - 0x11EF, 0x12EF, 0xEEF0, 0xEFF0, 0xF0F0, 0xF1F0, 0xF2F0, 0xF3F0, - 0xF4F0, 0xF5F0, 0xF6F0, 0xF7F0, 0xF8F0, 0xF9F0, 0xFAF0, 0xFBF0, - 0xFCF0, 0xFDF0, 0xFEF0, 0xFFF0, 0x00F0, 0x01F0, 0x02F0, 0x03F0, - 0x04F0, 0x05F0, 0x06F0, 0x07F0, 0x08F0, 0x09F0, 0x0AF0, 0x0BF0, - 0x0CF0, 0x0DF0, 0x0EF0, 0x0FF0, 0x10F0, 0x11F0, 0x12F0, 0xEEF1, - 0xEFF1, 0xF0F1, 0xF1F1, 0xF2F1, 0xF3F1, 0xF4F1, 0xF5F1, 0xF6F1, - 0xF7F1, 0xF8F1, 0xF9F1, 0xFAF1, 0xFBF1, 0xFCF1, 0xFDF1, 0xFEF1, - 0xFFF1, 0x00F1, 0x01F1, 0x02F1, 0x03F1, 0x04F1, 0x05F1, 0x06F1, - 0x07F1, 0x08F1, 0x09F1, 0x0AF1, 0x0BF1, 0x0CF1, 0x0DF1, 0x0EF1, - 0x0FF1, 0x10F1, 0x11F1, 0x12F1, 0xEEF2, 0xEFF2, 0xF0F2, 0xF1F2, - 0xF2F2, 0xF3F2, 0xF4F2, 0xF5F2, 0xF6F2, 0xF7F2, 0xF8F2, 0xF9F2, - 0xFAF2, 0xFBF2, 0xFCF2, 0xFDF2, 0xFEF2, 0xFFF2, 0x00F2, 0x01F2, - 0x02F2, 0x03F2, 0x04F2, 0x05F2, 0x06F2, 0x07F2, 0x08F2, 0x09F2, - 0x0AF2, 0x0BF2, 0x0CF2, 0x0DF2, 0x0EF2, 0x0FF2, 0x10F2, 0x11F2, - 0x12F2, 0xEEF3, 0xEFF3, 0xF0F3, 0xF1F3, 0xF2F3, 0xF3F3, 0xF4F3, - 0xF5F3, 0xF6F3, 0xF7F3, 0xF8F3, 0xF9F3, 0xFAF3, 0xFBF3, 0xFCF3, - 0xFDF3, 0xFEF3, 0xFFF3, 0x00F3, 0x01F3, 0x02F3, 0x03F3, 0x04F3, - 0x05F3, 0x06F3, 0x07F3, 0x08F3, 0x09F3, 0x0AF3, 0x0BF3, 0x0CF3, - 0x0DF3, 0x0EF3, 0x0FF3, 0x10F3, 0x11F3, 0x12F3, 0xEEF4, 0xEFF4, - 0xF0F4, 0xF1F4, 0xF2F4, 0xF3F4, 0xF4F4, 0xF5F4, 0xF6F4, 0xF7F4, - 0xF8F4, 0xF9F4, 0xFAF4, 0xFBF4, 0xFCF4, 0xFDF4, 0xFEF4, 0xFFF4, - 0x00F4, 0x01F4, 0x02F4, 0x03F4, 0x04F4, 0x05F4, 0x06F4, 0x07F4, - 0x08F4, 0x09F4, 0x0AF4, 0x0BF4, 0x0CF4, 0x0DF4, 0x0EF4, 0x0FF4, - 0x10F4, 0x11F4, 0x12F4, 0xEEF5, 0xEFF5, 0xF0F5, 0xF1F5, 0xF2F5, - 0xF3F5, 0xF4F5, 0xF5F5, 0xF6F5, 0xF7F5, 0xF8F5, 0xF9F5, 0xFAF5, - 0xFBF5, 0xFCF5, 0xFDF5, 0xFEF5, 0xFFF5, 0x00F5, 0x01F5, 0x02F5, - 0x03F5, 0x04F5, 0x05F5, 0x06F5, 0x07F5, 0x08F5, 0x09F5, 0x0AF5, - 0x0BF5, 0x0CF5, 0x0DF5, 0x0EF5, 0x0FF5, 0x10F5, 0x11F5, 0x12F5, - 0xEEF6, 0xEFF6, 0xF0F6, 0xF1F6, 0xF2F6, 0xF3F6, 0xF4F6, 0xF5F6, - 0xF6F6, 0xF7F6, 0xF8F6, 0xF9F6, 0xFAF6, 0xFBF6, 0xFCF6, 0xFDF6, - 0xFEF6, 0xFFF6, 0x00F6, 0x01F6, 0x02F6, 0x03F6, 0x04F6, 0x05F6, - 0x06F6, 0x07F6, 0x08F6, 0x09F6, 0x0AF6, 0x0BF6, 0x0CF6, 0x0DF6, - 0x0EF6, 0x0FF6, 0x10F6, 0x11F6, 0x12F6, 0xEEF7, 0xEFF7, 0xF0F7, - 0xF1F7, 0xF2F7, 0xF3F7, 0xF4F7, 0xF5F7, 0xF6F7, 0xF7F7, 0xF8F7, - 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, 0xFFF7, 0x00F7, - 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, 0x07F7, 0x08F7, - 0x09F7, 0x0AF7, 0x0BF7, 0x0CF7, 0x0DF7, 0x0EF7, 0x0FF7, 0x10F7, - 0x11F7, 0x12F7, 0xEEF8, 0xEFF8, 0xF0F8, 0xF1F8, 0xF2F8, 0xF3F8, - 0xF4F8, 0xF5F8, 0xF6F8, 0xF7F8, 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, - 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, 0x00F8, 0x01F8, 0x02F8, 0x03F8, - 0x04F8, 0x05F8, 0x06F8, 0x07F8, 0x08F8, 0x09F8, 0x0AF8, 0x0BF8, - 0x0CF8, 0x0DF8, 0x0EF8, 0x0FF8, 0x10F8, 0x11F8, 0x12F8, 0xEEF9, - 0xEFF9, 0xF0F9, 0xF1F9, 0xF2F9, 0xF3F9, 0xF4F9, 0xF5F9, 0xF6F9, - 0xF7F9, 0xF8F9, 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, - 0xFFF9, 0x00F9, 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, - 0x07F9, 0x08F9, 0x09F9, 0x0AF9, 0x0BF9, 0x0CF9, 0x0DF9, 0x0EF9, - 0x0FF9, 0x10F9, 0x11F9, 0x12F9, 0xEEFA, 0xEFFA, 0xF0FA, 0xF1FA, - 0xF2FA, 0xF3FA, 0xF4FA, 0xF5FA, 0xF6FA, 0xF7FA, 0xF8FA, 0xF9FA, - 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, - 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0x08FA, 0x09FA, - 0x0AFA, 0x0BFA, 0x0CFA, 0x0DFA, 0x0EFA, 0x0FFA, 0x10FA, 0x11FA, - 0x12FA, 0xEEFB, 0xEFFB, 0xF0FB, 0xF1FB, 0xF2FB, 0xF3FB, 0xF4FB, - 0xF5FB, 0xF6FB, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, 0xFBFB, 0xFCFB, - 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, 0x03FB, 0x04FB, - 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0x0AFB, 0x0BFB, 0x0CFB, - 0x0DFB, 0x0EFB, 0x0FFB, 0x10FB, 0x11FB, 0x12FB, 0xEEFC, 0xEFFC, - 0xF0FC, 0xF1FC, 0xF2FC, 0xF3FC, 0xF4FC, 0xF5FC, 0xF6FC, 0xF7FC, - 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, - 0x00FC, 0x01FC, 0x02FC, 0x03FC, 0x04FC, 0x05FC, 0x06FC, 0x07FC, - 0x08FC, 0x09FC, 0x0AFC, 0x0BFC, 0x0CFC, 0x0DFC, 0x0EFC, 0x0FFC, - 0x10FC, 0x11FC, 0x12FC, 0xEEFD, 0xEFFD, 0xF0FD, 0xF1FD, 0xF2FD, - 0xF3FD, 0xF4FD, 0xF5FD, 0xF6FD, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, - 0xFBFD, 0xFCFD, 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, - 0x03FD, 0x04FD, 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0x0AFD, - 0x0BFD, 0x0CFD, 0x0DFD, 0x0EFD, 0x0FFD, 0x10FD, 0x11FD, 0x12FD, - 0xEEFE, 0xEFFE, 0xF0FE, 0xF1FE, 0xF2FE, 0xF3FE, 0xF4FE, 0xF5FE, - 0xF6FE, 0xF7FE, 0xF8FE, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, - 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, - 0x06FE, 0x07FE, 0x08FE, 0x09FE, 0x0AFE, 0x0BFE, 0x0CFE, 0x0DFE, - 0x0EFE, 0x0FFE, 0x10FE, 0x11FE, 0x12FE, 0xEEFF, 0xEFFF, 0xF0FF, - 0xF1FF, 0xF2FF, 0xF3FF, 0xF4FF, 0xF5FF, 0xF6FF, 0xF7FF, 0xF8FF, - 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, 0xFFFF, 0x00FF, - 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, 0x07FF, 0x08FF, - 0x09FF, 0x0AFF, 0x0BFF, 0x0CFF, 0x0DFF, 0x0EFF, 0x0FFF, 0x10FF, - 0x11FF, 0x12FF, 0xEE00, 0xEF00, 0xF000, 0xF100, 0xF200, 0xF300, - 0xF400, 0xF500, 0xF600, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, - 0xFC00, 0xFD00, 0xFE00, 0xFF00, 0x0000, 0x0100, 0x0200, 0x0300, - 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0A00, 0x0B00, - 0x0C00, 0x0D00, 0x0E00, 0x0F00, 0x1000, 0x1100, 0x1200, 0xEE01, - 0xEF01, 0xF001, 0xF101, 0xF201, 0xF301, 0xF401, 0xF501, 0xF601, - 0xF701, 0xF801, 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, - 0xFF01, 0x0001, 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, - 0x0701, 0x0801, 0x0901, 0x0A01, 0x0B01, 0x0C01, 0x0D01, 0x0E01, - 0x0F01, 0x1001, 0x1101, 0x1201, 0xEE02, 0xEF02, 0xF002, 0xF102, - 0xF202, 0xF302, 0xF402, 0xF502, 0xF602, 0xF702, 0xF802, 0xF902, - 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, - 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0x0802, 0x0902, - 0x0A02, 0x0B02, 0x0C02, 0x0D02, 0x0E02, 0x0F02, 0x1002, 0x1102, - 0x1202, 0xEE03, 0xEF03, 0xF003, 0xF103, 0xF203, 0xF303, 0xF403, - 0xF503, 0xF603, 0xF703, 0xF803, 0xF903, 0xFA03, 0xFB03, 0xFC03, - 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, 0x0303, 0x0403, - 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0x0A03, 0x0B03, 0x0C03, - 0x0D03, 0x0E03, 0x0F03, 0x1003, 0x1103, 0x1203, 0xEE04, 0xEF04, - 0xF004, 0xF104, 0xF204, 0xF304, 0xF404, 0xF504, 0xF604, 0xF704, - 0xF804, 0xF904, 0xFA04, 0xFB04, 0xFC04, 0xFD04, 0xFE04, 0xFF04, - 0x0004, 0x0104, 0x0204, 0x0304, 0x0404, 0x0504, 0x0604, 0x0704, - 0x0804, 0x0904, 0x0A04, 0x0B04, 0x0C04, 0x0D04, 0x0E04, 0x0F04, - 0x1004, 0x1104, 0x1204, 0xEE05, 0xEF05, 0xF005, 0xF105, 0xF205, - 0xF305, 0xF405, 0xF505, 0xF605, 0xF705, 0xF805, 0xF905, 0xFA05, - 0xFB05, 0xFC05, 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, - 0x0305, 0x0405, 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0x0A05, - 0x0B05, 0x0C05, 0x0D05, 0x0E05, 0x0F05, 0x1005, 0x1105, 0x1205, - 0xEE06, 0xEF06, 0xF006, 0xF106, 0xF206, 0xF306, 0xF406, 0xF506, - 0xF606, 0xF706, 0xF806, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, - 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, - 0x0606, 0x0706, 0x0806, 0x0906, 0x0A06, 0x0B06, 0x0C06, 0x0D06, - 0x0E06, 0x0F06, 0x1006, 0x1106, 0x1206, 0xEE07, 0xEF07, 0xF007, - 0xF107, 0xF207, 0xF307, 0xF407, 0xF507, 0xF607, 0xF707, 0xF807, - 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, 0xFF07, 0x0007, - 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, 0x0707, 0x0807, - 0x0907, 0x0A07, 0x0B07, 0x0C07, 0x0D07, 0x0E07, 0x0F07, 0x1007, - 0x1107, 0x1207, 0xEE08, 0xEF08, 0xF008, 0xF108, 0xF208, 0xF308, - 0xF408, 0xF508, 0xF608, 0xF708, 0xF808, 0xF908, 0xFA08, 0xFB08, - 0xFC08, 0xFD08, 0xFE08, 0xFF08, 0x0008, 0x0108, 0x0208, 0x0308, - 0x0408, 0x0508, 0x0608, 0x0708, 0x0808, 0x0908, 0x0A08, 0x0B08, - 0x0C08, 0x0D08, 0x0E08, 0x0F08, 0x1008, 0x1108, 0x1208, 0xEE09, - 0xEF09, 0xF009, 0xF109, 0xF209, 0xF309, 0xF409, 0xF509, 0xF609, - 0xF709, 0xF809, 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, - 0xFF09, 0x0009, 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, - 0x0709, 0x0809, 0x0909, 0x0A09, 0x0B09, 0x0C09, 0x0D09, 0x0E09, - 0x0F09, 0x1009, 0x1109, 0x1209, 0xEE0A, 0xEF0A, 0xF00A, 0xF10A, - 0xF20A, 0xF30A, 0xF40A, 0xF50A, 0xF60A, 0xF70A, 0xF80A, 0xF90A, - 0xFA0A, 0xFB0A, 0xFC0A, 0xFD0A, 0xFE0A, 0xFF0A, 0x000A, 0x010A, - 0x020A, 0x030A, 0x040A, 0x050A, 0x060A, 0x070A, 0x080A, 0x090A, - 0x0A0A, 0x0B0A, 0x0C0A, 0x0D0A, 0x0E0A, 0x0F0A, 0x100A, 0x110A, - 0x120A, 0xEE0B, 0xEF0B, 0xF00B, 0xF10B, 0xF20B, 0xF30B, 0xF40B, - 0xF50B, 0xF60B, 0xF70B, 0xF80B, 0xF90B, 0xFA0B, 0xFB0B, 0xFC0B, - 0xFD0B, 0xFE0B, 0xFF0B, 0x000B, 0x010B, 0x020B, 0x030B, 0x040B, - 0x050B, 0x060B, 0x070B, 0x080B, 0x090B, 0x0A0B, 0x0B0B, 0x0C0B, - 0x0D0B, 0x0E0B, 0x0F0B, 0x100B, 0x110B, 0x120B, 0xEE0C, 0xEF0C, - 0xF00C, 0xF10C, 0xF20C, 0xF30C, 0xF40C, 0xF50C, 0xF60C, 0xF70C, - 0xF80C, 0xF90C, 0xFA0C, 0xFB0C, 0xFC0C, 0xFD0C, 0xFE0C, 0xFF0C, - 0x000C, 0x010C, 0x020C, 0x030C, 0x040C, 0x050C, 0x060C, 0x070C, - 0x080C, 0x090C, 0x0A0C, 0x0B0C, 0x0C0C, 0x0D0C, 0x0E0C, 0x0F0C, - 0x100C, 0x110C, 0x120C, 0xEE0D, 0xEF0D, 0xF00D, 0xF10D, 0xF20D, - 0xF30D, 0xF40D, 0xF50D, 0xF60D, 0xF70D, 0xF80D, 0xF90D, 0xFA0D, - 0xFB0D, 0xFC0D, 0xFD0D, 0xFE0D, 0xFF0D, 0x000D, 0x010D, 0x020D, - 0x030D, 0x040D, 0x050D, 0x060D, 0x070D, 0x080D, 0x090D, 0x0A0D, - 0x0B0D, 0x0C0D, 0x0D0D, 0x0E0D, 0x0F0D, 0x100D, 0x110D, 0x120D, - 0xEE0E, 0xEF0E, 0xF00E, 0xF10E, 0xF20E, 0xF30E, 0xF40E, 0xF50E, - 0xF60E, 0xF70E, 0xF80E, 0xF90E, 0xFA0E, 0xFB0E, 0xFC0E, 0xFD0E, - 0xFE0E, 0xFF0E, 0x000E, 0x010E, 0x020E, 0x030E, 0x040E, 0x050E, - 0x060E, 0x070E, 0x080E, 0x090E, 0x0A0E, 0x0B0E, 0x0C0E, 0x0D0E, - 0x0E0E, 0x0F0E, 0x100E, 0x110E, 0x120E, 0xEE0F, 0xEF0F, 0xF00F, - 0xF10F, 0xF20F, 0xF30F, 0xF40F, 0xF50F, 0xF60F, 0xF70F, 0xF80F, - 0xF90F, 0xFA0F, 0xFB0F, 0xFC0F, 0xFD0F, 0xFE0F, 0xFF0F, 0x000F, - 0x010F, 0x020F, 0x030F, 0x040F, 0x050F, 0x060F, 0x070F, 0x080F, - 0x090F, 0x0A0F, 0x0B0F, 0x0C0F, 0x0D0F, 0x0E0F, 0x0F0F, 0x100F, - 0x110F, 0x120F, 0xEE10, 0xEF10, 0xF010, 0xF110, 0xF210, 0xF310, - 0xF410, 0xF510, 0xF610, 0xF710, 0xF810, 0xF910, 0xFA10, 0xFB10, - 0xFC10, 0xFD10, 0xFE10, 0xFF10, 0x0010, 0x0110, 0x0210, 0x0310, - 0x0410, 0x0510, 0x0610, 0x0710, 0x0810, 0x0910, 0x0A10, 0x0B10, - 0x0C10, 0x0D10, 0x0E10, 0x0F10, 0x1010, 0x1110, 0x1210, 0xEE11, - 0xEF11, 0xF011, 0xF111, 0xF211, 0xF311, 0xF411, 0xF511, 0xF611, - 0xF711, 0xF811, 0xF911, 0xFA11, 0xFB11, 0xFC11, 0xFD11, 0xFE11, - 0xFF11, 0x0011, 0x0111, 0x0211, 0x0311, 0x0411, 0x0511, 0x0611, - 0x0711, 0x0811, 0x0911, 0x0A11, 0x0B11, 0x0C11, 0x0D11, 0x0E11, - 0x0F11, 0x1011, 0x1111, 0x1211, 0xEE12, 0xEF12, 0xF012, 0xF112, - 0xF212, 0xF312, 0xF412, 0xF512, 0xF612, 0xF712, 0xF812, 0xF912, - 0xFA12, 0xFB12, 0xFC12, 0xFD12, 0xFE12, 0xFF12, 0x0012, 0x0112, - 0x0212, 0x0312, 0x0412, 0x0512, 0x0612, 0x0712, 0x0812, 0x0912, - 0x0A12, 0x0B12, 0x0C12, 0x0D12, 0x0E12, 0x0F12, 0x1012, 0x1112, - 0x1212, 0x1313, + 0x0000, 0x00FF, 0x0001, 0xFF00, 0x0100, 0x00FE, 0x0002, 0xFFFF, 0x01FF, + 0xFF01, 0x0101, 0x00FD, 0x0003, 0x00FC, 0x0004, 0xFE00, 0x0200, 0x0005, + 0x00FB, 0x1313, 0xFFFE, 0x01FE, 0xFF02, 0x0102, 0x0006, 0x00FA, 0xFEFF, + 0x02FF, 0xFE01, 0x0201, 0xFD00, 0x0300, 0xFC00, 0x0400, 0x00F9, 0x0007, + 0xFFFD, 0x01FD, 0xFF03, 0x0103, 0x00F8, 0x0008, 0x00F7, 0x0009, 0x000A, + 0x00F6, 0xFEFE, 0x02FE, 0xFE02, 0x0202, 0xFFFC, 0x01FC, 0xFF04, 0x0104, + 0xFB00, 0x0500, 0xFDFF, 0x03FF, 0xFD01, 0x0301, 0xFEFD, 0x02FD, 0xFE03, + 0x0203, 0xFCFF, 0x04FF, 0xFC01, 0x0401, 0xFF05, 0x0105, 0xFFFB, 0x01FB, + 0x000B, 0x00F5, 0xFA00, 0x0600, 0xF900, 0x0700, 0xFFF9, 0x01F9, 0xFF07, + 0x0107, 0xFDFE, 0x03FE, 0xFD02, 0x0302, 0xFBFF, 0x05FF, 0xFB01, 0x0501, + 0xF800, 0x0800, 0xFF06, 0x0106, 0xFFFA, 0x01FA, 0xFAFF, 0x06FF, 0xFA01, + 0x0601, 0xFEFC, 0x02FC, 0xFE04, 0x0204, 0xFFF8, 0x01F8, 0xFF08, 0x0108, + 0xFCFE, 0x04FE, 0xFC02, 0x0402, 0xF700, 0x0900, 0xF600, 0x0A00, 0xFDFD, + 0x03FD, 0xFD03, 0x0303, 0xFF0A, 0x010A, 0xFFF6, 0x01F6, 0xFE05, 0x0205, + 0xFEFB, 0x02FB, 0x000C, 0x00F4, 0xFDFC, 0x03FC, 0xFD04, 0x0304, 0x000D, + 0x00F3, 0xFE06, 0x0206, 0xFEFA, 0x02FA, 0xFFF7, 0x01F7, 0xFF09, 0x0109, + 0xFF0B, 0x010B, 0xFFF5, 0x01F5, 0xFBFE, 0x05FE, 0xFB02, 0x0502, 0xFD05, + 0x0305, 0xFDFB, 0x03FB, 0x000E, 0x00F2, 0xFCFD, 0x04FD, 0xFC03, 0x0403, + 0xF9FF, 0x07FF, 0xF901, 0x0701, 0xFBFD, 0x05FD, 0xFB03, 0x0503, 0xFEF9, + 0x02F9, 0xFE07, 0x0207, 0xF8FF, 0x08FF, 0xF801, 0x0801, 0x00F1, 0x000F, + 0xFAFE, 0x06FE, 0xFA02, 0x0602, 0xFD06, 0x0306, 0xFDFA, 0x03FA, 0x0010, + 0x00F0, 0xFEF8, 0x02F8, 0xFE08, 0x0208, 0xFE0A, 0x020A, 0xFEF6, 0x02F6, + 0xFEF7, 0x02F7, 0xFE09, 0x0209, 0xFDF9, 0x03F9, 0xFD07, 0x0307, 0xF500, + 0x0B00, 0xFCFC, 0x04FC, 0xFC04, 0x0404, 0xF7FF, 0x09FF, 0xF701, 0x0901, + 0xF9FE, 0x07FE, 0xF902, 0x0702, 0x0011, 0x00EF, 0xFBFC, 0x05FC, 0xFB04, + 0x0504, 0xFC05, 0x0405, 0xFCFB, 0x04FB, 0xFAFD, 0x06FD, 0xF8FE, 0x08FE, + 0xF802, 0x0802, 0xFA03, 0x0603, 0xFDF7, 0x03F7, 0xFD09, 0x0309, 0xFB05, + 0x0505, 0xFBFB, 0x05FB, 0xF9FD, 0x07FD, 0xF903, 0x0703, 0x00EE, 0x0012, + 0xFC06, 0x0406, 0xFCFA, 0x04FA, 0xF7FE, 0x09FE, 0xF702, 0x0902, 0xFDF8, + 0x03F8, 0xFD08, 0x0308, 0xF6FF, 0x0AFF, 0xF601, 0x0A01, 0xFAFC, 0x06FC, + 0xFA04, 0x0604, 0xFA05, 0x0605, 0xFAFB, 0x06FB, 0xFF0C, 0x010C, 0xFFF4, + 0x01F4, 0xFCF8, 0x04F8, 0xFC08, 0x0408, 0xFB06, 0x0506, 0xFBFA, 0x05FA, + 0xFE0B, 0x020B, 0xFEF5, 0x02F5, 0xFCF7, 0x04F7, 0xFC09, 0x0409, 0xFD0A, + 0x030A, 0xFDF6, 0x03F6, 0xFCF9, 0x04F9, 0xFC07, 0x0407, 0xF8FD, 0x08FD, + 0xF803, 0x0803, 0xF9FC, 0x07FC, 0xF904, 0x0704, 0xF400, 0x0C00, 0xF7FD, + 0x09FD, 0xF703, 0x0903, 0xF8FC, 0x08FC, 0xF804, 0x0804, 0xFBF9, 0x05F9, + 0xFB07, 0x0507, 0xF905, 0x0705, 0xF9FB, 0x07FB, 0xFAF9, 0x06F9, 0xFA07, + 0x0607, 0xFBF8, 0x05F8, 0xFB08, 0x0508, 0xFD0B, 0x030B, 0xFDF5, 0x03F5, + 0xFA06, 0x0606, 0xFAFA, 0x06FA, 0xFC0A, 0x040A, 0xFCF6, 0x04F6, 0xFAF8, + 0x06F8, 0xFA08, 0x0608, 0xF9F9, 0x07F9, 0xF907, 0x0707, 0xFF0E, 0x010E, + 0xFFF2, 0x01F2, 0xFBF7, 0x05F7, 0xFB09, 0x0509, 0xFF0D, 0x010D, 0xFFF3, + 0x01F3, 0xF906, 0xF9FA, 0x0706, 0x07FA, 0x0609, 0xFAF7, 0x06F7, 0xFA09, + 0x0709, 0xF9F7, 0x07F7, 0xF909, 0xF8F9, 0x08F9, 0xF807, 0x0807, 0xF300, + 0x0D00, 0xFB0A, 0x050A, 0xFBF6, 0x05F6, 0xF6FE, 0x0AFE, 0xF602, 0x0A02, + 0xFC0B, 0xFCF5, 0x040B, 0x04F5, 0xF7FC, 0x09FC, 0xF704, 0x0904, 0xF805, + 0x0805, 0xF8FB, 0x08FB, 0xF6FC, 0x0AFC, 0xF604, 0x0A04, 0xFE0D, 0x020D, + 0xFEF3, 0x02F3, 0x0809, 0xF8F7, 0x08F7, 0xF809, 0xF806, 0xF8FA, 0x0806, + 0x08FA, 0x0AFD, 0xF603, 0x0A03, 0xF6FD, 0xFA0A, 0x060A, 0xFAF6, 0x06F6, + 0xF5FF, 0x0BFF, 0xF501, 0x0B01, 0xF705, 0x0905, 0xF7FB, 0x09FB, 0xFFF1, + 0x01F1, 0xFF0F, 0x010F, 0xF605, 0x0A05, 0xF6FB, 0x0AFB, 0xFF11, 0x0111, + 0xFFEF, 0x01EF, 0xF9F8, 0x07F8, 0xF908, 0x0708, 0xF90A, 0x070A, 0xF9F6, + 0x07F6, 0xFB0B, 0x05F5, 0xFBF5, 0x050B, 0x080A, 0xF80A, 0xF8F6, 0x08F6, + 0xF7F9, 0x09F9, 0xF706, 0xF7FA, 0x0906, 0xF707, 0x09FA, 0x0907, 0xF606, + 0xF6FA, 0x0A06, 0x0AFA, 0xF6F9, 0x0AF9, 0xF607, 0x0A07, 0xF200, 0x0E00, + 0xF70A, 0x090A, 0xF5FD, 0x0BFD, 0xF7F6, 0x09F6, 0xF503, 0x0B03, 0xF60A, + 0x0A0A, 0xF6F6, 0x0AF6, 0x0110, 0xFFF0, 0x01F0, 0xFF10, 0xF8F8, 0x08F8, + 0xF808, 0x0808, 0xF7F8, 0x09F8, 0xF708, 0x0908, 0xF100, 0x0F00, 0xFA0B, + 0xFAF5, 0x060B, 0x06F5, 0xF9F5, 0xF90B, 0x07F5, 0x070B, 0xF4FF, 0x0CFF, + 0xF401, 0x0C01, 0xFFEE, 0x0112, 0x01EE, 0xFF12, 0x0909, 0xF7F7, 0x09F7, + 0xF709, 0xF505, 0x0B05, 0xF5FB, 0x0BFB, 0xF4FD, 0x0CFD, 0xF403, 0x0C03, + 0xFE0C, 0x020C, 0xFEF4, 0x02F4, 0x0CFB, 0x0A09, 0xF6F7, 0x0AF7, 0xF405, + 0x0C05, 0xF4FB, 0xF609, 0xF8F5, 0x080B, 0x08F5, 0xF80B, 0xF5FE, 0x0BFE, + 0xF502, 0x0B02, 0xFD0D, 0x030D, 0xFDF3, 0x03F3, 0x020E, 0xFEF2, 0x02F2, + 0xFE0E, 0x0B0A, 0xF5F6, 0x0BF6, 0xF50A, 0x0A08, 0xF6F8, 0x0AF8, 0xF608, + 0xF5FC, 0xF504, 0x0B04, 0x0BFC, 0x030C, 0xFD0C, 0xFDF4, 0x03F4, 0xFEEE, + 0xFE12, 0x02EE, 0x0212, 0xF7F5, 0xF70B, 0x090B, 0x09F5, 0xF4FE, 0x0CFE, + 0xF402, 0x0C02, 0xF40A, 0xF4FC, 0x0C0A, 0xF4F6, 0x0CF6, 0xF404, 0x0C04, + 0x0CFC, 0x02F1, 0xFEF1, 0x020F, 0xFE0F, 0x040D, 0xFC0D, 0xFCF3, 0x04F3, + 0x0B09, 0xFE11, 0x0211, 0xF5F7, 0x0BF7, 0xFEEF, 0x02EF, 0xF509, 0xF506, + 0xF5FA, 0x0B06, 0x0BFA, 0xFC0C, 0x040C, 0xFCF4, 0x04F4, 0xF406, 0xF4FA, + 0x0C06, 0x0CFA, 0xF3FD, 0x0DFD, 0xF303, 0x0D03, 0xF000, 0x1000, 0xFB0D, + 0xFBF3, 0x05F3, 0x050D, 0xF5F9, 0x0BF9, 0xF507, 0x0B07, 0xF60B, 0xF6F5, + 0x0A0B, 0x0AF5, 0xF4F9, 0x0CF9, 0xF407, 0x0C07, 0xF5F5, 0xF50B, 0x0B0B, + 0x0BF5, 0xEF00, 0x1100, 0x060D, 0xFAF3, 0x06F3, 0xFA0D, 0x050C, 0xF3FE, + 0xFB0C, 0x0DFE, 0x05F4, 0xF302, 0x0D02, 0xFBF4, 0x03F1, 0x030F, 0xFD0F, + 0xFDF1, 0xEE00, 0x1200, 0xFA0C, 0x06F4, 0x060C, 0xFAF4, 0xF2FE, 0x0EFE, + 0xF3FF, 0x0DFF, 0xF301, 0x0D01, 0xF202, 0x0E02, 0xF5F8, 0x0BF8, 0xF508, + 0x0B08, 0xF90D, 0x070D, 0xF9F3, 0x07F3, 0x030E, 0x03F2, 0xFDF2, 0xFD0E, + 0xF304, 0x0D04, 0x0DFC, 0xF3FC, 0x0DFB, 0xF3FB, 0xF305, 0x0D05, 0x070C, + 0xF90C, 0xF9F4, 0x07F4, 0xFDEE, 0xF2FF, 0x0EFF, 0x0312, 0xFD12, 0xF201, + 0x03EE, 0x0E01, 0xF80C, 0x080C, 0x08F4, 0xF8F4, 0x0DFA, 0xFC0E, 0xFCF2, + 0x040E, 0x04F2, 0xF306, 0xF3FA, 0x0D06, 0xF4F8, 0x0CF8, 0xF408, 0x0C08, + 0x0C09, 0xF4F7, 0x0CF7, 0xF409, 0x04F1, 0xFC0F, 0x040F, 0xFCF1, 0x0EFD, + 0xF2FD, 0xF203, 0x0E03, 0x090C, 0xF70C, 0xF7F4, 0x09F4, 0xF3F8, 0x0DF8, + 0xF308, 0x0D08, 0x0A0C, 0xF60C, 0xF6F4, 0x0AF4, 0xF4F5, 0x0C0B, 0xF40B, + 0x0CF5, 0x05F1, 0xFB0F, 0xF1FF, 0x0FFF, 0xF101, 0x0F01, 0xFBF1, 0x050F, + 0xFB0E, 0x050E, 0xFBF2, 0x05F2, 0x06F1, 0xFA0F, 0x060F, 0xFAF1, 0x0DF9, + 0xF3F9, 0x0D07, 0xF307, 0x080D, 0xF80D, 0xF8F3, 0x08F3, 0x090D, 0xF70D, + 0xF7F3, 0x09F3, 0xF3F7, 0xFE10, 0xFEF0, 0x0DF7, 0x02F0, 0x0210, 0x0D09, + 0xF309, 0xF0FF, 0x10FF, 0xF001, 0x1001, 0x0A0D, 0xFA0E, 0xF60D, 0x060E, + 0xFAF2, 0x06F2, 0xF6F3, 0x0AF3, 0xF2FC, 0x0EFC, 0x0E04, 0xF204, 0xF205, + 0x0EFB, 0x0E05, 0xF2FB, 0xF90F, 0x070F, 0x07F1, 0xF9F1, 0x0310, 0xFDF0, + 0xFD10, 0x03F0, 0x0E08, 0xF2F8, 0x0EF8, 0xF208, 0xF30A, 0xF3F6, 0x0DF6, + 0x0D0A, 0x0F08, 0xF1F8, 0x0FF8, 0xF108, 0xF50C, 0x0B0C, 0x0FFD, 0x0F03, + 0x0BF4, 0xF103, 0xF5F4, 0xF1FD, 0xF20A, 0xF2F6, 0x0EF6, 0x0410, 0xFCF0, + 0xFC10, 0x04F0, 0x0E0A, 0xF207, 0x0311, 0xFC11, 0x0411, 0xF2F9, 0xFCEF, + 0xFD11, 0xFDEF, 0x0EF9, 0x03EF, 0x0E07, 0x04EF, 0x0510, 0xFBF0, 0xFB10, + 0x0511, 0x05F0, 0xFBEF, 0xFB11, 0x05EF, 0x0F07, 0xF1F9, 0x0FF9, 0xF107, + 0xFA10, 0x0610, 0xFAF0, 0x06F0, 0xF0FD, 0xF003, 0x10FD, 0x1003, 0xF1FE, + 0x0FFE, 0xF102, 0x0F02, 0xF9F2, 0x07F2, 0xF90E, 0x070E, 0xF30B, 0x0D0B, + 0xF80E, 0xF3F5, 0x08F2, 0x080E, 0x0DF5, 0xF8F2, 0xF50D, 0xF5F3, 0x0B0D, + 0x0EFA, 0x0BF3, 0xF206, 0xF2FA, 0x0E06, 0xF70E, 0x090E, 0xF7F2, 0x09F2, + 0x0FFB, 0x0FFC, 0xF1FB, 0xF104, 0x0F04, 0xF105, 0xF1FC, 0x0F05, 0x0F0A, + 0x0FF6, 0x0F06, 0xF1F6, 0xF106, 0xF1FA, 0xF10A, 0x0FFA, 0xEFFD, 0xEF01, + 0x11FD, 0xEFFF, 0x11FF, 0xEF03, 0x1101, 0x1103, 0x0C0C, 0xF40C, 0xF4F4, + 0x0CF4, 0x10FB, 0xF005, 0xF0FB, 0x1005, 0x1002, 0xF0FE, 0x10FE, 0xF002, + 0xF910, 0x08F0, 0xF8F0, 0xF9F0, 0x0810, 0xF810, 0x07F0, 0x0710, 0x10FC, + 0xF0FC, 0xF60E, 0xF6F2, 0x1004, 0x0AF2, 0xF004, 0x0A0E, 0x11FC, 0xEFFC, + 0xF30C, 0xEF04, 0x1104, 0xF3F4, 0x0D0C, 0x0DF4, 0x11FB, 0x1105, 0xEFFB, + 0xEF05, 0x080F, 0xF80F, 0x08F1, 0xF8F1, 0xFC12, 0x04EE, 0x0412, 0xFCEE, + 0xEFFE, 0xF5F2, 0x11FE, 0x0B0E, 0x10FA, 0xF50E, 0x0BF2, 0xEF02, 0x1006, + 0x1102, 0xF006, 0xF0FA, 0xFB12, 0xFBEE, 0x0512, 0x05EE, 0x10F8, 0xF4F2, + 0x1008, 0x0CF2, 0xF0F8, 0xF40E, 0x0C0E, 0xF008, 0xF20C, 0x0EF4, 0xF2F4, + 0x0E0C, 0xF20B, 0xF2F5, 0x09F0, 0xF7F0, 0x0910, 0xF710, 0x0E0B, 0x0EF5, + 0x0AF0, 0x0A10, 0xF6F0, 0xF610, 0xEEFC, 0xFAEF, 0x12FC, 0x1204, 0xEE04, + 0x0611, 0xFA11, 0x06EF, 0xEF06, 0x1106, 0xEFFA, 0x11FA, 0xEF08, 0xEFF8, + 0x11F8, 0x1108, 0xF7F1, 0x090F, 0xF70F, 0x09F1, 0x0E09, 0xF209, 0x0EF7, + 0xF2F7, 0xF0F6, 0x100A, 0x10F6, 0xF5F0, 0xF00A, 0x0BF0, 0xF510, 0x0B10, + 0x0D0E, 0xF30E, 0x0A0F, 0x0DF2, 0xF3F2, 0xF60F, 0x0AF1, 0xF6F1, 0x0CF3, + 0x0FF7, 0x0F09, 0xF40D, 0xF4F3, 0xF1F7, 0x0C0D, 0xF109, 0x07EE, 0xF912, + 0xFA12, 0xFAEE, 0x0712, 0xF9EE, 0x0612, 0x06EE, 0xF9EF, 0xF911, 0x0711, + 0x07EF, 0x0D0D, 0x0DF3, 0x0F0C, 0x110A, 0x11F6, 0xF10C, 0xF30D, 0xEFF6, + 0x0FF4, 0xEF0A, 0xF3F3, 0xF1F4, 0x10F9, 0xF007, 0xF0F9, 0x1007, 0xF8EF, + 0x0811, 0xF20D, 0x0EF3, 0x0E0D, 0xF2F3, 0xF811, 0x08EF, 0xF1F5, 0x0FF5, + 0xF10B, 0x0F0B, 0xF0F4, 0xF00C, 0xF2F2, 0x10F4, 0x0E0E, 0x0EF2, 0xF20E, + 0x100C, 0x09EF, 0x0911, 0xF7EF, 0xF711, 0xF611, 0x0A11, 0xF6EF, 0x0AEF, + 0x12FF, 0xEE01, 0x1201, 0xEEFF, 0xF5F1, 0x0BF1, 0xF50F, 0x0B0F, 0x10F5, + 0xEE06, 0xF00B, 0x1206, 0x12FA, 0xF0F5, 0xEEFA, 0x100B, 0x0CF0, 0xF410, + 0xF4F0, 0x0C10, 0x11F9, 0x0BEF, 0xF5EF, 0x0CF1, 0xEFF9, 0xF511, 0x0C0F, + 0xEF07, 0xF4F1, 0xF40F, 0x0B11, 0x1107, 0xEEFD, 0x12FD, 0xEE03, 0x1203, + 0x0DF0, 0xF3F0, 0xF310, 0x0D10, 0x0C11, 0x0CEF, 0xF4EF, 0xF411, 0x0EF0, + 0xF210, 0x0E10, 0xF2F0, 0x08EE, 0xF8EE, 0x0812, 0xF812, 0x110B, 0xF7EE, + 0xF712, 0x11F5, 0x0912, 0xEFF5, 0x09EE, 0xEF0B, 0xEEF9, 0x12F9, 0xEE07, + 0x1207, 0x0F0E, 0xF30F, 0x0D0F, 0x0DF1, 0xF10E, 0xF3F1, 0xF1F2, 0x0FF2, + 0xF6EE, 0xF612, 0x0AEE, 0x0A12, 0xF20F, 0x0E0F, 0xF2F1, 0x0EF1, 0xF0F7, + 0x1009, 0xF009, 0x10F7, 0xEEFB, 0x12FB, 0xEE05, 0x1205, 0x1202, 0x0FF3, + 0xEE08, 0xF1F3, 0x12F8, 0x12FE, 0xF10D, 0x1208, 0x0F0D, 0xEEFE, 0xEEF8, + 0xEE02, 0x0FF1, 0xF10F, 0xF1F1, 0x0F0F, 0x12F4, 0x11F4, 0x1109, 0xEFF4, + 0xEE0A, 0xEFF7, 0x110C, 0xEEF4, 0xEE0C, 0x11F7, 0xEF0C, 0x120C, 0xF110, + 0xF1F0, 0x120A, 0xEEF6, 0xEF09, 0x12F6, 0x0F10, 0x0FF0, 0x10F2, 0xF0F2, + 0x100E, 0xF00E, 0xEEF5, 0x0B12, 0x0BEE, 0xF512, 0x120B, 0x12F5, 0xF5EE, + 0xEE0B, 0x1209, 0x12F7, 0xEE09, 0xEEF7, 0xF4EE, 0x0C12, 0x0CEE, 0xF412, + 0x100D, 0x0D12, 0xF0F3, 0x0DEE, 0xF3EF, 0x0DEF, 0xF3EE, 0x0D11, 0xF312, + 0xF00D, 0xF311, 0x10F3, 0x11F3, 0xEFF3, 0x0E12, 0xF212, 0xF2EE, 0x0EEE, + 0xEF0D, 0x110D, 0x100F, 0xF0F1, 0xF00F, 0x10F1, 0x10F0, 0xF211, 0xF0F0, + 0xF010, 0x0EEF, 0xF2EF, 0x0E11, 0x1010, 0x120D, 0xEE0D, 0x12F3, 0xEEF3, + 0x11F1, 0xF111, 0xEFF2, 0x110F, 0xEF0E, 0xEF0F, 0x0FEF, 0x11F2, 0x0F11, + 0xF1EF, 0x110E, 0xEFF1, 0xEE0E, 0x120E, 0x12F2, 0xF1EE, 0x0FEE, 0xEEF2, + 0xF112, 0x0F12, 0xF0EE, 0x10EE, 0xF012, 0x1012, 0x11F0, 0xEF10, 0xEFF0, + 0x1110, 0xF0EF, 0x10EF, 0x1011, 0xF011, 0x11EF, 0xEF11, 0xEFEF, 0xEF12, + 0x11EE, 0x1112, 0xEFEE, 0x1111, 0xEE11, 0xEEEF, 0x12EF, 0x1211, 0x1212, + 0x12EE, 0xEEEE, 0xEE12, 0xEEF1, 0x12F1, 0xEE0F, 0x120F, 0xEE10, 0x1210, + 0xEEF0, 0x12F0, }; static const uint8_t clv_mvu_1_bits[] = { - 16, 14, 14, 14, 13, 12, 12, 10, 12, 12, 13, 14, 14, 14, 16, 15, - 13, 13, 12, 12, 11, 11, 7, 11, 11, 12, 12, 13, 13, 15, 16, 16, - 16, 13, 12, 10, 10, 6, 10, 10, 12, 13, 16, 16, 16, 14, 14, 11, - 11, 11, 11, 9, 7, 9, 11, 11, 11, 11, 14, 14, 15, 13, 13, 12, - 9, 8, 8, 4, 8, 8, 9, 12, 13, 13, 15, 14, 14, 11, 11, 10, - 9, 8, 4, 8, 9, 10, 11, 12, 14, 14, 12, 12, 11, 10, 10, 8, - 6, 3, 6, 8, 10, 10, 11, 12, 12, 11, 10, 9, 6, 6, 6, 5, - 4, 5, 6, 6, 6, 9, 10, 11, 12, 12, 11, 10, 10, 8, 6, 3, - 6, 7, 10, 10, 11, 12, 12, 14, 14, 11, 11, 10, 9, 8, 4, 8, - 9, 10, 11, 11, 14, 14, 15, 13, 13, 12, 9, 8, 8, 4, 8, 8, - 9, 12, 13, 13, 15, 14, 14, 11, 11, 11, 11, 9, 7, 9, 11, 11, - 11, 11, 14, 14, 16, 16, 16, 13, 12, 10, 10, 6, 10, 10, 12, 13, - 16, 16, 16, 15, 13, 13, 12, 12, 11, 11, 7, 11, 11, 12, 12, 13, - 13, 15, 16, 14, 14, 14, 13, 12, 12, 10, 12, 12, 13, 14, 14, 14, - 16, 7, -}; - -static const uint16_t clv_mvu_1_codes[] = { - 0xFFFC, 0x3FED, 0x3FE5, 0x3FE3, 0x1FD9, 0x0FD9, 0x0FD6, 0x03CE, - 0x0FD3, 0x0FD8, 0x1FD6, 0x3FE0, 0x3FE8, 0x3FEC, 0xFFFE, 0x7FF3, - 0x1FE7, 0x1FDA, 0x0FCF, 0x0FCC, 0x07DD, 0x07CC, 0x006B, 0x07CD, - 0x07DE, 0x0FCE, 0x0FD2, 0x1FDD, 0x1FEC, 0x7FF0, 0xFFF6, 0xFFFA, - 0xFFF2, 0x1FDE, 0x0FDB, 0x03D8, 0x03CA, 0x002E, 0x03CB, 0x03D9, - 0x0FDC, 0x1FDF, 0xFFF3, 0xFFF9, 0xFFF5, 0x3FF3, 0x3FDD, 0x07DA, - 0x07D2, 0x07CA, 0x07C2, 0x01DE, 0x0069, 0x01DF, 0x07C3, 0x07CB, - 0x07D3, 0x07DB, 0x3FDF, 0x3FF6, 0x7FF7, 0x1FED, 0x1FE5, 0x0FDF, - 0x01D8, 0x00E3, 0x00DF, 0x0007, 0x00E0, 0x00E4, 0x01D9, 0x0FE0, - 0x1FE3, 0x1FE9, 0x7FF4, 0x3FF5, 0x3FE7, 0x07E4, 0x07C6, 0x03D2, - 0x01E2, 0x00E9, 0x0006, 0x00EA, 0x01E3, 0x03D3, 0x07C7, 0x0FCA, - 0x3FE9, 0x3FF0, 0x0FE8, 0x0FE5, 0x07D5, 0x03DD, 0x03D5, 0x00DC, - 0x002B, 0x0001, 0x002C, 0x00DD, 0x03D6, 0x03DE, 0x07D6, 0x0FE4, - 0x0FE9, 0x07E0, 0x03C8, 0x01D6, 0x0032, 0x0030, 0x0028, 0x0012, - 0x0004, 0x0013, 0x0029, 0x0031, 0x0033, 0x01D7, 0x03C9, 0x07E1, - 0x0FEA, 0x0FE6, 0x07D7, 0x03DF, 0x03D7, 0x00DE, 0x002D, 0x0000, - 0x002A, 0x006D, 0x03D4, 0x03DC, 0x07D4, 0x0FE3, 0x0FE7, 0x3FF1, - 0x3FE4, 0x07E2, 0x07C4, 0x03D0, 0x01E0, 0x00E7, 0x0005, 0x00E8, - 0x01E1, 0x03D1, 0x07C5, 0x07E3, 0x3FEA, 0x3FF7, 0x7FF6, 0x1FE6, - 0x1FE4, 0x0FE1, 0x01DA, 0x00E5, 0x00E1, 0x0008, 0x00E2, 0x00E6, - 0x01DB, 0x0FE2, 0x1FE2, 0x1FEB, 0x7FF5, 0x3FF4, 0x3FDC, 0x07D9, - 0x07D0, 0x07C8, 0x07C0, 0x01DC, 0x0068, 0x01DD, 0x07C1, 0x07C9, - 0x07D1, 0x07D8, 0x3FDE, 0x3FF2, 0xFFFB, 0xFFF4, 0xFFF0, 0x1FE1, - 0x0FDD, 0x03DA, 0x03CC, 0x002F, 0x03CD, 0x03DB, 0x0FDE, 0x1FE0, - 0xFFF1, 0xFFF7, 0xFFF8, 0x7FF2, 0x1FEA, 0x1FDC, 0x0FD1, 0x0FCD, - 0x07DC, 0x07CF, 0x006C, 0x07CE, 0x07DF, 0x0FCB, 0x0FD0, 0x1FDB, - 0x1FE8, 0x7FF1, 0xFFFD, 0x3FEE, 0x3FEB, 0x3FE1, 0x1FD7, 0x0FD7, - 0x0FD5, 0x03CF, 0x0FD4, 0x0FDA, 0x1FD8, 0x3FE2, 0x3FE6, 0x3FEF, - 0xFFFF, 0x006A, + 3, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 }; static const uint16_t clv_mvu_1_syms[] = { - 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, 0xFFF9, 0x00F9, - 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, 0x07F9, 0xF9FA, - 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, - 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0xF9FB, 0xFAFB, - 0xFBFB, 0xFCFB, 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, - 0x03FB, 0x04FB, 0x05FB, 0x06FB, 0x07FB, 0xF9FC, 0xFAFC, 0xFBFC, - 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, 0x00FC, 0x01FC, 0x02FC, 0x03FC, - 0x04FC, 0x05FC, 0x06FC, 0x07FC, 0xF9FD, 0xFAFD, 0xFBFD, 0xFCFD, - 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, 0x03FD, 0x04FD, - 0x05FD, 0x06FD, 0x07FD, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, - 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, - 0x06FE, 0x07FE, 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, - 0xFFFF, 0x00FF, 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, - 0x07FF, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00, - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, - 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, 0xFF01, 0x0001, - 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, 0x0701, 0xF902, - 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, - 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0xF903, 0xFA03, - 0xFB03, 0xFC03, 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, - 0x0303, 0x0403, 0x0503, 0x0603, 0x0703, 0xF904, 0xFA04, 0xFB04, - 0xFC04, 0xFD04, 0xFE04, 0xFF04, 0x0004, 0x0104, 0x0204, 0x0304, - 0x0404, 0x0504, 0x0604, 0x0704, 0xF905, 0xFA05, 0xFB05, 0xFC05, - 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, 0x0305, 0x0405, - 0x0505, 0x0605, 0x0705, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, - 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, - 0x0606, 0x0706, 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, - 0xFF07, 0x0007, 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, - 0x0707, 0x0808, + 0x0001, 0x00FF, 0x0000, 0x0002, 0x00FE, 0x00FD, 0x0003, 0xFF00, 0x0100, + 0xFE00, 0x0200, 0x0101, 0xFFFF, 0x01FF, 0xFF01, 0x00FB, 0x0005, 0xFD00, + 0x0300, 0xFC00, 0x0400, 0x0004, 0x00FC, 0x0808, 0x00FA, 0x0006, 0x0201, + 0xFEFF, 0x02FF, 0xFE01, 0xFFFD, 0x01FD, 0xFF03, 0x0103, 0xFEFD, 0x02FD, + 0xFE03, 0x0203, 0xFF02, 0x0102, 0xFFFE, 0x01FE, 0xFB00, 0x0500, 0xFDFD, + 0x03FD, 0xFD03, 0x0303, 0xFF04, 0x0104, 0xFFFC, 0x01FC, 0xFE02, 0x0202, + 0xFEFE, 0x02FE, 0xFA00, 0x0600, 0xFFFB, 0x01FB, 0xFF05, 0x0105, 0x00F9, + 0x0007, 0xFD02, 0x0302, 0xFDFE, 0x03FE, 0x0301, 0xFDFF, 0x03FF, 0xFD01, + 0xFEFB, 0x02FB, 0xFE05, 0x0205, 0x0401, 0xFCFF, 0x04FF, 0xFC01, 0xFE04, + 0x0204, 0xFEFC, 0x02FC, 0xFC02, 0x0402, 0xFCFE, 0x04FE, 0xFD04, 0x0304, + 0xFDFC, 0x03FC, 0xFFFA, 0x01FA, 0x0106, 0xFF06, 0xFC04, 0x0404, 0xFCFC, + 0x04FC, 0x0501, 0xFBFF, 0x05FF, 0xFB01, 0x0504, 0xFB04, 0xFBFC, 0x05FC, + 0xFE06, 0xFEFA, 0x02FA, 0x0206, 0xF900, 0x0700, 0xFB02, 0x0502, 0xFBFE, + 0x05FE, 0x0306, 0xFDFA, 0xFD06, 0x03FA, 0xFCFA, 0x0406, 0xFC06, 0x04FA, + 0x01F9, 0x0107, 0xFF07, 0xFFF9, 0xFE07, 0x02F9, 0xFEF9, 0x0207, 0xFDFB, + 0x03FB, 0xFD05, 0x0305, 0xFCFD, 0x04FD, 0xFC03, 0x0403, 0x0601, 0x06FF, + 0xFAFF, 0xFA01, 0x0701, 0xF9FF, 0x07FF, 0xF901, 0x03F9, 0xFD07, 0x0307, + 0xFDF9, 0xFBFA, 0x0506, 0xFB06, 0x05FA, 0xFCFB, 0x04FB, 0x0405, 0xFC05, + 0x0503, 0x05FD, 0xFB03, 0xFBFD, 0xFA03, 0xFAFA, 0x0606, 0x06FD, 0xFA06, + 0x0603, 0x06FA, 0xFAFD, 0xFA04, 0xFAFC, 0x0604, 0x06FC, 0x04F9, 0xFC07, + 0x0407, 0xFCF9, 0xFA02, 0xFBF9, 0x0507, 0xFAFE, 0x05F9, 0x06FE, 0x0602, + 0xFB07, 0x06F9, 0xFAF9, 0xFA07, 0x0607, 0x07FE, 0xF902, 0x0704, 0xF9FC, + 0xF904, 0xF9FE, 0x07FC, 0x0702, 0x07FA, 0x0706, 0xF906, 0xF9FA, 0x07FD, + 0x0703, 0xF903, 0xF9FD, 0xFB05, 0x0505, 0xFBFB, 0x05FB, 0xFA05, 0x07FB, + 0xF9FB, 0x0605, 0x0705, 0x06FB, 0xFAFB, 0xF905, 0xF9F9, 0xF907, 0x07F9, + 0x0707, }; static const uint8_t clv_mvu_2_bits[] = { - 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 15, 15, - 15, 15, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, - 13, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 15, 15, 14, 14, 14, - 14, 14, 14, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 16, 16, - 15, 15, 14, 13, 13, 13, 13, 13, 12, 12, 12, 13, 13, 13, 13, 13, - 14, 15, 15, 16, 14, 14, 14, 14, 13, 12, 12, 12, 12, 11, 10, 11, - 12, 12, 12, 12, 13, 14, 14, 14, 14, 14, 14, 14, 13, 12, 12, 12, - 12, 11, 10, 9, 10, 11, 12, 12, 12, 12, 13, 14, 14, 14, 15, 14, - 13, 13, 12, 12, 12, 12, 11, 10, 8, 10, 11, 12, 12, 12, 12, 13, - 13, 14, 15, 14, 14, 14, 13, 12, 12, 11, 11, 10, 9, 7, 9, 10, - 11, 11, 12, 12, 13, 14, 14, 14, 14, 14, 13, 12, 12, 11, 11, 10, - 9, 8, 7, 8, 9, 10, 11, 11, 12, 12, 13, 14, 14, 14, 13, 13, - 12, 11, 9, 9, 8, 7, 6, 5, 6, 7, 8, 9, 9, 11, 12, 13, - 13, 14, 14, 13, 13, 13, 11, 11, 10, 8, 7, 4, 1, 4, 7, 8, - 10, 11, 11, 13, 13, 13, 14, 14, 13, 13, 12, 11, 9, 9, 8, 7, - 6, 5, 6, 7, 8, 9, 9, 11, 12, 13, 13, 14, 14, 14, 13, 12, - 11, 11, 11, 9, 9, 8, 7, 8, 9, 10, 11, 11, 12, 12, 13, 14, - 14, 14, 14, 14, 13, 12, 12, 11, 11, 10, 9, 7, 9, 10, 11, 11, - 12, 12, 13, 14, 14, 14, 15, 14, 13, 13, 12, 12, 12, 12, 11, 10, - 9, 10, 11, 12, 12, 12, 12, 13, 13, 14, 15, 14, 14, 14, 13, 12, - 12, 12, 12, 11, 10, 8, 10, 11, 12, 12, 12, 12, 13, 14, 14, 14, - 14, 14, 14, 14, 13, 12, 12, 12, 12, 11, 10, 11, 12, 12, 12, 12, - 13, 14, 14, 14, 14, 16, 15, 15, 14, 13, 13, 13, 13, 13, 12, 12, - 12, 13, 13, 13, 13, 13, 14, 15, 15, 16, 16, 15, 15, 14, 14, 14, - 14, 14, 14, 13, 12, 13, 14, 14, 14, 14, 14, 14, 15, 15, 16, 16, - 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 13, 14, 14, 14, 14, 14, - 15, 15, 15, 16, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, - 14, 14, 15, 15, 15, 15, 16, 16, 16, 6, -}; - -static const uint16_t clv_mvu_2_codes[] = { - 0xFFF2, 0xFFEF, 0xFFEA, 0x7FEC, 0x7FD5, 0x7FC5, 0x7FCF, 0x3FD3, - 0x3FC9, 0x3FB4, 0x3F72, 0x3FAE, 0x3FDC, 0x3FE1, 0x7FC4, 0x7FC8, - 0x7FD7, 0x7FF0, 0xFFE9, 0xFFEC, 0xFFF8, 0xFFF4, 0x7FF3, 0x7FDE, - 0x7FD3, 0x3FC0, 0x3F99, 0x3FA8, 0x3FAC, 0x3F8E, 0x1FA8, 0x1F79, - 0x1FA2, 0x3F89, 0x3F93, 0x3F95, 0x3F9C, 0x3FB8, 0x7FD2, 0x7FE6, - 0x7FDA, 0xFFF7, 0xFFFE, 0x7FED, 0x7FE2, 0x3FD5, 0x3FD7, 0x3FB3, - 0x3FA2, 0x3F80, 0x3F7A, 0x1F88, 0x1F70, 0x1F8A, 0x3F83, 0x3F84, - 0x3FAA, 0x3FC4, 0x3FDA, 0x3FDF, 0x7FDB, 0x7FE3, 0xFFF1, 0xFFFB, - 0x7FE1, 0x7FC7, 0x3FB0, 0x1FAA, 0x1FAB, 0x1FA3, 0x1F8E, 0x1F81, - 0x0FA7, 0x0F7F, 0x0FA8, 0x1F82, 0x1F8F, 0x1FA4, 0x1FAC, 0x1FAD, - 0x3FB5, 0x7FC6, 0x7FDD, 0xFFF3, 0x3FDD, 0x3FBE, 0x3FB9, 0x3F7C, - 0x1F77, 0x0FB5, 0x0F9D, 0x0F99, 0x0F90, 0x0794, 0x03BE, 0x0795, - 0x0F92, 0x0F9A, 0x0F9E, 0x0FB6, 0x1F78, 0x3F78, 0x3FB2, 0x3FBF, - 0x3FD2, 0x3FA7, 0x3F8C, 0x3F75, 0x1F9E, 0x0F93, 0x0F94, 0x0F7B, - 0x0F73, 0x07B4, 0x03BB, 0x01D9, 0x03BC, 0x07B5, 0x0F74, 0x0F7C, - 0x0F95, 0x0F96, 0x1FA0, 0x3F76, 0x3F8F, 0x3FA5, 0x7FE5, 0x3FC7, - 0x1F95, 0x1F71, 0x0FAB, 0x0FAC, 0x0F9F, 0x0F7D, 0x0796, 0x03BF, - 0x00DE, 0x03C0, 0x0797, 0x0F7E, 0x0FA0, 0x0FAD, 0x0FAE, 0x1F72, - 0x1F97, 0x3FD1, 0x7FD8, 0x3FA9, 0x3FA0, 0x3F6D, 0x1F99, 0x0F87, - 0x0F77, 0x07A8, 0x079C, 0x03C5, 0x01CA, 0x0067, 0x01CB, 0x03C6, - 0x079D, 0x07A9, 0x0F78, 0x0F8A, 0x1F9F, 0x3F6E, 0x3F98, 0x3F9A, - 0x3FCA, 0x3F70, 0x1FAF, 0x0F8D, 0x0F6F, 0x07AC, 0x07A0, 0x03B7, - 0x01CE, 0x00DA, 0x0063, 0x00DB, 0x01CF, 0x03B8, 0x07A1, 0x07AD, - 0x0F70, 0x0F91, 0x1FB2, 0x3F73, 0x3FD6, 0x3F7D, 0x1F91, 0x1F85, - 0x0FA3, 0x07A2, 0x01D4, 0x01D0, 0x00E0, 0x0068, 0x002C, 0x0014, - 0x002D, 0x0069, 0x00E1, 0x01D1, 0x01D5, 0x07A3, 0x0FA4, 0x1F89, - 0x1F92, 0x3F81, 0x3FA6, 0x1F7B, 0x1F7C, 0x1F7D, 0x07B0, 0x07AE, - 0x03C7, 0x00DC, 0x0064, 0x0008, 0x0000, 0x0009, 0x0065, 0x00DD, - 0x03C8, 0x07AF, 0x07B1, 0x1F7E, 0x1F7F, 0x1F80, 0x3F9E, 0x3F85, - 0x1F93, 0x1F8B, 0x0FA5, 0x07A4, 0x01D6, 0x01D2, 0x00E2, 0x006A, - 0x002E, 0x0015, 0x002F, 0x006B, 0x00E3, 0x01D3, 0x01D7, 0x07A5, - 0x0FA6, 0x1F8C, 0x1F94, 0x3F87, 0x3FCE, 0x3F77, 0x1FB4, 0x0F83, - 0x07B6, 0x07AA, 0x079E, 0x01DA, 0x01CC, 0x00D8, 0x0062, 0x00D9, - 0x01CD, 0x03B6, 0x079F, 0x07AB, 0x0F6E, 0x0F84, 0x1FA9, 0x3F6A, - 0x3FCD, 0x3F90, 0x3F92, 0x3F6B, 0x1F96, 0x0F85, 0x0F75, 0x07A6, - 0x079A, 0x03C3, 0x01C8, 0x0066, 0x01C9, 0x03C4, 0x079B, 0x07A7, - 0x0F76, 0x0F86, 0x1F9D, 0x3F6C, 0x3F96, 0x3F97, 0x7FE9, 0x3FD8, - 0x1F98, 0x1F73, 0x0FAF, 0x0FB0, 0x0FA1, 0x0F80, 0x0798, 0x03C1, - 0x01D8, 0x03C2, 0x0799, 0x0F81, 0x0FA2, 0x0FB1, 0x0FB2, 0x1F74, - 0x1F9A, 0x3FE0, 0x7FEE, 0x3F94, 0x3F8B, 0x3F6F, 0x1F9B, 0x0F88, - 0x0F89, 0x0F79, 0x0F71, 0x07B2, 0x03B9, 0x00DF, 0x03BA, 0x07B3, - 0x0F72, 0x0F7A, 0x0F8B, 0x0F8C, 0x1F9C, 0x3F71, 0x3F8A, 0x3F9B, - 0x3FC8, 0x3FBD, 0x3FC5, 0x3F79, 0x1F75, 0x0FB3, 0x0F9C, 0x0F97, - 0x0F8E, 0x0792, 0x03BD, 0x0793, 0x0F8F, 0x0F98, 0x0F9B, 0x0FB4, - 0x1F76, 0x3F82, 0x3FC3, 0x3FBA, 0x3FC6, 0xFFFD, 0x7FDF, 0x7FCC, - 0x3FBB, 0x1FB0, 0x1FAE, 0x1FA1, 0x1F90, 0x1F83, 0x0FAA, 0x0F82, - 0x0FA9, 0x1F84, 0x1F8D, 0x1FA5, 0x1FB1, 0x1FB3, 0x3FC2, 0x7FCA, - 0x7FE8, 0xFFF5, 0xFFFF, 0x7FDC, 0x7FD9, 0x3FCC, 0x3FD9, 0x3FB7, - 0x3F9F, 0x3F7E, 0x3F86, 0x1F86, 0x0FB7, 0x1F87, 0x3F7B, 0x3F7F, - 0x3FA1, 0x3FBC, 0x3FCB, 0x3FD4, 0x7FF1, 0x7FF2, 0xFFFA, 0xFFFC, - 0x7FE4, 0x7FE7, 0x7FD4, 0x3FAF, 0x3FA3, 0x3F91, 0x3F9D, 0x3F88, - 0x1FA6, 0x1F7A, 0x1FA7, 0x3F8D, 0x3FAB, 0x3FAD, 0x3FA4, 0x3FB6, - 0x7FD0, 0x7FE0, 0x7FEB, 0xFFF0, 0xFFF9, 0xFFEB, 0xFFED, 0x7FEA, - 0x7FD6, 0x7FC9, 0x7FCB, 0x3FD0, 0x3FDE, 0x3FB1, 0x3F74, 0x3FC1, - 0x3FCF, 0x3FDB, 0x7FCD, 0x7FCE, 0x7FD1, 0x7FEF, 0xFFE8, 0xFFEE, - 0xFFF6, 0x0030, + 1, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16 }; static const uint16_t clv_mvu_2_syms[] = { - 0xF6F6, 0xF7F6, 0xF8F6, 0xF9F6, 0xFAF6, 0xFBF6, 0xFCF6, 0xFDF6, - 0xFEF6, 0xFFF6, 0x00F6, 0x01F6, 0x02F6, 0x03F6, 0x04F6, 0x05F6, - 0x06F6, 0x07F6, 0x08F6, 0x09F6, 0x0AF6, 0xF6F7, 0xF7F7, 0xF8F7, - 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, 0xFFF7, 0x00F7, - 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, 0x07F7, 0x08F7, - 0x09F7, 0x0AF7, 0xF6F8, 0xF7F8, 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, - 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, 0x00F8, 0x01F8, 0x02F8, 0x03F8, - 0x04F8, 0x05F8, 0x06F8, 0x07F8, 0x08F8, 0x09F8, 0x0AF8, 0xF6F9, - 0xF7F9, 0xF8F9, 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, - 0xFFF9, 0x00F9, 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, - 0x07F9, 0x08F9, 0x09F9, 0x0AF9, 0xF6FA, 0xF7FA, 0xF8FA, 0xF9FA, - 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, - 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0x08FA, 0x09FA, - 0x0AFA, 0xF6FB, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, 0xFBFB, 0xFCFB, - 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, 0x03FB, 0x04FB, - 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0x0AFB, 0xF6FC, 0xF7FC, - 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, - 0x00FC, 0x01FC, 0x02FC, 0x03FC, 0x04FC, 0x05FC, 0x06FC, 0x07FC, - 0x08FC, 0x09FC, 0x0AFC, 0xF6FD, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, - 0xFBFD, 0xFCFD, 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, - 0x03FD, 0x04FD, 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0x0AFD, - 0xF6FE, 0xF7FE, 0xF8FE, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, - 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, - 0x06FE, 0x07FE, 0x08FE, 0x09FE, 0x0AFE, 0xF6FF, 0xF7FF, 0xF8FF, - 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, 0xFFFF, 0x00FF, - 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, 0x07FF, 0x08FF, - 0x09FF, 0x0AFF, 0xF600, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, - 0xFC00, 0xFD00, 0xFE00, 0xFF00, 0x0000, 0x0100, 0x0200, 0x0300, - 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0A00, 0xF601, - 0xF701, 0xF801, 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, - 0xFF01, 0x0001, 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, - 0x0701, 0x0801, 0x0901, 0x0A01, 0xF602, 0xF702, 0xF802, 0xF902, - 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, - 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0x0802, 0x0902, - 0x0A02, 0xF603, 0xF703, 0xF803, 0xF903, 0xFA03, 0xFB03, 0xFC03, - 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, 0x0303, 0x0403, - 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0x0A03, 0xF604, 0xF704, - 0xF804, 0xF904, 0xFA04, 0xFB04, 0xFC04, 0xFD04, 0xFE04, 0xFF04, - 0x0004, 0x0104, 0x0204, 0x0304, 0x0404, 0x0504, 0x0604, 0x0704, - 0x0804, 0x0904, 0x0A04, 0xF605, 0xF705, 0xF805, 0xF905, 0xFA05, - 0xFB05, 0xFC05, 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, - 0x0305, 0x0405, 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0x0A05, - 0xF606, 0xF706, 0xF806, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, - 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, - 0x0606, 0x0706, 0x0806, 0x0906, 0x0A06, 0xF607, 0xF707, 0xF807, - 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, 0xFF07, 0x0007, - 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, 0x0707, 0x0807, - 0x0907, 0x0A07, 0xF608, 0xF708, 0xF808, 0xF908, 0xFA08, 0xFB08, - 0xFC08, 0xFD08, 0xFE08, 0xFF08, 0x0008, 0x0108, 0x0208, 0x0308, - 0x0408, 0x0508, 0x0608, 0x0708, 0x0808, 0x0908, 0x0A08, 0xF609, - 0xF709, 0xF809, 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, - 0xFF09, 0x0009, 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, - 0x0709, 0x0809, 0x0909, 0x0A09, 0xF60A, 0xF70A, 0xF80A, 0xF90A, - 0xFA0A, 0xFB0A, 0xFC0A, 0xFD0A, 0xFE0A, 0xFF0A, 0x000A, 0x010A, - 0x020A, 0x030A, 0x040A, 0x050A, 0x060A, 0x070A, 0x080A, 0x090A, - 0x0A0A, 0x0B0B, + 0x0000, 0xFF00, 0x0100, 0x00FF, 0x0001, 0xFFFF, 0x01FF, 0xFF01, 0x0101, + 0x0B0B, 0x0002, 0x00FE, 0xFE00, 0x0200, 0x0003, 0x00FD, 0xFEFF, 0x02FF, + 0xFE01, 0x0201, 0xFF02, 0x0102, 0xFFFE, 0x01FE, 0xFD00, 0x0300, 0x00FC, + 0x0005, 0xFDFF, 0x03FF, 0xFD01, 0x0301, 0xFF03, 0x0103, 0xFFFD, 0x01FD, + 0xFE02, 0x0202, 0xFEFE, 0x02FE, 0xFCFF, 0x04FF, 0xFC01, 0x0401, 0xFBFF, + 0x05FF, 0xFB01, 0x0501, 0x0004, 0x00FB, 0xFD02, 0x0302, 0xFDFE, 0x03FE, + 0xFF05, 0x0105, 0xFFFB, 0x01FB, 0x0006, 0x00FA, 0xFFFC, 0x01FC, 0xFF04, + 0x0104, 0xFE03, 0x0203, 0xFEFD, 0x02FD, 0xFC00, 0x0400, 0xFF06, 0x0106, + 0xFFFA, 0x01FA, 0xFEFC, 0x02FC, 0xFE04, 0x0204, 0xFD03, 0x0303, 0xFDFD, + 0x03FD, 0xFC02, 0x0402, 0xFCFE, 0x04FE, 0xFAFF, 0x06FF, 0xFA01, 0x0601, + 0xFC03, 0x0403, 0xFCFD, 0x04FD, 0xFB02, 0x0502, 0xFBFE, 0x05FE, 0xFB00, + 0x0500, 0xFA00, 0x0600, 0xFE05, 0x0205, 0xFEFB, 0x02FB, 0xFA02, 0x0602, + 0xFAFE, 0x06FE, 0xFD05, 0x0305, 0xFDFB, 0x03FB, 0xFB03, 0x0503, 0xFBFD, + 0x05FD, 0xFC05, 0x0405, 0xFCFB, 0x04FB, 0xFDFC, 0x03FC, 0x00F9, 0xFD04, + 0x0304, 0x0007, 0xF902, 0x0702, 0xFA03, 0x0603, 0xFAFD, 0xFA05, 0xFB05, + 0x06FD, 0x0505, 0x0605, 0xF9FE, 0xFE06, 0x0206, 0xFEFA, 0x07FE, 0x02FA, + 0xFAFB, 0xFBFB, 0x05FB, 0x06FB, 0xFD06, 0x0306, 0xFDFA, 0x03FA, 0x0406, + 0xFC06, 0xFCFA, 0x04FA, 0xFCFC, 0x04FC, 0xFC04, 0x0404, 0xF9FF, 0x07FF, + 0xF901, 0x0701, 0xFFF9, 0x01F9, 0x0107, 0xFF07, 0xFAFC, 0xFBFC, 0x05FC, + 0x06FC, 0xFA04, 0xFB04, 0x0504, 0x0604, 0xFB06, 0x0506, 0xFBFA, 0x05FA, + 0x0008, 0x00F8, 0xF9FC, 0x07FC, 0xF904, 0x0704, 0xFA06, 0x0606, 0xFAFA, + 0x06FA, 0x00F7, 0x0009, 0xF700, 0xF800, 0xF900, 0x0700, 0x0800, 0x0900, + 0xFEF9, 0x02F9, 0xFE07, 0x0207, 0xF8FF, 0xFF08, 0x0108, 0xFFF8, 0x08FF, + 0x01F8, 0xF801, 0x0801, 0x0307, 0xFDF9, 0x03F9, 0xFD07, 0xF7FF, 0x09FF, + 0xF701, 0x0901, 0xF8FC, 0xF903, 0x08FC, 0xF804, 0xF9FD, 0x0804, 0xF905, + 0x0705, 0x0703, 0xF9FB, 0x07FD, 0x07FB, 0xFC07, 0x01F7, 0xFCF9, 0x04F9, + 0x0407, 0xFF09, 0x0109, 0xFFF7, 0x0802, 0xFAF9, 0xFBF9, 0x05F9, 0x06F9, + 0xFB07, 0xF8FE, 0xFA07, 0x0507, 0x08FE, 0x0607, 0xF802, 0x0902, 0xF803, + 0x0803, 0xF8FD, 0x08FD, 0xF805, 0xF7FE, 0x0805, 0x00F6, 0x09FE, 0x000A, + 0xF8FB, 0x08FB, 0xF702, 0x07FA, 0xF906, 0xFEF8, 0x0208, 0xF9FA, 0xF6FF, + 0xFD08, 0x0308, 0xFDF8, 0x0AFF, 0x0706, 0x02F8, 0x03F8, 0xF601, 0xFE08, + 0x0A01, 0xFE09, 0x02F7, 0x0905, 0xF705, 0xF7FB, 0x0209, 0xFEF7, 0x09FB, + 0xF603, 0xFC09, 0xF703, 0x03F7, 0xF605, 0x04F7, 0x0903, 0x0A03, 0x09FD, + 0xFBF7, 0x0AFD, 0x0A05, 0x05F7, 0xFD09, 0x0A00, 0xFC08, 0xF7FD, 0x0408, + 0xFCF8, 0xFB09, 0x0509, 0x0AFB, 0xF600, 0xF6FB, 0xFCF7, 0xF6FD, 0x04F8, + 0x0309, 0xFDF7, 0x0409, 0x01F6, 0xFA09, 0xF9F9, 0xFF0A, 0x08FA, 0xFBF8, + 0xFFF6, 0x07F9, 0x0609, 0xFB08, 0x06F7, 0xF8FA, 0x0906, 0xF907, 0x0508, + 0xF706, 0xF7FA, 0x09FA, 0xFAF7, 0x010A, 0x0707, 0x0806, 0x05F8, 0xF806, + 0x0A06, 0xF7FC, 0xF606, 0xFEF6, 0xF6FE, 0x0608, 0xF908, 0x0A02, 0xF602, + 0x020A, 0xFD0A, 0x09FC, 0x0AFA, 0xFDF6, 0x0708, 0xF9F8, 0x0AFE, 0xFAF8, + 0xF704, 0xFA08, 0x06F8, 0x030A, 0x02F6, 0xF6FA, 0xFE0A, 0x07F8, 0x0904, + 0x03F6, 0x04F6, 0xFBF6, 0x08F9, 0xF8F9, 0x05F6, 0xFB0A, 0x0807, 0xFC0A, + 0xF807, 0x040A, 0x050A, 0xFCF6, 0x0709, 0x060A, 0x07F7, 0xF9F7, 0xF909, + 0xFAF6, 0xFA0A, 0x06F6, 0x0AFC, 0xF808, 0x09F7, 0x08F8, 0xF708, 0x09F9, + 0xF8F7, 0xF707, 0x0809, 0xF7F9, 0xF8F8, 0x09F8, 0xF709, 0xF6FC, 0x08F7, + 0xF809, 0x0907, 0xF604, 0xF90A, 0x0909, 0xF9F6, 0xF7F8, 0x0A04, 0x070A, + 0x07F6, 0x0808, 0x0908, 0xF7F7, 0x080A, 0x08F6, 0xF8F6, 0xF70A, 0x09F6, + 0xF80A, 0x090A, 0xF7F6, 0x0A09, 0x0AF8, 0xF6F6, 0x0AF9, 0xF6F7, 0x0A07, + 0x0A0A, 0x0AF7, 0x0AF6, 0xF60A, 0x0A08, 0xF6F9, 0xF609, 0xF607, 0xF6F8, + 0xF608, }; static const uint8_t clv_mvv_1_bits[] = { - 16, 15, 13, 13, 13, 12, 10, 10, 10, 12, 13, 13, 13, 15, 16, 16, - 15, 14, 13, 12, 11, 10, 9, 10, 11, 12, 13, 14, 15, 16, 15, 14, - 13, 13, 11, 10, 10, 5, 10, 10, 11, 13, 13, 14, 15, 12, 12, 12, - 11, 10, 10, 9, 5, 9, 10, 10, 11, 12, 12, 12, 14, 12, 12, 12, - 11, 9, 8, 5, 8, 9, 11, 12, 12, 12, 14, 14, 11, 11, 9, 9, - 9, 7, 5, 7, 9, 9, 9, 11, 11, 14, 13, 12, 11, 10, 10, 8, - 6, 3, 6, 8, 10, 10, 11, 12, 13, 11, 10, 9, 7, 6, 6, 4, - 4, 4, 6, 7, 7, 10, 10, 11, 13, 12, 11, 10, 10, 8, 6, 3, - 6, 8, 10, 10, 11, 12, 13, 14, 11, 11, 9, 9, 9, 7, 5, 7, - 9, 9, 9, 11, 11, 14, 14, 12, 12, 12, 11, 9, 8, 5, 8, 9, - 11, 12, 12, 12, 14, 12, 12, 12, 11, 10, 10, 9, 5, 9, 10, 10, - 11, 12, 12, 12, 15, 14, 13, 13, 11, 10, 10, 5, 10, 10, 11, 13, - 13, 14, 15, 16, 15, 14, 13, 12, 11, 10, 9, 10, 11, 12, 13, 14, - 15, 16, 16, 15, 13, 13, 13, 12, 10, 10, 10, 12, 13, 13, 13, 15, - 16, 7, -}; - -static const uint16_t clv_mvv_1_codes[] = { - 0xFFFD, 0x7FF8, 0x1FF2, 0x1FDC, 0x1FDB, 0x0FD2, 0x03D6, 0x03BF, - 0x03D3, 0x0FD0, 0x1FDA, 0x1FDE, 0x1FF0, 0x7FF9, 0xFFFE, 0xFFFA, - 0x7FFB, 0x3FF3, 0x1FE9, 0x0FD6, 0x07CB, 0x03E1, 0x01C8, 0x03E2, - 0x07CC, 0x0FD9, 0x1FE8, 0x3FF6, 0x7FFA, 0xFFF9, 0x7FF1, 0x3FEE, - 0x1FE4, 0x1FE0, 0x07D4, 0x03DB, 0x03CB, 0x0014, 0x03CC, 0x03DC, - 0x07D6, 0x1FE3, 0x1FE7, 0x3FEC, 0x7FF3, 0x0FEA, 0x0FE0, 0x0FDE, - 0x07DE, 0x03C9, 0x03C3, 0x01DC, 0x0013, 0x01DD, 0x03C4, 0x03CA, - 0x07DF, 0x0FDF, 0x0FE3, 0x0FEB, 0x3FF1, 0x0FE7, 0x0FCF, 0x0FC8, - 0x07D8, 0x01D2, 0x00E0, 0x0010, 0x00E1, 0x01D4, 0x07D9, 0x0FC9, - 0x0FCC, 0x0FE6, 0x3FF5, 0x3FEA, 0x07E2, 0x07D2, 0x01D7, 0x01D0, - 0x01CC, 0x006A, 0x000F, 0x006B, 0x01CD, 0x01D1, 0x01D9, 0x07D3, - 0x07E3, 0x3FEB, 0x1FEE, 0x0FD5, 0x07C7, 0x03D8, 0x03D0, 0x00DD, - 0x002D, 0x0001, 0x002E, 0x00DE, 0x03D1, 0x03D9, 0x07C8, 0x0FD8, - 0x1FEF, 0x07CE, 0x03C5, 0x01DE, 0x006C, 0x0032, 0x0030, 0x0005, - 0x0004, 0x0006, 0x0031, 0x0066, 0x006D, 0x03BE, 0x03C6, 0x07CF, - 0x1FEC, 0x0FDA, 0x07C9, 0x03DA, 0x03D2, 0x00DF, 0x002F, 0x0000, - 0x002C, 0x00DC, 0x03CF, 0x03D7, 0x07C6, 0x0FD4, 0x1FED, 0x3FE9, - 0x07E0, 0x07D0, 0x01D3, 0x01CE, 0x01CA, 0x0068, 0x000E, 0x0069, - 0x01CB, 0x01CF, 0x01D5, 0x07D1, 0x07E1, 0x3FE8, 0x3FF4, 0x0FE4, - 0x0FCD, 0x0FCB, 0x07DA, 0x01D6, 0x00E2, 0x0011, 0x00E3, 0x01D8, - 0x07DB, 0x0FCA, 0x0FCE, 0x0FE5, 0x3FF7, 0x0FE8, 0x0FE1, 0x0FDD, - 0x07DD, 0x03C7, 0x03C1, 0x01DA, 0x0012, 0x01DB, 0x03C2, 0x03C8, - 0x07DC, 0x0FDC, 0x0FE2, 0x0FE9, 0x7FF0, 0x3FEF, 0x1FE5, 0x1FE1, - 0x07D7, 0x03DD, 0x03CD, 0x0015, 0x03CE, 0x03DE, 0x07D5, 0x1FE2, - 0x1FE6, 0x3FED, 0x7FF2, 0xFFF8, 0x7FF4, 0x3FF2, 0x1FEB, 0x0FD7, - 0x07CD, 0x03DF, 0x01C9, 0x03E0, 0x07CA, 0x0FDB, 0x1FEA, 0x3FF0, - 0x7FF5, 0xFFFB, 0xFFFC, 0x7FF6, 0x1FF3, 0x1FDD, 0x1FD9, 0x0FD1, - 0x03D5, 0x03C0, 0x03D4, 0x0FD3, 0x1FD8, 0x1FDF, 0x1FF1, 0x7FF7, - 0xFFFF, 0x0067, + 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, + 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16 }; static const uint16_t clv_mvv_1_syms[] = { - 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, 0xFFF9, 0x00F9, - 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, 0x07F9, 0xF9FA, - 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, - 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0xF9FB, 0xFAFB, - 0xFBFB, 0xFCFB, 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, - 0x03FB, 0x04FB, 0x05FB, 0x06FB, 0x07FB, 0xF9FC, 0xFAFC, 0xFBFC, - 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, 0x00FC, 0x01FC, 0x02FC, 0x03FC, - 0x04FC, 0x05FC, 0x06FC, 0x07FC, 0xF9FD, 0xFAFD, 0xFBFD, 0xFCFD, - 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, 0x03FD, 0x04FD, - 0x05FD, 0x06FD, 0x07FD, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, - 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, - 0x06FE, 0x07FE, 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, - 0xFFFF, 0x00FF, 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, - 0x07FF, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00, - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, - 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, 0xFF01, 0x0001, - 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, 0x0701, 0xF902, - 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, - 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0xF903, 0xFA03, - 0xFB03, 0xFC03, 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, - 0x0303, 0x0403, 0x0503, 0x0603, 0x0703, 0xF904, 0xFA04, 0xFB04, - 0xFC04, 0xFD04, 0xFE04, 0xFF04, 0x0004, 0x0104, 0x0204, 0x0304, - 0x0404, 0x0504, 0x0604, 0x0704, 0xF905, 0xFA05, 0xFB05, 0xFC05, - 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, 0x0305, 0x0405, - 0x0505, 0x0605, 0x0705, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, - 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, - 0x0606, 0x0706, 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, - 0xFF07, 0x0007, 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, - 0x0707, 0x0808, + 0x0001, 0x00FF, 0x0000, 0xFF00, 0x0100, 0x0002, 0x00FE, 0x00FD, 0x0003, + 0x0004, 0x00FC, 0x00FB, 0x0005, 0x0101, 0xFFFF, 0x01FF, 0xFF01, 0xFE00, + 0x0200, 0xFD00, 0x0300, 0x0808, 0xFF02, 0x0102, 0xFFFE, 0x01FE, 0xFC00, + 0x0400, 0x0201, 0xFEFF, 0x02FF, 0xFE01, 0xFFFD, 0x01FD, 0xFF03, 0x0103, + 0x00FA, 0x0006, 0xFE02, 0x0202, 0xFEFE, 0x02FE, 0xFD02, 0x0302, 0xFDFE, + 0x03FE, 0xFEFD, 0xFC02, 0x02FD, 0x0402, 0xFE03, 0xFCFE, 0x0203, 0x04FE, + 0xFF04, 0x0104, 0xFFFC, 0x01FC, 0xFB00, 0x0500, 0x00F9, 0x0007, 0xFE04, + 0x0204, 0xFEFC, 0x02FC, 0xFA00, 0x0600, 0xFD04, 0x0304, 0xFDFC, 0x03FC, + 0xFFFB, 0x01FB, 0xFF05, 0x0105, 0x0301, 0xFDFF, 0x03FF, 0xFD01, 0x01F9, + 0x0107, 0xFF07, 0xFFF9, 0x0401, 0xFCFF, 0x04FF, 0xFC01, 0xFEFB, 0x02FB, + 0xFE05, 0x0205, 0xFF06, 0x0106, 0xFFFA, 0x01FA, 0x0501, 0xFBFF, 0x05FF, + 0xFB01, 0x0206, 0xFEFA, 0x02FA, 0xFE06, 0xF900, 0x0700, 0xFB02, 0x0502, + 0xFBFE, 0x05FE, 0xFDFB, 0x0305, 0x03FB, 0xFD05, 0xFDFD, 0x03FD, 0xFD03, + 0x0303, 0x0404, 0xFC04, 0xFCFC, 0x04FC, 0xFA02, 0x0602, 0xFAFE, 0x06FE, + 0xFCFD, 0x04FD, 0x0403, 0xFC03, 0x05FD, 0xFB03, 0x0503, 0xFBFD, 0x02F9, + 0xFE07, 0xFEF9, 0x0207, 0x0601, 0xFAFF, 0xFDFA, 0xFD06, 0x06FF, 0x03FA, + 0xFA01, 0x0306, 0x0504, 0xFB04, 0xFBFC, 0x05FC, 0xFAFC, 0xFA04, 0x0604, + 0x06FC, 0xFA03, 0x0603, 0x06FD, 0xFAFD, 0xF904, 0x0704, 0xF9FC, 0x07FC, + 0x0307, 0xFD07, 0x03F9, 0xFDF9, 0xFCF9, 0xFC07, 0x04F9, 0x0407, 0xFCFB, + 0xFC05, 0x0405, 0x04FB, 0xFBFB, 0xFB05, 0x0505, 0x05FB, 0x04FA, 0xFCFA, + 0x0406, 0xFC06, 0xF901, 0x0701, 0xF9FF, 0x07FF, 0x05F9, 0x0507, 0xFBF9, + 0xFB07, 0x0702, 0xF902, 0xF9FE, 0x07FE, 0x06FB, 0x0605, 0xFAFB, 0xFA05, + 0x0506, 0xF9FD, 0xFB06, 0xFBFA, 0xF903, 0x07FD, 0x05FA, 0x0703, 0xF905, + 0xF9FB, 0x0705, 0x07FB, 0xFA06, 0x0606, 0xFA07, 0x0607, 0xFAF9, 0x06F9, + 0x06FA, 0xFAFA, 0xF906, 0x07FA, 0xF9FA, 0x0706, 0xF907, 0xF9F9, 0x07F9, + 0x0707, }; static const uint8_t clv_mvv_2_bits[] = { - 16, 15, 15, 15, 15, 15, 14, 14, 14, 13, 12, 13, 14, 14, 14, 15, - 15, 15, 15, 15, 16, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, - 12, 13, 14, 14, 14, 15, 15, 16, 16, 16, 16, 16, 16, 14, 14, 14, - 14, 14, 14, 13, 13, 13, 14, 14, 14, 14, 14, 14, 16, 16, 16, 15, - 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 13, 13, 13, 13, 14, - 14, 14, 15, 15, 16, 14, 14, 14, 13, 12, 12, 12, 10, 10, 10, 10, - 10, 12, 12, 12, 13, 14, 14, 14, 16, 14, 14, 14, 13, 13, 12, 12, - 12, 10, 10, 7, 10, 10, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, - 13, 12, 12, 12, 12, 10, 9, 8, 7, 8, 9, 10, 12, 12, 12, 12, - 13, 14, 14, 14, 14, 13, 12, 12, 12, 12, 10, 9, 8, 7, 8, 9, - 10, 12, 12, 12, 12, 13, 14, 14, 14, 14, 13, 13, 12, 12, 11, 10, - 9, 8, 7, 8, 9, 10, 11, 12, 12, 13, 13, 14, 14, 14, 13, 13, - 12, 10, 10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 10, 12, 13, - 13, 14, 13, 13, 13, 13, 11, 10, 9, 8, 7, 5, 1, 5, 7, 8, - 9, 10, 11, 13, 13, 13, 13, 14, 13, 13, 12, 10, 10, 9, 8, 7, - 6, 5, 6, 7, 8, 9, 10, 10, 12, 13, 13, 14, 14, 14, 13, 13, - 12, 12, 11, 9, 9, 8, 7, 8, 9, 9, 11, 12, 12, 13, 13, 14, - 14, 14, 14, 13, 12, 12, 12, 12, 10, 9, 8, 7, 8, 9, 10, 12, - 12, 12, 12, 13, 14, 14, 14, 14, 13, 12, 12, 12, 12, 10, 9, 8, - 7, 8, 9, 10, 12, 12, 12, 12, 13, 14, 14, 14, 14, 14, 13, 13, - 12, 12, 12, 10, 10, 7, 10, 10, 12, 12, 12, 13, 13, 14, 14, 14, - 16, 14, 14, 14, 13, 12, 12, 12, 10, 10, 10, 10, 10, 12, 12, 12, - 13, 14, 14, 14, 16, 15, 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, - 12, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, 14, 14, 14, - 14, 14, 14, 13, 13, 13, 14, 14, 14, 14, 14, 14, 16, 16, 16, 16, - 16, 16, 15, 15, 14, 14, 14, 13, 12, 12, 12, 13, 14, 14, 14, 15, - 15, 16, 16, 16, 16, 15, 15, 15, 15, 15, 14, 14, 14, 13, 10, 13, - 14, 14, 14, 15, 15, 15, 15, 15, 16, 6, -}; - -static const uint16_t clv_mvv_2_codes[] = { - 0xFFFF, 0x7FE7, 0x7FD9, 0x7FE6, 0x7FE5, 0x7FCE, 0x3FD6, 0x3FD3, - 0x3F9C, 0x1FB2, 0x0F7A, 0x1FB5, 0x3FA8, 0x3FDD, 0x3FE5, 0x7FD0, - 0x7FEA, 0x7FEC, 0x7FEF, 0x7FDB, 0xFFF3, 0xFFF5, 0xFFE2, 0xFFEB, - 0x7FEB, 0x7FE0, 0x3FA7, 0x3F84, 0x3F79, 0x1FAE, 0x1F70, 0x0F78, - 0x0FAA, 0x1FAA, 0x3F76, 0x3F7E, 0x3FAC, 0x7FE1, 0x7FDD, 0xFFEC, - 0xFFEE, 0xFFF8, 0xFFF9, 0xFFEA, 0xFFE4, 0x3FE1, 0x3FBA, 0x3FC5, - 0x3FB9, 0x3FA1, 0x3FAA, 0x1F8B, 0x1F8D, 0x1F8E, 0x3FA6, 0x3FA9, - 0x3FC4, 0x3FBC, 0x3FC6, 0x3FDB, 0xFFE3, 0xFFE1, 0xFFFB, 0x7FD4, - 0x7FCC, 0x3FCD, 0x3F88, 0x3F7C, 0x1FA1, 0x1FA2, 0x1F95, 0x1F77, - 0x0F95, 0x0F79, 0x0F97, 0x1F78, 0x1F96, 0x1FA3, 0x1FA4, 0x3F7F, - 0x3F8B, 0x3FCB, 0x7FCF, 0x7FD5, 0xFFF6, 0x3FD7, 0x3FE0, 0x3F91, - 0x1F7B, 0x0FB4, 0x0FA5, 0x0FA6, 0x03D5, 0x03CB, 0x03BF, 0x03CC, - 0x03D6, 0x0FA7, 0x0FA8, 0x0FB5, 0x1F7D, 0x3F87, 0x3FD2, 0x3FDF, - 0xFFF0, 0x3F95, 0x3F8A, 0x3F96, 0x1FB7, 0x1F9F, 0x0F9F, 0x0F8F, - 0x0F76, 0x03D1, 0x03BC, 0x0067, 0x03BD, 0x03D2, 0x0F77, 0x0F90, - 0x0FA0, 0x1FA0, 0x1FB9, 0x3F97, 0x3F98, 0x3F99, 0x3FC3, 0x3FAF, - 0x1F81, 0x0FA9, 0x0F91, 0x0F7E, 0x0F68, 0x03B2, 0x01C6, 0x00D4, - 0x0062, 0x00D5, 0x01C7, 0x03B3, 0x0F6A, 0x0F81, 0x0F93, 0x0FAC, - 0x1F83, 0x3FB3, 0x3FB4, 0x3FC7, 0x3FBB, 0x1F86, 0x0FAF, 0x0F98, - 0x0F84, 0x0F6D, 0x03B8, 0x01CC, 0x00DA, 0x0065, 0x00DB, 0x01CD, - 0x03B9, 0x0F6F, 0x0F86, 0x0F9B, 0x0FB1, 0x1F88, 0x3FB8, 0x3FC9, - 0x3FDC, 0x3F80, 0x1FB3, 0x1F93, 0x0F87, 0x0F72, 0x07B0, 0x03B0, - 0x01D4, 0x00E0, 0x0061, 0x00E1, 0x01D5, 0x03B1, 0x07B1, 0x0F73, - 0x0F88, 0x1F94, 0x1FB4, 0x3F81, 0x3FD4, 0x3F9E, 0x1F99, 0x1F73, - 0x0F89, 0x03C4, 0x03C0, 0x01CE, 0x00D0, 0x005C, 0x0028, 0x0010, - 0x0029, 0x005D, 0x00D1, 0x01CF, 0x03C1, 0x03C5, 0x0F8A, 0x1F74, - 0x1F9A, 0x3FA4, 0x1FAC, 0x1F8C, 0x1F7E, 0x1F71, 0x07B2, 0x03CF, - 0x01C4, 0x00DC, 0x005A, 0x0012, 0x0000, 0x0013, 0x005B, 0x00DD, - 0x01C5, 0x03D0, 0x07B3, 0x1F72, 0x1F7F, 0x1F8F, 0x1FAD, 0x3FAB, - 0x1F9B, 0x1F75, 0x0F8B, 0x03C6, 0x03C2, 0x01D0, 0x00D2, 0x005E, - 0x002A, 0x0011, 0x002B, 0x005F, 0x00D3, 0x01D1, 0x03C3, 0x03C7, - 0x0F8C, 0x1F76, 0x1F9C, 0x3FAD, 0x3FCF, 0x3F85, 0x1FBA, 0x1F91, - 0x0F7D, 0x0F70, 0x07AE, 0x01D6, 0x01D2, 0x00DE, 0x0060, 0x00DF, - 0x01D3, 0x01D7, 0x07AF, 0x0F71, 0x0F7F, 0x1F92, 0x1FAF, 0x3F7B, - 0x3FD0, 0x3FC0, 0x3FB1, 0x1F82, 0x0FAB, 0x0F92, 0x0F80, 0x0F69, - 0x03B4, 0x01C8, 0x00D6, 0x0063, 0x00D7, 0x01C9, 0x03B5, 0x0F6B, - 0x0F82, 0x0F94, 0x0FAD, 0x1F84, 0x3FB5, 0x3FC2, 0x3FB6, 0x3FBF, - 0x1F85, 0x0FAE, 0x0F96, 0x0F83, 0x0F6C, 0x03B6, 0x01CA, 0x00D8, - 0x0064, 0x00D9, 0x01CB, 0x03B7, 0x0F6E, 0x0F85, 0x0F99, 0x0FB0, - 0x1F87, 0x3FB0, 0x3FB2, 0x3F93, 0x3F86, 0x3F8E, 0x1FB1, 0x1F9D, - 0x0F9A, 0x0F8D, 0x0F74, 0x03CD, 0x03BA, 0x0066, 0x03BB, 0x03CE, - 0x0F75, 0x0F8E, 0x0F9C, 0x1F9E, 0x1FB0, 0x3F8C, 0x3F94, 0x3F8D, - 0xFFFC, 0x3FCA, 0x3FD5, 0x3F8F, 0x1F79, 0x0FB2, 0x0FA1, 0x0FA2, - 0x03D3, 0x03C9, 0x03BE, 0x03CA, 0x03D4, 0x0FA3, 0x0FA4, 0x0FB3, - 0x1F7A, 0x3F90, 0x3FE3, 0x3FD8, 0xFFF2, 0x7FD7, 0x7FCD, 0x3FE4, - 0x3F92, 0x3F82, 0x1FA6, 0x1FA8, 0x1F98, 0x1F7C, 0x0F9D, 0x0F7B, - 0x0F9E, 0x1F80, 0x1F97, 0x1FA7, 0x1FA5, 0x3F7A, 0x3F89, 0x3FDA, - 0x7FD2, 0x7FD6, 0xFFFE, 0xFFED, 0xFFE8, 0x3FCC, 0x3FBD, 0x3FAE, - 0x3FC1, 0x3F9F, 0x3F9A, 0x1F89, 0x1F90, 0x1F8A, 0x3FA3, 0x3FA0, - 0x3FC8, 0x3FBE, 0x3FB7, 0x3FD1, 0xFFE7, 0xFFE9, 0xFFFD, 0xFFF4, - 0xFFE5, 0xFFEF, 0x7FD8, 0x7FDC, 0x3FA2, 0x3F83, 0x3F78, 0x1FA9, - 0x0FB6, 0x0F7C, 0x0FB7, 0x1FAB, 0x3F77, 0x3F7D, 0x3F9B, 0x7FDE, - 0x7FED, 0xFFE6, 0xFFE0, 0xFFF7, 0xFFF1, 0x7FDA, 0x7FE9, 0x7FE2, - 0x7FE3, 0x7FD1, 0x3FD9, 0x3FE2, 0x3FA5, 0x1FB8, 0x03C8, 0x1FB6, - 0x3F9D, 0x3FDE, 0x3FCE, 0x7FD3, 0x7FEE, 0x7FDF, 0x7FE8, 0x7FE4, - 0xFFFA, 0x002C, + 1, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16 }; static const uint16_t clv_mvv_2_syms[] = { - 0xF6F6, 0xF7F6, 0xF8F6, 0xF9F6, 0xFAF6, 0xFBF6, 0xFCF6, 0xFDF6, - 0xFEF6, 0xFFF6, 0x00F6, 0x01F6, 0x02F6, 0x03F6, 0x04F6, 0x05F6, - 0x06F6, 0x07F6, 0x08F6, 0x09F6, 0x0AF6, 0xF6F7, 0xF7F7, 0xF8F7, - 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, 0xFFF7, 0x00F7, - 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, 0x07F7, 0x08F7, - 0x09F7, 0x0AF7, 0xF6F8, 0xF7F8, 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, - 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, 0x00F8, 0x01F8, 0x02F8, 0x03F8, - 0x04F8, 0x05F8, 0x06F8, 0x07F8, 0x08F8, 0x09F8, 0x0AF8, 0xF6F9, - 0xF7F9, 0xF8F9, 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, - 0xFFF9, 0x00F9, 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, - 0x07F9, 0x08F9, 0x09F9, 0x0AF9, 0xF6FA, 0xF7FA, 0xF8FA, 0xF9FA, - 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, - 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0x08FA, 0x09FA, - 0x0AFA, 0xF6FB, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, 0xFBFB, 0xFCFB, - 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, 0x03FB, 0x04FB, - 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0x0AFB, 0xF6FC, 0xF7FC, - 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, - 0x00FC, 0x01FC, 0x02FC, 0x03FC, 0x04FC, 0x05FC, 0x06FC, 0x07FC, - 0x08FC, 0x09FC, 0x0AFC, 0xF6FD, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, - 0xFBFD, 0xFCFD, 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, - 0x03FD, 0x04FD, 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0x0AFD, - 0xF6FE, 0xF7FE, 0xF8FE, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, - 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, - 0x06FE, 0x07FE, 0x08FE, 0x09FE, 0x0AFE, 0xF6FF, 0xF7FF, 0xF8FF, - 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, 0xFFFF, 0x00FF, - 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, 0x07FF, 0x08FF, - 0x09FF, 0x0AFF, 0xF600, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, - 0xFC00, 0xFD00, 0xFE00, 0xFF00, 0x0000, 0x0100, 0x0200, 0x0300, - 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0A00, 0xF601, - 0xF701, 0xF801, 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, - 0xFF01, 0x0001, 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, - 0x0701, 0x0801, 0x0901, 0x0A01, 0xF602, 0xF702, 0xF802, 0xF902, - 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, - 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0x0802, 0x0902, - 0x0A02, 0xF603, 0xF703, 0xF803, 0xF903, 0xFA03, 0xFB03, 0xFC03, - 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, 0x0303, 0x0403, - 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0x0A03, 0xF604, 0xF704, - 0xF804, 0xF904, 0xFA04, 0xFB04, 0xFC04, 0xFD04, 0xFE04, 0xFF04, - 0x0004, 0x0104, 0x0204, 0x0304, 0x0404, 0x0504, 0x0604, 0x0704, - 0x0804, 0x0904, 0x0A04, 0xF605, 0xF705, 0xF805, 0xF905, 0xFA05, - 0xFB05, 0xFC05, 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, - 0x0305, 0x0405, 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0x0A05, - 0xF606, 0xF706, 0xF806, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, - 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, - 0x0606, 0x0706, 0x0806, 0x0906, 0x0A06, 0xF607, 0xF707, 0xF807, - 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, 0xFF07, 0x0007, - 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, 0x0707, 0x0807, - 0x0907, 0x0A07, 0xF608, 0xF708, 0xF808, 0xF908, 0xFA08, 0xFB08, - 0xFC08, 0xFD08, 0xFE08, 0xFF08, 0x0008, 0x0108, 0x0208, 0x0308, - 0x0408, 0x0508, 0x0608, 0x0708, 0x0808, 0x0908, 0x0A08, 0xF609, - 0xF709, 0xF809, 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, - 0xFF09, 0x0009, 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, - 0x0709, 0x0809, 0x0909, 0x0A09, 0xF60A, 0xF70A, 0xF80A, 0xF90A, - 0xFA0A, 0xFB0A, 0xFC0A, 0xFD0A, 0xFE0A, 0xFF0A, 0x000A, 0x010A, - 0x020A, 0x030A, 0x040A, 0x050A, 0x060A, 0x070A, 0x080A, 0x090A, - 0x0A0A, 0x0B0B, + 0x0000, 0x00FF, 0x0001, 0xFF00, 0x0100, 0xFFFF, 0x01FF, 0xFF01, 0x0101, + 0x0B0B, 0xFE00, 0x0200, 0xFEFF, 0x02FF, 0xFE01, 0x0201, 0x0002, 0x00FE, + 0x00FC, 0x0003, 0x0004, 0x00FD, 0x0005, 0x00FB, 0xFDFF, 0x03FF, 0xFD01, + 0x0301, 0xFFFC, 0x01FC, 0xFF03, 0x0103, 0xFF04, 0x0104, 0xFFFD, 0x01FD, + 0xFD00, 0x0300, 0xFF02, 0x0102, 0xFFFE, 0x01FE, 0xFC00, 0x0400, 0xFEFC, + 0x02FC, 0xFE03, 0x0203, 0xFE04, 0x0204, 0xFEFD, 0x02FD, 0xFCFF, 0x04FF, + 0xFC01, 0x0401, 0xFE02, 0x0202, 0xFEFE, 0x02FE, 0xFD02, 0x0302, 0xFDFE, + 0x03FE, 0xFDFC, 0x03FC, 0xFD03, 0x0303, 0xFD04, 0x0304, 0xFDFD, 0x03FD, + 0xFF05, 0x0105, 0xFFFB, 0x01FB, 0x0006, 0x00FA, 0xFBFF, 0x05FF, 0xFB01, + 0x0501, 0xFAFF, 0x06FF, 0xFA01, 0x0601, 0x000A, 0xFF06, 0x0106, 0xFFFA, + 0x01FA, 0xFE05, 0x0205, 0xFB00, 0x0500, 0xFEFB, 0x02FB, 0xFE06, 0x0206, + 0xFEFA, 0x02FA, 0xFC02, 0x0402, 0xFCFE, 0x04FE, 0xFA00, 0x0600, 0xFCFC, + 0xFC03, 0x04FC, 0x0403, 0xFC04, 0xFCFD, 0x0404, 0x04FD, 0xFB02, 0x0502, + 0xFBFE, 0x05FE, 0xFD05, 0x0305, 0xFDFB, 0x03FB, 0x00F7, 0x00F9, 0x00F6, + 0x0007, 0x0009, 0xFA02, 0xFBFC, 0x0602, 0xFB03, 0x05FC, 0x0503, 0xFB04, + 0xFBFD, 0x0504, 0x05FD, 0xFAFE, 0x06FE, 0xF9FF, 0x07FF, 0xF901, 0x0701, + 0xFC05, 0x0405, 0xFCFB, 0x04FB, 0xFAFC, 0xFA03, 0x06FC, 0x0603, 0xFFF9, + 0xFA04, 0x01F9, 0xFAFD, 0x0604, 0xFB05, 0x06FD, 0x0505, 0xFF07, 0x0107, + 0xFBFB, 0x05FB, 0xFC06, 0xFD06, 0x0306, 0x0406, 0xFCFA, 0xFDFA, 0x03FA, + 0x04FA, 0xF9FC, 0x01F7, 0xF903, 0x07FC, 0x0703, 0xF904, 0xF9FD, 0x0704, + 0x07FD, 0xFB06, 0x0506, 0xFBFA, 0x05FA, 0xFF09, 0x0109, 0xFFF7, 0xF900, + 0x0700, 0xF8FF, 0x08FF, 0xF801, 0x0801, 0xFEF9, 0x02F9, 0xFA06, 0x0606, + 0xFAFA, 0xFE07, 0x06FA, 0xF800, 0x0800, 0x0207, 0xF8FC, 0xF803, 0x08FC, + 0x0803, 0xF804, 0xF8FD, 0x0804, 0x08FD, 0xFF08, 0x0108, 0xFFF8, 0xF700, + 0x00F8, 0x01F8, 0x0900, 0x0008, 0xF902, 0x0702, 0xF9FE, 0x07FE, 0xFDF9, + 0x03F9, 0x0307, 0xFD07, 0xF7FF, 0x09FF, 0xF701, 0x0901, 0xFA05, 0x0605, + 0xFAFB, 0x06FB, 0xFBF9, 0xFCF9, 0x04F9, 0x05F9, 0x0507, 0xFB07, 0x0407, + 0xFC07, 0xFE09, 0x02F7, 0x0209, 0xF600, 0x0A00, 0xFEF7, 0x0802, 0x0705, + 0xF905, 0xFFF6, 0xF8FE, 0x08FE, 0x01F6, 0x010A, 0xF9FB, 0xFF0A, 0x07FB, + 0xF802, 0x03F7, 0x0309, 0xFD09, 0xFDF7, 0x0607, 0x0902, 0xFAF9, 0x0409, + 0x04F7, 0x06F9, 0xF7FE, 0x09FE, 0xFA07, 0xFC09, 0xFCF7, 0xF702, 0xF705, + 0x07FA, 0xF9F9, 0x0707, 0xF7FB, 0x07F9, 0x0805, 0x0A05, 0xF805, 0xF906, + 0x0706, 0xF9FA, 0xF907, 0xF605, 0x0905, 0xF6FB, 0xF8FB, 0x08FB, 0x09FB, + 0x0AFB, 0xFE08, 0x0509, 0xFEF6, 0x020A, 0xF6FF, 0xFD08, 0x0308, 0xFDF8, + 0xFB09, 0x0208, 0x0AFF, 0xFE0A, 0x02F8, 0xFBF7, 0x02F6, 0x03F8, 0xFEF8, + 0xF601, 0x05F7, 0x0A01, 0xFB08, 0xF7FC, 0x0904, 0xF703, 0x0A04, 0x09FC, + 0x0AFC, 0x0903, 0xF604, 0x0608, 0x09FD, 0xFCF8, 0xFAF8, 0xF7FD, 0x05F8, + 0xFA08, 0x0508, 0xF704, 0xF603, 0xFC08, 0x0A03, 0xF6FC, 0x04F8, 0xFBF8, + 0x06F8, 0xF6FD, 0x0408, 0x0AFD, 0xF706, 0x08F9, 0xF908, 0xF8F9, 0x040A, + 0xF602, 0x0A02, 0x0708, 0x08FA, 0xFDF6, 0x0AFE, 0xF806, 0xFCF6, 0xF7FA, + 0x0906, 0xFC0A, 0x0807, 0x07F8, 0xF6FE, 0x03F6, 0x030A, 0x09FA, 0xF8FA, + 0xF9F8, 0xFD0A, 0x0806, 0xF807, 0x04F6, 0xF7F9, 0xF707, 0xFBF6, 0x09F9, + 0x05F6, 0xFB0A, 0x0907, 0x050A, 0xF6F9, 0x0AF9, 0x0A07, 0xF607, 0xF909, + 0xF8F6, 0xF70A, 0x09F6, 0xFA09, 0x07F7, 0x0609, 0x070A, 0xFAF7, 0x06F7, + 0xF90A, 0xFA0A, 0x090A, 0xFAF6, 0xF9F6, 0xF7F6, 0x080A, 0xF80A, 0x06F6, + 0xF9F7, 0x07F6, 0x0709, 0x060A, 0x08F6, 0x0909, 0x09F8, 0xF7F7, 0x08F8, + 0xF8F8, 0xF709, 0x0809, 0x0808, 0xF808, 0x0908, 0xF7F8, 0xF8F7, 0x08F7, + 0xF708, 0x09F7, 0xF809, 0x0AFA, 0xF60A, 0x0A06, 0x0AF6, 0xF609, 0xF6F7, + 0xF6FA, 0x0A09, 0x0AF7, 0xF6F8, 0x0A0A, 0x0AF8, 0xF606, 0x0A08, 0xF608, + 0xF6F6, }; static const uint8_t clv_biasy_1_bits[] = { - 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 13, - 13, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, - 8, 8, 7, 7, 5, 2, 1, 3, 5, 7, 7, 8, 9, 9, 10, 10, - 10, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, - 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 12, -}; - -static const uint16_t clv_biasy_1_codes[] = { - 0xFFFE, 0x7FFE, 0x7FFC, 0x7FFA, 0x7FF6, 0x7FF7, 0x7FF3, 0x7FF2, - 0x7FEF, 0x7FEE, 0x3FF5, 0x3FF3, 0x3FF1, 0x1FF7, 0x1FF5, 0x1FF2, - 0x1FF0, 0x1FEE, 0x1FEC, 0x1FEA, 0x1FE8, 0x0FF2, 0x0FF0, 0x0FEE, - 0x0FEB, 0x07F4, 0x07F3, 0x07F1, 0x03F7, 0x03F5, 0x03F3, 0x01F7, - 0x00FA, 0x00F8, 0x007A, 0x0078, 0x001C, 0x0002, 0x0000, 0x0006, - 0x001D, 0x0079, 0x007B, 0x00F9, 0x01F6, 0x01F8, 0x03F2, 0x03F4, - 0x03F6, 0x07F0, 0x07F2, 0x0FEA, 0x0FEC, 0x0FEF, 0x0FF1, 0x0FF3, - 0x1FE9, 0x1FEB, 0x1FED, 0x1FEF, 0x1FF1, 0x1FF3, 0x1FF4, 0x1FF6, - 0x3FF0, 0x3FF2, 0x3FF4, 0x3FF6, 0x7FF0, 0x7FF1, 0x7FF4, 0x7FF8, - 0x7FF5, 0x7FF9, 0x7FFB, 0x7FFD, 0xFFFF, 0x0FED, + 1, 2, 3, 5, 5, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, + 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, + 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 16, 16 }; static const uint16_t clv_biasy_1_syms[] = { - 0xFF68, 0xFF6C, 0xFF70, 0xFF74, 0xFF78, 0xFF7C, 0xFF80, 0xFF84, - 0xFF88, 0xFF8C, 0xFF90, 0xFF94, 0xFF98, 0xFF9C, 0xFFA0, 0xFFA4, - 0xFFA8, 0xFFAC, 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, - 0xFFC8, 0xFFCC, 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, - 0xFFE8, 0xFFEC, 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, - 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, - 0x0028, 0x002C, 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, - 0x0048, 0x004C, 0x0050, 0x0054, 0x0058, 0x005C, 0x0060, 0x0064, - 0x0068, 0x006C, 0x0070, 0x0074, 0x0078, 0x007C, 0x0080, 0x0084, - 0x0088, 0x008C, 0x0090, 0x0094, 0x0098, 0x0100, + 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, + 0xFFEC, 0x0014, 0xFFE8, 0x0018, 0xFFE4, 0x001C, 0x0020, 0xFFE0, 0x0024, + 0xFFDC, 0x0028, 0xFFD8, 0x002C, 0xFFD4, 0x0030, 0xFFD0, 0xFFCC, 0x0034, + 0xFFC8, 0x0038, 0x0100, 0xFFC4, 0x003C, 0xFFC0, 0x0040, 0xFFBC, 0x0044, + 0xFFB8, 0x0048, 0xFFB4, 0x004C, 0xFFB0, 0x0050, 0xFFAC, 0x0054, 0xFFA8, + 0x0058, 0xFFA4, 0x005C, 0x0060, 0xFFA0, 0x0064, 0xFF9C, 0x0068, 0xFF98, + 0x006C, 0xFF94, 0x0070, 0xFF90, 0x0074, 0xFF8C, 0xFF88, 0x0078, 0x007C, + 0xFF84, 0xFF80, 0x0080, 0x0088, 0xFF78, 0xFF7C, 0x0084, 0x008C, 0xFF74, + 0x0090, 0xFF70, 0x0094, 0xFF6C, 0xFF68, 0x0098, }; static const uint8_t clv_biasy_2_bits[] = { - 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, 12, 11, - 11, 11, 10, 10, 10, 10, 9, 9, 8, 8, 8, 7, 6, 6, 4, 3, - 1, 3, 4, 6, 6, 7, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, - 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, - 16, 15, -}; - -static const uint16_t clv_biasy_2_codes[] = { - 0xFFFE, 0xFFFC, 0xFFFA, 0xFFF9, 0xFFF6, 0xFFF5, 0xFFF3, 0x7FF7, - 0x7FF5, 0x7FF1, 0x7FF3, 0x7FF0, 0x7FEE, 0x7FEC, 0x7FE9, 0x7FE6, - 0x7FE4, 0x7FE2, 0x3FEF, 0x3FEE, 0x3FEC, 0x3FEA, 0x1FF2, 0x1FF1, - 0x1FEF, 0x1FED, 0x0FF4, 0x0FF3, 0x0FF1, 0x0FEF, 0x0FED, 0x07F4, - 0x07F3, 0x07F1, 0x03F6, 0x03F4, 0x03F2, 0x03F0, 0x01F6, 0x01F4, - 0x00F8, 0x00F6, 0x00F4, 0x0078, 0x003A, 0x0038, 0x000C, 0x0004, - 0x0000, 0x0005, 0x000D, 0x0039, 0x003B, 0x0079, 0x00F5, 0x00F7, - 0x00F9, 0x01F5, 0x01F7, 0x03F1, 0x03F3, 0x03F5, 0x03F7, 0x07F0, - 0x07F2, 0x07F5, 0x0FEC, 0x0FEE, 0x0FF0, 0x0FF2, 0x0FF5, 0x1FEC, - 0x1FEE, 0x1FF0, 0x1FF3, 0x1FF4, 0x3FEB, 0x3FED, 0x3FF0, 0x7FE3, - 0x7FE5, 0x7FE7, 0x7FEA, 0x7FEB, 0x7FED, 0x7FEF, 0x7FF4, 0x7FF2, - 0x7FF6, 0x7FF8, 0xFFF2, 0xFFF4, 0xFFF7, 0xFFF8, 0xFFFB, 0xFFFD, - 0xFFFF, 0x7FE8, + 1, 3, 3, 4, 4, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, + 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16 }; static const uint16_t clv_biasy_2_syms[] = { - 0xFF40, 0xFF44, 0xFF48, 0xFF4C, 0xFF50, 0xFF54, 0xFF58, 0xFF5C, - 0xFF60, 0xFF64, 0xFF68, 0xFF6C, 0xFF70, 0xFF74, 0xFF78, 0xFF7C, - 0xFF80, 0xFF84, 0xFF88, 0xFF8C, 0xFF90, 0xFF94, 0xFF98, 0xFF9C, - 0xFFA0, 0xFFA4, 0xFFA8, 0xFFAC, 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, - 0xFFC0, 0xFFC4, 0xFFC8, 0xFFCC, 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, - 0xFFE0, 0xFFE4, 0xFFE8, 0xFFEC, 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, - 0x0000, 0x0004, 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, - 0x0020, 0x0024, 0x0028, 0x002C, 0x0030, 0x0034, 0x0038, 0x003C, - 0x0040, 0x0044, 0x0048, 0x004C, 0x0050, 0x0054, 0x0058, 0x005C, - 0x0060, 0x0064, 0x0068, 0x006C, 0x0070, 0x0074, 0x0078, 0x007C, - 0x0080, 0x0084, 0x0088, 0x008C, 0x0090, 0x0094, 0x0098, 0x009C, - 0x00A0, 0x00A4, 0x00A8, 0x00AC, 0x00B0, 0x00B4, 0x00B8, 0x00BC, - 0x00C0, 0x0100, + 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, + 0xFFEC, 0x0014, 0xFFE8, 0x0018, 0xFFE4, 0x001C, 0xFFE0, 0x0020, 0xFFDC, + 0x0024, 0xFFD8, 0x0028, 0xFFD4, 0x002C, 0xFFD0, 0x0030, 0xFFCC, 0x0034, + 0xFFC8, 0x0038, 0x003C, 0xFFC4, 0x0040, 0xFFC0, 0xFFBC, 0x0044, 0x0048, + 0xFFB8, 0x004C, 0xFFB4, 0x0050, 0xFFB0, 0x0054, 0xFFAC, 0xFFA8, 0x0058, + 0x005C, 0xFFA4, 0x0060, 0xFFA0, 0x0064, 0xFF9C, 0xFF98, 0x0068, 0x006C, + 0xFF94, 0x0070, 0xFF90, 0x0074, 0xFF8C, 0xFF88, 0x0078, 0xFF84, 0x007C, + 0xFF80, 0x0080, 0xFF7C, 0x0084, 0x0100, 0xFF78, 0x0088, 0x008C, 0xFF74, + 0x0090, 0xFF70, 0x0094, 0xFF6C, 0xFF64, 0x009C, 0xFF68, 0x0098, 0xFF60, + 0x00A0, 0xFF5C, 0x00A4, 0x00A8, 0xFF58, 0x00AC, 0xFF54, 0xFF50, 0x00B0, + 0x00B4, 0xFF4C, 0xFF48, 0x00B8, 0xFF44, 0x00BC, 0xFF40, 0x00C0, }; static const uint8_t clv_biasy_3_bits[] = { - 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, - 14, 14, 13, 13, 13, 13, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, - 10, 9, 9, 9, 9, 8, 8, 7, 7, 6, 5, 4, 4, 2, 2, 3, - 4, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, - 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 15, -}; - -static const uint16_t clv_biasy_3_codes[] = { - 0xFFFF, 0xFFFC, 0xFFFA, 0x7FFC, 0x7FF9, 0x7FF6, 0x7FF4, 0x7FF2, - 0x7FF1, 0x7FEF, 0x7FEC, 0x7FEB, 0x7FE9, 0x3FF3, 0x3FF0, 0x3FEE, - 0x3FED, 0x3FEA, 0x1FF3, 0x1FF2, 0x1FF0, 0x1FEE, 0x0FF4, 0x0FF3, - 0x0FF1, 0x07F7, 0x07F5, 0x07F3, 0x07F1, 0x03F7, 0x03F4, 0x03F2, - 0x03F0, 0x01F6, 0x01F4, 0x01F2, 0x01F0, 0x00F6, 0x00F4, 0x0078, - 0x0076, 0x0039, 0x001B, 0x000C, 0x000A, 0x0001, 0x0000, 0x0004, - 0x000B, 0x001A, 0x0038, 0x003A, 0x0077, 0x0079, 0x00F5, 0x00F7, - 0x01F1, 0x01F3, 0x01F5, 0x01F7, 0x03F1, 0x03F3, 0x03F5, 0x03F6, - 0x07F0, 0x07F2, 0x07F4, 0x07F6, 0x0FF0, 0x0FF2, 0x0FF5, 0x0FF6, - 0x1FEF, 0x1FF1, 0x1FF4, 0x3FEB, 0x3FEC, 0x3FEF, 0x3FF1, 0x3FF2, - 0x7FE8, 0x7FEA, 0x7FED, 0x7FEE, 0x7FF0, 0x7FF3, 0x7FF5, 0x7FF7, - 0x7FFA, 0x7FFB, 0xFFFB, 0xFFFD, 0xFFFE, 0x7FF8, + 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, + 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16 }; static const uint16_t clv_biasy_3_syms[] = { - 0xFF48, 0xFF4C, 0xFF50, 0xFF54, 0xFF58, 0xFF5C, 0xFF60, 0xFF64, - 0xFF68, 0xFF6C, 0xFF70, 0xFF74, 0xFF78, 0xFF7C, 0xFF80, 0xFF84, - 0xFF88, 0xFF8C, 0xFF90, 0xFF94, 0xFF98, 0xFF9C, 0xFFA0, 0xFFA4, - 0xFFA8, 0xFFAC, 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, - 0xFFC8, 0xFFCC, 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, - 0xFFE8, 0xFFEC, 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, - 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, - 0x0028, 0x002C, 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, - 0x0048, 0x004C, 0x0050, 0x0054, 0x0058, 0x005C, 0x0060, 0x0064, - 0x0068, 0x006C, 0x0070, 0x0074, 0x0078, 0x007C, 0x0080, 0x0084, - 0x0088, 0x008C, 0x0090, 0x0094, 0x0098, 0x009C, 0x00A0, 0x00A4, - 0x00A8, 0x00AC, 0x00B0, 0x00B4, 0x00B8, 0x0100, + 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, + 0xFFEC, 0x0014, 0xFFE8, 0x0018, 0xFFE4, 0x001C, 0xFFE0, 0x0020, 0xFFDC, + 0x0024, 0xFFD8, 0x0028, 0xFFD4, 0x002C, 0xFFD0, 0x0030, 0xFFCC, 0x0034, + 0xFFC8, 0x0038, 0xFFC4, 0x003C, 0xFFC0, 0x0040, 0x0044, 0xFFBC, 0x0048, + 0xFFB8, 0x004C, 0xFFB4, 0x0050, 0xFFB0, 0x0054, 0xFFAC, 0x0058, 0xFFA8, + 0x005C, 0xFFA4, 0xFFA0, 0x0060, 0x0064, 0xFF9C, 0x0068, 0xFF98, 0x006C, + 0xFF94, 0xFF90, 0x0070, 0xFF8C, 0x0074, 0x0078, 0xFF88, 0xFF84, 0x007C, + 0xFF80, 0x0080, 0x0084, 0xFF7C, 0x0088, 0xFF78, 0x008C, 0xFF74, 0xFF70, + 0x0090, 0x0094, 0xFF6C, 0x0098, 0xFF68, 0xFF64, 0x009C, 0xFF60, 0x00A0, + 0xFF5C, 0x00A4, 0x0100, 0xFF58, 0x00A8, 0x00AC, 0xFF54, 0xFF50, 0x00B0, + 0xFF4C, 0x00B4, 0x00B8, 0xFF48, }; static const uint8_t clv_biasu_1_bits[] = { - 16, 15, 14, 13, 13, 13, 12, 12, 12, 12, 11, 10, 10, 9, 9, 8, - 7, 6, 5, 2, 1, 3, 5, 7, 7, 8, 9, 9, 10, 10, 11, 12, - 12, 12, 12, 13, 13, 13, 14, 15, 15, 16, -}; - -static const uint16_t clv_biasu_1_codes[] = { - 0xFFFE, 0x7FFC, 0x3FFC, 0x1FFC, 0x1FFA, 0x1FF9, 0x0FFA, 0x0FF7, - 0x0FF8, 0x0FF5, 0x07F8, 0x03FA, 0x03F8, 0x01FA, 0x01F9, 0x00FA, - 0x007B, 0x003C, 0x001C, 0x0002, 0x0000, 0x0006, 0x001D, 0x007A, - 0x007C, 0x00FB, 0x01F8, 0x01FB, 0x03F9, 0x03FB, 0x07F9, 0x0FF4, - 0x0FF6, 0x0FF9, 0x0FFB, 0x1FF8, 0x1FFB, 0x1FFD, 0x3FFD, 0x7FFD, - 0x7FFE, 0xFFFF, + 1, 2, 3, 5, 5, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, + 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, + 15, 15, 16, 16 }; static const uint16_t clv_biasu_1_syms[] = { - 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, 0xFFC8, 0xFFCC, - 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, 0xFFE8, 0xFFEC, - 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, 0x0008, 0x000C, - 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, 0x0028, 0x002C, - 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, 0x0048, 0x004C, - 0x0050, 0x0100, + 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, + 0xFFEC, 0x0014, 0x0018, 0xFFE8, 0xFFE4, 0x001C, 0xFFE0, 0x0020, 0xFFDC, + 0x0024, 0xFFD8, 0x0028, 0x002C, 0xFFD4, 0x0030, 0xFFCC, 0xFFD0, 0x0034, + 0xFFC8, 0x0038, 0x003C, 0xFFC4, 0xFFC0, 0x0040, 0xFFBC, 0x0044, 0xFFB8, + 0x0048, 0xFFB4, 0x004C, 0x0050, 0xFFB0, 0x0100, }; static const uint8_t clv_biasu_2_bits[] = { - 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 13, 12, 12, 11, 11, 10, - 10, 9, 9, 8, 8, 7, 6, 5, 4, 3, 1, 3, 4, 6, 6, 7, - 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 14, 14, 14, 15, 15, - 15, 16, 16, 16, 16, 14, -}; - -static const uint16_t clv_biasu_2_codes[] = { - 0xFFFC, 0xFFF8, 0xFFFA, 0xFFFD, 0x7FF8, 0x7FFA, 0x7FF7, 0x3FF6, - 0x3FF7, 0x3FF4, 0x1FF9, 0x0FFB, 0x0FF9, 0x07FB, 0x07F9, 0x03FA, - 0x03F8, 0x01FA, 0x01F9, 0x00FB, 0x00F9, 0x007B, 0x003B, 0x001C, - 0x000C, 0x0004, 0x0000, 0x0005, 0x000D, 0x003A, 0x003C, 0x007A, - 0x00F8, 0x00FA, 0x01F8, 0x01FB, 0x03F9, 0x03FB, 0x07F8, 0x07FA, - 0x0FF8, 0x0FFA, 0x1FF8, 0x3FF5, 0x3FF8, 0x3FF9, 0x7FFB, 0x7FF9, - 0x7FF6, 0xFFF9, 0xFFFF, 0xFFFE, 0xFFFB, 0x3FFA, + 1, 3, 3, 4, 4, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, + 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, + 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16 }; static const uint16_t clv_biasu_2_syms[] = { - 0xFF98, 0xFF9C, 0xFFA0, 0xFFA4, 0xFFA8, 0xFFAC, 0xFFB0, 0xFFB4, - 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, 0xFFC8, 0xFFCC, 0xFFD0, 0xFFD4, - 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, 0xFFE8, 0xFFEC, 0xFFF0, 0xFFF4, - 0xFFF8, 0xFFFC, 0x0000, 0x0004, 0x0008, 0x000C, 0x0010, 0x0014, - 0x0018, 0x001C, 0x0020, 0x0024, 0x0028, 0x002C, 0x0030, 0x0034, - 0x0038, 0x003C, 0x0040, 0x0044, 0x0048, 0x004C, 0x0050, 0x0054, - 0x0058, 0x005C, 0x0060, 0x0064, 0x0068, 0x0100, + 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, + 0x0014, 0xFFEC, 0x0018, 0xFFE8, 0x001C, 0xFFE4, 0x0020, 0xFFE0, 0xFFDC, + 0x0024, 0xFFD8, 0x0028, 0xFFD4, 0x002C, 0x0030, 0xFFD0, 0x0034, 0xFFCC, + 0x0038, 0xFFC8, 0x003C, 0xFFC4, 0x0040, 0xFFC0, 0xFFBC, 0x0044, 0xFFB4, + 0xFFB8, 0x0048, 0x004C, 0x0100, 0x0058, 0xFFB0, 0xFFA8, 0x0054, 0xFFAC, + 0x0050, 0xFF9C, 0x005C, 0xFFA0, 0x0068, 0xFF98, 0xFFA4, 0x0064, 0x0060, }; static const uint8_t clv_biasv_1_bits[] = { - 16, 15, 14, 14, 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 9, 8, - 7, 6, 5, 2, 1, 3, 5, 6, 8, 8, 9, 10, 10, 11, 12, 12, - 12, 13, 13, 13, 14, 14, 15, 15, 16, 14, -}; - -static const uint16_t clv_biasv_1_codes[] = { - 0xFFFF, 0x7FFD, 0x3FFD, 0x3FFB, 0x3FF9, 0x1FFB, 0x1FF8, 0x1FF6, - 0x0FFA, 0x0FF8, 0x07FA, 0x07F8, 0x03FA, 0x03F8, 0x01FB, 0x00FB, - 0x007C, 0x003C, 0x001C, 0x0002, 0x0000, 0x0006, 0x001D, 0x003D, - 0x00FA, 0x00FC, 0x01FA, 0x03F9, 0x03FB, 0x07F9, 0x0FF6, 0x0FF7, - 0x0FF9, 0x1FF7, 0x1FF9, 0x1FFA, 0x3FFA, 0x3FFC, 0x7FFC, 0x7FFE, - 0xFFFE, 0x3FF8, + 1, 2, 3, 5, 5, 6, 6, 7, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, + 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, + 15, 15, 16, 16 }; static const uint16_t clv_biasv_1_syms[] = { - 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, 0xFFC8, 0xFFCC, - 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, 0xFFE8, 0xFFEC, - 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, 0x0008, 0x000C, - 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, 0x0028, 0x002C, - 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, 0x0048, 0x004C, - 0x0050, 0x0100, + 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, + 0xFFEC, 0x0014, 0x0018, 0xFFE8, 0xFFE4, 0x001C, 0xFFE0, 0x0020, 0xFFDC, + 0x0024, 0xFFD8, 0x0028, 0x002C, 0xFFD4, 0x0030, 0xFFD0, 0xFFCC, 0x0034, + 0xFFC8, 0x0038, 0x003C, 0xFFC4, 0x0100, 0xFFC0, 0x0040, 0xFFBC, 0x0044, + 0xFFB8, 0x0048, 0xFFB4, 0x004C, 0x0050, 0xFFB0, }; static const uint8_t clv_biasv_2_bits[] = { - 16, 15, 14, 13, 13, 13, 13, 13, 12, 12, 11, 10, 10, 9, 9, 8, - 7, 6, 5, 4, 3, 1, 3, 4, 5, 7, 7, 8, 9, 9, 10, 10, - 10, 12, 12, 13, 13, 13, 13, 13, 14, 16, 15, 15, -}; - -static const uint16_t clv_biasv_2_codes[] = { - 0xFFFE, 0x7FFD, 0x3FFC, 0x1FFC, 0x1FFB, 0x1FF8, 0x1FF7, 0x1FF4, - 0x0FF8, 0x0FF7, 0x07FA, 0x03FB, 0x03F8, 0x01FA, 0x01F9, 0x00FA, - 0x007B, 0x003C, 0x001C, 0x000C, 0x0004, 0x0000, 0x0005, 0x000D, - 0x001D, 0x007A, 0x007C, 0x00FB, 0x01F8, 0x01FB, 0x03F9, 0x03FA, - 0x03FC, 0x0FF6, 0x0FF9, 0x1FF5, 0x1FF9, 0x1FF6, 0x1FFA, 0x1FFD, - 0x3FFD, 0xFFFF, 0x7FFE, 0x7FFC, + 1, 3, 3, 4, 4, 5, 5, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, + 10, 10, 10, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, + 14, 15, 15, 15, 16, 16 }; static const uint16_t clv_biasv_2_syms[] = { - 0xFFAC, 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, 0xFFC8, - 0xFFCC, 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, 0xFFE8, - 0xFFEC, 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, 0x0008, - 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, 0x0028, - 0x002C, 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, 0x0048, - 0x004C, 0x0050, 0x0054, 0x0100, + 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, + 0xFFEC, 0x0014, 0xFFE8, 0x0018, 0x001C, 0xFFE4, 0xFFE0, 0x0020, 0xFFDC, + 0x0024, 0x0028, 0xFFD8, 0x002C, 0xFFD4, 0x0030, 0xFFD0, 0xFFCC, 0x0034, + 0xFFC8, 0x0038, 0x0040, 0xFFC4, 0xFFC0, 0x003C, 0x0044, 0xFFBC, 0xFFB8, + 0x0048, 0xFFB4, 0x004C, 0x0100, 0xFFB0, 0x0054, 0xFFAC, 0x0050 }; #endif /* AVCODEC_CLEARVIDEODATA_H */ From patchwork Tue Nov 10 10:47:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23476 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 CFED4449B06 for ; Tue, 10 Nov 2020 12:49:43 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BBD0468BDF9; Tue, 10 Nov 2020 12:49:43 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 19DC568BDAD for ; Tue, 10 Nov 2020 12:49:34 +0200 (EET) Received: by mail-wr1-f52.google.com with SMTP id s8so5049943wrw.10 for ; Tue, 10 Nov 2020 02:49:34 -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=WmZKPQDS56sVnwTEZktHPtsV2exFCrsm51N5QLYktR8=; b=tU+eAL+Da2sZWbpO+6hgGThbxvdWW1L6xwMtNMItcJMXH8MC03CUqEoe8IlgBfPjHK B8fXKm5Jg0aFsbQchDiKec8dMDO6yxotWAK+FPdS5S9KxA6Df1/mUCtm2w7N29fIqutg c9T4HlOm4CfRb4JMzPHIJ94ffjzehY4ITZpWkEaNpKBac58A/UbEOjSxKVqPZ52RwFOt QzehhDmN1QIXz5IxNp8uH7XgVN/CilsZXNEIWMzp6Mx4yOJGTlwmb+hutnTftHbM8FH3 s2R58yEW56BgpvFqLAGoNQKdmLFyfk3IMTK0bcSe9loM+qGGxwM/voWftP0QYQLJt41I F0Lg== 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=WmZKPQDS56sVnwTEZktHPtsV2exFCrsm51N5QLYktR8=; b=sduxeThiakZ/zdxlc/3v+qZ8+vOd/CMq+GEGcKfrnlT7zyxgmfrwsem39rN4rcLgDE d10Ietl4OK4FboeBSUmy2tZ0P3QOaPC1/AfhF0O9jr6eHynsGginYAFl/V10oM2IIY21 m/pPpUvSiHMdO24QeTti8PsrVbwCUNBaP/V8IiIaxn5ob07hPWKbuvu5JjA9VT5yeXZT SVxydBf+z4oNY+8PXSCoJ1263dXkDwdZ1vn9purB3ojDdFwPmadabRoMsB9j2jzDIUPv CNeTw/RUGIoHlwUmD4D6NypEdv7PDx4t11o7SmP2bddnTw9fBjahNWUsabxNhnNShLr0 HMjw== X-Gm-Message-State: AOAM532/+CC/O3qntdY8vz+qgKsqevmqyfrCb49S35H+Bf0oqvvXjm5/ yL8qnGMgX4i4+DUPN6a9OEm+4rKNFWs= X-Google-Smtp-Source: ABdhPJzW8DFTyVpJuaWrhG3uYtuJED8RJ3H7/lNxa/rhLASOmOYoq8FmOx79T+Q3VYI0daDgtrgcBw== X-Received: by 2002:adf:e5cb:: with SMTP id a11mr22877473wrn.15.1605005373903; Tue, 10 Nov 2020 02:49:33 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:33 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:11 +0100 Message-Id: <20201110104851.321029-15-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 014/114] avcodec/clearvideo: Avoid code duplication when 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/clearvideo.c | 202 +++++++----------------------------- libavcodec/clearvideodata.h | 104 ++++++++++--------- 2 files changed, 90 insertions(+), 216 deletions(-) diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index fd11d88b7a..34d24426ba 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -74,7 +74,7 @@ typedef struct CLVContext { int tile_size; int tile_shift; VLC dc_vlc, ac_vlc; - LevelCodes ylev[4], ulev[3], vlev[3]; + LevelCodes lev[4 + 3 + 3]; // 0..3: Y, 4..6: U, 7..9: V int luma_dc_quant, chroma_dc_quant, ac_quant; DECLARE_ALIGNED(16, int16_t, block)[64]; int top_dc[3], left_dc[4]; @@ -594,7 +594,7 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data, TileInfo *tile; MV mv, cmv; - tile = decode_tile_info(&c->gb, c->ylev, 0); + tile = decode_tile_info(&c->gb, &c->lev[0], 0); // Y if (!tile) return AVERROR(ENOMEM); mv = mvi_predict(&c->mvi, i, j, tile->mv); @@ -609,14 +609,14 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data, cmv.x /= 2; cmv.y /= 2; av_freep(&tile); - tile = decode_tile_info(&c->gb, c->ulev, 0); + tile = decode_tile_info(&c->gb, &c->lev[4], 0); // U if (!tile) return AVERROR(ENOMEM); ret = restore_tree(avctx, c->pic, c->prev, 1, x, y, size, tile, cmv); if (ret < 0) mb_ret = ret; av_freep(&tile); - tile = decode_tile_info(&c->gb, c->vlev, 0); + tile = decode_tile_info(&c->gb, &c->lev[7], 0); // V if (!tile) return AVERROR(ENOMEM); ret = restore_tree(avctx, c->pic, c->prev, 2, x, y, size, tile, cmv); @@ -649,6 +649,7 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data, static av_cold int clv_decode_init(AVCodecContext *avctx) { CLVContext *const c = avctx->priv_data; + static const uint8_t has_flags[] = { 1, 1, 1, 0, 1, 1, 0, 1, 1 }; int ret, w, h; if (avctx->extradata_size == 110) { @@ -704,162 +705,39 @@ static av_cold int clv_decode_init(AVCodecContext *avctx) return ret; } - ret = ff_init_vlc_from_lengths(&c->ylev[0].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsy_0_bits), - clv_flagsy_0_bits, 1, - clv_flagsy_0_syms, 1, 1, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ylev[1].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsy_1_bits), - clv_flagsy_1_bits, 1, - clv_flagsy_1_syms, 1, 1, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ylev[2].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsy_2_bits), - clv_flagsy_2_bits, 1, - clv_flagsy_2_syms, 1, 1, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ulev[0].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsu_0_bits), - clv_flagsu_0_bits, 1, - clv_flagsu_0_syms, 1, 1, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ulev[1].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsu_1_bits), - clv_flagsu_1_bits, 1, - clv_flagsu_1_syms, 1, 1, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->vlev[0].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsv_0_bits), - clv_flagsv_0_bits, 1, - clv_flagsv_0_syms, 1, 1, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->vlev[1].flags_cb, 9, FF_ARRAY_ELEMS(clv_flagsv_1_bits), - clv_flagsv_1_bits, 1, - clv_flagsv_1_syms, 1, 1, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ylev[0].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_0_bits), - clv_mvy_0_bits, 1, - clv_mvy_0_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ylev[1].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_1_bits), - clv_mvy_1_bits, 1, - clv_mvy_1_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ylev[2].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_2_bits), - clv_mvy_2_bits, 1, - clv_mvy_2_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ylev[3].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvy_3_bits), - clv_mvy_3_bits, 1, - clv_mvy_3_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ulev[1].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvu_1_bits), - clv_mvu_1_bits, 1, - clv_mvu_1_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ulev[2].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvu_2_bits), - clv_mvu_2_bits, 1, - clv_mvu_2_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->vlev[1].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvv_1_bits), - clv_mvv_1_bits, 1, - clv_mvv_1_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->vlev[2].mv_cb, 9, FF_ARRAY_ELEMS(clv_mvv_2_bits), - clv_mvv_2_bits, 1, - clv_mvv_2_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ylev[1].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasy_1_bits), - clv_biasy_1_bits, 1, - clv_biasy_1_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ylev[2].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasy_2_bits), - clv_biasy_2_bits, 1, - clv_biasy_2_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ylev[3].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasy_3_bits), - clv_biasy_3_bits, 1, - clv_biasy_3_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ulev[1].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasu_1_bits), - clv_biasu_1_bits, 1, - clv_biasu_1_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->ulev[2].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasu_2_bits), - clv_biasu_2_bits, 1, - clv_biasu_2_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->vlev[1].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasv_1_bits), - clv_biasv_1_bits, 1, - clv_biasv_1_syms, 2, 2, 0, 0); - if (ret) - return ret; - - ret = ff_init_vlc_from_lengths(&c->vlev[2].bias_cb, 9, FF_ARRAY_ELEMS(clv_biasv_2_bits), - clv_biasv_2_bits, 1, - clv_biasv_2_syms, 2, 2, 0, 0); - if (ret) - return ret; - - c->ylev[0].mv_esc = 0x0909; - c->ylev[1].mv_esc = 0x0A0A; - c->ylev[2].mv_esc = 0x1010; - c->ylev[3].mv_esc = 0x1313; - c->ulev[1].mv_esc = 0x0808; - c->ulev[2].mv_esc = 0x0B0B; - c->vlev[1].mv_esc = 0x0808; - c->vlev[2].mv_esc = 0x0B0B; - - c->ylev[1].bias_esc = 0x100; - c->ylev[2].bias_esc = 0x100; - c->ylev[3].bias_esc = 0x100; - c->ulev[1].bias_esc = 0x100; - c->ulev[2].bias_esc = 0x100; - c->vlev[1].bias_esc = 0x100; - c->vlev[2].bias_esc = 0x100; - + for (int i = 0, j = 0;; i++) { + if (clv_mv_escape[i]) { + c->lev[i].mv_esc = clv_mv_escape[i]; + ret = ff_init_vlc_from_lengths(&c->lev[i].mv_cb, 9, clv_mv_sizes[i], + clv_mv_bits[i], 1, + clv_mv_syms[i], 2, 2, 0, 0); + if (ret < 0) + return ret; + } + if (i == FF_ARRAY_ELEMS(has_flags)) + break; + if (has_flags[i]) { + ret = ff_init_vlc_from_lengths(&c->lev[i].flags_cb, 9, 16, + clv_flags_bits[j], 1, + clv_flags_syms[j], 1, 1, 0, 0); + if (ret < 0) + return ret; + + c->lev[i + 1].bias_esc = 0x100; + ret = ff_init_vlc_from_lengths(&c->lev[i + 1].bias_cb, 9, clv_bias_sizes[j], + clv_bias_bits[j], 1, + clv_bias_syms[j], 2, 2, 0, 0); + if (ret < 0) + return ret; + j++; + } + } return 0; } static av_cold int clv_decode_end(AVCodecContext *avctx) { CLVContext *const c = avctx->priv_data; - int i; av_frame_free(&c->prev); av_frame_free(&c->pic); @@ -868,18 +746,10 @@ static av_cold int clv_decode_end(AVCodecContext *avctx) ff_free_vlc(&c->dc_vlc); ff_free_vlc(&c->ac_vlc); - for (i = 0; i < 4; i++) { - ff_free_vlc(&c->ylev[i].mv_cb); - ff_free_vlc(&c->ylev[i].flags_cb); - ff_free_vlc(&c->ylev[i].bias_cb); - } - for (i = 0; i < 3; i++) { - ff_free_vlc(&c->ulev[i].mv_cb); - ff_free_vlc(&c->ulev[i].flags_cb); - ff_free_vlc(&c->ulev[i].bias_cb); - ff_free_vlc(&c->vlev[i].mv_cb); - ff_free_vlc(&c->vlev[i].flags_cb); - ff_free_vlc(&c->vlev[i].bias_cb); + for (int i = 0; i < FF_ARRAY_ELEMS(c->lev); i++) { + ff_free_vlc(&c->lev[i].mv_cb); + ff_free_vlc(&c->lev[i].flags_cb); + ff_free_vlc(&c->lev[i].bias_cb); } return 0; diff --git a/libavcodec/clearvideodata.h b/libavcodec/clearvideodata.h index b4893b3bf7..fa0721cb0c 100644 --- a/libavcodec/clearvideodata.h +++ b/libavcodec/clearvideodata.h @@ -90,60 +90,28 @@ static const uint8_t clv_ac_bits[NUM_AC_CODES] = { 6, 5, 5, 5, 4, 2, 3, 4, 4 }; -static const uint8_t clv_flagsy_0_bits[] = { - 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 7, 7 +static const uint8_t clv_flags_bits[][16] = { + { 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 7, 7 }, // Y_0 + { 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 7, 8, 8 }, // Y_1 + { 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 7, 8, 9, 10, 10 }, // Y_2 + { 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 7, 7, 7, 8, 9, 9 }, // U_0 + { 1, 4, 4, 4, 4, 4, 4, 4, 5, 6, 8, 8, 8, 9, 10, 10 }, // U_1 + { 1, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 10 }, // V_0 + { 1, 3, 4, 4, 4, 4, 5, 5, 5, 6, 7, 8, 9, 10, 11, 11 } // V_1 }; -static const uint8_t clv_flagsy_0_syms[] = { - 15, 0, 3, 5, 12, 1, 10, 2, 4, 8, 7, 11, 14, 6, 9, 13 +static const uint8_t clv_flags_syms[][16] = { + { 15, 0, 3, 5, 12, 1, 10, 2, 4, 8, 7, 11, 14, 6, 9, 13 }, // Y_0 + { 0, 15, 3, 12, 5, 1, 4, 2, 8, 10, 11, 7, 9, 6, 13, 14 }, // Y_1 + { 0, 3, 12, 4, 2, 1, 8, 5, 7, 10, 9, 6, 11, 13, 14, 15 }, // Y_2 + { 0, 15, 3, 12, 1, 10, 2, 5, 4, 8, 11, 7, 14, 13, 9, 6 }, // U_0 + { 0, 2, 12, 3, 4, 1, 8, 5, 10, 7, 9, 6, 11, 14, 13, 15 }, // U_1 + { 0, 15, 1, 12, 3, 10, 2, 5, 8, 4, 11, 14, 6, 9, 7, 13 }, // V_0 + { 0, 8, 3, 4, 2, 1, 12, 5, 10, 7, 9, 6, 14, 11, 13, 15 } // V_1 }; -static const uint8_t clv_flagsy_1_bits[] = { - 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 7, 8, 8 -}; - -static const uint8_t clv_flagsy_1_syms[] = { - 0, 15, 3, 12, 5, 1, 4, 2, 8, 10, 11, 7, 9, 6, 13, 14 -}; - -static const uint8_t clv_flagsy_2_bits[] = { - 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 7, 8, 9, 10, 10 -}; - -static const uint8_t clv_flagsy_2_syms[] = { - 0, 3, 12, 4, 2, 1, 8, 5, 7, 10, 9, 6, 11, 13, 14, 15 -}; - -static const uint8_t clv_flagsu_0_bits[] = { - 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 7, 7, 7, 8, 9, 9 -}; - -static const uint8_t clv_flagsu_0_syms[] = { - 0, 15, 3, 12, 1, 10, 2, 5, 4, 8, 11, 7, 14, 13, 9, 6 -}; - -static const uint8_t clv_flagsu_1_bits[] = { - 1, 4, 4, 4, 4, 4, 4, 4, 5, 6, 8, 8, 8, 9, 10, 10 -}; - -static const uint8_t clv_flagsu_1_syms[] = { - 0, 2, 12, 3, 4, 1, 8, 5, 10, 7, 9, 6, 11, 14, 13, 15 -}; - -static const uint8_t clv_flagsv_0_bits[] = { - 1, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 10 -}; - -static const uint8_t clv_flagsv_0_syms[] = { - 0, 15, 1, 12, 3, 10, 2, 5, 8, 4, 11, 14, 6, 9, 7, 13 -}; - -static const uint8_t clv_flagsv_1_bits[] = { - 1, 3, 4, 4, 4, 4, 5, 5, 5, 6, 7, 8, 9, 10, 11, 11 -}; - -static const uint8_t clv_flagsv_1_syms[] = { - 0, 8, 3, 4, 2, 1, 12, 5, 10, 7, 9, 6, 14, 11, 13, 15 +static const uint16_t clv_mv_escape[] = { + 0x0909, 0x0A0A, 0x1010, 0x1313, 0, 0x0808, 0x0B0B, 0, 0x0808, 0x0B0B }; static const uint8_t clv_mvy_0_bits[] = { @@ -1034,4 +1002,40 @@ static const uint16_t clv_biasv_2_syms[] = { 0x0048, 0xFFB4, 0x004C, 0x0100, 0xFFB0, 0x0054, 0xFFAC, 0x0050 }; +static const uint8_t *const clv_bias_bits[] = { + clv_biasy_1_bits, clv_biasy_2_bits, clv_biasy_3_bits, + clv_biasu_1_bits, clv_biasu_2_bits, + clv_biasv_1_bits, clv_biasv_2_bits +}; + +static const uint16_t *const clv_bias_syms[] = { + clv_biasy_1_syms, clv_biasy_2_syms, clv_biasy_3_syms, + clv_biasu_1_syms, clv_biasu_2_syms, + clv_biasv_1_syms, clv_biasv_2_syms +}; + +static const int clv_bias_sizes[] = { + FF_ARRAY_ELEMS(clv_biasy_1_bits), FF_ARRAY_ELEMS(clv_biasy_2_bits), FF_ARRAY_ELEMS(clv_biasy_3_bits), + FF_ARRAY_ELEMS(clv_biasu_1_bits), FF_ARRAY_ELEMS(clv_biasu_2_bits), + FF_ARRAY_ELEMS(clv_biasv_1_bits), FF_ARRAY_ELEMS(clv_biasv_2_bits) +}; + +static const uint8_t *const clv_mv_bits[] = { + clv_mvy_0_bits, clv_mvy_1_bits, clv_mvy_2_bits, clv_mvy_3_bits, + NULL, clv_mvu_1_bits, clv_mvu_2_bits, + NULL, clv_mvv_1_bits, clv_mvv_2_bits +}; + +static const uint16_t *const clv_mv_syms[] = { + clv_mvy_0_syms, clv_mvy_1_syms, clv_mvy_2_syms, clv_mvy_3_syms, + NULL, clv_mvu_1_syms, clv_mvu_2_syms, + NULL, clv_mvv_1_syms, clv_mvv_2_syms +}; + +static const int clv_mv_sizes[] = { + FF_ARRAY_ELEMS(clv_mvy_0_bits), FF_ARRAY_ELEMS(clv_mvy_1_bits), FF_ARRAY_ELEMS(clv_mvy_2_bits), FF_ARRAY_ELEMS(clv_mvy_3_bits), + 0, FF_ARRAY_ELEMS(clv_mvu_1_bits), FF_ARRAY_ELEMS(clv_mvu_2_bits), + 0, FF_ARRAY_ELEMS(clv_mvv_1_bits), FF_ARRAY_ELEMS(clv_mvv_2_bits) +}; + #endif /* AVCODEC_CLEARVIDEODATA_H */ From patchwork Tue Nov 10 10:47:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23483 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 B225144B1D9 for ; Tue, 10 Nov 2020 12:52:37 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6E1E768BE09; Tue, 10 Nov 2020 12:49:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CEB9668BD8B for ; Tue, 10 Nov 2020 12:49:36 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id j7so4888825wrp.3 for ; Tue, 10 Nov 2020 02:49:36 -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=vU5Q/iCKn4Rj3ScneBf5c+/nvBdBe/btTfw1n0LSRxc=; b=czF5kyFIranWrrSRaiMiCsO9O1YQOM8cv5dxZmEkcQInaBHCHkppI2jQn/cNoeoM5R o5hYlglxpT/ob8OKHyM5JRowegBAFKcq6sGeEpvmgiH5dlYdFSZoF0DEl6qb6m+Brpcv WVW01PE4emgvi3wNWs4qjzEIJQD1dK16uzpiBhKxK+SSxFyl4vN3bE7d322ZUcvdHLAg 8OFqBKh/jyOCVPvdK2y656bZ3FuOgoCyCcHnHf/i2a8EAdnrfb4+6ZPEjBYMztiDWawY RRHw24CySiKjZUFvlFXPxA+6uEuN83YG8CLCTIH7D5ZjRm3iEkonP03tEsQ/a9sc75Vl kKoQ== 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=vU5Q/iCKn4Rj3ScneBf5c+/nvBdBe/btTfw1n0LSRxc=; b=ek527/t8ngcvmk3+8/5lAIz20uWZVKEcqOCi+EOG5VilTxjt5nTk1EORmPUcCM11Tb l18af5mGiD/1gq21hASklMrVX/r/8xKyDJI5D2TEx7I+55pHspjqw/76rOCI5ei34fjl m0fkQZWYjtqgM4KhxuDW2pdRP7BrCxJONWLTe9Mu5HF5mdgUzGq/0fiigr9RLFh1oZxj GFyiCSj/1lZhZWFPehfIDFWEATK+JqKmmEakRL424CRHuGZTUWVEAn1u1Kd/zf1c1zsw 4x9r+9LZpSBsuWXXIPH9DIvlcwP6eOmoWsjNKkxv9BFpQOSw0MI2rwqPFV1OIXSjCK25 ZF/g== X-Gm-Message-State: AOAM532BNmm0ldsOKFwRK1/Z2gLuewo1WsodXCSc+qa1cDPsSledw6SD rZjfTWPthG9461DOSq9IcRvM63BRhwE= X-Google-Smtp-Source: ABdhPJyuXltcnnn0f1b50ouFZQ2dkKXXSwrUuiEzPsK7HK2/kX7hVXO/BNczDloC/+TwsDgEDaWkng== X-Received: by 2002:adf:9b98:: with SMTP id d24mr22679909wrc.17.1605005374978; Tue, 10 Nov 2020 02:49:34 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:34 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:12 +0100 Message-Id: <20201110104851.321029-16-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 015/114] avcodec/clearvideo: Avoid huge VLC length tables 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" After the motion vector and bias values tables have been reordered so that the codes are ordered from left to right, it emerged that the length of these entries are actually ascending for every table. Therefore it is possible to encode them in a run-length style and create the actual length tables during runtime. This commit implements this. Signed-off-by: Andreas Rheinhardt --- libavcodec/clearvideo.c | 34 ++- libavcodec/clearvideodata.h | 413 +++--------------------------------- 2 files changed, 62 insertions(+), 385 deletions(-) diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index 34d24426ba..162dc13ce7 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -646,10 +646,32 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data, return mb_ret < 0 ? mb_ret : buf_size; } +static av_cold int build_vlc(VLC *vlc, const uint8_t counts[16], + const uint16_t **syms) +{ + uint8_t lens[MAX_VLC_ENTRIES]; + unsigned num = 0; + int ret; + + for (int i = 0; i < 16; i++) { + unsigned count = counts[i]; + if (count == 255) /* Special case for Y_3 table */ + count = 303; + for (count += num; num < count; num++) + lens[num] = i + 1; + } + ret = ff_init_vlc_from_lengths(vlc, 9, num, lens, 1, *syms, 2, 2, 0, 0); + if (ret < 0) + return ret; + *syms += num; + return 0; +} + static av_cold int clv_decode_init(AVCodecContext *avctx) { CLVContext *const c = avctx->priv_data; static const uint8_t has_flags[] = { 1, 1, 1, 0, 1, 1, 0, 1, 1 }; + const uint16_t *mv_syms = clv_mv_syms, *bias_syms = clv_bias_syms; int ret, w, h; if (avctx->extradata_size == 110) { @@ -705,14 +727,13 @@ static av_cold int clv_decode_init(AVCodecContext *avctx) return ret; } - for (int i = 0, j = 0;; i++) { + for (int i = 0, j = 0, k = 0;; i++) { if (clv_mv_escape[i]) { c->lev[i].mv_esc = clv_mv_escape[i]; - ret = ff_init_vlc_from_lengths(&c->lev[i].mv_cb, 9, clv_mv_sizes[i], - clv_mv_bits[i], 1, - clv_mv_syms[i], 2, 2, 0, 0); + ret = build_vlc(&c->lev[i].mv_cb, clv_mv_len_counts[k], &mv_syms); if (ret < 0) return ret; + k++; } if (i == FF_ARRAY_ELEMS(has_flags)) break; @@ -724,9 +745,8 @@ static av_cold int clv_decode_init(AVCodecContext *avctx) return ret; c->lev[i + 1].bias_esc = 0x100; - ret = ff_init_vlc_from_lengths(&c->lev[i + 1].bias_cb, 9, clv_bias_sizes[j], - clv_bias_bits[j], 1, - clv_bias_syms[j], 2, 2, 0, 0); + ret = build_vlc(&c->lev[i + 1].bias_cb, + clv_bias_len_counts[j], &bias_syms); if (ret < 0) return ret; j++; diff --git a/libavcodec/clearvideodata.h b/libavcodec/clearvideodata.h index fa0721cb0c..d2c658eb5d 100644 --- a/libavcodec/clearvideodata.h +++ b/libavcodec/clearvideodata.h @@ -24,6 +24,7 @@ #include "libavutil/common.h" +#define MAX_VLC_ENTRIES 1370 #define NUM_DC_CODES 127 #define NUM_AC_CODES 104 @@ -114,26 +115,19 @@ static const uint16_t clv_mv_escape[] = { 0x0909, 0x0A0A, 0x1010, 0x1313, 0, 0x0808, 0x0B0B, 0, 0x0808, 0x0B0B }; -static const uint8_t clv_mvy_0_bits[] = { - 1, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, - 16, 16, 16, 16, 16 +static const uint8_t clv_mv_len_counts[][16] = { + { 1, 0, 0, 2, 2, 6, 13, 6, 14, 28, 38, 38, 58, 56, 20, 8 }, + { 1, 0, 0, 2, 3, 4, 8, 10, 20, 30, 37, 63, 84, 68, 32, 0 }, + { 0, 1, 0, 4, 0, 6, 9, 24, 32, 48, 112, 142, 232, 166, 142, 44 }, + { 0, 1, 0, 2, 2, 6, 9, 16, 40, 82, 146, 228, 191, 255, 244, 100 }, + { 0, 0, 2, 5, 2, 12, 6, 15, 14, 24, 37, 33, 24, 28, 8, 16 }, + { 1, 0, 0, 2, 2, 5, 10, 12, 19, 19, 37, 74, 69, 120, 48, 24 }, + { 0, 0, 2, 3, 8, 7, 8, 8, 23, 37, 30, 36, 28, 16, 12, 8 }, + { 1, 0, 0, 0, 4, 5, 14, 18, 20, 39, 6, 80, 75, 112, 36, 32 }, }; -static const uint16_t clv_mvy_0_syms[] = { +static const uint16_t clv_mv_syms[] = { + /* Y_0 motion vectors - 290 entries */ 0x0000, 0x00FF, 0x0001, 0xFF00, 0x0100, 0x0002, 0x00FE, 0x0909, 0x00FD, 0x0004, 0x00FC, 0x0003, 0x01FF, 0xFF01, 0x0101, 0xFFFF, 0xFE00, 0x0200, 0x0005, 0x00FB, 0x00FA, 0x0006, 0x0007, 0x00F9, 0xFF02, 0x0102, 0xFFFE, @@ -167,32 +161,7 @@ static const uint16_t clv_mvy_0_syms[] = { 0xF8F9, 0x0807, 0x08F9, 0xF805, 0xF904, 0x0704, 0xF9FC, 0x07FC, 0x0806, 0x08FA, 0xF806, 0xF8FA, 0x0804, 0x08FC, 0xF804, 0xF8FC, 0x0808, 0xF8F8, 0x08F8, 0xF808, -}; - -static const uint8_t clv_mvy_1_bits[] = { - 1, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15 -}; - -static const uint16_t clv_mvy_1_syms[] = { + /* Y_1 motion vectors - 362 entries */ 0x0000, 0x00FF, 0x0001, 0xFF00, 0x0100, 0x0A0A, 0xFFFF, 0x01FF, 0xFF01, 0x0101, 0x00FE, 0x0002, 0x0003, 0x00FD, 0x0004, 0x00FC, 0xFE00, 0x0200, 0x0005, 0x00FB, 0x00FA, 0x0006, 0x0007, 0x00F9, 0xFFFE, 0x01FE, 0xFF02, @@ -234,63 +203,7 @@ static const uint16_t clv_mvy_1_syms[] = { 0x0905, 0xF705, 0x09FB, 0xF7FB, 0x09F8, 0xF7F8, 0x0908, 0xF708, 0x08F7, 0xF809, 0xF8F7, 0x0809, 0xF709, 0xF7F7, 0x0909, 0x09F7, 0xF7F9, 0x09F9, 0x0907, 0xF707, -}; - -static const uint8_t clv_mvy_2_bits[] = { - 2, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 -}; - -static const uint16_t clv_mvy_2_syms[] = { + /* Y_2 motion vectors - 962 entries */ 0x0000, 0x0001, 0x00FF, 0xFF00, 0x0100, 0x0002, 0x00FE, 0x0101, 0xFFFF, 0x01FF, 0xFF01, 0x0003, 0x00FD, 0x0004, 0x00FC, 0x1010, 0x0005, 0x00FB, 0xFE00, 0x0200, 0xFF02, 0x0102, 0xFFFE, 0x01FE, 0x00FA, 0x0006, 0x00F9, @@ -398,85 +311,7 @@ static const uint16_t clv_mvy_2_syms[] = { 0x0FF6, 0xF1F6, 0x0FF5, 0x0F0A, 0xF10A, 0xF1F5, 0xF1F3, 0xF10D, 0x0FF3, 0x0F0D, 0x0FFF, 0xF1FF, 0xF101, 0x0F01, 0x0F0F, 0xF1F1, 0x0FF1, 0xF10F, 0x0FF2, 0xF10C, 0x0F0E, 0x0FF4, 0xF1F4, 0xF1F2, 0x0F0C, 0xF10E, -}; - -static const uint8_t clv_mvy_3_bits[] = { - 2, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16 -}; - -static const uint16_t clv_mvy_3_syms[] = { + /* Y_3 motion vectors - 1370 elements */ 0x0000, 0x00FF, 0x0001, 0xFF00, 0x0100, 0x00FE, 0x0002, 0xFFFF, 0x01FF, 0xFF01, 0x0101, 0x00FD, 0x0003, 0x00FC, 0x0004, 0xFE00, 0x0200, 0x0005, 0x00FB, 0x1313, 0xFFFE, 0x01FE, 0xFF02, 0x0102, 0x0006, 0x00FA, 0xFEFF, @@ -630,24 +465,7 @@ static const uint16_t clv_mvy_3_syms[] = { 0x11EE, 0x1112, 0xEFEE, 0x1111, 0xEE11, 0xEEEF, 0x12EF, 0x1211, 0x1212, 0x12EE, 0xEEEE, 0xEE12, 0xEEF1, 0x12F1, 0xEE0F, 0x120F, 0xEE10, 0x1210, 0xEEF0, 0x12F0, -}; - -static const uint8_t clv_mvu_1_bits[] = { - 3, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 -}; - -static const uint16_t clv_mvu_1_syms[] = { + /* U_1 motion vectors - 226 entries */ 0x0001, 0x00FF, 0x0000, 0x0002, 0x00FE, 0x00FD, 0x0003, 0xFF00, 0x0100, 0xFE00, 0x0200, 0x0101, 0xFFFF, 0x01FF, 0xFF01, 0x00FB, 0x0005, 0xFD00, 0x0300, 0xFC00, 0x0400, 0x0004, 0x00FC, 0x0808, 0x00FA, 0x0006, 0x0201, @@ -674,36 +492,7 @@ static const uint16_t clv_mvu_1_syms[] = { 0x0703, 0xF903, 0xF9FD, 0xFB05, 0x0505, 0xFBFB, 0x05FB, 0xFA05, 0x07FB, 0xF9FB, 0x0605, 0x0705, 0x06FB, 0xFAFB, 0xF905, 0xF9F9, 0xF907, 0x07F9, 0x0707, -}; - -static const uint8_t clv_mvu_2_bits[] = { - 1, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16 -}; - -static const uint16_t clv_mvu_2_syms[] = { + /* U_2 motion vectors - 442 entries */ 0x0000, 0xFF00, 0x0100, 0x00FF, 0x0001, 0xFFFF, 0x01FF, 0xFF01, 0x0101, 0x0B0B, 0x0002, 0x00FE, 0xFE00, 0x0200, 0x0003, 0x00FD, 0xFEFF, 0x02FF, 0xFE01, 0x0201, 0xFF02, 0x0102, 0xFFFE, 0x01FE, 0xFD00, 0x0300, 0x00FC, @@ -754,24 +543,7 @@ static const uint16_t clv_mvu_2_syms[] = { 0xF80A, 0x090A, 0xF7F6, 0x0A09, 0x0AF8, 0xF6F6, 0x0AF9, 0xF6F7, 0x0A07, 0x0A0A, 0x0AF7, 0x0AF6, 0xF60A, 0x0A08, 0xF6F9, 0xF609, 0xF607, 0xF6F8, 0xF608, -}; - -static const uint8_t clv_mvv_1_bits[] = { - 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, - 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16 -}; - -static const uint16_t clv_mvv_1_syms[] = { + /* V_1 motion vectors - 226 entries */ 0x0001, 0x00FF, 0x0000, 0xFF00, 0x0100, 0x0002, 0x00FE, 0x00FD, 0x0003, 0x0004, 0x00FC, 0x00FB, 0x0005, 0x0101, 0xFFFF, 0x01FF, 0xFF01, 0xFE00, 0x0200, 0xFD00, 0x0300, 0x0808, 0xFF02, 0x0102, 0xFFFE, 0x01FE, 0xFC00, @@ -798,36 +570,7 @@ static const uint16_t clv_mvv_1_syms[] = { 0xF9FB, 0x0705, 0x07FB, 0xFA06, 0x0606, 0xFA07, 0x0607, 0xFAF9, 0x06F9, 0x06FA, 0xFAFA, 0xF906, 0x07FA, 0xF9FA, 0x0706, 0xF907, 0xF9F9, 0x07F9, 0x0707, -}; - -static const uint8_t clv_mvv_2_bits[] = { - 1, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16 -}; - -static const uint16_t clv_mvv_2_syms[] = { + /* V_2 motion vectors - 442 elements */ 0x0000, 0x00FF, 0x0001, 0xFF00, 0x0100, 0xFFFF, 0x01FF, 0xFF01, 0x0101, 0x0B0B, 0xFE00, 0x0200, 0xFEFF, 0x02FF, 0xFE01, 0x0201, 0x0002, 0x00FE, 0x00FC, 0x0003, 0x0004, 0x00FD, 0x0005, 0x00FB, 0xFDFF, 0x03FF, 0xFD01, @@ -880,15 +623,18 @@ static const uint16_t clv_mvv_2_syms[] = { 0xF6F6, }; -static const uint8_t clv_biasy_1_bits[] = { - 1, 2, 3, 5, 5, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, - 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, - 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 16, 16 +static const uint8_t clv_bias_len_counts[][16] = { + { 1, 1, 1, 0, 2, 0, 4, 3, 3, 6, 5, 10, 16, 7, 17, 2 }, + { 1, 0, 2, 2, 0, 4, 2, 6, 4, 8, 6, 10, 9, 7, 23, 14 }, + { 0, 2, 1, 3, 2, 3, 4, 4, 8, 8, 8, 7, 7, 10, 21, 6 }, + { 1, 1, 1, 0, 2, 1, 3, 2, 4, 4, 2, 8, 6, 2, 3, 2 }, + { 1, 0, 2, 2, 1, 3, 2, 4, 4, 4, 4, 4, 2, 7, 6, 8 }, + { 1, 1, 1, 0, 2, 2, 1, 3, 2, 4, 3, 5, 6, 6, 3, 2 }, + { 1, 0, 2, 2, 2, 1, 3, 2, 4, 5, 1, 4, 10, 2, 3, 2 }, }; -static const uint16_t clv_biasy_1_syms[] = { +static const uint16_t clv_bias_syms[] = { + /* Y_1 bias values - 78 entries */ 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, 0xFFEC, 0x0014, 0xFFE8, 0x0018, 0xFFE4, 0x001C, 0x0020, 0xFFE0, 0x0024, 0xFFDC, 0x0028, 0xFFD8, 0x002C, 0xFFD4, 0x0030, 0xFFD0, 0xFFCC, 0x0034, @@ -898,18 +644,7 @@ static const uint16_t clv_biasy_1_syms[] = { 0x006C, 0xFF94, 0x0070, 0xFF90, 0x0074, 0xFF8C, 0xFF88, 0x0078, 0x007C, 0xFF84, 0xFF80, 0x0080, 0x0088, 0xFF78, 0xFF7C, 0x0084, 0x008C, 0xFF74, 0x0090, 0xFF70, 0x0094, 0xFF6C, 0xFF68, 0x0098, -}; - -static const uint8_t clv_biasy_2_bits[] = { - 1, 3, 3, 4, 4, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, - 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, - 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16 -}; - -static const uint16_t clv_biasy_2_syms[] = { + /* Y_2 bias values - 98 entries */ 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, 0xFFEC, 0x0014, 0xFFE8, 0x0018, 0xFFE4, 0x001C, 0xFFE0, 0x0020, 0xFFDC, 0x0024, 0xFFD8, 0x0028, 0xFFD4, 0x002C, 0xFFD0, 0x0030, 0xFFCC, 0x0034, @@ -921,17 +656,7 @@ static const uint16_t clv_biasy_2_syms[] = { 0x0090, 0xFF70, 0x0094, 0xFF6C, 0xFF64, 0x009C, 0xFF68, 0x0098, 0xFF60, 0x00A0, 0xFF5C, 0x00A4, 0x00A8, 0xFF58, 0x00AC, 0xFF54, 0xFF50, 0x00B0, 0x00B4, 0xFF4C, 0xFF48, 0x00B8, 0xFF44, 0x00BC, 0xFF40, 0x00C0, -}; - -static const uint8_t clv_biasy_3_bits[] = { - 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, - 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, - 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16 -}; - -static const uint16_t clv_biasy_3_syms[] = { + /* Y_3 bias values - 94 entries */ 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, 0xFFEC, 0x0014, 0xFFE8, 0x0018, 0xFFE4, 0x001C, 0xFFE0, 0x0020, 0xFFDC, 0x0024, 0xFFD8, 0x0028, 0xFFD4, 0x002C, 0xFFD0, 0x0030, 0xFFCC, 0x0034, @@ -943,58 +668,26 @@ static const uint16_t clv_biasy_3_syms[] = { 0x0090, 0x0094, 0xFF6C, 0x0098, 0xFF68, 0xFF64, 0x009C, 0xFF60, 0x00A0, 0xFF5C, 0x00A4, 0x0100, 0xFF58, 0x00A8, 0x00AC, 0xFF54, 0xFF50, 0x00B0, 0xFF4C, 0x00B4, 0x00B8, 0xFF48, -}; - -static const uint8_t clv_biasu_1_bits[] = { - 1, 2, 3, 5, 5, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, - 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, - 15, 15, 16, 16 -}; - -static const uint16_t clv_biasu_1_syms[] = { + /* U_1 bias values - 42 entries */ 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, 0xFFEC, 0x0014, 0x0018, 0xFFE8, 0xFFE4, 0x001C, 0xFFE0, 0x0020, 0xFFDC, 0x0024, 0xFFD8, 0x0028, 0x002C, 0xFFD4, 0x0030, 0xFFCC, 0xFFD0, 0x0034, 0xFFC8, 0x0038, 0x003C, 0xFFC4, 0xFFC0, 0x0040, 0xFFBC, 0x0044, 0xFFB8, 0x0048, 0xFFB4, 0x004C, 0x0050, 0xFFB0, 0x0100, -}; - -static const uint8_t clv_biasu_2_bits[] = { - 1, 3, 3, 4, 4, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, - 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, - 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16 -}; - -static const uint16_t clv_biasu_2_syms[] = { + /* U_2 bias values - 54 entries */ 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, 0x0014, 0xFFEC, 0x0018, 0xFFE8, 0x001C, 0xFFE4, 0x0020, 0xFFE0, 0xFFDC, 0x0024, 0xFFD8, 0x0028, 0xFFD4, 0x002C, 0x0030, 0xFFD0, 0x0034, 0xFFCC, 0x0038, 0xFFC8, 0x003C, 0xFFC4, 0x0040, 0xFFC0, 0xFFBC, 0x0044, 0xFFB4, 0xFFB8, 0x0048, 0x004C, 0x0100, 0x0058, 0xFFB0, 0xFFA8, 0x0054, 0xFFAC, 0x0050, 0xFF9C, 0x005C, 0xFFA0, 0x0068, 0xFF98, 0xFFA4, 0x0064, 0x0060, -}; - -static const uint8_t clv_biasv_1_bits[] = { - 1, 2, 3, 5, 5, 6, 6, 7, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, - 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, - 15, 15, 16, 16 -}; - -static const uint16_t clv_biasv_1_syms[] = { + /* V_1 bias values - 42 entries */ 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, 0xFFEC, 0x0014, 0x0018, 0xFFE8, 0xFFE4, 0x001C, 0xFFE0, 0x0020, 0xFFDC, 0x0024, 0xFFD8, 0x0028, 0x002C, 0xFFD4, 0x0030, 0xFFD0, 0xFFCC, 0x0034, 0xFFC8, 0x0038, 0x003C, 0xFFC4, 0x0100, 0xFFC0, 0x0040, 0xFFBC, 0x0044, 0xFFB8, 0x0048, 0xFFB4, 0x004C, 0x0050, 0xFFB0, -}; - -static const uint8_t clv_biasv_2_bits[] = { - 1, 3, 3, 4, 4, 5, 5, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, - 10, 10, 10, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, - 14, 15, 15, 15, 16, 16 -}; - -static const uint16_t clv_biasv_2_syms[] = { + /* V_2 bias values - 44 entries */ 0x0000, 0xFFFC, 0x0004, 0xFFF8, 0x0008, 0xFFF4, 0x000C, 0xFFF0, 0x0010, 0xFFEC, 0x0014, 0xFFE8, 0x0018, 0x001C, 0xFFE4, 0xFFE0, 0x0020, 0xFFDC, 0x0024, 0x0028, 0xFFD8, 0x002C, 0xFFD4, 0x0030, 0xFFD0, 0xFFCC, 0x0034, @@ -1002,40 +695,4 @@ static const uint16_t clv_biasv_2_syms[] = { 0x0048, 0xFFB4, 0x004C, 0x0100, 0xFFB0, 0x0054, 0xFFAC, 0x0050 }; -static const uint8_t *const clv_bias_bits[] = { - clv_biasy_1_bits, clv_biasy_2_bits, clv_biasy_3_bits, - clv_biasu_1_bits, clv_biasu_2_bits, - clv_biasv_1_bits, clv_biasv_2_bits -}; - -static const uint16_t *const clv_bias_syms[] = { - clv_biasy_1_syms, clv_biasy_2_syms, clv_biasy_3_syms, - clv_biasu_1_syms, clv_biasu_2_syms, - clv_biasv_1_syms, clv_biasv_2_syms -}; - -static const int clv_bias_sizes[] = { - FF_ARRAY_ELEMS(clv_biasy_1_bits), FF_ARRAY_ELEMS(clv_biasy_2_bits), FF_ARRAY_ELEMS(clv_biasy_3_bits), - FF_ARRAY_ELEMS(clv_biasu_1_bits), FF_ARRAY_ELEMS(clv_biasu_2_bits), - FF_ARRAY_ELEMS(clv_biasv_1_bits), FF_ARRAY_ELEMS(clv_biasv_2_bits) -}; - -static const uint8_t *const clv_mv_bits[] = { - clv_mvy_0_bits, clv_mvy_1_bits, clv_mvy_2_bits, clv_mvy_3_bits, - NULL, clv_mvu_1_bits, clv_mvu_2_bits, - NULL, clv_mvv_1_bits, clv_mvv_2_bits -}; - -static const uint16_t *const clv_mv_syms[] = { - clv_mvy_0_syms, clv_mvy_1_syms, clv_mvy_2_syms, clv_mvy_3_syms, - NULL, clv_mvu_1_syms, clv_mvu_2_syms, - NULL, clv_mvv_1_syms, clv_mvv_2_syms -}; - -static const int clv_mv_sizes[] = { - FF_ARRAY_ELEMS(clv_mvy_0_bits), FF_ARRAY_ELEMS(clv_mvy_1_bits), FF_ARRAY_ELEMS(clv_mvy_2_bits), FF_ARRAY_ELEMS(clv_mvy_3_bits), - 0, FF_ARRAY_ELEMS(clv_mvu_1_bits), FF_ARRAY_ELEMS(clv_mvu_2_bits), - 0, FF_ARRAY_ELEMS(clv_mvv_1_bits), FF_ARRAY_ELEMS(clv_mvv_2_bits) -}; - #endif /* AVCODEC_CLEARVIDEODATA_H */ From patchwork Tue Nov 10 10:47:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23477 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 8D24E449B06 for ; Tue, 10 Nov 2020 12:49:44 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 789EA68BE03; Tue, 10 Nov 2020 12:49:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C8E4D68BB3A for ; Tue, 10 Nov 2020 12:49:36 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id b8so12145983wrn.0 for ; Tue, 10 Nov 2020 02:49:36 -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=zpH0i6OAVPOCc0vsVvLBSUDqLFu7MRqi/UiHqyfF4As=; b=ezThJeEZbnKzMn0BWyE6EASJoLKYUPqiwyPVFYGDGsof8Y3Sxzxusa9lakTbsPyt23 bvYSQfqP3b2sO/8829Z7iCaxfVTtcBRQLBs2IAMJnjAOhdheFxuiCmyzCJOCjJ+dmoWn ve1mxctHiJhpNfNFYA5WoET75Lbo8LAwaYldFjufOUkC7Rlgw2PO4TKWr9qQFr5GgA7H zdmLgXCa43LIqfe/0Q+bVqdWjXuJD4vvngy2XgidQe+hftxjwLrFiIvMf1B+w/pvTcOG cWovOnVa7ZQzVPOvnyZFKTzzrRBWnZ3eum9nz/DMY7jJv951ymQhh0AXwSH9AZzlo62Y DreA== 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=zpH0i6OAVPOCc0vsVvLBSUDqLFu7MRqi/UiHqyfF4As=; b=NgxRUllFKzkne89qFL3Lvul1MJEaxaXI6hr8tterl9rwXETmIEgDuAMIarTqVND/FN 3fTnTqFXWMoMbSouK4qtAPhfzsANpVl+tWr0HN3Uqoud2e/ecX7WwQRMFCNMiW83oeMr zW33n6MTzcfRdaMCUJKxrPyl4IDFBfmWDejaEB1wXaAYr3FgVwWOQpxKIN+4DbmixwRo DNa50dUXRQoO8mJ3jkDToG1adi6OPl5I7uDLw6F8rj14p0XQjYfjHfHT4Oshy6Pfl4ng qJbLMXvYpo8V5tAinaN11fXKNCSEAK1QXUMaH7Azs6pLia9tW2WJ4cL9R0fgMhqQt4Ff qwsw== X-Gm-Message-State: AOAM533DcoN4aB63ewmT8iml2xXWnuuz/Xn4Fb5KAjWNBR9vJnGDgydl BT6hkr4geUvIZjmdBOKvGrMTTf5h7Mk= X-Google-Smtp-Source: ABdhPJzqI9JgsWf7fXCoz8UzffOwUMgiHsyibTx00WvB0C837mwpH6MCSqSpjdtB7UmPUGV7vf1Jbg== X-Received: by 2002:a5d:5701:: with SMTP id a1mr603700wrv.120.1605005375959; Tue, 10 Nov 2020 02:49:35 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:35 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:13 +0100 Message-Id: <20201110104851.321029-17-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 016/114] avcodec/clearvideo: Inline constants 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/clearvideo.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index 162dc13ce7..dd5720bda4 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -32,6 +32,8 @@ #include "mathops.h" #include "clearvideodata.h" +#define CLV_VLC_BITS 9 + typedef struct LevelCodes { uint16_t mv_esc; uint16_t bias_esc; @@ -87,14 +89,14 @@ static inline int decode_block(CLVContext *ctx, int16_t *blk, int has_ac, int idx = 1, last = 0, val, skip; memset(blk, 0, sizeof(*blk) * 64); - blk[0] = get_vlc2(gb, ctx->dc_vlc.table, 9, 3); + blk[0] = get_vlc2(gb, ctx->dc_vlc.table, CLV_VLC_BITS, 3); blk[0] -= 63; if (!has_ac) return 0; while (idx < 64 && !last) { - val = get_vlc2(gb, ctx->ac_vlc.table, 9, 2); + val = get_vlc2(gb, ctx->ac_vlc.table, CLV_VLC_BITS, 2); if (val < 0) return AVERROR_INVALIDDATA; if (val != 0x1BFF) { @@ -365,11 +367,11 @@ static TileInfo* decode_tile_info(GetBitContext *gb, LevelCodes *lc, int level) MV mv = { 0 }; if (lc[level].flags_cb.table) { - flags = get_vlc2(gb, lc[level].flags_cb.table, lc[level].flags_cb.bits, 2); + flags = get_vlc2(gb, lc[level].flags_cb.table, CLV_VLC_BITS, 2); } if (lc[level].mv_cb.table) { - uint16_t mv_code = get_vlc2(gb, lc[level].mv_cb.table, lc[level].mv_cb.bits, 3); + uint16_t mv_code = get_vlc2(gb, lc[level].mv_cb.table, CLV_VLC_BITS, 3); if (mv_code != lc[level].mv_esc) { mv.x = (int8_t)(mv_code & 0xff); @@ -381,7 +383,7 @@ static TileInfo* decode_tile_info(GetBitContext *gb, LevelCodes *lc, int level) } if (lc[level].bias_cb.table) { - uint16_t bias_val = get_vlc2(gb, lc[level].bias_cb.table, lc[level].bias_cb.bits, 2); + uint16_t bias_val = get_vlc2(gb, lc[level].bias_cb.table, CLV_VLC_BITS, 2); if (bias_val != lc[level].bias_esc) { bias = (int16_t)(bias_val); @@ -660,7 +662,8 @@ static av_cold int build_vlc(VLC *vlc, const uint8_t counts[16], for (count += num; num < count; num++) lens[num] = i + 1; } - ret = ff_init_vlc_from_lengths(vlc, 9, num, lens, 1, *syms, 2, 2, 0, 0); + ret = ff_init_vlc_from_lengths(vlc, CLV_VLC_BITS, num, lens, 1, + *syms, 2, 2, 0, 0); if (ret < 0) return ret; *syms += num; @@ -712,14 +715,14 @@ static av_cold int clv_decode_init(AVCodecContext *avctx) return AVERROR(ENOMEM); ff_idctdsp_init(&c->idsp, avctx); - ret = init_vlc(&c->dc_vlc, 9, NUM_DC_CODES, + ret = init_vlc(&c->dc_vlc, CLV_VLC_BITS, NUM_DC_CODES, clv_dc_bits, 1, 1, clv_dc_codes, 1, 1, 0); if (ret) { av_log(avctx, AV_LOG_ERROR, "Error initialising DC VLC\n"); return ret; } - ret = ff_init_vlc_from_lengths(&c->ac_vlc, 9, NUM_AC_CODES, + ret = ff_init_vlc_from_lengths(&c->ac_vlc, CLV_VLC_BITS, NUM_AC_CODES, clv_ac_bits, 1, clv_ac_syms, 2, 2, 0, 0); if (ret) { @@ -738,7 +741,7 @@ static av_cold int clv_decode_init(AVCodecContext *avctx) if (i == FF_ARRAY_ELEMS(has_flags)) break; if (has_flags[i]) { - ret = ff_init_vlc_from_lengths(&c->lev[i].flags_cb, 9, 16, + ret = ff_init_vlc_from_lengths(&c->lev[i].flags_cb, CLV_VLC_BITS, 16, clv_flags_bits[j], 1, clv_flags_syms[j], 1, 1, 0, 0); if (ret < 0) From patchwork Tue Nov 10 10:47:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23484 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 5DA3544B1D9 for ; Tue, 10 Nov 2020 12:52:53 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2E89F68BE10; Tue, 10 Nov 2020 12:49:46 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7FD0368BDBB for ; Tue, 10 Nov 2020 12:49:37 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id c9so2513305wml.5 for ; Tue, 10 Nov 2020 02:49:37 -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=OCVcg2V6V57vxLCbIPnOM855OeBqTMGFhS58TUN4EQ4=; b=t2AXaw3BuCIQL7ii2iyyRalTVR7UhLu9Tc+OnaGB4PjdUnejqivelV5pwBepWmgccz evszLf+YIvKC/2B1XLwhJ6brYT5W5fTppd/bL2pYAWVL7gQeRA5PvDJBPuUah8EFqf6y tZTvlFAK6MHmPRWTOXdsdnp54jevvGFC2sXLrKgmNIYClRBh8kK8bxKTHr+WLElttC8y +yoGXFR4WXDwWIbrAVETifqhsrEydVFsOHmPmWOQl6Ih2Wi3osBq6J68zSWYUHCx3nIa yOQ0kcFTo0hKJXoZeZT7/GvSxln58bpgeVmMecPw6S8WOvwCPTYxoOkCvoCkWLUPDn18 QK6g== 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=OCVcg2V6V57vxLCbIPnOM855OeBqTMGFhS58TUN4EQ4=; b=jnu9bWbFkZ+wngOAd23j3laYUa4/X5DPtSmwTjbaHSahl5pY6km+ZzG3OVOC5kq6jf fpfx/L7X0IJHUIBW+EcLNiiEcuwIIIJtzfuoEuCDSyA8dRs7e8/Uv6Ioyj2aZ4aMkRPO O81ebwRXanojPcP1i5RphERRxLm1KuRipAOGy7Ylzb9OIGmF7I6p7t2Q70pkjnd8z8Cx vo0FeXgKY/g5FIRmtWq+ENKdTuQVdRhBB4Hu36TJUT9MHcz06yGRq/3UTMjYoQSo5pBy 2HEENA31JHaKa5gkGWwdsUNjY7IiG5y0m4GmxdY1eouQN1Iu3T7En0kZVtQmm8SoUeeA pjjA== X-Gm-Message-State: AOAM532+pED+usA+9KPLwDmKJe6v9INR+hV+eFmbzn6tYSzM7E+1mx0n 7HzXWMBMNtySukSuszBjIUZ3ztOGKVI= X-Google-Smtp-Source: ABdhPJz5BBrrm0TyUPE5Gx7SjJzuuacWUjhy+a/uqAAWQypozyxVy0IWHehG4/Kz4HBcvxdyAX8pdA== X-Received: by 2002:a05:600c:21cc:: with SMTP id x12mr819861wmj.8.1605005376804; Tue, 10 Nov 2020 02:49:36 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:36 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:14 +0100 Message-Id: <20201110104851.321029-18-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 017/114] avcodec/clearvideo: Use minimal max_depth in get_vlc2() 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/clearvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index dd5720bda4..1d88a9a776 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -371,7 +371,7 @@ static TileInfo* decode_tile_info(GetBitContext *gb, LevelCodes *lc, int level) } if (lc[level].mv_cb.table) { - uint16_t mv_code = get_vlc2(gb, lc[level].mv_cb.table, CLV_VLC_BITS, 3); + uint16_t mv_code = get_vlc2(gb, lc[level].mv_cb.table, CLV_VLC_BITS, 2); if (mv_code != lc[level].mv_esc) { mv.x = (int8_t)(mv_code & 0xff); From patchwork Tue Nov 10 10:47:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23486 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 93D8944B2CF for ; Tue, 10 Nov 2020 12:53:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E812268BE17; Tue, 10 Nov 2020 12:49:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5CE0468BDCF for ; Tue, 10 Nov 2020 12:49:39 +0200 (EET) Received: by mail-wr1-f42.google.com with SMTP id j7so4888965wrp.3 for ; Tue, 10 Nov 2020 02:49:39 -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=YlkydWWJkIRYk78HKxxMIyDwICVRha/JeZ/KHgIGJv4=; b=FmBwnKESKzKXSSnTRTCquuzcNb5mCEjy0zrhYj4XL+PNhFZLeBse+0cQnOOQO+B0js V7JMf1XLRHNLUeFw+rO3i5AlC+3qcGBX4wGzvUn4/xGWDcBgcETKLRRkAv/diQ1VS/GQ IZHuHXf8w0PYV9k2AgspoGqNN1jaDrprxqIh5dCRaVyd3/xPFNbxcqpz/CKB+WIl44Go TK1Hoqtr9z85eDh+Z+Kzw3RSWwSdHCTDD6EUHmkYnnI/otSYQZVK2M3HkwlrxQdtUTjQ NWl5Ie5krDCYMnAbA6nbhnSOaBHKurU2hHQHEYsPZ+qpvAs4HBl2HK63YNVqgNgixj+w 8HBQ== 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=YlkydWWJkIRYk78HKxxMIyDwICVRha/JeZ/KHgIGJv4=; b=hshHwxp7/okFgHSp/B0pjW9NSqfh/PI3uRVLjQAHmM5nZBomPKSe3uUmH+9mfgdemV qVqoBfiIACNRnPyxrt2/7o7BJ6ppXnoqMlTqHkPPQZBuktHgNt6YjsR9cNktPNKnDnmI 0xWVdMP9hpDTdCSTqnEDJeCXRhT4wNpFpdqJ1t9gN9gRq9w2t6ZnnypDr82bwrEP3dYo qUJtsO0TBZtBO3lbS6r1kYdc81vUuAcN9CRf3W4qTetzMH/fPxwDQK33Pzl+OKBY52nV z+ZpOVQpQYEbiz7SD/I3jVy4xPKcgHaT3mU7hYYdjUA1yrRxYi7bWPkvHIAifx+Nvzi7 MzRw== X-Gm-Message-State: AOAM533rpgWT8hs0RkMO/v2rm2tfOZGFY+w8AJ9G2MQF0jqZQT9rha7B MVH/t01uutWrIL3vPuc0baf35lOgdlQ= X-Google-Smtp-Source: ABdhPJxcnxZ8VN7No2BFk7J4UqC4RfPMN+s+VVyf5teL4rO5wqqVBR0y8jIBZRnsbmerXXFIdiw2tA== X-Received: by 2002:adf:e3cf:: with SMTP id k15mr7068749wrm.259.1605005378324; Tue, 10 Nov 2020 02:49:38 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:37 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:15 +0100 Message-Id: <20201110104851.321029-19-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 018/114] avcodec/clearvideo: Apply VLC offset during init 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/clearvideo.c | 7 +++-- libavcodec/clearvideodata.h | 54 ++++++++++++++----------------------- 2 files changed, 23 insertions(+), 38 deletions(-) diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index 1d88a9a776..9b4f03d15e 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -90,7 +90,6 @@ static inline int decode_block(CLVContext *ctx, int16_t *blk, int has_ac, memset(blk, 0, sizeof(*blk) * 64); blk[0] = get_vlc2(gb, ctx->dc_vlc.table, CLV_VLC_BITS, 3); - blk[0] -= 63; if (!has_ac) return 0; @@ -715,9 +714,9 @@ static av_cold int clv_decode_init(AVCodecContext *avctx) return AVERROR(ENOMEM); ff_idctdsp_init(&c->idsp, avctx); - ret = init_vlc(&c->dc_vlc, CLV_VLC_BITS, NUM_DC_CODES, - clv_dc_bits, 1, 1, - clv_dc_codes, 1, 1, 0); + ret = ff_init_vlc_from_lengths(&c->dc_vlc, CLV_VLC_BITS, NUM_DC_CODES, + clv_dc_lens, 1, + clv_dc_syms, 1, 1, -63, 0); if (ret) { av_log(avctx, AV_LOG_ERROR, "Error initialising DC VLC\n"); return ret; diff --git a/libavcodec/clearvideodata.h b/libavcodec/clearvideodata.h index d2c658eb5d..7fd3793dee 100644 --- a/libavcodec/clearvideodata.h +++ b/libavcodec/clearvideodata.h @@ -28,42 +28,28 @@ #define NUM_DC_CODES 127 #define NUM_AC_CODES 104 -static const uint8_t clv_dc_codes[NUM_DC_CODES] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x07, 0x0B, - 0x0C, 0x08, 0x08, 0x09, 0x04, 0x06, 0x07, 0x05, - 0x04, 0x05, 0x04, 0x06, 0x05, 0x06, 0x07, 0x05, - 0x06, 0x07, 0x06, 0x07, 0x08, 0x06, 0x07, 0x08, - 0x09, 0x0A, 0x0B, 0x07, 0x08, 0x09, 0x07, 0x08, - 0x06, 0x07, 0x08, 0x06, 0x04, 0x05, 0x02, 0x01, - 0x03, 0x06, 0x07, 0x07, 0x09, 0x0A, 0x0B, 0x09, - 0x0A, 0x0B, 0x0A, 0x0B, 0x0C, 0x0D, 0x0C, 0x09, - 0x0D, 0x0A, 0x0B, 0x08, 0x09, 0x0A, 0x0B, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x06, 0x07, 0x06, 0x08, - 0x07, 0x09, 0x0A, 0x0B, 0x09, 0x0A, 0x0B, 0x0C, - 0x14, 0x0D, 0x0D, 0x0E, 0x0F, 0x15, 0x15, 0x16, - 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, - 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, +static const uint8_t clv_dc_lens[NUM_DC_CODES] = { + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 21, 21, 21, 20, 20, 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 18, 18, 18, 18, + 17, 17, 17, 17, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, + 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 10, 10, 10, + 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, + 7, 7, 7, 7, 6, 6, 5, 5, 5, 5, 3, 3, 1, }; -static const uint8_t clv_dc_bits[NUM_DC_CODES] = { - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 21, 22, 22, 19, 20, - 20, 19, 18, 18, 15, 17, 17, 16, - 14, 15, 12, 13, 14, 14, 14, 12, - 12, 12, 11, 11, 11, 10, 10, 10, - 10, 10, 10, 9, 9, 9, 8, 8, - 7, 7, 7, 6, 5, 5, 3, 1, - 3, 5, 5, 6, 7, 7, 7, 8, - 8, 8, 9, 9, 9, 9, 10, 11, - 10, 11, 11, 12, 12, 12, 12, 13, - 14, 14, 14, 14, 15, 15, 16, 17, - 16, 17, 18, 18, 19, 19, 19, 19, - 21, 19, 20, 19, 19, 21, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, +static const uint8_t clv_dc_syms[NUM_DC_CODES] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, + 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x14, 0x15, 0x6E, 0x6F, 0x70, + 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, + 0x7D, 0x7E, 0x13, 0x68, 0x6D, 0x17, 0x18, 0x6A, 0x16, 0x19, 0x64, 0x65, + 0x66, 0x67, 0x69, 0x6B, 0x6C, 0x1A, 0x1B, 0x62, 0x63, 0x1D, 0x1E, 0x5F, + 0x61, 0x1F, 0x5E, 0x60, 0x1C, 0x21, 0x5C, 0x5D, 0x20, 0x24, 0x25, 0x26, + 0x58, 0x59, 0x5A, 0x5B, 0x23, 0x57, 0x22, 0x27, 0x28, 0x29, 0x53, 0x54, + 0x55, 0x56, 0x2A, 0x2B, 0x2C, 0x4F, 0x51, 0x52, 0x2D, 0x2E, 0x2F, 0x30, + 0x31, 0x32, 0x4E, 0x50, 0x33, 0x34, 0x35, 0x4A, 0x4B, 0x4C, 0x4D, 0x36, + 0x37, 0x47, 0x48, 0x49, 0x38, 0x39, 0x3A, 0x44, 0x45, 0x46, 0x3B, 0x43, + 0x3C, 0x3D, 0x41, 0x42, 0x3E, 0x40, 0x3F, }; static const uint16_t clv_ac_syms[NUM_AC_CODES] = { From patchwork Tue Nov 10 10:47:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23487 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 9530144B2CF for ; Tue, 10 Nov 2020 12:53:40 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 93A9668BE1B; Tue, 10 Nov 2020 12:49:48 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2F9C868BDC0 for ; Tue, 10 Nov 2020 12:49:40 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id r17so8229748wrw.1 for ; Tue, 10 Nov 2020 02:49:40 -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=rV4VHHoR9Ltal+51ta/6/4eEv/Z0qQf/1g80FD37YcY=; b=Hnu2dTWE6AckYy/SzROvh7DjDVwrkzbP7vytbbOz2nPNRaMbn6n2/KJXX9vibo+ot9 DHFDW6migXd5S3JhZ85ah2fXRj/S3Hv9hKXpPruucMmjUHG+Bbj/XfpQhsj0NrGDALnU Ls9FXI+goMTwnxmuhB3kvUguN/fBwj+hZzOtXxF4i3mRrUoAVdPyzSyE/DmCWOOCOtsH Rm3Lwmprt+Pt/ZBWisCoe/NvkQ6o79SfGkxBSQlwxwc7tBjBBVH9zXM123xcAhJ2yuir HU0qIrnF1XJmhCfaP9Acu2gMLkAqXGzKMsZxuaZbxN2joS9QCbxo1vOhNob0bK2HBUsv jV1A== 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=rV4VHHoR9Ltal+51ta/6/4eEv/Z0qQf/1g80FD37YcY=; b=eHmI7n9yBXUpbUXZv+BNFBZrxeHa2KU4zdF5lZbyHfm+Ur8cZiGT+csUanPxWfun0j hKzd0QNCCabiobP5ufovXBVehbVfWw8Y7An0n2+5oygUyPViNJcXdG2zsWewxwIHh8b9 6YMT3nccsRnl1nov9TMOeH8/E7DFTgqFnqCd6/XuegwGnwrcV1TwNFGevh8yTzHotZh5 7vFnpWeAVJrciOgSE1nPR5rZK/36wGSMSErnIoMu4dDw4LhzOqbUboNXmymVhBzG9igr pNKIXoYl6gY5hGFHKLKl6uCOXxFZn/xZ/zb42ngk8BMxfTKm8qdHZsvAXnJ9wVVBGsV8 E0mQ== X-Gm-Message-State: AOAM533cnOkX/57FbkAQgAfi5TMVgrQiQc3JgRWZfjv5P76+qJoz7Ibc l1unJHTOgBou0CCMsNGzaQ4w72YjW48= X-Google-Smtp-Source: ABdhPJz/llOvEuM+jdE1CQ9HMqh0wpYDLFbdlc861qWZADXN00nbjEnLtSMBdhdfIls4gtZKHsMA9Q== X-Received: by 2002:adf:f542:: with SMTP id j2mr6422027wrp.107.1605005379139; Tue, 10 Nov 2020 02:49:39 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:38 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:16 +0100 Message-Id: <20201110104851.321029-20-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 019/114] avcodec/clearvideo: Make VLC tables static 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/clearvideo.c | 94 ++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 54 deletions(-) diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index 9b4f03d15e..33b94bb086 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -75,13 +75,15 @@ typedef struct CLVContext { MVInfo mvi; int tile_size; int tile_shift; - VLC dc_vlc, ac_vlc; - LevelCodes lev[4 + 3 + 3]; // 0..3: Y, 4..6: U, 7..9: V int luma_dc_quant, chroma_dc_quant, ac_quant; DECLARE_ALIGNED(16, int16_t, block)[64]; int top_dc[3], left_dc[4]; } CLVContext; +static VLC dc_vlc, ac_vlc; +static LevelCodes lev[4 + 3 + 3]; // 0..3: Y, 4..6: U, 7..9: V +static VLC_TYPE vlc_buf[16716][2]; + static inline int decode_block(CLVContext *ctx, int16_t *blk, int has_ac, int ac_quant) { @@ -89,13 +91,13 @@ static inline int decode_block(CLVContext *ctx, int16_t *blk, int has_ac, int idx = 1, last = 0, val, skip; memset(blk, 0, sizeof(*blk) * 64); - blk[0] = get_vlc2(gb, ctx->dc_vlc.table, CLV_VLC_BITS, 3); + blk[0] = get_vlc2(gb, dc_vlc.table, CLV_VLC_BITS, 3); if (!has_ac) return 0; while (idx < 64 && !last) { - val = get_vlc2(gb, ctx->ac_vlc.table, CLV_VLC_BITS, 2); + val = get_vlc2(gb, ac_vlc.table, CLV_VLC_BITS, 2); if (val < 0) return AVERROR_INVALIDDATA; if (val != 0x1BFF) { @@ -358,7 +360,7 @@ static void mvi_update_row(MVInfo *mvi) } } -static TileInfo* decode_tile_info(GetBitContext *gb, LevelCodes *lc, int level) +static TileInfo *decode_tile_info(GetBitContext *gb, const LevelCodes *lc, int level) { TileInfo *ti; int i, flags = 0; @@ -595,7 +597,7 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data, TileInfo *tile; MV mv, cmv; - tile = decode_tile_info(&c->gb, &c->lev[0], 0); // Y + tile = decode_tile_info(&c->gb, &lev[0], 0); // Y if (!tile) return AVERROR(ENOMEM); mv = mvi_predict(&c->mvi, i, j, tile->mv); @@ -610,14 +612,14 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data, cmv.x /= 2; cmv.y /= 2; av_freep(&tile); - tile = decode_tile_info(&c->gb, &c->lev[4], 0); // U + tile = decode_tile_info(&c->gb, &lev[4], 0); // U if (!tile) return AVERROR(ENOMEM); ret = restore_tree(avctx, c->pic, c->prev, 1, x, y, size, tile, cmv); if (ret < 0) mb_ret = ret; av_freep(&tile); - tile = decode_tile_info(&c->gb, &c->lev[7], 0); // V + tile = decode_tile_info(&c->gb, &lev[7], 0); // V if (!tile) return AVERROR(ENOMEM); ret = restore_tree(avctx, c->pic, c->prev, 2, x, y, size, tile, cmv); @@ -647,12 +649,11 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data, return mb_ret < 0 ? mb_ret : buf_size; } -static av_cold int build_vlc(VLC *vlc, const uint8_t counts[16], - const uint16_t **syms) +static av_cold void build_vlc(VLC *vlc, const uint8_t counts[16], + const uint16_t **syms, unsigned *offset) { uint8_t lens[MAX_VLC_ENTRIES]; unsigned num = 0; - int ret; for (int i = 0; i < 16; i++) { unsigned count = counts[i]; @@ -661,12 +662,12 @@ static av_cold int build_vlc(VLC *vlc, const uint8_t counts[16], for (count += num; num < count; num++) lens[num] = i + 1; } - ret = ff_init_vlc_from_lengths(vlc, CLV_VLC_BITS, num, lens, 1, - *syms, 2, 2, 0, 0); - if (ret < 0) - return ret; + vlc->table = &vlc_buf[*offset]; + vlc->table_allocated = FF_ARRAY_ELEMS(vlc_buf) - *offset; + ff_init_vlc_from_lengths(vlc, CLV_VLC_BITS, num, lens, 1, + *syms, 2, 2, 0, INIT_VLC_USE_NEW_STATIC); *syms += num; - return 0; + *offset += vlc->table_size; } static av_cold int clv_decode_init(AVCodecContext *avctx) @@ -714,46 +715,39 @@ static av_cold int clv_decode_init(AVCodecContext *avctx) return AVERROR(ENOMEM); ff_idctdsp_init(&c->idsp, avctx); - ret = ff_init_vlc_from_lengths(&c->dc_vlc, CLV_VLC_BITS, NUM_DC_CODES, - clv_dc_lens, 1, - clv_dc_syms, 1, 1, -63, 0); - if (ret) { - av_log(avctx, AV_LOG_ERROR, "Error initialising DC VLC\n"); - return ret; - } - ret = ff_init_vlc_from_lengths(&c->ac_vlc, CLV_VLC_BITS, NUM_AC_CODES, - clv_ac_bits, 1, - clv_ac_syms, 2, 2, 0, 0); - if (ret) { - av_log(avctx, AV_LOG_ERROR, "Error initialising AC VLC\n"); - return ret; - } - for (int i = 0, j = 0, k = 0;; i++) { + if (ac_vlc.table_size) + return 0; + + for (unsigned i = 0, j = 0, k = 0, offset = 0;; i++) { if (clv_mv_escape[i]) { - c->lev[i].mv_esc = clv_mv_escape[i]; - ret = build_vlc(&c->lev[i].mv_cb, clv_mv_len_counts[k], &mv_syms); - if (ret < 0) - return ret; + lev[i].mv_esc = clv_mv_escape[i]; + build_vlc(&lev[i].mv_cb, clv_mv_len_counts[k], &mv_syms, &offset); k++; } if (i == FF_ARRAY_ELEMS(has_flags)) break; if (has_flags[i]) { - ret = ff_init_vlc_from_lengths(&c->lev[i].flags_cb, CLV_VLC_BITS, 16, - clv_flags_bits[j], 1, - clv_flags_syms[j], 1, 1, 0, 0); - if (ret < 0) - return ret; - - c->lev[i + 1].bias_esc = 0x100; - ret = build_vlc(&c->lev[i + 1].bias_cb, - clv_bias_len_counts[j], &bias_syms); - if (ret < 0) - return ret; + lev[i].flags_cb.table = &vlc_buf[offset]; + lev[i].flags_cb.table_allocated = FF_ARRAY_ELEMS(vlc_buf) - offset; + ff_init_vlc_from_lengths(&lev[i].flags_cb, CLV_VLC_BITS, 16, + clv_flags_bits[j], 1, + clv_flags_syms[j], 1, 1, + 0, INIT_VLC_USE_NEW_STATIC); + offset += lev[i].flags_cb.table_size; + + lev[i + 1].bias_esc = 0x100; + build_vlc(&lev[i + 1].bias_cb, clv_bias_len_counts[j], + &bias_syms, &offset); j++; } } + INIT_VLC_STATIC_FROM_LENGTHS(&dc_vlc, CLV_VLC_BITS, NUM_DC_CODES, + clv_dc_lens, 1, + clv_dc_syms, 1, 1, -63, 0, 1104); + INIT_VLC_STATIC_FROM_LENGTHS(&ac_vlc, CLV_VLC_BITS, NUM_AC_CODES, + clv_ac_bits, 1, + clv_ac_syms, 2, 2, 0, 0, 554); return 0; } @@ -766,14 +760,6 @@ static av_cold int clv_decode_end(AVCodecContext *avctx) av_freep(&c->mvi.mv); - ff_free_vlc(&c->dc_vlc); - ff_free_vlc(&c->ac_vlc); - for (int i = 0; i < FF_ARRAY_ELEMS(c->lev); i++) { - ff_free_vlc(&c->lev[i].mv_cb); - ff_free_vlc(&c->lev[i].flags_cb); - ff_free_vlc(&c->lev[i].bias_cb); - } - return 0; } From patchwork Tue Nov 10 10:47:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23478 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 7943B449B06 for ; Tue, 10 Nov 2020 12:49:53 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6086268BD8E; Tue, 10 Nov 2020 12:49:53 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0C69668BDD8 for ; Tue, 10 Nov 2020 12:49:41 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id 23so12137217wrc.8 for ; Tue, 10 Nov 2020 02:49:40 -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=WDceH3BvzNWQRv6j0OzYBfD5y7uy3TDo/v+9lN2Nfc8=; b=EmRHrjoXf15TRVMng83wOGGD3yNddgVy6Ida14R2M5qq+zpU+f32htkw9wQYYm02uC elJmbTDNUnLdCgWD8yogA9ndtmNNlALX6ATTRNK7n8kGmNKbpiQJI5z8cdHaxFM/HLVC uL55MgBkI17WhMBX70oDG8M3keeWYSldteDkcLP3dPMwXBcfEGOZIkX+USJbweL0JaKu CmTyJvHCgoVKmy2DYMqn2ZDUqjyqRKrUGvApUFk+YEe55i8TSscnn9Llt36N6Ro8/4Pp I3nKGmGa6Jh/DGH6KrmTV0XFUeESg1TpmAIIcPtgh6oq1eoE8OKClX8F3a7k5vsOBI1A Z7kA== 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=WDceH3BvzNWQRv6j0OzYBfD5y7uy3TDo/v+9lN2Nfc8=; b=mY+EG/WDVBe2fTyeUYpLdSE4MyIiwNaf437sYQNzh91ac9+DYmjGfcOUytdzrlRzjg DtE7jm0emCZNqWA5Qd4PZ1LkUVxdLojFTqGfJABLZ+kEGaWwScpN3MxmX8g9czIiBO8Y JbM2m+rMA1ocIUvDCBy/uccmTJrCDsVLRWzfBzt6iSSvzynIgW9obApwRb7qa+DuSgum Fsz4Wq1PwKibp9mKx5/PgDCsRomZmESY0Kss97MDzILC20WGQLRbjuCLxHXQmIxgXVvi hQrqFTEH5pwd3VrmPUolhMHFFzQsLjbD8N/bjukj/gC/cZmghnXRif/DTlgeECthTfQ5 LEsw== X-Gm-Message-State: AOAM533IgL6p1oOJW3NghLiFdpc6qmlrru5Ka8/gcw5xtRaer07Etg5R QPzYGJ6r3f/apMIdww2+4ffHyt+8MzE= X-Google-Smtp-Source: ABdhPJz0FcSz3RsH27/IH/bRpCfxXeiEzKgZoT8ibFxQr4kp94XUtY8YLCg4gutv8wmj1LWXoqRDSA== X-Received: by 2002:adf:ed11:: with SMTP id a17mr8487830wro.197.1605005380201; Tue, 10 Nov 2020 02:49:40 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:39 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:17 +0100 Message-Id: <20201110104851.321029-21-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 020/114] avcodec/wnv1: Make array for initializing VLC smaller 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" This is possible by switching to ff_init_vlc_from_lengths() which allows to replace the table for the codes (which need an uint16_t) by a table of symbols which fit into an uint8_t. Also switch to an ordinary INIT_VLC macro while just at it. Signed-off-by: Andreas Rheinhardt --- libavcodec/wnv1.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c index b5cd0f0f0c..f8a9b94746 100644 --- a/libavcodec/wnv1.c +++ b/libavcodec/wnv1.c @@ -29,11 +29,10 @@ #include "get_bits.h" #include "internal.h" - -static const uint16_t code_tab[16][2] = { - { 0x17F, 9 }, { 0xBF, 8 }, { 0x5F, 7 }, { 0x2F, 6 }, { 0x17, 5 }, { 0x0B, 4 }, { 0x005, 3 }, - { 0x000, 1 }, - { 0x01, 3 }, { 0x03, 4 }, { 0x07, 5 }, { 0x0F, 6 }, { 0x1F, 7 }, { 0x3F, 8 }, { 0x07F, 9 }, { 0xFF, 8 } +static const uint8_t code_tab[16][2] = { + { 7, 1 }, { 8, 3 }, { 6, 3 }, { 9, 4 }, { 5, 4 }, { 10, 5 }, { 4, 5 }, + { 11, 6 }, { 3, 6 }, { 12, 7 }, { 2, 7 }, { 13, 8 }, { 1, 8 }, { 14, 9 }, + { 0, 9 }, { 15, 8 } }; #define CODE_VLC_BITS 9 @@ -115,16 +114,12 @@ static int decode_frame(AVCodecContext *avctx, static av_cold int decode_init(AVCodecContext *avctx) { - static VLC_TYPE code_table[1 << CODE_VLC_BITS][2]; - avctx->pix_fmt = AV_PIX_FMT_YUV422P; - code_vlc.table = code_table; - code_vlc.table_allocated = 1 << CODE_VLC_BITS; - init_vlc(&code_vlc, CODE_VLC_BITS, 16, - &code_tab[0][1], 4, 2, - &code_tab[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - + INIT_VLC_STATIC_FROM_LENGTHS(&code_vlc, CODE_VLC_BITS, 16, + &code_tab[0][1], 2, + &code_tab[0][0], 2, 1, + 0, INIT_VLC_OUTPUT_LE, 1 << CODE_VLC_BITS); return 0; } From patchwork Tue Nov 10 10:47:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23479 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 72DBB449B06 for ; Tue, 10 Nov 2020 12:49:54 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 52C4068BDDB; Tue, 10 Nov 2020 12:49:54 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D9A8368BDED for ; Tue, 10 Nov 2020 12:49:41 +0200 (EET) Received: by mail-wm1-f68.google.com with SMTP id 10so2533213wml.2 for ; Tue, 10 Nov 2020 02:49:41 -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=0hZK3Eh6zLJJ1R1ZMdyA2cs4YzGrGjCaDFM4y4PtXcc=; b=tfsAf9K1KkbXnukEwErBxN/lMrTtoTdgdGKhW/4THfZVwunGaIWkCFt0mOHVp6MX6y VGmeCdKuo41MwXHQPCKQ7sx82tKVfCSytNUgNEOHFHj1xNiU66CqT6xEN1QkRZPSmo6M S+1YWhOafkkhskHsgTDVKsGuPdBzV1zYdpfXlG+kHx1rX+FL4tWN2B1EicOzsd7JWvbo TiWumEMQR1BG70gtl0ygP48IN5aNhMJgAahbhmiV9juBNoLblLR3BVELDiWnyefArrb7 9lF6OX5v+2cg2OgkDbvAbEHM5nvGUvgljtopaPlODY+XLpAXIrOwYTNGxPNsXI3l3cYu /J3g== 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=0hZK3Eh6zLJJ1R1ZMdyA2cs4YzGrGjCaDFM4y4PtXcc=; b=M+FvG7WtY6DvCFV+PUHNkUeSFtECdAJvJouaFeNNX72u3Uh5Tz2+72XsAPq6arvhot WMF0uehdqZXZnb/nb7VouBPljphRWbiUt6KDsdYBBoGV1XNhfJpcIei+SCY6D7OL+fgk +8ItrJGT+KIJApQxf+ZhEEWesHnzPX7Df+rdIWNUjCTLKmLehvqmjoUf0B9sjoCWqPcx gu2RLNR+twnvlGQo4kOF92CGBAh8M2uW8zlw03J3AgApk77Sh0MHc5X7kOTJgb3EZb+O Vu0kAzHhXWO2lHWgNXlsvJg/nZOo93u0hwZcnKl5TI5lUJhETQqv649u6BlatORrkY6x PvBg== X-Gm-Message-State: AOAM532DR7ZTVpnw3VvncGCexVZ/bYiugnMpNVE3J/Ya3cuxucAniwOy lCeu8L5z2qQ0GL2ezvbfW2CW+YhDtGs= X-Google-Smtp-Source: ABdhPJzzDtHTT+MVEUNV8tiYAnhtT6JyUcwchY6+KurXMcYpZIXNkzEYENf9sd2X0QCRQCxpzVENNg== X-Received: by 2002:a7b:c846:: with SMTP id c6mr3816603wml.143.1605005381070; Tue, 10 Nov 2020 02:49:41 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:40 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:18 +0100 Message-Id: <20201110104851.321029-22-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 021/114] avcodec/wnv1: Apply offset during init, not later every time 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/wnv1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c index f8a9b94746..7dd0e72596 100644 --- a/libavcodec/wnv1.c +++ b/libavcodec/wnv1.c @@ -43,10 +43,10 @@ static inline int wnv1_get_code(GetBitContext *gb, int shift, int base_value) { int v = get_vlc2(gb, code_vlc.table, CODE_VLC_BITS, 1); - if (v == 15) + if (v == 8) return get_bits(gb, 8 - shift) << shift; else - return base_value + ((v - 7U) << shift); + return base_value + v * (1 << shift); } static int decode_frame(AVCodecContext *avctx, @@ -119,7 +119,7 @@ static av_cold int decode_init(AVCodecContext *avctx) INIT_VLC_STATIC_FROM_LENGTHS(&code_vlc, CODE_VLC_BITS, 16, &code_tab[0][1], 2, &code_tab[0][0], 2, 1, - 0, INIT_VLC_OUTPUT_LE, 1 << CODE_VLC_BITS); + -7, INIT_VLC_OUTPUT_LE, 1 << CODE_VLC_BITS); return 0; } From patchwork Tue Nov 10 10:47:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23494 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 73C2144B3FF for ; Tue, 10 Nov 2020 12:54:38 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1D02D68BE31; Tue, 10 Nov 2020 12:49:56 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7BADF68BE04 for ; Tue, 10 Nov 2020 12:49:44 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id 10so2533375wml.2 for ; Tue, 10 Nov 2020 02:49:44 -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=6xhDlTHN3eETpSQgS9hH4zzYxBeO3z4wU3SK2HhZCeE=; b=Br3mxDFDhXRiMRLV9yHekJ07W/Ry+7taCpL7YW6UrX3M+GceA+O0xCL2vW6tQ57gDe LIbPmqQcliPdgkqOsKSDbgLY32yKB7N9esV/Xmg1DqEztqeSezP9KONDosz9yg6XF7Bz n+exPSjaQyuKKdzXeSo+tsv511UpraX2VtMmVUkMRSolujBn88CLB8h/UTtQilzpAIo4 8B4qkLnaa5I3k72Dozea9gRL7GTmQruttwR9bMz3eOeVOfmH9I584eUWlrVUm7naozWC HhHOX3J3o8smo8v2AL5ujmpzAPZAFJdSx8o3bN5Arv625mn7Qy1dqLEsabbnLifBFw8h XafQ== 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=6xhDlTHN3eETpSQgS9hH4zzYxBeO3z4wU3SK2HhZCeE=; b=oi9lC1QvV6P9L44RTxg53PvvGAeFvLyyipXNtxUPTpp8RFZAnPGr0d1dJU3AVClXeI FRSbYM1tPg0a4IwbqzokC3xLyxXrIV7GW9VN8jDv9eIbWVLwyIZ8J4SnCDSKR0gVywlJ HUxThCkwLQ3Pkb/UPt42I15mLVjpzGjxpzagUM3IwiTPk1ItWm+iVNUK8Kq9goxuOG3l E+rT5a1IfCGH6WCHzWmiWBoNasWGU0EuNxPLqMi7oKhtc09ODPj4Hdm7SbUJVtMhOScd yzwT5Te35v2mXt71cFe9CsmkxSnPtALNw7A0VezASmXqkU8UEUXHEBbMY70AzLFB60AU uV9Q== X-Gm-Message-State: AOAM533tsanaHwYK5McxbF611nv9nrnimTrR1Oi4uSVMp5s+dmIPz1zg 5D8qmim/8BodAL4HtJgeNXNO2rgmU18= X-Google-Smtp-Source: ABdhPJx2McBRy40qWP3fn1KRmQO/gzEG7Djnc9ZNtUD12iQobGvw/WRB+dULrJVwhmsJrfbY71LD4g== X-Received: by 2002:a1c:23cf:: with SMTP id j198mr4052728wmj.6.1605005382146; Tue, 10 Nov 2020 02:49:42 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:41 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:19 +0100 Message-Id: <20201110104851.321029-23-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 022/114] avcodec/cook: Make tables to initialize VLCs smaller 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" Up until now, the Cook decoder used tables for the lengths of codes and tables of the codes itself to initialize VLCs; the tables for the codes were of type uint16_t because the codes were so long. It did not use explicit symbol tables. This commit instead reorders the tables so that the code tables are sorted from left to right in the tree. Then the codes can be easily derived from the lengths and therefore be omitted. This comes at the price of explicitly coding the symbols, but this is nevertheless a net win because most of the symbols tables can be coded on one byte. Furthermore, Cook actually does not use a contiguous range of symbols for its main VLC tables and the old code compensated for that by adding holes (codes of length zero) to the tables (that are skipped by ff_init_vlc_sparse()). This is no longer necessary with the new approach. All in all, this saves about 1.7KB. Signed-off-by: Andreas Rheinhardt --- libavcodec/cook.c | 24 +- libavcodec/cookdata.h | 643 ++++++++++++++++++------------------------ 2 files changed, 290 insertions(+), 377 deletions(-) diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 9582495442..7b24868f57 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -197,23 +197,27 @@ static av_cold int init_cook_vlc_tables(COOKContext *q) result = 0; for (i = 0; i < 13; i++) { - result |= init_vlc(&q->envelope_quant_index[i], 9, 24, - envelope_quant_index_huffbits[i], 1, 1, - envelope_quant_index_huffcodes[i], 2, 2, 0); + result |= ff_init_vlc_from_lengths(&q->envelope_quant_index[i], 9, 24, + envelope_quant_index_huffbits[i], 1, + envelope_quant_index_huffsyms[i], 1, 1, + 0, 0); } av_log(q->avctx, AV_LOG_DEBUG, "sqvh VLC init\n"); for (i = 0; i < 7; i++) { - result |= init_vlc(&q->sqvh[i], vhvlcsize_tab[i], vhsize_tab[i], - cvh_huffbits[i], 1, 1, - cvh_huffcodes[i], 2, 2, 0); + int sym_size = 1 + (i == 3); + result |= ff_init_vlc_from_lengths(&q->sqvh[i], vhvlcsize_tab[i], vhsize_tab[i], + cvh_huffbits[i], 1, + cvh_huffsyms[i], sym_size, sym_size, + 0, 0); } for (i = 0; i < q->num_subpackets; i++) { if (q->subpacket[i].joint_stereo == 1) { - result |= init_vlc(&q->subpacket[i].channel_coupling, 6, - (1 << q->subpacket[i].js_vlc_bits) - 1, - ccpl_huffbits[q->subpacket[i].js_vlc_bits - 2], 1, 1, - ccpl_huffcodes[q->subpacket[i].js_vlc_bits - 2], 2, 2, 0); + result |= ff_init_vlc_from_lengths(&q->subpacket[i].channel_coupling, 6, + (1 << q->subpacket[i].js_vlc_bits) - 1, + ccpl_huffbits[q->subpacket[i].js_vlc_bits - 2], 1, + ccpl_huffsyms[q->subpacket[i].js_vlc_bits - 2], 1, 1, + 0, 0); av_log(q->avctx, AV_LOG_DEBUG, "subpacket %i Joint-stereo VLC used.\n", i); } } diff --git a/libavcodec/cookdata.h b/libavcodec/cookdata.h index efb8a53942..05d1eef23b 100644 --- a/libavcodec/cookdata.h +++ b/libavcodec/cookdata.h @@ -71,7 +71,7 @@ static const int vpr_tab[7] = { /* VLC data */ static const int vhsize_tab[7] = { - 191, 97, 48, 607, 246, 230, 32, + 181, 94, 48, 520, 209, 192, 32, }; static const int vhvlcsize_tab[7] = { @@ -79,352 +79,269 @@ static const int vhvlcsize_tab[7] = { }; static const uint8_t envelope_quant_index_huffbits[13][24] = { - { 4, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 5, 7, 8, 9, 11, 11, 12, 12, 12, 12 }, - { 10, 8, 6, 5, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 7, 9, 11, 12, 13, 15, 15, 15, 16, 16 }, - { 12, 10, 8, 6, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 5, 5, 7, 9, 11, 13, 14, 14 }, - { 13, 10, 9, 9, 7, 7, 5, 5, 4, 3, 3, 3, 3, 3, 4, 4, 4, 5, 7, 9, 11, 13, 13, 13 }, - { 12, 13, 10, 8, 6, 6, 5, 5, 4, 4, 3, 3, 3, 3, 3, 4, 5, 5, 6, 7, 9, 11, 14, 14 }, - { 12, 11, 9, 8, 8, 7, 5, 4, 4, 3, 3, 3, 3, 3, 4, 4, 5, 5, 7, 8, 10, 13, 14, 14 }, - { 15, 16, 15, 12, 10, 8, 6, 5, 4, 3, 3, 3, 2, 3, 4, 5, 5, 7, 9, 11, 13, 16, 16, 16 }, - { 14, 14, 11, 10, 9, 7, 7, 5, 5, 4, 3, 3, 2, 3, 3, 4, 5, 7, 9, 9, 12, 14, 15, 15 }, - { 9, 9, 9, 8, 7, 6, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 13 }, - { 14, 12, 10, 8, 6, 6, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 6, 8, 8, 9, 11, 14, 14, 14 }, - { 13, 10, 9, 8, 6, 6, 5, 4, 4, 4, 3, 3, 2, 3, 4, 5, 6, 8, 9, 9, 11, 12, 14, 14 }, - { 16, 13, 12, 11, 9, 6, 5, 5, 4, 4, 4, 3, 2, 3, 3, 4, 5, 7, 8, 10, 14, 16, 16, 16 }, - { 13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14 }, -}; - -static const uint16_t envelope_quant_index_huffcodes[13][24] = { - {0x0006, 0x003e, 0x001c, 0x001d, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x0000, 0x0001, - 0x0002, 0x000d, 0x001e, 0x007e, 0x00fe, 0x01fe, 0x07fc, 0x07fd, 0x0ffc, 0x0ffd, 0x0ffe, 0x0fff}, - {0x03fe, 0x00fe, 0x003e, 0x001c, 0x001d, 0x000c, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x000d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x0ffe, 0x1ffe, 0x7ffc, 0x7ffd, 0x7ffe, 0xfffe, 0xffff}, - {0x0ffe, 0x03fe, 0x00fe, 0x003e, 0x001c, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x0000, - 0x0001, 0x0002, 0x000c, 0x000d, 0x001d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x1ffe, 0x3ffe, 0x3fff}, - {0x1ffc, 0x03fe, 0x01fc, 0x01fd, 0x007c, 0x007d, 0x001c, 0x001d, 0x000a, 0x0000, 0x0001, 0x0002, - 0x0003, 0x0004, 0x000b, 0x000c, 0x000d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x1ffd, 0x1ffe, 0x1fff}, - {0x0ffe, 0x1ffe, 0x03fe, 0x00fe, 0x003c, 0x003d, 0x001a, 0x001b, 0x000a, 0x000b, 0x0000, 0x0001, - 0x0002, 0x0003, 0x0004, 0x000c, 0x001c, 0x001d, 0x003e, 0x007e, 0x01fe, 0x07fe, 0x3ffe, 0x3fff}, - {0x0ffe, 0x07fe, 0x01fe, 0x00fc, 0x00fd, 0x007c, 0x001c, 0x000a, 0x000b, 0x0000, 0x0001, 0x0002, - 0x0003, 0x0004, 0x000c, 0x000d, 0x001d, 0x001e, 0x007d, 0x00fe, 0x03fe, 0x1ffe, 0x3ffe, 0x3fff}, - {0x7ffc, 0xfffc, 0x7ffd, 0x0ffe, 0x03fe, 0x00fe, 0x003e, 0x001c, 0x000c, 0x0002, 0x0003, 0x0004, - 0x0000, 0x0005, 0x000d, 0x001d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x1ffe, 0xfffd, 0xfffe, 0xffff}, - {0x3ffc, 0x3ffd, 0x07fe, 0x03fe, 0x01fc, 0x007c, 0x007d, 0x001c, 0x001d, 0x000c, 0x0002, 0x0003, - 0x0000, 0x0004, 0x0005, 0x000d, 0x001e, 0x007e, 0x01fd, 0x01fe, 0x0ffe, 0x3ffe, 0x7ffe, 0x7fff}, - {0x01fc, 0x01fd, 0x01fe, 0x00fc, 0x007c, 0x003c, 0x001c, 0x000c, 0x0000, 0x0001, 0x0002, 0x0003, - 0x0004, 0x0005, 0x000d, 0x001d, 0x003d, 0x007d, 0x00fd, 0x03fe, 0x07fe, 0x0ffe, 0x1ffe, 0x1fff}, - {0x3ffc, 0x0ffe, 0x03fe, 0x00fc, 0x003c, 0x003d, 0x001c, 0x000c, 0x0000, 0x0001, 0x0002, 0x0003, - 0x0004, 0x0005, 0x000d, 0x001d, 0x003e, 0x00fd, 0x00fe, 0x01fe, 0x07fe, 0x3ffd, 0x3ffe, 0x3fff}, - {0x1ffe, 0x03fe, 0x01fc, 0x00fc, 0x003c, 0x003d, 0x001c, 0x000a, 0x000b, 0x000c, 0x0002, 0x0003, - 0x0000, 0x0004, 0x000d, 0x001d, 0x003e, 0x00fd, 0x01fd, 0x01fe, 0x07fe, 0x0ffe, 0x3ffe, 0x3fff}, - {0xfffc, 0x1ffe, 0x0ffe, 0x07fe, 0x01fe, 0x003e, 0x001c, 0x001d, 0x000a, 0x000b, 0x000c, 0x0002, - 0x0000, 0x0003, 0x0004, 0x000d, 0x001e, 0x007e, 0x00fe, 0x03fe, 0x3ffe, 0xfffd, 0xfffe, 0xffff}, - {0x1ffc, 0x3ffa, 0x3ffb, 0x3ffc, 0x03fe, 0x00fe, 0x007c, 0x007d, 0x001c, 0x000c, 0x0002, 0x0003, - 0x0000, 0x0004, 0x0005, 0x000d, 0x001d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x3ffd, 0x3ffe, 0x3fff}, -}; - - -static const uint8_t cvh_huffbits0[191] = { - 1, 4, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, - 11, 11, 4, 5, 6, 7, 7, 8, 8, 9, 9, 9, - 9, 10, 11, 11, 5, 6, 7, 8, 8, 9, 9, 9, - 9, 10, 10, 10, 11, 12, 6, 7, 8, 9, 9, 9, - 9, 10, 10, 10, 10, 11, 12, 13, 7, 7, 8, 9, - 9, 9, 10, 10, 10, 10, 11, 11, 12, 13, 8, 8, - 9, 9, 9, 10, 10, 10, 10, 11, 11, 12, 13, 14, - 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 13, - 13, 15, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, - 12, 13, 14, 15, 9, 9, 9, 10, 10, 10, 11, 11, - 12, 13, 12, 14, 15, 16, 9, 9, 10, 10, 10, 10, - 11, 12, 12, 14, 14, 16, 16, 0, 9, 9, 10, 10, - 11, 11, 12, 13, 13, 14, 14, 15, 0, 0, 10, 10, - 10, 11, 11, 12, 12, 13, 15, 15, 16, 0, 0, 0, - 11, 11, 11, 12, 13, 13, 13, 15, 16, 16, 0, 0, - 0, 0, 11, 11, 12, 13, 13, 14, 15, 16, 16, -}; - -static const uint16_t cvh_huffcodes0[191] = { - 0x0000,0x0008,0x002c,0x002d,0x0062,0x0063,0x00d4,0x00d5,0x00d6,0x01c6,0x01c7,0x03ca, - 0x07d6,0x07d7,0x0009,0x0014,0x002e,0x0064,0x0065,0x00d7,0x00d8,0x01c8,0x01c9,0x01ca, - 0x01cb,0x03cb,0x07d8,0x07d9,0x0015,0x002f,0x0066,0x00d9,0x00da,0x01cc,0x01cd,0x01ce, - 0x01cf,0x03cc,0x03cd,0x03ce,0x07da,0x0fe4,0x0030,0x0067,0x00db,0x01d0,0x01d1,0x01d2, - 0x01d3,0x03cf,0x03d0,0x03d1,0x03d2,0x07db,0x0fe5,0x1fea,0x0068,0x0069,0x00dc,0x01d4, - 0x01d5,0x01d6,0x03d3,0x03d4,0x03d5,0x03d6,0x07dc,0x07dd,0x0fe6,0x1feb,0x00dd,0x00de, - 0x01d7,0x01d8,0x01d9,0x03d7,0x03d8,0x03d9,0x03da,0x07de,0x07df,0x0fe7,0x1fec,0x3ff2, - 0x00df,0x00e0,0x01da,0x01db,0x03db,0x03dc,0x07e0,0x07e1,0x07e2,0x0fe8,0x0fe9,0x1fed, - 0x1fee,0x7ff4,0x00e1,0x00e2,0x01dc,0x01dd,0x03dd,0x03de,0x07e3,0x07e4,0x07e5,0x0fea, - 0x0feb,0x1fef,0x3ff3,0x7ff5,0x01de,0x01df,0x01e0,0x03df,0x03e0,0x03e1,0x07e6,0x07e7, - 0x0fec,0x1ff0,0x0fed,0x3ff4,0x7ff6,0xfff8,0x01e1,0x01e2,0x03e2,0x03e3,0x03e4,0x03e5, - 0x07e8,0x0fee,0x0fef,0x3ff5,0x3ff6,0xfff9,0xfffa,0xfffa,0x01e3,0x01e4,0x03e6,0x03e7, - 0x07e9,0x07ea,0x0ff0,0x1ff1,0x1ff2,0x3ff7,0x3ff8,0x7ff7,0x7ff7,0xfffa,0x03e8,0x03e9, - 0x03ea,0x07eb,0x07ec,0x0ff1,0x0ff2,0x1ff3,0x7ff8,0x7ff9,0xfffb,0x3ff8,0x7ff7,0x7ff7, - 0x07ed,0x07ee,0x07ef,0x0ff3,0x1ff4,0x1ff5,0x1ff6,0x7ffa,0xfffc,0xfffd,0xfffb,0xfffb, - 0x3ff8,0x7ff7,0x07f0,0x07f1,0x0ff4,0x1ff7,0x1ff8,0x3ff9,0x7ffb,0xfffe,0xffff, -}; - - -static const uint8_t cvh_huffbits1[97] = { - 1, 4, 5, 6, 7, 8, 8, 9, 10, 10, 4, 5, - 6, 7, 7, 8, 8, 9, 9, 11, 5, 5, 6, 7, - 8, 8, 9, 9, 10, 11, 6, 6, 7, 8, 8, 9, - 9, 10, 11, 12, 7, 7, 8, 8, 9, 9, 10, 11, - 11, 13, 8, 8, 8, 9, 9, 10, 10, 11, 12, 14, - 8, 8, 8, 9, 10, 11, 11, 12, 13, 15, 9, 9, - 9, 10, 11, 12, 12, 14, 14, 0, 9, 9, 9, 10, - 11, 12, 14, 16, 0, 0, 10, 10, 11, 12, 13, 14, + { 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, + 5, 5, 6, 7, 8, 9, 11, 11, 12, 12, 12, 12 }, + { 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 15, 15, 15, 16, 16 }, + { 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, + 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14 }, + { 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, + 7, 7, 7, 9, 9, 9, 10, 11, 13, 13, 13, 13 }, + { 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, + 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14 }, + { 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, + 7, 7, 8, 8, 8, 9, 10, 11, 12, 13, 14, 14 }, + { 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 15, 15, 16, 16, 16, 16 }, + { 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 7, 7, + 7, 9, 9, 9, 10, 11, 12, 14, 14, 14, 15, 15 }, + { 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 9, 10, 11, 12, 13, 13 }, + { 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, + 6, 8, 8, 8, 9, 10, 11, 12, 14, 14, 14, 14 }, + { 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, + 6, 8, 8, 9, 9, 9, 10, 11, 12, 13, 14, 14 }, + { 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 16, 16, 16, 16 }, + { 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 7, 7, + 7, 8, 9, 10, 11, 13, 14, 14, 14, 14, 14, 14 }, +}; + +static const uint8_t envelope_quant_index_huffsyms[13][24] = { + { 10, 11, 12, 0, 4, 5, 6, 7, 8, 9, 13, 2, + 3, 14, 1, 15, 16, 17, 18, 19, 20, 21, 22, 23 }, + { 6, 7, 8, 9, 10, 11, 5, 12, 3, 4, 13, 2, + 14, 1, 15, 0, 16, 17, 18, 19, 20, 21, 22, 23 }, + { 11, 12, 13, 5, 6, 7, 8, 9, 10, 14, 15, 4, + 16, 17, 3, 18, 2, 19, 1, 20, 0, 21, 22, 23 }, + { 9, 10, 11, 12, 13, 8, 14, 15, 16, 6, 7, 17, + 4, 5, 18, 2, 3, 19, 1, 20, 0, 21, 22, 23 }, + { 10, 11, 12, 13, 14, 8, 9, 15, 6, 7, 16, 17, + 4, 5, 18, 19, 3, 20, 2, 21, 0, 1, 22, 23 }, + { 9, 10, 11, 12, 13, 7, 8, 14, 15, 6, 16, 17, + 5, 18, 3, 4, 19, 2, 20, 1, 0, 21, 22, 23 }, + { 12, 9, 10, 11, 13, 8, 14, 7, 15, 16, 6, 17, + 5, 18, 4, 19, 3, 20, 0, 2, 1, 21, 22, 23 }, + { 12, 10, 11, 13, 14, 9, 15, 7, 8, 16, 5, 6, + 17, 4, 18, 19, 3, 2, 20, 0, 1, 21, 22, 23 }, + { 8, 9, 10, 11, 12, 13, 7, 14, 6, 15, 5, 16, + 4, 17, 3, 18, 0, 1, 2, 19, 20, 21, 22, 23 }, + { 8, 9, 10, 11, 12, 13, 7, 14, 6, 15, 4, 5, + 16, 3, 17, 18, 19, 2, 20, 1, 0, 21, 22, 23 }, + { 12, 10, 11, 13, 7, 8, 9, 14, 6, 15, 4, 5, + 16, 3, 17, 2, 18, 19, 1, 20, 21, 0, 22, 23 }, + { 12, 11, 13, 14, 8, 9, 10, 15, 6, 7, 16, 5, + 17, 18, 4, 19, 3, 2, 1, 20, 0, 21, 22, 23 }, + { 12, 10, 11, 13, 14, 9, 15, 8, 16, 17, 6, 7, + 18, 5, 19, 4, 20, 0, 1, 2, 3, 21, 22, 23 }, +}; + + +static const uint8_t cvh_huffbits0[181] = { + 1, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, + 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, }; +static const uint8_t cvh_huffsyms0[181] = { + 0, 1, 14, 15, 28, 2, 3, 16, 29, 42, 4, 5, 17, 18, 30, + 43, 56, 57, 6, 7, 8, 19, 20, 31, 32, 44, 58, 70, 71, 84, + 85, 98, 99, 9, 10, 21, 22, 23, 24, 33, 34, 35, 36, 45, 46, + 47, 48, 59, 60, 61, 72, 73, 74, 86, 87, 100, 101, 112, 113, 114, + 126, 127, 140, 141, 11, 25, 37, 38, 39, 49, 50, 51, 52, 62, 63, + 64, 65, 75, 76, 77, 78, 88, 89, 102, 103, 115, 116, 117, 128, 129, + 130, 131, 142, 143, 154, 155, 156, 12, 13, 26, 27, 40, 53, 66, 67, + 79, 80, 90, 91, 92, 104, 105, 106, 118, 119, 132, 144, 145, 157, 158, + 168, 169, 170, 182, 183, 41, 54, 68, 81, 93, 94, 107, 108, 120, 122, + 133, 134, 146, 159, 160, 171, 184, 55, 69, 82, 95, 96, 109, 121, 147, + 148, 161, 172, 173, 174, 185, 186, 83, 110, 123, 135, 136, 149, 150, 187, + 97, 111, 124, 151, 162, 163, 175, 188, 125, 137, 138, 164, 176, 177, 189, + 190, +}; -static const uint16_t cvh_huffcodes1[97] = { - 0x0000,0x0008,0x0014,0x0030,0x006a,0x00e2,0x00e3,0x01e4,0x03ec,0x03ed,0x0009,0x0015, - 0x0031,0x006b,0x006c,0x00e4,0x00e5,0x01e5,0x01e6,0x07f0,0x0016,0x0017,0x0032,0x006d, - 0x00e6,0x00e7,0x01e7,0x01e8,0x03ee,0x07f1,0x0033,0x0034,0x006e,0x00e8,0x00e9,0x01e9, - 0x01ea,0x03ef,0x07f2,0x0ff6,0x006f,0x0070,0x00ea,0x00eb,0x01eb,0x01ec,0x03f0,0x07f3, - 0x07f4,0x1ffa,0x00ec,0x00ed,0x00ee,0x01ed,0x01ee,0x03f1,0x03f2,0x07f5,0x0ff7,0x3ffa, - 0x00ef,0x00f0,0x00f1,0x01ef,0x03f3,0x07f6,0x07f7,0x0ff8,0x1ffb,0x7ffe,0x01f0,0x01f1, - 0x01f2,0x03f4,0x07f8,0x0ff9,0x0ffa,0x3ffb,0x3ffc,0x0000,0x01f3,0x01f4,0x01f5,0x03f5, - 0x07f9,0x0ffb,0x3ffd,0xfffe,0x0000,0x0000,0x03f6,0x03f7,0x07fa,0x0ffc,0x1ffc,0x3ffe, - 0xffff, +static const uint8_t cvh_huffbits1[94] = { + 1, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, + 14, 15, 16, 16, }; -static const uint8_t cvh_huffbits2[48] = { - 1, 4, 5, 7, 8, 9, 10, 3, 4, 5, 7, 8, - 9, 10, 5, 5, 6, 7, 8, 10, 10, 7, 6, 7, - 8, 9, 10, 12, 8, 8, 8, 9, 10, 12, 14, 8, - 9, 9, 10, 11, 15, 16, 9, 10, 11, 12, 13, 16, -}; - -static const uint16_t cvh_huffcodes2[48] = { - 0x0000,0x000a,0x0018,0x0074,0x00f2,0x01f4,0x03f6,0x0004,0x000b,0x0019,0x0075,0x00f3, - 0x01f5,0x03f7,0x001a,0x001b,0x0038,0x0076,0x00f4,0x03f8,0x03f9,0x0077,0x0039,0x0078, - 0x00f5,0x01f6,0x03fa,0x0ffc,0x00f6,0x00f7,0x00f8,0x01f7,0x03fb,0x0ffd,0x3ffe,0x00f9, - 0x01f8,0x01f9,0x03fc,0x07fc,0x7ffe,0xfffe,0x01fa,0x03fd,0x07fd,0x0ffe,0x1ffe,0xffff, -}; - -static const uint8_t cvh_huffbits3[607] = { - 2, 4, 6, 8, 10, 5, 5, 6, 8, 10, 7, 8, - 8, 10, 12, 9, 9, 10, 12, 15, 10, 11, 13, 16, - 16, 5, 6, 8, 10, 11, 5, 6, 8, 10, 12, 7, - 7, 8, 10, 13, 9, 9, 10, 12, 15, 12, 11, 13, - 16, 16, 7, 9, 10, 12, 15, 7, 8, 10, 12, 13, - 9, 9, 11, 13, 16, 11, 11, 12, 14, 16, 12, 12, - 14, 16, 0, 9, 11, 12, 16, 16, 9, 10, 13, 15, - 16, 10, 11, 12, 16, 16, 13, 13, 16, 16, 16, 16, - 16, 15, 16, 0, 11, 13, 16, 16, 15, 11, 13, 15, - 16, 16, 13, 13, 16, 16, 0, 14, 16, 16, 16, 0, - 16, 16, 0, 0, 0, 4, 6, 8, 10, 13, 6, 6, - 8, 10, 13, 9, 8, 10, 12, 16, 10, 10, 11, 15, - 16, 13, 12, 14, 16, 16, 5, 6, 8, 11, 13, 6, - 6, 8, 10, 13, 8, 8, 9, 11, 14, 10, 10, 12, - 12, 16, 13, 12, 13, 15, 16, 7, 8, 9, 12, 16, - 7, 8, 10, 12, 14, 9, 9, 10, 13, 16, 11, 10, - 12, 15, 16, 13, 13, 16, 16, 0, 9, 11, 13, 16, - 16, 9, 10, 12, 15, 16, 10, 11, 13, 16, 16, 13, - 12, 16, 16, 16, 16, 16, 16, 16, 0, 11, 13, 16, - 16, 16, 11, 13, 16, 16, 16, 12, 13, 15, 16, 0, - 16, 16, 16, 16, 0, 16, 16, 0, 0, 0, 6, 8, - 11, 13, 16, 8, 8, 10, 12, 16, 11, 10, 11, 13, - 16, 12, 13, 13, 15, 16, 16, 16, 14, 16, 0, 6, - 8, 10, 13, 16, 8, 8, 10, 12, 16, 10, 10, 11, - 13, 16, 13, 12, 13, 16, 16, 14, 14, 14, 16, 0, - 8, 9, 11, 13, 16, 8, 9, 11, 16, 14, 10, 10, - 12, 15, 16, 12, 12, 13, 16, 16, 15, 16, 16, 16, - 0, 10, 12, 15, 16, 16, 10, 12, 12, 14, 16, 12, - 12, 13, 16, 16, 14, 15, 16, 16, 0, 16, 16, 16, - 0, 0, 12, 15, 15, 16, 0, 13, 13, 16, 16, 0, - 14, 16, 16, 16, 0, 16, 16, 16, 0, 0, 0, 0, - 0, 0, 0, 8, 10, 13, 15, 16, 10, 11, 13, 16, - 16, 13, 13, 14, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 0, 8, 10, 11, 15, 16, 9, 10, 12, - 16, 16, 12, 12, 15, 16, 16, 16, 14, 16, 16, 16, - 16, 16, 16, 16, 0, 9, 11, 14, 16, 16, 10, 11, - 13, 16, 16, 14, 13, 14, 16, 16, 16, 15, 15, 16, - 0, 16, 16, 16, 0, 0, 11, 13, 16, 16, 16, 11, - 13, 15, 16, 16, 13, 16, 16, 16, 0, 16, 16, 16, - 16, 0, 16, 16, 0, 0, 0, 15, 16, 16, 16, 0, - 14, 16, 16, 16, 0, 16, 16, 16, 0, 0, 16, 16, - 0, 0, 0, 0, 0, 0, 0, 0, 9, 13, 16, 16, - 16, 11, 13, 16, 16, 16, 14, 15, 16, 16, 0, 15, - 16, 16, 16, 0, 16, 16, 0, 0, 0, 9, 13, 15, - 15, 16, 12, 13, 14, 16, 16, 16, 15, 16, 16, 0, - 16, 16, 16, 16, 0, 16, 16, 0, 0, 0, 11, 13, - 15, 16, 0, 12, 14, 16, 16, 0, 16, 16, 16, 16, - 0, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 16, - 16, 16, 16, 0, 16, 16, 16, 16, 0, 16, 16, 16, - 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 16, 0, 0, 0, 16, 16, -}; - - -static const uint16_t cvh_huffcodes3[607] = { - 0x0000,0x0004,0x0022,0x00c6,0x03b0,0x000c,0x000d,0x0023,0x00c7,0x03b1,0x005c,0x00c8, - 0x00c9,0x03b2,0x0fa4,0x01c2,0x01c3,0x03b3,0x0fa5,0x7f72,0x03b4,0x07b2,0x1f9a,0xff24, - 0xff25,0x000e,0x0024,0x00ca,0x03b5,0x07b3,0x000f,0x0025,0x00cb,0x03b6,0x0fa6,0x005d, - 0x005e,0x00cc,0x03b7,0x1f9b,0x01c4,0x01c5,0x03b8,0x0fa7,0x7f73,0x0fa8,0x07b4,0x1f9c, - 0xff26,0xff27,0x005f,0x01c6,0x03b9,0x0fa9,0x7f74,0x0060,0x00cd,0x03ba,0x0faa,0x1f9d, - 0x01c7,0x01c8,0x07b5,0x1f9e,0xff28,0x07b6,0x07b7,0x0fab,0x3fa2,0xff29,0x0fac,0x0fad, - 0x3fa3,0xff2a,0x3fa2,0x01c9,0x07b8,0x0fae,0xff2b,0xff2c,0x01ca,0x03bb,0x1f9f,0x7f75, - 0xff2d,0x03bc,0x07b9,0x0faf,0xff2e,0xff2f,0x1fa0,0x1fa1,0xff30,0xff31,0xff32,0xff33, - 0xff34,0x7f76,0xff35,0xff31,0x07ba,0x1fa2,0xff36,0xff37,0x7f77,0x07bb,0x1fa3,0x7f78, - 0xff38,0xff39,0x1fa4,0x1fa5,0xff3a,0xff3b,0xff2e,0x3fa4,0xff3c,0xff3d,0xff3e,0xff31, - 0xff3f,0xff40,0xff30,0xff31,0xff31,0x0005,0x0026,0x00ce,0x03bd,0x1fa6,0x0027,0x0028, - 0x00cf,0x03be,0x1fa7,0x01cb,0x00d0,0x03bf,0x0fb0,0xff41,0x03c0,0x03c1,0x07bc,0x7f79, - 0xff42,0x1fa8,0x0fb1,0x3fa5,0xff43,0xff44,0x0010,0x0029,0x00d1,0x07bd,0x1fa9,0x002a, - 0x002b,0x00d2,0x03c2,0x1faa,0x00d3,0x00d4,0x01cc,0x07be,0x3fa6,0x03c3,0x03c4,0x0fb2, - 0x0fb3,0xff45,0x1fab,0x0fb4,0x1fac,0x7f7a,0xff46,0x0061,0x00d5,0x01cd,0x0fb5,0xff47, - 0x0062,0x00d6,0x03c5,0x0fb6,0x3fa7,0x01ce,0x01cf,0x03c6,0x1fad,0xff48,0x07bf,0x03c7, - 0x0fb7,0x7f7b,0xff49,0x1fae,0x1faf,0xff4a,0xff4b,0x7f7b,0x01d0,0x07c0,0x1fb0,0xff4c, - 0xff4d,0x01d1,0x03c8,0x0fb8,0x7f7c,0xff4e,0x03c9,0x07c1,0x1fb1,0xff4f,0xff50,0x1fb2, - 0x0fb9,0xff51,0xff52,0xff53,0xff54,0xff55,0xff56,0xff57,0xff52,0x07c2,0x1fb3,0xff58, - 0xff59,0xff5a,0x07c3,0x1fb4,0xff5b,0xff5c,0xff5d,0x0fba,0x1fb5,0x7f7d,0xff5e,0xff4f, - 0xff5f,0xff60,0xff61,0xff62,0xff52,0xff63,0xff64,0xff51,0xff52,0xff52,0x002c,0x00d7, - 0x07c4,0x1fb6,0xff65,0x00d8,0x00d9,0x03ca,0x0fbb,0xff66,0x07c5,0x03cb,0x07c6,0x1fb7, - 0xff67,0x0fbc,0x1fb8,0x1fb9,0x7f7e,0xff68,0xff69,0xff6a,0x3fa8,0xff6b,0x7f7e,0x002d, - 0x00da,0x03cc,0x1fba,0xff6c,0x00db,0x00dc,0x03cd,0x0fbd,0xff6d,0x03ce,0x03cf,0x07c7, - 0x1fbb,0xff6e,0x1fbc,0x0fbe,0x1fbd,0xff6f,0xff70,0x3fa9,0x3faa,0x3fab,0xff71,0xff6f, - 0x00dd,0x01d2,0x07c8,0x1fbe,0xff72,0x00de,0x01d3,0x07c9,0xff73,0x3fac,0x03d0,0x03d1, - 0x0fbf,0x7f7f,0xff74,0x0fc0,0x0fc1,0x1fbf,0xff75,0xff76,0x7f80,0xff77,0xff78,0xff79, - 0xff75,0x03d2,0x0fc2,0x7f81,0xff7a,0xff7b,0x03d3,0x0fc3,0x0fc4,0x3fad,0xff7c,0x0fc5, - 0x0fc6,0x1fc0,0xff7d,0xff7e,0x3fae,0x7f82,0xff7f,0xff80,0xff80,0xff81,0xff82,0xff83, - 0xff80,0xff80,0x0fc7,0x7f83,0x7f84,0xff84,0xff7a,0x1fc1,0x1fc2,0xff85,0xff86,0x3fad, - 0x3faf,0xff87,0xff88,0xff89,0xff7d,0xff8a,0xff8b,0xff8c,0xff80,0xff80,0x3fae,0x7f82, - 0xff7f,0xff80,0xff80,0x00df,0x03d4,0x1fc3,0x7f85,0xff8d,0x03d5,0x07ca,0x1fc4,0xff8e, - 0xff8f,0x1fc5,0x1fc6,0x3fb0,0xff90,0xff91,0xff92,0xff93,0xff94,0xff95,0xff96,0xff97, - 0xff98,0xff99,0xff9a,0xff95,0x00e0,0x03d6,0x07cb,0x7f86,0xff9b,0x01d4,0x03d7,0x0fc8, - 0xff9c,0xff9d,0x0fc9,0x0fca,0x7f87,0xff9e,0xff9f,0xffa0,0x3fb1,0xffa1,0xffa2,0xffa3, - 0xffa4,0xffa5,0xffa6,0xffa7,0xffa2,0x01d5,0x07cc,0x3fb2,0xffa8,0xffa9,0x03d8,0x07cd, - 0x1fc7,0xffaa,0xffab,0x3fb3,0x1fc8,0x3fb4,0xffac,0xffad,0xffae,0x7f88,0x7f89,0xffaf, - 0xffaf,0xffb0,0xffb1,0xffb2,0xffaf,0xffaf,0x07ce,0x1fc9,0xffb3,0xffb4,0xffb5,0x07cf, - 0x1fca,0x7f8a,0xffb6,0xffb7,0x1fcb,0xffb8,0xffb9,0xffba,0xffba,0xffbb,0xffbc,0xffbd, - 0xffbe,0xffbe,0xffbf,0xffc0,0xffbd,0xffbe,0xffbe,0x7f8b,0xffc1,0xffc2,0xffc3,0xffb4, - 0x3fb5,0xffc4,0xffc5,0xffc6,0xffb6,0xffc7,0xffc8,0xffc9,0xffba,0xffba,0xffca,0xffcb, - 0xffbd,0xffbe,0xffbe,0xffbb,0xffbc,0xffbd,0xffbe,0xffbe,0x01d6,0x1fcc,0xffcc,0xffcd, - 0xffce,0x07d0,0x1fcd,0xffcf,0xffd0,0xffd1,0x3fb6,0x7f8c,0xffd2,0xffd3,0xff90,0x7f8d, - 0xffd4,0xffd5,0xffd6,0xff95,0xffd7,0xffd8,0xff94,0xff95,0xff95,0x01d7,0x1fce,0x7f8e, - 0x7f8f,0xffd9,0x0fcb,0x1fcf,0x3fb7,0xffda,0xffdb,0xffdc,0x7f90,0xffdd,0xffde,0xff9e, - 0xffdf,0xffe0,0xffe1,0xffe2,0xffa2,0xffe3,0xffe4,0xffa1,0xffa2,0xffa2,0x07d1,0x1fd0, - 0x7f91,0xffe5,0xffa8,0x0fcc,0x3fb8,0xffe6,0xffe7,0xffaa,0xffe8,0xffe9,0xffea,0xffeb, - 0xffac,0xffec,0xffed,0xffee,0xffaf,0xffaf,0xffae,0x7f88,0x7f89,0xffaf,0xffaf,0xffef, - 0xfff0,0xfff1,0xfff2,0xffb4,0xfff3,0xfff4,0xfff5,0xfff6,0xffb6,0xfff7,0xfff8,0xfff9, - 0xffba,0xffba,0xfffa,0xfffb,0xffbd,0xffbe,0xffbe,0xffbb,0xffbc,0xffbd,0xffbe,0xffbe, - 0xfffc,0xfffd,0xffb3,0xffb4,0xffb4,0xfffe,0xffff, -}; - -static const uint8_t cvh_huffbits4[246] = { - 2, 4, 7, 10, 4, 5, 7, 10, 7, 8, 10, 14, - 11, 11, 15, 15, 4, 5, 9, 12, 5, 5, 8, 12, - 8, 7, 10, 15, 11, 11, 15, 15, 7, 9, 12, 15, - 8, 8, 12, 15, 10, 10, 13, 15, 14, 14, 15, 0, - 11, 13, 15, 15, 11, 13, 15, 15, 14, 15, 15, 0, - 15, 15, 0, 0, 4, 5, 9, 13, 5, 6, 9, 13, - 9, 9, 11, 15, 14, 13, 15, 15, 4, 6, 9, 12, - 5, 6, 9, 13, 9, 8, 11, 15, 13, 12, 15, 15, - 7, 9, 12, 15, 7, 8, 11, 15, 10, 10, 14, 15, - 14, 15, 15, 0, 10, 12, 15, 15, 11, 13, 15, 15, - 15, 15, 15, 0, 15, 15, 0, 0, 6, 9, 13, 14, - 8, 9, 12, 15, 12, 12, 15, 15, 15, 15, 15, 0, - 7, 9, 13, 15, 8, 9, 12, 15, 11, 12, 15, 15, - 15, 15, 15, 0, 9, 11, 15, 15, 9, 11, 15, 15, - 14, 14, 15, 0, 15, 15, 0, 0, 14, 15, 15, 0, - 14, 15, 15, 0, 15, 15, 0, 0, 0, 0, 0, 0, - 9, 12, 15, 15, 12, 13, 15, 15, 15, 15, 15, 0, - 15, 15, 0, 0, 10, 12, 15, 15, 12, 14, 15, 15, - 15, 15, 15, 0, 15, 15, 0, 0, 14, 15, 15, 0, - 15, 15, 15, 0, 15, 15, 0, 0, 0, 0, 0, 0, - 15, 15, 0, 0, 15, 15, -}; - - -static const uint16_t cvh_huffcodes4[246] = { - 0x0000,0x0004,0x006c,0x03e6,0x0005,0x0012,0x006d,0x03e7,0x006e,0x00e8,0x03e8,0x3fc4, - 0x07e0,0x07e1,0x7fa4,0x7fa5,0x0006,0x0013,0x01e2,0x0fda,0x0014,0x0015,0x00e9,0x0fdb, - 0x00ea,0x006f,0x03e9,0x7fa6,0x07e2,0x07e3,0x7fa7,0x7fa8,0x0070,0x01e3,0x0fdc,0x7fa9, - 0x00eb,0x00ec,0x0fdd,0x7faa,0x03ea,0x03eb,0x1fd6,0x7fab,0x3fc5,0x3fc6,0x7fac,0x1fd6, - 0x07e4,0x1fd7,0x7fad,0x7fae,0x07e5,0x1fd8,0x7faf,0x7fb0,0x3fc7,0x7fb1,0x7fb2,0x1fd6, - 0x7fb3,0x7fb4,0x1fd6,0x1fd6,0x0007,0x0016,0x01e4,0x1fd9,0x0017,0x0032,0x01e5,0x1fda, - 0x01e6,0x01e7,0x07e6,0x7fb5,0x3fc8,0x1fdb,0x7fb6,0x7fb7,0x0008,0x0033,0x01e8,0x0fde, - 0x0018,0x0034,0x01e9,0x1fdc,0x01ea,0x00ed,0x07e7,0x7fb8,0x1fdd,0x0fdf,0x7fb9,0x7fba, - 0x0071,0x01eb,0x0fe0,0x7fbb,0x0072,0x00ee,0x07e8,0x7fbc,0x03ec,0x03ed,0x3fc9,0x7fbd, - 0x3fca,0x7fbe,0x7fbf,0x3fc9,0x03ee,0x0fe1,0x7fc0,0x7fc1,0x07e9,0x1fde,0x7fc2,0x7fc3, - 0x7fc4,0x7fc5,0x7fc6,0x3fc9,0x7fc7,0x7fc8,0x3fc9,0x3fc9,0x0035,0x01ec,0x1fdf,0x3fcb, - 0x00ef,0x01ed,0x0fe2,0x7fc9,0x0fe3,0x0fe4,0x7fca,0x7fcb,0x7fcc,0x7fcd,0x7fce,0x7fca, - 0x0073,0x01ee,0x1fe0,0x7fcf,0x00f0,0x01ef,0x0fe5,0x7fd0,0x07ea,0x0fe6,0x7fd1,0x7fd2, - 0x7fd3,0x7fd4,0x7fd5,0x7fd1,0x01f0,0x07eb,0x7fd6,0x7fd7,0x01f1,0x07ec,0x7fd8,0x7fd9, - 0x3fcc,0x3fcd,0x7fda,0x7fda,0x7fdb,0x7fdc,0x7fda,0x7fda,0x3fce,0x7fdd,0x7fde,0x7fd6, - 0x3fcf,0x7fdf,0x7fe0,0x7fd8,0x7fe1,0x7fe2,0x7fda,0x7fda,0x3fcc,0x3fcd,0x7fda,0x7fda, - 0x01f2,0x0fe7,0x7fe3,0x7fe4,0x0fe8,0x1fe1,0x7fe5,0x7fe6,0x7fe7,0x7fe8,0x7fe9,0x7fca, - 0x7fea,0x7feb,0x7fca,0x7fca,0x03ef,0x0fe9,0x7fec,0x7fed,0x0fea,0x3fd0,0x7fee,0x7fef, - 0x7ff0,0x7ff1,0x7ff2,0x7fd1,0x7ff3,0x7ff4,0x7fd1,0x7fd1,0x3fd1,0x7ff5,0x7ff6,0x7fd6, - 0x7ff7,0x7ff8,0x7ff9,0x7fd8,0x7ffa,0x7ffb,0x7fda,0x7fda,0x3fcc,0x3fcd,0x7fda,0x7fda, - 0x7ffc,0x7ffd,0x7fd6,0x7fd6,0x7ffe,0x7fff, -}; - - -static const uint8_t cvh_huffbits5[230] = { - 2, 4, 8, 4, 5, 9, 9, 10, 14, 4, 6, 11, - 5, 6, 12, 10, 11, 15, 9, 11, 15, 10, 13, 15, - 14, 15, 0, 4, 6, 12, 6, 7, 12, 12, 12, 15, - 5, 7, 13, 6, 7, 13, 12, 13, 15, 10, 12, 15, - 11, 13, 15, 15, 15, 0, 8, 13, 15, 11, 12, 15, - 15, 15, 0, 10, 13, 15, 12, 15, 15, 15, 15, 0, - 15, 15, 0, 15, 15, 0, 0, 0, 0, 4, 5, 11, - 5, 7, 12, 11, 12, 15, 6, 7, 13, 7, 8, 14, - 12, 14, 15, 11, 13, 15, 12, 13, 15, 15, 15, 0, - 5, 6, 13, 7, 8, 15, 12, 14, 15, 6, 8, 14, - 7, 8, 15, 14, 15, 15, 12, 12, 15, 12, 13, 15, - 15, 15, 0, 9, 13, 15, 12, 13, 15, 15, 15, 0, - 11, 13, 15, 13, 13, 15, 15, 15, 0, 14, 15, 0, - 15, 15, 0, 0, 0, 0, 8, 10, 15, 11, 12, 15, - 15, 15, 0, 10, 12, 15, 12, 13, 15, 15, 15, 0, - 14, 15, 0, 15, 15, 0, 0, 0, 0, 8, 12, 15, - 12, 13, 15, 15, 15, 0, 11, 13, 15, 13, 15, 15, - 15, 15, 0, 15, 15, 0, 15, 15, 0, 0, 0, 0, - 14, 15, 0, 15, 15, 0, 0, 0, 0, 15, 15, 0, - 15, 15, -}; - - - -static const uint16_t cvh_huffcodes5[230] = { - 0x0000,0x0004,0x00f0,0x0005,0x0012,0x01f0,0x01f1,0x03e8,0x3fce,0x0006,0x0030,0x07de, - 0x0013,0x0031,0x0fd2,0x03e9,0x07df,0x7fb0,0x01f2,0x07e0,0x7fb1,0x03ea,0x1fd2,0x7fb2, - 0x3fcf,0x7fb3,0x0031,0x0007,0x0032,0x0fd3,0x0033,0x0070,0x0fd4,0x0fd5,0x0fd6,0x7fb4, - 0x0014,0x0071,0x1fd3,0x0034,0x0072,0x1fd4,0x0fd7,0x1fd5,0x7fb5,0x03eb,0x0fd8,0x7fb6, - 0x07e1,0x1fd6,0x7fb7,0x7fb8,0x7fb9,0x0072,0x00f1,0x1fd7,0x7fba,0x07e2,0x0fd9,0x7fbb, - 0x7fbc,0x7fbd,0x0070,0x03ec,0x1fd8,0x7fbe,0x0fda,0x7fbf,0x7fc0,0x7fc1,0x7fc2,0x0072, - 0x7fc3,0x7fc4,0x0071,0x7fc5,0x7fc6,0x0072,0x0034,0x0072,0x0072,0x0008,0x0015,0x07e3, - 0x0016,0x0073,0x0fdb,0x07e4,0x0fdc,0x7fc7,0x0035,0x0074,0x1fd9,0x0075,0x00f2,0x3fd0, - 0x0fdd,0x3fd1,0x7fc8,0x07e5,0x1fda,0x7fc9,0x0fde,0x1fdb,0x7fca,0x7fcb,0x7fcc,0x00f2, - 0x0017,0x0036,0x1fdc,0x0076,0x00f3,0x7fcd,0x0fdf,0x3fd2,0x7fce,0x0037,0x00f4,0x3fd3, - 0x0077,0x00f5,0x7fcf,0x3fd4,0x7fd0,0x7fd1,0x0fe0,0x0fe1,0x7fd2,0x0fe2,0x1fdd,0x7fd3, - 0x7fd4,0x7fd5,0x00f5,0x01f3,0x1fde,0x7fd6,0x0fe3,0x1fdf,0x7fd7,0x7fd8,0x7fd9,0x00f3, - 0x07e6,0x1fe0,0x7fda,0x1fe1,0x1fe2,0x7fdb,0x7fdc,0x7fdd,0x00f5,0x3fd5,0x7fde,0x00f4, - 0x7fdf,0x7fe0,0x00f5,0x0077,0x00f5,0x00f5,0x00f6,0x03ed,0x7fe1,0x07e7,0x0fe4,0x7fe2, - 0x7fe3,0x7fe4,0x0073,0x03ee,0x0fe5,0x7fe5,0x0fe6,0x1fe3,0x7fe6,0x7fe7,0x7fe8,0x00f2, - 0x3fd6,0x7fe9,0x0074,0x7fea,0x7feb,0x00f2,0x0075,0x00f2,0x00f2,0x00f7,0x0fe7,0x7fec, - 0x0fe8,0x1fe4,0x7fed,0x7fee,0x7fef,0x00f3,0x07e8,0x1fe5,0x7ff0,0x1fe6,0x7ff1,0x7ff2, - 0x7ff3,0x7ff4,0x00f5,0x7ff5,0x7ff6,0x00f4,0x7ff7,0x7ff8,0x00f5,0x0077,0x00f5,0x00f5, - 0x3fd7,0x7ff9,0x0036,0x7ffa,0x7ffb,0x00f3,0x0076,0x00f3,0x00f3,0x7ffc,0x7ffd,0x0000, - 0x7ffe,0x7fff, + +static const uint8_t cvh_huffsyms1[94] = { + 0, 1, 10, 2, 11, 20, 21, 3, 12, 22, 30, 31, 4, 13, 14, 23, 32, 40, 41, + 5, 6, 15, 16, 24, 25, 33, 34, 42, 43, 50, 51, 52, 60, 61, 62, 7, 17, 18, + 26, 27, 35, 36, 44, 45, 53, 54, 63, 70, 71, 72, 80, 81, 82, 8, 9, 28, 37, + 46, 55, 56, 64, 73, 83, 90, 91, 19, 29, 38, 47, 48, 57, 65, 66, 74, 84, 92, + 39, 58, 67, 75, 76, 85, 93, 49, 68, 94, 59, 77, 78, 86, 95, 69, 87, 96, }; +static const uint8_t cvh_huffbits2[48] = { + 1, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, + 10, 10, 11, 11, 12, 12, 12, 13, 14, 15, 16, 16, +}; + +static const uint8_t cvh_huffsyms2[48] = { + 0, 7, 1, 8, 2, 9, 14, 15, 16, 22, 3, 10, 17, 21, 23, 4, 11, 18, 24, + 28, 29, 30, 35, 5, 12, 25, 31, 36, 37, 42, 6, 13, 19, 20, 26, 32, 38, 43, + 39, 44, 27, 33, 45, 46, 34, 40, 41, 47, +}; + +static const uint8_t cvh_huffbits3[520] = { + 2, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, +}; + +static const uint16_t cvh_huffsyms3[520] = { + 0, 1, 125, 5, 6, 25, 30, 150, 2, 7, 26, 31, 126, 130, 131, + 151, 155, 156, 250, 275, 10, 35, 36, 50, 55, 175, 180, 3, 8, 11, + 12, 27, 32, 37, 56, 127, 132, 136, 152, 157, 160, 161, 176, 181, 251, + 255, 256, 276, 280, 281, 300, 305, 375, 400, 15, 16, 40, 41, 51, 60, + 61, 75, 80, 135, 162, 177, 185, 186, 200, 205, 301, 306, 405, 425, 500, + 525, 4, 9, 13, 17, 20, 28, 33, 38, 42, 52, 57, 81, 85, 128, + 133, 137, 140, 141, 158, 165, 166, 182, 187, 191, 206, 210, 257, 261, 277, + 282, 285, 286, 310, 311, 325, 330, 376, 380, 401, 406, 430, 21, 29, 46, + 62, 65, 66, 76, 86, 100, 105, 142, 153, 163, 190, 201, 211, 225, 230, + 252, 260, 262, 287, 302, 307, 381, 402, 426, 431, 450, 455, 505, 550, 14, + 18, 34, 43, 45, 53, 58, 67, 70, 71, 77, 87, 138, 146, 167, 168, + 171, 178, 183, 192, 207, 216, 235, 258, 265, 283, 291, 312, 315, 316, 326, + 331, 332, 335, 336, 350, 407, 410, 411, 530, 555, 22, 39, 47, 59, 63, + 82, 90, 91, 101, 106, 110, 111, 129, 134, 145, 154, 159, 170, 172, 188, + 195, 196, 202, 212, 215, 226, 231, 236, 253, 263, 266, 267, 278, 288, 290, + 292, 303, 317, 337, 355, 356, 377, 382, 385, 386, 432, 436, 451, 456, 460, + 501, 506, 526, 531, 551, 68, 72, 115, 147, 164, 184, 272, 295, 296, 297, + 309, 333, 340, 360, 387, 416, 427, 435, 437, 480, 510, 532, 556, 19, 44, + 54, 83, 97, 104, 107, 143, 173, 193, 208, 237, 268, 313, 320, 327, 341, + 351, 352, 378, 403, 412, 441, 442, 457, 475, 511, 515, 527, 528, 536, 552, + 23, 24, 48, 49, 64, 69, 73, 78, 79, 84, 88, 89, 92, 93, 94, + 95, 96, 98, 102, 103, 108, 109, 112, 113, 116, 117, 118, 120, 121, 139, + 144, 148, 149, 169, 174, 179, 189, 194, 197, 198, 203, 204, 209, 213, 214, + 217, 218, 219, 220, 221, 222, 223, 227, 228, 229, 232, 233, 234, 238, 240, + 241, 242, 243, 245, 246, 254, 259, 264, 269, 270, 271, 273, 279, 284, 289, + 293, 294, 298, 304, 308, 314, 318, 319, 321, 322, 323, 328, 329, 334, 338, + 339, 342, 343, 345, 346, 347, 353, 357, 358, 361, 362, 363, 365, 366, 367, + 379, 383, 384, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 404, + 408, 409, 413, 414, 415, 417, 418, 419, 420, 421, 422, 423, 428, 429, 433, + 434, 438, 439, 440, 443, 445, 446, 447, 452, 453, 454, 458, 459, 461, 462, + 463, 465, 466, 467, 468, 470, 471, 476, 477, 478, 481, 482, 483, 485, 486, + 487, 490, 491, 502, 503, 504, 507, 508, 509, 512, 513, 516, 517, 518, 520, + 521, 529, 533, 534, 535, 537, 538, 540, 541, 542, 543, 545, 546, 553, 557, + 558, 560, 561, 562, 563, 565, 566, 567, 575, 576, 577, 578, 580, 581, 582, + 583, 585, 586, 587, 590, 591, 600, 601, 605, 606, +}; + +static const uint8_t cvh_huffbits4[209] = { + 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, + 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +}; + +static const uint8_t cvh_huffsyms4[209] = { + 0, 1, 4, 16, 64, 80, 5, 17, 20, 21, 65, 68, 84, 69, 81, + 85, 128, 2, 6, 8, 25, 32, 96, 100, 144, 9, 22, 24, 36, 37, + 89, 101, 132, 148, 18, 33, 66, 70, 72, 73, 82, 86, 88, 97, 129, + 133, 145, 149, 160, 164, 192, 3, 7, 10, 26, 40, 41, 104, 105, 112, + 208, 12, 13, 28, 29, 48, 52, 74, 90, 102, 116, 152, 161, 165, 19, + 23, 34, 38, 83, 93, 98, 113, 134, 136, 137, 150, 153, 193, 196, 209, + 212, 42, 49, 53, 67, 71, 77, 87, 92, 117, 130, 146, 197, 11, 44, + 45, 56, 76, 106, 108, 131, 168, 169, 176, 180, 213, 224, 14, 15, 27, + 30, 31, 35, 39, 43, 46, 50, 51, 54, 55, 57, 58, 60, 61, 75, + 78, 79, 91, 94, 95, 99, 103, 107, 109, 110, 114, 115, 118, 119, 120, + 121, 122, 124, 125, 135, 138, 139, 140, 141, 142, 147, 151, 154, 155, 156, + 157, 158, 162, 163, 166, 167, 170, 172, 173, 177, 178, 181, 182, 184, 185, + 194, 195, 198, 199, 200, 201, 202, 204, 205, 210, 211, 214, 215, 216, 217, + 218, 220, 221, 225, 226, 228, 229, 230, 232, 233, 240, 241, 244, 245, +}; + +static const uint8_t cvh_huffbits5[192] = { + 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, + 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, + 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +}; + +static const uint8_t cvh_huffsyms5[192] = { + 0, 1, 3, 9, 27, 81, 4, 12, 36, 82, 84, 108, 10, 13, 28, + 30, 39, 90, 109, 117, 31, 37, 40, 85, 91, 93, 111, 120, 2, 54, + 94, 112, 118, 121, 162, 189, 5, 6, 18, 135, 7, 15, 21, 45, 63, + 163, 171, 11, 16, 19, 48, 57, 83, 87, 99, 144, 165, 198, 14, 29, + 32, 33, 34, 42, 46, 58, 66, 86, 88, 96, 102, 114, 126, 127, 129, + 138, 166, 172, 174, 190, 192, 22, 38, 41, 43, 49, 55, 64, 92, 100, + 103, 110, 130, 136, 139, 145, 147, 148, 175, 193, 199, 201, 8, 24, 95, + 97, 115, 119, 123, 153, 180, 216, 17, 20, 23, 25, 35, 44, 47, 50, + 51, 52, 56, 59, 60, 61, 65, 67, 68, 69, 70, 72, 73, 75, 76, + 89, 98, 101, 104, 105, 106, 113, 116, 122, 124, 125, 128, 131, 132, 133, + 137, 140, 141, 142, 146, 149, 150, 151, 154, 156, 157, 164, 167, 168, 169, + 173, 176, 177, 178, 181, 183, 184, 191, 194, 195, 196, 200, 202, 203, 204, + 205, 207, 208, 210, 211, 217, 219, 220, 225, 226, 228, 229, +}; static const uint8_t cvh_huffbits6[32] = { - 1, 4, 4, 6, 4, 6, 6, 8, 4, 6, 6, 8, - 6, 9, 8, 10, 4, 6, 7, 8, 6, 9, 8, 11, - 6, 9, 8, 10, 8, 10, 9, 11, + 1, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, }; -static const uint16_t cvh_huffcodes6[32] = { - 0x0000,0x0008,0x0009,0x0034,0x000a,0x0035,0x0036,0x00f6,0x000b,0x0037,0x0038,0x00f7, - 0x0039,0x01fa,0x00f8,0x03fc,0x000c,0x003a,0x007a,0x00f9,0x003b,0x01fb,0x00fa,0x07fe, - 0x003c,0x01fc,0x00fb,0x03fd,0x00fc,0x03fe,0x01fd,0x07ff, +static const uint8_t cvh_huffsyms6[32] = { + 0, 1, 2, 4, 8, 16, 3, 5, 6, 9, 10, 12, 17, 20, 24, 18, 7, 11, 14, + 19, 22, 26, 28, 13, 21, 25, 30, 15, 27, 29, 23, 31, }; -static const uint16_t* const cvh_huffcodes[7] = { - cvh_huffcodes0, cvh_huffcodes1, cvh_huffcodes2, cvh_huffcodes3, - cvh_huffcodes4, cvh_huffcodes5, cvh_huffcodes6, +static const void* const cvh_huffsyms[7] = { + cvh_huffsyms0, cvh_huffsyms1, cvh_huffsyms2, cvh_huffsyms3, + cvh_huffsyms4, cvh_huffsyms5, cvh_huffsyms6, }; static const uint8_t* const cvh_huffbits[7] = { @@ -433,65 +350,57 @@ static const uint8_t* const cvh_huffbits[7] = { }; -static const uint16_t ccpl_huffcodes2[3] = { - 0x02,0x00,0x03, +static const uint8_t ccpl_huffsyms2[3] = { + 1, 0, 2, }; -static const uint16_t ccpl_huffcodes3[7] = { - 0x3e,0x1e,0x02,0x00,0x06,0x0e,0x3f, +static const uint8_t ccpl_huffsyms3[7] = { + 3, 2, 4, 5, 1, 0, 6, }; -static const uint16_t ccpl_huffcodes4[15] = { - 0xfc,0xfd,0x7c,0x3c,0x1c,0x0c,0x04,0x00,0x05,0x0d,0x1d,0x3d, - 0x7d,0xfe,0xff, +static const uint8_t ccpl_huffsyms4[15] = { + 7, 6, 8, 5, 9, 4, 10, 3, 11, 2, 12, 0, 1, 13, 14, }; -static const uint16_t ccpl_huffcodes5[31] = { - 0x03f8,0x03f9,0x03fa,0x03fb,0x01f8,0x01f9,0x00f8,0x00f9,0x0078,0x0079,0x0038,0x0039, - 0x0018,0x0019,0x0004,0x0000,0x0005,0x001a,0x001b,0x003a,0x003b,0x007a,0x007b,0x00fa, - 0x00fb,0x01fa,0x01fb,0x03fc,0x03fd,0x03fe,0x03ff, +static const uint8_t ccpl_huffsyms5[31] = { + 15, 14, 16, 12, 13, 17, 18, 10, 11, 19, 20, 8, 9, 21, 22, 6, 7, 23, 24, + 4, 5, 25, 26, 0, 1, 2, 3, 27, 28, 29, 30, }; -static const uint16_t ccpl_huffcodes6[63] = { - 0xfffe, 0x7ffe, 0x3ffc, 0x1ffc, 0x0ffc, 0x07f6, 0x07f7, 0x07f8, 0x07f9, - 0x03f2, 0x03f3, 0x03f4, 0x03f5, 0x01f0, 0x01f1, 0x01f2, 0x01f3, 0x01f4, - 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x0070, 0x0071, 0x0072, 0x0073, 0x0034, - 0x0035, 0x0016, 0x0017, 0x0004, 0x0000, 0x000a, 0x0018, 0x0019, 0x0036, - 0x0037, 0x0074, 0x0075, 0x0076, 0x0077, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x01f5, 0x01f6, 0x01f7, 0x01f8, 0x03f6, 0x03f7, 0x03f8, 0x03f9, 0x03fa, - 0x07fa, 0x07fb, 0x07fc, 0x07fd, 0x0ffd, 0x1ffd, 0x3ffd, 0x3ffe, 0xffff +static const uint8_t ccpl_huffsyms6[63] = { + 31, 30, 32, 28, 29, 33, 34, 26, 27, 35, 36, 22, 23, 24, 25, 37, 38, 39, 40, + 18, 19, 20, 21, 41, 42, 43, 44, 13, 14, 15, 16, 17, 45, 46, 47, 48, 9, 10, + 11, 12, 49, 50, 51, 52, 53, 5, 6, 7, 8, 54, 55, 56, 57, 4, 58, 3, 59, + 2, 60, 61, 1, 0, 62, }; static const uint8_t ccpl_huffbits2[3] = { - 2,1,2, + 1, 2, 2, }; static const uint8_t ccpl_huffbits3[7] = { - 6,5,2,1,3,4,6, + 1, 2, 3, 4, 5, 6, 6, }; static const uint8_t ccpl_huffbits4[15] = { - 8,8,7,6,5,4,3,1,3,4,5,6,7,8,8, + 1, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, }; static const uint8_t ccpl_huffbits5[31] = { - 10,10,10,10,9,9,8,8,7,7,6,6, - 5,5,3,1,3,5,5,6,6,7,7,8, - 8,9,9,10,10,10,10, + 1, 3, 3, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, + 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, }; static const uint8_t ccpl_huffbits6[63] = { - 16,15,14,13,12,11,11,11,11,10,10,10, - 10,9,9,9,9,9,8,8,8,8,7,7, - 7,7,6,6,5,5,3,1,4,5,5,6, - 6,7,7,7,7,8,8,8,8,9,9,9, - 9,10,10,10,10,10,11,11,11,11,12,13, - 14,14,16, + 1, 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, + 12, 13, 13, 14, 14, 14, 15, 16, 16, }; -static const uint16_t* const ccpl_huffcodes[5] = { - ccpl_huffcodes2,ccpl_huffcodes3, - ccpl_huffcodes4,ccpl_huffcodes5,ccpl_huffcodes6 +static const uint8_t *const ccpl_huffsyms[5] = { + ccpl_huffsyms2, ccpl_huffsyms3, + ccpl_huffsyms4, ccpl_huffsyms5, ccpl_huffsyms6 }; static const uint8_t* const ccpl_huffbits[5] = { From patchwork Tue Nov 10 10:47:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23488 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 23A0944B3FF for ; Tue, 10 Nov 2020 12:54:24 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 44D3968BE08; Tue, 10 Nov 2020 12:49:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C404268BDFA for ; Tue, 10 Nov 2020 12:49:43 +0200 (EET) Received: by mail-wm1-f65.google.com with SMTP id c9so2513583wml.5 for ; Tue, 10 Nov 2020 02:49:43 -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=X16zXXtRQW30vgwzsy/V0V/HbDjoedjcabd1xNIVCCg=; b=AZKyHSzoh7S163QPg7kvFKIGPgP10Zt4OzkAfvQ0vSUJSvMqKySDbChyYVcBOuIY4u 3ssnl1JPmVQvIBVvN8UWJ4FHU5+88tL9nWTz2E+X0EpZ3LqisSYSAhMVCgP4P/sfie2P R6IzO5XnOq5uUEOmpId14jaXC8YkInRX/PLlR2h3sTSXpaVA4lZkIPGJtQC22FVN9N1Y ROTJIE7w8WX+opn9nxzQVIsMEGgYxWY6V96OQMIDhSJikC0p7Odxc3Qlrdl6LqaCFzne YcU+9XCchyns0QeKed6LpcMBw6wYljxlyKefC/DSjI1ChjvaZqFrOdDXJlLa3v2jl8gF vgqQ== 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=X16zXXtRQW30vgwzsy/V0V/HbDjoedjcabd1xNIVCCg=; b=nNb0tgvJrL2s9kofyXISA9a3DG1MDXZhnHjYhjbTVafNdTEqNhDWXgDaxgp95q1+c6 shtrWtYEtuXM41K06lXJou8v+6KSL4Umg35LEx7vKmDF64oYICgtYFXz2meoyPBbVoTw Ywt2mFhYQW6xIfqz9PP8ckfOdYK6Dlw6dKtroJTmG7A0+G2L4T6aIgAXFE1qioxSYuV4 NftYMENqVbexOGZQ8/P/5pSQeBzFyb9bYtuC5Mve+COJfw89GUo6n68LMDBiMZfMm4Vv fr//vGVZp/np8RU1l4ZZMoocPSva8K+cFjahW5xJJ34QSGl/7g/UIPo+wi1vh/EZd32u zdUw== X-Gm-Message-State: AOAM531G0eCUDoqeFbu4cmywNFChZ3HWn5o5u0x8vY2yflM2ny8y84OZ JigVTgjHKPWm6XQU0CajkUb5KTtkZMo= X-Google-Smtp-Source: ABdhPJyRQf5yuGd6pJjyz417MM0S5ECe7jKxC5JVydhAOIO/rbUgisUW8+nfzLew7C3/AUKHBFNmVg== X-Received: by 2002:a1c:7215:: with SMTP id n21mr3965407wmc.173.1605005383031; Tue, 10 Nov 2020 02:49:43 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:42 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:20 +0100 Message-Id: <20201110104851.321029-24-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 023/114] avcodec/cook: Apply offset when initializing VLC table 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/cook.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 7b24868f57..9f44df5332 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -200,7 +200,7 @@ static av_cold int init_cook_vlc_tables(COOKContext *q) result |= ff_init_vlc_from_lengths(&q->envelope_quant_index[i], 9, 24, envelope_quant_index_huffbits[i], 1, envelope_quant_index_huffsyms[i], 1, 1, - 0, 0); + -12, 0); } av_log(q->avctx, AV_LOG_DEBUG, "sqvh VLC init\n"); for (i = 0; i < 7; i++) { @@ -385,7 +385,7 @@ static int decode_envelope(COOKContext *q, COOKSubpacket *p, j = get_vlc2(&q->gb, q->envelope_quant_index[vlc_index - 1].table, q->envelope_quant_index[vlc_index - 1].bits, 2); - quant_index_table[i] = quant_index_table[i - 1] + j - 12; // differential encoding + quant_index_table[i] = quant_index_table[i - 1] + j; // differential encoding if (quant_index_table[i] > 63 || quant_index_table[i] < -63) { av_log(q->avctx, AV_LOG_ERROR, "Invalid quantizer %d at position %d, outside [-63, 63] range\n", From patchwork Tue Nov 10 10:47:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23495 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 B4AE944B61D for ; Tue, 10 Nov 2020 12:54:55 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 09AD068BE34; Tue, 10 Nov 2020 12:49:57 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5F41568BE04 for ; Tue, 10 Nov 2020 12:49:45 +0200 (EET) Received: by mail-wm1-f68.google.com with SMTP id 10so2533418wml.2 for ; Tue, 10 Nov 2020 02:49:45 -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=cfPHmBDYR3NQoj5F41+EVJvh+jiefZ6omdeODsVnC5M=; b=l5pUEvRUS9snab+rE7T64HOEKTjrZ1gtlfwcDsGhvpbfMtzmUomz3BCxbIUztc+YBl Hvym1xwn+94fbH3JkPcU6KUFTPuTByaTFIk0kdnuWscNSaEuPIwgWSDtjRBd/12XJMRN 4cMTFOYUfPclx9LGtJXa1wPHo0u79fu3vr4KYTV5vxT2iMR+y4M35wI1DtSLMhwt7fA6 PdkRkBRFnDqOlBngKR5nDuKqaoTNdcDaphkZeqNfPVqane+safd7Zk1zZxN/gdd4VVTR d98yIFn9S+smhl7XzS+xjTIW0laOwUFvztZWmwNKZBY48FTQHDJuAjjCzpfl/BM7NUzH TIpg== 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=cfPHmBDYR3NQoj5F41+EVJvh+jiefZ6omdeODsVnC5M=; b=G9GBHgodZd7VRSmD+Mqq8ttnyMKFuhOAHaU9aq87R37lSeWbrHHa0yoK9YZTCt6vO1 oC1oEV8SIFfSk/qf8NsTtRv8wpcgUWnBSGza9i1mtr+8/5PoOiyh/lx7dxDl1ewWspGS hA/GOjwhJlH32MhaUKJEt9WNhFDZ/qS5k76evkQF0uK8zmEKfXA3+ndvEyKGAyFBnMES naXzfPMBRyW4/t/NT05E0MaKDj1EuP98y6yDIFMWUC9xDMORIkunuwZHKDRkmnB2l7gJ 4+ZhGGWwHamjvdfYa72LpR3+R4GQg1uSL1lU/qXzl6Mn3Aa98LsbzC76NSQgblZlDxNk mDxQ== X-Gm-Message-State: AOAM532H6biOwlKXCw9R115mNdvRNpT4rAYQQT5sIE5vKUpRFbB0hKRk 0pNqUYBVQ2aD39h8ZkhUVnXIlWg/jOE= X-Google-Smtp-Source: ABdhPJz8eeGp9yJN2x7xZ6XLuwOpsykRCdUkdZedYj4meXEeREXjYi/bpFHpOLHcPyOuGWb1fNVJmA== X-Received: by 2002:a1c:230e:: with SMTP id j14mr3947974wmj.187.1605005384188; Tue, 10 Nov 2020 02:49:44 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:43 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:21 +0100 Message-Id: <20201110104851.321029-25-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 024/114] avcodec/cook: Avoid big length tables for VLC initialization 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" Permuting the tables used to initialize the Cook VLCs so that the code tables are ordered from left to right in the tree revealed that the length of the codes are ascending from left to right. Therefore one can run-length encode them to avoid the big length tables; this saves a bit more than 1KB. Signed-off-by: Andreas Rheinhardt --- libavcodec/cook.c | 36 +++++--- libavcodec/cookdata.h | 187 +++++++----------------------------------- 2 files changed, 52 insertions(+), 171 deletions(-) diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 9f44df5332..75422d18aa 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -190,6 +190,19 @@ static av_cold void init_gain_table(COOKContext *q) (1.0 / (double) q->gain_size_factor)); } +static av_cold int build_vlc(VLC *vlc, int nb_bits, const uint8_t counts[16], + const void *syms, int symbol_size, int offset) +{ + uint8_t lens[MAX_COOK_VLC_ENTRIES]; + unsigned num = 0; + + for (int i = 0; i < 16; i++) + for (unsigned count = num + counts[i]; num < count; num++) + lens[num] = i + 1; + + return ff_init_vlc_from_lengths(vlc, nb_bits, num, lens, 1, + syms, symbol_size, symbol_size, offset, 0); +} static av_cold int init_cook_vlc_tables(COOKContext *q) { @@ -197,27 +210,24 @@ static av_cold int init_cook_vlc_tables(COOKContext *q) result = 0; for (i = 0; i < 13; i++) { - result |= ff_init_vlc_from_lengths(&q->envelope_quant_index[i], 9, 24, - envelope_quant_index_huffbits[i], 1, - envelope_quant_index_huffsyms[i], 1, 1, - -12, 0); + result |= build_vlc(&q->envelope_quant_index[i], 9, + envelope_quant_index_huffcounts[i], + envelope_quant_index_huffsyms[i], 1, -12); } av_log(q->avctx, AV_LOG_DEBUG, "sqvh VLC init\n"); for (i = 0; i < 7; i++) { int sym_size = 1 + (i == 3); - result |= ff_init_vlc_from_lengths(&q->sqvh[i], vhvlcsize_tab[i], vhsize_tab[i], - cvh_huffbits[i], 1, - cvh_huffsyms[i], sym_size, sym_size, - 0, 0); + result |= build_vlc(&q->sqvh[i], vhvlcsize_tab[i], + cvh_huffcounts[i], + cvh_huffsyms[i], sym_size, 0); } for (i = 0; i < q->num_subpackets; i++) { if (q->subpacket[i].joint_stereo == 1) { - result |= ff_init_vlc_from_lengths(&q->subpacket[i].channel_coupling, 6, - (1 << q->subpacket[i].js_vlc_bits) - 1, - ccpl_huffbits[q->subpacket[i].js_vlc_bits - 2], 1, - ccpl_huffsyms[q->subpacket[i].js_vlc_bits - 2], 1, 1, - 0, 0); + result |= build_vlc(&q->subpacket[i].channel_coupling, 6, + ccpl_huffcounts[q->subpacket[i].js_vlc_bits - 2], + ccpl_huffsyms[q->subpacket[i].js_vlc_bits - 2], 1, + 0); av_log(q->avctx, AV_LOG_DEBUG, "subpacket %i Joint-stereo VLC used.\n", i); } } diff --git a/libavcodec/cookdata.h b/libavcodec/cookdata.h index 05d1eef23b..a4ca1201bf 100644 --- a/libavcodec/cookdata.h +++ b/libavcodec/cookdata.h @@ -70,41 +70,26 @@ static const int vpr_tab[7] = { /* VLC data */ -static const int vhsize_tab[7] = { - 181, 94, 48, 520, 209, 192, 32, -}; +#define MAX_COOK_VLC_ENTRIES 520 static const int vhvlcsize_tab[7] = { 8, 7, 7, 10, 9, 9, 6, }; -static const uint8_t envelope_quant_index_huffbits[13][24] = { - { 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, - 5, 5, 6, 7, 8, 9, 11, 11, 12, 12, 12, 12 }, - { 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 15, 15, 15, 16, 16 }, - { 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, - 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14 }, - { 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, - 7, 7, 7, 9, 9, 9, 10, 11, 13, 13, 13, 13 }, - { 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, - 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14 }, - { 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, - 7, 7, 8, 8, 8, 9, 10, 11, 12, 13, 14, 14 }, - { 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 15, 15, 16, 16, 16, 16 }, - { 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 7, 7, - 7, 9, 9, 9, 10, 11, 12, 14, 14, 14, 15, 15 }, - { 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 9, 10, 11, 12, 13, 13 }, - { 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, - 6, 8, 8, 8, 9, 10, 11, 12, 14, 14, 14, 14 }, - { 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, - 6, 8, 8, 9, 9, 9, 10, 11, 12, 13, 14, 14 }, - { 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 16, 16, 16, 16 }, - { 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 7, 7, - 7, 8, 9, 10, 11, 13, 14, 14, 14, 14, 14, 14 }, +static const uint8_t envelope_quant_index_huffcounts[13][16] = { + { 0, 0, 3, 8, 3, 1, 1, 1, 1, 0, 2, 4, 0, 0, 0, 0 }, + { 0, 0, 6, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 3, 2 }, + { 0, 0, 3, 8, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0 }, + { 0, 0, 5, 4, 3, 0, 3, 0, 3, 1, 1, 0, 4, 0, 0, 0 }, + { 0, 0, 5, 3, 4, 3, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0 }, + { 0, 0, 5, 4, 3, 0, 2, 3, 1, 1, 1, 1, 1, 2, 0, 0 }, + { 0, 1, 4, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 4 }, + { 0, 1, 4, 2, 3, 0, 3, 0, 3, 1, 1, 1, 0, 3, 2, 0 }, + { 0, 0, 6, 2, 2, 2, 2, 2, 3, 1, 1, 1, 2, 0, 0, 0 }, + { 0, 0, 6, 2, 2, 3, 0, 3, 1, 1, 1, 1, 0, 4, 0, 0 }, + { 0, 1, 3, 4, 2, 3, 0, 2, 3, 1, 1, 1, 1, 2, 0, 0 }, + { 0, 1, 3, 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 4 }, + { 0, 1, 4, 2, 3, 0, 3, 1, 1, 1, 1, 0, 1, 6, 0, 0 }, }; static const uint8_t envelope_quant_index_huffsyms[13][24] = { @@ -137,18 +122,14 @@ static const uint8_t envelope_quant_index_huffsyms[13][24] = { }; -static const uint8_t cvh_huffbits0[181] = { - 1, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, - 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, - 16, +static const uint8_t cvh_huffcounts[7][16] = { + { 1, 0, 0, 2, 2, 5, 8, 15, 31, 33, 28, 17, 15, 8, 8, 8 }, + { 1, 0, 0, 2, 4, 5, 7, 16, 18, 12, 11, 7, 3, 5, 1, 2 }, + { 1, 0, 1, 2, 4, 2, 5, 8, 7, 8, 2, 3, 1, 1, 1, 2 }, + { 0, 1, 0, 2, 5, 12, 7, 27, 22, 41, 32, 41, 55, 23, 32, 220 }, + { 0, 1, 0, 5, 7, 4, 8, 9, 17, 10, 13, 17, 12, 14, 92, 0 }, + { 0, 1, 0, 5, 6, 8, 8, 8, 4, 7, 11, 23, 21, 10, 80, 0 }, + { 1, 0, 0, 5, 0, 9, 1, 7, 4, 3, 2, 0, 0, 0, 0, 0 }, }; static const uint8_t cvh_huffsyms0[181] = { @@ -167,16 +148,6 @@ static const uint8_t cvh_huffsyms0[181] = { 190, }; -static const uint8_t cvh_huffbits1[94] = { - 1, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, - 14, 15, 16, 16, -}; - - static const uint8_t cvh_huffsyms1[94] = { 0, 1, 10, 2, 11, 20, 21, 3, 12, 22, 30, 31, 4, 13, 14, 23, 32, 40, 41, 5, 6, 15, 16, 24, 25, 33, 34, 42, 43, 50, 51, 52, 60, 61, 62, 7, 17, 18, @@ -185,50 +156,12 @@ static const uint8_t cvh_huffsyms1[94] = { 39, 58, 67, 75, 76, 85, 93, 49, 68, 94, 59, 77, 78, 86, 95, 69, 87, 96, }; -static const uint8_t cvh_huffbits2[48] = { - 1, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, - 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, - 10, 10, 11, 11, 12, 12, 12, 13, 14, 15, 16, 16, -}; - static const uint8_t cvh_huffsyms2[48] = { 0, 7, 1, 8, 2, 9, 14, 15, 16, 22, 3, 10, 17, 21, 23, 4, 11, 18, 24, 28, 29, 30, 35, 5, 12, 25, 31, 36, 37, 42, 6, 13, 19, 20, 26, 32, 38, 43, 39, 44, 27, 33, 45, 46, 34, 40, 41, 47, }; -static const uint8_t cvh_huffbits3[520] = { - 2, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -}; - static const uint16_t cvh_huffsyms3[520] = { 0, 1, 125, 5, 6, 25, 30, 150, 2, 7, 26, 31, 126, 130, 131, 151, 155, 156, 250, 275, 10, 35, 36, 50, 55, 175, 180, 3, 8, 11, @@ -267,21 +200,6 @@ static const uint16_t cvh_huffsyms3[520] = { 583, 585, 586, 587, 590, 591, 600, 601, 605, 606, }; -static const uint8_t cvh_huffbits4[209] = { - 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, - 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -}; - static const uint8_t cvh_huffsyms4[209] = { 0, 1, 4, 16, 64, 80, 5, 17, 20, 21, 65, 68, 84, 69, 81, 85, 128, 2, 6, 8, 25, 32, 96, 100, 144, 9, 22, 24, 36, 37, @@ -299,20 +217,6 @@ static const uint8_t cvh_huffsyms4[209] = { 218, 220, 221, 225, 226, 228, 229, 230, 232, 233, 240, 241, 244, 245, }; -static const uint8_t cvh_huffbits5[192] = { - 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, - 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, - 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -}; - static const uint8_t cvh_huffsyms5[192] = { 0, 1, 3, 9, 27, 81, 4, 12, 36, 82, 84, 108, 10, 13, 28, 30, 39, 90, 109, 117, 31, 37, 40, 85, 91, 93, 111, 120, 2, 54, @@ -329,11 +233,6 @@ static const uint8_t cvh_huffsyms5[192] = { 205, 207, 208, 210, 211, 217, 219, 220, 225, 226, 228, 229, }; -static const uint8_t cvh_huffbits6[32] = { - 1, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, - 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, -}; - static const uint8_t cvh_huffsyms6[32] = { 0, 1, 2, 4, 8, 16, 3, 5, 6, 9, 10, 12, 17, 20, 24, 18, 7, 11, 14, 19, 22, 26, 28, 13, 21, 25, 30, 15, 27, 29, 23, 31, @@ -344,12 +243,6 @@ static const void* const cvh_huffsyms[7] = { cvh_huffsyms4, cvh_huffsyms5, cvh_huffsyms6, }; -static const uint8_t* const cvh_huffbits[7] = { - cvh_huffbits0, cvh_huffbits1, cvh_huffbits2, cvh_huffbits3, - cvh_huffbits4, cvh_huffbits5, cvh_huffbits6, -}; - - static const uint8_t ccpl_huffsyms2[3] = { 1, 0, 2, }; @@ -374,28 +267,12 @@ static const uint8_t ccpl_huffsyms6[63] = { 2, 60, 61, 1, 0, 62, }; -static const uint8_t ccpl_huffbits2[3] = { - 1, 2, 2, -}; - -static const uint8_t ccpl_huffbits3[7] = { - 1, 2, 3, 4, 5, 6, 6, -}; - -static const uint8_t ccpl_huffbits4[15] = { - 1, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, -}; - -static const uint8_t ccpl_huffbits5[31] = { - 1, 3, 3, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, - 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, -}; - -static const uint8_t ccpl_huffbits6[63] = { - 1, 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, - 12, 13, 13, 14, 14, 14, 15, 16, 16, +static const uint8_t ccpl_huffcounts[5][16] = { + { 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 2, 2, 2, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 2, 0, 4, 4, 4, 4, 4, 8, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 1, 1, 4, 4, 8, 8, 9, 9, 8, 2, 2, 3, 1, 2 }, }; static const uint8_t *const ccpl_huffsyms[5] = { @@ -403,12 +280,6 @@ static const uint8_t *const ccpl_huffsyms[5] = { ccpl_huffsyms4, ccpl_huffsyms5, ccpl_huffsyms6 }; -static const uint8_t* const ccpl_huffbits[5] = { - ccpl_huffbits2,ccpl_huffbits3, - ccpl_huffbits4,ccpl_huffbits5,ccpl_huffbits6 -}; - - //Coupling tables static const int cplband[51] = { From patchwork Tue Nov 10 10:47:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23496 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 8493344B3FF for ; Tue, 10 Nov 2020 12:55:11 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 45B0868BE52; Tue, 10 Nov 2020 12:49:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E3C7268BE0D for ; Tue, 10 Nov 2020 12:49:45 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id o15so4302370wru.6 for ; Tue, 10 Nov 2020 02:49:45 -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=k9rBlqICthceAUn3PBSWw4sp1ueSf26cOCwYO7tZXCU=; b=qOvSg0d8wHJ774sv7t838gl2kcbE/KVnFkM072ZxO/KMkNDB/tFcIIrL91+Co9g3X5 gvX0/FjUoDtWc+cByvsphBGqewwo2zbsQyeDJiOx8nTIbjmpH7rpEpUIdTHVs4Vt+mh+ CVZqg+YZ84djqQQAW2VYStnl5+l801EGcsajg1foBZBk5mnxyN4CTJ9hhHWQEyMwu6bJ /0KYYuOmDQCC5q26sL8WcLiey9a6OrUAajqh41EdxYAvTVztKCnNIAWLKf+w8TOk4UAC 2toMdjxoqOu8aW7r+yZC8EomtADvcQ2zvxs1P/Csq8hJIX3LNI6yDWoyR2n1Fca0TOd/ +hkA== 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=k9rBlqICthceAUn3PBSWw4sp1ueSf26cOCwYO7tZXCU=; b=XYbJ4uVIz+JqI6K86JZBzCnvLy8QBwDCXRjqLRjAFMbf4B4mkfFVWa/sGkWdCSG84E HoGubw2MwKP5mCvOVTEYJuABsFgySvmocL8DAgUCMjlg+Trfl3tt8NZLDCZ4abMJUiot bOyJH2+opJat5KYo7lB1Z9xZuwNAvpYqmHk5hVLyHyOGZ7/6+87g8WoVRCmQOeT5+9J3 KgNy6UQUX/8m9CkgR0fJwuV7a8TTZ17APwmoXhJ2NK+UCHNyvaa4SI9saghC/aD83iSi m65llQiOl01/VHg9bHWG3gjEj6MRVHGlaRGpOA/krOAkzWeVbfgjIgVfGzgZ0tz2DBtX DG4A== X-Gm-Message-State: AOAM531ukGLq8SDg3Vy6neu5uiCxif+sao0JwN4c4pIK1vEEutqxvueF W4GNUKMXMomDi7Nw1UEZswJAUgYbbNE= X-Google-Smtp-Source: ABdhPJy0FzNooE4+EgCJzgbAwR2oFd2TmEQYxIrQECuu9GxBBeUwcBaWFIqXFhEZK/fycqzaTlZeWw== X-Received: by 2002:adf:9e4c:: with SMTP id v12mr22391845wre.22.1605005385080; Tue, 10 Nov 2020 02:49:45 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:44 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:22 +0100 Message-Id: <20201110104851.321029-26-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 025/114] avcodec/cook: Inline constants 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/cook.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 75422d18aa..0fa42d681d 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -65,6 +65,9 @@ #define SUBBAND_SIZE 20 #define MAX_SUBPACKETS 5 +#define QUANT_VLC_BITS 9 +#define COUPLING_VLC_BITS 6 + typedef struct cook_gains { int *now; int *previous; @@ -210,7 +213,7 @@ static av_cold int init_cook_vlc_tables(COOKContext *q) result = 0; for (i = 0; i < 13; i++) { - result |= build_vlc(&q->envelope_quant_index[i], 9, + result |= build_vlc(&q->envelope_quant_index[i], QUANT_VLC_BITS, envelope_quant_index_huffcounts[i], envelope_quant_index_huffsyms[i], 1, -12); } @@ -224,7 +227,7 @@ static av_cold int init_cook_vlc_tables(COOKContext *q) for (i = 0; i < q->num_subpackets; i++) { if (q->subpacket[i].joint_stereo == 1) { - result |= build_vlc(&q->subpacket[i].channel_coupling, 6, + result |= build_vlc(&q->subpacket[i].channel_coupling, COUPLING_VLC_BITS, ccpl_huffcounts[q->subpacket[i].js_vlc_bits - 2], ccpl_huffsyms[q->subpacket[i].js_vlc_bits - 2], 1, 0); @@ -394,7 +397,7 @@ static int decode_envelope(COOKContext *q, COOKSubpacket *p, vlc_index = 13; // the VLC tables >13 are identical to No. 13 j = get_vlc2(&q->gb, q->envelope_quant_index[vlc_index - 1].table, - q->envelope_quant_index[vlc_index - 1].bits, 2); + QUANT_VLC_BITS, 2); quant_index_table[i] = quant_index_table[i - 1] + j; // differential encoding if (quant_index_table[i] > 63 || quant_index_table[i] < -63) { av_log(q->avctx, AV_LOG_ERROR, @@ -773,7 +776,7 @@ static int decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab) for (i = 0; i < length; i++) decouple_tab[start + i] = get_vlc2(&q->gb, p->channel_coupling.table, - p->channel_coupling.bits, 3); + COUPLING_VLC_BITS, 3); else for (i = 0; i < length; i++) { int v = get_bits(&q->gb, p->js_vlc_bits); From patchwork Tue Nov 10 10:47:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23497 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 8861C44B823 for ; Tue, 10 Nov 2020 12:55:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8110F68BE35; Tue, 10 Nov 2020 12:49:59 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 25A3B68BE0E for ; Tue, 10 Nov 2020 12:49:47 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id k2so8765732wrx.2 for ; Tue, 10 Nov 2020 02:49:47 -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=Be2DX+EBQhaJE4MeqljImKc4xlDip/W2iOVNTqvSI1Y=; b=XXtgVAxd7ZAOXdKKicYkzqvxv4uaQFwUziVbnFkobP0VhGG2WKSVXxyvyqfewkXFan /WKkxh4vBBii+aqmoyqP8+v9ki8r/qAr7DK6FBYjRl3vbWK6CVTS+wkZI5y/B0SyTmXV HG6jQNh4coTD8PKTRoAfxkYmDUKyI9Ot3DzqLAnmsNOnXYDUzSbRd8VrImoI0sFX6rQB sqkL5DBJlXc91Szj+gZMNE1/J7PDay7p0WQpo68KF4jNyTZx56y306fcEXbT2PpnvGXQ Mx1/K1o/usHsb8NjvDA6+so7EjiCrdKatHNfUrrrijgxeLM7L/5NsylCKsdI4j++w/TS jeWQ== 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=Be2DX+EBQhaJE4MeqljImKc4xlDip/W2iOVNTqvSI1Y=; b=dv04yS7shK40a+vHFRgxOnuhlJf9bSBGkQbKP/7zgl+LvAVFyIkkQcWziQB2dQYo5B xzizev/jCdpzdvetY/q9kCOIzm6r2JyXD5oDuul+XRp5Emg60cA54Xarn+YlkhhUVRuz tu40p84NveSY3tdG871GRWTFWnPXJW6hg0AFhfksdEbFLWlRGmTrTCMNtCJRqvtMxkFr IT9eUl74uj2k81EuFOBAalFYt/NicuMvp2xrhDuGr7SJtjlh2Ww8SVaPR5R0i6cMwRqp 0StmtOPlmMdzPgP3KfNfcwzC2ccCk+dtfYua/eI1V0BYpWkgRktvyR5Q3ClHBpbaAKrb 7BWg== X-Gm-Message-State: AOAM533QtujwRWVvsW6i3SBHDP65nGMeeAV8+3gbdguGC54JCYa9FrN+ hKmV4SwEf2sdkEF1xngNRe2zcdlYZaQ= X-Google-Smtp-Source: ABdhPJwfCJMgEA6DySGqQHmGAT/GaDl16XUuos4fTzSQJ50JMpUzRM/RY8teC1z6Vbj1b+IAcy/Zpw== X-Received: by 2002:adf:fe82:: with SMTP id l2mr18357868wrr.406.1605005386144; Tue, 10 Nov 2020 02:49:46 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:45 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:23 +0100 Message-Id: <20201110104851.321029-27-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 026/114] avcodec/rv10: Reduce the size of the tables used to initialize 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" This can be achieved by switching to ff_init_vlc_from_lengths() which allows to replace two uint16_t tables for codes with uint8_t tables for the symbols by permuting the tables so that the codes are ordered from left to right in the tree in which case they can be easily computed from the lengths at runtime. And after doing so, it became apparent that the tables for the symbols are actually the same for luma and chroma, so that one can even omit one of them. Signed-off-by: Andreas Rheinhardt --- libavcodec/rv10.c | 199 ++++++++++++++-------------------------------- 1 file changed, 59 insertions(+), 140 deletions(-) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index e594160fea..03c732e92d 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -53,144 +53,63 @@ typedef struct RVDecContext { int orig_width, orig_height; } RVDecContext; -static const uint16_t rv_lum_code[256] = { - 0x3e7f, 0x0f00, 0x0f01, 0x0f02, 0x0f03, 0x0f04, 0x0f05, 0x0f06, - 0x0f07, 0x0f08, 0x0f09, 0x0f0a, 0x0f0b, 0x0f0c, 0x0f0d, 0x0f0e, - 0x0f0f, 0x0f10, 0x0f11, 0x0f12, 0x0f13, 0x0f14, 0x0f15, 0x0f16, - 0x0f17, 0x0f18, 0x0f19, 0x0f1a, 0x0f1b, 0x0f1c, 0x0f1d, 0x0f1e, - 0x0f1f, 0x0f20, 0x0f21, 0x0f22, 0x0f23, 0x0f24, 0x0f25, 0x0f26, - 0x0f27, 0x0f28, 0x0f29, 0x0f2a, 0x0f2b, 0x0f2c, 0x0f2d, 0x0f2e, - 0x0f2f, 0x0f30, 0x0f31, 0x0f32, 0x0f33, 0x0f34, 0x0f35, 0x0f36, - 0x0f37, 0x0f38, 0x0f39, 0x0f3a, 0x0f3b, 0x0f3c, 0x0f3d, 0x0f3e, - 0x0f3f, 0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x0386, - 0x0387, 0x0388, 0x0389, 0x038a, 0x038b, 0x038c, 0x038d, 0x038e, - 0x038f, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, - 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, - 0x039f, 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, - 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, - 0x00cf, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, - 0x0057, 0x0020, 0x0021, 0x0022, 0x0023, 0x000c, 0x000d, 0x0004, - 0x0000, 0x0005, 0x000e, 0x000f, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, - 0x03a0, 0x03a1, 0x03a2, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, - 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, - 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, - 0x0f40, 0x0f41, 0x0f42, 0x0f43, 0x0f44, 0x0f45, 0x0f46, 0x0f47, - 0x0f48, 0x0f49, 0x0f4a, 0x0f4b, 0x0f4c, 0x0f4d, 0x0f4e, 0x0f4f, - 0x0f50, 0x0f51, 0x0f52, 0x0f53, 0x0f54, 0x0f55, 0x0f56, 0x0f57, - 0x0f58, 0x0f59, 0x0f5a, 0x0f5b, 0x0f5c, 0x0f5d, 0x0f5e, 0x0f5f, - 0x0f60, 0x0f61, 0x0f62, 0x0f63, 0x0f64, 0x0f65, 0x0f66, 0x0f67, - 0x0f68, 0x0f69, 0x0f6a, 0x0f6b, 0x0f6c, 0x0f6d, 0x0f6e, 0x0f6f, - 0x0f70, 0x0f71, 0x0f72, 0x0f73, 0x0f74, 0x0f75, 0x0f76, 0x0f77, - 0x0f78, 0x0f79, 0x0f7a, 0x0f7b, 0x0f7c, 0x0f7d, 0x0f7e, 0x0f7f, +/* The elements with negative length in the bits table correspond to + * open ends in the respective Huffman tree. */ +static const uint8_t rv_sym[] = { + 128, 127, 129, 125, 126, 130, 131, 121, 122, 123, 124, 132, 133, 134, 135, + 113, 114, 115, 116, 117, 118, 119, 120, 136, 137, 138, 139, 140, 141, 142, + 143, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 0, 0, 0, 0, 0, 0, 0, 0, }; -static const uint8_t rv_lum_bits[256] = { - 14, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 7, 7, 7, 7, 7, 7, 7, - 7, 6, 6, 6, 6, 5, 5, 4, - 2, 4, 5, 5, 6, 6, 6, 6, - 7, 7, 7, 7, 7, 7, 7, 7, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, +static const uint8_t rv_lum_len[] = { + 2, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, -8, -9,-10,-11,-12,-13,-14, 14, }; -static const uint16_t rv_chrom_code[256] = { - 0xfe7f, 0x3f00, 0x3f01, 0x3f02, 0x3f03, 0x3f04, 0x3f05, 0x3f06, - 0x3f07, 0x3f08, 0x3f09, 0x3f0a, 0x3f0b, 0x3f0c, 0x3f0d, 0x3f0e, - 0x3f0f, 0x3f10, 0x3f11, 0x3f12, 0x3f13, 0x3f14, 0x3f15, 0x3f16, - 0x3f17, 0x3f18, 0x3f19, 0x3f1a, 0x3f1b, 0x3f1c, 0x3f1d, 0x3f1e, - 0x3f1f, 0x3f20, 0x3f21, 0x3f22, 0x3f23, 0x3f24, 0x3f25, 0x3f26, - 0x3f27, 0x3f28, 0x3f29, 0x3f2a, 0x3f2b, 0x3f2c, 0x3f2d, 0x3f2e, - 0x3f2f, 0x3f30, 0x3f31, 0x3f32, 0x3f33, 0x3f34, 0x3f35, 0x3f36, - 0x3f37, 0x3f38, 0x3f39, 0x3f3a, 0x3f3b, 0x3f3c, 0x3f3d, 0x3f3e, - 0x3f3f, 0x0f80, 0x0f81, 0x0f82, 0x0f83, 0x0f84, 0x0f85, 0x0f86, - 0x0f87, 0x0f88, 0x0f89, 0x0f8a, 0x0f8b, 0x0f8c, 0x0f8d, 0x0f8e, - 0x0f8f, 0x0f90, 0x0f91, 0x0f92, 0x0f93, 0x0f94, 0x0f95, 0x0f96, - 0x0f97, 0x0f98, 0x0f99, 0x0f9a, 0x0f9b, 0x0f9c, 0x0f9d, 0x0f9e, - 0x0f9f, 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, - 0x03c7, 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, - 0x03cf, 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, - 0x00e7, 0x0030, 0x0031, 0x0032, 0x0033, 0x0008, 0x0009, 0x0002, - 0x0000, 0x0003, 0x000a, 0x000b, 0x0034, 0x0035, 0x0036, 0x0037, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x03d0, 0x03d1, 0x03d2, 0x03d3, 0x03d4, 0x03d5, 0x03d6, 0x03d7, - 0x03d8, 0x03d9, 0x03da, 0x03db, 0x03dc, 0x03dd, 0x03de, 0x03df, - 0x0fa0, 0x0fa1, 0x0fa2, 0x0fa3, 0x0fa4, 0x0fa5, 0x0fa6, 0x0fa7, - 0x0fa8, 0x0fa9, 0x0faa, 0x0fab, 0x0fac, 0x0fad, 0x0fae, 0x0faf, - 0x0fb0, 0x0fb1, 0x0fb2, 0x0fb3, 0x0fb4, 0x0fb5, 0x0fb6, 0x0fb7, - 0x0fb8, 0x0fb9, 0x0fba, 0x0fbb, 0x0fbc, 0x0fbd, 0x0fbe, 0x0fbf, - 0x3f40, 0x3f41, 0x3f42, 0x3f43, 0x3f44, 0x3f45, 0x3f46, 0x3f47, - 0x3f48, 0x3f49, 0x3f4a, 0x3f4b, 0x3f4c, 0x3f4d, 0x3f4e, 0x3f4f, - 0x3f50, 0x3f51, 0x3f52, 0x3f53, 0x3f54, 0x3f55, 0x3f56, 0x3f57, - 0x3f58, 0x3f59, 0x3f5a, 0x3f5b, 0x3f5c, 0x3f5d, 0x3f5e, 0x3f5f, - 0x3f60, 0x3f61, 0x3f62, 0x3f63, 0x3f64, 0x3f65, 0x3f66, 0x3f67, - 0x3f68, 0x3f69, 0x3f6a, 0x3f6b, 0x3f6c, 0x3f6d, 0x3f6e, 0x3f6f, - 0x3f70, 0x3f71, 0x3f72, 0x3f73, 0x3f74, 0x3f75, 0x3f76, 0x3f77, - 0x3f78, 0x3f79, 0x3f7a, 0x3f7b, 0x3f7c, 0x3f7d, 0x3f7e, 0x3f7f, -}; - -static const uint8_t rv_chrom_bits[256] = { - 16, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 8, 8, 8, 8, 8, 8, 8, - 8, 6, 6, 6, 6, 4, 4, 3, - 2, 3, 4, 4, 6, 6, 6, 6, - 8, 8, 8, 8, 8, 8, 8, 8, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, +static const uint8_t rv_chrom_len[] = { + 2, 3, 3, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14,-10,-11,-12,-13,-14,-15,-16, 16, }; static VLC rv_dc_lum, rv_dc_chrom; @@ -529,12 +448,12 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) /* init rv vlc */ if (!done) { - INIT_VLC_STATIC(&rv_dc_lum, DC_VLC_BITS, 256, - rv_lum_bits, 1, 1, - rv_lum_code, 2, 2, 16384); - INIT_VLC_STATIC(&rv_dc_chrom, DC_VLC_BITS, 256, - rv_chrom_bits, 1, 1, - rv_chrom_code, 2, 2, 16388); + INIT_VLC_STATIC_FROM_LENGTHS(&rv_dc_lum, DC_VLC_BITS, 263, + rv_lum_len, 1, + rv_sym, 1, 1, 0, 0, 16384); + INIT_VLC_STATIC_FROM_LENGTHS(&rv_dc_chrom, DC_VLC_BITS, 263, + rv_chrom_len, 1, + rv_sym, 1, 1, 0, 0, 16388); done = 1; } From patchwork Tue Nov 10 10:47:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23498 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 BBF4C44B823 for ; Tue, 10 Nov 2020 12:55:41 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7113C68BE37; Tue, 10 Nov 2020 12:50:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4AA9D68BE1B for ; Tue, 10 Nov 2020 12:49:48 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id s8so5050654wrw.10 for ; Tue, 10 Nov 2020 02:49:48 -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=WtG07UFuscDvGm8iP8W94Axf8+OiyhH55v1xjNZUpXc=; b=uV6WV0ovnWaZJOljuiW07lJt6iBkEf9EOU4osrqKSji6Z43jKteZTUS5W5+B5LHwKN wP01mG7UTHCgd/zv7xLw4qMXtjm+0WeA25oUUk5mjbbI4HfqZ3B5cweSt+bp8cCf16Ot nh1NAVap/KobJZ05fKl9uBTvniKFCIwsSvW8v/UIYiWdk/U/Xn8+yXsiHyPiYd43U2Ua l//C5q11wupIfcAOuaIZEvKcbDl2XIeMPMhihpV3zlMSzZ6caUwmk8Y5wAQcFP8EC7Op C0uTQFO1XZ1s8Ij9d+ZGNubryICukDFoL8Qvxz6qOYfZrmoh3JkVaV0LcMNkz9hWd1Yd pGEA== 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=WtG07UFuscDvGm8iP8W94Axf8+OiyhH55v1xjNZUpXc=; b=JAo4VwvZaDRhg85vQF+bzmgwgcS/u3UpWAlzXMU/RwC3kay11JrS1lLyGKKP0WvbMa rl6qmUS15NkP0RCjLv75NBc5gWR3QIsYfQeTPKPVbZk/kvO8uFlXgJQu+VrIDgMrkKgv TsfwcF5kZUn73dCtFRQ1EahVo08CqVpZvXBpitG1C2W1Va/F/ohzogopGm9kQBNH5n4v 5l9RFN5/p42Bds+lTj4v+7FzrnaUEHdV1BJgV6TXUY+To8lrcNQYXAURh9eLevHJ77ZY Bm93xFan02uUjVoK1z2P/v70pLQ80fVEnTkRgdvZ4gVQks8375zeV0RUYHWF5YWgrAZV EL5g== X-Gm-Message-State: AOAM533kNJi9KyaPrUT0IUbcqXtfQKjDzR+vVhlToHyFxX1ayXoEL6wP xXCOBAyC+wKyOx3U+xd5BTq4ARz6Yn4= X-Google-Smtp-Source: ABdhPJy9ZUFD6toq0cG53jIFPjuH9LkTjyrrIxFO6b9jSDMU3F5tdz1VdwDviYZYSYNGoilmcWxi3Q== X-Received: by 2002:adf:a315:: with SMTP id c21mr23015703wrb.272.1605005387226; Tue, 10 Nov 2020 02:49:47 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:46 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:24 +0100 Message-Id: <20201110104851.321029-28-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 027/114] avcodec/rv10: Reduce number of exceptions when reading VLC value 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" RealVideo 1.0 uses an insane way to encode DC coefficients: There are several symbols that (for no good reason whatsoever) have multiple encodings, leading to longer codes than necessary. More specifically, the tree for the 256 luma symbols contains 255 codes belonging to 255 different symbols on the left; going further right, the tree consists of two blocks of 128 codes each of length 14 encoding consecutive numbers (including two encodings for the symbol missing among the 255 codes on the left); this is followed by two blocks of codes of length 16 each containing 256 elements with consecutive symbols (i.e. each of the blocks allows to encode all symbols). The rest of the tree consists of 2^11 codes that all encode the same symbol. The tree for the 256 chroma symbols is similar, but is missing the blocks of length 256 and there are only 2^9 consecutive codes that encode the same symbol; furthermore, the chroma tree is incomplete: The right-most node has no right child. All of this caused problems when parsing these codes; the reason is that the code for this predates commit b613bacca9c256f1483c46847f713e47a0e9a5f6 which added support for explicit symbol tables and thereby removed the requirement that different codes have different symbols. In order to address this, the trees used for parsing were incomplete: They contained the 255 codes on the left and one code for the remaining symbol. Whenever a code not in these trees was encountered, it was dealt with in special cases (one for each of the blocks mentioned above). This commit reduces the number of special cases: Using a symbols table allows to treat the blocks of consecutive symbols like ordinary codes; only the blocks encoding a single symbol are still treated specially (in order not to waste memory on tables for them). In order to not increment the size of the tables used to initialize the VLCs both the symbols as well as the lengths are now run-length encoded. Signed-off-by: Andreas Rheinhardt --- libavcodec/rv10.c | 137 ++++++++++++++++++---------------------------- 1 file changed, 53 insertions(+), 84 deletions(-) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 03c732e92d..370d2c7dd4 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -45,6 +45,7 @@ #define RV_GET_MINOR_VER(x) (((x) >> 20) & 0xFF) #define RV_GET_MICRO_VER(x) (((x) >> 12) & 0xFF) +#define MAX_VLC_ENTRIES 1023 // Note: Does not include the skip entries. #define DC_VLC_BITS 14 // FIXME find a better solution typedef struct RVDecContext { @@ -53,63 +54,25 @@ typedef struct RVDecContext { int orig_width, orig_height; } RVDecContext; -/* The elements with negative length in the bits table correspond to - * open ends in the respective Huffman tree. */ -static const uint8_t rv_sym[] = { - 128, 127, 129, 125, 126, 130, 131, 121, 122, 123, 124, 132, 133, 134, 135, - 113, 114, 115, 116, 117, 118, 119, 120, 136, 137, 138, 139, 140, 141, 142, - 143, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, - 0, 0, 0, 0, 0, 0, 0, 0, +/* (run, length) encoded value for the symbols table. The actual symbols + * are run..run + length (mod 256). + * The last two entries in the following table apply to luma only. + * The skip values are not included in this list. */ +static const uint8_t rv_sym_run_len[][2] = { + { 128, 0 }, { 127, 0 }, { 129, 0 }, { 125, 1 }, { 130, 1 }, + { 121, 3 }, { 132, 3 }, { 113, 7 }, { 136, 7 }, { 97, 15 }, + { 144, 15 }, { 65, 31 }, { 160, 31 }, { 1, 63 }, { 192, 63 }, + { 129, 127 }, { 0, 127 }, { 1, 255 }, { 0, 255 }, }; -static const uint8_t rv_lum_len[] = { - 2, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, -8, -9,-10,-11,-12,-13,-14, 14, +/* entry[i] of the following tables gives + * the number of VLC codes of length i + 2. */ +static const uint16_t rv_lum_len_count[15] = { + 1, 0, 2, 4, 8, 16, 32, 0, 64, 0, 128, 0, 256, 0, 512, }; -static const uint8_t rv_chrom_len[] = { - 2, 3, 3, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14,-10,-11,-12,-13,-14,-15,-16, 16, +static const uint16_t rv_chrom_len_count[15] = { + 1, 2, 4, 0, 8, 0, 16, 0, 32, 0, 64, 0, 128, 0, 256, }; static VLC rv_dc_lum, rv_dc_chrom; @@ -121,37 +84,18 @@ int ff_rv_decode_dc(MpegEncContext *s, int n) if (n < 4) { code = get_vlc2(&s->gb, rv_dc_lum.table, DC_VLC_BITS, 2); if (code < 0) { - /* XXX: I don't understand why they use LONGER codes than - * necessary. The following code would be completely useless - * if they had thought about it !!! */ - code = get_bits(&s->gb, 7); - if (code == 0x7c) { - code = (int8_t) (get_bits(&s->gb, 7) + 1); - } else if (code == 0x7d) { - code = -128 + get_bits(&s->gb, 7); - } else if (code == 0x7e) { - if (get_bits1(&s->gb) == 0) - code = (int8_t) (get_bits(&s->gb, 8) + 1); - else - code = (int8_t) (get_bits(&s->gb, 8)); - } else if (code == 0x7f) { - skip_bits(&s->gb, 11); - code = 1; - } + /* Skip entry - no error. */ + skip_bits(&s->gb, 18); + code = 1; } else { code -= 128; } } else { code = get_vlc2(&s->gb, rv_dc_chrom.table, DC_VLC_BITS, 2); - /* same remark */ if (code < 0) { - code = get_bits(&s->gb, 9); - if (code == 0x1fc) { - code = (int8_t) (get_bits(&s->gb, 7) + 1); - } else if (code == 0x1fd) { - code = -128 + get_bits(&s->gb, 7); - } else if (code == 0x1fe) { - skip_bits(&s->gb, 9); + if (show_bits(&s->gb, 9) == 0x1FE) { + /* Skip entry - no error. */ + skip_bits(&s->gb, 18); code = 1; } else { av_log(s->avctx, AV_LOG_ERROR, "chroma dc error\n"); @@ -382,6 +326,27 @@ static int rv20_decode_picture_header(RVDecContext *rv) return s->mb_width * s->mb_height - mb_pos; } +static av_cold void rv10_build_vlc(VLC *vlc, const uint16_t len_count[15], + const uint8_t sym_rl[][2], int sym_rl_elems) +{ + uint16_t syms[MAX_VLC_ENTRIES]; + uint8_t lens[MAX_VLC_ENTRIES]; + unsigned nb_syms = 0, nb_lens = 0; + + for (unsigned i = 0; i < sym_rl_elems; i++) { + unsigned cur_sym = sym_rl[i][0]; + for (unsigned tmp = nb_syms + sym_rl[i][1]; nb_syms <= tmp; nb_syms++) + syms[nb_syms] = 0xFF & cur_sym++; + } + + for (unsigned i = 0; i < 15; i++) + for (unsigned tmp = nb_lens + len_count[i]; nb_lens < tmp; nb_lens++) + lens[nb_lens] = i + 2; + av_assert1(nb_lens == nb_syms); + ff_init_vlc_from_lengths(vlc, DC_VLC_BITS, nb_lens, + lens, 1, syms, 2, 2, 0, INIT_VLC_USE_NEW_STATIC); +} + static av_cold int rv10_decode_init(AVCodecContext *avctx) { RVDecContext *rv = avctx->priv_data; @@ -448,12 +413,16 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) /* init rv vlc */ if (!done) { - INIT_VLC_STATIC_FROM_LENGTHS(&rv_dc_lum, DC_VLC_BITS, 263, - rv_lum_len, 1, - rv_sym, 1, 1, 0, 0, 16384); - INIT_VLC_STATIC_FROM_LENGTHS(&rv_dc_chrom, DC_VLC_BITS, 263, - rv_chrom_len, 1, - rv_sym, 1, 1, 0, 0, 16388); + static VLC_TYPE table[16896 + 16640][2]; + + rv_dc_lum.table = table; + rv_dc_lum.table_allocated = 16896; + rv10_build_vlc(&rv_dc_lum, rv_lum_len_count, + rv_sym_run_len, FF_ARRAY_ELEMS(rv_sym_run_len)); + rv_dc_chrom.table = &table[16896]; + rv_dc_chrom.table_allocated = 16640; + rv10_build_vlc(&rv_dc_chrom, rv_chrom_len_count, + rv_sym_run_len, FF_ARRAY_ELEMS(rv_sym_run_len) - 2); done = 1; } From patchwork Tue Nov 10 10:47:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23499 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 94AD744B823 for ; Tue, 10 Nov 2020 12:55:55 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3B98A68BE60; Tue, 10 Nov 2020 12:50:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F249A68BD43 for ; Tue, 10 Nov 2020 12:49:49 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id k2so8765841wrx.2 for ; Tue, 10 Nov 2020 02:49:49 -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=5uuVmzBDKpIN7BuaGalKlztVPCWtly6/7GekjHb2xFU=; b=rLR3VhLQVNVMswZkRJ8pfacRHrJB/xqC+S42ZSPTkeFw9KcC4ikNE/hayU8ZdN0xHY 0+ALrc1A07yvZkX4oV/+9k8ykFJL06qVmk/2zWaslBitPqiq7d5+ff3SVnQDkj9tx5RG gZqqKMAevFx8a90CWWtif3yogyk7RMJfTGa+ZPiCCEH4DxgpcQgfUDQwY/qpbkbwf4ta OveGu1yZ4SgsqM2TLyOoUEOSGTf/dDzTuDw0DUazWffECgSdUHy0sZT0u+mE3qeqQCkb u4WNHCTpUPnrMO97vqiXkvi/uwkmJ8VLU/jXZJSKa0CqoLp7ho0fD+SasAYk0+S6RZ23 CpEg== 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=5uuVmzBDKpIN7BuaGalKlztVPCWtly6/7GekjHb2xFU=; b=Ey+PBT9J3cNBn6c0uyAeU9g3j8RXmt4I98hm5hQ3LGHZEai8gaMfebB/XOSY+W6ZlC rspzve3bDyv5nhlPxDMVbzg39L89mE+20x5OPxA6JgoAbaHudf/QAocA+HlGVVKJSAzC 9+4DgTFbZ47Xa5DKHl1YYQ2F5ovwjI02VTE2uP7McP1L+gqpRNidqFuVmmlw0ipSdT7U BbGWewqNudNB0CEasK2JBqktuAD5vwSf4aeSVwtUPOM92dq4wz++cL8I58aYao4ZRwkO I+jTo0kBD+B7SvDMCy91yxP0ireN/FPjwYLQWw1pJHURo4JnXUh0v0WW9rzg8E8t6Fya IEDw== X-Gm-Message-State: AOAM532sS0YhthKkiOkQDMpIVna7HeYDborG3Jp9uuTmHE9cQq7lKqVE 6B5rjJ7dECHfIUjPT/LpEpvh6oV9kCo= X-Google-Smtp-Source: ABdhPJxvdSCdo2u+JliCwqM+03HonoZgccoT3jGMDQ87jxD7YbMWRHLiT9xx+0if2cJwz6+5pDtUwQ== X-Received: by 2002:adf:eb47:: with SMTP id u7mr22905566wrn.163.1605005388316; Tue, 10 Nov 2020 02:49:48 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:47 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:25 +0100 Message-Id: <20201110104851.321029-29-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 028/114] avcodec/rv10: Use symbol table more effectively 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" The RealVideo 1.0 decoder uses VLCs to parse DC coefficients. But the values returned from get_vlc2() are not directly used; instead -(val - 128) (which is in the range -127..128) is. This transformation is unnecessary as it can effectively be done when initializing the VLC by modifying the symbols table used. There is just one minor complication: The chroma table is incomplete and in order to distinguish an error from get_vlc2() (due to an invalid code) the ordinary return range is modified to 0..255. This is possible because the only caller of this function is (on success) only interested in the return value modulo 256. Signed-off-by: Andreas Rheinhardt --- libavcodec/ituh263dec.c | 2 +- libavcodec/rv10.c | 24 ++++++++++-------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index c1005b0994..ced7fa52ee 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -467,7 +467,7 @@ static int h263_decode_block(MpegEncContext * s, int16_t * block, level = s->last_dc[component]; if (s->rv10_first_dc_coded[component]) { diff = ff_rv_decode_dc(s, n); - if (diff == 0xffff) + if (diff < 0) return -1; level += diff; level = level & 0xff; /* handle wrap round */ diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 370d2c7dd4..08887c121b 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -55,14 +55,14 @@ typedef struct RVDecContext { } RVDecContext; /* (run, length) encoded value for the symbols table. The actual symbols - * are run..run + length (mod 256). + * are run..run - length (mod 256). * The last two entries in the following table apply to luma only. * The skip values are not included in this list. */ static const uint8_t rv_sym_run_len[][2] = { - { 128, 0 }, { 127, 0 }, { 129, 0 }, { 125, 1 }, { 130, 1 }, - { 121, 3 }, { 132, 3 }, { 113, 7 }, { 136, 7 }, { 97, 15 }, - { 144, 15 }, { 65, 31 }, { 160, 31 }, { 1, 63 }, { 192, 63 }, - { 129, 127 }, { 0, 127 }, { 1, 255 }, { 0, 255 }, + { 0, 0 }, { 1, 0 }, { 255, 0 }, { 3, 1 }, { 254, 1 }, + { 7, 3 }, { 252, 3 }, { 15, 7 }, { 248, 7 }, { 31, 15 }, + { 240, 15 }, { 63, 31 }, { 224, 31 }, { 127, 63 }, { 192, 63 }, + { 255, 127 }, { 128, 127 }, { 127, 255 }, { 128, 255 }, }; /* entry[i] of the following tables gives @@ -86,9 +86,7 @@ int ff_rv_decode_dc(MpegEncContext *s, int n) if (code < 0) { /* Skip entry - no error. */ skip_bits(&s->gb, 18); - code = 1; - } else { - code -= 128; + code = 255; } } else { code = get_vlc2(&s->gb, rv_dc_chrom.table, DC_VLC_BITS, 2); @@ -96,16 +94,14 @@ int ff_rv_decode_dc(MpegEncContext *s, int n) if (show_bits(&s->gb, 9) == 0x1FE) { /* Skip entry - no error. */ skip_bits(&s->gb, 18); - code = 1; + code = 255; } else { av_log(s->avctx, AV_LOG_ERROR, "chroma dc error\n"); - return 0xffff; + return -1; } - } else { - code -= 128; } } - return -code; + return code; } /* read RV 1.0 compatible frame header */ @@ -336,7 +332,7 @@ static av_cold void rv10_build_vlc(VLC *vlc, const uint16_t len_count[15], for (unsigned i = 0; i < sym_rl_elems; i++) { unsigned cur_sym = sym_rl[i][0]; for (unsigned tmp = nb_syms + sym_rl[i][1]; nb_syms <= tmp; nb_syms++) - syms[nb_syms] = 0xFF & cur_sym++; + syms[nb_syms] = 0xFF & cur_sym--; } for (unsigned i = 0; i < 15; i++) From patchwork Tue Nov 10 10:47:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23500 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 21BF544B922 for ; Tue, 10 Nov 2020 12:56:10 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5248968BE5D; Tue, 10 Nov 2020 12:50:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0F34068BD8E for ; Tue, 10 Nov 2020 12:49:49 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id p8so11337905wrx.5 for ; Tue, 10 Nov 2020 02:49:49 -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=Tsc060vVoZ2eDQdmyp5mMOHIsvRDmXKbAZd0xou183c=; b=EkDDSEvZWDd62iGY5FLtJLuBpH0Gtw2dadU+WOZZ1ckD2MieA8FPHpoxIWp3tRCSGm 06Cwaxqz3L4oarasMOJi+b9ofbRjoaV/yOKc1hMq203xsKTlbIlub9bpTwbxh22uTKaJ zC0v4bNdNWe1i7AuGERv0cc3stkre5Uyxqf+sP9vD7NsDhmc87sOO9zjUaj4/s+FgQxF PIKz1uFjWhQ+Io190Dn0Lqi39/eB+mHHTC/IpV+DbKJgMN9wQsdp3COY/WuyHFBm4B0N v4Z16GFP5Jh9UbYgFJQ6XddtZDqc42qFkjaTd2qB/SQSQs8Nt0XPFgPzztlJZH/lb3+l NMGA== 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=Tsc060vVoZ2eDQdmyp5mMOHIsvRDmXKbAZd0xou183c=; b=kIECLpfdS5T03WAS5SaC2tu1XSj7YmW7DavS21cvBhldOU86gs/zU3cP4jjEE//Iwt 4mb7DDNv8WrSYsJS4LTiLA58JpynvY566i+/2v+2Z3lFhTlhp7w0pZR18cansvcEiDPG Z80VIlTf5wKF/CagJNw5G5vWMqBLiZeYuZE5AJ8fyo3CKDy+wJHDwi7nuH/ITlqbeAA6 uOeJZSmKxNZ65s63Lb+xZJQaRvzqTUPC5TgXiW+ATh+kHv4LU0mImqILUEeSTCEfESv5 FzFHqSo52u2E27z55/LgE9/vdtgN1cf8NYsEuO3/wwbe3+15ej+Di3We7gT7a3x9WFWM 6QLw== X-Gm-Message-State: AOAM533I1BfDUussC43RB8m7PlohKWDsm5Quv29UMUwUnoM90lyGYtu5 ftWDMYz/Z6t1MtYjzeKmkQr2NoitaVU= X-Google-Smtp-Source: ABdhPJxFaBqXAi8n/wuHxabQnqaNQx4PxrZqGMmmzw1r/lnXJ4PlJzu/OOOW7eLvHFzdmf2KaMK8dQ== X-Received: by 2002:adf:ed11:: with SMTP id a17mr8488504wro.197.1605005389271; Tue, 10 Nov 2020 02:49:49 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:48 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:26 +0100 Message-Id: <20201110104851.321029-30-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 029/114] avcodec/rv10: Make VLC tables smaller 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" These tables were huge (14 bits) because one needed 14 bits in order to find out whether a code is valid and in the VLC table or a valid code that required hacky workarounds due to RealVideo 1.0 using multiple codes for the same symbol and the code predating the introduction of symbols tables for VLCs. Signed-off-by: Andreas Rheinhardt --- libavcodec/rv10.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 08887c121b..a7cb8118e5 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -46,7 +46,7 @@ #define RV_GET_MICRO_VER(x) (((x) >> 12) & 0xFF) #define MAX_VLC_ENTRIES 1023 // Note: Does not include the skip entries. -#define DC_VLC_BITS 14 // FIXME find a better solution +#define DC_VLC_BITS 9 typedef struct RVDecContext { MpegEncContext m; @@ -409,14 +409,14 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) /* init rv vlc */ if (!done) { - static VLC_TYPE table[16896 + 16640][2]; + static VLC_TYPE table[1472 + 992][2]; rv_dc_lum.table = table; - rv_dc_lum.table_allocated = 16896; + rv_dc_lum.table_allocated = 1472; rv10_build_vlc(&rv_dc_lum, rv_lum_len_count, rv_sym_run_len, FF_ARRAY_ELEMS(rv_sym_run_len)); - rv_dc_chrom.table = &table[16896]; - rv_dc_chrom.table_allocated = 16640; + rv_dc_chrom.table = &table[1472]; + rv_dc_chrom.table_allocated = 992; rv10_build_vlc(&rv_dc_chrom, rv_chrom_len_count, rv_sym_run_len, FF_ARRAY_ELEMS(rv_sym_run_len) - 2); done = 1; From patchwork Tue Nov 10 10:47:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23501 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 1FB4444B922 for ; Tue, 10 Nov 2020 12:56:24 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 645EF68BDE3; Tue, 10 Nov 2020 12:50:03 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0DF3768BD8F for ; Tue, 10 Nov 2020 12:49:51 +0200 (EET) Received: by mail-wm1-f68.google.com with SMTP id h62so2533867wme.3 for ; Tue, 10 Nov 2020 02:49:51 -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=f1V/QiPYNd54j+T7qWdbV53gSyskEMuNDLLEhJ2D5eQ=; b=Afx5fsgI8eXJ5KeHlvxPnaP23N9O7xICeUp47SYQqgaqNWjIO0tKzJUWfrXfkHI3vg /eMjYYl4qpP8wBEkySfwL0ady+1btBPJaoLnIYRGmjWGj7mIyk5hGAUhNk9g6QFeWBIe HJIgVzQOl5Nh1cVxLWIuguA08b4YMjwtwthG9B8AhhfhLeKxhbih4IeyqFHfFjmE0/gX UjBnlovD8FFNl/h6m7xapQA89ZkXWZ7NOKCWI/5wM0FCuzkvPcdYljVfj50lgPq5Otwz DwywRnKbjXxAaWu29FfaVQDK5K7W3mB4q6eC3Ss1xSCdQz3pjHG+li3D42iUjs/L9HBn jA7Q== 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=f1V/QiPYNd54j+T7qWdbV53gSyskEMuNDLLEhJ2D5eQ=; b=e8cyWIJ7kWznCNbOJ4+G2D92HBdrAO0BxZgU1dHNRtK1ubQj44MyuJtYLdgyXB9Hgq z1yXBmZbp6aWMq4bUoUv/POWmKqUzrt4kZSrdaiq1G6ymBoCkpn9JxygVCxb3vSVpmgQ LeQoaFlCYsbG9Dnbn5+5oT4F/8Y2RMcr0ltCSNnbXV+n0rgoEsecr5+ljxLCevTQC/6s mMYq0n7dx4UkA8HlcaQSO/hlv9GDRfEfHDxkn30cE0eEzC7RbUVXoJnbVWfx52a2tfPQ vFRmDZBkqH/Nj95+Q0e1cxus7CLcJN6Epl0dSHlxpZysDU/cVTliNv5vSrsv3PusBR32 jwew== X-Gm-Message-State: AOAM532hvvjj+imIrFZz4Bu3gDcy0DCENJy58o7WLIVDiljXXLPfS9y2 LJojUIEB4cE3tNF/stixb3UqBPsQisU= X-Google-Smtp-Source: ABdhPJwHPvGwbLq42d21vQ5s0J19sSnneDq6/FQv9AeHS4l/q2810PRIB1vQHUw8So9I3omv8LGJGw== X-Received: by 2002:a7b:c937:: with SMTP id h23mr3931765wml.19.1605005390476; Tue, 10 Nov 2020 02:49:50 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:49 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:27 +0100 Message-Id: <20201110104851.321029-31-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 030/114] avcodec/rv10: Simplify handling of skip VLC entries 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" The VLC tables to be used for parsing RealVideo 1.0 DC coefficients are weird: The luma table contains a block of 2^11 codes beginning with the same prefix and length that all have the same symbol (i.e. value only depends upon the prefix); the same goes for the chroma block (except it's only 2^9 codes). Up until now, these entries (which generally could be parsed like ordinary entries with subtables) have been treated specially: They have been treated like open ends of the tree, so that get_vlc2() returned a value < 0 upon encountering them; afterwards it was checked whether the right prefix was used and if so, the appropriate number of bytes was skipped. But there is actually an easy albeit slightly hacky way to support them directly without pointless subtables: Just modify the VLC table so that all the entries sharing the right prefix have a length that equals the length of the whole entry. Signed-off-by: Andreas Rheinhardt --- libavcodec/rv10.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index a7cb8118e5..52e862f1b9 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -83,22 +83,11 @@ int ff_rv_decode_dc(MpegEncContext *s, int n) if (n < 4) { code = get_vlc2(&s->gb, rv_dc_lum.table, DC_VLC_BITS, 2); - if (code < 0) { - /* Skip entry - no error. */ - skip_bits(&s->gb, 18); - code = 255; - } } else { code = get_vlc2(&s->gb, rv_dc_chrom.table, DC_VLC_BITS, 2); if (code < 0) { - if (show_bits(&s->gb, 9) == 0x1FE) { - /* Skip entry - no error. */ - skip_bits(&s->gb, 18); - code = 255; - } else { - av_log(s->avctx, AV_LOG_ERROR, "chroma dc error\n"); - return -1; - } + av_log(s->avctx, AV_LOG_ERROR, "chroma dc error\n"); + return -1; } } return code; @@ -415,10 +404,21 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) rv_dc_lum.table_allocated = 1472; rv10_build_vlc(&rv_dc_lum, rv_lum_len_count, rv_sym_run_len, FF_ARRAY_ELEMS(rv_sym_run_len)); + for (int i = 0; i < 1 << (DC_VLC_BITS - 7 /* Length of skip prefix */); i++) { + /* All codes beginning with 0x7F have the same length and value. + * Modifying the table directly saves us the useless subtables. */ + rv_dc_lum.table[(0x7F << (DC_VLC_BITS - 7)) + i][0] = 255; + rv_dc_lum.table[(0x7F << (DC_VLC_BITS - 7)) + i][1] = 18; + } rv_dc_chrom.table = &table[1472]; rv_dc_chrom.table_allocated = 992; rv10_build_vlc(&rv_dc_chrom, rv_chrom_len_count, rv_sym_run_len, FF_ARRAY_ELEMS(rv_sym_run_len) - 2); + for (int i = 0; i < 1 << (DC_VLC_BITS - 9 /* Length of skip prefix */); i++) { + /* Same as above. */ + rv_dc_chrom.table[(0x1FE << (DC_VLC_BITS - 9)) + i][0] = 255; + rv_dc_chrom.table[(0x1FE << (DC_VLC_BITS - 9)) + i][1] = 18; + } done = 1; } From patchwork Tue Nov 10 10:47:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23502 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 68D9E44B922 for ; Tue, 10 Nov 2020 12:56:37 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 99BA668BE65; Tue, 10 Nov 2020 12:50:04 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3CE8568BDC4 for ; Tue, 10 Nov 2020 12:49:52 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id r17so8230419wrw.1 for ; Tue, 10 Nov 2020 02:49:52 -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=B3mDt99DQDIkU832cZFV2Ec8rrDhAh8VRmXTTnsH18s=; b=jWjAd3nw4UmQi5z6sJMD9EO8ytA7JpbRiLVSp+ugH7LzYaAJ6J3enF7Ot9+dioLRFe e7mhGGTGzhwiqoQJCCONETUaHKL/F8POq9rPTcxWe1P3m8gZHnffpGrvDZwoXxwiXFXv PW4oysdj5L+5hO0p6V/+a9e70AbqVSyWIQNLJbtcv05LlLrmD0/mAdZaRUrLnKnWzDLH 2IrEXbLTMAsWKImsvahuv82QcqsjcN3kIK6syiBl6LoK5XYBBLuNxnxjf92hQu3YEmAE iOXA/EijoqQyvQrkE8bcHVhGT9mZzSTjOBKRgZ3ky+56GSpChAxy8vkSUre7bdM5UcB7 Ma1Q== 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=B3mDt99DQDIkU832cZFV2Ec8rrDhAh8VRmXTTnsH18s=; b=NxGeKdT3c+tMccUdvYpnk8IqKGxsB71rOsaAKoc9f7dAudcmoGVZsJuZZfCGUofTs0 XSawUgltoaB1z3U/xQpKgEXXkEfTLDfUgoV99xyNF9hjH7YLS4dtkFHX4mUD7vw4CYhJ ojd50nkk9IpKHk7wNqrzmwAeDqe46nEpJtlYbfXLu1qo80RqeEOdkJGwGDHge1MEKQNm eDjeaEOBhbrlgCFMiuliz9w5Bbv8YOcinJk0hJM9zWvfOhKvQgR9GhHZRrwNBW96S7RK 5uW4KW4P6rlaov3m6I0DyJv+r1JtZx8SpoiWikdJAfPQPDJYXQ/BQA2Rh9+3P4dP5P2c xpIA== X-Gm-Message-State: AOAM531XLdK7oUsLLRKf596JQNK1cLyQR0mVMxnu3Kk+BiqKGaJlcJEI VCmMIxkuIpbl5eIHg/z6YGp2sLFSrl4= X-Google-Smtp-Source: ABdhPJzFBaWbVJSVPh5dcGgVnAGIlW49ZOTEWoixNbRNBLAxiC9STkqRuSZgIx573mPqPqnAz0Jfuw== X-Received: by 2002:adf:e5cb:: with SMTP id a11mr22878734wrn.15.1605005391360; Tue, 10 Nov 2020 02:49:51 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:50 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:28 +0100 Message-Id: <20201110104851.321029-32-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 031/114] avcodec/mimic: Reduce size of tables used to initialize 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" By switching to ff_init_vlc_from_lengths() one can replace a table of codes of type uint32_t with a table of symbols of type uint8_t saving space. The old tables also had holes in it (because of the symbols) which are now superfluous, saving ever more space. Signed-off-by: Andreas Rheinhardt --- libavcodec/mimic.c | 55 ++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 0f8103ef85..32f02d4b61 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -65,43 +65,25 @@ typedef struct MimicContext { int next_prev_index; } MimicContext; -static const uint32_t huffcodes[] = { - 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000b, - 0x0000001b, 0x00000038, 0x00000078, 0x00000079, 0x0000007a, 0x000000f9, - 0x000000fa, 0x000003fb, 0x000007f8, 0x000007f9, 0x000007fa, 0x000007fb, - 0x00000ff8, 0x00000ff9, 0x00000001, 0x00000039, 0x0000007b, 0x000000fb, - 0x000001f8, 0x000001f9, 0x00000ffa, 0x00000ffb, 0x00001ff8, 0x00001ff9, - 0x00001ffa, 0x00001ffb, 0x00003ff8, 0x00003ff9, 0x00003ffa, 0x00000000, - 0x00000004, 0x0000003a, 0x000001fa, 0x00003ffb, 0x00007ff8, 0x00007ff9, - 0x00007ffa, 0x00007ffb, 0x0000fff8, 0x0000fff9, 0x0000fffa, 0x0000fffb, - 0x0001fff8, 0x0001fff9, 0x0001fffa, 0x00000000, 0x0000000c, 0x000000f8, - 0x000001fb, 0x0001fffb, 0x0003fff8, 0x0003fff9, 0x0003fffa, 0x0003fffb, - 0x0007fff8, 0x0007fff9, 0x0007fffa, 0x0007fffb, 0x000ffff8, 0x000ffff9, - 0x000ffffa, 0x00000000, 0x0000001a, 0x000003f8, 0x000ffffb, 0x001ffff8, - 0x001ffff9, 0x001ffffa, 0x001ffffb, 0x003ffff8, 0x003ffff9, 0x003ffffa, - 0x003ffffb, 0x007ffff8, 0x007ffff9, 0x007ffffa, 0x007ffffb, 0x00000000, - 0x0000003b, 0x000003f9, 0x00fffff8, 0x00fffff9, 0x00fffffa, 0x00fffffb, - 0x01fffff8, 0x01fffff9, 0x01fffffa, 0x01fffffb, 0x03fffff8, 0x03fffff9, - 0x03fffffa, 0x03fffffb, 0x07fffff8, 0x00000000, 0x000003fa, 0x07fffff9, - 0x07fffffa, 0x07fffffb, 0x0ffffff8, 0x0ffffff9, 0x0ffffffa, 0x0ffffffb, - 0x1ffffff8, 0x1ffffff9, 0x1ffffffa, 0x1ffffffb, 0x3ffffff8, 0x3ffffff9, - 0x3ffffffa, +static const uint8_t huffsyms[] = { + 0x10, 0x20, 0x30, 0x00, 0x11, 0x40, 0x50, 0x12, 0x13, 0x21, 0x31, 0x60, + 0x14, 0x15, 0x16, 0x22, 0x41, 0x17, 0x18, 0x23, 0x24, 0x25, 0x32, 0x42, + 0x51, 0x61, 0x70, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x26, 0x27, + 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x52, 0x53, 0x54, 0x55, 0x56, + 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x62, 0x63, 0x64, 0x65, + 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x71, 0x72, 0x73, + 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, }; static const uint8_t huffbits[] = { - 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 4, 5, 6, 7, 7, 7, 8, - 8, 10, 11, 11, 11, 11, 12, 12, 2, 6, 7, 8, - 9, 9, 12, 12, 13, 13, 13, 13, 14, 14, 14, 0, - 3, 6, 9, 14, 15, 15, 15, 15, 16, 16, 16, 16, - 17, 17, 17, 0, 4, 8, 9, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 0, 5, 10, 20, 21, - 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 0, - 6, 10, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, - 26, 26, 27, 0, 10, 27, 27, 27, 28, 28, 28, 28, - 29, 29, 29, 29, 30, 30, 30, + 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, + 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, + 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, + 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, + 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, + 26, 26, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, }; static const uint8_t col_zag[64] = { @@ -142,8 +124,9 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx) ctx->prev_index = 0; ctx->cur_index = 15; - if ((ret = init_vlc(&ctx->vlc, MIMIC_VLC_BITS, FF_ARRAY_ELEMS(huffbits), - huffbits, 1, 1, huffcodes, 4, 4, 0)) < 0) { + ret = ff_init_vlc_from_lengths(&ctx->vlc, MIMIC_VLC_BITS, FF_ARRAY_ELEMS(huffbits), + huffbits, 1, huffsyms, 1, 1, 0, 0); + if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "error initializing vlc table\n"); return ret; } From patchwork Tue Nov 10 10:47:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23503 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 6E16344B922 for ; Tue, 10 Nov 2020 12:56:50 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E53B768BE74; Tue, 10 Nov 2020 12:50:05 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0F3F168BD8E for ; Tue, 10 Nov 2020 12:49:53 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id d12so10633148wrr.13 for ; Tue, 10 Nov 2020 02:49:52 -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=zPju1HVOU14B0vfvmCjLfaoEbRPxFfJW/exmo4N1J5w=; b=R7V96MCa4M3E1N3b7Regk71ZAh9dh0nrOjEpfFau1PY+E9oOgtFACgGXZJ4XAKH/Th msRTIsZV0lW5c7tXM3O6YqSK2CBNyjHQi+6iryN8OkOUSPBEXTT7Y6b8qlApKfPKIKto FZEwCjjIRrPimBelnGEq9t1aNCivdGMS7tSj24gD9vDs7I8lwEyj6vJ7Fh0mFfOBwsxs EQz12VoNteTnU90B5EDBfhLEoBZQHujCvEZCcjQdd4GY4JZeOai24El6NWi5Gd71xBZc 6gYXASY+aPNz7ZNT3IH2ovsbCeYxAYMedDkU/Em+fat9uhATDttCtGdLkAbrAcca78lv SECA== 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=zPju1HVOU14B0vfvmCjLfaoEbRPxFfJW/exmo4N1J5w=; b=qz1ahocuc7KY12kI7AFnGtnIz740c2nXzhp/JsLlileavXpA6tIeoIb8MhL/nvzUn0 6yYAtm2yUu4Nx+o0UqX5vW4AEqqWCmLqsUA0l3DFI4cDufCelvvn45N/J2pxivVo1t9y 4rEExniTjz0YO1x9vIZJKY9cEgdAvrG//22YzgpfIZ3C6/Ft6Jqv0qhymVfkSXASBDpL Hhs6i6xHd3arxLJzAePAKy9XAvJOfGNduuF45Dzui3/Qr0VjRnu2/AvlE0OvOsa2jJjK Gqd2wPHBidgbmYybilJV6phCT0LUoyHLt9Q+bXTt83sm+3FFNJW8XEefvb+4iVApv54y 4Cyw== X-Gm-Message-State: AOAM5336HBG9+j4fgx9K9WI0Nt/4xOvTp8hWkwhbARPl3RhEMK9QBNhI KqeGs0vi0DBsvodIrmtWTQssXLrR4oc= X-Google-Smtp-Source: ABdhPJyfVrr2EONk++mo7x9igtvhqnzKeTyyU08hBg/MVbHLBduBe2pDYs9HdS48mdxqeqvpwoxTXQ== X-Received: by 2002:a5d:4448:: with SMTP id x8mr22813720wrr.364.1605005392298; Tue, 10 Nov 2020 02:49:52 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:51 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:29 +0100 Message-Id: <20201110104851.321029-33-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 032/114] avcodec/mimic: Make VLC static 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/mimic.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 32f02d4b61..3e4d7c2576 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -58,13 +58,14 @@ typedef struct MimicContext { BswapDSPContext bbdsp; HpelDSPContext hdsp; IDCTDSPContext idsp; - VLC vlc; /* Kept in the context so multithreading can have a constant to read from */ int next_cur_index; int next_prev_index; } MimicContext; +static VLC block_vlc; + static const uint8_t huffsyms[] = { 0x10, 0x20, 0x30, 0x00, 0x11, 0x40, 0x50, 0x12, 0x13, 0x21, 0x31, 0x60, 0x14, 0x15, 0x16, 0x22, 0x41, 0x17, 0x18, 0x23, 0x24, 0x25, 0x32, 0x42, @@ -111,25 +112,20 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx) av_frame_free(&ctx->frames[i].f); } - ff_free_vlc(&ctx->vlc); - return 0; } static av_cold int mimic_decode_init(AVCodecContext *avctx) { MimicContext *ctx = avctx->priv_data; - int ret, i; + int i; ctx->prev_index = 0; ctx->cur_index = 15; - ret = ff_init_vlc_from_lengths(&ctx->vlc, MIMIC_VLC_BITS, FF_ARRAY_ELEMS(huffbits), - huffbits, 1, huffsyms, 1, 1, 0, 0); - if (ret < 0) { - av_log(avctx, AV_LOG_ERROR, "error initializing vlc table\n"); - return ret; - } + if (!block_vlc.table_size) + INIT_VLC_STATIC_FROM_LENGTHS(&block_vlc, MIMIC_VLC_BITS, FF_ARRAY_ELEMS(huffbits), + huffbits, 1, huffsyms, 1, 1, 0, 0, 4368); ff_blockdsp_init(&ctx->bdsp, avctx); ff_bswapdsp_init(&ctx->bbdsp); ff_hpeldsp_init(&ctx->hdsp, avctx->flags); @@ -223,7 +219,7 @@ static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale) int value; int coeff; - vlc = get_vlc2(&ctx->gb, ctx->vlc.table, MIMIC_VLC_BITS, 3); + vlc = get_vlc2(&ctx->gb, block_vlc.table, MIMIC_VLC_BITS, 3); if (!vlc) /* end-of-block code */ return 0; if (vlc == -1) From patchwork Tue Nov 10 10:47:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23504 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 8331D440F50 for ; Tue, 10 Nov 2020 12:57:03 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 08AF468BE46; Tue, 10 Nov 2020 12:50:07 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CE6B268BE23 for ; Tue, 10 Nov 2020 12:49:53 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id d12so10633205wrr.13 for ; Tue, 10 Nov 2020 02:49:53 -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=bpvjtuL0904bHagDoLTOGnC3g0rjuC8b7GCnYbcjLBA=; b=ZZFHxr1Gxh8yzcoS6//sJmXW9ojVnGdKPot6U7FqiTEsIjciQ36jpwTopfvzpm1MGE DGWqESM9xRZgLgN1Rqst6zftcv58b2rSKP2mnZX6eQejrEhkgB0je1lwVrp+u1/z0owp L2exwWi+IPG/jJWSFHMnGSO24ZpPIXGeqEEaKI9h4FsznRC+sjnLM8H83ueoFi7FyUpd p4gczLDF4ykhjAqf0/7ifAagx+FbRf4mJuifcea77b3cN3p8fnOrVWnUNidNwQWc8W0t V/mxs42fQpsKsxKwT/U/tmp/9EKCnoSn1r+ApDjCCZIFY53wHafrUKOw2UsozKATxipX 1I8g== 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=bpvjtuL0904bHagDoLTOGnC3g0rjuC8b7GCnYbcjLBA=; b=Aw1c6hOv3n1ucoWW7TIpPQiFvFqhcxEVz/qBOEaIBhGB5oAZvXNMaI2eTRn11lw5uX wFN9MfW1JTxIVYw7/DwLHS5v9yC5iH5Djw9FMOe4OmU1BmUhk/YyiqUPUHIAUrq86v7n 4QAZeOxhEmgUqMBf6HD6gn8pQ9CYP/4g3g3pK0i9QVdBEpVWBiUGiomT0LXKAnBp/J7Q Zy8hDwamqqnhVMsg1DkIwIOJdFZ3uPgC+AS/baV8N6jqceALz9L0JQS+9z7tEjkihxTG 7X5bA4AB7/wEzZV55PFpce34QrG5+mEaujQ45QJzlvQ+G+mnzJXkStqWNkqKCBlei5pc 75hw== X-Gm-Message-State: AOAM532ktNzqvwWyB8OgphKsyaKuRiby6B0byu/6jI864PzWMgw4gOGk OXp+SgThX2OC9BLNWuzZQ6uyPEcdddg= X-Google-Smtp-Source: ABdhPJwPBbuE7qOegiNsozpeewfmLdu0yoWtfINMxx1kbYsSxRT7oXHqWmB7NCZPsj8qU9AAuUrhmA== X-Received: by 2002:a05:6000:100f:: with SMTP id a15mr22625425wrx.309.1605005393092; Tue, 10 Nov 2020 02:49:53 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:52 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:30 +0100 Message-Id: <20201110104851.321029-34-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 033/114] avcodec/motionpixels: Only create VLC iff it is going to be used 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" If the Huffman tree consists of only one entry (which has length zero), no tree is used at all for parsing as the VLC API currently can't handle this. So it makes no sense to create a VLC in this case. Commit 41b7389cade702383e59343561776f83bb26e17f added a check for whether creating the VLC should be skipped, but it also skipped decoding the packet and it used the wrong check: It checked max_codes_bits, the maximum length of code; but this value is only updated iff there is more than one Huffman entry. So if there is only one Huffman entry, and there was a previous frame with more than one entry, then a VLC was created unnecessarily; yet if there was no previous frame with more than one entry, then this frame will be skipped which is probably spec-incompliant. I have no sample for the latter. This commit improves the check to create a VLC iff it is going to be used. Signed-off-by: Andreas Rheinhardt --- libavcodec/motionpixels.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index b48200b017..0bf153f883 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -324,8 +324,7 @@ static int mp_decode_frame(AVCodecContext *avctx, if (sz == 0) goto end; - if (mp->max_codes_bits <= 0) - goto end; + if (mp->codes_count > 1) if (init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0)) goto end; mp_decode_frame_helper(mp, &gb); From patchwork Tue Nov 10 10:47:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23505 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 AB221449A48 for ; Tue, 10 Nov 2020 12:57:16 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA5C368BE5A; Tue, 10 Nov 2020 12:50:07 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C265968BE2A for ; Tue, 10 Nov 2020 12:49:54 +0200 (EET) Received: by mail-wm1-f67.google.com with SMTP id s13so2526506wmh.4 for ; Tue, 10 Nov 2020 02:49:54 -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=wPZ/njqUh7Q9dNOvCOzT6jxgW2pe0MyPMNsp7Y+aBdI=; b=gaoreHCOqRYaNUlyUsAJYXLUNgETY54AIDV7hCo6M5KoTTf5ygBPUUonlMaMZCKuDJ GEZOq8DJEiH+cLICE90cj05bQReKfa8Aq72J97eFk/WSWs01fkYTr52Mt3JVSymr1IsR rzqc/5zFh5M+eLcvsDYQWx26/NkPOYkBvPPWpOS7WMLOsHFTDcCK7Ei/IVZF1m5TWCvy rUNpiudLsNphabkD3d3xGDZQY8Egb7I2QJo/piw42TxEZxCxQPNNhoo6Bo7yK34jUQep ac88DW2qki0rW3FtfAgLhFHEV4sIsBvtNcUrX/A/ItXoVF2lRdyCdX/53BG99dReAP0Q r3tw== 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=wPZ/njqUh7Q9dNOvCOzT6jxgW2pe0MyPMNsp7Y+aBdI=; b=tRKRuFB+PW/bcLM9ttQ3BwWbItDvQXD3baznIpoZsB3MF79gfm0mwb/G8IwkM5Z9e3 PDJ2DX2ABAF2Mphg3tvqYUqNFcMs0g9CyE2RSE6K78D1u3h42JlOXxGKpBm6eSF1vZ9Q cKpq79lMoaxql5C0GYklBHy/8RjoA8VWQ9weNgdWs9ptdr29JV/b43pVLujSavmq2xp5 rqQUPUaF7GSrmHc4YZu36dJ9nrCmcHbNLkmG75EPM8Fg4bONzX2WhLeagSa9JGLZRmjt Gl7XssFg3RZqxfWOFZjs6zO4R7eAYEqE8ysiVQtHd8iIb1Cuzj2ExzLhf4h15EPNo91y cxnA== X-Gm-Message-State: AOAM53251iT7A+wRDsn2PjwqWZyrVIX+6HmkNxvd94/JPTanc/jjc8GT 0X2B2PJRRTCct4mF3Jl569J/nhkZFOc= X-Google-Smtp-Source: ABdhPJxzoZgsxUeeJP3+6d5wWf9QzxPA6Fm8RsvGPXvhjhwPM9iXeBHN030d2KK15yhIEyM6aqCnEw== X-Received: by 2002:a1c:4957:: with SMTP id w84mr4060656wma.84.1605005393985; Tue, 10 Nov 2020 02:49:53 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:53 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:31 +0100 Message-Id: <20201110104851.321029-35-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 034/114] avcodec/motionpixels: Be more strict when parsing Huffman trees 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" This ensures that the number of leafs in the Huffman tree equals the number it is supposed to be and therefore ensures that the VLC tree is complete, allowing us to remove checks. Signed-off-by: Andreas Rheinhardt --- Alternatively one could use mp->current_codes_count when initializing the VLC. libavcodec/motionpixels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index 0bf153f883..4b9830fbed 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -133,7 +133,7 @@ static int mp_get_code(MotionPixelsContext *mp, GetBitContext *gb, int size, int if (mp_get_code(mp, gb, size, code + 1) < 0) return AVERROR_INVALIDDATA; } - if (mp->current_codes_count >= MAX_HUFF_CODES) { + if (mp->current_codes_count >= mp->codes_count) { av_log(mp->avctx, AV_LOG_ERROR, "too many codes\n"); return AVERROR_INVALIDDATA; } From patchwork Tue Nov 10 10:47:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23506 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 4922A449A48 for ; Tue, 10 Nov 2020 12:57:29 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B208E68BE7D; Tue, 10 Nov 2020 12:50:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF2AE68BE2E for ; Tue, 10 Nov 2020 12:49:55 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id j7so4889897wrp.3 for ; Tue, 10 Nov 2020 02:49:55 -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=2/IFLCyEeWmbl8ycvYjex9zNCQEceBHcvIRlS5YSCgU=; b=aP3X/NPlcUqKzllTKc+E/erSYhzAYYdfBZetjRfOL6Oku91LGyZO3xgzoJkmmzsZDx YgvTOxCrrFggF+rz/hf05qtihco7qRmuNYtAF86DH+k8JTDiwjzZBZE2S5pFKVSFfguG T2GtjJ5lbbJMZb3HlqSSIGCJIuU7U1+pEsAHiBMJIcDlNuD+9o9p6nI9kc4ZkVAGRE1o rZ8Fe9MfYpF/hDTedAjU2SD9df3ZfgmBaPCHHXtPT20IRBjBkHQmbb7py0sPFZFlpsH0 ooBDMEnewuPFDc/xb5D4fDMQsbx1c/LiQEpKqhxvQZS01savSXecsHCy+ZZaEB6oopDQ todA== 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=2/IFLCyEeWmbl8ycvYjex9zNCQEceBHcvIRlS5YSCgU=; b=h8dEWVKULWBiuIvO6xwTp+AaY+Kdr1qTpwP0Rc5+UnzgBa4Hlku0E4FRoqG1BxNLMT f6esCBZyw3S/j5k6bp4Qw2fOUdrf6y3Tgr04z/mKnmO18BSGD1ryBp1kfv+gTSLCNShy MPLQc22tF9/TBelsisXCQCgMBhKOSNRnSJMQR2MaU+73aXKmEVZ/h37OkBKOFAtIvmkk u21UWTEuNDmcddbtcjmzzymsUoelORPNgiEJ8AaK04lA6mwMmQcR6BUYSSSRjxZAlQnP DHsHvUqS3O+17bhkUjqOLyL/JpKKjHJ4UiYQTXGsSf6riZHmnbuxSxxiHCjpqRZDuQbn gMow== X-Gm-Message-State: AOAM5331GIufWjYWjyj4pl+UN+Q5P4i+kfS77sFTtn/L4rX89CjQKk/u c7LUT63X2d02nT8lqZVTXWntta986Ho= X-Google-Smtp-Source: ABdhPJzQy40ZIyUlBa2SgXDl4EMZcJJaLJ/40IouKFd6utSz6RDq22TsO26iloW0LPtK6uaKdPHOZQ== X-Received: by 2002:a5d:44c1:: with SMTP id z1mr19168727wrr.375.1605005394906; Tue, 10 Nov 2020 02:49:54 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:54 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:32 +0100 Message-Id: <20201110104851.321029-36-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 035/114] avcodec/motionpixels: Don't check for complete VLC 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" The algorithm used here always creates a complete VLC, so it is unnecessary to check this again. Signed-off-by: Andreas Rheinhardt --- libavcodec/motionpixels.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index 4b9830fbed..a65250efe5 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -195,8 +195,6 @@ static av_always_inline int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *g int i; i = (mp->codes_count == 1) ? 0 : get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1); - if (i < 0) - return i; return mp->codes[i].delta; } From patchwork Tue Nov 10 10:47:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23507 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 BE6C6449A48 for ; Tue, 10 Nov 2020 12:57:41 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C829B68BE84; Tue, 10 Nov 2020 12:50:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 857AF68BD43 for ; Tue, 10 Nov 2020 12:49:56 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id j7so4889949wrp.3 for ; Tue, 10 Nov 2020 02:49:56 -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=UeqgSPKZskcNQGrngNAXnbSNdEWUtcJxlHQ9bDFmTLI=; b=p7pTDEakt5VbrJqSaR1V34Vy7u+IPSCsvsMQgyRRX8YMYUUihkVSGL00TobAYQDwIt uLMlOL2PbnKlgJwTnlJermhP4H/Oy6kxB1JF4BIF2jwPTX28xOO2wgE7jo2JDzqRYyt/ UCBgNjz/h66YG1839FprxLtl1M5hQGts4QFvV73CFXhxM8jJBnXCnDtznSjofJyqcfah 7UF0bhE15KAB5wwUmAiiOxIyAjedq5K4voVDAGnsUYxjSTAqLyF/Ga7LxZxZKEQ0g5S6 7jWELA2rFiQuKhrzyPyB+KYMTlB0CLYdqe1sW9qCv2ORxoLxAKStIdIvWchvgepyTVeL MqRQ== 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=UeqgSPKZskcNQGrngNAXnbSNdEWUtcJxlHQ9bDFmTLI=; b=jO2ryc04O86EcjZtYr/1h/e3N/ksz01bNN6OAVMGC9RhvQak1I7LbCUW+qYpncAF1w mf0CdCPzRqU1Hy5YrYkTjsQxHLIQ1H9OUBPN8yF+fZvPA0KDfzev9hW3uTb+saHzj/mP HpiRiNShsLkanTrKl0Q/KwunIEXo91iC0INcppNOrOXAPsj4VVEpkdGocDCQjcurXv1m qMcD8vk0nY8oz6feddzKtmaDf6ak2HDF5zYa3l/vaDEja6IAP9DUD9zxNZZCc8/GRoHi MfD8w5KXc029ztSseuH81os0RfV+6y076QrbDotAjxu00snBEVfMNKhK1HNNO8U5Ta0F 68UQ== X-Gm-Message-State: AOAM531I/5KOdeFMnsE3VKSYTcy0KQmI4aewGqDpUvSgOUlo0GtlwSQN f42/X93urT6fbZMNhV1jQ3fm0adG3vc= X-Google-Smtp-Source: ABdhPJxE0QSMg9dyNoS7pQ3Kfo6kwRhZvJnWUaZurh2whDYEdM7Oq1MBzV88msLfyLg+ym7CG0QRjQ== X-Received: by 2002:adf:dc0a:: with SMTP id t10mr23259271wri.314.1605005395778; Tue, 10 Nov 2020 02:49:55 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:55 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:33 +0100 Message-Id: <20201110104851.321029-37-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 036/114] avcodec/motionpixels: Use symbols table 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" If allows us to directly store the deltas in the VLC table and therefore avoids a level of indirection. Signed-off-by: Andreas Rheinhardt --- libavcodec/motionpixels.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index a65250efe5..927f9fdc14 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -192,10 +192,8 @@ static void mp_set_rgb_from_yuv(MotionPixelsContext *mp, int x, int y, const Yuv static av_always_inline int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *gb) { - int i; - - i = (mp->codes_count == 1) ? 0 : get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1); - return mp->codes[i].delta; + return mp->vlc.table ? get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1) + : mp->codes[0].delta; } static void mp_decode_line(MotionPixelsContext *mp, GetBitContext *gb, int y) @@ -322,9 +320,14 @@ static int mp_decode_frame(AVCodecContext *avctx, if (sz == 0) goto end; - if (mp->codes_count > 1) - if (init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0)) - goto end; + if (mp->codes_count > 1) { + ret = ff_init_vlc_sparse(&mp->vlc, mp->max_codes_bits, mp->codes_count, + &mp->codes[0].size, sizeof(HuffCode), 1, + &mp->codes[0].code, sizeof(HuffCode), 4, + &mp->codes[0].delta, sizeof(HuffCode), 1, 0); + if (ret < 0) + goto end; + } mp_decode_frame_helper(mp, &gb); ff_free_vlc(&mp->vlc); From patchwork Tue Nov 10 10:47:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23489 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 AEBC444B3FF for ; Tue, 10 Nov 2020 12:54:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BC65868BE43; Tue, 10 Nov 2020 12:50:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BCE4E68BE4D for ; Tue, 10 Nov 2020 12:49:57 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id h2so2542321wmm.0 for ; Tue, 10 Nov 2020 02:49:57 -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=lLGVpimPvZkAsuRQ7vOmWkfX/W5w878L0aCHoQ7Dr3s=; b=LTJJ1qLO8s2BvCVL0eowZEnpuDpZEi2ABBCRUNayzRK86XE9RGs7fI8f5K9hHL9q5n hLFg8RsHLhjqjykNtRvC/yfAQmVyxp46x5SlkqAw/rxuGniJE/WyPEvBMQGeTAzkBr+h /yITD2eBgWJ3qzUpc/PMPlo6A5lfeSLMZPgFikCEFT7hABtYY3FefLiZZN2a9Ra8amFp BeXTM9ac5qVLIYsHAcOOZZrlE8FiSwT+NaNjsiMvjOrjHpwti9tm+PQIfIYCinod3QeV otCApYuMfrmuLYqR+7J1dWy4HnUzotKTAI0MOtEslBYfhmi4YFQMBVZsrdhFlP7nRj1I 0tew== 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=lLGVpimPvZkAsuRQ7vOmWkfX/W5w878L0aCHoQ7Dr3s=; b=iJxUGCq64KwvxxAmGAydLrGr7qRsnNocFfpERwMV3SI9OflvT0ZYxLOV/XpRbcnQFd oEamEcewhRxVNHBtsoD3+f6eR5lzwWWWObzhjGAqCtKNMbEkj0B7es02Sx8K7hwJiPE+ 9M826x3Nfc3ClhEpXTcGGCZ7giEVInZB4/9qdMAHZi0Db/jBOxRvML6Fw3G1z7Mdw6HF jrmM8ZtPklKPsKTWLtexjtrxTUnrzlCuNTXlxoJrPObn2nXcMjB5vt7kJN0pBDDlWYiI pgIF7TNaY7LEis0F84/SGTKOCE1OZKkdayLiBWsKcHRwnL0PQur+bj1+gjYbRP1A3zmJ yU5w== X-Gm-Message-State: AOAM532nzqbzbfGl+7f0ttRLxy4oty8AXRDzc6mRl8iXxcPvXyM1dUaq cGMyfqRhMEhblkLc4k6LUSP+vF1Cpw8= X-Google-Smtp-Source: ABdhPJzkoV35KukuUBbN6zt7aJJ3kEuQAsLnSLhGlQgJjrF6NhmcvOJXMjNXYTJHVLStgv7s2IEUDA== X-Received: by 2002:a7b:cc13:: with SMTP id f19mr3972125wmh.44.1605005397020; Tue, 10 Nov 2020 02:49:57 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:56 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:34 +0100 Message-Id: <20201110104851.321029-38-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 037/114] avcodec/motionpixels: Simplify creating VLC tables 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" By using ff_init_vlc_from_lengths(), we do not have to keep track of the codes themselves, but can offload this to ff_init_vlc_from_lengths(). Furthermore, the old code presumed sizeof(int) == 4; this is no longer so. Signed-off-by: Andreas Rheinhardt --- libavcodec/motionpixels.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index 927f9fdc14..3bc31870d9 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -29,7 +29,6 @@ #include "motionpixels_tablegen.h" typedef struct HuffCode { - int code; uint8_t size; uint8_t delta; } HuffCode; @@ -121,7 +120,7 @@ static void mp_read_changes_map(MotionPixelsContext *mp, GetBitContext *gb, int } } -static int mp_get_code(MotionPixelsContext *mp, GetBitContext *gb, int size, int code) +static int mp_get_code(MotionPixelsContext *mp, GetBitContext *gb, int size) { while (get_bits1(gb)) { ++size; @@ -129,8 +128,7 @@ static int mp_get_code(MotionPixelsContext *mp, GetBitContext *gb, int size, int av_log(mp->avctx, AV_LOG_ERROR, "invalid code size %d/%d\n", size, mp->max_codes_bits); return AVERROR_INVALIDDATA; } - code <<= 1; - if (mp_get_code(mp, gb, size, code + 1) < 0) + if (mp_get_code(mp, gb, size) < 0) return AVERROR_INVALIDDATA; } if (mp->current_codes_count >= mp->codes_count) { @@ -138,7 +136,6 @@ static int mp_get_code(MotionPixelsContext *mp, GetBitContext *gb, int size, int return AVERROR_INVALIDDATA; } - mp->codes[mp->current_codes_count ].code = code; mp->codes[mp->current_codes_count++].size = size; return 0; } @@ -155,7 +152,7 @@ static int mp_read_codes_table(MotionPixelsContext *mp, GetBitContext *gb) for (i = 0; i < mp->codes_count; ++i) mp->codes[i].delta = get_bits(gb, 4); mp->current_codes_count = 0; - if ((ret = mp_get_code(mp, gb, 0, 0)) < 0) + if ((ret = mp_get_code(mp, gb, 0)) < 0) return ret; if (mp->current_codes_count < mp->codes_count) { av_log(mp->avctx, AV_LOG_ERROR, "too few codes\n"); @@ -321,10 +318,12 @@ static int mp_decode_frame(AVCodecContext *avctx, goto end; if (mp->codes_count > 1) { - ret = ff_init_vlc_sparse(&mp->vlc, mp->max_codes_bits, mp->codes_count, - &mp->codes[0].size, sizeof(HuffCode), 1, - &mp->codes[0].code, sizeof(HuffCode), 4, - &mp->codes[0].delta, sizeof(HuffCode), 1, 0); + /* The entries of the mp->codes array are sorted from right to left + * in the Huffman tree, hence -(int)sizeof(HuffCode). */ + ret = ff_init_vlc_from_lengths(&mp->vlc, mp->max_codes_bits, mp->codes_count, + &mp->codes[mp->codes_count - 1].size, -(int)sizeof(HuffCode), + &mp->codes[mp->codes_count - 1].delta, -(int)sizeof(HuffCode), 1, + 0, 0); if (ret < 0) goto end; } From patchwork Tue Nov 10 10:47:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23508 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 B4B88449A48 for ; Tue, 10 Nov 2020 12:58:05 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DB16168BE92; Tue, 10 Nov 2020 12:50:11 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 145B868BE4E for ; Tue, 10 Nov 2020 12:49:58 +0200 (EET) Received: by mail-wm1-f53.google.com with SMTP id c16so2537997wmd.2 for ; Tue, 10 Nov 2020 02:49:58 -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=h8HghN/RVGWQJivjYvqNvG+aonPF405ymbClhzNVtXs=; b=Oz8urBniOa8wJo/SXW6PXTK/H4nWvIUSIsFZZ4ixwj/EtylsCmKpIDm85EL4UuvzwU qPhjm5j198iO+NYflXNyeaqpLbPMHIDBxqExyYOTLnAXgKkX/eYExTDRzYL6IfXm08F4 rRhQDAa7HMGcBpk4QY05o2Jo+RyNFQTL2O5bXXP3Ube1YwdXdYzoLkXTd19sZxIu0BUB jS/d91WHPatbi2GVsvdiuwYIsvnYa7/ytKLH0x18dv1Szdwp7UkIcoiemqieqSkH/D1C MHEyLDO4237ZtVZZNr1IkV88LIQF0gJFwdcdSZ/TYV4mzlAHyzCXG4rZE7weZGBiezue Brew== 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=h8HghN/RVGWQJivjYvqNvG+aonPF405ymbClhzNVtXs=; b=MzzsIr2R3b9zIjDCnFOT9KS87Zqp7Y3ca7RDYCUgzpxRszSSCv14wb92p/NymjBzgx vNbPRWc4wzAgm1t+onxvM6L0ZqeT0whKOxBG+KiaDLnelsYoMcLaI+ska6/7iVMJGLY5 TZDWUHDnuoVPHzovm0PCD4nmzNiqZTavwQ4DaqRPqh6uRnNLHd1H4nUkpyFOLm2CW6PU ri75C+dvY3K+dGfPfQgSP9n3lf0zZY1Q5tGqWl0HPocFGSRbm3uV9vuQDZZrEjyRF9yB nBMwl+SGHLDEAHfGIferrc+sEtJcrBU5AC+wJl32mqCqkD5SCRkIbDWfHaEo7h3u+YFK 9Vfw== X-Gm-Message-State: AOAM531b9dRXYDdxkMek4pta44eNgBg1KxfVQXPpVECrqgH1Unq3iBn+ 4zYZcds+3/EKL618k7NHi3xcI2eBkaQ= X-Google-Smtp-Source: ABdhPJxQe1lz+X9jm5uwzdbnnn4EK/RaLxZwiB7LKslMuYwye+c3/RepsdUbY8CH0eCBoXYvc5jg8Q== X-Received: by 2002:a7b:c8c9:: with SMTP id f9mr3917697wml.3.1605005397877; Tue, 10 Nov 2020 02:49:57 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:57 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:35 +0100 Message-Id: <20201110104851.321029-39-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 038/114] avcodec/mpc7: Reduce size of tables used to initialize 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" By switching to ff_init_vlc_from_lengths() one can replace tables of codes of type uint16_t with tables of symbols of type uint8_t, saving space. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc7.c | 27 ++++---- libavcodec/mpc7data.h | 156 ++++++++++++++++++++---------------------- 2 files changed, 90 insertions(+), 93 deletions(-) diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index 6482029efc..532ea113c2 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -54,7 +54,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) static VLC_TYPE quant_tables[7224][2]; VLC_TYPE (*quant_table)[2] = quant_tables; - const uint16_t *raw_quant_table = mpc7_quant_vlcs; + const uint8_t *raw_quant_table = mpc7_quant_vlcs; /* Musepack SV7 is always stereo */ if (avctx->channels != 2) { @@ -93,23 +93,24 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) if(vlc_initialized) return 0; av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n"); - INIT_VLC_STATIC(&scfi_vlc, MPC7_SCFI_BITS, MPC7_SCFI_SIZE, - &mpc7_scfi[1], 2, 1, - &mpc7_scfi[0], 2, 1, 1 << MPC7_SCFI_BITS); - INIT_VLC_STATIC(&dscf_vlc, MPC7_DSCF_BITS, MPC7_DSCF_SIZE, - &mpc7_dscf[1], 2, 1, - &mpc7_dscf[0], 2, 1, 1 << MPC7_DSCF_BITS); - INIT_VLC_STATIC(&hdr_vlc, MPC7_HDR_BITS, MPC7_HDR_SIZE, - &mpc7_hdr[1], 2, 1, - &mpc7_hdr[0], 2, 1, 1 << MPC7_HDR_BITS); + INIT_VLC_STATIC_FROM_LENGTHS(&scfi_vlc, MPC7_SCFI_BITS, MPC7_SCFI_SIZE, + &mpc7_scfi[1], 2, + &mpc7_scfi[0], 2, 1, 0, 0, 1 << MPC7_SCFI_BITS); + INIT_VLC_STATIC_FROM_LENGTHS(&dscf_vlc, MPC7_DSCF_BITS, MPC7_DSCF_SIZE, + &mpc7_dscf[1], 2, + &mpc7_dscf[0], 2, 1, 0, 0, 1 << MPC7_DSCF_BITS); + INIT_VLC_STATIC_FROM_LENGTHS(&hdr_vlc, MPC7_HDR_BITS, MPC7_HDR_SIZE, + &mpc7_hdr[1], 2, + &mpc7_hdr[0], 2, 1, 0, 0, 1 << MPC7_HDR_BITS); for(i = 0; i < MPC7_QUANT_VLC_TABLES; i++){ for(j = 0; j < 2; j++){ quant_vlc[i][j].table = quant_table; quant_vlc[i][j].table_allocated = quant_sizes[i * 2 + j]; quant_table += quant_sizes[i * 2 + j]; - init_vlc(&quant_vlc[i][j], 9, mpc7_quant_vlc_sizes[i], - raw_quant_table + 1, 4, 2, - raw_quant_table, 4, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&quant_vlc[i][j], 9, mpc7_quant_vlc_sizes[i], + &raw_quant_table[1], 2, + &raw_quant_table[0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); raw_quant_table += 2 * mpc7_quant_vlc_sizes[i]; } } diff --git a/libavcodec/mpc7data.h b/libavcodec/mpc7data.h index b9c5f208a4..b578cbdb27 100644 --- a/libavcodec/mpc7data.h +++ b/libavcodec/mpc7data.h @@ -33,21 +33,21 @@ static const int8_t mpc7_idx51[] = { -2,-2,-2,-2,-2,-1,-1,-1,-1,-1, 0, 0, 0, 0, #define MPC7_SCFI_SIZE 4 #define MPC7_SCFI_BITS 3 static const uint8_t mpc7_scfi[MPC7_SCFI_SIZE * 2] = { - 0x2, 3, 0x1, 1, 0x3, 3, 0x0, 2 + 0x03, 2, 0x00, 3, 0x02, 3, 0x01, 1, }; #define MPC7_DSCF_SIZE 16 #define MPC7_DSCF_BITS 6 static const uint8_t mpc7_dscf[MPC7_DSCF_SIZE * 2] = { - 0x20, 6, 0x04, 5, 0x11, 5, 0x1E, 5, 0x0D, 4, 0x00, 3, 0x03, 3, 0x09, 4, - 0x05, 3, 0x02, 3, 0x0E, 4, 0x03, 4, 0x1F, 5, 0x05, 5, 0x21, 6, 0x0C, 4 + 0x05, 3, 0x01, 5, 0x0D, 5, 0x0B, 4, 0x09, 3, 0x06, 3, 0x00, 6, 0x0E, 6, + 0x02, 5, 0x07, 4, 0x08, 3, 0x0F, 4, 0x04, 4, 0x0A, 4, 0x03, 5, 0x0C, 5, }; #define MPC7_HDR_SIZE 10 #define MPC7_HDR_BITS 9 static const uint8_t mpc7_hdr[MPC7_HDR_SIZE * 2] = { - 0x5C, 8, 0x2F, 7, 0x0A, 5, 0x04, 4, 0x00, 2, - 0x01, 1, 0x03, 3, 0x16, 6, 0xBB, 9, 0xBA, 9 + 0x04, 2, 0x03, 4, 0x02, 5, 0x07, 6, 0x00, 8, + 0x09, 9, 0x08, 9, 0x01, 7, 0x06, 3, 0x05, 1, }; #define MPC7_QUANT_VLC_TABLES 7 @@ -59,81 +59,77 @@ static const uint8_t mpc7_quant_vlc_off[MPC7_QUANT_VLC_TABLES] = { 0, 0, 3, 4, 7, 15, 31 }; -static const uint16_t mpc7_quant_vlcs[177 * 2 * 2] = { - 0x0036, 6, 0x0009, 5, 0x0020, 6, 0x0005, 5, 0x000A, 4, 0x0007, 5, - 0x0034, 6, 0x0000, 5, 0x0023, 6, 0x000A, 5, 0x0006, 4, 0x0004, 5, - 0x000B, 4, 0x0007, 3, 0x000C, 4, 0x0003, 5, 0x0007, 4, 0x000B, 5, - 0x0022, 6, 0x0001, 5, 0x0035, 6, 0x0006, 5, 0x0009, 4, 0x0002, 5, - 0x0021, 6, 0x0008, 5, 0x0037, 6, - 0x0067, 8, 0x003E, 7, 0x00E1, 9, 0x0037, 7, 0x0003, 4, 0x0034, 7, - 0x0065, 8, 0x003C, 7, 0x00E3, 9, 0x0018, 6, 0x0000, 4, 0x003D, 7, - 0x0004, 4, 0x0001, 1, 0x0005, 4, 0x003F, 7, 0x0001, 4, 0x003B, 7, - 0x00E2, 9, 0x0039, 7, 0x0064, 8, 0x0035, 7, 0x0002, 4, 0x0036, 7, - 0x00E0, 9, 0x003A, 7, 0x0066, 8, - - 0x0059, 7, 0x002F, 6, 0x000F, 5, 0x0000, 5, 0x005B, 7, 0x0004, 5, - 0x0006, 4, 0x000D, 4, 0x0004, 4, 0x0005, 5, 0x0014, 5, 0x000C, 4, - 0x0004, 3, 0x000F, 4, 0x000E, 5, 0x0003, 5, 0x0003, 4, 0x000E, 4, - 0x0005, 4, 0x0001, 5, 0x005A, 7, 0x0002, 5, 0x0015, 5, 0x002E, 6, - 0x0058, 7, - 0x0399, 10, 0x0071, 7, 0x0033, 6, 0x00E7, 8, 0x039A, 10, 0x0068, 7, - 0x001E, 5, 0x0000, 3, 0x001D, 5, 0x0069, 7, 0x0032, 6, 0x0001, 3, - 0x0002, 2, 0x0003, 3, 0x0031, 6, 0x006B, 7, 0x001B, 5, 0x0002, 3, - 0x001F, 5, 0x0070, 7, 0x0398, 10, 0x006A, 7, 0x0030, 6, 0x0072, 7, - 0x039B, 10, - - 0x000C, 4, 0x0004, 3, 0x0000, 2, 0x0001, 2, 0x0007, 3, 0x0005, 3, - 0x000D, 4, - 0x0004, 5, 0x0003, 4, 0x0002, 2, 0x0003, 2, 0x0001, 2, 0x0000, 3, - 0x0005, 5, - - 0x0005, 4, 0x0000, 3, 0x0004, 3, 0x0006, 3, 0x0007, 3, 0x0005, 3, - 0x0003, 3, 0x0001, 3, 0x0004, 4, - 0x0009, 5, 0x000C, 4, 0x0003, 3, 0x0000, 2, 0x0002, 2, 0x0007, 3, - 0x000D, 4, 0x0005, 4, 0x0008, 5, - - 0x0039, 6, 0x0017, 5, 0x0008, 4, 0x000A, 4, 0x000D, 4, 0x0000, 3, - 0x0002, 3, 0x0003, 3, 0x0001, 3, 0x000F, 4, 0x000C, 4, 0x0009, 4, - 0x001D, 5, 0x0016, 5, 0x0038, 6, - 0x00E5, 8, 0x0038, 6, 0x0007, 5, 0x0002, 4, 0x0000, 3, 0x0003, 3, - 0x0005, 3, 0x0006, 3, 0x0004, 3, 0x0002, 3, 0x000F, 4, 0x001D, 5, - 0x0006, 5, 0x0073, 7, 0x00E4, 8, - - 0x0041, 7, 0x0006, 6, 0x002C, 6, 0x002D, 6, 0x003B, 6, 0x000D, 5, - 0x0011, 5, 0x0013, 5, 0x0017, 5, 0x0015, 5, 0x001A, 5, 0x001E, 5, - 0x0000, 4, 0x0002, 4, 0x0005, 4, 0x0007, 4, 0x0003, 4, 0x0004, 4, - 0x001F, 5, 0x001C, 5, 0x0019, 5, 0x001B, 5, 0x0018, 5, 0x0014, 5, - 0x0012, 5, 0x000C, 5, 0x0002, 5, 0x003A, 6, 0x0021, 6, 0x0007, 6, - 0x0040, 7, - 0x1948, 13, 0x194A, 13, 0x0328, 10, 0x0195, 9, 0x00CB, 8, 0x0066, 7, - 0x0031, 6, 0x0009, 5, 0x000F, 5, 0x001F, 5, 0x0002, 4, 0x0006, 4, - 0x0008, 4, 0x000B, 4, 0x000D, 4, 0x0000, 3, 0x000E, 4, 0x000A, 4, - 0x0009, 4, 0x0005, 4, 0x0003, 4, 0x001E, 5, 0x000E, 5, 0x0008, 5, - 0x0030, 6, 0x0067, 7, 0x00C9, 8, 0x00C8, 8, 0x0653, 11, 0x1949, 13, - 0x194B, 13, - - 0x0067, 8, 0x0099, 8, 0x00B5, 8, 0x00E9, 8, 0x0040, 7, 0x0041, 7, - 0x004D, 7, 0x0051, 7, 0x005B, 7, 0x0071, 7, 0x0070, 7, 0x0018, 6, - 0x001D, 6, 0x0023, 6, 0x0025, 6, 0x0029, 6, 0x002C, 6, 0x002E, 6, - 0x0033, 6, 0x0031, 6, 0x0036, 6, 0x0037, 6, 0x0039, 6, 0x003C, 6, - 0x0000, 5, 0x0002, 5, 0x000A, 5, 0x0005, 5, 0x0009, 5, 0x0006, 5, - 0x000D, 5, 0x0007, 5, 0x000B, 5, 0x000F, 5, 0x0008, 5, 0x0004, 5, - 0x0003, 5, 0x0001, 5, 0x003F, 6, 0x003E, 6, 0x003D, 6, 0x0035, 6, - 0x003B, 6, 0x0034, 6, 0x0030, 6, 0x002F, 6, 0x002B, 6, 0x002A, 6, - 0x0027, 6, 0x0024, 6, 0x0021, 6, 0x001C, 6, 0x0075, 7, 0x0065, 7, - 0x0064, 7, 0x0050, 7, 0x0045, 7, 0x0044, 7, 0x0032, 7, 0x00E8, 8, - 0x00B4, 8, 0x0098, 8, 0x0066, 8, - 0x37A4, 14, 0x37AD, 14, 0x37A6, 14, 0x37AE, 14, 0x0DEA, 12, 0x02F0, 10, - 0x02F1, 10, 0x00A0, 9, 0x00A2, 9, 0x01BC, 9, 0x007A, 8, 0x00DF, 8, - 0x003C, 7, 0x0049, 7, 0x006E, 7, 0x000E, 6, 0x0018, 6, 0x0019, 6, - 0x0022, 6, 0x0025, 6, 0x0036, 6, 0x0003, 5, 0x0009, 5, 0x000B, 5, - 0x0010, 5, 0x0013, 5, 0x0015, 5, 0x0018, 5, 0x001A, 5, 0x001D, 5, - 0x001F, 5, 0x0002, 4, 0x0000, 4, 0x001E, 5, 0x001C, 5, 0x0019, 5, - 0x0016, 5, 0x0014, 5, 0x000E, 5, 0x000D, 5, 0x0008, 5, 0x0006, 5, - 0x0002, 5, 0x002E, 6, 0x0023, 6, 0x001F, 6, 0x0015, 6, 0x000F, 6, - 0x005F, 7, 0x0048, 7, 0x0029, 7, 0x00BD, 8, 0x007B, 8, 0x0179, 9, - 0x00A1, 9, 0x037B, 10, 0x0147, 10, 0x0146, 10, 0x0DE8, 12, 0x37AF, 14, - 0x37A7, 14, 0x37AC, 14, 0x37A5, 14 +static const uint8_t mpc7_quant_vlcs[177 * 2 * 2] = { + /* quant_vlc[0][0] - 27 entries */ + 0x07, 5, 0x13, 5, 0x17, 5, 0x0F, 5, 0x0B, 5, 0x03, 5, 0x15, 5, + 0x05, 5, 0x19, 5, 0x01, 5, 0x09, 5, 0x11, 5, 0x0A, 4, 0x10, 4, + 0x02, 6, 0x18, 6, 0x12, 6, 0x08, 6, 0x16, 4, 0x04, 4, 0x0C, 4, + 0x0E, 4, 0x06, 6, 0x14, 6, 0x00, 6, 0x1A, 6, 0x0D, 3, + /* quant_vlc[0][1] - 27 entries */ + 0x0A, 4, 0x10, 4, 0x16, 4, 0x04, 4, 0x0C, 4, 0x0E, 4, 0x09, 6, + 0x14, 8, 0x06, 8, 0x1A, 8, 0x00, 8, 0x05, 7, 0x15, 7, 0x17, 7, + 0x03, 7, 0x18, 9, 0x02, 9, 0x12, 9, 0x08, 9, 0x13, 7, 0x19, 7, + 0x11, 7, 0x07, 7, 0x0B, 7, 0x01, 7, 0x0F, 7, 0x0D, 1, + /* quant_vlc[1][0] - 25 entries */ + 0x03, 5, 0x13, 5, 0x15, 5, 0x0F, 5, 0x05, 5, 0x09, 5, 0x10, 4, + 0x08, 4, 0x12, 4, 0x06, 4, 0x0E, 5, 0x02, 5, 0x0C, 3, 0x0A, 5, + 0x16, 5, 0x18, 7, 0x00, 7, 0x14, 7, 0x04, 7, 0x17, 6, 0x01, 6, + 0x0B, 4, 0x07, 4, 0x11, 4, 0x0D, 4, + /* quant_vlc[1][1] - 25 entries */ + 0x07, 3, 0x0B, 3, 0x11, 3, 0x0D, 3, 0x0C, 2, 0x16, 6, 0x0E, 6, + 0x0A, 6, 0x02, 6, 0x05, 7, 0x09, 7, 0x15, 7, 0x0F, 7, 0x10, 5, + 0x13, 7, 0x01, 7, 0x17, 7, 0x14, 10, 0x00, 10, 0x04, 10, 0x18, 10, + 0x03, 8, 0x08, 5, 0x06, 5, 0x12, 5, + /* quant_vlc[2][0] - 7 entries */ + 0x02, 2, 0x03, 2, 0x01, 3, 0x05, 3, 0x00, 4, 0x06, 4, 0x04, 3, + /* quant_vlc[2][1] - 7 entries */ + 0x05, 3, 0x00, 5, 0x06, 5, 0x01, 4, 0x04, 2, 0x02, 2, 0x03, 2, + /* quant_vlc[3][0] - 9 entries */ + 0x01, 3, 0x07, 3, 0x08, 4, 0x00, 4, 0x06, 3, 0x02, 3, 0x05, 3, + 0x03, 3, 0x04, 3, + /* quant_vlc[3][1] - 9 entries */ + 0x03, 2, 0x08, 5, 0x00, 5, 0x07, 4, 0x02, 3, 0x04, 2, 0x01, 4, + 0x06, 4, 0x05, 3, + /* quant_vlc[4][0] - 15 entries */ + 0x05, 3, 0x08, 3, 0x06, 3, 0x07, 3, 0x02, 4, 0x0B, 4, 0x03, 4, + 0x0D, 5, 0x01, 5, 0x0A, 4, 0x04, 4, 0x0E, 6, 0x00, 6, 0x0C, 5, + 0x09, 4, + /* quant_vlc[4][1] - 15 entries */ + 0x04, 3, 0x03, 4, 0x0C, 5, 0x02, 5, 0x09, 3, 0x05, 3, 0x08, 3, + 0x06, 3, 0x07, 3, 0x01, 6, 0x0E, 8, 0x00, 8, 0x0D, 7, 0x0B, 5, + 0x0A, 4, + /* quant_vlc[5][0] - 31 entries */ + 0x0C, 4, 0x1A, 5, 0x01, 6, 0x1D, 6, 0x0D, 4, 0x10, 4, 0x11, 4, + 0x0E, 4, 0x19, 5, 0x05, 5, 0x0F, 4, 0x1E, 7, 0x00, 7, 0x1C, 6, + 0x06, 5, 0x18, 5, 0x07, 5, 0x17, 5, 0x09, 5, 0x02, 6, 0x03, 6, + 0x08, 5, 0x16, 5, 0x14, 5, 0x0A, 5, 0x15, 5, 0x13, 5, 0x1B, 6, + 0x04, 6, 0x0B, 5, 0x12, 5, + /* quant_vlc[5][1] - 31 entries */ + 0x0F, 3, 0x0A, 4, 0x14, 4, 0x17, 5, 0x07, 5, 0x13, 4, 0x0B, 4, + 0x16, 5, 0x08, 5, 0x0C, 4, 0x12, 4, 0x11, 4, 0x0D, 4, 0x18, 6, + 0x06, 6, 0x1B, 8, 0x1A, 8, 0x02, 10, 0x00, 13, 0x1D, 13, 0x01, 13, + 0x1E, 13, 0x1C, 11, 0x03, 9, 0x04, 8, 0x05, 7, 0x19, 7, 0x0E, 4, + 0x10, 4, 0x15, 5, 0x09, 5, + /* quant_vlc[6][0] - 63 entries */ + 0x18, 5, 0x25, 5, 0x19, 5, 0x24, 5, 0x23, 5, 0x1B, 5, 0x1D, 5, + 0x1F, 5, 0x22, 5, 0x1C, 5, 0x1A, 5, 0x20, 5, 0x0B, 6, 0x3A, 7, + 0x3E, 8, 0x00, 8, 0x1E, 5, 0x33, 6, 0x0C, 6, 0x21, 5, 0x04, 7, + 0x05, 7, 0x32, 6, 0x39, 7, 0x38, 7, 0x0D, 6, 0x31, 6, 0x0E, 6, + 0x3D, 8, 0x01, 8, 0x06, 7, 0x30, 6, 0x37, 7, 0x07, 7, 0x0F, 6, + 0x2F, 6, 0x2E, 6, 0x10, 6, 0x3C, 8, 0x02, 8, 0x08, 7, 0x11, 6, + 0x2D, 6, 0x2C, 6, 0x13, 6, 0x36, 7, 0x35, 7, 0x12, 6, 0x2B, 6, + 0x29, 6, 0x14, 6, 0x15, 6, 0x0A, 7, 0x09, 7, 0x16, 6, 0x3B, 8, + 0x03, 8, 0x34, 7, 0x2A, 6, 0x17, 6, 0x28, 6, 0x27, 6, 0x26, 6, + /* quant_vlc[6][1] - 63 entries */ + 0x20, 4, 0x2A, 5, 0x15, 5, 0x1F, 4, 0x29, 5, 0x0F, 6, 0x2F, 6, + 0x28, 5, 0x16, 5, 0x07, 9, 0x36, 9, 0x08, 9, 0x39, 10, 0x38, 10, + 0x32, 7, 0x2E, 6, 0x17, 5, 0x10, 6, 0x11, 6, 0x27, 5, 0x26, 5, + 0x0C, 7, 0x0A, 8, 0x34, 8, 0x2D, 6, 0x18, 5, 0x12, 6, 0x2C, 6, + 0x31, 7, 0x0D, 7, 0x13, 6, 0x19, 5, 0x25, 5, 0x1A, 5, 0x24, 5, + 0x2B, 6, 0x05, 10, 0x06, 10, 0x35, 9, 0x33, 8, 0x30, 7, 0x1B, 5, + 0x23, 5, 0x1C, 5, 0x14, 6, 0x0E, 7, 0x09, 9, 0x3A, 12, 0x00, 14, + 0x3E, 14, 0x02, 14, 0x3C, 14, 0x04, 12, 0x3D, 14, 0x01, 14, 0x03, 14, + 0x3B, 14, 0x37, 10, 0x0B, 8, 0x22, 5, 0x1D, 5, 0x21, 5, 0x1E, 5, }; #endif /* AVCODEC_MPC7DATA_H */ From patchwork Tue Nov 10 10:47: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: 23509 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 EDE5E449CD8 for ; Tue, 10 Nov 2020 12:58:17 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B48D068BE9C; Tue, 10 Nov 2020 12:50:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E2A7968BE50 for ; Tue, 10 Nov 2020 12:49:59 +0200 (EET) Received: by mail-wm1-f51.google.com with SMTP id a3so1216055wmb.5 for ; Tue, 10 Nov 2020 02:49:59 -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=npZENk1RMGTVjSpoZWR7eL8Ac6z/cczH0epYZxQgH9E=; b=V9aT/F+kmqflupTv4ax5It8930TJBklWaLL3oWNyQx49ER5LjQsc9SI/VWSOjyhUis QHfrENHxRR2zkNPpD4bbOvnxEqElfVNlLGdpwqCa7ZaBSWWCkWbcaF+cJ5ZqwPf731D/ YGgE1kqynHy74y1tk+JymUAL4ReD1dMU++f93b00PPUH865mZAzOh+zGs/r4/iMMcyDV TszThqgSywQKMCYu9l1nheT4GFmSdm9zx6Ijem0qc98c9Is7y2r/ny3Axds5aTq7a7BD Oa1Lq3oK7QFHj83tudiSql8xkTm4LKNsqAGugzofEzEppyHE29lXHg9zw6XRWGTzdpwo 4XSw== 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=npZENk1RMGTVjSpoZWR7eL8Ac6z/cczH0epYZxQgH9E=; b=XuxTUej5SiCliwdUdPRYm/aUWh9XmolFUhgGWr2WVnBSmAcIx+pRl19o7Yy8oMb3fe bOcmHnCPII/w6Fhhvtq5DRSaw+jhOtqgaBsViZPYLsB1ibdGbbjsqWKo6BwLfd87WHW0 HzjjBdF8307wvWjceiVIRp201MQmAgs30GwjJMtoTQCDK4NBBn2v0LRimwT/y0zMNgp9 pG5q3llBVrrgnw6FjsiUnIE/c0WtlF3s5whWOQtu/i52DJQ5ajgod3XcPFJXHBU76sD+ 1HfXhEnEJPQCziFND7kJAQV9rJJdqWIrcloGWJxPjnAAIq2y6VDtv9NbyK7DLtXV5m3a e6xw== X-Gm-Message-State: AOAM533IopiaHPaZVGdFzHCOP3sY2gjLY9LNOU1RHzPaxdNBXHmWcO1D /UECjbHi8IB+Im3mw7b7JbYQCYJRr08= X-Google-Smtp-Source: ABdhPJwTh7pxNiHnJeZ2+XhC5cLkOAYgdVtV4aVJGJx7+IJyJJPJuHA0vy7JSVauaVdv9SxPxZZEJw== X-Received: by 2002:a05:600c:4147:: with SMTP id h7mr3855169wmm.146.1605005399026; Tue, 10 Nov 2020 02:49:59 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:58 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:36 +0100 Message-Id: <20201110104851.321029-40-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 039/114] avcodec/mpc7: Apply offsets when creating 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc7.c | 12 ++++++------ libavcodec/mpc7data.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index 532ea113c2..3c1a8578dd 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -98,10 +98,10 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) &mpc7_scfi[0], 2, 1, 0, 0, 1 << MPC7_SCFI_BITS); INIT_VLC_STATIC_FROM_LENGTHS(&dscf_vlc, MPC7_DSCF_BITS, MPC7_DSCF_SIZE, &mpc7_dscf[1], 2, - &mpc7_dscf[0], 2, 1, 0, 0, 1 << MPC7_DSCF_BITS); + &mpc7_dscf[0], 2, 1, -7, 0, 1 << MPC7_DSCF_BITS); INIT_VLC_STATIC_FROM_LENGTHS(&hdr_vlc, MPC7_HDR_BITS, MPC7_HDR_SIZE, &mpc7_hdr[1], 2, - &mpc7_hdr[0], 2, 1, 0, 0, 1 << MPC7_HDR_BITS); + &mpc7_hdr[0], 2, 1, -5, 0, 1 << MPC7_HDR_BITS); for(i = 0; i < MPC7_QUANT_VLC_TABLES; i++){ for(j = 0; j < 2; j++){ quant_vlc[i][j].table = quant_table; @@ -110,7 +110,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) ff_init_vlc_from_lengths(&quant_vlc[i][j], 9, mpc7_quant_vlc_sizes[i], &raw_quant_table[1], 2, &raw_quant_table[0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + mpc7_quant_vlc_off[i], INIT_VLC_USE_NEW_STATIC); raw_quant_table += 2 * mpc7_quant_vlc_sizes[i]; } } @@ -151,7 +151,7 @@ static inline void idx_to_quant(MPCContext *c, GetBitContext *gb, int idx, int * case 3: case 4: case 5: case 6: case 7: i1 = get_bits1(gb); for(i = 0; i < SAMPLES_PER_BAND; i++) - *dst++ = get_vlc2(gb, quant_vlc[idx-1][i1].table, 9, 2) - mpc7_quant_vlc_off[idx-1]; + *dst++ = get_vlc2(gb, quant_vlc[idx-1][i1].table, 9, 2); break; case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: @@ -166,7 +166,7 @@ static inline void idx_to_quant(MPCContext *c, GetBitContext *gb, int idx, int * static int get_scale_idx(GetBitContext *gb, int ref) { - int t = get_vlc2(gb, dscf_vlc.table, MPC7_DSCF_BITS, 1) - 7; + int t = get_vlc2(gb, dscf_vlc.table, MPC7_DSCF_BITS, 1); if (t == 8) return get_bits(gb, 6); return ref + t; @@ -222,7 +222,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data, for(i = 0; i <= c->maxbands; i++){ for(ch = 0; ch < 2; ch++){ int t = 4; - if(i) t = get_vlc2(&gb, hdr_vlc.table, MPC7_HDR_BITS, 1) - 5; + if(i) t = get_vlc2(&gb, hdr_vlc.table, MPC7_HDR_BITS, 1); if(t == 4) bands[i].res[ch] = get_bits(&gb, 4); else bands[i].res[ch] = bands[i-1].res[ch] + t; if (bands[i].res[ch] < -1 || bands[i].res[ch] > 17) { diff --git a/libavcodec/mpc7data.h b/libavcodec/mpc7data.h index b578cbdb27..ee77393fce 100644 --- a/libavcodec/mpc7data.h +++ b/libavcodec/mpc7data.h @@ -55,8 +55,8 @@ static const uint8_t mpc7_quant_vlc_sizes[MPC7_QUANT_VLC_TABLES] = { 27, 25, 7, 9, 15, 31, 63 }; -static const uint8_t mpc7_quant_vlc_off[MPC7_QUANT_VLC_TABLES] = { - 0, 0, 3, 4, 7, 15, 31 +static const int8_t mpc7_quant_vlc_off[MPC7_QUANT_VLC_TABLES] = { + 0, 0, -3, -4, -7, -15, -31 }; static const uint8_t mpc7_quant_vlcs[177 * 2 * 2] = { From patchwork Tue Nov 10 10:47:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23510 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 2AFB0449CD8 for ; Tue, 10 Nov 2020 12:58:31 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 93D1868BE6A; Tue, 10 Nov 2020 12:50:13 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D59AE68BE58 for ; Tue, 10 Nov 2020 12:50:00 +0200 (EET) Received: by mail-wm1-f67.google.com with SMTP id 10so2534225wml.2 for ; Tue, 10 Nov 2020 02:50:00 -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=SA8dO2A2Cpe5oqjcXWIm3TLrm0U5wIFjgWl3DGD+HOU=; b=dNePgXIR1BJ6jPJCUH+csEuShXZepEp84FrI7+alZbc5qrlB6pcN57CMLrfQZVP9DC HaH3XCzb+94sgIHRveE1ccmT2EANIiZ6iuuaOimEYQ6vY0Ll7XgNTTHeoWuf8OhRNHjN MpUkcnU7LvadCN7nI8ksqzbO5l+kOGTiV8hz56dBeRm2CQvjrcL8j57d5tfgtxliqJ6P U6cx74LoEq7BHfuCRLC5Oz7esj2Imu67yO5vepiGmatqT2KvbVcK/YCfe9Y92Cr80dOA 8msDgUJtaEubdfXErWFD/ygJQ7WjpaxyYyh5n9AWt5pStVoRPxkNHVq9AkuWOeQYzMV4 y6+w== 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=SA8dO2A2Cpe5oqjcXWIm3TLrm0U5wIFjgWl3DGD+HOU=; b=Rido2pp/FrXhDbFNuSxVuome2mrWVC9AVuxczA06wFuBwpuqgSyNsC2EDJ8vqeKsw8 8FsXmkw7HqxzQF3r6KLWEmFDhIIMzw6ZEMj9V6ko1FkF+0fXducw+ckw6Ieq0GVGOjLo y6sR49a/oB9dNkjX1bxYZ/vMCD8Uih/5PYFD25ofKhyNgbGVFXKSmQ2vejizJamQjYuo Ajr6idxfcKyS7tKiFhD0+Ze2QYBQVt9hECcpGoT5ri4FVxbw538znjlo7EpRTCVaZqdk YpOMa5tOeRSI2Xj92tJY9ZRhPmGTpG9puXnQJoZ4sMu84yrD8uPmCXkd4rou3gXzOnP9 dfWQ== X-Gm-Message-State: AOAM533ix+3+YoqFDUxARBEDOnJLl+A6gbRDr0XaqGVilbIGGRBBIHZI iAT00c2h5cze2xqGJGDE/3LAmbJ3T80= X-Google-Smtp-Source: ABdhPJzjoAebbgEwDYvAjNE3ABSU0hWX9tty+G9/alYlEEgRd1/TZ15kZVbUTu0K8qjiJ08g9d15RQ== X-Received: by 2002:a05:600c:21cc:: with SMTP id x12mr821478wmj.8.1605005400062; Tue, 10 Nov 2020 02:50:00 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:49:59 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:37 +0100 Message-Id: <20201110104851.321029-41-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 040/114] avcodec/mpc7: Avoid offsets table when creating 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc7.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index 3c1a8578dd..7f6a01d444 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -38,22 +38,15 @@ static VLC scfi_vlc, dscf_vlc, hdr_vlc, quant_vlc[MPC7_QUANT_VLC_TABLES][2]; -static const uint16_t quant_sizes[MPC7_QUANT_VLC_TABLES*2] = -{ - 512, 512, 512, 516, 512, 512, 512, 512, 512, 512, 512, 528, 512, 548 -}; - - static av_cold int mpc7_decode_init(AVCodecContext * avctx) { - int i, j; + int j; MPCContext *c = avctx->priv_data; GetBitContext gb; LOCAL_ALIGNED_16(uint8_t, buf, [16]); static int vlc_initialized = 0; static VLC_TYPE quant_tables[7224][2]; - VLC_TYPE (*quant_table)[2] = quant_tables; const uint8_t *raw_quant_table = mpc7_quant_vlcs; /* Musepack SV7 is always stereo */ @@ -102,16 +95,16 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) INIT_VLC_STATIC_FROM_LENGTHS(&hdr_vlc, MPC7_HDR_BITS, MPC7_HDR_SIZE, &mpc7_hdr[1], 2, &mpc7_hdr[0], 2, 1, -5, 0, 1 << MPC7_HDR_BITS); - for(i = 0; i < MPC7_QUANT_VLC_TABLES; i++){ + for (unsigned i = 0, offset = 0; i < MPC7_QUANT_VLC_TABLES; i++){ for(j = 0; j < 2; j++){ - quant_vlc[i][j].table = quant_table; - quant_vlc[i][j].table_allocated = quant_sizes[i * 2 + j]; - quant_table += quant_sizes[i * 2 + j]; + quant_vlc[i][j].table = &quant_tables[offset]; + quant_vlc[i][j].table_allocated = FF_ARRAY_ELEMS(quant_tables) - offset; ff_init_vlc_from_lengths(&quant_vlc[i][j], 9, mpc7_quant_vlc_sizes[i], &raw_quant_table[1], 2, &raw_quant_table[0], 2, 1, mpc7_quant_vlc_off[i], INIT_VLC_USE_NEW_STATIC); raw_quant_table += 2 * mpc7_quant_vlc_sizes[i]; + offset += quant_vlc[i][j].table_size; } } vlc_initialized = 1; From patchwork Tue Nov 10 10:47:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23512 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 ABC55449CD8 for ; Tue, 10 Nov 2020 12:58:57 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1C3968BE81; Tue, 10 Nov 2020 12:50:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2EEB668BE63 for ; Tue, 10 Nov 2020 12:50:03 +0200 (EET) Received: by mail-wr1-f54.google.com with SMTP id d12so10633719wrr.13 for ; Tue, 10 Nov 2020 02:50:03 -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=FbVhA6aNB1LuyusORjlv00NgHXugBKD4rPYiPr711xY=; b=dktksk99uwqg6PR76MDY08OVnhYFk3aORV9zJv8/dGP8Wtw4Vz8kuTM/XIQPVLWEKy DX2GaQgCxm7Fr4IIwZT3ah45IiaTo99UylMmnW/ASlfAqTmbdYynjWFk8bRvpoZKhKCX FENAbModlL9LBi46Ir80pkIK+P/MYthWaEnwYnHwjudUtDHzfwgdBvJJT0tfhjqqEpXE A5sFF5hXw+7Rk6AAI4jEHieV+nkVnbszFy0V/1TVUNK9f3FE9cUBFwwjBwHCIEEeaBrZ 9OcJWYYRH0zZUhRDcY4hAvBJNQFnH1Tbp3wKPnna8bLFr/LleAwc5OX7zyyd6mlrMoLg f3wQ== 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=FbVhA6aNB1LuyusORjlv00NgHXugBKD4rPYiPr711xY=; b=kbo2cK2Dd+x1qnn1KEepal2BnJfhWF33FRZjrLXv1gWOi3ixgOej91i4I5bREyHsdd v/6sUYNgH9ANdj/jfQRE6tKIIGdBIA8tDh44zJ9qJbXp7FuI4/XAW6a36r1M82ypYs8P igRKISTgYpLAlnQ0CGoTKpAeCPMBAZEz71ykhwr1o8W/zuQPTW9Qgw+JZQ6HafMYXwln bezOh4pYUzQHu6TtMwoG5f8ZMjEChxNotNPC8HcwroCZEup7c/xpo8sOlH6JyJVL0OlO 36iR93/bMxiqCeT/AjsJwzyc1+ZsVW69q38b0iffRJrHQqaODTXvKU0orIht77TBcWMS 4a1A== X-Gm-Message-State: AOAM533viqGeDw5Oy7FCyqFQzVYUeDObzZ+q16fnKhfvS9a0VJzwgNb0 CLTYIfAHytjTEO8tLMBEiwS6DscuVvo= X-Google-Smtp-Source: ABdhPJx7q5pH8mCPwbbnqvCnMcKPdnDWLEIp/s6umUrIBcFaQ3HcR8Lbthu+pwtzWQcRrRUmzrUNbA== X-Received: by 2002:adf:9e4c:: with SMTP id v12mr22392971wre.22.1605005401134; Tue, 10 Nov 2020 02:50:01 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:00 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:38 +0100 Message-Id: <20201110104851.321029-42-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 041/114] avcodec/mpc8: Reduce size of tables used to initialize 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" By switching to ff_init_vlc_from_lengths() one can make a table of codes of type uint8_t superfluous, saving space. Other VLCs (for which there was no dedicated symbols table and where the codes where already of type uint8_t) have been made to use ff_init_vlc_from_lengths(), too, because it reduces codesize (ff_init_vlc_from_lengths() has three parameters less than ff_init_vlc_sparse()) and because it allows to use the offset parameter in future commits. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc8.c | 133 ++++------ libavcodec/mpc8huff.h | 575 ++++++++++++++---------------------------- 2 files changed, 240 insertions(+), 468 deletions(-) diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index 631bac2753..339ee515b8 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -101,15 +101,6 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) static int vlc_initialized = 0; int channels; - static VLC_TYPE band_table[542][2]; - static VLC_TYPE q1_table[520][2]; - static VLC_TYPE q9up_table[524][2]; - static VLC_TYPE scfi0_table[1 << MPC8_SCFI0_BITS][2]; - static VLC_TYPE scfi1_table[1 << MPC8_SCFI1_BITS][2]; - static VLC_TYPE dscf0_table[560][2]; - static VLC_TYPE dscf1_table[598][2]; - static VLC_TYPE q3_0_table[512][2]; - static VLC_TYPE q3_1_table[516][2]; static VLC_TYPE codes_table[5708][2]; if(avctx->extradata_size < 2){ @@ -145,91 +136,77 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) if(vlc_initialized) return 0; av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n"); - band_vlc.table = band_table; - band_vlc.table_allocated = 542; - init_vlc(&band_vlc, MPC8_BANDS_BITS, MPC8_BANDS_SIZE, - mpc8_bands_bits, 1, 1, - mpc8_bands_codes, 1, 1, INIT_VLC_USE_NEW_STATIC); - - q1_vlc.table = q1_table; - q1_vlc.table_allocated = 520; - init_vlc(&q1_vlc, MPC8_Q1_BITS, MPC8_Q1_SIZE, - mpc8_q1_bits, 1, 1, - mpc8_q1_codes, 1, 1, INIT_VLC_USE_NEW_STATIC); - q9up_vlc.table = q9up_table; - q9up_vlc.table_allocated = 524; - init_vlc(&q9up_vlc, MPC8_Q9UP_BITS, MPC8_Q9UP_SIZE, - mpc8_q9up_bits, 1, 1, - mpc8_q9up_codes, 1, 1, INIT_VLC_USE_NEW_STATIC); - - scfi_vlc[0].table = scfi0_table; - scfi_vlc[0].table_allocated = 1 << MPC8_SCFI0_BITS; - init_vlc(&scfi_vlc[0], MPC8_SCFI0_BITS, MPC8_SCFI0_SIZE, - mpc8_scfi0_bits, 1, 1, - mpc8_scfi0_codes, 1, 1, INIT_VLC_USE_NEW_STATIC); - scfi_vlc[1].table = scfi1_table; - scfi_vlc[1].table_allocated = 1 << MPC8_SCFI1_BITS; - init_vlc(&scfi_vlc[1], MPC8_SCFI1_BITS, MPC8_SCFI1_SIZE, - mpc8_scfi1_bits, 1, 1, - mpc8_scfi1_codes, 1, 1, INIT_VLC_USE_NEW_STATIC); - - dscf_vlc[0].table = dscf0_table; - dscf_vlc[0].table_allocated = 560; - init_vlc(&dscf_vlc[0], MPC8_DSCF0_BITS, MPC8_DSCF0_SIZE, - mpc8_dscf0_bits, 1, 1, - mpc8_dscf0_codes, 1, 1, INIT_VLC_USE_NEW_STATIC); - dscf_vlc[1].table = dscf1_table; - dscf_vlc[1].table_allocated = 598; - init_vlc(&dscf_vlc[1], MPC8_DSCF1_BITS, MPC8_DSCF1_SIZE, - mpc8_dscf1_bits, 1, 1, - mpc8_dscf1_codes, 1, 1, INIT_VLC_USE_NEW_STATIC); - - q3_vlc[0].table = q3_0_table; - q3_vlc[0].table_allocated = 512; - ff_init_vlc_sparse(&q3_vlc[0], MPC8_Q3_BITS, MPC8_Q3_SIZE, - mpc8_q3_bits, 1, 1, - mpc8_q3_codes, 1, 1, - mpc8_q3_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); - q3_vlc[1].table = q3_1_table; - q3_vlc[1].table_allocated = 516; - ff_init_vlc_sparse(&q3_vlc[1], MPC8_Q4_BITS, MPC8_Q4_SIZE, - mpc8_q4_bits, 1, 1, - mpc8_q4_codes, 1, 1, - mpc8_q4_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); + INIT_VLC_STATIC_FROM_LENGTHS(&band_vlc, MPC8_BANDS_BITS, MPC8_BANDS_SIZE, + mpc8_bands_bits, 1, + mpc8_bands_syms, 1, 1, 0, 0, 542); + + INIT_VLC_STATIC_FROM_LENGTHS(&q1_vlc, MPC8_Q1_BITS, MPC8_Q1_SIZE, + mpc8_q1_bits, 1, + mpc8_q1_syms, 1, 1, 0, 0, 520); + INIT_VLC_STATIC_FROM_LENGTHS(&q9up_vlc, MPC8_Q9UP_BITS, MPC8_Q9UP_SIZE, + mpc8_q9up_bits, 1, + mpc8_q9up_syms, 1, 1, 0, 0, 524); + + INIT_VLC_STATIC_FROM_LENGTHS(&scfi_vlc[0], MPC8_SCFI0_BITS, MPC8_SCFI0_SIZE, + mpc8_scfi0_bits, 1, + mpc8_scfi0_syms, 1, 1, 0, 0, 1 << MPC8_SCFI0_BITS); + INIT_VLC_STATIC_FROM_LENGTHS(&scfi_vlc[1], MPC8_SCFI1_BITS, MPC8_SCFI1_SIZE, + mpc8_scfi1_bits, 1, + mpc8_scfi1_syms, 1, 1, 0, 0, 1 << MPC8_SCFI1_BITS); + + INIT_VLC_STATIC_FROM_LENGTHS(&dscf_vlc[0], MPC8_DSCF0_BITS, MPC8_DSCF0_SIZE, + mpc8_dscf0_bits, 1, + mpc8_dscf0_syms, 1, 1, 0, 0, 560); + INIT_VLC_STATIC_FROM_LENGTHS(&dscf_vlc[1], MPC8_DSCF1_BITS, MPC8_DSCF1_SIZE, + mpc8_dscf1_bits, 1, + mpc8_dscf1_syms, 1, 1, 0, 0, 598); + + INIT_VLC_STATIC_FROM_LENGTHS(&q3_vlc[0], MPC8_Q3_BITS, MPC8_Q3_SIZE, + mpc8_q3_bits, 1, + mpc8_q3_syms, 1, 1, 0, 0, 512); + INIT_VLC_STATIC_FROM_LENGTHS(&q3_vlc[1], MPC8_Q4_BITS, MPC8_Q4_SIZE, + mpc8_q4_bits, 1, + mpc8_q4_syms, 1, 1, 0, 0, 516); for(i = 0; i < 2; i++){ res_vlc[i].table = &codes_table[vlc_offsets[0+i]]; res_vlc[i].table_allocated = vlc_offsets[1+i] - vlc_offsets[0+i]; - init_vlc(&res_vlc[i], MPC8_RES_BITS, MPC8_RES_SIZE, - &mpc8_res_bits[i], 1, 1, - &mpc8_res_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&res_vlc[i], MPC8_RES_BITS, MPC8_RES_SIZE, + mpc8_res_bits[i], 1, + mpc8_res_syms[i], 1, 1, + 0, INIT_VLC_USE_NEW_STATIC); q2_vlc[i].table = &codes_table[vlc_offsets[2+i]]; q2_vlc[i].table_allocated = vlc_offsets[3+i] - vlc_offsets[2+i]; - init_vlc(&q2_vlc[i], MPC8_Q2_BITS, MPC8_Q2_SIZE, - &mpc8_q2_bits[i], 1, 1, - &mpc8_q2_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&q2_vlc[i], MPC8_Q2_BITS, MPC8_Q2_SIZE, + mpc8_q2_bits[i], 1, + mpc8_q2_syms[i], 1, 1, + 0, INIT_VLC_USE_NEW_STATIC); quant_vlc[0][i].table = &codes_table[vlc_offsets[4+i]]; quant_vlc[0][i].table_allocated = vlc_offsets[5+i] - vlc_offsets[4+i]; - init_vlc(&quant_vlc[0][i], MPC8_Q5_BITS, MPC8_Q5_SIZE, - &mpc8_q5_bits[i], 1, 1, - &mpc8_q5_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&quant_vlc[0][i], MPC8_Q5_BITS, MPC8_Q5_SIZE, + mpc8_q5_bits[i], 1, + mpc8_q5_syms[i], 1, 1, + 0, INIT_VLC_USE_NEW_STATIC); quant_vlc[1][i].table = &codes_table[vlc_offsets[6+i]]; quant_vlc[1][i].table_allocated = vlc_offsets[7+i] - vlc_offsets[6+i]; - init_vlc(&quant_vlc[1][i], MPC8_Q6_BITS, MPC8_Q6_SIZE, - &mpc8_q6_bits[i], 1, 1, - &mpc8_q6_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&quant_vlc[1][i], MPC8_Q6_BITS, MPC8_Q6_SIZE, + mpc8_q6_bits[i], 1, + mpc8_q6_syms[i], 1, 1, + 0, INIT_VLC_USE_NEW_STATIC); quant_vlc[2][i].table = &codes_table[vlc_offsets[8+i]]; quant_vlc[2][i].table_allocated = vlc_offsets[9+i] - vlc_offsets[8+i]; - init_vlc(&quant_vlc[2][i], MPC8_Q7_BITS, MPC8_Q7_SIZE, - &mpc8_q7_bits[i], 1, 1, - &mpc8_q7_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&quant_vlc[2][i], MPC8_Q7_BITS, MPC8_Q7_SIZE, + mpc8_q7_bits[i], 1, + mpc8_q7_syms[i], 1, 1, + 0, INIT_VLC_USE_NEW_STATIC); quant_vlc[3][i].table = &codes_table[vlc_offsets[10+i]]; quant_vlc[3][i].table_allocated = vlc_offsets[11+i] - vlc_offsets[10+i]; - init_vlc(&quant_vlc[3][i], MPC8_Q8_BITS, MPC8_Q8_SIZE, - &mpc8_q8_bits[i], 1, 1, - &mpc8_q8_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&quant_vlc[3][i], MPC8_Q8_BITS, MPC8_Q8_SIZE, + mpc8_q8_bits[i], 1, + mpc8_q8_syms[i], 1, 1, + 0, INIT_VLC_USE_NEW_STATIC); } vlc_initialized = 1; diff --git a/libavcodec/mpc8huff.h b/libavcodec/mpc8huff.h index 0566c910ca..687c9f7e98 100644 --- a/libavcodec/mpc8huff.h +++ b/libavcodec/mpc8huff.h @@ -27,287 +27,182 @@ #define MPC8_BANDS_SIZE 33 #define MPC8_BANDS_BITS 9 -static const uint8_t mpc8_bands_codes[MPC8_BANDS_SIZE] = { - 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, - 0x05, 0x06, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, - 0x06, 0x07, 0x08, 0x01, 0x09, 0x0A, 0x0B, 0x07, - 0x08, 0x09, 0x06, 0x07, 0x05, 0x05, 0x03, 0x03, - 0x01, +static const uint8_t mpc8_bands_syms[MPC8_BANDS_SIZE] = { + 13, 19, 10, 11, 12, 14, 15, 16, 17, 18, 20, 21, 22, 9, 23, 24, 25, 8, 26, + 27, 7, 28, 5, 6, 29, 4, 3, 30, 2, 31, 1, 32, 0 }; static const uint8_t mpc8_bands_bits[MPC8_BANDS_SIZE] = { - 1, 3, 5, 6, 7, 8, 8, 9, - 10, 11, 12, 12, 12, 13, 12, 12, - 12, 12, 12, 13, 12, 12, 12, 11, - 11, 11, 10, 10, 9, 8, 6, 5, - 2, + 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 10, 10, + 10, 9, 9, 8, 8, 8, 7, 6, 6, 5, 5, 3, 2, 1 }; #define MPC8_SCFI0_SIZE 4 #define MPC8_SCFI0_BITS 3 -static const uint8_t mpc8_scfi0_codes[MPC8_SCFI0_SIZE] = { - 0x00, 0x01, 0x01, 0x01, +static const uint8_t mpc8_scfi0_syms[MPC8_SCFI0_SIZE] = { + 0, 1, 3, 2 }; static const uint8_t mpc8_scfi0_bits[MPC8_SCFI0_SIZE] = { - 3, 3, 1, 2, + 3, 3, 2, 1 }; #define MPC8_SCFI1_SIZE 16 #define MPC8_SCFI1_BITS 7 -static const uint8_t mpc8_scfi1_codes[MPC8_SCFI1_SIZE] = { - 0x01, 0x00, 0x02, 0x03, 0x01, 0x03, 0x04, 0x05, - 0x04, 0x06, 0x02, 0x02, 0x05, 0x07, 0x03, 0x03, - +static const uint8_t mpc8_scfi1_syms[MPC8_SCFI1_SIZE] = { + 1, 4, 0, 2, 3, 8, 12, 5, 6, 7, 9, 13, 11, 14, 10, 15 }; static const uint8_t mpc8_scfi1_bits[MPC8_SCFI1_SIZE] = { - 6, 7, 6, 6, 7, 5, 5, 5, - 6, 5, 2, 3, 6, 5, 3, 2, - + 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 3, 3, 2, 2 }; #define MPC8_DSCF0_SIZE 64 #define MPC8_DSCF0_BITS 9 -static const uint8_t mpc8_dscf0_codes[MPC8_DSCF0_SIZE] = { - 0x03, 0x04, 0x05, 0x04, 0x05, 0x06, 0x05, 0x06, - 0x07, 0x08, 0x09, 0x07, 0x08, 0x09, 0x0A, 0x07, - 0x08, 0x09, 0x0A, 0x07, 0x08, 0x09, 0x0A, 0x06, - 0x07, 0x05, 0x04, 0x05, 0x06, 0x06, 0x07, 0x0A, - 0x08, 0x05, 0x06, 0x07, 0x09, 0x07, 0x08, 0x09, - 0x0B, 0x0B, 0x0C, 0x0D, 0x0B, 0x0C, 0x0D, 0x0B, - 0x0C, 0x0D, 0x07, 0x08, 0x09, 0x06, 0x07, 0x03, - 0x04, 0x05, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, +static const uint8_t mpc8_dscf0_syms[MPC8_DSCF0_SIZE] = { + 58, 59, 60, 61, 62, 63, 55, 56, 57, 0, 1, 2, 53, 54, 3, 4, 5, 50, 51, + 52, 6, 7, 8, 9, 10, 31, 47, 48, 49, 11, 12, 13, 14, 44, 45, 46, 15, 16, + 17, 18, 41, 42, 43, 19, 20, 21, 22, 40, 23, 24, 38, 39, 25, 28, 37, 26, 27, + 29, 30, 32, 36, 33, 34, 35, }; static const uint8_t mpc8_dscf0_bits[MPC8_DSCF0_SIZE] = { - 12, 12, 12, 11, 11, 11, 10, 10, - 10, 10, 10, 9, 9, 9, 9, 8, - 8, 8, 8, 7, 7, 7, 7, 6, - 6, 5, 4, 4, 5, 4, 4, 10, - 4, 3, 3, 3, 4, 5, 6, 6, - 7, 8, 8, 8, 9, 9, 9, 10, - 10, 10, 11, 11, 11, 12, 12, 13, - 13, 13, 14, 14, 14, 14, 14, 14, - + 14, 14, 14, 14, 14, 14, 13, 13, 13, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, + 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 4, + 4, 4, 4, 4, 3, 3, 3 }; #define MPC8_DSCF1_SIZE 65 #define MPC8_DSCF1_BITS 9 -static const uint8_t mpc8_dscf1_codes[MPC8_DSCF1_SIZE] = { - 0x00, 0x03, 0x04, 0x04, 0x05, 0x06, 0x05, 0x06, - 0x07, 0x08, 0x07, 0x08, 0x09, 0x0A, 0x07, 0x08, - 0x09, 0x0A, 0x07, 0x08, 0x09, 0x06, 0x07, 0x05, - 0x06, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x05, - 0x06, 0x07, 0x05, 0x04, 0x05, 0x05, 0x07, 0x08, - 0x09, 0x0A, 0x0B, 0x0B, 0x0C, 0x0D, 0x0B, 0x0C, - 0x0D, 0x09, 0x0A, 0x0B, 0x0C, 0x07, 0x08, 0x09, - 0x05, 0x06, 0x07, 0x01, 0x02, 0x03, 0x04, 0x05, - 0x0D, +static const uint8_t mpc8_dscf1_syms[MPC8_DSCF1_SIZE] = { + 0, 59, 60, 61, 62, 63, 1, 2, 56, 57, 58, 3, 4, 5, 53, 54, 55, 6, 7, + 8, 9, 49, 50, 51, 52, 64, 10, 11, 12, 13, 46, 47, 48, 14, 15, 16, 17, 43, + 44, 45, 18, 19, 20, 41, 42, 21, 22, 39, 40, 23, 24, 38, 25, 37, 26, 35, 36, + 27, 28, 34, 29, 30, 31, 32, 33, }; static const uint8_t mpc8_dscf1_bits[MPC8_DSCF1_SIZE] = { - 15, 14, 14, 13, 13, 13, 12, 12, - 12, 12, 11, 11, 11, 11, 10, 10, - 10, 10, 9, 9, 9, 8, 8, 7, - 7, 6, 5, 4, 4, 3, 3, 3, - 3, 3, 4, 5, 5, 6, 7, 8, - 8, 9, 9, 10, 10, 10, 11, 11, - 11, 12, 12, 12, 12, 13, 13, 13, - 14, 14, 14, 15, 15, 15, 15, 15, - 12, + 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, + 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, + 4, 4, 4, 3, 3, 3, 3, 3 }; #define MPC8_RES_SIZE 17 #define MPC8_RES_BITS 9 -static const uint8_t mpc8_res_codes[2][MPC8_RES_SIZE] = { +static const uint8_t mpc8_res_syms[2][MPC8_RES_SIZE] = { { - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, - 0x01, + 13, 14, 12, 11, 10, 9, 8, 7, 6, 15, 5, 4, 3, 2, 16, 1, 0, }, { - 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x01, 0x02, 0x03, 0x01, 0x01, 0x01, 0x01, - 0x03, + 8, 9, 10, 11, 7, 12, 6, 13, 5, 4, 14, 3, 15, 2, 0, 1, 16, } }; static const uint8_t mpc8_res_bits[2][MPC8_RES_SIZE] = { { - 1, 2, 4, 5, 6, 7, 9, 10, - 11, 12, 13, 14, 15, 16, 16, 8, - 3, + 16, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, { - 2, 2, 3, 5, 7, 8, 10, 12, - 14, 14, 14, 14, 11, 9, 6, 4, - 2, + 14, 14, 14, 14, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 2 } }; #define MPC8_Q1_SIZE 19 #define MPC8_Q1_BITS 9 -static const uint8_t mpc8_q1_codes[MPC8_Q1_SIZE] = { - 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x03, 0x04, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x00, 0x01, +static const uint8_t mpc8_q1_syms[MPC8_Q1_SIZE] = { + 17, 18, 16, 15, 14, 13, 12, 0, 11, 1, 2, 8, 9, 10, 3, 4, 5, 6, 7, }; static const uint8_t mpc8_q1_bits[MPC8_Q1_SIZE] = { - 6, 4, 4, 3, 3, 3, 3, 3, - 4, 4, 4, 5, 7, 8, 9, 10, - 11, 12, 12, + 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3 }; #define MPC8_Q9UP_SIZE 256 #define MPC8_Q9UP_BITS 9 -static const uint8_t mpc8_q9up_codes[MPC8_Q9UP_SIZE] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x26, 0x27, 0x13, 0x14, 0x15, - 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, - 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, - 0x28, 0x26, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, - 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, - 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, - 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, - 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, - 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, - 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, - 0x67, 0x68, 0x69, 0x6A, 0x56, 0x57, 0x58, 0x59, - 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x61, - 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x3E, - 0x3F, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7A, 0x6B, 0x7B, 0x6C, 0x6D, 0x6E, - 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, - 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, - 0x7F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, - 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, - 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, - 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, - 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0x27, 0x28, 0x29, - 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, - 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, - 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, - 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, - 0x4A, 0x4B, 0x06, 0x07, 0x08, 0x09, 0x00, 0x01, +static const uint8_t mpc8_q9up_syms[MPC8_Q9UP_SIZE] = { + 254, 255, 0, 1, 2, 3, 4, 250, 251, 252, 253, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 19, 20, 40, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 147, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 127, + 128, }; static const uint8_t mpc8_q9up_bits[MPC8_Q9UP_SIZE] = { - 10, 10, 10, 10, 10, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 8, 8, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 8, 9, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 6, - 6, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 8, 7, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 10, 10, 10, 10, 11, 11, + 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 6, 6 }; #define MPC8_Q2_SIZE 125 #define MPC8_Q2_BITS 9 -static const uint8_t mpc8_q2_codes[2][MPC8_Q2_SIZE] = { +static const uint8_t mpc8_q2_syms[2][MPC8_Q2_SIZE] = { { - 0x02, 0x03, 0x0F, 0x04, 0x00, 0x05, 0x0C, 0x12, - 0x0D, 0x06, 0x07, 0x13, 0x15, 0x14, 0x08, 0x09, - 0x0E, 0x15, 0x0F, 0x0A, 0x03, 0x0B, 0x10, 0x0C, - 0x01, 0x0D, 0x10, 0x16, 0x11, 0x0E, 0x12, 0x0F, - 0x10, 0x16, 0x13, 0x17, 0x11, 0x08, 0x12, 0x18, - 0x14, 0x13, 0x14, 0x17, 0x15, 0x0F, 0x16, 0x19, - 0x17, 0x10, 0x11, 0x1A, 0x18, 0x1B, 0x12, 0x1C, - 0x15, 0x09, 0x16, 0x1D, 0x19, 0x0A, 0x07, 0x0B, - 0x1A, 0x1E, 0x17, 0x0C, 0x18, 0x1F, 0x13, 0x20, - 0x1B, 0x21, 0x14, 0x11, 0x18, 0x22, 0x19, 0x12, - 0x1A, 0x19, 0x1A, 0x1B, 0x1B, 0x23, 0x1C, 0x0D, - 0x1D, 0x24, 0x1C, 0x1C, 0x1E, 0x1F, 0x1D, 0x13, - 0x1E, 0x25, 0x1F, 0x14, 0x02, 0x15, 0x15, 0x16, - 0x04, 0x17, 0x20, 0x26, 0x21, 0x18, 0x16, 0x27, - 0x1D, 0x28, 0x19, 0x1A, 0x22, 0x29, 0x23, 0x1B, - 0x03, 0x1C, 0x17, 0x1D, 0x05, + 4, 24, 100, 120, 0, 20, 104, 124, 1, 3, 5, 9, 10, 14, 15, + 19, 21, 23, 25, 29, 45, 49, 75, 79, 95, 99, 101, 103, 105, 109, + 114, 115, 119, 121, 123, 2, 22, 50, 54, 70, 74, 102, 110, 122, 6, + 8, 16, 18, 26, 28, 30, 34, 40, 44, 46, 48, 76, 78, 80, 84, + 90, 94, 96, 98, 106, 108, 116, 118, 7, 11, 13, 17, 27, 35, 39, + 47, 51, 53, 55, 59, 65, 69, 71, 73, 77, 85, 89, 97, 107, 111, + 113, 117, 12, 33, 43, 52, 60, 64, 72, 91, 112, 31, 32, 36, 38, + 41, 42, 56, 58, 66, 68, 81, 82, 83, 86, 88, 92, 93, 37, 57, + 61, 63, 67, 87, 62, }, { - 0x02, 0x03, 0x0F, 0x04, 0x00, 0x05, 0x0C, 0x0D, - 0x0E, 0x06, 0x07, 0x0F, 0x1E, 0x10, 0x10, 0x08, - 0x11, 0x12, 0x13, 0x09, 0x03, 0x0A, 0x11, 0x0B, - 0x01, 0x0C, 0x14, 0x15, 0x16, 0x0D, 0x17, 0x12, - 0x0E, 0x13, 0x18, 0x19, 0x14, 0x0F, 0x10, 0x1A, - 0x1B, 0x15, 0x11, 0x16, 0x1C, 0x0E, 0x1D, 0x1E, - 0x1F, 0x0F, 0x12, 0x20, 0x1F, 0x21, 0x13, 0x22, - 0x12, 0x13, 0x14, 0x23, 0x20, 0x15, 0x0F, 0x16, - 0x21, 0x24, 0x17, 0x18, 0x19, 0x25, 0x14, 0x26, - 0x22, 0x27, 0x15, 0x10, 0x28, 0x29, 0x2A, 0x11, - 0x2B, 0x17, 0x1A, 0x18, 0x2C, 0x2D, 0x1B, 0x1C, - 0x19, 0x2E, 0x2F, 0x1A, 0x1D, 0x1B, 0x30, 0x12, - 0x31, 0x32, 0x33, 0x13, 0x02, 0x14, 0x15, 0x16, - 0x04, 0x17, 0x34, 0x35, 0x36, 0x18, 0x16, 0x37, - 0x23, 0x38, 0x19, 0x1A, 0x39, 0x3A, 0x3B, 0x1B, - 0x03, 0x1C, 0x17, 0x1D, 0x05, + 4, 24, 100, 120, 0, 20, 104, 124, 1, 3, 5, 9, 10, 15, 19, + 21, 23, 25, 29, 45, 49, 75, 79, 95, 99, 101, 102, 103, 105, 109, + 114, 115, 119, 121, 123, 2, 14, 22, 50, 54, 70, 74, 110, 122, 6, + 7, 8, 11, 13, 16, 17, 18, 26, 27, 28, 30, 34, 35, 39, 40, + 44, 46, 47, 48, 51, 53, 55, 59, 65, 69, 71, 73, 76, 77, 78, + 80, 84, 85, 89, 90, 94, 96, 97, 98, 106, 107, 108, 111, 113, 116, + 117, 118, 12, 52, 60, 64, 72, 112, 31, 33, 36, 41, 43, 81, 83, + 88, 91, 93, 32, 37, 38, 42, 56, 57, 58, 61, 63, 66, 67, 68, + 82, 86, 87, 92, 62, } }; static const uint8_t mpc8_q2_bits[2][MPC8_Q2_SIZE] = { { - 12, 11, 10, 11, 13, 11, 9, 8, - 9, 11, 11, 8, 7, 8, 11, 11, - 9, 8, 9, 11, 12, 11, 10, 11, - 13, 11, 9, 8, 9, 11, 9, 6, - 6, 7, 9, 8, 6, 4, 6, 8, - 9, 6, 6, 7, 9, 11, 9, 8, - 9, 11, 10, 8, 7, 8, 10, 8, - 6, 4, 6, 8, 7, 4, 3, 4, - 7, 8, 6, 4, 6, 8, 10, 8, - 7, 8, 10, 11, 9, 8, 9, 11, - 9, 6, 6, 6, 9, 8, 6, 4, - 6, 8, 9, 7, 6, 6, 9, 11, - 9, 8, 9, 11, 13, 11, 10, 11, - 12, 11, 9, 8, 9, 11, 10, 8, - 7, 8, 11, 11, 9, 8, 9, 11, - 13, 11, 10, 11, 12, + 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 3 }, { - 11, 10, 9, 10, 12, 10, 8, 8, - 8, 10, 10, 8, 7, 8, 9, 10, - 8, 8, 8, 10, 11, 10, 9, 10, - 12, 10, 8, 8, 8, 10, 8, 6, - 5, 6, 8, 8, 6, 5, 5, 8, - 8, 6, 5, 6, 8, 10, 8, 8, - 8, 10, 9, 8, 7, 8, 9, 8, - 5, 5, 5, 8, 7, 5, 4, 5, - 7, 8, 5, 5, 5, 8, 9, 8, - 7, 8, 9, 10, 8, 8, 8, 10, - 8, 6, 5, 6, 8, 8, 5, 5, - 6, 8, 8, 6, 5, 6, 8, 10, - 8, 8, 8, 10, 12, 10, 10, 10, - 11, 10, 8, 8, 8, 10, 9, 8, - 7, 8, 10, 10, 8, 8, 8, 10, - 12, 10, 9, 10, 11, + 12, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4 } }; @@ -315,100 +210,56 @@ static const uint8_t mpc8_q2_bits[2][MPC8_Q2_SIZE] = { #define MPC8_Q3_BITS 9 #define MPC8_Q3_OFFSET -48 -static const uint8_t mpc8_q3_codes[MPC8_Q3_SIZE] = { - 0x07, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x0F, - 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x13, 0x12, 0x11, - 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, - 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, - 0x09, 0x08, 0x07, 0x06, 0x05, 0x09, 0x08, 0x07, - 0x06, 0x05, 0x04, 0x03, 0x02, 0x03, 0x02, 0x01, - 0x00, -}; static const uint8_t mpc8_q3_bits[MPC8_Q3_SIZE] = { - 3, 4, 4, 4, 4, 4, 4, 5, - 5, 5, 5, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 8, 8, 8, - 8, 8, 8, 8, 8, 9, 9, 9, - 9, + 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, + 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, }; static const uint8_t mpc8_q3_syms[MPC8_Q3_SIZE] = { - 48, 65, 64, 49, 63, 32, 47, 80, - 79, 50, 62, 33, 16, 82, 81, 95, - 94, 66, 78, 34, 46, 17, 31, 30, - 97, 96, 111, 67, 77, 51, 61, 35, - 45, 18, 1, 0, 15, 98, 110, 83, - 93, 19, 29, 2, 14, 99, 109, 3, - 13, + 13, 3, 109, 99, 14, 2, 29, 19, 93, 83, 110, 98, 15, 0, 1, + 18, 45, 35, 61, 51, 77, 67, 111, 96, 97, 30, 31, 17, 46, 34, + 78, 66, 94, 95, 81, 82, 16, 33, 62, 50, 79, 80, 47, 32, 63, + 49, 64, 65, 48, }; #define MPC8_Q4_SIZE 81 #define MPC8_Q4_BITS 9 #define MPC8_Q4_OFFSET -64 -static const uint8_t mpc8_q4_codes[MPC8_Q4_SIZE] = { - 0x0F, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, - 0x16, 0x15, 0x14, 0x13, 0x12, 0x23, 0x22, 0x21, - 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, - 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, - 0x10, 0x0F, 0x0E, 0x0D, 0x19, 0x18, 0x17, 0x16, - 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, - 0x0D, 0x0C, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, - 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, - 0x09, 0x08, 0x07, 0x06, 0x05, 0x09, 0x08, 0x07, - 0x06, 0x05, 0x04, 0x03, 0x02, 0x03, 0x02, 0x01, - 0x00, -}; static const uint8_t mpc8_q4_bits[MPC8_Q4_SIZE] = { - 4, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 9, 9, 9, - 9, 9, 9, 9, 9, 10, 10, 10, - 10, + 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 4, }; static const uint8_t mpc8_q4_syms[MPC8_Q4_SIZE] = { - 64, 96, 81, 80, 95, 66, 65, 79, - 78, 49, 48, 63, 32, 113, 112, 98, - 97, 111, 110, 83, 82, 94, 93, 67, - 77, 51, 50, 62, 61, 34, 33, 47, - 46, 17, 16, 31, 128, 114, 127, 126, - 99, 109, 68, 76, 35, 45, 18, 30, - 0, 15, 130, 129, 143, 142, 115, 125, - 100, 108, 84, 92, 52, 60, 36, 44, - 19, 29, 2, 1, 14, 131, 141, 116, - 124, 20, 28, 3, 13, 132, 140, 4, - 12, + 12, 4, 140, 132, 13, 3, 28, 20, 124, 116, 141, 131, 14, 1, 2, + 29, 19, 44, 36, 60, 52, 92, 84, 108, 100, 125, 115, 142, 143, 129, + 130, 15, 0, 30, 18, 45, 35, 76, 68, 109, 99, 126, 127, 114, 128, + 31, 16, 17, 46, 47, 33, 34, 61, 62, 50, 51, 77, 67, 93, 94, + 82, 83, 110, 111, 97, 98, 112, 113, 32, 63, 48, 49, 78, 79, 65, + 66, 95, 80, 81, 96, 64, }; #define MPC8_Q5_SIZE 15 #define MPC8_Q5_BITS 7 #define MPC8_Q5_OFFSET -7 -static const uint8_t mpc8_q5_codes[2][MPC8_Q5_SIZE] = { +static const uint8_t mpc8_q5_syms[2][MPC8_Q5_SIZE] = { { - 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, - 0x04, 0x05, 0x03, 0x03, 0x03, 0x02, 0x03, + 0, 1, 13, 14, 2, 12, 3, 11, 4, 10, 5, 6, 8, 9, 7, }, { - 0x00, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x05, - 0x06, 0x07, 0x04, 0x05, 0x03, 0x02, 0x03, + 0, 1, 13, 14, 2, 12, 3, 4, 10, 11, 5, 6, 7, 8, 9, } }; static const uint8_t mpc8_q5_bits[2][MPC8_Q5_SIZE] = { { - 7, 7, 6, 5, 4, 3, 3, 2, - 3, 3, 4, 5, 6, 7, 7, + 7, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 3, 3, 2 }, { - 6, 6, 5, 4, 4, 3, 3, 3, - 3, 3, 4, 4, 5, 6, 6, + 6, 6, 6, 6, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3 } }; @@ -416,32 +267,24 @@ static const uint8_t mpc8_q5_bits[2][MPC8_Q5_SIZE] = { #define MPC8_Q6_BITS 9 #define MPC8_Q6_OFFSET -15 -static const uint8_t mpc8_q6_codes[2][MPC8_Q6_SIZE] = { +static const uint8_t mpc8_q6_syms[2][MPC8_Q6_SIZE] = { { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x04, 0x03, - 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x04, 0x03, - 0x05, 0x06, 0x07, 0x07, 0x06, 0x07, 0x08, 0x09, - 0x05, 0x06, 0x07, 0x04, 0x05, 0x06, 0x07, + 0, 1, 2, 3, 27, 28, 29, 30, 4, 5, 25, 26, 6, 24, 7, 8, 9, 20, 21, + 22, 23, 10, 11, 19, 12, 13, 17, 18, 14, 16, 15, }, { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x04, - 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, - 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x07, 0x08, 0x09, - 0x06, 0x07, 0x05, 0x06, 0x07, 0x02, 0x03, + 0, 1, 29, 30, 2, 3, 4, 26, 27, 28, 5, 6, 24, 25, 7, 8, 9, 21, 22, + 23, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, } }; static const uint8_t mpc8_q6_bits[2][MPC8_Q6_SIZE] = { { - 9, 9, 9, 9, 8, 8, 7, 6, - 6, 6, 5, 5, 4, 4, 3, 2, - 3, 4, 4, 5, 6, 6, 6, 6, - 7, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 6, 6, 6, 6, 6, + 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 2 }, { - 8, 8, 7, 7, 7, 6, 6, 5, - 5, 5, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 5, 5, 5, - 6, 6, 7, 7, 7, 8, 8, + 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, + 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 } }; @@ -449,48 +292,32 @@ static const uint8_t mpc8_q6_bits[2][MPC8_Q6_SIZE] = { #define MPC8_Q7_BITS 9 #define MPC8_Q7_OFFSET -31 -static const uint8_t mpc8_q7_codes[2][MPC8_Q7_SIZE] = { +static const uint8_t mpc8_q7_syms[2][MPC8_Q7_SIZE] = { { - 0x00, 0x01, 0x02, 0x08, 0x09, 0x03, 0x04, 0x05, - 0x06, 0x07, 0x0A, 0x0B, 0x0C, 0x0D, 0x0A, 0x0B, - 0x0C, 0x0D, 0x0E, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, - 0x0A, 0x0B, 0x0C, 0x08, 0x09, 0x06, 0x04, 0x03, - 0x05, 0x07, 0x0A, 0x0B, 0x0D, 0x0E, 0x0F, 0x0F, - 0x10, 0x11, 0x12, 0x0F, 0x13, 0x10, 0x11, 0x12, - 0x13, 0x0E, 0x0F, 0x10, 0x11, 0x08, 0x09, 0x0A, - 0x0B, 0x0C, 0x12, 0x13, 0x0D, 0x0E, 0x0F, + 0, 1, 2, 5, 6, 7, 8, 9, 53, 54, 55, 56, 57, 60, 61, 62, 3, 4, 10, + 11, 12, 13, 49, 50, 51, 52, 58, 59, 14, 15, 16, 17, 18, 43, 45, 46, 47, 48, + 19, 20, 21, 22, 23, 39, 40, 41, 42, 44, 24, 25, 26, 36, 37, 38, 27, 28, 34, + 35, 29, 33, 30, 32, 31, }, { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x09, 0x0A, - 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x0C, 0x0D, - 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, - 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, - 0x1E, 0x1F, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, - 0x17, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x09, 0x0A, - 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x02, 0x03, + 0, 1, 61, 62, 2, 3, 4, 5, 6, 7, 8, 54, 55, 56, 57, 58, 59, 60, 9, + 10, 11, 12, 13, 49, 50, 51, 52, 53, 14, 15, 16, 17, 18, 19, 20, 21, 42, 43, + 44, 45, 46, 47, 48, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, } }; static const uint8_t mpc8_q7_bits[2][MPC8_Q7_SIZE] = { { - 10, 10, 10, 9, 9, 10, 10, 10, - 10, 10, 9, 9, 9, 9, 8, 8, - 8, 8, 8, 7, 7, 7, 7, 7, - 6, 6, 6, 5, 5, 4, 3, 2, - 3, 4, 5, 5, 6, 6, 6, 7, - 7, 7, 7, 8, 7, 8, 8, 8, - 8, 9, 9, 9, 9, 10, 10, 10, - 10, 10, 9, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, + 5, 4, 4, 3, 3, 2 }, { - 9, 9, 8, 8, 8, 8, 8, 8, - 8, 7, 7, 7, 7, 7, 6, 6, - 6, 6, 6, 6, 6, 6, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 6, 6, 6, 6, 6, 6, - 6, 7, 7, 7, 7, 7, 8, 8, - 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5 } }; @@ -498,80 +325,48 @@ static const uint8_t mpc8_q7_bits[2][MPC8_Q7_SIZE] = { #define MPC8_Q8_BITS 9 #define MPC8_Q8_OFFSET -63 -static const uint8_t mpc8_q8_codes[2][MPC8_Q8_SIZE] = { +static const uint8_t mpc8_q8_syms[2][MPC8_Q8_SIZE] = { { - 0x03, 0x04, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x1A, - 0x0F, 0x1B, 0x10, 0x00, 0x01, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x11, 0x0C, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1C, 0x1A, - 0x1B, 0x1C, 0x1D, 0x1E, 0x1D, 0x1E, 0x1F, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x19, 0x25, 0x1A, 0x1B, - 0x1C, 0x1D, 0x1E, 0x1F, 0x14, 0x15, 0x16, 0x17, - 0x0E, 0x0F, 0x10, 0x11, 0x0B, 0x07, 0x04, 0x03, - 0x05, 0x0C, 0x0D, 0x12, 0x13, 0x14, 0x15, 0x18, - 0x19, 0x1A, 0x1B, 0x20, 0x21, 0x22, 0x23, 0x24, - 0x25, 0x26, 0x27, 0x26, 0x27, 0x28, 0x29, 0x2A, - 0x2B, 0x2C, 0x2D, 0x2E, 0x1F, 0x20, 0x2F, 0x21, - 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, - 0x0D, 0x0E, 0x2A, 0x0F, 0x10, 0x11, 0x12, 0x02, - 0x13, 0x03, 0x04, 0x05, 0x2B, 0x2C, 0x30, 0x31, - 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, + 11, 12, 111, 113, 114, 115, 0, 1, 13, 14, 15, 16, 17, 18, 19, + 21, 104, 105, 107, 108, 109, 110, 112, 2, 3, 4, 5, 6, 8, 10, + 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 92, + 93, 95, 96, 97, 98, 99, 100, 101, 102, 103, 106, 116, 117, 120, 121, + 122, 123, 124, 125, 126, 7, 9, 30, 36, 37, 38, 39, 40, 41, 42, + 43, 45, 83, 84, 85, 86, 87, 88, 89, 90, 91, 94, 118, 119, 44, + 46, 47, 48, 49, 50, 51, 75, 76, 77, 78, 79, 80, 81, 82, 52, + 53, 54, 55, 71, 72, 73, 74, 56, 57, 58, 59, 67, 68, 69, 70, + 60, 65, 66, 61, 62, 64, 63, }, { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x15, 0x16, - 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, - 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, - 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, - 0x2F, 0x30, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, - 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, - 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, - 0x3C, 0x3D, 0x3E, 0x31, 0x3F, 0x32, 0x33, 0x34, - 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, - 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, - 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x16, - 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, - 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, - 0x27, 0x28, 0x29, 0x04, 0x05, 0x06, 0x07, + 0, 1, 2, 3, 123, 124, 125, 126, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 75, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 76, } }; static const uint8_t mpc8_q8_bits[2][MPC8_Q8_SIZE] = { { - 11, 11, 10, 10, 10, 10, 10, 9, - 10, 9, 10, 12, 12, 11, 11, 11, - 11, 11, 11, 11, 10, 11, 10, 10, - 10, 10, 10, 10, 10, 10, 9, 10, - 10, 10, 10, 10, 9, 9, 9, 9, - 9, 9, 9, 9, 8, 9, 8, 8, - 8, 8, 8, 8, 7, 7, 7, 7, - 6, 6, 6, 6, 5, 4, 3, 2, - 3, 5, 5, 6, 6, 6, 6, 7, - 7, 7, 7, 8, 8, 8, 8, 8, - 8, 8, 8, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 10, 10, 9, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 11, 11, 10, 11, 11, 11, 11, 12, - 11, 12, 12, 12, 10, 10, 9, 9, - 10, 10, 10, 10, 10, 10, 10, + 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, 3, 3, 2 }, { - 9, 9, 9, 9, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 7, 6, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 } }; From patchwork Tue Nov 10 10:47:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23511 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 6EF45449CD8 for ; Tue, 10 Nov 2020 12:58:44 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B550668BEA5; Tue, 10 Nov 2020 12:50:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EB94068BDDD for ; Tue, 10 Nov 2020 12:50:02 +0200 (EET) Received: by mail-wm1-f67.google.com with SMTP id 10so2534311wml.2 for ; Tue, 10 Nov 2020 02:50:02 -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=K3siZ/ZyNQtSlotdpVaI+2iejddTyU/wI9CIEK69QpI=; b=MEGiFPJE8ZSpscoPhYaYvybyFRfCvKjQ5+3oOA2lYGMo6zWLZ9Dylnsrayv2xy5uCe taf7IM1OyWEh8C0YwSmnMrb5ppdvKq8gXPzn6EMi8nJ3B2KzxiJbcPplBYxYCkMQi7z7 e33q1fEQbf5e3NV9w/efgHjEIEB/i8O/EbnklGqOEJQoLuLlCmDfTArcq7kbUiqIR3UY SCM3YA7vs1S5n5Ybhkl4SX8uZvnMcKEvfKLz/4blNn6UIbLzlZWmr908jVzxwaBNt3hd QF8o0pzP0hA9s8Cc4715t7wpxGgq6SauIr5mp1R3qHtW2pn5Ke+f0mBQxffiwI+Dh/Z0 A3Eg== 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=K3siZ/ZyNQtSlotdpVaI+2iejddTyU/wI9CIEK69QpI=; b=HyM0eIWekDDDPnk3FnjFmKM6kpxoP1lq84/0M2FjZw3MImMn8TweY87HQ6drb3hxrt knwJ86RAa/we/XC4dE3vzCQDfvIJ/5PgP9jGNxaURl3tpdpGbHTNFiX/YIZLV468irmM QT/OglSJf6CRIWnuvkjxw81uRotyl2mwJLp/SDvnk/IBI1tPMuD1ogZj0Es+gZt2vIf8 y/iTsUu1zDF6VC+yB3/cdDMRUHDtO30BXwHiTpK9lheY1l5DRnyXStawO44v6T/mjNBl yNb/CT3Qf7xTnmKq/VDmdmMiWGM4uXpT9mLxjyXo0KawR7c6+3xeQs5m9US++vREEAdb ILLA== X-Gm-Message-State: AOAM5334zd+UL+OFVty0rB8aLDDDhSslLAazLtJH0sc0wtLm3fM60az/ dZFP9pry25TecYdFNqX9xwf9WhiF9G8= X-Google-Smtp-Source: ABdhPJzlsf++XS5oZY0dej+gpfdqBxTwnMKYuU4aWNs2g4mts0BN4JFCi50Xl+ENjvdceOWeWClpQg== X-Received: by 2002:a1c:9c53:: with SMTP id f80mr3958694wme.19.1605005402121; Tue, 10 Nov 2020 02:50:02 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:01 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:39 +0100 Message-Id: <20201110104851.321029-43-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 042/114] avcodec/mpc8: Apply offsets when 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc8.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index 339ee515b8..31b7ad14ac 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -39,9 +39,6 @@ static VLC band_vlc, scfi_vlc[2], dscf_vlc[2], res_vlc[2]; static VLC q1_vlc, q2_vlc[2], q3_vlc[2], quant_vlc[4][2], q9up_vlc; -static const int q3_offsets[2] = { MPC8_Q3_OFFSET, MPC8_Q4_OFFSET }; -static const int quant_offsets[6] = { MPC8_Q5_OFFSET, MPC8_Q6_OFFSET, MPC8_Q7_OFFSET, MPC8_Q8_OFFSET }; - static inline int mpc8_dec_base(GetBitContext *gb, int k, int n) { int len = mpc8_cnk_len[k-1][n-1] - 1; @@ -163,10 +160,10 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) INIT_VLC_STATIC_FROM_LENGTHS(&q3_vlc[0], MPC8_Q3_BITS, MPC8_Q3_SIZE, mpc8_q3_bits, 1, - mpc8_q3_syms, 1, 1, 0, 0, 512); + mpc8_q3_syms, 1, 1, MPC8_Q3_OFFSET, 0, 512); INIT_VLC_STATIC_FROM_LENGTHS(&q3_vlc[1], MPC8_Q4_BITS, MPC8_Q4_SIZE, mpc8_q4_bits, 1, - mpc8_q4_syms, 1, 1, 0, 0, 516); + mpc8_q4_syms, 1, 1, MPC8_Q4_OFFSET, 0, 516); for(i = 0; i < 2; i++){ res_vlc[i].table = &codes_table[vlc_offsets[0+i]]; @@ -188,25 +185,25 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) ff_init_vlc_from_lengths(&quant_vlc[0][i], MPC8_Q5_BITS, MPC8_Q5_SIZE, mpc8_q5_bits[i], 1, mpc8_q5_syms[i], 1, 1, - 0, INIT_VLC_USE_NEW_STATIC); + MPC8_Q5_OFFSET, INIT_VLC_USE_NEW_STATIC); quant_vlc[1][i].table = &codes_table[vlc_offsets[6+i]]; quant_vlc[1][i].table_allocated = vlc_offsets[7+i] - vlc_offsets[6+i]; ff_init_vlc_from_lengths(&quant_vlc[1][i], MPC8_Q6_BITS, MPC8_Q6_SIZE, mpc8_q6_bits[i], 1, mpc8_q6_syms[i], 1, 1, - 0, INIT_VLC_USE_NEW_STATIC); + MPC8_Q6_OFFSET, INIT_VLC_USE_NEW_STATIC); quant_vlc[2][i].table = &codes_table[vlc_offsets[8+i]]; quant_vlc[2][i].table_allocated = vlc_offsets[9+i] - vlc_offsets[8+i]; ff_init_vlc_from_lengths(&quant_vlc[2][i], MPC8_Q7_BITS, MPC8_Q7_SIZE, mpc8_q7_bits[i], 1, mpc8_q7_syms[i], 1, 1, - 0, INIT_VLC_USE_NEW_STATIC); + MPC8_Q7_OFFSET, INIT_VLC_USE_NEW_STATIC); quant_vlc[3][i].table = &codes_table[vlc_offsets[10+i]]; quant_vlc[3][i].table_allocated = vlc_offsets[11+i] - vlc_offsets[10+i]; ff_init_vlc_from_lengths(&quant_vlc[3][i], MPC8_Q8_BITS, MPC8_Q8_SIZE, mpc8_q8_bits[i], 1, mpc8_q8_syms[i], 1, 1, - 0, INIT_VLC_USE_NEW_STATIC); + MPC8_Q8_OFFSET, INIT_VLC_USE_NEW_STATIC); } vlc_initialized = 1; @@ -359,7 +356,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data, case 3: case 4: for(j = 0; j < SAMPLES_PER_BAND; j += 2){ - t = get_vlc2(gb, q3_vlc[res - 3].table, MPC8_Q3_BITS, 2) + q3_offsets[res - 3]; + t = get_vlc2(gb, q3_vlc[res - 3].table, MPC8_Q3_BITS, 2); c->Q[ch][off + j + 1] = t >> 4; c->Q[ch][off + j + 0] = sign_extend(t, 4); } @@ -370,8 +367,8 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data, case 8: cnt = 2 * mpc8_thres[res]; for(j = 0; j < SAMPLES_PER_BAND; j++){ - t = get_vlc2(gb, quant_vlc[res - 5][cnt > mpc8_thres[res]].table, quant_vlc[res - 5][cnt > mpc8_thres[res]].bits, 2) + quant_offsets[res - 5]; - c->Q[ch][off + j] = t; + const VLC *vlc = &quant_vlc[res - 5][cnt > mpc8_thres[res]]; + c->Q[ch][off + j] = get_vlc2(gb, vlc->table, vlc->bits, 2); cnt = (cnt >> 1) + FFABS(c->Q[ch][off + j]); } break; From patchwork Tue Nov 10 10:47:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23519 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 960DE44A3F2 for ; Tue, 10 Nov 2020 12:59:28 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9981168BEB7; Tue, 10 Nov 2020 12:50:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 59EB168BE85 for ; Tue, 10 Nov 2020 12:50:04 +0200 (EET) Received: by mail-wm1-f67.google.com with SMTP id d142so2521283wmd.4 for ; Tue, 10 Nov 2020 02:50:04 -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=PGyStSwBd4lbKsR92/+CuqSP5Trdw9Rhjj5PJtd61bw=; b=A8LgYXcu/L/SAOrslTlWyUaaTb0e3sSnthw8v8Yi+cAhUsToTcnusALo43HJPDFKtI T6p76k/sttiD72c9Mg8+sfmRQCSP7+UHpbrmDfuXby5RTFEkG179VpTp7GpHyEPXnzbW 06cZqTbmsCwO0Rtb7JYBtJ50wBwvfYKNJU7mhVII1FNKGX5Hk82IXXNO6YB6cDRhsWvF Aj610K9aOGl/nJ165fi6YH154wh67g2UusPeYLeTPUW0dshSUQQXM9LQMwLcSXdDjws2 qPhA0nmKx+frcPggVxOIdwfixmfxOkoZt2MzlJrCYT4i8VACUR49o1I0tJPkcN09Jgg1 bXEg== 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=PGyStSwBd4lbKsR92/+CuqSP5Trdw9Rhjj5PJtd61bw=; b=mjlN0A3Ok/BvBw6iHSlRFGmHI/a0yIfnGmH8Wjh5i2pBiH7X97sfaR0G/TSuGzMrE2 AZDIfXmQHO/WjZyaQ1WNsPfixETPBazxO0dGB/MCMRPcMa0XdGGWh0l/LoP9v+EaATvg g5hd5KLRVqiiJ3Eqs3a2KCZWkoxbXGewhGi7FzH8Vx4F3vp4uU41uEwGIUEbJ/sREaeB OzSiTYkuEZSNT7kq7ap/uqq9/IophGDAJvTd9xY3Sajowt0XuNm9EtCGr2Z8vnCuzNne xeKiEkfVTJhYDJMg9J+loeeqaaz8vgBQ5wqQEaVb9yq57E5RlvchEbyPhPMTq2x+O0zi M2XQ== X-Gm-Message-State: AOAM533DnB2coQsjo39HSuiC+DNNG6jfkyEVKShiu32bvQ1GC1fsJ13i UYBhsgWzFHkDd5AQKytA7C8m9W3EuZ4= X-Google-Smtp-Source: ABdhPJymc6Gv++QrVWe1Xnx6VT8HqJhPPjIBkAlCwRAPp2GW0qMckpdhTcrQ6X0ujAM1amVsP0SSnA== X-Received: by 2002:a1c:3142:: with SMTP id x63mr4010918wmx.168.1605005403085; Tue, 10 Nov 2020 02:50:03 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:02 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:40 +0100 Message-Id: <20201110104851.321029-44-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 043/114] avcodec/mpc8: Reduce the size of the length tables to initialize 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" After permuting both length, code as well as symbol tables so that the codes are ordered from left to right in the tree, it became apparent that the length of the codes decreases from left to right. Therefore one can run-length encode the lengths to save space. This commit implements this. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc8.c | 114 +++++++++++++++-------------- libavcodec/mpc8huff.h | 166 ++++++++++++------------------------------ 2 files changed, 104 insertions(+), 176 deletions(-) diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index 31b7ad14ac..ef0fd6622a 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -90,6 +90,21 @@ static const uint16_t vlc_offsets[13] = { 0, 640, 1184, 1748, 2298, 2426, 2554, 3066, 3578, 4106, 4618, 5196, 5708 }; +static av_cold void build_vlc(VLC *vlc, int nb_bits, + const uint8_t codes_counts[16], + const uint8_t syms[], int offset) +{ + uint8_t len[MPC8_MAX_VLC_SIZE]; + unsigned num = 0; + + for (int i = 16; i > 0; i--) + for (unsigned tmp = num + codes_counts[i - 1]; num < tmp; num++) + len[num] = i; + + ff_init_vlc_from_lengths(vlc, nb_bits, num, len, 1, + syms, 1, 1, offset, INIT_VLC_USE_NEW_STATIC); +} + static av_cold int mpc8_decode_init(AVCodecContext * avctx) { int i; @@ -97,7 +112,6 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) GetBitContext gb; static int vlc_initialized = 0; int channels; - static VLC_TYPE codes_table[5708][2]; if(avctx->extradata_size < 2){ @@ -133,77 +147,65 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) if(vlc_initialized) return 0; av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n"); - INIT_VLC_STATIC_FROM_LENGTHS(&band_vlc, MPC8_BANDS_BITS, MPC8_BANDS_SIZE, - mpc8_bands_bits, 1, - mpc8_bands_syms, 1, 1, 0, 0, 542); - - INIT_VLC_STATIC_FROM_LENGTHS(&q1_vlc, MPC8_Q1_BITS, MPC8_Q1_SIZE, - mpc8_q1_bits, 1, - mpc8_q1_syms, 1, 1, 0, 0, 520); - INIT_VLC_STATIC_FROM_LENGTHS(&q9up_vlc, MPC8_Q9UP_BITS, MPC8_Q9UP_SIZE, - mpc8_q9up_bits, 1, - mpc8_q9up_syms, 1, 1, 0, 0, 524); - - INIT_VLC_STATIC_FROM_LENGTHS(&scfi_vlc[0], MPC8_SCFI0_BITS, MPC8_SCFI0_SIZE, - mpc8_scfi0_bits, 1, - mpc8_scfi0_syms, 1, 1, 0, 0, 1 << MPC8_SCFI0_BITS); - INIT_VLC_STATIC_FROM_LENGTHS(&scfi_vlc[1], MPC8_SCFI1_BITS, MPC8_SCFI1_SIZE, - mpc8_scfi1_bits, 1, - mpc8_scfi1_syms, 1, 1, 0, 0, 1 << MPC8_SCFI1_BITS); - - INIT_VLC_STATIC_FROM_LENGTHS(&dscf_vlc[0], MPC8_DSCF0_BITS, MPC8_DSCF0_SIZE, - mpc8_dscf0_bits, 1, - mpc8_dscf0_syms, 1, 1, 0, 0, 560); - INIT_VLC_STATIC_FROM_LENGTHS(&dscf_vlc[1], MPC8_DSCF1_BITS, MPC8_DSCF1_SIZE, - mpc8_dscf1_bits, 1, - mpc8_dscf1_syms, 1, 1, 0, 0, 598); - - INIT_VLC_STATIC_FROM_LENGTHS(&q3_vlc[0], MPC8_Q3_BITS, MPC8_Q3_SIZE, - mpc8_q3_bits, 1, - mpc8_q3_syms, 1, 1, MPC8_Q3_OFFSET, 0, 512); - INIT_VLC_STATIC_FROM_LENGTHS(&q3_vlc[1], MPC8_Q4_BITS, MPC8_Q4_SIZE, - mpc8_q4_bits, 1, - mpc8_q4_syms, 1, 1, MPC8_Q4_OFFSET, 0, 516); +#define INIT_VLC(vlc, bits, len_counts, symbols, offset, static_size) \ + do { \ + static VLC_TYPE table[static_size][2]; \ + (vlc)->table = table; \ + (vlc)->table_allocated = static_size; \ + build_vlc(vlc, bits, len_counts, symbols, offset); \ + } while (0) + + + INIT_VLC(&band_vlc, MPC8_BANDS_BITS, + mpc8_bands_len_counts, mpc8_bands_syms, 0, 542); + + INIT_VLC(&q1_vlc, MPC8_Q1_BITS, + mpc8_q1_len_counts, mpc8_q1_syms, 0, 520); + INIT_VLC(&q9up_vlc, MPC8_Q9UP_BITS, + mpc8_q9up_len_counts, mpc8_q9up_syms, 0, 524); + + INIT_VLC(&scfi_vlc[0], MPC8_SCFI0_BITS, + mpc8_scfi_len_counts[0], mpc8_scfi0_syms, 0, 1 << MPC8_SCFI0_BITS); + INIT_VLC(&scfi_vlc[1], MPC8_SCFI1_BITS, + mpc8_scfi_len_counts[1], mpc8_scfi1_syms, 0, 1 << MPC8_SCFI1_BITS); + + INIT_VLC(&dscf_vlc[0], MPC8_DSCF0_BITS, + mpc8_dscf_len_counts[0], mpc8_dscf0_syms, 0, 560); + INIT_VLC(&dscf_vlc[1], MPC8_DSCF1_BITS, + mpc8_dscf_len_counts[1], mpc8_dscf1_syms, 0, 598); + + INIT_VLC(&q3_vlc[0], MPC8_Q3_BITS, + mpc8_q3_len_counts, mpc8_q3_syms, MPC8_Q3_OFFSET, 512); + INIT_VLC(&q3_vlc[1], MPC8_Q4_BITS, + mpc8_q4_len_counts, mpc8_q4_syms, MPC8_Q4_OFFSET, 516); for(i = 0; i < 2; i++){ res_vlc[i].table = &codes_table[vlc_offsets[0+i]]; res_vlc[i].table_allocated = vlc_offsets[1+i] - vlc_offsets[0+i]; - ff_init_vlc_from_lengths(&res_vlc[i], MPC8_RES_BITS, MPC8_RES_SIZE, - mpc8_res_bits[i], 1, - mpc8_res_syms[i], 1, 1, - 0, INIT_VLC_USE_NEW_STATIC); + build_vlc(&res_vlc[i], MPC8_RES_BITS, + mpc8_res_len_counts[i], mpc8_res_syms[i], 0); q2_vlc[i].table = &codes_table[vlc_offsets[2+i]]; q2_vlc[i].table_allocated = vlc_offsets[3+i] - vlc_offsets[2+i]; - ff_init_vlc_from_lengths(&q2_vlc[i], MPC8_Q2_BITS, MPC8_Q2_SIZE, - mpc8_q2_bits[i], 1, - mpc8_q2_syms[i], 1, 1, - 0, INIT_VLC_USE_NEW_STATIC); + build_vlc(&q2_vlc[i], MPC8_Q2_BITS, + mpc8_q2_len_counts[i], mpc8_q2_syms[i], 0); quant_vlc[0][i].table = &codes_table[vlc_offsets[4+i]]; quant_vlc[0][i].table_allocated = vlc_offsets[5+i] - vlc_offsets[4+i]; - ff_init_vlc_from_lengths(&quant_vlc[0][i], MPC8_Q5_BITS, MPC8_Q5_SIZE, - mpc8_q5_bits[i], 1, - mpc8_q5_syms[i], 1, 1, - MPC8_Q5_OFFSET, INIT_VLC_USE_NEW_STATIC); + build_vlc(&quant_vlc[0][i], MPC8_Q5_BITS, + mpc8_q5_len_counts[i], mpc8_q5_syms[i], MPC8_Q5_OFFSET); quant_vlc[1][i].table = &codes_table[vlc_offsets[6+i]]; quant_vlc[1][i].table_allocated = vlc_offsets[7+i] - vlc_offsets[6+i]; - ff_init_vlc_from_lengths(&quant_vlc[1][i], MPC8_Q6_BITS, MPC8_Q6_SIZE, - mpc8_q6_bits[i], 1, - mpc8_q6_syms[i], 1, 1, - MPC8_Q6_OFFSET, INIT_VLC_USE_NEW_STATIC); + build_vlc(&quant_vlc[1][i], MPC8_Q6_BITS, + mpc8_q6_len_counts[i], mpc8_q6_syms[i], MPC8_Q6_OFFSET); quant_vlc[2][i].table = &codes_table[vlc_offsets[8+i]]; quant_vlc[2][i].table_allocated = vlc_offsets[9+i] - vlc_offsets[8+i]; - ff_init_vlc_from_lengths(&quant_vlc[2][i], MPC8_Q7_BITS, MPC8_Q7_SIZE, - mpc8_q7_bits[i], 1, - mpc8_q7_syms[i], 1, 1, - MPC8_Q7_OFFSET, INIT_VLC_USE_NEW_STATIC); + build_vlc(&quant_vlc[2][i], MPC8_Q7_BITS, + mpc8_q7_len_counts[i], mpc8_q7_syms[i], MPC8_Q7_OFFSET); quant_vlc[3][i].table = &codes_table[vlc_offsets[10+i]]; quant_vlc[3][i].table_allocated = vlc_offsets[11+i] - vlc_offsets[10+i]; - ff_init_vlc_from_lengths(&quant_vlc[3][i], MPC8_Q8_BITS, MPC8_Q8_SIZE, - mpc8_q8_bits[i], 1, - mpc8_q8_syms[i], 1, 1, - MPC8_Q8_OFFSET, INIT_VLC_USE_NEW_STATIC); + build_vlc(&quant_vlc[3][i], MPC8_Q8_BITS, + mpc8_q8_len_counts[i], mpc8_q8_syms[i], MPC8_Q8_OFFSET); } vlc_initialized = 1; diff --git a/libavcodec/mpc8huff.h b/libavcodec/mpc8huff.h index 687c9f7e98..8838751fd6 100644 --- a/libavcodec/mpc8huff.h +++ b/libavcodec/mpc8huff.h @@ -24,6 +24,8 @@ #include +#define MPC8_MAX_VLC_SIZE 256 + #define MPC8_BANDS_SIZE 33 #define MPC8_BANDS_BITS 9 @@ -31,9 +33,8 @@ static const uint8_t mpc8_bands_syms[MPC8_BANDS_SIZE] = { 13, 19, 10, 11, 12, 14, 15, 16, 17, 18, 20, 21, 22, 9, 23, 24, 25, 8, 26, 27, 7, 28, 5, 6, 29, 4, 3, 30, 2, 31, 1, 32, 0 }; -static const uint8_t mpc8_bands_bits[MPC8_BANDS_SIZE] = { - 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 10, 10, - 10, 9, 9, 8, 8, 8, 7, 6, 6, 5, 5, 3, 2, 1 +static const uint8_t mpc8_bands_len_counts[16] = { + 1, 1, 1, 0, 2, 2, 1, 3, 2, 3, 4, 11, 2, 0, 0, 0 }; #define MPC8_SCFI0_SIZE 4 @@ -42,9 +43,6 @@ static const uint8_t mpc8_bands_bits[MPC8_BANDS_SIZE] = { static const uint8_t mpc8_scfi0_syms[MPC8_SCFI0_SIZE] = { 0, 1, 3, 2 }; -static const uint8_t mpc8_scfi0_bits[MPC8_SCFI0_SIZE] = { - 3, 3, 2, 1 -}; #define MPC8_SCFI1_SIZE 16 #define MPC8_SCFI1_BITS 7 @@ -52,8 +50,10 @@ static const uint8_t mpc8_scfi0_bits[MPC8_SCFI0_SIZE] = { static const uint8_t mpc8_scfi1_syms[MPC8_SCFI1_SIZE] = { 1, 4, 0, 2, 3, 8, 12, 5, 6, 7, 9, 13, 11, 14, 10, 15 }; -static const uint8_t mpc8_scfi1_bits[MPC8_SCFI1_SIZE] = { - 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 3, 3, 2, 2 + +static const uint8_t mpc8_scfi_len_counts[2][16] = { + { 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 2, 2, 0, 5, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; #define MPC8_DSCF0_SIZE 64 @@ -65,12 +65,6 @@ static const uint8_t mpc8_dscf0_syms[MPC8_DSCF0_SIZE] = { 17, 18, 41, 42, 43, 19, 20, 21, 22, 40, 23, 24, 38, 39, 25, 28, 37, 26, 27, 29, 30, 32, 36, 33, 34, 35, }; -static const uint8_t mpc8_dscf0_bits[MPC8_DSCF0_SIZE] = { - 14, 14, 14, 14, 14, 14, 13, 13, 13, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, - 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, - 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 4, - 4, 4, 4, 4, 3, 3, 3 -}; #define MPC8_DSCF1_SIZE 65 #define MPC8_DSCF1_BITS 9 @@ -81,11 +75,10 @@ static const uint8_t mpc8_dscf1_syms[MPC8_DSCF1_SIZE] = { 44, 45, 18, 19, 20, 41, 42, 21, 22, 39, 40, 23, 24, 38, 25, 37, 26, 35, 36, 27, 28, 34, 29, 30, 31, 32, 33, }; -static const uint8_t mpc8_dscf1_bits[MPC8_DSCF1_SIZE] = { - 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, - 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, - 4, 4, 4, 3, 3, 3, 3, 3 + +static const uint8_t mpc8_dscf_len_counts[2][16] = { + { 0, 0, 3, 6, 3, 4, 5, 7, 7, 9, 6, 5, 3, 6, 0, 0 }, + { 0, 0, 5, 3, 3, 2, 3, 4, 5, 7, 7, 9, 6, 5, 6, 0 }, }; #define MPC8_RES_SIZE 17 @@ -99,13 +92,10 @@ static const uint8_t mpc8_res_syms[2][MPC8_RES_SIZE] = { 8, 9, 10, 11, 7, 12, 6, 13, 5, 4, 14, 3, 15, 2, 0, 1, 16, } }; -static const uint8_t mpc8_res_bits[2][MPC8_RES_SIZE] = { - { - 16, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 - }, - { - 14, 14, 14, 14, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 2 - } + +static const uint8_t mpc8_res_len_counts[2][16] = { + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 }, + { 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 4, 0, 0 }, }; #define MPC8_Q1_SIZE 19 @@ -114,8 +104,9 @@ static const uint8_t mpc8_res_bits[2][MPC8_RES_SIZE] = { static const uint8_t mpc8_q1_syms[MPC8_Q1_SIZE] = { 17, 18, 16, 15, 14, 13, 12, 0, 11, 1, 2, 8, 9, 10, 3, 4, 5, 6, 7, }; -static const uint8_t mpc8_q1_bits[MPC8_Q1_SIZE] = { - 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3 + +static const uint8_t mpc8_q1_len_counts[16] = { + 0, 0, 5, 5, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0 }; #define MPC8_Q9UP_SIZE 256 @@ -141,21 +132,9 @@ static const uint8_t mpc8_q9up_syms[MPC8_Q9UP_SIZE] = { 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 127, 128, }; -static const uint8_t mpc8_q9up_bits[MPC8_Q9UP_SIZE] = { - 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 6, 6 + +static const uint8_t mpc8_q9up_len_counts[16] = { + 0, 0, 0, 0, 0, 2, 38, 134, 71, 9, 2, 0, 0, 0, 0, 0 }; #define MPC8_Q2_SIZE 125 @@ -185,35 +164,18 @@ static const uint8_t mpc8_q2_syms[2][MPC8_Q2_SIZE] = { 82, 86, 87, 92, 62, } }; -static const uint8_t mpc8_q2_bits[2][MPC8_Q2_SIZE] = { -{ - 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 3 -}, -{ - 12, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, - 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4 -} + +static const uint8_t mpc8_q2_len_counts[2][16] = { + { 0, 0, 1, 6, 0, 17, 9, 24, 24, 9, 27, 4, 4, 0, 0, 0 }, + { 0, 0, 0, 1, 16, 10, 6, 48, 9, 27, 4, 4, 0, 0, 0, 0 }, }; #define MPC8_Q3_SIZE 49 #define MPC8_Q3_BITS 9 #define MPC8_Q3_OFFSET -48 -static const uint8_t mpc8_q3_bits[MPC8_Q3_SIZE] = { - 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, - 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, +static const uint8_t mpc8_q3_len_counts[16] = { + 0, 0, 1, 6, 6, 11, 13, 8, 4, 0, 0, 0, 0, 0, 0, 0 }; static const uint8_t mpc8_q3_syms[MPC8_Q3_SIZE] = { 13, 3, 109, 99, 14, 2, 29, 19, 93, 83, 110, 98, 15, 0, 1, @@ -226,12 +188,8 @@ static const uint8_t mpc8_q3_syms[MPC8_Q3_SIZE] = { #define MPC8_Q4_BITS 9 #define MPC8_Q4_OFFSET -64 -static const uint8_t mpc8_q4_bits[MPC8_Q4_SIZE] = { - 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 4, +static const uint8_t mpc8_q4_len_counts[16] = { + 0, 0, 0, 1, 12, 23, 14, 19, 8, 4, 0, 0, 0, 0, 0, 0 }; static const uint8_t mpc8_q4_syms[MPC8_Q4_SIZE] = { 12, 4, 140, 132, 13, 3, 28, 20, 124, 116, 141, 131, 14, 1, 2, @@ -254,13 +212,10 @@ static const uint8_t mpc8_q5_syms[2][MPC8_Q5_SIZE] = { 0, 1, 13, 14, 2, 12, 3, 4, 10, 11, 5, 6, 7, 8, 9, } }; -static const uint8_t mpc8_q5_bits[2][MPC8_Q5_SIZE] = { -{ - 7, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 3, 3, 2 -}, -{ - 6, 6, 6, 6, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3 -} + +static const uint8_t mpc8_q5_len_counts[2][16] = { + { 0, 1, 4, 2, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 5, 4, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; #define MPC8_Q6_SIZE 31 @@ -277,15 +232,10 @@ static const uint8_t mpc8_q6_syms[2][MPC8_Q6_SIZE] = { 23, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, } }; -static const uint8_t mpc8_q6_bits[2][MPC8_Q6_SIZE] = { -{ - 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 6, 6, 6, 6, 6, - 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 2 -}, -{ - 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, - 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 -} + +static const uint8_t mpc8_q6_len_counts[2][16] = { + { 0, 1, 2, 4, 3, 7, 2, 4, 8, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 11, 6, 4, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0 }, }; #define MPC8_Q7_SIZE 63 @@ -306,19 +256,10 @@ static const uint8_t mpc8_q7_syms[2][MPC8_Q7_SIZE] = { 36, 37, 38, 39, 40, 41, } }; -static const uint8_t mpc8_q7_bits[2][MPC8_Q7_SIZE] = { -{ - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, - 5, 4, 4, 3, 3, 2 -}, -{ - 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5 -} + +static const uint8_t mpc8_q7_len_counts[2][MPC8_Q7_SIZE] = { + { 0, 1, 2, 2, 4, 6, 10, 10, 12, 16, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 20, 15, 10, 14, 4, 0, 0, 0, 0, 0, 0, 0 }, }; #define MPC8_Q8_SIZE 127 @@ -349,25 +290,10 @@ static const uint8_t mpc8_q8_syms[2][MPC8_Q8_SIZE] = { 69, 70, 71, 72, 73, 74, 76, } }; -static const uint8_t mpc8_q8_bits[2][MPC8_Q8_SIZE] = { -{ - 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, - 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, 3, 3, 2 -}, -{ - 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 -} + +static const uint8_t mpc8_q8_len_counts[2][16] = { + { 0, 1, 2, 1, 3, 8, 8, 15, 24, 42, 17, 6, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 26, 55, 38, 8, 0, 0, 0, 0, 0, 0, 0 }, }; #endif /* AVCODEC_MPC8HUFF_H */ From patchwork Tue Nov 10 10:47:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23523 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 F3DF544A3F2 for ; Tue, 10 Nov 2020 12:59:43 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8716A68BE8D; Tue, 10 Nov 2020 12:50:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B0CF668BE54 for ; Tue, 10 Nov 2020 12:50:04 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id 19so987837wmf.1 for ; Tue, 10 Nov 2020 02:50:04 -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=nsW1FBwo+zssPnw/9nIz+KqW6u99NQx7fGFvzHdPuyk=; b=kbtg/YXaBqr7x9O/pkkgF534hE43KZiSTaJEv9mFw2JcHjRwm9gV7bmsokttZOp6BY RsW/qFnDBtOvJU51tsJmj+HsOGH8rWspVAEU7CLAuV4R85YMw7LIgcFAOIOdgA7lPt1F Hfq/sZecpRlNSzdX70IxoCp4DUTqVcWSPAgxwIKcdWBEOXitxCqMj3AYmcFKIFI7UDd6 XwdV1uVm3Wzix+vEPckfek1maz52+sO7Bn2jSLJkGq6BycKIE+gKa+BdLPMJi9AddmFj oc2ECNU6lrmAANG8w3FxeB9kvzrTTw+rqoReZ+7DEAySpRWDV3NPd3HnYdN3Bg+MlEXe YyQw== 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=nsW1FBwo+zssPnw/9nIz+KqW6u99NQx7fGFvzHdPuyk=; b=C5NRBQlSbi9vRzWmimi2X48I0OXfsCrR2/qrQLqM+zeuQVktb+qClEncv9DkqPFi8a T42FcIgJ5Qumcf6Ts3n/bFqXyXqcpAgRnMIUKV9qSFJQWOLA1EcAf9xHKObUp4kJyGHZ pcAzKOHjLRr0c7uZf8jO37M11EAg4ww1xd0hnSNTLv5A9sJMWn6hmDgYchnGhEw8YPeD lJpIKxjZ/xh3OXtGKa3CHMfLfVmqWiyOQiSPojWBSATjiRuCT5SJ0UxY+ZitmN54iMV9 Dy96Bz7nmKPKHaDnU95WtklOgtAA5l8uGJEvlrATGi1YLoYbtZJRu4iaMOq5Eh0QVKK2 iZ2g== X-Gm-Message-State: AOAM5331d+kZoopsb0CLlKn0PSBIBL4mcpUPAzLz54ax80wf9/IyGhwj uRQuAbjhr33JTcztuoeSfICsnNYRkhY= X-Google-Smtp-Source: ABdhPJy7mGd9vxDL+aP5PFg+VRfoEr8YuK7LKj/J0tw+44a5BG1k7ZrSTkvvVe4U+iy0pX3n3aSxkQ== X-Received: by 2002:a7b:c101:: with SMTP id w1mr4068581wmi.170.1605005403966; Tue, 10 Nov 2020 02:50:03 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:03 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:41 +0100 Message-Id: <20201110104851.321029-45-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 044/114] avcodec/mpc8: Reduce the size of some 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" Several of the quantisation VLCs come in pairs and up until now the number of bits used for each VLC was set to the same value for both VLCs in such a pair even when one of the two required only a lower number. This is a waste given that the get_vlc2() call is compatible with these two VLCs using a different number of bits (it uses vlc->bits). Given that the code lengths are descending it is easily possible to know the length of the longest code for a given VLC: It is the length of the first one. With this information one can easily use the least amount of bits. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc8.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index ef0fd6622a..4863ec0953 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -87,10 +87,10 @@ static int mpc8_get_mask(GetBitContext *gb, int size, int t) } static const uint16_t vlc_offsets[13] = { - 0, 640, 1184, 1748, 2298, 2426, 2554, 3066, 3578, 4106, 4618, 5196, 5708 + 0, 640, 1184, 1748, 2298, 2426, 2490, 3002, 3258, 3786, 4298, 4876, 5388 }; -static av_cold void build_vlc(VLC *vlc, int nb_bits, +static av_cold void build_vlc(VLC *vlc, const uint8_t codes_counts[16], const uint8_t syms[], int offset) { @@ -101,7 +101,7 @@ static av_cold void build_vlc(VLC *vlc, int nb_bits, for (unsigned tmp = num + codes_counts[i - 1]; num < tmp; num++) len[num] = i; - ff_init_vlc_from_lengths(vlc, nb_bits, num, len, 1, + ff_init_vlc_from_lengths(vlc, FFMIN(len[0], 9), num, len, 1, syms, 1, 1, offset, INIT_VLC_USE_NEW_STATIC); } @@ -112,7 +112,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) GetBitContext gb; static int vlc_initialized = 0; int channels; - static VLC_TYPE codes_table[5708][2]; + static VLC_TYPE codes_table[5388][2]; if(avctx->extradata_size < 2){ av_log(avctx, AV_LOG_ERROR, "Too small extradata size (%i)!\n", avctx->extradata_size); @@ -152,7 +152,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) static VLC_TYPE table[static_size][2]; \ (vlc)->table = table; \ (vlc)->table_allocated = static_size; \ - build_vlc(vlc, bits, len_counts, symbols, offset); \ + build_vlc(vlc, len_counts, symbols, offset); \ } while (0) @@ -182,29 +182,29 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) for(i = 0; i < 2; i++){ res_vlc[i].table = &codes_table[vlc_offsets[0+i]]; res_vlc[i].table_allocated = vlc_offsets[1+i] - vlc_offsets[0+i]; - build_vlc(&res_vlc[i], MPC8_RES_BITS, + build_vlc(&res_vlc[i], mpc8_res_len_counts[i], mpc8_res_syms[i], 0); q2_vlc[i].table = &codes_table[vlc_offsets[2+i]]; q2_vlc[i].table_allocated = vlc_offsets[3+i] - vlc_offsets[2+i]; - build_vlc(&q2_vlc[i], MPC8_Q2_BITS, + build_vlc(&q2_vlc[i], mpc8_q2_len_counts[i], mpc8_q2_syms[i], 0); quant_vlc[0][i].table = &codes_table[vlc_offsets[4+i]]; quant_vlc[0][i].table_allocated = vlc_offsets[5+i] - vlc_offsets[4+i]; - build_vlc(&quant_vlc[0][i], MPC8_Q5_BITS, + build_vlc(&quant_vlc[0][i], mpc8_q5_len_counts[i], mpc8_q5_syms[i], MPC8_Q5_OFFSET); quant_vlc[1][i].table = &codes_table[vlc_offsets[6+i]]; quant_vlc[1][i].table_allocated = vlc_offsets[7+i] - vlc_offsets[6+i]; - build_vlc(&quant_vlc[1][i], MPC8_Q6_BITS, + build_vlc(&quant_vlc[1][i], mpc8_q6_len_counts[i], mpc8_q6_syms[i], MPC8_Q6_OFFSET); quant_vlc[2][i].table = &codes_table[vlc_offsets[8+i]]; quant_vlc[2][i].table_allocated = vlc_offsets[9+i] - vlc_offsets[8+i]; - build_vlc(&quant_vlc[2][i], MPC8_Q7_BITS, + build_vlc(&quant_vlc[2][i], mpc8_q7_len_counts[i], mpc8_q7_syms[i], MPC8_Q7_OFFSET); quant_vlc[3][i].table = &codes_table[vlc_offsets[10+i]]; quant_vlc[3][i].table_allocated = vlc_offsets[11+i] - vlc_offsets[10+i]; - build_vlc(&quant_vlc[3][i], MPC8_Q8_BITS, + build_vlc(&quant_vlc[3][i], mpc8_q8_len_counts[i], mpc8_q8_syms[i], MPC8_Q8_OFFSET); } vlc_initialized = 1; From patchwork Tue Nov 10 10:47:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23526 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 C02C144AA20 for ; Tue, 10 Nov 2020 13:00:27 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4674E68BED0; Tue, 10 Nov 2020 12:50:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 14A7C68BE67 for ; Tue, 10 Nov 2020 12:50:06 +0200 (EET) Received: by mail-wr1-f45.google.com with SMTP id 23so12138616wrc.8 for ; Tue, 10 Nov 2020 02:50:06 -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=EDL9yS+/+r5jDgX1IRg5wptub/SMj+KE/0qS8IzN9Zg=; b=vKpdhyBeUGa40pleSBBKk+fopboAT/11ZOMLVn1YZRXDTVgLcYbFmW6i5HqNSg0juz 47UkgYWnMgXMIdiTTT+0D1b2UgMca1SW1FwVkGtRTl1fbdfYmKb24SVtTCd2qKDj8IkR ZK3+8TVPBRgfk7ScwxylvSX1q5DbAJL+hOJLISyrimV+jtEE1rxY7vvM4ixrPrSa1BFk upBRt1RKauZrn6i9Z92+Bj+E8lYU9vHCQFVPDOK9TGHucJPz5MNzOtEpl14fT8/Uan/i Fd6QJsm36v+sPJbxrBvDIS0jXA8rSAznLpgafcFHSfpYpdMwy9KZLSspbtR5FpXlE6F8 rNsw== 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=EDL9yS+/+r5jDgX1IRg5wptub/SMj+KE/0qS8IzN9Zg=; b=DeTedh7FF/6evKB1m6frMxoHZJg483jg3YvzEdeTuUiWzo2bjurwBBDsdWKKPVZE/6 w2oDfLZR9L4dYlFwCqdXryqqtzyHzw6PSwFXfg1fyEDakJdh7sz4Kw8+IlNpUA5Ift0D ntKXLEyvDOziF7lCuFiVEDbiLH8odU4cUmBjUBhDPWXBIg2/Op16jlKB8T7vQwhcGvya KyfUbs7d8bP2kigLvvCromMDqjQGh5AxS/JP+bbjcvjAsFX/2MWnq+MiPdPaqVnN2xSK uuuPp5noT10/KwvEgfs1jnCTARb59AbkW2QwOVEwdhQak/Pk1MIKfZpJrMOExqJTHsS3 WVjw== X-Gm-Message-State: AOAM532kcXxtpyBD/p635rTk+h9GLGmm/aHdw4wTXnT02dJZKmmIDdhX xyoC8e12s0KRF3gkuPLacJZ25tqEA7s= X-Google-Smtp-Source: ABdhPJwAxj3OtJ41VMheBOj5C8yIpfrsCVp0QfqQ8/H50pXtHLPPXkRNWzCeXwBm2IZKaBNDnX+lww== X-Received: by 2002:a05:6000:1006:: with SMTP id a6mr14304158wrx.367.1605005404865; Tue, 10 Nov 2020 02:50:04 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:04 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:42 +0100 Message-Id: <20201110104851.321029-46-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 045/114] avcodec/mpc8: Avoid code duplication when 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" Up until now, VLCs that were part of an array of VLCs were often not initialized in a loop, but separately. The probable reason for this was that these VLCs differed slightly in the parameters to be used for them (i.e. the number of codes or the number of bits to be used differs), so that one would have to provide these parameters e.g. via arrays. Yet these problems have actually largely been solved by now: The length information is contained in a run-length encoded form that is the same for all VLCs and both the number of codes as well as the number of bits to use for each VLC can be easily derived from them. There is just one problem to be solved: When the underlying tables have a different number of elements, putting them into an array of arrays would be wasteful; using an array of pointers to the arrays would also be wasteful. Therefore this commit combines the tables into bigger tables. (Given that all the length tables have the same layout this applies only to the symbols tables.) Finally, the array containing the offset of the VLC's buffer in the big buffer has also been removed. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc8.c | 90 +++++---------- libavcodec/mpc8huff.h | 257 +++++++++++++++--------------------------- 2 files changed, 121 insertions(+), 226 deletions(-) diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index 4863ec0953..e945d3d200 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -86,33 +86,38 @@ static int mpc8_get_mask(GetBitContext *gb, int size, int t) return mask; } -static const uint16_t vlc_offsets[13] = { - 0, 640, 1184, 1748, 2298, 2426, 2490, 3002, 3258, 3786, 4298, 4876, 5388 -}; - -static av_cold void build_vlc(VLC *vlc, +static av_cold void build_vlc(VLC *vlc, unsigned *buf_offset, const uint8_t codes_counts[16], - const uint8_t syms[], int offset) + const uint8_t **syms, int offset) { + static VLC_TYPE vlc_buf[9296][2]; uint8_t len[MPC8_MAX_VLC_SIZE]; + const uint8_t *old_syms = *syms; unsigned num = 0; + vlc->table = &vlc_buf[*buf_offset]; + vlc->table_allocated = FF_ARRAY_ELEMS(vlc_buf) - *buf_offset; + for (int i = 16; i > 0; i--) for (unsigned tmp = num + codes_counts[i - 1]; num < tmp; num++) len[num] = i; + *syms += num; ff_init_vlc_from_lengths(vlc, FFMIN(len[0], 9), num, len, 1, - syms, 1, 1, offset, INIT_VLC_USE_NEW_STATIC); + old_syms, 1, 1, offset, INIT_VLC_USE_NEW_STATIC); + *buf_offset += vlc->table_size; } static av_cold int mpc8_decode_init(AVCodecContext * avctx) { - int i; + int i, offset = 0; MPCContext *c = avctx->priv_data; GetBitContext gb; static int vlc_initialized = 0; + const uint8_t *q_syms = mpc8_q_syms, *bands_syms = mpc8_bands_syms; + const uint8_t *res_syms = mpc8_res_syms, *scfi_syms = mpc8_scfi_syms; + const uint8_t *dscf_syms = mpc8_dscf_syms; int channels; - static VLC_TYPE codes_table[5388][2]; if(avctx->extradata_size < 2){ av_log(avctx, AV_LOG_ERROR, "Too small extradata size (%i)!\n", avctx->extradata_size); @@ -147,65 +152,24 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) if(vlc_initialized) return 0; av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n"); -#define INIT_VLC(vlc, bits, len_counts, symbols, offset, static_size) \ - do { \ - static VLC_TYPE table[static_size][2]; \ - (vlc)->table = table; \ - (vlc)->table_allocated = static_size; \ - build_vlc(vlc, len_counts, symbols, offset); \ - } while (0) - + build_vlc(&band_vlc, &offset, mpc8_bands_len_counts, &bands_syms, 0); - INIT_VLC(&band_vlc, MPC8_BANDS_BITS, - mpc8_bands_len_counts, mpc8_bands_syms, 0, 542); + build_vlc(&q1_vlc, &offset, mpc8_q1_len_counts, &q_syms, 0); + build_vlc(&q9up_vlc, &offset, mpc8_q9up_len_counts, &q_syms, 0); - INIT_VLC(&q1_vlc, MPC8_Q1_BITS, - mpc8_q1_len_counts, mpc8_q1_syms, 0, 520); - INIT_VLC(&q9up_vlc, MPC8_Q9UP_BITS, - mpc8_q9up_len_counts, mpc8_q9up_syms, 0, 524); - - INIT_VLC(&scfi_vlc[0], MPC8_SCFI0_BITS, - mpc8_scfi_len_counts[0], mpc8_scfi0_syms, 0, 1 << MPC8_SCFI0_BITS); - INIT_VLC(&scfi_vlc[1], MPC8_SCFI1_BITS, - mpc8_scfi_len_counts[1], mpc8_scfi1_syms, 0, 1 << MPC8_SCFI1_BITS); + for(i = 0; i < 2; i++){ + build_vlc(&scfi_vlc[i], &offset, mpc8_scfi_len_counts[i], &scfi_syms, 0); - INIT_VLC(&dscf_vlc[0], MPC8_DSCF0_BITS, - mpc8_dscf_len_counts[0], mpc8_dscf0_syms, 0, 560); - INIT_VLC(&dscf_vlc[1], MPC8_DSCF1_BITS, - mpc8_dscf_len_counts[1], mpc8_dscf1_syms, 0, 598); + build_vlc(&dscf_vlc[i], &offset, mpc8_dscf_len_counts[i], &dscf_syms, 0); - INIT_VLC(&q3_vlc[0], MPC8_Q3_BITS, - mpc8_q3_len_counts, mpc8_q3_syms, MPC8_Q3_OFFSET, 512); - INIT_VLC(&q3_vlc[1], MPC8_Q4_BITS, - mpc8_q4_len_counts, mpc8_q4_syms, MPC8_Q4_OFFSET, 516); + build_vlc(&res_vlc[i], &offset, mpc8_res_len_counts[i], &res_syms, 0); - for(i = 0; i < 2; i++){ - res_vlc[i].table = &codes_table[vlc_offsets[0+i]]; - res_vlc[i].table_allocated = vlc_offsets[1+i] - vlc_offsets[0+i]; - build_vlc(&res_vlc[i], - mpc8_res_len_counts[i], mpc8_res_syms[i], 0); - - q2_vlc[i].table = &codes_table[vlc_offsets[2+i]]; - q2_vlc[i].table_allocated = vlc_offsets[3+i] - vlc_offsets[2+i]; - build_vlc(&q2_vlc[i], - mpc8_q2_len_counts[i], mpc8_q2_syms[i], 0); - - quant_vlc[0][i].table = &codes_table[vlc_offsets[4+i]]; - quant_vlc[0][i].table_allocated = vlc_offsets[5+i] - vlc_offsets[4+i]; - build_vlc(&quant_vlc[0][i], - mpc8_q5_len_counts[i], mpc8_q5_syms[i], MPC8_Q5_OFFSET); - quant_vlc[1][i].table = &codes_table[vlc_offsets[6+i]]; - quant_vlc[1][i].table_allocated = vlc_offsets[7+i] - vlc_offsets[6+i]; - build_vlc(&quant_vlc[1][i], - mpc8_q6_len_counts[i], mpc8_q6_syms[i], MPC8_Q6_OFFSET); - quant_vlc[2][i].table = &codes_table[vlc_offsets[8+i]]; - quant_vlc[2][i].table_allocated = vlc_offsets[9+i] - vlc_offsets[8+i]; - build_vlc(&quant_vlc[2][i], - mpc8_q7_len_counts[i], mpc8_q7_syms[i], MPC8_Q7_OFFSET); - quant_vlc[3][i].table = &codes_table[vlc_offsets[10+i]]; - quant_vlc[3][i].table_allocated = vlc_offsets[11+i] - vlc_offsets[10+i]; - build_vlc(&quant_vlc[3][i], - mpc8_q8_len_counts[i], mpc8_q8_syms[i], MPC8_Q8_OFFSET); + build_vlc(&q2_vlc[i], &offset, mpc8_q2_len_counts[i], &q_syms, 0); + build_vlc(&q3_vlc[i], &offset, mpc8_q34_len_counts[i], + &q_syms, -48 - 16 * i); + for (int j = 0; j < 4; j++) + build_vlc(&quant_vlc[j][i], &offset, mpc8_q5_8_len_counts[i][j], + &q_syms, -((8 << j) - 1)); } vlc_initialized = 1; diff --git a/libavcodec/mpc8huff.h b/libavcodec/mpc8huff.h index 8838751fd6..51997df3ed 100644 --- a/libavcodec/mpc8huff.h +++ b/libavcodec/mpc8huff.h @@ -37,18 +37,11 @@ static const uint8_t mpc8_bands_len_counts[16] = { 1, 1, 1, 0, 2, 2, 1, 3, 2, 3, 4, 11, 2, 0, 0, 0 }; -#define MPC8_SCFI0_SIZE 4 -#define MPC8_SCFI0_BITS 3 - -static const uint8_t mpc8_scfi0_syms[MPC8_SCFI0_SIZE] = { - 0, 1, 3, 2 -}; - -#define MPC8_SCFI1_SIZE 16 -#define MPC8_SCFI1_BITS 7 - -static const uint8_t mpc8_scfi1_syms[MPC8_SCFI1_SIZE] = { - 1, 4, 0, 2, 3, 8, 12, 5, 6, 7, 9, 13, 11, 14, 10, 15 +static const uint8_t mpc8_scfi_syms[] = { + /* SCFI[0] VLC symbols - 4 entries */ + 0, 1, 3, 2, + /* SCFI[1] VLC symbols - 16 entries */ + 1, 4, 0, 2, 3, 8, 12, 5, 6, 7, 9, 13, 11, 14, 10, 15 }; static const uint8_t mpc8_scfi_len_counts[2][16] = { @@ -56,20 +49,16 @@ static const uint8_t mpc8_scfi_len_counts[2][16] = { { 0, 2, 2, 0, 5, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; -#define MPC8_DSCF0_SIZE 64 #define MPC8_DSCF0_BITS 9 +#define MPC8_DSCF1_BITS 9 -static const uint8_t mpc8_dscf0_syms[MPC8_DSCF0_SIZE] = { +static const uint8_t mpc8_dscf_syms[] = { + /* DSCF[0] VLC symbols - 64 entries */ 58, 59, 60, 61, 62, 63, 55, 56, 57, 0, 1, 2, 53, 54, 3, 4, 5, 50, 51, 52, 6, 7, 8, 9, 10, 31, 47, 48, 49, 11, 12, 13, 14, 44, 45, 46, 15, 16, 17, 18, 41, 42, 43, 19, 20, 21, 22, 40, 23, 24, 38, 39, 25, 28, 37, 26, 27, 29, 30, 32, 36, 33, 34, 35, -}; - -#define MPC8_DSCF1_SIZE 65 -#define MPC8_DSCF1_BITS 9 - -static const uint8_t mpc8_dscf1_syms[MPC8_DSCF1_SIZE] = { + /* DSCF[1] VLC symbols - 65 entries */ 0, 59, 60, 61, 62, 63, 1, 2, 56, 57, 58, 3, 4, 5, 53, 54, 55, 6, 7, 8, 9, 49, 50, 51, 52, 64, 10, 11, 12, 13, 46, 47, 48, 14, 15, 16, 17, 43, 44, 45, 18, 19, 20, 41, 42, 21, 22, 39, 40, 23, 24, 38, 25, 37, 26, 35, 36, @@ -81,16 +70,13 @@ static const uint8_t mpc8_dscf_len_counts[2][16] = { { 0, 0, 5, 3, 3, 2, 3, 4, 5, 7, 7, 9, 6, 5, 6, 0 }, }; -#define MPC8_RES_SIZE 17 #define MPC8_RES_BITS 9 -static const uint8_t mpc8_res_syms[2][MPC8_RES_SIZE] = { - { +static const uint8_t mpc8_res_syms[] = { + /* RES[0] VLC symbols - 17 entries */ 13, 14, 12, 11, 10, 9, 8, 7, 6, 15, 5, 4, 3, 2, 16, 1, 0, - }, - { + /* RES[1] VLC symbols - 17 entries */ 8, 9, 10, 11, 7, 12, 6, 13, 5, 4, 14, 3, 15, 2, 0, 1, 16, - } }; static const uint8_t mpc8_res_len_counts[2][16] = { @@ -98,21 +84,53 @@ static const uint8_t mpc8_res_len_counts[2][16] = { { 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 4, 0, 0 }, }; -#define MPC8_Q1_SIZE 19 #define MPC8_Q1_BITS 9 -static const uint8_t mpc8_q1_syms[MPC8_Q1_SIZE] = { - 17, 18, 16, 15, 14, 13, 12, 0, 11, 1, 2, 8, 9, 10, 3, 4, 5, 6, 7, -}; - static const uint8_t mpc8_q1_len_counts[16] = { 0, 0, 5, 5, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0 }; -#define MPC8_Q9UP_SIZE 256 #define MPC8_Q9UP_BITS 9 -static const uint8_t mpc8_q9up_syms[MPC8_Q9UP_SIZE] = { +static const uint8_t mpc8_q9up_len_counts[16] = { + 0, 0, 0, 0, 0, 2, 38, 134, 71, 9, 2, 0, 0, 0, 0, 0 +}; + +#define MPC8_Q2_BITS 9 + +static const uint8_t mpc8_q2_len_counts[2][16] = { + { 0, 0, 1, 6, 0, 17, 9, 24, 24, 9, 27, 4, 4, 0, 0, 0 }, + { 0, 0, 0, 1, 16, 10, 6, 48, 9, 27, 4, 4, 0, 0, 0, 0 }, +}; + +#define MPC8_Q3_BITS 9 +#define MPC8_Q4_BITS 9 + +static const uint8_t mpc8_q34_len_counts[2][16] = { + { 0, 0, 1, 6, 6, 11, 13, 8, 4, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 1, 12, 23, 14, 19, 8, 4, 0, 0, 0, 0, 0, 0 }, +}; + +static const uint8_t mpc8_q5_8_len_counts[2][4][16] = { + { /* Q5[0], Q6[0], Q7[0], Q8[0] */ + { 0, 1, 4, 2, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 2, 4, 3, 7, 2, 4, 8, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 2, 2, 4, 6, 10, 10, 12, 16, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 2, 1, 3, 8, 8, 15, 24, 42, 17, 6, 0, 0, 0, 0 }, + }, + { /* Q5[1], Q6[1], Q7[1], Q8[1] */ + { 0, 0, 5, 4, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 11, 6, 4, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 20, 15, 10, 14, 4, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 26, 55, 38, 8, 0, 0, 0, 0, 0, 0, 0 }, + } +}; + +static const uint8_t mpc8_q_syms[] = { + /* Q1 VLC symbols - 19 entries */ + 17, 18, 16, 15, 14, 13, 12, 0, 11, 1, 2, 8, 9, 10, 3, + 4, 5, 6, 7, + /* Q9UP VLC symbols - 256 entries */ 254, 255, 0, 1, 2, 3, 4, 250, 251, 252, 253, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, @@ -131,17 +149,7 @@ static const uint8_t mpc8_q9up_syms[MPC8_Q9UP_SIZE] = { 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 127, 128, -}; - -static const uint8_t mpc8_q9up_len_counts[16] = { - 0, 0, 0, 0, 0, 2, 38, 134, 71, 9, 2, 0, 0, 0, 0, 0 -}; - -#define MPC8_Q2_SIZE 125 -#define MPC8_Q2_BITS 9 - -static const uint8_t mpc8_q2_syms[2][MPC8_Q2_SIZE] = { -{ + /* Q2[0] VLC symbols - 125 entries */ 4, 24, 100, 120, 0, 20, 104, 124, 1, 3, 5, 9, 10, 14, 15, 19, 21, 23, 25, 29, 45, 49, 75, 79, 95, 99, 101, 103, 105, 109, 114, 115, 119, 121, 123, 2, 22, 50, 54, 70, 74, 102, 110, 122, 6, @@ -151,8 +159,34 @@ static const uint8_t mpc8_q2_syms[2][MPC8_Q2_SIZE] = { 113, 117, 12, 33, 43, 52, 60, 64, 72, 91, 112, 31, 32, 36, 38, 41, 42, 56, 58, 66, 68, 81, 82, 83, 86, 88, 92, 93, 37, 57, 61, 63, 67, 87, 62, -}, -{ + /* Q3 VLC symbols - 49 entries */ + 13, 3, 109, 99, 14, 2, 29, 19, 93, 83, 110, 98, 15, 0, 1, + 18, 45, 35, 61, 51, 77, 67, 111, 96, 97, 30, 31, 17, 46, 34, + 78, 66, 94, 95, 81, 82, 16, 33, 62, 50, 79, 80, 47, 32, 63, + 49, 64, 65, 48, + /* Q5[0] VLC symbols - 15 entries */ + 0, 1, 13, 14, 2, 12, 3, 11, 4, 10, 5, 6, 8, 9, 7, + /* Q6[0] VLC symbols - 31 entries */ + 0, 1, 2, 3, 27, 28, 29, 30, 4, 5, 25, 26, 6, 24, 7, + 8, 9, 20, 21, 22, 23, 10, 11, 19, 12, 13, 17, 18, 14, 16, + 15, + /* Q7[0] VLC symbols - 63 entries */ + 0, 1, 2, 5, 6, 7, 8, 9, 53, 54, 55, 56, 57, 60, 61, + 62, 3, 4, 10, 11, 12, 13, 49, 50, 51, 52, 58, 59, 14, 15, + 16, 17, 18, 43, 45, 46, 47, 48, 19, 20, 21, 22, 23, 39, 40, + 41, 42, 44, 24, 25, 26, 36, 37, 38, 27, 28, 34, 35, 29, 33, + 30, 32, 31, + /* Q8[0] VLC symbols - 127 entries */ + 11, 12, 111, 113, 114, 115, 0, 1, 13, 14, 15, 16, 17, 18, 19, + 21, 104, 105, 107, 108, 109, 110, 112, 2, 3, 4, 5, 6, 8, 10, + 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 92, + 93, 95, 96, 97, 98, 99, 100, 101, 102, 103, 106, 116, 117, 120, 121, + 122, 123, 124, 125, 126, 7, 9, 30, 36, 37, 38, 39, 40, 41, 42, + 43, 45, 83, 84, 85, 86, 87, 88, 89, 90, 91, 94, 118, 119, 44, + 46, 47, 48, 49, 50, 51, 75, 76, 77, 78, 79, 80, 81, 82, 52, + 53, 54, 55, 71, 72, 73, 74, 56, 57, 58, 59, 67, 68, 69, 70, + 60, 65, 66, 61, 62, 64, 63, + /* Q2[1] VLC symbols - 125 entries */ 4, 24, 100, 120, 0, 20, 104, 124, 1, 3, 5, 9, 10, 15, 19, 21, 23, 25, 29, 45, 49, 75, 79, 95, 99, 101, 102, 103, 105, 109, 114, 115, 119, 121, 123, 2, 14, 22, 50, 54, 70, 74, 110, 122, 6, @@ -162,123 +196,26 @@ static const uint8_t mpc8_q2_syms[2][MPC8_Q2_SIZE] = { 117, 118, 12, 52, 60, 64, 72, 112, 31, 33, 36, 41, 43, 81, 83, 88, 91, 93, 32, 37, 38, 42, 56, 57, 58, 61, 63, 66, 67, 68, 82, 86, 87, 92, 62, -} -}; - -static const uint8_t mpc8_q2_len_counts[2][16] = { - { 0, 0, 1, 6, 0, 17, 9, 24, 24, 9, 27, 4, 4, 0, 0, 0 }, - { 0, 0, 0, 1, 16, 10, 6, 48, 9, 27, 4, 4, 0, 0, 0, 0 }, -}; - -#define MPC8_Q3_SIZE 49 -#define MPC8_Q3_BITS 9 -#define MPC8_Q3_OFFSET -48 - -static const uint8_t mpc8_q3_len_counts[16] = { - 0, 0, 1, 6, 6, 11, 13, 8, 4, 0, 0, 0, 0, 0, 0, 0 -}; -static const uint8_t mpc8_q3_syms[MPC8_Q3_SIZE] = { - 13, 3, 109, 99, 14, 2, 29, 19, 93, 83, 110, 98, 15, 0, 1, - 18, 45, 35, 61, 51, 77, 67, 111, 96, 97, 30, 31, 17, 46, 34, - 78, 66, 94, 95, 81, 82, 16, 33, 62, 50, 79, 80, 47, 32, 63, - 49, 64, 65, 48, -}; - -#define MPC8_Q4_SIZE 81 -#define MPC8_Q4_BITS 9 -#define MPC8_Q4_OFFSET -64 - -static const uint8_t mpc8_q4_len_counts[16] = { - 0, 0, 0, 1, 12, 23, 14, 19, 8, 4, 0, 0, 0, 0, 0, 0 -}; -static const uint8_t mpc8_q4_syms[MPC8_Q4_SIZE] = { + /* Q4 VLC symbols - 81 entries */ 12, 4, 140, 132, 13, 3, 28, 20, 124, 116, 141, 131, 14, 1, 2, 29, 19, 44, 36, 60, 52, 92, 84, 108, 100, 125, 115, 142, 143, 129, 130, 15, 0, 30, 18, 45, 35, 76, 68, 109, 99, 126, 127, 114, 128, 31, 16, 17, 46, 47, 33, 34, 61, 62, 50, 51, 77, 67, 93, 94, 82, 83, 110, 111, 97, 98, 112, 113, 32, 63, 48, 49, 78, 79, 65, 66, 95, 80, 81, 96, 64, -}; - -#define MPC8_Q5_SIZE 15 -#define MPC8_Q5_BITS 7 -#define MPC8_Q5_OFFSET -7 - -static const uint8_t mpc8_q5_syms[2][MPC8_Q5_SIZE] = { -{ - 0, 1, 13, 14, 2, 12, 3, 11, 4, 10, 5, 6, 8, 9, 7, -}, -{ - 0, 1, 13, 14, 2, 12, 3, 4, 10, 11, 5, 6, 7, 8, 9, -} -}; - -static const uint8_t mpc8_q5_len_counts[2][16] = { - { 0, 1, 4, 2, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 5, 4, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, -}; - -#define MPC8_Q6_SIZE 31 -#define MPC8_Q6_BITS 9 -#define MPC8_Q6_OFFSET -15 - -static const uint8_t mpc8_q6_syms[2][MPC8_Q6_SIZE] = { -{ - 0, 1, 2, 3, 27, 28, 29, 30, 4, 5, 25, 26, 6, 24, 7, 8, 9, 20, 21, - 22, 23, 10, 11, 19, 12, 13, 17, 18, 14, 16, 15, -}, -{ - 0, 1, 29, 30, 2, 3, 4, 26, 27, 28, 5, 6, 24, 25, 7, 8, 9, 21, 22, - 23, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -} -}; - -static const uint8_t mpc8_q6_len_counts[2][16] = { - { 0, 1, 2, 4, 3, 7, 2, 4, 8, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 11, 6, 4, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0 }, -}; - -#define MPC8_Q7_SIZE 63 -#define MPC8_Q7_BITS 9 -#define MPC8_Q7_OFFSET -31 - -static const uint8_t mpc8_q7_syms[2][MPC8_Q7_SIZE] = { -{ - 0, 1, 2, 5, 6, 7, 8, 9, 53, 54, 55, 56, 57, 60, 61, 62, 3, 4, 10, - 11, 12, 13, 49, 50, 51, 52, 58, 59, 14, 15, 16, 17, 18, 43, 45, 46, 47, 48, - 19, 20, 21, 22, 23, 39, 40, 41, 42, 44, 24, 25, 26, 36, 37, 38, 27, 28, 34, - 35, 29, 33, 30, 32, 31, -}, -{ - 0, 1, 61, 62, 2, 3, 4, 5, 6, 7, 8, 54, 55, 56, 57, 58, 59, 60, 9, - 10, 11, 12, 13, 49, 50, 51, 52, 53, 14, 15, 16, 17, 18, 19, 20, 21, 42, 43, - 44, 45, 46, 47, 48, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, -} -}; - -static const uint8_t mpc8_q7_len_counts[2][MPC8_Q7_SIZE] = { - { 0, 1, 2, 2, 4, 6, 10, 10, 12, 16, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 20, 15, 10, 14, 4, 0, 0, 0, 0, 0, 0, 0 }, -}; - -#define MPC8_Q8_SIZE 127 -#define MPC8_Q8_BITS 9 -#define MPC8_Q8_OFFSET -63 - -static const uint8_t mpc8_q8_syms[2][MPC8_Q8_SIZE] = { -{ - 11, 12, 111, 113, 114, 115, 0, 1, 13, 14, 15, 16, 17, 18, 19, - 21, 104, 105, 107, 108, 109, 110, 112, 2, 3, 4, 5, 6, 8, 10, - 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 92, - 93, 95, 96, 97, 98, 99, 100, 101, 102, 103, 106, 116, 117, 120, 121, - 122, 123, 124, 125, 126, 7, 9, 30, 36, 37, 38, 39, 40, 41, 42, - 43, 45, 83, 84, 85, 86, 87, 88, 89, 90, 91, 94, 118, 119, 44, - 46, 47, 48, 49, 50, 51, 75, 76, 77, 78, 79, 80, 81, 82, 52, - 53, 54, 55, 71, 72, 73, 74, 56, 57, 58, 59, 67, 68, 69, 70, - 60, 65, 66, 61, 62, 64, 63, -}, -{ + /* Q5[1] VLC symbols - 15 entries */ + 0, 1, 13, 14, 2, 12, 3, 4, 10, 11, 5, 6, 7, 8, 9, + /* Q6[1] VLC symbols - 31 entries */ + 0, 1, 29, 30, 2, 3, 4, 26, 27, 28, 5, 6, 24, 25, 7, + 8, 9, 21, 22, 23, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, + /* Q7[1] VLC symbols - 63 entries */ + 0, 1, 61, 62, 2, 3, 4, 5, 6, 7, 8, 54, 55, 56, 57, + 58, 59, 60, 9, 10, 11, 12, 13, 49, 50, 51, 52, 53, 14, 15, + 16, 17, 18, 19, 20, 21, 42, 43, 44, 45, 46, 47, 48, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, + /* Q8[1] VLC symbols - 127 entries */ 0, 1, 2, 3, 123, 124, 125, 126, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, @@ -288,12 +225,6 @@ static const uint8_t mpc8_q8_syms[2][MPC8_Q8_SIZE] = { 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, -} -}; - -static const uint8_t mpc8_q8_len_counts[2][16] = { - { 0, 1, 2, 1, 3, 8, 8, 15, 24, 42, 17, 6, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 26, 55, 38, 8, 0, 0, 0, 0, 0, 0, 0 }, }; #endif /* AVCODEC_MPC8HUFF_H */ From patchwork Tue Nov 10 10:47:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23527 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 16F2244AA20 for ; Tue, 10 Nov 2020 13:00:42 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 646C168BED4; Tue, 10 Nov 2020 12:50:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BCA4068BE8F for ; Tue, 10 Nov 2020 12:50:06 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id l1so7738848wrb.9 for ; Tue, 10 Nov 2020 02:50:06 -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=XXbhNYxbk0WU51B5AzuGBs9lWXTHK76ROC1gn4Fe5U8=; b=Ne4Arj/7r2Y18ZzWdI4ARERiMyEku6IG46Nmm/TEZ8/7P9ZtakAFYPhbD8GbfsenO+ Uqfe/dosscJfAAbeZ8wD70oYD0m0bU55fw4VeYzbJ0YIPUQbaqpQ5mOmkNcTTP9GTKu0 dRLtZccChwZPOzqiQboZtEReb+n5KnLRwaGNmdK3QrpedqQpc/M3g6JqrgYcte3Na6k+ Gahfb6JKGwE994oZTAvpg3v0e8CuS9q+lTrEwWsYYGhwzLlByRi+pWOM0VARy43kKzbb R6jMdUx6sWrM9cJ/ErOejjiFV66ywabeH1AeZO5Dr0IIaqGvf1oGmwDaz37a03mB2v0o qPhg== 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=XXbhNYxbk0WU51B5AzuGBs9lWXTHK76ROC1gn4Fe5U8=; b=d7X0mdsclISEA50LPg83l/U7tCMlxZDZcf7p50e8/PwOxLQvVhBqcUGw1x/XzcK4W6 GmWijl721rSpQox2lFTOihMb8n0GwjEpuysJNq8+/gY6Ks7+xP2Sqyd+hFmToD7QAc+L aB+7NYX2UV11K5V3zQxcVKiFgSC816hbDPvc5zXoUZ7me8Azr0YoqeOXack2SaOSQd8F W1DCO17Wlq22fKPInd7sDT6zXHHeDZkw0DpSL+XFP9KmDE/VGAuF415lhvy8l6Nk9aPd JVMFCYfGOQhqhXaUT1bDhOABedSAJUOKd92FuFy9jmqhKihJo5sxWqvTO7YcdnJwcY+M 4KCg== X-Gm-Message-State: AOAM530LS0VsMAqXOikuLM4QGPmcwwdlm35XU9ZKFjKLe3v44nR4a7sB k2+4dZwuZIv6XuGgNQ8ck1owOWIOSsE= X-Google-Smtp-Source: ABdhPJxuJXUBVNmsoIVFqJa+qw+qI0hICf+cB6dYadKKBbegq30IuoE94eZc5GUE87DlFTO+yjnW7w== X-Received: by 2002:adf:fc84:: with SMTP id g4mr15352386wrr.202.1605005405828; Tue, 10 Nov 2020 02:50:05 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:05 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:43 +0100 Message-Id: <20201110104851.321029-47-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 046/114] avcodec/mobiclip: Avoid redundant codes table to initialize 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" If both codes, lengths and symbols tables are ordered so that the codes are sorted from left to right in the tree, the codes can be easily derived from the lengths and therefore become redundant. This is exploited in this commit to remove the codes tables for the mobiclip decoder; notice that tables for the run-length VLC were already ordered correctly. Signed-off-by: Andreas Rheinhardt --- libavcodec/mobiclip.c | 203 +++++++++++++++--------------------------- 1 file changed, 74 insertions(+), 129 deletions(-) diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index 42d33cf6a5..cb17832898 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -128,19 +128,6 @@ static const uint8_t bits0[] = { 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, 2, 3, 4, 4, }; -static const uint8_t codes0[] = { - 0x0, 0x4, 0x5, 0x6, 0x7, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, - 0xB, 0xC, 0xD, 0xE, 0xF, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, - 0x26, 0x27, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x3, 0x20, - 0x21, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, - 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, - 0x24, 0x25, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, - 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x10, 0x11, 0x12, 0x13, 0x14, - 0x15, 0x16, 0x17, 0xC, 0xD, 0xE, 0xF, 0x10, 0x11, 0x12, - 0x13, 0x14, 0x15, 0xB, 0xC, 0xD, 0x7, 0x2, 0x6, 0xE, 0xF, -}; - static const uint16_t syms0[] = { 0x0, 0x822, 0x803, 0xB, 0xA, 0xB81, 0xB61, 0xB41, 0xB21, 0x122, 0x102, 0xE2, 0xC2, 0xA2, 0x63, 0x43, 0x24, 0xC, 0x25, 0x2E1, 0x301, @@ -172,122 +159,82 @@ static const uint8_t mv_len[16] = static const uint8_t mv_bits[16][10] = { - { 1, 3, 3, 4, 4, 5, 5, 5, 6, 6 }, - { 2, 2, 3, 3, 3, 4, 5, 5 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, - { 1, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 3, 4, 5, 5 }, - { 2, 3, 3, 3, 3, 3, 4, 4 }, + { 3, 4, 5, 5, 3, 5, 6, 6, 4, 1 }, + { 2, 3, 4, 5, 5, 2, 3, 3 }, + { 2, 4, 4, 3, 3, 4, 4, 2 }, + { 1, 4, 4, 3, 4, 4, 3 }, + { 3, 3, 2, 4, 5, 5, 3, 2 }, + { 3, 4, 4, 3, 3, 3, 3, 2 }, { 1, 3, 3, 4, 4, 4, 5, 5 }, - { 1, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 2, 4, 4, 3, 3, 4, 4, 2 }, { 1, 3, 3, 4, 4, 4, 5, 5 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 3, 4, 4 }, - { 1, 3, 3, 4, 4, 4, 4 }, - { 1, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 3, 4, 4 }, - { 2, 2, 3, 3, 3, 3 }, -}; - -static const uint8_t mv_codes[16][10] = -{ - { 1, 0, 2, 2, 7, 6, 7, 12, 26, 27 }, - { 0, 2, 2, 6, 7, 6, 14, 15 }, - { 0, 3, 3, 4, 4, 5, 10, 11 }, - { 0, 5, 7, 8, 9, 12, 13 }, - { 1, 3, 0, 1, 5, 8, 18, 19 }, - { 3, 0, 2, 3, 4, 5, 2, 3 }, - { 0, 4, 5, 12, 13, 14, 30, 31 }, - { 0, 5, 6, 8, 9, 14, 15 }, - { 0, 3, 3, 4, 4, 5, 10, 11 }, - { 0, 4, 5, 12, 13, 14, 30, 31 }, - { 0, 3, 2, 5, 6, 7, 8, 9 }, - { 0, 3, 2, 3, 5, 8, 9 }, - { 0, 5, 6, 8, 9, 14, 15 }, - { 0, 5, 6, 8, 9, 14, 15 }, - { 0, 3, 2, 3, 5, 8, 9 }, - { 0, 3, 2, 3, 4, 5 }, + { 2, 3, 4, 4, 4, 4, 3, 2 }, + { 2, 3, 3, 4, 4, 3, 2 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 2, 3, 3, 4, 4, 3, 2 }, + { 2, 3, 3, 3, 3, 2 }, }; static const uint8_t mv_syms[16][10] = { - { 0, 8, 1, 2, 9, 3, 6, 7, 5, 4 }, - { 9, 1, 2, 8, 0, 3, 5, 4 }, - { 0, 1, 2, 9, 5, 4, 3, 8 }, - { 1, 2, 0, 5, 4, 8, 3 }, - { 8, 1, 2, 9, 0, 3, 5, 4 }, - { 1, 3, 2, 9, 8, 0, 5, 4 }, + { 8, 2, 3, 6, 1, 7, 5, 4, 9, 0 }, + { 9, 2, 3, 5, 4, 1, 8, 0 }, + { 0, 5, 4, 2, 9, 3, 8, 1 }, + { 1, 5, 4, 2, 8, 3, 0 }, + { 2, 9, 8, 3, 5, 4, 0, 1 }, + { 3, 5, 4, 2, 9, 8, 0, 1 }, { 1, 2, 0, 9, 8, 3, 5, 4 }, - { 1, 2, 0, 8, 5, 4, 3 }, - { 0, 1, 2, 8, 5, 4, 3, 9 }, + { 1, 8, 5, 2, 0, 4, 3 }, + { 0, 5, 4, 2, 8, 3, 9, 1 }, { 1, 2, 0, 9, 8, 3, 5, 4 }, - { 0, 1, 3, 2, 9, 8, 5, 4 }, - { 0, 1, 4, 3, 2, 8, 5 }, - { 1, 2, 0, 5, 4, 9, 3 }, - { 1, 2, 0, 9, 5, 4, 3 }, - { 0, 1, 5, 3, 2, 9, 4 }, - { 0, 1, 4, 5, 3, 2 }, + { 0, 3, 9, 8, 5, 4, 2, 1 }, + { 0, 4, 3, 8, 5, 2, 1 }, + { 1, 5, 4, 2, 0, 9, 3 }, + { 1, 9, 5, 2, 0, 4, 3 }, + { 0, 5, 3, 9, 4, 2, 1 }, + { 0, 4, 5, 3, 2, 1 }, }; static const uint8_t mv_bits_mods[16][10] = { - { 2, 2, 3, 3, 4, 4, 5, 5, 5, 5 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, - { 1, 3, 3, 3, 4, 5, 5 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 2, 3, 4, 5, 5 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 3, 4, 5, 5 }, - { 2, 2, 3, 3, 3, 4, 4 }, - { 1, 3, 3, 4, 4, 4, 4 }, - { 2, 2, 3, 3, 3, 4, 4 }, - { 2, 2, 3, 3, 3, 4, 4 }, - { 2, 2, 3, 3, 3, 3 }, -}; - -static const uint8_t mv_codes_mods[16][10] = -{ - { 0, 3, 2, 3, 9, 10, 16, 17, 22, 23 }, - { 0, 3, 2, 4, 6, 7, 10, 11 }, - { 1, 3, 0, 5, 2, 3, 8, 9 }, - { 0, 4, 6, 7, 10, 22, 23 }, - { 0, 3, 3, 4, 4, 5, 10, 11 }, - { 0, 3, 2, 5, 6, 7, 8, 9 }, - { 0, 3, 2, 5, 6, 7, 8, 9 }, - { 0, 1, 3, 4, 10, 22, 23 }, - { 0, 3, 2, 4, 6, 7, 10, 11 }, - { 0, 3, 3, 5, 4, 5, 8, 9 }, - { 0, 3, 2, 3, 5, 9, 16, 17 }, - { 0, 3, 2, 4, 5, 6, 7 }, - { 0, 5, 6, 8, 9, 14, 15 }, - { 0, 3, 2, 4, 5, 6, 7 }, - { 0, 3, 2, 4, 5, 6, 7 }, - { 1, 2, 0, 1, 6, 7 }, + { 2, 3, 3, 5, 5, 4, 4, 5, 5, 2 }, + { 2, 3, 4, 4, 3, 4, 4, 2 }, + { 3, 4, 4, 2, 4, 4, 3, 2 }, + { 1, 3, 4, 5, 5, 3, 3 }, + { 2, 4, 4, 3, 3, 4, 4, 2 }, + { 2, 3, 4, 4, 4, 4, 3, 2 }, + { 2, 3, 4, 4, 4, 4, 3, 2 }, + { 2, 2, 3, 4, 5, 5, 2 }, + { 2, 3, 4, 4, 3, 4, 4, 2 }, + { 2, 4, 4, 3, 4, 4, 3, 2 }, + { 2, 3, 3, 5, 5, 4, 3, 2 }, + { 2, 3, 4, 4, 3, 3, 2 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 2, 3, 4, 4, 3, 3, 2 }, + { 2, 3, 4, 4, 3, 3, 2 }, + { 3, 3, 2, 2, 3, 3 }, }; static const uint8_t mv_syms_mods[16][10] = { - { 1, 0, 8, 9, 2, 7, 4, 3, 5, 6 }, - { 0, 1, 9, 2, 5, 4, 3, 8 }, - { 0, 1, 3, 2, 9, 5, 4, 8 }, - { 1, 3, 2, 0, 4, 8, 5 }, - { 0, 1, 8, 2, 5, 4, 3, 9 }, - { 0, 1, 3, 2, 5, 9, 4, 8 }, - { 0, 1, 3, 2, 9, 5, 8, 4 }, - { 0, 2, 1, 3, 4, 8, 5 }, - { 0, 1, 3, 2, 8, 4, 5, 9 }, - { 2, 1, 3, 0, 8, 9, 5, 4 }, - { 0, 1, 4, 3, 2, 5, 8, 9 }, - { 0, 1, 4, 3, 2, 8, 5 }, - { 1, 2, 0, 9, 4, 5, 3 }, - { 2, 1, 4, 3, 0, 9, 5 }, - { 0, 1, 4, 3, 2, 9, 5 }, - { 1, 0, 5, 4, 3, 2 }, + { 1, 8, 9, 4, 3, 2, 7, 5, 6, 0 }, + { 0, 9, 5, 4, 2, 3, 8, 1 }, + { 3, 9, 5, 0, 4, 8, 2, 1 }, + { 1, 3, 4, 8, 5, 2, 0 }, + { 0, 5, 4, 8, 2, 3, 9, 1 }, + { 0, 3, 5, 9, 4, 8, 2, 1 }, + { 0, 3, 9, 5, 8, 4, 2, 1 }, + { 0, 2, 3, 4, 8, 5, 1 }, + { 0, 3, 8, 4, 2, 5, 9, 1 }, + { 2, 8, 9, 3, 5, 4, 0, 1 }, + { 0, 4, 3, 8, 9, 5, 2, 1 }, + { 0, 4, 8, 5, 3, 2, 1 }, + { 1, 9, 4, 2, 0, 5, 3 }, + { 2, 4, 9, 5, 3, 0, 1 }, + { 0, 4, 9, 5, 3, 2, 1 }, + { 5, 4, 1, 0, 3, 2 }, }; typedef struct BlockXY { @@ -351,30 +298,28 @@ static av_cold int mobiclip_init(AVCodecContext *avctx) return AVERROR(ENOMEM); } - INIT_VLC_SPARSE_STATIC(&rl_vlc[0], MOBI_RL_VLC_BITS, 104, - bits0, sizeof(*bits0), sizeof(*bits0), - codes0, sizeof(*codes0), sizeof(*codes0), + INIT_VLC_STATIC_FROM_LENGTHS(&rl_vlc[0], MOBI_RL_VLC_BITS, 104, + bits0, sizeof(*bits0), syms0, sizeof(*syms0), sizeof(*syms0), - 1 << MOBI_RL_VLC_BITS); - INIT_VLC_SPARSE_STATIC(&rl_vlc[1], MOBI_RL_VLC_BITS, 104, - bits0, sizeof(*bits0), sizeof(*bits0), - codes0, sizeof(*codes0), sizeof(*codes0), + 0, 0, 1 << MOBI_RL_VLC_BITS); + INIT_VLC_STATIC_FROM_LENGTHS(&rl_vlc[1], MOBI_RL_VLC_BITS, 104, + bits0, sizeof(*bits0), syms1, sizeof(*syms1), sizeof(*syms1), - 1 << MOBI_RL_VLC_BITS); + 0, 0, 1 << MOBI_RL_VLC_BITS); for (int j = 0; j < 16; j++) { static VLC_TYPE vlc_buf[2 * 16 << MOBI_MV_VLC_BITS][2]; mv_vlc[0][j].table = &vlc_buf[2 * j << MOBI_MV_VLC_BITS]; mv_vlc[0][j].table_allocated = 1 << MOBI_MV_VLC_BITS; - ff_init_vlc_sparse(&mv_vlc[0][j], MOBI_MV_VLC_BITS, mv_len[j], - mv_bits_mods[j], sizeof(*mv_bits_mods[j]), sizeof(*mv_bits_mods[j]), - mv_codes_mods[j], sizeof(*mv_codes_mods[j]), sizeof(*mv_codes_mods[j]), - mv_syms_mods[j], sizeof(*mv_syms_mods[j]), sizeof(*mv_syms_mods[j]), INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&mv_vlc[0][j], MOBI_MV_VLC_BITS, mv_len[j], + mv_bits_mods[j], sizeof(*mv_bits_mods[j]), + mv_syms_mods[j], sizeof(*mv_syms_mods[j]), + sizeof(*mv_syms_mods[j]), 0, INIT_VLC_USE_NEW_STATIC); mv_vlc[1][j].table = &vlc_buf[(2 * j + 1) << MOBI_MV_VLC_BITS]; mv_vlc[1][j].table_allocated = 1 << MOBI_MV_VLC_BITS; - ff_init_vlc_sparse(&mv_vlc[1][j], MOBI_MV_VLC_BITS, mv_len[j], - mv_bits[j], sizeof(*mv_bits[j]), sizeof(*mv_bits[j]), - mv_codes[j], sizeof(*mv_codes[j]), sizeof(*mv_codes[j]), - mv_syms[j], sizeof(*mv_syms[j]), sizeof(*mv_syms[j]), INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&mv_vlc[1][j], MOBI_MV_VLC_BITS, mv_len[j], + mv_bits[j], sizeof(*mv_bits[j]), + mv_syms[j], sizeof(*mv_syms[j]), sizeof(*mv_syms[j]), + 0, INIT_VLC_USE_NEW_STATIC); } return 0; From patchwork Tue Nov 10 10:47:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23530 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 295BA44ACE4 for ; Tue, 10 Nov 2020 13:01:24 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E420E68BEE0; Tue, 10 Nov 2020 12:50:24 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A515368BE9B for ; Tue, 10 Nov 2020 12:50:07 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id p22so2522946wmg.3 for ; Tue, 10 Nov 2020 02:50:07 -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=tq1sJURKdpieT7qInyva0FMU7AccjQnT6NwSAROpUg8=; b=L8gu9YRMrin38gW6GYLfPG4wR/gR4cVRrXzXyTc6DkwdkymaR6p+QA7U2OW6TCZKju TiJzCfcfH4uUWvvYGeZVRmV6b1l13hOsdfzvJm8OZwzwlPXSOTWjcqbMGevp+jDG7wbG doe4wB4sJSOGUbv8dKMrw0OhJw9i5OZzg85bpOo585vwQ7gDFXS6BVS3I18h/bYwMVc/ jIPbn5JnnFwpPOmu/CpLeNJvqN7aT89iJuJL9xYhmZrBV8m+I7tIOsVIyDUm4f7f+k73 IZBj887RJd+yYJ1Rs4ea0ScfbvrHWj1dShrknmTXLJreIVkyJmJAXLPjf3V5W/vjA9DJ qAtQ== 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=tq1sJURKdpieT7qInyva0FMU7AccjQnT6NwSAROpUg8=; b=D3RkFGJvk0CDlB9vXjO4ZuXM7VSbyDv81YJhaapcAEdOyg2R0WI07Lm4fAlgBdEiOc 9uYARt5T99BK7luLE8GBkBvSyAvf4uPoIL5+Twi+PIiAUnYrZifTaoKx0YK8oJ6U8WVA xlxPZ++JitZtE1IgNkVM69VnZeKpZq3Wb4q8+zyJnmdI3LR9hqL2qNeVTEqvp6I71sYR 6htF8BVzejVgpDvReAAVgIFbWwNA8kwG+dc8ZJDLtVwBn7VQhqQkepNxztB0KIaE/z1H QNrZ0QpvqTL1E+ws+ooRmpqoMIiVbaNzMY+kdkl/SFMMJxlYj3NEmfDjVkkZ+/ZO7dFj 4TGw== X-Gm-Message-State: AOAM533nlWlDztjtBiymwU1SCnhHSjBckO3Wr2eOvfmD/W61NZLq0L9I B4KG7qv4g1+xRHixNcDdtjeELWBIQKM= X-Google-Smtp-Source: ABdhPJyvMH+jR+n3QqKDc9sdlUnpcPem5DIijRnYik0rsa5HMvZ7F7SBk/fd4xKJc/8ILX36Q3b51g== X-Received: by 2002:a1c:9e93:: with SMTP id h141mr3915683wme.153.1605005406822; Tue, 10 Nov 2020 02:50:06 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:06 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:44 +0100 Message-Id: <20201110104851.321029-48-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 047/114] avcodec/mobiclip: Avoid code duplication when 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/mobiclip.c | 106 ++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 55 deletions(-) diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index cb17832898..e4a2594954 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -157,48 +157,9 @@ static const uint8_t mv_len[16] = 10, 8, 8, 7, 8, 8, 8, 7, 8, 8, 8, 7, 7, 7, 7, 6, }; -static const uint8_t mv_bits[16][10] = -{ - { 3, 4, 5, 5, 3, 5, 6, 6, 4, 1 }, - { 2, 3, 4, 5, 5, 2, 3, 3 }, - { 2, 4, 4, 3, 3, 4, 4, 2 }, - { 1, 4, 4, 3, 4, 4, 3 }, - { 3, 3, 2, 4, 5, 5, 3, 2 }, - { 3, 4, 4, 3, 3, 3, 3, 2 }, - { 1, 3, 3, 4, 4, 4, 5, 5 }, - { 1, 4, 4, 3, 3, 4, 4 }, - { 2, 4, 4, 3, 3, 4, 4, 2 }, - { 1, 3, 3, 4, 4, 4, 5, 5 }, - { 2, 3, 4, 4, 4, 4, 3, 2 }, - { 2, 3, 3, 4, 4, 3, 2 }, - { 1, 4, 4, 3, 3, 4, 4 }, - { 1, 4, 4, 3, 3, 4, 4 }, - { 2, 3, 3, 4, 4, 3, 2 }, - { 2, 3, 3, 3, 3, 2 }, -}; - -static const uint8_t mv_syms[16][10] = -{ - { 8, 2, 3, 6, 1, 7, 5, 4, 9, 0 }, - { 9, 2, 3, 5, 4, 1, 8, 0 }, - { 0, 5, 4, 2, 9, 3, 8, 1 }, - { 1, 5, 4, 2, 8, 3, 0 }, - { 2, 9, 8, 3, 5, 4, 0, 1 }, - { 3, 5, 4, 2, 9, 8, 0, 1 }, - { 1, 2, 0, 9, 8, 3, 5, 4 }, - { 1, 8, 5, 2, 0, 4, 3 }, - { 0, 5, 4, 2, 8, 3, 9, 1 }, - { 1, 2, 0, 9, 8, 3, 5, 4 }, - { 0, 3, 9, 8, 5, 4, 2, 1 }, - { 0, 4, 3, 8, 5, 2, 1 }, - { 1, 5, 4, 2, 0, 9, 3 }, - { 1, 9, 5, 2, 0, 4, 3 }, - { 0, 5, 3, 9, 4, 2, 1 }, - { 0, 4, 5, 3, 2, 1 }, -}; - -static const uint8_t mv_bits_mods[16][10] = +static const uint8_t mv_bits[2][16][10] = { + { { 2, 3, 3, 5, 5, 4, 4, 5, 5, 2 }, { 2, 3, 4, 4, 3, 4, 4, 2 }, { 3, 4, 4, 2, 4, 4, 3, 2 }, @@ -215,10 +176,30 @@ static const uint8_t mv_bits_mods[16][10] = { 2, 3, 4, 4, 3, 3, 2 }, { 2, 3, 4, 4, 3, 3, 2 }, { 3, 3, 2, 2, 3, 3 }, + }, + { + { 3, 4, 5, 5, 3, 5, 6, 6, 4, 1 }, + { 2, 3, 4, 5, 5, 2, 3, 3 }, + { 2, 4, 4, 3, 3, 4, 4, 2 }, + { 1, 4, 4, 3, 4, 4, 3 }, + { 3, 3, 2, 4, 5, 5, 3, 2 }, + { 3, 4, 4, 3, 3, 3, 3, 2 }, + { 1, 3, 3, 4, 4, 4, 5, 5 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 2, 4, 4, 3, 3, 4, 4, 2 }, + { 1, 3, 3, 4, 4, 4, 5, 5 }, + { 2, 3, 4, 4, 4, 4, 3, 2 }, + { 2, 3, 3, 4, 4, 3, 2 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 2, 3, 3, 4, 4, 3, 2 }, + { 2, 3, 3, 3, 3, 2 }, + } }; -static const uint8_t mv_syms_mods[16][10] = +static const uint8_t mv_syms[2][16][10] = { + { { 1, 8, 9, 4, 3, 2, 7, 5, 6, 0 }, { 0, 9, 5, 4, 2, 3, 8, 1 }, { 3, 9, 5, 0, 4, 8, 2, 1 }, @@ -235,6 +216,25 @@ static const uint8_t mv_syms_mods[16][10] = { 2, 4, 9, 5, 3, 0, 1 }, { 0, 4, 9, 5, 3, 2, 1 }, { 5, 4, 1, 0, 3, 2 }, + }, + { + { 8, 2, 3, 6, 1, 7, 5, 4, 9, 0 }, + { 9, 2, 3, 5, 4, 1, 8, 0 }, + { 0, 5, 4, 2, 9, 3, 8, 1 }, + { 1, 5, 4, 2, 8, 3, 0 }, + { 2, 9, 8, 3, 5, 4, 0, 1 }, + { 3, 5, 4, 2, 9, 8, 0, 1 }, + { 1, 2, 0, 9, 8, 3, 5, 4 }, + { 1, 8, 5, 2, 0, 4, 3 }, + { 0, 5, 4, 2, 8, 3, 9, 1 }, + { 1, 2, 0, 9, 8, 3, 5, 4 }, + { 0, 3, 9, 8, 5, 4, 2, 1 }, + { 0, 4, 3, 8, 5, 2, 1 }, + { 1, 5, 4, 2, 0, 9, 3 }, + { 1, 9, 5, 2, 0, 4, 3 }, + { 0, 5, 3, 9, 4, 2, 1 }, + { 0, 4, 5, 3, 2, 1 }, + } }; typedef struct BlockXY { @@ -306,20 +306,16 @@ static av_cold int mobiclip_init(AVCodecContext *avctx) bits0, sizeof(*bits0), syms1, sizeof(*syms1), sizeof(*syms1), 0, 0, 1 << MOBI_RL_VLC_BITS); - for (int j = 0; j < 16; j++) { + for (int i = 0; i < 2; i++) { static VLC_TYPE vlc_buf[2 * 16 << MOBI_MV_VLC_BITS][2]; - mv_vlc[0][j].table = &vlc_buf[2 * j << MOBI_MV_VLC_BITS]; - mv_vlc[0][j].table_allocated = 1 << MOBI_MV_VLC_BITS; - ff_init_vlc_from_lengths(&mv_vlc[0][j], MOBI_MV_VLC_BITS, mv_len[j], - mv_bits_mods[j], sizeof(*mv_bits_mods[j]), - mv_syms_mods[j], sizeof(*mv_syms_mods[j]), - sizeof(*mv_syms_mods[j]), 0, INIT_VLC_USE_NEW_STATIC); - mv_vlc[1][j].table = &vlc_buf[(2 * j + 1) << MOBI_MV_VLC_BITS]; - mv_vlc[1][j].table_allocated = 1 << MOBI_MV_VLC_BITS; - ff_init_vlc_from_lengths(&mv_vlc[1][j], MOBI_MV_VLC_BITS, mv_len[j], - mv_bits[j], sizeof(*mv_bits[j]), - mv_syms[j], sizeof(*mv_syms[j]), sizeof(*mv_syms[j]), - 0, INIT_VLC_USE_NEW_STATIC); + for (int j = 0; j < 16; j++) { + mv_vlc[i][j].table = &vlc_buf[(16 * i + j) << MOBI_MV_VLC_BITS]; + mv_vlc[i][j].table_allocated = 1 << MOBI_MV_VLC_BITS; + ff_init_vlc_from_lengths(&mv_vlc[i][j], MOBI_MV_VLC_BITS, mv_len[j], + mv_bits[i][j], sizeof(*mv_bits[i][j]), + mv_syms[i][j], sizeof(*mv_syms[i][j]), sizeof(*mv_syms[i][j]), + 0, INIT_VLC_USE_NEW_STATIC); + } } return 0; From patchwork Tue Nov 10 10:47:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23515 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 9B30C44A3F2 for ; Tue, 10 Nov 2020 12:59:14 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 96FBE68BEA3; Tue, 10 Nov 2020 12:50:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A80ED68BE7C for ; Tue, 10 Nov 2020 12:50:08 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id o15so4303687wru.6 for ; Tue, 10 Nov 2020 02:50:08 -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=vYhJpbX9q2b/sMifFQ0MWiEnttXw53smXvPhK0GQYI4=; b=czFEZ/PXER89XsHBnA0+/iskkxiaj2RX+2pQLKZZGTJxe9EbcMwsIkT5kHeafu2g8c 0qb5W8hIlJ/JR7PtsidXNyOoy9uKvbAQEWAkJXk4h+2dZhD3gkUahndrCGno9ckYmrb6 Vy6tskkvLMwmArX34tDZsh87XZy713DJvBAP9yEdcBVLy4AyHYu+AT2v2w7Ztbai6+Gz zh5Avxuc8Tz49plbh6rrxvDJBQN7LVaGl+Ui+HgN8RbRemA95y5FJcTFPK1KqlsURP2r ybf/jLl1gAPj9HsVEjG5OaoRi02XVJCLmv3LyyGREHa6suuRohuHYm/9dy6NuEn0t9xL cmTQ== 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=vYhJpbX9q2b/sMifFQ0MWiEnttXw53smXvPhK0GQYI4=; b=rfvj/d0m8TJwTO8vjgOpYhRKa4TYOtAfB3YR/364XwcAvKYE8Y4ds3ooPrtFm97j8K wmKxcozDAKQCzLA2Sv/gVSPThcNTMfYETV80ppgf3GuLqNLg4UWJGAfBZbKoLwoVVlKa 2cxN2Lnk+thfD4avqv5R7G1oVnwaArJCDo6Zvpjuve91sp9f/wZXnYXiP5BMLTkIktmV X7BL/3yQYtB4Uv8T0jo9MF9/QAnSkd+ya6VC3RY2jHkaXm8afrTuWKV5lxVVl6wpFB29 seWcow0JBVO7fy7yAd68sEfoDcrD1HcddLDmRj3IrCOKj3zfpEuecP7Lr0dXKg36tfHu fdgA== X-Gm-Message-State: AOAM533tqp6dvvjUFeIa6nVcb5PBlhLEpVM1nGNd7clfvrPy/4nJisNG yGFOqeQGzafxFjOVh1oGOCBpNs8ANpc= X-Google-Smtp-Source: ABdhPJwsgHM4xExJOAfdJq94qxyCzC4UhypOaJfNc4hGkEYVwMrHnkx9hqtt2ApUN4dSN9n20nYNPw== X-Received: by 2002:a5d:5701:: with SMTP id a1mr605931wrv.120.1605005407675; Tue, 10 Nov 2020 02:50:07 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:07 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:45 +0100 Message-Id: <20201110104851.321029-49-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 048/114] avcodec/mobiclip: Reindentation 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/mobiclip.c | 132 +++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index e4a2594954..2d3225f464 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -160,80 +160,80 @@ static const uint8_t mv_len[16] = static const uint8_t mv_bits[2][16][10] = { { - { 2, 3, 3, 5, 5, 4, 4, 5, 5, 2 }, - { 2, 3, 4, 4, 3, 4, 4, 2 }, - { 3, 4, 4, 2, 4, 4, 3, 2 }, - { 1, 3, 4, 5, 5, 3, 3 }, - { 2, 4, 4, 3, 3, 4, 4, 2 }, - { 2, 3, 4, 4, 4, 4, 3, 2 }, - { 2, 3, 4, 4, 4, 4, 3, 2 }, - { 2, 2, 3, 4, 5, 5, 2 }, - { 2, 3, 4, 4, 3, 4, 4, 2 }, - { 2, 4, 4, 3, 4, 4, 3, 2 }, - { 2, 3, 3, 5, 5, 4, 3, 2 }, - { 2, 3, 4, 4, 3, 3, 2 }, - { 1, 4, 4, 3, 3, 4, 4 }, - { 2, 3, 4, 4, 3, 3, 2 }, - { 2, 3, 4, 4, 3, 3, 2 }, - { 3, 3, 2, 2, 3, 3 }, + { 2, 3, 3, 5, 5, 4, 4, 5, 5, 2 }, + { 2, 3, 4, 4, 3, 4, 4, 2 }, + { 3, 4, 4, 2, 4, 4, 3, 2 }, + { 1, 3, 4, 5, 5, 3, 3 }, + { 2, 4, 4, 3, 3, 4, 4, 2 }, + { 2, 3, 4, 4, 4, 4, 3, 2 }, + { 2, 3, 4, 4, 4, 4, 3, 2 }, + { 2, 2, 3, 4, 5, 5, 2 }, + { 2, 3, 4, 4, 3, 4, 4, 2 }, + { 2, 4, 4, 3, 4, 4, 3, 2 }, + { 2, 3, 3, 5, 5, 4, 3, 2 }, + { 2, 3, 4, 4, 3, 3, 2 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 2, 3, 4, 4, 3, 3, 2 }, + { 2, 3, 4, 4, 3, 3, 2 }, + { 3, 3, 2, 2, 3, 3 }, }, { - { 3, 4, 5, 5, 3, 5, 6, 6, 4, 1 }, - { 2, 3, 4, 5, 5, 2, 3, 3 }, - { 2, 4, 4, 3, 3, 4, 4, 2 }, - { 1, 4, 4, 3, 4, 4, 3 }, - { 3, 3, 2, 4, 5, 5, 3, 2 }, - { 3, 4, 4, 3, 3, 3, 3, 2 }, - { 1, 3, 3, 4, 4, 4, 5, 5 }, - { 1, 4, 4, 3, 3, 4, 4 }, - { 2, 4, 4, 3, 3, 4, 4, 2 }, - { 1, 3, 3, 4, 4, 4, 5, 5 }, - { 2, 3, 4, 4, 4, 4, 3, 2 }, - { 2, 3, 3, 4, 4, 3, 2 }, - { 1, 4, 4, 3, 3, 4, 4 }, - { 1, 4, 4, 3, 3, 4, 4 }, - { 2, 3, 3, 4, 4, 3, 2 }, - { 2, 3, 3, 3, 3, 2 }, + { 3, 4, 5, 5, 3, 5, 6, 6, 4, 1 }, + { 2, 3, 4, 5, 5, 2, 3, 3 }, + { 2, 4, 4, 3, 3, 4, 4, 2 }, + { 1, 4, 4, 3, 4, 4, 3 }, + { 3, 3, 2, 4, 5, 5, 3, 2 }, + { 3, 4, 4, 3, 3, 3, 3, 2 }, + { 1, 3, 3, 4, 4, 4, 5, 5 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 2, 4, 4, 3, 3, 4, 4, 2 }, + { 1, 3, 3, 4, 4, 4, 5, 5 }, + { 2, 3, 4, 4, 4, 4, 3, 2 }, + { 2, 3, 3, 4, 4, 3, 2 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 1, 4, 4, 3, 3, 4, 4 }, + { 2, 3, 3, 4, 4, 3, 2 }, + { 2, 3, 3, 3, 3, 2 }, } }; static const uint8_t mv_syms[2][16][10] = { { - { 1, 8, 9, 4, 3, 2, 7, 5, 6, 0 }, - { 0, 9, 5, 4, 2, 3, 8, 1 }, - { 3, 9, 5, 0, 4, 8, 2, 1 }, - { 1, 3, 4, 8, 5, 2, 0 }, - { 0, 5, 4, 8, 2, 3, 9, 1 }, - { 0, 3, 5, 9, 4, 8, 2, 1 }, - { 0, 3, 9, 5, 8, 4, 2, 1 }, - { 0, 2, 3, 4, 8, 5, 1 }, - { 0, 3, 8, 4, 2, 5, 9, 1 }, - { 2, 8, 9, 3, 5, 4, 0, 1 }, - { 0, 4, 3, 8, 9, 5, 2, 1 }, - { 0, 4, 8, 5, 3, 2, 1 }, - { 1, 9, 4, 2, 0, 5, 3 }, - { 2, 4, 9, 5, 3, 0, 1 }, - { 0, 4, 9, 5, 3, 2, 1 }, - { 5, 4, 1, 0, 3, 2 }, + { 1, 8, 9, 4, 3, 2, 7, 5, 6, 0 }, + { 0, 9, 5, 4, 2, 3, 8, 1 }, + { 3, 9, 5, 0, 4, 8, 2, 1 }, + { 1, 3, 4, 8, 5, 2, 0 }, + { 0, 5, 4, 8, 2, 3, 9, 1 }, + { 0, 3, 5, 9, 4, 8, 2, 1 }, + { 0, 3, 9, 5, 8, 4, 2, 1 }, + { 0, 2, 3, 4, 8, 5, 1 }, + { 0, 3, 8, 4, 2, 5, 9, 1 }, + { 2, 8, 9, 3, 5, 4, 0, 1 }, + { 0, 4, 3, 8, 9, 5, 2, 1 }, + { 0, 4, 8, 5, 3, 2, 1 }, + { 1, 9, 4, 2, 0, 5, 3 }, + { 2, 4, 9, 5, 3, 0, 1 }, + { 0, 4, 9, 5, 3, 2, 1 }, + { 5, 4, 1, 0, 3, 2 }, }, { - { 8, 2, 3, 6, 1, 7, 5, 4, 9, 0 }, - { 9, 2, 3, 5, 4, 1, 8, 0 }, - { 0, 5, 4, 2, 9, 3, 8, 1 }, - { 1, 5, 4, 2, 8, 3, 0 }, - { 2, 9, 8, 3, 5, 4, 0, 1 }, - { 3, 5, 4, 2, 9, 8, 0, 1 }, - { 1, 2, 0, 9, 8, 3, 5, 4 }, - { 1, 8, 5, 2, 0, 4, 3 }, - { 0, 5, 4, 2, 8, 3, 9, 1 }, - { 1, 2, 0, 9, 8, 3, 5, 4 }, - { 0, 3, 9, 8, 5, 4, 2, 1 }, - { 0, 4, 3, 8, 5, 2, 1 }, - { 1, 5, 4, 2, 0, 9, 3 }, - { 1, 9, 5, 2, 0, 4, 3 }, - { 0, 5, 3, 9, 4, 2, 1 }, - { 0, 4, 5, 3, 2, 1 }, + { 8, 2, 3, 6, 1, 7, 5, 4, 9, 0 }, + { 9, 2, 3, 5, 4, 1, 8, 0 }, + { 0, 5, 4, 2, 9, 3, 8, 1 }, + { 1, 5, 4, 2, 8, 3, 0 }, + { 2, 9, 8, 3, 5, 4, 0, 1 }, + { 3, 5, 4, 2, 9, 8, 0, 1 }, + { 1, 2, 0, 9, 8, 3, 5, 4 }, + { 1, 8, 5, 2, 0, 4, 3 }, + { 0, 5, 4, 2, 8, 3, 9, 1 }, + { 1, 2, 0, 9, 8, 3, 5, 4 }, + { 0, 3, 9, 8, 5, 4, 2, 1 }, + { 0, 4, 3, 8, 5, 2, 1 }, + { 1, 5, 4, 2, 0, 9, 3 }, + { 1, 9, 5, 2, 0, 4, 3 }, + { 0, 5, 3, 9, 4, 2, 1 }, + { 0, 4, 5, 3, 2, 1 }, } }; @@ -300,11 +300,11 @@ static av_cold int mobiclip_init(AVCodecContext *avctx) INIT_VLC_STATIC_FROM_LENGTHS(&rl_vlc[0], MOBI_RL_VLC_BITS, 104, bits0, sizeof(*bits0), - syms0, sizeof(*syms0), sizeof(*syms0), + syms0, sizeof(*syms0), sizeof(*syms0), 0, 0, 1 << MOBI_RL_VLC_BITS); INIT_VLC_STATIC_FROM_LENGTHS(&rl_vlc[1], MOBI_RL_VLC_BITS, 104, bits0, sizeof(*bits0), - syms1, sizeof(*syms1), sizeof(*syms1), + syms1, sizeof(*syms1), sizeof(*syms1), 0, 0, 1 << MOBI_RL_VLC_BITS); for (int i = 0; i < 2; i++) { static VLC_TYPE vlc_buf[2 * 16 << MOBI_MV_VLC_BITS][2]; From patchwork Tue Nov 10 10:47:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23524 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 69B7944A3F2 for ; Tue, 10 Nov 2020 12:59:58 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3FDD068BEC5; Tue, 10 Nov 2020 12:50:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 289A068BE54 for ; Tue, 10 Nov 2020 12:50:09 +0200 (EET) Received: by mail-wr1-f41.google.com with SMTP id s8so5051980wrw.10 for ; Tue, 10 Nov 2020 02:50: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=oHqtvpKf+/CjvixAyVdUqWJXSn8jAyB9HsL2s8D9RGA=; b=fk2e+1GWzfpuuMSMO7+O+2hqA8c2ncj6jgb6vdPAs3Rtnhp5DgpON34oK0UAWj0zyD 3UDvcoQYD647+F3J7Qbmgw77O7wgVcT+bLZUaMERv7cEDPTllifzn1RvHT8sAyA1IR+k IG3HEMAGdG5fytOGujiTslCWJJoQwACvR5m+Dv2KX6U8AGK9PcBOf8MJhkS0z5R3lSur 5LGhSRGNaqPzn192CZtrgTKrlJeopqx7xgFU3q/wh+zX/nFaQFqdh2JlGWji8iPBCcdA 6Bvh5BSxGjkFA2FtaHUWLV4IPlp4BpIQ+yFu4JJdG4MrojtZOZMxRZ6V+Sg6WM8d+JR6 Ai6w== 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=oHqtvpKf+/CjvixAyVdUqWJXSn8jAyB9HsL2s8D9RGA=; b=CGHZAW6e4B3vO7WtE47WJsbg83Fl3q3DLDybw+/YZKkvG1qOx14VQ+Y8j1tkwXqOF0 o2S2f6PGp/jZmyKpDbp7dMj7bXd3Oyy/QI6ne+CEF+u1upSvOvHL3Ep8y8En0VHBEu5o uX4grgBZ4n1wnQpdlisjn3fvtdX48i5Xbbo8+00HKjKbBEOUxUoP7MW9By6hx178S0pk 7/Kw8iYAP/DVCrS/LGRbIGpSOu2DWJuTItnhMk9r9gHVMKQyPo5hwUIYbOGhNXiyJqW8 8rbpoF7wLzkxx1dXnwh1Ah5MfDjwvuo2rdtoUU4MyLyUo6MZavNLSMawnbq77JKztktT wu2A== X-Gm-Message-State: AOAM531WBUUeRj3X8hkawQMlgctqQgyLBh2YmdXdve1JVzEKTQtZJF3p aqeQ6DB4ml9g7p6d81kfn6OF9+IxhMQ= X-Google-Smtp-Source: ABdhPJyPXu2jGgXJn4MA/IKPrmY0wlVlTp8IGyHZW0pn6jY9yEUeiraMb9d7+F3Ea8MCLiQN4iGIgg== X-Received: by 2002:a5d:44c1:: with SMTP id z1mr19169751wrr.375.1605005408604; Tue, 10 Nov 2020 02:50:08 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:08 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:46 +0100 Message-Id: <20201110104851.321029-50-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 049/114] avcodec/qdm2: Make tables used to initialize VLCs smaller 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" After permuting the codes, symbols and lengths tables used to initialize the VLCs so that the codes are ordered from left to right in the Huffman tree, the codes become redundant as they can be easily computed from the lengths at runtime (or at compile time with --enable-hardcoded-tables); in this case one has to use explicit symbol tables, but all the symbols used here fit into an uint8_t, whereas some codes needed uint16_t. Furthermore, the codes had holes because the range of the symbols was not contiguous; these have also been removed. Signed-off-by: Andreas Rheinhardt --- libavcodec/qdm2_tablegen.h | 102 ++++++++--------- libavcodec/qdm2data.h | 226 ++++++++++++++----------------------- 2 files changed, 133 insertions(+), 195 deletions(-) diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h index 2331ebfbb2..309bb4b53c 100644 --- a/libavcodec/qdm2_tablegen.h +++ b/libavcodec/qdm2_tablegen.h @@ -119,140 +119,140 @@ static av_cold void qdm2_init_vlc(void) { vlc_tab_level.table = &qdm2_table[qdm2_vlc_offs[0]]; vlc_tab_level.table_allocated = qdm2_vlc_offs[1] - qdm2_vlc_offs[0]; - init_vlc(&vlc_tab_level, 8, 24, - vlc_tab_level_huffbits, 1, 1, - vlc_tab_level_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_level, 8, 24, + &tab_level[0][1], 2, + &tab_level[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_diff.table = &qdm2_table[qdm2_vlc_offs[1]]; vlc_tab_diff.table_allocated = qdm2_vlc_offs[2] - qdm2_vlc_offs[1]; - init_vlc(&vlc_tab_diff, 8, 37, - vlc_tab_diff_huffbits, 1, 1, - vlc_tab_diff_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_diff, 8, 33, + &tab_diff[0][1], 2, + &tab_diff[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_run.table = &qdm2_table[qdm2_vlc_offs[2]]; vlc_tab_run.table_allocated = qdm2_vlc_offs[3] - qdm2_vlc_offs[2]; - init_vlc(&vlc_tab_run, 5, 6, - vlc_tab_run_huffbits, 1, 1, - vlc_tab_run_huffcodes, 1, 1, + ff_init_vlc_from_lengths(&vlc_tab_run, 5, 6, + &tab_run[0][1], 2, + &tab_run[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); fft_level_exp_alt_vlc.table = &qdm2_table[qdm2_vlc_offs[3]]; fft_level_exp_alt_vlc.table_allocated = qdm2_vlc_offs[4] - qdm2_vlc_offs[3]; - init_vlc(&fft_level_exp_alt_vlc, 8, 28, - fft_level_exp_alt_huffbits, 1, 1, - fft_level_exp_alt_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&fft_level_exp_alt_vlc, 8, 28, + &fft_level_exp_alt[0][1], 2, + &fft_level_exp_alt[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); fft_level_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[4]]; fft_level_exp_vlc.table_allocated = qdm2_vlc_offs[5] - qdm2_vlc_offs[4]; - init_vlc(&fft_level_exp_vlc, 8, 20, - fft_level_exp_huffbits, 1, 1, - fft_level_exp_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&fft_level_exp_vlc, 8, 20, + &fft_level_exp[0][1], 2, + &fft_level_exp[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); fft_stereo_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[5]]; fft_stereo_exp_vlc.table_allocated = qdm2_vlc_offs[6] - qdm2_vlc_offs[5]; - init_vlc(&fft_stereo_exp_vlc, 6, 7, - fft_stereo_exp_huffbits, 1, 1, - fft_stereo_exp_huffcodes, 1, 1, + ff_init_vlc_from_lengths(&fft_stereo_exp_vlc, 6, 7, + &fft_stereo_exp[0][1], 2, + &fft_stereo_exp[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); fft_stereo_phase_vlc.table = &qdm2_table[qdm2_vlc_offs[6]]; fft_stereo_phase_vlc.table_allocated = qdm2_vlc_offs[7] - qdm2_vlc_offs[6]; - init_vlc(&fft_stereo_phase_vlc, 6, 9, - fft_stereo_phase_huffbits, 1, 1, - fft_stereo_phase_huffcodes, 1, 1, + ff_init_vlc_from_lengths(&fft_stereo_phase_vlc, 6, 9, + &fft_stereo_phase[0][1], 2, + &fft_stereo_phase[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_tone_level_idx_hi1.table = &qdm2_table[qdm2_vlc_offs[7]]; vlc_tab_tone_level_idx_hi1.table_allocated = qdm2_vlc_offs[8] - qdm2_vlc_offs[7]; - init_vlc(&vlc_tab_tone_level_idx_hi1, 8, 20, - vlc_tab_tone_level_idx_hi1_huffbits, 1, 1, - vlc_tab_tone_level_idx_hi1_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_tone_level_idx_hi1, 8, 20, + &tab_tone_level_idx_hi1[0][1], 2, + &tab_tone_level_idx_hi1[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_tone_level_idx_mid.table = &qdm2_table[qdm2_vlc_offs[8]]; vlc_tab_tone_level_idx_mid.table_allocated = qdm2_vlc_offs[9] - qdm2_vlc_offs[8]; - init_vlc(&vlc_tab_tone_level_idx_mid, 8, 24, - vlc_tab_tone_level_idx_mid_huffbits, 1, 1, - vlc_tab_tone_level_idx_mid_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_tone_level_idx_mid, 8, 13, + &tab_tone_level_idx_mid[0][1], 2, + &tab_tone_level_idx_mid[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_tone_level_idx_hi2.table = &qdm2_table[qdm2_vlc_offs[9]]; vlc_tab_tone_level_idx_hi2.table_allocated = qdm2_vlc_offs[10] - qdm2_vlc_offs[9]; - init_vlc(&vlc_tab_tone_level_idx_hi2, 8, 24, - vlc_tab_tone_level_idx_hi2_huffbits, 1, 1, - vlc_tab_tone_level_idx_hi2_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_tone_level_idx_hi2, 8, 18, + &tab_tone_level_idx_hi2[0][1], 2, + &tab_tone_level_idx_hi2[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_type30.table = &qdm2_table[qdm2_vlc_offs[10]]; vlc_tab_type30.table_allocated = qdm2_vlc_offs[11] - qdm2_vlc_offs[10]; - init_vlc(&vlc_tab_type30, 6, 9, - vlc_tab_type30_huffbits, 1, 1, - vlc_tab_type30_huffcodes, 1, 1, + ff_init_vlc_from_lengths(&vlc_tab_type30, 6, 9, + &tab_type30[0][1], 2, + &tab_type30[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_type34.table = &qdm2_table[qdm2_vlc_offs[11]]; vlc_tab_type34.table_allocated = qdm2_vlc_offs[12] - qdm2_vlc_offs[11]; - init_vlc(&vlc_tab_type34, 5, 10, - vlc_tab_type34_huffbits, 1, 1, - vlc_tab_type34_huffcodes, 1, 1, + ff_init_vlc_from_lengths(&vlc_tab_type34, 5, 10, + &tab_type34[0][1], 2, + &tab_type34[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_fft_tone_offset[0].table = &qdm2_table[qdm2_vlc_offs[12]]; vlc_tab_fft_tone_offset[0].table_allocated = qdm2_vlc_offs[13] - qdm2_vlc_offs[12]; - init_vlc(&vlc_tab_fft_tone_offset[0], 8, 23, - vlc_tab_fft_tone_offset_0_huffbits, 1, 1, - vlc_tab_fft_tone_offset_0_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[0], 8, 23, + &tab_fft_tone_offset_0[0][1], 2, + &tab_fft_tone_offset_0[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_fft_tone_offset[1].table = &qdm2_table[qdm2_vlc_offs[13]]; vlc_tab_fft_tone_offset[1].table_allocated = qdm2_vlc_offs[14] - qdm2_vlc_offs[13]; - init_vlc(&vlc_tab_fft_tone_offset[1], 8, 28, - vlc_tab_fft_tone_offset_1_huffbits, 1, 1, - vlc_tab_fft_tone_offset_1_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[1], 8, 28, + &tab_fft_tone_offset_1[0][1], 2, + &tab_fft_tone_offset_1[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_fft_tone_offset[2].table = &qdm2_table[qdm2_vlc_offs[14]]; vlc_tab_fft_tone_offset[2].table_allocated = qdm2_vlc_offs[15] - qdm2_vlc_offs[14]; - init_vlc(&vlc_tab_fft_tone_offset[2], 8, 32, - vlc_tab_fft_tone_offset_2_huffbits, 1, 1, - vlc_tab_fft_tone_offset_2_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[2], 8, 31, + &tab_fft_tone_offset_2[0][1], 2, + &tab_fft_tone_offset_2[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_fft_tone_offset[3].table = &qdm2_table[qdm2_vlc_offs[15]]; vlc_tab_fft_tone_offset[3].table_allocated = qdm2_vlc_offs[16] - qdm2_vlc_offs[15]; - init_vlc(&vlc_tab_fft_tone_offset[3], 8, 35, - vlc_tab_fft_tone_offset_3_huffbits, 1, 1, - vlc_tab_fft_tone_offset_3_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[3], 8, 34, + &tab_fft_tone_offset_3[0][1], 2, + &tab_fft_tone_offset_3[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); vlc_tab_fft_tone_offset[4].table = &qdm2_table[qdm2_vlc_offs[16]]; vlc_tab_fft_tone_offset[4].table_allocated = qdm2_vlc_offs[17] - qdm2_vlc_offs[16]; - init_vlc(&vlc_tab_fft_tone_offset[4], 8, 38, - vlc_tab_fft_tone_offset_4_huffbits, 1, 1, - vlc_tab_fft_tone_offset_4_huffcodes, 2, 2, + ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[4], 8, 37, + &tab_fft_tone_offset_4[0][1], 2, + &tab_fft_tone_offset_4[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); } diff --git a/libavcodec/qdm2data.h b/libavcodec/qdm2data.h index 355d61387b..69f66b4571 100644 --- a/libavcodec/qdm2data.h +++ b/libavcodec/qdm2data.h @@ -35,200 +35,138 @@ /** VLC TABLES **/ /* values in this table range from -1..23; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_level_huffcodes[24] = { - 0x037c, 0x0004, 0x003c, 0x004c, 0x003a, 0x002c, 0x001c, 0x001a, - 0x0024, 0x0014, 0x0001, 0x0002, 0x0000, 0x0003, 0x0007, 0x0005, - 0x0006, 0x0008, 0x0009, 0x000a, 0x000c, 0x00fc, 0x007c, 0x017c -}; - -static const uint8_t vlc_tab_level_huffbits[24] = { - 10, 6, 7, 7, 6, 6, 6, 6, 6, 5, 4, 4, 4, 3, 3, 3, 3, 4, 4, 5, 7, 8, 9, 10 +static const uint8_t tab_level[24][2] = { + { 12, 4 }, { 17, 4 }, { 1, 6 }, { 8, 6 }, { 9, 5 }, { 20, 7 }, + { 3, 7 }, { 5, 6 }, { 6, 6 }, { 2, 7 }, { 22, 9 }, { 23, 10 }, + { 0, 10 }, { 21, 8 }, { 11, 4 }, { 19, 5 }, { 7, 6 }, { 4, 6 }, + { 16, 3 }, { 10, 4 }, { 18, 4 }, { 15, 3 }, { 13, 3 }, { 14, 3 }, }; /* values in this table range from -1..36; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_diff_huffcodes[37] = { - 0x1c57, 0x0004, 0x0000, 0x0001, 0x0003, 0x0002, 0x000f, 0x000e, - 0x0007, 0x0016, 0x0037, 0x0027, 0x0026, 0x0066, 0x0006, 0x0097, - 0x0046, 0x01c6, 0x0017, 0x0786, 0x0086, 0x0257, 0x00d7, 0x0357, - 0x00c6, 0x0386, 0x0186, 0x0000, 0x0157, 0x0c57, 0x0057, 0x0000, - 0x0b86, 0x0000, 0x1457, 0x0000, 0x0457 -}; - -static const uint8_t vlc_tab_diff_huffbits[37] = { - 13, 3, 3, 2, 3, 3, 4, 4, 6, 5, 6, 6, 7, 7, 8, 8, - 8, 9, 8, 11, 9, 10, 8, 10, 9, 12, 10, 0, 10, 13, 11, 0, - 12, 0, 13, 0, 13 +static const uint8_t tab_diff[33][2] = { + { 2, 3 }, { 1, 3 }, { 5, 3 }, { 14, 8 }, { 20, 9 }, { 26, 10 }, + { 25, 12 }, { 32, 12 }, { 19, 11 }, { 16, 8 }, { 24, 9 }, { 17, 9 }, + { 12, 7 }, { 13, 7 }, { 9, 5 }, { 7, 4 }, { 3, 2 }, { 4, 3 }, + { 8, 6 }, { 11, 6 }, { 18, 8 }, { 15, 8 }, { 30, 11 }, { 36, 13 }, + { 34, 13 }, { 29, 13 }, { 0, 13 }, { 21, 10 }, { 28, 10 }, { 23, 10 }, + { 22, 8 }, { 10, 6 }, { 6, 4 }, }; /* values in this table range from -1..5; adjust retrieved value by -1 */ -static const uint8_t vlc_tab_run_huffcodes[6] = { - 0x1f, 0x00, 0x01, 0x03, 0x07, 0x0f -}; - -static const uint8_t vlc_tab_run_huffbits[6] = { - 5, 1, 2, 3, 4, 5 +static const uint8_t tab_run[6][2] = { + { 1, 1 }, { 2, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 }, { 0, 5 }, }; /* values in this table range from -1..19; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_tone_level_idx_hi1_huffcodes[20] = { - 0x5714, 0x000c, 0x0002, 0x0001, 0x0000, 0x0004, 0x0034, 0x0054, - 0x0094, 0x0014, 0x0114, 0x0214, 0x0314, 0x0614, 0x0e14, 0x0f14, - 0x2714, 0x0714, 0x1714, 0x3714 -}; - -static const uint8_t vlc_tab_tone_level_idx_hi1_huffbits[20] = { - 15, 4, 2, 1, 3, 5, 6, 7, 8, 10, 10, 11, 11, 12, 12, 12, 14, 14, 15, 14 +static const uint8_t tab_tone_level_idx_hi1[20][2] = { + { 4, 3 }, { 5, 5 }, { 9, 10 }, { 11, 11 }, { 13, 12 }, { 14, 12 }, + { 10, 10 }, { 12, 11 }, { 17, 14 }, { 16, 14 }, { 18, 15 }, { 0, 15 }, + { 19, 14 }, { 15, 12 }, { 8, 8 }, { 7, 7 }, { 6, 6 }, { 1, 4 }, + { 2, 2 }, { 3, 1 }, }; /* values in this table range from -1..23; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_tone_level_idx_mid_huffcodes[24] = { - 0x0fea, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x03ea, 0x00ea, 0x002a, 0x001a, - 0x0006, 0x0001, 0x0000, 0x0002, 0x000a, 0x006a, 0x01ea, 0x07ea -}; - -static const uint8_t vlc_tab_tone_level_idx_mid_huffbits[24] = { - 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12 +static const uint8_t tab_tone_level_idx_mid[13][2] = { + { 18, 2 }, { 19, 4 }, { 20, 6 }, { 14, 7 }, { 21, 8 }, { 13, 9 }, + { 22, 10 }, { 12, 11 }, { 23, 12 }, { 0, 12 }, { 15, 5 }, { 16, 3 }, + { 17, 1 }, }; /* values in this table range from -1..23; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_tone_level_idx_hi2_huffcodes[24] = { - 0x0664, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0064, 0x00e4, - 0x00a4, 0x0068, 0x0004, 0x0008, 0x0014, 0x0018, 0x0000, 0x0001, - 0x0002, 0x0003, 0x000c, 0x0028, 0x0024, 0x0164, 0x0000, 0x0264 -}; - -static const uint8_t vlc_tab_tone_level_idx_hi2_huffbits[24] = { - 11, 0, 0, 0, 0, 0, 10, 8, 8, 7, 6, 6, 5, 5, 4, 2, 2, 2, 4, 7, 8, 9, 0, 11 +static const uint8_t tab_tone_level_idx_hi2[18][2] = { + { 14, 4 }, { 11, 6 }, { 19, 7 }, { 9, 7 }, { 13, 5 }, { 10, 6 }, + { 20, 8 }, { 8, 8 }, { 6, 10 }, { 23, 11 }, { 0, 11 }, { 21, 9 }, + { 7, 8 }, { 12, 5 }, { 18, 4 }, { 16, 2 }, { 15, 2 }, { 17, 2 }, }; /* values in this table range from -1..8; adjust retrieved value by -1 */ -static const uint8_t vlc_tab_type30_huffcodes[9] = { - 0x3c, 0x06, 0x00, 0x01, 0x03, 0x02, 0x04, 0x0c, 0x1c -}; - -static const uint8_t vlc_tab_type30_huffbits[9] = { - 6, 3, 3, 2, 2, 3, 4, 5, 6 +static const uint8_t tab_type30[9][2] = { + { 2, 3 }, { 6, 4 }, { 7, 5 }, { 8, 6 }, { 0, 6 }, { 5, 3 }, { 1, 3 }, + { 3, 2 }, { 4, 2 }, }; /* values in this table range from -1..9; adjust retrieved value by -1 */ -static const uint8_t vlc_tab_type34_huffcodes[10] = { - 0x18, 0x00, 0x01, 0x04, 0x05, 0x07, 0x03, 0x02, 0x06, 0x08 -}; - -static const uint8_t vlc_tab_type34_huffbits[10] = { - 5, 4, 3, 3, 3, 3, 3, 3, 3, 5 +static const uint8_t tab_type34[10][2] = { + { 1, 4 }, { 9, 5 }, { 0, 5 }, { 3, 3 }, { 7, 3 }, { 8, 3 }, { 2, 3 }, + { 4, 3 }, { 6, 3 }, { 5, 3 }, }; /* values in this table range from -1..22; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_fft_tone_offset_0_huffcodes[23] = { - 0x038e, 0x0001, 0x0000, 0x0022, 0x000a, 0x0006, 0x0012, 0x0002, - 0x001e, 0x003e, 0x0056, 0x0016, 0x000e, 0x0032, 0x0072, 0x0042, - 0x008e, 0x004e, 0x00f2, 0x002e, 0x0036, 0x00c2, 0x018e -}; - -static const uint8_t vlc_tab_fft_tone_offset_0_huffbits[23] = { - 10, 1, 2, 6, 4, 5, 6, 7, 6, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 6, 6, 8, 10 +static const uint8_t tab_fft_tone_offset_0[23][2] = { + { 2, 2 }, { 7, 7 }, { 15, 8 }, { 21, 8 }, { 3, 6 }, { 6, 6 }, + { 13, 7 }, { 14, 8 }, { 18, 8 }, { 4, 4 }, { 5, 5 }, { 11, 7 }, + { 10, 7 }, { 20, 6 }, { 12, 8 }, { 16, 9 }, { 22, 10 }, { 0, 10 }, + { 17, 7 }, { 19, 6 }, { 8, 6 }, { 9, 6 }, { 1, 1 }, }; /* values in this table range from -1..27; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_fft_tone_offset_1_huffcodes[28] = { - 0x07a4, 0x0001, 0x0020, 0x0012, 0x001c, 0x0008, 0x0006, 0x0010, - 0x0000, 0x0014, 0x0004, 0x0032, 0x0070, 0x000c, 0x0002, 0x003a, - 0x001a, 0x002c, 0x002a, 0x0022, 0x0024, 0x000a, 0x0064, 0x0030, - 0x0062, 0x00a4, 0x01a4, 0x03a4 -}; - -static const uint8_t vlc_tab_fft_tone_offset_1_huffbits[28] = { - 11, 1, 6, 6, 5, 4, 3, 6, 6, 5, 6, 6, 7, 6, 6, 6, - 6, 6, 6, 7, 8, 6, 7, 7, 7, 9, 10, 11 +static const uint8_t tab_fft_tone_offset_1[28][2] = { + { 8, 6 }, { 2, 6 }, { 7, 6 }, { 23, 7 }, { 12, 7 }, { 5, 4 }, + { 10, 6 }, { 20, 8 }, { 25, 9 }, { 26, 10 }, { 27, 11 }, { 0, 11 }, + { 22, 7 }, { 9, 5 }, { 13, 6 }, { 17, 6 }, { 4, 5 }, { 14, 6 }, + { 19, 7 }, { 24, 7 }, { 3, 6 }, { 11, 6 }, { 21, 6 }, { 18, 6 }, + { 16, 6 }, { 15, 6 }, { 6, 3 }, { 1, 1 }, }; /* values in this table range from -1..31; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_fft_tone_offset_2_huffcodes[32] = { - 0x1760, 0x0001, 0x0000, 0x0082, 0x000c, 0x0006, 0x0003, 0x0007, - 0x0008, 0x0004, 0x0010, 0x0012, 0x0022, 0x001a, 0x0000, 0x0020, - 0x000a, 0x0040, 0x004a, 0x006a, 0x002a, 0x0042, 0x0002, 0x0060, - 0x00aa, 0x00e0, 0x00c2, 0x01c2, 0x0160, 0x0360, 0x0760, 0x0f60 -}; - -static const uint8_t vlc_tab_fft_tone_offset_2_huffbits[32] = { - 13, 2, 0, 8, 4, 3, 3, 3, 4, 4, 5, 5, 6, 5, 7, 7, - 7, 7, 7, 7, 8, 8, 8, 9, 8, 8, 9, 9, 10, 11, 13, 12 +static const uint8_t tab_fft_tone_offset_2[31][2] = { + { 14, 7 }, { 17, 7 }, { 15, 7 }, { 23, 9 }, { 28, 10 }, { 29, 11 }, + { 30, 13 }, { 0, 13 }, { 31, 12 }, { 25, 8 }, { 10, 5 }, { 8, 4 }, + { 9, 4 }, { 4, 4 }, { 22, 8 }, { 3, 8 }, { 21, 8 }, { 26, 9 }, + { 27, 9 }, { 12, 6 }, { 11, 5 }, { 16, 7 }, { 18, 7 }, { 20, 8 }, + { 24, 8 }, { 19, 7 }, { 13, 5 }, { 5, 3 }, { 1, 2 }, { 6, 3 }, + { 7, 3 }, }; /* values in this table range from -1..34; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_fft_tone_offset_3_huffcodes[35] = { - 0x33ea, 0x0005, 0x0000, 0x000c, 0x0000, 0x0006, 0x0003, 0x0008, - 0x0002, 0x0001, 0x0004, 0x0007, 0x001a, 0x000f, 0x001c, 0x002c, - 0x000a, 0x001d, 0x002d, 0x002a, 0x000d, 0x004c, 0x008c, 0x006a, - 0x00cd, 0x004d, 0x00ea, 0x020c, 0x030c, 0x010c, 0x01ea, 0x07ea, - 0x0bea, 0x03ea, 0x13ea -}; - -static const uint8_t vlc_tab_fft_tone_offset_3_huffbits[35] = { - 14, 4, 0, 10, 4, 3, 3, 4, 4, 3, 4, 4, 5, 4, 5, 6, - 6, 5, 6, 7, 7, 7, 8, 8, 8, 8, 9, 10, 10, 10, 10, 11, - 12, 13, 14 +static const uint8_t tab_fft_tone_offset_3[34][2] = { + { 4, 4 }, { 7, 4 }, { 10, 4 }, { 3, 10 }, { 27, 10 }, { 29, 10 }, + { 28, 10 }, { 22, 8 }, { 21, 7 }, { 15, 6 }, { 14, 5 }, { 8, 4 }, + { 16, 6 }, { 19, 7 }, { 23, 8 }, { 26, 9 }, { 30, 10 }, { 33, 13 }, + { 34, 14 }, { 0, 14 }, { 32, 12 }, { 31, 11 }, { 12, 5 }, { 5, 3 }, + { 9, 3 }, { 1, 4 }, { 20, 7 }, { 25, 8 }, { 24, 8 }, { 18, 6 }, + { 17, 5 }, { 6, 3 }, { 11, 4 }, { 13, 4 }, }; /* values in this table range from -1..37; adjust retrieved value by -1 */ -static const uint16_t vlc_tab_fft_tone_offset_4_huffcodes[38] = { - 0x5282, 0x0016, 0x0000, 0x0136, 0x0004, 0x0000, 0x0007, 0x000a, - 0x000e, 0x0003, 0x0001, 0x000d, 0x0006, 0x0009, 0x0012, 0x0005, - 0x0025, 0x0022, 0x0015, 0x0002, 0x0076, 0x0035, 0x0042, 0x00c2, - 0x0182, 0x00b6, 0x0036, 0x03c2, 0x0482, 0x01c2, 0x0682, 0x0882, - 0x0a82, 0x0082, 0x0282, 0x1282, 0x3282, 0x2282 -}; - -static const uint8_t vlc_tab_fft_tone_offset_4_huffbits[38] = { - 15, 6, 0, 9, 3, 3, 3, 4, 4, 3, 4, 4, 5, 4, 5, 6, - 6, 6, 6, 8, 7, 6, 8, 9, 9, 8, 9, 10, 11, 10, 11, 12, - 12, 12, 14, 15, 14, 14 +static const uint8_t tab_fft_tone_offset_4[37][2] = { + { 5, 3 }, { 4, 3 }, { 19, 8 }, { 33, 12 }, { 31, 12 }, { 28, 11 }, + { 34, 14 }, { 37, 14 }, { 35, 15 }, { 0, 15 }, { 36, 14 }, { 32, 12 }, + { 30, 11 }, { 24, 9 }, { 22, 8 }, { 23, 9 }, { 29, 10 }, { 27, 10 }, + { 17, 6 }, { 14, 5 }, { 7, 4 }, { 12, 5 }, { 1, 6 }, { 26, 9 }, + { 3, 9 }, { 25, 8 }, { 20, 7 }, { 8, 4 }, { 10, 4 }, { 13, 4 }, + { 15, 6 }, { 16, 6 }, { 18, 6 }, { 21, 6 }, { 11, 4 }, { 9, 3 }, + { 6, 3 }, }; /** FFT TABLES **/ /* values in this table range from -1..27; adjust retrieved value by -1 */ -static const uint16_t fft_level_exp_alt_huffcodes[28] = { - 0x1ec6, 0x0006, 0x00c2, 0x0142, 0x0242, 0x0246, 0x00c6, 0x0046, - 0x0042, 0x0146, 0x00a2, 0x0062, 0x0026, 0x0016, 0x000e, 0x0005, - 0x0004, 0x0003, 0x0000, 0x0001, 0x000a, 0x0012, 0x0002, 0x0022, - 0x01c6, 0x02c6, 0x06c6, 0x0ec6 -}; - -static const uint8_t fft_level_exp_alt_huffbits[28] = { - 13, 7, 8, 9, 10, 10, 10, 10, 10, 9, 8, 7, 6, 5, 4, 3, - 3, 2, 3, 3, 4, 5, 7, 8, 9, 11, 12, 13 +static const uint8_t fft_level_exp_alt[28][2] = { + { 18, 3 }, { 16, 3 }, { 22, 7 }, { 8, 10 }, { 4, 10 }, { 3, 9 }, + { 2, 8 }, { 23, 8 }, { 10, 8 }, { 11, 7 }, { 21, 5 }, { 20, 4 }, + { 1, 7 }, { 7, 10 }, { 5, 10 }, { 9, 9 }, { 6, 10 }, { 25, 11 }, + { 26, 12 }, { 27, 13 }, { 0, 13 }, { 24, 9 }, { 12, 6 }, { 13, 5 }, + { 14, 4 }, { 19, 3 }, { 15, 3 }, { 17, 2 }, }; /* values in this table range from -1..19; adjust retrieved value by -1 */ -static const uint16_t fft_level_exp_huffcodes[20] = { - 0x0f24, 0x0001, 0x0002, 0x0000, 0x0006, 0x0005, 0x0007, 0x000c, - 0x000b, 0x0014, 0x0013, 0x0004, 0x0003, 0x0023, 0x0064, 0x00a4, - 0x0024, 0x0124, 0x0324, 0x0724 -}; - -static const uint8_t fft_level_exp_huffbits[20] = { - 12, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 8, 9, 10, 11, 12 +static const uint8_t fft_level_exp[20][2] = { + { 3, 3 }, { 11, 6 }, { 16, 9 }, { 17, 10 }, { 18, 11 }, { 19, 12 }, + { 0, 12 }, { 15, 8 }, { 14, 7 }, { 9, 5 }, { 7, 4 }, { 2, 3 }, + { 4, 3 }, { 1, 3 }, { 5, 3 }, { 12, 6 }, { 13, 6 }, { 10, 5 }, + { 8, 4 }, { 6, 3 }, }; /* values in this table range from -1..6; adjust retrieved value by -1 */ -static const uint8_t fft_stereo_exp_huffcodes[7] = { - 0x3e, 0x01, 0x00, 0x02, 0x06, 0x0e, 0x1e -}; - -static const uint8_t fft_stereo_exp_huffbits[7] = { - 6, 1, 2, 3, 4, 5, 6 +static const uint8_t fft_stereo_exp[7][2] = { + { 2, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 }, { 6, 6 }, { 0, 6 }, { 1, 1 }, }; /* values in this table range from -1..8; adjust retrieved value by -1 */ -static const uint8_t fft_stereo_phase_huffcodes[9] = { - 0x35, 0x02, 0x00, 0x01, 0x0d, 0x15, 0x05, 0x09, 0x03 -}; - -static const uint8_t fft_stereo_phase_huffbits[9] = { - 6, 2, 2, 4, 4, 6, 5, 4, 2 +static const uint8_t fft_stereo_phase[9][2] = { + { 2, 2 }, { 1, 2 }, { 3, 4 }, { 7, 4 }, { 6, 5 }, { 5, 6 }, { 0, 6 }, + { 4, 4 }, { 8, 2 }, }; static const int fft_cutoff_index_table[4][2] = { From patchwork Tue Nov 10 10:47:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23525 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 5C9B744A917 for ; Tue, 10 Nov 2020 13:00:14 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EAD7C68BEC8; Tue, 10 Nov 2020 12:50:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6BD0468BE78 for ; Tue, 10 Nov 2020 12:50:10 +0200 (EET) Received: by mail-wm1-f41.google.com with SMTP id d142so2521576wmd.4 for ; Tue, 10 Nov 2020 02:50:10 -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=9AA0fxygnUFVe8GHOmzL4Dkaz/c79eU3rfifXo3vUDI=; b=THfb7Go1RY4T/mBRB1EgujgjTWd7DY/oGhVzSw3d0GkqOQ0ZQeKe6bD9oAW7enusDb b7yX7VyM/hLWXYEFM6XTbmTdG/73muDRlIFYIIQOskSTf8zMCmezeddYXWKVM0bLjEsT Y4y0y8hUVdu0i8QoPUYGejaD07fx5KAFWbOgZ5j5SxAbXsFTHJeWQ2yY/fSQ97jewE8F k5Q6ksdFRGU3Af2HGv1kU3BB1Walkg9Uo9SaFJqiBns9g9WxTExX8on4uPIPcWW3JgeM 4RTnlUTOAN3qVkk52v/Q3XdbeD3B71WIRVrX0RcRPnEdxfWH5hnAm8kt7rjT9e5J5niu U6nw== 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=9AA0fxygnUFVe8GHOmzL4Dkaz/c79eU3rfifXo3vUDI=; b=dqvdCsXehbEKhHibZAjmZXFKZS+G+gmsnizuesJycZXi9kFE1JSYxc8dX54IfTZzfK CXE8Hm1abQgxvSjjaU3Q2ZWeG/vDbAwH0GsApc2Qap9PpfAEt+2oX9IoSdLleZuH519q 4njzi2yPsrJUPuNvgJDs58eLIiR0/c4DH9BKwMuNQT3748BJ38Hp7KqQ1vxKmJkP4sKg 4XjP7OanECKfFZAZjR0oxFeyL7qPGxmK7pOlaWyA76zvi+GnPLUVNy0kkMxvs8X3kw3X DseE9cUX0keYwqR5Rt6ro3cHmNwsMJfAOP1yRscYyVyF56czNJH++uDtUlWnP+1cBugu oO+g== X-Gm-Message-State: AOAM533f6hIyJXZJ6Jt8VmaNAMAPplrfm3GFhcwKpcR9ln2zxod/DO/G 2w7Yl+f4lxFr1qHzNcbROSf9LPlPRaE= X-Google-Smtp-Source: ABdhPJzf35MOjN7HDuzcxi/rj3vHoey0OAN00wix4rNmV8SD/ffeML6bOBT9OAg/KSVXXfkExY7hBg== X-Received: by 2002:a1c:df89:: with SMTP id w131mr3884670wmg.164.1605005409494; Tue, 10 Nov 2020 02:50:09 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:08 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:47 +0100 Message-Id: <20201110104851.321029-51-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 050/114] avcodec/qdm2_tablegen: Avoid code duplication when creating 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/qdm2_tablegen.h | 159 +++++++------------------------------ 1 file changed, 27 insertions(+), 132 deletions(-) diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h index 309bb4b53c..0e57902fc9 100644 --- a/libavcodec/qdm2_tablegen.h +++ b/libavcodec/qdm2_tablegen.h @@ -115,145 +115,40 @@ static const uint16_t qdm2_vlc_offs[] = { static VLC_TYPE qdm2_table[3838][2]; -static av_cold void qdm2_init_vlc(void) +static av_cold void build_vlc(VLC *vlc, int nb_bits, int nb_codes, int idx, + const uint8_t tab[][2]) { - vlc_tab_level.table = &qdm2_table[qdm2_vlc_offs[0]]; - vlc_tab_level.table_allocated = qdm2_vlc_offs[1] - qdm2_vlc_offs[0]; - ff_init_vlc_from_lengths(&vlc_tab_level, 8, 24, - &tab_level[0][1], 2, - &tab_level[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - vlc_tab_diff.table = &qdm2_table[qdm2_vlc_offs[1]]; - vlc_tab_diff.table_allocated = qdm2_vlc_offs[2] - qdm2_vlc_offs[1]; - ff_init_vlc_from_lengths(&vlc_tab_diff, 8, 33, - &tab_diff[0][1], 2, - &tab_diff[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - vlc_tab_run.table = &qdm2_table[qdm2_vlc_offs[2]]; - vlc_tab_run.table_allocated = qdm2_vlc_offs[3] - qdm2_vlc_offs[2]; - ff_init_vlc_from_lengths(&vlc_tab_run, 5, 6, - &tab_run[0][1], 2, - &tab_run[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - fft_level_exp_alt_vlc.table = &qdm2_table[qdm2_vlc_offs[3]]; - fft_level_exp_alt_vlc.table_allocated = qdm2_vlc_offs[4] - - qdm2_vlc_offs[3]; - ff_init_vlc_from_lengths(&fft_level_exp_alt_vlc, 8, 28, - &fft_level_exp_alt[0][1], 2, - &fft_level_exp_alt[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - fft_level_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[4]]; - fft_level_exp_vlc.table_allocated = qdm2_vlc_offs[5] - qdm2_vlc_offs[4]; - ff_init_vlc_from_lengths(&fft_level_exp_vlc, 8, 20, - &fft_level_exp[0][1], 2, - &fft_level_exp[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - fft_stereo_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[5]]; - fft_stereo_exp_vlc.table_allocated = qdm2_vlc_offs[6] - - qdm2_vlc_offs[5]; - ff_init_vlc_from_lengths(&fft_stereo_exp_vlc, 6, 7, - &fft_stereo_exp[0][1], 2, - &fft_stereo_exp[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - fft_stereo_phase_vlc.table = &qdm2_table[qdm2_vlc_offs[6]]; - fft_stereo_phase_vlc.table_allocated = qdm2_vlc_offs[7] - - qdm2_vlc_offs[6]; - ff_init_vlc_from_lengths(&fft_stereo_phase_vlc, 6, 9, - &fft_stereo_phase[0][1], 2, - &fft_stereo_phase[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - vlc_tab_tone_level_idx_hi1.table = - &qdm2_table[qdm2_vlc_offs[7]]; - vlc_tab_tone_level_idx_hi1.table_allocated = qdm2_vlc_offs[8] - - qdm2_vlc_offs[7]; - ff_init_vlc_from_lengths(&vlc_tab_tone_level_idx_hi1, 8, 20, - &tab_tone_level_idx_hi1[0][1], 2, - &tab_tone_level_idx_hi1[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - vlc_tab_tone_level_idx_mid.table = - &qdm2_table[qdm2_vlc_offs[8]]; - vlc_tab_tone_level_idx_mid.table_allocated = qdm2_vlc_offs[9] - - qdm2_vlc_offs[8]; - ff_init_vlc_from_lengths(&vlc_tab_tone_level_idx_mid, 8, 13, - &tab_tone_level_idx_mid[0][1], 2, - &tab_tone_level_idx_mid[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - vlc_tab_tone_level_idx_hi2.table = - &qdm2_table[qdm2_vlc_offs[9]]; - vlc_tab_tone_level_idx_hi2.table_allocated = qdm2_vlc_offs[10] - - qdm2_vlc_offs[9]; - ff_init_vlc_from_lengths(&vlc_tab_tone_level_idx_hi2, 8, 18, - &tab_tone_level_idx_hi2[0][1], 2, - &tab_tone_level_idx_hi2[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); - - vlc_tab_type30.table = &qdm2_table[qdm2_vlc_offs[10]]; - vlc_tab_type30.table_allocated = qdm2_vlc_offs[11] - qdm2_vlc_offs[10]; - ff_init_vlc_from_lengths(&vlc_tab_type30, 6, 9, - &tab_type30[0][1], 2, - &tab_type30[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + vlc->table = &qdm2_table[qdm2_vlc_offs[idx]]; + vlc->table_allocated = qdm2_vlc_offs[idx + 1] - qdm2_vlc_offs[idx]; + ff_init_vlc_from_lengths(vlc, nb_bits, nb_codes, + &tab[0][1], 2, &tab[0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_OUTPUT_LE); +} - vlc_tab_type34.table = &qdm2_table[qdm2_vlc_offs[11]]; - vlc_tab_type34.table_allocated = qdm2_vlc_offs[12] - qdm2_vlc_offs[11]; - ff_init_vlc_from_lengths(&vlc_tab_type34, 5, 10, - &tab_type34[0][1], 2, - &tab_type34[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); +static av_cold void qdm2_init_vlc(void) +{ + build_vlc(&vlc_tab_level, 8, 24, 0, tab_level); + build_vlc(&vlc_tab_diff, 8, 33, 1, tab_diff); + build_vlc(&vlc_tab_run, 5, 6, 2, tab_run); - vlc_tab_fft_tone_offset[0].table = - &qdm2_table[qdm2_vlc_offs[12]]; - vlc_tab_fft_tone_offset[0].table_allocated = qdm2_vlc_offs[13] - - qdm2_vlc_offs[12]; - ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[0], 8, 23, - &tab_fft_tone_offset_0[0][1], 2, - &tab_fft_tone_offset_0[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + build_vlc(&fft_level_exp_alt_vlc, 8, 28, 3, fft_level_exp_alt); + build_vlc(&fft_level_exp_vlc, 8, 20, 4, fft_level_exp); - vlc_tab_fft_tone_offset[1].table = - &qdm2_table[qdm2_vlc_offs[13]]; - vlc_tab_fft_tone_offset[1].table_allocated = qdm2_vlc_offs[14] - - qdm2_vlc_offs[13]; - ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[1], 8, 28, - &tab_fft_tone_offset_1[0][1], 2, - &tab_fft_tone_offset_1[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + build_vlc(&fft_stereo_exp_vlc, 6, 7, 5, fft_stereo_exp); + build_vlc(&fft_stereo_phase_vlc, 6, 9, 6, fft_stereo_phase); - vlc_tab_fft_tone_offset[2].table = - &qdm2_table[qdm2_vlc_offs[14]]; - vlc_tab_fft_tone_offset[2].table_allocated = qdm2_vlc_offs[15] - - qdm2_vlc_offs[14]; - ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[2], 8, 31, - &tab_fft_tone_offset_2[0][1], 2, - &tab_fft_tone_offset_2[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + build_vlc(&vlc_tab_tone_level_idx_hi1, 8, 20, 7, tab_tone_level_idx_hi1); + build_vlc(&vlc_tab_tone_level_idx_mid, 8, 13, 8, tab_tone_level_idx_mid); + build_vlc(&vlc_tab_tone_level_idx_hi2, 8, 18, 9, tab_tone_level_idx_hi2); - vlc_tab_fft_tone_offset[3].table = - &qdm2_table[qdm2_vlc_offs[15]]; - vlc_tab_fft_tone_offset[3].table_allocated = qdm2_vlc_offs[16] - - qdm2_vlc_offs[15]; - ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[3], 8, 34, - &tab_fft_tone_offset_3[0][1], 2, - &tab_fft_tone_offset_3[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + build_vlc(&vlc_tab_type30, 6, 9, 10, tab_type30); + build_vlc(&vlc_tab_type34, 5, 10, 11, tab_type34); - vlc_tab_fft_tone_offset[4].table = - &qdm2_table[qdm2_vlc_offs[16]]; - vlc_tab_fft_tone_offset[4].table_allocated = qdm2_vlc_offs[17] - - qdm2_vlc_offs[16]; - ff_init_vlc_from_lengths(&vlc_tab_fft_tone_offset[4], 8, 37, - &tab_fft_tone_offset_4[0][1], 2, - &tab_fft_tone_offset_4[0][0], 2, 1, 0, - INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + build_vlc(&vlc_tab_fft_tone_offset[0], 8, 23, 12, tab_fft_tone_offset_0); + build_vlc(&vlc_tab_fft_tone_offset[1], 8, 28, 13, tab_fft_tone_offset_1); + build_vlc(&vlc_tab_fft_tone_offset[2], 8, 31, 14, tab_fft_tone_offset_2); + build_vlc(&vlc_tab_fft_tone_offset[3], 8, 34, 15, tab_fft_tone_offset_3); + build_vlc(&vlc_tab_fft_tone_offset[4], 8, 37, 16, tab_fft_tone_offset_4); } #endif /* CONFIG_HARDCODED_TABLES */ From patchwork Tue Nov 10 10:47:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23529 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 9D6DC44ACE4 for ; Tue, 10 Nov 2020 13:01:10 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 20A4168BEDB; Tue, 10 Nov 2020 12:50:24 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 448A068BE97 for ; Tue, 10 Nov 2020 12:50:11 +0200 (EET) Received: by mail-wm1-f48.google.com with SMTP id c16so2538720wmd.2 for ; Tue, 10 Nov 2020 02:50:11 -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=Y2ou6A9f0fPXq01ixqmuZ5u7flfsr16S1gMrp2/B4oE=; b=hIg1AlB/EKz3opq0kkBGfN3ftbjYfJtcq3Hwz4fBSQONYZNoxWbZIzTt5tAqeQbXZQ iBNfGm5LOUgS++PayksOBGdVmN3V02VFP5y8oilctNV0/uaEqO3cPx6wv16r/LjVltSR dp873oMcj0DJDBMQ5JvckV37A3u2RwuguhkwepLoVWOuQeJLDRYP/FRkUQkvreFXRkDw 7v0dVDS0VPMoEL8rYsFf7KzWX/EfsXUpiNN3xm8aPtSEFMxw3J3GdaoTqSDA2OkxI8bc Ke7+0Gh3goShsSnBNSpepgwTS+a4S63RgJ0e2+jLmPsRDDNqZJR01BUIEfgxNdivInUg jCRg== 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=Y2ou6A9f0fPXq01ixqmuZ5u7flfsr16S1gMrp2/B4oE=; b=lXndcPIRBJ5r0RHRE3T4oHypr7jqomxJiNvYcaax8Sp0gJ2SdFwCYSbWwfCvt5xfVP CM3UQq6qq2Og3ZJK4+S46bAp5bC8Ncp7ddkyMCj2y2sMw0FE2drPb9Rln5U7Vlm5GLvq 7V30cx+0kwJVVeqXsGGvbZpzFH5Wz3p0b+hScVTmsh3VsOkfAjQMldu4psqpOPSrtiX8 ENPmyK94X1w3HZH20pteHOI9EYosIPxvg4DnQPkZ/ZITllgj3EE45MYNVz+JHcy1uDQk EBk/yNleGUFs4MnsebRrJrsQs9RfZUqudNKM89U3poLldd4Vk1dNU6pdipvF+EmPzDv1 P7kA== X-Gm-Message-State: AOAM533oygXxAbxrBbRRzfkdConRPh7k+gSqhxtWghjxtkG0bDm7MOR4 QRLg3ErCP7jtYhV1ekj4wib4e7JcodM= X-Google-Smtp-Source: ABdhPJy46vO9eyqb3kB7qHS+rH0I/nH2b8VBTU7Wr7dpJWb+ZsVOpMh/zPQG1pT72z7A1mjQq1fREA== X-Received: by 2002:a1c:7215:: with SMTP id n21mr3967417wmc.173.1605005410312; Tue, 10 Nov 2020 02:50:10 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:09 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:48 +0100 Message-Id: <20201110104851.321029-52-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 051/114] avcodec/qdm2: Apply offsets when 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/qdm2.c | 2 +- libavcodec/qdm2_tablegen.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index 657b2da64d..bdfe710840 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -205,7 +205,7 @@ static int qdm2_get_vlc(GetBitContext *gb, const VLC *vlc, int flag, int depth) value = get_vlc2(gb, vlc->table, vlc->bits, depth); /* stage-2, 3 bits exponent escape sequence */ - if (value-- == 0) + if (value < 0) value = get_bits(gb, get_bits(gb, 3) + 1); /* stage-3, optional */ diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h index 0e57902fc9..aaa7356caf 100644 --- a/libavcodec/qdm2_tablegen.h +++ b/libavcodec/qdm2_tablegen.h @@ -122,7 +122,7 @@ static av_cold void build_vlc(VLC *vlc, int nb_bits, int nb_codes, int idx, vlc->table_allocated = qdm2_vlc_offs[idx + 1] - qdm2_vlc_offs[idx]; ff_init_vlc_from_lengths(vlc, nb_bits, nb_codes, &tab[0][1], 2, &tab[0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC | INIT_VLC_OUTPUT_LE); + -1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_OUTPUT_LE); } static av_cold void qdm2_init_vlc(void) From patchwork Tue Nov 10 10:47:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23528 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 432EF44AA20 for ; Tue, 10 Nov 2020 13:00:56 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 402D168BED6; Tue, 10 Nov 2020 12:50:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1CAC768BE8F for ; Tue, 10 Nov 2020 12:50:12 +0200 (EET) Received: by mail-wm1-f53.google.com with SMTP id p19so1738817wmg.0 for ; Tue, 10 Nov 2020 02:50:12 -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=KEh2KgwHs/OE/Rzx+cuSBx3YlGZMQ4JXrzRhgEmlhro=; b=I6eY9cqrxFUvrA/tX8QAdTRxQl8mabIiOms6VLbcnrfpT/fv8XjjP7Ps4YQWUdhncb 94JszDJ7I3/0V9I2FQfUG4Xsdz4DWvNwXgUsku9eGZp1dkpFi20073gSvjDv2A3xvqfq Ll7ZigyxTnLavZOn+Lp48Ih8Qx3QYvgKa6gJDyjopRMcVVGW/TUvdh6sa7iD9ynOoG+h PHbn2cbBIg6iieS7T9vZnW+GCEf0pFUv7YQ/HxOIqKmPVdYNWZ+gPyfycJYgclAma91Z 5RsI+TVXNpWnxyw+wohCEoNnVeb3eOgrfmwMcZ8qj4klGwBKx8va8og9tX+Qwvof9M77 YzBA== 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=KEh2KgwHs/OE/Rzx+cuSBx3YlGZMQ4JXrzRhgEmlhro=; b=RPFEuhoSvmJt5le1IUTe7gw0e7EsZ7h+yfLlIl2PDIqtmyRsHKk4Q6J+DtsYrTiLci m6TVRnFr5Xz2JkPS15tFoDGoHLiRCm4aONJOfM1FnECZ1Nr7UJMoY48p919D/HoC2vuy hFCGKovDlqVsLHS9KD8JScZYPYnYfMS+kfhltrmRGGs++hYSlVd/FwU7L6POJyQk4fmB 6lnKegebqNr1wIv1GaLP4EkXLwaDZ8cuJUnL/oRm4ZJk94I1vaMtFP+6ukOqvlyY2/RV Jso9FnYv25fxTxRChZj/aQ+ZYQdcinojUHPB3AX86wOs6grJ+a8iOButlocYEpsbf2Ao B6yw== X-Gm-Message-State: AOAM5319MRGzvpJ1gG0/Eol85yHgXr90XAIAArkNZxktUYXmc9Z0eoiM dMo8APVEAPebW1cQG+7A6p4njxvaMPg= X-Google-Smtp-Source: ABdhPJztCZMnRUO2KLuvjAvRL8Cb7RqmDPi+fYgmZVlVXxoYwzIqXy3vbABD4jLJ6Y2PgaXRqXGrww== X-Received: by 2002:a7b:c1d8:: with SMTP id a24mr3886324wmj.112.1605005411317; Tue, 10 Nov 2020 02:50:11 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:10 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:49 +0100 Message-Id: <20201110104851.321029-53-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 052/114] avcodec/qdm2: Initialize array of VLCs in a loop 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/qdm2_tablegen.h | 12 +++++++----- libavcodec/qdm2data.h | 28 ++++++++++------------------ 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h index aaa7356caf..b60989e343 100644 --- a/libavcodec/qdm2_tablegen.h +++ b/libavcodec/qdm2_tablegen.h @@ -127,6 +127,8 @@ static av_cold void build_vlc(VLC *vlc, int nb_bits, int nb_codes, int idx, static av_cold void qdm2_init_vlc(void) { + const uint8_t (*tab)[2] = tab_fft_tone_offset; + build_vlc(&vlc_tab_level, 8, 24, 0, tab_level); build_vlc(&vlc_tab_diff, 8, 33, 1, tab_diff); build_vlc(&vlc_tab_run, 5, 6, 2, tab_run); @@ -144,11 +146,11 @@ static av_cold void qdm2_init_vlc(void) build_vlc(&vlc_tab_type30, 6, 9, 10, tab_type30); build_vlc(&vlc_tab_type34, 5, 10, 11, tab_type34); - build_vlc(&vlc_tab_fft_tone_offset[0], 8, 23, 12, tab_fft_tone_offset_0); - build_vlc(&vlc_tab_fft_tone_offset[1], 8, 28, 13, tab_fft_tone_offset_1); - build_vlc(&vlc_tab_fft_tone_offset[2], 8, 31, 14, tab_fft_tone_offset_2); - build_vlc(&vlc_tab_fft_tone_offset[3], 8, 34, 15, tab_fft_tone_offset_3); - build_vlc(&vlc_tab_fft_tone_offset[4], 8, 37, 16, tab_fft_tone_offset_4); + for (int i = 0; i < 5; i++) { + build_vlc(&vlc_tab_fft_tone_offset[i], 8, tab_fft_tone_offset_sizes[i], + 12 + i, tab); + tab += tab_fft_tone_offset_sizes[i]; + } } #endif /* CONFIG_HARDCODED_TABLES */ diff --git a/libavcodec/qdm2data.h b/libavcodec/qdm2data.h index 69f66b4571..713f584269 100644 --- a/libavcodec/qdm2data.h +++ b/libavcodec/qdm2data.h @@ -91,45 +91,37 @@ static const uint8_t tab_type34[10][2] = { { 4, 3 }, { 6, 3 }, { 5, 3 }, }; -/* values in this table range from -1..22; adjust retrieved value by -1 */ -static const uint8_t tab_fft_tone_offset_0[23][2] = { +static const uint8_t tab_fft_tone_offset_sizes[] = { + 23, 28, 31, 34, 37 +}; + +static const uint8_t tab_fft_tone_offset[][2] = { + /* First table - 23 entries with range -1..21 */ { 2, 2 }, { 7, 7 }, { 15, 8 }, { 21, 8 }, { 3, 6 }, { 6, 6 }, { 13, 7 }, { 14, 8 }, { 18, 8 }, { 4, 4 }, { 5, 5 }, { 11, 7 }, { 10, 7 }, { 20, 6 }, { 12, 8 }, { 16, 9 }, { 22, 10 }, { 0, 10 }, { 17, 7 }, { 19, 6 }, { 8, 6 }, { 9, 6 }, { 1, 1 }, -}; - -/* values in this table range from -1..27; adjust retrieved value by -1 */ -static const uint8_t tab_fft_tone_offset_1[28][2] = { + /* Second table - 28 entries with range -1..26 */ { 8, 6 }, { 2, 6 }, { 7, 6 }, { 23, 7 }, { 12, 7 }, { 5, 4 }, { 10, 6 }, { 20, 8 }, { 25, 9 }, { 26, 10 }, { 27, 11 }, { 0, 11 }, { 22, 7 }, { 9, 5 }, { 13, 6 }, { 17, 6 }, { 4, 5 }, { 14, 6 }, { 19, 7 }, { 24, 7 }, { 3, 6 }, { 11, 6 }, { 21, 6 }, { 18, 6 }, { 16, 6 }, { 15, 6 }, { 6, 3 }, { 1, 1 }, -}; - -/* values in this table range from -1..31; adjust retrieved value by -1 */ -static const uint8_t tab_fft_tone_offset_2[31][2] = { + /* Third table - 31 entries with range -1..30 (1 omitted) */ { 14, 7 }, { 17, 7 }, { 15, 7 }, { 23, 9 }, { 28, 10 }, { 29, 11 }, { 30, 13 }, { 0, 13 }, { 31, 12 }, { 25, 8 }, { 10, 5 }, { 8, 4 }, { 9, 4 }, { 4, 4 }, { 22, 8 }, { 3, 8 }, { 21, 8 }, { 26, 9 }, { 27, 9 }, { 12, 6 }, { 11, 5 }, { 16, 7 }, { 18, 7 }, { 20, 8 }, { 24, 8 }, { 19, 7 }, { 13, 5 }, { 5, 3 }, { 1, 2 }, { 6, 3 }, { 7, 3 }, -}; - -/* values in this table range from -1..34; adjust retrieved value by -1 */ -static const uint8_t tab_fft_tone_offset_3[34][2] = { + /* Fourth table - 34 entries with range -1..33 (1 omitted) */ { 4, 4 }, { 7, 4 }, { 10, 4 }, { 3, 10 }, { 27, 10 }, { 29, 10 }, { 28, 10 }, { 22, 8 }, { 21, 7 }, { 15, 6 }, { 14, 5 }, { 8, 4 }, { 16, 6 }, { 19, 7 }, { 23, 8 }, { 26, 9 }, { 30, 10 }, { 33, 13 }, { 34, 14 }, { 0, 14 }, { 32, 12 }, { 31, 11 }, { 12, 5 }, { 5, 3 }, { 9, 3 }, { 1, 4 }, { 20, 7 }, { 25, 8 }, { 24, 8 }, { 18, 6 }, { 17, 5 }, { 6, 3 }, { 11, 4 }, { 13, 4 }, -}; - -/* values in this table range from -1..37; adjust retrieved value by -1 */ -static const uint8_t tab_fft_tone_offset_4[37][2] = { + /* Fifth table - 37 entries with range -1..36 (1 omitted) */ { 5, 3 }, { 4, 3 }, { 19, 8 }, { 33, 12 }, { 31, 12 }, { 28, 11 }, { 34, 14 }, { 37, 14 }, { 35, 15 }, { 0, 15 }, { 36, 14 }, { 32, 12 }, { 30, 11 }, { 24, 9 }, { 22, 8 }, { 23, 9 }, { 29, 10 }, { 27, 10 }, From patchwork Tue Nov 10 10:47:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23531 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 A051444ACE4 for ; Tue, 10 Nov 2020 13:01:35 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F290268BEE9; Tue, 10 Nov 2020 12:50:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 20B4968BE48 for ; Tue, 10 Nov 2020 12:50:12 +0200 (EET) Received: by mail-wm1-f54.google.com with SMTP id w24so2552505wmi.0 for ; Tue, 10 Nov 2020 02:50:12 -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=Km0opZp3yZoRibySuEdHS0HnJEI+BjXByLrv7vldUMQ=; b=JiUCNd5ZqxMHlpN73hlx167HebQoaVWrDz5I6XXQ5ScZcylWRp+55xDneyL7eYc5Hz 7j/OnAUFm8QW/N0ZJoG0ULF1SOshVkANf9eFVkgk5uNGn3wMdDMX9aSuPmpVUUHnaIMu +YjefTzysCBj8ISlvzhW+HOz8WHcJ37mOKgFzOzXMVsVVYeboAeELTdLarCSp1+KehmY OZdyJ3B3NhRKOmk20zLEB0ME3wdR/bbwAKmfcLLuYuuRmwTgLSOyE17Je93YHZ6Xjt92 8EaN9I8I82QCfplasEGKCD0rtahF6UmLlk7INh622wYqmlgFlK9iocmABPvhhXMVv1Zi +Lrw== 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=Km0opZp3yZoRibySuEdHS0HnJEI+BjXByLrv7vldUMQ=; b=Gej8tk8ZD4Rw17hsrDJeWOu0jdb9wDd46KTa+QL+D65dNZzbRWDKAd6ta1iwzYgX2M gUOlN8wVg6XtiTZEoqJvCVHmm2HRQG0a3ThPMrEC/DFkxITuJE39QWte60MLRt1NcSXq /K8kKJevz/Z2pMcZaW5F54a0Gi9gKDH5h1qDPeqGjUKvLChrzFtytmEUlfSw/kDz69NY 8tnRT8UCNlocTS1VUuXgT/NClfPLuz3YQxpVsyIhbjHpPhJUysH2x4NMvpFOi5vREJLD FMEoOC2uvtEhwh6bKn73os31o4nuKi54Q1jrZeC5vBf6NE3Yy+hofBrj6o/O6BKo6vMw Hk9g== X-Gm-Message-State: AOAM533EE13Ax5Q0ckSzZ1bDto93+T1KyhywShqLj0nJl1NlpciLe+uX bKqtFnCuxzHOfpO1Kel8+Zb4jyEKqPg= X-Google-Smtp-Source: ABdhPJw2G8KKqAGMLRPhZ0A5gkbX6Ae9irCPZ3S6xY8MDQGvfDE2WoqbBDO3QpsxB23tdGsKdNJhtA== X-Received: by 2002:a1c:490b:: with SMTP id w11mr4062605wma.101.1605005412218; Tue, 10 Nov 2020 02:50:12 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:11 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:50 +0100 Message-Id: <20201110104851.321029-54-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 053/114] avcodec/qdm2: Avoid offsets table when 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/qdm2_tablegen.h | 40 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h index b60989e343..e492f7bb60 100644 --- a/libavcodec/qdm2_tablegen.h +++ b/libavcodec/qdm2_tablegen.h @@ -109,46 +109,44 @@ static VLC vlc_tab_type30; static VLC vlc_tab_type34; static VLC vlc_tab_fft_tone_offset[5]; -static const uint16_t qdm2_vlc_offs[] = { - 0,260,566,598,894,1166,1230,1294,1678,1950,2214,2278,2310,2570,2834,3124,3448,3838, -}; - static VLC_TYPE qdm2_table[3838][2]; -static av_cold void build_vlc(VLC *vlc, int nb_bits, int nb_codes, int idx, - const uint8_t tab[][2]) +static av_cold void build_vlc(VLC *vlc, int nb_bits, int nb_codes, + unsigned *offset, const uint8_t tab[][2]) { - vlc->table = &qdm2_table[qdm2_vlc_offs[idx]]; - vlc->table_allocated = qdm2_vlc_offs[idx + 1] - qdm2_vlc_offs[idx]; + vlc->table = &qdm2_table[*offset]; + vlc->table_allocated = FF_ARRAY_ELEMS(qdm2_table) - *offset; ff_init_vlc_from_lengths(vlc, nb_bits, nb_codes, &tab[0][1], 2, &tab[0][0], 2, 1, -1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_OUTPUT_LE); + *offset += vlc->table_size; } static av_cold void qdm2_init_vlc(void) { const uint8_t (*tab)[2] = tab_fft_tone_offset; + unsigned offset = 0; - build_vlc(&vlc_tab_level, 8, 24, 0, tab_level); - build_vlc(&vlc_tab_diff, 8, 33, 1, tab_diff); - build_vlc(&vlc_tab_run, 5, 6, 2, tab_run); + build_vlc(&vlc_tab_level, 8, 24, &offset, tab_level); + build_vlc(&vlc_tab_diff, 8, 33, &offset, tab_diff); + build_vlc(&vlc_tab_run, 5, 6, &offset, tab_run); - build_vlc(&fft_level_exp_alt_vlc, 8, 28, 3, fft_level_exp_alt); - build_vlc(&fft_level_exp_vlc, 8, 20, 4, fft_level_exp); + build_vlc(&fft_level_exp_alt_vlc, 8, 28, &offset, fft_level_exp_alt); + build_vlc(&fft_level_exp_vlc, 8, 20, &offset, fft_level_exp); - build_vlc(&fft_stereo_exp_vlc, 6, 7, 5, fft_stereo_exp); - build_vlc(&fft_stereo_phase_vlc, 6, 9, 6, fft_stereo_phase); + build_vlc(&fft_stereo_exp_vlc, 6, 7, &offset, fft_stereo_exp); + build_vlc(&fft_stereo_phase_vlc, 6, 9, &offset, fft_stereo_phase); - build_vlc(&vlc_tab_tone_level_idx_hi1, 8, 20, 7, tab_tone_level_idx_hi1); - build_vlc(&vlc_tab_tone_level_idx_mid, 8, 13, 8, tab_tone_level_idx_mid); - build_vlc(&vlc_tab_tone_level_idx_hi2, 8, 18, 9, tab_tone_level_idx_hi2); + build_vlc(&vlc_tab_tone_level_idx_hi1, 8, 20, &offset, tab_tone_level_idx_hi1); + build_vlc(&vlc_tab_tone_level_idx_mid, 8, 13, &offset, tab_tone_level_idx_mid); + build_vlc(&vlc_tab_tone_level_idx_hi2, 8, 18, &offset, tab_tone_level_idx_hi2); - build_vlc(&vlc_tab_type30, 6, 9, 10, tab_type30); - build_vlc(&vlc_tab_type34, 5, 10, 11, tab_type34); + build_vlc(&vlc_tab_type30, 6, 9, &offset, tab_type30); + build_vlc(&vlc_tab_type34, 5, 10, &offset, tab_type34); for (int i = 0; i < 5; i++) { build_vlc(&vlc_tab_fft_tone_offset[i], 8, tab_fft_tone_offset_sizes[i], - 12 + i, tab); + &offset, tab); tab += tab_fft_tone_offset_sizes[i]; } } From patchwork Tue Nov 10 10:47:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23532 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 D5E8944ACE4 for ; Tue, 10 Nov 2020 13:01:47 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 460FA68BEEB; Tue, 10 Nov 2020 12:50:27 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1334268BE87 for ; Tue, 10 Nov 2020 12:50:13 +0200 (EET) Received: by mail-wm1-f65.google.com with SMTP id a65so2542072wme.1 for ; Tue, 10 Nov 2020 02:50:13 -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=OMMeiBWr4E7o0Yi5ZGh4lDiy4V1jsrDbUiYAp46X0Js=; b=ETT2ylkIDgW+M6xqUPdpL/2htH04vYkFaQAJ/9oQZ1eiRbHffHhXRQt9TB/BVod7Uu xp1PhS4DHsuvLxoCWGuVWjYnpFFj0AhU9tsSrNnsYOZtkz66h9pxK4Ok336jNtJMeSAP qshdwcUE2Ch08cvR704NadPnMjpWacvHFCgSJW6+AT3L++xD7yaaPLJsE10b9ztf8lMI Od1JJV0GEVKP8neCV6yZ+GwmaMHqvLd0u6xEMyJbfD6Dx0P2X5UtsrYEi1OAtrFZOI70 vf0BiOOd5lDtiS/qIzqJflkomSIpMeGcASsveXbcaNqmBdBs1YxKesZLiqthyGxd2xBW Bnkw== 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=OMMeiBWr4E7o0Yi5ZGh4lDiy4V1jsrDbUiYAp46X0Js=; b=JYvJxHMiIWpl8g9+Pha/BzeV6OJc2ellgn2Unw2TjvrtFATBLx5/ggm7HFD9vp0svu KSM5sdn2N5k8reuSta5LFHRfiuI6UFua9RxGUMlsGmuOoSCQ8lL4dWVnVvcLGT4wN/Sm 3rUCrK5WHSxxQPq2daVhfKUEeoeaGVarL+WThIcopyEFF+ITojiwRWZ+DHt020e+6XHO nrSj7Lp6GtZxVWgJT8cBz26bS/06w6ok8g+s8C/wQr6Uf9mfyXLZXZz3MkdvwuUupVoM 8a8+EPzNMnNqsGUm6uApFMaEN/5baZIeBzX/M5+ZwWfTazTsWK6M03bK7ZGJkw5eqylY WO+w== X-Gm-Message-State: AOAM533seJEzr74l71mv8BluD8sh2qKBCtrHug515pgbLsHwQChq+j0/ 8g+aTRdWsR9GkBqhHJ/q/krsBDQtVv4= X-Google-Smtp-Source: ABdhPJwPk1P5qF8ptyXRiGyhfVuSm4CSJe4BQs5dIlZi8K/U2CLjoB8CTpfoEwTRQb5lFecQOuSD+g== X-Received: by 2002:a1c:a7ce:: with SMTP id q197mr4121186wme.138.1605005413225; Tue, 10 Nov 2020 02:50:13 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:12 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:51 +0100 Message-Id: <20201110104851.321029-55-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 054/114] avcodec/rv40vlc2: Make VLC smaller 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/rv40vlc2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/rv40vlc2.h b/libavcodec/rv40vlc2.h index 15119a145b..4cdc7a4193 100644 --- a/libavcodec/rv40vlc2.h +++ b/libavcodec/rv40vlc2.h @@ -33,7 +33,7 @@ * codes used for the first four block types */ //@{ -#define AIC_TOP_BITS 8 +#define AIC_TOP_BITS 7 #define AIC_TOP_SIZE 16 static const uint8_t rv40_aic_top_vlc_codes[AIC_TOP_SIZE] = { 0x01, 0x05, 0x01, 0x00, 0x03, 0x3D, 0x1D, 0x02, From patchwork Tue Nov 10 10:47:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23536 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 3696B44AD0B for ; Tue, 10 Nov 2020 13:02:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 070A068BE62; Tue, 10 Nov 2020 12:50:33 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9D7F168BEB2 for ; Tue, 10 Nov 2020 12:50:16 +0200 (EET) Received: by mail-wm1-f45.google.com with SMTP id 10so2535062wml.2 for ; Tue, 10 Nov 2020 02:50:16 -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=rIGRvVlZOMi/6QJZGtg7LPlxd0P3bs0Gt4jNroOCDjQ=; b=RKRJF5XKI1nZEymTHqVgClgDref2nOl63+LuxnKaczHC0JmrSxsO11ITcr+tYSPEDQ 5GChw/f9Ae+d7G8Bntmvn3ImAA8MMQJY94dNI7KkQVFpXa0h/DZdy6twBeLsY+PBw60R vowPtJP4+vryJsHifO0+X8jCcGaKlcExcKU0ayzDEhJHMfiL8RGjFtDDwmbH2pe3wQm5 Pag42xyXcl1xcSN47vLfA+ZWDs8QxsAzpXk3wIdYLHld2rFYbEfMnlEmdb7uWrnZgeVy jAJLA/BDWip51p6sGuO75ZBSK23ltWjoQkaXL1dvaIFckgqf04dotWShI3mBUm3ifJpE jNYg== 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=rIGRvVlZOMi/6QJZGtg7LPlxd0P3bs0Gt4jNroOCDjQ=; b=dohbG1tOsZ3f3dMgsQ4+K7Pv3gKch8QyOAyy3YR0kaoaRMWjdu/b0c90XNMw8fH2+S jjoe8CIq9EHFkhaCnVl5QyofMl38TI3/EcvBmKBx/nDHnvqpzFrTs3fqHP2Ae8Sa7BbN /P4G50ykZpjKOoMqhZXxXcqFV20LvO/umEZCet+EZQzCTXyl0WBzRQyC8uo5EyUnY7hu vuzo6TMiVqrLgGHSPTNE5wtS0bkVs9lk4T6KvQvL13NTZPJHyBDBJeWQeOWO0GND6pSD YQ1Sb3Xiv+MlW9f4NJsmhVAZYSDgRqCJ9+v/Dr8fK1iwZfBnr8ytAQktmR1sN+gKdsyr 9FLw== X-Gm-Message-State: AOAM530yT49PYA7KGKNaMYsDmIX0m7hIuR7LoCvyZN+bikDS1b35A/wR m//icjLll1BdDdYE4ApK59m/zgq0vTI= X-Google-Smtp-Source: ABdhPJzszYLoYGVtHMO9rbRt0uWQ1ElxWOF8VvMl+sD3+nBxouTwOWbq3P7gsIYvJDhWyzjc/EhYAw== X-Received: by 2002:a7b:cc13:: with SMTP id f19mr3973379wmh.44.1605005414205; Tue, 10 Nov 2020 02:50:14 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:13 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:52 +0100 Message-Id: <20201110104851.321029-56-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 055/114] avcodec/rv40: Make the tables used to initialize VLCs smaller 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" After permuting the codes, symbols and lengths tables used to initialize the VLC so that the codes are ordered from left to right in the Huffman tree, the codes become redundant as they can be easily computed from the lengths at runtime; in this case one has to use explicit symbol tables, but all the symbols used here fit into an uint8_t, whereas some codes needed uint16_t. This saves about 1.6KB. Signed-off-by: Andreas Rheinhardt --- libavcodec/rv40.c | 22 +- libavcodec/rv40vlc2.h | 754 +++++++++++++++++++----------------------- 2 files changed, 360 insertions(+), 416 deletions(-) diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 462024c81e..3334331658 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -73,25 +73,25 @@ static av_cold void rv40_init_tables(void) for(i = 0; i < AIC_MODE2_NUM; i++){ aic_mode2_vlc[i].table = &aic_mode2_table[mode2_offs[i]]; aic_mode2_vlc[i].table_allocated = mode2_offs[i + 1] - mode2_offs[i]; - init_vlc(&aic_mode2_vlc[i], AIC_MODE2_BITS, AIC_MODE2_SIZE, - aic_mode2_vlc_bits[i], 1, 1, - aic_mode2_vlc_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&aic_mode2_vlc[i], AIC_MODE2_BITS, AIC_MODE2_SIZE, + aic_mode2_vlc_bits[i], 1, + aic_mode2_vlc_syms[i], 1, 1, 0, INIT_VLC_USE_NEW_STATIC); } for(i = 0; i < NUM_PTYPE_VLCS; i++){ ptype_vlc[i].table = &ptype_table[i << PTYPE_VLC_BITS]; ptype_vlc[i].table_allocated = 1 << PTYPE_VLC_BITS; - ff_init_vlc_sparse(&ptype_vlc[i], PTYPE_VLC_BITS, PTYPE_VLC_SIZE, - ptype_vlc_bits[i], 1, 1, - ptype_vlc_codes[i], 1, 1, - ptype_vlc_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ptype_vlc[i], PTYPE_VLC_BITS, PTYPE_VLC_SIZE, + &ptype_vlc_tabs[i][0][1], 2, + &ptype_vlc_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); } for(i = 0; i < NUM_BTYPE_VLCS; i++){ btype_vlc[i].table = &btype_table[i << BTYPE_VLC_BITS]; btype_vlc[i].table_allocated = 1 << BTYPE_VLC_BITS; - ff_init_vlc_sparse(&btype_vlc[i], BTYPE_VLC_BITS, BTYPE_VLC_SIZE, - btype_vlc_bits[i], 1, 1, - btype_vlc_codes[i], 1, 1, - btype_vlc_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&btype_vlc[i], BTYPE_VLC_BITS, BTYPE_VLC_SIZE, + &btype_vlc_tabs[i][0][1], 2, + &btype_vlc_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); } } diff --git a/libavcodec/rv40vlc2.h b/libavcodec/rv40vlc2.h index 4cdc7a4193..58974f6451 100644 --- a/libavcodec/rv40vlc2.h +++ b/libavcodec/rv40vlc2.h @@ -53,370 +53,330 @@ static const uint8_t rv40_aic_top_vlc_bits[AIC_TOP_SIZE] = { #define AIC_MODE2_SIZE 81 #define AIC_MODE2_BITS 9 -static const uint16_t aic_mode2_vlc_codes[AIC_MODE2_NUM][AIC_MODE2_SIZE] = { -{ 0x0001, 0x0001, 0x0005, 0x01F5, 0x0011, 0x0049, 0x0000, 0x0048, 0x004B, - 0x0035, 0x0003, 0x0034, 0x03C9, 0x01F4, 0x00C9, 0x004A, 0x0FD9, 0x03C8, - 0x0010, 0x0037, 0x0001, 0x00C8, 0x0075, 0x01F7, 0x00CB, 0x0074, 0x0002, - 0x01F6, 0x00CA, 0x01F1, 0x01F0, 0x1F81, 0x07F9, 0x1F80, 0x1F83, 0x07F8, - 0x0077, 0x00F5, 0x0036, 0x07FB, 0x0076, 0x1F82, 0x00F4, 0x00F7, 0x07FA, - 0x0071, 0x00F6, 0x03CB, 0x03CA, 0x0FD8, 0x00F1, 0x03F5, 0x1F8D, 0x07E5, - 0x0013, 0x0031, 0x00F0, 0x0FDB, 0x00F3, 0x07E4, 0x0030, 0x01F3, 0x07E7, - 0x03F4, 0x07E6, 0x0070, 0x3F19, 0x01F2, 0x3F18, 0x0FDA, 0x0033, 0x07E1, - 0x01FD, 0x01FC, 0x0073, 0x01FF, 0x0FC5, 0x0FC4, 0x0FC7, 0x03F7, 0x0072, }, -{ 0x0005, 0x0005, 0x0005, 0x0079, 0x0005, 0x000D, 0x001D, 0x0078, 0x0069, - 0x0004, 0x0001, 0x0007, 0x0068, 0x001C, 0x001F, 0x0004, 0x006B, 0x000C, - 0x0004, 0x001E, 0x0006, 0x006A, 0x0015, 0x000F, 0x0014, 0x0017, 0x0007, - 0x0016, 0x000E, 0x0011, 0x0009, 0x00D1, 0x00D0, 0x0181, 0x00D3, 0x007B, - 0x0010, 0x0013, 0x0004, 0x00D2, 0x0007, 0x0319, 0x0008, 0x007A, 0x00DD, - 0x0019, 0x0006, 0x000B, 0x0065, 0x00DC, 0x0012, 0x0064, 0x0180, 0x00DF, - 0x0006, 0x0018, 0x0001, 0x00DE, 0x001D, 0x00D9, 0x001B, 0x0067, 0x000A, - 0x00D8, 0x00DB, 0x001C, 0x0318, 0x00DA, 0x0635, 0x0183, 0x0000, 0x00C5, - 0x0066, 0x0061, 0x0035, 0x00C4, 0x0182, 0x0634, 0x031B, 0x00C7, 0x001F, }, -{ 0x0005, 0x0001, 0x001D, 0x01C1, 0x0035, 0x00F1, 0x006D, 0x00F0, 0x0049, - 0x0000, 0x0004, 0x0003, 0x00F3, 0x0048, 0x0034, 0x006C, 0x01C0, 0x01C3, - 0x0007, 0x0006, 0x0001, 0x006F, 0x0002, 0x004B, 0x006E, 0x001C, 0x0005, - 0x0069, 0x0068, 0x006B, 0x0037, 0x01C2, 0x00F2, 0x0395, 0x01CD, 0x00FD, - 0x006A, 0x0036, 0x0015, 0x01CC, 0x0014, 0x0394, 0x004A, 0x00FC, 0x00FF, - 0x0017, 0x0031, 0x00FE, 0x01CF, 0x0397, 0x00F9, 0x01CE, 0x0725, 0x0396, - 0x0016, 0x0030, 0x0075, 0x0724, 0x00F8, 0x0727, 0x0033, 0x0391, 0x0390, - 0x0011, 0x0032, 0x001F, 0x00FB, 0x0074, 0x0726, 0x00FA, 0x001E, 0x0077, - 0x0019, 0x0018, 0x0004, 0x0010, 0x003D, 0x0076, 0x0071, 0x0013, 0x0001, }, -{ 0x000D, 0x0019, 0x0011, 0x0015, 0x0061, 0x0019, 0x0014, 0x01AD, 0x0060, - 0x0018, 0x0001, 0x0005, 0x001B, 0x0010, 0x0019, 0x0005, 0x0017, 0x0018, - 0x0016, 0x0004, 0x0004, 0x0013, 0x000C, 0x0012, 0x001A, 0x0018, 0x0005, - 0x000F, 0x001B, 0x0004, 0x001D, 0x0011, 0x001C, 0x0010, 0x000E, 0x001B, - 0x0013, 0x001F, 0x001A, 0x0029, 0x0005, 0x0063, 0x001E, 0x0009, 0x0062, - 0x0008, 0x0007, 0x0007, 0x0019, 0x0004, 0x001A, 0x0018, 0x006D, 0x0007, - 0x001B, 0x0007, 0x001A, 0x006C, 0x0006, 0x0012, 0x0005, 0x006F, 0x000B, - 0x006E, 0x0069, 0x001D, 0x0359, 0x0028, 0x002B, 0x002A, 0x001C, 0x00D5, - 0x0358, 0x001F, 0x0001, 0x001E, 0x0068, 0x00D4, 0x00D7, 0x0019, 0x0000, }, -{ 0x00B9, 0x0061, 0x0060, 0x00B8, 0x02B5, 0x01AD, 0x00BB, 0x0AF5, 0x0151, - 0x0001, 0x0001, 0x0005, 0x0000, 0x0003, 0x0005, 0x0004, 0x0063, 0x0025, - 0x00BA, 0x0004, 0x0007, 0x0062, 0x00A5, 0x0024, 0x006D, 0x0002, 0x006C, - 0x02B4, 0x000D, 0x006F, 0x0027, 0x00A4, 0x0026, 0x01AC, 0x0150, 0x01AF, - 0x01AE, 0x0021, 0x006E, 0x02B7, 0x0020, 0x0153, 0x0023, 0x00A7, 0x0152, - 0x00A6, 0x0006, 0x000C, 0x0022, 0x01A9, 0x0019, 0x002D, 0x02B6, 0x01A8, - 0x000F, 0x0007, 0x000E, 0x00A1, 0x0069, 0x002C, 0x0001, 0x01AB, 0x00A0, - 0x02B1, 0x00A3, 0x002F, 0x0AF4, 0x02B0, 0x0AF7, 0x02B3, 0x0068, 0x015D, - 0x0AF6, 0x01AA, 0x0055, 0x015C, 0x02B2, 0x0579, 0x0578, 0x015F, 0x00A2, }, -{ 0x0905, 0x013D, 0x013C, 0x0904, 0x121D, 0x049D, 0x049C, 0x243D, 0x0907, - 0x00ED, 0x0001, 0x0015, 0x0041, 0x013F, 0x0031, 0x0014, 0x025D, 0x025C, - 0x013E, 0x000D, 0x0000, 0x0040, 0x0139, 0x0043, 0x0030, 0x0017, 0x0033, - 0x0906, 0x0032, 0x0042, 0x00EC, 0x025F, 0x00EF, 0x025E, 0x049F, 0x0138, - 0x0901, 0x013B, 0x0259, 0x121C, 0x049E, 0x0900, 0x0258, 0x243C, 0x121F, - 0x0903, 0x003D, 0x00EE, 0x025B, 0x025A, 0x004D, 0x013A, 0x0902, 0x0245, - 0x00E9, 0x0016, 0x00E8, 0x0499, 0x0125, 0x0244, 0x004C, 0x0498, 0x090D, - 0x00EB, 0x003C, 0x0011, 0x049B, 0x049A, 0x0485, 0x00EA, 0x003F, 0x0124, - 0x090C, 0x003E, 0x0039, 0x0095, 0x0247, 0x0246, 0x0484, 0x0094, 0x0038, }, -{ 0x0F09, 0x00CD, 0x01FD, 0x0791, 0x1E6D, 0x0790, 0x03D9, 0x3CD1, 0x3CD0, - 0x0075, 0x0001, 0x0001, 0x0035, 0x00CC, 0x0011, 0x0000, 0x03D8, 0x01FC, - 0x03DB, 0x0010, 0x0003, 0x00CF, 0x03DA, 0x00CE, 0x0074, 0x0034, 0x0077, - 0x0793, 0x0013, 0x0076, 0x0071, 0x03C5, 0x0070, 0x01FF, 0x0792, 0x01FE, - 0x01F9, 0x0037, 0x00C9, 0x0F08, 0x01F8, 0x03C4, 0x00C8, 0x0F0B, 0x079D, - 0x03C7, 0x0001, 0x0012, 0x0073, 0x00CB, 0x0005, 0x0036, 0x03C6, 0x0072, - 0x007D, 0x0002, 0x00CA, 0x079C, 0x01FB, 0x00F5, 0x0031, 0x079F, 0x0F0A, - 0x0F35, 0x079E, 0x01FA, 0x1E6C, 0x1E6F, 0x3CD3, 0x0799, 0x03C1, 0x1E6E, - 0x3CD2, 0x0030, 0x00F4, 0x007C, 0x03C0, 0x03C3, 0x0798, 0x01E5, 0x00F7, }, -{ 0x01A5, 0x0001, 0x001D, 0x0021, 0x00A1, 0x000D, 0x0061, 0x06B9, 0x00A0, - 0x0060, 0x0001, 0x0005, 0x000C, 0x0020, 0x001C, 0x0004, 0x01A4, 0x01A7, - 0x00A3, 0x001F, 0x001E, 0x0023, 0x0022, 0x002D, 0x002C, 0x0063, 0x0062, - 0x1A81, 0x01A6, 0x01A1, 0x06B8, 0x06BB, 0x00A2, 0x06BA, 0x0D59, 0x06A5, - 0x01A0, 0x000F, 0x006D, 0x06A4, 0x002F, 0x00AD, 0x006C, 0x06A7, 0x00AC, - 0x0D58, 0x000E, 0x01A3, 0x00AF, 0x00AE, 0x006F, 0x01A2, 0x0D5B, 0x00A9, - 0x0019, 0x0001, 0x0009, 0x00A8, 0x006E, 0x002E, 0x0000, 0x01AD, 0x00AB, - 0x00AA, 0x0355, 0x0029, 0x1A80, 0x1A83, 0x1A82, 0x0354, 0x01AC, 0x0D5A, - 0x1A8D, 0x01AF, 0x0357, 0x0D45, 0x0D44, 0x0D47, 0x1A8C, 0x06A6, 0x06A1, }, -{ 0x0001, 0x0011, 0x0005, 0x0775, 0x00F9, 0x00F8, 0x0031, 0x0030, 0x0049, - 0x00FB, 0x0010, 0x0033, 0x0EC9, 0x038D, 0x038C, 0x00FA, 0x038F, 0x0774, - 0x0048, 0x0032, 0x0000, 0x01D5, 0x00E5, 0x038E, 0x00E4, 0x0013, 0x000D, - 0x0389, 0x0777, 0x0388, 0x038B, 0x1DF9, 0x0EC8, 0x3BC9, 0x1DF8, 0x038A, - 0x03B5, 0x0776, 0x00E7, 0x3BC8, 0x01D4, 0x3BCB, 0x0ECB, 0x0771, 0x0ECA, - 0x01D7, 0x03B4, 0x01D6, 0x1DFB, 0x0EF5, 0x0770, 0x0EF4, 0x3BCA, 0x0773, - 0x00E6, 0x03B7, 0x004B, 0x1DFA, 0x03B6, 0x0EF7, 0x00E1, 0x0EF6, 0x0EF1, - 0x03B1, 0x01D1, 0x003D, 0x0EF0, 0x0772, 0x077D, 0x077C, 0x003C, 0x01D0, - 0x03B0, 0x01D3, 0x003F, 0x03B3, 0x01D2, 0x0EF3, 0x077F, 0x00E0, 0x004A, }, -{ 0x0015, 0x0049, 0x0014, 0x07D1, 0x03FD, 0x03FC, 0x01C1, 0x01C0, 0x00F1, - 0x0017, 0x0001, 0x0001, 0x01C3, 0x0048, 0x004B, 0x0016, 0x0031, 0x01C2, - 0x004A, 0x0011, 0x0000, 0x01CD, 0x00F0, 0x01CC, 0x0075, 0x0010, 0x000D, - 0x03FF, 0x01CF, 0x01CE, 0x07D0, 0x0F81, 0x07D3, 0x1F1D, 0x0F80, 0x07D2, - 0x01C9, 0x03FE, 0x0074, 0x07DD, 0x00F3, 0x1F1C, 0x07DC, 0x03F9, 0x07DF, - 0x00F2, 0x00FD, 0x0077, 0x07DE, 0x07D9, 0x01C8, 0x07D8, 0x0F83, 0x03F8, - 0x0030, 0x0076, 0x0013, 0x0F82, 0x00FC, 0x03FB, 0x0033, 0x03FA, 0x03E5, - 0x03E4, 0x01CB, 0x0032, 0x1F1F, 0x03E7, 0x07DB, 0x07DA, 0x003D, 0x01CA, - 0x07C5, 0x03E6, 0x0071, 0x0F8D, 0x07C4, 0x1F1E, 0x0F8C, 0x03E1, 0x01F5, }, -{ 0x0019, 0x0065, 0x0018, 0x0351, 0x0350, 0x0353, 0x0021, 0x0020, 0x0064, - 0x001D, 0x0005, 0x0005, 0x01A5, 0x0023, 0x0067, 0x0005, 0x0066, 0x0022, - 0x001B, 0x0004, 0x0001, 0x0004, 0x001C, 0x0061, 0x001A, 0x0005, 0x0004, - 0x0007, 0x002D, 0x0006, 0x002C, 0x01A4, 0x002F, 0x0352, 0x035D, 0x0060, - 0x0001, 0x002E, 0x001F, 0x035C, 0x0000, 0x06B1, 0x01A7, 0x0029, 0x01A6, - 0x0028, 0x0063, 0x0062, 0x035F, 0x01A1, 0x002B, 0x06B0, 0x06B3, 0x01A0, - 0x0003, 0x006D, 0x001E, 0x035E, 0x006C, 0x06B2, 0x0002, 0x01A3, 0x01A2, - 0x000D, 0x0005, 0x0007, 0x01AD, 0x006F, 0x002A, 0x006E, 0x0004, 0x0004, - 0x000C, 0x0007, 0x0006, 0x000F, 0x000E, 0x00D5, 0x0009, 0x0006, 0x0007, }, -{ 0x0065, 0x0181, 0x0064, 0x36C9, 0x06D5, 0x0DB5, 0x0379, 0x0180, 0x0183, - 0x00D5, 0x001D, 0x001C, 0x0DB4, 0x0182, 0x0378, 0x00D4, 0x00D7, 0x06D4, - 0x0067, 0x001F, 0x0001, 0x00D6, 0x00D1, 0x018D, 0x0066, 0x0001, 0x0000, - 0x037B, 0x06D7, 0x037A, 0x0DB7, 0x36C8, 0x06D6, 0x0DB6, 0x1B79, 0x0DB1, - 0x018C, 0x0365, 0x00D0, 0x1B78, 0x00D3, 0x1B7B, 0x0364, 0x06D1, 0x06D0, - 0x018F, 0x018E, 0x00D2, 0x36CB, 0x0367, 0x0366, 0x06D3, 0x0DB0, 0x06D2, - 0x0361, 0x06DD, 0x0189, 0x36CA, 0x0360, 0x36F5, 0x0188, 0x0DB3, 0x36F4, - 0x0009, 0x0008, 0x0005, 0x06DC, 0x00DD, 0x018B, 0x00DC, 0x0004, 0x000B, - 0x018A, 0x0061, 0x0003, 0x0363, 0x00DF, 0x06DF, 0x0362, 0x000A, 0x001E, }, -{ 0x001D, 0x0061, 0x000D, 0x0D55, 0x06B9, 0x06B8, 0x01A5, 0x0021, 0x0020, - 0x0023, 0x000C, 0x0060, 0x0D54, 0x00AD, 0x00AC, 0x0022, 0x00AF, 0x06BB, - 0x000F, 0x001C, 0x0001, 0x002D, 0x0063, 0x01A4, 0x000E, 0x0001, 0x0005, - 0x01A7, 0x06BA, 0x01A6, 0x06A5, 0x0D57, 0x0D56, 0x1ABD, 0x0D51, 0x00AE, - 0x002C, 0x00A9, 0x002F, 0x0D50, 0x01A1, 0x1ABC, 0x06A4, 0x06A7, 0x06A6, - 0x00A8, 0x06A1, 0x01A0, 0x1ABF, 0x0D53, 0x06A0, 0x0D52, 0x1ABE, 0x06A3, - 0x0062, 0x002E, 0x0009, 0x0D5D, 0x01A3, 0x0D5C, 0x006D, 0x00AB, 0x06A2, - 0x006C, 0x001F, 0x0001, 0x06AD, 0x0029, 0x01A2, 0x0028, 0x0004, 0x001E, - 0x01AD, 0x006F, 0x0000, 0x01AC, 0x01AF, 0x06AC, 0x00AA, 0x006E, 0x0019, }, -{ 0x0019, 0x007D, 0x0018, 0x01B5, 0x000D, 0x01B4, 0x007C, 0x007F, 0x01B7, - 0x000C, 0x001B, 0x001A, 0x01B6, 0x000F, 0x00D5, 0x0019, 0x007E, 0x00D4, - 0x0018, 0x001B, 0x0001, 0x000E, 0x0011, 0x0009, 0x0005, 0x0005, 0x0005, - 0x00D7, 0x01B1, 0x0008, 0x01B0, 0x0079, 0x06FD, 0x0371, 0x0370, 0x00D6, - 0x0078, 0x01B3, 0x0010, 0x0373, 0x0013, 0x06FC, 0x007B, 0x007A, 0x00D1, - 0x00D0, 0x00D3, 0x0065, 0x0372, 0x06FF, 0x0064, 0x06FE, 0x037D, 0x00D2, - 0x00DD, 0x0067, 0x0004, 0x037C, 0x0012, 0x01B2, 0x0007, 0x0066, 0x01BD, - 0x0006, 0x0061, 0x0004, 0x01BC, 0x001A, 0x0060, 0x001D, 0x0004, 0x001C, - 0x0063, 0x0001, 0x0007, 0x000B, 0x0000, 0x0062, 0x000A, 0x0005, 0x0007, }, -{ 0x0069, 0x0045, 0x0068, 0x04BD, 0x0255, 0x04BC, 0x00E5, 0x00E4, 0x0031, - 0x0030, 0x0019, 0x0001, 0x0121, 0x00E7, 0x00E6, 0x0033, 0x00E1, 0x00E0, - 0x006B, 0x0018, 0x0001, 0x0044, 0x0032, 0x0047, 0x006A, 0x001B, 0x0005, - 0x003D, 0x0046, 0x0015, 0x0041, 0x0120, 0x0123, 0x04BF, 0x0122, 0x0040, - 0x003C, 0x00E3, 0x0014, 0x0254, 0x0043, 0x0975, 0x012D, 0x00E2, 0x00ED, - 0x0042, 0x00EC, 0x004D, 0x0257, 0x0256, 0x0251, 0x04BE, 0x0974, 0x0250, - 0x00EF, 0x00EE, 0x004C, 0x04B9, 0x012C, 0x04B8, 0x004F, 0x04BB, 0x0253, - 0x003F, 0x0017, 0x0001, 0x0252, 0x00E9, 0x00E8, 0x00EB, 0x0000, 0x0003, - 0x0016, 0x0002, 0x0004, 0x004E, 0x003E, 0x00EA, 0x0049, 0x000D, 0x0007, }, -{ 0x000D, 0x01BD, 0x000C, 0x0D31, 0x0D30, 0x0D33, 0x0359, 0x0358, 0x002D, - 0x0065, 0x001D, 0x001C, 0x0D32, 0x035B, 0x035A, 0x002C, 0x01BC, 0x0345, - 0x000F, 0x001F, 0x0001, 0x002F, 0x0064, 0x01BF, 0x0067, 0x0001, 0x0005, - 0x0066, 0x002E, 0x0061, 0x0029, 0x0695, 0x0694, 0x0697, 0x0696, 0x0060, - 0x01BE, 0x0D3D, 0x0028, 0x1A49, 0x0344, 0x1A48, 0x1A4B, 0x0D3C, 0x0691, - 0x002B, 0x01B9, 0x002A, 0x0D3F, 0x0690, 0x0347, 0x0D3E, 0x1A4A, 0x0346, - 0x00D5, 0x0341, 0x0063, 0x0D39, 0x0340, 0x0D38, 0x01B8, 0x0D3B, 0x0D3A, - 0x00D4, 0x0062, 0x0000, 0x0693, 0x01BB, 0x0343, 0x0342, 0x001E, 0x000E, - 0x006D, 0x0009, 0x0001, 0x006C, 0x00D7, 0x034D, 0x01BA, 0x0008, 0x0004, }, -{ 0x0075, 0x00CD, 0x0035, 0x03C1, 0x03C0, 0x07F9, 0x03C3, 0x1F8D, 0x00CC, - 0x0074, 0x0011, 0x0010, 0x03C2, 0x0FD9, 0x01F1, 0x00CF, 0x03CD, 0x00CE, - 0x0034, 0x0001, 0x0001, 0x0037, 0x00C9, 0x00C8, 0x0036, 0x0000, 0x0001, - 0x0FD8, 0x03CC, 0x00CB, 0x01F0, 0x07F8, 0x03CF, 0x07FB, 0x07FA, 0x00CA, - 0x01F3, 0x03CE, 0x00F5, 0x0FDB, 0x00F4, 0x07E5, 0x07E4, 0x07E7, 0x01F2, - 0x07E6, 0x03C9, 0x01FD, 0x0FDA, 0x1F8C, 0x07E1, 0x1F8F, 0x1F8E, 0x03C8, - 0x03CB, 0x0077, 0x0076, 0x0FC5, 0x03CA, 0x07E0, 0x00F7, 0x0FC4, 0x03F5, - 0x00F6, 0x01FC, 0x0003, 0x03F4, 0x0071, 0x03F7, 0x00F1, 0x0013, 0x0031, - 0x0030, 0x0070, 0x0005, 0x0012, 0x0073, 0x01FF, 0x0072, 0x007D, 0x0002, }, -{ 0x0061, 0x0055, 0x0060, 0x02C9, 0x02C8, 0x02CB, 0x0171, 0x00B5, 0x0054, - 0x0001, 0x0001, 0x0001, 0x0057, 0x0001, 0x0063, 0x001D, 0x0062, 0x0039, - 0x006D, 0x0000, 0x0005, 0x0038, 0x0056, 0x00B4, 0x006C, 0x0003, 0x001C, - 0x006F, 0x003B, 0x0002, 0x003A, 0x0170, 0x00B7, 0x0173, 0x0051, 0x006E, - 0x0025, 0x0050, 0x0069, 0x02CA, 0x0024, 0x0027, 0x0172, 0x00B6, 0x00B1, - 0x000D, 0x000C, 0x001F, 0x017D, 0x0026, 0x0068, 0x0053, 0x017C, 0x006B, - 0x001E, 0x000F, 0x0004, 0x017F, 0x006A, 0x02F5, 0x0019, 0x0021, 0x0052, - 0x02F4, 0x02F7, 0x0020, 0x0BCD, 0x05E5, 0x05E4, 0x0BCC, 0x0023, 0x00B0, - 0x02F6, 0x00B3, 0x0022, 0x02F1, 0x02F0, 0x0BCF, 0x0BCE, 0x017E, 0x005D, }, -{ 0x00BD, 0x0025, 0x01A1, 0x0159, 0x0299, 0x00BC, 0x0024, 0x0505, 0x0504, - 0x01A0, 0x0001, 0x001D, 0x006D, 0x001C, 0x0001, 0x0005, 0x0027, 0x01A3, - 0x0158, 0x001F, 0x001E, 0x01A2, 0x0026, 0x0021, 0x000D, 0x0020, 0x0023, - 0x0298, 0x006C, 0x0022, 0x00BF, 0x00BE, 0x01AD, 0x002D, 0x029B, 0x00B9, - 0x01AC, 0x00B8, 0x01AF, 0x029A, 0x006F, 0x015B, 0x006E, 0x0285, 0x0284, - 0x01AE, 0x0019, 0x002C, 0x01A9, 0x01A8, 0x000C, 0x000F, 0x015A, 0x00BB, - 0x000E, 0x0000, 0x0069, 0x01AB, 0x0018, 0x01AA, 0x0004, 0x0055, 0x00BA, - 0x0507, 0x0145, 0x0054, 0x0506, 0x00A5, 0x0501, 0x00A4, 0x0057, 0x0500, - 0x0A05, 0x0144, 0x00A7, 0x0287, 0x0286, 0x0503, 0x0147, 0x0A04, 0x0146, }, -{ 0x0759, 0x0041, 0x00E5, 0x03BD, 0x0E9D, 0x012D, 0x012C, 0x3A1D, 0x03BC, - 0x012F, 0x000D, 0x0040, 0x00E4, 0x03BF, 0x0043, 0x0042, 0x0758, 0x03BE, - 0x00E7, 0x0001, 0x0000, 0x003D, 0x00E6, 0x0015, 0x0014, 0x0017, 0x003C, - 0x743D, 0x012E, 0x03B9, 0x03B8, 0x0E9C, 0x03BB, 0x075B, 0x3A1C, 0x0E9F, - 0x0129, 0x00E1, 0x0128, 0x0E9E, 0x012B, 0x075A, 0x00E0, 0x0E99, 0x0745, - 0x3A1F, 0x03BA, 0x0744, 0x0E98, 0x1D0D, 0x03A5, 0x0E9B, 0x743C, 0x0E9A, - 0x012A, 0x004D, 0x00E3, 0x0E85, 0x01D5, 0x0E84, 0x004C, 0x0747, 0x1D0C, - 0x01D4, 0x003F, 0x0016, 0x0746, 0x03A4, 0x0741, 0x004F, 0x003E, 0x01D7, - 0x0740, 0x000C, 0x0011, 0x004E, 0x00E2, 0x00ED, 0x00EC, 0x0049, 0x0048, }, +static const uint8_t aic_mode2_vlc_syms[AIC_MODE2_NUM][AIC_MODE2_SIZE] = { + { + 0x06, 0x01, 0x1A, 0x0A, 0x14, 0x12, 0x04, 0x07, 0x05, 0x0F, 0x08, 0x36, + 0x02, 0x3C, 0x37, 0x15, 0x0E, 0x1C, 0x18, 0x46, 0x0B, 0x09, 0x26, 0x13, + 0x41, 0x2D, 0x50, 0x4A, 0x19, 0x16, 0x28, 0x24, 0x38, 0x32, 0x11, 0x0C, + 0x30, 0x2F, 0x3A, 0x2A, 0x25, 0x2E, 0x2B, 0x1E, 0x1D, 0x43, 0x3D, 0x0D, + 0x03, 0x1B, 0x17, 0x21, 0x1F, 0x29, 0x22, 0x47, 0x4D, 0x4C, 0x44, 0x42, + 0x34, 0x4E, 0x3B, 0x35, 0x40, 0x3E, 0x3F, 0x33, 0x31, 0x10, 0x45, 0x39, + 0x4F, 0x49, 0x48, 0x23, 0x20, 0x2C, 0x27, 0x4B, 0x00, + }, + { + 0x46, 0x38, 0x2A, 0x1E, 0x3E, 0x2F, 0x11, 0x05, 0x1C, 0x17, 0x26, 0x04, + 0x2E, 0x28, 0x24, 0x1D, 0x32, 0x25, 0x18, 0x16, 0x1B, 0x19, 0x34, 0x21, + 0x4C, 0x45, 0x49, 0x4B, 0x47, 0x42, 0x29, 0x4D, 0x44, 0x4E, 0x4F, 0x33, + 0x30, 0x48, 0x3D, 0x20, 0x1F, 0x27, 0x22, 0x4A, 0x3F, 0x3B, 0x43, 0x40, + 0x31, 0x2C, 0x39, 0x35, 0x41, 0x3A, 0x07, 0x03, 0x2B, 0x23, 0x50, 0x12, + 0x01, 0x36, 0x1A, 0x0F, 0x02, 0x37, 0x2D, 0x0C, 0x08, 0x15, 0x10, 0x3C, + 0x0D, 0x06, 0x13, 0x0E, 0x09, 0x00, 0x14, 0x0B, 0x0A, + }, + { + 0x09, 0x01, 0x16, 0x0B, 0x50, 0x4B, 0x3F, 0x0D, 0x08, 0x2A, 0x17, 0x4F, + 0x28, 0x26, 0x36, 0x2D, 0x37, 0x2E, 0x40, 0x3C, 0x0E, 0x04, 0x25, 0x1E, + 0x10, 0x03, 0x1F, 0x11, 0x4E, 0x3E, 0x3D, 0x39, 0x34, 0x44, 0x3B, 0x29, + 0x21, 0x35, 0x31, 0x27, 0x22, 0x33, 0x30, 0x43, 0x38, 0x4D, 0x47, 0x07, + 0x05, 0x20, 0x0C, 0x4C, 0x3A, 0x32, 0x45, 0x42, 0x2B, 0x23, 0x2F, 0x2C, + 0x0A, 0x00, 0x13, 0x12, 0x4A, 0x1A, 0x49, 0x48, 0x1C, 0x1B, 0x24, 0x1D, + 0x0F, 0x06, 0x18, 0x15, 0x19, 0x02, 0x46, 0x41, 0x14, + }, + { + 0x50, 0x4A, 0x2D, 0x2B, 0x43, 0x27, 0x45, 0x44, 0x3E, 0x16, 0x00, 0x22, + 0x1B, 0x31, 0x28, 0x3A, 0x35, 0x21, 0x1F, 0x3B, 0x24, 0x06, 0x03, 0x12, + 0x10, 0x08, 0x04, 0x2C, 0x29, 0x4F, 0x4C, 0x40, 0x4D, 0x47, 0x48, 0x42, + 0x07, 0x4E, 0x39, 0x34, 0x3F, 0x3D, 0x46, 0x41, 0x4B, 0x49, 0x1D, 0x1A, + 0x11, 0x05, 0x26, 0x23, 0x2F, 0x0D, 0x02, 0x17, 0x15, 0x3C, 0x33, 0x30, + 0x38, 0x36, 0x20, 0x1E, 0x2A, 0x25, 0x13, 0x0B, 0x09, 0x01, 0x18, 0x0C, + 0x37, 0x14, 0x0F, 0x19, 0x0E, 0x32, 0x1C, 0x2E, 0x0A, + }, + { + 0x0C, 0x09, 0x19, 0x0D, 0x3C, 0x28, 0x25, 0x30, 0x2A, 0x17, 0x11, 0x20, + 0x1E, 0x3E, 0x39, 0x50, 0x40, 0x1F, 0x16, 0x2D, 0x2B, 0x22, 0x08, 0x2C, + 0x29, 0x4A, 0x43, 0x3F, 0x4C, 0x45, 0x1B, 0x04, 0x34, 0x27, 0x4B, 0x47, + 0x4E, 0x4D, 0x42, 0x07, 0x48, 0x44, 0x4F, 0x3B, 0x33, 0x03, 0x00, 0x12, + 0x06, 0x41, 0x2F, 0x1C, 0x38, 0x36, 0x13, 0x0E, 0x2E, 0x14, 0x0F, 0x0B, + 0x02, 0x01, 0x15, 0x10, 0x32, 0x46, 0x3A, 0x35, 0x31, 0x49, 0x3D, 0x21, + 0x05, 0x24, 0x23, 0x1A, 0x18, 0x26, 0x1D, 0x37, 0x0A, + }, + { + 0x14, 0x0A, 0x15, 0x0C, 0x1D, 0x17, 0x41, 0x29, 0x24, 0x34, 0x2D, 0x03, + 0x00, 0x1B, 0x08, 0x4E, 0x44, 0x48, 0x3E, 0x27, 0x04, 0x2B, 0x07, 0x2C, + 0x3B, 0x35, 0x4D, 0x4C, 0x47, 0x3A, 0x3D, 0x39, 0x43, 0x42, 0x06, 0x05, + 0x28, 0x22, 0x4F, 0x4B, 0x2A, 0x26, 0x31, 0x30, 0x11, 0x10, 0x21, 0x1F, + 0x3C, 0x32, 0x23, 0x16, 0x33, 0x25, 0x02, 0x01, 0x12, 0x0D, 0x0F, 0x0B, + 0x37, 0x19, 0x18, 0x0E, 0x1C, 0x1A, 0x13, 0x50, 0x4A, 0x38, 0x36, 0x45, + 0x3F, 0x1E, 0x09, 0x2F, 0x20, 0x40, 0x2E, 0x49, 0x46, + }, + { + 0x0F, 0x0B, 0x37, 0x14, 0x2E, 0x13, 0x0E, 0x2F, 0x1C, 0x32, 0x49, 0x3C, + 0x2A, 0x26, 0x38, 0x31, 0x0D, 0x01, 0x17, 0x15, 0x19, 0x0C, 0x33, 0x25, + 0x20, 0x1E, 0x35, 0x30, 0x18, 0x09, 0x1D, 0x1A, 0x4C, 0x46, 0x27, 0x00, + 0x3E, 0x2B, 0x4D, 0x29, 0x1F, 0x34, 0x2D, 0x05, 0x03, 0x22, 0x1B, 0x4F, + 0x4E, 0x45, 0x08, 0x07, 0x48, 0x44, 0x3F, 0x42, 0x04, 0x47, 0x43, 0x39, + 0x2C, 0x40, 0x3D, 0x4A, 0x3B, 0x10, 0x06, 0x16, 0x12, 0x50, 0x4B, 0x36, + 0x28, 0x24, 0x41, 0x3A, 0x11, 0x02, 0x23, 0x21, 0x0A, + }, + { + 0x3C, 0x01, 0x0D, 0x03, 0x16, 0x15, 0x38, 0x08, 0x04, 0x20, 0x12, 0x41, + 0x39, 0x35, 0x3F, 0x3E, 0x2C, 0x29, 0x31, 0x30, 0x18, 0x17, 0x3B, 0x28, + 0x0C, 0x05, 0x2E, 0x25, 0x37, 0x0F, 0x0B, 0x09, 0x06, 0x1A, 0x19, 0x36, + 0x24, 0x1D, 0x33, 0x2F, 0x10, 0x00, 0x1C, 0x11, 0x42, 0x1B, 0x44, 0x43, + 0x50, 0x4C, 0x4B, 0x4E, 0x48, 0x4D, 0x27, 0x23, 0x4F, 0x2B, 0x45, 0x40, + 0x2D, 0x22, 0x47, 0x34, 0x4A, 0x46, 0x3D, 0x1E, 0x07, 0x21, 0x1F, 0x49, + 0x2A, 0x26, 0x3A, 0x32, 0x0E, 0x02, 0x14, 0x13, 0x0A, + }, + { + 0x14, 0x00, 0x0A, 0x01, 0x12, 0x08, 0x50, 0x38, 0x19, 0x02, 0x07, 0x06, + 0x13, 0x0B, 0x1A, 0x4F, 0x3C, 0x1D, 0x1B, 0x23, 0x1E, 0x0E, 0x0D, 0x17, + 0x10, 0x18, 0x16, 0x36, 0x26, 0x47, 0x40, 0x4C, 0x49, 0x28, 0x15, 0x2F, + 0x2D, 0x48, 0x3F, 0x20, 0x0C, 0x2C, 0x2A, 0x4B, 0x2E, 0x24, 0x3A, 0x37, + 0x32, 0x2B, 0x43, 0x35, 0x11, 0x03, 0x25, 0x1C, 0x42, 0x3E, 0x27, 0x21, + 0x34, 0x29, 0x4D, 0x33, 0x31, 0x3D, 0x3B, 0x45, 0x44, 0x22, 0x1F, 0x39, + 0x30, 0x4E, 0x46, 0x41, 0x05, 0x04, 0x0F, 0x09, 0x4A, + }, + { + 0x14, 0x0B, 0x19, 0x13, 0x0D, 0x01, 0x12, 0x0E, 0x38, 0x02, 0x00, 0x0F, + 0x09, 0x36, 0x10, 0x41, 0x3C, 0x1A, 0x07, 0x06, 0x11, 0x0C, 0x4A, 0x32, + 0x24, 0x47, 0x40, 0x17, 0x15, 0x1D, 0x1C, 0x26, 0x18, 0x37, 0x2F, 0x16, + 0x08, 0x2D, 0x28, 0x46, 0x22, 0x1F, 0x39, 0x34, 0x4F, 0x4C, 0x48, 0x4E, + 0x4B, 0x29, 0x21, 0x4D, 0x42, 0x3F, 0x3E, 0x49, 0x43, 0x1E, 0x03, 0x23, + 0x20, 0x50, 0x33, 0x31, 0x45, 0x44, 0x2A, 0x27, 0x30, 0x2C, 0x3A, 0x2E, + 0x35, 0x2B, 0x3D, 0x3B, 0x05, 0x04, 0x25, 0x1B, 0x0A, + }, + { + 0x28, 0x24, 0x3C, 0x36, 0x15, 0x0F, 0x1D, 0x1B, 0x07, 0x06, 0x11, 0x0D, + 0x4E, 0x2D, 0x2B, 0x44, 0x32, 0x1E, 0x1C, 0x25, 0x20, 0x48, 0x3F, 0x4C, + 0x4B, 0x47, 0x40, 0x4F, 0x49, 0x46, 0x0B, 0x23, 0x17, 0x2F, 0x2E, 0x08, + 0x01, 0x10, 0x0E, 0x35, 0x31, 0x3E, 0x3D, 0x1F, 0x0C, 0x2C, 0x2A, 0x04, + 0x03, 0x21, 0x05, 0x4D, 0x33, 0x29, 0x3B, 0x34, 0x42, 0x27, 0x22, 0x39, + 0x30, 0x3A, 0x37, 0x45, 0x43, 0x16, 0x09, 0x38, 0x26, 0x13, 0x0A, 0x02, + 0x00, 0x18, 0x12, 0x50, 0x1A, 0x19, 0x4A, 0x41, 0x14, + }, + { + 0x1A, 0x19, 0x40, 0x3F, 0x4F, 0x47, 0x4A, 0x14, 0x46, 0x41, 0x07, 0x01, + 0x0D, 0x08, 0x49, 0x3C, 0x38, 0x48, 0x44, 0x24, 0x17, 0x2E, 0x2D, 0x02, + 0x00, 0x18, 0x12, 0x26, 0x16, 0x2F, 0x28, 0x0F, 0x09, 0x15, 0x10, 0x3A, + 0x36, 0x4E, 0x4B, 0x2A, 0x25, 0x32, 0x31, 0x2C, 0x2B, 0x35, 0x33, 0x11, + 0x04, 0x20, 0x1C, 0x34, 0x23, 0x1F, 0x03, 0x39, 0x30, 0x3D, 0x0C, 0x05, + 0x21, 0x1E, 0x42, 0x37, 0x27, 0x22, 0x3E, 0x3B, 0x29, 0x4D, 0x45, 0x43, + 0x0E, 0x06, 0x1D, 0x1B, 0x4C, 0x0B, 0x0A, 0x50, 0x13, + }, + { + 0x4A, 0x19, 0x08, 0x07, 0x0F, 0x09, 0x38, 0x45, 0x43, 0x2D, 0x25, 0x4E, + 0x3D, 0x0E, 0x0D, 0x23, 0x10, 0x24, 0x15, 0x37, 0x26, 0x0A, 0x02, 0x18, + 0x12, 0x41, 0x46, 0x1A, 0x0B, 0x01, 0x36, 0x16, 0x50, 0x2F, 0x28, 0x44, + 0x3A, 0x17, 0x06, 0x1D, 0x1B, 0x32, 0x2E, 0x3E, 0x35, 0x2A, 0x1E, 0x2C, + 0x2B, 0x27, 0x22, 0x33, 0x31, 0x0C, 0x03, 0x20, 0x1F, 0x4D, 0x42, 0x3B, + 0x39, 0x29, 0x21, 0x34, 0x30, 0x4B, 0x48, 0x05, 0x04, 0x1C, 0x11, 0x4C, + 0x3F, 0x3C, 0x4F, 0x49, 0x13, 0x00, 0x47, 0x40, 0x14, + }, + { + 0x4C, 0x49, 0x1D, 0x17, 0x4E, 0x4B, 0x09, 0x04, 0x15, 0x0D, 0x38, 0x18, + 0x3F, 0x3C, 0x26, 0x16, 0x3A, 0x28, 0x4F, 0x44, 0x40, 0x4D, 0x48, 0x32, + 0x2F, 0x3D, 0x37, 0x2D, 0x2C, 0x35, 0x2E, 0x11, 0x0E, 0x23, 0x1B, 0x1E, + 0x1C, 0x3B, 0x25, 0x05, 0x03, 0x0C, 0x08, 0x22, 0x21, 0x30, 0x27, 0x36, + 0x42, 0x3E, 0x39, 0x34, 0x29, 0x20, 0x33, 0x31, 0x47, 0x45, 0x24, 0x1F, + 0x2B, 0x2A, 0x06, 0x01, 0x10, 0x07, 0x46, 0x1A, 0x02, 0x00, 0x0B, 0x0A, + 0x50, 0x41, 0x19, 0x12, 0x0F, 0x43, 0x13, 0x4A, 0x14, + }, + { + 0x46, 0x0B, 0x49, 0x47, 0x41, 0x23, 0x1E, 0x2D, 0x28, 0x15, 0x01, 0x1C, + 0x17, 0x1F, 0x0C, 0x22, 0x20, 0x4E, 0x35, 0x32, 0x42, 0x3E, 0x27, 0x04, + 0x31, 0x30, 0x3A, 0x2A, 0x3B, 0x39, 0x34, 0x29, 0x3D, 0x05, 0x03, 0x33, + 0x21, 0x38, 0x2F, 0x4B, 0x3C, 0x26, 0x1D, 0x48, 0x40, 0x09, 0x08, 0x16, + 0x0F, 0x4F, 0x11, 0x10, 0x2B, 0x25, 0x07, 0x06, 0x0E, 0x0D, 0x44, 0x43, + 0x4D, 0x45, 0x2E, 0x2C, 0x37, 0x36, 0x24, 0x1B, 0x4C, 0x3F, 0x14, 0x4A, + 0x1A, 0x13, 0x0A, 0x02, 0x00, 0x18, 0x12, 0x19, 0x50, + }, + { + 0x41, 0x19, 0x4F, 0x49, 0x26, 0x1E, 0x2F, 0x2D, 0x0F, 0x08, 0x1C, 0x15, + 0x02, 0x00, 0x47, 0x12, 0x4A, 0x50, 0x1A, 0x23, 0x1D, 0x40, 0x38, 0x16, + 0x09, 0x1B, 0x18, 0x3A, 0x37, 0x45, 0x44, 0x28, 0x11, 0x35, 0x32, 0x31, + 0x2C, 0x29, 0x27, 0x34, 0x2A, 0x42, 0x20, 0x1F, 0x22, 0x21, 0x04, 0x03, + 0x0C, 0x05, 0x4D, 0x3B, 0x39, 0x3E, 0x3D, 0x2B, 0x25, 0x33, 0x30, 0x3F, + 0x36, 0x07, 0x06, 0x0E, 0x0D, 0x4C, 0x4B, 0x48, 0x3C, 0x2E, 0x4E, 0x43, + 0x10, 0x01, 0x24, 0x17, 0x0B, 0x0A, 0x46, 0x13, 0x14, + }, + { + 0x19, 0x13, 0x50, 0x41, 0x1A, 0x0B, 0x0A, 0x4B, 0x46, 0x4A, 0x48, 0x47, + 0x17, 0x16, 0x23, 0x1D, 0x08, 0x01, 0x11, 0x0F, 0x12, 0x02, 0x18, 0x15, + 0x49, 0x43, 0x4E, 0x4C, 0x09, 0x00, 0x38, 0x37, 0x04, 0x03, 0x0C, 0x06, + 0x45, 0x35, 0x2E, 0x3A, 0x36, 0x1C, 0x10, 0x25, 0x20, 0x28, 0x26, 0x3F, + 0x3C, 0x1E, 0x0E, 0x2C, 0x24, 0x4F, 0x3B, 0x32, 0x3D, 0x39, 0x31, 0x07, + 0x34, 0x33, 0x2A, 0x29, 0x2D, 0x2B, 0x42, 0x3E, 0x1B, 0x0D, 0x30, 0x27, + 0x44, 0x40, 0x2F, 0x1F, 0x05, 0x22, 0x21, 0x4D, 0x14, + }, + { + 0x13, 0x0D, 0x1D, 0x19, 0x09, 0x41, 0x3D, 0x4A, 0x46, 0x28, 0x24, 0x31, + 0x29, 0x25, 0x22, 0x3E, 0x33, 0x08, 0x01, 0x16, 0x0C, 0x47, 0x2C, 0x04, + 0x03, 0x27, 0x05, 0x49, 0x17, 0x07, 0x2B, 0x20, 0x1F, 0x06, 0x2A, 0x21, + 0x50, 0x4C, 0x4B, 0x44, 0x43, 0x45, 0x42, 0x4E, 0x4D, 0x3F, 0x3B, 0x48, + 0x40, 0x34, 0x30, 0x4F, 0x39, 0x2E, 0x2D, 0x15, 0x11, 0x1E, 0x1C, 0x37, + 0x0B, 0x38, 0x14, 0x02, 0x00, 0x10, 0x0E, 0x3C, 0x32, 0x26, 0x3A, 0x35, + 0x18, 0x12, 0x23, 0x1B, 0x1A, 0x0F, 0x36, 0x2F, 0x0A, + }, + { + 0x37, 0x0E, 0x19, 0x17, 0x1D, 0x1A, 0x06, 0x01, 0x16, 0x10, 0x47, 0x44, + 0x4F, 0x48, 0x4D, 0x08, 0x07, 0x42, 0x3F, 0x2C, 0x2B, 0x4C, 0x4B, 0x49, + 0x40, 0x50, 0x4E, 0x45, 0x43, 0x1B, 0x04, 0x27, 0x22, 0x4A, 0x41, 0x3D, + 0x12, 0x03, 0x34, 0x29, 0x46, 0x2F, 0x21, 0x25, 0x23, 0x3E, 0x35, 0x05, + 0x00, 0x1F, 0x1E, 0x32, 0x18, 0x36, 0x33, 0x0A, 0x3C, 0x0F, 0x3A, 0x2E, + 0x09, 0x02, 0x15, 0x11, 0x38, 0x31, 0x30, 0x3B, 0x39, 0x24, 0x20, 0x2D, + 0x26, 0x1C, 0x0C, 0x2A, 0x28, 0x0D, 0x0B, 0x14, 0x13, + }, + { + 0x14, 0x13, 0x0B, 0x01, 0x0F, 0x0E, 0x4A, 0x50, 0x4F, 0x26, 0x24, 0x36, + 0x28, 0x06, 0x05, 0x1C, 0x09, 0x3C, 0x37, 0x4B, 0x45, 0x18, 0x17, 0x41, + 0x19, 0x49, 0x0A, 0x2A, 0x25, 0x4C, 0x38, 0x0C, 0x02, 0x16, 0x12, 0x48, + 0x44, 0x3B, 0x39, 0x3E, 0x31, 0x22, 0x07, 0x34, 0x1B, 0x2D, 0x2F, 0x2C, + 0x42, 0x3D, 0x43, 0x32, 0x30, 0x2B, 0x35, 0x33, 0x1F, 0x04, 0x27, 0x23, + 0x3F, 0x3A, 0x10, 0x00, 0x29, 0x21, 0x47, 0x4E, 0x4D, 0x1E, 0x1D, 0x2E, + 0x20, 0x08, 0x03, 0x11, 0x0D, 0x1A, 0x15, 0x46, 0x40, + }, }; static const uint8_t aic_mode2_vlc_bits[AIC_MODE2_NUM][AIC_MODE2_SIZE] = { -{ 1, 5, 4, 10, 6, 8, 5, 8, 8, - 7, 5, 7, 11, 10, 9, 8, 13, 11, - 6, 7, 3, 9, 8, 10, 9, 8, 5, - 10, 9, 10, 10, 14, 12, 14, 14, 12, - 8, 9, 7, 12, 8, 14, 9, 9, 12, - 8, 9, 11, 11, 13, 9, 11, 14, 12, - 6, 7, 9, 13, 9, 12, 7, 10, 12, - 11, 12, 8, 15, 10, 15, 13, 7, 12, - 10, 10, 8, 10, 13, 13, 13, 11, 8, }, -{ 4, 6, 5, 11, 8, 10, 7, 11, 9, - 4, 1, 4, 9, 7, 7, 5, 9, 10, - 6, 7, 4, 9, 9, 10, 9, 9, 6, - 9, 10, 9, 10, 12, 12, 13, 12, 11, - 9, 9, 8, 12, 8, 14, 10, 11, 12, - 7, 8, 10, 11, 12, 9, 11, 13, 12, - 6, 7, 8, 12, 9, 12, 7, 11, 10, - 12, 12, 9, 14, 12, 15, 13, 8, 12, - 11, 11, 10, 12, 13, 15, 14, 12, 9, }, -{ 5, 7, 6, 12, 9, 11, 8, 11, 10, - 7, 5, 7, 11, 10, 9, 8, 12, 12, - 5, 5, 1, 8, 7, 10, 8, 6, 4, - 8, 8, 8, 9, 12, 11, 13, 12, 11, - 8, 9, 8, 12, 8, 13, 10, 11, 11, - 8, 9, 11, 12, 13, 11, 12, 14, 13, - 8, 9, 10, 14, 11, 14, 9, 13, 13, - 8, 9, 6, 11, 10, 14, 11, 6, 10, - 6, 6, 4, 8, 9, 10, 10, 8, 5, }, -{ 11, 7, 8, 10, 12, 9, 10, 14, 12, - 7, 1, 5, 7, 8, 6, 4, 10, 9, - 10, 5, 4, 8, 11, 8, 7, 6, 7, - 11, 6, 7, 8, 10, 8, 10, 11, 9, - 10, 8, 9, 13, 9, 12, 8, 11, 12, - 11, 4, 7, 8, 9, 6, 8, 12, 9, - 8, 5, 8, 12, 9, 10, 6, 12, 11, - 12, 12, 10, 15, 13, 13, 13, 10, 13, - 15, 10, 9, 10, 12, 13, 13, 10, 9, }, -{ 11, 8, 8, 11, 13, 10, 11, 15, 12, - 7, 1, 4, 7, 7, 5, 4, 8, 9, - 11, 5, 5, 8, 11, 9, 8, 7, 8, - 13, 7, 8, 9, 11, 9, 10, 12, 10, - 10, 9, 8, 13, 9, 12, 9, 11, 12, - 11, 5, 7, 9, 10, 6, 9, 13, 10, - 7, 4, 7, 11, 8, 9, 5, 10, 11, - 13, 11, 9, 15, 13, 15, 13, 8, 12, - 15, 10, 10, 12, 13, 14, 14, 12, 11, }, -{ 12, 9, 9, 12, 13, 11, 11, 14, 12, - 8, 2, 5, 7, 9, 6, 5, 10, 10, - 9, 4, 2, 7, 9, 7, 6, 5, 6, - 12, 6, 7, 8, 10, 8, 10, 11, 9, - 12, 9, 10, 13, 11, 12, 10, 14, 13, - 12, 6, 8, 10, 10, 7, 9, 12, 10, - 8, 5, 8, 11, 9, 10, 7, 11, 12, - 8, 6, 5, 11, 11, 11, 8, 6, 9, - 12, 6, 6, 8, 10, 10, 11, 8, 6, }, -{ 13, 9, 10, 12, 14, 12, 11, 15, 15, - 8, 1, 5, 7, 9, 6, 5, 11, 10, - 11, 6, 5, 9, 11, 9, 8, 7, 8, - 12, 6, 8, 8, 11, 8, 10, 12, 10, - 10, 7, 9, 13, 10, 11, 9, 13, 12, - 11, 3, 6, 8, 9, 4, 7, 11, 8, - 8, 5, 9, 12, 10, 9, 7, 12, 13, - 13, 12, 10, 14, 14, 15, 12, 11, 14, - 15, 7, 9, 8, 11, 11, 12, 10, 9, }, -{ 10, 5, 6, 9, 11, 7, 8, 12, 11, - 8, 1, 4, 7, 9, 6, 4, 10, 10, - 11, 6, 6, 9, 9, 9, 9, 8, 8, - 14, 10, 10, 12, 12, 11, 12, 13, 12, - 10, 7, 8, 12, 9, 11, 8, 12, 11, - 13, 7, 10, 11, 11, 8, 10, 13, 11, - 6, 3, 7, 11, 8, 9, 5, 10, 11, - 11, 11, 9, 14, 14, 14, 11, 10, 13, - 14, 10, 11, 13, 13, 13, 14, 12, 12, }, -{ 2, 5, 3, 11, 8, 8, 6, 6, 7, - 8, 5, 6, 12, 10, 10, 8, 10, 11, - 7, 6, 2, 9, 8, 10, 8, 5, 4, - 10, 11, 10, 10, 13, 12, 14, 13, 10, - 10, 11, 8, 14, 9, 14, 12, 11, 12, - 9, 10, 9, 13, 12, 11, 12, 14, 11, - 8, 10, 7, 13, 10, 12, 8, 12, 12, - 10, 9, 6, 12, 11, 11, 11, 6, 9, - 10, 9, 6, 10, 9, 12, 11, 8, 7, }, -{ 6, 8, 6, 12, 11, 11, 10, 10, 9, - 6, 1, 3, 10, 8, 8, 6, 7, 10, - 8, 6, 3, 10, 9, 10, 8, 6, 5, - 11, 10, 10, 12, 13, 12, 14, 13, 12, - 10, 11, 8, 12, 9, 14, 12, 11, 12, - 9, 9, 8, 12, 12, 10, 12, 13, 11, - 7, 8, 6, 13, 9, 11, 7, 11, 11, - 11, 10, 7, 14, 11, 12, 12, 7, 10, - 12, 11, 8, 13, 12, 14, 13, 11, 10, }, -{ 7, 10, 7, 13, 13, 13, 11, 11, 10, - 8, 5, 6, 12, 11, 10, 9, 10, 11, - 7, 5, 1, 9, 8, 10, 7, 4, 4, - 9, 11, 9, 11, 12, 11, 13, 13, 10, - 9, 11, 8, 13, 9, 14, 12, 11, 12, - 11, 10, 10, 13, 12, 11, 14, 14, 12, - 9, 10, 8, 13, 10, 14, 9, 12, 12, - 9, 7, 4, 12, 10, 11, 10, 6, 7, - 9, 7, 4, 9, 9, 11, 9, 7, 5, }, -{ 7, 9, 7, 14, 11, 12, 10, 9, 9, - 8, 5, 5, 12, 9, 10, 8, 8, 11, - 7, 5, 2, 8, 8, 9, 7, 4, 4, - 10, 11, 10, 12, 14, 11, 12, 13, 12, - 9, 10, 8, 13, 8, 13, 10, 11, 11, - 9, 9, 8, 14, 10, 10, 11, 12, 11, - 10, 11, 9, 14, 10, 14, 9, 12, 14, - 6, 6, 3, 11, 8, 9, 8, 3, 6, - 9, 7, 4, 10, 8, 11, 10, 6, 5, }, -{ 6, 8, 7, 13, 12, 12, 10, 9, 9, - 9, 7, 8, 13, 11, 11, 9, 11, 12, - 7, 6, 1, 9, 8, 10, 7, 5, 4, - 10, 12, 10, 12, 13, 13, 14, 13, 11, - 9, 11, 9, 13, 10, 14, 12, 12, 12, - 11, 12, 10, 14, 13, 12, 13, 14, 12, - 8, 9, 7, 13, 10, 13, 8, 11, 12, - 8, 6, 3, 12, 9, 10, 9, 4, 6, - 10, 8, 5, 10, 10, 12, 11, 8, 6, }, -{ 7, 10, 7, 12, 9, 12, 10, 10, 12, - 9, 7, 7, 12, 9, 11, 6, 10, 11, - 6, 6, 1, 9, 8, 9, 7, 4, 5, - 11, 12, 9, 12, 10, 14, 13, 13, 11, - 10, 12, 8, 13, 8, 14, 10, 10, 11, - 11, 11, 10, 13, 14, 10, 14, 13, 11, - 11, 10, 7, 13, 8, 12, 7, 10, 12, - 7, 10, 4, 12, 6, 10, 8, 5, 8, - 10, 7, 4, 9, 7, 10, 9, 6, 5, }, -{ 7, 9, 7, 13, 12, 13, 10, 10, 8, - 8, 5, 6, 11, 10, 10, 8, 10, 10, - 7, 5, 2, 9, 8, 9, 7, 5, 3, - 8, 9, 7, 9, 11, 11, 13, 11, 9, - 8, 10, 7, 12, 9, 14, 11, 10, 10, - 9, 10, 9, 12, 12, 12, 13, 14, 12, - 10, 10, 9, 13, 11, 13, 9, 13, 12, - 8, 7, 4, 12, 10, 10, 10, 6, 6, - 7, 6, 3, 9, 8, 10, 9, 6, 3, }, -{ 7, 10, 7, 13, 13, 13, 11, 11, 9, - 8, 6, 6, 13, 11, 11, 9, 10, 11, - 7, 6, 1, 9, 8, 10, 8, 5, 4, - 8, 9, 8, 9, 12, 12, 12, 12, 8, - 10, 13, 9, 14, 11, 14, 14, 13, 12, - 9, 10, 9, 13, 12, 11, 13, 14, 11, - 9, 11, 8, 13, 11, 13, 10, 13, 13, - 9, 8, 5, 12, 10, 11, 11, 6, 7, - 8, 7, 3, 8, 9, 11, 10, 7, 4, }, -{ 8, 9, 7, 11, 11, 12, 11, 14, 9, - 8, 6, 6, 11, 13, 10, 9, 11, 9, - 7, 5, 1, 7, 9, 9, 7, 5, 3, - 13, 11, 9, 10, 12, 11, 12, 12, 9, - 10, 11, 9, 13, 9, 12, 12, 12, 10, - 12, 11, 10, 13, 14, 12, 14, 14, 11, - 11, 8, 8, 13, 11, 12, 9, 13, 11, - 9, 10, 5, 11, 8, 11, 9, 6, 7, - 7, 8, 4, 6, 8, 10, 8, 8, 5, }, -{ 8, 10, 8, 13, 13, 13, 12, 11, 10, - 5, 1, 3, 10, 7, 8, 6, 8, 9, - 8, 7, 4, 9, 10, 11, 8, 7, 6, - 8, 9, 7, 9, 12, 11, 12, 10, 8, - 9, 10, 8, 13, 9, 9, 12, 11, 11, - 7, 7, 6, 12, 9, 8, 10, 12, 8, - 6, 7, 4, 12, 8, 13, 6, 9, 10, - 13, 13, 9, 15, 14, 14, 15, 9, 11, - 13, 11, 9, 13, 13, 15, 15, 12, 10, }, -{ 10, 8, 9, 11, 12, 10, 8, 13, 13, - 9, 2, 5, 7, 5, 4, 3, 8, 9, - 11, 5, 5, 9, 8, 8, 6, 8, 8, - 12, 7, 8, 10, 10, 9, 8, 12, 10, - 9, 10, 9, 12, 7, 11, 7, 12, 12, - 9, 5, 8, 9, 9, 6, 6, 11, 10, - 6, 4, 7, 9, 5, 9, 3, 9, 10, - 13, 11, 9, 13, 10, 13, 10, 9, 13, - 14, 11, 10, 12, 12, 13, 11, 14, 11, }, -{ 11, 7, 8, 10, 12, 9, 9, 14, 10, - 9, 4, 7, 8, 10, 7, 7, 11, 10, - 8, 2, 2, 6, 8, 5, 5, 5, 6, - 15, 9, 10, 10, 12, 10, 11, 14, 12, - 9, 8, 9, 12, 9, 11, 8, 12, 11, - 14, 10, 11, 12, 13, 10, 12, 15, 12, - 9, 7, 8, 12, 9, 12, 7, 11, 13, - 9, 6, 5, 11, 10, 11, 7, 6, 9, - 11, 4, 5, 7, 8, 8, 8, 7, 7, }, + { + 5, 5, 5, 5, 3, 6, 6, 8, 8, 8, 8, 6, 4, 7, 7, 9, 9, + 9, 9, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, + 11, 11, 11, 11, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, + 14, 14, 14, 14, 12, 13, 13, 15, 15, 14, 13, 12, 12, 12, 12, 11, 11, + 13, 13, 13, 13, 11, 10, 10, 12, 12, 12, 12, 10, 1, + }, + { + 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 13, 13, 13, 13, 11, 12, 12, 14, 14, 15, 15, 14, + 12, 11, 11, 11, 11, 12, 12, 12, 12, 10, 12, 12, 12, 12, 12, 12, 12, + 12, 9, 9, 11, 11, 11, 11, 9, 6, 6, 6, 6, 5, 5, 7, 7, 9, + 9, 9, 9, 7, 7, 7, 7, 7, 4, 4, 4, 4, 1, + }, + { + 7, 7, 7, 7, 5, 8, 8, 10, 10, 10, 10, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 12, 12, 12, 12, 10, 13, 13, 14, 14, 14, + 14, 13, 13, 13, 13, 12, 12, 12, 12, 10, 10, 10, 10, 11, 11, 11, 11, + 9, 11, 11, 11, 11, 11, 11, 11, 11, 5, 5, 5, 5, 4, 4, 6, 6, + 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 1, + }, + { + 9, 9, 11, 11, 13, 13, 13, 13, 11, 11, 11, 11, 11, 9, 9, 9, 9, + 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 10, 12, 12, 13, 13, + 15, 15, 14, 13, 12, 12, 12, 12, 10, 10, 10, 10, 7, 7, 9, 9, 9, + 9, 7, 8, 8, 8, 8, 6, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, + 7, 7, 7, 7, 5, 4, 4, 6, 6, 6, 6, 4, 1, + }, + { + 7, 7, 7, 7, 5, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, + 11, 11, 11, 11, 12, 12, 12, 12, 10, 13, 13, 13, 13, 13, 13, 13, 13, + 12, 12, 14, 14, 15, 15, 15, 15, 12, 9, 9, 11, 11, 11, 11, 9, 7, + 7, 7, 7, 5, 5, 5, 5, 4, 4, 8, 8, 8, 8, 6, 8, 8, 10, + 10, 10, 10, 10, 10, 10, 10, 8, 8, 8, 8, 4, 1, + }, + { + 2, 2, 7, 7, 7, 7, 5, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, + 12, 12, 13, 13, 14, 14, 13, 10, 10, 10, 10, 9, 9, 11, 11, 11, 11, + 11, 11, 11, 11, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 7, 7, 9, + 9, 9, 9, 9, 9, 9, 9, 5, 5, 5, 5, 6, 6, 6, 6, 4, 6, + 6, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, + }, + { + 5, 5, 5, 5, 3, 6, 6, 6, 6, 4, 7, 7, 9, 9, 9, 9, 9, + 9, 9, 9, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 11, 11, + 13, 13, 13, 13, 11, 11, 11, 11, 11, 12, 12, 12, 12, 10, 12, 12, 15, + 15, 15, 15, 13, 14, 14, 14, 14, 12, 12, 12, 12, 9, 9, 11, 11, 11, + 11, 9, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 1, + }, + { + 5, 5, 9, 9, 9, 9, 7, 11, 11, 11, 11, 9, 11, 11, 11, 11, 11, + 11, 11, 11, 9, 9, 9, 9, 7, 7, 7, 7, 3, 4, 4, 8, 8, 8, + 8, 6, 10, 10, 10, 10, 10, 10, 10, 10, 14, 14, 14, 14, 12, 13, 13, + 14, 14, 13, 12, 12, 12, 12, 11, 11, 13, 13, 13, 13, 11, 10, 10, 12, + 12, 12, 12, 10, 8, 8, 8, 8, 6, 6, 6, 6, 1, + }, + { + 2, 2, 5, 5, 7, 7, 7, 7, 5, 3, 6, 6, 6, 6, 4, 8, 8, + 10, 10, 10, 10, 10, 10, 10, 10, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 10, 10, 12, 12, 12, 12, 10, 10, 10, 10, 10, 11, 11, 11, + 11, 11, 11, 11, 11, 12, 12, 14, 14, 14, 14, 12, 12, 12, 12, 12, 11, + 11, 13, 13, 13, 13, 11, 6, 6, 8, 8, 8, 8, 6, + }, + { + 3, 3, 6, 6, 8, 8, 8, 8, 6, 6, 6, 6, 6, 7, 7, 7, 7, + 5, 10, 10, 10, 10, 8, 10, 10, 10, 10, 10, 10, 10, 10, 8, 8, 8, + 8, 9, 9, 9, 9, 7, 13, 13, 13, 13, 11, 12, 12, 13, 13, 14, 14, + 14, 14, 11, 11, 11, 11, 12, 12, 12, 12, 10, 12, 12, 12, 12, 12, 12, + 12, 12, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 1, + }, + { + 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 9, 11, 11, 11, 11, + 11, 11, 11, 11, 9, 9, 9, 9, 7, 7, 7, 7, 6, 6, 10, 10, 10, + 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, + 11, 14, 14, 14, 14, 12, 13, 13, 13, 13, 10, 10, 10, 10, 8, 8, 8, + 8, 5, 5, 7, 7, 7, 7, 5, 4, 4, 4, 4, 1, + }, + { + 4, 4, 6, 6, 6, 6, 4, 2, 3, 3, 9, 9, 9, 9, 7, 9, 9, + 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, + 12, 12, 14, 14, 14, 14, 12, 12, 12, 12, 12, 11, 11, 13, 13, 14, 14, + 13, 11, 8, 8, 10, 10, 10, 10, 8, 5, 5, 5, 5, + }, + { + 5, 5, 9, 9, 9, 9, 7, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, + 9, 9, 9, 9, 7, 7, 7, 7, 3, 4, 4, 8, 8, 8, 8, 6, 10, + 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, + 13, 13, 13, 13, 13, 13, 12, 12, 13, 13, 14, 14, 14, 14, 10, 10, 12, + 12, 12, 12, 10, 8, 8, 8, 8, 6, 6, 6, 6, 1, + }, + { + 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 8, 8, 8, + 8, 6, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, + 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 11, 12, 12, 13, + 13, 14, 14, 14, 14, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 5, 5, + 7, 7, 7, 7, 5, 4, 4, 6, 6, 6, 6, 4, 1, + }, + { + 6, 6, 6, 6, 4, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, + 9, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 13, 13, 14, 14, 13, 13, + 13, 13, 13, 9, 9, 9, 9, 7, 7, 7, 7, 8, 8, 8, 8, 6, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 8, 8, + 8, 8, 2, 3, 3, 5, 5, 7, 7, 7, 7, 5, 3, + }, + { + 5, 5, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 3, + 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11, 11, 11, + 11, 12, 12, 14, 14, 14, 14, 12, 12, 12, 12, 12, 13, 13, 13, 13, 11, + 13, 13, 13, 13, 13, 13, 13, 13, 9, 9, 11, 11, 11, 11, 9, 8, 8, + 10, 10, 10, 10, 10, 10, 10, 10, 6, 6, 6, 6, 1, + }, + { + 5, 5, 5, 5, 3, 6, 6, 6, 6, 4, 7, 7, 9, 9, 9, 9, 9, + 9, 9, 9, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 11, 11, + 11, 11, 9, 11, 11, 11, 11, 11, 11, 11, 11, 9, 9, 9, 9, 10, 10, + 10, 10, 8, 12, 12, 13, 13, 14, 14, 14, 14, 12, 12, 12, 12, 11, 11, + 13, 13, 13, 13, 11, 10, 10, 12, 12, 12, 12, 10, 1, + }, + { + 7, 7, 7, 7, 5, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, + 10, 10, 10, 10, 11, 11, 13, 13, 13, 13, 11, 11, 11, 11, 11, 12, 12, + 12, 12, 10, 13, 13, 14, 14, 15, 15, 15, 15, 13, 13, 13, 13, 12, 12, + 12, 12, 7, 7, 9, 9, 9, 9, 7, 3, 4, 4, 8, 8, 8, 8, 6, + 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 1, + }, + { + 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 13, 13, 14, 14, 13, 13, 13, + 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 10, 10, 12, 12, 12, 12, 10, + 9, 9, 11, 11, 11, 11, 9, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, + 6, 6, 6, 6, 2, 3, 3, 5, 5, 9, 9, 9, 9, 7, 9, 9, 9, + 9, 9, 9, 9, 9, 7, 7, 7, 7, 5, 5, 5, 5, + }, + { + 2, 2, 7, 7, 7, 7, 5, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, + 7, 7, 7, 7, 5, 5, 5, 5, 4, 4, 8, 8, 8, 8, 8, 8, 8, + 8, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 14, 11, 11, 11, 11, 10, + 10, 12, 12, 12, 12, 12, 12, 12, 12, 9, 9, 11, 11, 11, 11, 9, 8, + 8, 10, 10, 10, 10, 10, 10, 10, 10, 6, 6, 6, 6, + }, }; //@} @@ -640,31 +600,23 @@ static const uint8_t aic_mode1_vlc_bits[AIC_MODE1_NUM][AIC_MODE1_SIZE] = { #define PTYPE_VLC_SIZE 8 #define PTYPE_VLC_BITS 7 -static const uint8_t ptype_vlc_codes[NUM_PTYPE_VLCS][PTYPE_VLC_SIZE] = { - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, - { 0x0D, 0x05, 0x01, 0x04, 0x01, 0x00, 0x07, 0x0C }, - { 0x09, 0x11, 0x01, 0x00, 0x05, 0x03, 0x21, 0x20 }, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 } +static const uint8_t ptype_vlc_tabs[NUM_PTYPE_VLCS][PTYPE_VLC_SIZE][2] = { + { { PBTYPE_ESCAPE, 7 }, { 11, 7 }, { 3, 6 }, { 8, 5 }, + { 9, 4 }, { 2, 3 }, { 1, 2 }, { 0, 1 } }, + { { PBTYPE_ESCAPE, 7 }, { 3, 7 }, { 8, 6 }, { 9, 5 }, + { 11, 4 }, { 0, 3 }, { 2, 2 }, { 1, 1 } }, + { { 9, 3 }, { 8, 3 }, { 3, 4 }, { 1, 4 }, { PBTYPE_ESCAPE, 5 }, + { 0, 5 }, { 11, 4 }, { 2, 1 } }, + { { 3, 2 }, { 2, 2 }, { PBTYPE_ESCAPE, 6 }, { 11, 6 }, + { 1, 5 }, { 0, 4 }, { 8, 3 }, { 9, 2 } }, + { { PBTYPE_ESCAPE, 7 }, { 11, 7 }, { 1, 6 }, { 0, 5 }, + { 3, 4 }, { 9, 3 }, { 8, 2 }, { 2, 1 } }, + { { PBTYPE_ESCAPE, 7 }, { 11, 7 }, { 1, 6 }, { 0, 5 }, + { 3, 4 }, { 8, 3 }, { 9, 2 }, { 2, 1 } }, + { { PBTYPE_ESCAPE, 7 }, { 3, 7 }, { 0, 6 }, { 8, 5 }, + { 9, 4 }, { 1, 3 }, { 2, 2 }, { 11, 1 } }, }; -static const uint8_t ptype_vlc_bits[NUM_PTYPE_VLCS][PTYPE_VLC_SIZE] = { - { 1, 2, 3, 6, 5, 4, 7, 7 }, - { 3, 1, 2, 7, 6, 5, 4, 7 }, - { 5, 4, 1, 4, 3, 3, 4, 5 }, - { 4, 5, 2, 2, 3, 2, 6, 6 }, - { 5, 6, 1, 4, 2, 3, 7, 7 }, - { 5, 6, 1, 4, 3, 2, 7, 7 }, - { 6, 3, 2, 7, 5, 4, 1, 7 } -}; - -static const uint8_t ptype_vlc_syms[PTYPE_VLC_SIZE] = { - 0, 1, 2, 3, 8, 9, 11, PBTYPE_ESCAPE -}; - -/** reverse of ptype_vlc_syms */ static const uint8_t block_num_to_ptype_vlc_num[12] = { 0, 1, 2, 3, 0, 0, 2, 0, 4, 5, 0, 6 }; @@ -676,29 +628,21 @@ static const uint8_t block_num_to_ptype_vlc_num[12] = { #define BTYPE_VLC_SIZE 7 #define BTYPE_VLC_BITS 6 -static const uint8_t btype_vlc_codes[NUM_BTYPE_VLCS][BTYPE_VLC_SIZE] = { - { 0x01, 0x05, 0x00, 0x03, 0x11, 0x09, 0x10 }, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, - { 0x09, 0x01, 0x00, 0x01, 0x05, 0x03, 0x08 }, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 } -}; - -static const uint8_t btype_vlc_bits[NUM_BTYPE_VLCS][PTYPE_VLC_SIZE] = { - { 2, 3, 2, 2, 5, 4, 5 }, - { 4, 1, 3, 2, 6, 5, 6 }, - { 6, 4, 1, 2, 5, 3, 6 }, - { 5, 3, 3, 1, 4, 3, 5 }, - { 6, 5, 3, 2, 4, 1, 6 }, - { 6, 5, 3, 1, 4, 2, 6 } -}; - -static const uint8_t btype_vlc_syms[BTYPE_VLC_SIZE] = { - 0, 1, 4, 5, 10, 7, PBTYPE_ESCAPE +static const uint8_t btype_vlc_tabs[NUM_BTYPE_VLCS][BTYPE_VLC_SIZE][2] = { + { { 4, 2 }, { 0, 2 }, { PBTYPE_ESCAPE, 5 }, + { 10, 5 }, { 7, 4 }, { 1, 3 }, { 5, 2 } }, + { { PBTYPE_ESCAPE, 6 }, { 10, 6 }, { 7, 5 }, + { 0, 4 }, { 4, 3 }, { 5, 2 }, { 1, 1 } }, + { { PBTYPE_ESCAPE, 6 }, { 0, 6 }, { 10, 5 }, + { 1, 4 }, { 7, 3 }, { 5, 2 }, { 4, 1 } }, + { { 4, 3 }, { 1, 3 }, { PBTYPE_ESCAPE, 5 }, + { 0, 5 }, { 10, 4 }, { 7, 3 }, { 5, 1 } }, + { { PBTYPE_ESCAPE, 6 }, { 0, 6 }, { 1, 5 }, + { 10, 4 }, { 4, 3 }, { 5, 2 }, { 7, 1 } }, + { { PBTYPE_ESCAPE, 6 }, { 0, 6 }, { 1, 5 }, + { 10, 4 }, { 4, 3 }, { 7, 2 }, { 5, 1 } }, }; -/** reverse of btype_vlc_syms */ static const uint8_t block_num_to_btype_vlc_num[12] = { 0, 1, 0, 0, 2, 3, 0, 5, 0, 0, 4, 0 }; From patchwork Tue Nov 10 10:47:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23533 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 0721144ACE4 for ; Tue, 10 Nov 2020 13:02:00 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6D42968BE96; Tue, 10 Nov 2020 12:50:31 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8968868BE71 for ; Tue, 10 Nov 2020 12:50:16 +0200 (EET) Received: by mail-wm1-f67.google.com with SMTP id 10so2535066wml.2 for ; Tue, 10 Nov 2020 02:50:16 -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=YDMtA3EoxivH87nm3qjMrVfZ84tPp5p4nssPHRveczI=; b=rsEw9I+emq7x7S0LKpBnZ3X0hc8/0CkyuIlMDVqbGq9KWTy4tAHTe1PfOCC31h5HNW Dw7iaqzmfIUnatvz4jcCNlgDtG4FJ5h0fka6VGjlDdovBW2xkUwf0Dyc8g49vzyb0L2o fa4AO58WwYDAzOLNjHZjHlBmPB/MCnsGawXWld2oCYCJMxXK5xZHnjYBw1FD6qFZMHh9 5jc0oRtR/WOThfHTVP1NqNfFD55/5fJqjyeO4XGuJ5W4erjYxCxRIlMtJeEC1jYCrshq fQxsqFqAFqInDA1iHIU6qE2G1qHDmHnTpB0kMYiiF+FooorcxiMarwByngA4VGv2GQrI 1rTw== 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=YDMtA3EoxivH87nm3qjMrVfZ84tPp5p4nssPHRveczI=; b=aI2wTdS0Y7OF/vg4kyDUEVUCkUuo8+encY99JWExliIwmaKwVxzYypH9xG1RuRf5vz /K9eQc7/YQtP2OSJMPRNc7SVdy1FW5/GXMSaLBr7YdRANyHakbq3QqQMXhujdvw2Q6st KrHrXhRZ7f+a7i2FoJ2HrVmDR7FQuj/3xtX1j28pg13wKrfhHnWqaiNC02G2d8L/LOe5 w9heWYkVHgqa/IPZQEpFyF5QRPW8Gj8v9gTRIRnpxYYMNqUz4RhXY1/7R63YHjTkr3jY oBQDsTQx4CxWMYDjVjvlBihr6HIAOpIaPQLATUxo8facw+6954HP/11OX59EGWVZgfvk 8ZMA== X-Gm-Message-State: AOAM531eUr/cSgTsbuVcYn304i8yG2xREhBNU0WJDQ4Iihe11VcjIFD8 cCPgYKz3ay9G9UT2k/M90qVoa+Ydb8U= X-Google-Smtp-Source: ABdhPJyjrmAxFu+VkcsSCKr0XIU7db9QqFbaQU5aZMPPoGPHQFKPkJw/3kjlpqSb1YjZ7boRPywMCw== X-Received: by 2002:a1c:23cf:: with SMTP id j198mr4055080wmj.6.1605005415132; Tue, 10 Nov 2020 02:50:15 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:14 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:53 +0100 Message-Id: <20201110104851.321029-57-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 056/114] avcodec/rv40: Make better use of VLC symbols table 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" RealVideo 4.0 has a VLC that encodes two intra types per code; each intra type is in the range 0..8 (inclusive) and up until now the VLC used symbols in the range 0..80; one type was encoded as the remainder when dividing the symbol by 9 whereas the other type was encoded as symbol / 9. This is suboptimal; a better way would be to use the high and low nibble to encode each symbol. But an even better way is to use 16bit symbols so that the two intra types can be directly written as a 16bit value. This commit implements this; in order to avoid huge tables the symbols are stored as uint8_t with high and low nibbles encoding one type each; they are only unpacked to uint16_t during initialization. Signed-off-by: Andreas Rheinhardt --- libavcodec/rv40.c | 19 ++- libavcodec/rv40vlc2.h | 356 +++++++++++++++++++++--------------------- 2 files changed, 193 insertions(+), 182 deletions(-) diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 3334331658..81e08af5f1 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -24,6 +24,8 @@ * RV40 decoder */ +#include "config.h" + #include "libavutil/imgutils.h" #include "avcodec.h" @@ -71,11 +73,21 @@ static av_cold void rv40_init_tables(void) aic_mode1_vlc_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); } for(i = 0; i < AIC_MODE2_NUM; i++){ + uint16_t syms[AIC_MODE2_SIZE]; + + for (int j = 0; j < AIC_MODE2_SIZE; j++) { + int first = aic_mode2_vlc_syms[i][j] >> 4; + int second = aic_mode2_vlc_syms[i][j] & 0xF; + if (HAVE_BIGENDIAN) + syms[j] = (first << 8) | second; + else + syms[j] = first | (second << 8); + } aic_mode2_vlc[i].table = &aic_mode2_table[mode2_offs[i]]; aic_mode2_vlc[i].table_allocated = mode2_offs[i + 1] - mode2_offs[i]; ff_init_vlc_from_lengths(&aic_mode2_vlc[i], AIC_MODE2_BITS, AIC_MODE2_SIZE, aic_mode2_vlc_bits[i], 1, - aic_mode2_vlc_syms[i], 1, 1, 0, INIT_VLC_USE_NEW_STATIC); + syms, 2, 2, 0, INIT_VLC_USE_NEW_STATIC); } for(i = 0; i < NUM_PTYPE_VLCS; i++){ ptype_vlc[i].table = &ptype_table[i << PTYPE_VLC_BITS]; @@ -194,9 +206,8 @@ static int rv40_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t if(pattern == rv40_aic_table_index[k]) break; if(j < 3 && k < MODE2_PATTERNS_NUM){ //pattern is found, decoding 2 coefficients - v = get_vlc2(gb, aic_mode2_vlc[k].table, AIC_MODE2_BITS, 2); - *ptr++ = v/9; - *ptr++ = v%9; + AV_WN16(ptr, get_vlc2(gb, aic_mode2_vlc[k].table, AIC_MODE2_BITS, 2)); + ptr += 2; j++; }else{ if(B != -1 && C != -1) diff --git a/libavcodec/rv40vlc2.h b/libavcodec/rv40vlc2.h index 58974f6451..783b93ba2e 100644 --- a/libavcodec/rv40vlc2.h +++ b/libavcodec/rv40vlc2.h @@ -55,184 +55,184 @@ static const uint8_t rv40_aic_top_vlc_bits[AIC_TOP_SIZE] = { static const uint8_t aic_mode2_vlc_syms[AIC_MODE2_NUM][AIC_MODE2_SIZE] = { { - 0x06, 0x01, 0x1A, 0x0A, 0x14, 0x12, 0x04, 0x07, 0x05, 0x0F, 0x08, 0x36, - 0x02, 0x3C, 0x37, 0x15, 0x0E, 0x1C, 0x18, 0x46, 0x0B, 0x09, 0x26, 0x13, - 0x41, 0x2D, 0x50, 0x4A, 0x19, 0x16, 0x28, 0x24, 0x38, 0x32, 0x11, 0x0C, - 0x30, 0x2F, 0x3A, 0x2A, 0x25, 0x2E, 0x2B, 0x1E, 0x1D, 0x43, 0x3D, 0x0D, - 0x03, 0x1B, 0x17, 0x21, 0x1F, 0x29, 0x22, 0x47, 0x4D, 0x4C, 0x44, 0x42, - 0x34, 0x4E, 0x3B, 0x35, 0x40, 0x3E, 0x3F, 0x33, 0x31, 0x10, 0x45, 0x39, - 0x4F, 0x49, 0x48, 0x23, 0x20, 0x2C, 0x27, 0x4B, 0x00, - }, - { - 0x46, 0x38, 0x2A, 0x1E, 0x3E, 0x2F, 0x11, 0x05, 0x1C, 0x17, 0x26, 0x04, - 0x2E, 0x28, 0x24, 0x1D, 0x32, 0x25, 0x18, 0x16, 0x1B, 0x19, 0x34, 0x21, - 0x4C, 0x45, 0x49, 0x4B, 0x47, 0x42, 0x29, 0x4D, 0x44, 0x4E, 0x4F, 0x33, - 0x30, 0x48, 0x3D, 0x20, 0x1F, 0x27, 0x22, 0x4A, 0x3F, 0x3B, 0x43, 0x40, - 0x31, 0x2C, 0x39, 0x35, 0x41, 0x3A, 0x07, 0x03, 0x2B, 0x23, 0x50, 0x12, - 0x01, 0x36, 0x1A, 0x0F, 0x02, 0x37, 0x2D, 0x0C, 0x08, 0x15, 0x10, 0x3C, - 0x0D, 0x06, 0x13, 0x0E, 0x09, 0x00, 0x14, 0x0B, 0x0A, - }, - { - 0x09, 0x01, 0x16, 0x0B, 0x50, 0x4B, 0x3F, 0x0D, 0x08, 0x2A, 0x17, 0x4F, - 0x28, 0x26, 0x36, 0x2D, 0x37, 0x2E, 0x40, 0x3C, 0x0E, 0x04, 0x25, 0x1E, - 0x10, 0x03, 0x1F, 0x11, 0x4E, 0x3E, 0x3D, 0x39, 0x34, 0x44, 0x3B, 0x29, - 0x21, 0x35, 0x31, 0x27, 0x22, 0x33, 0x30, 0x43, 0x38, 0x4D, 0x47, 0x07, - 0x05, 0x20, 0x0C, 0x4C, 0x3A, 0x32, 0x45, 0x42, 0x2B, 0x23, 0x2F, 0x2C, - 0x0A, 0x00, 0x13, 0x12, 0x4A, 0x1A, 0x49, 0x48, 0x1C, 0x1B, 0x24, 0x1D, - 0x0F, 0x06, 0x18, 0x15, 0x19, 0x02, 0x46, 0x41, 0x14, - }, - { - 0x50, 0x4A, 0x2D, 0x2B, 0x43, 0x27, 0x45, 0x44, 0x3E, 0x16, 0x00, 0x22, - 0x1B, 0x31, 0x28, 0x3A, 0x35, 0x21, 0x1F, 0x3B, 0x24, 0x06, 0x03, 0x12, - 0x10, 0x08, 0x04, 0x2C, 0x29, 0x4F, 0x4C, 0x40, 0x4D, 0x47, 0x48, 0x42, - 0x07, 0x4E, 0x39, 0x34, 0x3F, 0x3D, 0x46, 0x41, 0x4B, 0x49, 0x1D, 0x1A, - 0x11, 0x05, 0x26, 0x23, 0x2F, 0x0D, 0x02, 0x17, 0x15, 0x3C, 0x33, 0x30, - 0x38, 0x36, 0x20, 0x1E, 0x2A, 0x25, 0x13, 0x0B, 0x09, 0x01, 0x18, 0x0C, - 0x37, 0x14, 0x0F, 0x19, 0x0E, 0x32, 0x1C, 0x2E, 0x0A, - }, - { - 0x0C, 0x09, 0x19, 0x0D, 0x3C, 0x28, 0x25, 0x30, 0x2A, 0x17, 0x11, 0x20, - 0x1E, 0x3E, 0x39, 0x50, 0x40, 0x1F, 0x16, 0x2D, 0x2B, 0x22, 0x08, 0x2C, - 0x29, 0x4A, 0x43, 0x3F, 0x4C, 0x45, 0x1B, 0x04, 0x34, 0x27, 0x4B, 0x47, - 0x4E, 0x4D, 0x42, 0x07, 0x48, 0x44, 0x4F, 0x3B, 0x33, 0x03, 0x00, 0x12, - 0x06, 0x41, 0x2F, 0x1C, 0x38, 0x36, 0x13, 0x0E, 0x2E, 0x14, 0x0F, 0x0B, - 0x02, 0x01, 0x15, 0x10, 0x32, 0x46, 0x3A, 0x35, 0x31, 0x49, 0x3D, 0x21, - 0x05, 0x24, 0x23, 0x1A, 0x18, 0x26, 0x1D, 0x37, 0x0A, - }, - { - 0x14, 0x0A, 0x15, 0x0C, 0x1D, 0x17, 0x41, 0x29, 0x24, 0x34, 0x2D, 0x03, - 0x00, 0x1B, 0x08, 0x4E, 0x44, 0x48, 0x3E, 0x27, 0x04, 0x2B, 0x07, 0x2C, - 0x3B, 0x35, 0x4D, 0x4C, 0x47, 0x3A, 0x3D, 0x39, 0x43, 0x42, 0x06, 0x05, - 0x28, 0x22, 0x4F, 0x4B, 0x2A, 0x26, 0x31, 0x30, 0x11, 0x10, 0x21, 0x1F, - 0x3C, 0x32, 0x23, 0x16, 0x33, 0x25, 0x02, 0x01, 0x12, 0x0D, 0x0F, 0x0B, - 0x37, 0x19, 0x18, 0x0E, 0x1C, 0x1A, 0x13, 0x50, 0x4A, 0x38, 0x36, 0x45, - 0x3F, 0x1E, 0x09, 0x2F, 0x20, 0x40, 0x2E, 0x49, 0x46, - }, - { - 0x0F, 0x0B, 0x37, 0x14, 0x2E, 0x13, 0x0E, 0x2F, 0x1C, 0x32, 0x49, 0x3C, - 0x2A, 0x26, 0x38, 0x31, 0x0D, 0x01, 0x17, 0x15, 0x19, 0x0C, 0x33, 0x25, - 0x20, 0x1E, 0x35, 0x30, 0x18, 0x09, 0x1D, 0x1A, 0x4C, 0x46, 0x27, 0x00, - 0x3E, 0x2B, 0x4D, 0x29, 0x1F, 0x34, 0x2D, 0x05, 0x03, 0x22, 0x1B, 0x4F, - 0x4E, 0x45, 0x08, 0x07, 0x48, 0x44, 0x3F, 0x42, 0x04, 0x47, 0x43, 0x39, - 0x2C, 0x40, 0x3D, 0x4A, 0x3B, 0x10, 0x06, 0x16, 0x12, 0x50, 0x4B, 0x36, - 0x28, 0x24, 0x41, 0x3A, 0x11, 0x02, 0x23, 0x21, 0x0A, - }, - { - 0x3C, 0x01, 0x0D, 0x03, 0x16, 0x15, 0x38, 0x08, 0x04, 0x20, 0x12, 0x41, - 0x39, 0x35, 0x3F, 0x3E, 0x2C, 0x29, 0x31, 0x30, 0x18, 0x17, 0x3B, 0x28, - 0x0C, 0x05, 0x2E, 0x25, 0x37, 0x0F, 0x0B, 0x09, 0x06, 0x1A, 0x19, 0x36, - 0x24, 0x1D, 0x33, 0x2F, 0x10, 0x00, 0x1C, 0x11, 0x42, 0x1B, 0x44, 0x43, - 0x50, 0x4C, 0x4B, 0x4E, 0x48, 0x4D, 0x27, 0x23, 0x4F, 0x2B, 0x45, 0x40, - 0x2D, 0x22, 0x47, 0x34, 0x4A, 0x46, 0x3D, 0x1E, 0x07, 0x21, 0x1F, 0x49, - 0x2A, 0x26, 0x3A, 0x32, 0x0E, 0x02, 0x14, 0x13, 0x0A, - }, - { - 0x14, 0x00, 0x0A, 0x01, 0x12, 0x08, 0x50, 0x38, 0x19, 0x02, 0x07, 0x06, - 0x13, 0x0B, 0x1A, 0x4F, 0x3C, 0x1D, 0x1B, 0x23, 0x1E, 0x0E, 0x0D, 0x17, - 0x10, 0x18, 0x16, 0x36, 0x26, 0x47, 0x40, 0x4C, 0x49, 0x28, 0x15, 0x2F, - 0x2D, 0x48, 0x3F, 0x20, 0x0C, 0x2C, 0x2A, 0x4B, 0x2E, 0x24, 0x3A, 0x37, - 0x32, 0x2B, 0x43, 0x35, 0x11, 0x03, 0x25, 0x1C, 0x42, 0x3E, 0x27, 0x21, - 0x34, 0x29, 0x4D, 0x33, 0x31, 0x3D, 0x3B, 0x45, 0x44, 0x22, 0x1F, 0x39, - 0x30, 0x4E, 0x46, 0x41, 0x05, 0x04, 0x0F, 0x09, 0x4A, - }, - { - 0x14, 0x0B, 0x19, 0x13, 0x0D, 0x01, 0x12, 0x0E, 0x38, 0x02, 0x00, 0x0F, - 0x09, 0x36, 0x10, 0x41, 0x3C, 0x1A, 0x07, 0x06, 0x11, 0x0C, 0x4A, 0x32, - 0x24, 0x47, 0x40, 0x17, 0x15, 0x1D, 0x1C, 0x26, 0x18, 0x37, 0x2F, 0x16, - 0x08, 0x2D, 0x28, 0x46, 0x22, 0x1F, 0x39, 0x34, 0x4F, 0x4C, 0x48, 0x4E, - 0x4B, 0x29, 0x21, 0x4D, 0x42, 0x3F, 0x3E, 0x49, 0x43, 0x1E, 0x03, 0x23, - 0x20, 0x50, 0x33, 0x31, 0x45, 0x44, 0x2A, 0x27, 0x30, 0x2C, 0x3A, 0x2E, - 0x35, 0x2B, 0x3D, 0x3B, 0x05, 0x04, 0x25, 0x1B, 0x0A, - }, - { - 0x28, 0x24, 0x3C, 0x36, 0x15, 0x0F, 0x1D, 0x1B, 0x07, 0x06, 0x11, 0x0D, - 0x4E, 0x2D, 0x2B, 0x44, 0x32, 0x1E, 0x1C, 0x25, 0x20, 0x48, 0x3F, 0x4C, - 0x4B, 0x47, 0x40, 0x4F, 0x49, 0x46, 0x0B, 0x23, 0x17, 0x2F, 0x2E, 0x08, - 0x01, 0x10, 0x0E, 0x35, 0x31, 0x3E, 0x3D, 0x1F, 0x0C, 0x2C, 0x2A, 0x04, - 0x03, 0x21, 0x05, 0x4D, 0x33, 0x29, 0x3B, 0x34, 0x42, 0x27, 0x22, 0x39, - 0x30, 0x3A, 0x37, 0x45, 0x43, 0x16, 0x09, 0x38, 0x26, 0x13, 0x0A, 0x02, - 0x00, 0x18, 0x12, 0x50, 0x1A, 0x19, 0x4A, 0x41, 0x14, - }, - { - 0x1A, 0x19, 0x40, 0x3F, 0x4F, 0x47, 0x4A, 0x14, 0x46, 0x41, 0x07, 0x01, - 0x0D, 0x08, 0x49, 0x3C, 0x38, 0x48, 0x44, 0x24, 0x17, 0x2E, 0x2D, 0x02, - 0x00, 0x18, 0x12, 0x26, 0x16, 0x2F, 0x28, 0x0F, 0x09, 0x15, 0x10, 0x3A, - 0x36, 0x4E, 0x4B, 0x2A, 0x25, 0x32, 0x31, 0x2C, 0x2B, 0x35, 0x33, 0x11, - 0x04, 0x20, 0x1C, 0x34, 0x23, 0x1F, 0x03, 0x39, 0x30, 0x3D, 0x0C, 0x05, - 0x21, 0x1E, 0x42, 0x37, 0x27, 0x22, 0x3E, 0x3B, 0x29, 0x4D, 0x45, 0x43, - 0x0E, 0x06, 0x1D, 0x1B, 0x4C, 0x0B, 0x0A, 0x50, 0x13, - }, - { - 0x4A, 0x19, 0x08, 0x07, 0x0F, 0x09, 0x38, 0x45, 0x43, 0x2D, 0x25, 0x4E, - 0x3D, 0x0E, 0x0D, 0x23, 0x10, 0x24, 0x15, 0x37, 0x26, 0x0A, 0x02, 0x18, - 0x12, 0x41, 0x46, 0x1A, 0x0B, 0x01, 0x36, 0x16, 0x50, 0x2F, 0x28, 0x44, - 0x3A, 0x17, 0x06, 0x1D, 0x1B, 0x32, 0x2E, 0x3E, 0x35, 0x2A, 0x1E, 0x2C, - 0x2B, 0x27, 0x22, 0x33, 0x31, 0x0C, 0x03, 0x20, 0x1F, 0x4D, 0x42, 0x3B, - 0x39, 0x29, 0x21, 0x34, 0x30, 0x4B, 0x48, 0x05, 0x04, 0x1C, 0x11, 0x4C, - 0x3F, 0x3C, 0x4F, 0x49, 0x13, 0x00, 0x47, 0x40, 0x14, - }, - { - 0x4C, 0x49, 0x1D, 0x17, 0x4E, 0x4B, 0x09, 0x04, 0x15, 0x0D, 0x38, 0x18, - 0x3F, 0x3C, 0x26, 0x16, 0x3A, 0x28, 0x4F, 0x44, 0x40, 0x4D, 0x48, 0x32, - 0x2F, 0x3D, 0x37, 0x2D, 0x2C, 0x35, 0x2E, 0x11, 0x0E, 0x23, 0x1B, 0x1E, - 0x1C, 0x3B, 0x25, 0x05, 0x03, 0x0C, 0x08, 0x22, 0x21, 0x30, 0x27, 0x36, - 0x42, 0x3E, 0x39, 0x34, 0x29, 0x20, 0x33, 0x31, 0x47, 0x45, 0x24, 0x1F, - 0x2B, 0x2A, 0x06, 0x01, 0x10, 0x07, 0x46, 0x1A, 0x02, 0x00, 0x0B, 0x0A, - 0x50, 0x41, 0x19, 0x12, 0x0F, 0x43, 0x13, 0x4A, 0x14, - }, - { - 0x46, 0x0B, 0x49, 0x47, 0x41, 0x23, 0x1E, 0x2D, 0x28, 0x15, 0x01, 0x1C, - 0x17, 0x1F, 0x0C, 0x22, 0x20, 0x4E, 0x35, 0x32, 0x42, 0x3E, 0x27, 0x04, - 0x31, 0x30, 0x3A, 0x2A, 0x3B, 0x39, 0x34, 0x29, 0x3D, 0x05, 0x03, 0x33, - 0x21, 0x38, 0x2F, 0x4B, 0x3C, 0x26, 0x1D, 0x48, 0x40, 0x09, 0x08, 0x16, - 0x0F, 0x4F, 0x11, 0x10, 0x2B, 0x25, 0x07, 0x06, 0x0E, 0x0D, 0x44, 0x43, - 0x4D, 0x45, 0x2E, 0x2C, 0x37, 0x36, 0x24, 0x1B, 0x4C, 0x3F, 0x14, 0x4A, - 0x1A, 0x13, 0x0A, 0x02, 0x00, 0x18, 0x12, 0x19, 0x50, - }, - { - 0x41, 0x19, 0x4F, 0x49, 0x26, 0x1E, 0x2F, 0x2D, 0x0F, 0x08, 0x1C, 0x15, - 0x02, 0x00, 0x47, 0x12, 0x4A, 0x50, 0x1A, 0x23, 0x1D, 0x40, 0x38, 0x16, - 0x09, 0x1B, 0x18, 0x3A, 0x37, 0x45, 0x44, 0x28, 0x11, 0x35, 0x32, 0x31, - 0x2C, 0x29, 0x27, 0x34, 0x2A, 0x42, 0x20, 0x1F, 0x22, 0x21, 0x04, 0x03, - 0x0C, 0x05, 0x4D, 0x3B, 0x39, 0x3E, 0x3D, 0x2B, 0x25, 0x33, 0x30, 0x3F, - 0x36, 0x07, 0x06, 0x0E, 0x0D, 0x4C, 0x4B, 0x48, 0x3C, 0x2E, 0x4E, 0x43, - 0x10, 0x01, 0x24, 0x17, 0x0B, 0x0A, 0x46, 0x13, 0x14, - }, - { - 0x19, 0x13, 0x50, 0x41, 0x1A, 0x0B, 0x0A, 0x4B, 0x46, 0x4A, 0x48, 0x47, - 0x17, 0x16, 0x23, 0x1D, 0x08, 0x01, 0x11, 0x0F, 0x12, 0x02, 0x18, 0x15, - 0x49, 0x43, 0x4E, 0x4C, 0x09, 0x00, 0x38, 0x37, 0x04, 0x03, 0x0C, 0x06, - 0x45, 0x35, 0x2E, 0x3A, 0x36, 0x1C, 0x10, 0x25, 0x20, 0x28, 0x26, 0x3F, - 0x3C, 0x1E, 0x0E, 0x2C, 0x24, 0x4F, 0x3B, 0x32, 0x3D, 0x39, 0x31, 0x07, - 0x34, 0x33, 0x2A, 0x29, 0x2D, 0x2B, 0x42, 0x3E, 0x1B, 0x0D, 0x30, 0x27, - 0x44, 0x40, 0x2F, 0x1F, 0x05, 0x22, 0x21, 0x4D, 0x14, - }, - { - 0x13, 0x0D, 0x1D, 0x19, 0x09, 0x41, 0x3D, 0x4A, 0x46, 0x28, 0x24, 0x31, - 0x29, 0x25, 0x22, 0x3E, 0x33, 0x08, 0x01, 0x16, 0x0C, 0x47, 0x2C, 0x04, - 0x03, 0x27, 0x05, 0x49, 0x17, 0x07, 0x2B, 0x20, 0x1F, 0x06, 0x2A, 0x21, - 0x50, 0x4C, 0x4B, 0x44, 0x43, 0x45, 0x42, 0x4E, 0x4D, 0x3F, 0x3B, 0x48, - 0x40, 0x34, 0x30, 0x4F, 0x39, 0x2E, 0x2D, 0x15, 0x11, 0x1E, 0x1C, 0x37, - 0x0B, 0x38, 0x14, 0x02, 0x00, 0x10, 0x0E, 0x3C, 0x32, 0x26, 0x3A, 0x35, - 0x18, 0x12, 0x23, 0x1B, 0x1A, 0x0F, 0x36, 0x2F, 0x0A, - }, - { - 0x37, 0x0E, 0x19, 0x17, 0x1D, 0x1A, 0x06, 0x01, 0x16, 0x10, 0x47, 0x44, - 0x4F, 0x48, 0x4D, 0x08, 0x07, 0x42, 0x3F, 0x2C, 0x2B, 0x4C, 0x4B, 0x49, - 0x40, 0x50, 0x4E, 0x45, 0x43, 0x1B, 0x04, 0x27, 0x22, 0x4A, 0x41, 0x3D, - 0x12, 0x03, 0x34, 0x29, 0x46, 0x2F, 0x21, 0x25, 0x23, 0x3E, 0x35, 0x05, - 0x00, 0x1F, 0x1E, 0x32, 0x18, 0x36, 0x33, 0x0A, 0x3C, 0x0F, 0x3A, 0x2E, - 0x09, 0x02, 0x15, 0x11, 0x38, 0x31, 0x30, 0x3B, 0x39, 0x24, 0x20, 0x2D, - 0x26, 0x1C, 0x0C, 0x2A, 0x28, 0x0D, 0x0B, 0x14, 0x13, - }, - { - 0x14, 0x13, 0x0B, 0x01, 0x0F, 0x0E, 0x4A, 0x50, 0x4F, 0x26, 0x24, 0x36, - 0x28, 0x06, 0x05, 0x1C, 0x09, 0x3C, 0x37, 0x4B, 0x45, 0x18, 0x17, 0x41, - 0x19, 0x49, 0x0A, 0x2A, 0x25, 0x4C, 0x38, 0x0C, 0x02, 0x16, 0x12, 0x48, - 0x44, 0x3B, 0x39, 0x3E, 0x31, 0x22, 0x07, 0x34, 0x1B, 0x2D, 0x2F, 0x2C, - 0x42, 0x3D, 0x43, 0x32, 0x30, 0x2B, 0x35, 0x33, 0x1F, 0x04, 0x27, 0x23, - 0x3F, 0x3A, 0x10, 0x00, 0x29, 0x21, 0x47, 0x4E, 0x4D, 0x1E, 0x1D, 0x2E, - 0x20, 0x08, 0x03, 0x11, 0x0D, 0x1A, 0x15, 0x46, 0x40, + 0x06, 0x01, 0x28, 0x11, 0x22, 0x20, 0x04, 0x07, 0x05, 0x16, 0x08, 0x60, + 0x02, 0x66, 0x61, 0x23, 0x15, 0x31, 0x26, 0x77, 0x12, 0x10, 0x42, 0x21, + 0x72, 0x50, 0x88, 0x82, 0x27, 0x24, 0x44, 0x40, 0x62, 0x55, 0x18, 0x13, + 0x53, 0x52, 0x64, 0x46, 0x41, 0x51, 0x47, 0x33, 0x32, 0x74, 0x67, 0x14, + 0x03, 0x30, 0x25, 0x36, 0x34, 0x45, 0x37, 0x78, 0x85, 0x84, 0x75, 0x73, + 0x57, 0x86, 0x65, 0x58, 0x71, 0x68, 0x70, 0x56, 0x54, 0x17, 0x76, 0x63, + 0x87, 0x81, 0x80, 0x38, 0x35, 0x48, 0x43, 0x83, 0x00, + }, + { + 0x77, 0x62, 0x46, 0x33, 0x68, 0x52, 0x18, 0x05, 0x31, 0x25, 0x42, 0x04, + 0x51, 0x44, 0x40, 0x32, 0x55, 0x41, 0x26, 0x24, 0x30, 0x27, 0x57, 0x36, + 0x84, 0x76, 0x81, 0x83, 0x78, 0x73, 0x45, 0x85, 0x75, 0x86, 0x87, 0x56, + 0x53, 0x80, 0x67, 0x35, 0x34, 0x43, 0x37, 0x82, 0x70, 0x65, 0x74, 0x71, + 0x54, 0x48, 0x63, 0x58, 0x72, 0x64, 0x07, 0x03, 0x47, 0x38, 0x88, 0x20, + 0x01, 0x60, 0x28, 0x16, 0x02, 0x61, 0x50, 0x13, 0x08, 0x23, 0x17, 0x66, + 0x14, 0x06, 0x21, 0x15, 0x10, 0x00, 0x22, 0x12, 0x11, + }, + { + 0x10, 0x01, 0x24, 0x12, 0x88, 0x83, 0x70, 0x14, 0x08, 0x46, 0x25, 0x87, + 0x44, 0x42, 0x60, 0x50, 0x61, 0x51, 0x71, 0x66, 0x15, 0x04, 0x41, 0x33, + 0x17, 0x03, 0x34, 0x18, 0x86, 0x68, 0x67, 0x63, 0x57, 0x75, 0x65, 0x45, + 0x36, 0x58, 0x54, 0x43, 0x37, 0x56, 0x53, 0x74, 0x62, 0x85, 0x78, 0x07, + 0x05, 0x35, 0x13, 0x84, 0x64, 0x55, 0x76, 0x73, 0x47, 0x38, 0x52, 0x48, + 0x11, 0x00, 0x21, 0x20, 0x82, 0x28, 0x81, 0x80, 0x31, 0x30, 0x40, 0x32, + 0x16, 0x06, 0x26, 0x23, 0x27, 0x02, 0x77, 0x72, 0x22, + }, + { + 0x88, 0x82, 0x50, 0x47, 0x74, 0x43, 0x76, 0x75, 0x68, 0x24, 0x00, 0x37, + 0x30, 0x54, 0x44, 0x64, 0x58, 0x36, 0x34, 0x65, 0x40, 0x06, 0x03, 0x20, + 0x17, 0x08, 0x04, 0x48, 0x45, 0x87, 0x84, 0x71, 0x85, 0x78, 0x80, 0x73, + 0x07, 0x86, 0x63, 0x57, 0x70, 0x67, 0x77, 0x72, 0x83, 0x81, 0x32, 0x28, + 0x18, 0x05, 0x42, 0x38, 0x52, 0x14, 0x02, 0x25, 0x23, 0x66, 0x56, 0x53, + 0x62, 0x60, 0x35, 0x33, 0x46, 0x41, 0x21, 0x12, 0x10, 0x01, 0x26, 0x13, + 0x61, 0x22, 0x16, 0x27, 0x15, 0x55, 0x31, 0x51, 0x11, + }, + { + 0x13, 0x10, 0x27, 0x14, 0x66, 0x44, 0x41, 0x53, 0x46, 0x25, 0x18, 0x35, + 0x33, 0x68, 0x63, 0x88, 0x71, 0x34, 0x24, 0x50, 0x47, 0x37, 0x08, 0x48, + 0x45, 0x82, 0x74, 0x70, 0x84, 0x76, 0x30, 0x04, 0x57, 0x43, 0x83, 0x78, + 0x86, 0x85, 0x73, 0x07, 0x80, 0x75, 0x87, 0x65, 0x56, 0x03, 0x00, 0x20, + 0x06, 0x72, 0x52, 0x31, 0x62, 0x60, 0x21, 0x15, 0x51, 0x22, 0x16, 0x12, + 0x02, 0x01, 0x23, 0x17, 0x55, 0x77, 0x64, 0x58, 0x54, 0x81, 0x67, 0x36, + 0x05, 0x40, 0x38, 0x28, 0x26, 0x42, 0x32, 0x61, 0x11, + }, + { + 0x22, 0x11, 0x23, 0x13, 0x32, 0x25, 0x72, 0x45, 0x40, 0x57, 0x50, 0x03, + 0x00, 0x30, 0x08, 0x86, 0x75, 0x80, 0x68, 0x43, 0x04, 0x47, 0x07, 0x48, + 0x65, 0x58, 0x85, 0x84, 0x78, 0x64, 0x67, 0x63, 0x74, 0x73, 0x06, 0x05, + 0x44, 0x37, 0x87, 0x83, 0x46, 0x42, 0x54, 0x53, 0x18, 0x17, 0x36, 0x34, + 0x66, 0x55, 0x38, 0x24, 0x56, 0x41, 0x02, 0x01, 0x20, 0x14, 0x16, 0x12, + 0x61, 0x27, 0x26, 0x15, 0x31, 0x28, 0x21, 0x88, 0x82, 0x62, 0x60, 0x76, + 0x70, 0x33, 0x10, 0x52, 0x35, 0x71, 0x51, 0x81, 0x77, + }, + { + 0x16, 0x12, 0x61, 0x22, 0x51, 0x21, 0x15, 0x52, 0x31, 0x55, 0x81, 0x66, + 0x46, 0x42, 0x62, 0x54, 0x14, 0x01, 0x25, 0x23, 0x27, 0x13, 0x56, 0x41, + 0x35, 0x33, 0x58, 0x53, 0x26, 0x10, 0x32, 0x28, 0x84, 0x77, 0x43, 0x00, + 0x68, 0x47, 0x85, 0x45, 0x34, 0x57, 0x50, 0x05, 0x03, 0x37, 0x30, 0x87, + 0x86, 0x76, 0x08, 0x07, 0x80, 0x75, 0x70, 0x73, 0x04, 0x78, 0x74, 0x63, + 0x48, 0x71, 0x67, 0x82, 0x65, 0x17, 0x06, 0x24, 0x20, 0x88, 0x83, 0x60, + 0x44, 0x40, 0x72, 0x64, 0x18, 0x02, 0x38, 0x36, 0x11, + }, + { + 0x66, 0x01, 0x14, 0x03, 0x24, 0x23, 0x62, 0x08, 0x04, 0x35, 0x20, 0x72, + 0x63, 0x58, 0x70, 0x68, 0x48, 0x45, 0x54, 0x53, 0x26, 0x25, 0x65, 0x44, + 0x13, 0x05, 0x51, 0x41, 0x61, 0x16, 0x12, 0x10, 0x06, 0x28, 0x27, 0x60, + 0x40, 0x32, 0x56, 0x52, 0x17, 0x00, 0x31, 0x18, 0x73, 0x30, 0x75, 0x74, + 0x88, 0x84, 0x83, 0x86, 0x80, 0x85, 0x43, 0x38, 0x87, 0x47, 0x76, 0x71, + 0x50, 0x37, 0x78, 0x57, 0x82, 0x77, 0x67, 0x33, 0x07, 0x36, 0x34, 0x81, + 0x46, 0x42, 0x64, 0x55, 0x15, 0x02, 0x22, 0x21, 0x11, + }, + { + 0x22, 0x00, 0x11, 0x01, 0x20, 0x08, 0x88, 0x62, 0x27, 0x02, 0x07, 0x06, + 0x21, 0x12, 0x28, 0x87, 0x66, 0x32, 0x30, 0x38, 0x33, 0x15, 0x14, 0x25, + 0x17, 0x26, 0x24, 0x60, 0x42, 0x78, 0x71, 0x84, 0x81, 0x44, 0x23, 0x52, + 0x50, 0x80, 0x70, 0x35, 0x13, 0x48, 0x46, 0x83, 0x51, 0x40, 0x64, 0x61, + 0x55, 0x47, 0x74, 0x58, 0x18, 0x03, 0x41, 0x31, 0x73, 0x68, 0x43, 0x36, + 0x57, 0x45, 0x85, 0x56, 0x54, 0x67, 0x65, 0x76, 0x75, 0x37, 0x34, 0x63, + 0x53, 0x86, 0x77, 0x72, 0x05, 0x04, 0x16, 0x10, 0x82, + }, + { + 0x22, 0x12, 0x27, 0x21, 0x14, 0x01, 0x20, 0x15, 0x62, 0x02, 0x00, 0x16, + 0x10, 0x60, 0x17, 0x72, 0x66, 0x28, 0x07, 0x06, 0x18, 0x13, 0x82, 0x55, + 0x40, 0x78, 0x71, 0x25, 0x23, 0x32, 0x31, 0x42, 0x26, 0x61, 0x52, 0x24, + 0x08, 0x50, 0x44, 0x77, 0x37, 0x34, 0x63, 0x57, 0x87, 0x84, 0x80, 0x86, + 0x83, 0x45, 0x36, 0x85, 0x73, 0x70, 0x68, 0x81, 0x74, 0x33, 0x03, 0x38, + 0x35, 0x88, 0x56, 0x54, 0x76, 0x75, 0x46, 0x43, 0x53, 0x48, 0x64, 0x51, + 0x58, 0x47, 0x67, 0x65, 0x05, 0x04, 0x41, 0x30, 0x11, + }, + { + 0x44, 0x40, 0x66, 0x60, 0x23, 0x16, 0x32, 0x30, 0x07, 0x06, 0x18, 0x14, + 0x86, 0x50, 0x47, 0x75, 0x55, 0x33, 0x31, 0x41, 0x35, 0x80, 0x70, 0x84, + 0x83, 0x78, 0x71, 0x87, 0x81, 0x77, 0x12, 0x38, 0x25, 0x52, 0x51, 0x08, + 0x01, 0x17, 0x15, 0x58, 0x54, 0x68, 0x67, 0x34, 0x13, 0x48, 0x46, 0x04, + 0x03, 0x36, 0x05, 0x85, 0x56, 0x45, 0x65, 0x57, 0x73, 0x43, 0x37, 0x63, + 0x53, 0x64, 0x61, 0x76, 0x74, 0x24, 0x10, 0x62, 0x42, 0x21, 0x11, 0x02, + 0x00, 0x26, 0x20, 0x88, 0x28, 0x27, 0x82, 0x72, 0x22, + }, + { + 0x28, 0x27, 0x71, 0x70, 0x87, 0x78, 0x82, 0x22, 0x77, 0x72, 0x07, 0x01, + 0x14, 0x08, 0x81, 0x66, 0x62, 0x80, 0x75, 0x40, 0x25, 0x51, 0x50, 0x02, + 0x00, 0x26, 0x20, 0x42, 0x24, 0x52, 0x44, 0x16, 0x10, 0x23, 0x17, 0x64, + 0x60, 0x86, 0x83, 0x46, 0x41, 0x55, 0x54, 0x48, 0x47, 0x58, 0x56, 0x18, + 0x04, 0x35, 0x31, 0x57, 0x38, 0x34, 0x03, 0x63, 0x53, 0x67, 0x13, 0x05, + 0x36, 0x33, 0x73, 0x61, 0x43, 0x37, 0x68, 0x65, 0x45, 0x85, 0x76, 0x74, + 0x15, 0x06, 0x32, 0x30, 0x84, 0x12, 0x11, 0x88, 0x21, + }, + { + 0x82, 0x27, 0x08, 0x07, 0x16, 0x10, 0x62, 0x76, 0x74, 0x50, 0x41, 0x86, + 0x67, 0x15, 0x14, 0x38, 0x17, 0x40, 0x23, 0x61, 0x42, 0x11, 0x02, 0x26, + 0x20, 0x72, 0x77, 0x28, 0x12, 0x01, 0x60, 0x24, 0x88, 0x52, 0x44, 0x75, + 0x64, 0x25, 0x06, 0x32, 0x30, 0x55, 0x51, 0x68, 0x58, 0x46, 0x33, 0x48, + 0x47, 0x43, 0x37, 0x56, 0x54, 0x13, 0x03, 0x35, 0x34, 0x85, 0x73, 0x65, + 0x63, 0x45, 0x36, 0x57, 0x53, 0x83, 0x80, 0x05, 0x04, 0x31, 0x18, 0x84, + 0x70, 0x66, 0x87, 0x81, 0x21, 0x00, 0x78, 0x71, 0x22, + }, + { + 0x84, 0x81, 0x32, 0x25, 0x86, 0x83, 0x10, 0x04, 0x23, 0x14, 0x62, 0x26, + 0x70, 0x66, 0x42, 0x24, 0x64, 0x44, 0x87, 0x75, 0x71, 0x85, 0x80, 0x55, + 0x52, 0x67, 0x61, 0x50, 0x48, 0x58, 0x51, 0x18, 0x15, 0x38, 0x30, 0x33, + 0x31, 0x65, 0x41, 0x05, 0x03, 0x13, 0x08, 0x37, 0x36, 0x53, 0x43, 0x60, + 0x73, 0x68, 0x63, 0x57, 0x45, 0x35, 0x56, 0x54, 0x78, 0x76, 0x40, 0x34, + 0x47, 0x46, 0x06, 0x01, 0x17, 0x07, 0x77, 0x28, 0x02, 0x00, 0x12, 0x11, + 0x88, 0x72, 0x27, 0x20, 0x16, 0x74, 0x21, 0x82, 0x22, + }, + { + 0x77, 0x12, 0x81, 0x78, 0x72, 0x38, 0x33, 0x50, 0x44, 0x23, 0x01, 0x31, + 0x25, 0x34, 0x13, 0x37, 0x35, 0x86, 0x58, 0x55, 0x73, 0x68, 0x43, 0x04, + 0x54, 0x53, 0x64, 0x46, 0x65, 0x63, 0x57, 0x45, 0x67, 0x05, 0x03, 0x56, + 0x36, 0x62, 0x52, 0x83, 0x66, 0x42, 0x32, 0x80, 0x71, 0x10, 0x08, 0x24, + 0x16, 0x87, 0x18, 0x17, 0x47, 0x41, 0x07, 0x06, 0x15, 0x14, 0x75, 0x74, + 0x85, 0x76, 0x51, 0x48, 0x61, 0x60, 0x40, 0x30, 0x84, 0x70, 0x22, 0x82, + 0x28, 0x21, 0x11, 0x02, 0x00, 0x26, 0x20, 0x27, 0x88, + }, + { + 0x72, 0x27, 0x87, 0x81, 0x42, 0x33, 0x52, 0x50, 0x16, 0x08, 0x31, 0x23, + 0x02, 0x00, 0x78, 0x20, 0x82, 0x88, 0x28, 0x38, 0x32, 0x71, 0x62, 0x24, + 0x10, 0x30, 0x26, 0x64, 0x61, 0x76, 0x75, 0x44, 0x18, 0x58, 0x55, 0x54, + 0x48, 0x45, 0x43, 0x57, 0x46, 0x73, 0x35, 0x34, 0x37, 0x36, 0x04, 0x03, + 0x13, 0x05, 0x85, 0x65, 0x63, 0x68, 0x67, 0x47, 0x41, 0x56, 0x53, 0x70, + 0x60, 0x07, 0x06, 0x15, 0x14, 0x84, 0x83, 0x80, 0x66, 0x51, 0x86, 0x74, + 0x17, 0x01, 0x40, 0x25, 0x12, 0x11, 0x77, 0x21, 0x22, + }, + { + 0x27, 0x21, 0x88, 0x72, 0x28, 0x12, 0x11, 0x83, 0x77, 0x82, 0x80, 0x78, + 0x25, 0x24, 0x38, 0x32, 0x08, 0x01, 0x18, 0x16, 0x20, 0x02, 0x26, 0x23, + 0x81, 0x74, 0x86, 0x84, 0x10, 0x00, 0x62, 0x61, 0x04, 0x03, 0x13, 0x06, + 0x76, 0x58, 0x51, 0x64, 0x60, 0x31, 0x17, 0x41, 0x35, 0x44, 0x42, 0x70, + 0x66, 0x33, 0x15, 0x48, 0x40, 0x87, 0x65, 0x55, 0x67, 0x63, 0x54, 0x07, + 0x57, 0x56, 0x46, 0x45, 0x50, 0x47, 0x73, 0x68, 0x30, 0x14, 0x53, 0x43, + 0x75, 0x71, 0x52, 0x34, 0x05, 0x37, 0x36, 0x85, 0x22, + }, + { + 0x21, 0x14, 0x32, 0x27, 0x10, 0x72, 0x67, 0x82, 0x77, 0x44, 0x40, 0x54, + 0x45, 0x41, 0x37, 0x68, 0x56, 0x08, 0x01, 0x24, 0x13, 0x78, 0x48, 0x04, + 0x03, 0x43, 0x05, 0x81, 0x25, 0x07, 0x47, 0x35, 0x34, 0x06, 0x46, 0x36, + 0x88, 0x84, 0x83, 0x75, 0x74, 0x76, 0x73, 0x86, 0x85, 0x70, 0x65, 0x80, + 0x71, 0x57, 0x53, 0x87, 0x63, 0x51, 0x50, 0x23, 0x18, 0x33, 0x31, 0x61, + 0x12, 0x62, 0x22, 0x02, 0x00, 0x17, 0x15, 0x66, 0x55, 0x42, 0x64, 0x58, + 0x26, 0x20, 0x38, 0x30, 0x28, 0x16, 0x60, 0x52, 0x11, + }, + { + 0x61, 0x15, 0x27, 0x25, 0x32, 0x28, 0x06, 0x01, 0x24, 0x17, 0x78, 0x75, + 0x87, 0x80, 0x85, 0x08, 0x07, 0x73, 0x70, 0x48, 0x47, 0x84, 0x83, 0x81, + 0x71, 0x88, 0x86, 0x76, 0x74, 0x30, 0x04, 0x43, 0x37, 0x82, 0x72, 0x67, + 0x20, 0x03, 0x57, 0x45, 0x77, 0x52, 0x36, 0x41, 0x38, 0x68, 0x58, 0x05, + 0x00, 0x34, 0x33, 0x55, 0x26, 0x60, 0x56, 0x11, 0x66, 0x16, 0x64, 0x51, + 0x10, 0x02, 0x23, 0x18, 0x62, 0x54, 0x53, 0x65, 0x63, 0x40, 0x35, 0x50, + 0x42, 0x31, 0x13, 0x46, 0x44, 0x14, 0x12, 0x22, 0x21, + }, + { + 0x22, 0x21, 0x12, 0x01, 0x16, 0x15, 0x82, 0x88, 0x87, 0x42, 0x40, 0x60, + 0x44, 0x06, 0x05, 0x31, 0x10, 0x66, 0x61, 0x83, 0x76, 0x26, 0x25, 0x72, + 0x27, 0x81, 0x11, 0x46, 0x41, 0x84, 0x62, 0x13, 0x02, 0x24, 0x20, 0x80, + 0x75, 0x65, 0x63, 0x68, 0x54, 0x37, 0x07, 0x57, 0x30, 0x50, 0x52, 0x48, + 0x73, 0x67, 0x74, 0x55, 0x53, 0x47, 0x58, 0x56, 0x34, 0x04, 0x43, 0x38, + 0x70, 0x64, 0x17, 0x00, 0x45, 0x36, 0x78, 0x86, 0x85, 0x33, 0x32, 0x51, + 0x35, 0x08, 0x03, 0x18, 0x14, 0x28, 0x23, 0x77, 0x71, }, }; From patchwork Tue Nov 10 10:47:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23535 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 56CCD44AD0B for ; Tue, 10 Nov 2020 13:02:13 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3381A68BE9B; Tue, 10 Nov 2020 12:50:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A7F6D68BEB5 for ; Tue, 10 Nov 2020 12:50:16 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id p8so11339424wrx.5 for ; Tue, 10 Nov 2020 02:50:16 -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=hjjsRFEpI2D6TeRT9TCV/vyITV7b4Iahbgr8buvjEbM=; b=eLaiKy1Fx9ArDn85izEXh2kl21GlhvPb7ue1uDctqMVUianqKpCvLgMVoJ5Z5snnBD Z/gP0ZZsMT9gYRehgWTgWOmbjUARS2fRC5LFkoP1TIgOIOHXrAgYBz4fLDA0TsEpBvIP NkTcv2OrmotN4kGggQ84QSy9fQbhxZtigUWZj+jYjXUgLCRHbycpR4kbjYTgIQCbuXBc J4+r3FFtJTsUMFj9ft0viwQ8W15Hbul/qCCMhgNqF454UB13VyezQjedkwFHNCE8SgIK j7KEsLYBf4/3+XpBBUEBHdGvs0M3kvSYWH3wnOUvhVC7A5W4yrXS7LfTznyVQAsxF2Cx bdGw== 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=hjjsRFEpI2D6TeRT9TCV/vyITV7b4Iahbgr8buvjEbM=; b=ht0Rcjj34JhN4unN0a+GqWkk0eh9EKgvCnxKL9v4PWkObXvaadEL/7a2OsrE8BCc4K sH4CmwAN6civCpXDYL6Qcp+ZB+n7luF+KWQOx/RXe5yCYOrPgi2lWdcZau+U+uN9uChT V2ASvx2nXAbHGdAKpJLIHWTsC/p6LVPjtWc+UOTAmKv/XXPXiS8N2/QJDZdMJ/pvyR2Q qV+8lEY0bfW703zL6+0WjFbD9DnleB5k4rWxl5cZtQd03aw8cWIsb5fTfPjWA0qAM54N ektqAbSESaJb14GXcaj3R5hRG1mY8k0d2YvXJiObwHo+OiGynPwPaKDufRTGPvqZ7QUA lYYg== X-Gm-Message-State: AOAM530QyKyuVcjHH0aknvlES5bhJ29MwtA2wJ9t4+jQEPygbFu8rfUq ag+p0gLcqxMdXKx1F2u49KLneXMoctg= X-Google-Smtp-Source: ABdhPJwQhjwqKcZZn86xaM91v/F7pBoXO9EdiB8NqmBG/pGULOEr9Joj/Ct7O/xYZ9JTOGYK0f/d3A== X-Received: by 2002:adf:e443:: with SMTP id t3mr23103422wrm.14.1605005415943; Tue, 10 Nov 2020 02:50:15 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:15 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:54 +0100 Message-Id: <20201110104851.321029-58-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 057/114] avcodec/rv40: Avoid offset table when initializing static 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/rv40.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 81e08af5f1..7ed599cd69 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -41,11 +41,6 @@ static VLC aic_top_vlc; static VLC aic_mode1_vlc[AIC_MODE1_NUM], aic_mode2_vlc[AIC_MODE2_NUM]; static VLC ptype_vlc[NUM_PTYPE_VLCS], btype_vlc[NUM_BTYPE_VLCS]; -static const int16_t mode2_offs[] = { - 0, 614, 1222, 1794, 2410, 3014, 3586, 4202, 4792, 5382, 5966, 6542, - 7138, 7716, 8292, 8864, 9444, 10030, 10642, 11212, 11814 -}; - /** * Initialize all tables. */ @@ -72,7 +67,7 @@ static av_cold void rv40_init_tables(void) aic_mode1_vlc_bits[i], 1, 1, aic_mode1_vlc_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); } - for(i = 0; i < AIC_MODE2_NUM; i++){ + for (unsigned i = 0, offset = 0; i < AIC_MODE2_NUM; i++){ uint16_t syms[AIC_MODE2_SIZE]; for (int j = 0; j < AIC_MODE2_SIZE; j++) { @@ -83,11 +78,12 @@ static av_cold void rv40_init_tables(void) else syms[j] = first | (second << 8); } - aic_mode2_vlc[i].table = &aic_mode2_table[mode2_offs[i]]; - aic_mode2_vlc[i].table_allocated = mode2_offs[i + 1] - mode2_offs[i]; + aic_mode2_vlc[i].table = &aic_mode2_table[offset]; + aic_mode2_vlc[i].table_allocated = FF_ARRAY_ELEMS(aic_mode2_table) - offset; ff_init_vlc_from_lengths(&aic_mode2_vlc[i], AIC_MODE2_BITS, AIC_MODE2_SIZE, aic_mode2_vlc_bits[i], 1, syms, 2, 2, 0, INIT_VLC_USE_NEW_STATIC); + offset += aic_mode2_vlc[i].table_size; } for(i = 0; i < NUM_PTYPE_VLCS; i++){ ptype_vlc[i].table = &ptype_table[i << PTYPE_VLC_BITS]; From patchwork Tue Nov 10 10:47:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23490 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 B250444B3FF for ; Tue, 10 Nov 2020 12:54:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 256D468BE94; Tue, 10 Nov 2020 12:50:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8C6F368BEC0 for ; Tue, 10 Nov 2020 12:50:18 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id h2so2543447wmm.0 for ; Tue, 10 Nov 2020 02:50:18 -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=M8ZbgWYGdYN/wEYrs90BmAy5G3eULm1OfZ/u7ebfqNU=; b=OvVyhnVGCRuLZ7k51YSv8CdzEnpvJJ8lou6HsLclcZdqqPhdjsxyhhQAsZiXcYRLdP TQzGHTpw/XH8rEREgrOk5DKF/UENHiB3SqWcDUXxybhFKO4IzeN4sqWmTjw8Qy+wI6xn DSLEL2kWPkYng9ozZCLAk87Rh06Ih6R9yI+92kQSDv6T8yMjoF6z5PnBxQo7YPBoAF1R lTZGvdUbEio+vSPtbXkh1SWpZwOSVPgfuFJLbgoiTF4AKzP/DN4UtWXyacOe0bzbOQTS Bfj3McmxaGdfspZTwJN5tQv2BE9ufDGcqDUembGDcy0NpAU2OfxDy0PWmjH247Fj6kQs GTAw== 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=M8ZbgWYGdYN/wEYrs90BmAy5G3eULm1OfZ/u7ebfqNU=; b=mOlqnVRi/+HqCPNiJhs0T3puFv+b8OAv0Z6e/PXGX81COcR9E/RM9RaWhXqwAo5etN w0pBbwGX7PEJYkyjz2wYYspueuPh6X1vniW9DXCFcqXj1aQcXftB3X+a0eoVkhzdD61O SrSuNK1Wag8I/qpRLofAW8z9zBrsDttW2a/ln8cFepc1OiPFvqDRArHh2aaRp+aPkjuz W8f9D/wpR919tzOz06nZSwQccqjYoYYawCCzC8mfBUjl/e9/fa8AMnFs1NNSMaDJj2f3 9LJXMSOgCrXgnoJSb6C78s50cBwO3MdT9HtGykKFUJkdTB+hu6dwIIfJ2GSGsjvAQiKT 6+Xg== X-Gm-Message-State: AOAM533oAaLilBt91ER5RVWnxqnNM2QCVzlTXS+m0Nv8igYeKRdMWe7t 22xGJbMlq6K0B4kpRAc2wdQ/sgh6+gw= X-Google-Smtp-Source: ABdhPJxzFPpeD+2g2RXSslfhWQqkSEvu9y5t3IFzFNXqLFZb0mdxMPOy2bGHX6eapKHwtQ4L45WSDg== X-Received: by 2002:a1c:3907:: with SMTP id g7mr4027497wma.176.1605005416942; Tue, 10 Nov 2020 02:50:16 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:16 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:55 +0100 Message-Id: <20201110104851.321029-59-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 058/114] avcodec/rv40: Avoid code duplication when 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" Besides removing code duplication the method for determining the offset of each VLC table in the VLC_TYPE buffer also has the advantage of not wasting space for skipped AIC mode 1 VLCs. Signed-off-by: Andreas Rheinhardt --- libavcodec/rv40.c | 52 +++--- libavcodec/rv40vlc2.h | 383 +++++++++++++++++++----------------------- 2 files changed, 200 insertions(+), 235 deletions(-) diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 7ed599cd69..15e00c2694 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -41,31 +41,35 @@ static VLC aic_top_vlc; static VLC aic_mode1_vlc[AIC_MODE1_NUM], aic_mode2_vlc[AIC_MODE2_NUM]; static VLC ptype_vlc[NUM_PTYPE_VLCS], btype_vlc[NUM_BTYPE_VLCS]; +static av_cold void rv40_init_table(VLC *vlc, unsigned *offset, int nb_bits, + int nb_codes, const uint8_t (*tab)[2]) +{ + static VLC_TYPE vlc_buf[11776][2]; + + vlc->table = &vlc_buf[*offset]; + vlc->table_allocated = 1 << nb_bits; + *offset += 1 << nb_bits; + + ff_init_vlc_from_lengths(vlc, nb_bits, nb_codes, + &tab[0][1], 2, &tab[0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); +} + /** * Initialize all tables. */ static av_cold void rv40_init_tables(void) { - int i; - static VLC_TYPE aic_table[1 << AIC_TOP_BITS][2]; - static VLC_TYPE aic_mode1_table[AIC_MODE1_NUM << AIC_MODE1_BITS][2]; + int i, offset = 0; static VLC_TYPE aic_mode2_table[11814][2]; - static VLC_TYPE ptype_table[NUM_PTYPE_VLCS << PTYPE_VLC_BITS][2]; - static VLC_TYPE btype_table[NUM_BTYPE_VLCS << BTYPE_VLC_BITS][2]; - - aic_top_vlc.table = aic_table; - aic_top_vlc.table_allocated = 1 << AIC_TOP_BITS; - init_vlc(&aic_top_vlc, AIC_TOP_BITS, AIC_TOP_SIZE, - rv40_aic_top_vlc_bits, 1, 1, - rv40_aic_top_vlc_codes, 1, 1, INIT_VLC_USE_NEW_STATIC); + + rv40_init_table(&aic_top_vlc, &offset, AIC_TOP_BITS, AIC_TOP_SIZE, + rv40_aic_top_vlc_tab); for(i = 0; i < AIC_MODE1_NUM; i++){ // Every tenth VLC table is empty if((i % 10) == 9) continue; - aic_mode1_vlc[i].table = &aic_mode1_table[i << AIC_MODE1_BITS]; - aic_mode1_vlc[i].table_allocated = 1 << AIC_MODE1_BITS; - init_vlc(&aic_mode1_vlc[i], AIC_MODE1_BITS, AIC_MODE1_SIZE, - aic_mode1_vlc_bits[i], 1, 1, - aic_mode1_vlc_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + rv40_init_table(&aic_mode1_vlc[i], &offset, AIC_MODE1_BITS, + AIC_MODE1_SIZE, aic_mode1_vlc_tabs[i]); } for (unsigned i = 0, offset = 0; i < AIC_MODE2_NUM; i++){ uint16_t syms[AIC_MODE2_SIZE]; @@ -86,20 +90,12 @@ static av_cold void rv40_init_tables(void) offset += aic_mode2_vlc[i].table_size; } for(i = 0; i < NUM_PTYPE_VLCS; i++){ - ptype_vlc[i].table = &ptype_table[i << PTYPE_VLC_BITS]; - ptype_vlc[i].table_allocated = 1 << PTYPE_VLC_BITS; - ff_init_vlc_from_lengths(&ptype_vlc[i], PTYPE_VLC_BITS, PTYPE_VLC_SIZE, - &ptype_vlc_tabs[i][0][1], 2, - &ptype_vlc_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + rv40_init_table(&ptype_vlc[i], &offset, PTYPE_VLC_BITS, PTYPE_VLC_SIZE, + ptype_vlc_tabs[i]); } for(i = 0; i < NUM_BTYPE_VLCS; i++){ - btype_vlc[i].table = &btype_table[i << BTYPE_VLC_BITS]; - btype_vlc[i].table_allocated = 1 << BTYPE_VLC_BITS; - ff_init_vlc_from_lengths(&btype_vlc[i], BTYPE_VLC_BITS, BTYPE_VLC_SIZE, - &btype_vlc_tabs[i][0][1], 2, - &btype_vlc_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + rv40_init_table(&btype_vlc[i], &offset, BTYPE_VLC_BITS, BTYPE_VLC_SIZE, + btype_vlc_tabs[i]); } } diff --git a/libavcodec/rv40vlc2.h b/libavcodec/rv40vlc2.h index 783b93ba2e..fec47ff4ad 100644 --- a/libavcodec/rv40vlc2.h +++ b/libavcodec/rv40vlc2.h @@ -35,13 +35,10 @@ //@{ #define AIC_TOP_BITS 7 #define AIC_TOP_SIZE 16 -static const uint8_t rv40_aic_top_vlc_codes[AIC_TOP_SIZE] = { - 0x01, 0x05, 0x01, 0x00, 0x03, 0x3D, 0x1D, 0x02, - 0x04, 0x3C, 0x3F, 0x1C, 0x0D, 0x3E, 0x0C, 0x01 -}; - -static const uint8_t rv40_aic_top_vlc_bits[AIC_TOP_SIZE] = { - 1, 4, 5, 5, 5, 7, 6, 5, 4, 7, 7, 6, 5, 7, 5, 3 +static const uint8_t rv40_aic_top_vlc_tab[AIC_TOP_SIZE][2] = { + { 0x3, 5 }, { 0x2, 5 }, { 0x7, 5 }, { 0x4, 5 }, { 0xF, 3 }, { 0x8, 4 }, + { 0x1, 4 }, { 0xE, 5 }, { 0xC, 5 }, { 0xB, 6 }, { 0x6, 6 }, { 0x9, 7 }, + { 0x5, 7 }, { 0xD, 7 }, { 0xA, 7 }, { 0x0, 1 }, }; //@} @@ -388,206 +385,178 @@ static const uint8_t aic_mode2_vlc_bits[AIC_MODE2_NUM][AIC_MODE2_SIZE] = { #define AIC_MODE1_SIZE 9 #define AIC_MODE1_BITS 7 -static const uint8_t aic_mode1_vlc_codes[AIC_MODE1_NUM][AIC_MODE1_SIZE] = { - { 0x01, 0x01, 0x01, 0x11, 0x00, 0x09, 0x03, 0x10, 0x05,}, - { 0x09, 0x01, 0x01, 0x05, 0x11, 0x00, 0x03, 0x21, 0x20,}, - { 0x01, 0x01, 0x01, 0x11, 0x09, 0x10, 0x05, 0x00, 0x03,}, - { 0x01, 0x01, 0x00, 0x03, 0x21, 0x05, 0x09, 0x20, 0x11,}, - { 0x01, 0x09, 0x00, 0x29, 0x08, 0x15, 0x03, 0x0B, 0x28,}, - { 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x03, 0x02,}, - { 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x01, 0x09, 0x08,}, - { 0x01, 0x01, 0x01, 0x09, 0x01, 0x08, 0x00, 0x03, 0x05,}, - { 0x01, 0x01, 0x01, 0x00, 0x05, 0x11, 0x09, 0x10, 0x03,}, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, - - { 0x01, 0x01, 0x01, 0x05, 0x01, 0x00, 0x03, 0x09, 0x08,}, - { 0x09, 0x01, 0x01, 0x05, 0x11, 0x00, 0x03, 0x21, 0x20,}, - { 0x01, 0x01, 0x01, 0x0D, 0x05, 0x04, 0x00, 0x07, 0x0C,}, - { 0x01, 0x01, 0x00, 0x05, 0x11, 0x03, 0x09, 0x21, 0x20,}, - { 0x05, 0x01, 0x01, 0x11, 0x00, 0x09, 0x03, 0x21, 0x20,}, - { 0x09, 0x01, 0x01, 0x00, 0x05, 0x01, 0x03, 0x11, 0x10,}, - { 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x03, 0x02,}, - { 0x01, 0x01, 0x01, 0x09, 0x00, 0x05, 0x01, 0x03, 0x08,}, - { 0x01, 0x01, 0x01, 0x09, 0x11, 0x05, 0x00, 0x10, 0x03,}, - { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, - - { 0x01, 0x00, 0x01, 0x09, 0x08, 0x15, 0x14, 0x0B, 0x03,}, - { 0x0D, 0x01, 0x01, 0x05, 0x0C, 0x04, 0x01, 0x00, 0x07,}, - { 0x01, 0x01, 0x01, 0x05, 0x00, 0x04, 0x03, 0x01, 0x01,}, - { 0x05, 0x01, 0x01, 0x04, 0x19, 0x07, 0x18, 0x0D, 0x00,}, - { 0x11, 0x09, 0x01, 0x21, 0x05, 0x20, 0x01, 0x00, 0x03,}, - { 0x41, 0x01, 0x00, 0x05, 0x40, 0x03, 0x09, 0x21, 0x11,}, - { 0x29, 0x01, 0x00, 0x28, 0x09, 0x15, 0x03, 0x08, 0x0B,}, - { 0x01, 0x00, 0x01, 0x11, 0x09, 0x10, 0x05, 0x01, 0x03,}, - { 0x05, 0x01, 0x01, 0x04, 0x0D, 0x0C, 0x07, 0x00, 0x01,}, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, - - { 0x01, 0x00, 0x03, 0x05, 0x11, 0x10, 0x25, 0x24, 0x13,}, - { 0x21, 0x01, 0x01, 0x00, 0x11, 0x03, 0x05, 0x20, 0x09,}, - { 0x01, 0x01, 0x01, 0x00, 0x09, 0x11, 0x10, 0x05, 0x03,}, - { 0x21, 0x05, 0x01, 0x01, 0x09, 0x00, 0x11, 0x20, 0x03,}, - { 0x05, 0x01, 0x00, 0x04, 0x01, 0x19, 0x07, 0x18, 0x0D,}, - { 0x11, 0x01, 0x00, 0x01, 0x09, 0x01, 0x03, 0x10, 0x05,}, - { 0x1D, 0x01, 0x05, 0x0D, 0x0C, 0x04, 0x00, 0x1C, 0x0F,}, - { 0x05, 0x19, 0x01, 0x04, 0x00, 0x18, 0x1B, 0x1A, 0x07,}, - { 0x09, 0x01, 0x00, 0x01, 0x05, 0x03, 0x11, 0x10, 0x01,}, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, - - { 0x01, 0x00, 0x03, 0x41, 0x05, 0x40, 0x09, 0x11, 0x21,}, - { 0x05, 0x01, 0x01, 0x19, 0x04, 0x07, 0x00, 0x18, 0x0D,}, - { 0x01, 0x01, 0x01, 0x05, 0x01, 0x04, 0x01, 0x00, 0x03,}, - { 0x01, 0x05, 0x00, 0x0D, 0x01, 0x04, 0x07, 0x19, 0x18,}, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02,}, - { 0x31, 0x01, 0x05, 0x19, 0x04, 0x07, 0x00, 0x30, 0x0D,}, - { 0x01, 0x00, 0x03, 0x11, 0x01, 0x05, 0x01, 0x09, 0x10,}, - { 0x01, 0x05, 0x01, 0x11, 0x01, 0x10, 0x00, 0x03, 0x09,}, - { 0x01, 0x09, 0x00, 0x29, 0x03, 0x08, 0x28, 0x15, 0x0B,}, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, - - { 0x01, 0x01, 0x00, 0x09, 0x15, 0x03, 0x08, 0x14, 0x0B,}, - { 0x11, 0x01, 0x01, 0x00, 0x09, 0x01, 0x03, 0x10, 0x05,}, - { 0x01, 0x00, 0x03, 0x25, 0x11, 0x05, 0x10, 0x24, 0x13,}, - { 0x11, 0x01, 0x00, 0x01, 0x09, 0x01, 0x05, 0x10, 0x03,}, - { 0x05, 0x01, 0x00, 0x0D, 0x0C, 0x04, 0x0F, 0x1D, 0x1C,}, - { 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x03, 0x02,}, - { 0x21, 0x01, 0x05, 0x09, 0x11, 0x00, 0x03, 0x41, 0x40,}, - { 0x05, 0x01, 0x00, 0x1D, 0x1C, 0x0D, 0x0C, 0x0F, 0x04,}, - { 0x05, 0x01, 0x00, 0x0D, 0x31, 0x04, 0x19, 0x30, 0x07,}, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, - - { 0x01, 0x01, 0x00, 0x21, 0x05, 0x11, 0x03, 0x09, 0x20,}, - { 0x01, 0x01, 0x00, 0x11, 0x03, 0x05, 0x01, 0x09, 0x10,}, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02,}, - { 0x05, 0x01, 0x04, 0x19, 0x07, 0x0D, 0x00, 0x31, 0x30,}, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02,}, - { 0x05, 0x01, 0x01, 0x11, 0x09, 0x00, 0x03, 0x21, 0x20,}, - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02,}, - { 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x01, 0x01, 0x02,}, - { 0x09, 0x01, 0x00, 0x29, 0x08, 0x15, 0x03, 0x28, 0x0B,}, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, - - { 0x01, 0x01, 0x01, 0x05, 0x01, 0x04, 0x00, 0x01, 0x03,}, - { 0x09, 0x01, 0x00, 0x29, 0x28, 0x15, 0x08, 0x03, 0x0B,}, - { 0x01, 0x00, 0x01, 0x11, 0x05, 0x10, 0x09, 0x01, 0x03,}, - { 0x05, 0x04, 0x01, 0x1D, 0x0D, 0x0C, 0x1C, 0x00, 0x0F,}, - { 0x09, 0x11, 0x01, 0x41, 0x00, 0x40, 0x05, 0x03, 0x21,}, - { 0x0D, 0x05, 0x01, 0x1D, 0x1C, 0x0C, 0x04, 0x00, 0x0F,}, - { 0x41, 0x09, 0x01, 0x40, 0x00, 0x11, 0x05, 0x03, 0x21,}, - { 0x01, 0x01, 0x01, 0x05, 0x01, 0x04, 0x00, 0x01, 0x03,}, - { 0x05, 0x04, 0x01, 0x0D, 0x01, 0x0C, 0x07, 0x01, 0x00,}, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, - - { 0x05, 0x04, 0x01, 0x07, 0x19, 0x31, 0x30, 0x0D, 0x00,}, - { 0x21, 0x01, 0x01, 0x00, 0x11, 0x09, 0x20, 0x05, 0x03,}, - { 0x05, 0x01, 0x01, 0x04, 0x07, 0x0D, 0x0C, 0x00, 0x01,}, - { 0x21, 0x09, 0x01, 0x00, 0x20, 0x05, 0x23, 0x22, 0x03,}, - { 0x31, 0x0D, 0x01, 0x19, 0x05, 0x30, 0x04, 0x07, 0x00,}, - { 0x31, 0x05, 0x01, 0x04, 0x19, 0x00, 0x0D, 0x30, 0x07,}, - { 0x31, 0x01, 0x00, 0x0D, 0x05, 0x19, 0x04, 0x30, 0x07,}, - { 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02, 0x01, 0x01,}, - { 0x01, 0x00, 0x01, 0x01, 0x05, 0x09, 0x08, 0x03, 0x01,}, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, -}; - -static const uint8_t aic_mode1_vlc_bits[AIC_MODE1_NUM][AIC_MODE1_SIZE] = { - { 1, 4, 2, 7, 4, 6, 4, 7, 5,}, - { 5, 1, 3, 4, 6, 3, 3, 7, 7,}, - { 1, 4, 2, 7, 6, 7, 5, 4, 4,}, - { 1, 3, 3, 3, 7, 4, 5, 7, 6,}, - { 2, 4, 2, 6, 4, 5, 2, 4, 6,}, - { 7, 2, 3, 4, 7, 1, 5, 7, 7,}, - { 5, 1, 3, 6, 5, 5, 2, 7, 7,}, - { 2, 5, 1, 7, 3, 7, 5, 5, 6,}, - { 2, 4, 1, 4, 5, 7, 6, 7, 4,}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, - - { 2, 1, 3, 6, 5, 5, 5, 7, 7,}, - { 5, 1, 3, 4, 6, 3, 3, 7, 7,}, - { 4, 1, 2, 6, 5, 5, 4, 5, 6,}, - { 3, 1, 3, 4, 6, 3, 5, 7, 7,}, - { 4, 1, 3, 6, 3, 5, 3, 7, 7,}, - { 6, 1, 4, 4, 5, 2, 4, 7, 7,}, - { 7, 1, 5, 7, 4, 3, 2, 7, 7,}, - { 5, 3, 2, 7, 5, 6, 1, 5, 7,}, - { 4, 1, 2, 6, 7, 5, 4, 7, 4,}, - { 1, 0, 1, 0, 0, 0, 0, 0, 0,}, - - { 3, 3, 1, 5, 5, 6, 6, 5, 3,}, - { 6, 2, 1, 5, 6, 5, 4, 4, 5,}, - { 6, 4, 1, 7, 6, 7, 6, 3, 2,}, - { 4, 3, 1, 4, 6, 4, 6, 5, 3,}, - { 6, 5, 1, 7, 4, 7, 3, 3, 3,}, - { 7, 2, 2, 3, 7, 2, 4, 6, 5,}, - { 6, 2, 2, 6, 4, 5, 2, 4, 4,}, - { 4, 4, 1, 7, 6, 7, 5, 2, 4,}, - { 5, 4, 1, 5, 6, 6, 5, 4, 2,}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, - - { 2, 2, 2, 3, 5, 5, 6, 6, 5,}, - { 7, 1, 3, 3, 6, 3, 4, 7, 5,}, - { 2, 4, 1, 4, 6, 7, 7, 5, 4,}, - { 7, 4, 3, 1, 5, 3, 6, 7, 3,}, - { 4, 3, 3, 4, 1, 6, 4, 6, 5,}, - { 7, 4, 4, 2, 6, 1, 4, 7, 5,}, - { 5, 2, 3, 4, 4, 3, 2, 5, 4,}, - { 3, 5, 2, 3, 2, 5, 5, 5, 3,}, - { 6, 4, 4, 2, 5, 4, 7, 7, 1,}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, - - { 2, 2, 2, 7, 3, 7, 4, 5, 6,}, - { 4, 1, 3, 6, 4, 4, 3, 6, 5,}, - { 2, 4, 1, 7, 3, 7, 6, 6, 6,}, - { 3, 4, 3, 5, 1, 4, 4, 6, 6,}, - { 4, 5, 2, 7, 1, 7, 3, 7, 7,}, - { 6, 2, 3, 5, 3, 3, 2, 6, 4,}, - { 4, 4, 4, 7, 2, 5, 1, 6, 7,}, - { 4, 5, 2, 7, 1, 7, 4, 4, 6,}, - { 2, 4, 2, 6, 2, 4, 6, 5, 4,}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, - - { 1, 3, 3, 5, 6, 3, 5, 6, 5,}, - { 7, 1, 4, 4, 6, 2, 4, 7, 5,}, - { 2, 2, 2, 6, 5, 3, 5, 6, 5,}, - { 7, 4, 4, 2, 6, 1, 5, 7, 4,}, - { 3, 2, 2, 4, 4, 3, 4, 5, 5,}, - { 7, 2, 5, 3, 7, 1, 4, 7, 7,}, - { 6, 2, 3, 4, 5, 2, 2, 7, 7,}, - { 3, 2, 2, 5, 5, 4, 4, 4, 3,}, - { 3, 2, 2, 4, 6, 3, 5, 6, 3,}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, - - { 1, 3, 3, 7, 4, 6, 3, 5, 7,}, - { 4, 1, 4, 7, 4, 5, 2, 6, 7,}, - { 2, 4, 1, 7, 5, 7, 3, 7, 7,}, - { 3, 2, 3, 5, 3, 4, 2, 6, 6,}, - { 3, 5, 4, 7, 2, 7, 1, 7, 7,}, - { 4, 1, 3, 6, 5, 3, 3, 7, 7,}, - { 4, 2, 5, 7, 3, 7, 1, 7, 7,}, - { 7, 4, 1, 7, 3, 7, 2, 5, 7,}, - { 4, 2, 2, 6, 4, 5, 2, 6, 4,}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, - - { 3, 4, 1, 7, 6, 7, 6, 2, 6,}, - { 4, 2, 2, 6, 6, 5, 4, 2, 4,}, - { 4, 4, 1, 7, 5, 7, 6, 2, 4,}, - { 3, 3, 2, 5, 4, 4, 5, 2, 4,}, - { 4, 5, 2, 7, 2, 7, 3, 2, 6,}, - { 4, 3, 2, 5, 5, 4, 3, 2, 4,}, - { 7, 4, 2, 7, 2, 5, 3, 2, 6,}, - { 4, 6, 2, 7, 3, 7, 6, 1, 6,}, - { 5, 5, 1, 6, 4, 6, 5, 2, 4,}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, - - { 3, 3, 2, 3, 5, 6, 6, 4, 2,}, - { 7, 1, 3, 3, 6, 5, 7, 4, 3,}, - { 5, 4, 1, 5, 5, 6, 6, 4, 2,}, - { 6, 4, 2, 2, 6, 3, 6, 6, 2,}, - { 6, 4, 2, 5, 3, 6, 3, 3, 2,}, - { 6, 3, 2, 3, 5, 2, 4, 6, 3,}, - { 6, 2, 2, 4, 3, 5, 3, 6, 3,}, - { 7, 5, 1, 7, 4, 7, 7, 3, 2,}, - { 5, 5, 2, 3, 6, 7, 7, 5, 1,}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, +static const uint8_t aic_mode1_vlc_tabs[AIC_MODE1_NUM][AIC_MODE1_SIZE][2] = { + { { 4, 4 }, { 1, 4 }, { 7, 7 }, { 3, 7 }, { 5, 6 }, + { 8, 5 }, { 6, 4 }, { 2, 2 }, { 0, 1 } }, + { { 5, 3 }, { 2, 3 }, { 8, 7 }, { 7, 7 }, { 4, 6 }, + { 0, 5 }, { 3, 4 }, { 6, 3 }, { 1, 1 } }, + { { 7, 4 }, { 1, 4 }, { 5, 7 }, { 3, 7 }, { 4, 6 }, + { 6, 5 }, { 8, 4 }, { 2, 2 }, { 0, 1 } }, + { { 2, 3 }, { 1, 3 }, { 7, 7 }, { 4, 7 }, { 8, 6 }, + { 6, 5 }, { 5, 4 }, { 3, 3 }, { 0, 1 } }, + { { 2, 2 }, { 0, 2 }, { 4, 4 }, { 1, 4 }, { 8, 6 }, + { 3, 6 }, { 5, 5 }, { 7, 4 }, { 6, 2 } }, + { { 4, 7 }, { 0, 7 }, { 8, 7 }, { 7, 7 }, { 6, 5 }, + { 3, 4 }, { 2, 3 }, { 1, 2 }, { 5, 1 } }, + { { 4, 5 }, { 0, 5 }, { 8, 7 }, { 7, 7 }, { 3, 6 }, + { 5, 5 }, { 2, 3 }, { 6, 2 }, { 1, 1 } }, + { { 6, 5 }, { 1, 5 }, { 5, 7 }, { 3, 7 }, { 8, 6 }, + { 7, 5 }, { 4, 3 }, { 0, 2 }, { 2, 1 } }, + { { 3, 4 }, { 1, 4 }, { 7, 7 }, { 5, 7 }, { 6, 6 }, + { 4, 5 }, { 8, 4 }, { 0, 2 }, { 2, 1 } }, + { { 0 } }, /* unused */ + { { 5, 5 }, { 4, 5 }, { 8, 7 }, { 7, 7 }, { 3, 6 }, + { 6, 5 }, { 2, 3 }, { 0, 2 }, { 1, 1 } }, + { { 5, 3 }, { 2, 3 }, { 8, 7 }, { 7, 7 }, { 4, 6 }, + { 0, 5 }, { 3, 4 }, { 6, 3 }, { 1, 1 } }, + { { 6, 4 }, { 0, 4 }, { 5, 5 }, { 4, 5 }, { 8, 6 }, + { 3, 6 }, { 7, 5 }, { 2, 2 }, { 1, 1 } }, + { { 2, 3 }, { 0, 3 }, { 8, 7 }, { 7, 7 }, { 4, 6 }, + { 6, 5 }, { 3, 4 }, { 5, 3 }, { 1, 1 } }, + { { 4, 3 }, { 2, 3 }, { 8, 7 }, { 7, 7 }, { 3, 6 }, + { 5, 5 }, { 0, 4 }, { 6, 3 }, { 1, 1 } }, + { { 3, 4 }, { 2, 4 }, { 8, 7 }, { 7, 7 }, { 0, 6 }, + { 4, 5 }, { 6, 4 }, { 5, 2 }, { 1, 1 } }, + { { 3, 7 }, { 0, 7 }, { 8, 7 }, { 7, 7 }, { 2, 5 }, + { 4, 4 }, { 5, 3 }, { 6, 2 }, { 1, 1 } }, + { { 4, 5 }, { 0, 5 }, { 8, 7 }, { 3, 7 }, { 5, 6 }, + { 7, 5 }, { 1, 3 }, { 2, 2 }, { 6, 1 } }, + { { 6, 4 }, { 0, 4 }, { 7, 7 }, { 4, 7 }, { 3, 6 }, + { 5, 5 }, { 8, 4 }, { 2, 2 }, { 1, 1 } }, + { { 2, 1 }, { 0, 1 } }, /* Unused */ + { { 1, 3 }, { 0, 3 }, { 4, 5 }, { 3, 5 }, { 6, 6 }, + { 5, 6 }, { 7, 5 }, { 8, 3 }, { 2, 1 } }, + { { 7, 4 }, { 6, 4 }, { 5, 5 }, { 3, 5 }, { 4, 6 }, + { 0, 6 }, { 8, 5 }, { 1, 2 }, { 2, 1 } }, + { { 4, 6 }, { 0, 6 }, { 5, 7 }, { 3, 7 }, { 6, 6 }, + { 1, 4 }, { 7, 3 }, { 8, 2 }, { 2, 1 } }, + { { 8, 3 }, { 1, 3 }, { 3, 4 }, { 0, 4 }, { 6, 6 }, + { 4, 6 }, { 7, 5 }, { 5, 4 }, { 2, 1 } }, + { { 7, 3 }, { 6, 3 }, { 5, 7 }, { 3, 7 }, { 0, 6 }, + { 1, 5 }, { 4, 4 }, { 8, 3 }, { 2, 1 } }, + { { 2, 2 }, { 1, 2 }, { 4, 7 }, { 0, 7 }, { 7, 6 }, + { 8, 5 }, { 6, 4 }, { 3, 3 }, { 5, 2 } }, + { { 2, 2 }, { 1, 2 }, { 7, 4 }, { 4, 4 }, { 3, 6 }, + { 0, 6 }, { 5, 5 }, { 8, 4 }, { 6, 2 } }, + { { 1, 4 }, { 0, 4 }, { 5, 7 }, { 3, 7 }, { 4, 6 }, + { 6, 5 }, { 8, 4 }, { 7, 2 }, { 2, 1 } }, + { { 7, 4 }, { 1, 4 }, { 3, 5 }, { 0, 5 }, { 5, 6 }, + { 4, 6 }, { 6, 5 }, { 8, 2 }, { 2, 1 } }, + { { 0 } }, /* unused */ + { { 1, 2 }, { 0, 2 }, { 5, 5 }, { 4, 5 }, { 7, 6 }, + { 6, 6 }, { 8, 5 }, { 3, 3 }, { 2, 2 } }, + { { 3, 3 }, { 2, 3 }, { 7, 7 }, { 0, 7 }, { 4, 6 }, + { 8, 5 }, { 6, 4 }, { 5, 3 }, { 1, 1 } }, + { { 3, 4 }, { 1, 4 }, { 6, 7 }, { 5, 7 }, { 4, 6 }, + { 7, 5 }, { 8, 4 }, { 0, 2 }, { 2, 1 } }, + { { 5, 3 }, { 2, 3 }, { 7, 7 }, { 0, 7 }, { 6, 6 }, + { 4, 5 }, { 1, 4 }, { 8, 3 }, { 3, 1 } }, + { { 2, 3 }, { 1, 3 }, { 3, 4 }, { 0, 4 }, { 7, 6 }, + { 5, 6 }, { 8, 5 }, { 6, 4 }, { 4, 1 } }, + { { 2, 4 }, { 1, 4 }, { 7, 7 }, { 0, 7 }, { 4, 6 }, + { 8, 5 }, { 6, 4 }, { 3, 2 }, { 5, 1 } }, + { { 6, 2 }, { 1, 2 }, { 5, 3 }, { 2, 3 }, { 4, 4 }, + { 3, 4 }, { 7, 5 }, { 0, 5 }, { 8, 4 } }, + { { 4, 2 }, { 2, 2 }, { 3, 3 }, { 0, 3 }, { 5, 5 }, + { 1, 5 }, { 7, 5 }, { 6, 5 }, { 8, 3 } }, + { { 2, 4 }, { 1, 4 }, { 7, 7 }, { 6, 7 }, { 0, 6 }, + { 4, 5 }, { 5, 4 }, { 3, 2 }, { 8, 1 } }, + { { 0 } }, /* unused */ + { { 1, 2 }, { 0, 2 }, { 5, 7 }, { 3, 7 }, { 8, 6 }, + { 7, 5 }, { 6, 4 }, { 4, 3 }, { 2, 2 } }, + { { 6, 3 }, { 2, 3 }, { 4, 4 }, { 0, 4 }, { 7, 6 }, + { 3, 6 }, { 8, 5 }, { 5, 4 }, { 1, 1 } }, + { { 7, 6 }, { 6, 6 }, { 5, 7 }, { 3, 7 }, { 8, 6 }, + { 1, 4 }, { 4, 3 }, { 0, 2 }, { 2, 1 } }, + { { 2, 3 }, { 0, 3 }, { 5, 4 }, { 1, 4 }, { 8, 6 }, + { 7, 6 }, { 3, 5 }, { 6, 4 }, { 4, 1 } }, + { { 5, 7 }, { 3, 7 }, { 8, 7 }, { 7, 7 }, { 1, 5 }, + { 0, 4 }, { 6, 3 }, { 2, 2 }, { 4, 1 } }, + { { 6, 2 }, { 1, 2 }, { 4, 3 }, { 2, 3 }, { 7, 6 }, + { 0, 6 }, { 3, 5 }, { 8, 4 }, { 5, 3 } }, + { { 1, 4 }, { 0, 4 }, { 8, 7 }, { 3, 7 }, { 7, 6 }, + { 5, 5 }, { 2, 4 }, { 4, 2 }, { 6, 1 } }, + { { 6, 4 }, { 0, 4 }, { 5, 7 }, { 3, 7 }, { 8, 6 }, + { 1, 5 }, { 7, 4 }, { 2, 2 }, { 4, 1 } }, + { { 2, 2 }, { 0, 2 }, { 5, 4 }, { 1, 4 }, { 6, 6 }, + { 3, 6 }, { 7, 5 }, { 8, 4 }, { 4, 2 } }, + { { 0 } }, /* unused */ + { { 2, 3 }, { 1, 3 }, { 6, 5 }, { 3, 5 }, { 7, 6 }, + { 4, 6 }, { 8, 5 }, { 5, 3 }, { 0, 1 } }, + { { 3, 4 }, { 2, 4 }, { 7, 7 }, { 0, 7 }, { 4, 6 }, + { 8, 5 }, { 6, 4 }, { 5, 2 }, { 1, 1 } }, + { { 1, 2 }, { 0, 2 }, { 6, 5 }, { 4, 5 }, { 7, 6 }, + { 3, 6 }, { 8, 5 }, { 5, 3 }, { 2, 2 } }, + { { 2, 4 }, { 1, 4 }, { 7, 7 }, { 0, 7 }, { 4, 6 }, + { 6, 5 }, { 8, 4 }, { 3, 2 }, { 5, 1 } }, + { { 2, 2 }, { 1, 2 }, { 5, 3 }, { 0, 3 }, { 4, 4 }, + { 3, 4 }, { 8, 5 }, { 7, 5 }, { 6, 4 } }, + { { 4, 7 }, { 0, 7 }, { 8, 7 }, { 7, 7 }, { 2, 5 }, + { 6, 4 }, { 3, 3 }, { 1, 2 }, { 5, 1 } }, + { { 5, 2 }, { 1, 2 }, { 8, 7 }, { 7, 7 }, { 0, 6 }, + { 4, 5 }, { 3, 4 }, { 2, 3 }, { 6, 2 } }, + { { 2, 2 }, { 1, 2 }, { 8, 3 }, { 0, 3 }, { 6, 4 }, + { 5, 4 }, { 4, 5 }, { 3, 5 }, { 7, 4 } }, + { { 2, 2 }, { 1, 2 }, { 5, 3 }, { 0, 3 }, { 7, 6 }, + { 4, 6 }, { 6, 5 }, { 3, 4 }, { 8, 3 } }, + { { 0 } }, /* unused */ + { { 2, 3 }, { 1, 3 }, { 8, 7 }, { 3, 7 }, { 5, 6 }, + { 7, 5 }, { 4, 4 }, { 6, 3 }, { 0, 1 } }, + { { 2, 4 }, { 0, 4 }, { 8, 7 }, { 3, 7 }, { 7, 6 }, + { 5, 5 }, { 4, 4 }, { 6, 2 }, { 1, 1 } }, + { { 5, 7 }, { 3, 7 }, { 8, 7 }, { 7, 7 }, { 4, 5 }, + { 1, 4 }, { 6, 3 }, { 0, 2 }, { 2, 1 } }, + { { 6, 2 }, { 1, 2 }, { 2, 3 }, { 0, 3 }, { 8, 6 }, + { 7, 6 }, { 3, 5 }, { 5, 4 }, { 4, 3 } }, + { { 5, 7 }, { 3, 7 }, { 8, 7 }, { 7, 7 }, { 1, 5 }, + { 2, 4 }, { 0, 3 }, { 4, 2 }, { 6, 1 } }, + { { 5, 3 }, { 2, 3 }, { 8, 7 }, { 7, 7 }, { 3, 6 }, + { 4, 5 }, { 0, 4 }, { 6, 3 }, { 1, 1 } }, + { { 5, 7 }, { 3, 7 }, { 8, 7 }, { 7, 7 }, { 2, 5 }, + { 0, 4 }, { 4, 3 }, { 1, 2 }, { 6, 1 } }, + { { 3, 7 }, { 0, 7 }, { 8, 7 }, { 5, 7 }, { 7, 5 }, + { 1, 4 }, { 4, 3 }, { 6, 2 }, { 2, 1 } }, + { { 2, 2 }, { 1, 2 }, { 4, 4 }, { 0, 4 }, { 7, 6 }, + { 3, 6 }, { 5, 5 }, { 8, 4 }, { 6, 2 } }, + { { 0 } }, /* unused */ + { { 6, 6 }, { 4, 6 }, { 5, 7 }, { 3, 7 }, { 8, 6 }, + { 1, 4 }, { 0, 3 }, { 7, 2 }, { 2, 1 } }, + { { 2, 2 }, { 1, 2 }, { 6, 4 }, { 0, 4 }, { 4, 6 }, + { 3, 6 }, { 5, 5 }, { 8, 4 }, { 7, 2 } }, + { { 1, 4 }, { 0, 4 }, { 5, 7 }, { 3, 7 }, { 6, 6 }, + { 4, 5 }, { 8, 4 }, { 7, 2 }, { 2, 1 } }, + { { 7, 2 }, { 2, 2 }, { 1, 3 }, { 0, 3 }, { 5, 4 }, + { 4, 4 }, { 6, 5 }, { 3, 5 }, { 8, 4 } }, + { { 4, 2 }, { 2, 2 }, { 5, 7 }, { 3, 7 }, { 8, 6 }, + { 1, 5 }, { 0, 4 }, { 6, 3 }, { 7, 2 } }, + { { 7, 2 }, { 2, 2 }, { 6, 3 }, { 1, 3 }, { 5, 4 }, + { 0, 4 }, { 4, 5 }, { 3, 5 }, { 8, 4 } }, + { { 4, 2 }, { 2, 2 }, { 3, 7 }, { 0, 7 }, { 8, 6 }, + { 5, 5 }, { 1, 4 }, { 6, 3 }, { 7, 2 } }, + { { 6, 6 }, { 1, 6 }, { 5, 7 }, { 3, 7 }, { 8, 6 }, + { 0, 4 }, { 4, 3 }, { 2, 2 }, { 7, 1 } }, + { { 8, 4 }, { 4, 4 }, { 1, 5 }, { 0, 5 }, { 5, 6 }, + { 3, 6 }, { 6, 5 }, { 7, 2 }, { 2, 1 } }, + { { 0 } }, /* unused */ + { { 8, 2 }, { 2, 2 }, { 1, 3 }, { 0, 3 }, { 6, 6 }, + { 5, 6 }, { 4, 5 }, { 7, 4 }, { 3, 3 } }, + { { 3, 3 }, { 2, 3 }, { 6, 7 }, { 0, 7 }, { 4, 6 }, + { 5, 5 }, { 7, 4 }, { 8, 3 }, { 1, 1 } }, + { { 7, 4 }, { 1, 4 }, { 3, 5 }, { 0, 5 }, { 6, 6 }, + { 5, 6 }, { 4, 5 }, { 8, 2 }, { 2, 1 } }, + { { 3, 2 }, { 2, 2 }, { 4, 6 }, { 0, 6 }, { 7, 6 }, + { 6, 6 }, { 1, 4 }, { 5, 3 }, { 8, 2 } }, + { { 8, 2 }, { 2, 2 }, { 6, 3 }, { 4, 3 }, { 5, 6 }, + { 0, 6 }, { 3, 5 }, { 1, 4 }, { 7, 3 } }, + { { 5, 2 }, { 2, 2 }, { 3, 3 }, { 1, 3 }, { 7, 6 }, + { 0, 6 }, { 4, 5 }, { 6, 4 }, { 8, 3 } }, + { { 2, 2 }, { 1, 2 }, { 6, 3 }, { 4, 3 }, { 7, 6 }, + { 0, 6 }, { 5, 5 }, { 3, 4 }, { 8, 3 } }, + { { 3, 7 }, { 0, 7 }, { 6, 7 }, { 5, 7 }, { 1, 5 }, + { 4, 4 }, { 7, 3 }, { 8, 2 }, { 2, 1 } }, + { { 1, 5 }, { 0, 5 }, { 6, 7 }, { 5, 7 }, { 4, 6 }, + { 7, 5 }, { 3, 3 }, { 2, 2 }, { 8, 1 } }, + { { 0 } }, /* unused */ }; //@} From patchwork Tue Nov 10 10:47:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23537 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 16AF544AD0B for ; Tue, 10 Nov 2020 13:02:56 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 085DC68BF1D; Tue, 10 Nov 2020 12:50:35 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9F10768BEC2 for ; Tue, 10 Nov 2020 12:50:18 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id 23so12139328wrc.8 for ; Tue, 10 Nov 2020 02:50:18 -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=CW3qGLBtCpEP6b3MjKrGYyYDtuxcdDWElbcfPE5D+0A=; b=XbZzfKeTkvZPSWAJQMaJiOfJZokh9Rq4sx7/w54XpsTpNZvdVsmVO7CEcIhoKrLH+t xhx+mK2ews6WGOE00dvG3J7FWAiT0Q/NevcmOAxMIbBL7BAWk/xIblO7uQWXVMPgJCVx u6nXCAe5hza227ESlNWKimrp4R3vAi0A21J/g9cbh/RsE0lYJTWtF/z/2lcn234ntSyV IhisCCgdlB6jkHysMnFLZOaUOPKpoCKWWklSCRJYdkpKBvjh0eWNO/T4f+nLydBeru+n THsr574hIfpXrASDfLfjyPA3vYcYvYQfAyby1S1y8r8kIJsv6ZTBCr4T393j/EtbiRb0 5aEg== 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=CW3qGLBtCpEP6b3MjKrGYyYDtuxcdDWElbcfPE5D+0A=; b=Th37/cs5fir5FjDlnRHszNbBjxqshcpWaHxFxfCW9TPWjPNjHyEJpGRdjzsOSYaV7e Zo6K0xQWFsjhAxFKikmJkt7/pC5GIby+UHMru+G5ey2QAyNWhezBT+S8QddXNFMJ5B0T T5pbXcmAqg6O0VgLrYdWe3VvHVmyuiNcep8gVJXSTgyzs1A62C0djpHhQnq4fkECcDFz od6xLW1XqWQxF5nq6c3a6EYSAJ3dBlwMpg5EM8WGwgR2oVkoZOEoiH/Tbgrxp6r9RpVK LkPjkWBmcRNcFuJL8+u56JlYSF+L/KiyNy8ErJQ4wXSKZQA7cUXMjS4p3zPjmVidiUQL viRQ== X-Gm-Message-State: AOAM533qKrCm69qWZGN13exZps1WYQvZdaFvrPwos3ayvOhBz0ZO0QWO Ty03+IXmM+/01QuEbV0I80QTrOO/cx4= X-Google-Smtp-Source: ABdhPJz7YgitOlMKAY7xw5lVXMim5I8O/EsOujL/ZmNvydYVdFln4Kfn24prDdB4Sxd7HKPGYOzBuA== X-Received: by 2002:adf:9e4c:: with SMTP id v12mr22394203wre.22.1605005417903; Tue, 10 Nov 2020 02:50:17 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:17 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:56 +0100 Message-Id: <20201110104851.321029-60-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 059/114] avcodec/mss4: Simplify creating VLC tables 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" The lengths of the codes used by the mss4 decoder are ascending from left to right and therefore the lengths can be run-length encoded and the codes can be easily derived from them. And this is how it is indeed done. Yet some things can nevertheless be improved: a) The number of entries of the current VLC is implicitly contained in the run-length table and needn't be externally prescribed. b) The maximum length of a code is just the length of the last code (given that the lengths are ascending), so there is no point in setting max_bits in the loop itself. c) One can offload the actual calculation of the codes to ff_init_vlc_from_lengths(). Signed-off-by: Andreas Rheinhardt --- libavcodec/mss4.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c index c421a07c5d..a459503417 100644 --- a/libavcodec/mss4.c +++ b/libavcodec/mss4.c @@ -143,25 +143,21 @@ typedef struct MSS4Context { } MSS4Context; static av_cold int mss4_init_vlc(VLC *vlc, const uint8_t *lens, - const uint8_t *syms, int num_syms) + const uint8_t *syms) { uint8_t bits[MAX_ENTRIES]; - uint16_t codes[MAX_ENTRIES]; int i, j; - int prefix = 0, max_bits = 0, idx = 0; + int idx = 0; for (i = 0; i < 16; i++) { for (j = 0; j < lens[i]; j++) { bits[idx] = i + 1; - codes[idx] = prefix++; - max_bits = i + 1; idx++; } - prefix <<= 1; } - return ff_init_vlc_sparse(vlc, FFMIN(max_bits, 9), num_syms, bits, 1, 1, - codes, 2, 2, syms, 1, 1, 0); + return ff_init_vlc_from_lengths(vlc, FFMIN(bits[idx - 1], 9), idx, + bits, 1, syms, 1, 1, 0, 0); } static av_cold int mss4_init_vlcs(MSS4Context *ctx) @@ -169,15 +165,15 @@ static av_cold int mss4_init_vlcs(MSS4Context *ctx) int ret, i; for (i = 0; i < 2; i++) { - ret = mss4_init_vlc(&ctx->dc_vlc[i], mss4_dc_vlc_lens[i], NULL, 12); + ret = mss4_init_vlc(&ctx->dc_vlc[i], mss4_dc_vlc_lens[i], NULL); if (ret) return ret; ret = mss4_init_vlc(&ctx->ac_vlc[i], mss4_ac_vlc_lens[i], - mss4_ac_vlc_syms[i], 162); + mss4_ac_vlc_syms[i]); if (ret) return ret; ret = mss4_init_vlc(&ctx->vec_entry_vlc[i], mss4_vec_entry_vlc_lens[i], - mss4_vec_entry_vlc_syms[i], 9); + mss4_vec_entry_vlc_syms[i]); if (ret) return ret; } From patchwork Tue Nov 10 10:47:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23539 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 D08FF44B15F for ; Tue, 10 Nov 2020 13:03:11 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EA92E68BEBD; Tue, 10 Nov 2020 12:50:35 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ABAEF68BEC8 for ; Tue, 10 Nov 2020 12:50:19 +0200 (EET) Received: by mail-wm1-f45.google.com with SMTP id c9so2515397wml.5 for ; Tue, 10 Nov 2020 02:50:19 -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=9wFPfGTdoKbrMlE+DG5bqqrtBGu75fS36t56vD1GU2w=; b=EWr9NK11HkfR6rilM4hgpIv36MGxv7mAH/t5QhtxKIbGvexXQ9WEJPQ5dZ9gAiWSms sLHsO01mD0GpHfqXPZguR394C6ik4UXggGS43BfDRTLv7MVquk7rhvU/6I1/WYDMd3yi krjv4vP9JI5Fr1iZm5ANgueeCKOa1MjkbCXBJblMGFQgcItIARPmVq7RMmbq5PvTYuh6 rNYTQdNXHEEoNWdhvDL3jUXkMhEKgnxM+TfYJAfSxZES/RNxoxzyIciVkUHr4hv1Ivt+ GHOt6e0LNFeUjDpEKMgT2VJC2gmRCVZJ7Zh+61t4Hv3MQIa02X2YzaO8I6wBzZi8dmeJ Z27A== 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=9wFPfGTdoKbrMlE+DG5bqqrtBGu75fS36t56vD1GU2w=; b=EpVc46CxaxzjoBdw8czYk9zFBJznptzgd6yb7IkvZ2UpcXiWZNDTFYbqiaEnhnANOR TGilV/cS4lugHkSBilI5Rvofdmi7lVbBHAD9Jr/CsvGVl2KCKJtYhyKkMNbuHt90dkf9 koV+uqvdCXkpRK/JZy4UTmhssfYB3IJCyXRPCiRsHyLHRYnpiXoQZBZNfX8Z32DbWbRo 4m7VoRYebXn3VU5QZkYow799EvBx1923yNNCNJLw5WGrUWJRuqE1o3Jv+xf33Tezx1Gk fnedIFqhSrpheV5RinG7wHrhb/knLsW3QMct/jI1jfnSu1caOZo6ghk0m8rCVUtkgRd4 dFCg== X-Gm-Message-State: AOAM5339S+co7lbY0c7qasJFp5IF1cnAQav4ci6KB8rpD7y7l85MhdNq Q7UDOVuJPcLv47vbLye98pLW5kZ9sMk= X-Google-Smtp-Source: ABdhPJx65lIYZ+DKEwAiA6kRrHVu0wkRLfv0NE9x8EazYrVwvWyRvB5ogv+eAS3GwzP8f/Rlo63KOQ== X-Received: by 2002:a1c:c90b:: with SMTP id f11mr4123720wmb.54.1605005418706; Tue, 10 Nov 2020 02:50:18 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:18 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:57 +0100 Message-Id: <20201110104851.321029-61-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 060/114] avcodec/mss4: Don't duplicate standard JPEG tables 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" Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/mss4.c | 58 +++++------------------------------------------ 2 files changed, 7 insertions(+), 53 deletions(-) diff --git a/configure b/configure index 8a9e9b3cd7..4b47832cd7 100755 --- a/configure +++ b/configure @@ -2801,7 +2801,7 @@ msmpeg4v2_encoder_select="h263_encoder" msmpeg4v3_decoder_select="h263_decoder" msmpeg4v3_encoder_select="h263_encoder" mss2_decoder_select="mpegvideo qpeldsp vc1_decoder" -mts2_decoder_select="mss34dsp" +mts2_decoder_select="jpegtables mss34dsp" mv30_decoder_select="aandcttables blockdsp" mvha_decoder_deps="zlib" mvha_decoder_select="llviddsp" diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c index a459503417..9c257dc873 100644 --- a/libavcodec/mss4.c +++ b/libavcodec/mss4.c @@ -29,6 +29,7 @@ #include "bytestream.h" #include "get_bits.h" #include "internal.h" +#include "jpegtables.h" #include "mss34dsp.h" #include "unary.h" @@ -57,56 +58,6 @@ static const uint8_t mss4_dc_vlc_lens[2][16] = { { 0, 3, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0 } }; -static const uint8_t mss4_ac_vlc_lens[2][16] = { - { 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125 }, - { 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119 } -}; - -static const uint8_t mss4_ac_vlc_syms[2][162] = { - { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, - 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, - 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1, 0x08, - 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, - 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, - 0x17, 0x18, 0x19, 0x1A, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, - 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, - 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, - 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7A, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, - 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, - 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, - 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, - 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, - 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4, - 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2, - 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, - 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, - 0xF9, 0xFA }, - { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, - 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, - 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, - 0xA1, 0xB1, 0xC1, 0x09, 0x23, 0x33, 0x52, 0xF0, - 0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16, 0x24, 0x34, - 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, - 0x27, 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, - 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, - 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7A, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, - 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, - 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, - 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, - 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, - 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, - 0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, - 0xF9, 0xFA } -}; - static const uint8_t vec_len_syms[2][4] = { { 4, 2, 3, 1 }, { 4, 1, 2, 3 } @@ -168,8 +119,11 @@ static av_cold int mss4_init_vlcs(MSS4Context *ctx) ret = mss4_init_vlc(&ctx->dc_vlc[i], mss4_dc_vlc_lens[i], NULL); if (ret) return ret; - ret = mss4_init_vlc(&ctx->ac_vlc[i], mss4_ac_vlc_lens[i], - mss4_ac_vlc_syms[i]); + ret = mss4_init_vlc(&ctx->ac_vlc[i], + i ? avpriv_mjpeg_bits_ac_chrominance + 1 + : avpriv_mjpeg_bits_ac_luminance + 1, + i ? avpriv_mjpeg_val_ac_chrominance + : avpriv_mjpeg_val_ac_luminance); if (ret) return ret; ret = mss4_init_vlc(&ctx->vec_entry_vlc[i], mss4_vec_entry_vlc_lens[i], From patchwork Tue Nov 10 10:47:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23540 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 48BAF44B15F for ; Tue, 10 Nov 2020 13:03:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E96FC68BF1E; Tue, 10 Nov 2020 12:50:36 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 88A1F68BD9C for ; Tue, 10 Nov 2020 12:50:20 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id j7so4891293wrp.3 for ; Tue, 10 Nov 2020 02:50:20 -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=8+H14TI5NM+Z8e12IqJVmFgUeaw8HKosCAIns1dMjXk=; b=k/SemA+oB2m0G4Y3aNVWDt859wfuRgAlf3M7VIiJ8sDTnA/DnjIdUaxKD0yh9a38MI ojdUEUyMXV+BCggYO5rMscdgnzGtm5PqBSe4aXiOWCjOme5GhCfaYOVKrJ1dAHS5hB5q 8zHtL2e2PFCzw741cNJSrI5qKYt/gclXhpP8DYv8xQ73yeBdejaei87ReSvB4t7/xcnk ENEsmSMeF047fyJ29ucHKtnU1T9QjPz23+Xh8x6ffLyuKfEWCsswVaHPZTic/mdrld4r LJlJWMy5hSoVIS6f/7UqFT6RklWodP6FSypIRMqkfR6L5JSYRohTQH3pxAFLRgDhWg9W Iwbw== 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=8+H14TI5NM+Z8e12IqJVmFgUeaw8HKosCAIns1dMjXk=; b=QTfxtmp7hwRk8GmD8XDbCUJ6AQOIiIHKfjwlfKt7R8M2gGL+I1mJ9qsHDmZcJ5spDE CZTe0JM0zOET6fhIAcZ30zAyoEnxorFZPARMrX0wHN4lTQJkfNdu2DTAsMMopGcMIpGo mJwKe1Dw8b065i3hDIUD1OZfA6U3ViPbG2KJeXLiIHqX2BW+sPf5DkBu8tbD7z0mepIS fKXZt4ChLmDpu+Pd/PpCnWbCN19AgUTq8yLjiAw8MRFKNKxrF70pwDuHX8lqg+Gu5KSL 3sfsBD+t9y+x8VhrPyMuVu3eJr8JrgPg0HuKNjUOWn/zgjJ55KeHT4T0HKfgeeDQsSYg DvlA== X-Gm-Message-State: AOAM5318XOtKQpKibacLvjWVEO52KCKcIh6+aizFNBnp+Za/M3gSKvGv punN7j3v4SCOxBSm2TcEYtxb5OOVUP0= X-Google-Smtp-Source: ABdhPJy522hj861IhI0uZPhS0Sm6hj+O+bGBypg2Uy9AoIbx65orcF84PcYth5YWU+3bUqpjlAgpZw== X-Received: by 2002:a5d:4e48:: with SMTP id r8mr22095784wrt.141.1605005419779; Tue, 10 Nov 2020 02:50:19 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:19 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:58 +0100 Message-Id: <20201110104851.321029-62-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 061/114] avcodec/mss4: Make VLCs static 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/mss4.c | 73 +++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 44 deletions(-) diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c index 9c257dc873..9b343c9b2b 100644 --- a/libavcodec/mss4.c +++ b/libavcodec/mss4.c @@ -78,8 +78,6 @@ static const uint8_t mss4_vec_entry_vlc_syms[2][9] = { typedef struct MSS4Context { AVFrame *pic; - VLC dc_vlc[2], ac_vlc[2]; - VLC vec_entry_vlc[2]; int block[64]; uint8_t imgbuf[3][16 * 16]; @@ -93,9 +91,13 @@ typedef struct MSS4Context { int prev_vec[3][4]; } MSS4Context; -static av_cold int mss4_init_vlc(VLC *vlc, const uint8_t *lens, - const uint8_t *syms) +static VLC dc_vlc[2], ac_vlc[2]; +static VLC vec_entry_vlc[2]; + +static av_cold void mss4_init_vlc(VLC *vlc, unsigned *offset, + const uint8_t *lens, const uint8_t *syms) { + static VLC_TYPE vlc_buf[2146][2]; uint8_t bits[MAX_ENTRIES]; int i, j; int idx = 0; @@ -107,41 +109,27 @@ static av_cold int mss4_init_vlc(VLC *vlc, const uint8_t *lens, } } - return ff_init_vlc_from_lengths(vlc, FFMIN(bits[idx - 1], 9), idx, - bits, 1, syms, 1, 1, 0, 0); -} - -static av_cold int mss4_init_vlcs(MSS4Context *ctx) -{ - int ret, i; - - for (i = 0; i < 2; i++) { - ret = mss4_init_vlc(&ctx->dc_vlc[i], mss4_dc_vlc_lens[i], NULL); - if (ret) - return ret; - ret = mss4_init_vlc(&ctx->ac_vlc[i], - i ? avpriv_mjpeg_bits_ac_chrominance + 1 - : avpriv_mjpeg_bits_ac_luminance + 1, - i ? avpriv_mjpeg_val_ac_chrominance - : avpriv_mjpeg_val_ac_luminance); - if (ret) - return ret; - ret = mss4_init_vlc(&ctx->vec_entry_vlc[i], mss4_vec_entry_vlc_lens[i], - mss4_vec_entry_vlc_syms[i]); - if (ret) - return ret; - } - return 0; + vlc->table = &vlc_buf[*offset]; + vlc->table_allocated = FF_ARRAY_ELEMS(vlc_buf) - *offset; + ff_init_vlc_from_lengths(vlc, FFMIN(bits[idx - 1], 9), idx, + bits, 1, syms, 1, 1, 0, INIT_VLC_USE_NEW_STATIC); + *offset += vlc->table_size; } -static av_cold void mss4_free_vlcs(MSS4Context *ctx) +static av_cold void mss4_init_vlcs(void) { - int i; - - for (i = 0; i < 2; i++) { - ff_free_vlc(&ctx->dc_vlc[i]); - ff_free_vlc(&ctx->ac_vlc[i]); - ff_free_vlc(&ctx->vec_entry_vlc[i]); + if (vec_entry_vlc[1].table_size) + return; + + for (unsigned i = 0, offset = 0; i < 2; i++) { + mss4_init_vlc(&dc_vlc[i], &offset, mss4_dc_vlc_lens[i], NULL); + mss4_init_vlc(&ac_vlc[i], &offset, + i ? avpriv_mjpeg_bits_ac_chrominance + 1 + : avpriv_mjpeg_bits_ac_luminance + 1, + i ? avpriv_mjpeg_val_ac_chrominance + : avpriv_mjpeg_val_ac_luminance); + mss4_init_vlc(&vec_entry_vlc[i], &offset, mss4_vec_entry_vlc_lens[i], + mss4_vec_entry_vlc_syms[i]); } } @@ -239,7 +227,7 @@ static int mss4_decode_dct_block(MSS4Context *c, GetBitContext *gb, int xpos = mb_x * 2 + i; c->dc_cache[j][TOP_LEFT] = c->dc_cache[j][TOP]; c->dc_cache[j][TOP] = c->prev_dc[0][mb_x * 2 + i]; - ret = mss4_decode_dct(gb, c->dc_vlc, c->ac_vlc, c->block, + ret = mss4_decode_dct(gb, &dc_vlc[0], &ac_vlc[0], c->block, c->dc_cache[j], xpos, mb_y * 2 + j, c->quant_mat[0]); if (ret) @@ -255,7 +243,7 @@ static int mss4_decode_dct_block(MSS4Context *c, GetBitContext *gb, for (i = 1; i < 3; i++) { c->dc_cache[i + 1][TOP_LEFT] = c->dc_cache[i + 1][TOP]; c->dc_cache[i + 1][TOP] = c->prev_dc[i][mb_x]; - ret = mss4_decode_dct(gb, c->dc_vlc + 1, c->ac_vlc + 1, + ret = mss4_decode_dct(gb, &dc_vlc[1], &ac_vlc[1], c->block, c->dc_cache[i + 1], mb_x, mb_y, c->quant_mat[1]); if (ret) @@ -347,7 +335,7 @@ static int mss4_decode_image_block(MSS4Context *ctx, GetBitContext *gb, for (i = 0; i < 3; i++) { vec_len[i] = vec_len_syms[!!i][get_unary(gb, 0, 3)]; for (j = 0; j < vec_len[i]; j++) { - vec[i][j] = get_coeff(gb, &ctx->vec_entry_vlc[!!i]); + vec[i][j] = get_coeff(gb, &vec_entry_vlc[!!i]); vec[i][j] += ctx->prev_vec[i][j]; ctx->prev_vec[i][j] = vec[i][j]; } @@ -586,7 +574,6 @@ static av_cold int mss4_decode_end(AVCodecContext *avctx) av_frame_free(&c->pic); for (i = 0; i < 3; i++) av_freep(&c->prev_dc[i]); - mss4_free_vlcs(c); return 0; } @@ -596,10 +583,6 @@ static av_cold int mss4_decode_init(AVCodecContext *avctx) MSS4Context * const c = avctx->priv_data; int i; - if (mss4_init_vlcs(c)) { - av_log(avctx, AV_LOG_ERROR, "Cannot initialise VLCs\n"); - return AVERROR(ENOMEM); - } for (i = 0; i < 3; i++) { c->dc_stride[i] = FFALIGN(avctx->width, 16) >> (2 + !!i); c->prev_dc[i] = av_malloc_array(c->dc_stride[i], sizeof(**c->prev_dc)); @@ -615,6 +598,8 @@ static av_cold int mss4_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_YUV444P; + mss4_init_vlcs(); + return 0; } From patchwork Tue Nov 10 10:47:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23543 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 E82BD44B2CF for ; Tue, 10 Nov 2020 13:04:20 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 70EC468B5C3; Tue, 10 Nov 2020 12:50:40 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 34E7068BEE4 for ; Tue, 10 Nov 2020 12:50:24 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id h62so2535466wme.3 for ; Tue, 10 Nov 2020 02:50:24 -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=WNNlpnsbFWK4OcTyiJb03KHuOO5OJKbpzDBUjRj3T6A=; b=OiMsYqL8YQjpLNCxVzg2rEtVzQXDbbNsi5r7wepBAX0oFo5W8t37G5nr/FZKt47r4d DevQKv82QXWryER0pEK0+L9nxrOqNXMW5UIH7xfCPrcZrWQh+FmmuUwwK/CRhv0lqoTF Q63oqOKuXMJ4YD569bC6nyRE7htn7T1FPvg+LmCMwnkozYNq5A+1n863tX+NXZk6uIiI R0bm49tFjWIJ8s+s6wAu797FSiKyOAPftAZfezY+qZNI9mjlnuVXpWhQOtk3OgbzfABY w3afbMEHIXoJc5pbRjs7qcy5W1maxVCC8HHPZrcdTvBJL/ii7cHTBOON+wVl3RbKgC++ IK4w== 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=WNNlpnsbFWK4OcTyiJb03KHuOO5OJKbpzDBUjRj3T6A=; b=izO6T//ZiBv6di7kNnYPBmpIVFR1hHQ9JrtdH0Ayce3gEtjH4LP4/DF54+pwDVGDD5 8HYmulpwtiQ2QSKm8vyf6oFdhyCVS7fGcT2/HvlTeEPHwFIHATe3RlvNLrygz+WxkYpp vVXmrFgZ0Jl8bUBlxYfoLOmqf/SFH2vMncSvF6uS0Sq2xzGmsrkXHPH1pcVdVdPmLjCV i1qqAWHQgm1KOrz0eYhS0Tb7Hg6NaMXN7wpM4HHWZahcmc6dFGRE9yo3l5TwtwodF5lL a+M757KV5lszUtkbvGObOMBXoi2Y2KgpzyI8qGHSIeZq61RSPPA+Wm82Bu4hL4w7Nfz3 eBdQ== X-Gm-Message-State: AOAM5318+MgXAbb9Khkezi/T43W5So3gv0HLLO4XqqnUb/2PMhwaUSQ/ uz/EhTRYL6hQjwfGH8SMe6cZeumCbBI= X-Google-Smtp-Source: ABdhPJx2lMbQABBnbr4hpHQSNLIjyhOitwDzZXdlKZK2LxvcmcYqXtqTuNQqeN93LojmqkwRm/ocQA== X-Received: by 2002:a7b:c937:: with SMTP id h23mr3933962wml.19.1605005420593; Tue, 10 Nov 2020 02:50:20 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:20 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:47:59 +0100 Message-Id: <20201110104851.321029-63-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 062/114] avcodec/sheervideo: Add av_cold to build_vlc() 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" It is an init function even when called from decode_frame(). Signed-off-by: Andreas Rheinhardt --- libavcodec/sheervideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c index 976c21c445..3e60ef26a5 100644 --- a/libavcodec/sheervideo.c +++ b/libavcodec/sheervideo.c @@ -1781,7 +1781,7 @@ static void decode_rgb(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb) } } -static int build_vlc(VLC *vlc, const SheerTable *table) +static av_cold int build_vlc(VLC *vlc, const SheerTable *table) { const uint8_t *cur = table->lens; uint16_t codes[1024]; From patchwork Tue Nov 10 10:48:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23480 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 155D5449E81 for ; Tue, 10 Nov 2020 12:50:38 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F036168BF28; Tue, 10 Nov 2020 12:50:37 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3B6EE68BED3 for ; Tue, 10 Nov 2020 12:50:22 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id b6so810650wrt.4 for ; Tue, 10 Nov 2020 02:50:22 -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=kUqpQTqH/KBB8ZR40qiQfacoXXSoW4GIjsi3P6OiC5I=; b=i4hVE/j0WIqqZDVmVdxxOwjpTdmipE0BlkH9PIC2bYEzAmfGRLYdP4O0etWJnJhaYB AJrGb6J89BJnWPhBHDztpjV1SmyJgfbn2bOEmcRNkps/kwRgqSEuLx2DlNsyb9u17vkZ TR+RCZhcgKCY/Ur3cDntR87ufnN1HmvPmOfZB8BBWcjVhrjDfYiHbyAvIX6hKaqwCE2P qSUAbG2gflhYHX6symSy7bOZzHwkeds/qsflNskwRBj3rmngNjvQRC6I91CJzAMJhmrH AohMIIAzOME6u+kCeynHJIqItlPaP8RUDicEUKEyYz9jB9Evrd91AhB1P5IK3WXwhBV9 mZTg== 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=kUqpQTqH/KBB8ZR40qiQfacoXXSoW4GIjsi3P6OiC5I=; b=PM3OBvZbkntcA2lRfbX5iPeXtNTIZQWwRfU5YTw4PM4vy3s3DRbJzJjjUmkC4VTmWc 2kmM1KopwJI1V3ABpPk6wkpntegIJ9leUPwtprikuwKN9vLfjyw0EDCB4DPHg9iXGdaH mAbo2ZhVoSNQhnFIkhFXKSW7RbZIAb7BdgLur+wxW1Gs/V5Gl2XYcOBxr0vZeVZgaLoo /gRNVpWs2fnWIBvRd8i9Ueo7HkMdBcvPlLIM6xdXvI8Lb6sQKhhFbzsVmgKVt9Mn73pw qtj/l030/yJldOV03HM5mhPiSgI0KSgqSyTWzTbWTmlMAd0/dfjQ34CxaQfCWinGg8wP KaTw== X-Gm-Message-State: AOAM531TqsFdu1wxdv59isMxpIbDmU8GP0UbICQl/07WE3m7znRk9khj icCEUJUebRH3r5eVPer8WwyM8VW2e5Q= X-Google-Smtp-Source: ABdhPJwu93zsmeY4lYvjpLemRwh3bKDWXaCgmOY/Vl4P7C+mKk8XHeuFBJL4qXV6cgEZzKGRcgPP6A== X-Received: by 2002:adf:e388:: with SMTP id e8mr23019759wrm.65.1605005421530; Tue, 10 Nov 2020 02:50:21 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:20 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:00 +0100 Message-Id: <20201110104851.321029-64-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 063/114] avcodec/sheervideo: Simplify creating VLC table 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" ff_init_vlc_from_lengths() can be used to offload the computation of the codes; it also needn't check whether the codes are already properly ordered (they are). Signed-off-by: Andreas Rheinhardt --- libavcodec/sheervideo.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c index 3e60ef26a5..98093d500a 100644 --- a/libavcodec/sheervideo.c +++ b/libavcodec/sheervideo.c @@ -1784,11 +1784,10 @@ static void decode_rgb(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb) static av_cold int build_vlc(VLC *vlc, const SheerTable *table) { const uint8_t *cur = table->lens; - uint16_t codes[1024]; uint8_t lens[1024]; unsigned count = 0; - for (unsigned step = 1, len = 1, index = 0; len > 0; len += step) { + for (unsigned step = 1, len = 1; len > 0; len += step) { unsigned new_count = count; if (len == 16) { @@ -1797,17 +1796,13 @@ static av_cold int build_vlc(VLC *vlc, const SheerTable *table) } else new_count += *cur++; - for (; count < new_count; count++) { - codes[count] = index >> (32 - len); - index += 1U << (32 - len); + for (; count < new_count; count++) lens[count] = len; - } } ff_free_vlc(vlc); - return init_vlc(vlc, SHEER_VLC_BITS, count, - lens, sizeof(*lens), sizeof(*lens), - codes, sizeof(*codes), sizeof(*codes), 0); + return ff_init_vlc_from_lengths(vlc, SHEER_VLC_BITS, count, + lens, sizeof(*lens), NULL, 0, 0, 0, 0); } static int decode_frame(AVCodecContext *avctx, From patchwork Tue Nov 10 10:48:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23541 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 65DEF44B15F for ; Tue, 10 Nov 2020 13:03:54 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EB96068BF2B; Tue, 10 Nov 2020 12:50:38 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5AB3D68BED8 for ; Tue, 10 Nov 2020 12:50:23 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id j7so4891447wrp.3 for ; Tue, 10 Nov 2020 02:50:23 -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=IL/ZQvPYbxK6n4rsq6/JfEe/+m9y9VUBbF2WI9APe9U=; b=fhbi4r6MuNVN0/fOS5hRUlW7zjUldTnFcl4q0Oknz23BiHpfALMQ7ql8vijNIITyPc dc4wSn+dQEwBIiN40nY1vjThQXRS46tSaSVC7UfzIyEEKrJA8HzeGauyWNiO3bQLNdfo 4ZhY3AbIQdXdaaHuxnLta2nbaKnUdPzjRzeuEX68zk6bavSDbN2FtMCreAenQNrqvKFk 9P0x4KZsYDTe85r6hOgvw8/pHcYRw9Qnf3WTqGrR9Yw+eBAxE8aVbnF4OskfUcLQji4H z5mE90yMVXpjJqGdiW6wXlW6dY4oZUQZ1rNg22XbbpunclbmEAFKQtEGHaEDjU5qhMby celQ== 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=IL/ZQvPYbxK6n4rsq6/JfEe/+m9y9VUBbF2WI9APe9U=; b=pCgbGuYq6Uxl+ECr8GnlVeDsg+b4PGp2Qbzm/rK/lnWOdZYb54mmFEScjnw6ldvchD CuyqeP3RYrPLfc3gvI3GXGX77YT1wy041Vj0As9/9oaJTTTrI0HIpqjfhjDSuAlY48FX RMWV7jrip3eLlPpXOVfxWVQ0PXQmo5iTDfYVaF5O3pL3CxN+Xow73BrCVZGKRZa5QI1l iWQN5qKmrcMu5s/bMffkrKHAaNCrC3oOMSB57qjWAxQYiBOCQWBPcQPIurE2HTUjxV23 KoWLzMfIJAGFGVxGvssayzeaJG2z1G8GdaHGEkhlDh5+7c524T6fQfvgdEgoTiWMaSNP 7R8Q== X-Gm-Message-State: AOAM5309SSdQV1q81LeUzo5k4ivx1M0/xes+GE7UXCy5sEUx/QF57irW UIknzK7oWuRDmKwqgEku65P6Jn2K8zc= X-Google-Smtp-Source: ABdhPJzCGma2Od1YS/gUTPslYoMX5T0q/aNAc+XC8UgDyiyvgRtH5K3JWFq23V4FASwP8eMMeTsl/w== X-Received: by 2002:adf:f888:: with SMTP id u8mr12960440wrp.381.1605005422599; Tue, 10 Nov 2020 02:50:22 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:22 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:01 +0100 Message-Id: <20201110104851.321029-65-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 064/114] avcodec/g2meet: Use least max_depth in get_vlc2() 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" The longest AC codes of the standard JPEG tables are 16 bits long; for the DC tables, the maximum is 11, so using max_depth of two is sufficient. Signed-off-by: Andreas Rheinhardt --- libavcodec/g2meet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 6b870ae3d4..f6aa636bde 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -248,7 +248,7 @@ static int jpg_decode_block(JPGContext *c, GetBitContext *gb, return AVERROR_INVALIDDATA; c->bdsp.clear_block(block); - dc = get_vlc2(gb, c->dc_vlc[is_chroma].table, 9, 3); + dc = get_vlc2(gb, c->dc_vlc[is_chroma].table, 9, 2); if (dc < 0) return AVERROR_INVALIDDATA; if (dc) @@ -259,7 +259,7 @@ static int jpg_decode_block(JPGContext *c, GetBitContext *gb, pos = 0; while (pos < 63) { - val = get_vlc2(gb, c->ac_vlc[is_chroma].table, 9, 3); + val = get_vlc2(gb, c->ac_vlc[is_chroma].table, 9, 2); if (val < 0) return AVERROR_INVALIDDATA; pos += val >> 4; From patchwork Tue Nov 10 10:48:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23542 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 B7EC844B2CF for ; Tue, 10 Nov 2020 13:04:07 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C6A2168AF83; Tue, 10 Nov 2020 12:50:39 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A627A68BEE0 for ; Tue, 10 Nov 2020 12:50:24 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id p1so12128679wrf.12 for ; Tue, 10 Nov 2020 02:50:24 -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=5koYwJorXVqQT0E8IwvQ49RoVsH9q9dtCtS9au+cVuQ=; b=ugvtWlrhBa5qY6KBwCVS5Mbl7xLuL+Gmk4fscHRe8DpBARl+2kRTBanemv4PwZmiAZ nIVahLOe67rYlKvzM0Pe2D053t9vb/6BlrXEkorrzO0HH6mcZzz50GMFQvgpsJ3S4Fa5 XXXTOCLsK24vO1myu7kBvpGdKIG3LmJsVNUefKytulbaIP4hS/ajyv4D5InUwGpJ4j2B d8qVVoAqanUBEUJD+1ReEa6p2X/i+ctHu3xLztJCYLTl8yhThwGUCDp6kzpp2PK3O+Bx 1yr2xqzj7gJisMy7aulBNt6xjak/FH4we5hfHaPzqO4rNWjYgZlhtzTGdcTIlYxLqlTX +ARA== 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=5koYwJorXVqQT0E8IwvQ49RoVsH9q9dtCtS9au+cVuQ=; b=ffQMOMLXLCfvTTpSoJk2cSvWcdJHLJgayNs4tQKGWVSniT3gWlbMWyfi4NM/Sl+GN0 ZRI5s5lBWOigppfB6+H3BEB0Sh7QMkeBiyqNOEGUYBa6ifyL8QZLT0wJQnFv2fH699DR FXiw71gIvQci0LPEpmzBwO7R4OfCm8VsIpEHKVupM5o4GKPrWtN+Ut/WDSx3+AYe8hcv ATI9jUavkXXMbIi+7v+HyHbjNFiRfJQUmpyAhVvX0+dJs0gjzfB4E3vPBm6blQJA7rZZ +l5SAoFHketHP7HNTVTc0ca3w3xp74C0PVlGC0+EVhWWMj0+J1T+yDn4v68pyTQOKCT2 f0bA== X-Gm-Message-State: AOAM530oT9WzMCbCNRFwpg5QvyA7zdCCGUOODx5n6xiuHNJlSThrgGYt 9lkMbiKwH+Dq1NB8QMiKq1iDYTwj9e4= X-Google-Smtp-Source: ABdhPJxrNQK6+jnnsD/TdXqTdoMISq1mVl84r0clBj5F8YOa3B8NnkqpNAfyCmJpPeGCFeMaGDNrjg== X-Received: by 2002:adf:ed11:: with SMTP id a17mr8491106wro.197.1605005423498; Tue, 10 Nov 2020 02:50:23 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:23 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:02 +0100 Message-Id: <20201110104851.321029-66-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 065/114] avcodec/mjpegdec: Simplify creating VLC table 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" ff_init_vlc_from_lengths() can be used to offload the computation of the codes; it also allows to omit the check whether the codes are already properly ordered (they are). Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegdec.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 147dd819e5..2a226f63d4 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -50,18 +50,14 @@ #include "bytestream.h" -static void build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code, - const uint8_t *bits_table) +static void build_huffman_codes(uint8_t *huff_size, const uint8_t *bits_table) { - for (int i = 1, code = 0, k = 0; i <= 16; i++) { + for (int i = 1, k = 0; i <= 16; i++) { int nb = bits_table[i]; for (int j = 0; j < nb;j++) { huff_size[k] = i; - huff_code[k] = code; - code++; k++; } - code <<= 1; } } @@ -70,13 +66,12 @@ static int build_vlc(VLC *vlc, const uint8_t *bits_table, int is_ac) { uint8_t huff_size[256]; - uint16_t huff_code[256]; uint16_t huff_sym[256]; int i; av_assert0(nb_codes <= 256); - build_huffman_codes(huff_size, huff_code, bits_table); + build_huffman_codes(huff_size, bits_table); for (i = 0; i < nb_codes; i++) { huff_sym[i] = val_table[i] + 16 * is_ac; @@ -85,8 +80,8 @@ static int build_vlc(VLC *vlc, const uint8_t *bits_table, huff_sym[i] = 16 * 256; } - return ff_init_vlc_sparse(vlc, 9, nb_codes, huff_size, 1, 1, - huff_code, 2, 2, huff_sym, 2, 2, 0); + return ff_init_vlc_from_lengths(vlc, 9, nb_codes, huff_size, 1, + huff_sym, 2, 2, 0, 0); } static int init_default_huffman_tables(MJpegDecodeContext *s) From patchwork Tue Nov 10 10:48:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23544 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 BD51444B2CF for ; Tue, 10 Nov 2020 13:04:33 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 550A268BEE8; Tue, 10 Nov 2020 12:50:41 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6BD3268BEE5 for ; Tue, 10 Nov 2020 12:50:25 +0200 (EET) Received: by mail-wm1-f41.google.com with SMTP id 23so1733827wmg.1 for ; Tue, 10 Nov 2020 02:50:25 -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=In7Y4mVL2yI/UvBgyyPHfsOfXz7ORlImNTsVm8R2IsM=; b=kSIh6FjutAlXHZ645oOtzdsTabrOVNnOGJSZp4vvZfIMCmGigDReQYe+H8A1VVjKPv 1v5wpIfyLK5rQqqVih840AydUCx/wKm19xq61lA8C0YelPJJ6hfS5PwCJVDUH7zv3GRq MV0aq3CGS6RpATMoDrsdoGnLkBAu97IIybpwYCaEsGUc1XMj+UQ6z/b4QhbVX967iGsU acKBemFPW0ciV2VcmSre8fbvJIPKa6cyMNHo/iXCdNzFy8edjnlC6m/c1gmwD1l8OM/K 2f/WDKpix1F7IC45GrYsyasjZdfehmlK8HL7rn97LBaH7MfybbC1N6sgCYQCx0N35mE5 IdKA== 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=In7Y4mVL2yI/UvBgyyPHfsOfXz7ORlImNTsVm8R2IsM=; b=JKh4vBZILm+TX79OCbglNCzicu5usD3Iz/+O3vUZ+rSY3auElUgHHtjy0WPC41zNmJ WPyJiyw+fx9atrrv0kZab09mh0bD/kydUdVSnrvuTeH+aFETWVNvUCZluPXkqqIQYehR uAJKvOGHSwFd9004vfh2XIxhtNr6eCUa2/U/P0tvC+63mIO+g0MeCz6Hv+uhnnULmdZa vJtJ8T+KxZu7ldJ+EeO96KyW3H+S8bWdLodWZEczwLZeBJaZjRtFc2EeNNbsho9GMJV4 kFJw/WyYtjBPLr9I6ucL95fTkg4iuX1t1tbfNrPRrIxfhbatkY49snOKeEBEVsH/ojQH qkmw== X-Gm-Message-State: AOAM530ZukulQlGeLE3+qFZz0GjqPfb2T57vSdhPyG6aapyY7N4V5anM nRhxWaSIhQxqHcMfafqWzuqIE4ET1Cc= X-Google-Smtp-Source: ABdhPJzwvbnr9obifSrFTKpGw/FVX9WVvP6iZNxDnliPeztvgzLWbpM5BbXQQmSVtaNy1aT2y/Tiqg== X-Received: by 2002:a1c:490b:: with SMTP id w11mr4063526wma.101.1605005424574; Tue, 10 Nov 2020 02:50:24 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:24 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:03 +0100 Message-Id: <20201110104851.321029-67-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 066/114] avcodec/indeo2: Make tables used to initialize VLCs smaller 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" Switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths() allows to replace codes which are so long that they need to be stored in an uint16_t by symbols which fit into an uint8_t; furthermore, it is also easily possible to already incorporate the offset (the real range of Indeo 2 symbols starts at one, not zero) into the symbols. Signed-off-by: Andreas Rheinhardt --- libavcodec/indeo2.c | 8 ++--- libavcodec/indeo2data.h | 67 ++++++++++++++++++----------------------- 2 files changed, 34 insertions(+), 41 deletions(-) diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c index 7a568bfbc4..5a9c0e77be 100644 --- a/libavcodec/indeo2.c +++ b/libavcodec/indeo2.c @@ -46,7 +46,7 @@ static VLC ir2_vlc; /* Indeo 2 codes are in range 0x01..0x7F and 0x81..0x90 */ static inline int ir2_get_code(GetBitContext *gb) { - return get_vlc2(gb, ir2_vlc.table, CODE_VLC_BITS, 1) + 1; + return get_vlc2(gb, ir2_vlc.table, CODE_VLC_BITS, 1); } static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst, @@ -237,9 +237,9 @@ static av_cold int ir2_decode_init(AVCodecContext *avctx) if (!ic->picture) return AVERROR(ENOMEM); - INIT_LE_VLC_STATIC(&ir2_vlc, CODE_VLC_BITS, IR2_CODES, - &ir2_codes[0][1], 4, 2, - &ir2_codes[0][0], 4, 2, 1 << CODE_VLC_BITS); + INIT_VLC_STATIC_FROM_LENGTHS(&ir2_vlc, CODE_VLC_BITS, IR2_CODES, + &ir2_tab[0][1], 2, &ir2_tab[0][0], 2, 1, + 0, INIT_VLC_OUTPUT_LE, 1 << CODE_VLC_BITS); return 0; } diff --git a/libavcodec/indeo2data.h b/libavcodec/indeo2data.h index bfdb0a68a3..9981a3b2c0 100644 --- a/libavcodec/indeo2data.h +++ b/libavcodec/indeo2data.h @@ -25,43 +25,36 @@ #include #define IR2_CODES 143 -static const uint16_t ir2_codes[IR2_CODES][2] = { - { 0x0000, 3 }, { 0x0004, 3 }, { 0x0006, 3 }, { 0x0001, 5 }, - { 0x0009, 5 }, { 0x0019, 5 }, { 0x000D, 5 }, { 0x001D, 5 }, - { 0x0023, 6 }, { 0x0013, 6 }, { 0x0033, 6 }, { 0x000B, 6 }, - { 0x002B, 6 }, { 0x001B, 6 }, { 0x0007, 8 }, { 0x0087, 8 }, - { 0x0027, 8 }, { 0x00A7, 8 }, { 0x0067, 8 }, { 0x00E7, 8 }, - { 0x0097, 8 }, { 0x0057, 8 }, { 0x0037, 8 }, { 0x00B7, 8 }, - { 0x00F7, 8 }, { 0x000F, 9 }, { 0x008F, 9 }, { 0x018F, 9 }, - { 0x014F, 9 }, { 0x00CF, 9 }, { 0x002F, 9 }, { 0x012F, 9 }, - { 0x01AF, 9 }, { 0x006F, 9 }, { 0x00EF, 9 }, { 0x01EF, 9 }, - { 0x001F, 10 }, { 0x021F, 10 }, { 0x011F, 10 }, { 0x031F, 10 }, - { 0x009F, 10 }, { 0x029F, 10 }, { 0x019F, 10 }, { 0x039F, 10 }, - { 0x005F, 10 }, { 0x025F, 10 }, { 0x015F, 10 }, { 0x035F, 10 }, - { 0x00DF, 10 }, { 0x02DF, 10 }, { 0x01DF, 10 }, { 0x03DF, 10 }, - { 0x003F, 13 }, { 0x103F, 13 }, { 0x083F, 13 }, { 0x183F, 13 }, - { 0x043F, 13 }, { 0x143F, 13 }, { 0x0C3F, 13 }, { 0x1C3F, 13 }, - { 0x023F, 13 }, { 0x123F, 13 }, { 0x0A3F, 13 }, { 0x1A3F, 13 }, - { 0x063F, 13 }, { 0x163F, 13 }, { 0x0E3F, 13 }, { 0x1E3F, 13 }, - { 0x013F, 13 }, { 0x113F, 13 }, { 0x093F, 13 }, { 0x193F, 13 }, - { 0x053F, 13 }, { 0x153F, 13 }, { 0x0D3F, 13 }, { 0x1D3F, 13 }, - { 0x033F, 13 }, { 0x133F, 13 }, { 0x0B3F, 13 }, { 0x1B3F, 13 }, - { 0x073F, 13 }, { 0x173F, 13 }, { 0x0F3F, 13 }, { 0x1F3F, 13 }, - { 0x00BF, 13 }, { 0x10BF, 13 }, { 0x08BF, 13 }, { 0x18BF, 13 }, - { 0x04BF, 13 }, { 0x14BF, 13 }, { 0x0CBF, 13 }, { 0x1CBF, 13 }, - { 0x02BF, 13 }, { 0x12BF, 13 }, { 0x0ABF, 13 }, { 0x1ABF, 13 }, - { 0x06BF, 13 }, { 0x16BF, 13 }, { 0x0EBF, 13 }, { 0x1EBF, 13 }, - { 0x01BF, 13 }, { 0x11BF, 13 }, { 0x09BF, 13 }, { 0x19BF, 13 }, - { 0x05BF, 13 }, { 0x15BF, 13 }, { 0x0DBF, 13 }, { 0x1DBF, 13 }, - { 0x03BF, 13 }, { 0x13BF, 13 }, { 0x0BBF, 13 }, { 0x1BBF, 13 }, - { 0x07BF, 13 }, { 0x17BF, 13 }, { 0x0FBF, 13 }, { 0x1FBF, 13 }, - { 0x007F, 14 }, { 0x207F, 14 }, { 0x107F, 14 }, { 0x307F, 14 }, - { 0x087F, 14 }, { 0x287F, 14 }, { 0x187F, 14 }, { 0x387F, 14 }, - { 0x047F, 14 }, { 0x247F, 14 }, { 0x147F, 14 }, { 0x0002, 3 }, - { 0x0011, 5 }, { 0x0005, 5 }, { 0x0015, 5 }, { 0x0003, 6 }, - { 0x003B, 6 }, { 0x0047, 8 }, { 0x00C7, 8 }, { 0x0017, 8 }, - { 0x00D7, 8 }, { 0x0077, 8 }, { 0x010F, 9 }, { 0x004F, 9 }, - { 0x01CF, 9 }, { 0x00AF, 9 }, { 0x016F, 9 }, +static const uint8_t ir2_tab[IR2_CODES][2] = { + { 0x01, 3 }, { 0x02, 3 }, { 0x80, 3 }, { 0x03, 3 }, { 0x04, 5 }, + { 0x81, 5 }, { 0x05, 5 }, { 0x06, 5 }, { 0x82, 5 }, { 0x83, 5 }, + { 0x07, 5 }, { 0x08, 5 }, { 0x84, 6 }, { 0x09, 6 }, { 0x0A, 6 }, + { 0x0B, 6 }, { 0x0C, 6 }, { 0x0D, 6 }, { 0x0E, 6 }, { 0x85, 6 }, + { 0x0F, 8 }, { 0x10, 8 }, { 0x86, 8 }, { 0x87, 8 }, { 0x11, 8 }, + { 0x12, 8 }, { 0x13, 8 }, { 0x14, 8 }, { 0x88, 8 }, { 0x15, 8 }, + { 0x16, 8 }, { 0x89, 8 }, { 0x17, 8 }, { 0x18, 8 }, { 0x8A, 8 }, + { 0x19, 8 }, { 0x1A, 9 }, { 0x8B, 9 }, { 0x1B, 9 }, { 0x1C, 9 }, + { 0x8C, 9 }, { 0x1D, 9 }, { 0x1E, 9 }, { 0x8D, 9 }, { 0x1F, 9 }, + { 0x20, 9 }, { 0x8E, 9 }, { 0x21, 9 }, { 0x22, 9 }, { 0x8F, 9 }, + { 0x23, 9 }, { 0x24, 9 }, { 0x25, 10 }, { 0x26, 10 }, { 0x27, 10 }, + { 0x28, 10 }, { 0x29, 10 }, { 0x2A, 10 }, { 0x2B, 10 }, { 0x2C, 10 }, + { 0x2D, 10 }, { 0x2E, 10 }, { 0x2F, 10 }, { 0x30, 10 }, { 0x31, 10 }, + { 0x32, 10 }, { 0x33, 10 }, { 0x34, 10 }, { 0x35, 13 }, { 0x36, 13 }, + { 0x37, 13 }, { 0x38, 13 }, { 0x39, 13 }, { 0x3A, 13 }, { 0x3B, 13 }, + { 0x3C, 13 }, { 0x3D, 13 }, { 0x3E, 13 }, { 0x3F, 13 }, { 0x40, 13 }, + { 0x41, 13 }, { 0x42, 13 }, { 0x43, 13 }, { 0x44, 13 }, { 0x45, 13 }, + { 0x46, 13 }, { 0x47, 13 }, { 0x48, 13 }, { 0x49, 13 }, { 0x4A, 13 }, + { 0x4B, 13 }, { 0x4C, 13 }, { 0x4D, 13 }, { 0x4E, 13 }, { 0x4F, 13 }, + { 0x50, 13 }, { 0x51, 13 }, { 0x52, 13 }, { 0x53, 13 }, { 0x54, 13 }, + { 0x55, 13 }, { 0x56, 13 }, { 0x57, 13 }, { 0x58, 13 }, { 0x59, 13 }, + { 0x5A, 13 }, { 0x5B, 13 }, { 0x5C, 13 }, { 0x5D, 13 }, { 0x5E, 13 }, + { 0x5F, 13 }, { 0x60, 13 }, { 0x61, 13 }, { 0x62, 13 }, { 0x63, 13 }, + { 0x64, 13 }, { 0x65, 13 }, { 0x66, 13 }, { 0x67, 13 }, { 0x68, 13 }, + { 0x69, 13 }, { 0x6A, 13 }, { 0x6B, 13 }, { 0x6C, 13 }, { 0x6D, 13 }, + { 0x6E, 13 }, { 0x6F, 13 }, { 0x70, 13 }, { 0x71, 13 }, { 0x72, 13 }, + { 0x73, 13 }, { 0x74, 13 }, { 0x75, 14 }, { 0x76, 14 }, { 0x77, 14 }, + { 0x78, 14 }, { 0x79, 14 }, { 0x7A, 14 }, { 0x7B, 14 }, { 0x7C, 14 }, + { 0x7D, 14 }, { 0x7E, 14 }, { 0x7F, 14 }, }; static const uint8_t ir2_delta_table[4][256] = { From patchwork Tue Nov 10 10:48:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23545 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 0EB5144B2CF for ; Tue, 10 Nov 2020 13:04:48 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4779D68BF49; Tue, 10 Nov 2020 12:50:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A120D68BEEB for ; Tue, 10 Nov 2020 12:50:26 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id k2so8767983wrx.2 for ; Tue, 10 Nov 2020 02:50:26 -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=UsWV9pf0EZmiWFkvEzsCf0S6NWsywx7oD5NLGgW8Nyw=; b=LU/1Oh/55kzhvlkGMBySJaeTXBSzO/FxQrey0IvGI8NNI9M9L5pjQ7par15LCUo+Wp mxtoMQQOsmHU4o+HrfvzWfaz3kI4HQaOVnn/3ok0nqgFPcE5Vfh5HjqTR1Ohl9so4gqj 2N5qeX55VCGnQIt8kLtbtztg+Jcfq+ZdoFqdHS9cqjhYJ4feSdl2YhOXT07/+zv4QD0k dzg5zH4cFoMVt/bCxK9V2LZvRyxKgaIASp4hKvnvkKDCB53T+fb/38QDV/yOs0zvg+VA +1JivAQYq0ImSsJjWSNx26vgnw3iNgiO2yRpc+NgKpzAqTq2N0iiJKuwEp858vOphRRp f44g== 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=UsWV9pf0EZmiWFkvEzsCf0S6NWsywx7oD5NLGgW8Nyw=; b=sO1VlTveqsIm39HXfFPmzHj7nlIhR5Gebdq7B29lReWgmj1yE5DJRiEXVekvskmQMQ rCYQ4arMh5Ul6JIjMpilkIptkPbzB2UJmiKSWaq4BtydiU/SDLAGNw7IhbWAk4t2ctFu E+wS5GgX2J6NKbzdw4bNsZj6rYXa0zlmrDdT84XTRsJH1nkV08PTKkvGMa7QiqXDI5ZW z6dfxfmOcErrs4RAxMLYgrjqrOf0fKgwWS16V9PsChd7GqE6yroj0zaHb4ZTbQ9ZP882 BUHEc/KJ4+8vIWvxeiJs3Cn/xAeVgVoPD2AcsOB7glLK7p+fQY0h3O4LCkP8ylpV/rvn 4Erw== X-Gm-Message-State: AOAM531+6HYNDPnigWInDVfcoukdmgSUidP7ybddhvFH7lc2I5baI9Sp vBDog0jFe41b2glysptbKR+QD8nm/70= X-Google-Smtp-Source: ABdhPJx50qx9o4ZjcLK4FSZnarlFVEqQCPlAN8pyYxqYx7Wvwx1hVK6pOqE0Nwvq1OJjKeiCjAPGiA== X-Received: by 2002:a05:6000:1c9:: with SMTP id t9mr16870881wrx.379.1605005425427; Tue, 10 Nov 2020 02:50:25 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:24 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:04 +0100 Message-Id: <20201110104851.321029-68-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 067/114] avcodec/mpeg4video: Make tables used to initialize VLCs smaller 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" Switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths() allows to replace codes which are so long that they need to be stored in an uint16_t by symbols which fit into an uint8_t; and even these can be avoided in case of the sprite trajectory VLC. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4data.h | 150 +++++++++++++++---------------------- libavcodec/mpeg4video.h | 8 +- libavcodec/mpeg4videodec.c | 31 ++++---- 3 files changed, 80 insertions(+), 109 deletions(-) diff --git a/libavcodec/mpeg4data.h b/libavcodec/mpeg4data.h index 4756e9ea1d..30179d9801 100644 --- a/libavcodec/mpeg4data.h +++ b/libavcodec/mpeg4data.h @@ -323,10 +323,8 @@ RLTable ff_rvlc_rl_intra = { intra_rvlc_level, }; -const uint16_t ff_sprite_trajectory_tab[15][2] = { - {0x00, 2}, {0x02, 3}, {0x03, 3}, {0x04, 3}, {0x05, 3}, {0x06, 3}, - {0x0E, 4}, {0x1E, 5}, {0x3E, 6}, {0x7E, 7}, {0xFE, 8}, - {0x1FE, 9},{0x3FE, 10},{0x7FE, 11},{0xFFE, 12}, +const uint8_t ff_sprite_trajectory_lens[15] = { + 2, 3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, }; const uint8_t ff_mb_type_b_tab[4][2] = { @@ -374,119 +372,91 @@ const uint8_t ff_mpeg4_dc_threshold[8]={ }; /* Note these are different in studio mode */ -const uint16_t ff_mpeg4_studio_dc_luma[19][2]={ - {0x0e, 6}, {0x06, 5}, {0x00, 4}, {0x02, 4}, - {0x07, 3}, {0x05, 3}, {0x03, 3}, {0x02, 3}, - {0x04, 3}, {0x06, 3}, {0x01, 4}, {0x1e, 7}, - {0x3e, 8}, {0x7e, 9}, {0xfe, 10}, {0x1fe, 11}, - {0x3fe, 12}, {0x7fe, 13}, {0x7ff, 13} +const uint8_t ff_mpeg4_studio_dc_luma[19][2] = { + { 2, 4 }, { 10, 4 }, { 3, 4 }, { 1, 5 }, { 0, 6 }, { 11, 7 }, + { 12, 8 }, { 13, 9 }, { 14, 10 }, { 15, 11 }, { 16, 12 }, { 17, 13 }, + { 18, 13 }, { 7, 3 }, { 6, 3 }, { 8, 3 }, { 5, 3 }, { 9, 3 }, + { 4, 3 }, }; -const uint16_t ff_mpeg4_studio_dc_chroma[19][2]={ - {0x00, 4}, {0x02, 4}, {0x07, 3}, {0x05, 3}, - {0x03, 3}, {0x02, 3}, {0x04, 3}, {0x06, 3}, - {0x01, 4}, {0x06, 5}, {0x0e, 6}, {0x1e, 7}, - {0x3e, 8}, {0x7e, 9}, {0xfe, 10}, {0x1fe, 11}, - {0x3fe, 12}, {0x7fe, 13}, {0x7ff, 13} +const uint8_t ff_mpeg4_studio_dc_chroma[19][2] = { + { 0, 4 }, { 8, 4 }, { 1, 4 }, { 9, 5 }, { 10, 6 }, { 11, 7 }, + { 12, 8 }, { 13, 9 }, { 14, 10 }, { 15, 11 }, { 16, 12 }, { 17, 13 }, + { 18, 13 }, { 5, 3 }, { 4, 3 }, { 6, 3 }, { 3, 3 }, { 7, 3 }, + { 2, 3 }, }; -const uint16_t ff_mpeg4_studio_intra[12][22][2]={ +const uint8_t ff_mpeg4_studio_intra[12][24][2] = { { - {0x05, 4}, {0x04, 4}, {0x05, 7}, {0x09, 9}, - {0x21, 11}, {0x41, 12}, {0x81, 13}, {0x03, 4}, - {0x03, 5}, {0x05, 6}, {0x04, 7}, {0x03, 7}, - {0x05, 8}, {0x03, 2}, {0x05, 3}, {0x04, 3}, - {0x03, 3}, {0x02, 4}, {0x04, 6}, {0x03, 6}, - {0x11, 10}, {0x80, 13} + { 0, -6 }, { 21, 13 }, { 6, 13 }, { 5, 12 }, { 4, 11 }, { 20, 10 }, + { 3, 9 }, { 12, 8 }, { 11, 7 }, { 10, 7 }, { 2, 7 }, { 19, 6 }, + { 18, 6 }, { 9, 6 }, { 8, 5 }, { 17, 4 }, { 7, 4 }, { 1, 4 }, + { 0, 4 }, { 16, 3 }, { 15, 3 }, { 14, 3 }, { 13, 2 }, }, { - {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0}, - {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0}, - {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0}, - {0x00, 0}, {0x00, 0}, {0x01, 1}, {0x01, 2}, - {0x01, 3}, {0x01, 4}, {0x01, 5}, {0x03, 7}, - {0x05, 8}, {0x04, 8} + { 0, -6 }, { 21, 8 }, { 20, 8 }, { 19, 7 }, { 18, 5 }, { 17, 4 }, + { 16, 3 }, { 15, 2 }, { 14, 1 }, }, { - {0x05, 3}, {0x03, 5}, {0x02, 5}, {0x03, 7}, - {0x09, 9}, {0x103, 14}, {0x102, 14}, {0x04, 3}, - {0x03, 3}, {0x03, 4}, {0x02, 4}, {0x03, 6}, - {0x11, 10}, {0x03, 2}, {0x02, 3}, {0x02, 6}, - {0x05, 8}, {0x21, 11}, {0x83, 13}, {0x101, 14}, - {0x201, 15}, {0x82, 13} + { 0, -6 }, { 0,-15 }, { 20, 15 }, { 19, 14 }, { 6, 14 }, { 5, 14 }, + { 21, 13 }, { 18, 13 }, { 17, 11 }, { 12, 10 }, { 4, 9 }, { 16, 8 }, + { 3, 7 }, { 15, 6 }, { 11, 6 }, { 2, 5 }, { 1, 5 }, { 10, 4 }, + { 9, 4 }, { 14, 3 }, { 8, 3 }, { 7, 3 }, { 0, 3 }, { 13, 2 }, }, { - {0x05, 5}, {0x05, 4}, {0x04, 5}, {0x03, 6}, - {0x09, 9}, {0x83, 13}, {0x82, 13}, {0x03, 3}, - {0x04, 4}, {0x03, 4}, {0x03, 5}, {0x05, 8}, - {0x81, 13}, {0x03, 2}, {0x02, 2}, {0x02, 5}, - {0x02, 6}, {0x03, 7}, {0x11, 10}, {0x43, 12}, - {0x80, 13}, {0x42, 12} + { 0, -6 }, { 20, 13 }, { 12, 13 }, { 6, 13 }, { 5, 13 }, { 21, 12 }, + { 19, 12 }, { 18, 10 }, { 4, 9 }, { 11, 8 }, { 17, 7 }, { 16, 6 }, + { 3, 6 }, { 15, 5 }, { 10, 5 }, { 2, 5 }, { 0, 5 }, { 9, 4 }, + { 8, 4 }, { 1, 4 }, { 7, 3 }, { 14, 2 }, { 13, 2 }, }, { - {0x05, 7}, {0x03, 4}, {0x03, 5}, {0x04, 7}, - {0x09, 9}, {0x83, 13}, {0x101, 14}, {0x03, 3}, - {0x02, 4}, {0x05, 6}, {0x03, 7}, {0x11, 10}, - {0x201, 15}, {0x03, 2}, {0x02, 2}, {0x02, 3}, - {0x04, 6}, {0x03, 6}, {0x05, 8}, {0x21, 11}, - {0x82, 13}, {0x81, 13} + { 0, -6 }, { 0,-15 }, { 12, 15 }, { 6, 14 }, { 21, 13 }, { 20, 13 }, + { 5, 13 }, { 19, 11 }, { 11, 10 }, { 4, 9 }, { 18, 8 }, { 10, 7 }, + { 3, 7 }, { 0, 7 }, { 17, 6 }, { 16, 6 }, { 9, 6 }, { 2, 5 }, + { 8, 4 }, { 1, 4 }, { 15, 3 }, { 7, 3 }, { 14, 2 }, { 13, 2 }, }, { - {0x13, 10}, {0x03, 5}, {0x05, 7}, {0x12, 10}, - {0x43, 12}, {0x83, 13}, {0x82, 13}, {0x02, 5}, - {0x04, 7}, {0x05, 8}, {0x23, 11}, {0x81, 13}, - {0x101, 14}, {0x03, 2}, {0x02, 2}, {0x01, 2}, - {0x01, 3}, {0x03, 6}, {0x03, 7}, {0x22, 11}, - {0x201, 15}, {0x42, 12} + { 0, -6 }, { 0,-15 }, { 20, 15 }, { 12, 14 }, { 11, 13 }, { 6, 13 }, + { 5, 13 }, { 21, 12 }, { 4, 12 }, { 19, 11 }, { 10, 11 }, { 3, 10 }, + { 0, 10 }, { 9, 8 }, { 18, 7 }, { 8, 7 }, { 2, 7 }, { 17, 6 }, + { 7, 5 }, { 1, 5 }, { 16, 3 }, { 15, 2 }, { 14, 2 }, { 13, 2 }, }, { - {0x23, 11}, {0x01, 4}, {0x07, 8}, {0x13, 10}, - {0x22, 11}, {0x103, 14}, {0x102, 14}, {0x03, 6}, - {0x06, 8}, {0x12, 10}, {0x43, 12}, {0x101, 14}, - {0x201, 15}, {0x03, 3}, {0x02, 3}, {0x03, 2}, - {0x02, 2}, {0x01, 3}, {0x02, 6}, {0x05, 8}, - {0x42, 12}, {0x41, 12} + { 0, -6 }, { 0,-15 }, { 12, 15 }, { 11, 14 }, { 6, 14 }, { 5, 14 }, + { 21, 12 }, { 20, 12 }, { 10, 12 }, { 4, 11 }, { 0, 11 }, { 9, 10 }, + { 3, 10 }, { 19, 8 }, { 8, 8 }, { 2, 8 }, { 18, 6 }, { 7, 6 }, + { 1, 4 }, { 17, 3 }, { 14, 3 }, { 13, 3 }, { 16, 2 }, { 15, 2 }, }, { - {0x0b, 9}, {0x03, 5}, {0x07, 8}, {0x07, 7}, - {0x06, 7}, {0x23, 11}, {0x41, 12}, {0x05, 7}, - {0x06, 8}, {0x0a, 9}, {0x13, 10}, {0x22, 11}, - {0x40, 12}, {0x03, 4}, {0x02, 4}, {0x03, 2}, - {0x02, 2}, {0x01, 2}, {0x02, 5}, {0x04, 7}, - {0x12, 10}, {0x21, 11} + { 0, -6 }, { 12, 12 }, { 6, 12 }, { 21, 11 }, { 11, 11 }, { 5, 11 }, + { 20, 10 }, { 10, 10 }, { 9, 9 }, { 0, 9 }, { 8, 8 }, { 2, 8 }, + { 19, 7 }, { 7, 7 }, { 4, 7 }, { 3, 7 }, { 18, 5 }, { 1, 5 }, + { 14, 4 }, { 13, 4 }, { 17, 2 }, { 16, 2 }, { 15, 2 }, }, { - {0x15, 10}, {0x03, 6}, {0x14, 10}, {0x23, 11}, - {0x07, 8}, {0x43, 12}, {0x81, 13}, {0x06, 8}, - {0x0b, 9}, {0x13, 10}, {0x12, 10}, {0x42, 12}, - {0x80, 13}, {0x01, 4}, {0x03, 3}, {0x02, 3}, - {0x03, 2}, {0x02, 2}, {0x01, 3}, {0x02, 6}, - {0x22, 11}, {0x41, 12} + { 0, -6 }, { 12, 13 }, { 6, 13 }, { 21, 12 }, { 11, 12 }, { 5, 12 }, + { 20, 11 }, { 3, 11 }, { 10, 10 }, { 9, 10 }, { 2, 10 }, { 0, 10 }, + { 8, 9 }, { 7, 8 }, { 4, 8 }, { 19, 6 }, { 1, 6 }, { 13, 4 }, + { 18, 3 }, { 15, 3 }, { 14, 3 }, { 17, 2 }, { 16, 2 }, }, { - {0x43, 12}, {0x05, 6}, {0x07, 8}, {0x04, 6}, - {0x03, 6}, {0x13, 10}, {0x42, 12}, {0x05, 7}, - {0x04, 7}, {0x06, 8}, {0x12, 10}, {0x41, 12}, - {0x40, 12}, {0x03, 5}, {0x03, 4}, {0x03, 3}, - {0x02, 3}, {0x03, 2}, {0x02, 2}, {0x02, 4}, - {0x05, 8}, {0x11, 10} + { 0, -6 }, { 12, 12 }, { 11, 12 }, { 6, 12 }, { 0, 12 }, { 21, 10 }, + { 10, 10 }, { 5, 10 }, { 20, 8 }, { 9, 8 }, { 2, 8 }, { 8, 7 }, + { 7, 7 }, { 4, 6 }, { 3, 6 }, { 1, 6 }, { 13, 5 }, { 19, 4 }, + { 14, 4 }, { 16, 3 }, { 15, 3 }, { 18, 2 }, { 17, 2 }, }, { - {0x83, 13}, {0x05, 7}, {0x07, 8}, {0x03, 4}, - {0x21, 11}, {0x82, 13}, {0x81, 13}, {0x04, 7}, - {0x06, 8}, {0x0b, 9}, {0x0a, 9}, {0x11, 10}, - {0x80, 13}, {0x03, 5}, {0x02, 5}, {0x02, 4}, - {0x03, 3}, {0x02, 3}, {0x03, 2}, {0x02, 2}, - {0x03, 6}, {0x09, 9} + { 0, -6 }, { 12, 13 }, { 6, 13 }, { 5, 13 }, { 0, 13 }, { 4, 11 }, + { 11, 10 }, { 21, 9 }, { 10, 9 }, { 9, 9 }, { 8, 8 }, { 2, 8 }, + { 7, 7 }, { 1, 7 }, { 20, 6 }, { 14, 5 }, { 13, 5 }, { 15, 4 }, + { 3, 4 }, { 17, 3 }, { 16, 3 }, { 19, 2 }, { 18, 2 }, }, { - {0x13, 10}, {0x03, 5}, {0x03, 6}, {0x0d, 9}, - {0x0c, 9}, {0x21, 11}, {0x20, 11}, {0x02, 5}, - {0x02, 6}, {0x07, 8}, {0x0b, 9}, {0x12, 10}, - {0x11, 10}, {0x05, 3}, {0x04, 3}, {0x05, 4}, - {0x04, 4}, {0x03, 4}, {0x02, 4}, {0x03, 3}, - {0x03, 2}, {0x0a, 9} - } + { 0, -6 }, { 6, 11 }, { 5, 11 }, { 12, 10 }, { 11, 10 }, { 0, 10 }, + { 21, 9 }, { 10, 9 }, { 4, 9 }, { 3, 9 }, { 9, 8 }, { 8, 6 }, + { 2, 6 }, { 7, 5 }, { 1, 5 }, { 18, 4 }, { 17, 4 }, { 16, 4 }, + { 15, 4 }, { 19, 3 }, { 14, 3 }, { 13, 3 }, { 20, 2 }, + }, }; #endif /* AVCODEC_MPEG4DATA_H */ diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h index 1a5da31928..3de598465f 100644 --- a/libavcodec/mpeg4video.h +++ b/libavcodec/mpeg4video.h @@ -138,7 +138,7 @@ extern RLTable ff_mpeg4_rl_intra; extern RLTable ff_rvlc_rl_inter; extern RLTable ff_rvlc_rl_intra; -extern const uint16_t ff_sprite_trajectory_tab[15][2]; +extern const uint8_t ff_sprite_trajectory_lens[15]; extern const uint8_t ff_mb_type_b_tab[4][2]; /* these matrixes will be permuted for the idct */ @@ -151,9 +151,9 @@ extern const uint16_t ff_mpeg4_resync_prefix[8]; extern const uint8_t ff_mpeg4_dc_threshold[8]; -extern const uint16_t ff_mpeg4_studio_dc_luma[19][2]; -extern const uint16_t ff_mpeg4_studio_dc_chroma[19][2]; -extern const uint16_t ff_mpeg4_studio_intra[12][22][2]; +extern const uint8_t ff_mpeg4_studio_dc_luma[19][2]; +extern const uint8_t ff_mpeg4_studio_dc_chroma[19][2]; +extern const uint8_t ff_mpeg4_studio_intra[12][24][2]; void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index ff5c6acf67..a03bd240a8 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -3394,9 +3394,9 @@ av_cold void ff_mpeg4videodec_static_init(void) { INIT_VLC_STATIC(&dc_chrom, DC_VLC_BITS, 10 /* 13 */, &ff_mpeg4_DCtab_chrom[0][1], 2, 1, &ff_mpeg4_DCtab_chrom[0][0], 2, 1, 512); - INIT_VLC_STATIC(&sprite_trajectory, SPRITE_TRAJ_VLC_BITS, 15, - &ff_sprite_trajectory_tab[0][1], 4, 2, - &ff_sprite_trajectory_tab[0][0], 4, 2, 128); + INIT_VLC_STATIC_FROM_LENGTHS(&sprite_trajectory, SPRITE_TRAJ_VLC_BITS, 15, + ff_sprite_trajectory_lens, 1, + NULL, 0, 0, 0, 0, 128); INIT_VLC_STATIC(&mb_type_b_vlc, MB_TYPE_B_VLC_BITS, 4, &ff_mb_type_b_tab[0][1], 2, 1, &ff_mb_type_b_tab[0][0], 2, 1, 16); @@ -3506,26 +3506,27 @@ static av_cold int init_studio_vlcs(Mpeg4DecContext *ctx) int i, ret; for (i = 0; i < 12; i++) { - ret = init_vlc(&ctx->studio_intra_tab[i], STUDIO_INTRA_BITS, 22, - &ff_mpeg4_studio_intra[i][0][1], 4, 2, - &ff_mpeg4_studio_intra[i][0][0], 4, 2, - 0); + ret = ff_init_vlc_from_lengths(&ctx->studio_intra_tab[i], + STUDIO_INTRA_BITS, 24, + &ff_mpeg4_studio_intra[i][0][1], 2, + &ff_mpeg4_studio_intra[i][0][0], 2, 1, + 0, 0); if (ret < 0) return ret; } - ret = init_vlc(&ctx->studio_luma_dc, STUDIO_INTRA_BITS, 19, - &ff_mpeg4_studio_dc_luma[0][1], 4, 2, - &ff_mpeg4_studio_dc_luma[0][0], 4, 2, - 0); + ret = ff_init_vlc_from_lengths(&ctx->studio_luma_dc, STUDIO_INTRA_BITS, 19, + &ff_mpeg4_studio_dc_luma[0][1], 2, + &ff_mpeg4_studio_dc_luma[0][0], 2, 1, + 0, 0); if (ret < 0) return ret; - ret = init_vlc(&ctx->studio_chroma_dc, STUDIO_INTRA_BITS, 19, - &ff_mpeg4_studio_dc_chroma[0][1], 4, 2, - &ff_mpeg4_studio_dc_chroma[0][0], 4, 2, - 0); + ret = ff_init_vlc_from_lengths(&ctx->studio_chroma_dc, STUDIO_INTRA_BITS, 19, + &ff_mpeg4_studio_dc_chroma[0][1], 2, + &ff_mpeg4_studio_dc_chroma[0][0], 2, 1, + 0, 0); if (ret < 0) return ret; From patchwork Tue Nov 10 10:48:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23546 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 265D144B2CF for ; Tue, 10 Nov 2020 13:05:04 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0AEAA68BF4C; Tue, 10 Nov 2020 12:50:43 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 62D7368BEF1 for ; Tue, 10 Nov 2020 12:50:27 +0200 (EET) Received: by mail-wr1-f50.google.com with SMTP id 33so12136464wrl.7 for ; Tue, 10 Nov 2020 02:50:27 -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=w09GAa4UjI+q9kbq/duStar4DE5sHnR0N5SiLrFM3mw=; b=dTV3Wh2KtPn+QNErlO9JSTTVWKDEnp4Ufijs3nqR1GFWmv4VJmJoJK8AqTnoV1/RW6 ebnVxMRmbCSr8IhrjNWsH7tvcmvE+qGSR8xuf1iQ3pYmuNOsh7OjEkd9ddSzJjK5+cPd w+5lpUfdJyPUmVBRCKMu1Zzf9LFXZ9K678+68MuvNEXSU1oMLQcd4zu5NqKZfJNAFj9p jMiNZmKnlEAOU+UWhMRq9K0BfAz/RDPBHso/LCvuxUp/RDJ5PSfHQQOi+P4nH8WlSqiu kiR237yXIkIm3Uq3z6Hj98YYxHS+LKVeyRqtXai1TZtMvxJjQl7GXH54AkjUzbFuvGk1 kKTQ== 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=w09GAa4UjI+q9kbq/duStar4DE5sHnR0N5SiLrFM3mw=; b=PJdKmxeO+deF/xroH6bUJAHqI8bCxvoAm3t/fQB8XaekpYl7ZLP6yXrneROi1YAA0g msCrpEcXaPN8Ml4pACdLNk0cuQEtp6HSc2qnJQkOB/Yxmu291mzbcbiPqF6X4l7xHBup s7wGU4XoKASKFRBrDCqhuL7sozgy/IQ2WRIakw49SFjiUdGtWVtSs0/EsmmugubCaowV b1ryWvqKqWbohY7YI0Na5C8lAQNuVByhtCPS6afGqs7z1Xj+phuYstkpbQVtH4y1bBZF PN3ArX5hPfX02Q/DOAQNt2Mhxbrcy96PNG2k6qXhK4E5oM+Mtq70ncqOZcH9GZ8A8geK NRbA== X-Gm-Message-State: AOAM532zV63CjQ2R1rfvZ1Fy8i3eufnIMfCkhlld+v1GWwOEDc5WXsm9 wdqTn+TmPm1cxwtQ++PNEt2cFiZPK8g= X-Google-Smtp-Source: ABdhPJzg7WKkzgUBGqpS7T7+9RzpW8JLMbEuc9uhWajq1frlZiCSLiq/5MU45/2mdlZiAtaNNDGHjQ== X-Received: by 2002:a05:6000:107:: with SMTP id o7mr22880070wrx.354.1605005426316; Tue, 10 Nov 2020 02:50:26 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:25 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:05 +0100 Message-Id: <20201110104851.321029-69-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 068/114] avcodec/mpeg4videodec: Make studio VLCs static 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4video.h | 4 -- libavcodec/mpeg4videodec.c | 87 ++++++++++++++++---------------------- 2 files changed, 36 insertions(+), 55 deletions(-) diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h index 3de598465f..e919db87a5 100644 --- a/libavcodec/mpeg4video.h +++ b/libavcodec/mpeg4video.h @@ -115,10 +115,6 @@ typedef struct Mpeg4DecContext { int cplx_estimation_trash_p; int cplx_estimation_trash_b; - VLC studio_intra_tab[12]; - VLC studio_luma_dc; - VLC studio_chroma_dc; - int rgb; } Mpeg4DecContext; diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index a03bd240a8..a94fe16056 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -53,6 +53,9 @@ static int decode_studio_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb); static VLC dc_lum, dc_chrom; static VLC sprite_trajectory; static VLC mb_type_b_vlc; +static VLC studio_intra_tab[12]; +static VLC studio_luma_dc; +static VLC studio_chroma_dc; static const int mb_type_b_map[4] = { MB_TYPE_DIRECT2 | MB_TYPE_L0L1, @@ -1820,7 +1823,7 @@ static int mpeg4_decode_studio_block(MpegEncContext *s, int32_t block[64], int n int cc, dct_dc_size, dct_diff, code, j, idx = 1, group = 0, run = 0, additional_code_len, sign, mismatch; - VLC *cur_vlc = &ctx->studio_intra_tab[0]; + const VLC *cur_vlc = &studio_intra_tab[0]; uint8_t *const scantable = s->intra_scantable.permutated; const uint16_t *quant_matrix; uint32_t flc; @@ -1834,14 +1837,14 @@ static int mpeg4_decode_studio_block(MpegEncContext *s, int32_t block[64], int n if (n < 4) { cc = 0; - dct_dc_size = get_vlc2(&s->gb, ctx->studio_luma_dc.table, STUDIO_INTRA_BITS, 2); + dct_dc_size = get_vlc2(&s->gb, studio_luma_dc.table, STUDIO_INTRA_BITS, 2); quant_matrix = s->intra_matrix; } else { cc = (n & 1) + 1; if (ctx->rgb) - dct_dc_size = get_vlc2(&s->gb, ctx->studio_luma_dc.table, STUDIO_INTRA_BITS, 2); + dct_dc_size = get_vlc2(&s->gb, studio_luma_dc.table, STUDIO_INTRA_BITS, 2); else - dct_dc_size = get_vlc2(&s->gb, ctx->studio_chroma_dc.table, STUDIO_INTRA_BITS, 2); + dct_dc_size = get_vlc2(&s->gb, studio_chroma_dc.table, STUDIO_INTRA_BITS, 2); quant_matrix = s->chroma_intra_matrix; } @@ -1878,7 +1881,7 @@ static int mpeg4_decode_studio_block(MpegEncContext *s, int32_t block[64], int n } additional_code_len = ac_state_tab[group][0]; - cur_vlc = &ctx->studio_intra_tab[ac_state_tab[group][1]]; + cur_vlc = &studio_intra_tab[ac_state_tab[group][1]]; if (group == 0) { /* End of Block */ @@ -3501,36 +3504,33 @@ static int mpeg4_update_thread_context(AVCodecContext *dst, } #endif -static av_cold int init_studio_vlcs(Mpeg4DecContext *ctx) +static av_cold void init_studio_vlcs(void) { - int i, ret; - - for (i = 0; i < 12; i++) { - ret = ff_init_vlc_from_lengths(&ctx->studio_intra_tab[i], - STUDIO_INTRA_BITS, 24, - &ff_mpeg4_studio_intra[i][0][1], 2, - &ff_mpeg4_studio_intra[i][0][0], 2, 1, - 0, 0); - - if (ret < 0) - return ret; - } - - ret = ff_init_vlc_from_lengths(&ctx->studio_luma_dc, STUDIO_INTRA_BITS, 19, - &ff_mpeg4_studio_dc_luma[0][1], 2, - &ff_mpeg4_studio_dc_luma[0][0], 2, 1, - 0, 0); - if (ret < 0) - return ret; - - ret = ff_init_vlc_from_lengths(&ctx->studio_chroma_dc, STUDIO_INTRA_BITS, 19, - &ff_mpeg4_studio_dc_chroma[0][1], 2, - &ff_mpeg4_studio_dc_chroma[0][0], 2, 1, - 0, 0); - if (ret < 0) - return ret; - - return 0; + if (studio_chroma_dc.table_size) + return; + + for (unsigned i = 0, offset = 0; i < 12; i++) { + static VLC_TYPE vlc_buf[6498][2]; + + studio_intra_tab[i].table = &vlc_buf[offset]; + studio_intra_tab[i].table_allocated = FF_ARRAY_ELEMS(vlc_buf) - offset; + ff_init_vlc_from_lengths(&studio_intra_tab[i], + STUDIO_INTRA_BITS, 24, + &ff_mpeg4_studio_intra[i][0][1], 2, + &ff_mpeg4_studio_intra[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); + offset += studio_intra_tab[i].table_size; + } + + INIT_VLC_STATIC_FROM_LENGTHS(&studio_luma_dc, STUDIO_INTRA_BITS, 19, + &ff_mpeg4_studio_dc_luma[0][1], 2, + &ff_mpeg4_studio_dc_luma[0][0], 2, 1, + 0, 0, 528); + + INIT_VLC_STATIC_FROM_LENGTHS(&studio_chroma_dc, STUDIO_INTRA_BITS, 19, + &ff_mpeg4_studio_dc_chroma[0][1], 2, + &ff_mpeg4_studio_dc_chroma[0][0], 2, 1, + 0, 0, 528); } static av_cold int decode_init(AVCodecContext *avctx) @@ -3548,8 +3548,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return ret; ff_mpeg4videodec_static_init(); - if ((ret = init_studio_vlcs(ctx)) < 0) - return ret; + init_studio_vlcs(); s->h263_pred = 1; s->low_delay = 0; /* default, might be overridden in the vol header during header parsing */ @@ -3561,20 +3560,6 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -static av_cold int decode_end(AVCodecContext *avctx) -{ - Mpeg4DecContext *ctx = avctx->priv_data; - int i; - - for (i = 0; i < 12; i++) - ff_free_vlc(&ctx->studio_intra_tab[i]); - - ff_free_vlc(&ctx->studio_luma_dc); - ff_free_vlc(&ctx->studio_chroma_dc); - - return ff_h263_decode_end(avctx); -} - static const AVOption mpeg4_options[] = { {"quarter_sample", "1/4 subpel MC", offsetof(MpegEncContext, quarter_sample), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0}, {"divx_packed", "divx style packed b frames", offsetof(MpegEncContext, divx_packed), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0}, @@ -3595,7 +3580,7 @@ AVCodec ff_mpeg4_decoder = { .id = AV_CODEC_ID_MPEG4, .priv_data_size = sizeof(Mpeg4DecContext), .init = decode_init, - .close = decode_end, + .close = ff_h263_decode_end, .decode = ff_h263_decode_frame, .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY | From patchwork Tue Nov 10 10:48:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23547 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 672C444B3FF for ; Tue, 10 Nov 2020 13:05:19 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D3B2968BF52; Tue, 10 Nov 2020 12:50:43 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 08F5E68BEF3 for ; Tue, 10 Nov 2020 12:50:27 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id b6so810998wrt.4 for ; Tue, 10 Nov 2020 02:50:27 -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=kOprLMhvsNtqRZO8Mjaf7uMzPJvrH0vxCOMJWTAQEQA=; b=YlN9+5r+aXRS7pkZpQe+vJeXyskSO+IoncyAz/jxSPlJa8MN9YOCQB5MdCu8Vrao/w zwtAsIIMjeOOXIvYVFMRRY43/RDmgO15hHhoNQ29RK2KKgQcLEkqyszwBnSLXAvcB3aQ LO3l3vlYeR4+6vKzaNCm77pXvWKTjSzXZOfTCPI9figQf7Ak6cnEP7TS0So8BQW7Vztb S0v09pb7V0zHSIhx4savpIgcdj2mVRA2EwljQYRij43yIvQFXIMTyv8x3pq/nbOUzSXT 23Wwx7PrQJcOexlIHP5UOOCKbI8dRlw9tsxjKicTxm9HiI07/cbZ9DTm2bOQz0CZtrwn sDvA== 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=kOprLMhvsNtqRZO8Mjaf7uMzPJvrH0vxCOMJWTAQEQA=; b=gQK6cJ+jxNKzLGYdBDrQY0idTsRnoYsaozwLVxzzGpHiZYsYULvCn5M/xaKr9unmjL Tgn4X7Xw6ez79SGcrtW9GVzTMthj4ELIRSvtfnvotq2tVXuWTkMeaVi7Hco1dRRhxXCX NlMs2FpRNXfs7E8t2KhBVcwl/Pp1lI2wGQNVE8uJeSYAT5kbsXJAgKye+D3CqJNCpkLt a2B/xhDNA8mlRjtdBhfrcVsIJ21s0O1Lx8nIasMLcysydk//AOn3KH57t5vspJ+zK/hf Oa4SsKfxrgAVko5hIhIH++6yWoJ5tVosZYkN7MUgi1+w7N7AIS1Jw8f/Rw8xZlUuImSr ZjDw== X-Gm-Message-State: AOAM5335N3o7mIw4BLsO8Qo+eBBl8U5USwx6DQ9ElLDZirSEctPK3mFa AUr+32O9dEQXEZbmaj097H+OA//2q5g= X-Google-Smtp-Source: ABdhPJzqG2+g2uhMmITPkwNh/nI4EXui+1wuhxFLydpT0BvTCOT03c34UzTtpGWw/bWnnATi3xG0ag== X-Received: by 2002:a05:6000:345:: with SMTP id e5mr22198403wre.333.1605005427207; Tue, 10 Nov 2020 02:50:27 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:26 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:06 +0100 Message-Id: <20201110104851.321029-70-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 069/114] avcodec/truemotion2: Simplify creating VLC table 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" ff_init_vlc_from_lengths() can be used to offload the computation of the codes; it also allows to omit the check whether the codes are already properly ordered (they are). In this case, this also allows to avoid the allocation of the buffer for the codes. This improves performance: The amount of decicycles for one call to tm2_build_huff_tables() when decoding tm20.avi from the FATE-suite decreased from 46239 to 40035. This test consisted of looping 50 times over the file and iterating the test ten times. Signed-off-by: Andreas Rheinhardt --- libavcodec/truemotion2.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 0f4f345a6c..8c476a2285 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -108,15 +108,14 @@ typedef struct TM2Huff { int num; ///< current number filled int max_num; ///< total number of codes int *nums; ///< literals - uint32_t *bits; ///< codes - int *lens; ///< codelengths + uint8_t *lens; ///< codelengths } TM2Huff; /** * * @returns the length of the longest code or an AVERROR code */ -static int tm2_read_tree(TM2Context *ctx, uint32_t prefix, int length, TM2Huff *huff) +static int tm2_read_tree(TM2Context *ctx, int length, TM2Huff *huff) { int ret, ret2; if (length > huff->max_bits) { @@ -134,14 +133,13 @@ static int tm2_read_tree(TM2Context *ctx, uint32_t prefix, int length, TM2Huff * return AVERROR_INVALIDDATA; } huff->nums[huff->num] = get_bits_long(&ctx->gb, huff->val_bits); - huff->bits[huff->num] = prefix; huff->lens[huff->num] = length; huff->num++; return length; } else { /* non-terminal node */ - if ((ret2 = tm2_read_tree(ctx, prefix << 1, length + 1, huff)) < 0) + if ((ret2 = tm2_read_tree(ctx, length + 1, huff)) < 0) return ret2; - if ((ret = tm2_read_tree(ctx, (prefix << 1) | 1, length + 1, huff)) < 0) + if ((ret = tm2_read_tree(ctx, length + 1, huff)) < 0) return ret; } return FFMAX(ret, ret2); @@ -177,15 +175,14 @@ static int tm2_build_huff_table(TM2Context *ctx, TM2Codes *code) /* allocate space for codes - it is exactly ceil(nodes / 2) entries */ huff.max_num = (huff.nodes + 1) >> 1; huff.nums = av_calloc(huff.max_num, sizeof(int)); - huff.bits = av_calloc(huff.max_num, sizeof(uint32_t)); - huff.lens = av_calloc(huff.max_num, sizeof(int)); + huff.lens = av_mallocz(huff.max_num); - if (!huff.nums || !huff.bits || !huff.lens) { + if (!huff.nums || !huff.lens) { res = AVERROR(ENOMEM); goto out; } - res = tm2_read_tree(ctx, 0, 0, &huff); + res = tm2_read_tree(ctx, 0, &huff); if (res >= 0 && res != huff.max_bits) { av_log(ctx->avctx, AV_LOG_ERROR, "Got less bits than expected: %i of %i\n", @@ -200,9 +197,9 @@ static int tm2_build_huff_table(TM2Context *ctx, TM2Codes *code) /* convert codes to vlc_table */ if (res >= 0) { - res = init_vlc(&code->vlc, huff.max_bits, huff.max_num, - huff.lens, sizeof(int), sizeof(int), - huff.bits, sizeof(uint32_t), sizeof(uint32_t), 0); + res = ff_init_vlc_from_lengths(&code->vlc, huff.max_bits, huff.max_num, + huff.lens, sizeof(huff.lens[0]), + NULL, 0, 0, 0, 0); if (res < 0) av_log(ctx->avctx, AV_LOG_ERROR, "Cannot build VLC table\n"); else { @@ -216,7 +213,6 @@ static int tm2_build_huff_table(TM2Context *ctx, TM2Codes *code) out: /* free allocated memory */ av_free(huff.nums); - av_free(huff.bits); av_free(huff.lens); return res; From patchwork Tue Nov 10 10:48:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23548 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 391A444B3FB for ; Tue, 10 Nov 2020 13:05:32 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C3EED68BF14; Tue, 10 Nov 2020 12:50:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 119A368BE3C for ; Tue, 10 Nov 2020 12:50:29 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id r17so8232522wrw.1 for ; Tue, 10 Nov 2020 02:50:28 -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=OwOOln7Y8l6DpTbU3wTiz+U9wmPHHZ5a8PQJkfbFPxQ=; b=Xm527cFKEsaktk9ufckWdu+T+9QqNRXH3A7nYiiJcQvBf3ux2XRj0QO7IjyyS73c9T bvdefwp1M3mFRglB6aDjDQeoDK0TDKVxRU49Z422WZtzyc6Zm53rHQXWjL+W3vv4oGsy TlY0mCV/HSTylbvj5hH1UCfjMmiQzZn4+AAtEKvsvSZRZSORZbhSDLBxLB90suV4qTFN R17j9esIOKuEKOg1XMou/tg3mPh9z+RcR55hRsXwhPgtx7599V2CzwweH9x51lXwPTmC g5kgF2ZeUETOmhltzhP3idPdPeACBn//8yDl3CgsWBN7c6l22UpuCwfytGtw+iz18VS3 NLaQ== 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=OwOOln7Y8l6DpTbU3wTiz+U9wmPHHZ5a8PQJkfbFPxQ=; b=NZoD64cpJKFxFiQuaOjCUgANNLnxlnpArkwBxK0KssxRf3tPwHYBpJuk5rLj9E0k+6 H2CL5bpbNtLvpLgRM+UO2OXBRL1BkRB8qEYF4GGUKAx4QZgBlYcccIdtLLAEaEo5VTGl GySM1arCpB3XFBjMO14ZLGR84G34A04R+VCn3xnXOauZvV4g8dpnsUv2TTikczotbvGh UDszCIjajH2o/9xPurFlCnddrZ6LoqXdPvXcqLapVYMN8LQ23dBRJ56k54CTiwYPIZlN 5zw1gnCKfNJ/Pa7RGyCd5yYalt3tMEbyYwbchywHP+GMK14RLZC9C22sbHdl+OnUMaF5 s1UQ== X-Gm-Message-State: AOAM532xB79bLQZYkt5kqfBjRhsLZFDl0DU9tya6O8N+LX8XdXB9zHz3 0sq/PiJbxVnUSa2LE4k8oveBT6Ewk3I= X-Google-Smtp-Source: ABdhPJzVDHOK0XGL8jm1pBhdgZnE8/w3wPSarEcqvCT8a2ATNT+uDyEVBIs33MlwVXthaS2iV54gzA== X-Received: by 2002:a5d:44c1:: with SMTP id z1mr19171149wrr.375.1605005428269; Tue, 10 Nov 2020 02:50:28 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:27 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:07 +0100 Message-Id: <20201110104851.321029-71-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 070/114] avcodec/atrac3plus: Simplify creating 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" Use ff_init_vlc_from_lengths() to offload the computation of the codes. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac3plus.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c index 6b046a887e..8ae5d6b8f9 100644 --- a/libavcodec/atrac3plus.c +++ b/libavcodec/atrac3plus.c @@ -51,9 +51,7 @@ static av_cold void build_canonical_huff(const uint8_t *cb, const uint8_t *xlat, int *tab_offset, VLC *out_vlc) { int i, b; - uint16_t codes[256]; uint8_t bits[256]; - unsigned code = 0; int index = 0; int min_len = *cb++; // get shortest codeword length int max_len = *cb++; // get longest codeword length @@ -62,17 +60,15 @@ static av_cold void build_canonical_huff(const uint8_t *cb, const uint8_t *xlat, for (i = *cb++; i > 0; i--) { av_assert0(index < 256); bits[index] = b; - codes[index] = code++; index++; } - code <<= 1; } out_vlc->table = &tables_data[*tab_offset]; out_vlc->table_allocated = 1 << max_len; - ff_init_vlc_sparse(out_vlc, max_len, index, bits, 1, 1, codes, 2, 2, - xlat, 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(out_vlc, max_len, index, bits, 1, + xlat, 1, 1, 0, INIT_VLC_USE_NEW_STATIC); *tab_offset += 1 << max_len; } From patchwork Tue Nov 10 10:48:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23549 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 78F9644B3FB for ; Tue, 10 Nov 2020 13:05:47 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 834A368BF4E; Tue, 10 Nov 2020 12:50:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7CA8168BE3A for ; Tue, 10 Nov 2020 12:50:30 +0200 (EET) Received: by mail-wm1-f65.google.com with SMTP id 10so2535812wml.2 for ; Tue, 10 Nov 2020 02:50:30 -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=Hdp9akHfJipSgb07YHfsKh1vhguxydXs1BErOcUx2Os=; b=lXcQNwpCYiB2mteCO4b/neG4iBOXC0SCDOlxvmh2eyBmu5CTtYDG2OVSdyMzDSRE9i NMX6beQdF80N3nRAzko1tN06kJGPCnfmsRhSWo9U0AxDRcj/quTyXEF5CG0gSDC3nL/+ Yf/3FvBoHhbQu4uhlJhe+FPA/O0UaOrpzmQU1YcJK+/Mr+niWRH9mMo8g7BBRkJeYUgx EVnINOC6RDeo1rCW9PGdwi5UlGDgiMlZcq3bjMoiI6QDZdPjCCL/h7nZjRfzCP1RfANd jUkUd3srODBDAWw1fS7Ozn+8vpnsJGuAR0z8Z+ZbY0InXnKA6Q2bi+PEDCMFh9cT0SF8 0ydQ== 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=Hdp9akHfJipSgb07YHfsKh1vhguxydXs1BErOcUx2Os=; b=g9enhnD6dSu1CgErX1rjhBTzGNQZA9xtv1C1PADSOLgu4LqJs2BmvYPNk3yHcOvE/4 5PUCannxXs8BYMy5oM+yXSCg6UrDNL2q6kkJvsfWlwq6kTtyMTAQ1G3KhopMlrO8AmIx YDDH0UUX6JDpkRugss5V2sQOePz5sLDsB7peWTKQl09mfHZYFurKNljes6Sa3LOX3LzT KH5SI36C7Wb2NaM5D2XkyI1vPKTn5D84lNw0iKAFJwsCEUqzhN1yP8VrWzCV5knsi6Sc FXeZGJTY/wRR605yOwu0NxhdlUcVKogWtL+zXE36yJyjRX4BuClWVSWSXvvIjGTUrlGN N5yg== X-Gm-Message-State: AOAM5309syQgH60PjTOgV0MOUILQklRqYDMqcGYK943eeYkpbIo856Hl H6kLYU10uEaImw8iXYwEZ2DY/TyFfbM= X-Google-Smtp-Source: ABdhPJwtIfa3yAigzR8zURTWW3rwNFZTZs5kL2t8GmhWKKFY8k2O1v4kpSQtCog5XmxAEQCoLrQE7Q== X-Received: by 2002:a1c:23cf:: with SMTP id j198mr4056055wmj.6.1605005429292; Tue, 10 Nov 2020 02:50:29 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:28 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:08 +0100 Message-Id: <20201110104851.321029-72-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 071/114] avcodec/atrac3plus: Make tables used to initialize VLCs smaller 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" The ATRAC3+ decoder currently uses ff_init_vlc_sparse() to initialize several VLCs; sometimes a symbols table is used, sometimes not; some of the codes tables are uint16_t, some are uint8_t. Because of these two latter facts it makes sense to switch to ff_init_vlc_from_lengths() because it allows to remove the codes at the cost of adding symbols tables of type uint8_t in the cases where there were none before. Notice that sometimes the same codes and lengths tables were reused with two different symbols tables; this could have been preserved (meaning one could use a lengths table twice), but hasn't, because this allows to use only one pointer to both the symbols and lengths instead of two pointers. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac3plus.c | 72 ++++------- libavcodec/atrac3plus_data.h | 226 ++++++++++++++++------------------- 2 files changed, 124 insertions(+), 174 deletions(-) diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c index 8ae5d6b8f9..955c9901a1 100644 --- a/libavcodec/atrac3plus.c +++ b/libavcodec/atrac3plus.c @@ -79,47 +79,24 @@ av_cold void ff_atrac3p_init_vlcs(void) static const uint8_t wl_nb_bits[4] = { 2, 3, 5, 5 }; static const uint8_t wl_nb_codes[4] = { 3, 5, 8, 8 }; - static const uint8_t * const wl_bits[4] = { - atrac3p_wl_huff_bits1, atrac3p_wl_huff_bits2, - atrac3p_wl_huff_bits3, atrac3p_wl_huff_bits4 - }; - static const uint8_t * const wl_codes[4] = { - atrac3p_wl_huff_code1, atrac3p_wl_huff_code2, - atrac3p_wl_huff_code3, atrac3p_wl_huff_code4 - }; - static const uint8_t * const wl_xlats[4] = { - atrac3p_wl_huff_xlat1, atrac3p_wl_huff_xlat2, NULL, NULL + static const uint8_t (*const wl_huffs[4])[2] = { + atrac3p_wl_huff1, atrac3p_wl_huff2, + atrac3p_wl_huff3, atrac3p_wl_huff4 }; static const uint8_t ct_nb_bits[4] = { 3, 4, 4, 4 }; static const uint8_t ct_nb_codes[4] = { 4, 8, 8, 8 }; - static const uint8_t * const ct_bits[4] = { - atrac3p_ct_huff_bits1, atrac3p_ct_huff_bits2, - atrac3p_ct_huff_bits2, atrac3p_ct_huff_bits3 - }; - static const uint8_t * const ct_codes[4] = { - atrac3p_ct_huff_code1, atrac3p_ct_huff_code2, - atrac3p_ct_huff_code2, atrac3p_ct_huff_code3 - }; - static const uint8_t * const ct_xlats[4] = { - NULL, NULL, atrac3p_ct_huff_xlat1, NULL + static const uint8_t (*const ct_huffs[4])[2] = { + atrac3p_ct_huff1, atrac3p_ct_huff2, + atrac3p_ct_huff3, atrac3p_ct_huff4 }; static const uint8_t sf_nb_bits[8] = { 9, 9, 9, 9, 6, 6, 7, 7 }; - static const uint8_t sf_nb_codes[8] = { 64, 64, 64, 64, 16, 16, 16, 16 }; - static const uint8_t * const sf_bits[8] = { - atrac3p_sf_huff_bits1, atrac3p_sf_huff_bits1, atrac3p_sf_huff_bits2, - atrac3p_sf_huff_bits3, atrac3p_sf_huff_bits4, atrac3p_sf_huff_bits4, - atrac3p_sf_huff_bits5, atrac3p_sf_huff_bits6 - }; - static const uint16_t * const sf_codes[8] = { - atrac3p_sf_huff_code1, atrac3p_sf_huff_code1, atrac3p_sf_huff_code2, - atrac3p_sf_huff_code3, atrac3p_sf_huff_code4, atrac3p_sf_huff_code4, - atrac3p_sf_huff_code5, atrac3p_sf_huff_code6 - }; - static const uint8_t * const sf_xlats[8] = { - atrac3p_sf_huff_xlat1, atrac3p_sf_huff_xlat2, NULL, NULL, - atrac3p_sf_huff_xlat4, atrac3p_sf_huff_xlat5, NULL, NULL + static const uint8_t sf_nb_codes[8] = { 64, 64, 64, 64, 15, 15, 15, 15 }; + static const uint8_t (*const sf_huffs[8])[2] = { + atrac3p_sf_huff1, atrac3p_sf_huff2, atrac3p_sf_huff3, + atrac3p_sf_huff4, atrac3p_sf_huff5, atrac3p_sf_huff6, + atrac3p_sf_huff7, atrac3p_sf_huff8 }; static const uint8_t * const gain_cbs[11] = { @@ -156,17 +133,15 @@ av_cold void ff_atrac3p_init_vlcs(void) ct_vlc_tabs[i].table = &tables_data[ct_vlc_offs]; ct_vlc_tabs[i].table_allocated = 1 << ct_nb_bits[i]; - ff_init_vlc_sparse(&wl_vlc_tabs[i], wl_nb_bits[i], wl_nb_codes[i], - wl_bits[i], 1, 1, - wl_codes[i], 1, 1, - wl_xlats[i], 1, 1, - INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&wl_vlc_tabs[i], wl_nb_bits[i], wl_nb_codes[i], + &wl_huffs[i][0][1], 2, + &wl_huffs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); - ff_init_vlc_sparse(&ct_vlc_tabs[i], ct_nb_bits[i], ct_nb_codes[i], - ct_bits[i], 1, 1, - ct_codes[i], 1, 1, - ct_xlats[i], 1, 1, - INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ct_vlc_tabs[i], ct_nb_bits[i], ct_nb_codes[i], + &ct_huffs[i][0][1], 2, + &ct_huffs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); wl_vlc_offs += wl_vlc_tabs[i].table_allocated; ct_vlc_offs += ct_vlc_tabs[i].table_allocated; @@ -176,11 +151,10 @@ av_cold void ff_atrac3p_init_vlcs(void) sf_vlc_tabs[i].table = &tables_data[sf_vlc_offs]; sf_vlc_tabs[i].table_allocated = 1 << sf_nb_bits[i]; - ff_init_vlc_sparse(&sf_vlc_tabs[i], sf_nb_bits[i], sf_nb_codes[i], - sf_bits[i], 1, 1, - sf_codes[i], 2, 2, - sf_xlats[i], 1, 1, - INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&sf_vlc_tabs[i], sf_nb_bits[i], sf_nb_codes[i], + &sf_huffs[i][0][1], 2, + &sf_huffs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); sf_vlc_offs += sf_vlc_tabs[i].table_allocated; } diff --git a/libavcodec/atrac3plus_data.h b/libavcodec/atrac3plus_data.h index 2a107eef1f..418735abc5 100644 --- a/libavcodec/atrac3plus_data.h +++ b/libavcodec/atrac3plus_data.h @@ -27,149 +27,125 @@ #include /** VLC tables for wordlen */ -static const uint8_t atrac3p_wl_huff_code1[3] = { 0, 2, 3 }; - -static const uint8_t atrac3p_wl_huff_bits1[3] = { 1, 2, 2 }; - -static const uint8_t atrac3p_wl_huff_xlat1[3] = { 0, 1, 7 }; - -static const uint8_t atrac3p_wl_huff_code2[5] = { 0, 4, 5, 6, 7 }; - -static const uint8_t atrac3p_wl_huff_bits2[5] = { 1, 3, 3, 3, 3 }; - -static const uint8_t atrac3p_wl_huff_xlat2[5] = { 0, 1, 2, 6, 7 }; - -static const uint8_t atrac3p_wl_huff_code3[8] = { - 0, 4, 0xC, 0x1E, 0x1F, 0xD, 0xE, 5 -}; - -static const uint8_t atrac3p_wl_huff_bits3[8] = { 1, 3, 4, 5, 5, 4, 4, 3 }; - -static const uint8_t atrac3p_wl_huff_code4[8] = { - 0, 4, 0xC, 0xD, 0x1E, 0x1F, 0xE, 5 -}; - -static const uint8_t atrac3p_wl_huff_bits4[8] = { 1, 3, 4, 4, 5, 5, 4, 3 }; - -/** VLC tables for scale factor indexes */ -static const uint16_t atrac3p_sf_huff_code1[64] = { - 0, 2, 3, 4, 5, 0xC, 0xD, 0xE0, - 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0x1CE, 0x1CF, - 0x1D0, 0x1D1, 0x1D2, 0x1D3, 0x1D4, 0x1D5, 0x1D6, 0x1D7, - 0x1D8, 0x1D9, 0x1DA, 0x1DB, 0x1DC, 0x1DD, 0x1DE, 0x1DF, - 0x1E0, 0x1E1, 0x1E2, 0x1E3, 0x1E4, 0x1E5, 0x1E6, 0x1E7, - 0x1E8, 0x1E9, 0x1EA, 0x1EB, 0x1EC, 0x1ED, 0x1EE, 0x1EF, - 0x1F0, 0x1F1, 0x1F2, 0x1F3, 0x1F4, 0x1F5, 0x1F6, 0x1F7, - 0x1F8, 0x1F9, 0x1FA, 0x1FB, 0x1FC, 0x1FD, 0x1FE, 0x1FF -}; - -static const uint8_t atrac3p_sf_huff_bits1[64] = { - 2, 3, 3, 3, 3, 4, 4, 8, 8, 8, 8, 8, 8, 8, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 -}; - -static const uint8_t atrac3p_sf_huff_xlat1[64] = { - 0, 1, 61, 62, 63, 2, 60, 3, 4, 5, 6, 57, 58, 59, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 -}; - -static const uint8_t atrac3p_sf_huff_xlat2[64] = { - 0, 1, 2, 62, 63, 3, 61, 4, 5, 6, 57, 58, 59, 60, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 +static const uint8_t atrac3p_wl_huff1[3][2] = { + { 0, 1 }, { 1, 2 }, { 7, 2 }, }; -static const uint16_t atrac3p_sf_huff_code2[64] = { - 0, 4, 0x18, 0x19, 0x70, 0x1CA, 0x1CB, 0x1CC, - 0x1CD, 0x1CE, 0x1CF, 0x1D0, 0x1D1, 0x1D2, 0x1D3, 0x1D4, - 0x1D5, 0x1D6, 0x1D7, 0x1D8, 0x1D9, 0x1DA, 0x1DB, 0x1DC, - 0x1DD, 0x1DE, 0x1DF, 0x1E0, 0x1E1, 0x1E2, 0x1E3, 0x1E4, - 0x1E5, 0x1E6, 0x1E7, 0x1E8, 0x1E9, 0x1EA, 0x1EB, 0x1EC, - 0x1ED, 0x1EE, 0x1EF, 0x1F0, 0x1F1, 0x1F2, 0x1F3, 0x1F4, - 0x1F5, 0x1F6, 0x1F7, 0x1F8, 0x1F9, 0x1FA, 0x1FB, 0x1FC, - 0x1FD, 0x1FE, 0x1FF, 0xE4, 0x71, 0x1A, 0x1B, 5 +static const uint8_t atrac3p_wl_huff2[5][2] = { + { 0, 1 }, { 1, 3 }, { 2, 3 }, { 6, 3 }, { 7, 3 }, }; -static const uint8_t atrac3p_sf_huff_bits2[64] = { - 1, 3, 5, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 7, 5, 5, 3 +static const uint8_t atrac3p_wl_huff3[8][2] = { + { 0, 1 }, { 1, 3 }, { 7, 3 }, { 2, 4 }, { 5, 4 }, { 6, 4 }, { 3, 5 }, + { 4, 5 }, }; -static const uint16_t atrac3p_sf_huff_code3[64] = { - 0, 2, 3, 0x18, 0x19, 0x70, 0x1CC, 0x1CD, - 0x1CE, 0x1CF, 0x1D0, 0x1D1, 0x1D2, 0x1D3, 0x1D4, 0x1D5, - 0x1D6, 0x1D7, 0x1D8, 0x1D9, 0x1DA, 0x1DB, 0x1DC, 0x1DD, - 0x1DE, 0x1DF, 0x1E0, 0x1E1, 0x1E2, 0x1E3, 0x1E4, 0x1E5, - 0x1E6, 0x1E7, 0x1E8, 0x1E9, 0x1EA, 0x1EB, 0x1EC, 0x1ED, - 0x1EE, 0x1EF, 0x1F0, 0x1F1, 0x1F2, 0x1F3, 0x1F4, 0x1F5, - 0x1F6, 0x1F7, 0x1F8, 0x1F9, 0x1FA, 0x1FB, 0x1FC, 0x1FD, - 0x1FE, 0x1FF, 0x71, 0x72, 0x1A, 0x1B, 4, 5 +static const uint8_t atrac3p_wl_huff4[8][2] = { + { 0, 1 }, { 1, 3 }, { 7, 3 }, { 2, 4 }, { 3, 4 }, { 6, 4 }, { 4, 5 }, + { 5, 5 }, }; -static const uint8_t atrac3p_sf_huff_bits3[64] = { - 2, 3, 3, 5, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 5, 5, 3, 3 -}; - -static const uint16_t atrac3p_sf_huff_code4[16] = { - 0, 2, 3, 4, 5, 0xC, 0xD, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0, 0x3D, 0x3E, 0x3F -}; - -static const uint8_t atrac3p_sf_huff_bits4[16] = { - 2, 3, 3, 3, 3, 4, 4, 6, 6, 6, 6, 6, 0, 6, 6, 6 -}; - -static const uint8_t atrac3p_sf_huff_xlat4[16] = { - 0, 1, 13, 14, 15, 2, 12, 3, 4, 5, 6, 7, 8, 9, 10, 11 -}; - -static const uint8_t atrac3p_sf_huff_xlat5[16] = { - 0, 1, 2, 14, 15, 3, 13, 4, 5, 6, 7, 9, 8, 10, 11, 12 -}; - -static const uint16_t atrac3p_sf_huff_code5[16] = { - 0, 4, 0xC, 0x1C, 0x78, 0x79, 0x7A, 0x7B, - 0, 0x7C, 0x7D, 0x7E, 0x7F, 0x1D, 0xD, 5 +/** VLC tables for scale factor indexes */ +static const uint8_t atrac3p_sf_huff1[64][2] = { + { 0, 2 }, { 1, 3 }, { 61, 3 }, { 62, 3 }, { 63, 3 }, { 2, 4 }, + { 60, 4 }, { 3, 8 }, { 4, 8 }, { 5, 8 }, { 6, 8 }, { 57, 8 }, + { 58, 8 }, { 59, 8 }, { 7, 9 }, { 8, 9 }, { 9, 9 }, { 10, 9 }, + { 11, 9 }, { 12, 9 }, { 13, 9 }, { 14, 9 }, { 15, 9 }, { 16, 9 }, + { 17, 9 }, { 18, 9 }, { 19, 9 }, { 20, 9 }, { 21, 9 }, { 22, 9 }, + { 23, 9 }, { 24, 9 }, { 25, 9 }, { 26, 9 }, { 27, 9 }, { 28, 9 }, + { 29, 9 }, { 30, 9 }, { 31, 9 }, { 32, 9 }, { 33, 9 }, { 34, 9 }, + { 35, 9 }, { 36, 9 }, { 37, 9 }, { 38, 9 }, { 39, 9 }, { 40, 9 }, + { 41, 9 }, { 42, 9 }, { 43, 9 }, { 44, 9 }, { 45, 9 }, { 46, 9 }, + { 47, 9 }, { 48, 9 }, { 49, 9 }, { 50, 9 }, { 51, 9 }, { 52, 9 }, + { 53, 9 }, { 54, 9 }, { 55, 9 }, { 56, 9 }, +}; + +static const uint8_t atrac3p_sf_huff2[64][2] = { + { 0, 2 }, { 1, 3 }, { 2, 3 }, { 62, 3 }, { 63, 3 }, { 3, 4 }, + { 61, 4 }, { 4, 8 }, { 5, 8 }, { 6, 8 }, { 57, 8 }, { 58, 8 }, + { 59, 8 }, { 60, 8 }, { 7, 9 }, { 8, 9 }, { 9, 9 }, { 10, 9 }, + { 11, 9 }, { 12, 9 }, { 13, 9 }, { 14, 9 }, { 15, 9 }, { 16, 9 }, + { 17, 9 }, { 18, 9 }, { 19, 9 }, { 20, 9 }, { 21, 9 }, { 22, 9 }, + { 23, 9 }, { 24, 9 }, { 25, 9 }, { 26, 9 }, { 27, 9 }, { 28, 9 }, + { 29, 9 }, { 30, 9 }, { 31, 9 }, { 32, 9 }, { 33, 9 }, { 34, 9 }, + { 35, 9 }, { 36, 9 }, { 37, 9 }, { 38, 9 }, { 39, 9 }, { 40, 9 }, + { 41, 9 }, { 42, 9 }, { 43, 9 }, { 44, 9 }, { 45, 9 }, { 46, 9 }, + { 47, 9 }, { 48, 9 }, { 49, 9 }, { 50, 9 }, { 51, 9 }, { 52, 9 }, + { 53, 9 }, { 54, 9 }, { 55, 9 }, { 56, 9 }, +}; + +static const uint8_t atrac3p_sf_huff3[64][2] = { + { 0, 1 }, { 1, 3 }, { 63, 3 }, { 2, 5 }, { 3, 5 }, { 61, 5 }, + { 62, 5 }, { 4, 7 }, { 60, 7 }, { 59, 8 }, { 5, 9 }, { 6, 9 }, + { 7, 9 }, { 8, 9 }, { 9, 9 }, { 10, 9 }, { 11, 9 }, { 12, 9 }, + { 13, 9 }, { 14, 9 }, { 15, 9 }, { 16, 9 }, { 17, 9 }, { 18, 9 }, + { 19, 9 }, { 20, 9 }, { 21, 9 }, { 22, 9 }, { 23, 9 }, { 24, 9 }, + { 25, 9 }, { 26, 9 }, { 27, 9 }, { 28, 9 }, { 29, 9 }, { 30, 9 }, + { 31, 9 }, { 32, 9 }, { 33, 9 }, { 34, 9 }, { 35, 9 }, { 36, 9 }, + { 37, 9 }, { 38, 9 }, { 39, 9 }, { 40, 9 }, { 41, 9 }, { 42, 9 }, + { 43, 9 }, { 44, 9 }, { 45, 9 }, { 46, 9 }, { 47, 9 }, { 48, 9 }, + { 49, 9 }, { 50, 9 }, { 51, 9 }, { 52, 9 }, { 53, 9 }, { 54, 9 }, + { 55, 9 }, { 56, 9 }, { 57, 9 }, { 58, 9 }, +}; + +static const uint8_t atrac3p_sf_huff4[64][2] = { + { 0, 2 }, { 1, 3 }, { 2, 3 }, { 62, 3 }, { 63, 3 }, { 3, 5 }, + { 4, 5 }, { 60, 5 }, { 61, 5 }, { 5, 7 }, { 58, 7 }, { 59, 7 }, + { 6, 9 }, { 7, 9 }, { 8, 9 }, { 9, 9 }, { 10, 9 }, { 11, 9 }, + { 12, 9 }, { 13, 9 }, { 14, 9 }, { 15, 9 }, { 16, 9 }, { 17, 9 }, + { 18, 9 }, { 19, 9 }, { 20, 9 }, { 21, 9 }, { 22, 9 }, { 23, 9 }, + { 24, 9 }, { 25, 9 }, { 26, 9 }, { 27, 9 }, { 28, 9 }, { 29, 9 }, + { 30, 9 }, { 31, 9 }, { 32, 9 }, { 33, 9 }, { 34, 9 }, { 35, 9 }, + { 36, 9 }, { 37, 9 }, { 38, 9 }, { 39, 9 }, { 40, 9 }, { 41, 9 }, + { 42, 9 }, { 43, 9 }, { 44, 9 }, { 45, 9 }, { 46, 9 }, { 47, 9 }, + { 48, 9 }, { 49, 9 }, { 50, 9 }, { 51, 9 }, { 52, 9 }, { 53, 9 }, + { 54, 9 }, { 55, 9 }, { 56, 9 }, { 57, 9 }, +}; + +static const uint8_t atrac3p_sf_huff5[15][2] = { + { 0, 2 }, { 1, 3 }, { 13, 3 }, { 14, 3 }, { 15, 3 }, { 2, 4 }, + { 12, 4 }, { 3, 6 }, { 4, 6 }, { 5, 6 }, { 6, 6 }, { 7, 6 }, + { 9, 6 }, { 10, 6 }, { 11, 6 }, +}; + +static const uint8_t atrac3p_sf_huff6[15][2] = { + { 0, 2 }, { 1, 3 }, { 2, 3 }, { 14, 3 }, { 15, 3 }, { 3, 4 }, + { 13, 4 }, { 4, 6 }, { 5, 6 }, { 6, 6 }, { 7, 6 }, { 9, 6 }, + { 10, 6 }, { 11, 6 }, { 12, 6 }, +}; + +static const uint8_t atrac3p_sf_huff7[15][2] = { + { 0, 1 }, { 1, 3 }, { 15, 3 }, { 2, 4 }, { 14, 4 }, { 3, 5 }, + { 13, 5 }, { 4, 7 }, { 5, 7 }, { 6, 7 }, { 7, 7 }, { 9, 7 }, + { 10, 7 }, { 11, 7 }, { 12, 7 }, +}; + +static const uint8_t atrac3p_sf_huff8[15][2] = { + { 0, 2 }, { 1, 3 }, { 2, 3 }, { 14, 3 }, { 15, 3 }, { 3, 4 }, + { 13, 4 }, { 4, 5 }, { 12, 5 }, { 5, 6 }, { 11, 6 }, { 6, 7 }, + { 7, 7 }, { 9, 7 }, { 10, 7 }, }; -static const uint8_t atrac3p_sf_huff_bits5[16] = { - 1, 3, 4, 5, 7, 7, 7, 7, 0, 7, 7, 7, 7, 5, 4, 3 +/** VLC tables for code table indexes */ +static const uint8_t atrac3p_ct_huff1[4][2] = { + { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 3 }, }; -static const uint16_t atrac3p_sf_huff_code6[16] = { - 0, 2, 3, 0xC, 0x1C, 0x3C, 0x7C, 0x7D, 0, 0x7E, 0x7F, 0x3D, 0x1D, 0xD, 4, 5 +static const uint8_t atrac3p_ct_huff2[8][2] = { + { 0, 2 }, { 1, 3 }, { 2, 3 }, { 3, 3 }, { 4, 3 }, { 5, 3 }, { 6, 4 }, + { 7, 4 }, }; -static const uint8_t atrac3p_sf_huff_bits6[16] = { - 2, 3, 3, 4, 5, 6, 7, 7, 0, 7, 7, 6, 5, 4, 3, 3 +static const uint8_t atrac3p_ct_huff3[8][2] = { + { 0, 2 }, { 1, 3 }, { 2, 3 }, { 3, 3 }, { 6, 3 }, { 7, 3 }, { 4, 4 }, + { 5, 4 }, }; -/** VLC tables for code table indexes */ -static const uint8_t atrac3p_ct_huff_code1[4] = { 0, 2, 6, 7 }; - -static const uint8_t atrac3p_ct_huff_bits1[4] = { 1, 2, 3, 3 }; - -static const uint8_t atrac3p_ct_huff_code2[8] = { 0, 2, 3, 4, 5, 6, 0xE, 0xF }; - -static const uint8_t atrac3p_ct_huff_bits2[8] = { 2, 3, 3, 3, 3, 3, 4, 4 }; - -static const uint8_t atrac3p_ct_huff_xlat1[8] = { 0, 1, 2, 3, 6, 7, 4, 5 }; - -static const uint8_t atrac3p_ct_huff_code3[8] = { - 0, 4, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF +static const uint8_t atrac3p_ct_huff4[8][2] = { + { 0, 1 }, { 1, 3 }, { 2, 4 }, { 3, 4 }, { 4, 4 }, { 5, 4 }, { 6, 4 }, + { 7, 4 }, }; -static const uint8_t atrac3p_ct_huff_bits3[8] = { 1, 3, 4, 4, 4, 4, 4, 4 }; - /* weights for quantized word lengths */ static const int8_t atrac3p_wl_weights[6][32] = { { 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, From patchwork Tue Nov 10 10:48:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23482 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 7B93D44B616 for ; Tue, 10 Nov 2020 12:51:11 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0248E68BF20; Tue, 10 Nov 2020 12:50:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EBE4668A800 for ; Tue, 10 Nov 2020 12:50:30 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id k2so8768191wrx.2 for ; Tue, 10 Nov 2020 02:50:30 -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=urlXyvL+OoT4RbzJpehHHY3bkokPuCJUFQNBrLL1T8c=; b=ctXm6HV7J7rwrDSTEtqEX0qOXRVKauOZNGhYvh2qP8rUNWSu6LL7NAG7CFHKKB5/n/ /2deJzOxSYsKRcHeyMaOd49Hizs5AyoHGDXgm2s0l5CcxgfPsEM5IVOCC+QfBsZtomFe GW2XWDNBm+g3VGo9J9umGf0WpRxDlpM2+mh/960mPfFqG5cohY5fa61uDfvtcOee/Hpm e1qUdAc1Es7Uub8KWuTj5poyOEJoCPBUeYbBqE3wXcKoEYMrp8Lm3tmJL1dTRo+fYjvc MNlKEkPqvhSKQATHCEdk0+ja6vF7mVESQZ67VaI5Yylk04hN8t6wDCSzayg4UfueiYBr cKTQ== 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=urlXyvL+OoT4RbzJpehHHY3bkokPuCJUFQNBrLL1T8c=; b=XR5AKHBhZNJBzTU865a2EXBYC4WOCfDl66DAxKobadibiVmAVHTTJ6MArRw8wnl/tv QONIP5CK+FtTnqoU2MYSc/v2CtUWv/aftmCCkvVKXRU7jmozZFqCdWv7J87a++gw90cK xDsd0nFrNuoP47L/5YBMse+MYZvYspxHQxedaVKsFyqkLqBE90wTIGtrLg7dwMroxN7D KjUGoIAHPu8xoyRi+5DOSwu2Ud2hsPBHcWwU2+w4tdKMc7u5lY5P4TRKflnKXJdc4sfx bnumPDAuhDXQuW/Oqpeb53MjJkN2oKztf6QMe1F6vy4WaGv1rtmeO3L+YrP0gACJo7dQ zFeA== X-Gm-Message-State: AOAM533k/loXREbL4DdUjr+YLB42VpzJNRMDUDY77CZUM4aTvVmFQJZ2 9UUK5Rpvdy0B9PaPw+nDyo42xYsVhr4= X-Google-Smtp-Source: ABdhPJz811QyzjvLCBX9CQ7VtBiIXRxKc8NogZ76T5TmtnXHTuMJQJxpU8K7cy4r2PsRHjLqXnLlRg== X-Received: by 2002:adf:91c6:: with SMTP id 64mr22444156wri.192.1605005430120; Tue, 10 Nov 2020 02:50:30 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:29 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:09 +0100 Message-Id: <20201110104851.321029-73-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 072/114] avcodec/atrac3plus: Simplify getting offset of VLC in VLC_TYPE buf 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" The earlier code used several different offset parameters that were initialized to magic values. This is unnecessary. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac3plus.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c index 955c9901a1..889526e338 100644 --- a/libavcodec/atrac3plus.c +++ b/libavcodec/atrac3plus.c @@ -75,7 +75,7 @@ static av_cold void build_canonical_huff(const uint8_t *cb, const uint8_t *xlat, av_cold void ff_atrac3p_init_vlcs(void) { - int i, wl_vlc_offs, ct_vlc_offs, sf_vlc_offs, tab_offset; + int i, tab_offset = 0; static const uint8_t wl_nb_bits[4] = { 2, 3, 5, 5 }; static const uint8_t wl_nb_codes[4] = { 3, 5, 8, 8 }; @@ -127,39 +127,34 @@ av_cold void ff_atrac3p_init_vlcs(void) atrac3p_huff_freq_xlat }; - for (i = 0, wl_vlc_offs = 0, ct_vlc_offs = 2508; i < 4; i++) { - wl_vlc_tabs[i].table = &tables_data[wl_vlc_offs]; + for (int i = 0; i < 4; i++) { + wl_vlc_tabs[i].table = &tables_data[tab_offset]; wl_vlc_tabs[i].table_allocated = 1 << wl_nb_bits[i]; - ct_vlc_tabs[i].table = &tables_data[ct_vlc_offs]; - ct_vlc_tabs[i].table_allocated = 1 << ct_nb_bits[i]; - + tab_offset += wl_vlc_tabs[i].table_allocated; ff_init_vlc_from_lengths(&wl_vlc_tabs[i], wl_nb_bits[i], wl_nb_codes[i], &wl_huffs[i][0][1], 2, &wl_huffs[i][0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC); + ct_vlc_tabs[i].table = &tables_data[tab_offset]; + ct_vlc_tabs[i].table_allocated = 1 << ct_nb_bits[i]; + tab_offset += ct_vlc_tabs[i].table_allocated; ff_init_vlc_from_lengths(&ct_vlc_tabs[i], ct_nb_bits[i], ct_nb_codes[i], &ct_huffs[i][0][1], 2, &ct_huffs[i][0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC); - - wl_vlc_offs += wl_vlc_tabs[i].table_allocated; - ct_vlc_offs += ct_vlc_tabs[i].table_allocated; } - for (i = 0, sf_vlc_offs = 76; i < 8; i++) { - sf_vlc_tabs[i].table = &tables_data[sf_vlc_offs]; + for (int i = 0; i < 8; i++) { + sf_vlc_tabs[i].table = &tables_data[tab_offset]; sf_vlc_tabs[i].table_allocated = 1 << sf_nb_bits[i]; - + tab_offset += sf_vlc_tabs[i].table_allocated; ff_init_vlc_from_lengths(&sf_vlc_tabs[i], sf_nb_bits[i], sf_nb_codes[i], &sf_huffs[i][0][1], 2, &sf_huffs[i][0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC); - sf_vlc_offs += sf_vlc_tabs[i].table_allocated; } - tab_offset = 2564; - /* build huffman tables for spectrum decoding */ for (i = 0; i < 112; i++) { if (atrac3p_spectra_tabs[i].redirect < 0) From patchwork Tue Nov 10 10:48:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23491 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 B6D1344B3FF for ; Tue, 10 Nov 2020 12:54:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CFAAE68BF3D; Tue, 10 Nov 2020 12:50:49 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2AE8C68BEBC for ; Tue, 10 Nov 2020 12:50:35 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id 23so12140315wrc.8 for ; Tue, 10 Nov 2020 02:50:35 -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=o5X/O+c8DUkaYNkfn5OhlhzPkbTEFSIa3mZxm9Bb6to=; b=LVih0p4GbBfGdDluSg9FL+FiON3BGz2NmRc54EEuPcGl0l9kvBBzsjSHvnXENytsRr djlid21WLM/kFRmanRS1CjpOdfEXFFgLVF3ryhFzpeIXBpMydZSKslznL26vhAZsoLhM fm4Y6OmqKxR5QoH6U1e8rSNmR8ypmAmXX5ZZMmrPqs5G7DLMwPyQhNmGx7hVDnoTGHc4 khdKklKHjZbAsUWu3SoI2PehHGY1RwFXzNktP+z2AWfqCabfG1fKD2rTBq0Blrp5XyYL QmupyMS8jscWbFfr9f6nE5BJuYDV+emrTzkQJCB/u+T/w0eeF3kjUOpa3tUfGlOBPOC5 9kqQ== 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=o5X/O+c8DUkaYNkfn5OhlhzPkbTEFSIa3mZxm9Bb6to=; b=Dd0bGCs2cWAy3sCxy+u/8ssS5qBrUfSUilRRNsB8vcaaXR8txw2yVpkJX1/8QktInt 1HQ9m5Rlj3ZSSMr14u+IB2+0Ossx1P6G6l/U/ptDkccQwy0Y0FNdfZi8ndbVczpKwgJm vC8kSy+5YX76w9exXj1PGwVoInmHXCoYugy3AJM5q/PVYK6u4S42KK11xdYMptcVDFaV pFHs2P5dCZtVNRAGntBSptYQOHD1Y6UmcV16FCE+N00GmUQvtuvRnb2sg7hVI2avU99Z XVykm7tawdaIDR3sxv7cXmkOvJi7BpUfO6uLDagANqxJRbf0xuT6H4s5BH1tIOR9GziL /Jtg== X-Gm-Message-State: AOAM531TK32mrvHlVukVdeEjyPuCTmjCvxmhixbAd3g0zVM10xhVKz5n v1Tcxd4+1Wm5Fh8hBEcYiHrauAd5bTs= X-Google-Smtp-Source: ABdhPJxSmzgN5mgN7kVTDLLNchjRRAuStfqpGo0g03kHOOoK5uzCRRhCtk2oTaBsP7vwwYtwXGQVKw== X-Received: by 2002:adf:f888:: with SMTP id u8mr12961042wrp.381.1605005431486; Tue, 10 Nov 2020 02:50:31 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:30 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:10 +0100 Message-Id: <20201110104851.321029-74-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 073/114] avcodec/atrac3plus: Combine symbols tables 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" This allows to remove lots of pointers (130) to small symbol tables; it has the downside that some of the default tables must now be coded explicitly, but this costs only 6 + 4 + 8 + 16 + 8 bytes and is therefore dwarfed by the gains. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac3plus.c | 30 +- libavcodec/atrac3plus_data.h | 1542 +++++++++++++++++----------------- 2 files changed, 763 insertions(+), 809 deletions(-) diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c index 889526e338..dbecb7c21e 100644 --- a/libavcodec/atrac3plus.c +++ b/libavcodec/atrac3plus.c @@ -43,11 +43,11 @@ static VLC tone_vlc_tabs[7]; * Generate canonical VLC table from given descriptor. * * @param[in] cb ptr to codebook descriptor - * @param[in] xlat ptr to translation table or NULL + * @param[in,out] xlat ptr to ptr to translation table * @param[in,out] tab_offset starting offset to the generated vlc table * @param[out] out_vlc ptr to vlc table to be generated */ -static av_cold void build_canonical_huff(const uint8_t *cb, const uint8_t *xlat, +static av_cold void build_canonical_huff(const uint8_t *cb, const uint8_t **xlat, int *tab_offset, VLC *out_vlc) { int i, b; @@ -68,14 +68,16 @@ static av_cold void build_canonical_huff(const uint8_t *cb, const uint8_t *xlat, out_vlc->table_allocated = 1 << max_len; ff_init_vlc_from_lengths(out_vlc, max_len, index, bits, 1, - xlat, 1, 1, 0, INIT_VLC_USE_NEW_STATIC); + *xlat, 1, 1, 0, INIT_VLC_USE_NEW_STATIC); *tab_offset += 1 << max_len; + *xlat += index; } av_cold void ff_atrac3p_init_vlcs(void) { int i, tab_offset = 0; + const uint8_t *xlats; static const uint8_t wl_nb_bits[4] = { 2, 3, 5, 5 }; static const uint8_t wl_nb_codes[4] = { 3, 5, 8, 8 }; @@ -107,13 +109,6 @@ av_cold void ff_atrac3p_init_vlcs(void) atrac3p_huff_gain_loc4_cb, atrac3p_huff_gain_loc2_cb, atrac3p_huff_gain_loc5_cb }; - static const uint8_t * const gain_xlats[11] = { - NULL, atrac3p_huff_gain_npoints2_xlat, atrac3p_huff_gain_lev1_xlat, - atrac3p_huff_gain_lev2_xlat, atrac3p_huff_gain_lev3_xlat, - atrac3p_huff_gain_lev4_xlat, atrac3p_huff_gain_loc3_xlat, - atrac3p_huff_gain_loc1_xlat, atrac3p_huff_gain_loc4_xlat, - atrac3p_huff_gain_loc2_xlat, atrac3p_huff_gain_loc5_xlat - }; static const uint8_t * const tone_cbs[7] = { atrac3p_huff_tonebands_cb, atrac3p_huff_numwavs1_cb, @@ -121,11 +116,6 @@ av_cold void ff_atrac3p_init_vlcs(void) atrac3p_huff_wav_ampsf2_cb, atrac3p_huff_wav_ampsf3_cb, atrac3p_huff_freq_cb }; - static const uint8_t * const tone_xlats[7] = { - NULL, NULL, atrac3p_huff_numwavs2_xlat, atrac3p_huff_wav_ampsf1_xlat, - atrac3p_huff_wav_ampsf2_xlat, atrac3p_huff_wav_ampsf3_xlat, - atrac3p_huff_freq_xlat - }; for (int i = 0; i < 4; i++) { wl_vlc_tabs[i].table = &tables_data[tab_offset]; @@ -156,22 +146,24 @@ av_cold void ff_atrac3p_init_vlcs(void) } /* build huffman tables for spectrum decoding */ + xlats = atrac3p_spectra_xlats; for (i = 0; i < 112; i++) { if (atrac3p_spectra_tabs[i].redirect < 0) build_canonical_huff(atrac3p_spectra_tabs[i].cb, - atrac3p_spectra_tabs[i].xlat, - &tab_offset, &spec_vlc_tabs[i]); + &xlats, &tab_offset, &spec_vlc_tabs[i]); else /* Reuse already initialized VLC table */ spec_vlc_tabs[i] = spec_vlc_tabs[atrac3p_spectra_tabs[i].redirect]; } /* build huffman tables for gain data decoding */ + xlats = atrac3p_gain_xlats; for (i = 0; i < 11; i++) - build_canonical_huff(gain_cbs[i], gain_xlats[i], &tab_offset, &gain_vlc_tabs[i]); + build_canonical_huff(gain_cbs[i], &xlats, &tab_offset, &gain_vlc_tabs[i]); /* build huffman tables for tone decoding */ + xlats = atrac3p_tone_xlats; for (i = 0; i < 7; i++) - build_canonical_huff(tone_cbs[i], tone_xlats[i], &tab_offset, &tone_vlc_tabs[i]); + build_canonical_huff(tone_cbs[i], &xlats, &tab_offset, &tone_vlc_tabs[i]); } /** diff --git a/libavcodec/atrac3plus_data.h b/libavcodec/atrac3plus_data.h index 418735abc5..61f4b0a038 100644 --- a/libavcodec/atrac3plus_data.h +++ b/libavcodec/atrac3plus_data.h @@ -417,48 +417,278 @@ static const uint8_t huff_a01_cb[14] = { 1, 12, 1, 0, 0, 1, 7, 0, 19, 5, 13, 21, 6, 8 }; -static const uint8_t huff_a01_xlat[81] = { +static const uint8_t huff_a02_cb[13] = { + 2, 12, 1, 0, 4, 11, 0, 1, 29, 6, 20, 7, 2 +}; + +static const uint8_t huff_a03_cb[9] = { 3, 9, 1, 8, 0, 13, 18, 7, 2 }; + +static const uint8_t huff_a04_cb[4] = { 2, 3, 2, 4 }; + +static const uint8_t huff_a05_cb[12] = { + 3, 12, 1, 3, 5, 8, 12, 23, 72, 68, 31, 2 +}; + +static const uint8_t huff_a06_cb[7] = { + 2, 6, 1, 3, 2, 6, 4 +}; + +static const uint8_t huff_a07_cb[11] = { + 2, 10, 1, 2, 2, 2, 6, 14, 21, 13, 2 +}; + +static const uint8_t huff_a11_cb[13] = { + 1, 11, 1, 0, 0, 0, 8, 1, 18, 9, 22, 10, 12 +}; + +static const uint8_t huff_a12_cb[8] = { 5, 10, 16, 11, 32, 19, 1, 2 }; + +static const uint8_t huff_a13_cb[12] = { + 1, 10, 1, 0, 0, 4, 2, 2, 9, 15, 12, 4 +}; + +static const uint8_t huff_a14_cb[12] = { + 2, 11, 1, 0, 4, 3, 5, 16, 28, 34, 26, 4 +}; + +static const uint8_t huff_a15_cb[9] = { 5, 11, 9, 12, 16, 44, 98, 42, 4 }; + +static const uint8_t huff_a16_cb[13] = { + 2, 12, 1, 1, 2, 2, 5, 7, 21, 54, 85, 62, 16 +}; + +static const uint8_t huff_a17_cb[9] = { 3, 9, 3, 2, 5, 7, 17, 23, 6 }; + +static const uint8_t huff_a21_cb[14] = { + 1, 12, 1, 0, 0, 2, 6, 0, 7, 21, 15, 17, 8, 4 +}; + +static const uint8_t huff_a22_cb[10] = { 2, 9, 1, 4, 0, 4, 3, 8, 3, 2 }; + +static const uint8_t huff_a23_cb[9] = { 3, 9, 5, 0, 4, 6, 10, 16, 8 }; + +static const uint8_t huff_a24_cb[5] = { 2, 4, 3, 1, 2 }; + +static const uint8_t huff_a25_cb[5] = { 2, 4, 1, 5, 2 }; + +static const uint8_t huff_a26_cb[10] = { 4, 11, 3, 4, 12, 15, 34, 83, 75, 30 }; + +static const uint8_t huff_a27_cb[7] = { 4, 8, 3, 14, 10, 20, 16 }; + +static const uint8_t huff_a31_cb[8] = { 1, 6, 1, 0, 3, 1, 0, 4 }; + +static const uint8_t huff_a32_cb[13] = { + 1, 11, 1, 0, 0, 2, 2, 6, 12, 18, 19, 15, 6 +}; + +static const uint8_t huff_a33_cb[12] = { + 3, 12, 1, 1, 13, 1, 14, 28, 33, 81, 32, 52 +}; + +static const uint8_t huff_a34_cb[7] = { 1, 5, 1, 1, 1, 1, 2 }; + +static const uint8_t huff_a35_cb[11] = { 2, 10, 1, 0, 2, 3, 6, 19, 9, 75, 110 }; + +static const uint8_t huff_a36_cb[12] = { + 3, 12, 1, 3, 5, 5, 13, 27, 69, 96, 35, 2 +}; + +static const uint8_t huff_a37_cb[7] = { 4, 8, 7, 6, 8, 22, 20 }; + +static const uint8_t huff_a41_cb[14] = { + 1, 12, 1, 0, 0, 6, 2, 0, 0, 0, 19, 9, 24, 20 +}; + +static const uint8_t huff_a42_cb[10] = { 3, 10, 1, 2, 13, 1, 31, 13, 16, 4 }; + +static const uint8_t huff_a43_cb[5] = { 2, 4, 2, 3, 2 }; + +static const uint8_t huff_a44_cb[9] = { 4, 10, 5, 4, 12, 17, 47, 24, 12 }; + +static const uint8_t huff_a45_cb[5] = { 2, 4, 2, 2, 4 }; + +static const uint8_t huff_a46_cb[7] = { 5, 9, 1, 16, 31, 36, 172 }; + +static const uint8_t huff_a47_cb[8] = { 4, 9, 5, 12, 9, 12, 15, 10 }; + +static const uint8_t huff_a51_cb[12] = { + 2, 11, 1, 0, 6, 2, 6, 18, 4, 26, 6, 12 +}; + +static const uint8_t huff_a52_cb[12] = { 1, 10, 1, 0, 2, 2, 0, 4, 3, 8, 3, 2 }; + +static const uint8_t huff_a54_cb[8] = { 4, 9, 4, 7, 12, 19, 21, 58 }; + +static const uint8_t huff_a55_cb[8] = { 1, 6, 1, 1, 1, 0, 3, 2 }; + +static const uint8_t huff_a56_cb[7] = { 3, 7, 1, 8, 6, 8, 8 }; + +static const uint8_t huff_a57_cb[9] = { 3, 9, 1, 5, 7, 8, 16, 22, 4 }; + +static const uint8_t huff_a61_cb[12] = { + 2, 11, 1, 0, 8, 0, 1, 16, 10, 29, 12, 4 +}; + +static const uint8_t huff_a62_cb[8] = { 3, 8, 5, 2, 2, 9, 5, 2 }; + +static const uint8_t huff_a63_cb[11] = { + 3, 11, 1, 1, 10, 4, 16, 29, 46, 75, 74 +}; + +static const uint8_t huff_a64_cb[8] = { 4, 9, 1, 7, 12, 36, 63, 2 }; + +static const uint8_t huff_a65_cb[8] = { 2, 7, 3, 0, 1, 3, 4, 4 }; + +static const uint8_t huff_a66_cb[11] = { 2, 10, 1, 2, 2, 6, 8, 6, 3, 1, 2 }; + +static const uint8_t huff_a67_cb[10] = { 2, 9, 1, 1, 3, 4, 6, 13, 25, 10 }; + +static const uint8_t huff_a71_cb[5] = { 1, 3, 1, 1, 2 }; + +static const uint8_t huff_a72_cb[12] = { + 2, 11, 1, 0, 4, 8, 3, 8, 24, 17, 12, 4 +}; + +static const uint8_t huff_a73_cb[11] = { 2, 10, 1, 1, 5, 2, 8, 7, 13, 8, 4 }; + +static const uint8_t huff_a74_cb[14] = { + 1, 12, 1, 0, 0, 4, 0, 4, 5, 9, 30, 45, 21, 2 +}; + +static const uint8_t huff_a75_cb[7] = { 2, 6, 1, 3, 3, 4, 4 }; + +static const uint8_t huff_a76_cb[12] = { + 3, 12, 1, 3, 4, 8, 10, 36, 60, 78, 48, 8 +}; + +static const uint8_t huff_b01_cb[14] = { + 1, 12, 1, 0, 0, 2, 6, 0, 11, 13, 12, 24, 4, 8 +}; + +static const uint8_t huff_b02_cb[14] = { + 1, 12, 1, 0, 0, 4, 0, 8, 4, 9, 19, 13, 13, 10 +}; + +static const uint8_t huff_b03_cb[11] = { 1, 9, 1, 0, 0, 4, 0, 5, 12, 13, 14 }; + +static const uint8_t huff_b04_cb[12] = { + 2, 11, 1, 0, 4, 4, 5, 9, 30, 45, 21, 2 +}; + +static const uint8_t huff_b05_cb[11] = { + 3, 11, 1, 4, 4, 4, 12, 30, 73, 75, 22 +}; + +static const uint8_t huff_b07_cb[9] = { 3, 9, 3, 2, 4, 8, 23, 13, 10 }; + +static const uint8_t huff_b12_cb[10] = { 3, 10, 1, 3, 12, 0, 30, 9, 18, 8 }; + +static const uint8_t huff_b14_cb[14] = { + 1, 12, 1, 0, 0, 4, 0, 3, 5, 16, 28, 34, 26, 4 +}; + +static const uint8_t huff_b16_cb[11] = { + 4, 12, 4, 4, 9, 13, 37, 76, 72, 39, 2 +}; + +static const uint8_t huff_b26_cb[12] = { + 3, 12, 2, 2, 4, 5, 11, 26, 67, 78, 51, 10 +}; + +static const uint8_t huff_b32_cb[12] = { + 2, 11, 1, 0, 4, 6, 7, 10, 22, 11, 16, 4 +}; + +static const uint8_t huff_b33_cb[13] = { + 2, 12, 1, 0, 0, 4, 11, 8, 28, 92, 97, 13, 2 +}; + +static const uint8_t huff_b35_cb[14] = { + 1, 12, 1, 0, 0, 0, 4, 6, 6, 14, 42, 63, 59, 30 +}; + +static const uint8_t huff_b37_cb[13] = { + 1, 11, 1, 0, 2, 0, 2, 2, 6, 17, 14, 13, 6 +}; + +static const uint8_t huff_b41_cb[14] = { + 1, 12, 1, 0, 0, 1, 7, 0, 20, 4, 10, 24, 2, 12 +}; + +static const uint8_t huff_b42_cb[11] = { 1, 9, 1, 0, 1, 3, 2, 3, 7, 4, 4 }; + +static const uint8_t huff_b43_cb[10] = { 2, 9, 1, 1, 3, 4, 9, 15, 12, 4 }; + +static const uint8_t huff_b47_cb[10] = { 2, 9, 1, 1, 3, 4, 6, 14, 22, 12 }; + +static const uint8_t huff_b52_cb[11] = { 1, 9, 1, 0, 1, 3, 2, 3, 7, 4, 4 }; + +static const uint8_t huff_b53_cb[7] = { 1, 5, 1, 1, 1, 0, 4 }; // same as b63!!! + +static const uint8_t huff_b56_cb[11] = { 1, 9, 1, 0, 2, 0, 2, 4, 11, 9, 2 }; + +static const uint8_t huff_b62_cb[14] = { + 1, 12, 1, 0, 0, 2, 3, 5, 12, 14, 18, 15, 9, 2 +}; + +static const uint8_t huff_b63_cb[7] = { 1, 5, 1, 1, 1, 0, 4 }; + +static const uint8_t huff_b64_cb[7] = { 1, 5, 1, 1, 1, 1, 2 }; + +static const uint8_t huff_b65_cb[14] = { + 1, 12, 1, 0, 0, 2, 2, 2, 6, 12, 34, 92, 54, 20 +}; + +static const uint8_t huff_b66_cb[14] = { + 1, 12, 1, 0, 0, 3, 0, 3, 3, 10, 40, 85, 61, 50 +}; + +static const uint8_t huff_b67_cb[10] = { 2, 9, 1, 2, 1, 4, 7, 10, 26, 12 }; + +static const uint8_t huff_b71_cb[14] = { + 1, 12, 1, 0, 0, 1, 7, 0, 19, 5, 13, 23, 0, 12 +}; + +static const uint8_t huff_b73_cb[13] = { + 1, 11, 1, 0, 0, 0, 1, 4, 9, 4, 103, 110, 24 +}; + +static const uint8_t huff_b74_cb[8] = { 1, 6, 1, 0, 2, 2, 2, 4 }; + +static const uint8_t huff_b75_cb[13] = { + 2, 12, 1, 4, 0, 0, 0, 8, 11, 24, 53, 64, 60 +}; + +static const uint8_t huff_b77_cb[12] = { + 2, 11, 1, 0, 4, 6, 10, 12, 7, 15, 4, 4 +}; + +static const uint8_t atrac3p_spectra_xlats[] = { + /* Table set A, code table 0, wordlen 1 - 81 entries */ 0x00, 0x03, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x50, 0xD0, 0x70, 0xF0, 0xC4, 0x14, 0x34, 0x4C, 0x1C, 0x3C, 0x41, 0xC1, 0x31, 0x05, 0x0D, 0xC3, 0x13, 0x07, 0x0F, 0x44, 0xCC, 0x11, 0x43, 0x33, 0x54, 0x74, 0xDC, 0xFC, 0x71, 0x15, 0x4D, 0xCD, 0x1D, 0xD3, 0xC7, 0x37, 0x3F, 0xD4, 0xF4, 0x5C, 0x7C, 0x51, 0xD1, 0xF1, 0x45, 0xC5, 0x35, 0xDD, 0x3D, 0x53, 0x73, 0xF3, 0x47, 0x17, 0x77, 0x4F, 0xCF, 0x1F, 0x55, 0xF5, 0x7D, 0xD7, 0x5F, - 0xFF, 0xD5, 0x75, 0x5D, 0xFD, 0x57, 0xF7, 0xDF, 0x7F -}; - -static const uint8_t huff_a02_cb[13] = { - 2, 12, 1, 0, 4, 11, 0, 1, 29, 6, 20, 7, 2 -}; - -static const uint8_t huff_a02_xlat[81] = { + 0xFF, 0xD5, 0x75, 0x5D, 0xFD, 0x57, 0xF7, 0xDF, 0x7F, + /* Table set A, code table 0, wordlen 2 - 81 entries */ 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55, 0x90, 0x80, 0x20, 0x60, 0x84, 0x94, 0x24, 0x64, 0x08, 0x48, 0x18, 0x58, 0x81, 0x91, 0x21, 0x85, 0x95, 0x65, 0x09, 0x49, 0x19, 0x59, 0x02, 0x42, 0x12, 0x52, 0x06, 0x46, 0x16, 0x56, 0x88, 0x61, 0x25, 0x29, 0x69, 0x5A, 0xA0, 0xA4, 0x98, 0x28, 0x68, 0xA1, 0xA5, 0x89, 0x99, 0xA9, 0x82, 0x92, 0x22, 0x62, 0x96, 0x26, 0x66, 0x0A, 0x4A, 0x1A, - 0xA8, 0x86, 0xA6, 0x8A, 0x9A, 0x2A, 0x6A, 0xA2, 0xAA -}; - -static const uint8_t huff_a03_cb[9] = { 3, 9, 1, 8, 0, 13, 18, 7, 2 }; - -static const uint8_t huff_a03_xlat[49] = { + 0xA8, 0x86, 0xA6, 0x8A, 0x9A, 0x2A, 0x6A, 0xA2, 0xAA, + /* Table set A, code table 0, wordlen 3 - 49 entries */ 0x00, 0x08, 0x38, 0x01, 0x09, 0x39, 0x07, 0x0F, 0x3F, 0x10, 0x30, 0x11, 0x31, 0x02, 0x0A, 0x3A, 0x05, 0x06, 0x0E, 0x3E, 0x17, 0x37, 0x18, 0x28, 0x19, 0x29, 0x2A, 0x32, 0x03, 0x0B, 0x33, 0x3B, 0x0D, 0x15, 0x3D, 0x16, 0x1E, 0x36, 0x1F, 0x2F, 0x12, 0x1A, 0x13, 0x2B, 0x1D, 0x35, 0x2E, 0x1B, - 0x2D -}; - -static const uint8_t huff_a04_cb[4] = { 2, 3, 2, 4 }; -static const uint8_t huff_a04_xlat[6] = { 1, 2, 0, 3, 4, 5 }; - -static const uint8_t huff_a05_cb[12] = { - 3, 12, 1, 3, 5, 8, 12, 23, 72, 68, 31, 2 -}; - -static const uint8_t huff_a05_xlat[225] = { + 0x2D, + /* Table set A, code table 0, wordlen 4 - 6 entries */ + 0x01, 0x02, 0x00, 0x03, 0x04, 0x05, + /* Table set A, code table 0, wordlen 5 - 225 entries */ 0x00, 0x10, 0xF0, 0x01, 0x11, 0xF1, 0x0F, 0x1F, 0xFF, 0x20, 0xE0, 0xE1, 0x02, 0xF2, 0x0E, 0x1E, 0x2F, 0x30, 0xD0, 0x21, 0x12, 0x22, 0xE2, 0x03, 0x0D, 0x2E, 0xEE, 0xFE, 0xEF, 0x40, 0xC0, 0x31, 0xC1, 0xD1, 0x32, 0xD2, @@ -477,71 +707,40 @@ static const uint8_t huff_a05_xlat[225] = { 0x9C, 0xAC, 0xCC, 0x5D, 0x6D, 0x7D, 0x9D, 0xAD, 0xBD, 0x5E, 0x9E, 0xBE, 0x54, 0x45, 0x55, 0x65, 0x75, 0x95, 0xB5, 0x56, 0x66, 0x76, 0x96, 0xA6, 0x57, 0x67, 0x97, 0xA7, 0x69, 0x79, 0xA9, 0xB9, 0x6A, 0x7A, 0x9A, 0xAA, - 0xBA, 0x5B, 0x9B, 0xAB, 0xBB, 0xCB, 0xBC, 0x77, 0x99 -}; - -static const uint8_t huff_a06_cb[7] = { - 2, 6, 1, 3, 2, 6, 4 -}; - -static const uint8_t huff_a06_xlat[16] = { - 1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 10, 11, 12, 15 -}; - -static const uint8_t huff_a07_cb[11] = { - 2, 10, 1, 2, 2, 2, 6, 14, 21, 13, 2 -}; - -static const uint8_t huff_a07_xlat[63] = { - 0, 1, 63, 2, 62, 3, 61, 4, 5, 6, 58, 59, 60, 7, 8, 9, - 10, 26, 27, 28, 36, 37, 38, 54, 55, 56, 57, 11, 12, 13, 14, 15, - 16, 25, 29, 30, 31, 33, 34, 35, 39, 47, 48, 49, 50, 51, 52, 53, - 17, 18, 19, 20, 21, 22, 23, 41, 42, 43, 44, 45, 46, 24, 40 -}; - -static const uint8_t huff_a11_cb[13] = { - 1, 11, 1, 0, 0, 0, 8, 1, 18, 9, 22, 10, 12 -}; - -static const uint8_t huff_a11_xlat[81] = { + 0xBA, 0x5B, 0x9B, 0xAB, 0xBB, 0xCB, 0xBC, 0x77, 0x99, + /* Table set A, code table 0, wordlen 6 - 16 entries */ + 0x01, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0D, 0x0E, + 0x0A, 0x0B, 0x0C, 0x0F, + /* Table set A, code table 0, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x3F, 0x02, 0x3E, 0x03, 0x3D, 0x04, 0x05, 0x06, 0x3A, 0x3B, + 0x3C, 0x07, 0x08, 0x09, 0x0A, 0x1A, 0x1B, 0x1C, 0x24, 0x25, 0x26, 0x36, + 0x37, 0x38, 0x39, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x19, 0x1D, 0x1E, + 0x1F, 0x21, 0x22, 0x23, 0x27, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, + 0x2E, 0x18, 0x28, + /* Table set A, code table 1, wordlen 1 - 81 entries */ 0x00, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x03, 0xD0, 0x50, 0x70, 0xF0, 0xC4, 0x34, 0x4C, 0xCC, 0x1C, 0x41, 0xC1, 0x31, 0x05, 0x0D, 0x43, 0xC3, 0x13, 0x07, 0x0F, 0x44, 0x14, 0x74, 0xDC, 0x3C, 0x11, 0x1D, 0x33, 0x37, 0x54, 0xD4, 0xF4, 0x5C, 0x7C, 0xFC, 0xD1, 0x71, 0xF1, 0x15, 0x35, 0x4D, 0xCD, 0xDD, 0x3D, 0xD3, 0x73, 0x47, 0xC7, 0x17, 0x77, 0x3F, 0x51, 0x45, 0xC5, 0x55, 0x53, 0xF3, 0x4F, 0xCF, 0x1F, 0xFF, 0xD5, 0x75, 0xF5, - 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F -}; - -static const uint8_t huff_a12_cb[8] = { 5, 10, 16, 11, 32, 19, 1, 2 }; - -static const uint8_t huff_a12_xlat[81] = { + 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F, + /* Table set A, code table 1, wordlen 2 - 81 entries */ 0x00, 0x40, 0x10, 0x50, 0x04, 0x44, 0x14, 0x54, 0x01, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55, 0x90, 0x94, 0x58, 0x91, 0x95, 0x19, 0x59, 0x06, 0x46, 0x16, 0x56, 0x80, 0x60, 0x84, 0x24, 0x64, 0xA4, 0x08, 0x48, 0x18, 0x68, 0x81, 0x21, 0x61, 0xA1, 0x85, 0x25, 0x65, 0xA5, 0x09, 0x49, 0x99, 0x69, 0xA9, 0x02, 0x42, 0x12, 0x52, 0x96, 0x26, 0x66, 0x1A, 0x5A, 0x20, 0xA0, 0x88, 0x98, 0x28, 0xA8, 0x89, 0x29, 0x82, 0x92, 0x22, 0x62, 0x86, - 0xA6, 0x0A, 0x4A, 0x9A, 0x6A, 0xAA, 0xA2, 0x8A, 0x2A -}; - -static const uint8_t huff_a13_cb[12] = { - 1, 10, 1, 0, 0, 4, 2, 2, 9, 15, 12, 4 -}; - -static const uint8_t huff_a13_xlat[49] = { + 0xA6, 0x0A, 0x4A, 0x9A, 0x6A, 0xAA, 0xA2, 0x8A, 0x2A, + /* Table set A, code table 1, wordlen 3 - 49 entries */ 0x00, 0x08, 0x38, 0x01, 0x07, 0x39, 0x0F, 0x09, 0x3F, 0x10, 0x30, 0x31, 0x02, 0x3A, 0x06, 0x0E, 0x3E, 0x17, 0x18, 0x28, 0x11, 0x29, 0x0A, 0x32, 0x03, 0x0B, 0x3B, 0x05, 0x0D, 0x3D, 0x16, 0x1F, 0x37, 0x19, 0x12, 0x1A, 0x2A, 0x13, 0x33, 0x15, 0x35, 0x1E, 0x2E, 0x36, 0x2F, 0x1B, 0x2B, 0x1D, - 0x2D -}; - -static const uint8_t huff_a14_cb[12] = { - 2, 11, 1, 0, 4, 3, 5, 16, 28, 34, 26, 4 -}; - -static const uint8_t huff_a14_xlat[121] = { + 0x2D, + /* Table set A, code table 1, wordlen 4 - 121 entries */ 0x00, 0x10, 0xF0, 0x01, 0x0F, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x11, 0x02, 0x0E, 0x30, 0x50, 0xB0, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x03, 0x05, 0x0B, 0x0D, 0x1E, 0xFE, 0x2F, 0xEF, 0x40, 0xC0, 0x31, 0x51, 0xB1, 0xC1, 0xD1, @@ -552,12 +751,8 @@ static const uint8_t huff_a14_xlat[121] = { 0xED, 0x3E, 0x4E, 0xBE, 0xDE, 0x4F, 0xCF, 0xC2, 0x33, 0x43, 0xC3, 0xD3, 0x34, 0x44, 0x54, 0xB4, 0xD4, 0x45, 0x55, 0xC5, 0x4B, 0xCB, 0x3C, 0x4C, 0x5C, 0xCC, 0xDC, 0x3D, 0x4D, 0x5D, 0xCD, 0xDD, 0xCE, 0xC4, 0xB5, 0x5B, - 0xBB -}; - -static const uint8_t huff_a15_cb[9] = { 5, 11, 9, 12, 16, 44, 98, 42, 4 }; - -static const uint8_t huff_a15_xlat[225] = { + 0xBB, + /* Table set A, code table 1, wordlen 5 - 225 entries */ 0x00, 0x10, 0xF0, 0x01, 0x11, 0xF1, 0x0F, 0x1F, 0xFF, 0x20, 0xE0, 0x21, 0xE1, 0x02, 0x12, 0xF2, 0x0E, 0x1E, 0xFE, 0x2F, 0xEF, 0x30, 0xD0, 0x31, 0xD1, 0x22, 0xE2, 0x03, 0x13, 0xF3, 0x0D, 0x1D, 0xFD, 0x2E, 0xEE, 0x3F, @@ -576,14 +771,8 @@ static const uint8_t huff_a15_xlat[225] = { 0x54, 0x74, 0x94, 0xB4, 0x45, 0x55, 0x65, 0x75, 0x95, 0xA5, 0xB5, 0xC5, 0x56, 0x66, 0x76, 0x96, 0xA6, 0xB6, 0x47, 0x57, 0x67, 0xA7, 0xB7, 0x49, 0x59, 0x69, 0xA9, 0xB9, 0x6A, 0x7A, 0x9A, 0xAA, 0xBA, 0x4B, 0x5B, 0x6B, - 0x7B, 0x9B, 0xAB, 0xBB, 0x5C, 0x77, 0x97, 0x79, 0x99 -}; - -static const uint8_t huff_a16_cb[13] = { - 2, 12, 1, 1, 2, 2, 5, 7, 21, 54, 85, 62, 16 -}; - -static const uint8_t huff_a16_xlat[256] = { + 0x7B, 0x9B, 0xAB, 0xBB, 0x5C, 0x77, 0x97, 0x79, 0x99, + /* Table set A, code table 1, wordlen 6 - 256 entries */ 0x00, 0x01, 0x10, 0x11, 0x21, 0x12, 0x20, 0x31, 0x02, 0x22, 0x13, 0x30, 0x41, 0x32, 0x03, 0x23, 0x14, 0x24, 0x40, 0x51, 0x61, 0xD1, 0xE1, 0x42, 0x52, 0xD2, 0x33, 0x43, 0xD3, 0x04, 0x34, 0x05, 0x15, 0x25, 0x16, 0x1D, @@ -605,59 +794,37 @@ static const uint8_t huff_a16_xlat[256] = { 0x6B, 0xCB, 0x4C, 0x5C, 0x6C, 0x7C, 0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xFC, 0xDD, 0xED, 0xFD, 0xDE, 0xEE, 0xFE, 0x9F, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF, 0xB0, 0xA7, 0xB7, 0xA8, 0xB8, 0xA9, 0xB9, 0x8A, 0x9A, 0xAA, 0xBA, 0x7B, - 0x8B, 0x9B, 0xAB, 0xBB -}; - -static const uint8_t huff_a17_cb[9] = { 3, 9, 3, 2, 5, 7, 17, 23, 6 }; - -static const uint8_t huff_a17_xlat[63] = { - 0, 1, 63, 2, 62, 3, 4, 59, 60, 61, 5, 6, 7, 8, 56, 57, - 58, 9, 10, 11, 12, 13, 14, 26, 27, 36, 37, 38, 50, 51, 52, 53, - 54, 55, 15, 16, 17, 18, 19, 20, 21, 25, 28, 29, 30, 31, 33, 34, - 35, 39, 43, 44, 45, 46, 47, 48, 49, 22, 23, 24, 40, 41, 42 -}; - -static const uint8_t huff_a21_cb[14] = { - 1, 12, 1, 0, 0, 2, 6, 0, 7, 21, 15, 17, 8, 4 -}; - -static const uint8_t huff_a21_xlat[81] = { + 0x8B, 0x9B, 0xAB, 0xBB, + /* Table set A, code table 1, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x3F, 0x02, 0x3E, 0x03, 0x04, 0x3B, 0x3C, 0x3D, 0x05, 0x06, + 0x07, 0x08, 0x38, 0x39, 0x3A, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x1A, + 0x1B, 0x24, 0x25, 0x26, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x0F, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x19, 0x1C, 0x1D, 0x1E, 0x1F, 0x21, 0x22, + 0x23, 0x27, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x16, 0x17, 0x18, + 0x28, 0x29, 0x2A, + /* Table set A, code table 2, wordlen 1 - 81 entries */ 0x00, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x03, 0xD0, 0x70, 0x34, 0x1C, 0x0D, 0x13, 0x07, 0x50, 0xF0, 0x44, 0xC4, 0x14, 0x74, 0x4C, 0xCC, 0xDC, 0x3C, 0x41, 0xC1, 0x11, 0x31, 0x05, 0x1D, 0x43, 0xC3, 0x33, 0x37, 0x0F, 0x54, 0xF4, 0xFC, 0xD1, 0x71, 0x15, 0x4D, 0xCD, 0xDD, 0xD3, 0x73, 0x47, 0xC7, 0x77, 0x3F, 0xD4, 0x5C, 0x7C, 0x51, 0xF1, 0x45, 0xC5, 0x55, 0x35, 0x3D, 0x53, 0xF3, 0x17, 0x4F, 0xCF, 0x1F, 0xFF, 0x75, 0xF5, 0x5D, - 0x7D, 0xD7, 0xF7, 0x5F, 0xDF, 0xD5, 0xFD, 0x57, 0x7F -}; - -static const uint8_t huff_a22_cb[10] = { 2, 9, 1, 4, 0, 4, 3, 8, 3, 2 }; - -static const uint8_t huff_a22_xlat[25] = { + 0x7D, 0xD7, 0xF7, 0x5F, 0xDF, 0xD5, 0xFD, 0x57, 0x7F, + /* Table set A, code table 2, wordlen 2 - 25 entries */ 0x00, 0x08, 0x38, 0x01, 0x07, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x02, 0x06, 0x30, 0x11, 0x31, 0x0A, 0x3A, 0x0E, 0x17, 0x37, 0x32, 0x16, 0x3E, 0x12, - 0x36 -}; - -static const uint8_t huff_a23_cb[9] = { 3, 9, 5, 0, 4, 6, 10, 16, 8 }; - -static const uint8_t huff_a23_xlat[49] = { + 0x36, + /* Table set A, code table 2, wordlen 3 - 49 entries */ 0x00, 0x08, 0x38, 0x01, 0x07, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x30, 0x02, 0x3A, 0x06, 0x0E, 0x18, 0x28, 0x11, 0x31, 0x0A, 0x03, 0x05, 0x3E, 0x17, 0x37, 0x19, 0x29, 0x12, 0x2A, 0x32, 0x0B, 0x33, 0x3B, 0x0D, 0x15, 0x3D, 0x16, 0x1E, 0x36, 0x1F, 0x2F, 0x1A, 0x13, 0x1B, 0x2B, 0x1D, 0x2D, 0x35, - 0x2E -}; - -static const uint8_t huff_a24_cb[5] = { 2, 4, 3, 1, 2 }; - -static const uint8_t huff_a25_cb[5] = { 2, 4, 1, 5, 2 }; - -static const uint8_t huff_a25_xlat[8] = { 1, 0, 2, 3, 4, 5, 6, 7 }; - -static const uint8_t huff_a26_cb[10] = { 4, 11, 3, 4, 12, 15, 34, 83, 75, 30 }; - -static const uint8_t huff_a26_xlat[256] = { + 0x2E, + /* Table set A, code table 2, wordlen 4 - 6 entries */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, + /* Table set A, code table 2, wordlen 5 - 8 entries */ + 0x01, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + /* Table set A, code table 2, wordlen 6 - 256 entries */ 0x00, 0x01, 0x11, 0x10, 0x21, 0x12, 0x22, 0x20, 0x30, 0x31, 0x41, 0x02, 0x32, 0x03, 0x13, 0x23, 0x33, 0x14, 0x24, 0x40, 0x51, 0x61, 0x42, 0x52, 0x43, 0x53, 0x04, 0x34, 0x44, 0x15, 0x25, 0x35, 0x16, 0x26, 0x50, 0x60, @@ -679,43 +846,25 @@ static const uint8_t huff_a26_xlat[256] = { 0x8E, 0x9E, 0xAE, 0xBE, 0x0F, 0x6F, 0x7F, 0x8F, 0x9F, 0xAF, 0xB8, 0xA9, 0xB9, 0x9A, 0xAA, 0xBA, 0xCA, 0x9B, 0xAB, 0xBB, 0xCB, 0xEB, 0xFB, 0xAC, 0xBC, 0xCC, 0xEC, 0xFC, 0xDD, 0xED, 0xFD, 0xCE, 0xDE, 0xEE, 0xFE, 0xBF, - 0xCF, 0xDF, 0xEF, 0xFF -}; - -static const uint8_t huff_a27_cb[7] = { 4, 8, 3, 14, 10, 20, 16 }; - -static const uint8_t huff_a27_xlat[63] = { - 0, 2, 3, 1, 5, 6, 7, 9, 54, 55, 56, 58, 59, 60, 61, 62, - 63, 4, 8, 10, 11, 12, 14, 49, 52, 53, 57, 13, 15, 16, 17, 18, - 19, 22, 23, 25, 26, 30, 39, 43, 44, 45, 46, 47, 48, 50, 51, 20, - 21, 24, 27, 28, 29, 31, 33, 34, 35, 36, 37, 38, 40, 41, 42 -}; - -static const uint8_t huff_a31_cb[8] = { 1, 6, 1, 0, 3, 1, 0, 4 }; - -static const uint8_t huff_a31_xlat[9] = { - 0x00, 0x04, 0x0C, 0x01, 0x03, 0x05, 0x0D, 0x07, 0x0F -}; - -static const uint8_t huff_a32_cb[13] = { - 1, 11, 1, 0, 0, 2, 2, 6, 12, 18, 19, 15, 6 -}; - -static const uint8_t huff_a32_xlat[81] = { + 0xCF, 0xDF, 0xEF, 0xFF, + /* Table set A, code table 2, wordlen 7 - 63 entries */ + 0x00, 0x02, 0x03, 0x01, 0x05, 0x06, 0x07, 0x09, 0x36, 0x37, 0x38, 0x3A, + 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x04, 0x08, 0x0A, 0x0B, 0x0C, 0x0E, 0x31, + 0x34, 0x35, 0x39, 0x0D, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x16, 0x17, 0x19, + 0x1A, 0x1E, 0x27, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x32, 0x33, 0x14, + 0x15, 0x18, 0x1B, 0x1C, 0x1D, 0x1F, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x28, 0x29, 0x2A, + /* Table set A, code table 3, wordlen 1 - 9 entries */ + 0x00, 0x04, 0x0C, 0x01, 0x03, 0x05, 0x0D, 0x07, 0x0F, + /* Table set A, code table 3, wordlen 2 - 81 entries */ 0x00, 0x40, 0x01, 0x10, 0x04, 0x80, 0x50, 0x20, 0x14, 0x05, 0x02, 0x90, 0x60, 0x44, 0x54, 0x24, 0x08, 0x18, 0x41, 0x11, 0x15, 0x09, 0x06, 0xA0, 0x84, 0x94, 0x64, 0xA4, 0x48, 0x58, 0x28, 0x51, 0x21, 0x45, 0x55, 0x25, 0x19, 0x12, 0x16, 0x0A, 0x1A, 0x68, 0xA8, 0x81, 0x91, 0x61, 0xA1, 0x85, 0x95, 0x65, 0xA5, 0x49, 0x59, 0x29, 0x69, 0x42, 0x52, 0x46, 0x56, 0x2A, 0x88, 0x98, 0x89, 0x99, 0xA9, 0x82, 0x92, 0x22, 0x62, 0x86, 0x26, 0x66, - 0x4A, 0x5A, 0x6A, 0xA2, 0x96, 0xA6, 0x8A, 0x9A, 0xAA -}; - -static const uint8_t huff_a33_cb[12] = { - 3, 12, 1, 1, 13, 1, 14, 28, 33, 81, 32, 52 -}; - -static const uint8_t huff_a33_xlat[256] = { + 0x4A, 0x5A, 0x6A, 0xA2, 0x96, 0xA6, 0x8A, 0x9A, 0xAA, + /* Table set A, code table 3, wordlen 3 - 256 entries */ 0x00, 0x10, 0x40, 0x50, 0x04, 0x44, 0x14, 0x54, 0x01, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55, 0x90, 0x20, 0x94, 0x64, 0x18, 0x21, 0x95, 0x19, 0x69, 0x02, 0x52, 0x06, 0x46, 0x16, 0x80, 0x60, 0x84, 0xD4, 0x24, 0x08, @@ -737,16 +886,10 @@ static const uint8_t huff_a33_xlat[256] = { 0xF6, 0xCA, 0x3A, 0x7A, 0xCE, 0xDE, 0xAE, 0x3E, 0x7E, 0xBE, 0xFE, 0xD3, 0xA3, 0xE3, 0x33, 0x73, 0xF3, 0x87, 0xC7, 0xD7, 0x27, 0x67, 0xE7, 0x77, 0xF7, 0xCB, 0xDB, 0x2B, 0xAB, 0x3B, 0xBB, 0xFB, 0x8F, 0xCF, 0xDF, 0x6F, - 0xAF, 0xEF, 0x7F, 0xFF -}; - -static const uint8_t huff_a34_cb[7] = { 1, 5, 1, 1, 1, 1, 2 }; - -static const uint8_t huff_a34_xlat[6] = { 1, 0, 2, 3, 4, 5 }; - -static const uint8_t huff_a35_cb[11] = { 2, 10, 1, 0, 2, 3, 6, 19, 9, 75, 110 }; - -static const uint8_t huff_a35_xlat[225] = { + 0xAF, 0xEF, 0x7F, 0xFF, + /* Table set A, code table 3, wordlen 4 - 6 entries */ + 0x01, 0x00, 0x02, 0x03, 0x04, 0x05, + /* Table set A, code table 3, wordlen 5 - 225 entries */ 0x00, 0xF0, 0x0F, 0x10, 0x01, 0xFF, 0x20, 0xE0, 0x11, 0xF1, 0x0E, 0x1F, 0x30, 0x40, 0xD0, 0x21, 0xE1, 0x02, 0x12, 0x22, 0xE2, 0xF2, 0x03, 0x13, 0x1E, 0x2E, 0x3E, 0xEE, 0xFE, 0x2F, 0xEF, 0xD2, 0x43, 0xF3, 0x04, 0x0D, @@ -765,14 +908,8 @@ static const uint8_t huff_a35_xlat[225] = { 0xB9, 0xC9, 0xD9, 0xE9, 0x1A, 0x5A, 0x6A, 0x7A, 0x9A, 0xAA, 0xBA, 0xCA, 0x1B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, 0x9B, 0xBB, 0xCB, 0xDB, 0x6C, 0x7C, 0x9C, 0xAC, 0xBC, 0xEC, 0x5D, 0x7D, 0x9D, 0xAD, 0xDD, 0x5E, 0x7E, 0x9E, - 0xAE, 0xBE, 0x4F, 0x5F, 0x6F, 0x9F, 0xAF, 0xBF, 0xCF -}; - -static const uint8_t huff_a36_cb[12] = { - 3, 12, 1, 3, 5, 5, 13, 27, 69, 96, 35, 2 -}; - -static const uint8_t huff_a36_xlat[256] = { + 0xAE, 0xBE, 0x4F, 0x5F, 0x6F, 0x9F, 0xAF, 0xBF, 0xCF, + /* Table set A, code table 3, wordlen 6 - 256 entries */ 0x00, 0x10, 0x01, 0x11, 0x20, 0x21, 0x02, 0x12, 0x22, 0x31, 0x41, 0x32, 0x13, 0x23, 0x30, 0x40, 0x51, 0x42, 0x03, 0x33, 0x43, 0x04, 0x14, 0x24, 0x34, 0x15, 0x25, 0x50, 0x61, 0x71, 0xD1, 0x52, 0x62, 0x72, 0xD2, 0x53, @@ -794,51 +931,33 @@ static const uint8_t huff_a36_xlat[256] = { 0x8F, 0x9F, 0xAF, 0xB0, 0xB6, 0xB7, 0xA8, 0xB8, 0x99, 0xA9, 0xB9, 0xC9, 0x7A, 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0x0B, 0x6B, 0x7B, 0x8B, 0x9B, 0xCB, 0xAC, 0xBC, 0xCC, 0xFC, 0xFD, 0xCE, 0xDE, 0xEE, 0xFE, 0xBF, 0xCF, 0xDF, - 0xEF, 0xFF, 0xAB, 0xBB -}; - -static const uint8_t huff_a37_cb[7] = { 4, 8, 7, 6, 8, 22, 20 }; - -static const uint8_t huff_a37_xlat[63] = { - 0, 1, 2, 3, 61, 62, 63, 4, 5, 6, 58, 59, 60, 7, 8, 9, - 10, 54, 55, 56, 57, 11, 12, 13, 14, 15, 16, 25, 26, 27, 28, 29, - 30, 35, 36, 37, 38, 48, 49, 50, 51, 52, 53, 17, 18, 19, 20, 21, - 22, 23, 24, 31, 33, 34, 39, 40, 41, 42, 43, 44, 45, 46, 47 -}; - -static const uint8_t huff_a41_cb[14] = { - 1, 12, 1, 0, 0, 6, 2, 0, 0, 0, 19, 9, 24, 20 -}; - -static const uint8_t huff_a41_xlat[81] = { + 0xEF, 0xFF, 0xAB, 0xBB, + /* Table set A, code table 3, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x02, 0x03, 0x3D, 0x3E, 0x3F, 0x04, 0x05, 0x06, 0x3A, 0x3B, + 0x3C, 0x07, 0x08, 0x09, 0x0A, 0x36, 0x37, 0x38, 0x39, 0x0B, 0x0C, 0x0D, + 0x0E, 0x0F, 0x10, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x23, 0x24, 0x25, + 0x26, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x11, 0x12, 0x13, 0x14, 0x15, + 0x16, 0x17, 0x18, 0x1F, 0x21, 0x22, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, + /* Table set A, code table 4, wordlen 1 - 81 entries */ 0x00, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x03, 0x50, 0xD0, 0x70, 0xF0, 0xC4, 0x34, 0x4C, 0xCC, 0x1C, 0x41, 0xC1, 0x31, 0x05, 0x0D, 0x43, 0xC3, 0x13, 0x07, 0x0F, 0x44, 0x14, 0x74, 0xDC, 0x3C, 0x11, 0x1D, 0x33, 0x37, 0x54, 0xD4, 0xF4, 0x5C, 0x7C, 0xFC, 0xD1, 0x71, 0xF1, 0xC5, 0x15, 0x35, 0x4D, 0xCD, 0xDD, 0x3D, 0xD3, 0x73, 0x47, 0xC7, 0x17, 0x77, 0x1F, 0x3F, 0x51, 0x45, 0x55, 0xD5, 0x75, 0xF5, 0x5D, 0x7D, 0xFD, 0x53, 0xF3, - 0x57, 0xD7, 0xF7, 0x4F, 0xCF, 0x5F, 0xDF, 0x7F, 0xFF -}; - -static const uint8_t huff_a42_cb[10] = { 3, 10, 1, 2, 13, 1, 31, 13, 16, 4 }; - -static const uint8_t huff_a42_xlat[81] = { + 0x57, 0xD7, 0xF7, 0x4F, 0xCF, 0x5F, 0xDF, 0x7F, 0xFF, + /* Table set A, code table 4, wordlen 2 - 81 entries */ 0x00, 0x40, 0x01, 0x10, 0x50, 0x04, 0x44, 0x14, 0x54, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55, 0x59, 0x80, 0x90, 0x20, 0x60, 0x84, 0x94, 0x24, 0x64, 0x08, 0x48, 0x18, 0x58, 0x81, 0x91, 0x21, 0x61, 0x85, 0x95, 0x25, 0x65, 0x09, 0x49, 0x19, 0x02, 0x42, 0x12, 0x52, 0x06, 0x46, 0x16, 0x56, 0xA0, 0xA4, 0x68, 0xA1, 0xA5, 0x99, 0x29, 0x69, 0x96, 0x66, 0x4A, 0x1A, 0x5A, 0x88, 0x98, 0x28, 0x89, 0xA9, 0x82, 0x92, 0x22, 0x62, 0x86, 0x26, - 0xA6, 0x0A, 0x9A, 0x2A, 0x6A, 0xA8, 0xA2, 0x8A, 0xAA -}; - -static const uint8_t huff_a43_cb[5] = { 2, 4, 2, 3, 2 }; - -static const uint8_t huff_a43_xlat[7] = { 0, 7, 1, 2, 6, 3, 5 }; - -static const uint8_t huff_a44_cb[9] = { 4, 10, 5, 4, 12, 17, 47, 24, 12 }; - -static const uint8_t huff_a44_xlat[121] = { + 0xA6, 0x0A, 0x9A, 0x2A, 0x6A, 0xA8, 0xA2, 0x8A, 0xAA, + /* Table set A, code table 4, wordlen 3 - 7 entries */ + 0x00, 0x07, 0x01, 0x02, 0x06, 0x03, 0x05, + /* Table set A, code table 4, wordlen 4 - 121 entries */ 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x21, 0xE1, 0x02, 0x12, 0xF2, 0x0E, 0x1E, 0xFE, 0x2F, 0xEF, 0x30, 0x50, 0xD0, 0xD1, 0x22, 0xE2, 0x03, 0x13, 0xF3, 0x0D, 0x1D, 0x2D, 0xFD, 0x2E, 0xEE, @@ -849,16 +968,10 @@ static const uint8_t huff_a44_xlat[121] = { 0xCF, 0x42, 0x52, 0x33, 0x53, 0xC3, 0x24, 0xB4, 0xD4, 0x25, 0x35, 0xC5, 0x4B, 0xCB, 0xDB, 0x3C, 0x4C, 0x5C, 0xDC, 0xEC, 0x4D, 0xBD, 0xCD, 0xDD, 0xCE, 0x43, 0x34, 0x44, 0x54, 0xC4, 0x45, 0x55, 0xB5, 0x5B, 0xBB, 0xBC, - 0xCC -}; - -static const uint8_t huff_a45_cb[5] = { 2, 4, 2, 2, 4 }; - -static const uint8_t huff_a45_xlat[8] = { 1, 2, 0, 3, 4, 5, 6, 7 }; - -static const uint8_t huff_a46_cb[7] = { 5, 9, 1, 16, 31, 36, 172 }; - -static const uint8_t huff_a46_xlat[256] = { + 0xCC, + /* Table set A, code table 4, wordlen 5 - 8 entries */ + 0x01, 0x02, 0x00, 0x03, 0x04, 0x05, 0x06, 0x07, + /* Table set A, code table 4, wordlen 6 - 256 entries */ 0x02, 0x00, 0x30, 0x21, 0x31, 0x41, 0x61, 0x12, 0x22, 0x42, 0x62, 0x43, 0x53, 0x24, 0x45, 0x26, 0x27, 0x10, 0x40, 0xB0, 0x01, 0x11, 0x81, 0x32, 0x52, 0x72, 0x92, 0x03, 0x13, 0x33, 0x63, 0x14, 0x34, 0x54, 0x64, 0x74, @@ -880,45 +993,29 @@ static const uint8_t huff_a46_xlat[256] = { 0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD, 0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E, 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE, 0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F, 0x8F, 0x9F, 0xAF, 0xBF, - 0xCF, 0xDF, 0xEF, 0xFF -}; - -static const uint8_t huff_a47_cb[8] = { 4, 9, 5, 12, 9, 12, 15, 10 }; - -static const uint8_t huff_a47_xlat[63] = { - 0, 1, 2, 62, 63, 3, 4, 5, 6, 8, 54, 56, 57, 58, 59, 60, - 61, 7, 9, 10, 11, 12, 13, 14, 53, 55, 15, 16, 17, 18, 19, 20, - 21, 36, 37, 39, 42, 52, 22, 25, 28, 35, 38, 40, 41, 43, 45, 46, - 47, 48, 49, 50, 51, 23, 24, 26, 27, 29, 30, 31, 33, 34, 44 -}; - -static const uint8_t huff_a51_cb[12] = { - 2, 11, 1, 0, 6, 2, 6, 18, 4, 26, 6, 12 -}; - -static const uint8_t huff_a51_xlat[81] = { + 0xCF, 0xDF, 0xEF, 0xFF, + /* Table set A, code table 4, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x02, 0x3E, 0x3F, 0x03, 0x04, 0x05, 0x06, 0x08, 0x36, 0x38, + 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x07, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, + 0x35, 0x37, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x24, 0x25, 0x27, + 0x2A, 0x34, 0x16, 0x19, 0x1C, 0x23, 0x26, 0x28, 0x29, 0x2B, 0x2D, 0x2E, + 0x2F, 0x30, 0x31, 0x32, 0x33, 0x17, 0x18, 0x1A, 0x1B, 0x1D, 0x1E, 0x1F, + 0x21, 0x22, 0x2C, + /* Table set A, code table 5, wordlen 1 - 81 entries */ 0x00, 0x40, 0xC0, 0x30, 0x04, 0x01, 0x03, 0x10, 0x0C, 0xD0, 0x70, 0x34, 0x1C, 0x0D, 0x07, 0x50, 0xF0, 0x44, 0xC4, 0x14, 0x4C, 0xCC, 0x3C, 0x41, 0xC1, 0x11, 0x31, 0x05, 0x43, 0xC3, 0x13, 0x33, 0x0F, 0x74, 0xDC, 0x1D, 0x37, 0x54, 0xD4, 0xF4, 0x5C, 0x7C, 0xFC, 0xD1, 0x71, 0xF1, 0xC5, 0x15, - 0x35, 0x4D, 0xCD, 0xDD, 0x3D, 0x53, 0xD3, 0x73, 0x47, 0xC7, 0x17, 0x77, - 0x4F, 0x1F, 0x3F, 0x51, 0x45, 0x55, 0xF3, 0xCF, 0xFF, 0xD5, 0x75, 0xF5, - 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F -}; - -static const uint8_t huff_a52_cb[12] = { 1, 10, 1, 0, 2, 2, 0, 4, 3, 8, 3, 2 }; - -static const uint8_t huff_a52_xlat[25] = { - 0x00, 0x08, 0x38, 0x01, 0x07, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x02, 0x06, - 0x30, 0x11, 0x31, 0x0A, 0x3A, 0x0E, 0x17, 0x37, 0x32, 0x16, 0x3E, 0x12, - 0x36 -}; - -static const uint8_t huff_a53_xlat[7] = { 0, 1, 2, 6, 7, 3, 5 }; - -static const uint8_t huff_a54_cb[8] = { 4, 9, 4, 7, 12, 19, 21, 58 }; - -static const uint8_t huff_a54_xlat[121] = { + 0x35, 0x4D, 0xCD, 0xDD, 0x3D, 0x53, 0xD3, 0x73, 0x47, 0xC7, 0x17, 0x77, + 0x4F, 0x1F, 0x3F, 0x51, 0x45, 0x55, 0xF3, 0xCF, 0xFF, 0xD5, 0x75, 0xF5, + 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F, + /* Table set A, code table 5, wordlen 2 - 25 entries */ + 0x00, 0x08, 0x38, 0x01, 0x07, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x02, 0x06, + 0x30, 0x11, 0x31, 0x0A, 0x3A, 0x0E, 0x17, 0x37, 0x32, 0x16, 0x3E, 0x12, + 0x36, + /* Table set A, code table 5, wordlen 3 - 7 entries */ + 0x00, 0x01, 0x02, 0x06, 0x07, 0x03, 0x05, + /* Table set A, code table 5, wordlen 4 - 121 entries */ 0x00, 0x01, 0x0F, 0x1F, 0x10, 0xE0, 0xF0, 0x11, 0xF1, 0x2F, 0xFF, 0x20, 0x21, 0xE1, 0x02, 0x12, 0xF2, 0x03, 0xF3, 0x0E, 0x2E, 0xFE, 0x3F, 0x30, 0x40, 0xD0, 0xC1, 0xD1, 0x22, 0xC2, 0x33, 0xE3, 0x0C, 0xCC, 0x0D, 0x1D, @@ -929,58 +1026,33 @@ static const uint8_t huff_a54_xlat[121] = { 0xE4, 0xF4, 0x05, 0x15, 0x25, 0x35, 0x55, 0xB5, 0xC5, 0xD5, 0xE5, 0x0B, 0x1B, 0x2B, 0x3B, 0xBB, 0xCB, 0xDB, 0xEB, 0x2C, 0x3C, 0x4C, 0x5C, 0xBC, 0xDC, 0xEC, 0xFC, 0x4D, 0x5D, 0xCD, 0xED, 0x4E, 0xBE, 0xCE, 0xDE, 0x4F, - 0x5F -}; - -static const uint8_t huff_a55_cb[8] = { 1, 6, 1, 1, 1, 0, 3, 2 }; - -static const uint8_t huff_a55_xlat[8] = { 0, 1, 2, 3, 6, 7, 4, 5 }; - -static const uint8_t huff_a56_cb[7] = { 3, 7, 1, 8, 6, 8, 8 }; - -static const uint8_t huff_a56_xlat[31] = { - 4, 0, 1, 2, 3, 28, 29, 30, 31, 5, 6, 7, 24, 25, 27, 8, - 9, 14, 19, 21, 22, 23, 26, 10, 11, 12, 13, 15, 17, 18, 20 -}; - -static const uint8_t huff_a57_cb[9] = { 3, 9, 1, 5, 7, 8, 16, 22, 4 }; - -static const uint8_t huff_a57_xlat[63] = { - 0, 1, 2, 61, 62, 63, 3, 4, 5, 6, 58, 59, - 60, 7, 8, 9, 10, 54, 55, 56, 57, 11, 12, 13, - 14, 15, 26, 27, 28, 36, 37, 38, 49, 50, 51, 52, - 53, 16, 17, 18, 19, 20, 21, 23, 24, 25, 29, 30, - 31, 33, 34, 35, 39, 43, 44, 45, 46, 47, 48, 22, - 40, 41, 42 -}; - -static const uint8_t huff_a61_cb[12] = { - 2, 11, 1, 0, 8, 0, 1, 16, 10, 29, 12, 4 -}; - -static const uint8_t huff_a61_xlat[81] = { + 0x5F, + /* Table set A, code table 5, wordlen 5 - 8 entries */ + 0x00, 0x01, 0x02, 0x03, 0x06, 0x07, 0x04, 0x05, + /* Table set A, code table 5, wordlen 6 - 31 entries */ + 0x04, 0x00, 0x01, 0x02, 0x03, 0x1C, 0x1D, 0x1E, 0x1F, 0x05, 0x06, 0x07, + 0x18, 0x19, 0x1B, 0x08, 0x09, 0x0E, 0x13, 0x15, 0x16, 0x17, 0x1A, 0x0A, + 0x0B, 0x0C, 0x0D, 0x0F, 0x11, 0x12, 0x14, + /* Table set A, code table 5, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x02, 0x3D, 0x3E, 0x3F, 0x03, 0x04, 0x05, 0x06, 0x3A, 0x3B, + 0x3C, 0x07, 0x08, 0x09, 0x0A, 0x36, 0x37, 0x38, 0x39, 0x0B, 0x0C, 0x0D, + 0x0E, 0x0F, 0x1A, 0x1B, 0x1C, 0x24, 0x25, 0x26, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x17, 0x18, 0x19, 0x1D, 0x1E, + 0x1F, 0x21, 0x22, 0x23, 0x27, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x16, + 0x28, 0x29, 0x2A, + /* Table set A, code table 6, wordlen 1 - 81 entries */ 0x00, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x03, 0x70, 0x50, 0xD0, 0xF0, 0x44, 0xC4, 0x14, 0x34, 0x4C, 0x1C, 0x3C, 0x31, 0x05, 0x0D, 0x13, 0x07, 0x0F, 0x74, 0xCC, 0xDC, 0xFC, 0x41, 0xC1, 0x11, 0x43, 0xC3, 0x33, 0x54, 0xD4, 0xF4, 0x5C, 0x7C, 0x51, 0xD1, 0x71, 0xF1, 0x45, 0xC5, 0x15, 0x35, 0x4D, 0xCD, 0x1D, 0x3D, 0x53, 0xD3, 0x73, 0xF3, 0x47, 0xC7, 0x17, 0x37, 0x4F, 0xCF, 0x1F, 0x3F, 0x55, 0xD5, 0x75, 0xF5, 0x5D, 0xDD, 0xFD, - 0x57, 0xD7, 0x77, 0xF7, 0xFF, 0x7D, 0x5F, 0xDF, 0x7F -}; - -static const uint8_t huff_a62_cb[8] = { 3, 8, 5, 2, 2, 9, 5, 2 }; - -static const uint8_t huff_a62_xlat[25] = { + 0x57, 0xD7, 0x77, 0xF7, 0xFF, 0x7D, 0x5F, 0xDF, 0x7F, + /* Table set A, code table 6, wordlen 2 - 25 entries */ 0x00, 0x08, 0x38, 0x01, 0x07, 0x39, 0x0F, 0x09, 0x3F, 0x10, 0x30, 0x31, 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x37, 0x11, 0x0A, 0x32, 0x16, 0x3E, 0x12, - 0x36 -}; - -static const uint8_t huff_a63_cb[11] = { - 3, 11, 1, 1, 10, 4, 16, 29, 46, 75, 74 -}; - -static const uint8_t huff_a63_xlat[256] = { + 0x36, + /* Table set A, code table 6, wordlen 3 - 256 entries */ 0x00, 0x40, 0x10, 0x50, 0x04, 0x44, 0x14, 0x01, 0x41, 0x05, 0x45, 0x55, 0x54, 0x11, 0x51, 0x15, 0x80, 0x90, 0x60, 0x24, 0x64, 0xA4, 0x48, 0x61, 0x95, 0x25, 0xA5, 0x02, 0x42, 0x52, 0x16, 0x56, 0x20, 0x84, 0x94, 0x18, @@ -1002,12 +1074,8 @@ static const uint8_t huff_a63_xlat[256] = { 0xBA, 0x8E, 0xCE, 0x1E, 0x5E, 0x9E, 0xAE, 0xEE, 0x3E, 0xC3, 0x93, 0xD3, 0xE3, 0x33, 0x73, 0xF3, 0xC7, 0x67, 0xA7, 0xE7, 0x37, 0xB7, 0xF7, 0xCB, 0xDB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB, 0x0F, 0x4F, 0x8F, 0x5F, 0xDF, 0x6F, - 0xAF, 0xEF, 0x3F, 0xFF -}; - -static const uint8_t huff_a64_cb[8] = { 4, 9, 1, 7, 12, 36, 63, 2 }; - -static const uint8_t huff_a64_xlat[121] = { + 0xAF, 0xEF, 0x3F, 0xFF, + /* Table set A, code table 6, wordlen 4 - 121 entries */ 0x00, 0x10, 0x20, 0xE0, 0xF0, 0x02, 0x0E, 0xEF, 0x30, 0x01, 0x11, 0x21, 0x31, 0xF1, 0x12, 0xF2, 0x1E, 0xEE, 0xDF, 0xFF, 0x40, 0xC0, 0xD0, 0xD1, 0xE1, 0x22, 0x32, 0x42, 0xD2, 0xE2, 0x03, 0x13, 0x23, 0xB3, 0xC3, 0xE3, @@ -1018,62 +1086,38 @@ static const uint8_t huff_a64_xlat[121] = { 0xB5, 0xC5, 0xD5, 0xE5, 0x0B, 0x1B, 0x3B, 0x4B, 0x5B, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0xBC, 0xCC, 0xDC, 0xEC, 0x0D, 0x3D, 0x4D, 0x5D, 0xCD, 0xED, 0x3E, 0x5E, 0xBE, 0xCE, 0x4F, 0xCF, 0x5F, - 0xBF -}; - -static const uint8_t huff_a65_cb[8] = { 2, 7, 3, 0, 1, 3, 4, 4 }; - -static const uint8_t huff_a65_xlat[15] = { - 0, 1, 15, 14, 2, 3, 13, 4, 6, 10, 12, 5, 7, 9, 11 -}; - -static const uint8_t huff_a66_cb[11] = { 2, 10, 1, 2, 2, 6, 8, 6, 3, 1, 2 }; - -static const uint8_t huff_a66_xlat[31] = { - 0, 1, 31, 2, 30, 3, 4, 15, 17, 28, 29, 5, 6, 7, 8, 24, - 25, 26, 27, 9, 10, 11, 21, 22, 23, 12, 19, 20, 13, 14, 18 -}; - -static const uint8_t huff_a67_cb[10] = { 2, 9, 1, 1, 3, 4, 6, 13, 25, 10 }; - -static const uint8_t huff_a67_xlat[63] = { - 0, 1, 2, 62, 63, 3, 4, 60, 61, 5, 6, 7, 57, 58, 59, 8, - 9, 10, 11, 12, 13, 26, 38, 52, 53, 54, 55, 56, 14, 15, 16, 17, - 18, 19, 25, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 39, 45, 46, - 47, 48, 49, 50, 51, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44 -}; - -static const uint8_t huff_a71_cb[5] = { 1, 3, 1, 1, 2 }; - -static const uint8_t huff_a72_cb[12] = { - 2, 11, 1, 0, 4, 8, 3, 8, 24, 17, 12, 4 -}; - -static const uint8_t huff_a72_xlat[81] = { + 0xBF, + /* Table set A, code table 6, wordlen 5 - 15 entries */ + 0x00, 0x01, 0x0F, 0x0E, 0x02, 0x03, 0x0D, 0x04, 0x06, 0x0A, 0x0C, 0x05, + 0x07, 0x09, 0x0B, + /* Table set A, code table 6, wordlen 6 - 31 entries */ + 0x00, 0x01, 0x1F, 0x02, 0x1E, 0x03, 0x04, 0x0F, 0x11, 0x1C, 0x1D, 0x05, + 0x06, 0x07, 0x08, 0x18, 0x19, 0x1A, 0x1B, 0x09, 0x0A, 0x0B, 0x15, 0x16, + 0x17, 0x0C, 0x13, 0x14, 0x0D, 0x0E, 0x12, + /* Table set A, code table 6, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x02, 0x3E, 0x3F, 0x03, 0x04, 0x3C, 0x3D, 0x05, 0x06, 0x07, + 0x39, 0x3A, 0x3B, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x1A, 0x26, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x19, 0x1B, + 0x1C, 0x1D, 0x1E, 0x1F, 0x21, 0x22, 0x23, 0x24, 0x25, 0x27, 0x2D, 0x2E, + 0x2F, 0x30, 0x31, 0x32, 0x33, 0x14, 0x15, 0x16, 0x17, 0x18, 0x28, 0x29, + 0x2A, 0x2B, 0x2C, + /* Table set A, code table 7, wordlen 1 - 4 entries */ + 0x00, 0x01, 0x02, 0x03, + /* Table set A, code table 7, wordlen 2 - 81 entries */ 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x05, 0x15, 0x51, 0x45, 0x55, 0x80, 0x90, 0x20, 0x64, 0x08, 0x19, 0x02, 0x06, 0x60, 0x84, 0x94, 0x24, 0x48, 0x18, 0x58, 0x81, 0x91, 0x21, 0x61, 0x85, 0x95, 0x25, 0x65, 0x09, 0x49, 0x59, 0x42, 0x12, 0x52, 0x46, 0x16, 0x56, 0xA0, 0xA4, 0x98, 0x28, 0x68, 0xA1, 0xA5, 0x99, 0x29, 0x69, 0x96, 0x26, 0x66, 0x0A, 0x4A, 0x1A, 0x5A, 0x88, 0xA8, 0x89, 0xA9, 0x82, 0x92, 0x22, - 0x62, 0x86, 0xA6, 0x2A, 0x6A, 0xA2, 0x8A, 0x9A, 0xAA -}; - -static const uint8_t huff_a73_cb[11] = { 2, 10, 1, 1, 5, 2, 8, 7, 13, 8, 4 }; - -static const uint8_t huff_a73_xlat[49] = { + 0x62, 0x86, 0xA6, 0x2A, 0x6A, 0xA2, 0x8A, 0x9A, 0xAA, + /* Table set A, code table 7, wordlen 3 - 49 entries */ 0x00, 0x08, 0x38, 0x01, 0x39, 0x07, 0x0F, 0x09, 0x3F, 0x10, 0x30, 0x31, 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x11, 0x0A, 0x32, 0x0D, 0x16, 0x3E, 0x37, 0x18, 0x28, 0x19, 0x29, 0x12, 0x2A, 0x03, 0x3B, 0x05, 0x15, 0x1E, 0x1F, 0x2F, 0x1A, 0x0B, 0x2B, 0x33, 0x35, 0x3D, 0x2E, 0x36, 0x13, 0x1B, 0x1D, - 0x2D -}; - -static const uint8_t huff_a74_cb[14] = { - 1, 12, 1, 0, 0, 4, 0, 4, 5, 9, 30, 45, 21, 2 -}; - -static const uint8_t huff_a74_xlat[121] = { + 0x2D, + /* Table set A, code table 7, wordlen 4 - 121 entries */ 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x02, 0xF2, 0x0E, 0x21, 0xE1, 0x12, 0xE2, 0x1E, 0x2E, 0xFE, 0x2F, 0xEF, 0x30, 0x50, 0xB0, 0xC0, 0xD0, 0x31, 0xB1, 0xD1, 0x22, 0xD2, 0x03, 0x13, 0xE3, @@ -1084,20 +1128,11 @@ static const uint8_t huff_a74_xlat[121] = { 0xEC, 0xFC, 0x3D, 0x5D, 0xDD, 0xED, 0x4E, 0x5E, 0xBE, 0xCE, 0xDE, 0x4F, 0xBF, 0xCF, 0x43, 0x53, 0x34, 0x54, 0xB4, 0xC4, 0x35, 0x45, 0x55, 0xB5, 0x4B, 0x5B, 0xCB, 0xDB, 0x4C, 0xBC, 0xCC, 0xDC, 0x4D, 0xBD, 0xCD, 0x44, - 0xBB -}; - -static const uint8_t huff_a75_cb[7] = { 2, 6, 1, 3, 3, 4, 4 }; - -static const uint8_t huff_a75_xlat[15] = { - 0, 1, 14, 15, 2, 3, 13, 4, 6, 10, 12, 5, 7, 9, 11 -}; - -static const uint8_t huff_a76_cb[12] = { - 3, 12, 1, 3, 4, 8, 10, 36, 60, 78, 48, 8 -}; - -static const uint8_t huff_a76_xlat[256] = { + 0xBB, + /* Table set A, code table 7, wordlen 5 - 15 entries */ + 0x00, 0x01, 0x0E, 0x0F, 0x02, 0x03, 0x0D, 0x04, 0x06, 0x0A, 0x0C, 0x05, + 0x07, 0x09, 0x0B, + /* Table set A, code table 7, wordlen 6 - 256 entries */ 0x00, 0x10, 0x01, 0x11, 0x20, 0x21, 0x02, 0x12, 0x30, 0x31, 0x41, 0x22, 0x03, 0x13, 0x23, 0x14, 0x40, 0x51, 0x61, 0x32, 0x42, 0x33, 0x04, 0x24, 0x15, 0x16, 0x50, 0x60, 0xD0, 0x71, 0x81, 0xD1, 0xE1, 0xF1, 0x52, 0x62, @@ -1119,52 +1154,30 @@ static const uint8_t huff_a76_xlat[256] = { 0xC9, 0x6A, 0x7A, 0x8A, 0x9A, 0xAA, 0xCA, 0xFA, 0x5B, 0x6B, 0x7B, 0x8B, 0xCB, 0xEB, 0xFB, 0x7C, 0x8C, 0x9C, 0xAC, 0xBC, 0xEC, 0xFC, 0xDD, 0xED, 0xFD, 0xCE, 0xDE, 0xEE, 0xFE, 0xBF, 0xCF, 0xDF, 0xB7, 0xBA, 0x9B, 0xAB, - 0xBB, 0xCC, 0xEF, 0xFF -}; - -static const uint8_t huff_b01_cb[14] = { - 1, 12, 1, 0, 0, 2, 6, 0, 11, 13, 12, 24, 4, 8 -}; - -static const uint8_t huff_b01_xlat[81] = { + 0xBB, 0xCC, 0xEF, 0xFF, + /* Table set B, code table 0, wordlen 1 - 81 entries */ 0x00, 0x01, 0x03, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x50, 0xD0, 0x70, 0xF0, 0x34, 0x1C, 0x05, 0x0D, 0x13, 0x07, 0x0F, 0x44, 0xC4, 0x14, 0x4C, 0xCC, 0x3C, 0x41, 0xC1, 0x11, 0x31, 0x43, 0xC3, 0x33, 0x54, 0x74, 0xDC, 0xFC, 0x71, 0x15, 0x4D, 0x1D, 0xD3, 0xC7, 0x37, 0x3F, 0xD4, 0xF4, 0x5C, 0x7C, 0x51, 0xD1, 0xF1, 0x45, 0xC5, 0x55, 0x35, 0xCD, 0xDD, 0x3D, 0x53, 0x73, 0xF3, 0x47, 0x17, 0x77, 0x4F, 0xCF, 0x1F, 0xFF, 0xF5, 0x7D, 0xD7, - 0x5F, 0xD5, 0x75, 0x5D, 0xFD, 0x57, 0xF7, 0xDF, 0x7F -}; - -static const uint8_t huff_b02_cb[14] = { - 1, 12, 1, 0, 0, 4, 0, 8, 4, 9, 19, 13, 13, 10 -}; - -static const uint8_t huff_b02_xlat[81] = { + 0x5F, 0xD5, 0x75, 0x5D, 0xFD, 0x57, 0xF7, 0xDF, 0x7F, + /* Table set B, code table 0, wordlen 2 - 81 entries */ 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x05, 0x15, 0x80, 0x51, 0x45, 0x55, 0x90, 0x20, 0x60, 0x24, 0x08, 0x18, 0x09, 0x02, 0x06, 0x84, 0x94, 0x64, 0x48, 0x58, 0x81, 0x91, 0x21, 0x61, 0x95, 0x25, 0x65, 0x19, 0x59, 0x42, 0x12, 0x46, 0x16, 0x56, 0xA0, 0xA4, 0x28, 0x68, 0x85, 0xA5, 0x49, 0x29, 0x69, 0x52, 0x0A, 0x1A, 0x5A, 0x88, 0x98, 0xA1, 0x89, 0x99, 0xA9, 0x22, 0x62, 0x96, 0x26, 0x66, 0x4A, 0x6A, 0xA8, - 0x82, 0x92, 0xA2, 0x86, 0xA6, 0x8A, 0x9A, 0x2A, 0xAA -}; - -static const uint8_t huff_b03_cb[11] = { 1, 9, 1, 0, 0, 4, 0, 5, 12, 13, 14 }; - -static const uint8_t huff_b03_xlat[49] = { + 0x82, 0x92, 0xA2, 0x86, 0xA6, 0x8A, 0x9A, 0x2A, 0xAA, + /* Table set B, code table 0, wordlen 3 - 49 entries */ 0x00, 0x08, 0x38, 0x01, 0x07, 0x30, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x18, 0x28, 0x31, 0x02, 0x3A, 0x03, 0x05, 0x06, 0x0E, 0x17, 0x37, 0x11, 0x19, 0x29, 0x0A, 0x32, 0x0B, 0x3B, 0x0D, 0x15, 0x3D, 0x3E, 0x1F, 0x2F, 0x12, 0x1A, 0x2A, 0x13, 0x1B, 0x2B, 0x33, 0x1D, 0x2D, 0x35, 0x16, 0x1E, 0x2E, - 0x36 -}; - -static const uint8_t huff_b04_cb[12] = { - 2, 11, 1, 0, 4, 4, 5, 9, 30, 45, 21, 2 -}; - -static const uint8_t huff_b04_xlat[121] = { + 0x36, + /* Table set B, code table 0, wordlen 4 - 121 entries */ 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x02, 0xF2, 0x0E, 0x21, 0xE1, 0x12, 0xE2, 0x1E, 0x2E, 0xFE, 0x2F, 0xEF, 0x30, 0x50, 0xB0, 0xC0, 0xD0, 0x31, 0xB1, 0xD1, 0x22, 0xD2, 0x03, 0x13, 0xE3, @@ -1175,14 +1188,8 @@ static const uint8_t huff_b04_xlat[121] = { 0xEC, 0xFC, 0x3D, 0x5D, 0xDD, 0xED, 0x4E, 0x5E, 0xBE, 0xCE, 0xDE, 0x4F, 0xBF, 0xCF, 0x43, 0x53, 0x34, 0x54, 0xB4, 0xC4, 0x35, 0x45, 0x55, 0xB5, 0x4B, 0x5B, 0xCB, 0xDB, 0x4C, 0xBC, 0xCC, 0xDC, 0x4D, 0xBD, 0xCD, 0x44, - 0xBB -}; - -static const uint8_t huff_b05_cb[11] = { - 3, 11, 1, 4, 4, 4, 12, 30, 73, 75, 22 -}; - -static const uint8_t huff_b05_xlat[225] = { + 0xBB, + /* Table set B, code table 0, wordlen 5 - 225 entries */ 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x02, 0x0E, 0x30, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x03, 0x0D, 0x1E, 0xFE, 0x2F, 0xEF, 0x40, 0x60, 0x70, 0x90, 0xA0, 0xC0, 0x31, 0xD1, 0x22, 0x32, 0xD2, @@ -1201,35 +1208,23 @@ static const uint8_t huff_b05_xlat[225] = { 0x3B, 0x6B, 0x7B, 0x9B, 0xAB, 0xDB, 0xEB, 0x3C, 0x4C, 0x6C, 0x7C, 0x9C, 0xAC, 0xCC, 0xDC, 0x4D, 0x5D, 0x6D, 0xAD, 0xBD, 0xCD, 0x5E, 0xBE, 0x54, 0x45, 0x55, 0xB5, 0xC5, 0x76, 0x96, 0x67, 0x77, 0x97, 0xA7, 0x79, 0x99, - 0xA9, 0x7A, 0x9A, 0x4B, 0x5B, 0xBB, 0xCB, 0x5C, 0xBC -}; - -static const uint8_t huff_b07_cb[9] = { 3, 9, 3, 2, 4, 8, 23, 13, 10 }; - -static const uint8_t huff_b07_xlat[63] = { - 0, 1, 63, 2, 62, 3, 4, 60, 61, 5, 6, 7, 8, 56, 57, 58, - 59, 9, 10, 11, 12, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, - 37, 38, 39, 51, 52, 53, 54, 55, 13, 14, 15, 16, 17, 18, 19, 45, - 46, 47, 48, 49, 50, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44 -}; - -static const uint8_t huff_b12_cb[10] = { 3, 10, 1, 3, 12, 0, 30, 9, 18, 8 }; - -static const uint8_t huff_b12_xlat[81] = { + 0xA9, 0x7A, 0x9A, 0x4B, 0x5B, 0xBB, 0xCB, 0x5C, 0xBC, + /* Table set B, code table 0, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x3F, 0x02, 0x3E, 0x03, 0x04, 0x3C, 0x3D, 0x05, 0x06, 0x07, + 0x08, 0x38, 0x39, 0x3A, 0x3B, 0x09, 0x0A, 0x0B, 0x0C, 0x19, 0x1A, 0x1B, + 0x1C, 0x1D, 0x1E, 0x1F, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x2D, + 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x14, 0x15, 0x16, 0x17, 0x18, 0x28, 0x29, + 0x2A, 0x2B, 0x2C, + /* Table set B, code table 1, wordlen 2 - 81 entries */ 0x00, 0x40, 0x04, 0x01, 0x10, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55, 0x80, 0x90, 0x20, 0x60, 0x84, 0x94, 0x24, 0x64, 0x08, 0x48, 0x18, 0x81, 0x91, 0x61, 0x85, 0x95, 0x25, 0x65, 0x09, 0x49, 0x19, 0x59, 0x02, 0x42, 0x12, 0x52, 0x06, 0x46, 0x16, 0x56, 0xA4, 0x58, 0x68, 0x21, 0xA5, 0x29, 0x69, 0x1A, 0x5A, 0xA0, 0x88, 0x98, 0x28, 0xA1, 0x89, 0x99, 0xA9, 0x92, 0x22, 0x62, 0x86, 0x96, 0x26, 0x66, 0x0A, 0x4A, - 0x6A, 0xA8, 0x82, 0xA2, 0xA6, 0x8A, 0x9A, 0x2A, 0xAA -}; - -static const uint8_t huff_b14_cb[14] = { - 1, 12, 1, 0, 0, 4, 0, 3, 5, 16, 28, 34, 26, 4 -}; - -static const uint8_t huff_b14_xlat[121] = { + 0x6A, 0xA8, 0x82, 0xA2, 0xA6, 0x8A, 0x9A, 0x2A, 0xAA, + /* Table set B, code table 1, wordlen 4 - 121 entries */ 0x00, 0x10, 0xF0, 0x01, 0x0F, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x11, 0x02, 0x0E, 0x30, 0x50, 0xB0, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x03, 0x05, 0x0B, 0x0D, 0x1E, 0xFE, 0x2F, 0xEF, 0x40, 0xC0, 0x31, 0x51, 0xB1, 0xC1, 0xD1, @@ -1240,14 +1235,8 @@ static const uint8_t huff_b14_xlat[121] = { 0xED, 0x3E, 0x4E, 0xBE, 0xDE, 0x4F, 0xCF, 0xC2, 0x33, 0x43, 0xC3, 0xD3, 0x34, 0x44, 0x54, 0xB4, 0xD4, 0x45, 0x55, 0xC5, 0x4B, 0xCB, 0x3C, 0x4C, 0x5C, 0xCC, 0xDC, 0x3D, 0x4D, 0x5D, 0xCD, 0xDD, 0xCE, 0xC4, 0xB5, 0x5B, - 0xBB -}; - -static const uint8_t huff_b16_cb[11] = { - 4, 12, 4, 4, 9, 13, 37, 76, 72, 39, 2 -}; - -static const uint8_t huff_b16_xlat[256] = { + 0xBB, + /* Table set B, code table 1, wordlen 6 - 256 entries */ 0x00, 0x10, 0x01, 0x11, 0x20, 0x21, 0x02, 0x12, 0x30, 0x31, 0x41, 0x22, 0x32, 0x03, 0x13, 0x23, 0x14, 0x40, 0x51, 0x61, 0x42, 0x52, 0x33, 0x43, 0x04, 0x24, 0x34, 0x15, 0x25, 0x16, 0x50, 0x60, 0x70, 0x71, 0x81, 0xD1, @@ -1269,14 +1258,8 @@ static const uint8_t huff_b16_xlat[256] = { 0xA8, 0xB8, 0xC8, 0x99, 0xA9, 0xB9, 0xC9, 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xFA, 0x6B, 0x7B, 0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xFB, 0x9C, 0xAC, 0xBC, 0xCC, 0xEC, 0xFC, 0xDD, 0xED, 0xFD, 0xCE, 0xDE, 0xEE, 0xFE, 0xAF, 0xBF, - 0xCF, 0xDF, 0xEF, 0xFF -}; - -static const uint8_t huff_b26_cb[12] = { - 3, 12, 2, 2, 4, 5, 11, 26, 67, 78, 51, 10 -}; - -static const uint8_t huff_b26_xlat[256] = { + 0xCF, 0xDF, 0xEF, 0xFF, + /* Table set B, code table 2, wordlen 6 - 256 entries */ 0x00, 0x01, 0x10, 0x11, 0x20, 0x21, 0x02, 0x12, 0x30, 0x31, 0x22, 0x03, 0x13, 0x40, 0x41, 0x51, 0x32, 0x42, 0x23, 0x33, 0x04, 0x14, 0x24, 0x15, 0x50, 0x61, 0x71, 0xD1, 0xE1, 0x52, 0x62, 0xD2, 0x43, 0x53, 0xD3, 0x34, @@ -1298,28 +1281,16 @@ static const uint8_t huff_b26_xlat[256] = { 0x5A, 0x6A, 0x7A, 0x9A, 0xCA, 0xFA, 0x4B, 0x5B, 0x6B, 0x7B, 0xCB, 0xFB, 0x7C, 0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xEC, 0xFC, 0xDD, 0xED, 0xFD, 0xDE, 0xEE, 0xFE, 0xBF, 0xCF, 0xDF, 0xEF, 0xB8, 0xB9, 0x8A, 0xAA, 0xBA, 0x8B, - 0x9B, 0xAB, 0xBB, 0xFF -}; - -static const uint8_t huff_b32_cb[12] = { - 2, 11, 1, 0, 4, 6, 7, 10, 22, 11, 16, 4 -}; - -static const uint8_t huff_b32_xlat[81] = { + 0x9B, 0xAB, 0xBB, 0xFF, + /* Table set B, code table 3, wordlen 2 - 81 entries */ 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x41, 0x11, 0x05, 0x80, 0x54, 0x51, 0x45, 0x15, 0x55, 0x02, 0x90, 0x20, 0x60, 0x84, 0x24, 0x08, 0x18, 0x09, 0x12, 0x06, 0xA0, 0x94, 0x64, 0x48, 0x58, 0x81, 0x91, 0x21, 0x61, 0x85, 0x95, 0x25, 0x65, 0x49, 0x19, 0x59, 0x42, 0x52, 0x46, 0x16, 0x56, 0x0A, 0xA4, 0x28, 0x68, 0xA1, 0xA5, 0x29, 0x69, 0x26, 0x4A, 0x1A, 0x5A, 0x88, 0x98, 0xA8, 0x89, 0x99, 0xA9, 0x82, 0x92, 0x22, 0x62, 0x86, - 0x96, 0x66, 0x9A, 0x2A, 0x6A, 0xA2, 0xA6, 0x8A, 0xAA -}; - -static const uint8_t huff_b33_cb[13] = { - 2, 12, 1, 0, 0, 4, 11, 8, 28, 92, 97, 13, 2 -}; - -static const uint8_t huff_b33_xlat[256] = { + 0x96, 0x66, 0x9A, 0x2A, 0x6A, 0xA2, 0xA6, 0x8A, 0xAA, + /* Table set B, code table 3, wordlen 3 - 256 entries */ 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55, 0x20, 0x95, 0x65, 0x49, 0x59, 0x52, 0x46, 0x16, 0x80, 0x90, 0x60, 0x84, 0x94, 0x24, 0x64, 0xA4, 0x08, 0x48, 0x18, 0x58, @@ -1341,14 +1312,8 @@ static const uint8_t huff_b33_xlat[256] = { 0x93, 0xD3, 0x23, 0x63, 0xA3, 0xE3, 0x73, 0xB3, 0xF3, 0x07, 0x47, 0x87, 0xC7, 0x27, 0x37, 0x4B, 0x8B, 0xCB, 0x1B, 0x2B, 0x3B, 0x4F, 0x8F, 0xCF, 0x1F, 0x70, 0xB0, 0xF0, 0x8C, 0xCC, 0x2C, 0x3C, 0xC2, 0x32, 0xC3, 0x0F, - 0x2F, 0x3F, 0x33, 0x0B -}; - -static const uint8_t huff_b35_cb[14] = { - 1, 12, 1, 0, 0, 0, 4, 6, 6, 14, 42, 63, 59, 30 -}; - -static const uint8_t huff_b35_xlat[225] = { + 0x2F, 0x3F, 0x33, 0x0B, + /* Table set B, code table 3, wordlen 5 - 225 entries */ 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x02, 0x0E, 0x1F, 0xFF, 0x20, 0xE0, 0x21, 0xF2, 0xFE, 0xEF, 0x30, 0xD0, 0xE1, 0x12, 0x22, 0xE2, 0x03, 0x0D, 0x1D, 0x1E, 0x2E, 0xEE, 0x2F, 0xDF, 0x40, 0x60, 0x70, 0x90, 0xA0, @@ -1367,107 +1332,62 @@ static const uint8_t huff_b35_xlat[225] = { 0xDB, 0xEB, 0x3C, 0x6C, 0x9C, 0xAC, 0xCC, 0xDC, 0x5D, 0x9D, 0xAD, 0xBD, 0xCD, 0xBE, 0xBF, 0x53, 0x54, 0xB4, 0xC4, 0x45, 0x55, 0xB5, 0xC5, 0xD5, 0x56, 0x67, 0x77, 0x97, 0x49, 0x69, 0x79, 0x99, 0x5A, 0x7A, 0x9A, 0xAA, - 0xBA, 0x4B, 0x5B, 0x7B, 0xBB, 0xCB, 0x4C, 0x5C, 0xBC -}; - -static const uint8_t huff_b37_cb[13] = { - 1, 11, 1, 0, 2, 0, 2, 2, 6, 17, 14, 13, 6 -}; - -static const uint8_t huff_b37_xlat[63] = { - 0, 1, 63, 2, 62, 3, 61, 4, 5, 6, 58, 59, 60, 7, 8, 9, - 10, 25, 26, 27, 28, 29, 34, 35, 37, 38, 39, 55, 56, 57, 11, 13, - 14, 15, 30, 31, 33, 36, 49, 50, 51, 52, 53, 54, 12, 16, 17, 18, - 19, 21, 41, 43, 44, 45, 46, 47, 48, 20, 22, 23, 24, 40, 42 -}; - -static const uint8_t huff_b41_cb[14] = { - 1, 12, 1, 0, 0, 1, 7, 0, 20, 4, 10, 24, 2, 12 -}; - -static const uint8_t huff_b41_xlat[81] = { + 0xBA, 0x4B, 0x5B, 0x7B, 0xBB, 0xCB, 0x4C, 0x5C, 0xBC, + /* Table set B, code table 3, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x3F, 0x02, 0x3E, 0x03, 0x3D, 0x04, 0x05, 0x06, 0x3A, 0x3B, + 0x3C, 0x07, 0x08, 0x09, 0x0A, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x22, 0x23, + 0x25, 0x26, 0x27, 0x37, 0x38, 0x39, 0x0B, 0x0D, 0x0E, 0x0F, 0x1E, 0x1F, + 0x21, 0x24, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x0C, 0x10, 0x11, 0x12, + 0x13, 0x15, 0x29, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x14, 0x16, 0x17, + 0x18, 0x28, 0x2A, + /* Table set B, code table 4, wordlen 1 - 81 entries */ 0x00, 0x01, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x03, 0x50, 0xD0, 0x70, 0xF0, 0xC4, 0x14, 0x34, 0x4C, 0x1C, 0x3C, 0xC1, 0x11, 0x31, 0x05, 0x0D, 0xC3, 0x13, 0x33, 0x07, 0x0F, 0x44, 0xCC, 0x41, 0x43, 0x54, 0x74, 0xDC, 0xFC, 0x71, 0x15, 0x4D, 0x1D, 0x37, 0x3F, 0xD4, 0xF4, 0x5C, 0x7C, 0x51, 0xD1, 0xF1, 0x45, 0xC5, 0x35, 0xCD, 0xDD, 0x3D, 0x53, 0xD3, 0x73, 0xF3, 0x47, 0xC7, 0x17, 0x77, 0x4F, 0xCF, 0x1F, 0x55, 0xFF, 0xD5, 0x75, 0xF5, - 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F -}; - -static const uint8_t huff_b42_cb[11] = { 1, 9, 1, 0, 1, 3, 2, 3, 7, 4, 4 }; - -static const uint8_t huff_b42_xlat[25] = { + 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F, + /* Table set B, code table 4, wordlen 2 - 25 entries */ 0x00, 0x07, 0x08, 0x38, 0x01, 0x39, 0x0F, 0x10, 0x09, 0x3F, 0x30, 0x31, 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x11, 0x0A, 0x3E, 0x37, 0x12, 0x32, 0x16, - 0x36 -}; - -static const uint8_t huff_b43_cb[10] = { 2, 9, 1, 1, 3, 4, 9, 15, 12, 4 }; - -static const uint8_t huff_b43_xlat[49] = { + 0x36, + /* Table set B, code table 4, wordlen 3 - 49 entries */ 0x00, 0x07, 0x08, 0x38, 0x01, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x30, 0x31, 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x37, 0x18, 0x28, 0x11, 0x19, 0x29, 0x0A, 0x03, 0x0B, 0x3B, 0x05, 0x0D, 0x3D, 0x3E, 0x1F, 0x2F, 0x12, 0x1A, 0x2A, 0x32, 0x13, 0x33, 0x15, 0x35, 0x16, 0x1E, 0x2E, 0x36, 0x1B, 0x2B, 0x1D, - 0x2D -}; - -static const uint8_t huff_b47_cb[10] = { 2, 9, 1, 1, 3, 4, 6, 14, 22, 12 }; - -static const uint8_t huff_b47_xlat[63] = { - 0, 1, 2, 62, 63, 3, 4, 60, 61, 5, 6, 7, 57, 58, 59, 8, - 9, 10, 11, 12, 26, 27, 37, 38, 52, 53, 54, 55, 56, 13, 14, 15, - 16, 17, 18, 25, 28, 29, 30, 31, 33, 34, 35, 36, 39, 46, 47, 48, - 49, 50, 51, 19, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44, 45 -}; - -static const uint8_t huff_b52_cb[11] = { 1, 9, 1, 0, 1, 3, 2, 3, 7, 4, 4 }; - -static const uint8_t huff_b52_xlat[25] = { + 0x2D, + /* Table set B, code table 4, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x02, 0x3E, 0x3F, 0x03, 0x04, 0x3C, 0x3D, 0x05, 0x06, 0x07, + 0x39, 0x3A, 0x3B, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x1A, 0x1B, 0x25, 0x26, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x19, + 0x1C, 0x1D, 0x1E, 0x1F, 0x21, 0x22, 0x23, 0x24, 0x27, 0x2E, 0x2F, 0x30, + 0x31, 0x32, 0x33, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x28, 0x29, 0x2A, + 0x2B, 0x2C, 0x2D, + /* Table set B, code table 5, wordlen 2 - 25 entries */ 0x00, 0x01, 0x08, 0x38, 0x07, 0x39, 0x0F, 0x30, 0x09, 0x3F, 0x10, 0x31, 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x11, 0x0A, 0x3E, 0x37, 0x12, 0x32, 0x16, - 0x36 -}; - -static const uint8_t huff_b53_cb[7] = { 1, 5, 1, 1, 1, 0, 4 }; // same as b63!!! - -static const uint8_t huff_b53_xlat[7] = { 0, 7, 1, 2, 3, 5, 6 }; - -static const uint8_t huff_b56_cb[11] = { 1, 9, 1, 0, 2, 0, 2, 4, 11, 9, 2 }; - -static const uint8_t huff_b56_xlat[31] = { - 0, 1, 31, 2, 30, 3, 4, 13, 29, 5, 6, 7, 14, 15, 17, 18, - 19, 26, 27, 28, 8, 9, 12, 20, 21, 22, 23, 24, 25, 10, 11 -}; - -static const uint8_t huff_b62_cb[14] = { - 1, 12, 1, 0, 0, 2, 3, 5, 12, 14, 18, 15, 9, 2 -}; - -static const uint8_t huff_b62_xlat[81] = { + 0x36, + /* Table set B, code table 5, wordlen 3 - 7 entries */ + 0x00, 0x07, 0x01, 0x02, 0x03, 0x05, 0x06, + /* Table set B, code table 5, wordlen 6 - 31 entries */ + 0x00, 0x01, 0x1F, 0x02, 0x1E, 0x03, 0x04, 0x0D, 0x1D, 0x05, 0x06, 0x07, + 0x0E, 0x0F, 0x11, 0x12, 0x13, 0x1A, 0x1B, 0x1C, 0x08, 0x09, 0x0C, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x0A, 0x0B, + /* Table set B, code table 6, wordlen 2 - 81 entries */ 0x00, 0x40, 0x01, 0x10, 0x04, 0x02, 0x80, 0x50, 0x90, 0x05, 0x06, 0x20, 0x60, 0x44, 0x14, 0x54, 0x24, 0x08, 0x18, 0x41, 0x11, 0x15, 0x09, 0xA0, 0x84, 0x94, 0x64, 0xA4, 0x28, 0x51, 0x45, 0x55, 0x19, 0x12, 0x16, 0x0A, 0x1A, 0x48, 0x58, 0x68, 0x81, 0x91, 0x21, 0x61, 0x85, 0x95, 0x25, 0x65, 0x49, 0x59, 0x29, 0x69, 0x42, 0x46, 0x56, 0x88, 0x98, 0xA8, 0xA1, 0xA5, 0x99, 0xA9, 0x52, 0x22, 0x26, 0x66, 0x4A, 0x5A, 0x2A, 0x6A, 0x89, 0x82, - 0x92, 0x62, 0x86, 0x96, 0xA6, 0x8A, 0xAA, 0xA2, 0x9A -}; - -static const uint8_t huff_b63_cb[7] = { 1, 5, 1, 1, 1, 0, 4 }; - -static const uint8_t huff_b63_xlat[7] = { 0, 1, 7, 2, 3, 5, 6 }; - -static const uint8_t huff_b64_cb[7] = { 1, 5, 1, 1, 1, 1, 2 }; - -static const uint8_t huff_b64_xlat[6] = { 1, 0, 2, 5, 3, 4 }; - -static const uint8_t huff_b65_cb[14] = { - 1, 12, 1, 0, 0, 2, 2, 2, 6, 12, 34, 92, 54, 20 -}; - -static const uint8_t huff_b65_xlat[225] = { + 0x92, 0x62, 0x86, 0x96, 0xA6, 0x8A, 0xAA, 0xA2, 0x9A, + /* Table set B, code table 6, wordlen 3 - 7 entries */ + 0x00, 0x01, 0x07, 0x02, 0x03, 0x05, 0x06, + /* Table set B, code table 6, wordlen 4 - 6 entries */ + 0x01, 0x00, 0x02, 0x05, 0x03, 0x04, + /* Table set B, code table 6, wordlen 5 - 225 entries */ 0x00, 0xF0, 0x01, 0x10, 0x0F, 0x11, 0xF1, 0x20, 0xE0, 0x02, 0x0E, 0x1F, 0xFF, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x07, 0x0A, 0x0D, 0x1E, 0xFE, 0x2F, 0xEF, 0x30, 0x70, 0x90, 0xA0, 0xC0, 0x71, 0x91, 0xC1, 0xD1, 0x32, 0x92, @@ -1486,14 +1406,8 @@ static const uint8_t huff_b65_xlat[225] = { 0xAA, 0xBA, 0x2B, 0x4B, 0x7B, 0x9B, 0xAB, 0xDB, 0x3C, 0x4C, 0x7C, 0x9C, 0xAC, 0xBC, 0xCC, 0x3D, 0x5D, 0x7D, 0xBD, 0xCD, 0x5E, 0xBE, 0xDE, 0xBF, 0xCF, 0x53, 0x64, 0xB4, 0xC4, 0x35, 0x55, 0xC5, 0xD5, 0x97, 0xB7, 0xC7, - 0x79, 0x99, 0x5B, 0xBB, 0xCB, 0x5C, 0xDC, 0x7F, 0xAF -}; - -static const uint8_t huff_b66_cb[14] = { - 1, 12, 1, 0, 0, 3, 0, 3, 3, 10, 40, 85, 61, 50 -}; - -static const uint8_t huff_b66_xlat[256] = { + 0x79, 0x99, 0x5B, 0xBB, 0xCB, 0x5C, 0xDC, 0x7F, 0xAF, + /* Table set B, code table 6, wordlen 6 - 256 entries */ 0x00, 0x10, 0x01, 0x11, 0x21, 0x02, 0x12, 0x20, 0x22, 0x13, 0x30, 0x31, 0x41, 0xD1, 0xE1, 0x32, 0x52, 0x03, 0x23, 0x2D, 0x40, 0x50, 0x60, 0x80, 0xD0, 0xE0, 0x51, 0x61, 0xF1, 0x42, 0x62, 0xD2, 0xE2, 0xF2, 0x33, 0x43, @@ -1515,37 +1429,23 @@ static const uint8_t huff_b66_xlat[256] = { 0x47, 0x87, 0xB7, 0xC7, 0x58, 0x68, 0x78, 0xA8, 0xB8, 0xC8, 0x39, 0x69, 0x89, 0xA9, 0xB9, 0xC9, 0xD9, 0x2A, 0x5A, 0x6A, 0x7A, 0x9A, 0xAA, 0x3B, 0x4B, 0x5B, 0x6B, 0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0x6C, 0x9C, 0xDC, 0xFC, - 0xCD, 0xED, 0xAE, 0xDE -}; - -static const uint8_t huff_b67_cb[10] = { 2, 9, 1, 2, 1, 4, 7, 10, 26, 12 }; - -static const uint8_t huff_b67_xlat[63] = { - 0, 1, 63, 62, 2, 3, 60, 61, 4, 5, 6, 7, 57, 58, 59, 8, - 9, 10, 11, 12, 52, 53, 54, 55, 56, 13, 14, 15, 16, 17, 18, 25, - 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 46, 47, 48, - 49, 50, 51, 19, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44, 45 -}; - -static const uint8_t huff_b71_cb[14] = { - 1, 12, 1, 0, 0, 1, 7, 0, 19, 5, 13, 23, 0, 12 -}; - -static const uint8_t huff_b71_xlat[81] = { + 0xCD, 0xED, 0xAE, 0xDE, + /* Table set B, code table 6, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x3F, 0x3E, 0x02, 0x03, 0x3C, 0x3D, 0x04, 0x05, 0x06, 0x07, + 0x39, 0x3A, 0x3B, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1F, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x2E, 0x2F, 0x30, + 0x31, 0x32, 0x33, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x28, 0x29, 0x2A, + 0x2B, 0x2C, 0x2D, + /* Table set B, code table 7, wordlen 1 - 81 entries */ 0x00, 0x03, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x50, 0xD0, 0x70, 0xF0, 0xC4, 0x14, 0x34, 0x4C, 0x1C, 0x3C, 0xC1, 0x11, 0x31, 0x05, 0x0D, 0x13, 0x33, 0x07, 0x0F, 0x44, 0xCC, 0x41, 0x43, 0xC3, 0x54, 0x74, 0xDC, 0xFC, 0xF1, 0xC5, 0x15, 0x1D, 0x53, 0xC7, 0x37, 0x4F, 0x3F, 0xD4, 0xF4, 0x5C, 0x7C, 0x51, 0xD1, 0x71, 0x45, 0x55, 0x35, 0x4D, 0xCD, 0xDD, 0x3D, 0xD3, 0x73, 0xF3, 0x47, 0x17, 0x77, 0xCF, 0x1F, 0xFF, 0xD5, 0x75, 0xF5, - 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F -}; - -static const uint8_t huff_b73_cb[13] = { - 1, 11, 1, 0, 0, 0, 1, 4, 9, 4, 103, 110, 24 -}; - -static const uint8_t huff_b73_xlat[256] = { + 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F, + /* Table set B, code table 7, wordlen 3 - 256 entries */ 0x00, 0x40, 0x10, 0x04, 0x01, 0x05, 0x50, 0x14, 0x54, 0x41, 0x11, 0x51, 0x45, 0x15, 0x55, 0x44, 0x95, 0x6A, 0x03, 0x80, 0xC0, 0x90, 0xD0, 0x94, 0xD4, 0x24, 0x64, 0x58, 0x91, 0xA1, 0x85, 0xD5, 0x25, 0x65, 0xA5, 0xE5, @@ -1567,20 +1467,10 @@ static const uint8_t huff_b73_xlat[256] = { 0x27, 0x37, 0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x2B, 0x3B, 0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x2F, 0x3F, 0xA0, 0xE0, 0x30, 0x34, 0x48, 0xC8, 0x28, 0x38, 0x0C, 0x4C, 0x8C, 0xCC, 0x2C, 0xC1, 0x31, 0x82, 0xC2, 0x12, 0x32, 0x43, - 0x83, 0xC3, 0x23, 0x33 -}; - -static const uint8_t huff_b74_cb[8] = { 1, 6, 1, 0, 2, 2, 2, 4 }; - -static const uint8_t huff_b74_xlat[11] = { - 0, 1, 15, 2, 14, 5, 13, 3, 4, 11, 12 -}; - -static const uint8_t huff_b75_cb[13] = { - 2, 12, 1, 4, 0, 0, 0, 8, 11, 24, 53, 64, 60 -}; - -static const uint8_t huff_b75_xlat[225] = { + 0x83, 0xC3, 0x23, 0x33, + /* Table set B, code table 7, wordlen 4 - 11 entries */ + 0x00, 0x01, 0x0F, 0x02, 0x0E, 0x05, 0x0D, 0x03, 0x04, 0x0B, 0x0C, + /* Table set B, code table 7, wordlen 5 - 225 entries */ 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x20, 0xE0, 0x11, 0xF1, 0x02, 0x0E, 0x1F, 0xFF, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x03, 0x0D, 0x1E, 0xFE, 0x2F, 0xEF, 0x30, 0x40, 0x60, 0x70, 0x90, 0xA0, 0xC0, 0x31, 0xD1, 0x22, 0xE2, 0x13, @@ -1599,18 +1489,92 @@ static const uint8_t huff_b75_xlat[225] = { 0xD5, 0x46, 0x56, 0x66, 0x76, 0x96, 0xA6, 0xB6, 0xC6, 0x57, 0x67, 0x77, 0x97, 0xA7, 0xB7, 0x49, 0x69, 0x79, 0x99, 0xA9, 0x4A, 0x5A, 0x7A, 0x9A, 0xAA, 0xBA, 0xCA, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, 0xBB, 0xCB, 0xDB, 0x3C, - 0x4C, 0x5C, 0xBC, 0xCC, 0xDC, 0x5D, 0xCD, 0xBE, 0xBF -}; - -static const uint8_t huff_b77_cb[12] = { - 2, 11, 1, 0, 4, 6, 10, 12, 7, 15, 4, 4 -}; - -static const uint8_t huff_b77_xlat[63] = { - 0, 1, 2, 62, 63, 3, 4, 5, 59, 60, 61, 6, 7, 8, 9, 10, - 54, 55, 56, 57, 58, 11, 12, 13, 14, 15, 16, 47, 49, 50, 51, 52, - 53, 17, 18, 19, 20, 45, 46, 48, 21, 22, 23, 24, 25, 26, 27, 37, - 38, 39, 40, 41, 42, 43, 44, 28, 29, 30, 35, 31, 33, 34, 36 + 0x4C, 0x5C, 0xBC, 0xCC, 0xDC, 0x5D, 0xCD, 0xBE, 0xBF, + /* Table set B, code table 7, wordlen 7 - 63 entries */ + 0x00, 0x01, 0x02, 0x3E, 0x3F, 0x03, 0x04, 0x05, 0x3B, 0x3C, 0x3D, 0x06, + 0x07, 0x08, 0x09, 0x0A, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x0B, 0x0C, 0x0D, + 0x0E, 0x0F, 0x10, 0x2F, 0x31, 0x32, 0x33, 0x34, 0x35, 0x11, 0x12, 0x13, + 0x14, 0x2D, 0x2E, 0x30, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x25, + 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x1C, 0x1D, 0x1E, 0x23, 0x1F, + 0x21, 0x22, 0x24, + /* Table set B, code table 7, wordlen 7 - 8 entries */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + /* Table set B, code table 7, wordlen 7 - 8 entries */ + 0x00, 0x01, 0x07, 0x02, 0x06, 0x03, 0x04, 0x05, + /* Table set B, code table 7, wordlen 7 - 16 entries */ + 0x07, 0x05, 0x08, 0x06, 0x09, 0x04, 0x0A, 0x0B, 0x00, 0x01, 0x02, 0x03, + 0x0C, 0x0D, 0x0E, 0x0F, + /* Table set B, code table 7, wordlen 7 - 15 entries */ + 0x0F, 0x0E, 0x01, 0x0D, 0x02, 0x03, 0x0C, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0A, 0x0B, + /* Table set B, code table 7, wordlen 7 - 16 entries */ + 0x00, 0x01, 0x0E, 0x0F, 0x02, 0x0D, 0x03, 0x0C, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0A, 0x0B, + /* Table set B, code table 7, wordlen 7 - 16 entries */ + 0x00, 0x01, 0x0F, 0x0E, 0x02, 0x0D, 0x03, 0x0C, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0A, 0x0B, + /* Table set B, code table 7, wordlen 7 - 32 entries */ + 0x00, 0x01, 0x1F, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, + 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + /* Table set B, code table 7, wordlen 7 - 31 entries */ + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + /* Table set B, code table 7, wordlen 7 - 32 entries */ + 0x00, 0x1C, 0x1D, 0x01, 0x02, 0x03, 0x04, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, + 0x1E, 0x1F, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, + /* Table set B, code table 7, wordlen 7 - 31 entries */ + 0x02, 0x03, 0x04, 0x05, 0x06, 0x01, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + /* Table set B, code table 7, wordlen 7 - 32 entries */ + 0x00, 0x01, 0x02, 0x1F, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x1D, 0x1E, + 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + /* Table set B, code table 7, wordlen 7 - 16 entries */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, + 0x0C, 0x0D, 0x0E, 0x0F, + /* Table set B, code table 7, wordlen 7 - 8 entries */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + /* Table set B, code table 7, wordlen 7 - 8 entries */ + 0x00, 0x01, 0x07, 0x02, 0x03, 0x04, 0x05, 0x06, + /* Table set B, code table 7, wordlen 7 - 32 entries */ + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x05, 0x06, + 0x07, 0x12, 0x13, 0x14, 0x15, 0x16, 0x04, 0x17, 0x18, 0x19, 0x1A, 0x1B, + 0x00, 0x01, 0x02, 0x03, 0x1C, 0x1D, 0x1E, 0x1F, + /* Table set B, code table 7, wordlen 7 - 32 entries */ + 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x0E, + 0x0F, 0x10, 0x11, 0x1D, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x1E, 0x04, 0x05, + 0x06, 0x07, 0x08, 0x1F, 0x00, 0x01, 0x02, 0x03, + /* Table set B, code table 7, wordlen 7 - 32 entries */ + 0x00, 0x01, 0x02, 0x1F, 0x03, 0x1D, 0x1E, 0x04, 0x05, 0x06, 0x1B, 0x1C, + 0x07, 0x18, 0x19, 0x1A, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + /* Table set B, code table 7, wordlen 7 - 256 entries */ + 0x00, 0x01, 0xFF, 0x02, 0xFE, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0xFB, + 0xFC, 0xFD, 0x09, 0x0A, 0x0B, 0x0C, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0x0D, + 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, + 0x26, 0xF3, 0xF4, 0xF5, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, + 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, + 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, + 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, + 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0xC2, + 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, + 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, + 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, + 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, + 0x5E, 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, 0x80, 0x81, + 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, + 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, + 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, + 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, + 0xBE, 0xBF, 0xC0, 0xC1, }; /** Tables for spectrum coding. */ @@ -1622,155 +1586,154 @@ typedef struct Atrac3pSpecCodeTab { int redirect; ///< if >= 0: tells which huffman table must be reused const uint8_t *cb; ///< pointer to the codebook descriptor - const uint8_t *xlat; ///< pointer to the translation table or NULL if none } Atrac3pSpecCodeTab; static const Atrac3pSpecCodeTab atrac3p_spectra_tabs[112] = { /* table set = A */ /* code table = 0 */ - { 1, 4, 2, 1, -1, huff_a01_cb, huff_a01_xlat }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_a02_cb, huff_a02_xlat }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_a03_cb, huff_a03_xlat }, // wordlen = 3 - { 1, 1, 3, 0, -1, huff_a04_cb, huff_a04_xlat }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_a05_cb, huff_a05_xlat }, // wordlen = 5 - { 1, 1, 4, 0, -1, huff_a06_cb, huff_a06_xlat }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a07_cb, huff_a07_xlat }, // wordlen = 7 + { 1, 4, 2, 1, -1, huff_a01_cb }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_a02_cb }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_a03_cb }, // wordlen = 3 + { 1, 1, 3, 0, -1, huff_a04_cb }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_a05_cb }, // wordlen = 5 + { 1, 1, 4, 0, -1, huff_a06_cb }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a07_cb }, // wordlen = 7 /* code table = 1 */ - { 4, 4, 2, 1, -1, huff_a11_cb, huff_a11_xlat }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_a12_cb, huff_a12_xlat }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_a13_cb, huff_a13_xlat }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a14_cb, huff_a14_xlat }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_a15_cb, huff_a15_xlat }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_a16_cb, huff_a16_xlat }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a17_cb, huff_a17_xlat }, // wordlen = 7 + { 4, 4, 2, 1, -1, huff_a11_cb }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_a12_cb }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_a13_cb }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a14_cb }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_a15_cb }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_a16_cb }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a17_cb }, // wordlen = 7 /* code table = 2 */ - { 1, 4, 2, 1, -1, huff_a21_cb, huff_a21_xlat }, // wordlen = 1 - { 1, 2, 3, 1, -1, huff_a22_cb, huff_a22_xlat }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_a23_cb, huff_a23_xlat }, // wordlen = 3 - { 1, 1, 3, 0, -1, huff_a24_cb, NULL }, // wordlen = 4 - { 1, 1, 3, 0, -1, huff_a25_cb, huff_a25_xlat }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_a26_cb, huff_a26_xlat }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a27_cb, huff_a27_xlat }, // wordlen = 7 + { 1, 4, 2, 1, -1, huff_a21_cb }, // wordlen = 1 + { 1, 2, 3, 1, -1, huff_a22_cb }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_a23_cb }, // wordlen = 3 + { 1, 1, 3, 0, -1, huff_a24_cb }, // wordlen = 4 + { 1, 1, 3, 0, -1, huff_a25_cb }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_a26_cb }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a27_cb }, // wordlen = 7 /* code table = 3 */ - { 1, 2, 2, 1, -1, huff_a31_cb, huff_a31_xlat }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_a32_cb, huff_a32_xlat }, // wordlen = 2 - { 1, 4, 2, 0, -1, huff_a33_cb, huff_a33_xlat }, // wordlen = 3 - { 1, 1, 3, 0, -1, huff_a34_cb, huff_a34_xlat }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_a35_cb, huff_a35_xlat }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_a36_cb, huff_a36_xlat }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a37_cb, huff_a37_xlat }, // wordlen = 7 + { 1, 2, 2, 1, -1, huff_a31_cb }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_a32_cb }, // wordlen = 2 + { 1, 4, 2, 0, -1, huff_a33_cb }, // wordlen = 3 + { 1, 1, 3, 0, -1, huff_a34_cb }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_a35_cb }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_a36_cb }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a37_cb }, // wordlen = 7 /* code table = 4 */ - { 1, 4, 2, 1, -1, huff_a41_cb, huff_a41_xlat }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_a42_cb, huff_a42_xlat }, // wordlen = 2 - { 1, 1, 3, 1, -1, huff_a43_cb, huff_a43_xlat }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a44_cb, huff_a44_xlat }, // wordlen = 4 - { 1, 1, 3, 0, -1, huff_a45_cb, huff_a45_xlat }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_a46_cb, huff_a46_xlat }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a47_cb, huff_a47_xlat }, // wordlen = 7 + { 1, 4, 2, 1, -1, huff_a41_cb }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_a42_cb }, // wordlen = 2 + { 1, 1, 3, 1, -1, huff_a43_cb }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a44_cb }, // wordlen = 4 + { 1, 1, 3, 0, -1, huff_a45_cb }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_a46_cb }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a47_cb }, // wordlen = 7 /* code table = 5 */ - { 1, 4, 2, 1, -1, huff_a51_cb, huff_a51_xlat }, // wordlen = 1 - { 1, 2, 3, 1, -1, huff_a52_cb, huff_a52_xlat }, // wordlen = 2 - { 1, 1, 3, 1, -1, huff_a43_cb, huff_a53_xlat }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a54_cb, huff_a54_xlat }, // wordlen = 4 - { 1, 1, 3, 0, -1, huff_a55_cb, huff_a55_xlat }, // wordlen = 5 - { 1, 1, 5, 1, -1, huff_a56_cb, huff_a56_xlat }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a57_cb, huff_a57_xlat }, // wordlen = 7 + { 1, 4, 2, 1, -1, huff_a51_cb }, // wordlen = 1 + { 1, 2, 3, 1, -1, huff_a52_cb }, // wordlen = 2 + { 1, 1, 3, 1, -1, huff_a43_cb }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a54_cb }, // wordlen = 4 + { 1, 1, 3, 0, -1, huff_a55_cb }, // wordlen = 5 + { 1, 1, 5, 1, -1, huff_a56_cb }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a57_cb }, // wordlen = 7 /* code table = 6 */ - { 2, 4, 2, 1, -1, huff_a61_cb, huff_a61_xlat }, // wordlen = 1 - { 1, 2, 3, 1, -1, huff_a62_cb, huff_a62_xlat }, // wordlen = 2 - { 1, 4, 2, 0, -1, huff_a63_cb, huff_a63_xlat }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a64_cb, huff_a64_xlat }, // wordlen = 4 - { 1, 1, 4, 1, -1, huff_a65_cb, huff_a65_xlat }, // wordlen = 5 - { 1, 1, 5, 1, -1, huff_a66_cb, huff_a66_xlat }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a67_cb, huff_a67_xlat }, // wordlen = 7 + { 2, 4, 2, 1, -1, huff_a61_cb }, // wordlen = 1 + { 1, 2, 3, 1, -1, huff_a62_cb }, // wordlen = 2 + { 1, 4, 2, 0, -1, huff_a63_cb }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a64_cb }, // wordlen = 4 + { 1, 1, 4, 1, -1, huff_a65_cb }, // wordlen = 5 + { 1, 1, 5, 1, -1, huff_a66_cb }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a67_cb }, // wordlen = 7 /* code table = 7 */ - { 1, 2, 1, 0, -1, huff_a71_cb, NULL }, // wordlen = 1 - { 2, 4, 2, 0, -1, huff_a72_cb, huff_a72_xlat }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_a73_cb, huff_a73_xlat }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a74_cb, huff_a74_xlat }, // wordlen = 4 - { 1, 1, 4, 1, -1, huff_a75_cb, huff_a75_xlat }, // wordlen = 5 - { 2, 2, 4, 0, -1, huff_a76_cb, huff_a76_xlat }, // wordlen = 6 - { 4, 1, 6, 1, 6, NULL, NULL }, // wordlen = 7 + { 1, 2, 1, 0, -1, huff_a71_cb }, // wordlen = 1 + { 2, 4, 2, 0, -1, huff_a72_cb }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_a73_cb }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a74_cb }, // wordlen = 4 + { 1, 1, 4, 1, -1, huff_a75_cb }, // wordlen = 5 + { 2, 2, 4, 0, -1, huff_a76_cb }, // wordlen = 6 + { 4, 1, 6, 1, 6, NULL }, // wordlen = 7 /* table set = B */ /* code table = 0 */ - { 4, 4, 2, 1, -1, huff_b01_cb, huff_b01_xlat }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_b02_cb, huff_b02_xlat }, // wordlen = 2 - { 4, 2, 3, 1, -1, huff_b03_cb, huff_b03_xlat }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_b04_cb, huff_b04_xlat }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_b05_cb, huff_b05_xlat }, // wordlen = 5 - { 1, 1, 4, 0, 5, NULL, NULL }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b07_cb, huff_b07_xlat }, // wordlen = 7 + { 4, 4, 2, 1, -1, huff_b01_cb }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_b02_cb }, // wordlen = 2 + { 4, 2, 3, 1, -1, huff_b03_cb }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_b04_cb }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_b05_cb }, // wordlen = 5 + { 1, 1, 4, 0, 5, NULL }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b07_cb }, // wordlen = 7 /* code table = 1 */ - { 1, 4, 2, 1, 14, NULL, NULL }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_b12_cb, huff_b12_xlat }, // wordlen = 2 - { 1, 2, 3, 1, 9, NULL, NULL }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_b14_cb, huff_b14_xlat }, // wordlen = 4 - { 1, 2, 4, 1, 11, NULL, NULL }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_b16_cb, huff_b16_xlat }, // wordlen = 6 - { 1, 1, 6, 1, 6, NULL, NULL }, // wordlen = 7 + { 1, 4, 2, 1, 14, NULL }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_b12_cb }, // wordlen = 2 + { 1, 2, 3, 1, 9, NULL }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_b14_cb }, // wordlen = 4 + { 1, 2, 4, 1, 11, NULL }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_b16_cb }, // wordlen = 6 + { 1, 1, 6, 1, 6, NULL }, // wordlen = 7 /* code table = 2 */ - { 4, 4, 2, 1, 28, NULL, NULL }, // wordlen = 1 - { 4, 4, 2, 0, 22, NULL, NULL }, // wordlen = 2 - { 1, 2, 3, 1, 2, NULL, NULL }, // wordlen = 3 - { 1, 2, 4, 1, 31, NULL, NULL }, // wordlen = 4 - { 2, 2, 4, 1, 60, NULL, NULL }, // wordlen = 5 - { 2, 2, 4, 0, -1, huff_b26_cb, huff_b26_xlat }, // wordlen = 6 - { 4, 1, 6, 1, 6, NULL, NULL }, // wordlen = 7 + { 4, 4, 2, 1, 28, NULL }, // wordlen = 1 + { 4, 4, 2, 0, 22, NULL }, // wordlen = 2 + { 1, 2, 3, 1, 2, NULL }, // wordlen = 3 + { 1, 2, 4, 1, 31, NULL }, // wordlen = 4 + { 2, 2, 4, 1, 60, NULL }, // wordlen = 5 + { 2, 2, 4, 0, -1, huff_b26_cb }, // wordlen = 6 + { 4, 1, 6, 1, 6, NULL }, // wordlen = 7 /* code table = 3 */ - { 1, 4, 2, 1, 35, NULL, NULL }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_b32_cb, huff_b32_xlat }, // wordlen = 2 - { 1, 4, 2, 0, -1, huff_b33_cb, huff_b33_xlat }, // wordlen = 3 - { 2, 2, 4, 1, 59, NULL, NULL }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_b35_cb, huff_b35_xlat }, // wordlen = 5 - { 1, 2, 4, 0, 75, NULL, NULL }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b37_cb, huff_b37_xlat }, // wordlen = 7 + { 1, 4, 2, 1, 35, NULL }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_b32_cb }, // wordlen = 2 + { 1, 4, 2, 0, -1, huff_b33_cb }, // wordlen = 3 + { 2, 2, 4, 1, 59, NULL }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_b35_cb }, // wordlen = 5 + { 1, 2, 4, 0, 75, NULL }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b37_cb }, // wordlen = 7 /* code table = 4 */ - { 1, 4, 2, 1, -1, huff_b41_cb, huff_b41_xlat }, // wordlen = 1 - { 4, 2, 3, 1, -1, huff_b42_cb, huff_b42_xlat }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_b43_cb, huff_b43_xlat }, // wordlen = 3 - { 4, 2, 4, 1, 66, NULL, NULL }, // wordlen = 4 - { 1, 1, 3, 0, 32, NULL, NULL }, // wordlen = 5 - { 1, 2, 4, 0, 12, NULL, NULL }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b47_cb, huff_b47_xlat }, // wordlen = 7 + { 1, 4, 2, 1, -1, huff_b41_cb }, // wordlen = 1 + { 4, 2, 3, 1, -1, huff_b42_cb }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_b43_cb }, // wordlen = 3 + { 4, 2, 4, 1, 66, NULL }, // wordlen = 4 + { 1, 1, 3, 0, 32, NULL }, // wordlen = 5 + { 1, 2, 4, 0, 12, NULL }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b47_cb }, // wordlen = 7 /* code table = 5 */ - { 2, 4, 2, 1, 42, NULL, NULL }, // wordlen = 1 - { 1, 2, 3, 1, -1, huff_b52_cb, huff_b52_xlat }, // wordlen = 2 - { 4, 1, 3, 1, -1, huff_b53_cb, huff_b53_xlat }, // wordlen = 3 - { 1, 1, 3, 0, 17, NULL, NULL }, // wordlen = 4 - { 1, 1, 3, 0, 39, NULL, NULL }, // wordlen = 5 - { 1, 1, 5, 1, -1, huff_b56_cb, huff_b56_xlat }, // wordlen = 6 - { 2, 1, 6, 1, 62, NULL, NULL }, // wordlen = 7 + { 2, 4, 2, 1, 42, NULL }, // wordlen = 1 + { 1, 2, 3, 1, -1, huff_b52_cb }, // wordlen = 2 + { 4, 1, 3, 1, -1, huff_b53_cb }, // wordlen = 3 + { 1, 1, 3, 0, 17, NULL }, // wordlen = 4 + { 1, 1, 3, 0, 39, NULL }, // wordlen = 5 + { 1, 1, 5, 1, -1, huff_b56_cb }, // wordlen = 6 + { 2, 1, 6, 1, 62, NULL }, // wordlen = 7 /* code table = 6 */ - { 1, 4, 2, 1, 28, NULL, NULL }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_b62_cb, huff_b62_xlat }, // wordlen = 2 - { 1, 1, 3, 1, -1, huff_b63_cb, huff_b63_xlat }, // wordlen = 3 - { 1, 1, 3, 0, -1, huff_b64_cb, huff_b64_xlat }, // wordlen = 4 - { 4, 2, 4, 1, -1, huff_b65_cb, huff_b65_xlat }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_b66_cb, huff_b66_xlat }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b67_cb, huff_b67_xlat }, // wordlen = 7 + { 1, 4, 2, 1, 28, NULL }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_b62_cb }, // wordlen = 2 + { 1, 1, 3, 1, -1, huff_b63_cb }, // wordlen = 3 + { 1, 1, 3, 0, -1, huff_b64_cb }, // wordlen = 4 + { 4, 2, 4, 1, -1, huff_b65_cb }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_b66_cb }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b67_cb }, // wordlen = 7 /* code table = 7 */ - { 1, 4, 2, 1, -1, huff_b71_cb, huff_b71_xlat }, // wordlen = 1 - { 4, 4, 2, 0, 78, NULL, NULL }, // wordlen = 2 - { 4, 4, 2, 0, -1, huff_b73_cb, huff_b73_xlat }, // wordlen = 3 - { 1, 1, 4, 1, -1, huff_b74_cb, huff_b74_xlat }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_b75_cb, huff_b75_xlat }, // wordlen = 5 - { 1, 1, 5, 1, 47, NULL, NULL }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b77_cb, huff_b77_xlat }, // wordlen = 7 + { 1, 4, 2, 1, -1, huff_b71_cb }, // wordlen = 1 + { 4, 4, 2, 0, 78, NULL }, // wordlen = 2 + { 4, 4, 2, 0, -1, huff_b73_cb }, // wordlen = 3 + { 1, 1, 4, 1, -1, huff_b74_cb }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_b75_cb }, // wordlen = 5 + { 1, 1, 5, 1, 47, NULL }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b77_cb }, // wordlen = 7 }; /* Huffman tables for gain control data. */ @@ -1778,113 +1741,112 @@ static const uint8_t atrac3p_huff_gain_npoints1_cb[9] = { 1, 7, 1, 1, 1, 1, 1, 1, 2 }; -static const uint8_t atrac3p_huff_gain_npoints2_xlat[8] = { - 0, 1, 7, 2, 6, 3, 4, 5 -}; - static const uint8_t atrac3p_huff_gain_lev1_cb[9] = { 1, 7, 1, 0, 2, 2, 1, 2, 8 }; -static const uint8_t atrac3p_huff_gain_lev1_xlat[16] = { - 7, 5, 8, 6, 9, 4, 10, 11, 0, 1, 2, 3, 12, 13, 14, 15 -}; - static const uint8_t atrac3p_huff_gain_lev2_cb[11] = { 1, 9, 1, 1, 1, 1, 1, 0, 2, 0, 8 }; -static const uint8_t atrac3p_huff_gain_lev2_xlat[15] = { - 15, 14, 1, 13, 2, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11 -}; - static const uint8_t atrac3p_huff_gain_lev3_cb[11] = { 1, 9, 1, 0, 3, 1, 1, 0, 2, 0, 8 }; -static const uint8_t atrac3p_huff_gain_lev3_xlat[16] = { - 0, 1, 14, 15, 2, 13, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11 -}; - static const uint8_t atrac3p_huff_gain_lev4_cb[11] = { 1, 9, 1, 1, 1, 1, 1, 0, 1, 2, 8 }; -static const uint8_t atrac3p_huff_gain_lev4_xlat[16] = { - 0, 1, 15, 14, 2, 13, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11 -}; - static const uint8_t atrac3p_huff_gain_loc1_cb[9] = { 2, 8, 1, 2, 4, 4, 4, 0, 16 }; -static const uint8_t atrac3p_huff_gain_loc1_xlat[31] = { - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 -}; static const uint8_t atrac3p_huff_gain_loc2_cb[8] = { 3, 8, 5, 3, 2, 3, 2, 16 }; -static const uint8_t atrac3p_huff_gain_loc2_xlat[31] = { - 2, 3, 4, 5, 6, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 -}; static const uint8_t atrac3p_huff_gain_loc3_cb[7] = { 2, 6, 1, 0, 2, 11, 18 }; -static const uint8_t atrac3p_huff_gain_loc3_xlat[32] = { - 0, 1, 31, 2, 3, 4, 5, 6, 7, 26, 27, 28, 29, 30, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 -}; static const uint8_t atrac3p_huff_gain_loc4_cb[5] = { 4, 6, 3, 23, 6 }; -static const uint8_t atrac3p_huff_gain_loc4_xlat[32] = { - 0, 28, 29, 1, 2, 3, 4, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 5, 6, 7, 8, 9, 10 -}; static const uint8_t atrac3p_huff_gain_loc5_cb[9] = { 1, 7, 1, 0, 0, 3, 2, 6, 20 }; -static const uint8_t atrac3p_huff_gain_loc5_xlat[32] = { - 0, 1, 2, 31, 3, 4, 5, 6, 7, 8, 29, 30, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 + +static const uint8_t atrac3p_gain_xlats[] = { + /* Number of gain control points 1 - 8 entries */ + 0, 1, 2, 3, 4, 5, 6, 7, + /* Number of gain control points 2 - 8 entries */ + 0, 1, 7, 2, 6, 3, 4, 5, + /* Gain compensation level 1 - 16 entries */ + 7, 5, 8, 6, 9, 4, 10, 11, 0, 1, 2, 3, 12, 13, 14, 15, + /* Gain compensation level 2 - 15 entries */ + 15, 14, 1, 13, 2, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11, + /* Gain compensation level 3 - 16 entries */ + 0, 1, 14, 15, 2, 13, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11, + /* Gain compensation level 4 - 16 entries */ + 0, 1, 15, 14, 2, 13, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11, + /* Gain compensation location 3 - 32 entries */ + 0, 1, 31, 2, 3, 4, 5, 6, 7, 26, 27, 28, 29, 30, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + /* Gain compensation location 1 - 31 entries */ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + /* Gain compensation location 4 - 32 entries */ + 0, 28, 29, 1, 2, 3, 4, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 30, 31, 5, 6, 7, 8, 9, 10, + /* Gain compensation location 2 - 31 entries */ + 2, 3, 4, 5, 6, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + /* Gain compensation location 5 - 32 entries */ + 0, 1, 2, 31, 3, 4, 5, 6, 7, 8, 29, 30, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, }; /* Huffman tables for GHA waves data. */ static const uint8_t atrac3p_huff_tonebands_cb[8] = { 1, 6, 1, 0, 1, 2, 4, 8 }; static const uint8_t atrac3p_huff_numwavs1_cb[9] = { 1, 7, 1, 1, 1, 1, 1, 1, 2 }; static const uint8_t atrac3p_huff_numwavs2_cb[8] = { 1, 6, 1, 1, 1, 1, 0, 4 }; -static const uint8_t atrac3p_huff_numwavs2_xlat[8] = { 0, 1, 7, 2, 3, 4, 5, 6 }; static const uint8_t atrac3p_huff_wav_ampsf1_cb[7] = { 4, 8, 10, 8, 6, 0, 8 }; -static const uint8_t atrac3p_huff_wav_ampsf1_xlat[32] = { - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 5, 6, 7, 18, 19, 20, - 21, 22, 4, 23, 24, 25, 26, 27, 0, 1, 2, 3, 28, 29, 30, 31 -}; static const uint8_t atrac3p_huff_wav_ampsf2_cb[7] = { 4, 8, 11, 5, 6, 6, 4 }; -static const uint8_t atrac3p_huff_wav_ampsf2_xlat[32] = { - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 14, 15, 16, 17, 29, - 9, 10, 11, 12, 13, 30, 4, 5, 6, 7, 8, 31, 0, 1, 2, 3 -}; static const uint8_t atrac3p_huff_wav_ampsf3_cb[9] = { 2, 8, 1, 3, 3, 1, 4, 4, 16 }; -static const uint8_t atrac3p_huff_wav_ampsf3_xlat[32] = { - 0, 1, 2, 31, 3, 29, 30, 4, 5, 6, 27, 28, 7, 24, 25, 26, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 -}; static const uint8_t atrac3p_huff_freq_cb[13] = { 1, 11, 1, 0, 0, 2, 2, 0, 9, 9, 29, 104, 100 }; -static const uint8_t atrac3p_huff_freq_xlat[256] = { - 0, 1, 255, 2, 254, 3, 4, 5, 6, 7, 8, 251, 252, 253, 9, 10, - 11, 12, 246, 247, 248, 249, 250, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 243, 244, 245, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193 +static const uint8_t atrac3p_tone_xlats[] = { + /* Number of tone bands - 16 entries */ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, + /* Number of tones 1 - 8 entries */ + 0, 1, 2, 3, 4, 5, 6, 7, + /* Number of tones 2 - 8 entries */ + 0, 1, 7, 2, 3, 4, 5, 6, + /* Amplitude information 1 - 32 entries */ + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 5, 6, 7, 18, 19, + 20, 21, 22, 4, 23, 24, 25, 26, 27, 0, 1, 2, 3, 28, 29, + 30, 31, + /* Amplitude information 2 - 32 entries */ + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 14, 15, 16, 17, + 29, 9, 10, 11, 12, 13, 30, 4, 5, 6, 7, 8, 31, 0, 1, + 2, 3, + /* Amplitude information 3 - 32 entries */ + 0, 1, 2, 31, 3, 29, 30, 4, 5, 6, 27, 28, 7, 24, 25, + 26, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, + /* Frequencies - 256 entries */ + 0, 1, 255, 2, 254, 3, 4, 5, 6, 7, 8, 251, 252, 253, 9, + 10, 11, 12, 246, 247, 248, 249, 250, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 243, 244, 245, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, }; #endif /* AVCODEC_ATRAC3PLUS_DATA_H */ From patchwork Tue Nov 10 10:48:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23550 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 5CD2844B48B for ; Tue, 10 Nov 2020 13:06:18 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E913F68BF48; Tue, 10 Nov 2020 12:50:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 184CB68BF05 for ; Tue, 10 Nov 2020 12:50:34 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id 19so989373wmf.1 for ; Tue, 10 Nov 2020 02:50:34 -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=Fa9DQvVr/XNB4uO0hbpQXXpPXRzi7ddbzV2k441n7aA=; b=aaU817IMPVQ8WFYRJW8K1QoyBpzoszwNwS3g6ZSoZPuDOwovB9jwPs5tGQwtPmsZTX JOyiBM/M2+gMQ0JbGeLJKvU65HE4zppah4ydEYHkkwC5KKOQhxgdx91c2vt7u/XOisDz UJ6m8tXmYOq5WZrnzN3MWsQ6Jpyrgs349nI39TwcuJjSiwPusQjFmLYx1iuIIYa6ERcr m6Q4LAMfRCSqNWgqVPxW1mG/NQiSDW3UkkDdJ0WyZY1QKiT+jgr0v0F5k4pWtam1c/HU B9Y58+QHREQoxfjecmGNnKnyACJw/ioSVMRV3klN3D5GOo5sx+7D7zu0a59wyCh2DSrb w98g== 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=Fa9DQvVr/XNB4uO0hbpQXXpPXRzi7ddbzV2k441n7aA=; b=UyEUmpbmVmZertqDOrYaC+q0w3BKG3/ANN/mWVGuXtynV84ol4UF6bKBUDaSk9ldvT ScVHE5L3QEqgNkFxbl4FueBLV8Kuf1gcwlzrBB6j9XuR88sZLfiq4mzxbIN5Cps7MDsU KkuOrhZp/usCb6ghKqa4Yy3Thb4ZJ7JoCiEaJkG5d+vT/vyMRLud+5nyGflRPdgszXos AUql8YnLAo8NrBhwaNZ7/r6lKWvtIsNXWhkcbFhiieX5Mzmiu+3CCxfU8CwJE6yWzypK Bw9+99y9o3nxc0XArUWc5BUBRgCGgyMigzRPshiqRib9qG09g0Yii+I+/Q/aOJrvAwDo guNQ== X-Gm-Message-State: AOAM5337Hdhc42ZNgRJ8ll5zt0foZWsSJFR1fFKIMfi8NN4A/6TKZ4ca mISfz6iwShBjG2TmALoTj3lmDVva6Nc= X-Google-Smtp-Source: ABdhPJxF02CYstawM3oUyFvOgXIj4bls4LyTMeJyW7kZrQqcaKv9IK5+tb0i8VofBkvHYwHYHMqc4g== X-Received: by 2002:a05:600c:4147:: with SMTP id h7mr3857515wmm.146.1605005432377; Tue, 10 Nov 2020 02:50:32 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:31 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:11 +0100 Message-Id: <20201110104851.321029-75-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 074/114] avcodec/atrac3plus: Combine codebooks into one array 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" ATRAC3+ uses VLCs whose code lengths are ascending from left to right in the tree; ergo it is possible (and done) to run-length encode the lengths into so-called codebooks. These codebooks were variable-sized: The first byte contained the minimum length of a code, the second the maximum length; this was followed by max - min bytes containing the actual numbers. The minimal min was 1, the maximal max 12. While one saves a few bytes by only containing the range that is actually used, this is more than offset by the fact that there needs to be a pointer to each of these codebooks. Furthermore, since 5f8de7b74147e2a347481d7bc900ebecba6f340f the content of the Atrac3pSpecCodeTab structure (containing data for spectrum decoding) can be cleanly separated into fields that are only used during initialization and fields used during actual decoding: The pointers to the codebooks and the field indicating whether an earlier codebook should be reused constitute the former category. Therefore the new codebooks are not placed into the Atrac3pSpecCodeTab (which is now unused during init), but in an array of its own. The information whether an earlier codebook should be reused is encoded in the first number of each spectrum codebook: If it is negative, an earlier codebook (given by the number) should be reused. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac3plus.c | 35 +- libavcodec/atrac3plus_data.h | 645 ++++++++++++++--------------------- 2 files changed, 257 insertions(+), 423 deletions(-) diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c index dbecb7c21e..43600f12bc 100644 --- a/libavcodec/atrac3plus.c +++ b/libavcodec/atrac3plus.c @@ -50,19 +50,18 @@ static VLC tone_vlc_tabs[7]; static av_cold void build_canonical_huff(const uint8_t *cb, const uint8_t **xlat, int *tab_offset, VLC *out_vlc) { - int i, b; + int i, max_len; uint8_t bits[256]; int index = 0; - int min_len = *cb++; // get shortest codeword length - int max_len = *cb++; // get longest codeword length - for (b = min_len; b <= max_len; b++) { + for (int b = 1; b <= 12; b++) { for (i = *cb++; i > 0; i--) { av_assert0(index < 256); bits[index] = b; index++; } } + max_len = bits[index - 1]; out_vlc->table = &tables_data[*tab_offset]; out_vlc->table_allocated = 1 << max_len; @@ -101,22 +100,6 @@ av_cold void ff_atrac3p_init_vlcs(void) atrac3p_sf_huff7, atrac3p_sf_huff8 }; - static const uint8_t * const gain_cbs[11] = { - atrac3p_huff_gain_npoints1_cb, atrac3p_huff_gain_npoints1_cb, - atrac3p_huff_gain_lev1_cb, atrac3p_huff_gain_lev2_cb, - atrac3p_huff_gain_lev3_cb, atrac3p_huff_gain_lev4_cb, - atrac3p_huff_gain_loc3_cb, atrac3p_huff_gain_loc1_cb, - atrac3p_huff_gain_loc4_cb, atrac3p_huff_gain_loc2_cb, - atrac3p_huff_gain_loc5_cb - }; - - static const uint8_t * const tone_cbs[7] = { - atrac3p_huff_tonebands_cb, atrac3p_huff_numwavs1_cb, - atrac3p_huff_numwavs2_cb, atrac3p_huff_wav_ampsf1_cb, - atrac3p_huff_wav_ampsf2_cb, atrac3p_huff_wav_ampsf3_cb, - atrac3p_huff_freq_cb - }; - for (int i = 0; i < 4; i++) { wl_vlc_tabs[i].table = &tables_data[tab_offset]; wl_vlc_tabs[i].table_allocated = 1 << wl_nb_bits[i]; @@ -148,22 +131,24 @@ av_cold void ff_atrac3p_init_vlcs(void) /* build huffman tables for spectrum decoding */ xlats = atrac3p_spectra_xlats; for (i = 0; i < 112; i++) { - if (atrac3p_spectra_tabs[i].redirect < 0) - build_canonical_huff(atrac3p_spectra_tabs[i].cb, + if (atrac3p_spectra_cbs[i][0] >= 0) + build_canonical_huff(atrac3p_spectra_cbs[i], &xlats, &tab_offset, &spec_vlc_tabs[i]); else /* Reuse already initialized VLC table */ - spec_vlc_tabs[i] = spec_vlc_tabs[atrac3p_spectra_tabs[i].redirect]; + spec_vlc_tabs[i] = spec_vlc_tabs[-atrac3p_spectra_cbs[i][0]]; } /* build huffman tables for gain data decoding */ xlats = atrac3p_gain_xlats; for (i = 0; i < 11; i++) - build_canonical_huff(gain_cbs[i], &xlats, &tab_offset, &gain_vlc_tabs[i]); + build_canonical_huff(atrac3p_gain_cbs[i], &xlats, + &tab_offset, &gain_vlc_tabs[i]); /* build huffman tables for tone decoding */ xlats = atrac3p_tone_xlats; for (i = 0; i < 7; i++) - build_canonical_huff(tone_cbs[i], &xlats, &tab_offset, &tone_vlc_tabs[i]); + build_canonical_huff(atrac3p_tone_cbs[i], &xlats, + &tab_offset, &tone_vlc_tabs[i]); } /** diff --git a/libavcodec/atrac3plus_data.h b/libavcodec/atrac3plus_data.h index 61f4b0a038..6b9109cb70 100644 --- a/libavcodec/atrac3plus_data.h +++ b/libavcodec/atrac3plus_data.h @@ -413,254 +413,122 @@ static const uint8_t atrac3p_ct_restricted_to_full[2][7][4] = { }; /** Tables for spectrum coding */ -static const uint8_t huff_a01_cb[14] = { - 1, 12, 1, 0, 0, 1, 7, 0, 19, 5, 13, 21, 6, 8 -}; - -static const uint8_t huff_a02_cb[13] = { - 2, 12, 1, 0, 4, 11, 0, 1, 29, 6, 20, 7, 2 -}; - -static const uint8_t huff_a03_cb[9] = { 3, 9, 1, 8, 0, 13, 18, 7, 2 }; - -static const uint8_t huff_a04_cb[4] = { 2, 3, 2, 4 }; - -static const uint8_t huff_a05_cb[12] = { - 3, 12, 1, 3, 5, 8, 12, 23, 72, 68, 31, 2 -}; - -static const uint8_t huff_a06_cb[7] = { - 2, 6, 1, 3, 2, 6, 4 -}; -static const uint8_t huff_a07_cb[11] = { - 2, 10, 1, 2, 2, 2, 6, 14, 21, 13, 2 -}; - -static const uint8_t huff_a11_cb[13] = { - 1, 11, 1, 0, 0, 0, 8, 1, 18, 9, 22, 10, 12 -}; - -static const uint8_t huff_a12_cb[8] = { 5, 10, 16, 11, 32, 19, 1, 2 }; - -static const uint8_t huff_a13_cb[12] = { - 1, 10, 1, 0, 0, 4, 2, 2, 9, 15, 12, 4 -}; - -static const uint8_t huff_a14_cb[12] = { - 2, 11, 1, 0, 4, 3, 5, 16, 28, 34, 26, 4 -}; - -static const uint8_t huff_a15_cb[9] = { 5, 11, 9, 12, 16, 44, 98, 42, 4 }; - -static const uint8_t huff_a16_cb[13] = { - 2, 12, 1, 1, 2, 2, 5, 7, 21, 54, 85, 62, 16 -}; - -static const uint8_t huff_a17_cb[9] = { 3, 9, 3, 2, 5, 7, 17, 23, 6 }; - -static const uint8_t huff_a21_cb[14] = { - 1, 12, 1, 0, 0, 2, 6, 0, 7, 21, 15, 17, 8, 4 -}; - -static const uint8_t huff_a22_cb[10] = { 2, 9, 1, 4, 0, 4, 3, 8, 3, 2 }; - -static const uint8_t huff_a23_cb[9] = { 3, 9, 5, 0, 4, 6, 10, 16, 8 }; - -static const uint8_t huff_a24_cb[5] = { 2, 4, 3, 1, 2 }; - -static const uint8_t huff_a25_cb[5] = { 2, 4, 1, 5, 2 }; - -static const uint8_t huff_a26_cb[10] = { 4, 11, 3, 4, 12, 15, 34, 83, 75, 30 }; - -static const uint8_t huff_a27_cb[7] = { 4, 8, 3, 14, 10, 20, 16 }; - -static const uint8_t huff_a31_cb[8] = { 1, 6, 1, 0, 3, 1, 0, 4 }; - -static const uint8_t huff_a32_cb[13] = { - 1, 11, 1, 0, 0, 2, 2, 6, 12, 18, 19, 15, 6 -}; - -static const uint8_t huff_a33_cb[12] = { - 3, 12, 1, 1, 13, 1, 14, 28, 33, 81, 32, 52 -}; - -static const uint8_t huff_a34_cb[7] = { 1, 5, 1, 1, 1, 1, 2 }; - -static const uint8_t huff_a35_cb[11] = { 2, 10, 1, 0, 2, 3, 6, 19, 9, 75, 110 }; - -static const uint8_t huff_a36_cb[12] = { - 3, 12, 1, 3, 5, 5, 13, 27, 69, 96, 35, 2 -}; - -static const uint8_t huff_a37_cb[7] = { 4, 8, 7, 6, 8, 22, 20 }; - -static const uint8_t huff_a41_cb[14] = { - 1, 12, 1, 0, 0, 6, 2, 0, 0, 0, 19, 9, 24, 20 -}; - -static const uint8_t huff_a42_cb[10] = { 3, 10, 1, 2, 13, 1, 31, 13, 16, 4 }; - -static const uint8_t huff_a43_cb[5] = { 2, 4, 2, 3, 2 }; - -static const uint8_t huff_a44_cb[9] = { 4, 10, 5, 4, 12, 17, 47, 24, 12 }; - -static const uint8_t huff_a45_cb[5] = { 2, 4, 2, 2, 4 }; - -static const uint8_t huff_a46_cb[7] = { 5, 9, 1, 16, 31, 36, 172 }; - -static const uint8_t huff_a47_cb[8] = { 4, 9, 5, 12, 9, 12, 15, 10 }; - -static const uint8_t huff_a51_cb[12] = { - 2, 11, 1, 0, 6, 2, 6, 18, 4, 26, 6, 12 -}; - -static const uint8_t huff_a52_cb[12] = { 1, 10, 1, 0, 2, 2, 0, 4, 3, 8, 3, 2 }; - -static const uint8_t huff_a54_cb[8] = { 4, 9, 4, 7, 12, 19, 21, 58 }; - -static const uint8_t huff_a55_cb[8] = { 1, 6, 1, 1, 1, 0, 3, 2 }; - -static const uint8_t huff_a56_cb[7] = { 3, 7, 1, 8, 6, 8, 8 }; - -static const uint8_t huff_a57_cb[9] = { 3, 9, 1, 5, 7, 8, 16, 22, 4 }; - -static const uint8_t huff_a61_cb[12] = { - 2, 11, 1, 0, 8, 0, 1, 16, 10, 29, 12, 4 -}; - -static const uint8_t huff_a62_cb[8] = { 3, 8, 5, 2, 2, 9, 5, 2 }; - -static const uint8_t huff_a63_cb[11] = { - 3, 11, 1, 1, 10, 4, 16, 29, 46, 75, 74 -}; - -static const uint8_t huff_a64_cb[8] = { 4, 9, 1, 7, 12, 36, 63, 2 }; - -static const uint8_t huff_a65_cb[8] = { 2, 7, 3, 0, 1, 3, 4, 4 }; - -static const uint8_t huff_a66_cb[11] = { 2, 10, 1, 2, 2, 6, 8, 6, 3, 1, 2 }; - -static const uint8_t huff_a67_cb[10] = { 2, 9, 1, 1, 3, 4, 6, 13, 25, 10 }; - -static const uint8_t huff_a71_cb[5] = { 1, 3, 1, 1, 2 }; - -static const uint8_t huff_a72_cb[12] = { - 2, 11, 1, 0, 4, 8, 3, 8, 24, 17, 12, 4 -}; - -static const uint8_t huff_a73_cb[11] = { 2, 10, 1, 1, 5, 2, 8, 7, 13, 8, 4 }; - -static const uint8_t huff_a74_cb[14] = { - 1, 12, 1, 0, 0, 4, 0, 4, 5, 9, 30, 45, 21, 2 -}; - -static const uint8_t huff_a75_cb[7] = { 2, 6, 1, 3, 3, 4, 4 }; - -static const uint8_t huff_a76_cb[12] = { - 3, 12, 1, 3, 4, 8, 10, 36, 60, 78, 48, 8 -}; - -static const uint8_t huff_b01_cb[14] = { - 1, 12, 1, 0, 0, 2, 6, 0, 11, 13, 12, 24, 4, 8 -}; - -static const uint8_t huff_b02_cb[14] = { - 1, 12, 1, 0, 0, 4, 0, 8, 4, 9, 19, 13, 13, 10 -}; - -static const uint8_t huff_b03_cb[11] = { 1, 9, 1, 0, 0, 4, 0, 5, 12, 13, 14 }; - -static const uint8_t huff_b04_cb[12] = { - 2, 11, 1, 0, 4, 4, 5, 9, 30, 45, 21, 2 -}; - -static const uint8_t huff_b05_cb[11] = { - 3, 11, 1, 4, 4, 4, 12, 30, 73, 75, 22 -}; - -static const uint8_t huff_b07_cb[9] = { 3, 9, 3, 2, 4, 8, 23, 13, 10 }; - -static const uint8_t huff_b12_cb[10] = { 3, 10, 1, 3, 12, 0, 30, 9, 18, 8 }; - -static const uint8_t huff_b14_cb[14] = { - 1, 12, 1, 0, 0, 4, 0, 3, 5, 16, 28, 34, 26, 4 -}; - -static const uint8_t huff_b16_cb[11] = { - 4, 12, 4, 4, 9, 13, 37, 76, 72, 39, 2 -}; - -static const uint8_t huff_b26_cb[12] = { - 3, 12, 2, 2, 4, 5, 11, 26, 67, 78, 51, 10 -}; - -static const uint8_t huff_b32_cb[12] = { - 2, 11, 1, 0, 4, 6, 7, 10, 22, 11, 16, 4 -}; - -static const uint8_t huff_b33_cb[13] = { - 2, 12, 1, 0, 0, 4, 11, 8, 28, 92, 97, 13, 2 -}; - -static const uint8_t huff_b35_cb[14] = { - 1, 12, 1, 0, 0, 0, 4, 6, 6, 14, 42, 63, 59, 30 -}; - -static const uint8_t huff_b37_cb[13] = { - 1, 11, 1, 0, 2, 0, 2, 2, 6, 17, 14, 13, 6 -}; - -static const uint8_t huff_b41_cb[14] = { - 1, 12, 1, 0, 0, 1, 7, 0, 20, 4, 10, 24, 2, 12 -}; - -static const uint8_t huff_b42_cb[11] = { 1, 9, 1, 0, 1, 3, 2, 3, 7, 4, 4 }; - -static const uint8_t huff_b43_cb[10] = { 2, 9, 1, 1, 3, 4, 9, 15, 12, 4 }; - -static const uint8_t huff_b47_cb[10] = { 2, 9, 1, 1, 3, 4, 6, 14, 22, 12 }; - -static const uint8_t huff_b52_cb[11] = { 1, 9, 1, 0, 1, 3, 2, 3, 7, 4, 4 }; - -static const uint8_t huff_b53_cb[7] = { 1, 5, 1, 1, 1, 0, 4 }; // same as b63!!! - -static const uint8_t huff_b56_cb[11] = { 1, 9, 1, 0, 2, 0, 2, 4, 11, 9, 2 }; - -static const uint8_t huff_b62_cb[14] = { - 1, 12, 1, 0, 0, 2, 3, 5, 12, 14, 18, 15, 9, 2 -}; - -static const uint8_t huff_b63_cb[7] = { 1, 5, 1, 1, 1, 0, 4 }; - -static const uint8_t huff_b64_cb[7] = { 1, 5, 1, 1, 1, 1, 2 }; - -static const uint8_t huff_b65_cb[14] = { - 1, 12, 1, 0, 0, 2, 2, 2, 6, 12, 34, 92, 54, 20 -}; - -static const uint8_t huff_b66_cb[14] = { - 1, 12, 1, 0, 0, 3, 0, 3, 3, 10, 40, 85, 61, 50 -}; - -static const uint8_t huff_b67_cb[10] = { 2, 9, 1, 2, 1, 4, 7, 10, 26, 12 }; - -static const uint8_t huff_b71_cb[14] = { - 1, 12, 1, 0, 0, 1, 7, 0, 19, 5, 13, 23, 0, 12 -}; - -static const uint8_t huff_b73_cb[13] = { - 1, 11, 1, 0, 0, 0, 1, 4, 9, 4, 103, 110, 24 -}; - -static const uint8_t huff_b74_cb[8] = { 1, 6, 1, 0, 2, 2, 2, 4 }; - -static const uint8_t huff_b75_cb[13] = { - 2, 12, 1, 4, 0, 0, 0, 8, 11, 24, 53, 64, 60 -}; - -static const uint8_t huff_b77_cb[12] = { - 2, 11, 1, 0, 4, 6, 10, 12, 7, 15, 4, 4 +/* If the first entry of a subtable is negative, it means + * that another VLC is to be reused. */ +static int8_t atrac3p_spectra_cbs[][12] = { + { 1, 0, 0, 1, 7, 0, 19, 5, 13, 21, 6, 8 }, + { 0, 1, 0, 4, 11, 0, 1, 29, 6, 20, 7, 2 }, + { 0, 0, 1, 8, 0, 13, 18, 7, 2, 0, 0, 0 }, + { 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 1, 3, 5, 8, 12, 23, 72, 68, 31, 2 }, + { 0, 1, 3, 2, 6, 4, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 2, 2, 2, 6, 14, 21, 13, 2, 0, 0 }, + { 1, 0, 0, 0, 8, 1, 18, 9, 22, 10, 12, 0 }, + { 0, 0, 0, 0, 16, 11, 32, 19, 1, 2, 0, 0 }, + { 1, 0, 0, 4, 2, 2, 9, 15, 12, 4, 0, 0 }, + { 0, 1, 0, 4, 3, 5, 16, 28, 34, 26, 4, 0 }, + { 0, 0, 0, 0, 9, 12, 16, 44, 98, 42, 4, 0 }, + { 0, 1, 1, 2, 2, 5, 7, 21, 54, 85, 62, 16 }, + { 0, 0, 3, 2, 5, 7, 17, 23, 6, 0, 0, 0 }, + { 1, 0, 0, 2, 6, 0, 7, 21, 15, 17, 8, 4 }, + { 0, 1, 4, 0, 4, 3, 8, 3, 2, 0, 0, 0 }, + { 0, 0, 5, 0, 4, 6, 10, 16, 8, 0, 0, 0 }, + { 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 3, 4, 12, 15, 34, 83, 75, 30, 0 }, + { 0, 0, 0, 3, 14, 10, 20, 16, 0, 0, 0, 0 }, + { 1, 0, 3, 1, 0, 4, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 0, 2, 2, 6, 12, 18, 19, 15, 6, 0 }, + { 0, 0, 1, 1, 13, 1, 14, 28, 33, 81, 32, 52 }, + { 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 0, 2, 3, 6, 19, 9, 75, 110, 0, 0 }, + { 0, 0, 1, 3, 5, 5, 13, 27, 69, 96, 35, 2 }, + { 0, 0, 0, 7, 6, 8, 22, 20, 0, 0, 0, 0 }, + { 1, 0, 0, 6, 2, 0, 0, 0, 19, 9, 24, 20 }, + { 0, 0, 1, 2, 13, 1, 31, 13, 16, 4, 0, 0 }, + { 0, 2, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 5, 4, 12, 17, 47, 24, 12, 0, 0 }, + { 0, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 16, 31, 36, 172, 0, 0, 0 }, + { 0, 0, 0, 5, 12, 9, 12, 15, 10, 0, 0, 0 }, + { 0, 1, 0, 6, 2, 6, 18, 4, 26, 6, 12, 0 }, + { 1, 0, 2, 2, 0, 4, 3, 8, 3, 2, 0, 0 }, + { 0, 2, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 4, 7, 12, 19, 21, 58, 0, 0, 0 }, + { 1, 1, 1, 0, 3, 2, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 1, 8, 6, 8, 8, 0, 0, 0, 0, 0 }, + { 0, 0, 1, 5, 7, 8, 16, 22, 4, 0, 0, 0 }, + { 0, 1, 0, 8, 0, 1, 16, 10, 29, 12, 4, 0 }, + { 0, 0, 5, 2, 2, 9, 5, 2, 0, 0, 0, 0 }, + { 0, 0, 1, 1, 10, 4, 16, 29, 46, 75, 74, 0 }, + { 0, 0, 0, 1, 7, 12, 36, 63, 2, 0, 0, 0 }, + { 0, 3, 0, 1, 3, 4, 4, 0, 0, 0, 0, 0 }, + { 0, 1, 2, 2, 6, 8, 6, 3, 1, 2, 0, 0 }, + { 0, 1, 1, 3, 4, 6, 13, 25, 10, 0, 0, 0 }, + { 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 0, 4, 8, 3, 8, 24, 17, 12, 4, 0 }, + { 0, 1, 1, 5, 2, 8, 7, 13, 8, 4, 0, 0 }, + { 1, 0, 0, 4, 0, 4, 5, 9, 30, 45, 21, 2 }, + { 0, 1, 3, 3, 4, 4, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 1, 3, 4, 8, 10, 36, 60, 78, 48, 8 }, + { -6 }, + { 1, 0, 0, 2, 6, 0, 11, 13, 12, 24, 4, 8 }, + { 1, 0, 0, 4, 0, 8, 4, 9, 19, 13, 13, 10 }, + { 1, 0, 0, 4, 0, 5, 12, 13, 14, 0, 0, 0 }, + { 0, 1, 0, 4, 4, 5, 9, 30, 45, 21, 2, 0 }, + { 0, 0, 1, 4, 4, 4, 12, 30, 73, 75, 22, 0 }, + { -5 }, + { 0, 0, 3, 2, 4, 8, 23, 13, 10, 0, 0, 0 }, + { -14 }, + { 0, 0, 1, 3, 12, 0, 30, 9, 18, 8, 0, 0 }, + { -9 }, + { 1, 0, 0, 4, 0, 3, 5, 16, 28, 34, 26, 4 }, + { -11 }, + { 0, 0, 0, 4, 4, 9, 13, 37, 76, 72, 39, 2 }, + { -6 }, + { -28 }, + { -22 }, + { -2 }, + { -31 }, + { -60 }, + { 0, 0, 2, 2, 4, 5, 11, 26, 67, 78, 51, 10 }, + { -6 }, + { -35 }, + { 0, 1, 0, 4, 6, 7, 10, 22, 11, 16, 4, 0 }, + { 0, 1, 0, 0, 4, 11, 8, 28, 92, 97, 13, 2 }, + { -59 }, + { 1, 0, 0, 0, 4, 6, 6, 14, 42, 63, 59, 30 }, + { -75 }, + { 1, 0, 2, 0, 2, 2, 6, 17, 14, 13, 6, 0 }, + { 1, 0, 0, 1, 7, 0, 20, 4, 10, 24, 2, 12 }, + { 1, 0, 1, 3, 2, 3, 7, 4, 4, 0, 0, 0 }, + { 0, 1, 1, 3, 4, 9, 15, 12, 4, 0, 0, 0 }, + { -66 }, + { -32 }, + { -12 }, + { 0, 1, 1, 3, 4, 6, 14, 22, 12, 0, 0, 0 }, + { -42 }, + { 1, 0, 1, 3, 2, 3, 7, 4, 4, 0, 0, 0 }, + { 1, 1, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0 }, + { -17 }, + { -39 }, + { 1, 0, 2, 0, 2, 4, 11, 9, 2, 0, 0, 0 }, + { -62 }, + { -28 }, + { 1, 0, 0, 2, 3, 5, 12, 14, 18, 15, 9, 2 }, + { 1, 1, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 0, 2, 2, 2, 6, 12, 34, 92, 54, 20 }, + { 1, 0, 0, 3, 0, 3, 3, 10, 40, 85, 61, 50 }, + { 0, 1, 2, 1, 4, 7, 10, 26, 12, 0, 0, 0 }, + { 1, 0, 0, 1, 7, 0, 19, 5, 13, 23, 0, 12 }, + { -78 }, + { 1, 0, 0, 0, 1, 4, 9, 4, 103, 110, 24, 0 }, + { 1, 0, 2, 2, 2, 4, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 4, 0, 0, 0, 8, 11, 24, 53, 64, 60 }, + { -47 }, + { 0, 1, 0, 4, 6, 10, 12, 7, 15, 4, 4, 0 }, }; static const uint8_t atrac3p_spectra_xlats[] = { @@ -1583,187 +1451,171 @@ typedef struct Atrac3pSpecCodeTab { uint8_t num_coeffs; ///< 1 - map index to a single value, > 1 - map index to a vector of values uint8_t bits; ///< number of bits a single coefficient occupy uint8_t is_signed; ///< 1 - values in that table are signed ones, otherwise - absolute ones - - int redirect; ///< if >= 0: tells which huffman table must be reused - const uint8_t *cb; ///< pointer to the codebook descriptor } Atrac3pSpecCodeTab; static const Atrac3pSpecCodeTab atrac3p_spectra_tabs[112] = { /* table set = A */ /* code table = 0 */ - { 1, 4, 2, 1, -1, huff_a01_cb }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_a02_cb }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_a03_cb }, // wordlen = 3 - { 1, 1, 3, 0, -1, huff_a04_cb }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_a05_cb }, // wordlen = 5 - { 1, 1, 4, 0, -1, huff_a06_cb }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a07_cb }, // wordlen = 7 + { 1, 4, 2, 1 }, // wordlen = 1 + { 1, 4, 2, 0 }, // wordlen = 2 + { 1, 2, 3, 1 }, // wordlen = 3 + { 1, 1, 3, 0 }, // wordlen = 4 + { 1, 2, 4, 1 }, // wordlen = 5 + { 1, 1, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 1 */ - { 4, 4, 2, 1, -1, huff_a11_cb }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_a12_cb }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_a13_cb }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a14_cb }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_a15_cb }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_a16_cb }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a17_cb }, // wordlen = 7 + { 4, 4, 2, 1 }, // wordlen = 1 + { 1, 4, 2, 0 }, // wordlen = 2 + { 1, 2, 3, 1 }, // wordlen = 3 + { 1, 2, 4, 1 }, // wordlen = 4 + { 1, 2, 4, 1 }, // wordlen = 5 + { 1, 2, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 2 */ - { 1, 4, 2, 1, -1, huff_a21_cb }, // wordlen = 1 - { 1, 2, 3, 1, -1, huff_a22_cb }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_a23_cb }, // wordlen = 3 - { 1, 1, 3, 0, -1, huff_a24_cb }, // wordlen = 4 - { 1, 1, 3, 0, -1, huff_a25_cb }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_a26_cb }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a27_cb }, // wordlen = 7 + { 1, 4, 2, 1 }, // wordlen = 1 + { 1, 2, 3, 1 }, // wordlen = 2 + { 1, 2, 3, 1 }, // wordlen = 3 + { 1, 1, 3, 0 }, // wordlen = 4 + { 1, 1, 3, 0 }, // wordlen = 5 + { 1, 2, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 3 */ - { 1, 2, 2, 1, -1, huff_a31_cb }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_a32_cb }, // wordlen = 2 - { 1, 4, 2, 0, -1, huff_a33_cb }, // wordlen = 3 - { 1, 1, 3, 0, -1, huff_a34_cb }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_a35_cb }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_a36_cb }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a37_cb }, // wordlen = 7 + { 1, 2, 2, 1 }, // wordlen = 1 + { 1, 4, 2, 0 }, // wordlen = 2 + { 1, 4, 2, 0 }, // wordlen = 3 + { 1, 1, 3, 0 }, // wordlen = 4 + { 1, 2, 4, 1 }, // wordlen = 5 + { 1, 2, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 4 */ - { 1, 4, 2, 1, -1, huff_a41_cb }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_a42_cb }, // wordlen = 2 - { 1, 1, 3, 1, -1, huff_a43_cb }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a44_cb }, // wordlen = 4 - { 1, 1, 3, 0, -1, huff_a45_cb }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_a46_cb }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a47_cb }, // wordlen = 7 + { 1, 4, 2, 1 }, // wordlen = 1 + { 1, 4, 2, 0 }, // wordlen = 2 + { 1, 1, 3, 1 }, // wordlen = 3 + { 1, 2, 4, 1 }, // wordlen = 4 + { 1, 1, 3, 0 }, // wordlen = 5 + { 1, 2, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 5 */ - { 1, 4, 2, 1, -1, huff_a51_cb }, // wordlen = 1 - { 1, 2, 3, 1, -1, huff_a52_cb }, // wordlen = 2 - { 1, 1, 3, 1, -1, huff_a43_cb }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a54_cb }, // wordlen = 4 - { 1, 1, 3, 0, -1, huff_a55_cb }, // wordlen = 5 - { 1, 1, 5, 1, -1, huff_a56_cb }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a57_cb }, // wordlen = 7 + { 1, 4, 2, 1 }, // wordlen = 1 + { 1, 2, 3, 1 }, // wordlen = 2 + { 1, 1, 3, 1 }, // wordlen = 3 + { 1, 2, 4, 1 }, // wordlen = 4 + { 1, 1, 3, 0 }, // wordlen = 5 + { 1, 1, 5, 1 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 6 */ - { 2, 4, 2, 1, -1, huff_a61_cb }, // wordlen = 1 - { 1, 2, 3, 1, -1, huff_a62_cb }, // wordlen = 2 - { 1, 4, 2, 0, -1, huff_a63_cb }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a64_cb }, // wordlen = 4 - { 1, 1, 4, 1, -1, huff_a65_cb }, // wordlen = 5 - { 1, 1, 5, 1, -1, huff_a66_cb }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_a67_cb }, // wordlen = 7 + { 2, 4, 2, 1 }, // wordlen = 1 + { 1, 2, 3, 1 }, // wordlen = 2 + { 1, 4, 2, 0 }, // wordlen = 3 + { 1, 2, 4, 1 }, // wordlen = 4 + { 1, 1, 4, 1 }, // wordlen = 5 + { 1, 1, 5, 1 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 7 */ - { 1, 2, 1, 0, -1, huff_a71_cb }, // wordlen = 1 - { 2, 4, 2, 0, -1, huff_a72_cb }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_a73_cb }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_a74_cb }, // wordlen = 4 - { 1, 1, 4, 1, -1, huff_a75_cb }, // wordlen = 5 - { 2, 2, 4, 0, -1, huff_a76_cb }, // wordlen = 6 - { 4, 1, 6, 1, 6, NULL }, // wordlen = 7 + { 1, 2, 1, 0 }, // wordlen = 1 + { 2, 4, 2, 0 }, // wordlen = 2 + { 1, 2, 3, 1 }, // wordlen = 3 + { 1, 2, 4, 1 }, // wordlen = 4 + { 1, 1, 4, 1 }, // wordlen = 5 + { 2, 2, 4, 0 }, // wordlen = 6 + { 4, 1, 6, 1 }, // wordlen = 7 /* table set = B */ /* code table = 0 */ - { 4, 4, 2, 1, -1, huff_b01_cb }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_b02_cb }, // wordlen = 2 - { 4, 2, 3, 1, -1, huff_b03_cb }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_b04_cb }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_b05_cb }, // wordlen = 5 - { 1, 1, 4, 0, 5, NULL }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b07_cb }, // wordlen = 7 + { 4, 4, 2, 1 }, // wordlen = 1 + { 1, 4, 2, 0 }, // wordlen = 2 + { 4, 2, 3, 1 }, // wordlen = 3 + { 1, 2, 4, 1 }, // wordlen = 4 + { 1, 2, 4, 1 }, // wordlen = 5 + { 1, 1, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 1 */ - { 1, 4, 2, 1, 14, NULL }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_b12_cb }, // wordlen = 2 - { 1, 2, 3, 1, 9, NULL }, // wordlen = 3 - { 1, 2, 4, 1, -1, huff_b14_cb }, // wordlen = 4 - { 1, 2, 4, 1, 11, NULL }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_b16_cb }, // wordlen = 6 - { 1, 1, 6, 1, 6, NULL }, // wordlen = 7 + { 1, 4, 2, 1 }, // wordlen = 1 + { 1, 4, 2, 0 }, // wordlen = 2 + { 1, 2, 3, 1 }, // wordlen = 3 + { 1, 2, 4, 1 }, // wordlen = 4 + { 1, 2, 4, 1 }, // wordlen = 5 + { 1, 2, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 2 */ - { 4, 4, 2, 1, 28, NULL }, // wordlen = 1 - { 4, 4, 2, 0, 22, NULL }, // wordlen = 2 - { 1, 2, 3, 1, 2, NULL }, // wordlen = 3 - { 1, 2, 4, 1, 31, NULL }, // wordlen = 4 - { 2, 2, 4, 1, 60, NULL }, // wordlen = 5 - { 2, 2, 4, 0, -1, huff_b26_cb }, // wordlen = 6 - { 4, 1, 6, 1, 6, NULL }, // wordlen = 7 + { 4, 4, 2, 1 }, // wordlen = 1 + { 4, 4, 2, 0 }, // wordlen = 2 + { 1, 2, 3, 1 }, // wordlen = 3 + { 1, 2, 4, 1 }, // wordlen = 4 + { 2, 2, 4, 1 }, // wordlen = 5 + { 2, 2, 4, 0 }, // wordlen = 6 + { 4, 1, 6, 1 }, // wordlen = 7 /* code table = 3 */ - { 1, 4, 2, 1, 35, NULL }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_b32_cb }, // wordlen = 2 - { 1, 4, 2, 0, -1, huff_b33_cb }, // wordlen = 3 - { 2, 2, 4, 1, 59, NULL }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_b35_cb }, // wordlen = 5 - { 1, 2, 4, 0, 75, NULL }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b37_cb }, // wordlen = 7 + { 1, 4, 2, 1 }, // wordlen = 1 + { 1, 4, 2, 0 }, // wordlen = 2 + { 1, 4, 2, 0 }, // wordlen = 3 + { 2, 2, 4, 1 }, // wordlen = 4 + { 1, 2, 4, 1 }, // wordlen = 5 + { 1, 2, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 4 */ - { 1, 4, 2, 1, -1, huff_b41_cb }, // wordlen = 1 - { 4, 2, 3, 1, -1, huff_b42_cb }, // wordlen = 2 - { 1, 2, 3, 1, -1, huff_b43_cb }, // wordlen = 3 - { 4, 2, 4, 1, 66, NULL }, // wordlen = 4 - { 1, 1, 3, 0, 32, NULL }, // wordlen = 5 - { 1, 2, 4, 0, 12, NULL }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b47_cb }, // wordlen = 7 + { 1, 4, 2, 1 }, // wordlen = 1 + { 4, 2, 3, 1 }, // wordlen = 2 + { 1, 2, 3, 1 }, // wordlen = 3 + { 4, 2, 4, 1 }, // wordlen = 4 + { 1, 1, 3, 0 }, // wordlen = 5 + { 1, 2, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 5 */ - { 2, 4, 2, 1, 42, NULL }, // wordlen = 1 - { 1, 2, 3, 1, -1, huff_b52_cb }, // wordlen = 2 - { 4, 1, 3, 1, -1, huff_b53_cb }, // wordlen = 3 - { 1, 1, 3, 0, 17, NULL }, // wordlen = 4 - { 1, 1, 3, 0, 39, NULL }, // wordlen = 5 - { 1, 1, 5, 1, -1, huff_b56_cb }, // wordlen = 6 - { 2, 1, 6, 1, 62, NULL }, // wordlen = 7 + { 2, 4, 2, 1 }, // wordlen = 1 + { 1, 2, 3, 1 }, // wordlen = 2 + { 4, 1, 3, 1 }, // wordlen = 3 + { 1, 1, 3, 0 }, // wordlen = 4 + { 1, 1, 3, 0 }, // wordlen = 5 + { 1, 1, 5, 1 }, // wordlen = 6 + { 2, 1, 6, 1 }, // wordlen = 7 /* code table = 6 */ - { 1, 4, 2, 1, 28, NULL }, // wordlen = 1 - { 1, 4, 2, 0, -1, huff_b62_cb }, // wordlen = 2 - { 1, 1, 3, 1, -1, huff_b63_cb }, // wordlen = 3 - { 1, 1, 3, 0, -1, huff_b64_cb }, // wordlen = 4 - { 4, 2, 4, 1, -1, huff_b65_cb }, // wordlen = 5 - { 1, 2, 4, 0, -1, huff_b66_cb }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b67_cb }, // wordlen = 7 + { 1, 4, 2, 1 }, // wordlen = 1 + { 1, 4, 2, 0 }, // wordlen = 2 + { 1, 1, 3, 1 }, // wordlen = 3 + { 1, 1, 3, 0 }, // wordlen = 4 + { 4, 2, 4, 1 }, // wordlen = 5 + { 1, 2, 4, 0 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 /* code table = 7 */ - { 1, 4, 2, 1, -1, huff_b71_cb }, // wordlen = 1 - { 4, 4, 2, 0, 78, NULL }, // wordlen = 2 - { 4, 4, 2, 0, -1, huff_b73_cb }, // wordlen = 3 - { 1, 1, 4, 1, -1, huff_b74_cb }, // wordlen = 4 - { 1, 2, 4, 1, -1, huff_b75_cb }, // wordlen = 5 - { 1, 1, 5, 1, 47, NULL }, // wordlen = 6 - { 1, 1, 6, 1, -1, huff_b77_cb }, // wordlen = 7 + { 1, 4, 2, 1 }, // wordlen = 1 + { 4, 4, 2, 0 }, // wordlen = 2 + { 4, 4, 2, 0 }, // wordlen = 3 + { 1, 1, 4, 1 }, // wordlen = 4 + { 1, 2, 4, 1 }, // wordlen = 5 + { 1, 1, 5, 1 }, // wordlen = 6 + { 1, 1, 6, 1 }, // wordlen = 7 }; /* Huffman tables for gain control data. */ -static const uint8_t atrac3p_huff_gain_npoints1_cb[9] = { - 1, 7, 1, 1, 1, 1, 1, 1, 2 -}; - -static const uint8_t atrac3p_huff_gain_lev1_cb[9] = { 1, 7, 1, 0, 2, 2, 1, 2, 8 }; -static const uint8_t atrac3p_huff_gain_lev2_cb[11] = { - 1, 9, 1, 1, 1, 1, 1, 0, 2, 0, 8 -}; - -static const uint8_t atrac3p_huff_gain_lev3_cb[11] = { - 1, 9, 1, 0, 3, 1, 1, 0, 2, 0, 8 -}; - -static const uint8_t atrac3p_huff_gain_lev4_cb[11] = { - 1, 9, 1, 1, 1, 1, 1, 0, 1, 2, 8 +static const uint8_t atrac3p_gain_cbs[][12] = { + { 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0 }, + { 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0 }, + { 1, 0, 2, 2, 1, 2, 8, 0, 0, 0, 0, 0 }, + { 1, 1, 1, 1, 1, 0, 2, 0, 8, 0, 0, 0 }, + { 1, 0, 3, 1, 1, 0, 2, 0, 8, 0, 0, 0 }, + { 1, 1, 1, 1, 1, 0, 1, 2, 8, 0, 0, 0 }, + { 0, 1, 0, 2, 11, 18, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 2, 4, 4, 4, 0, 16, 0, 0, 0, 0 }, + { 0, 0, 0, 3, 23, 6, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 5, 3, 2, 3, 2, 16, 0, 0, 0, 0 }, + { 1, 0, 0, 3, 2, 6, 20, 0, 0, 0, 0, 0 }, }; -static const uint8_t atrac3p_huff_gain_loc1_cb[9] = { 2, 8, 1, 2, 4, 4, 4, 0, 16 }; - -static const uint8_t atrac3p_huff_gain_loc2_cb[8] = { 3, 8, 5, 3, 2, 3, 2, 16 }; - -static const uint8_t atrac3p_huff_gain_loc3_cb[7] = { 2, 6, 1, 0, 2, 11, 18 }; - -static const uint8_t atrac3p_huff_gain_loc4_cb[5] = { 4, 6, 3, 23, 6 }; - -static const uint8_t atrac3p_huff_gain_loc5_cb[9] = { 1, 7, 1, 0, 0, 3, 2, 6, 20 }; - static const uint8_t atrac3p_gain_xlats[] = { /* Number of gain control points 1 - 8 entries */ 0, 1, 2, 3, 4, 5, 6, 7, @@ -1795,17 +1647,14 @@ static const uint8_t atrac3p_gain_xlats[] = { }; /* Huffman tables for GHA waves data. */ -static const uint8_t atrac3p_huff_tonebands_cb[8] = { 1, 6, 1, 0, 1, 2, 4, 8 }; -static const uint8_t atrac3p_huff_numwavs1_cb[9] = { 1, 7, 1, 1, 1, 1, 1, 1, 2 }; -static const uint8_t atrac3p_huff_numwavs2_cb[8] = { 1, 6, 1, 1, 1, 1, 0, 4 }; -static const uint8_t atrac3p_huff_wav_ampsf1_cb[7] = { 4, 8, 10, 8, 6, 0, 8 }; - -static const uint8_t atrac3p_huff_wav_ampsf2_cb[7] = { 4, 8, 11, 5, 6, 6, 4 }; - -static const uint8_t atrac3p_huff_wav_ampsf3_cb[9] = { 2, 8, 1, 3, 3, 1, 4, 4, 16 }; - -static const uint8_t atrac3p_huff_freq_cb[13] = { - 1, 11, 1, 0, 0, 2, 2, 0, 9, 9, 29, 104, 100 +static const uint8_t atrac3p_tone_cbs[][12] = { + { 1, 0, 1, 2, 4, 8, 0, 0, 0, 0, 0, 0 }, + { 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0 }, + { 1, 1, 1, 1, 0, 4, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 10, 8, 6, 0, 8, 0, 0, 0, 0 }, + { 0, 0, 0, 11, 5, 6, 6, 4, 0, 0, 0, 0 }, + { 0, 1, 3, 3, 1, 4, 4, 16, 0, 0, 0, 0 }, + { 1, 0, 0, 2, 2, 0, 9, 9, 29,104, 100, 0 }, }; static const uint8_t atrac3p_tone_xlats[] = { From patchwork Tue Nov 10 10:48:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23551 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 3C5FC44B48B for ; Tue, 10 Nov 2020 13:06:33 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F348E68BF1A; Tue, 10 Nov 2020 12:50:48 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 578BF68BF06 for ; Tue, 10 Nov 2020 12:50:34 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id 23so1734092wmg.1 for ; Tue, 10 Nov 2020 02:50:34 -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=f/lzRZ0RV2ANCrmwGISTD1byjZSVi7THbWRionJWc94=; b=eyonQkITZuPRHy3x2bFVCHha2E9I03XLr0Hvo2+vzMTohwvaBtWUtl3CR8Dc7mTXC1 SBUw0emHL2BXa0n8RQ2a8Ioy+zl3OVNez5lQtuF19u9ADL6SVZHBSS//vGE7PTyFMBJc OhGpJte9ButDcKO+3q6ktgJwvd6ZT96OSIYDl1apAAWBxXRrEV/IgJrdqZh2n7x60D1R psRzy/rWu5JlWRal3AEUyi8H9EcQG2zcnf3ws6POmqUy49HtCPfc3ZSTQt+EfHYamQhV 5M8XrgYS5W3t3xMovGAHHBtWFh/zjUon9+5GQzsilZ6inLIdKmDBCWoz71HtaWW1eXdi NLjA== 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=f/lzRZ0RV2ANCrmwGISTD1byjZSVi7THbWRionJWc94=; b=O9dj8mZHWqQAq2S1R5KeYzR5MDN4YXfaHohFZaf64UArOagQwv2xTS4VgyNj7yivTk 4DhTWaZC1wpd8osVbXszN24Bup91Y0nVee834Ff9TWrZfweUTFtRWYxF3lbDEzaQdd8L s57mjWrKgh5ywT2GOzllEqd0jt/mKcJe4HUVZrYkOU2rvvSE9WYfaH2+Ok6RNNa18wv/ O2pDcKGRg+tU+N5mLuUKvrKqpsqnz+XjfGyfbf5fq+w6vtnEVTIgtt4JyOY5uokUxYRd htXUSDEWpaoGvicuHJ2ed/XgR+vqzyJHDmF+TB57xquHEYOzoSQkIOzN6N/ip2qaVAWE WccQ== X-Gm-Message-State: AOAM533MQ/TvJHOUViGrETgV2/YalVDF9x//m8+ZEJ6OvLWMp/6O5LX/ h9jm2THQJXrx5RYJYJjpuNnHC8HMuy0= X-Google-Smtp-Source: ABdhPJx27deAL6utKgBSW6d/J7VMF1W6Vrs6DQSAdQAsd20OEl6K/8A7YZ9sxrGqvaqHaAiLHuF9hA== X-Received: by 2002:a05:600c:21cc:: with SMTP id x12mr823867wmj.8.1605005433201; Tue, 10 Nov 2020 02:50:33 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:32 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:12 +0100 Message-Id: <20201110104851.321029-76-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 075/114] avcodec/atrac3plus: Run-length encode length tables to make them smaller 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" This is very beneficial for the scale factor tables where 4*64+4*15 bytes of length information can be replaced by eight codebooks of 12 bytes each; furthermore the number of codes as well as the maximum length of a code can be easily derived from said codebooks, making tables containing said information superfluous. This and combining the symbols into one big array also made an array of pointers to the tables redundant. For the wordlen and code table tables the benefits are not that big (given these tables don't contain that many elements), but all in all using codebooks is also advantageouos for them. Therefore it has been done. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac3plus.c | 55 ++---------- libavcodec/atrac3plus_data.h | 157 +++++++++++++++-------------------- 2 files changed, 76 insertions(+), 136 deletions(-) diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c index 43600f12bc..a5abc37606 100644 --- a/libavcodec/atrac3plus.c +++ b/libavcodec/atrac3plus.c @@ -78,55 +78,18 @@ av_cold void ff_atrac3p_init_vlcs(void) int i, tab_offset = 0; const uint8_t *xlats; - static const uint8_t wl_nb_bits[4] = { 2, 3, 5, 5 }; - static const uint8_t wl_nb_codes[4] = { 3, 5, 8, 8 }; - static const uint8_t (*const wl_huffs[4])[2] = { - atrac3p_wl_huff1, atrac3p_wl_huff2, - atrac3p_wl_huff3, atrac3p_wl_huff4 - }; - - static const uint8_t ct_nb_bits[4] = { 3, 4, 4, 4 }; - static const uint8_t ct_nb_codes[4] = { 4, 8, 8, 8 }; - static const uint8_t (*const ct_huffs[4])[2] = { - atrac3p_ct_huff1, atrac3p_ct_huff2, - atrac3p_ct_huff3, atrac3p_ct_huff4 - }; - - static const uint8_t sf_nb_bits[8] = { 9, 9, 9, 9, 6, 6, 7, 7 }; - static const uint8_t sf_nb_codes[8] = { 64, 64, 64, 64, 15, 15, 15, 15 }; - static const uint8_t (*const sf_huffs[8])[2] = { - atrac3p_sf_huff1, atrac3p_sf_huff2, atrac3p_sf_huff3, - atrac3p_sf_huff4, atrac3p_sf_huff5, atrac3p_sf_huff6, - atrac3p_sf_huff7, atrac3p_sf_huff8 - }; - + xlats = atrac3p_wl_ct_xlats; for (int i = 0; i < 4; i++) { - wl_vlc_tabs[i].table = &tables_data[tab_offset]; - wl_vlc_tabs[i].table_allocated = 1 << wl_nb_bits[i]; - tab_offset += wl_vlc_tabs[i].table_allocated; - ff_init_vlc_from_lengths(&wl_vlc_tabs[i], wl_nb_bits[i], wl_nb_codes[i], - &wl_huffs[i][0][1], 2, - &wl_huffs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); - - ct_vlc_tabs[i].table = &tables_data[tab_offset]; - ct_vlc_tabs[i].table_allocated = 1 << ct_nb_bits[i]; - tab_offset += ct_vlc_tabs[i].table_allocated; - ff_init_vlc_from_lengths(&ct_vlc_tabs[i], ct_nb_bits[i], ct_nb_codes[i], - &ct_huffs[i][0][1], 2, - &ct_huffs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + build_canonical_huff(atrac3p_wl_cbs[i], &xlats, + &tab_offset, &wl_vlc_tabs[i]); + build_canonical_huff(atrac3p_ct_cbs[i], &xlats, + &tab_offset, &ct_vlc_tabs[i]); } - for (int i = 0; i < 8; i++) { - sf_vlc_tabs[i].table = &tables_data[tab_offset]; - sf_vlc_tabs[i].table_allocated = 1 << sf_nb_bits[i]; - tab_offset += sf_vlc_tabs[i].table_allocated; - ff_init_vlc_from_lengths(&sf_vlc_tabs[i], sf_nb_bits[i], sf_nb_codes[i], - &sf_huffs[i][0][1], 2, - &sf_huffs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); - } + xlats = atrac3p_sf_xlats; + for (int i = 0; i < 8; i++) + build_canonical_huff(atrac3p_sf_cbs[i], &xlats, + &tab_offset, &sf_vlc_tabs[i]); /* build huffman tables for spectrum decoding */ xlats = atrac3p_spectra_xlats; diff --git a/libavcodec/atrac3plus_data.h b/libavcodec/atrac3plus_data.h index 6b9109cb70..7039936ba3 100644 --- a/libavcodec/atrac3plus_data.h +++ b/libavcodec/atrac3plus_data.h @@ -27,106 +27,83 @@ #include /** VLC tables for wordlen */ -static const uint8_t atrac3p_wl_huff1[3][2] = { - { 0, 1 }, { 1, 2 }, { 7, 2 }, +static const uint8_t atrac3p_wl_cbs[][12] = { + { 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 2, 3, 2, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 2, 3, 2, 0, 0, 0, 0, 0, 0, 0 }, }; -static const uint8_t atrac3p_wl_huff2[5][2] = { - { 0, 1 }, { 1, 3 }, { 2, 3 }, { 6, 3 }, { 7, 3 }, -}; - -static const uint8_t atrac3p_wl_huff3[8][2] = { - { 0, 1 }, { 1, 3 }, { 7, 3 }, { 2, 4 }, { 5, 4 }, { 6, 4 }, { 3, 5 }, - { 4, 5 }, +/** VLC tables for code table indexes */ +static const uint8_t atrac3p_ct_cbs[][12] = { + { 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0 }, }; - -static const uint8_t atrac3p_wl_huff4[8][2] = { - { 0, 1 }, { 1, 3 }, { 7, 3 }, { 2, 4 }, { 3, 4 }, { 6, 4 }, { 4, 5 }, - { 5, 5 }, +/* Symbols for wordlen interleaved with symbols for code table */ +static const uint8_t atrac3p_wl_ct_xlats[] = { + /* wordlen table 1 - 3 entries */ + 0, 1, 7, + /* code table 1 - 4 entries */ + 0, 1, 2, 3, + /* wordlen table 2 - 5 entries */ + 0, 1, 2, 6, 7, + /* code table 2 - 8 entries */ + 0, 1, 2, 3, 4, 5, 6, 7, + /* wordlen table 3 - 8 entries */ + 0, 1, 7, 2, 5, 6, 3, 4, + /* code table 3 - 8 entries */ + 0, 1, 2, 3, 6, 7, 4, 5, + /* wordlen table 4 - 8 entries */ + 0, 1, 7, 2, 3, 6, 4, 5, + /* code table 4 - 8 entries */ + 0, 1, 2, 3, 4, 5, 6, 7, }; /** VLC tables for scale factor indexes */ -static const uint8_t atrac3p_sf_huff1[64][2] = { - { 0, 2 }, { 1, 3 }, { 61, 3 }, { 62, 3 }, { 63, 3 }, { 2, 4 }, - { 60, 4 }, { 3, 8 }, { 4, 8 }, { 5, 8 }, { 6, 8 }, { 57, 8 }, - { 58, 8 }, { 59, 8 }, { 7, 9 }, { 8, 9 }, { 9, 9 }, { 10, 9 }, - { 11, 9 }, { 12, 9 }, { 13, 9 }, { 14, 9 }, { 15, 9 }, { 16, 9 }, - { 17, 9 }, { 18, 9 }, { 19, 9 }, { 20, 9 }, { 21, 9 }, { 22, 9 }, - { 23, 9 }, { 24, 9 }, { 25, 9 }, { 26, 9 }, { 27, 9 }, { 28, 9 }, - { 29, 9 }, { 30, 9 }, { 31, 9 }, { 32, 9 }, { 33, 9 }, { 34, 9 }, - { 35, 9 }, { 36, 9 }, { 37, 9 }, { 38, 9 }, { 39, 9 }, { 40, 9 }, - { 41, 9 }, { 42, 9 }, { 43, 9 }, { 44, 9 }, { 45, 9 }, { 46, 9 }, - { 47, 9 }, { 48, 9 }, { 49, 9 }, { 50, 9 }, { 51, 9 }, { 52, 9 }, - { 53, 9 }, { 54, 9 }, { 55, 9 }, { 56, 9 }, -}; - -static const uint8_t atrac3p_sf_huff2[64][2] = { - { 0, 2 }, { 1, 3 }, { 2, 3 }, { 62, 3 }, { 63, 3 }, { 3, 4 }, - { 61, 4 }, { 4, 8 }, { 5, 8 }, { 6, 8 }, { 57, 8 }, { 58, 8 }, - { 59, 8 }, { 60, 8 }, { 7, 9 }, { 8, 9 }, { 9, 9 }, { 10, 9 }, - { 11, 9 }, { 12, 9 }, { 13, 9 }, { 14, 9 }, { 15, 9 }, { 16, 9 }, - { 17, 9 }, { 18, 9 }, { 19, 9 }, { 20, 9 }, { 21, 9 }, { 22, 9 }, - { 23, 9 }, { 24, 9 }, { 25, 9 }, { 26, 9 }, { 27, 9 }, { 28, 9 }, - { 29, 9 }, { 30, 9 }, { 31, 9 }, { 32, 9 }, { 33, 9 }, { 34, 9 }, - { 35, 9 }, { 36, 9 }, { 37, 9 }, { 38, 9 }, { 39, 9 }, { 40, 9 }, - { 41, 9 }, { 42, 9 }, { 43, 9 }, { 44, 9 }, { 45, 9 }, { 46, 9 }, - { 47, 9 }, { 48, 9 }, { 49, 9 }, { 50, 9 }, { 51, 9 }, { 52, 9 }, - { 53, 9 }, { 54, 9 }, { 55, 9 }, { 56, 9 }, -}; - -static const uint8_t atrac3p_sf_huff3[64][2] = { - { 0, 1 }, { 1, 3 }, { 63, 3 }, { 2, 5 }, { 3, 5 }, { 61, 5 }, - { 62, 5 }, { 4, 7 }, { 60, 7 }, { 59, 8 }, { 5, 9 }, { 6, 9 }, - { 7, 9 }, { 8, 9 }, { 9, 9 }, { 10, 9 }, { 11, 9 }, { 12, 9 }, - { 13, 9 }, { 14, 9 }, { 15, 9 }, { 16, 9 }, { 17, 9 }, { 18, 9 }, - { 19, 9 }, { 20, 9 }, { 21, 9 }, { 22, 9 }, { 23, 9 }, { 24, 9 }, - { 25, 9 }, { 26, 9 }, { 27, 9 }, { 28, 9 }, { 29, 9 }, { 30, 9 }, - { 31, 9 }, { 32, 9 }, { 33, 9 }, { 34, 9 }, { 35, 9 }, { 36, 9 }, - { 37, 9 }, { 38, 9 }, { 39, 9 }, { 40, 9 }, { 41, 9 }, { 42, 9 }, - { 43, 9 }, { 44, 9 }, { 45, 9 }, { 46, 9 }, { 47, 9 }, { 48, 9 }, - { 49, 9 }, { 50, 9 }, { 51, 9 }, { 52, 9 }, { 53, 9 }, { 54, 9 }, - { 55, 9 }, { 56, 9 }, { 57, 9 }, { 58, 9 }, -}; - -static const uint8_t atrac3p_sf_huff4[64][2] = { - { 0, 2 }, { 1, 3 }, { 2, 3 }, { 62, 3 }, { 63, 3 }, { 3, 5 }, - { 4, 5 }, { 60, 5 }, { 61, 5 }, { 5, 7 }, { 58, 7 }, { 59, 7 }, - { 6, 9 }, { 7, 9 }, { 8, 9 }, { 9, 9 }, { 10, 9 }, { 11, 9 }, - { 12, 9 }, { 13, 9 }, { 14, 9 }, { 15, 9 }, { 16, 9 }, { 17, 9 }, - { 18, 9 }, { 19, 9 }, { 20, 9 }, { 21, 9 }, { 22, 9 }, { 23, 9 }, - { 24, 9 }, { 25, 9 }, { 26, 9 }, { 27, 9 }, { 28, 9 }, { 29, 9 }, - { 30, 9 }, { 31, 9 }, { 32, 9 }, { 33, 9 }, { 34, 9 }, { 35, 9 }, - { 36, 9 }, { 37, 9 }, { 38, 9 }, { 39, 9 }, { 40, 9 }, { 41, 9 }, - { 42, 9 }, { 43, 9 }, { 44, 9 }, { 45, 9 }, { 46, 9 }, { 47, 9 }, - { 48, 9 }, { 49, 9 }, { 50, 9 }, { 51, 9 }, { 52, 9 }, { 53, 9 }, - { 54, 9 }, { 55, 9 }, { 56, 9 }, { 57, 9 }, -}; - -static const uint8_t atrac3p_sf_huff5[15][2] = { - { 0, 2 }, { 1, 3 }, { 13, 3 }, { 14, 3 }, { 15, 3 }, { 2, 4 }, - { 12, 4 }, { 3, 6 }, { 4, 6 }, { 5, 6 }, { 6, 6 }, { 7, 6 }, - { 9, 6 }, { 10, 6 }, { 11, 6 }, +static const uint8_t atrac3p_sf_cbs[][12] = { + { 0, 1, 4, 2, 0, 0, 0, 7, 50, 0, 0, 0 }, + { 0, 1, 4, 2, 0, 0, 0, 7, 50, 0, 0, 0 }, + { 1, 0, 2, 0, 4, 0, 2, 1, 54, 0, 0, 0 }, + { 0, 1, 4, 0, 4, 0, 3, 0, 52, 0, 0, 0 }, + { 0, 1, 4, 2, 0, 8, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 4, 2, 0, 8, 0, 0, 0, 0, 0, 0 }, + { 1, 0, 2, 2, 2, 0, 8, 0, 0, 0, 0, 0 }, + { 0, 1, 4, 2, 2, 2, 4, 0, 0, 0, 0, 0 }, }; -static const uint8_t atrac3p_sf_huff6[15][2] = { - { 0, 2 }, { 1, 3 }, { 2, 3 }, { 14, 3 }, { 15, 3 }, { 3, 4 }, - { 13, 4 }, { 4, 6 }, { 5, 6 }, { 6, 6 }, { 7, 6 }, { 9, 6 }, - { 10, 6 }, { 11, 6 }, { 12, 6 }, +static const uint8_t atrac3p_sf_xlats[] = { + /* Scale factor index 1 - 64 entries */ + 0, 1, 61, 62, 63, 2, 60, 3, 4, 5, 6, 57, 58, 59, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + /* Scale factor index 2 - 64 entries */ + 0, 1, 2, 62, 63, 3, 61, 4, 5, 6, 57, 58, 59, 60, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + /* Scale factor index 3 - 64 entries */ + 0, 1, 63, 2, 3, 61, 62, 4, 60, 59, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + /* Scale factor index 4 - 64 entries */ + 0, 1, 2, 62, 63, 3, 4, 60, 61, 5, 58, 59, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + /* Scale factor index 5 - 15 entries */ + 0, 1, 13, 14, 15, 2, 12, 3, 4, 5, 6, 7, 9, 10, 11, + /* Scale factor index 6 - 15 entries */ + 0, 1, 2, 14, 15, 3, 13, 4, 5, 6, 7, 9, 10, 11, 12, + /* Scale factor index 7 - 15 entries */ + 0, 1, 15, 2, 14, 3, 13, 4, 5, 6, 7, 9, 10, 11, 12, + /* Scale factor index 8 - 15 entries */ + 0, 1, 2, 14, 15, 3, 13, 4, 12, 5, 11, 6, 7, 9, 10, }; -static const uint8_t atrac3p_sf_huff7[15][2] = { - { 0, 1 }, { 1, 3 }, { 15, 3 }, { 2, 4 }, { 14, 4 }, { 3, 5 }, - { 13, 5 }, { 4, 7 }, { 5, 7 }, { 6, 7 }, { 7, 7 }, { 9, 7 }, - { 10, 7 }, { 11, 7 }, { 12, 7 }, -}; - -static const uint8_t atrac3p_sf_huff8[15][2] = { - { 0, 2 }, { 1, 3 }, { 2, 3 }, { 14, 3 }, { 15, 3 }, { 3, 4 }, - { 13, 4 }, { 4, 5 }, { 12, 5 }, { 5, 6 }, { 11, 6 }, { 6, 7 }, - { 7, 7 }, { 9, 7 }, { 10, 7 }, -}; - -/** VLC tables for code table indexes */ static const uint8_t atrac3p_ct_huff1[4][2] = { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 3 }, }; From patchwork Tue Nov 10 10:48:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23552 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 AAD91449CC7 for ; Tue, 10 Nov 2020 13:07:07 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CFD1368BECE; Tue, 10 Nov 2020 12:50:50 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 51ECA68BEF8 for ; Tue, 10 Nov 2020 12:50:35 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id c17so12140930wrc.11 for ; Tue, 10 Nov 2020 02:50:35 -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=mOqrVTmugJ56smE1W0l9BxqNCvjEVIY0m9YjZ0p4Rwg=; b=qCxRRGDSAYlBWUo8uBiD5W+HyKMOUYa2z445a3JvZNT8quq/cRZ8rp9oS2d3wlK5XH TRqSqx5MB01w2WIbHncEy72AEdMOHZzPoSRwFC/EvXEeaKDGjD92oL+ymiRFlbGidXx9 dU6bmR0ZlJhv4PSp5fVddyoQprESn1pcci1+GAQoYc0NOKgAwqWyXqyhzDWpq0zTYo99 e02/fLXDH0hJN5+0Dg/LrR3Wq7z2LLEHBT66Zl+IfsM5Etc0VWcKFzDQ18roqgMvA71B cqyezEeEJzDH78icJkLYJZDxKOolMdEZ01pGD4jI/Yjz0IdqIgPugftVLAHEBkqiGDkp 5u0A== 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=mOqrVTmugJ56smE1W0l9BxqNCvjEVIY0m9YjZ0p4Rwg=; b=T505+5G9u7onz5aKfnEiy1L1vgpvkGPsHjlnRcNzFzoK6Ds1M1/luPcXD59LyIGgGu qoqKFs75Lx7m5CFITs4tNRLUqCh/eHMKmHmt/0+9QvY4cuNIjlX9utoViNS0uTjjqG+B FnegzSVqCe3EP/ITPqNxK1LSKDhnUb65kDO5MDL8SBURxBOhDUGjOsm1R0lK/EpB99wa PGwcxeOLAD7sX3lzCglfL7ficT40zCQUYOiIO0CT6LswltkH7SfPsE97E26aKf4mE330 jnCe9RxzZQ12JOwxLNC5+tSfuepU8LhN4uWrxyEVx53OodjkZ/Jq/RPN4eOC8BtrL6s+ ZN3Q== X-Gm-Message-State: AOAM532ZpGQjKwgqv5wVpYIr+vvg8R4DaGC2L3nbUOYt6C2KqINSUHm1 gtbkh5338NK4L1jqQds4WIht9fnBaOY= X-Google-Smtp-Source: ABdhPJxf/L07ku/HllCZpYgn8vEsfWdjaU2Cy67fOn/iJGdip9PC4qzQNtghvlj0OgkU90pgNzDT+g== X-Received: by 2002:a5d:4448:: with SMTP id x8mr22816833wrr.364.1605005434340; Tue, 10 Nov 2020 02:50:34 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:33 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:13 +0100 Message-Id: <20201110104851.321029-77-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 076/114] avcodec/vc1: Already offset subblock VLC tables during init 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" Offseting by +1 is possible without adding dummy elements to the beginning of the codes and lengths tables by switching to ff_init_vlc_from_lengths() as this allows one to set the symbols arbitrarily without incurring any penalty. Signed-off-by: Andreas Rheinhardt --- I wonder whether the tables used to initialize VC1 VLCs should not be put into a header of their own that is only included by vc1.c (the only user of them) instead of vc1data.c. Given that I already touch all of them, I could do it. What do other think of this? libavcodec/vc1.c | 7 ++++--- libavcodec/vc1_block.c | 2 +- libavcodec/vc1data.c | 27 +++++++++++++++++---------- libavcodec/vc1data.h | 5 ++--- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 9df778bcab..68180dc797 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -1616,9 +1616,10 @@ av_cold int ff_vc1_init_common(VC1Context *v) ff_vc1_ttblk_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); ff_vc1_subblkpat_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 2]]; ff_vc1_subblkpat_vlc[i].table_allocated = vlc_offs[i * 3 + 3] - vlc_offs[i * 3 + 2]; - init_vlc(&ff_vc1_subblkpat_vlc[i], VC1_SUBBLKPAT_VLC_BITS, 15, - ff_vc1_subblkpat_bits[i], 1, 1, - ff_vc1_subblkpat_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_subblkpat_vlc[i], VC1_SUBBLKPAT_VLC_BITS, 15, + &ff_vc1_subblkpat_tabs[i][0][1], 2, + &ff_vc1_subblkpat_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); } for (i = 0; i < 4; i++) { ff_vc1_4mv_block_pattern_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 9]]; diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 5c33170933..b8987b0015 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -1143,7 +1143,7 @@ static int vc1_decode_p_block(VC1Context *v, int16_t block[64], int n, ttblk = ff_vc1_ttblk_to_tt[v->tt_index][get_vlc2(gb, ff_vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1)]; } if (ttblk == TT_4X4) { - subblkpat = ~(get_vlc2(gb, ff_vc1_subblkpat_vlc[v->tt_index].table, VC1_SUBBLKPAT_VLC_BITS, 1) + 1); + subblkpat = ~get_vlc2(gb, ff_vc1_subblkpat_vlc[v->tt_index].table, VC1_SUBBLKPAT_VLC_BITS, 1); } if ((ttblk != TT_8X8 && ttblk != TT_4X4) && ((v->ttmbf || (ttmb != -1 && (ttmb & 8) && !first_block)) diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c index 19f1cad45f..e92d9b7310 100644 --- a/libavcodec/vc1data.c +++ b/libavcodec/vc1data.c @@ -921,16 +921,23 @@ const uint8_t ff_vc1_ttblk_bits[3][8] = { { 2, 3, 3, 3, 3, 3, 4, 4 } }; -/* SUBBLKPAT tables, p93-94, reordered */ -const uint8_t ff_vc1_subblkpat_codes[3][15] = { - { 14, 12, 7, 11, 9, 26, 2, 10, 27, 8, 0, 6, 1, 15, 1 }, - { 14, 0, 8, 15, 10, 4, 23, 13, 5, 9, 25, 3, 24, 22, 1 }, - { 5, 6, 2, 2, 8, 0, 28, 3, 1, 3, 29, 1, 19, 18, 15 } -}; -const uint8_t ff_vc1_subblkpat_bits[3][15] = { - { 5, 5, 5, 5, 5, 6, 4, 5, 6, 5, 4, 5, 4, 5, 1}, - { 4, 3, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 2}, - { 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4} +/* SUBBLKPAT tables, p93-94, reordered and offset by 1 */ +const uint8_t ff_vc1_subblkpat_tabs[3][15][2] = { + { + { 0x0B, 4 }, { 0x0D, 4 }, { 0x07, 4 }, { 0x0C, 5 }, { 0x03, 5 }, + { 0x0A, 5 }, { 0x05, 5 }, { 0x08, 5 }, { 0x04, 5 }, { 0x02, 5 }, + { 0x06, 6 }, { 0x09, 6 }, { 0x01, 5 }, { 0x0E, 5 }, { 0x0F, 1 }, + }, + { + { 0x02, 3 }, { 0x06, 5 }, { 0x09, 5 }, { 0x0C, 4 }, { 0x0F, 2 }, + { 0x03, 4 }, { 0x0A, 4 }, { 0x05, 4 }, { 0x0E, 5 }, { 0x07, 5 }, + { 0x0D, 5 }, { 0x0B, 5 }, { 0x08, 4 }, { 0x01, 4 }, { 0x04, 4 }, + }, + { + { 0x06, 5 }, { 0x09, 5 }, { 0x0C, 4 }, { 0x03, 4 }, { 0x0A, 4 }, + { 0x04, 3 }, { 0x08, 3 }, { 0x05, 4 }, { 0x0E, 5 }, { 0x0D, 5 }, + { 0x01, 3 }, { 0x02, 3 }, { 0x07, 5 }, { 0x0B, 5 }, { 0x0F, 4 }, + } }; /* MV differential tables, p265 */ diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h index 90dd8baf61..6b141b0f76 100644 --- a/libavcodec/vc1data.h +++ b/libavcodec/vc1data.h @@ -152,9 +152,8 @@ extern const uint8_t ff_vc1_ttmb_bits[3][16]; extern const uint8_t ff_vc1_ttblk_codes[3][8]; extern const uint8_t ff_vc1_ttblk_bits[3][8]; -/* SUBBLKPAT tables, p93-94, reordered */ -extern const uint8_t ff_vc1_subblkpat_codes[3][15]; -extern const uint8_t ff_vc1_subblkpat_bits[3][15]; +/* SUBBLKPAT tables, p93-94, reordered and offset by 1 */ +extern const uint8_t ff_vc1_subblkpat_tabs[3][15][2]; /* MV differential tables, p265 */ extern const uint16_t ff_vc1_mv_diff_codes[4][73]; From patchwork Tue Nov 10 10:48:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23481 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 F1755449E81 for ; Tue, 10 Nov 2020 12:50:51 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D42E368BF0F; Tue, 10 Nov 2020 12:50:51 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2964568BF24 for ; Tue, 10 Nov 2020 12:50:36 +0200 (EET) Received: by mail-wm1-f65.google.com with SMTP id w24so2553661wmi.0 for ; Tue, 10 Nov 2020 02:50:36 -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=XKUpVuhPmO6pLszGQhjoSyeVy1gzcB+SMoRitA9UfJk=; b=D12yVn2bCosOHJB1FqR7IJTsNaXJRypHMb5nDrXA2q7d1Fk+F+S1nbojpoMWrsmiza raDImI/YF4oimhcmWmsXnYERDaOLw7LHkel81bXNCSdNvKCEBdt2UzGKZoSkQ913JkGY VpFkhUN0uZ/zJBx8zOyIVUErvsA+/Gk9kSXGrIPQlG1s7Ce6igZT+KrQCyDRj6jkgMVZ XOEX9vHMH+ERF674AX/2DSRpHpm4ksm4HgDwlpbN+ojEpE1SSZ/fcnSRnMdXhZXAhtae RHiTjmaD8DHcjFjp23KbS2/KyhUoYWyiYDRk3jcg84i6PqoExboUYEju1tiDsA0je7VW 5a5g== 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=XKUpVuhPmO6pLszGQhjoSyeVy1gzcB+SMoRitA9UfJk=; b=Kt4ET9rWMFEh35VcxItLsXN8ktTR6ajZc+HE49sZ+xUZY3X+2Pqrx3KyCYNwJI6Oo6 fKw+QJe1gr1u0/aXAl0qfoKEAkHsBmi+85aaQFUY0PNFGdBibOwH12tG6+HoN7G3wWuv HGOeIbndbd2eyqOGXnSHXQp5VFeZnX12cAabTFzAxS6CJwYAmq/lPzg9bqokzlI40G0r 4cVOcMpzU2Q+7JE3fdqfFLG/bAmzVQSG4vhjp+UZ0hI2MSzjfVX9LWu0p6Vblnnsf0CI eKe/jCmaXdnB4pIreJ2BdNRTALypi9AxkYcpDSJPXKjzsVNQ18n801XDXu0/S57qd6xD E+vg== X-Gm-Message-State: AOAM533FmNtNLDW2SQuKlnwckyZP6lBgXwNiBOi5720cHxbXYCzIjOxn 5sp/2cu3836GQJGh5mAxPOdkQ1c/xQE= X-Google-Smtp-Source: ABdhPJxxP0tDqGCZRm2YUdFtidqmyjn4WAe1Y5vKMHvlyd7710Es4XjQWiz+H66a3J0wts71uYkRkQ== X-Received: by 2002:a1c:1982:: with SMTP id 124mr4006135wmz.74.1605005435326; Tue, 10 Nov 2020 02:50:35 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:34 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:14 +0100 Message-Id: <20201110104851.321029-78-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 077/114] avcodec/vc1: Use symbols table for VLC for Block-level Transform Type 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" Expressions like array[get_vlc2()] can be optimized by using a symbols table if the array is always the same for a given VLC. This requirement is fulfilled for the VLC for the Block-level Transform Type and therefore this commit implements this; switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths() means that we can also remove the codes table in the process which had the same size as the new symbols table; the array used to translate the get_vlc2() values to the desired form has also been removed, saving space. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1.c | 7 ++++--- libavcodec/vc1_block.c | 2 +- libavcodec/vc1data.c | 30 +++++++++++++----------------- libavcodec/vc1data.h | 6 +----- 4 files changed, 19 insertions(+), 26 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 68180dc797..68855ae1d5 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -1611,9 +1611,10 @@ av_cold int ff_vc1_init_common(VC1Context *v) ff_vc1_ttmb_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); ff_vc1_ttblk_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 1]]; ff_vc1_ttblk_vlc[i].table_allocated = vlc_offs[i * 3 + 2] - vlc_offs[i * 3 + 1]; - init_vlc(&ff_vc1_ttblk_vlc[i], VC1_TTBLK_VLC_BITS, 8, - ff_vc1_ttblk_bits[i], 1, 1, - ff_vc1_ttblk_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_ttblk_vlc[i], VC1_TTBLK_VLC_BITS, 8, + &ff_vc1_ttblk_tabs[i][0][1], 2, + &ff_vc1_ttblk_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); ff_vc1_subblkpat_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 2]]; ff_vc1_subblkpat_vlc[i].table_allocated = vlc_offs[i * 3 + 3] - vlc_offs[i * 3 + 2]; ff_init_vlc_from_lengths(&ff_vc1_subblkpat_vlc[i], VC1_SUBBLKPAT_VLC_BITS, 15, diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index b8987b0015..da58a0738f 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -1140,7 +1140,7 @@ static int vc1_decode_p_block(VC1Context *v, int16_t block[64], int n, s->bdsp.clear_block(block); if (ttmb == -1) { - ttblk = ff_vc1_ttblk_to_tt[v->tt_index][get_vlc2(gb, ff_vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1)]; + ttblk = get_vlc2(gb, ff_vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1); } if (ttblk == TT_4X4) { subblkpat = ~get_vlc2(gb, ff_vc1_subblkpat_vlc[v->tt_index].table, VC1_SUBBLKPAT_VLC_BITS, 1); diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c index e92d9b7310..ed5e680527 100644 --- a/libavcodec/vc1data.c +++ b/libavcodec/vc1data.c @@ -30,13 +30,6 @@ #include "vc1.h" #include "vc1data.h" -/** Table for conversion between TTBLK and TTMB */ -const int ff_vc1_ttblk_to_tt[3][8] = { - { TT_8X4, TT_4X8, TT_8X8, TT_4X4, TT_8X4_TOP, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT }, - { TT_8X8, TT_4X8_RIGHT, TT_4X8_LEFT, TT_4X4, TT_8X4, TT_4X8, TT_8X4_BOTTOM, TT_8X4_TOP }, - { TT_8X8, TT_4X8, TT_4X4, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT, TT_8X4, TT_8X4_TOP } -}; - const int ff_vc1_ttfrm_to_tt[4] = { TT_8X8, TT_8X4, TT_4X8, TT_4X4 }; /** MV P mode - the 5th element is only used for mode 1 */ @@ -908,17 +901,20 @@ const uint8_t ff_vc1_ttmb_bits[3][16] = { 11 } }; - /* TTBLK (Transform Type per Block) tables */ -const uint8_t ff_vc1_ttblk_codes[3][8] = { - { 0, 1, 3, 5, 16, 17, 18, 19 }, - { 3, 0, 1, 2, 3, 5, 8, 9 }, - { 1, 0, 1, 4, 6, 7, 10, 11 } -}; -const uint8_t ff_vc1_ttblk_bits[3][8] = { - { 2, 2, 2, 3, 5, 5, 5, 5 }, - { 2, 3, 3, 3, 3, 3, 4, 4 }, - { 2, 3, 3, 3, 3, 3, 4, 4 } +const uint8_t ff_vc1_ttblk_tabs[3][8][2] = { + { + { TT_8X4, 2 }, { TT_4X8, 2 }, { TT_8X4_TOP, 5 }, { TT_8X4_BOTTOM, 5 }, + { TT_4X8_RIGHT, 5 }, { TT_4X8_LEFT, 5 }, { TT_4X4, 3 }, { TT_8X8, 2 }, + }, + { + { TT_4X8_RIGHT, 3 }, { TT_4X8_LEFT, 3 }, { TT_4X4, 3 }, { TT_8X4, 3 }, + { TT_8X4_BOTTOM, 4 }, { TT_8X4_TOP, 4 }, { TT_4X8, 3 }, { TT_8X8, 2 }, + }, + { + { TT_4X8, 3 }, { TT_4X4, 3 }, { TT_8X8, 2 }, { TT_8X4_BOTTOM, 3 }, + { TT_8X4, 4 }, { TT_8X4_TOP, 4 }, { TT_4X8_RIGHT, 3 }, { TT_4X8_LEFT, 3 }, + }, }; /* SUBBLKPAT tables, p93-94, reordered and offset by 1 */ diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h index 6b141b0f76..92d6374cb2 100644 --- a/libavcodec/vc1data.h +++ b/libavcodec/vc1data.h @@ -34,9 +34,6 @@ #include "vlc.h" -/** Table for conversion between TTBLK and TTMB */ -extern const int ff_vc1_ttblk_to_tt[3][8]; - extern const int ff_vc1_ttfrm_to_tt[4]; /** MV P mode - the 5th element is only used for mode 1 */ @@ -149,8 +146,7 @@ extern const uint16_t ff_vc1_ttmb_codes[3][16]; extern const uint8_t ff_vc1_ttmb_bits[3][16]; /* TTBLK (Transform Type per Block) tables */ -extern const uint8_t ff_vc1_ttblk_codes[3][8]; -extern const uint8_t ff_vc1_ttblk_bits[3][8]; +extern const uint8_t ff_vc1_ttblk_tabs[3][8][2]; /* SUBBLKPAT tables, p93-94, reordered and offset by 1 */ extern const uint8_t ff_vc1_subblkpat_tabs[3][15][2]; From patchwork Tue Nov 10 10:48:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23554 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 4FF5F449CC7 for ; Tue, 10 Nov 2020 13:07:53 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9215068BF3A; Tue, 10 Nov 2020 12:50:53 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7E16E68BD97 for ; Tue, 10 Nov 2020 12:50:38 +0200 (EET) Received: by mail-wr1-f68.google.com with SMTP id p1so12129495wrf.12 for ; Tue, 10 Nov 2020 02:50:38 -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=e25Dk1qb1u/J386QSfyIWmhJekt70yaQTZ/Og3yRLLc=; b=nGDbfUalDYMmz+hXrkst3OATCgIBrYuOREi60L7qB5BHBoDUVSZJgG5brGQumOXCLH goHkngD3J6btW9evnJNWDTYp9GYnP7/izEd8kYyyWXEUP1Ba8frjEJ9mQwNxb+XmFl5v teJ52k7/9gp2Cwh3A0WZ0glYO+57cYSk9UBtAVXoj2740au1lbvXG0tIK/Gg4GvaMx3V qpi1lsZ7SBO00stRtdR2v6jdWlHrBFYyiNHd6H0Q2o/cY69bc5cdCMtawog3AAqH2ek7 IYV24Bq99TMMNs5xCb3Oq5R077nk0I7DGwO21jIwBdau8G7KE36Y3bt8KIn0uYDrc+em GuJw== 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=e25Dk1qb1u/J386QSfyIWmhJekt70yaQTZ/Og3yRLLc=; b=bZDfA67yAKXolNdHjrkPDQP/I0YC2JFfjGmfbZln/H5Ke2DWPfxuSOuQhP0zBpYV5E MeLWrVKTot80OmPxdqlGiDP6sgzey9Je9IgMMy/cYJ3CsNbBKJ05IOGLYeqYR9PGwv15 JtOk8h8oQibRrP2LERxOHHnDDbNKIsSlU3juxw9a+IR4GXP/P86n/vl2UDtLnndfG4m8 L/0A7VJu0WF7510VcBK1ZcxaeHh6N2Lu0xBsNbOXnPMrw5c4fooHic93l5VZ9qwC7Xb7 Ox6xu3aSffszCd6Z8jN80mLnpPlyCvz2gn+dhcMfbIOGW6fT8k9i58aE5SY/TeW/C3BG 6TgA== X-Gm-Message-State: AOAM532C2jxMyq/xQvj/BDQJzt95ZFHy4erz2Uqs0p2F0YxNsfAMdtRV m0gJCWR7CR9wb212Mzl4WThLzYZcIGc= X-Google-Smtp-Source: ABdhPJxDaLQlOzB/90BFTrAxGOdRD0eUo090yCPS1ykJeZF0fFLr4UAT60i8q9qLhI0f4qTgtqU2Bw== X-Received: by 2002:a5d:4e48:: with SMTP id r8mr22096915wrt.141.1605005436379; Tue, 10 Nov 2020 02:50:36 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:35 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:15 +0100 Message-Id: <20201110104851.321029-79-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 078/114] avcodec/vc1: Use a symbols table to decode interlaced MV vector 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" The VC1 decoder currently follows the spec very closely when decoding interlaced MV vector variable-length codes: The spec uses tables with contiguous indexes. The last of these is an escape code, for every other two values are encoded via (index + 1) / 9 and (index + 1) % 9. The decoder did exactly this. This necessitated a branch to find out what the current escape code was as well as the actual division/modulo. This commit changes this by using an explicit symbols table for the VLCs. The symbols are chosen so that the escape code always has the value 0 (obviating the branch) and so that for every other code the low nibble of the corresponding symbol contains (index + 1) % 9 whereas the high nibble contains (index + 1) / 9. Furthermore, the VLCs are now initialized with ff_init_vlc_from_lengths(); this allows to replace the uint32_t tables of codes by uint8_t tables of symbols, thereby saving space on top of all the other improvements. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1.c | 14 +- libavcodec/vc1_block.c | 16 +- libavcodec/vc1data.c | 594 ++++++++++++++++++++--------------------- libavcodec/vc1data.h | 12 +- 4 files changed, 313 insertions(+), 323 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 68855ae1d5..2e39870057 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -1648,9 +1648,10 @@ av_cold int ff_vc1_init_common(VC1Context *v) /* initialize interlaced MVDATA tables (2-Ref) */ ff_vc1_2ref_mvdata_vlc[i].table = &vlc_table[vlc_offs[i * 2 + 22]]; ff_vc1_2ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 2 + 23] - vlc_offs[i * 2 + 22]; - init_vlc(&ff_vc1_2ref_mvdata_vlc[i], VC1_2REF_MVDATA_VLC_BITS, 126, - ff_vc1_2ref_mvdata_bits[i], 1, 1, - ff_vc1_2ref_mvdata_codes[i], 4, 4, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_2ref_mvdata_vlc[i], VC1_2REF_MVDATA_VLC_BITS, 126, + &ff_vc1_2ref_mvdata_tabs[i][0][1], 2, + &ff_vc1_2ref_mvdata_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); } for (i = 0; i < 4; i++) { /* initialize 4MV MBMODE VLC tables for interlaced frame P picture */ @@ -1668,9 +1669,10 @@ av_cold int ff_vc1_init_common(VC1Context *v) /* initialize interlaced MVDATA tables (1-Ref) */ ff_vc1_1ref_mvdata_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 39]]; ff_vc1_1ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 3 + 40] - vlc_offs[i * 3 + 39]; - init_vlc(&ff_vc1_1ref_mvdata_vlc[i], VC1_1REF_MVDATA_VLC_BITS, 72, - ff_vc1_1ref_mvdata_bits[i], 1, 1, - ff_vc1_1ref_mvdata_codes[i], 4, 4, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_1ref_mvdata_vlc[i], VC1_1REF_MVDATA_VLC_BITS, 72, + &ff_vc1_1ref_mvdata_tabs[i][0][1], 2, + &ff_vc1_1ref_mvdata_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); } for (i = 0; i < 4; i++) { /* Initialize 2MV Block pattern VLC tables */ diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index da58a0738f..ed6df541cf 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -265,20 +265,13 @@ static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x, int index, index1; int extend_x, extend_y; GetBitContext *gb = &v->s.gb; - int bits, esc; + int bits = v->numref ? VC1_2REF_MVDATA_VLC_BITS : VC1_1REF_MVDATA_VLC_BITS; int val, sign; - if (v->numref) { - bits = VC1_2REF_MVDATA_VLC_BITS; - esc = 125; - } else { - bits = VC1_1REF_MVDATA_VLC_BITS; - esc = 71; - } extend_x = v->dmvrange & 1; extend_y = (v->dmvrange >> 1) & 1; index = get_vlc2(gb, v->imv_vlc->table, bits, 3); - if (index == esc) { + if (!index) { *dmv_x = get_bits(gb, v->k_x); *dmv_y = get_bits(gb, v->k_y); if (v->numref) { @@ -288,15 +281,14 @@ static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x, } } else { - av_assert0(index < esc); - index1 = (index + 1) % 9; + index1 = index & 0xF; if (index1 != 0) { val = get_bits(gb, index1 + extend_x); sign = 0 - (val & 1); *dmv_x = (sign ^ ((val >> 1) + offset_table[extend_x][index1])) - sign; } else *dmv_x = 0; - index1 = (index + 1) / 9; + index1 = index >> 4; if (index1 > v->numref) { val = get_bits(gb, (index1 >> v->numref) + extend_y); sign = 0 - (val & 1); diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c index ed5e680527..de41afdc81 100644 --- a/libavcodec/vc1data.c +++ b/libavcodec/vc1data.c @@ -333,309 +333,303 @@ const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6] = { /* Interlaced frame/field picture MVDATA VLC tables */ /* 1-reference tables */ -const uint32_t ff_vc1_1ref_mvdata_codes[4][72] = { /* uint32_t may be too big */ - { - 0x00005, 0x0000C, 0x0001E, 0x00012, 0x0000C, 0x00034, 0x00075, 0x00070, - 0x00000, 0x00008, 0x0001B, 0x00008, 0x0001D, 0x0007C, 0x000D6, 0x001DE, - 0x001AF, 0x00005, 0x0001B, 0x00026, 0x0001E, 0x00012, 0x00076, 0x0004D, - 0x001F6, 0x001F4, 0x00039, 0x0007F, 0x00027, 0x0006A, 0x00071, 0x00035, - 0x00071, 0x00068, 0x001DC, 0x00027, 0x00073, 0x000FF, 0x000E8, 0x000E9, - 0x0007E, 0x001F9, 0x001F5, 0x001FD, 0x0003E, 0x001CA, 0x003F9, 0x0004C, - 0x00069, 0x001FA, 0x001DF, 0x001F7, 0x00070, 0x001DD, 0x00E4D, 0x00727, - 0x00392, 0x001C8, 0x001CB, 0x003F8, 0x001AE, 0x001F8, 0x001FB, 0x0E4CE, - 0x0E4CF, 0x07260, 0x07261, 0x07262, 0x07263, 0x07264, 0x07265, 0x07266 - }, - { - 0x00007, 0x00001, 0x00007, 0x00016, 0x00001, 0x00045, 0x00018, 0x002B6, - 0x00006, 0x00004, 0x00017, 0x00010, 0x00029, 0x0002C, 0x0015A, 0x00066, - 0x0019E, 0x00009, 0x00028, 0x00017, 0x00000, 0x0002A, 0x00004, 0x0005B, - 0x000B5, 0x000CE, 0x00006, 0x00044, 0x0000F, 0x00046, 0x0000E, 0x000AC, - 0x00032, 0x00037, 0x011EB, 0x0000A, 0x0001A, 0x0011F, 0x00016, 0x00014, - 0x0002B, 0x00168, 0x00055, 0x023D5, 0x00057, 0x0002F, 0x00036, 0x0002E, - 0x00169, 0x00054, 0x0047B, 0x0019F, 0x02B7D, 0x0008E, 0x00ADE, 0x00479, - 0x0056E, 0x008F4, 0x015BF, 0x00478, 0x023D4, 0x0ADF1, 0x056F9, 0xADF0E, - 0xADF0F, 0x56F80, 0x56F81, 0x56F82, 0x56F83, 0x56F84, 0x56F85, 0x56F86 - }, - { - 0x00002, 0x00006, 0x00007, 0x0000D, 0x00007, 0x00030, 0x000FF, 0x001F0, - 0x00002, 0x00000, 0x00005, 0x00019, 0x0001E, 0x00007, 0x00063, 0x000FD, - 0x00023, 0x0000E, 0x0001B, 0x0001A, 0x00006, 0x00009, 0x00018, 0x000C5, - 0x00033, 0x001F1, 0x00002, 0x003FB, 0x001F3, 0x00022, 0x001FC, 0x00042, - 0x00623, 0x00083, 0x00620, 0x0007D, 0x00040, 0x00043, 0x003E4, 0x003E5, - 0x00191, 0x00FE9, 0x00105, 0x00208, 0x000FC, 0x00624, 0x00622, 0x00190, - 0x00626, 0x007F5, 0x00C4B, 0x01FD0, 0x0104D, 0x00065, 0x00C42, 0x000C9, - 0x00627, 0x00C43, 0x00C4A, 0x0104E, 0x01FD1, 0x0104F, 0x00412, 0x104CE, - 0x104CF, 0x08260, 0x08261, 0x08262, 0x08263, 0x08264, 0x08265, 0x08266 - }, - { - 0x0000D, 0x00001, 0x00004, 0x00000, 0x00017, 0x00005, 0x0007F, 0x0004D, - 0x00003, 0x00011, 0x0003E, 0x0003B, 0x00017, 0x00067, 0x0004A, 0x000C3, - 0x000F2, 0x0000A, 0x0002C, 0x00032, 0x0003D, 0x00015, 0x00028, 0x00093, - 0x000CC, 0x00096, 0x00003, 0x00075, 0x00020, 0x0002D, 0x00021, 0x00029, - 0x00090, 0x001D0, 0x001FB, 0x0001C, 0x0004C, 0x00060, 0x00009, 0x00008, - 0x0002D, 0x0009F, 0x001FA, 0x0013D, 0x00031, 0x000FC, 0x00058, 0x00092, - 0x000F0, 0x000F1, 0x000CD, 0x00185, 0x00165, 0x0004E, 0x00091, 0x000E9, - 0x00184, 0x001D1, 0x001E6, 0x00097, 0x001E7, 0x000B3, 0x0013C, 0x0164E, - 0x0164F, 0x00B20, 0x00B21, 0x00B22, 0x00B23, 0x00B24, 0x00B25, 0x00B26 - } -}; - -const uint8_t ff_vc1_1ref_mvdata_bits[4][72] = { - { - 3, 4, 5, 5, 5, 6, 7, 7, 2, 4, 5, 5, 6, 7, 8, 9, 9, 4, - 6, 6, 6, 6, 7, 8, 9, 9, 6, 8, 7, 7, 7, 7, 8, 8, 9, 6, - 8, 8, 8, 8, 8, 9, 9, 9, 7, 10, 10, 8, 8, 9, 9, 9, 8, 9, - 13, 12, 11, 10, 10, 10, 9, 9, 9, 17, 17, 16, 16, 16, 16, 16, 16, 16 - }, - { - 3, 3, 4, 5, 5, 7, 8, 10, 3, 4, 5, 5, 6, 7, 9, 10, 12, 4, - 6, 6, 5, 6, 6, 8, 9, 11, 4, 7, 7, 7, 7, 8, 9, 9, 13, 5, - 8, 9, 8, 8, 9, 10, 10, 14, 7, 9, 9, 9, 10, 10, 11, 12, 14, 8, - 12, 11, 11, 12, 13, 11, 14, 16, 15, 20, 20, 19, 19, 19, 19, 19, 19, 19 - }, - { - 3, 4, 4, 4, 5, 6, 8, 9, 2, 4, 5, 5, 5, 6, 7, 8, 8, 4, - 7, 7, 6, 6, 7, 8, 8, 9, 5, 10, 9, 8, 9, 9, 11, 10, 11, 7, - 9, 9, 10, 10, 11, 12, 11, 12, 8, 11, 11, 11, 11, 11, 12, 13, 15, 9, - 12, 10, 11, 12, 12, 15, 13, 15, 13, 19, 19, 18, 18, 18, 18, 18, 18, 18 - }, - { - 4, 4, 4, 4, 5, 5, 7, 7, 3, 5, 6, 6, 6, 7, 7, 8, 8, 4, - 6, 6, 6, 6, 7, 8, 8, 8, 4, 7, 6, 6, 6, 7, 8, 9, 9, 5, - 7, 7, 6, 6, 7, 8, 9, 9, 6, 8, 8, 8, 8, 8, 8, 9, 10, 7, - 8, 8, 9, 9, 9, 8, 9, 9, 9, 14, 14, 13, 13, 13, 13, 13, 13, 13 - } +const uint8_t ff_vc1_1ref_mvdata_tabs[4][72][2] = { + { + { 0x10, 2 }, { 0x13, 5 }, { 0x24, 6 }, { 0x53, 8 }, { 0x26, 8 }, + { 0x32, 7 }, { 0x20, 4 }, { 0x05, 5 }, { 0x37, 8 }, { 0x54, 8 }, + { 0x35, 7 }, { 0x21, 6 }, { 0x58, 8 }, { 0x36, 8 }, { 0x64, 10 }, + { 0x63, 11 }, { 0x73, 16 }, { 0x74, 16 }, { 0x75, 16 }, { 0x76, 16 }, + { 0x77, 16 }, { 0x78, 16 }, { 0, 16 }, { 0x71, 17 }, { 0x72, 17 }, + { 0x61, 13 }, { 0x62, 12 }, { 0x51, 10 }, { 0x65, 10 }, { 0x41, 8 }, + { 0x14, 6 }, { 0x23, 6 }, { 0x50, 7 }, { 0x45, 8 }, { 0x31, 8 }, + { 0x11, 4 }, { 0x04, 5 }, { 0x22, 6 }, { 0x40, 6 }, { 0x01, 3 }, + { 0x02, 4 }, { 0x06, 6 }, { 0x33, 7 }, { 0x16, 8 }, { 0x67, 9 }, + { 0x18, 9 }, { 0x12, 5 }, { 0x08, 7 }, { 0x34, 7 }, { 0x30, 6 }, + { 0x43, 8 }, { 0x44, 8 }, { 0x07, 7 }, { 0x25, 7 }, { 0x38, 9 }, + { 0x60, 9 }, { 0x17, 9 }, { 0x56, 9 }, { 0x03, 5 }, { 0x15, 7 }, + { 0x28, 9 }, { 0x47, 9 }, { 0x27, 9 }, { 0x57, 9 }, { 0x68, 9 }, + { 0x46, 9 }, { 0x55, 9 }, { 0x70, 9 }, { 0x66, 10 }, { 0x52, 10 }, + { 0x48, 9 }, { 0x42, 8 }, + }, + { + { 0x23, 5 }, { 0x05, 5 }, { 0x25, 6 }, { 0x44, 8 }, { 0x55, 10 }, + { 0x47, 10 }, { 0x45, 9 }, { 0x43, 8 }, { 0x53, 9 }, { 0x51, 9 }, + { 0x07, 8 }, { 0x36, 9 }, { 0x17, 10 }, { 0x28, 11 }, { 0x18, 12 }, + { 0x57, 12 }, { 0x41, 8 }, { 0x52, 9 }, { 0x37, 9 }, { 0x34, 7 }, + { 0x32, 7 }, { 0x02, 3 }, { 0x11, 4 }, { 0x40, 5 }, { 0x15, 7 }, + { 0x46, 10 }, { 0x54, 10 }, { 0x27, 9 }, { 0x26, 8 }, { 0x22, 6 }, + { 0x30, 4 }, { 0x03, 4 }, { 0x13, 5 }, { 0x31, 7 }, { 0x06, 7 }, + { 0x33, 7 }, { 0x60, 8 }, { 0x66, 11 }, { 0x62, 11 }, { 0x64, 12 }, + { 0x67, 14 }, { 0x48, 14 }, { 0x38, 13 }, { 0x56, 11 }, { 0x42, 9 }, + { 0x20, 4 }, { 0x21, 6 }, { 0x14, 6 }, { 0x24, 6 }, { 0x35, 8 }, + { 0x16, 9 }, { 0x08, 10 }, { 0x63, 11 }, { 0x61, 12 }, { 0x73, 19 }, + { 0x74, 19 }, { 0x75, 19 }, { 0x76, 19 }, { 0x77, 19 }, { 0x78, 19 }, + { 0, 19 }, { 0x71, 20 }, { 0x72, 20 }, { 0x68, 16 }, { 0x70, 15 }, + { 0x58, 14 }, { 0x65, 13 }, { 0x50, 7 }, { 0x04, 5 }, { 0x12, 5 }, + { 0x10, 3 }, { 0x01, 3 }, + }, + { + { 0x11, 4 }, { 0x30, 5 }, { 0x23, 6 }, { 0x15, 6 }, { 0x41, 9 }, + { 0x48, 12 }, { 0x70, 13 }, { 0x73, 18 }, { 0x74, 18 }, { 0x75, 18 }, + { 0x76, 18 }, { 0x77, 18 }, { 0x78, 18 }, { 0, 18 }, { 0x71, 19 }, + { 0x72, 19 }, { 0x58, 15 }, { 0x66, 15 }, { 0x68, 15 }, { 0x47, 11 }, + { 0x37, 10 }, { 0x35, 9 }, { 0x42, 9 }, { 0x33, 8 }, { 0x18, 8 }, + { 0x24, 6 }, { 0x12, 5 }, { 0x25, 7 }, { 0x53, 11 }, { 0x45, 11 }, + { 0x62, 10 }, { 0x60, 9 }, { 0x27, 8 }, { 0x22, 7 }, { 0x21, 7 }, + { 0x05, 5 }, { 0x01, 3 }, { 0x02, 4 }, { 0x03, 4 }, { 0x10, 2 }, + { 0x06, 6 }, { 0x38, 11 }, { 0x61, 12 }, { 0x64, 12 }, { 0x52, 11 }, + { 0x36, 11 }, { 0x51, 11 }, { 0x65, 12 }, { 0x56, 12 }, { 0x54, 11 }, + { 0x63, 11 }, { 0x26, 8 }, { 0x16, 7 }, { 0x13, 5 }, { 0x04, 4 }, + { 0x20, 4 }, { 0x14, 5 }, { 0x08, 9 }, { 0x28, 9 }, { 0x43, 10 }, + { 0x44, 10 }, { 0x32, 9 }, { 0x40, 7 }, { 0x50, 8 }, { 0x17, 8 }, + { 0x34, 9 }, { 0x57, 13 }, { 0x67, 13 }, { 0x46, 12 }, { 0x55, 11 }, + { 0x31, 10 }, { 0x07, 8 }, + }, + { + { 0x04, 4 }, { 0x02, 4 }, { 0x44, 6 }, { 0x43, 6 }, { 0x06, 5 }, + { 0x30, 4 }, { 0x03, 4 }, { 0x25, 7 }, { 0x35, 7 }, { 0x24, 6 }, + { 0x52, 8 }, { 0x73, 13 }, { 0x74, 13 }, { 0x75, 13 }, { 0x76, 13 }, + { 0x77, 13 }, { 0x78, 13 }, { 0, 13 }, { 0x71, 14 }, { 0x72, 14 }, + { 0x58, 10 }, { 0x68, 9 }, { 0x45, 7 }, { 0x14, 6 }, { 0x10, 3 }, + { 0x32, 6 }, { 0x34, 6 }, { 0x11, 5 }, { 0x36, 8 }, { 0x61, 8 }, + { 0x53, 8 }, { 0x26, 8 }, { 0x16, 7 }, { 0x28, 8 }, { 0x66, 8 }, + { 0x41, 7 }, { 0x08, 7 }, { 0x60, 7 }, { 0x70, 9 }, { 0x48, 9 }, + { 0x46, 8 }, { 0x20, 4 }, { 0x21, 6 }, { 0x33, 6 }, { 0x05, 5 }, + { 0x42, 7 }, { 0x63, 9 }, { 0x57, 9 }, { 0x17, 8 }, { 0x50, 6 }, + { 0x22, 6 }, { 0x27, 8 }, { 0x56, 8 }, { 0x15, 7 }, { 0x01, 4 }, + { 0x40, 5 }, { 0x37, 9 }, { 0x64, 9 }, { 0x62, 8 }, { 0x31, 7 }, + { 0x13, 6 }, { 0x54, 8 }, { 0x55, 8 }, { 0x18, 8 }, { 0x65, 9 }, + { 0x67, 9 }, { 0x23, 6 }, { 0x12, 6 }, { 0x51, 8 }, { 0x47, 9 }, + { 0x38, 9 }, { 0x07, 7 }, + }, }; /* 2-reference tables */ -const uint32_t ff_vc1_2ref_mvdata_codes[8][126] = { /* table 132 - table 139 */ - { - 0x0000C, 0x0001C, 0x0000B, 0x00000, 0x0000E, 0x0002A, 0x00050, 0x00368, - 0x00002, 0x0001A, 0x00004, 0x0003A, 0x0001D, 0x0006C, 0x000EF, 0x001BC, - 0x0015F, 0x0000F, 0x00003, 0x0001C, 0x0000D, 0x0000B, 0x0003E, 0x000A7, - 0x00146, 0x00199, 0x00006, 0x0001F, 0x00004, 0x0003C, 0x00007, 0x001BE, - 0x0008B, 0x0002C, 0x007B3, 0x00005, 0x000DB, 0x00056, 0x000EC, 0x00052, - 0x001BD, 0x00078, 0x000CF, 0x00573, 0x00009, 0x00023, 0x000ED, 0x00018, - 0x00006, 0x00044, 0x000F5, 0x00079, 0x006D2, 0x0006E, 0x0002B, 0x0015D, - 0x00017, 0x0037F, 0x00144, 0x000CE, 0x00028, 0x000AB, 0x00010, 0x001B5, - 0x000F7, 0x000A6, 0x0007B, 0x00028, 0x001ED, 0x001E9, 0x006FD, 0x00004, - 0x000F5, 0x00029, 0x0028A, 0x0028B, 0x0028F, 0x00DF9, 0x00335, 0x01E85, - 0x000EE, 0x002BD, 0x0002B, 0x003D8, 0x003D1, 0x00198, 0x001E9, 0x0051D, - 0x000B4, 0x0003F, 0x00455, 0x0022B, 0x00229, 0x00451, 0x00578, 0x007B2, - 0x00570, 0x00155, 0x00032, 0x003D0, 0x00054, 0x006D3, 0x00571, 0x00454, - 0x00334, 0x01BF1, 0x000B7, 0x00029, 0x01E84, 0x0016C, 0x0019B, 0x01BF0, - 0x00579, 0x00F43, 0x000B5, 0x008A1, 0x0002A, 0x0016D, 0x008A0, 0x007A0, - 0x003D1, 0x00AE5, 0x00154, 0x00AE4, 0x00A39, 0x00A38 - }, - { - 0x00003, 0x00009, 0x00016, 0x00010, 0x000D7, 0x00335, 0x00574, 0x00555, - 0x00000, 0x0001D, 0x00009, 0x00017, 0x0002C, 0x000AD, 0x00374, 0x006B3, - 0x00577, 0x0000F, 0x00018, 0x0000A, 0x0002E, 0x00022, 0x0017C, 0x00E7B, - 0x01B89, 0x015D8, 0x00008, 0x00034, 0x0006D, 0x00023, 0x001C2, 0x00376, - 0x002D3, 0x01C4A, 0x0330A, 0x00014, 0x0006A, 0x00072, 0x0006C, 0x000E3, - 0x0019B, 0x0073F, 0x01CF0, 0x00B41, 0x00032, 0x000E6, 0x000E0, 0x000CF, - 0x000AB, 0x0019C, 0x002AB, 0x00E2B, 0x015D9, 0x0006F, 0x001C3, 0x000AF, - 0x000BF, 0x000AC, 0x0017D, 0x006E3, 0x00E29, 0x01984, 0x00054, 0x000B5, - 0x0017A, 0x001AD, 0x00199, 0x00178, 0x00358, 0x002D2, 0x01C4B, 0x0005B, - 0x002A8, 0x00331, 0x00388, 0x0038B, 0x00370, 0x00713, 0x00CC3, 0x01CF1, - 0x001B9, 0x005EF, 0x00738, 0x002F2, 0x0033B, 0x002B9, 0x006EB, 0x00570, - 0x00E24, 0x0039D, 0x005A2, 0x005A3, 0x00E7D, 0x005EE, 0x00739, 0x00554, - 0x00AA5, 0x00AA4, 0x00377, 0x01CF5, 0x00BCE, 0x00E79, 0x00660, 0x00674, - 0x006EA, 0x00E7C, 0x00D65, 0x002F6, 0x015DA, 0x01B88, 0x005A1, 0x01CF4, - 0x005E6, 0x00E28, 0x00575, 0x00D64, 0x00334, 0x0330B, 0x015DB, 0x00B40, - 0x00BCF, 0x00DC5, 0x00E2A, 0x00675, 0x00571, 0x00553 - }, - { - 0x00004, 0x00002, 0x00010, 0x00003, 0x00017, 0x00045, 0x0003E, 0x0007E, - 0x00003, 0x00002, 0x00028, 0x0001E, 0x00015, 0x00047, 0x00002, 0x0014D, - 0x00060, 0x0000B, 0x00026, 0x00024, 0x00014, 0x00032, 0x0006F, 0x000C3, - 0x00531, 0x006E5, 0x00015, 0x0003F, 0x0002D, 0x00001, 0x0013E, 0x000DD, - 0x000F6, 0x00305, 0x00331, 0x0000E, 0x00003, 0x00034, 0x00033, 0x0001A, - 0x0014A, 0x000C5, 0x000F4, 0x006E4, 0x00001, 0x0003C, 0x0007D, 0x0008D, - 0x0009D, 0x00031, 0x0006E, 0x00296, 0x000CD, 0x00025, 0x00149, 0x00032, - 0x00089, 0x00036, 0x00088, 0x0006F, 0x00003, 0x0031D, 0x0000E, 0x001AA, - 0x0027E, 0x00061, 0x0014E, 0x0014F, 0x00067, 0x000FF, 0x00183, 0x00036, - 0x00357, 0x000F5, 0x000C6, 0x000C2, 0x00299, 0x00119, 0x00231, 0x00350, - 0x0002C, 0x0018F, 0x00530, 0x00297, 0x00004, 0x001B8, 0x000C0, 0x0027A, - 0x00311, 0x0009C, 0x00621, 0x00199, 0x0031C, 0x000F7, 0x003E3, 0x00356, - 0x00189, 0x00005, 0x0006B, 0x008C2, 0x00330, 0x004FF, 0x004F0, 0x00351, - 0x004F2, 0x001F2, 0x00373, 0x00000, 0x00C41, 0x008C3, 0x009EC, 0x003E2, - 0x00304, 0x004F7, 0x004F1, 0x001F0, 0x00148, 0x00C40, 0x009ED, 0x008C0, - 0x008C1, 0x004F3, 0x004FE, 0x000FE, 0x001F3, 0x001A9 - }, - { - 0x00000, 0x00004, 0x0002F, 0x00052, 0x00010, 0x000AD, 0x0050B, 0x00190, - 0x00003, 0x00016, 0x00007, 0x0000D, 0x000BB, 0x00173, 0x000C9, 0x0050F, - 0x0172C, 0x00003, 0x00011, 0x00005, 0x00043, 0x00023, 0x0004B, 0x0032E, - 0x02E5B, 0x00482, 0x00009, 0x0002A, 0x00014, 0x0002A, 0x00108, 0x005CA, - 0x0065A, 0x02136, 0x02132, 0x0000B, 0x00013, 0x00041, 0x000B8, 0x00174, - 0x00100, 0x014DA, 0x0404E, 0x01437, 0x0002B, 0x00085, 0x000A7, 0x000A0, - 0x0014C, 0x0029A, 0x0032C, 0x02133, 0x0142A, 0x00051, 0x00284, 0x000AC, - 0x00102, 0x00045, 0x00044, 0x0081B, 0x0065E, 0x00CB7, 0x00018, 0x0050C, - 0x00212, 0x002E4, 0x00203, 0x00094, 0x00122, 0x0081A, 0x00655, 0x00033, - 0x002BA, 0x00246, 0x00242, 0x00A6E, 0x0040C, 0x00808, 0x02134, 0x0404F, - 0x00175, 0x00405, 0x00247, 0x0012A, 0x00A14, 0x002BB, 0x00191, 0x0084F, - 0x01438, 0x000AF, 0x00B97, 0x00483, 0x0143B, 0x0032B, 0x00243, 0x0142B, - 0x00958, 0x029BF, 0x00049, 0x00A6C, 0x014DB, 0x004AD, 0x014DE, 0x0084E, - 0x01434, 0x00257, 0x02E5A, 0x00207, 0x01435, 0x01439, 0x00CB6, 0x0143A, - 0x00194, 0x00654, 0x02135, 0x0537C, 0x0015C, 0x00240, 0x01012, 0x0537D, - 0x00959, 0x01098, 0x01436, 0x0065F, 0x02026, 0x02137 - }, - { - 0x00005, 0x00019, 0x00016, 0x00011, 0x0003E, 0x0005E, 0x000EF, 0x000E2, - 0x00000, 0x00039, 0x0002B, 0x00026, 0x00028, 0x00012, 0x000C2, 0x000ED, - 0x0011D, 0x0000D, 0x00031, 0x0002A, 0x00025, 0x00020, 0x0005C, 0x001ED, - 0x0024D, 0x00770, 0x00006, 0x0007A, 0x00060, 0x0004F, 0x00048, 0x00039, - 0x00186, 0x00213, 0x00EC6, 0x0000F, 0x00026, 0x0005F, 0x00075, 0x00070, - 0x00027, 0x001DB, 0x003C6, 0x0078F, 0x0003F, 0x000A6, 0x000F0, 0x0003A, - 0x00052, 0x0004E, 0x000E3, 0x001D9, 0x0030F, 0x00010, 0x001DD, 0x000A7, - 0x000F7, 0x00022, 0x00092, 0x003C4, 0x002EF, 0x00762, 0x00079, 0x0008F, - 0x001DA, 0x00087, 0x000E8, 0x000BA, 0x00176, 0x000EE, 0x003B0, 0x00085, - 0x00119, 0x0030E, 0x00108, 0x001D2, 0x0010C, 0x00773, 0x00424, 0x00434, - 0x00071, 0x005DD, 0x001C1, 0x003A7, 0x00127, 0x0008D, 0x0021B, 0x007B2, - 0x001DF, 0x003D8, 0x00764, 0x00EE4, 0x003B3, 0x0074D, 0x001D8, 0x005DC, - 0x0084A, 0x00499, 0x003C5, 0x01D8E, 0x00765, 0x00435, 0x00771, 0x001C2, - 0x00118, 0x003BC, 0x00381, 0x00387, 0x07B33, 0x01097, 0x01096, 0x01ECD, - 0x00E99, 0x00F1C, 0x00F1D, 0x00EE5, 0x0011C, 0x07B32, 0x03D98, 0x01D8F, - 0x00E98, 0x00F67, 0x003BD, 0x00380, 0x00498, 0x00386 - }, - { - 0x0000D, 0x00010, 0x0002E, 0x00039, 0x0000D, 0x00074, 0x000ED, 0x000B6, - 0x00001, 0x00002, 0x00000, 0x00030, 0x00029, 0x00070, 0x000F3, 0x0008C, - 0x00166, 0x00009, 0x00033, 0x00078, 0x00006, 0x000C4, 0x0000B, 0x00163, - 0x000CC, 0x005BE, 0x0001F, 0x0002F, 0x00064, 0x00018, 0x000C6, 0x0000A, - 0x00162, 0x002C0, 0x00EF3, 0x00007, 0x0000F, 0x000E3, 0x000CA, 0x000B2, - 0x0018F, 0x003AE, 0x0075F, 0x00C51, 0x00015, 0x00047, 0x000EE, 0x000E2, - 0x000EA, 0x00009, 0x0016A, 0x002C3, 0x0059D, 0x0003D, 0x00008, 0x001D9, - 0x00032, 0x0000E, 0x0016E, 0x0032C, 0x0065B, 0x0196B, 0x00002, 0x0000F, - 0x001D8, 0x0008D, 0x000B4, 0x001E4, 0x00067, 0x00317, 0x00794, 0x00022, - 0x003BE, 0x00315, 0x00034, 0x00037, 0x002DE, 0x0006C, 0x00EFE, 0x0066C, - 0x00028, 0x003CB, 0x003AC, 0x00035, 0x0016B, 0x003BD, 0x002C1, 0x0062C, - 0x01DFE, 0x0000E, 0x0059E, 0x005BF, 0x000DA, 0x00629, 0x00584, 0x00EB7, - 0x00B0A, 0x0066D, 0x0000C, 0x0077E, 0x0059C, 0x00778, 0x0075E, 0x0075A, - 0x0062D, 0x00337, 0x00334, 0x00197, 0x01E57, 0x01DE4, 0x0196A, 0x01E56, - 0x00C50, 0x00B3F, 0x01E54, 0x00B0B, 0x0018E, 0x001B6, 0x01E55, 0x00CB4, - 0x00B3E, 0x00EB6, 0x01DE5, 0x01DFF, 0x00335, 0x001B7 - }, - { - 0x00001, 0x0000B, 0x00019, 0x0006F, 0x0002A, 0x00075, 0x007EB, 0x00163, - 0x00001, 0x0000E, 0x0001A, 0x0003E, 0x0001C, 0x0002D, 0x00164, 0x007EC, - 0x00165, 0x00004, 0x00006, 0x00036, 0x0007F, 0x000AE, 0x00158, 0x0015C, - 0x0056D, 0xFD510, 0x00000, 0x00004, 0x0007B, 0x000F3, 0x0003B, 0x007ED, - 0x002B3, 0x002CC, 0x0056E, 0x00018, 0x0003E, 0x00017, 0x0001E, 0x000AF, - 0x003F7, 0x0056F, 0x002CD, 0xFD511, 0x00014, 0x000AD, 0x000AA, 0x00014, - 0x000A8, 0x00153, 0x000E8, 0x001FE, 0x00DCF, 0x00078, 0x001B8, 0x00152, - 0x000FE, 0x002B1, 0x0015D, 0x00160, 0xFD512, 0xFD513, 0x0007A, 0x002B0, - 0x001E5, 0x000E9, 0x000FC, 0x006E6, 0x00DC8, 0x00584, 0xFD514, 0x000AB, - 0x00DDE, 0x00159, 0x003F4, 0x00DC9, 0x00DCA, 0x001FA, 0xFD515, 0xFD516, - 0x000FC, 0x001FF, 0x001E4, 0x000AF, 0x0015A, 0x00167, 0x00DCB, 0x00585, - 0xFD517, 0x003F7, 0x03F55, 0xFD518, 0x00DDC, 0x00586, 0x03F56, 0xFD519, - 0x03F57, 0xFD51A, 0x001BA, 0x00587, 0x00588, 0x00DDF, 0x002B2, 0xFD51B, - 0x00DCE, 0x003F6, 0xFD51C, 0x00FD4, 0xFD51D, 0xFD51E, 0xFD51F, 0x7EA80, - 0x7EA81, 0x0056C, 0x7EA82, 0x7EA83, 0x00376, 0x00589, 0x0058A, 0x7EA84, - 0x7EA85, 0x00DDD, 0x7EA86, 0x7EA87, 0x0058B, 0x07EA9 - }, - { - 0x00003, 0x0000E, 0x0000F, 0x0007E, 0x00062, 0x000C6, 0x00CD9, 0x0063E, - 0x00002, 0x00002, 0x00000, 0x00018, 0x0000C, 0x00069, 0x00039, 0x00707, - 0x00C7E, 0x00002, 0x0000D, 0x0001B, 0x0000F, 0x0019A, 0x00647, 0x01A37, - 0x346C4, 0x0346D, 0x00001, 0x0001E, 0x0007F, 0x0000A, 0x000E1, 0x00661, - 0x00CE4, 0x346C5, 0x346C6, 0x0001D, 0x00030, 0x0000D, 0x000CB, 0x00199, - 0x00320, 0x0008E, 0x0652E, 0x346C7, 0x0003E, 0x00039, 0x00035, 0x00033, - 0x0019F, 0x001C0, 0x00CDA, 0x346C8, 0x346C9, 0x0000B, 0x000D0, 0x0019E, - 0x00022, 0x00038, 0x0018E, 0x0031E, 0x03294, 0x0023C, 0x00032, 0x00012, - 0x00013, 0x00071, 0x0019D, 0x00020, 0x00C87, 0x00CC0, 0x346CA, 0x00338, - 0x00653, 0x001A2, 0x0032A, 0x00322, 0x00CE7, 0x00084, 0x0011F, 0x346CB, - 0x00325, 0x00649, 0x0032B, 0x00077, 0x00648, 0x00642, 0x00C86, 0x00C8C, - 0x346CC, 0x0003A, 0x019B7, 0x00043, 0x00327, 0x0008C, 0x0008D, 0x00C8D, - 0x346CD, 0x346CE, 0x00337, 0x00CE5, 0x00085, 0x00326, 0x00347, 0x00CA4, - 0x00C7F, 0x00D1A, 0x346CF, 0x00328, 0x1A360, 0x1A361, 0x00CD8, 0x0068C, - 0x03295, 0x03296, 0x0652F, 0x066D8, 0x00331, 0x00706, 0x0023D, 0x00076, - 0x00CC1, 0x00382, 0x00CE6, 0x066D9, 0x066DA, 0x066DB - } -}; - -const uint8_t ff_vc1_2ref_mvdata_bits[8][126] = { - { - 4, 5, 5, 5, 6, 7, 8, 10, 2, 5, 5, 6, 6, 7, 8, 9, - 10, 4, 5, 6, 6, 7, 8, 9, 10, 11, 4, 6, 6, 7, 7, 9, - 9, 10, 12, 5, 8, 8, 8, 8, 9, 9, 10, 12, 5, 7, 8, 7, - 7, 8, 9, 9, 11, 7, 9, 10, 9, 10, 10, 10, 10, 12, 6, 9, - 9, 9, 9, 9, 10, 10, 11, 7, 10, 10, 11, 11, 11, 12, 12, 14, - 8, 11, 10, 11, 11, 11, 11, 12, 12, 8, 12, 11, 11, 12, 12, 12, - 12, 13, 8, 12, 11, 11, 12, 12, 12, 13, 12, 9, 14, 13, 11, 13, - 12, 13, 12, 13, 9, 13, 13, 12, 12, 13, 13, 13, 13, 13 - }, - { - 3, 4, 5, 6, 8, 10, 11, 11, 2, 5, 5, 6, 7, 8, 10, 11, - 11, 4, 5, 5, 6, 7, 9, 12, 13, 13, 4, 6, 7, 7, 9, 10, - 11, 13, 14, 5, 7, 7, 7, 8, 9, 11, 13, 13, 6, 8, 8, 8, - 8, 9, 10, 12, 13, 7, 9, 8, 8, 8, 9, 11, 12, 13, 7, 9, - 9, 9, 9, 9, 10, 11, 13, 8, 10, 10, 10, 10, 10, 11, 12, 13, - 9, 11, 11, 10, 10, 10, 11, 11, 12, 10, 12, 12, 12, 11, 11, 11, - 12, 12, 10, 13, 12, 12, 11, 11, 11, 12, 12, 10, 13, 13, 12, 13, - 11, 12, 11, 12, 10, 14, 13, 13, 12, 12, 12, 11, 11, 11 - }, - { - 4, 4, 5, 5, 6, 7, 8, 9, 2, 5, 6, 6, 6, 7, 7, 9, - 9, 4, 6, 6, 6, 7, 8, 9, 11, 12, 5, 7, 7, 7, 9, 9, - 10, 11, 12, 5, 7, 7, 7, 7, 9, 9, 10, 12, 5, 8, 8, 8, - 8, 8, 9, 10, 10, 6, 9, 8, 8, 8, 8, 9, 9, 11, 6, 10, - 10, 9, 9, 9, 9, 10, 10, 7, 11, 10, 9, 9, 10, 9, 10, 11, - 7, 10, 11, 10, 10, 10, 9, 10, 11, 8, 12, 11, 11, 10, 11, 11, - 10, 10, 8, 12, 12, 11, 11, 11, 11, 10, 11, 8, 13, 12, 12, 11, - 11, 11, 11, 10, 9, 13, 12, 12, 12, 11, 11, 10, 10, 10 - }, - { - 3, 4, 6, 7, 7, 9, 11, 11, 2, 5, 5, 6, 8, 9, 10, 11, - 13, 3, 5, 5, 7, 8, 9, 12, 14, 13, 4, 6, 6, 7, 9, 11, - 13, 14, 14, 5, 7, 7, 8, 9, 9, 13, 15, 13, 6, 8, 8, 8, - 9, 10, 12, 14, 13, 7, 10, 9, 9, 9, 9, 12, 13, 14, 7, 11, - 10, 10, 10, 10, 11, 12, 13, 8, 11, 12, 12, 12, 11, 12, 14, 15, - 9, 11, 12, 11, 12, 11, 11, 12, 13, 9, 12, 13, 13, 12, 12, 13, - 14, 14, 9, 12, 13, 13, 13, 12, 13, 12, 14, 10, 13, 13, 14, 13, - 11, 13, 14, 15, 10, 12, 13, 15, 14, 13, 13, 13, 14, 14 - }, - { - 4, 5, 5, 5, 6, 7, 8, 8, 2, 6, 6, 6, 6, 6, 8, 9, - 10, 4, 6, 6, 6, 6, 7, 9, 10, 11, 4, 7, 7, 7, 7, 7, - 9, 10, 12, 5, 7, 7, 7, 7, 7, 9, 10, 11, 6, 8, 8, 7, - 7, 7, 8, 9, 10, 6, 9, 8, 8, 7, 8, 10, 10, 11, 7, 9, - 9, 8, 8, 8, 9, 9, 10, 8, 10, 10, 9, 9, 9, 11, 11, 11, - 8, 11, 10, 10, 9, 9, 10, 11, 10, 10, 12, 12, 11, 11, 10, 11, - 12, 11, 10, 13, 12, 11, 11, 10, 10, 11, 11, 11, 15, 13, 13, 13, - 12, 12, 12, 12, 10, 15, 14, 13, 12, 12, 11, 11, 11, 11 - }, - { - 4, 5, 6, 6, 6, 7, 8, 8, 2, 4, 5, 6, 6, 7, 8, 8, - 9, 4, 6, 7, 7, 8, 8, 9, 10, 11, 5, 6, 7, 7, 8, 8, - 9, 10, 12, 5, 7, 8, 8, 8, 9, 10, 11, 12, 5, 7, 8, 8, - 8, 8, 9, 10, 11, 6, 8, 9, 8, 8, 9, 10, 11, 13, 5, 8, - 9, 8, 8, 9, 9, 10, 11, 6, 10, 10, 9, 9, 10, 10, 12, 13, - 6, 10, 10, 9, 9, 10, 10, 11, 13, 7, 11, 11, 11, 11, 11, 12, - 12, 13, 7, 11, 11, 11, 11, 11, 11, 12, 12, 9, 13, 13, 13, 13, - 12, 12, 13, 12, 9, 12, 13, 12, 12, 12, 13, 13, 12, 12 - }, - { - 3, 5, 6, 8, 9, 10, 12, 12, 1, 5, 6, 7, 8, 9, 12, 12, - 12, 4, 6, 7, 8, 9, 12, 12, 14, 21, 4, 6, 8, 9, 9, 12, - 13, 13, 14, 6, 9, 8, 8, 9, 13, 14, 13, 21, 6, 9, 9, 8, - 9, 10, 11, 12, 13, 8, 10, 10, 11, 11, 12, 12, 21, 21, 8, 11, - 10, 11, 11, 12, 13, 14, 21, 9, 13, 10, 11, 13, 13, 12, 21, 21, - 9, 12, 10, 11, 12, 12, 13, 14, 21, 11, 15, 21, 13, 14, 15, 21, - 15, 21, 10, 14, 14, 13, 13, 21, 13, 13, 21, 13, 21, 21, 21, 20, - 20, 14, 20, 20, 11, 14, 14, 20, 20, 13, 20, 20, 14, 16 - }, - { - 2, 5, 6, 8, 9, 10, 13, 13, 2, 4, 5, 6, 8, 9, 10, 13, - 14, 3, 5, 7, 8, 10, 12, 15, 20, 16, 4, 6, 8, 8, 10, 12, - 13, 20, 20, 7, 8, 8, 9, 10, 11, 12, 16, 20, 7, 8, 8, 8, - 10, 11, 13, 20, 20, 8, 10, 10, 10, 10, 11, 12, 15, 14, 8, 9, - 9, 9, 10, 10, 13, 13, 20, 11, 12, 11, 11, 11, 13, 12, 13, 20, - 11, 12, 11, 11, 12, 12, 13, 13, 20, 10, 14, 11, 11, 12, 12, 13, - 20, 20, 11, 13, 12, 11, 12, 13, 14, 14, 20, 11, 19, 19, 13, 13, - 15, 15, 16, 16, 11, 13, 14, 11, 13, 12, 13, 16, 16, 16 - } +const uint8_t ff_vc1_2ref_mvdata_tabs[8][126][2] = { /* tables 132 - 139 */ + { + { 0x04, 5 }, { 0x80, 7 }, { 0x67, 10 }, { 0x82, 10 }, { 0xB2, 11 }, + { 0xD6, 13 }, { 0xA8, 13 }, { 0x68, 12 }, { 0x92, 10 }, { 0x37, 10 }, + { 0x98, 12 }, { 0xC7, 12 }, { 0xC2, 13 }, { 0xD1, 13 }, { 0xB8, 12 }, + { 0x63, 9 }, { 0x54, 7 }, { 0x34, 7 }, { 0x32, 6 }, { 0x75, 9 }, + { 0xC0, 9 }, { 0xD0, 9 }, { 0x61, 9 }, { 0x24, 7 }, { 0x21, 5 }, + { 0x12, 5 }, { 0x40, 5 }, { 0x53, 7 }, { 0xB0, 8 }, { 0x95, 11 }, + { 0x28, 11 }, { 0xB6, 12 }, { 0x87, 12 }, { 0xC3, 11 }, { 0x66, 10 }, + { 0x47, 10 }, { 0x23, 6 }, { 0x05, 6 }, { 0x46, 9 }, { 0x57, 9 }, + { 0xB1, 12 }, { 0xD4, 12 }, { 0x96, 11 }, { 0x81, 10 }, { 0x74, 9 }, + { 0x25, 8 }, { 0xA0, 8 }, { 0x70, 6 }, { 0x55, 8 }, { 0xD2, 13 }, + { 0xC8, 13 }, { 0xA4, 12 }, { 0xA3, 11 }, { 0xB5, 12 }, { 0xA1, 12 }, + { 0xA2, 11 }, { 0x36, 9 }, { 0x51, 7 }, { 0x50, 5 }, { 0x07, 8 }, + { 0x65, 10 }, { 0x83, 11 }, { 0x84, 11 }, { 0x27, 10 }, { 0, 13 }, + { 0xD8, 13 }, { 0x97, 12 }, { 0x85, 11 }, { 0x44, 8 }, { 0x73, 9 }, + { 0x26, 9 }, { 0x06, 7 }, { 0x42, 8 }, { 0xA7, 12 }, { 0xB4, 12 }, + { 0xD7, 13 }, { 0xD5, 13 }, { 0x48, 12 }, { 0x62, 10 }, { 0xA5, 12 }, + { 0xC5, 12 }, { 0x91, 11 }, { 0x18, 10 }, { 0x03, 5 }, { 0x30, 4 }, + { 0x22, 6 }, { 0x14, 6 }, { 0x33, 7 }, { 0xD3, 12 }, { 0xC1, 14 }, + { 0x88, 14 }, { 0xC6, 13 }, { 0x94, 11 }, { 0x77, 10 }, { 0x56, 9 }, + { 0x93, 11 }, { 0xA6, 12 }, { 0x38, 12 }, { 0x76, 10 }, { 0x72, 9 }, + { 0x31, 6 }, { 0x10, 2 }, { 0x01, 4 }, { 0x11, 5 }, { 0x15, 7 }, + { 0x08, 10 }, { 0x58, 11 }, { 0xB3, 11 }, { 0x71, 9 }, { 0x41, 8 }, + { 0x60, 7 }, { 0x17, 9 }, { 0x45, 9 }, { 0x35, 9 }, { 0xC4, 13 }, + { 0xB7, 13 }, { 0x86, 12 }, { 0x78, 11 }, { 0x64, 10 }, { 0x02, 5 }, + { 0x13, 6 }, { 0x43, 8 }, { 0x52, 8 }, { 0x90, 8 }, { 0x16, 8 }, + { 0x20, 4 }, + }, + { + { 0x10, 2 }, { 0x04, 6 }, { 0x24, 7 }, { 0x33, 7 }, { 0x12, 5 }, + { 0x22, 5 }, { 0x14, 7 }, { 0xD3, 13 }, { 0x48, 13 }, { 0xC3, 12 }, + { 0xA1, 12 }, { 0xA2, 12 }, { 0x77, 11 }, { 0x36, 11 }, { 0x71, 9 }, + { 0x80, 8 }, { 0x13, 6 }, { 0x01, 3 }, { 0x30, 4 }, { 0x02, 4 }, + { 0x40, 5 }, { 0x70, 7 }, { 0x81, 10 }, { 0xA8, 12 }, { 0xA7, 12 }, + { 0, 11 }, { 0xA6, 11 }, { 0x08, 11 }, { 0x56, 10 }, { 0x54, 8 }, + { 0x64, 8 }, { 0x15, 8 }, { 0x97, 11 }, { 0xD8, 11 }, { 0x95, 10 }, + { 0x07, 11 }, { 0xC7, 11 }, { 0x28, 13 }, { 0x58, 13 }, { 0xC1, 13 }, + { 0xD2, 13 }, { 0x18, 11 }, { 0x62, 8 }, { 0x03, 5 }, { 0x23, 6 }, + { 0x75, 9 }, { 0x93, 10 }, { 0xC5, 11 }, { 0xB2, 12 }, { 0xD4, 12 }, + { 0x72, 9 }, { 0xC0, 10 }, { 0xA4, 11 }, { 0x91, 11 }, { 0x25, 9 }, + { 0x65, 9 }, { 0x63, 8 }, { 0x21, 5 }, { 0x50, 6 }, { 0xB4, 11 }, + { 0x68, 13 }, { 0x38, 14 }, { 0xD1, 14 }, { 0x87, 12 }, { 0x82, 10 }, + { 0x74, 9 }, { 0xD0, 10 }, { 0x06, 10 }, { 0x45, 9 }, { 0x55, 9 }, + { 0xB5, 11 }, { 0xD7, 11 }, { 0x94, 10 }, { 0x53, 8 }, { 0x31, 6 }, + { 0x41, 7 }, { 0x76, 10 }, { 0xC8, 12 }, { 0xB8, 12 }, { 0x17, 11 }, + { 0x73, 9 }, { 0x05, 8 }, { 0x43, 7 }, { 0x32, 7 }, { 0x85, 10 }, + { 0xC2, 13 }, { 0x27, 13 }, { 0xD5, 12 }, { 0x66, 11 }, { 0x90, 9 }, + { 0x16, 10 }, { 0xB6, 11 }, { 0x96, 11 }, { 0x35, 10 }, { 0xB0, 10 }, + { 0x60, 7 }, { 0x52, 8 }, { 0x34, 9 }, { 0x61, 9 }, { 0x83, 10 }, + { 0x98, 12 }, { 0x37, 13 }, { 0x78, 13 }, { 0x86, 11 }, { 0xC6, 12 }, + { 0x67, 12 }, { 0xD6, 12 }, { 0x57, 12 }, { 0x84, 10 }, { 0x44, 8 }, + { 0x42, 7 }, { 0x51, 8 }, { 0x92, 11 }, { 0xA5, 11 }, { 0xA0, 10 }, + { 0x47, 13 }, { 0x88, 13 }, { 0xB3, 12 }, { 0xC4, 13 }, { 0xB1, 13 }, + { 0x26, 12 }, { 0xB7, 12 }, { 0xA3, 12 }, { 0x46, 11 }, { 0x11, 5 }, + { 0x20, 4 }, + }, + { + { 0xC0, 8 }, { 0x94, 10 }, { 0xA8, 10 }, { 0x67, 9 }, { 0x33, 7 }, + { 0x16, 7 }, { 0x41, 7 }, { 0x50, 5 }, { 0x11, 5 }, { 0x04, 5 }, + { 0x02, 4 }, { 0x18, 9 }, { 0x73, 9 }, { 0x55, 8 }, { 0x62, 8 }, + { 0xB2, 12 }, { 0x38, 12 }, { 0xA2, 11 }, { 0x58, 10 }, { 0x76, 9 }, + { 0x44, 7 }, { 0x64, 8 }, { 0x56, 9 }, { 0x66, 9 }, { 0x70, 6 }, + { 0x51, 8 }, { 0x47, 10 }, { 0x82, 10 }, { 0x36, 10 }, { 0xA4, 10 }, + { 0x07, 8 }, { 0x08, 9 }, { 0xD7, 10 }, { 0x77, 10 }, { 0x01, 4 }, + { 0x23, 6 }, { 0x14, 6 }, { 0x90, 7 }, { 0x32, 7 }, { 0x05, 6 }, + { 0x96, 9 }, { 0xC5, 11 }, { 0x37, 11 }, { 0x78, 10 }, { 0x84, 9 }, + { 0x26, 9 }, { 0xD1, 13 }, { 0xC1, 13 }, { 0xA1, 12 }, { 0x98, 11 }, + { 0xA7, 10 }, { 0x46, 9 }, { 0x83, 9 }, { 0xA3, 11 }, { 0x68, 11 }, + { 0x91, 10 }, { 0x24, 7 }, { 0x43, 7 }, { 0x42, 7 }, { 0x88, 11 }, + { 0xB5, 11 }, { 0, 10 }, { 0x71, 10 }, { 0xA6, 11 }, { 0x81, 11 }, + { 0xB0, 8 }, { 0x80, 7 }, { 0x95, 10 }, { 0x48, 12 }, { 0x28, 12 }, + { 0xB8, 11 }, { 0x35, 9 }, { 0x25, 8 }, { 0x40, 5 }, { 0x13, 6 }, + { 0xC8, 10 }, { 0xC4, 11 }, { 0xA5, 11 }, { 0xB7, 10 }, { 0xD8, 10 }, + { 0x52, 8 }, { 0x31, 7 }, { 0x03, 5 }, { 0x65, 8 }, { 0x63, 8 }, + { 0x06, 7 }, { 0xD3, 12 }, { 0xD4, 12 }, { 0xB1, 12 }, { 0xC2, 12 }, + { 0x87, 10 }, { 0x86, 9 }, { 0x53, 8 }, { 0x15, 7 }, { 0x22, 6 }, + { 0x60, 6 }, { 0x21, 6 }, { 0xA0, 8 }, { 0x54, 8 }, { 0xB4, 11 }, + { 0xC7, 11 }, { 0xB6, 11 }, { 0xD5, 11 }, { 0x97, 10 }, { 0xC3, 12 }, + { 0xD2, 12 }, { 0xC6, 11 }, { 0x34, 9 }, { 0x72, 10 }, { 0xD6, 11 }, + { 0xB3, 11 }, { 0x12, 6 }, { 0xD0, 9 }, { 0x61, 9 }, { 0x45, 9 }, + { 0x57, 10 }, { 0x93, 10 }, { 0x92, 11 }, { 0x27, 11 }, { 0x85, 10 }, + { 0x17, 9 }, { 0x74, 9 }, { 0x75, 9 }, { 0x30, 5 }, { 0x20, 4 }, + { 0x10, 2 }, + }, + { + { 0x01, 3 }, { 0x05, 7 }, { 0x65, 9 }, { 0x64, 9 }, { 0x24, 8 }, + { 0xD1, 12 }, { 0x28, 13 }, { 0xA2, 13 }, { 0x83, 12 }, { 0xA5, 12 }, + { 0x76, 11 }, { 0x82, 12 }, { 0x92, 12 }, { 0xB0, 9 }, { 0x75, 10 }, + { 0x93, 11 }, { 0xA7, 14 }, { 0xD4, 14 }, { 0xB3, 13 }, { 0xB7, 12 }, + { 0x25, 9 }, { 0x41, 7 }, { 0x22, 5 }, { 0x70, 7 }, { 0x08, 11 }, + { 0x96, 11 }, { 0x16, 10 }, { 0xC5, 11 }, { 0xC6, 13 }, { 0x78, 13 }, + { 0xA4, 12 }, { 0x56, 12 }, { 0x36, 13 }, { 0xC3, 14 }, { 0x68, 14 }, + { 0x26, 12 }, { 0x67, 13 }, { 0xD7, 13 }, { 0x80, 8 }, { 0x13, 6 }, + { 0x12, 5 }, { 0x02, 4 }, { 0x32, 6 }, { 0x33, 7 }, { 0x62, 9 }, + { 0x06, 9 }, { 0xD0, 10 }, { 0x81, 11 }, { 0x95, 11 }, { 0xA0, 9 }, + { 0x40, 5 }, { 0x20, 3 }, { 0x45, 9 }, { 0x86, 12 }, { 0xD2, 13 }, + { 0xD8, 14 }, { 0x47, 15 }, { 0x88, 15 }, { 0x91, 11 }, { 0x74, 10 }, + { 0x63, 9 }, { 0x85, 11 }, { 0x77, 12 }, { 0x66, 12 }, { 0xC0, 10 }, + { 0x42, 7 }, { 0x34, 9 }, { 0x72, 10 }, { 0xD5, 13 }, { 0x38, 14 }, + { 0x57, 14 }, { 0x87, 14 }, { 0xC7, 14 }, { 0x37, 14 }, { 0, 14 }, + { 0xB5, 12 }, { 0x97, 12 }, { 0x51, 8 }, { 0x23, 7 }, { 0x21, 5 }, + { 0x30, 4 }, { 0x53, 8 }, { 0x61, 10 }, { 0x94, 12 }, { 0x58, 13 }, + { 0xA6, 13 }, { 0x07, 11 }, { 0x71, 11 }, { 0xB6, 13 }, { 0xC1, 13 }, + { 0xD6, 13 }, { 0x48, 13 }, { 0x98, 13 }, { 0xC2, 13 }, { 0xC4, 13 }, + { 0xA3, 13 }, { 0x17, 11 }, { 0x60, 7 }, { 0x04, 7 }, { 0x54, 9 }, + { 0x55, 10 }, { 0xB1, 12 }, { 0x46, 13 }, { 0xB2, 13 }, { 0x84, 12 }, + { 0xB4, 13 }, { 0xC8, 15 }, { 0xD3, 15 }, { 0xA8, 14 }, { 0x52, 8 }, + { 0x31, 6 }, { 0x50, 6 }, { 0x11, 5 }, { 0x43, 8 }, { 0x73, 10 }, + { 0x35, 11 }, { 0x18, 13 }, { 0xB8, 14 }, { 0x27, 14 }, { 0xA1, 12 }, + { 0x15, 9 }, { 0x44, 9 }, { 0x90, 9 }, { 0x14, 8 }, { 0x03, 6 }, + { 0x10, 2 }, + }, + { + { 0x10, 2 }, { 0x60, 6 }, { 0x64, 7 }, { 0xB6, 10 }, { 0x81, 10 }, + { 0x95, 9 }, { 0xD0, 10 }, { 0x18, 10 }, { 0x71, 9 }, { 0x15, 6 }, + { 0x41, 7 }, { 0x45, 7 }, { 0x01, 4 }, { 0x30, 4 }, { 0xD7, 11 }, + { 0xB8, 11 }, { 0x92, 10 }, { 0xB5, 10 }, { 0, 11 }, { 0xC0, 11 }, + { 0x90, 8 }, { 0x35, 7 }, { 0x53, 7 }, { 0xA5, 10 }, { 0xA1, 12 }, + { 0xB2, 12 }, { 0xA3, 11 }, { 0x17, 9 }, { 0x77, 9 }, { 0xB7, 11 }, + { 0xD6, 11 }, { 0x98, 10 }, { 0x40, 5 }, { 0x24, 6 }, { 0x83, 9 }, + { 0x87, 11 }, { 0xA7, 12 }, { 0xC3, 13 }, { 0xC2, 13 }, { 0x37, 10 }, + { 0x80, 8 }, { 0x85, 9 }, { 0x88, 11 }, { 0xB3, 11 }, { 0x96, 10 }, + { 0x73, 8 }, { 0x04, 5 }, { 0x34, 7 }, { 0x65, 8 }, { 0xD8, 11 }, + { 0xA8, 11 }, { 0x27, 10 }, { 0x94, 9 }, { 0x23, 6 }, { 0x13, 6 }, + { 0x55, 7 }, { 0x33, 7 }, { 0x14, 6 }, { 0x54, 7 }, { 0x51, 8 }, + { 0x62, 8 }, { 0x22, 6 }, { 0x12, 6 }, { 0x03, 5 }, { 0x25, 7 }, + { 0x75, 8 }, { 0x76, 9 }, { 0xA6, 11 }, { 0x91, 11 }, { 0x67, 10 }, + { 0x06, 7 }, { 0x42, 7 }, { 0x32, 7 }, { 0x16, 8 }, { 0x36, 9 }, + { 0x82, 10 }, { 0x58, 10 }, { 0x21, 6 }, { 0x02, 5 }, { 0x20, 4 }, + { 0x44, 7 }, { 0x08, 8 }, { 0x56, 8 }, { 0x11, 6 }, { 0x74, 8 }, + { 0x84, 9 }, { 0xD4, 12 }, { 0xC5, 12 }, { 0xA4, 11 }, { 0x93, 10 }, + { 0x43, 7 }, { 0x78, 10 }, { 0x68, 11 }, { 0x38, 12 }, { 0xB1, 13 }, + { 0xD3, 13 }, { 0x57, 9 }, { 0x72, 9 }, { 0x46, 9 }, { 0x28, 11 }, + { 0xB4, 11 }, { 0xA2, 12 }, { 0xC8, 12 }, { 0x86, 11 }, { 0x61, 9 }, + { 0x07, 8 }, { 0x52, 8 }, { 0x66, 10 }, { 0xB0, 10 }, { 0x47, 10 }, + { 0xC6, 12 }, { 0xC7, 12 }, { 0x48, 11 }, { 0x70, 7 }, { 0x31, 7 }, + { 0xA0, 10 }, { 0x97, 11 }, { 0xD2, 14 }, { 0xD1, 15 }, { 0xC1, 15 }, + { 0xC4, 13 }, { 0xD5, 12 }, { 0x26, 9 }, { 0x63, 8 }, { 0x05, 6 }, + { 0x50, 6 }, + }, + { + { 0x12, 5 }, { 0x61, 8 }, { 0x55, 8 }, { 0x35, 8 }, { 0x25, 8 }, + { 0x23, 7 }, { 0x64, 8 }, { 0x71, 8 }, { 0x70, 5 }, { 0xB0, 7 }, + { 0x83, 9 }, { 0x93, 9 }, { 0x86, 10 }, { 0xA3, 11 }, { 0xD1, 12 }, + { 0, 12 }, { 0x84, 9 }, { 0xA0, 7 }, { 0x41, 7 }, { 0x11, 4 }, + { 0x33, 7 }, { 0x63, 8 }, { 0x27, 10 }, { 0xB8, 12 }, { 0xD8, 12 }, + { 0x88, 13 }, { 0xA8, 13 }, { 0xB7, 12 }, { 0x76, 9 }, { 0x05, 6 }, + { 0x40, 5 }, { 0x10, 2 }, { 0x02, 5 }, { 0x80, 6 }, { 0x17, 8 }, + { 0x73, 8 }, { 0x51, 7 }, { 0x20, 4 }, { 0x90, 6 }, { 0x14, 6 }, + { 0x50, 5 }, { 0x37, 10 }, { 0x96, 10 }, { 0xA5, 11 }, { 0xA7, 12 }, + { 0xC8, 12 }, { 0x57, 10 }, { 0x36, 9 }, { 0x26, 9 }, { 0x44, 8 }, + { 0x18, 9 }, { 0xB2, 11 }, { 0x58, 11 }, { 0xA1, 11 }, { 0xD4, 12 }, + { 0xC6, 12 }, { 0x74, 8 }, { 0x56, 9 }, { 0x94, 9 }, { 0x08, 8 }, + { 0x65, 9 }, { 0x85, 10 }, { 0x28, 11 }, { 0xA2, 11 }, { 0x03, 6 }, + { 0x31, 6 }, { 0x13, 6 }, { 0x24, 8 }, { 0xC5, 12 }, { 0x48, 12 }, + { 0xA4, 11 }, { 0x82, 10 }, { 0x97, 11 }, { 0xB6, 11 }, { 0x77, 10 }, + { 0x34, 8 }, { 0xD0, 9 }, { 0x45, 9 }, { 0x32, 7 }, { 0x43, 8 }, + { 0x66, 10 }, { 0xD3, 12 }, { 0xC3, 13 }, { 0x68, 13 }, { 0x67, 11 }, + { 0xC0, 9 }, { 0x21, 6 }, { 0x01, 4 }, { 0x15, 7 }, { 0x53, 8 }, + { 0x42, 8 }, { 0x04, 6 }, { 0x06, 7 }, { 0x54, 8 }, { 0x92, 10 }, + { 0xB5, 11 }, { 0xD5, 12 }, { 0xA6, 12 }, { 0x46, 10 }, { 0xB4, 11 }, + { 0x47, 11 }, { 0x72, 9 }, { 0x62, 9 }, { 0x07, 8 }, { 0x52, 8 }, + { 0xB3, 11 }, { 0xC2, 13 }, { 0xD6, 13 }, { 0x38, 12 }, { 0x95, 10 }, + { 0x81, 10 }, { 0xB1, 11 }, { 0x87, 12 }, { 0x98, 13 }, { 0xD7, 13 }, + { 0x22, 7 }, { 0x75, 9 }, { 0x78, 11 }, { 0xC7, 13 }, { 0xD2, 13 }, + { 0xC4, 13 }, { 0xC1, 13 }, { 0x91, 10 }, { 0x16, 8 }, { 0x60, 6 }, + { 0x30, 5 }, + }, + { + { 0x30, 4 }, { 0x31, 6 }, { 0x53, 8 }, { 0x05, 9 }, { 0x25, 12 }, + { 0xB4, 13 }, { 0x36, 13 }, { 0x94, 12 }, { 0xC6, 14 }, { 0x27, 14 }, + { 0x38, 14 }, { 0x46, 14 }, { 0x26, 12 }, { 0x65, 12 }, { 0x93, 11 }, + { 0x66, 12 }, { 0x77, 14 }, { 0x97, 14 }, { 0xA4, 14 }, { 0xB1, 14 }, + { 0xB2, 14 }, { 0xD1, 14 }, { 0xD2, 14 }, { 0xD8, 14 }, { 0x08, 12 }, + { 0x16, 12 }, { 0x18, 12 }, { 0x37, 13 }, { 0x47, 13 }, { 0x95, 12 }, + { 0x15, 9 }, { 0x42, 8 }, { 0x21, 6 }, { 0x14, 8 }, { 0x56, 11 }, + { 0x73, 11 }, { 0x06, 10 }, { 0x34, 9 }, { 0x43, 8 }, { 0x41, 9 }, + { 0x74, 11 }, { 0x86, 12 }, { 0xB7, 13 }, { 0x45, 13 }, { 0x63, 11 }, + { 0x57, 12 }, { 0x91, 12 }, { 0x01, 3 }, { 0x20, 4 }, { 0x50, 6 }, + { 0x54, 9 }, { 0x62, 10 }, { 0x55, 10 }, { 0x52, 9 }, { 0x80, 9 }, + { 0x71, 11 }, { 0x64, 11 }, { 0x82, 10 }, { 0x51, 9 }, { 0x24, 9 }, + { 0x44, 9 }, { 0x02, 5 }, { 0x40, 6 }, { 0x03, 6 }, { 0x12, 6 }, + { 0x22, 7 }, { 0x61, 10 }, { 0x76, 13 }, { 0x84, 13 }, { 0x85, 13 }, + { 0x96, 13 }, { 0x75, 12 }, { 0xB6, 13 }, { 0x58, 13 }, { 0xB0, 10 }, + { 0xD0, 11 }, { 0xA3, 13 }, { 0xD5, 13 }, { 0x81, 13 }, { 0xB3, 13 }, + { 0x04, 8 }, { 0x11, 5 }, { 0x60, 8 }, { 0x92, 10 }, { 0x72, 10 }, + { 0x33, 9 }, { 0x70, 8 }, { 0x32, 8 }, { 0x13, 7 }, { 0x90, 9 }, + { 0x83, 11 }, { 0xC0, 13 }, { 0xC4, 20 }, { 0xC5, 20 }, { 0xC7, 20 }, + { 0xC8, 20 }, { 0xD3, 20 }, { 0xD4, 20 }, { 0xD6, 20 }, { 0xD7, 20 }, + { 0x28, 21 }, { 0x48, 21 }, { 0x67, 21 }, { 0x68, 21 }, { 0x78, 21 }, + { 0x87, 21 }, { 0x88, 21 }, { 0x98, 21 }, { 0xA2, 21 }, { 0xA6, 21 }, + { 0xA8, 21 }, { 0xB5, 21 }, { 0xB8, 21 }, { 0xC1, 21 }, { 0xC2, 21 }, + { 0xC3, 21 }, { 0, 16 }, { 0xA1, 15 }, { 0xA5, 15 }, { 0xA7, 15 }, + { 0x07, 12 }, { 0x17, 12 }, { 0x35, 12 }, { 0xA0, 11 }, { 0x23, 8 }, + { 0x10, 1 }, + }, + { + { 0x12, 5 }, { 0x75, 10 }, { 0x86, 12 }, { 0xB2, 12 }, { 0xA2, 11 }, + { 0x63, 10 }, { 0xA4, 12 }, { 0xA5, 12 }, { 0x46, 12 }, { 0x68, 14 }, + { 0xD2, 14 }, { 0x87, 13 }, { 0x71, 9 }, { 0x72, 9 }, { 0x33, 8 }, + { 0x60, 8 }, { 0x14, 8 }, { 0x42, 8 }, { 0x64, 10 }, { 0x16, 10 }, + { 0xA0, 10 }, { 0xD3, 11 }, { 0x93, 11 }, { 0x23, 8 }, { 0x30, 4 }, + { 0x11, 4 }, { 0x41, 8 }, { 0x05, 9 }, { 0x06, 10 }, { 0x65, 11 }, + { 0x66, 12 }, { 0x08, 13 }, { 0x18, 14 }, { 0xB6, 14 }, { 0x70, 8 }, + { 0x53, 8 }, { 0x61, 10 }, { 0x82, 11 }, { 0xC4, 13 }, { 0xB7, 14 }, + { 0xC1, 19 }, { 0xC2, 19 }, { 0x27, 20 }, { 0x37, 20 }, { 0x38, 20 }, + { 0x48, 20 }, { 0x57, 20 }, { 0x58, 20 }, { 0x78, 20 }, { 0x88, 20 }, + { 0x98, 20 }, { 0xA7, 20 }, { 0xA8, 20 }, { 0xB8, 20 }, { 0x28, 16 }, + { 0x26, 15 }, { 0xB4, 12 }, { 0x15, 9 }, { 0x52, 8 }, { 0x22, 7 }, + { 0x55, 11 }, { 0xD5, 12 }, { 0xD1, 13 }, { 0x17, 13 }, { 0x34, 10 }, + { 0x73, 9 }, { 0x51, 8 }, { 0x40, 7 }, { 0x03, 6 }, { 0x20, 3 }, + { 0x13, 6 }, { 0x45, 11 }, { 0x95, 12 }, { 0x96, 13 }, { 0x76, 13 }, + { 0x84, 11 }, { 0x97, 13 }, { 0xA6, 13 }, { 0x25, 12 }, { 0x94, 12 }, + { 0x91, 12 }, { 0x90, 11 }, { 0xB3, 11 }, { 0xA3, 11 }, { 0xC0, 11 }, + { 0xB5, 13 }, { 0x67, 15 }, { 0xC5, 15 }, { 0xC6, 15 }, { 0x47, 16 }, + { 0xC7, 16 }, { 0x81, 12 }, { 0x83, 11 }, { 0x92, 11 }, { 0x43, 9 }, + { 0x77, 13 }, { 0xD4, 13 }, { 0x35, 12 }, { 0xD0, 11 }, { 0x44, 10 }, + { 0x24, 10 }, { 0xC3, 13 }, { 0x07, 13 }, { 0x56, 13 }, { 0xC8, 16 }, + { 0xD7, 16 }, { 0xD8, 16 }, { 0, 16 }, { 0xA1, 14 }, { 0xB0, 11 }, + { 0x80, 11 }, { 0x36, 13 }, { 0xB1, 13 }, { 0xD6, 13 }, { 0x85, 13 }, + { 0x74, 10 }, { 0x62, 10 }, { 0x54, 10 }, { 0x21, 5 }, { 0x02, 5 }, + { 0x31, 6 }, { 0x50, 7 }, { 0x04, 8 }, { 0x32, 8 }, { 0x10, 2 }, + { 0x01, 2 }, + }, }; const uint8_t ff_wmv3_dc_scale_table[32] = { diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h index 92d6374cb2..e83385b5c6 100644 --- a/libavcodec/vc1data.h +++ b/libavcodec/vc1data.h @@ -167,13 +167,15 @@ extern const uint8_t ff_vc1_if_mmv_mbmode_bits[8][8]; extern const uint8_t ff_vc1_if_1mv_mbmode_codes[8][6]; extern const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6]; -/* Interlaced frame/field picture MVDATA VLC tables */ +/* Interlaced frame/field picture MVDATA VLC tables + * The escape value of each table has the symbol 0; + * for every other symbol the lower nibble contains + * (index + 1) % 9 and the higher nibble (index + 1) / 9 + * with index being the index in the spec's interlace MV tables. */ /* 1-reference tables */ -extern const uint32_t ff_vc1_1ref_mvdata_codes[4][72]; -extern const uint8_t ff_vc1_1ref_mvdata_bits[4][72]; +extern const uint8_t ff_vc1_1ref_mvdata_tabs[4][72][2]; /* 2-reference tables */ -extern const uint32_t ff_vc1_2ref_mvdata_codes[8][126]; -extern const uint8_t ff_vc1_2ref_mvdata_bits[8][126]; +extern const uint8_t ff_vc1_2ref_mvdata_tabs[8][126][2]; /* DC differentials low+hi-mo, p217 are the same as in msmpeg4data .h */ From patchwork Tue Nov 10 10:48:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23553 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 4E996449CC7 for ; Tue, 10 Nov 2020 13:07:38 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C389368BF38; Tue, 10 Nov 2020 12:50:52 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3764668BEDA for ; Tue, 10 Nov 2020 12:50:38 +0200 (EET) Received: by mail-wm1-f50.google.com with SMTP id c9so2516366wml.5 for ; Tue, 10 Nov 2020 02:50:38 -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=rjFoFSiLuAsyE6pDRkcQhCtKNkEN6dxcAwj11PJcvZc=; b=EaqyewPR8CImt186r5gCeOnZRm1S0chts7miKRCsXL4vJnSsJ2FpUBIrJuA4A7+MZw rB3fZWDqxsnKvhJqeOmf6LjiVmjpSoy600eB1xH7ssstDmBAR5eSdqA1Q8Jo5E8LzHG0 5jX0FkNk03/uJ+sKEStNTq9xUhg6se2PJ4dHOzfivEVKewlXEvMEO2qEB5MucXKTPW7R oDijGYc6hzSALGiF2rV2JB67OcubpTYr2gNPoy65Bd5E8tqmwbGts0/PYJWaDFiragnJ 4yuHnf/wW3/oGAIT0wosJK7I6b9voWjmO2TPkLGDpIShEI3P+KCaol4vkt6POKZgF5ve JkHg== 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=rjFoFSiLuAsyE6pDRkcQhCtKNkEN6dxcAwj11PJcvZc=; b=b3/Buu8XXtDTg+FhyuTa9T/HohmtjrrIQcjqWgHCVnUgRG7N35CoEKoAO9xbO9011D SyiQU2w/FxucEnczs4QzskLnfiC6KH54WUsayKy2WEe5nt1k1NMOEaXaHtxGJp0qf5Z0 krBjx9+nrp5qN9T/tzR4Ot96GtnVXDPv2RHafeEkcJSgzsJG4DiTqTuWcsZHIf94YNYn YoKNsJy5QITxfEPMYzKN9bFVGUdlqIhR1xyLoj8Kfp6Zztf0YL486mXwGObasT43Vk8R l0M95vXuYV0BGfYEYa1DJP1U4RKEJyMVEAOxA2Bh2b44XWjNLY2gBf0vFXmjgHTJHSnh L4eg== X-Gm-Message-State: AOAM5311afy+wrXB2lIzmrye3tEyQMUlJzdKd8N5mVcb2NTRjjfOqrcR D+Nxs1+Xn5iLmZMuuIto1ODny4VAmxw= X-Google-Smtp-Source: ABdhPJzILTR5qpblnx0/9IHNirAZkpQzVzzxWHqD1DvH4N7sy1e217Nji7Pg5orwK67Z3GAWAySROA== X-Received: by 2002:a1c:328a:: with SMTP id y132mr4039615wmy.134.1605005437177; Tue, 10 Nov 2020 02:50:37 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:36 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:16 +0100 Message-Id: <20201110104851.321029-80-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 079/114] avcodec/vc1_block, msmpeg4dec: Don't check for errors for complete 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/msmpeg4dec.c | 5 ----- libavcodec/vc1_block.c | 12 ------------ 2 files changed, 17 deletions(-) diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 49df06a9d7..b3964457d6 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -614,11 +614,6 @@ static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr) } else { level = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3); } - if (level < 0){ - av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n"); - *dir_ptr = 0; - return -1; - } if (level == DC_MAX) { level = get_bits(&s->gb, 8); diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index ed6df541cf..714b3cdea0 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -584,10 +584,6 @@ static int vc1_decode_i_block(VC1Context *v, int16_t block[64], int n, } else { dcdiff = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3); } - if (dcdiff < 0) { - av_log(s->avctx, AV_LOG_ERROR, "Illegal DC VLC\n"); - return -1; - } if (dcdiff) { const int m = (v->pq == 1 || v->pq == 2) ? 3 - v->pq : 0; if (dcdiff == 119 /* ESC index value */) { @@ -732,10 +728,6 @@ static int vc1_decode_i_block_adv(VC1Context *v, int16_t block[64], int n, } else { dcdiff = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3); } - if (dcdiff < 0) { - av_log(s->avctx, AV_LOG_ERROR, "Illegal DC VLC\n"); - return -1; - } if (dcdiff) { const int m = (quant == 1 || quant == 2) ? 3 - quant : 0; if (dcdiff == 119 /* ESC index value */) { @@ -936,10 +928,6 @@ static int vc1_decode_intra_block(VC1Context *v, int16_t block[64], int n, } else { dcdiff = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3); } - if (dcdiff < 0) { - av_log(s->avctx, AV_LOG_ERROR, "Illegal DC VLC\n"); - return -1; - } if (dcdiff) { const int m = (quant == 1 || quant == 2) ? 3 - quant : 0; if (dcdiff == 119 /* ESC index value */) { From patchwork Tue Nov 10 10:48:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23555 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 E41E444A3F2 for ; Tue, 10 Nov 2020 13:08:12 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 770B668BF7F; Tue, 10 Nov 2020 12:50:54 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E4F6F68BEC0 for ; Tue, 10 Nov 2020 12:50:38 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id h62so2536179wme.3 for ; Tue, 10 Nov 2020 02:50:38 -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=kCPJaBE6TMauY1J0BpG2lyY+d1Ppq9opJKWrP9ItLZQ=; b=av7W3VQ6BK++zFaOll6IsmdmoMy5qLmMqwjfvFpmUAk0Nrw4Ccv53cPAEQaoSpkZw6 4nKXleu+1paT8hciRLsPj8aXof11NBsBv/Y0t7Ka1s7AGsr/XuNhMJLpm8KptO2IWlO9 V9mcMW9GaLVQEnRUWZWMsnG7pyfGGQ+RHB0VVkIZYQd1o41ROecMMrGAP1pJ8KIy6wwr K5mek9ZnHVfmXOJVSMNGPo7ET6ERyrG5eFLM50jSnl/exC675s8JR090Cw2KSlBsAMV+ 9iUX7zgYhxr8wN9TI1HtU56n/uJ0rL5R2Gi0gPe6E2PaKSuznzi3iwFL36ekjFLPtT8I fjMw== 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=kCPJaBE6TMauY1J0BpG2lyY+d1Ppq9opJKWrP9ItLZQ=; b=UoBjOzH8+vPS6g9i1f1tGwe/G1eyd4Cy6giSERaNHhj+rE+C8EpPgTrXLN14bXdk6H TIYJGM4K9kK5egF8tYq7HhWmGVUGoq+173e6lrGigLCcKFlDwwA85vdKsBuiDu/elUSf yNbBTHnH+rcGi6R+cwvMgecatIwO9lg0vY3Rw3uXOrf4ogm3OVQbFfhaOTVeBmIXGbHO +pEtmuYg6/tSXoDYIs57fFuyJBDYjzxRpkcG0FVcyY8f1CpkM1F/A17D4s/uhiTEld56 pYmnL6t/PW0np+Ot8qcJ80Qw5eb4WIU625zq1Gu7JJZ2RfpYIHUXlpqA0CYU2FUSaEDQ Ib8Q== X-Gm-Message-State: AOAM532UzluwbYJosl6afzmZwi2udKB7rvN6iJNUtryvrdJzfROOR6qD AlM+ssusnMQd688PnsVjqEe9eF9P7PA= X-Google-Smtp-Source: ABdhPJy8qEUEJKFE17e66shHmzNogzlMBlPxN3LHeFmWRQ21mtmuw1HE56VgqdaQ5Y2Uymh4GnzPGA== X-Received: by 2002:a7b:c101:: with SMTP id w1mr4071117wmi.170.1605005438049; Tue, 10 Nov 2020 02:50:38 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:37 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:17 +0100 Message-Id: <20201110104851.321029-81-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 080/114] avcodec/vc1_block: Don't use 0 for NULL 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1_block.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 714b3cdea0..3c9d1d4b8d 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -1633,7 +1633,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) for (i = 0; i < 4; i++) { dmv_x = dmv_y = 0; if (mvbp & (8 >> i)) - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); ff_vc1_pred_mv_intfr(v, i, dmv_x, dmv_y, 0, v->range_x, v->range_y, v->mb_type[0], 0); ff_vc1_mc_4mv_luma(v, i, 0, 0); } @@ -1642,14 +1642,14 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) mvbp = v->twomvbp; dmv_x = dmv_y = 0; if (mvbp & 2) { - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); } ff_vc1_pred_mv_intfr(v, 0, dmv_x, dmv_y, 2, v->range_x, v->range_y, v->mb_type[0], 0); ff_vc1_mc_4mv_luma(v, 0, 0, 0); ff_vc1_mc_4mv_luma(v, 1, 0, 0); dmv_x = dmv_y = 0; if (mvbp & 1) { - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); } ff_vc1_pred_mv_intfr(v, 2, dmv_x, dmv_y, 2, v->range_x, v->range_y, v->mb_type[0], 0); ff_vc1_mc_4mv_luma(v, 2, 0, 0); @@ -1659,7 +1659,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) mvbp = ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][2]; dmv_x = dmv_y = 0; if (mvbp) { - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); } ff_vc1_pred_mv_intfr(v, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0], 0); ff_vc1_mc_1mv(v, 0); @@ -2352,7 +2352,7 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) dmv_x = dmv_y = 0; val = ((mvbp >> (3 - i)) & 1); if (val) - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); j = i > 1 ? 2 : 0; ff_vc1_pred_mv_intfr(v, j, dmv_x, dmv_y, 2, v->range_x, v->range_y, v->mb_type[0], dir); ff_vc1_mc_4mv_luma(v, j, dir, dir); @@ -2365,14 +2365,14 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) mvbp = v->twomvbp; dmv_x = dmv_y = 0; if (mvbp & 2) - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); ff_vc1_pred_mv_intfr(v, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0], 0); ff_vc1_mc_1mv(v, 0); dmv_x = dmv_y = 0; if (mvbp & 1) - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); ff_vc1_pred_mv_intfr(v, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0], 1); ff_vc1_interp_mc(v); @@ -2384,12 +2384,12 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) mvbp = v->twomvbp; dmv_x = dmv_y = 0; if (mvbp & 2) - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); ff_vc1_pred_mv_intfr(v, 0, dmv_x, dmv_y, 2, v->range_x, v->range_y, v->mb_type[0], dir); dmv_x = dmv_y = 0; if (mvbp & 1) - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); ff_vc1_pred_mv_intfr(v, 2, dmv_x, dmv_y, 2, v->range_x, v->range_y, v->mb_type[0], dir2); if (mvsw) { @@ -2415,7 +2415,7 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) mvbp = ff_vc1_mbmode_intfrp[0][idx_mbmode][2]; dmv_x = dmv_y = 0; if (mvbp) - get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); ff_vc1_pred_mv_intfr(v, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0], dir); v->blk_mv_type[s->block_index[0]] = 1; From patchwork Tue Nov 10 10:48:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23557 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 6AB5244A3F2 for ; Tue, 10 Nov 2020 13:08:44 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7125468BF8A; Tue, 10 Nov 2020 12:50:56 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7E00868BF32 for ; Tue, 10 Nov 2020 12:50:41 +0200 (EET) Received: by mail-wr1-f46.google.com with SMTP id b8so12149766wrn.0 for ; Tue, 10 Nov 2020 02:50:41 -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=PL8+An9Qwb5cNv2P2ozkRJ384tS5VefCKYspD/mc6Xc=; b=j0I18OfD48w3WDlElE4fg23M2WN2NErxvbS8N+vS9xF8eOp5boMHNm58g1nmbBCz8+ ifNEEnRMZ9SUFRW1nCjFNc6z1cR7GZfdNrkizULGqYmkpwmwK+7Y92qL1+5SU+ZGq5cD 94KS3wymP1z7OaqZnJl7aFiN8fJve0Xelr+AQbEyiGMrMDOPs1XVnNttUfgckcWJJGra CQvhwOrpjFYAWCqfQzhnKHQxU7ykEe/ZZWENCxWuj4aunjmXlWJQMXOoLdxsvOaNaRWp i/NLilVYyybtRPcDf7pO31+ykGvr4p9MHM7VDE4yKfN6lVKHCuaa8FMuZvq20NdqKgeP Ltzw== 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=PL8+An9Qwb5cNv2P2ozkRJ384tS5VefCKYspD/mc6Xc=; b=mpTz7OSINgFoAzKVQLZEPywrgXaO/at3/G/nJwsa0qFDgIUDxLRi53XVRNlVT3I9BF 8AfCd2ZOKpVUOGG7SvwUVmRsRcoEcxkPZICN1eTAeuPQZvil9UzFUPK9uMoXzIkLAPox iLedHZIGVrDPVRbNVCKfSrONU43DpMmE1W04Bx6VNMPcKsVO3rywaxTEsq4/ucXN05n+ CWMxmFE0SwCfYSbGtWp+yceRYYe+HEpMc28i6oUPcWjS1QAz53Jys5ueO0hOlhbv2rGQ lzvii6ScPG91GlhBCVKKDcqcw9tVe4rx+QPe+iq1NRwkK1q4ldyA3gBfoMqTVnjx53lV XGWQ== X-Gm-Message-State: AOAM533dS5GWAg9CvSi2I0NwfUf/48WV/JSRvj1FJgDXCa+Cp4oOxbo1 SIuAzYz6wkwAJb4o2qrBgzdZhMsLsqE= X-Google-Smtp-Source: ABdhPJxXApuKGZmJs2J2KzB4A8wCWKdhm3ZROlddegyIFzrIS5WMMxGC7P7uFER0zzrxcWqDkTipFA== X-Received: by 2002:adf:f542:: with SMTP id j2mr6426475wrp.107.1605005439115; Tue, 10 Nov 2020 02:50:39 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:38 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:18 +0100 Message-Id: <20201110104851.321029-82-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 081/114] avcodec/vc1: Use symbols table to decode AC coefficients 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" The VC1 decoder currently follows the spec very closely when decoding AC coefficients: The spec uses tables with contiguous indexes. The last of each of these is an escape code; the other codes encode three other variables via tables: run, length and whether this is the last coefficient. This commit changes this: Given that both run and length fit into 6bits each, all three of these fit into a VLC symbol (without touching the sign bit which is needed because some of the VLCs used here aren't complete). This already makes the tables for the conversion from index to run etc. superfluous; furthermore while just at it, this commit also switches to ff_init_vlc_from_lengths(), thereby making the codes tables superfluous, too (and said code tables were interleaved with the length tables, so that the latter were using an uint32_t just as the former, wasting lots of space). Moreover, the number of codes for each table differed and the old approach padded the shorter ones to the length of the longer ones; this is no longer done either. All in all, this saves about 11KB of tables. Finally, the symbol and length tables have been added to vc1data.c; the interleaved codes and lengths tables which they replace was directly in vc1.c since 3c715383ea7012ac69507e6b9189c98675c77461 in order to make the VC1 parser compilable without decoder, but the data for the other VLCs which are also only used in the decoder is in vc1data.c, so moving it improves consistency. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1.c | 231 ++--------------------------------------- libavcodec/vc1_block.c | 28 ++--- libavcodec/vc1acdata.h | 174 ------------------------------- libavcodec/vc1data.c | 227 +++++++++++++++++++++++++++++++++++++++- libavcodec/vc1data.h | 5 + 5 files changed, 251 insertions(+), 414 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 2e39870057..599a77af31 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -1345,227 +1345,6 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) return 0; } -static const uint32_t vc1_ac_tables[AC_MODES][186][2] = { -{ -{ 0x0001, 2}, { 0x0005, 3}, { 0x000D, 4}, { 0x0012, 5}, { 0x000E, 6}, { 0x0015, 7}, -{ 0x0013, 8}, { 0x003F, 8}, { 0x004B, 9}, { 0x011F, 9}, { 0x00B8, 10}, { 0x03E3, 10}, -{ 0x0172, 11}, { 0x024D, 12}, { 0x03DA, 12}, { 0x02DD, 13}, { 0x1F55, 13}, { 0x05B9, 14}, -{ 0x3EAE, 14}, { 0x0000, 4}, { 0x0010, 5}, { 0x0008, 7}, { 0x0020, 8}, { 0x0029, 9}, -{ 0x01F4, 9}, { 0x0233, 10}, { 0x01E0, 11}, { 0x012A, 12}, { 0x03DD, 12}, { 0x050A, 13}, -{ 0x1F29, 13}, { 0x0A42, 14}, { 0x1272, 15}, { 0x1737, 15}, { 0x0003, 5}, { 0x0011, 7}, -{ 0x00C4, 8}, { 0x004B, 10}, { 0x00B4, 11}, { 0x07D4, 11}, { 0x0345, 12}, { 0x02D7, 13}, -{ 0x07BF, 13}, { 0x0938, 14}, { 0x0BBB, 14}, { 0x095E, 15}, { 0x0013, 5}, { 0x0078, 7}, -{ 0x0069, 9}, { 0x0232, 10}, { 0x0461, 11}, { 0x03EC, 12}, { 0x0520, 13}, { 0x1F2A, 13}, -{ 0x3E50, 14}, { 0x3E51, 14}, { 0x1486, 15}, { 0x000C, 6}, { 0x0024, 9}, { 0x0094, 11}, -{ 0x08C0, 12}, { 0x0F09, 14}, { 0x1EF0, 15}, { 0x003D, 6}, { 0x0053, 9}, { 0x01A0, 11}, -{ 0x02D6, 13}, { 0x0F08, 14}, { 0x0013, 7}, { 0x007C, 9}, { 0x07C1, 11}, { 0x04AC, 14}, -{ 0x001B, 7}, { 0x00A0, 10}, { 0x0344, 12}, { 0x0F79, 14}, { 0x0079, 7}, { 0x03E1, 10}, -{ 0x02D4, 13}, { 0x2306, 14}, { 0x0021, 8}, { 0x023C, 10}, { 0x0FAE, 12}, { 0x23DE, 14}, -{ 0x0035, 8}, { 0x0175, 11}, { 0x07B3, 13}, { 0x00C5, 8}, { 0x0174, 11}, { 0x0785, 13}, -{ 0x0048, 9}, { 0x01A3, 11}, { 0x049E, 13}, { 0x002C, 9}, { 0x00FA, 10}, { 0x07D6, 11}, -{ 0x0092, 10}, { 0x05CC, 13}, { 0x1EF1, 15}, { 0x00A3, 10}, { 0x03ED, 12}, { 0x093E, 14}, -{ 0x01E2, 11}, { 0x1273, 15}, { 0x07C4, 11}, { 0x1487, 15}, { 0x0291, 12}, { 0x0293, 12}, -{ 0x0F8A, 12}, { 0x0509, 13}, { 0x0508, 13}, { 0x078D, 13}, { 0x07BE, 13}, { 0x078C, 13}, -{ 0x04AE, 14}, { 0x0BBA, 14}, { 0x2307, 14}, { 0x0B9A, 14}, { 0x1736, 15}, { 0x000E, 4}, -{ 0x0045, 7}, { 0x01F3, 9}, { 0x047A, 11}, { 0x05DC, 13}, { 0x23DF, 14}, { 0x0019, 5}, -{ 0x0028, 9}, { 0x0176, 11}, { 0x049D, 13}, { 0x23DD, 14}, { 0x0030, 6}, { 0x00A2, 10}, -{ 0x02EF, 12}, { 0x05B8, 14}, { 0x003F, 6}, { 0x00A5, 10}, { 0x03DB, 12}, { 0x093F, 14}, -{ 0x0044, 7}, { 0x07CB, 11}, { 0x095F, 15}, { 0x0063, 7}, { 0x03C3, 12}, { 0x0015, 8}, -{ 0x08F6, 12}, { 0x0017, 8}, { 0x0498, 13}, { 0x002C, 8}, { 0x07B2, 13}, { 0x002F, 8}, -{ 0x1F54, 13}, { 0x008D, 8}, { 0x07BD, 13}, { 0x008E, 8}, { 0x1182, 13}, { 0x00FB, 8}, -{ 0x050B, 13}, { 0x002D, 8}, { 0x07C0, 11}, { 0x0079, 9}, { 0x1F5F, 13}, { 0x007A, 9}, -{ 0x1F56, 13}, { 0x0231, 10}, { 0x03E4, 10}, { 0x01A1, 11}, { 0x0143, 11}, { 0x01F7, 11}, -{ 0x016F, 12}, { 0x0292, 12}, { 0x02E7, 12}, { 0x016C, 12}, { 0x016D, 12}, { 0x03DC, 12}, -{ 0x0F8B, 12}, { 0x0499, 13}, { 0x03D8, 12}, { 0x078E, 13}, { 0x02D5, 13}, { 0x1F5E, 13}, -{ 0x1F2B, 13}, { 0x078F, 13}, { 0x04AD, 14}, { 0x3EAF, 14}, { 0x23DC, 14}, { 0x004A, 9} -}, -{ -{ 0x0000, 3}, { 0x0003, 4}, { 0x000B, 5}, { 0x0014, 6}, { 0x003F, 6}, { 0x005D, 7}, -{ 0x00A2, 8}, { 0x00AC, 9}, { 0x016E, 9}, { 0x020A, 10}, { 0x02E2, 10}, { 0x0432, 11}, -{ 0x05C9, 11}, { 0x0827, 12}, { 0x0B54, 12}, { 0x04E6, 13}, { 0x105F, 13}, { 0x172A, 13}, -{ 0x20B2, 14}, { 0x2D4E, 14}, { 0x39F0, 14}, { 0x4175, 15}, { 0x5A9E, 15}, { 0x0004, 4}, -{ 0x001E, 5}, { 0x0042, 7}, { 0x00B6, 8}, { 0x0173, 9}, { 0x0395, 10}, { 0x072E, 11}, -{ 0x0B94, 12}, { 0x16A4, 13}, { 0x20B3, 14}, { 0x2E45, 14}, { 0x0005, 5}, { 0x0040, 7}, -{ 0x0049, 9}, { 0x028F, 10}, { 0x05CB, 11}, { 0x048A, 13}, { 0x09DD, 14}, { 0x73E2, 15}, -{ 0x0018, 5}, { 0x0025, 8}, { 0x008A, 10}, { 0x051B, 11}, { 0x0E5F, 12}, { 0x09C9, 14}, -{ 0x139C, 15}, { 0x0029, 6}, { 0x004F, 9}, { 0x0412, 11}, { 0x048D, 13}, { 0x2E41, 14}, -{ 0x0038, 6}, { 0x010E, 9}, { 0x05A8, 11}, { 0x105C, 13}, { 0x39F2, 14}, { 0x0058, 7}, -{ 0x021F, 10}, { 0x0E7E, 12}, { 0x39FF, 14}, { 0x0023, 8}, { 0x02E3, 10}, { 0x04E5, 13}, -{ 0x2E40, 14}, { 0x00A1, 8}, { 0x05BE, 11}, { 0x09C8, 14}, { 0x0083, 8}, { 0x013A, 11}, -{ 0x1721, 13}, { 0x0044, 9}, { 0x0276, 12}, { 0x39F6, 14}, { 0x008B, 10}, { 0x04EF, 13}, -{ 0x5A9B, 15}, { 0x0208, 10}, { 0x1CFE, 13}, { 0x0399, 10}, { 0x1CB4, 13}, { 0x039E, 10}, -{ 0x39F3, 14}, { 0x05AB, 11}, { 0x73E3, 15}, { 0x0737, 11}, { 0x5A9F, 15}, { 0x082D, 12}, -{ 0x0E69, 12}, { 0x0E68, 12}, { 0x0433, 11}, { 0x0B7B, 12}, { 0x2DF8, 14}, { 0x2E56, 14}, -{ 0x2E57, 14}, { 0x39F7, 14}, { 0x51A5, 15}, { 0x0003, 3}, { 0x002A, 6}, { 0x00E4, 8}, -{ 0x028E, 10}, { 0x0735, 11}, { 0x1058, 13}, { 0x1CFA, 13}, { 0x2DF9, 14}, { 0x4174, 15}, -{ 0x0009, 4}, { 0x0054, 8}, { 0x0398, 10}, { 0x048B, 13}, { 0x139D, 15}, { 0x000D, 4}, -{ 0x00AD, 9}, { 0x0826, 12}, { 0x2D4C, 14}, { 0x0011, 5}, { 0x016B, 9}, { 0x0B7F, 12}, -{ 0x51A4, 15}, { 0x0019, 5}, { 0x021B, 10}, { 0x16FD, 13}, { 0x001D, 5}, { 0x0394, 10}, -{ 0x28D3, 14}, { 0x002B, 6}, { 0x05BC, 11}, { 0x5A9A, 15}, { 0x002F, 6}, { 0x0247, 12}, -{ 0x0010, 7}, { 0x0A35, 12}, { 0x003E, 6}, { 0x0B7A, 12}, { 0x0059, 7}, { 0x105E, 13}, -{ 0x0026, 8}, { 0x09CF, 14}, { 0x0055, 8}, { 0x1CB5, 13}, { 0x0057, 8}, { 0x0E5B, 12}, -{ 0x00A0, 8}, { 0x1468, 13}, { 0x0170, 9}, { 0x0090, 10}, { 0x01CE, 9}, { 0x021A, 10}, -{ 0x0218, 10}, { 0x0168, 9}, { 0x021E, 10}, { 0x0244, 12}, { 0x0736, 11}, { 0x0138, 11}, -{ 0x0519, 11}, { 0x0E5E, 12}, { 0x072C, 11}, { 0x0B55, 12}, { 0x09DC, 14}, { 0x20BB, 14}, -{ 0x048C, 13}, { 0x1723, 13}, { 0x2E44, 14}, { 0x16A5, 13}, { 0x0518, 11}, { 0x39FE, 14}, -{ 0x0169, 9} -}, -{ -{ 0x0001, 2}, { 0x0006, 3}, { 0x000F, 4}, { 0x0016, 5}, { 0x0020, 6}, { 0x0018, 7}, -{ 0x0008, 8}, { 0x009A, 8}, { 0x0056, 9}, { 0x013E, 9}, { 0x00F0, 10}, { 0x03A5, 10}, -{ 0x0077, 11}, { 0x01EF, 11}, { 0x009A, 12}, { 0x005D, 13}, { 0x0001, 4}, { 0x0011, 5}, -{ 0x0002, 7}, { 0x000B, 8}, { 0x0012, 9}, { 0x01D6, 9}, { 0x027E, 10}, { 0x0191, 11}, -{ 0x00EA, 12}, { 0x03DC, 12}, { 0x013B, 13}, { 0x0004, 5}, { 0x0014, 7}, { 0x009E, 8}, -{ 0x0009, 10}, { 0x01AC, 11}, { 0x01E2, 11}, { 0x03CA, 12}, { 0x005F, 13}, { 0x0017, 5}, -{ 0x004E, 7}, { 0x005E, 9}, { 0x00F3, 10}, { 0x01AD, 11}, { 0x00EC, 12}, { 0x05F0, 13}, -{ 0x000E, 6}, { 0x00E1, 8}, { 0x03A4, 10}, { 0x009C, 12}, { 0x013D, 13}, { 0x003B, 6}, -{ 0x001C, 9}, { 0x0014, 11}, { 0x09BE, 12}, { 0x0006, 7}, { 0x007A, 9}, { 0x0190, 11}, -{ 0x0137, 13}, { 0x001B, 7}, { 0x0008, 10}, { 0x075C, 11}, { 0x0071, 7}, { 0x00D7, 10}, -{ 0x09BF, 12}, { 0x0007, 8}, { 0x00AF, 10}, { 0x04CC, 11}, { 0x0034, 8}, { 0x0265, 10}, -{ 0x009F, 12}, { 0x00E0, 8}, { 0x0016, 11}, { 0x0327, 12}, { 0x0015, 9}, { 0x017D, 11}, -{ 0x0EBB, 12}, { 0x0014, 9}, { 0x00F6, 10}, { 0x01E4, 11}, { 0x00CB, 10}, { 0x099D, 12}, -{ 0x00CA, 10}, { 0x02FC, 12}, { 0x017F, 11}, { 0x04CD, 11}, { 0x02FD, 12}, { 0x04FE, 11}, -{ 0x013A, 13}, { 0x000A, 4}, { 0x0042, 7}, { 0x01D3, 9}, { 0x04DD, 11}, { 0x0012, 5}, -{ 0x00E8, 8}, { 0x004C, 11}, { 0x0136, 13}, { 0x0039, 6}, { 0x0264, 10}, { 0x0EBA, 12}, -{ 0x0000, 7}, { 0x00AE, 10}, { 0x099C, 12}, { 0x001F, 7}, { 0x04DE, 11}, { 0x0043, 7}, -{ 0x04DC, 11}, { 0x0003, 8}, { 0x03CB, 12}, { 0x0006, 8}, { 0x099E, 12}, { 0x002A, 8}, -{ 0x05F1, 13}, { 0x000F, 8}, { 0x09FE, 12}, { 0x0033, 8}, { 0x09FF, 12}, { 0x0098, 8}, -{ 0x099F, 12}, { 0x00EA, 8}, { 0x013C, 13}, { 0x002E, 8}, { 0x0192, 11}, { 0x0136, 9}, -{ 0x006A, 9}, { 0x0015, 11}, { 0x03AF, 10}, { 0x01E3, 11}, { 0x0074, 11}, { 0x00EB, 12}, -{ 0x02F9, 12}, { 0x005C, 13}, { 0x00ED, 12}, { 0x03DD, 12}, { 0x0326, 12}, { 0x005E, 13}, -{ 0x0016, 7} -}, -{ -{ 0x0004, 3}, { 0x0014, 5}, { 0x0017, 7}, { 0x007F, 8}, { 0x0154, 9}, { 0x01F2, 10}, -{ 0x00BF, 11}, { 0x0065, 12}, { 0x0AAA, 12}, { 0x0630, 13}, { 0x1597, 13}, { 0x03B7, 14}, -{ 0x2B22, 14}, { 0x0BE6, 15}, { 0x000B, 4}, { 0x0037, 7}, { 0x0062, 9}, { 0x0007, 11}, -{ 0x0166, 12}, { 0x00CE, 13}, { 0x1590, 13}, { 0x05F6, 14}, { 0x0BE7, 15}, { 0x0007, 5}, -{ 0x006D, 8}, { 0x0003, 11}, { 0x031F, 12}, { 0x05F2, 14}, { 0x0002, 6}, { 0x0061, 9}, -{ 0x0055, 12}, { 0x01DF, 14}, { 0x001A, 6}, { 0x001E, 10}, { 0x0AC9, 12}, { 0x2B23, 14}, -{ 0x001E, 6}, { 0x001F, 10}, { 0x0AC3, 12}, { 0x2B2B, 14}, { 0x0006, 7}, { 0x0004, 11}, -{ 0x02F8, 13}, { 0x0019, 7}, { 0x0006, 11}, { 0x063D, 13}, { 0x0057, 7}, { 0x0182, 11}, -{ 0x2AA2, 14}, { 0x0004, 8}, { 0x0180, 11}, { 0x059C, 14}, { 0x007D, 8}, { 0x0164, 12}, -{ 0x076D, 15}, { 0x0002, 9}, { 0x018D, 11}, { 0x1581, 13}, { 0x00AD, 8}, { 0x0060, 12}, -{ 0x0C67, 14}, { 0x001C, 9}, { 0x00EE, 13}, { 0x0003, 9}, { 0x02CF, 13}, { 0x00D9, 9}, -{ 0x1580, 13}, { 0x0002, 11}, { 0x0183, 11}, { 0x0057, 12}, { 0x0061, 12}, { 0x0031, 11}, -{ 0x0066, 12}, { 0x0631, 13}, { 0x0632, 13}, { 0x00AC, 13}, { 0x031D, 12}, { 0x0076, 12}, -{ 0x003A, 11}, { 0x0165, 12}, { 0x0C66, 14}, { 0x0003, 2}, { 0x0054, 7}, { 0x02AB, 10}, -{ 0x0016, 13}, { 0x05F7, 14}, { 0x0005, 4}, { 0x00F8, 9}, { 0x0AA9, 12}, { 0x005F, 15}, -{ 0x0004, 4}, { 0x001C, 10}, { 0x1550, 13}, { 0x0004, 5}, { 0x0077, 11}, { 0x076C, 15}, -{ 0x000E, 5}, { 0x000A, 12}, { 0x000C, 5}, { 0x0562, 11}, { 0x0004, 6}, { 0x031C, 12}, -{ 0x0006, 6}, { 0x00C8, 13}, { 0x000D, 6}, { 0x01DA, 13}, { 0x0007, 6}, { 0x00C9, 13}, -{ 0x0001, 7}, { 0x002E, 14}, { 0x0014, 7}, { 0x1596, 13}, { 0x000A, 7}, { 0x0AC2, 12}, -{ 0x0016, 7}, { 0x015B, 14}, { 0x0015, 7}, { 0x015A, 14}, { 0x000F, 8}, { 0x005E, 15}, -{ 0x007E, 8}, { 0x00AB, 8}, { 0x002D, 9}, { 0x00D8, 9}, { 0x000B, 9}, { 0x0014, 10}, -{ 0x02B3, 10}, { 0x01F3, 10}, { 0x003A, 10}, { 0x0000, 10}, { 0x0058, 10}, { 0x002E, 9}, -{ 0x005E, 10}, { 0x0563, 11}, { 0x00EC, 12}, { 0x0054, 12}, { 0x0AC1, 12}, { 0x1556, 13}, -{ 0x02FA, 13}, { 0x0181, 11}, { 0x1557, 13}, { 0x059D, 14}, { 0x2AA3, 14}, { 0x2B2A, 14}, -{ 0x01DE, 14}, { 0x063C, 13}, { 0x00CF, 13}, { 0x1594, 13}, { 0x000D, 9} -}, -{ -{ 0x0002, 2}, { 0x0006, 3}, { 0x000F, 4}, { 0x000D, 5}, { 0x000C, 5}, { 0x0015, 6}, -{ 0x0013, 6}, { 0x0012, 6}, { 0x0017, 7}, { 0x001F, 8}, { 0x001E, 8}, { 0x001D, 8}, -{ 0x0025, 9}, { 0x0024, 9}, { 0x0023, 9}, { 0x0021, 9}, { 0x0021, 10}, { 0x0020, 10}, -{ 0x000F, 10}, { 0x000E, 10}, { 0x0007, 11}, { 0x0006, 11}, { 0x0020, 11}, { 0x0021, 11}, -{ 0x0050, 12}, { 0x0051, 12}, { 0x0052, 12}, { 0x000E, 4}, { 0x0014, 6}, { 0x0016, 7}, -{ 0x001C, 8}, { 0x0020, 9}, { 0x001F, 9}, { 0x000D, 10}, { 0x0022, 11}, { 0x0053, 12}, -{ 0x0055, 12}, { 0x000B, 5}, { 0x0015, 7}, { 0x001E, 9}, { 0x000C, 10}, { 0x0056, 12}, -{ 0x0011, 6}, { 0x001B, 8}, { 0x001D, 9}, { 0x000B, 10}, { 0x0010, 6}, { 0x0022, 9}, -{ 0x000A, 10}, { 0x000D, 6}, { 0x001C, 9}, { 0x0008, 10}, { 0x0012, 7}, { 0x001B, 9}, -{ 0x0054, 12}, { 0x0014, 7}, { 0x001A, 9}, { 0x0057, 12}, { 0x0019, 8}, { 0x0009, 10}, -{ 0x0018, 8}, { 0x0023, 11}, { 0x0017, 8}, { 0x0019, 9}, { 0x0018, 9}, { 0x0007, 10}, -{ 0x0058, 12}, { 0x0007, 4}, { 0x000C, 6}, { 0x0016, 8}, { 0x0017, 9}, { 0x0006, 10}, -{ 0x0005, 11}, { 0x0004, 11}, { 0x0059, 12}, { 0x000F, 6}, { 0x0016, 9}, { 0x0005, 10}, -{ 0x000E, 6}, { 0x0004, 10}, { 0x0011, 7}, { 0x0024, 11}, { 0x0010, 7}, { 0x0025, 11}, -{ 0x0013, 7}, { 0x005A, 12}, { 0x0015, 8}, { 0x005B, 12}, { 0x0014, 8}, { 0x0013, 8}, -{ 0x001A, 8}, { 0x0015, 9}, { 0x0014, 9}, { 0x0013, 9}, { 0x0012, 9}, { 0x0011, 9}, -{ 0x0026, 11}, { 0x0027, 11}, { 0x005C, 12}, { 0x005D, 12}, { 0x005E, 12}, { 0x005F, 12}, -{ 0x0003, 7} -}, -{ -{ 0x0002, 2}, { 0x000F, 4}, { 0x0015, 6}, { 0x0017, 7}, { 0x001F, 8}, { 0x0025, 9}, -{ 0x0024, 9}, { 0x0021, 10}, { 0x0020, 10}, { 0x0007, 11}, { 0x0006, 11}, { 0x0020, 11}, -{ 0x0006, 3}, { 0x0014, 6}, { 0x001E, 8}, { 0x000F, 10}, { 0x0021, 11}, { 0x0050, 12}, -{ 0x000E, 4}, { 0x001D, 8}, { 0x000E, 10}, { 0x0051, 12}, { 0x000D, 5}, { 0x0023, 9}, -{ 0x000D, 10}, { 0x000C, 5}, { 0x0022, 9}, { 0x0052, 12}, { 0x000B, 5}, { 0x000C, 10}, -{ 0x0053, 12}, { 0x0013, 6}, { 0x000B, 10}, { 0x0054, 12}, { 0x0012, 6}, { 0x000A, 10}, -{ 0x0011, 6}, { 0x0009, 10}, { 0x0010, 6}, { 0x0008, 10}, { 0x0016, 7}, { 0x0055, 12}, -{ 0x0015, 7}, { 0x0014, 7}, { 0x001C, 8}, { 0x001B, 8}, { 0x0021, 9}, { 0x0020, 9}, -{ 0x001F, 9}, { 0x001E, 9}, { 0x001D, 9}, { 0x001C, 9}, { 0x001B, 9}, { 0x001A, 9}, -{ 0x0022, 11}, { 0x0023, 11}, { 0x0056, 12}, { 0x0057, 12}, { 0x0007, 4}, { 0x0019, 9}, -{ 0x0005, 11}, { 0x000F, 6}, { 0x0004, 11}, { 0x000E, 6}, { 0x000D, 6}, { 0x000C, 6}, -{ 0x0013, 7}, { 0x0012, 7}, { 0x0011, 7}, { 0x0010, 7}, { 0x001A, 8}, { 0x0019, 8}, -{ 0x0018, 8}, { 0x0017, 8}, { 0x0016, 8}, { 0x0015, 8}, { 0x0014, 8}, { 0x0013, 8}, -{ 0x0018, 9}, { 0x0017, 9}, { 0x0016, 9}, { 0x0015, 9}, { 0x0014, 9}, { 0x0013, 9}, -{ 0x0012, 9}, { 0x0011, 9}, { 0x0007, 10}, { 0x0006, 10}, { 0x0005, 10}, { 0x0004, 10}, -{ 0x0024, 11}, { 0x0025, 11}, { 0x0026, 11}, { 0x0027, 11}, { 0x0058, 12}, { 0x0059, 12}, -{ 0x005A, 12}, { 0x005B, 12}, { 0x005C, 12}, { 0x005D, 12}, { 0x005E, 12}, { 0x005F, 12}, -{ 0x0003, 7} -}, -{ -{ 0x0000, 2}, { 0x0003, 3}, { 0x000D, 4}, { 0x0005, 4}, { 0x001C, 5}, { 0x0016, 5}, -{ 0x003F, 6}, { 0x003A, 6}, { 0x002E, 6}, { 0x0022, 6}, { 0x007B, 7}, { 0x0067, 7}, -{ 0x005F, 7}, { 0x0047, 7}, { 0x0026, 7}, { 0x00EF, 8}, { 0x00CD, 8}, { 0x00C1, 8}, -{ 0x00A9, 8}, { 0x004F, 8}, { 0x01F2, 9}, { 0x01DD, 9}, { 0x0199, 9}, { 0x0185, 9}, -{ 0x015D, 9}, { 0x011B, 9}, { 0x03EF, 10}, { 0x03E1, 10}, { 0x03C8, 10}, { 0x0331, 10}, -{ 0x0303, 10}, { 0x02F1, 10}, { 0x02A0, 10}, { 0x0233, 10}, { 0x0126, 10}, { 0x07C0, 11}, -{ 0x076F, 11}, { 0x076C, 11}, { 0x0661, 11}, { 0x0604, 11}, { 0x0572, 11}, { 0x0551, 11}, -{ 0x046A, 11}, { 0x0274, 11}, { 0x0F27, 12}, { 0x0F24, 12}, { 0x0EDB, 12}, { 0x0C8E, 12}, -{ 0x0C0B, 12}, { 0x0C0A, 12}, { 0x0AE3, 12}, { 0x08D6, 12}, { 0x0490, 12}, { 0x0495, 12}, -{ 0x1F19, 13}, { 0x1DB5, 13}, { 0x0009, 4}, { 0x0010, 5}, { 0x0029, 6}, { 0x0062, 7}, -{ 0x00F3, 8}, { 0x00AD, 8}, { 0x01E5, 9}, { 0x0179, 9}, { 0x009C, 9}, { 0x03B1, 10}, -{ 0x02AE, 10}, { 0x0127, 10}, { 0x076E, 11}, { 0x0570, 11}, { 0x0275, 11}, { 0x0F25, 12}, -{ 0x0EC0, 12}, { 0x0AA0, 12}, { 0x08D7, 12}, { 0x1E4C, 13}, { 0x0008, 5}, { 0x0063, 7}, -{ 0x00AF, 8}, { 0x017B, 9}, { 0x03B3, 10}, { 0x07DD, 11}, { 0x0640, 11}, { 0x0F8D, 12}, -{ 0x0BC1, 12}, { 0x0491, 12}, { 0x0028, 6}, { 0x00C3, 8}, { 0x0151, 9}, { 0x02A1, 10}, -{ 0x0573, 11}, { 0x0EC3, 12}, { 0x1F35, 13}, { 0x0065, 7}, { 0x01DA, 9}, { 0x02AF, 10}, -{ 0x0277, 11}, { 0x08C9, 12}, { 0x1781, 13}, { 0x0025, 7}, { 0x0118, 9}, { 0x0646, 11}, -{ 0x0AA6, 12}, { 0x1780, 13}, { 0x00C9, 8}, { 0x0321, 10}, { 0x0F9B, 12}, { 0x191E, 13}, -{ 0x0048, 8}, { 0x07CC, 11}, { 0x0AA1, 12}, { 0x0180, 9}, { 0x0465, 11}, { 0x1905, 13}, -{ 0x03E2, 10}, { 0x0EC1, 12}, { 0x3C9B, 14}, { 0x02F4, 10}, { 0x08C8, 12}, { 0x07C1, 11}, -{ 0x0928, 13}, { 0x05E1, 11}, { 0x320D, 14}, { 0x0EC2, 12}, { 0x6418, 15}, { 0x1F34, 13}, -{ 0x0078, 7}, { 0x0155, 9}, { 0x0552, 11}, { 0x191F, 13}, { 0x00FA, 8}, { 0x07DC, 11}, -{ 0x1907, 13}, { 0x00AC, 8}, { 0x0249, 11}, { 0x13B1, 14}, { 0x01F6, 9}, { 0x0AE2, 12}, -{ 0x01DC, 9}, { 0x04ED, 12}, { 0x0184, 9}, { 0x1904, 13}, { 0x0156, 9}, { 0x09D9, 13}, -{ 0x03E7, 10}, { 0x0929, 13}, { 0x03B2, 10}, { 0x3B68, 14}, { 0x02F5, 10}, { 0x13B0, 14}, -{ 0x0322, 10}, { 0x3B69, 14}, { 0x0234, 10}, { 0x7935, 15}, { 0x07C7, 11}, { 0xC833, 16}, -{ 0x0660, 11}, { 0x7934, 15}, { 0x024B, 11}, { 0xC832, 16}, { 0x0AA7, 12}, { 0x1F18, 13}, -{ 0x007A, 7} -}, -{ -{ 0x0002, 2}, { 0x0000, 3}, { 0x001E, 5}, { 0x0004, 5}, { 0x0012, 6}, { 0x0070, 7}, -{ 0x001A, 7}, { 0x005F, 8}, { 0x0047, 8}, { 0x01D3, 9}, { 0x00B5, 9}, { 0x0057, 9}, -{ 0x03B5, 10}, { 0x016D, 10}, { 0x0162, 10}, { 0x07CE, 11}, { 0x0719, 11}, { 0x0691, 11}, -{ 0x02C6, 11}, { 0x0156, 11}, { 0x0F92, 12}, { 0x0D2E, 12}, { 0x0D20, 12}, { 0x059E, 12}, -{ 0x0468, 12}, { 0x02A6, 12}, { 0x1DA2, 13}, { 0x1C60, 13}, { 0x1A43, 13}, { 0x0B1D, 13}, -{ 0x08C0, 13}, { 0x055D, 13}, { 0x0003, 3}, { 0x000A, 5}, { 0x0077, 7}, { 0x00E5, 8}, -{ 0x01D9, 9}, { 0x03E5, 10}, { 0x0166, 10}, { 0x0694, 11}, { 0x0152, 11}, { 0x059F, 12}, -{ 0x1F3C, 13}, { 0x1A4B, 13}, { 0x055E, 13}, { 0x000C, 4}, { 0x007D, 7}, { 0x0044, 8}, -{ 0x03E0, 10}, { 0x0769, 11}, { 0x0E31, 12}, { 0x1F26, 13}, { 0x055C, 13}, { 0x001B, 5}, -{ 0x00E2, 8}, { 0x03A5, 10}, { 0x02C9, 11}, { 0x1F23, 13}, { 0x3B47, 14}, { 0x0007, 5}, -{ 0x01D8, 9}, { 0x02D8, 11}, { 0x1F27, 13}, { 0x3494, 14}, { 0x0035, 6}, { 0x03E1, 10}, -{ 0x059C, 12}, { 0x38C3, 14}, { 0x000C, 6}, { 0x0165, 10}, { 0x1D23, 13}, { 0x1638, 14}, -{ 0x0068, 7}, { 0x0693, 11}, { 0x3A45, 14}, { 0x0020, 7}, { 0x0F90, 12}, { 0x7CF6, 15}, -{ 0x00E8, 8}, { 0x058F, 12}, { 0x2CEF, 15}, { 0x0045, 8}, { 0x0B3A, 13}, { 0x01F1, 9}, -{ 0x3B46, 14}, { 0x01A7, 9}, { 0x1676, 14}, { 0x0056, 9}, { 0x692A, 15}, { 0x038D, 10}, -{ 0xE309, 16}, { 0x00AA, 10}, { 0x1C611, 17}, { 0x02DF, 11}, { 0xB3B9, 17}, { 0x02C8, 11}, -{ 0x38C20, 18}, { 0x01B0, 11}, { 0x16390, 18}, { 0x0F9F, 12}, { 0x16771, 18}, { 0x0ED0, 12}, -{ 0x71843, 19}, { 0x0D2A, 12}, { 0xF9E8C, 20}, { 0x0461, 12}, { 0xF9E8E, 20}, { 0x0B67, 13}, -{ 0x055F, 13}, { 0x003F, 6}, { 0x006D, 9}, { 0x0E90, 12}, { 0x054E, 13}, { 0x0013, 6}, -{ 0x0119, 10}, { 0x0B66, 13}, { 0x000B, 6}, { 0x0235, 11}, { 0x7CF5, 15}, { 0x0075, 7}, -{ 0x0D24, 12}, { 0xF9E9, 16}, { 0x002E, 7}, { 0x1F22, 13}, { 0x0021, 7}, { 0x054F, 13}, -{ 0x0014, 7}, { 0x3A44, 14}, { 0x00E4, 8}, { 0x7CF7, 15}, { 0x005E, 8}, { 0x7185, 15}, -{ 0x0037, 8}, { 0x2C73, 15}, { 0x01DB, 9}, { 0x59DD, 16}, { 0x01C7, 9}, { 0x692B, 15}, -{ 0x01A6, 9}, { 0x58E5, 16}, { 0x00B4, 9}, { 0x1F3D0, 17}, { 0x00B0, 9}, { 0xB1C9, 17}, -{ 0x03E6, 10}, { 0x16770, 18}, { 0x016E, 10}, { 0x3E7A2, 18}, { 0x011B, 10}, { 0xF9E8D, 20}, -{ 0x00D9, 10}, { 0xF9E8F, 20}, { 0x00A8, 10}, { 0x2C723, 19}, { 0x0749, 11}, { 0xE3084, 20}, -{ 0x0696, 11}, { 0x58E45, 20}, { 0x02DE, 11}, { 0xB1C88, 21}, { 0x0231, 11}, { 0x1C610A, 21}, -{ 0x01B1, 11}, { 0x71842D, 23}, { 0x0D2B, 12}, { 0x38C217, 22}, { 0x0D2F, 12}, { 0x163913, 22}, -{ 0x05B2, 12}, { 0x163912, 22}, { 0x0469, 12}, { 0x71842C, 23}, { 0x1A42, 13}, { 0x08C1, 13}, -{ 0x0073, 7} -} -}; - static const uint16_t vlc_offs[] = { 0, 520, 552, 616, 1128, 1160, 1224, 1740, 1772, 1836, 1900, 2436, 2986, 3050, 3610, 4154, 4218, 4746, 5326, 5390, 5902, 6554, 7658, 8342, @@ -1639,12 +1418,14 @@ av_cold int ff_vc1_init_common(VC1Context *v) ff_vc1_mv_diff_bits[i], 1, 1, ff_vc1_mv_diff_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); } - for (i = 0; i < 8; i++) { + for (int i = 0, ac_offset = 0; i < 8; i++) { ff_vc1_ac_coeff_table[i].table = &vlc_table[vlc_offs[i * 2 + 21]]; ff_vc1_ac_coeff_table[i].table_allocated = vlc_offs[i * 2 + 22] - vlc_offs[i * 2 + 21]; - init_vlc(&ff_vc1_ac_coeff_table[i], AC_VLC_BITS, ff_vc1_ac_sizes[i], - &vc1_ac_tables[i][0][1], 8, 4, - &vc1_ac_tables[i][0][0], 8, 4, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_ac_coeff_table[i], AC_VLC_BITS, ff_vc1_ac_sizes[i], + ff_vc1_ac_coeff_lens + ac_offset, 1, + ff_vc1_ac_coeff_syms + ac_offset, 2, 2, + 0, INIT_VLC_USE_NEW_STATIC); + ac_offset += ff_vc1_ac_sizes[i]; /* initialize interlaced MVDATA tables (2-Ref) */ ff_vc1_2ref_mvdata_vlc[i].table = &vlc_table[vlc_offs[i * 2 + 22]]; ff_vc1_2ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 2 + 23] - vlc_offs[i * 2 + 22]; diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 3c9d1d4b8d..42de71eb25 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -504,25 +504,25 @@ static int vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value, int codingset) { GetBitContext *gb = &v->s.gb; - int index, run, level, lst, sign; - - index = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3); - if (index < 0) - return index; - if (index != ff_vc1_ac_sizes[codingset] - 1) { - run = vc1_index_decode_table[codingset][index][0]; - level = vc1_index_decode_table[codingset][index][1]; - lst = index >= vc1_last_decode_table[codingset] || get_bits_left(gb) < 0; + int symbol, run, level, lst, sign; + + symbol = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3); + if (symbol < 0) + return symbol; + if (symbol > 0) { + run = symbol & 0xFF; + level = symbol >> 9; + lst = symbol & 0x100 || get_bits_left(gb) < 0; sign = get_bits1(gb); } else { int escape = decode210(gb); if (escape != 2) { - index = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3); - if (index >= ff_vc1_ac_sizes[codingset] - 1U) + symbol = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3); + if (symbol <= 0) return AVERROR_INVALIDDATA; - run = vc1_index_decode_table[codingset][index][0]; - level = vc1_index_decode_table[codingset][index][1]; - lst = index >= vc1_last_decode_table[codingset]; + run = symbol & 0xFF; + level = symbol >> 9; + lst = symbol & 0x100; if (escape == 0) { if (lst) level += vc1_last_delta_level_table[codingset][run]; diff --git a/libavcodec/vc1acdata.h b/libavcodec/vc1acdata.h index a70b44ae05..68a4ca82cf 100644 --- a/libavcodec/vc1acdata.h +++ b/libavcodec/vc1acdata.h @@ -26,180 +26,6 @@ #include "vc1data.h" -/* which indexes point to last=1 entries in tables */ -static const int vc1_last_decode_table[AC_MODES] = { - 119, 99, 85, 81, 67, 58, 126, 109 -}; - -static const uint8_t vc1_index_decode_table[AC_MODES][185][2] = { -{ -{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, -{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, -{ 0, 17}, { 0, 18}, { 0, 19}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, -{ 1, 6}, { 1, 7}, { 1, 8}, { 1, 9}, { 1, 10}, { 1, 11}, { 1, 12}, { 1, 13}, -{ 1, 14}, { 1, 15}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 2, 5}, { 2, 6}, -{ 2, 7}, { 2, 8}, { 2, 9}, { 2, 10}, { 2, 11}, { 2, 12}, { 3, 1}, { 3, 2}, -{ 3, 3}, { 3, 4}, { 3, 5}, { 3, 6}, { 3, 7}, { 3, 8}, { 3, 9}, { 3, 10}, -{ 3, 11}, { 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 4, 5}, { 4, 6}, { 5, 1}, -{ 5, 2}, { 5, 3}, { 5, 4}, { 5, 5}, { 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, -{ 7, 1}, { 7, 2}, { 7, 3}, { 7, 4}, { 8, 1}, { 8, 2}, { 8, 3}, { 8, 4}, -{ 9, 1}, { 9, 2}, { 9, 3}, { 9, 4}, { 10, 1}, { 10, 2}, { 10, 3}, { 11, 1}, -{ 11, 2}, { 11, 3}, { 12, 1}, { 12, 2}, { 12, 3}, { 13, 1}, { 13, 2}, { 13, 3}, -{ 14, 1}, { 14, 2}, { 14, 3}, { 15, 1}, { 15, 2}, { 15, 3}, { 16, 1}, { 16, 2}, -{ 17, 1}, { 17, 2}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, -{ 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, { 29, 1}, { 30, 1}, { 0, 1}, -{ 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 1, 1}, { 1, 2}, { 1, 3}, -{ 1, 4}, { 1, 5}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 3, 1}, { 3, 2}, -{ 3, 3}, { 3, 4}, { 4, 1}, { 4, 2}, { 4, 3}, { 5, 1}, { 5, 2}, { 6, 1}, -{ 6, 2}, { 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, -{ 10, 2}, { 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, -{ 14, 2}, { 15, 1}, { 15, 2}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, -{ 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, -{ 29, 1}, { 30, 1}, { 31, 1}, { 32, 1}, { 33, 1}, { 34, 1}, { 35, 1}, { 36, 1}, -{ 37, 1} -}, -{ -{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, -{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, -{ 0, 17}, { 0, 18}, { 0, 19}, { 0, 20}, { 0, 21}, { 0, 22}, { 0, 23}, { 1, 1}, -{ 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, { 1, 9}, -{ 1, 10}, { 1, 11}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 2, 5}, { 2, 6}, -{ 2, 7}, { 2, 8}, { 3, 1}, { 3, 2}, { 3, 3}, { 3, 4}, { 3, 5}, { 3, 6}, -{ 3, 7}, { 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 4, 5}, { 5, 1}, { 5, 2}, -{ 5, 3}, { 5, 4}, { 5, 5}, { 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, { 7, 1}, -{ 7, 2}, { 7, 3}, { 7, 4}, { 8, 1}, { 8, 2}, { 8, 3}, { 9, 1}, { 9, 2}, -{ 9, 3}, { 10, 1}, { 10, 2}, { 10, 3}, { 11, 1}, { 11, 2}, { 11, 3}, { 12, 1}, -{ 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 14, 2}, { 15, 1}, { 15, 2}, { 16, 1}, -{ 16, 2}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, -{ 24, 1}, { 25, 1}, { 26, 1}, { 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, -{ 0, 6}, { 0, 7}, { 0, 8}, { 0, 9}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, -{ 1, 5}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 3, 1}, { 3, 2}, { 3, 3}, -{ 3, 4}, { 4, 1}, { 4, 2}, { 4, 3}, { 5, 1}, { 5, 2}, { 5, 3}, { 6, 1}, -{ 6, 2}, { 6, 3}, { 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, -{ 10, 1}, { 10, 2}, { 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, -{ 14, 1}, { 14, 2}, { 15, 1}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, -{ 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, -{ 29, 1}, { 30, 1}, { 31, 1}, { 32, 1}, { 33, 1}, { 34, 1}, { 35, 1}, { 36, 1} -}, -{ -{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, -{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, -{ 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, -{ 1, 9}, { 1, 10}, { 1, 11}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 2, 5}, -{ 2, 6}, { 2, 7}, { 2, 8}, { 3, 1}, { 3, 2}, { 3, 3}, { 3, 4}, { 3, 5}, -{ 3, 6}, { 3, 7}, { 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 4, 5}, { 5, 1}, -{ 5, 2}, { 5, 3}, { 5, 4}, { 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, { 7, 1}, -{ 7, 2}, { 7, 3}, { 8, 1}, { 8, 2}, { 8, 3}, { 9, 1}, { 9, 2}, { 9, 3}, -{ 10, 1}, { 10, 2}, { 10, 3}, { 11, 1}, { 11, 2}, { 11, 3}, { 12, 1}, { 12, 2}, -{ 12, 3}, { 13, 1}, { 13, 2}, { 13, 3}, { 14, 1}, { 14, 2}, { 15, 1}, { 15, 2}, -{ 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 0, 1}, { 0, 2}, { 0, 3}, -{ 0, 4}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 2, 1}, { 2, 2}, { 2, 3}, -{ 3, 1}, { 3, 2}, { 3, 3}, { 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, -{ 6, 2}, { 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, -{ 10, 2}, { 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, -{ 15, 1}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, -{ 23, 1}, { 24, 1}, { 25, 1}, { 26, 1} -}, -{ -{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, -{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 1, 1}, { 1, 2}, -{ 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, { 1, 9}, { 2, 1}, -{ 2, 2}, { 2, 3}, { 2, 4}, { 2, 5}, { 3, 1}, { 3, 2}, { 3, 3}, { 3, 4}, -{ 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 5, 1}, { 5, 2}, { 5, 3}, { 5, 4}, -{ 6, 1}, { 6, 2}, { 6, 3}, { 7, 1}, { 7, 2}, { 7, 3}, { 8, 1}, { 8, 2}, -{ 8, 3}, { 9, 1}, { 9, 2}, { 9, 3}, { 10, 1}, { 10, 2}, { 10, 3}, { 11, 1}, -{ 11, 2}, { 11, 3}, { 12, 1}, { 12, 2}, { 12, 3}, { 13, 1}, { 13, 2}, { 14, 1}, -{ 14, 2}, { 15, 1}, { 15, 2}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, -{ 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, -{ 29, 1}, { 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 1, 1}, { 1, 2}, -{ 1, 3}, { 1, 4}, { 2, 1}, { 2, 2}, { 2, 3}, { 3, 1}, { 3, 2}, { 3, 3}, -{ 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, { 6, 2}, { 7, 1}, { 7, 2}, -{ 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, { 10, 2}, { 11, 1}, { 11, 2}, -{ 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 14, 2}, { 15, 1}, { 15, 2}, -{ 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, -{ 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, { 29, 1}, { 30, 1}, { 31, 1}, -{ 32, 1}, { 33, 1}, { 34, 1}, { 35, 1}, { 36, 1}, { 37, 1}, { 38, 1}, { 39, 1}, -{ 40, 1}, { 41, 1}, { 42, 1}, { 43, 1} -}, -{ -{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, -{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, -{ 0, 17}, { 0, 18}, { 0, 19}, { 0, 20}, { 0, 21}, { 0, 22}, { 0, 23}, { 0, 24}, -{ 0, 25}, { 0, 26}, { 0, 27}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, -{ 1, 6}, { 1, 7}, { 1, 8}, { 1, 9}, { 1, 10}, { 2, 1}, { 2, 2}, { 2, 3}, -{ 2, 4}, { 2, 5}, { 3, 1}, { 3, 2}, { 3, 3}, { 3, 4}, { 4, 1}, { 4, 2}, -{ 4, 3}, { 5, 1}, { 5, 2}, { 5, 3}, { 6, 1}, { 6, 2}, { 6, 3}, { 7, 1}, -{ 7, 2}, { 7, 3}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, { 11, 1}, -{ 12, 1}, { 13, 1}, { 14, 1}, { 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, -{ 0, 6}, { 0, 7}, { 0, 8}, { 1, 1}, { 1, 2}, { 1, 3}, { 2, 1}, { 2, 2}, -{ 3, 1}, { 3, 2}, { 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, { 6, 2}, -{ 7, 1}, { 8, 1}, { 9, 1}, { 10, 1}, { 11, 1}, { 12, 1}, { 13, 1}, { 14, 1}, -{ 15, 1}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1} -}, -{ -{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, -{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, -{ 1, 5}, { 1, 6}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 3, 1}, { 3, 2}, -{ 3, 3}, { 4, 1}, { 4, 2}, { 4, 3}, { 5, 1}, { 5, 2}, { 5, 3}, { 6, 1}, -{ 6, 2}, { 6, 3}, { 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, -{ 10, 1}, { 10, 2}, { 11, 1}, { 12, 1}, { 13, 1}, { 14, 1}, { 15, 1}, { 16, 1}, -{ 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, -{ 25, 1}, { 26, 1}, { 0, 1}, { 0, 2}, { 0, 3}, { 1, 1}, { 1, 2}, { 2, 1}, -{ 3, 1}, { 4, 1}, { 5, 1}, { 6, 1}, { 7, 1}, { 8, 1}, { 9, 1}, { 10, 1}, -{ 11, 1}, { 12, 1}, { 13, 1}, { 14, 1}, { 15, 1}, { 16, 1}, { 17, 1}, { 18, 1}, -{ 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, { 25, 1}, { 26, 1}, -{ 27, 1}, { 28, 1}, { 29, 1}, { 30, 1}, { 31, 1}, { 32, 1}, { 33, 1}, { 34, 1}, -{ 35, 1}, { 36, 1}, { 37, 1}, { 38, 1}, { 39, 1}, { 40, 1} -}, -{ -{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, -{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, -{ 0, 17}, { 0, 18}, { 0, 19}, { 0, 20}, { 0, 21}, { 0, 22}, { 0, 23}, { 0, 24}, -{ 0, 25}, { 0, 26}, { 0, 27}, { 0, 28}, { 0, 29}, { 0, 30}, { 0, 31}, { 0, 32}, -{ 0, 33}, { 0, 34}, { 0, 35}, { 0, 36}, { 0, 37}, { 0, 38}, { 0, 39}, { 0, 40}, -{ 0, 41}, { 0, 42}, { 0, 43}, { 0, 44}, { 0, 45}, { 0, 46}, { 0, 47}, { 0, 48}, -{ 0, 49}, { 0, 50}, { 0, 51}, { 0, 52}, { 0, 53}, { 0, 54}, { 0, 55}, { 0, 56}, -{ 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, -{ 1, 9}, { 1, 10}, { 1, 11}, { 1, 12}, { 1, 13}, { 1, 14}, { 1, 15}, { 1, 16}, -{ 1, 17}, { 1, 18}, { 1, 19}, { 1, 20}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, -{ 2, 5}, { 2, 6}, { 2, 7}, { 2, 8}, { 2, 9}, { 2, 10}, { 3, 1}, { 3, 2}, -{ 3, 3}, { 3, 4}, { 3, 5}, { 3, 6}, { 3, 7}, { 4, 1}, { 4, 2}, { 4, 3}, -{ 4, 4}, { 4, 5}, { 4, 6}, { 5, 1}, { 5, 2}, { 5, 3}, { 5, 4}, { 5, 5}, -{ 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, { 7, 1}, { 7, 2}, { 7, 3}, { 8, 1}, -{ 8, 2}, { 8, 3}, { 9, 1}, { 9, 2}, { 9, 3}, { 10, 1}, { 10, 2}, { 11, 1}, -{ 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 0, 1}, { 0, 2}, -{ 0, 3}, { 0, 4}, { 1, 1}, { 1, 2}, { 1, 3}, { 2, 1}, { 2, 2}, { 2, 3}, -{ 3, 1}, { 3, 2}, { 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, { 6, 2}, -{ 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, { 10, 2}, -{ 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 14, 2}, -{ 15, 1}, { 16, 1} -}, -{ -{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, -{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, -{ 0, 17}, { 0, 18}, { 0, 19}, { 0, 20}, { 0, 21}, { 0, 22}, { 0, 23}, { 0, 24}, -{ 0, 25}, { 0, 26}, { 0, 27}, { 0, 28}, { 0, 29}, { 0, 30}, { 0, 31}, { 0, 32}, -{ 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, -{ 1, 9}, { 1, 10}, { 1, 11}, { 1, 12}, { 1, 13}, { 2, 1}, { 2, 2}, { 2, 3}, -{ 2, 4}, { 2, 5}, { 2, 6}, { 2, 7}, { 2, 8}, { 3, 1}, { 3, 2}, { 3, 3}, -{ 3, 4}, { 3, 5}, { 3, 6}, { 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 4, 5}, -{ 5, 1}, { 5, 2}, { 5, 3}, { 5, 4}, { 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, -{ 7, 1}, { 7, 2}, { 7, 3}, { 8, 1}, { 8, 2}, { 8, 3}, { 9, 1}, { 9, 2}, -{ 9, 3}, { 10, 1}, { 10, 2}, { 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, -{ 13, 2}, { 14, 1}, { 14, 2}, { 15, 1}, { 15, 2}, { 16, 1}, { 16, 2}, { 17, 1}, -{ 17, 2}, { 18, 1}, { 18, 2}, { 19, 1}, { 19, 2}, { 20, 1}, { 20, 2}, { 21, 1}, -{ 21, 2}, { 22, 1}, { 22, 2}, { 23, 1}, { 24, 1}, { 0, 1}, { 0, 2}, { 0, 3}, -{ 0, 4}, { 1, 1}, { 1, 2}, { 1, 3}, { 2, 1}, { 2, 2}, { 2, 3}, { 3, 1}, -{ 3, 2}, { 3, 3}, { 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, { 6, 2}, -{ 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, { 10, 2}, -{ 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 14, 2}, -{ 15, 1}, { 15, 2}, { 16, 1}, { 16, 2}, { 17, 1}, { 17, 2}, { 18, 1}, { 18, 2}, -{ 19, 1}, { 19, 2}, { 20, 1}, { 20, 2}, { 21, 1}, { 21, 2}, { 22, 1}, { 22, 2}, -{ 23, 1}, { 23, 2}, { 24, 1}, { 24, 2}, { 25, 1}, { 25, 2}, { 26, 1}, { 26, 2}, -{ 27, 1}, { 27, 2}, { 28, 1}, { 28, 2}, { 29, 1}, { 30, 1} -} -}; - static const uint8_t vc1_delta_level_table[AC_MODES][31] = { { 19, 15, 12, 11, 6, 5, 4, 4, 4, 4, diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c index de41afdc81..bde500ebe5 100644 --- a/libavcodec/vc1data.c +++ b/libavcodec/vc1data.c @@ -1127,6 +1127,231 @@ const uint16_t ff_vc1_b_field_mvpred_scales[7][4] = { { 7, 4, 3, 3 } // ZONE1OFFSET_Y }; +/* +1 to account for dummy nodes added because some trees are incomplete. */ const int ff_vc1_ac_sizes[AC_MODES] = { - 186, 169, 133, 149, 103, 103, 163, 175 + 186, 169, 133, 149, 103 + 1, 103 + 1, 163, 175 }; + +const uint8_t ff_vc1_ac_coeff_lens[] = { + /* High Motion Intra Tables (#177-179) - 186 entries */ + 4, 7, 9, 11, 12, 14, 14, 14, 15, 15, 10, 8, 9, 9, 8, 9, 11, 13, 13, + 13, 13, 12, 12, 14, 14, 13, 12, 8, 5, 8, 8, 7, 9, 10, 13, 13, 12, 14, + 15, 15, 13, 13, 14, 14, 9, 9, 7, 10, 13, 13, 13, 13, 11, 10, 10, 13, 14, + 15, 15, 12, 12, 12, 10, 9, 7, 8, 8, 10, 11, 13, 14, 15, 15, 12, 11, 11, + 11, 13, 14, 14, 12, 8, 6, 11, 11, 12, 12, 11, 9, 8, 7, 6, 11, 14, 14, + 13, 12, 11, 13, 13, 13, 13, 9, 9, 12, 13, 13, 12, 12, 12, 12, 15, 15, 14, + 13, 13, 13, 9, 10, 12, 12, 11, 8, 2, 5, 7, 7, 12, 13, 14, 14, 11, 10, + 10, 10, 8, 8, 10, 11, 12, 14, 14, 14, 14, 9, 5, 5, 3, 6, 8, 8, 7, + 5, 4, 4, 7, 7, 6, 11, 11, 10, 11, 12, 12, 10, 10, 14, 14, 13, 13, 13, + 11, 9, 9, 11, 13, 13, 13, 14, 14, 11, 12, 13, 13, 8, 6, + /* High Motion Inter Tables (#184-186) - 169 entries */ + 3, 7, 9, 10, 10, 8, 10, 12, 13, 13, 13, 13, 12, 9, 8, 8, 11, 14, 14, + 13, 13, 15, 15, 14, 11, 12, 14, 14, 13, 9, 5, 4, 4, 6, 8, 8, 9, 9, + 8, 5, 3, 7, 10, 11, 12, 12, 10, 13, 14, 14, 12, 13, 15, 15, 14, 13, 13, + 8, 7, 10, 11, 11, 10, 10, 9, 10, 10, 5, 4, 8, 8, 8, 11, 11, 13, 15, + 15, 14, 12, 11, 10, 10, 6, 6, 6, 7, 7, 9, 9, 11, 13, 13, 14, 15, 15, + 14, 15, 15, 12, 12, 11, 9, 8, 9, 11, 12, 12, 11, 14, 14, 13, 12, 9, 10, + 10, 14, 14, 13, 14, 14, 13, 11, 12, 13, 14, 14, 11, 9, 7, 6, 5, 5, 4, + 6, 8, 10, 10, 11, 13, 13, 12, 11, 12, 12, 10, 10, 12, 12, 11, 11, 11, 9, + 10, 14, 15, 15, 14, 14, 13, 14, 14, 12, 13, 14, 14, 5, 5, 6, 6, + /* Low Motion Intra Tables (#191-193) - 133 entries */ + 7, 10, 10, 11, 11, 11, 13, 13, 13, 13, 8, 7, 8, 8, 8, 9, 11, 12, 13, + 13, 12, 13, 13, 13, 13, 12, 9, 9, 8, 7, 9, 11, 12, 12, 12, 12, 11, 8, + 4, 5, 7, 8, 9, 10, 10, 7, 8, 9, 13, 13, 12, 11, 12, 12, 11, 7, 11, + 11, 11, 12, 12, 10, 10, 8, 8, 9, 11, 11, 10, 7, 6, 10, 11, 11, 11, 12, + 12, 10, 9, 10, 12, 12, 11, 7, 2, 6, 7, 7, 5, 5, 8, 10, 10, 11, 11, + 12, 12, 12, 12, 8, 9, 11, 11, 11, 12, 12, 7, 8, 9, 10, 11, 12, 12, 4, + 5, 5, 3, 8, 8, 7, 6, 8, 10, 10, 9, 8, 9, 11, 12, 12, 10, 6, 4, + /* Low Motion Inter Tables (#198-200) - 149 entries */ + 10, 11, 11, 11, 12, 13, 14, 15, 15, 11, 11, 9, 9, 7, 8, 10, 12, 12, 13, + 14, 14, 12, 9, 12, 12, 11, 13, 13, 12, 12, 13, 13, 9, 10, 11, 12, 13, 14, + 14, 10, 10, 6, 7, 9, 10, 12, 13, 15, 15, 14, 11, 8, 6, 7, 10, 12, 12, + 12, 14, 14, 13, 9, 9, 10, 13, 14, 15, 15, 13, 14, 14, 11, 6, 6, 5, 7, + 7, 7, 7, 11, 11, 11, 11, 9, 9, 13, 13, 13, 14, 14, 11, 12, 12, 13, 13, + 12, 7, 6, 5, 4, 4, 5, 6, 9, 9, 8, 7, 5, 6, 9, 10, 10, 8, 8, + 8, 3, 5, 7, 9, 13, 14, 14, 12, 12, 13, 13, 10, 8, 13, 13, 12, 12, 12, + 11, 11, 13, 14, 14, 12, 13, 14, 14, 13, 13, 10, 8, 7, 4, 2, + /* Mid Rate Intra Tables (#205-207) - 103 + 1 entries */ + -9, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, + 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 7, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 5, 5, 5, 4, 2, 3, 4, 4, + /* Mid Rate Inter Tables (#212-214) - 103 + 1 entries */ + -9, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, + 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 7, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 5, 5, 5, 4, 2, 3, 4, 4, + /* High Rate Intra Tables (#219-221) - 163 entries */ + 2, 5, 8, 12, 12, 11, 13, 13, 12, 11, 10, 10, 7, 7, 9, 11, 11, 14, 14, + 13, 12, 11, 8, 4, 3, 5, 6, 9, 12, 12, 11, 10, 10, 11, 12, 12, 9, 7, + 4, 6, 6, 10, 10, 9, 8, 12, 12, 11, 11, 12, 12, 9, 9, 10, 10, 8, 8, + 11, 12, 12, 11, 11, 9, 8, 5, 6, 13, 13, 12, 11, 10, 9, 10, 10, 9, 7, + 9, 11, 12, 12, 10, 8, 9, 9, 8, 7, 7, 11, 13, 13, 15, 16, 16, 14, 13, + 10, 10, 11, 12, 13, 13, 8, 7, 11, 11, 10, 9, 8, 7, 4, 5, 6, 12, 12, + 12, 12, 10, 10, 10, 9, 11, 14, 14, 13, 12, 11, 11, 9, 9, 8, 7, 10, 12, + 12, 13, 15, 15, 14, 12, 9, 8, 7, 7, 11, 11, 10, 10, 13, 13, 12, 11, 9, + 11, 13, 13, 12, 10, 8, 9, 11, 11, 10, 6, + /* High Rate Inter Tables (#226-228) - 175 entries */ + 3, 5, 7, 10, 11, 12, 13, 13, 10, 11, 13, 13, 13, 13, 9, 9, 6, 6, 7, + 11, 11, 10, 9, 8, 5, 7, 7, 8, 8, 13, 13, 12, 11, 10, 12, 12, 11, 10, + 8, 6, 6, 5, 9, 10, 11, 14, 18, 21, 22, 22, 20, 19, 17, 16, 15, 13, 12, + 11, 11, 10, 10, 12, 13, 14, 18, 18, 17, 16, 15, 12, 12, 9, 9, 11, 12, 13, + 13, 10, 10, 11, 11, 7, 8, 8, 3, 2, 4, 7, 12, 13, 13, 11, 12, 14, 15, + 15, 13, 11, 11, 12, 12, 11, 12, 12, 9, 9, 6, 5, 7, 8, 13, 18, 20, 21, + 23, 23, 22, 19, 17, 16, 15, 14, 12, 11, 10, 9, 8, 8, 7, 8, 12, 14, 14, + 13, 11, 10, 9, 7, 9, 9, 12, 13, 14, 14, 11, 10, 9, 7, 5, 10, 10, 9, + 12, 13, 13, 12, 13, 13, 10, 10, 11, 13, 17, 18, 20, 20, 20, 20, 16, 15, 15, + 15, 12, 7, 6, +}; + +#define ESCAPE 0 +const uint16_t ff_vc1_ac_coeff_syms[] = { + /* High Motion Intra Tables (#177-179) - 186 entries */ + 0x0201, 0x0601, 0x0404, 0x0604, 0x1201, 0x0806, 0x0323, 0x021A, 0x1802, + 0x0704, 0x0802, 0x0E00, 0x0501, 0x0A01, 0x0306, 0x020D, 0x0A02, 0x0608, + 0x031F, 0x0805, 0x1002, 0x0318, 0x0319, 0x0902, 0x2400, 0x2000, 0x0315, + 0x0307, 0x0202, 0x0801, 0x0209, 0x0402, 0x020C, 0x020E, 0x0507, 0x031C, + 0x1C00, 0x1402, 0x1C01, 0x0410, 0x0901, 0x060C, 0x060F, 0x0903, ESCAPE, + 0x1200, 0x0206, 0x0407, 0x0216, 0x0215, 0x1601, 0x050C, 0x0313, 0x0502, + 0x020F, 0x0E03, 0x1A01, 0x1603, 0x0411, 0x0212, 0x0316, 0x0213, 0x0503, + 0x0405, 0x0C00, 0x0308, 0x030D, 0x1600, 0x1A00, 0x040E, 0x021D, 0x021E, + 0x1E01, 0x0317, 0x040B, 0x040A, 0x0701, 0x0B00, 0x021B, 0x1602, 0x0702, + 0x0309, 0x0204, 0x0605, 0x0312, 0x0607, 0x0E02, 0x040C, 0x0603, 0x020A, + 0x0207, 0x0A00, 0x1001, 0x0A05, 0x0A04, 0x060B, 0x0505, 0x0210, 0x0219, + 0x0217, 0x031E, 0x0322, 0x030E, 0x030F, 0x031D, 0x0508, 0x060A, 0x1E00, + 0x0703, 0x031A, 0x1401, 0x0C04, 0x060E, 0x0807, 0x050A, 0x0218, 0x1202, + 0x0406, 0x040D, 0x0C03, 0x040F, 0x0314, 0x1000, 0x0200, 0x0401, 0x0304, + 0x0500, 0x0804, 0x050B, 0x0808, 0x021C, 0x0A03, 0x0310, 0x0803, 0x0E01, + 0x030A, 0x030B, 0x0409, 0x0900, 0x0506, 0x0325, 0x0B01, 0x0809, 0x0D00, + 0x1400, 0x0800, 0x0203, 0x0400, 0x0302, 0x0602, 0x020B, 0x0305, 0x0301, + 0x0600, 0x0300, 0x0403, 0x0208, 0x0205, 0x050D, 0x0606, 0x0408, 0x0211, + 0x0214, 0x031B, 0x1800, 0x0311, 0x1203, 0x1403, 0x1801, 0x1003, 0x0321, + 0x0504, 0x0700, 0x0C01, 0x0C02, 0x0509, 0x2200, 0x050F, 0x2600, 0x0324, + 0x060D, 0x0609, 0x0320, 0x050E, 0x030C, 0x0303, + /* High Motion Inter Tables (#184-186) - 169 entries */ + 0x0200, 0x0308, 0x020A, 0x0603, 0x020B, 0x0207, 0x0310, 0x0316, 0x0C02, + 0x0901, 0x031F, 0x0804, 0x0507, 0x0602, 0x0403, 0x030B, 0x0318, 0x0608, + 0x0C03, 0x0607, 0x2000, 0x0E03, 0x0B01, 0x050B, 0x0409, 0x040A, 0x031D, + 0x0E02, 0x040B, 0x0404, 0x0202, 0x0400, 0x0201, 0x0800, 0x0501, 0x030C, + 0x1000, 0x0502, 0x030D, 0x0600, 0x0300, 0x0402, 0x020C, 0x0604, 0x0702, + 0x1C00, 0x1400, 0x0D00, 0x2600, 0x1401, 0x0211, 0x0805, 0x1300, 0x2C00, + 0x031E, 0x050A, 0x2200, 0x0209, 0x0601, 0x0313, 0x1800, 0x0214, 0x0312, + 0x0504, 0x0405, 0x0315, 0x0406, 0x0303, 0x0301, 0x030E, 0x0208, 0x0E00, + 0x0323, 0x0319, 0x050E, 0x0903, 0x021A, 0x0705, 0x0508, 0x0803, 0x0900, + 0x0802, 0x0204, 0x0500, 0x0306, 0x0206, 0x030A, 0x0314, ESCAPE, 0x0605, + 0x1201, 0x0322, 0x0902, 0x0706, 0x060B, 0x2800, 0x2E00, 0x0410, 0x1E00, + 0x031C, 0x020F, 0x0503, 0x0801, 0x1200, 0x0506, 0x0509, 0x0215, 0x0408, + 0x0216, 0x1100, 0x0704, 0x0703, 0x030F, 0x1600, 0x0407, 0x0807, 0x0A04, + 0x0609, 0x0321, 0x1601, 0x0320, 0x1A00, 0x1001, 0x2400, 0x0217, 0x0218, + 0x0A02, 0x0A01, 0x0C00, 0x0307, 0x0203, 0x0304, 0x0302, 0x0205, 0x0700, + 0x0505, 0x0C01, 0x031B, 0x040D, 0x050C, 0x050D, 0x0E01, 0x031A, 0x0A03, + 0x0701, 0x020D, 0x0213, 0x0212, 0x0B00, 0x0317, 0x0210, 0x0311, 0x020E, + 0x2A00, 0x1002, 0x040F, 0x0A05, 0x040E, 0x0F00, 0x060A, 0x0219, 0x0606, + 0x040C, 0x0324, 0x0806, 0x0305, 0x0401, 0x0309, 0x0A00, + /* Low Motion Intra Tables (#191-193) - 133 entries */ + 0x0303, 0x0407, 0x0802, 0x0605, 0x0310, 0x040B, 0x0316, 0x2000, 0x031A, + 0x1002, 0x0306, 0x0601, 0x0307, 0x0209, 0x0E00, 0x0A01, 0x0701, 0x1E00, + 0x0901, 0x0806, 0x0804, 0x0214, 0x1601, 0x050C, 0x0A04, 0x060A, 0x020D, + 0x020C, 0x0801, 0x0206, 0x0405, 0x0313, 0x1201, 0x0314, 0x0C03, 0x0317, + 0x1A00, 0x0309, 0x0201, 0x0202, 0x0402, 0x0308, 0x1200, 0x0503, 0x0409, + ESCAPE, 0x030D, 0x0603, 0x0E03, 0x0508, 0x0315, 0x040C, 0x040F, 0x0212, + 0x0210, 0x0C00, 0x0606, 0x1001, 0x050D, 0x0319, 0x060B, 0x020F, 0x020E, + 0x030A, 0x020A, 0x030F, 0x0A02, 0x0A03, 0x0408, 0x0207, 0x0204, 0x1600, + 0x0C02, 0x0312, 0x060D, 0x0E02, 0x0506, 0x0803, 0x0406, 0x040D, 0x1401, + 0x0318, 0x1C00, 0x0304, 0x0200, 0x0A00, 0x0500, 0x0305, 0x0401, 0x0301, + 0x030B, 0x0502, 0x040A, 0x0609, 0x0211, 0x0703, 0x040E, 0x0507, 0x050B, + 0x1000, 0x030E, 0x0505, 0x0900, 0x0504, 0x0805, 0x0608, 0x0403, 0x0602, + 0x1400, 0x0E01, 0x0213, 0x0509, 0x050A, 0x0300, 0x0800, 0x0203, 0x0400, + 0x020B, 0x0404, 0x0208, 0x0302, 0x0501, 0x0604, 0x1800, 0x0700, 0x030C, + 0x0C01, 0x0607, 0x0702, 0x060C, 0x0311, 0x0205, 0x0600, + /* Low Motion Inter Tables (#198-200) - 149 entries */ + 0x0319, 0x0210, 0x0602, 0x0406, 0x0504, 0x0900, 0x050A, 0x050F, 0x0901, + 0x0407, 0x0801, 0x020B, 0x020E, 0x030A, 0x0209, 0x0315, 0x031F, 0x0603, + 0x0218, 0x050E, 0x050D, 0x0212, 0x0314, 0x040C, 0x0213, 0x0214, 0x0507, + 0x0509, 0x1000, 0x0215, 0x0C01, 0x032A, ESCAPE, 0x0502, 0x021B, 0x021A, + 0x040D, 0x0328, 0x0803, 0x0404, 0x0405, 0x0203, 0x0206, 0x020D, 0x0318, + 0x031E, 0x0508, 0x0703, 0x060A, 0x1800, 0x0503, 0x030F, 0x0306, 0x030C, + 0x031A, 0x040A, 0x021C, 0x0A01, 0x0609, 0x0325, 0x040E, 0x0312, 0x031B, + 0x031C, 0x0606, 0x0A02, 0x1C00, 0x1201, 0x0322, 0x1001, 0x0B00, 0x0E00, + 0x0307, 0x0309, 0x0303, 0x030B, 0x030E, 0x030D, 0x0600, 0x0409, 0x0323, + 0x0408, 0x0211, 0x0403, 0x0601, 0x1400, 0x0216, 0x0217, 0x021D, 0x060C, + 0x040B, 0x0506, 0x0219, 0x0329, 0x0607, 0x0802, 0x0207, 0x0308, 0x0202, + 0x0302, 0x0301, 0x0305, 0x0204, 0x0313, 0x020F, 0x0402, 0x0401, 0x0304, + 0x0205, 0x0501, 0x0C00, 0x0317, 0x020A, 0x0310, 0x0800, 0x0200, 0x0400, + 0x0500, 0x0A00, 0x0702, 0x0608, 0x0326, 0x0701, 0x1200, 0x0321, 0x0324, + 0x0700, 0x0311, 0x040F, 0x060B, 0x0320, 0x050C, 0x0605, 0x0505, 0x031D, + 0x0E01, 0x1A00, 0x0804, 0x0604, 0x032B, 0x0327, 0x0805, 0x050B, 0x1600, + 0x0316, 0x020C, 0x0208, 0x0201, 0x0300, + /* Mid Rate Intra Tables (#205-207) - 103 + 1 entries */ + 0, 0x0F00, 0x0D00, 0x2C00, 0x2A00, 0x0502, 0x0701, 0x0B00, 0x020D, + 0x0605, 0x0408, 0x0604, 0x0803, 0x0802, 0x0E01, 0x2800, 0x2600, 0x2E00, + 0x3000, 0x1001, 0x0409, 0x0503, 0x0504, 0x030F, 0x0310, 0x3200, 0x3400, + 0x3600, 0x1201, 0x0606, 0x1401, 0x0A02, 0x0607, 0x020E, 0x1100, 0x0505, + 0x0506, 0x0311, 0x0312, 0x0313, 0x0314, ESCAPE, 0x2400, 0x2200, 0x030E, + 0x030D, 0x030C, 0x030B, 0x030A, 0x0501, 0x0900, 0x020C, 0x020B, 0x0407, + 0x0406, 0x0405, 0x0603, 0x0602, 0x0C01, 0x0A01, 0x2000, 0x0404, 0x1E00, + 0x1C00, 0x1A00, 0x0308, 0x0307, 0x0306, 0x0700, 0x020A, 0x0209, 0x0208, + 0x0309, 0x0403, 0x0801, 0x1800, 0x1600, 0x1400, 0x0304, 0x0303, 0x0206, + 0x0305, 0x0207, 0x0402, 0x0601, 0x1200, 0x0500, 0x0205, 0x0302, 0x0301, + 0x0204, 0x0203, 0x1000, 0x0E00, 0x0401, 0x0C00, 0x0202, 0x0A00, 0x0800, + 0x0300, 0x0200, 0x0400, 0x0201, 0x0600, + /* Mid Rate Inter Tables (#212-214) - 103 + 1 entries */ + 0, 0x0501, 0x0700, 0x1600, 0x1400, 0x031C, 0x031B, 0x031A, 0x0319, + 0x0409, 0x0408, 0x0407, 0x0406, 0x0405, 0x0603, 0x0602, 0x0801, 0x1800, + 0x0A01, 0x0217, 0x0218, 0x031D, 0x031E, 0x031F, 0x0320, 0x0C01, 0x0802, + 0x0604, 0x0605, 0x0606, 0x040A, 0x0219, 0x021A, 0x0321, 0x0322, 0x0323, + 0x0324, 0x0325, 0x0326, 0x0327, 0x0328, ESCAPE, 0x1200, 0x1000, 0x0318, + 0x0317, 0x0316, 0x0315, 0x0314, 0x0313, 0x0312, 0x0311, 0x0500, 0x0216, + 0x0215, 0x0214, 0x0213, 0x0212, 0x0211, 0x0210, 0x020F, 0x0404, 0x0403, + 0x0E00, 0x0C00, 0x0310, 0x030F, 0x030E, 0x030D, 0x030C, 0x030B, 0x030A, + 0x0309, 0x020E, 0x020D, 0x0402, 0x0601, 0x0A00, 0x0308, 0x0307, 0x0306, + 0x0305, 0x020C, 0x020B, 0x020A, 0x0800, 0x0304, 0x0303, 0x0302, 0x0301, + 0x0209, 0x0208, 0x0207, 0x0206, 0x0401, 0x0600, 0x0205, 0x0204, 0x0203, + 0x0300, 0x0200, 0x0201, 0x0202, 0x0400, + /* High Rate Intra Tables (#219-221) - 163 entries */ + 0x0200, 0x0202, 0x0207, 0x6A00, 0x1402, 0x0502, 0x040B, 0x0507, 0x6C00, + 0x030E, 0x4600, 0x1801, 0x0205, 0x1E00, 0x1201, 0x5800, 0x1E01, 0x0509, + 0x0702, 0x0506, 0x0504, 0x0804, 0x2800, 0x0800, 0x0400, 0x0401, 0x1400, + 0x0405, 0x040A, 0x0A04, 0x0408, 0x4400, 0x030B, 0x5600, 0x6800, 0x2601, + 0x3400, 0x1C00, 0x0201, 0x0203, 0x0601, 0x4200, 0x0803, 0x0603, 0x2600, + 0x2401, 0x0607, 0x5400, 0x0700, 0x0805, 0x030F, 0x0500, 0x0306, 0x1601, + 0x0604, 0x0302, 0x0C01, 0x1C01, 0x0503, 0x6600, 0x5200, 0x0A03, 0x3200, + 0x0602, 0x0C00, 0x1200, 0x0A05, 0x0C04, 0x1202, 0x020C, 0x4000, 0x1001, + 0x020A, 0x0309, 0x0802, 0x1A00, 0x0208, 0x5000, 0x6400, 0x6200, 0x3E00, + 0x2400, 0x0305, 0x3000, 0x0403, 0x0801, 0x0402, 0x0E02, 0x0505, 0x0608, + 0x040D, 0x050E, 0x050C, 0x040C, 0x0701, 0x0406, 0x030A, 0x0605, 0x6000, + 0x0806, 0x0900, 0x0206, 0x0204, 0x030D, 0x4E00, 0x3C00, 0x2E00, 0x2200, + 0x1800, 0x0600, 0x0A00, 0x1000, 0x2201, 0x0409, 0x020D, 0x0C03, 0x1401, + 0x0308, 0x0A02, 0x0404, 0x4C00, 0x0508, 0x050A, 0x7000, 0x5E00, 0x1A01, + 0x4A00, 0x0304, 0x2C00, 0x2000, 0x0300, 0x3A00, 0x5C00, 0x2001, 0x2801, + 0x050D, 0x050B, 0x0609, 0x5A00, 0x0E01, 0x0A01, ESCAPE, 0x1600, 0x4800, + 0x020B, 0x3800, 0x0209, 0x0310, 0x6E00, 0x1002, 0x030C, 0x2A00, 0x0407, + 0x020E, 0x0E03, 0x0606, 0x0307, 0x0301, 0x0303, 0x0501, 0x0C02, 0x3600, + 0x0E00, + /* High Rate Inter Tables (#226-228) - 175 entries */ + 0x0400, 0x0800, 0x0306, 0x0313, 0x1201, 0x3400, 0x0900, 0x0505, 0x020F, + 0x2800, 0x1002, 0x4000, 0x1A01, 0x0218, 0x020D, 0x1800, 0x0302, 0x0206, + 0x0E00, 0x0212, 0x0318, 0x0312, 0x0500, 0x0309, 0x0204, 0x0208, 0x0305, + 0x0602, 0x020A, 0x3E00, 0x031E, 0x0216, 0x0317, 0x0501, 0x3200, 0x031C, + 0x0502, 0x0311, 0x1200, 0x0A00, 0x0301, 0x0401, 0x030E, 0x1E00, 0x2600, + 0x0806, 0x0412, 0x0516, 0x051B, 0x051A, 0x0515, 0x0513, 0x050E, 0x050C, + 0x0509, 0x3C00, 0x0409, 0x0211, 0x0803, 0x0406, 0x0E01, 0x0605, 0x040A, + 0x040C, 0x050F, 0x0413, 0x0410, 0x050A, 0x0609, 0x3000, 0x1401, 0x030D, + 0x1600, 0x0604, 0x031B, 0x0701, 0x0217, 0x1C00, 0x0310, 0x0316, 0x0210, + 0x0304, 0x0308, 0x1000, 0x0201, 0x0200, 0x0202, 0x0207, 0x2E00, 0x031D, + 0x3A00, 0x2400, 0x0503, 0x0A04, 0x040D, 0x050B, 0x1801, 0x0407, 0x1001, + 0x0215, 0x0319, 0x0315, 0x2C00, 0x031A, 0x030C, 0x020C, 0x0205, 0x0203, + 0x0C00, 0x0403, 0x3800, 0x0411, 0x0514, 0x0517, 0x051C, 0x0518, 0x0519, + 0x0414, 0x040F, 0x040E, 0x0508, 0x0805, 0x0C02, 0x2200, 0x020E, 0x030B, + 0x0307, 0x0801, ESCAPE, 0x0209, 0x0700, 0x0506, 0x0607, 0x0606, 0x0314, + 0x0603, 0x1400, 0x0303, 0x0404, 0x0A01, 0x0214, 0x3600, 0x040B, 0x0C03, + 0x0A02, 0x1A00, 0x030A, 0x0601, 0x0600, 0x0802, 0x0405, 0x020B, 0x0408, + 0x0504, 0x0A03, 0x2A00, 0x0E02, 0x0804, 0x0C01, 0x030F, 0x2000, 0x1601, + 0x050D, 0x0510, 0x0415, 0x0511, 0x0416, 0x0512, 0x0703, 0x0702, 0x0608, + 0x0507, 0x0213, 0x0402, 0x0300, +}; +#undef ESCAPE diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h index e83385b5c6..04cc9a22bf 100644 --- a/libavcodec/vc1data.h +++ b/libavcodec/vc1data.h @@ -201,5 +201,10 @@ extern const uint16_t ff_vc1_b_field_mvpred_scales[7][4]; #define AC_MODES 8 extern const int ff_vc1_ac_sizes[AC_MODES]; +/* Symbol == 0 belongs to the escape code; + * otherwise run is contained in bits 0x3F, level in 0x7E + * and 0x100 indicates whether this is the last code. */ +extern const uint16_t ff_vc1_ac_coeff_syms[]; +extern const uint8_t ff_vc1_ac_coeff_lens[]; #endif /* AVCODEC_VC1DATA_H */ From patchwork Tue Nov 10 10:48:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23556 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 C32C644A3F2 for ; Tue, 10 Nov 2020 13:08:28 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6F31668BF85; Tue, 10 Nov 2020 12:50:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C8E9068B507 for ; Tue, 10 Nov 2020 12:50:40 +0200 (EET) Received: by mail-wm1-f65.google.com with SMTP id c9so2516513wml.5 for ; Tue, 10 Nov 2020 02:50:40 -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=QNCjy+cEW8CwpPhseZf2RqsJwHwkU9oRHu6zxXSaftU=; b=Qnonnn2kknKC9RjVYlLoPmtLVpj6F8SkA5Z16sXzpTFEIDUXV7pr0cQQDdPZz97pxh 6l/cmJOeeNrp+iGfnA0mwmUz6WtYomrHvX+4EtSCnBCvl3uFPIarxhaqPuUIvPCMnKVj KK3fcALrcGHfmEPd+STO8BhZuFfNS1h7OirxCOmrsi/P9ePKf+43pJJrgBIQU8/z3vA8 K+tvUXexShkY/Mn66ggkjVjnMoRQqxy1SiAVJ5FHqqtEdrD5rpure/myPHDv9Xuawzjl iol76xSKJeaSIkBMdzCXWe5mkRNLmC4u5v5cMw54LWp+lRiCK/FVmisheEG4m0/vsJuR ZK1w== 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=QNCjy+cEW8CwpPhseZf2RqsJwHwkU9oRHu6zxXSaftU=; b=X4uOqA1HyA8DNxrtDplxFikdAWaoxjxcaeskbOoP18J/caq2pOvxKE6aPfwiV81bA7 hPHKcikVLSYztd8bCQjgZCHkvltnzdSaTcobu18shZ8c/uLJhBAw+WCDO7f4c86QZXWk maPFwThI5zbfVD2puw9GkoXi3WsupI4P/kCLwgYbQA5dtTyWaBwDtu3Y5l+dVBt+VmDy fzu2gzu3hpdBOlORh8hUuZ/i8iSFTrY1RducOQtGp7yCLfPQnCqpfA8XrARnnJZF+7My K9y4GB7zXfvL+810qHjE7D62cER5Yckw/24+YnfVUNqG6dnxTZy/07RjeURUYp5U8qZs nlDA== X-Gm-Message-State: AOAM530ePsLI5XH94J+bulRUW9vuEr8ffNAub3JYBQkFnAPVtVAKBR1T 3V9cp+KLCql3JGwv+seTfQVgLpxMY94= X-Google-Smtp-Source: ABdhPJwVKZMpz+egVsidgLg9eR1o3ps27gaThlAgfCKRswJKl7fvZgwI04kUyhliGVe2PhHfFjx2vQ== X-Received: by 2002:a7b:c846:: with SMTP id c6mr3820658wml.143.1605005439962; Tue, 10 Nov 2020 02:50:39 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:39 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:19 +0100 Message-Id: <20201110104851.321029-83-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 082/114] avcodec/vc1_block: Use local variables inside macro 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" This makes it clearer which variables are really just temporary variables of the macro and which are actually used externally. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1_block.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 42de71eb25..3ff67d83bf 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -222,7 +222,8 @@ static void vc1_put_blocks_clamped(VC1Context *v, int put_signed) * @param _dmv_y Vertical differential for decoded MV */ #define GET_MVDATA(_dmv_x, _dmv_y) \ - index = 1 + get_vlc2(gb, ff_vc1_mv_diff_vlc[s->mv_table_index].table, \ +do { \ + int index = 1 + get_vlc2(gb, ff_vc1_mv_diff_vlc[s->mv_table_index].table, \ VC1_MV_DIFF_VLC_BITS, 2); \ if (index > 36) { \ mb_has_coeffs = 1; \ @@ -240,7 +241,7 @@ static void vc1_put_blocks_clamped(VC1Context *v, int put_signed) _dmv_y = 0; \ s->mb_intra = 1; \ } else { \ - index1 = index % 6; \ + int index1 = index % 6, sign, val; \ _dmv_x = offset_table[1][index1]; \ val = size_table[index1] - (!s->quarter_sample && index1 == 5); \ if (val > 0) { \ @@ -257,7 +258,8 @@ static void vc1_put_blocks_clamped(VC1Context *v, int put_signed) sign = 0 - (val & 1); \ _dmv_y = (sign ^ ((val >> 1) + _dmv_y)) - sign; \ } \ - } + } \ +} while (0) static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x, int *dmv_y, int *pred_flag) @@ -1287,8 +1289,6 @@ static int vc1_decode_p_mb(VC1Context *v) int mb_has_coeffs = 1; /* last_flag */ int dmv_x, dmv_y; /* Differential MV components */ - int index, index1; /* LUT indexes */ - int val, sign; /* temp values */ int first_block = 1; int dst_idx, off; int skipped, fourmv; @@ -1338,9 +1338,9 @@ static int vc1_decode_p_mb(VC1Context *v) if (!s->mb_intra) ff_vc1_mc_1mv(v, 0); dst_idx = 0; for (i = 0; i < 6; i++) { + int val = ((cbp >> (5 - i)) & 1); s->dc_val[0][s->block_index[i]] = 0; dst_idx += i >> 2; - val = ((cbp >> (5 - i)) & 1); off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); v->mb_type[0][s->block_index[i]] = s->mb_intra; if (s->mb_intra) { @@ -1391,7 +1391,7 @@ static int vc1_decode_p_mb(VC1Context *v) /* Get CBPCY */ cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); for (i = 0; i < 6; i++) { - val = ((cbp >> (5 - i)) & 1); + int val = ((cbp >> (5 - i)) & 1); s->dc_val[0][s->block_index[i]] = 0; s->mb_intra = 0; if (i < 4) { @@ -1851,8 +1851,6 @@ static int vc1_decode_b_mb(VC1Context *v) int mqdiff, mquant; /* MB quantization */ int ttmb = v->ttfrm; /* MB Transform type */ int mb_has_coeffs = 0; /* last_flag */ - int index, index1; /* LUT indexes */ - int val, sign; /* temp values */ int first_block = 1; int dst_idx, off; int skipped, direct; @@ -1957,9 +1955,9 @@ static int vc1_decode_b_mb(VC1Context *v) } dst_idx = 0; for (i = 0; i < 6; i++) { + int val = ((cbp >> (5 - i)) & 1); s->dc_val[0][s->block_index[i]] = 0; dst_idx += i >> 2; - val = ((cbp >> (5 - i)) & 1); off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); v->mb_type[0][s->block_index[i]] = s->mb_intra; if (s->mb_intra) { From patchwork Tue Nov 10 10:48:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23558 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 1742244A3F2 for ; Tue, 10 Nov 2020 13:09:05 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 916C368BF8D; Tue, 10 Nov 2020 12:50:57 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0FBBF68BF41 for ; Tue, 10 Nov 2020 12:50:41 +0200 (EET) Received: by mail-wr1-f48.google.com with SMTP id b8so12149790wrn.0 for ; Tue, 10 Nov 2020 02:50:41 -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=Aw0Xo2nkxOgpAp6YdiFqio/K4rT0JpRdn3hqqFbY2+s=; b=dbJA5HdF+SB2QW3j+4Qo3ixl/aS6dkoGbKbvfgQnsQuwzl1bxUcGOehO+bOzBC2XJR 3y7FTdwtEHiq+t/3YAMtkPw6oIpcCl2TZBb6z1RCpLxmGVe8ErXwnjBOMU+mvsyiBrsj dQL0kMTbrBBXi5VsAvFlO8Q5UfyV3Iw0guV9DVsHwPwaURLoahaOANqo4n+IB23xgNPC ic+JfFyGOPiYf4h7euM7317ZM73xYLH6NHlNmjvmTT8rBdhJasytZZf+7yHN9fVYEP+p sE+lHVCmZy3aqrzbcwLJ5QQlkB7qK6Qo3vtac0D2fikfLv73Aem0Xzw4Mxm0OEURQP1w JPCQ== 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=Aw0Xo2nkxOgpAp6YdiFqio/K4rT0JpRdn3hqqFbY2+s=; b=pxCqXz34nW1jwzw32pqnHe72/tf7XGfI4qBur5fcabYYisU/gZ4CyCoJ47cmFCqfPp Xw0UiVXUWHIVacs2qoF2CKBJUabCWV6kDgtMEUy7AuUat8o4h9YZll911rR+ztd52nHN hASUHlD8fAVy/HwwOKLS5iksGgahHBCWEQZukxhcN21i6fC/Z1ebc2wm/FjfdB2+TJTk IeHHRe3I791xWKGDTG94pcAViWyxB3Lho94LeKjC4eoAZe64qV7HhD1aFA7qJ3OOeozy 6FNGrEVkm7oyWAJYLIxKgB052EgGBNVg9sHcYXX9QNJjCZU++2V2jlTCuIrJ6wdHi9BC WIuQ== X-Gm-Message-State: AOAM530OttELi5kA2/lIE9AxLaUncipffNr2NdhjrVu/POSJaMQ4EITn hmtc5djs20H3RBt5/wjVocqQmLAfeuw= X-Google-Smtp-Source: ABdhPJy4eKe29a4mwwiliymlxflzV3zeogFPdHy8wyHhbyG3HpwtotulTedsPi9BvE1gzHUPqi+jBA== X-Received: by 2002:a5d:5689:: with SMTP id f9mr12012216wrv.181.1605005440773; Tue, 10 Nov 2020 02:50:40 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:40 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:20 +0100 Message-Id: <20201110104851.321029-84-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 083/114] avcodec/vc1: Use symbols table to decode MV differentials 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" The VC1 decoder currently follows the spec very closely when decoding MV differentials: The spec uses tables with contiguous indexes and derives four values from it using a pseudo-code procedure: Two flags and two values with a range of 0..5 each; the latter are obtained as the result resp. the remainder of dividing the index by 6 in the spec and in the earlier code. Yet two flags can be encoded on two bits and the two values can be encoded on three bits each. Therefore the new symbols uses the two lowest bits for the flags; the two other values are coded separately on three bits each. There is just one more minor complication: The two three-bits values don't always exist; there is another mode. Instead of using an arbitrary six bit value for the higher bits that is different from all the values used by the ordinary mode this commit instead uses a negative number for it; this is possible by shifting the symbols as stored in the table (to make all fit into an uint8_t) and then shifting the codes downwards when creating the table. The latter is possible thanks to ff_init_vlc_from_lengths(). Switching to ff_init_vlc_from_lengths() also entails replacing 16bit codes by 8bit symbols, thereby saving space. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1.c | 7 +- libavcodec/vc1_block.c | 30 ++++----- libavcodec/vc1data.c | 149 +++++++++++++++++++---------------------- libavcodec/vc1data.h | 3 +- 4 files changed, 86 insertions(+), 103 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 599a77af31..8c8d701ef8 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -1414,9 +1414,10 @@ av_cold int ff_vc1_init_common(VC1Context *v) ff_vc1_cbpcy_p_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); ff_vc1_mv_diff_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 11]]; ff_vc1_mv_diff_vlc[i].table_allocated = vlc_offs[i * 3 + 12] - vlc_offs[i * 3 + 11]; - init_vlc(&ff_vc1_mv_diff_vlc[i], VC1_MV_DIFF_VLC_BITS, 73, - ff_vc1_mv_diff_bits[i], 1, 1, - ff_vc1_mv_diff_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_mv_diff_vlc[i], VC1_MV_DIFF_VLC_BITS, 73, + &ff_vc1_mv_diff_tabs[i][0][1], 2, + &ff_vc1_mv_diff_tabs[i][0][0], 2, 1, + -4, INIT_VLC_USE_NEW_STATIC); } for (int i = 0, ac_offset = 0; i < 8; i++) { ff_vc1_ac_coeff_table[i].table = &vlc_table[vlc_offs[i * 2 + 21]]; diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 3ff67d83bf..6820ffb0d7 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -223,25 +223,16 @@ static void vc1_put_blocks_clamped(VC1Context *v, int put_signed) */ #define GET_MVDATA(_dmv_x, _dmv_y) \ do { \ - int index = 1 + get_vlc2(gb, ff_vc1_mv_diff_vlc[s->mv_table_index].table, \ + int symbol = get_vlc2(gb, ff_vc1_mv_diff_vlc[s->mv_table_index].table, \ VC1_MV_DIFF_VLC_BITS, 2); \ - if (index > 36) { \ - mb_has_coeffs = 1; \ - index -= 37; \ - } else \ - mb_has_coeffs = 0; \ - s->mb_intra = 0; \ - if (!index) { \ + mb_has_coeffs = symbol & 1; \ + symbol >>= 1; \ + s->mb_intra = symbol & 1; \ + symbol >>= 1; \ + if (!symbol) { \ _dmv_x = _dmv_y = 0; \ - } else if (index == 35) { \ - _dmv_x = get_bits(gb, v->k_x - 1 + s->quarter_sample); \ - _dmv_y = get_bits(gb, v->k_y - 1 + s->quarter_sample); \ - } else if (index == 36) { \ - _dmv_x = 0; \ - _dmv_y = 0; \ - s->mb_intra = 1; \ - } else { \ - int index1 = index % 6, sign, val; \ + } else if (symbol > 0) { \ + int index1 = symbol & 7, sign, val; \ _dmv_x = offset_table[1][index1]; \ val = size_table[index1] - (!s->quarter_sample && index1 == 5); \ if (val > 0) { \ @@ -250,7 +241,7 @@ do { \ _dmv_x = (sign ^ ((val >> 1) + _dmv_x)) - sign; \ } \ \ - index1 = index / 6; \ + index1 = symbol >> 3; \ _dmv_y = offset_table[1][index1]; \ val = size_table[index1] - (!s->quarter_sample && index1 == 5); \ if (val > 0) { \ @@ -258,6 +249,9 @@ do { \ sign = 0 - (val & 1); \ _dmv_y = (sign ^ ((val >> 1) + _dmv_y)) - sign; \ } \ + } else { \ + _dmv_x = get_bits(gb, v->k_x - 1 + s->quarter_sample); \ + _dmv_y = get_bits(gb, v->k_y - 1 + s->quarter_sample); \ } \ } while (0) diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c index bde500ebe5..701d285561 100644 --- a/libavcodec/vc1data.c +++ b/libavcodec/vc1data.c @@ -931,86 +931,75 @@ const uint8_t ff_vc1_subblkpat_tabs[3][15][2] = { }; /* MV differential tables, p265 */ -const uint16_t ff_vc1_mv_diff_codes[4][73] = { - { - 0, 2, 3, 8, 576, 3, 2, 6, - 5, 577, 578, 7, 8, 9, 40, 19, - 37, 82, 21, 22, 23, 579, 580, 166, - 96, 167, 49, 194, 195, 581, 582, 583, - 292, 293, 294, 13, 2, 7, 24, 50, - 102, 295, 13, 7, 8, 18, 50, 103, - 38, 20, 21, 22, 39, 204, 103, 23, - 24, 25, 104, 410, 105, 106, 107, 108, - 109, 220, 411, 442, 222, 443, 446, 447, - 7 /* 73 elements */ - }, - { - 0, 4, 5, 3, 4, 3, 4, 5, - 20, 6, 21, 44, 45, 46, 3008, 95, - 112, 113, 57, 3009, 3010, 116, 117, 3011, - 118, 3012, 3013, 3014, 3015, 3016, 3017, 3018, - 3019, 3020, 3021, 3022, 1, 4, 15, 160, - 161, 41, 6, 11, 42, 162, 43, 119, - 56, 57, 58, 163, 236, 237, 3023, 119, - 120, 242, 122, 486, 1512, 487, 246, 494, - 1513, 495, 1514, 1515, 1516, 1517, 1518, 1519, - 31 /* 73 elements */ - }, - { - 0, 512, 513, 514, 515, 2, 3, 258, - 259, 260, 261, 262, 263, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, 1, 5, 287, 288, - 289, 290, 6, 7, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, - 319 /* 73 elements */ - }, - { - 0, 1, 1, 2, 3, 4, 1, 5, - 4, 3, 5, 8, 6, 9, 10, 11, - 12, 7, 104, 14, 105, 4, 10, 15, - 11, 6, 14, 8, 106, 107, 108, 15, - 109, 9, 55, 10, 1, 2, 1, 2, - 3, 12, 6, 2, 6, 7, 28, 7, - 15, 8, 5, 18, 29, 152, 77, 24, - 25, 26, 39, 108, 13, 109, 55, 56, - 57, 116, 11, 153, 234, 235, 118, 119, - 15 /* 73 elements */ - } -}; -const uint8_t ff_vc1_mv_diff_bits[4][73] = { - { - 6, 7, 7, 8, 14, 6, 5, 6, 7, 14, 14, 6, 6, 6, 8, 9, - 10, 9, 7, 7, 7, 14, 14, 10, 9, 10, 8, 10, 10, 14, 14, 14, - 13, 13, 13, 6, 3, 5, 6, 8, 9, 13, 5, 4, 4, 5, 7, 9, - 6, 5, 5, 5, 6, 9, 8, 5, 5, 5, 7, 10, 7, 7, 7, 7, - 7, 8, 10, 9, 8, 9, 9, 9, 3 /* 73 elements */ - }, - { - 5, 7, 7, 6, 6, 5, 5, 6, 7, 5, 7, 8, 8, 8, 14, 9, - 9, 9, 8, 14, 14, 9, 9, 14, 9, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 2, 3, 6, 8, 8, 6, 3, 4, 6, 8, 6, 9, - 6, 6, 6, 8, 8, 8, 14, 7, 7, 8, 7, 9, 13, 9, 8, 9, - 13, 9, 13, 13, 13, 13, 13, 13, 5 /* 73 elements */ - - }, - { - 3, 12, 12, 12, 12, 3, 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 1, 5, 11, 11, 11, 11, 4, 4, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11 /* 73 elements */ - }, - { - 15, 11, 15, 15, 15, 15, 12, 15, 12, 11, 12, 12, 15, 12, 12, 12, - 12, 15, 15, 12, 15, 10, 11, 12, 11, 10, 11, 10, 15, 15, 15, 11, - 15, 10, 14, 10, 4, 4, 5, 7, 8, 9, 5, 3, 4, 5, 6, 8, - 5, 4, 3, 5, 6, 8, 7, 5, 5, 5, 6, 7, 9, 7, 6, 6, - 6, 7, 10, 8, 8, 8, 7, 7, 4 /* 73 elements */ - } +const uint8_t ff_vc1_mv_diff_tabs[4][73][2] = { + { + { 0x08, 6 }, { 0x0C, 7 }, { 0x10, 7 }, { 0x14, 8 }, { 0x18, 14 }, + { 0x34, 14 }, { 0x38, 14 }, { 0x74, 14 }, { 0x78, 14 }, { 0xA4, 14 }, + { 0xA8, 14 }, { 0xAC, 14 }, { 0xB0, 13 }, { 0xB4, 13 }, { 0x00, 13 }, + { 0x19, 13 }, { 0x58, 10 }, { 0x54, 9 }, { 0x30, 7 }, { 0x24, 6 }, + { 0x28, 5 }, { 0x2C, 6 }, { 0x44, 6 }, { 0x48, 6 }, { 0x4C, 6 }, + { 0x50, 8 }, { 0x64, 9 }, { 0x84, 10 }, { 0x8C, 10 }, { 0x68, 7 }, + { 0x6C, 7 }, { 0x70, 7 }, { 0x88, 9 }, { 0x94, 10 }, { 0x98, 10 }, + { 0x90, 8 }, { 0x11, 8 }, { 0x15, 9 }, { 0x39, 9 }, { 0x06, 6 }, + { 0x09, 5 }, { 0x05, 3 }, { 0x0D, 6 }, { 0x35, 7 }, { 0x59, 9 }, + { 0x79, 10 }, { 0xA5, 10 }, { 0x65, 8 }, { 0x25, 5 }, { 0x29, 4 }, + { 0x2D, 4 }, { 0x31, 5 }, { 0x45, 6 }, { 0x55, 6 }, { 0x49, 5 }, + { 0x4D, 5 }, { 0x51, 5 }, { 0x69, 5 }, { 0x6D, 5 }, { 0x71, 5 }, + { 0x75, 7 }, { 0x85, 7 }, { 0x89, 7 }, { 0x8D, 7 }, { 0x91, 7 }, + { 0x95, 7 }, { 0x99, 8 }, { 0xA9, 9 }, { 0xB1, 9 }, { 0xAD, 8 }, + { 0xB5, 9 }, { 0x01, 9 }, { 0x07, 3 }, /* 73 elements */ + }, + { + { 0x08, 5 }, { 0x0C, 7 }, { 0x10, 7 }, { 0x14, 6 }, { 0x18, 6 }, + { 0x2C, 6 }, { 0x24, 5 }, { 0x28, 5 }, { 0x30, 7 }, { 0x38, 7 }, + { 0x44, 8 }, { 0x48, 8 }, { 0x4C, 8 }, { 0x50, 14 }, { 0x6C, 14 }, + { 0x70, 14 }, { 0x84, 14 }, { 0x8C, 14 }, { 0x90, 14 }, { 0x94, 14 }, + { 0x98, 14 }, { 0xA4, 14 }, { 0xA8, 14 }, { 0xAC, 14 }, { 0xB0, 14 }, + { 0xB4, 14 }, { 0x00, 14 }, { 0x06, 14 }, { 0x65, 14 }, { 0x85, 13 }, + { 0x95, 13 }, { 0xA5, 13 }, { 0xA9, 13 }, { 0xAD, 13 }, { 0xB1, 13 }, + { 0xB5, 13 }, { 0x01, 13 }, { 0x54, 9 }, { 0x34, 5 }, { 0x58, 9 }, + { 0x64, 9 }, { 0x68, 8 }, { 0x74, 9 }, { 0x78, 9 }, { 0x88, 9 }, + { 0x39, 9 }, { 0x0D, 6 }, { 0x05, 2 }, { 0x09, 3 }, { 0x11, 8 }, + { 0x15, 8 }, { 0x31, 8 }, { 0x51, 8 }, { 0x19, 6 }, { 0x2D, 6 }, + { 0x35, 6 }, { 0x29, 4 }, { 0x25, 3 }, { 0x45, 6 }, { 0x49, 6 }, + { 0x4D, 6 }, { 0x55, 8 }, { 0x59, 8 }, { 0x69, 7 }, { 0x6D, 7 }, + { 0x71, 8 }, { 0x79, 9 }, { 0x89, 9 }, { 0x75, 7 }, { 0x8D, 8 }, + { 0x91, 9 }, { 0x99, 9 }, { 0x07, 5 }, /* 73 elements */ + }, + { + { 0x08, 3 }, { 0x0C, 12 }, { 0x10, 12 }, { 0x14, 12 }, { 0x18, 12 }, + { 0x2C, 11 }, { 0x30, 11 }, { 0x34, 11 }, { 0x38, 11 }, { 0x44, 11 }, + { 0x48, 11 }, { 0x4C, 11 }, { 0x50, 11 }, { 0x54, 11 }, { 0x58, 11 }, + { 0x64, 11 }, { 0x68, 11 }, { 0x6C, 11 }, { 0x70, 11 }, { 0x74, 11 }, + { 0x78, 11 }, { 0x84, 11 }, { 0x88, 11 }, { 0x8C, 11 }, { 0x90, 11 }, + { 0x94, 11 }, { 0x98, 11 }, { 0xA4, 11 }, { 0xA8, 11 }, { 0xAC, 11 }, + { 0xB0, 11 }, { 0xB4, 11 }, { 0x00, 11 }, { 0x06, 11 }, { 0x0D, 11 }, + { 0x11, 11 }, { 0x15, 11 }, { 0x19, 11 }, { 0x2D, 11 }, { 0x31, 11 }, + { 0x35, 11 }, { 0x39, 11 }, { 0x45, 11 }, { 0x49, 11 }, { 0x4D, 11 }, + { 0x51, 11 }, { 0x55, 11 }, { 0x59, 11 }, { 0x65, 11 }, { 0x69, 11 }, + { 0x6D, 11 }, { 0x71, 11 }, { 0x75, 11 }, { 0x79, 11 }, { 0x85, 11 }, + { 0x89, 11 }, { 0x8D, 11 }, { 0x91, 11 }, { 0x95, 11 }, { 0x99, 11 }, + { 0xA5, 11 }, { 0xA9, 11 }, { 0xAD, 11 }, { 0xB1, 11 }, { 0xB5, 11 }, + { 0x01, 11 }, { 0x07, 11 }, { 0x09, 5 }, { 0x28, 4 }, { 0x24, 3 }, + { 0x25, 4 }, { 0x29, 4 }, { 0x05, 1 }, /* 73 elements */ + }, + { + { 0x08, 15 }, { 0x10, 15 }, { 0x14, 15 }, { 0x18, 15 }, { 0x24, 15 }, + { 0x2C, 15 }, { 0x48, 15 }, { 0x64, 15 }, { 0x28, 12 }, { 0x0C, 11 }, + { 0x30, 12 }, { 0x38, 12 }, { 0x34, 11 }, { 0x44, 12 }, { 0x4C, 12 }, + { 0x50, 12 }, { 0x54, 12 }, { 0x58, 12 }, { 0x68, 15 }, { 0x70, 15 }, + { 0x98, 15 }, { 0xA4, 15 }, { 0xA8, 15 }, { 0xB0, 15 }, { 0x00, 14 }, + { 0x6C, 12 }, { 0x84, 12 }, { 0x74, 10 }, { 0x78, 11 }, { 0x88, 11 }, + { 0x8C, 10 }, { 0x90, 11 }, { 0xAC, 11 }, { 0x94, 10 }, { 0xB4, 10 }, + { 0x06, 10 }, { 0xA5, 10 }, { 0x15, 8 }, { 0x11, 7 }, { 0x19, 9 }, + { 0x85, 9 }, { 0x39, 8 }, { 0x0D, 5 }, { 0x05, 4 }, { 0x09, 4 }, + { 0x25, 5 }, { 0x31, 5 }, { 0x29, 3 }, { 0x2D, 4 }, { 0x35, 6 }, + { 0x55, 6 }, { 0x45, 5 }, { 0x49, 4 }, { 0x51, 5 }, { 0x59, 8 }, + { 0xA9, 8 }, { 0x65, 7 }, { 0x75, 6 }, { 0x4D, 3 }, { 0x69, 5 }, + { 0x6D, 5 }, { 0x71, 5 }, { 0x79, 7 }, { 0x89, 7 }, { 0x8D, 6 }, + { 0x91, 6 }, { 0x95, 6 }, { 0x99, 7 }, { 0xAD, 8 }, { 0xB1, 8 }, + { 0xB5, 7 }, { 0x01, 7 }, { 0x07, 4 }, /* 73 elements */ + }, }; /* DC differentials low+hi-mo, p217 are the same as in msmpeg4data .h */ diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h index 04cc9a22bf..5a071eb972 100644 --- a/libavcodec/vc1data.h +++ b/libavcodec/vc1data.h @@ -152,8 +152,7 @@ extern const uint8_t ff_vc1_ttblk_tabs[3][8][2]; extern const uint8_t ff_vc1_subblkpat_tabs[3][15][2]; /* MV differential tables, p265 */ -extern const uint16_t ff_vc1_mv_diff_codes[4][73]; -extern const uint8_t ff_vc1_mv_diff_bits[4][73]; +extern const uint8_t ff_vc1_mv_diff_tabs[4][73][2]; /* Interlaced frame picture MBMODE VLC tables (p. 246, p. 360) */ extern const uint16_t ff_vc1_intfr_4mv_mbmode_codes[4][15]; From patchwork Tue Nov 10 10:48:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23559 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 8465844A917 for ; Tue, 10 Nov 2020 13:09:23 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4C4A468BF92; Tue, 10 Nov 2020 12:50:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4856268BF4E for ; Tue, 10 Nov 2020 12:50:43 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id p22so2524870wmg.3 for ; Tue, 10 Nov 2020 02:50:43 -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=Xr50HeACmWq+BEtFFh9gcrop5+AXSwsTS6iOQsVosRI=; b=ocu8uB5k4LE1i8r9LhQp0X4IypP6RsJ98XiCVJkkgjonjLFBP/Ohls/1dcwtTP3WL6 WBNknOjIQiDzz5oQjLsgj+RkAu+Zwg6gtn/tzGsjtyNLR8OIPmKYeQsFG4snBzEnWxEl iX4rRfJumig02p+DXJ7FwdM96q/8+immy4OCPftlKqiv6PEHDDfnx36EjqwsP0lm283Y UCXpnrg8C4L26PpociioLvLjxPj2GGvf6mTAnmRqxGDoLWbsCHW+CY/GlQcYKDjMjxlu VGUYMky+Z3XOL9wZCDAIQLQjmSQaBxqCAv6ZK7DGDh3oEbJbjMgpVwNWcI7w2BRPWnf3 QpOg== 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=Xr50HeACmWq+BEtFFh9gcrop5+AXSwsTS6iOQsVosRI=; b=SLAFOsqGygvGhDi5lmzNWBij13iGjQEJM92FFi7ke5ZwRn8fVV9KIifEek61lVjAev ILIfBnnU6vLG8T56hFS48Cb3YjlT6nejNhUIyJNtlRiUKthU/8ldxCNKiOFL5tU2YDGQ TEm5aKZ4Bk/yqy9Gp2g7QQFEkaMs1R2rIL3sQZWFyBHBuS81w1b0LoGqMquMEMDU5ceq fZq9cnS7k9QxPiVouisGsSeWpAwc3fziQhn5w9reeK0hWB++TXay3j0hKfs/uawB9IcS 4FbQMk/5qJfG7OFqvml6xMu61vMldV5qcNd7xCgX50b2BIufR5mr1ICQrkX+g14WN48f ffJQ== X-Gm-Message-State: AOAM532l3T+QApvhk1FC//J8R0nQkALxtOmV/bqJMvxb9iNKjQIlGAhn Y3mMvU0YFHTl971BhNlK9Le/wKBUa7E= X-Google-Smtp-Source: ABdhPJzYBuU6dWsvdwrfNcGdDhm9y4EQV8QBYHYTGhJY2/rWJGNmu/ZbWPGlMDvth8el+jcidpr+0Q== X-Received: by 2002:a7b:c841:: with SMTP id c1mr4006798wml.31.1605005441949; Tue, 10 Nov 2020 02:50:41 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:41 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:21 +0100 Message-Id: <20201110104851.321029-85-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 084/114] avcodec/vc1: Use symbols table to parse macroblock mode 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" Expressions like array[get_vlc2()] can be optimized by using a symbols table if the array is always the same for a given VLC. This requirement is fulfilled for the VLCs used to parse the macroblock mode (MBMODE) element for frame P and B pictures. MBMODE consists of four pieces of information which can easily be encoded on one byte. Doing so not only avoids a dereference, but also some space as the table containing this information becomes redundant; furthermore, some of the VLCs used were initialized with code tables of type uint16_t which are now replaced by symbol tables of type uint8_t (thanks to ff_init_vlc_from_lengths()), thereby saving space. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1.c | 14 ++-- libavcodec/vc1_block.c | 41 +++++----- libavcodec/vc1data.c | 177 +++++++++++++++++++++++++++-------------- libavcodec/vc1data.h | 18 +++-- 4 files changed, 155 insertions(+), 95 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 8c8d701ef8..9eb02f88b3 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -1439,15 +1439,17 @@ av_cold int ff_vc1_init_common(VC1Context *v) /* initialize 4MV MBMODE VLC tables for interlaced frame P picture */ ff_vc1_intfr_4mv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 37]]; ff_vc1_intfr_4mv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 38] - vlc_offs[i * 3 + 37]; - init_vlc(&ff_vc1_intfr_4mv_mbmode_vlc[i], VC1_INTFR_4MV_MBMODE_VLC_BITS, 15, - ff_vc1_intfr_4mv_mbmode_bits[i], 1, 1, - ff_vc1_intfr_4mv_mbmode_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_intfr_4mv_mbmode_vlc[i], VC1_INTFR_4MV_MBMODE_VLC_BITS, 15, + &ff_vc1_intfr_4mv_mbmode_tabs[i][0][1], 2, + &ff_vc1_intfr_4mv_mbmode_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); /* initialize NON-4MV MBMODE VLC tables for the same */ ff_vc1_intfr_non4mv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 38]]; ff_vc1_intfr_non4mv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 39] - vlc_offs[i * 3 + 38]; - init_vlc(&ff_vc1_intfr_non4mv_mbmode_vlc[i], VC1_INTFR_NON4MV_MBMODE_VLC_BITS, 9, - ff_vc1_intfr_non4mv_mbmode_bits[i], 1, 1, - ff_vc1_intfr_non4mv_mbmode_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_intfr_non4mv_mbmode_vlc[i], VC1_INTFR_NON4MV_MBMODE_VLC_BITS, 9, + &ff_vc1_intfr_non4mv_mbmode_tabs[i][0][1], 2, + &ff_vc1_intfr_non4mv_mbmode_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); /* initialize interlaced MVDATA tables (1-Ref) */ ff_vc1_1ref_mvdata_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 39]]; ff_vc1_1ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 3 + 40] - vlc_offs[i * 3 + 39]; diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 6820ffb0d7..18637e75d8 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -1518,7 +1518,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) int dst_idx, off; int skipped, fourmv = 0, twomv = 0; int block_cbp = 0, pat, block_tt = 0; - int idx_mbmode = 0, mvbp; + int mvbp; int fieldtx; mquant = v->pq; /* Lossy initialization */ @@ -1528,11 +1528,11 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) else skipped = v->s.mbskip_table[mb_pos]; if (!skipped) { - if (v->fourmvswitch) - idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_INTFR_4MV_MBMODE_VLC_BITS, 2); // try getting this done - else - idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_INTFR_NON4MV_MBMODE_VLC_BITS, 2); // in a single line - switch (ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0]) { + int bits = v->fourmvswitch ? VC1_INTFR_4MV_MBMODE_VLC_BITS : + VC1_INTFR_NON4MV_MBMODE_VLC_BITS; + int mbmode = get_vlc2(gb, v->mbmode_vlc->table, bits, 2); + + switch (mbmode & 0x1F) { /* store the motion vector type in a flag (useful later) */ case MV_PMODE_INTFR_4MV: fourmv = 1; @@ -1562,7 +1562,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) v->blk_mv_type[s->block_index[3]] = 0; break; } - if (ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0] == MV_PMODE_INTFR_INTRA) { // intra MB + if ((mbmode & 0x1F) == MV_PMODE_INTFR_INTRA) { // intra MB for (i = 0; i < 4; i++) { s->current_picture.motion_val[1][s->block_index[i]][0] = 0; s->current_picture.motion_val[1][s->block_index[i]][1] = 0; @@ -1605,21 +1605,21 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) } } else { // inter MB - mb_has_coeffs = ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][3]; + mb_has_coeffs = !!(mbmode & RESIDUAL); if (mb_has_coeffs) cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); - if (ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0] == MV_PMODE_INTFR_2MV_FIELD) { + if ((mbmode & 0x1F) == MV_PMODE_INTFR_2MV_FIELD) { v->twomvbp = get_vlc2(gb, v->twomvbp_vlc->table, VC1_2MV_BLOCK_PATTERN_VLC_BITS, 1); } else { - if ((ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0] == MV_PMODE_INTFR_4MV) - || (ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0] == MV_PMODE_INTFR_4MV_FIELD)) { + if (((mbmode & 0x1F) == MV_PMODE_INTFR_4MV) || + ((mbmode & 0x1F) == MV_PMODE_INTFR_4MV_FIELD)) { v->fourmvbp = get_vlc2(gb, v->fourmvbp_vlc->table, VC1_4MV_BLOCK_PATTERN_VLC_BITS, 1); } } s->mb_intra = v->is_intra[s->mb_x] = 0; for (i = 0; i < 6; i++) v->mb_type[0][s->block_index[i]] = 0; - fieldtx = v->fieldtx_plane[mb_pos] = ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][1]; + fieldtx = v->fieldtx_plane[mb_pos] = !!(mbmode & FIELDTX); /* for all motion vector read MVDATA and motion compensate each block */ dst_idx = 0; if (fourmv) { @@ -1650,7 +1650,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) ff_vc1_mc_4mv_luma(v, 3, 0, 0); ff_vc1_mc_4mv_chroma4(v, 0, 0, 0); } else { - mvbp = ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][2]; + mvbp = !!(mbmode & MVDIFF); dmv_x = dmv_y = 0; if (mvbp) { get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); @@ -2175,7 +2175,7 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) int dst_idx, off; int skipped, direct, twomv = 0; int block_cbp = 0, pat, block_tt = 0; - int idx_mbmode = 0, mvbp; + int mbmode = MV_PMODE_INTFR_1MV | MVDIFF | RESIDUAL, mvbp; int stride_y, fieldtx; int bmvtype = BMV_TYPE_BACKWARD; int dir, dir2; @@ -2188,8 +2188,9 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) skipped = v->s.mbskip_table[mb_pos]; if (!skipped) { - idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_INTFR_NON4MV_MBMODE_VLC_BITS, 2); - if (ff_vc1_mbmode_intfrp[0][idx_mbmode][0] == MV_PMODE_INTFR_2MV_FIELD) { + mbmode = get_vlc2(gb, v->mbmode_vlc->table, + VC1_INTFR_NON4MV_MBMODE_VLC_BITS, 2); + if ((mbmode & 0x1F) == MV_PMODE_INTFR_2MV_FIELD) { twomv = 1; v->blk_mv_type[s->block_index[0]] = 1; v->blk_mv_type[s->block_index[1]] = 1; @@ -2203,7 +2204,7 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) } } - if (ff_vc1_mbmode_intfrp[0][idx_mbmode][0] == MV_PMODE_INTFR_INTRA) { // intra MB + if ((mbmode & 0x1F) == MV_PMODE_INTFR_INTRA) { // intra MB for (i = 0; i < 4; i++) { s->mv[0][i][0] = s->current_picture.motion_val[0][s->block_index[i]][0] = 0; s->mv[0][i][1] = s->current_picture.motion_val[0][s->block_index[i]][1] = 0; @@ -2309,7 +2310,7 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) } if (!skipped) { // inter MB - mb_has_coeffs = ff_vc1_mbmode_intfrp[0][idx_mbmode][3]; + mb_has_coeffs = !!(mbmode & RESIDUAL); if (mb_has_coeffs) cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); if (!direct) { @@ -2322,7 +2323,7 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) for (i = 0; i < 6; i++) v->mb_type[0][s->block_index[i]] = 0; - fieldtx = v->fieldtx_plane[mb_pos] = ff_vc1_mbmode_intfrp[0][idx_mbmode][1]; + fieldtx = v->fieldtx_plane[mb_pos] = !!(mbmode & FIELDTX); /* for all motion vector read MVDATA and motion compensate each block */ dst_idx = 0; if (direct) { @@ -2404,7 +2405,7 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) } else { dir = bmvtype == BMV_TYPE_BACKWARD; - mvbp = ff_vc1_mbmode_intfrp[0][idx_mbmode][2]; + mvbp = !!(mbmode & MVDIFF); dmv_x = dmv_y = 0; if (mvbp) get_mvdata_interlaced(v, &dmv_x, &dmv_y, NULL); diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c index 701d285561..30d8585723 100644 --- a/libavcodec/vc1data.c +++ b/libavcodec/vc1data.c @@ -42,41 +42,6 @@ const uint8_t ff_vc1_mv_pmode_table2[2][4] = { { MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_1MV_HPEL_BILIN } }; -/* MBMODE table for interlaced frame P-picture */ -const uint8_t ff_vc1_mbmode_intfrp[2][15][4] = { - { /* 1: 4-MV, 0: non-4-MV */ - /* Type, FIELDTX, 1-MV Differential present, Residuals (CBP) present */ - /* Table 164 - Table 167 */ - { MV_PMODE_INTFR_1MV , 0, 1, 1 }, - { MV_PMODE_INTFR_1MV , 1, 1, 1 }, - { MV_PMODE_INTFR_1MV , 0, 1, 0 }, - { MV_PMODE_INTFR_1MV , 0, 0, 1 }, - { MV_PMODE_INTFR_1MV , 1, 0, 1 }, - { MV_PMODE_INTFR_2MV_FIELD, 0, 0, 1 }, - { MV_PMODE_INTFR_2MV_FIELD, 1, 0, 1 }, - { MV_PMODE_INTFR_2MV_FIELD, 1, 0, 0 }, - { MV_PMODE_INTFR_INTRA , 0, 0, 0 } - }, - { - /* Table 160 - Table 163 */ - { MV_PMODE_INTFR_1MV , 0, 1, 1 }, - { MV_PMODE_INTFR_1MV , 1, 1, 1 }, - { MV_PMODE_INTFR_1MV , 0, 1, 0 }, - { MV_PMODE_INTFR_1MV , 0, 0, 1 }, - { MV_PMODE_INTFR_1MV , 1, 0, 1 }, - { MV_PMODE_INTFR_2MV_FIELD, 0, 0, 1 }, - { MV_PMODE_INTFR_2MV_FIELD, 1, 0, 1 }, - { MV_PMODE_INTFR_2MV_FIELD, 1, 0, 0 }, - { MV_PMODE_INTFR_4MV , 0, 0, 1 }, - { MV_PMODE_INTFR_4MV , 1, 0, 1 }, - { MV_PMODE_INTFR_4MV , 0, 0, 0 }, - { MV_PMODE_INTFR_4MV_FIELD, 0, 0, 1 }, - { MV_PMODE_INTFR_4MV_FIELD, 1, 0, 1 }, - { MV_PMODE_INTFR_4MV_FIELD, 1, 0, 0 }, - { MV_PMODE_INTFR_INTRA , 0, 0, 0 } - } -}; - const int ff_vc1_fps_nr[7] = { 24, 25, 30, 50, 60, 48, 72 }, ff_vc1_fps_dr[2] = { 1000, 1001 }; const uint8_t ff_vc1_pquant_table[3][32] = { @@ -256,34 +221,124 @@ const uint8_t ff_vc1_2mv_block_pattern_bits[4][4] = { { 2, 2, 2, 2 }, { 1, 2, 3, 3 }, { 3, 2, 3, 1 }, { 1, 3, 3, 2 } }; -/* Interlaced frame picture 4MV MBMODE VLC tables (p. 246, p. 360) */ -const uint16_t ff_vc1_intfr_4mv_mbmode_codes[4][15] = { - { 22, 17, 0, 47, 32, 10, 1, 3, 67, 133, 132, 92, 19, 93, 18 }, - { 3, 45, 0, 7, 23, 6, 1, 2, 10, 39, 44, 8, 18, 77, 76 }, - { 15, 6, 28, 9, 41, 6, 2, 15, 14, 8, 40, 29, 0, 21, 11 }, - { 7, 198, 1, 2, 193, 13, 25, 0, 97, 1599, 98, 398, 798, 192, 1598 } -}; - -const uint8_t ff_vc1_intfr_4mv_mbmode_bits[4][15] = { - { 5, 5, 2, 6, 6, 4, 2, 2, 7, 8, 8, 7, 5, 7, 5 }, - { 3, 6, 3, 3, 5, 3, 3, 3, 4, 6, 6, 4, 5, 7, 7 }, - { 4, 3, 5, 5, 7, 4, 2, 5, 5, 5, 7, 5, 2, 6, 5 }, - { 4, 9, 1, 3, 9, 5, 6, 2, 8, 12, 8, 10, 11, 9, 12 } -}; - -/* Interlaced frame picture NON-4MV MBMODE VLC tables (p. 363) */ -const uint8_t ff_vc1_intfr_non4mv_mbmode_codes[4][9] = { - { 9, 22, 0, 17, 16, 10, 1, 3, 23 }, - { 7, 0, 5, 2, 1, 1, 6, 3, 4 }, - { 1, 0, 10, 23, 44, 8, 3, 9, 45 }, - { 7, 97, 1, 2, 49, 13, 25, 0, 96 } +/* Interlaced frame picture 4MV MBMODE VLC tables (tables 160-163) */ +const uint8_t ff_vc1_intfr_4mv_mbmode_tabs[4][15][2] = { + { + { MV_PMODE_INTFR_1MV | MVDIFF, 2 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX | RESIDUAL, 2 }, + { MV_PMODE_INTFR_1MV | FIELDTX | RESIDUAL, 6 }, + { MV_PMODE_INTFR_4MV, 8 }, + { MV_PMODE_INTFR_4MV | FIELDTX | RESIDUAL, 8 }, + { MV_PMODE_INTFR_4MV | RESIDUAL, 7 }, + { MV_PMODE_INTFR_1MV | FIELDTX | MVDIFF | RESIDUAL, 5 }, + { MV_PMODE_INTFR_INTRA, 5 }, + { MV_PMODE_INTFR_4MV_FIELD | FIELDTX | RESIDUAL, 5 }, + { MV_PMODE_INTFR_2MV_FIELD | RESIDUAL, 4 }, + { MV_PMODE_INTFR_1MV | MVDIFF | RESIDUAL, 5 }, + { MV_PMODE_INTFR_4MV_FIELD | RESIDUAL, 7 }, + { MV_PMODE_INTFR_4MV_FIELD | FIELDTX, 7 }, + { MV_PMODE_INTFR_1MV | RESIDUAL, 6 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX, 2 }, + }, + { + { MV_PMODE_INTFR_1MV | MVDIFF, 3 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX | RESIDUAL, 3 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX, 3 }, + { MV_PMODE_INTFR_1MV | MVDIFF | RESIDUAL, 3 }, + { MV_PMODE_INTFR_4MV_FIELD | RESIDUAL, 4 }, + { MV_PMODE_INTFR_4MV_FIELD | FIELDTX | RESIDUAL, 5 }, + { MV_PMODE_INTFR_INTRA, 7 }, + { MV_PMODE_INTFR_4MV_FIELD | FIELDTX, 7 }, + { MV_PMODE_INTFR_4MV | FIELDTX | RESIDUAL, 6 }, + { MV_PMODE_INTFR_4MV | RESIDUAL, 4 }, + { MV_PMODE_INTFR_4MV, 6 }, + { MV_PMODE_INTFR_1MV | FIELDTX | MVDIFF | RESIDUAL, 6 }, + { MV_PMODE_INTFR_1MV | FIELDTX | RESIDUAL, 5 }, + { MV_PMODE_INTFR_2MV_FIELD | RESIDUAL, 3 }, + { MV_PMODE_INTFR_1MV | RESIDUAL, 3 }, + }, + { + { MV_PMODE_INTFR_4MV_FIELD | FIELDTX | RESIDUAL, 2 }, + { MV_PMODE_INTFR_4MV | FIELDTX | RESIDUAL, 5 }, + { MV_PMODE_INTFR_1MV | RESIDUAL, 5 }, + { MV_PMODE_INTFR_4MV, 7 }, + { MV_PMODE_INTFR_1MV | FIELDTX | RESIDUAL, 7 }, + { MV_PMODE_INTFR_4MV_FIELD | FIELDTX, 6 }, + { MV_PMODE_INTFR_INTRA, 5 }, + { MV_PMODE_INTFR_2MV_FIELD | RESIDUAL, 4 }, + { MV_PMODE_INTFR_4MV | RESIDUAL, 5 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX, 5 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX | RESIDUAL, 2 }, + { MV_PMODE_INTFR_1MV | FIELDTX | MVDIFF | RESIDUAL, 3 }, + { MV_PMODE_INTFR_1MV | MVDIFF, 5 }, + { MV_PMODE_INTFR_4MV_FIELD | RESIDUAL, 5 }, + { MV_PMODE_INTFR_1MV | MVDIFF | RESIDUAL, 4 }, + }, + { + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX, 2 }, + { MV_PMODE_INTFR_1MV | RESIDUAL, 3 }, + { MV_PMODE_INTFR_4MV_FIELD | FIELDTX, 9 }, + { MV_PMODE_INTFR_1MV | FIELDTX | RESIDUAL, 9 }, + { MV_PMODE_INTFR_4MV | RESIDUAL, 8 }, + { MV_PMODE_INTFR_4MV, 8 }, + { MV_PMODE_INTFR_1MV | FIELDTX | MVDIFF | RESIDUAL, 9 }, + { MV_PMODE_INTFR_4MV_FIELD | RESIDUAL, 10 }, + { MV_PMODE_INTFR_4MV_FIELD | FIELDTX | RESIDUAL, 11 }, + { MV_PMODE_INTFR_INTRA, 12 }, + { MV_PMODE_INTFR_4MV | FIELDTX | RESIDUAL, 12 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX | RESIDUAL, 6 }, + { MV_PMODE_INTFR_2MV_FIELD | RESIDUAL, 5 }, + { MV_PMODE_INTFR_1MV | MVDIFF | RESIDUAL, 4 }, + { MV_PMODE_INTFR_1MV | MVDIFF, 1 }, + }, }; -const uint8_t ff_vc1_intfr_non4mv_mbmode_bits[4][9] = { - { 4, 5, 2, 5, 5, 4, 2, 2, 5 }, - { 3, 4, 6, 2, 3, 2, 3, 5, 6 }, - { 2, 2, 4, 5, 6, 4, 2, 4, 6 }, - { 4, 8, 1, 3, 7, 5, 6, 2, 8 } +/* Interlaced frame picture NON-4MV MBMODE VLC tables (tables 164-167) */ +const uint8_t ff_vc1_intfr_non4mv_mbmode_tabs[4][9][2] = { + { + { MV_PMODE_INTFR_1MV | MVDIFF, 2 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX | RESIDUAL, 2 }, + { MV_PMODE_INTFR_1MV | FIELDTX | RESIDUAL, 5 }, + { MV_PMODE_INTFR_1MV | RESIDUAL, 5 }, + { MV_PMODE_INTFR_1MV | MVDIFF | RESIDUAL, 4 }, + { MV_PMODE_INTFR_2MV_FIELD | RESIDUAL, 4 }, + { MV_PMODE_INTFR_1MV | FIELDTX | MVDIFF | RESIDUAL, 5 }, + { MV_PMODE_INTFR_INTRA, 5 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX, 2 }, + }, + { + { MV_PMODE_INTFR_1MV | FIELDTX | MVDIFF | RESIDUAL, 4 }, + { MV_PMODE_INTFR_INTRA, 6 }, + { MV_PMODE_INTFR_1MV | MVDIFF, 6 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX, 5 }, + { MV_PMODE_INTFR_1MV | FIELDTX | RESIDUAL, 3 }, + { MV_PMODE_INTFR_2MV_FIELD | RESIDUAL, 2 }, + { MV_PMODE_INTFR_1MV | RESIDUAL, 2 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX | RESIDUAL, 3 }, + { MV_PMODE_INTFR_1MV | MVDIFF | RESIDUAL, 3 }, + }, + { + { MV_PMODE_INTFR_1MV | FIELDTX | MVDIFF | RESIDUAL, 2 }, + { MV_PMODE_INTFR_1MV | MVDIFF | RESIDUAL, 2 }, + { MV_PMODE_INTFR_2MV_FIELD | RESIDUAL, 4 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX, 4 }, + { MV_PMODE_INTFR_1MV | MVDIFF, 4 }, + { MV_PMODE_INTFR_1MV | FIELDTX | RESIDUAL, 6 }, + { MV_PMODE_INTFR_INTRA, 6 }, + { MV_PMODE_INTFR_1MV | RESIDUAL, 5 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX | RESIDUAL, 2 }, + }, + { + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX, 2 }, + { MV_PMODE_INTFR_1MV | RESIDUAL, 3 }, + { MV_PMODE_INTFR_INTRA, 8 }, + { MV_PMODE_INTFR_1MV | FIELDTX | MVDIFF | RESIDUAL, 8 }, + { MV_PMODE_INTFR_1MV | FIELDTX | RESIDUAL, 7 }, + { MV_PMODE_INTFR_2MV_FIELD | FIELDTX | RESIDUAL, 6 }, + { MV_PMODE_INTFR_2MV_FIELD | RESIDUAL, 5 }, + { MV_PMODE_INTFR_1MV | MVDIFF | RESIDUAL, 4 }, + { MV_PMODE_INTFR_1MV | MVDIFF, 1 }, + }, }; /* Interlaced field picture MBMODE VLC tables (p. 356 - 11.4.1, 11.4.2) */ diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h index 5a071eb972..935ff4f44d 100644 --- a/libavcodec/vc1data.h +++ b/libavcodec/vc1data.h @@ -43,9 +43,6 @@ extern const uint8_t ff_vc1_mv_pmode_table2[2][4]; extern const int ff_vc1_fps_nr[7], ff_vc1_fps_dr[2]; extern const uint8_t ff_vc1_pquant_table[3][32]; -/* MBMODE table for interlaced frame P-picture */ -extern const uint8_t ff_vc1_mbmode_intfrp[2][15][4]; - /** @name VC-1 VLC tables and defines * @todo TODO move this into the context */ @@ -154,11 +151,16 @@ extern const uint8_t ff_vc1_subblkpat_tabs[3][15][2]; /* MV differential tables, p265 */ extern const uint8_t ff_vc1_mv_diff_tabs[4][73][2]; -/* Interlaced frame picture MBMODE VLC tables (p. 246, p. 360) */ -extern const uint16_t ff_vc1_intfr_4mv_mbmode_codes[4][15]; -extern const uint8_t ff_vc1_intfr_4mv_mbmode_bits[4][15]; -extern const uint8_t ff_vc1_intfr_non4mv_mbmode_codes[4][9]; -extern const uint8_t ff_vc1_intfr_non4mv_mbmode_bits[4][9]; +/* Interlaced frame picture MBMODE VLC tables (tables 160-167) + * The lowest five bits of the symbol contain the MBMODE, + * the next three bits the following properties: */ +enum MBModeProperties { + FIELDTX = 1 << 5, + MVDIFF = 1 << 6, + RESIDUAL = 1 << 7, +}; +extern const uint8_t ff_vc1_intfr_4mv_mbmode_tabs[4][15][2]; +extern const uint8_t ff_vc1_intfr_non4mv_mbmode_tabs[4][9][2]; /* Interlaced field picture MBMODE VLC tables (p. 356 - 11.4.1, 11.4.2) */ extern const uint8_t ff_vc1_if_mmv_mbmode_codes[8][8]; From patchwork Tue Nov 10 10:48:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23560 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 5C31244A917 for ; Tue, 10 Nov 2020 13:09:42 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 286EC68BF2E; Tue, 10 Nov 2020 12:50:59 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AD0A568BE4C for ; Tue, 10 Nov 2020 12:50:43 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id o15so4305478wru.6 for ; Tue, 10 Nov 2020 02:50:43 -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=qpbFPVtSYyrdSTGKR19DRAzUt+pzDt3FwzdUXkabN1g=; b=hB9X35BJZtLj6ryFczTcZxI/UCXzoDy8HGnlwDYyTeElPscCVgkYcymAZuWpJfD1o7 aXgoekNU53nRywGDrL/aEN2cgdjIM+UDvfA44hAJZ8oUdC0ENdUxXhWlun19wuNQZd/S hz8JklxWY5JCkjf0KF441cDhoM+2HoaRmRSCG4QiFrWuvZVaKAm4LwsOuAvNaoQuh9r3 08O/owE9grt0Uk3k534uxU1wEERBQZyV8uYjRMgQxjvK1lYrMUifw0D5El3/A1yTn912 hB5NjNf7tX5+WcuZPnoEHIgQcAOoUFbBpMP1JEyshtEBy0phn3m8Jj3ax15fvHXMgNGN b3FQ== 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=qpbFPVtSYyrdSTGKR19DRAzUt+pzDt3FwzdUXkabN1g=; b=s/pjwW+lmfRlJZ1u3bOQgDCvHKZYeMadP6eseSOaWkWgsTGxkJmLtxlPN8Qu4/HdPl RQSl3nCJ9vPeN6nAg4oIwrrAwkDPI6zyf5nTotIwwgxgOyHVTrQ5dmXny6Lfc0YOpiNs bgHeuCFUkIeO4VzOlxOOqwTkLdxRJIztxvtgpS4M2UOfnmS7vtBe0tpW7l+HMaN5eCVK Nx6BnSo8E2TwTHu6vrdRKPdY9k3B96NqbHg9zeZimTL2X31F2Br2f5z1sbFgv1NXdwdV KYcuvs/6UWW1SU7DbCqYiKGLTe6ksCX5DlGDeUkqi0xaDULJR2UDrgrI4o+CKqCQ8cVg HpPQ== X-Gm-Message-State: AOAM533aXKesvAwXYtaHby2gpT7GIcECo1RVRIBXoJIhNc7nj9s4LwdD Wq+ahCmi573v0FOeug23dUYqVvxHmkg= X-Google-Smtp-Source: ABdhPJyETx/W97M5Ahei+baCiddLqW12qABCoZYJIfDE7lrj2vwrg0qH6mbJnSlIDUrGTRD9kuLGMQ== X-Received: by 2002:a05:6000:107:: with SMTP id o7mr22881281wrx.354.1605005442983; Tue, 10 Nov 2020 02:50:42 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:42 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:22 +0100 Message-Id: <20201110104851.321029-86-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 085/114] avcodec/vc1: Don't check for errors for complete VLC 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 9eb02f88b3..305cc8c075 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -614,7 +614,7 @@ static void rotate_luts(VC1Context *v) static int read_bfraction(VC1Context *v, GetBitContext* gb) { int bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); - if (bfraction_lut_index == 21 || bfraction_lut_index < 0) { + if (bfraction_lut_index == 21) { av_log(v->s.avctx, AV_LOG_ERROR, "bfraction invalid\n"); return AVERROR_INVALIDDATA; } From patchwork Tue Nov 10 10:48:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23561 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 9BBFC44B48B for ; Tue, 10 Nov 2020 13:10:02 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0DE3768BF93; Tue, 10 Nov 2020 12:51:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9050C68BF58 for ; Tue, 10 Nov 2020 12:50:45 +0200 (EET) Received: by mail-wm1-f45.google.com with SMTP id p19so1739914wmg.0 for ; Tue, 10 Nov 2020 02:50:45 -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=MZ2RwLiC02kuWX+dHgWjNacVtmSOLsuK2Pz85dnrl70=; b=Bv0cgY0aE+RGhEwSo3Wd9iDn96VQmvE8TFEUupxNEQeihWLKEcJYpFioGCSOG+Tq1n YizjQfCc0TAAtGrxkbP1Oi3C//egqFi9vjE/1cP50Grocv5Gj0h0PQ9+mrB/3KXmp60G M1gdv27nEIhmBh54X/WxKUCAxYX70W0aYqbsnobXs7ce8dgXGRC83j+NP/z+8wmeCX02 QcD7yZouvTYZBTwKLcUCHIlOCBKwxTCWHVB0KT2L16q9upD/GWRxLiKWFOhF+2E3GzP4 m7aO7MwIUn0jfCttHmBBGm5Gk51eHWcQVyqOgiI7u6S9AVpLA3VZ7cpBkA8KoErI/xYK d4/Q== 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=MZ2RwLiC02kuWX+dHgWjNacVtmSOLsuK2Pz85dnrl70=; b=TNyUfvUtlAnyTCy4bFHbF5YGcNU8ha6zksp4o0xVw4HXugwqv/JflQIpESwHgHUJ7d 9Nun35aJt8u3Z8VBdoW3kkszg3sX/jNOvxAS7uMBBOLHGBxfXU0UMbOWX13qfAauDpCh So4SGw3F2SkioNCFDIADHwaggo2ZcDJD/+qy4xhljteqpmvW/sJougUcEjTt0ISUNX4H S5I6IgCix1PJsQkmLQMYc8V8l29vVTb4G/fcQ94NOZMpeeysAJ/8rSeTCQZZnsvbwhTP U4wJhvcgtx4HrHxGaWysCsQrLtOWmgENjN+/Ybc8IfFAQSSmAy8x6FS6drPf2XVrqOTh ZpPQ== X-Gm-Message-State: AOAM5328pHKwkuPnvIQS0Y1JJ7X6D74KUfys0r2z0m781RWIsXYXZtU0 snOipEtgov2262duPN9L+T8ZnuopO5g= X-Google-Smtp-Source: ABdhPJxSV6YFdhzUbe9cmhRNvquB4c88MR25/yCW56o+doEQx8zf/aUoheCkSkUfi82y2dPU/bU4vA== X-Received: by 2002:a1c:9e93:: with SMTP id h141mr3918293wme.153.1605005443974; Tue, 10 Nov 2020 02:50:43 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:43 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:23 +0100 Message-Id: <20201110104851.321029-87-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 086/114] avcodec/vc1: Make tables used to initialize VLCs smaller 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" By switching to ff_init_vlc_from_lengths() from ff_init_vlc_sparse() one can replace codes of type uint16_t by symbols of type uint8_t, saving space. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1.c | 27 +-- libavcodec/vc1data.c | 488 ++++++++++++++++++++----------------------- libavcodec/vc1data.h | 13 +- 3 files changed, 245 insertions(+), 283 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 305cc8c075..dedabaea6c 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -1376,18 +1376,19 @@ av_cold int ff_vc1_init_common(VC1Context *v) INIT_VLC_STATIC(&ff_vc1_norm2_vlc, VC1_NORM2_VLC_BITS, 4, ff_vc1_norm2_bits, 1, 1, ff_vc1_norm2_codes, 1, 1, 1 << VC1_NORM2_VLC_BITS); - INIT_VLC_STATIC(&ff_vc1_norm6_vlc, VC1_NORM6_VLC_BITS, 64, - ff_vc1_norm6_bits, 1, 1, - ff_vc1_norm6_codes, 2, 2, 556); + INIT_VLC_STATIC_FROM_LENGTHS(&ff_vc1_norm6_vlc, VC1_NORM6_VLC_BITS, 77, + &ff_vc1_norm6_tab[0][1], 2, + &ff_vc1_norm6_tab[0][0], 2, 1, 0, 0, 556); INIT_VLC_STATIC(&ff_vc1_imode_vlc, VC1_IMODE_VLC_BITS, 7, ff_vc1_imode_bits, 1, 1, ff_vc1_imode_codes, 1, 1, 1 << VC1_IMODE_VLC_BITS); for (i = 0; i < 3; i++) { ff_vc1_ttmb_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 0]]; ff_vc1_ttmb_vlc[i].table_allocated = vlc_offs[i * 3 + 1] - vlc_offs[i * 3 + 0]; - init_vlc(&ff_vc1_ttmb_vlc[i], VC1_TTMB_VLC_BITS, 16, - ff_vc1_ttmb_bits[i], 1, 1, - ff_vc1_ttmb_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_ttmb_vlc[i], VC1_TTMB_VLC_BITS, 16, + &ff_vc1_ttmb_tabs[i][0][1], 2, + &ff_vc1_ttmb_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); ff_vc1_ttblk_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 1]]; ff_vc1_ttblk_vlc[i].table_allocated = vlc_offs[i * 3 + 2] - vlc_offs[i * 3 + 1]; ff_init_vlc_from_lengths(&ff_vc1_ttblk_vlc[i], VC1_TTBLK_VLC_BITS, 8, @@ -1409,9 +1410,10 @@ av_cold int ff_vc1_init_common(VC1Context *v) ff_vc1_4mv_block_pattern_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); ff_vc1_cbpcy_p_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 10]]; ff_vc1_cbpcy_p_vlc[i].table_allocated = vlc_offs[i * 3 + 11] - vlc_offs[i * 3 + 10]; - init_vlc(&ff_vc1_cbpcy_p_vlc[i], VC1_CBPCY_P_VLC_BITS, 64, - ff_vc1_cbpcy_p_bits[i], 1, 1, - ff_vc1_cbpcy_p_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_cbpcy_p_vlc[i], VC1_CBPCY_P_VLC_BITS, 64, + &ff_vc1_cbpcy_p_tabs[i][0][1], 2, + &ff_vc1_cbpcy_p_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); ff_vc1_mv_diff_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 11]]; ff_vc1_mv_diff_vlc[i].table_allocated = vlc_offs[i * 3 + 12] - vlc_offs[i * 3 + 11]; ff_init_vlc_from_lengths(&ff_vc1_mv_diff_vlc[i], VC1_MV_DIFF_VLC_BITS, 73, @@ -1470,9 +1472,10 @@ av_cold int ff_vc1_init_common(VC1Context *v) /* Initialize interlaced CBPCY VLC tables (Table 124 - Table 131) */ ff_vc1_icbpcy_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 53]]; ff_vc1_icbpcy_vlc[i].table_allocated = vlc_offs[i * 3 + 54] - vlc_offs[i * 3 + 53]; - init_vlc(&ff_vc1_icbpcy_vlc[i], VC1_ICBPCY_VLC_BITS, 63, - ff_vc1_icbpcy_p_bits[i], 1, 1, - ff_vc1_icbpcy_p_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&ff_vc1_icbpcy_vlc[i], VC1_ICBPCY_VLC_BITS, 63, + &ff_vc1_icbpcy_p_tabs[i][0][1], 2, + &ff_vc1_icbpcy_p_tabs[i][0][0], 2, 1, + 0, INIT_VLC_USE_NEW_STATIC); /* Initialize interlaced field picture MBMODE VLC tables */ ff_vc1_if_mmv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 54]]; ff_vc1_if_mmv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 55] - vlc_offs[i * 3 + 54]; diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c index 30d8585723..ce9948281f 100644 --- a/libavcodec/vc1data.c +++ b/libavcodec/vc1data.c @@ -184,18 +184,25 @@ const uint8_t ff_vc1_norm2_bits[4] = { 1, 3, 3, 2 }; -const uint16_t ff_vc1_norm6_codes[64] = { - 0x001, 0x002, 0x003, 0x000, 0x004, 0x001, 0x002, 0x047, 0x005, 0x003, 0x004, 0x04B, 0x005, 0x04D, 0x04E, 0x30E, - 0x006, 0x006, 0x007, 0x053, 0x008, 0x055, 0x056, 0x30D, 0x009, 0x059, 0x05A, 0x30C, 0x05C, 0x30B, 0x30A, 0x037, - 0x007, 0x00A, 0x00B, 0x043, 0x00C, 0x045, 0x046, 0x309, 0x00D, 0x049, 0x04A, 0x308, 0x04C, 0x307, 0x306, 0x036, - 0x00E, 0x051, 0x052, 0x305, 0x054, 0x304, 0x303, 0x035, 0x058, 0x302, 0x301, 0x034, 0x300, 0x033, 0x032, 0x007, -}; - -const uint8_t ff_vc1_norm6_bits[64] = { - 1, 4, 4, 8, 4, 8, 8, 10, 4, 8, 8, 10, 8, 10, 10, 13, - 4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9, - 4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9, - 8, 10, 10, 13, 10, 13, 13, 9, 10, 13, 13, 9, 13, 9, 9, 6, +/* The negative lengths in the following table correspond to + * open ends in the tree: It is incomplete. */ +const uint8_t ff_vc1_norm6_tab[77][2] = { + { 0x03, 8 }, { 0x05, 8 }, { 0x06, 8 }, { 0x09, 8 }, { 0x0A, 8 }, + { 0x0C, 8 }, { 0x11, 8 }, { 0x12, 8 }, { 0x14, 8 }, { 0x18, 8 }, + { 0x21, 8 }, { 0x22, 8 }, { 0x24, 8 }, { 0x28, 8 }, { 0x30, 8 }, + { 0, -8 }, { 0, -9 }, { 0,-10 }, { 0x23, 10 }, { 0,-10 }, + { 0x25, 10 }, { 0x26, 10 }, { 0x07, 10 }, { 0,-10 }, { 0x29, 10 }, + { 0x2A, 10 }, { 0x0B, 10 }, { 0x2C, 10 }, { 0x0D, 10 }, { 0x0E, 10 }, + { 0,-10 }, { 0,-10 }, { 0x31, 10 }, { 0x32, 10 }, { 0x13, 10 }, + { 0x34, 10 }, { 0x15, 10 }, { 0x16, 10 }, { 0,-10 }, { 0x38, 10 }, + { 0x19, 10 }, { 0x1A, 10 }, { 0,-10 }, { 0x1C, 10 }, { 0,-10 }, + { 0, -9 }, { 0x3C, 13 }, { 0x3A, 13 }, { 0x39, 13 }, { 0x36, 13 }, + { 0x35, 13 }, { 0x33, 13 }, { 0x2E, 13 }, { 0x2D, 13 }, { 0x2B, 13 }, + { 0x27, 13 }, { 0x1E, 13 }, { 0x1D, 13 }, { 0x1B, 13 }, { 0x17, 13 }, + { 0x0F, 13 }, { 0,-13 }, { 0, -9 }, { 0x3E, 9 }, { 0x3D, 9 }, + { 0x3B, 9 }, { 0x37, 9 }, { 0x2F, 9 }, { 0x1F, 9 }, { 0x3F, 6 }, + { 0x01, 4 }, { 0x02, 4 }, { 0x04, 4 }, { 0x08, 4 }, { 0x10, 4 }, + { 0x20, 4 }, { 0x00, 1 }, }; /* 4MV Block pattern VLC tables */ @@ -694,261 +701,218 @@ const uint8_t ff_wmv3_dc_scale_table[32] = { /* P-Picture CBPCY VLC tables */ // Looks like original tables are not conforming to standard at all. Are they used for old WMV? -const uint16_t ff_vc1_cbpcy_p_codes[4][64] = { - { - 0, 6, 15, 13, 13, 11, 3, 13, 5, 8, 49, 10, 12, 114, 102, 119, - 1, 54, 96, 8, 10, 111, 5, 15, 12, 10, 2, 12, 13, 115, 53, 63, - 1, 7, 1, 7, 14, 12, 4, 14, 1, 9, 97, 11, 7, 58, 52, 62, - 4, 103, 1, 9, 11, 56, 101, 118, 4, 110, 100, 30, 2, 5, 4, 3 - }, - { - 0, 9, 1, 18, 5, 14, 237, 26, 3, 121, 3, 22, 13, 16, 6, 30, - 2, 10, 1, 20, 12, 241, 5, 28, 16, 12, 3, 24, 28, 124, 239, 247, - 1, 240, 1, 19, 18, 15, 4, 27, 1, 122, 2, 23, 1, 17, 7, 31, - 1, 11, 2, 21, 19, 246, 238, 29, 17, 13, 236, 25, 58, 63, 8, 125 - }, - { - 0, 201, 25, 231, 5, 221, 1, 3, 2, 414, 2, 241, 16, 225, 195, 492, - 2, 412, 1, 240, 7, 224, 98, 245, 1, 220, 96, 5, 9, 230, 101, 247, - 1, 102, 1, 415, 24, 3, 2, 244, 3, 54, 3, 484, 17, 114, 200, 493, - 3, 413, 1, 4, 13, 113, 99, 485, 4, 111, 194, 243, 5, 29, 26, 31 - }, - { - 0, 28, 12, 44, 3, 36, 20, 52, 2, 32, 16, 48, 8, 40, 24, 28, - 1, 30, 14, 46, 6, 38, 22, 54, 3, 34, 18, 50, 10, 42, 26, 30, - 1, 29, 13, 45, 5, 37, 21, 53, 2, 33, 17, 49, 9, 41, 25, 29, - 1, 31, 15, 47, 7, 39, 23, 55, 4, 35, 19, 51, 11, 43, 27, 31 - } -}; - -const uint8_t ff_vc1_cbpcy_p_bits[4][64] = { - { - 13, 13, 7, 13, 7, 13, 13, 12, 6, 13, 7, 12, 6, 8, 8, 8, - 5, 7, 8, 12, 6, 8, 13, 12, 7, 13, 13, 12, 6, 8, 7, 7, - 6, 13, 8, 12, 7, 13, 13, 12, 7, 13, 8, 12, 5, 7, 7, 7, - 6, 8, 13, 12, 6, 7, 8, 8, 5, 8, 8, 6, 3, 3, 3, 2 - }, - { - 14, 13, 8, 13, 3, 13, 8, 13, 3, 7, 8, 13, 4, 13, 13, 13, - 3, 13, 13, 13, 4, 8, 13, 13, 5, 13, 13, 13, 5, 7, 8, 8, - 3, 8, 14, 13, 5, 13, 13, 13, 4, 7, 13, 13, 6, 13, 13, 13, - 5, 13, 8, 13, 5, 8, 8, 13, 5, 13, 8, 13, 6, 6, 13, 7 - }, - { - 13, 8, 6, 8, 4, 8, 13, 12, 4, 9, 8, 8, 5, 8, 8, 9, - 5, 9, 10, 8, 4, 8, 7, 8, 6, 8, 7, 13, 4, 8, 7, 8, - 5, 7, 8, 9, 6, 13, 13, 8, 4, 6, 8, 9, 5, 7, 8, 9, - 5, 9, 9, 13, 5, 7, 7, 9, 4, 7, 8, 8, 3, 5, 5, 5 - }, - { - 9, 9, 9, 9, 2, 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 8, - 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, - 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8 - } +const uint8_t ff_vc1_cbpcy_p_tabs[4][64][2] = { + { + { 0x00, 13 }, { 0x32, 13 }, { 0x1A, 13 }, { 0x06, 13 }, { 0x26, 13 }, + { 0x16, 13 }, { 0x01, 13 }, { 0x21, 13 }, { 0x09, 13 }, { 0x29, 13 }, + { 0x19, 13 }, { 0x05, 13 }, { 0x25, 13 }, { 0x03, 13 }, { 0x23, 12 }, + { 0x13, 12 }, { 0x33, 12 }, { 0x0B, 12 }, { 0x2B, 12 }, { 0x1B, 12 }, + { 0x07, 12 }, { 0x27, 12 }, { 0x17, 12 }, { 0x22, 8 }, { 0x28, 7 }, + { 0x20, 6 }, { 0x10, 5 }, { 0x30, 6 }, { 0x08, 6 }, { 0x18, 7 }, + { 0x04, 7 }, { 0x24, 7 }, { 0x02, 7 }, { 0x38, 5 }, { 0x14, 6 }, + { 0x34, 6 }, { 0x0C, 6 }, { 0x1C, 6 }, { 0x2C, 5 }, { 0x3C, 3 }, + { 0x12, 8 }, { 0x2A, 8 }, { 0x0A, 7 }, { 0x3A, 8 }, { 0x36, 8 }, + { 0x0E, 8 }, { 0x31, 8 }, { 0x2E, 7 }, { 0x1E, 7 }, { 0x11, 7 }, + { 0x39, 8 }, { 0x15, 8 }, { 0x35, 7 }, { 0x0D, 8 }, { 0x1D, 8 }, + { 0x2D, 7 }, { 0x37, 8 }, { 0x0F, 8 }, { 0x3B, 6 }, { 0x2F, 7 }, + { 0x1F, 7 }, { 0x3E, 3 }, { 0x3D, 3 }, { 0x3F, 2 }, + }, + { + { 0x00, 14 }, { 0x22, 14 }, { 0x12, 13 }, { 0x2A, 13 }, { 0x1A, 13 }, + { 0x26, 13 }, { 0x16, 13 }, { 0x0E, 13 }, { 0x2E, 13 }, { 0x3E, 13 }, + { 0x01, 13 }, { 0x11, 13 }, { 0x31, 13 }, { 0x19, 13 }, { 0x39, 13 }, + { 0x05, 13 }, { 0x25, 13 }, { 0x0D, 13 }, { 0x2D, 13 }, { 0x03, 13 }, + { 0x23, 13 }, { 0x13, 13 }, { 0x33, 13 }, { 0x0B, 13 }, { 0x2B, 13 }, + { 0x1B, 13 }, { 0x3B, 13 }, { 0x07, 13 }, { 0x27, 13 }, { 0x17, 13 }, + { 0x37, 13 }, { 0x0F, 13 }, { 0x2F, 13 }, { 0x02, 8 }, { 0x32, 8 }, + { 0x0A, 8 }, { 0x2C, 6 }, { 0x30, 5 }, { 0x28, 4 }, { 0x20, 3 }, + { 0x10, 3 }, { 0x08, 3 }, { 0x18, 5 }, { 0x38, 5 }, { 0x24, 5 }, + { 0x34, 5 }, { 0x04, 3 }, { 0x14, 4 }, { 0x0C, 4 }, { 0x1C, 5 }, + { 0x3C, 6 }, { 0x3A, 8 }, { 0x06, 8 }, { 0x36, 8 }, { 0x1E, 8 }, + { 0x21, 8 }, { 0x15, 8 }, { 0x09, 7 }, { 0x29, 7 }, { 0x35, 8 }, + { 0x1F, 8 }, { 0x1D, 7 }, { 0x3F, 7 }, { 0x3D, 6 }, + }, + { + { 0x00, 13 }, { 0x06, 13 }, { 0x26, 13 }, { 0x25, 13 }, { 0x33, 13 }, + { 0x1B, 13 }, { 0x07, 12 }, { 0x12, 10 }, { 0x32, 9 }, { 0x22, 8 }, + { 0x0A, 8 }, { 0x2A, 8 }, { 0x18, 6 }, { 0x20, 5 }, { 0x10, 5 }, + { 0x30, 5 }, { 0x08, 4 }, { 0x28, 4 }, { 0x38, 4 }, { 0x04, 4 }, + { 0x24, 6 }, { 0x02, 6 }, { 0x34, 5 }, { 0x14, 4 }, { 0x0C, 5 }, + { 0x2C, 5 }, { 0x1C, 4 }, { 0x3C, 3 }, { 0x1A, 7 }, { 0x3A, 8 }, + { 0x0E, 8 }, { 0x16, 7 }, { 0x36, 7 }, { 0x2E, 8 }, { 0x01, 8 }, + { 0x1E, 7 }, { 0x21, 7 }, { 0x11, 9 }, { 0x31, 9 }, { 0x09, 9 }, + { 0x23, 9 }, { 0x3E, 5 }, { 0x29, 6 }, { 0x19, 8 }, { 0x05, 8 }, + { 0x39, 7 }, { 0x15, 8 }, { 0x0D, 8 }, { 0x35, 7 }, { 0x2D, 7 }, + { 0x1D, 8 }, { 0x03, 8 }, { 0x3D, 5 }, { 0x13, 8 }, { 0x0B, 8 }, + { 0x2B, 9 }, { 0x37, 9 }, { 0x3B, 8 }, { 0x27, 8 }, { 0x17, 8 }, + { 0x0F, 9 }, { 0x2F, 9 }, { 0x1F, 8 }, { 0x3F, 5 }, + }, + { + { 0x00, 9 }, { 0x30, 9 }, { 0x28, 9 }, { 0x18, 9 }, { 0x38, 9 }, + { 0x24, 9 }, { 0x14, 9 }, { 0x34, 9 }, { 0x0C, 9 }, { 0x2C, 9 }, + { 0x1C, 9 }, { 0x3C, 9 }, { 0x02, 9 }, { 0x22, 9 }, { 0x12, 9 }, + { 0x32, 9 }, { 0x0A, 9 }, { 0x2A, 9 }, { 0x1A, 9 }, { 0x3A, 9 }, + { 0x06, 9 }, { 0x26, 9 }, { 0x16, 9 }, { 0x36, 9 }, { 0x0E, 9 }, + { 0x2E, 9 }, { 0x1E, 9 }, { 0x3E, 9 }, { 0x01, 9 }, { 0x21, 9 }, + { 0x11, 9 }, { 0x31, 9 }, { 0x09, 9 }, { 0x29, 9 }, { 0x19, 9 }, + { 0x39, 9 }, { 0x05, 9 }, { 0x25, 9 }, { 0x15, 9 }, { 0x35, 9 }, + { 0x0D, 9 }, { 0x2D, 9 }, { 0x1D, 9 }, { 0x3D, 9 }, { 0x03, 9 }, + { 0x23, 9 }, { 0x13, 9 }, { 0x33, 9 }, { 0x0B, 9 }, { 0x2B, 9 }, + { 0x1B, 9 }, { 0x3B, 9 }, { 0x07, 9 }, { 0x27, 9 }, { 0x17, 9 }, + { 0x37, 9 }, { 0x0F, 8 }, { 0x2F, 8 }, { 0x1F, 8 }, { 0x3F, 8 }, + { 0x10, 3 }, { 0x20, 2 }, { 0x08, 2 }, { 0x04, 2 }, + }, }; /* Interlaced CBPCY VLC tables (Table 124 - Table 131) */ -const uint16_t ff_vc1_icbpcy_p_codes[8][63] = { - { - 0x2F1A, 0x2F1B, 0x178C, 0x0090, 0x02A8, 0x02A9, 0x0BC7, 0x0091, - 0x02AA, 0x02AB, 0x05E0, 0x004A, 0x0096, 0x0097, 0x00BD, 0x0092, - 0x02AC, 0x02AD, 0x05E1, 0x0098, 0x0132, 0x0133, 0x0179, 0x0134, - 0x026A, 0x026B, 0x02FC, 0x004E, 0x0040, 0x0041, 0x002B, 0x0093, - 0x02AE, 0x02AF, 0x05E2, 0x0136, 0x026E, 0x026F, 0x02FD, 0x009E, - 0x013E, 0x013F, 0x017F, 0x0050, 0x0042, 0x0043, 0x002C, 0x0051, - 0x00A4, 0x00A5, 0x00BE, 0x0053, 0x0044, 0x0045, 0x002D, 0x0054, - 0x0046, 0x0047, 0x002E, 0x0003, 0x0000, 0x0001, 0x0001 - }, - { - 0x0041, 0x0042, 0x0100, 0x0043, 0x0088, 0x0089, 0x0101, 0x0045, - 0x008C, 0x008D, 0x0102, 0x0010, 0x0022, 0x0023, 0x0024, 0x0047, - 0x0010, 0x0011, 0x0103, 0x0025, 0x0058, 0x0059, 0x005A, 0x005B, - 0x005A, 0x005B, 0x005C, 0x000C, 0x0030, 0x0031, 0x0019, 0x0009, - 0x0014, 0x0015, 0x002C, 0x005C, 0x005D, 0x005E, 0x005F, 0x0026, - 0x005D, 0x005E, 0x005F, 0x000D, 0x0034, 0x0035, 0x001B, 0x0014, - 0x0027, 0x002A, 0x002B, 0x000E, 0x0038, 0x0039, 0x001D, 0x000F, - 0x003C, 0x003D, 0x001F, 0x0005, 0x0009, 0x0000, 0x0003 - }, - { - 0x0032, 0x0033, 0x001A, 0x0026, 0x00E4, 0x00E5, 0x01E6, 0x0027, - 0x00E6, 0x00E7, 0x01E7, 0x000E, 0x0063, 0x006C, 0x0077, 0x0028, - 0x00E8, 0x00E9, 0x01E8, 0x007B, 0x00DA, 0x00DB, 0x00EC, 0x00F5, - 0x01B8, 0x01B9, 0x01DA, 0x0021, 0x004B, 0x0054, 0x002B, 0x0029, - 0x00EA, 0x00EB, 0x01E9, 0x004A, 0x01BA, 0x01BB, 0x01DB, 0x0020, - 0x00DE, 0x00DF, 0x00F2, 0x0022, 0x0055, 0x0058, 0x002D, 0x000F, - 0x0070, 0x0071, 0x0078, 0x0023, 0x0059, 0x005C, 0x002F, 0x0024, - 0x005D, 0x0062, 0x0030, 0x0002, 0x001F, 0x0006, 0x0000 - }, - { - 0x0028, 0x0029, 0x009D, 0x0000, 0x01EA, 0x01EB, 0x01EC, 0x0001, - 0x01ED, 0x01EE, 0x01EF, 0x0005, 0x00F0, 0x00F1, 0x003B, 0x0002, - 0x01F0, 0x01F1, 0x01F2, 0x003F, 0x015C, 0x015D, 0x0099, 0x0010, - 0x03D0, 0x03D1, 0x0130, 0x000F, 0x009E, 0x009F, 0x00FB, 0x0003, - 0x01F3, 0x01F4, 0x01F5, 0x0011, 0x03D2, 0x03D3, 0x0131, 0x0009, - 0x015E, 0x015F, 0x009C, 0x0010, 0x00A8, 0x00A9, 0x0038, 0x0006, - 0x00F2, 0x00F3, 0x004D, 0x0011, 0x00AA, 0x00AB, 0x0039, 0x0012, - 0x00AC, 0x00AD, 0x003A, 0x0006, 0x0016, 0x0017, 0x000E - }, - { - 0x003C, 0x003D, 0x001F, 0x000A, 0x0061, 0x0062, 0x0002, 0x000B, - 0x0063, 0x0064, 0x0003, 0x0007, 0x0003, 0x0004, 0x000B, 0x000C, - 0x0065, 0x0066, 0x0004, 0x0012, 0x000A, 0x000B, 0x0014, 0x001B, - 0x0018, 0x0019, 0x0034, 0x002C, 0x0067, 0x0068, 0x0035, 0x000D, - 0x0069, 0x006C, 0x0005, 0x0060, 0x001A, 0x001B, 0x0035, 0x0013, - 0x000E, 0x000F, 0x0015, 0x002D, 0x006D, 0x006E, 0x0038, 0x0008, - 0x0008, 0x0009, 0x000C, 0x002E, 0x006F, 0x0072, 0x003A, 0x002F, - 0x0073, 0x0000, 0x003B, 0x0007, 0x0014, 0x0015, 0x0004 - }, - { - 0x0038, 0x0039, 0x009D, 0x000A, 0x0091, 0x0092, 0x0093, 0x000B, - 0x0094, 0x0095, 0x0096, 0x0003, 0x00EE, 0x00EF, 0x0036, 0x000C, - 0x0097, 0x0098, 0x0099, 0x0008, 0x01E4, 0x01E5, 0x006A, 0x0018, - 0x03CC, 0x03CD, 0x00D6, 0x000E, 0x009E, 0x009F, 0x00F5, 0x000D, - 0x009A, 0x009B, 0x009C, 0x0019, 0x03CE, 0x03CF, 0x00D7, 0x0009, - 0x01E8, 0x01E9, 0x0090, 0x000F, 0x00E8, 0x00E9, 0x00F6, 0x0005, - 0x00F0, 0x00F1, 0x0037, 0x0010, 0x00EA, 0x00EB, 0x00F7, 0x0011, - 0x00EC, 0x00ED, 0x0034, 0x0000, 0x003E, 0x003F, 0x0002 - }, - { - 0x003C, 0x003D, 0x01CF, 0x0000, 0x00BF, 0x00E0, 0x01FC, 0x0001, - 0x00E1, 0x00E2, 0x01FD, 0x0009, 0x01F1, 0x01F2, 0x01F3, 0x0002, - 0x00E3, 0x00E4, 0x01FE, 0x0011, 0x03EE, 0x03EF, 0x03F0, 0x0021, - 0x07E2, 0x07E3, 0x07E4, 0x0018, 0x03F7, 0x03FE, 0x03FF, 0x0003, - 0x00E5, 0x00E6, 0x0080, 0x002E, 0x07E5, 0x07E6, 0x07E7, 0x0016, - 0x03F4, 0x03F5, 0x03F6, 0x0019, 0x0102, 0x0103, 0x0104, 0x000A, - 0x01F4, 0x01F5, 0x01F6, 0x001A, 0x0105, 0x0106, 0x0107, 0x001B, - 0x0178, 0x0179, 0x01CE, 0x001D, 0x00BD, 0x00BE, 0x01F0 - }, - { - 0x0003, 0x0004, 0x01B6, 0x0004, 0x002E, 0x002F, 0x000E, 0x0005, - 0x0030, 0x0031, 0x000F, 0x0003, 0x000A, 0x000B, 0x0014, 0x0006, - 0x0032, 0x0033, 0x0010, 0x0005, 0x0030, 0x0031, 0x0032, 0x0009, - 0x0066, 0x0067, 0x0068, 0x001D, 0x01B7, 0x01B8, 0x01B9, 0x0007, - 0x0034, 0x0035, 0x0011, 0x0016, 0x0069, 0x006A, 0x006B, 0x000A, - 0x0036, 0x0037, 0x00D8, 0x001E, 0x01BA, 0x01BB, 0x01BC, 0x0004, - 0x0015, 0x0016, 0x0017, 0x001F, 0x01BD, 0x01BE, 0x01BF, 0x0000, - 0x0010, 0x0011, 0x0012, 0x001C, 0x00D9, 0x00DA, 0x0013 - } -}; - -const uint8_t ff_vc1_icbpcy_p_bits[8][63] = { - { - 15, 15, 14, 9, 11, 11, 13, 9, 11, 11, 12, 8, 9, 9, 9, 9, - 11, 11, 12, 9, 10, 10, 10, 10, 11, 11, 11, 8, 8, 8, 7, 9, - 11, 11, 12, 10, 11, 11, 11, 9, 10, 10, 10, 8, 8, 8, 7, 8, - 9, 9, 9, 8, 8, 8, 7, 8, 8, 8, 7, 3, 3, 3, 1 - }, - { - 7, 7, 9, 7, 8, 8, 9, 7, 8, 8, 9, 6, 7, 7, 7, 7, - 7, 7, 9, 7, 8, 8, 8, 8, 9, 9, 9, 6, 7, 7, 6, 6, - 7, 7, 8, 8, 9, 9, 9, 7, 8, 8, 8, 6, 7, 7, 6, 6, - 7, 7, 7, 6, 7, 7, 6, 6, 7, 7, 6, 3, 4, 3, 2 - }, - { - 6, 6, 5, 6, 8, 8, 9, 6, 8, 8, 9, 5, 7, 7, 7, 6, - 8, 8, 9, 7, 8, 8, 8, 8, 9, 9, 9, 6, 7, 7, 6, 6, - 8, 8, 9, 7, 9, 9, 9, 6, 8, 8, 8, 6, 7, 7, 6, 5, - 7, 7, 7, 6, 7, 7, 6, 6, 7, 7, 6, 3, 5, 4, 2 - }, - { - 6, 6, 8, 4, 9, 9, 9, 4, 9, 9, 9, 4, 8, 8, 7, 4, - 9, 9, 9, 6, 9, 9, 8, 6, 10, 10, 9, 5, 8, 8, 8, 4, - 9, 9, 9, 6, 10, 10, 9, 5, 9, 9, 8, 5, 8, 8, 7, 4, - 8, 8, 7, 5, 8, 8, 7, 5, 8, 8, 7, 3, 5, 5, 4 - }, - { - 6, 6, 5, 5, 7, 7, 7, 5, 7, 7, 7, 5, 6, 6, 6, 5, - 7, 7, 7, 6, 7, 7, 7, 7, 8, 8, 8, 6, 7, 7, 6, 5, - 7, 7, 7, 7, 8, 8, 8, 6, 7, 7, 7, 6, 7, 7, 6, 5, - 6, 6, 6, 6, 7, 7, 6, 6, 7, 6, 6, 4, 5, 5, 3 - }, - { - 6, 6, 8, 4, 8, 8, 8, 4, 8, 8, 8, 4, 8, 8, 7, 4, - 8, 8, 8, 5, 9, 9, 8, 6, 10, 10, 9, 5, 8, 8, 8, 4, - 8, 8, 8, 6, 10, 10, 9, 5, 9, 9, 8, 5, 8, 8, 8, 4, - 8, 8, 7, 5, 8, 8, 8, 5, 8, 8, 7, 3, 6, 6, 4 - }, - { - 6, 6, 9, 3, 8, 8, 9, 3, 8, 8, 9, 4, 9, 9, 9, 3, - 8, 8, 9, 5, 10, 10, 10, 6, 11, 11, 11, 5, 10, 10, 10, 3, - 8, 8, 8, 6, 11, 11, 11, 5, 10, 10, 10, 5, 9, 9, 9, 4, - 9, 9, 9, 5, 9, 9, 9, 5, 9, 9, 9, 5, 8, 8, 9 - }, - { - 6, 6, 10, 3, 7, 7, 7, 3, 7, 7, 7, 4, 8, 8, 8, 3, - 7, 7, 7, 5, 9, 9, 9, 6, 10, 10, 10, 6, 10, 10, 10, 3, - 7, 7, 7, 6, 10, 10, 10, 5, 9, 9, 9, 6, 10, 10, 10, 4, - 8, 8, 8, 6, 10, 10, 10, 5, 9, 9, 9, 6, 9, 9, 9 - } -}; - -/* MacroBlock Transform Type: 7.1.3.11, p89 - * 8x8:B - * 8x4:B:btm 8x4:B:top 8x4:B:both, - * 4x8:B:right 4x8:B:left 4x8:B:both - * 4x4:B 8x8:MB - * 8x4:MB:btm 8x4:MB:top 8x4,MB,both - * 4x8,MB,right 4x8,MB,left - * 4x4,MB */ -const uint16_t ff_vc1_ttmb_codes[3][16] = { - { - 0x0003, - 0x002E, 0x005F, 0x0000, - 0x0016, 0x0015, 0x0001, - 0x0004, 0x0014, - 0x02F1, 0x0179, 0x017B, - 0x0BC0, 0x0BC1, 0x05E1, - 0x017A - }, - { - 0x0006, - 0x0006, 0x0003, 0x0007, - 0x000F, 0x000E, 0x0000, - 0x0002, 0x0002, - 0x0014, 0x0011, 0x000B, - 0x0009, 0x0021, 0x0015, - 0x0020 - }, - { - 0x0006, - 0x0000, 0x000E, 0x0005, - 0x0002, 0x0003, 0x0003, - 0x000F, 0x0002, - 0x0081, 0x0021, 0x0009, - 0x0101, 0x0041, 0x0011, - 0x0100 - } +const uint8_t ff_vc1_icbpcy_p_tabs[8][63][2] = { + { + { 0x3C, 3 }, { 0x3D, 3 }, { 0x1C, 8 }, { 0x1D, 8 }, { 0x2C, 8 }, + { 0x2D, 8 }, { 0x34, 8 }, { 0x35, 8 }, { 0x38, 8 }, { 0x39, 8 }, + { 0x03, 9 }, { 0x07, 9 }, { 0x0F, 9 }, { 0x1F, 9 }, { 0x0B, 8 }, + { 0x0C, 9 }, { 0x0D, 9 }, { 0x13, 9 }, { 0x14, 10 }, { 0x15, 10 }, + { 0x17, 10 }, { 0x18, 11 }, { 0x19, 11 }, { 0x23, 10 }, { 0x24, 11 }, + { 0x25, 11 }, { 0x1B, 8 }, { 0x27, 9 }, { 0x28, 10 }, { 0x29, 10 }, + { 0x2B, 8 }, { 0x2F, 8 }, { 0x30, 9 }, { 0x31, 9 }, { 0x33, 8 }, + { 0x37, 8 }, { 0x04, 11 }, { 0x05, 11 }, { 0x08, 11 }, { 0x09, 11 }, + { 0x10, 11 }, { 0x11, 11 }, { 0x20, 11 }, { 0x21, 11 }, { 0x1E, 7 }, + { 0x2E, 7 }, { 0x36, 7 }, { 0x3A, 7 }, { 0x0A, 12 }, { 0x12, 12 }, + { 0x22, 12 }, { 0x02, 14 }, { 0x00, 15 }, { 0x01, 15 }, { 0x06, 13 }, + { 0x16, 10 }, { 0x0E, 9 }, { 0x32, 9 }, { 0x1A, 11 }, { 0x26, 11 }, + { 0x2A, 10 }, { 0x3B, 3 }, { 0x3E, 1 }, + }, + { + { 0x3D, 3 }, { 0x10, 7 }, { 0x11, 7 }, { 0x1F, 6 }, { 0x20, 7 }, + { 0x21, 7 }, { 0x22, 8 }, { 0x18, 9 }, { 0x19, 9 }, { 0x1A, 9 }, + { 0x24, 9 }, { 0x25, 9 }, { 0x26, 9 }, { 0x1B, 6 }, { 0x2B, 6 }, + { 0x33, 6 }, { 0x37, 6 }, { 0x0B, 6 }, { 0x0C, 7 }, { 0x0D, 7 }, + { 0x0E, 7 }, { 0x13, 7 }, { 0x27, 7 }, { 0x30, 7 }, { 0x2F, 6 }, + { 0x31, 7 }, { 0x32, 7 }, { 0x14, 8 }, { 0x15, 8 }, { 0x16, 8 }, + { 0x17, 8 }, { 0x23, 8 }, { 0x28, 8 }, { 0x29, 8 }, { 0x2A, 8 }, + { 0x1C, 7 }, { 0x1D, 7 }, { 0x1E, 6 }, { 0x2C, 7 }, { 0x2D, 7 }, + { 0x2E, 6 }, { 0x34, 7 }, { 0x35, 7 }, { 0x36, 6 }, { 0x38, 7 }, + { 0x39, 7 }, { 0x3A, 6 }, { 0x02, 9 }, { 0x06, 9 }, { 0x0A, 9 }, + { 0x12, 9 }, { 0x00, 7 }, { 0x01, 7 }, { 0x03, 7 }, { 0x04, 8 }, + { 0x05, 8 }, { 0x07, 7 }, { 0x08, 8 }, { 0x09, 8 }, { 0x0F, 7 }, + { 0x3C, 4 }, { 0x3B, 3 }, { 0x3E, 2 }, + }, + { + { 0x3E, 2 }, { 0x3B, 3 }, { 0x3D, 4 }, { 0x0B, 5 }, { 0x2F, 5 }, + { 0x27, 6 }, { 0x1B, 6 }, { 0x2B, 6 }, { 0x33, 6 }, { 0x37, 6 }, + { 0x23, 7 }, { 0x1C, 7 }, { 0x03, 6 }, { 0x07, 6 }, { 0x0F, 6 }, + { 0x1F, 6 }, { 0x1D, 7 }, { 0x2C, 7 }, { 0x1E, 6 }, { 0x2D, 7 }, + { 0x34, 7 }, { 0x2E, 6 }, { 0x35, 7 }, { 0x38, 7 }, { 0x36, 6 }, + { 0x3A, 6 }, { 0x39, 7 }, { 0x0C, 7 }, { 0x00, 6 }, { 0x01, 6 }, + { 0x02, 5 }, { 0x0D, 7 }, { 0x14, 8 }, { 0x15, 8 }, { 0x18, 9 }, + { 0x19, 9 }, { 0x24, 9 }, { 0x25, 9 }, { 0x28, 8 }, { 0x29, 8 }, + { 0x30, 7 }, { 0x31, 7 }, { 0x04, 8 }, { 0x05, 8 }, { 0x08, 8 }, + { 0x09, 8 }, { 0x10, 8 }, { 0x11, 8 }, { 0x20, 8 }, { 0x21, 8 }, + { 0x16, 8 }, { 0x1A, 9 }, { 0x26, 9 }, { 0x0E, 7 }, { 0x32, 7 }, + { 0x2A, 8 }, { 0x06, 9 }, { 0x0A, 9 }, { 0x12, 9 }, { 0x22, 9 }, + { 0x17, 8 }, { 0x13, 7 }, { 0x3C, 5 }, + }, + { + { 0x03, 4 }, { 0x07, 4 }, { 0x0F, 4 }, { 0x1F, 4 }, { 0x17, 6 }, + { 0x23, 6 }, { 0x27, 5 }, { 0x0B, 4 }, { 0x2F, 4 }, { 0x2E, 7 }, + { 0x36, 7 }, { 0x3A, 7 }, { 0x0E, 7 }, { 0x1B, 5 }, { 0x2B, 5 }, + { 0x33, 5 }, { 0x37, 5 }, { 0x1A, 9 }, { 0x26, 9 }, { 0x16, 8 }, + { 0x32, 7 }, { 0x2A, 8 }, { 0x02, 8 }, { 0x1C, 8 }, { 0x1D, 8 }, + { 0x00, 6 }, { 0x01, 6 }, { 0x2C, 8 }, { 0x2D, 8 }, { 0x34, 8 }, + { 0x35, 8 }, { 0x38, 8 }, { 0x39, 8 }, { 0x14, 9 }, { 0x15, 9 }, + { 0x28, 9 }, { 0x29, 9 }, { 0x3C, 5 }, { 0x3D, 5 }, { 0x3B, 3 }, + { 0x3E, 4 }, { 0x0C, 8 }, { 0x0D, 8 }, { 0x30, 8 }, { 0x31, 8 }, + { 0x18, 10 }, { 0x19, 10 }, { 0x24, 10 }, { 0x25, 10 }, { 0x04, 9 }, + { 0x05, 9 }, { 0x06, 9 }, { 0x08, 9 }, { 0x09, 9 }, { 0x0A, 9 }, + { 0x10, 9 }, { 0x11, 9 }, { 0x12, 9 }, { 0x20, 9 }, { 0x21, 9 }, + { 0x22, 9 }, { 0x1E, 8 }, { 0x13, 6 }, + }, + { + { 0x39, 6 }, { 0x06, 7 }, { 0x0A, 7 }, { 0x12, 7 }, { 0x22, 7 }, + { 0x0C, 6 }, { 0x0D, 6 }, { 0x14, 7 }, { 0x15, 7 }, { 0x18, 8 }, + { 0x19, 8 }, { 0x24, 8 }, { 0x25, 8 }, { 0x28, 7 }, { 0x29, 7 }, + { 0x30, 6 }, { 0x31, 6 }, { 0x16, 7 }, { 0x2A, 7 }, { 0x0E, 6 }, + { 0x32, 6 }, { 0x1A, 8 }, { 0x26, 8 }, { 0x17, 7 }, { 0x0B, 5 }, + { 0x2F, 5 }, { 0x13, 6 }, { 0x27, 6 }, { 0x03, 5 }, { 0x07, 5 }, + { 0x0F, 5 }, { 0x1F, 5 }, { 0x3B, 4 }, { 0x3E, 3 }, { 0x3C, 5 }, + { 0x3D, 5 }, { 0x1B, 6 }, { 0x2B, 6 }, { 0x33, 6 }, { 0x37, 6 }, + { 0x23, 7 }, { 0x04, 7 }, { 0x05, 7 }, { 0x08, 7 }, { 0x09, 7 }, + { 0x10, 7 }, { 0x11, 7 }, { 0x1C, 7 }, { 0x1D, 7 }, { 0x20, 7 }, + { 0x1E, 6 }, { 0x21, 7 }, { 0x2C, 7 }, { 0x2D, 7 }, { 0x34, 7 }, + { 0x2E, 6 }, { 0x35, 7 }, { 0x38, 7 }, { 0x36, 6 }, { 0x3A, 6 }, + { 0x00, 6 }, { 0x01, 6 }, { 0x02, 5 }, + }, + { + { 0x3B, 3 }, { 0x3E, 4 }, { 0x0B, 4 }, { 0x13, 5 }, { 0x27, 5 }, + { 0x2F, 4 }, { 0x17, 6 }, { 0x23, 6 }, { 0x3A, 7 }, { 0x16, 8 }, + { 0x1A, 9 }, { 0x26, 9 }, { 0x0E, 7 }, { 0x32, 7 }, { 0x1B, 5 }, + { 0x2B, 5 }, { 0x33, 5 }, { 0x37, 5 }, { 0x2A, 8 }, { 0x04, 8 }, + { 0x05, 8 }, { 0x06, 8 }, { 0x08, 8 }, { 0x09, 8 }, { 0x0A, 8 }, + { 0x10, 8 }, { 0x11, 8 }, { 0x12, 8 }, { 0x20, 8 }, { 0x21, 8 }, + { 0x22, 8 }, { 0x02, 8 }, { 0x1C, 8 }, { 0x1D, 8 }, { 0x03, 4 }, + { 0x07, 4 }, { 0x0F, 4 }, { 0x1F, 4 }, { 0x00, 6 }, { 0x01, 6 }, + { 0x2C, 8 }, { 0x2D, 8 }, { 0x34, 8 }, { 0x35, 8 }, { 0x38, 8 }, + { 0x39, 8 }, { 0x0C, 8 }, { 0x0D, 8 }, { 0x30, 8 }, { 0x31, 8 }, + { 0x14, 9 }, { 0x15, 9 }, { 0x18, 10 }, { 0x19, 10 }, { 0x24, 10 }, + { 0x25, 10 }, { 0x28, 9 }, { 0x29, 9 }, { 0x1E, 8 }, { 0x2E, 8 }, + { 0x36, 8 }, { 0x3C, 6 }, { 0x3D, 6 }, + }, + { + { 0x03, 3 }, { 0x07, 3 }, { 0x0F, 3 }, { 0x1F, 3 }, { 0x22, 8 }, + { 0x2C, 9 }, { 0x2D, 9 }, { 0x2E, 9 }, { 0x34, 9 }, { 0x35, 9 }, + { 0x36, 9 }, { 0x17, 6 }, { 0x13, 5 }, { 0x0B, 4 }, { 0x2F, 4 }, + { 0x27, 5 }, { 0x23, 6 }, { 0x38, 9 }, { 0x39, 9 }, { 0x3C, 8 }, + { 0x3D, 8 }, { 0x04, 8 }, { 0x1B, 5 }, { 0x2B, 5 }, { 0x33, 5 }, + { 0x37, 5 }, { 0x05, 8 }, { 0x08, 8 }, { 0x09, 8 }, { 0x10, 8 }, + { 0x11, 8 }, { 0x20, 8 }, { 0x21, 8 }, { 0x3A, 9 }, { 0x02, 9 }, + { 0x3B, 5 }, { 0x00, 6 }, { 0x01, 6 }, { 0x3E, 9 }, { 0x0C, 9 }, + { 0x0D, 9 }, { 0x0E, 9 }, { 0x30, 9 }, { 0x31, 9 }, { 0x32, 9 }, + { 0x14, 10 }, { 0x15, 10 }, { 0x16, 10 }, { 0x18, 11 }, { 0x19, 11 }, + { 0x1A, 11 }, { 0x24, 11 }, { 0x25, 11 }, { 0x26, 11 }, { 0x28, 10 }, + { 0x29, 10 }, { 0x2A, 10 }, { 0x1C, 10 }, { 0x06, 9 }, { 0x0A, 9 }, + { 0x12, 9 }, { 0x1D, 10 }, { 0x1E, 10 }, + }, + { + { 0x37, 5 }, { 0x38, 9 }, { 0x39, 9 }, { 0x3A, 9 }, { 0x3E, 9 }, + { 0x0C, 8 }, { 0x0D, 8 }, { 0x00, 6 }, { 0x01, 6 }, { 0x0E, 8 }, + { 0x30, 8 }, { 0x31, 8 }, { 0x32, 8 }, { 0x14, 9 }, { 0x15, 9 }, + { 0x16, 9 }, { 0x18, 10 }, { 0x19, 10 }, { 0x1A, 10 }, { 0x24, 10 }, + { 0x25, 10 }, { 0x26, 10 }, { 0x28, 9 }, { 0x29, 9 }, { 0x06, 7 }, + { 0x0A, 7 }, { 0x12, 7 }, { 0x22, 7 }, { 0x17, 6 }, { 0x13, 5 }, + { 0x0B, 4 }, { 0x2F, 4 }, { 0x27, 5 }, { 0x23, 6 }, { 0x04, 7 }, + { 0x05, 7 }, { 0x08, 7 }, { 0x09, 7 }, { 0x10, 7 }, { 0x11, 7 }, + { 0x20, 7 }, { 0x21, 7 }, { 0x2A, 9 }, { 0x3C, 9 }, { 0x3D, 9 }, + { 0x02, 10 }, { 0x1C, 10 }, { 0x1D, 10 }, { 0x1E, 10 }, { 0x2C, 10 }, + { 0x2D, 10 }, { 0x2E, 10 }, { 0x34, 10 }, { 0x35, 10 }, { 0x36, 10 }, + { 0x3B, 6 }, { 0x1B, 6 }, { 0x2B, 6 }, { 0x33, 6 }, { 0x03, 3 }, + { 0x07, 3 }, { 0x0F, 3 }, { 0x1F, 3 }, + }, }; -const uint8_t ff_vc1_ttmb_bits[3][16] = { - { - 2, - 6, 7, 2, - 5, 5, 2, - 3, 5, - 10, 9, 9, - 12, 12, 11, - 9 - }, - { - 3, - 4, 4, 4, - 4, 4, 3, - 3, 2, - 7, 7, 6, - 6, 8, 7, - 8 - }, - { - 3, - 3, 4, 5, - 3, 3, 4, - 4, 2, - 10, 8, 6, - 11, 9, 7, - 11 - } +/* MacroBlock Transform Type: 7.1.3.10, tables 54-56 + * The "| 8" in the following table means that the transform type + * is valid for the whole macroblock. */ +const uint8_t ff_vc1_ttmb_tabs[3][16][2] = { + { + { TT_8X4, 2 }, { TT_4X8, 2 }, { TT_4X4, 3 }, { TT_8X8 | 8, 5 }, + { TT_4X8_LEFT, 5 }, { TT_4X8_RIGHT, 5 }, { TT_8X4_BOTTOM, 6 }, + { TT_4X8_RIGHT | 8, 12 }, { TT_4X8_LEFT | 8, 12 }, { TT_4X8 | 8, 11 }, + { TT_8X4_BOTTOM | 8, 10 }, { TT_8X4_TOP | 8, 9 }, { TT_4X4 | 8, 9 }, + { TT_8X4 | 8, 9 }, { TT_8X4_TOP, 7 }, { TT_8X8, 2 }, + }, + { + { TT_4X8, 3 }, { TT_4X4 | 8, 8 }, { TT_4X8_LEFT | 8, 8 }, + { TT_8X4_TOP | 8, 7 }, { TT_4X8_RIGHT | 8, 6 }, { TT_8X4_BOTTOM | 8, 7 }, + { TT_4X8 | 8, 7 }, { TT_8X4 | 8, 6 }, { TT_8X4_TOP, 4 }, { TT_4X4, 3 }, + { TT_8X4_BOTTOM, 4 }, { TT_8X4, 4 }, { TT_8X8 | 8, 2 }, { TT_8X8, 3 }, + { TT_4X8_LEFT, 4 }, { TT_4X8_RIGHT, 4 }, + }, + { + { TT_8X4_BOTTOM, 3 }, { TT_4X4 | 8, 11 }, { TT_4X8_RIGHT | 8, 11 }, + { TT_8X4_BOTTOM | 8, 10 }, { TT_4X8_LEFT | 8, 9 }, { TT_8X4_TOP | 8, 8 }, + { TT_4X8 | 8, 7 }, { TT_8X4 | 8, 6 }, { TT_8X4, 5 }, { TT_4X8, 4 }, + { TT_4X8_RIGHT, 3 }, { TT_4X8_LEFT, 3 }, { TT_8X8 | 8, 2 }, + { TT_8X8, 3 }, { TT_8X4_TOP, 4 }, { TT_4X4, 4 }, + }, }; /* TTBLK (Transform Type per Block) tables */ const uint8_t ff_vc1_ttblk_tabs[3][8][2] = { diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h index 935ff4f44d..257ec2fd30 100644 --- a/libavcodec/vc1data.h +++ b/libavcodec/vc1data.h @@ -107,8 +107,7 @@ extern const uint8_t ff_vc1_imode_bits[7]; /* Normal-2 imode */ extern const uint8_t ff_vc1_norm2_codes[4]; extern const uint8_t ff_vc1_norm2_bits[4]; -extern const uint16_t ff_vc1_norm6_codes[64]; -extern const uint8_t ff_vc1_norm6_bits[64]; +extern const uint8_t ff_vc1_norm6_tab[77][2]; /* Normal-6 imode */ extern const uint8_t ff_vc1_norm6_spec[64][5]; @@ -123,12 +122,10 @@ extern const uint8_t ff_vc1_2mv_block_pattern_bits[4][4]; extern const uint8_t ff_wmv3_dc_scale_table[32]; /* P-Picture CBPCY VLC tables */ -extern const uint16_t ff_vc1_cbpcy_p_codes[4][64]; -extern const uint8_t ff_vc1_cbpcy_p_bits[4][64]; +extern const uint8_t ff_vc1_cbpcy_p_tabs[4][64][2]; /* Interlaced CBPCY VLC tables (Table 124 - Table 131) */ -extern const uint16_t ff_vc1_icbpcy_p_codes[8][63]; -extern const uint8_t ff_vc1_icbpcy_p_bits[8][63]; +extern const uint8_t ff_vc1_icbpcy_p_tabs[8][63][2]; /* MacroBlock Transform Type: 7.1.3.11, p89 * 8x8:B @@ -138,9 +135,7 @@ extern const uint8_t ff_vc1_icbpcy_p_bits[8][63]; * 8x4:MB:btm 8x4:MB:top 8x4,MB,both * 4x8,MB,right 4x8,MB,left * 4x4,MB */ -extern const uint16_t ff_vc1_ttmb_codes[3][16]; - -extern const uint8_t ff_vc1_ttmb_bits[3][16]; +extern const uint8_t ff_vc1_ttmb_tabs[3][16][2]; /* TTBLK (Transform Type per Block) tables */ extern const uint8_t ff_vc1_ttblk_tabs[3][8][2]; From patchwork Tue Nov 10 10:48:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23562 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 E799E44B922 for ; Tue, 10 Nov 2020 13:10:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D4B7468BF98; Tue, 10 Nov 2020 12:51:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5F56468BF32 for ; Tue, 10 Nov 2020 12:50:46 +0200 (EET) Received: by mail-wm1-f46.google.com with SMTP id a3so1218452wmb.5 for ; Tue, 10 Nov 2020 02:50:46 -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=+eK12hUwRdGaKv3z9Y08MZp0cmzK/2N9TdW5sa+ZF0s=; b=vaEktBrIF28bGKY7QpicStZwIgIK7KZU5ZLZjtz8Y1opSFfdqpJgPR4FxJggrjRSk8 fyhI0cprXZ7XhXu7H1TDvocVnfrLy7vG4TgFHIiQy/lwXFgKde9jkWFVvEpUaPwdbs0k jk9mKwpeIAj7DjUmC0BEAAuM94j+CQCtoIka79tklndxW8MLgimm9RDxyuomM0p7UYe1 vY/lzRqGR+riJWViCpAcNaYWh25BrcusSt/GSXijBQ/XzkyYOauSpqdrcfA2+f/QCgcT cJ3SIbkuLRK80GP+XL0RNg91dUGcgBl1N5zufGZPZ4zdMi0Qudq8DHaGaSbtl8D1Umtz nD8g== 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=+eK12hUwRdGaKv3z9Y08MZp0cmzK/2N9TdW5sa+ZF0s=; b=NDmyyNNkLvNW5GnUsoCyBczZcM/HgBNfQPCApOlsbXbrnTYj4fqOfwWpqTzmPyyrDV 2SiqaJ6isRcO/dy2PuNORSpKC/h7Ad2+73MpUr32ysGvLJ+tU3TcBhxuHy9lhUWCz8Yg 0vMNDFCOds1WOmpuT9We2h4eK19QE/oYW+qcUQRjjYOk+jRg2DoFsIE8JknLJq1cde4M g1SODZbM48LYIUZyWDySvSvlGWRgpz4N3zfZ5Sz7H10Acbf4jA83+kZhtWvkzQFpvTHp +Jv1x6Vh8AE3CtMowEKyx9eQZKgzLkho0eUfh8QwEYbBMVF4pJEP5nK8L6orL/Iwanr9 g7GQ== X-Gm-Message-State: AOAM5328K0QS7xIU2Qy2FrVZ5v9u0LNzhG8X4sj69LwAaFkN5aXoFAlU S0b60CWj/qCqDMMg4EJ9q0pk7xzyKMI= X-Google-Smtp-Source: ABdhPJzTN9QJfpqt3ubcYC85fBoDYXIurPDYIoRK/kZYwGVfZcud/9jUwQv94vGgCDan+wOrYiHsCg== X-Received: by 2002:a1c:df89:: with SMTP id w131mr3887094wmg.164.1605005444853; Tue, 10 Nov 2020 02:50:44 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:44 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:24 +0100 Message-Id: <20201110104851.321029-88-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 087/114] avcodec/vc1: Avoid code duplication when 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" This has been achieved by switching those VLCs that still used ff_init_vlc_sparse() to ff_init_vlc_lengths() even though the codes tables used uint8_t in these cases. But it allows to use one auxiliary function to initialize the VLCs and by using tables that interleave symbols and lengths said function only needs one parameter for the tables, not two. The only table that uses an uint16_t symbols table still has to be treated specially for this reason. The offsets table has been removed as a byproduct of these changes. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1.c | 158 +++++++++++++++--------------------------- libavcodec/vc1data.c | 159 +++++++++++++++++++++---------------------- libavcodec/vc1data.h | 21 ++---- 3 files changed, 138 insertions(+), 200 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index dedabaea6c..9db8063c12 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -1345,15 +1345,20 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) return 0; } -static const uint16_t vlc_offs[] = { - 0, 520, 552, 616, 1128, 1160, 1224, 1740, 1772, 1836, 1900, 2436, - 2986, 3050, 3610, 4154, 4218, 4746, 5326, 5390, 5902, 6554, 7658, 8342, - 9304, 9988, 10630, 11234, 12174, 13006, 13560, 14232, 14786, 15432, 16350, 17522, - 20372, 21818, 22330, 22394, 23166, 23678, 23742, 24820, 25332, 25396, 26460, 26980, - 27048, 27592, 27600, 27608, 27616, 27624, 28224, 28258, 28290, 28802, 28834, 28866, - 29378, 29412, 29444, 29960, 29994, 30026, 30538, 30572, 30604, 31120, 31154, 31186, - 31714, 31746, 31778, 32306, 32340, 32372 -}; +static VLC_TYPE vlc_buf[33080][2]; + +static av_cold void vc1_init_vlc(VLC *vlc, int nb_bits, int nb_codes, + unsigned *buf_offset, const uint8_t (*tab)[2], + int offset) +{ + vlc->table = &vlc_buf[*buf_offset]; + vlc->table_allocated = FF_ARRAY_ELEMS(vlc_buf) - *buf_offset; + + ff_init_vlc_from_lengths(vlc, nb_bits, nb_codes, + &tab[0][1], 2, &tab[0][0], 2, 1, + offset, INIT_VLC_USE_NEW_STATIC); + *buf_offset += vlc->table_size; +} /** * Init VC-1 specific tables and VC1Context members @@ -1364,129 +1369,74 @@ av_cold int ff_vc1_init_common(VC1Context *v) { static int done = 0; int i = 0; - static VLC_TYPE vlc_table[32372][2]; v->hrd_rate = v->hrd_buffer = NULL; /* VLC tables */ if (!done) { - INIT_VLC_STATIC(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23, - ff_vc1_bfraction_bits, 1, 1, - ff_vc1_bfraction_codes, 1, 1, 1 << VC1_BFRACTION_VLC_BITS); - INIT_VLC_STATIC(&ff_vc1_norm2_vlc, VC1_NORM2_VLC_BITS, 4, - ff_vc1_norm2_bits, 1, 1, - ff_vc1_norm2_codes, 1, 1, 1 << VC1_NORM2_VLC_BITS); - INIT_VLC_STATIC_FROM_LENGTHS(&ff_vc1_norm6_vlc, VC1_NORM6_VLC_BITS, 77, - &ff_vc1_norm6_tab[0][1], 2, - &ff_vc1_norm6_tab[0][0], 2, 1, 0, 0, 556); - INIT_VLC_STATIC(&ff_vc1_imode_vlc, VC1_IMODE_VLC_BITS, 7, - ff_vc1_imode_bits, 1, 1, - ff_vc1_imode_codes, 1, 1, 1 << VC1_IMODE_VLC_BITS); + unsigned offset = 0; + vc1_init_vlc(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23, + &offset, ff_vc1_bfraction_tab, 0); + vc1_init_vlc(&ff_vc1_norm2_vlc, VC1_NORM2_VLC_BITS, 4, + &offset, ff_vc1_norm2_tab, 0); + vc1_init_vlc(&ff_vc1_norm6_vlc, VC1_NORM6_VLC_BITS, 77, + &offset, ff_vc1_norm6_tab, 0); + vc1_init_vlc(&ff_vc1_imode_vlc, VC1_IMODE_VLC_BITS, 7, + &offset, ff_vc1_imode_tab, 0); for (i = 0; i < 3; i++) { - ff_vc1_ttmb_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 0]]; - ff_vc1_ttmb_vlc[i].table_allocated = vlc_offs[i * 3 + 1] - vlc_offs[i * 3 + 0]; - ff_init_vlc_from_lengths(&ff_vc1_ttmb_vlc[i], VC1_TTMB_VLC_BITS, 16, - &ff_vc1_ttmb_tabs[i][0][1], 2, - &ff_vc1_ttmb_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); - ff_vc1_ttblk_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 1]]; - ff_vc1_ttblk_vlc[i].table_allocated = vlc_offs[i * 3 + 2] - vlc_offs[i * 3 + 1]; - ff_init_vlc_from_lengths(&ff_vc1_ttblk_vlc[i], VC1_TTBLK_VLC_BITS, 8, - &ff_vc1_ttblk_tabs[i][0][1], 2, - &ff_vc1_ttblk_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); - ff_vc1_subblkpat_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 2]]; - ff_vc1_subblkpat_vlc[i].table_allocated = vlc_offs[i * 3 + 3] - vlc_offs[i * 3 + 2]; - ff_init_vlc_from_lengths(&ff_vc1_subblkpat_vlc[i], VC1_SUBBLKPAT_VLC_BITS, 15, - &ff_vc1_subblkpat_tabs[i][0][1], 2, - &ff_vc1_subblkpat_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + vc1_init_vlc(&ff_vc1_ttmb_vlc[i], VC1_TTMB_VLC_BITS, 16, + &offset, ff_vc1_ttmb_tabs[i], 0); + vc1_init_vlc(&ff_vc1_ttblk_vlc[i], VC1_TTBLK_VLC_BITS, 8, + &offset, ff_vc1_ttblk_tabs[i], 0); + vc1_init_vlc(&ff_vc1_subblkpat_vlc[i], VC1_SUBBLKPAT_VLC_BITS, 15, + &offset, ff_vc1_subblkpat_tabs[i], 0); } for (i = 0; i < 4; i++) { - ff_vc1_4mv_block_pattern_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 9]]; - ff_vc1_4mv_block_pattern_vlc[i].table_allocated = vlc_offs[i * 3 + 10] - vlc_offs[i * 3 + 9]; - init_vlc(&ff_vc1_4mv_block_pattern_vlc[i], VC1_4MV_BLOCK_PATTERN_VLC_BITS, 16, - ff_vc1_4mv_block_pattern_bits[i], 1, 1, - ff_vc1_4mv_block_pattern_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); - ff_vc1_cbpcy_p_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 10]]; - ff_vc1_cbpcy_p_vlc[i].table_allocated = vlc_offs[i * 3 + 11] - vlc_offs[i * 3 + 10]; - ff_init_vlc_from_lengths(&ff_vc1_cbpcy_p_vlc[i], VC1_CBPCY_P_VLC_BITS, 64, - &ff_vc1_cbpcy_p_tabs[i][0][1], 2, - &ff_vc1_cbpcy_p_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); - ff_vc1_mv_diff_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 11]]; - ff_vc1_mv_diff_vlc[i].table_allocated = vlc_offs[i * 3 + 12] - vlc_offs[i * 3 + 11]; - ff_init_vlc_from_lengths(&ff_vc1_mv_diff_vlc[i], VC1_MV_DIFF_VLC_BITS, 73, - &ff_vc1_mv_diff_tabs[i][0][1], 2, - &ff_vc1_mv_diff_tabs[i][0][0], 2, 1, - -4, INIT_VLC_USE_NEW_STATIC); + vc1_init_vlc(&ff_vc1_4mv_block_pattern_vlc[i], VC1_4MV_BLOCK_PATTERN_VLC_BITS, 16, + &offset, ff_vc1_4mv_block_pattern_tabs[i], 0); + vc1_init_vlc(&ff_vc1_cbpcy_p_vlc[i], VC1_CBPCY_P_VLC_BITS, 64, + &offset, ff_vc1_cbpcy_p_tabs[i], 0); + vc1_init_vlc(&ff_vc1_mv_diff_vlc[i], VC1_MV_DIFF_VLC_BITS, 73, + &offset, ff_vc1_mv_diff_tabs[i], -4); } for (int i = 0, ac_offset = 0; i < 8; i++) { - ff_vc1_ac_coeff_table[i].table = &vlc_table[vlc_offs[i * 2 + 21]]; - ff_vc1_ac_coeff_table[i].table_allocated = vlc_offs[i * 2 + 22] - vlc_offs[i * 2 + 21]; + ff_vc1_ac_coeff_table[i].table = &vlc_buf[offset]; + ff_vc1_ac_coeff_table[i].table_allocated = FF_ARRAY_ELEMS(vlc_buf) - offset; ff_init_vlc_from_lengths(&ff_vc1_ac_coeff_table[i], AC_VLC_BITS, ff_vc1_ac_sizes[i], ff_vc1_ac_coeff_lens + ac_offset, 1, ff_vc1_ac_coeff_syms + ac_offset, 2, 2, 0, INIT_VLC_USE_NEW_STATIC); ac_offset += ff_vc1_ac_sizes[i]; + offset += ff_vc1_ac_coeff_table[i].table_size; /* initialize interlaced MVDATA tables (2-Ref) */ - ff_vc1_2ref_mvdata_vlc[i].table = &vlc_table[vlc_offs[i * 2 + 22]]; - ff_vc1_2ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 2 + 23] - vlc_offs[i * 2 + 22]; - ff_init_vlc_from_lengths(&ff_vc1_2ref_mvdata_vlc[i], VC1_2REF_MVDATA_VLC_BITS, 126, - &ff_vc1_2ref_mvdata_tabs[i][0][1], 2, - &ff_vc1_2ref_mvdata_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + vc1_init_vlc(&ff_vc1_2ref_mvdata_vlc[i], VC1_2REF_MVDATA_VLC_BITS, 126, + &offset, ff_vc1_2ref_mvdata_tabs[i], 0); } for (i = 0; i < 4; i++) { /* initialize 4MV MBMODE VLC tables for interlaced frame P picture */ - ff_vc1_intfr_4mv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 37]]; - ff_vc1_intfr_4mv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 38] - vlc_offs[i * 3 + 37]; - ff_init_vlc_from_lengths(&ff_vc1_intfr_4mv_mbmode_vlc[i], VC1_INTFR_4MV_MBMODE_VLC_BITS, 15, - &ff_vc1_intfr_4mv_mbmode_tabs[i][0][1], 2, - &ff_vc1_intfr_4mv_mbmode_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + vc1_init_vlc(&ff_vc1_intfr_4mv_mbmode_vlc[i], VC1_INTFR_4MV_MBMODE_VLC_BITS, 15, + &offset, ff_vc1_intfr_4mv_mbmode_tabs[i], 0); /* initialize NON-4MV MBMODE VLC tables for the same */ - ff_vc1_intfr_non4mv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 38]]; - ff_vc1_intfr_non4mv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 39] - vlc_offs[i * 3 + 38]; - ff_init_vlc_from_lengths(&ff_vc1_intfr_non4mv_mbmode_vlc[i], VC1_INTFR_NON4MV_MBMODE_VLC_BITS, 9, - &ff_vc1_intfr_non4mv_mbmode_tabs[i][0][1], 2, - &ff_vc1_intfr_non4mv_mbmode_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + vc1_init_vlc(&ff_vc1_intfr_non4mv_mbmode_vlc[i], VC1_INTFR_NON4MV_MBMODE_VLC_BITS, 9, + &offset, ff_vc1_intfr_non4mv_mbmode_tabs[i], 0); /* initialize interlaced MVDATA tables (1-Ref) */ - ff_vc1_1ref_mvdata_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 39]]; - ff_vc1_1ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 3 + 40] - vlc_offs[i * 3 + 39]; - ff_init_vlc_from_lengths(&ff_vc1_1ref_mvdata_vlc[i], VC1_1REF_MVDATA_VLC_BITS, 72, - &ff_vc1_1ref_mvdata_tabs[i][0][1], 2, - &ff_vc1_1ref_mvdata_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + vc1_init_vlc(&ff_vc1_1ref_mvdata_vlc[i], VC1_1REF_MVDATA_VLC_BITS, 72, + &offset, ff_vc1_1ref_mvdata_tabs[i], 0); } for (i = 0; i < 4; i++) { /* Initialize 2MV Block pattern VLC tables */ - ff_vc1_2mv_block_pattern_vlc[i].table = &vlc_table[vlc_offs[i + 49]]; - ff_vc1_2mv_block_pattern_vlc[i].table_allocated = vlc_offs[i + 50] - vlc_offs[i + 49]; - init_vlc(&ff_vc1_2mv_block_pattern_vlc[i], VC1_2MV_BLOCK_PATTERN_VLC_BITS, 4, - ff_vc1_2mv_block_pattern_bits[i], 1, 1, - ff_vc1_2mv_block_pattern_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + vc1_init_vlc(&ff_vc1_2mv_block_pattern_vlc[i], VC1_2MV_BLOCK_PATTERN_VLC_BITS, 4, + &offset, ff_vc1_2mv_block_pattern_tabs[i], 0); } for (i = 0; i < 8; i++) { /* Initialize interlaced CBPCY VLC tables (Table 124 - Table 131) */ - ff_vc1_icbpcy_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 53]]; - ff_vc1_icbpcy_vlc[i].table_allocated = vlc_offs[i * 3 + 54] - vlc_offs[i * 3 + 53]; - ff_init_vlc_from_lengths(&ff_vc1_icbpcy_vlc[i], VC1_ICBPCY_VLC_BITS, 63, - &ff_vc1_icbpcy_p_tabs[i][0][1], 2, - &ff_vc1_icbpcy_p_tabs[i][0][0], 2, 1, - 0, INIT_VLC_USE_NEW_STATIC); + vc1_init_vlc(&ff_vc1_icbpcy_vlc[i], VC1_ICBPCY_VLC_BITS, 63, + &offset, ff_vc1_icbpcy_p_tabs[i], 0); /* Initialize interlaced field picture MBMODE VLC tables */ - ff_vc1_if_mmv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 54]]; - ff_vc1_if_mmv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 55] - vlc_offs[i * 3 + 54]; - init_vlc(&ff_vc1_if_mmv_mbmode_vlc[i], VC1_IF_MMV_MBMODE_VLC_BITS, 8, - ff_vc1_if_mmv_mbmode_bits[i], 1, 1, - ff_vc1_if_mmv_mbmode_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); - ff_vc1_if_1mv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 55]]; - ff_vc1_if_1mv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 56] - vlc_offs[i * 3 + 55]; - init_vlc(&ff_vc1_if_1mv_mbmode_vlc[i], VC1_IF_1MV_MBMODE_VLC_BITS, 6, - ff_vc1_if_1mv_mbmode_bits[i], 1, 1, - ff_vc1_if_1mv_mbmode_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + vc1_init_vlc(&ff_vc1_if_mmv_mbmode_vlc[i], VC1_IF_MMV_MBMODE_VLC_BITS, 8, + &offset, ff_vc1_if_mmv_mbmode_tabs[i], 0); + vc1_init_vlc(&ff_vc1_if_1mv_mbmode_vlc[i], VC1_IF_1MV_MBMODE_VLC_BITS, 6, + &offset, ff_vc1_if_1mv_mbmode_tabs[i], 0); } done = 1; } diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c index ce9948281f..c7c409bb46 100644 --- a/libavcodec/vc1data.c +++ b/libavcodec/vc1data.c @@ -129,23 +129,14 @@ const int16_t ff_vc1_bfraction_lut[23] = { }; #endif -const uint8_t ff_vc1_bfraction_bits[23] = { - 3, 3, 3, 3, - 3, 3, 3, - 7, 7, 7, 7, - 7, 7, 7, 7, - 7, 7, 7, 7, - 7, 7, - 7, 7 -}; -const uint8_t ff_vc1_bfraction_codes[23] = { - 0, 1, 2, 3, - 4, 5, 6, - 112, 113, 114, 115, - 116, 117, 118, 119, - 120, 121, 122, 123, - 124, 125, - 126, 127 +const uint8_t ff_vc1_bfraction_tab[23][2] = { + { 0, 3 }, { 1, 3 }, { 2, 3 }, { 3, 3 }, + { 4, 3 }, { 5, 3 }, { 6, 3 }, + { 7, 7 }, { 8, 7 }, { 9, 7 }, { 10, 7 }, + { 11, 7 }, { 12, 7 }, { 13, 7 }, { 14, 7 }, + { 15, 7 }, { 16, 7 }, { 17, 7 }, { 18, 7 }, + { 19, 7 }, { 20, 7 }, + { 21, 7 }, { 22, 7 }, }; //Same as H.264 @@ -169,19 +160,14 @@ const AVRational ff_vc1_pixel_aspect[16] = { }; /* BitPlane IMODE - such a small table... */ -const uint8_t ff_vc1_imode_codes[7] = { - 0, 2, 1, 3, 1, 2, 3 -}; -const uint8_t ff_vc1_imode_bits[7] = { - 4, 2, 3, 2, 4, 3, 3 +const uint8_t ff_vc1_imode_tab[7][2] = { + { IMODE_RAW, 4 }, { IMODE_DIFF6, 4 }, { IMODE_DIFF2, 3 }, { IMODE_ROWSKIP, 3 }, + { IMODE_COLSKIP, 3 }, { IMODE_NORM2, 2 }, { IMODE_NORM6, 2 }, }; /* Normal-2 imode */ -const uint8_t ff_vc1_norm2_codes[4] = { - 0, 4, 5, 3 -}; -const uint8_t ff_vc1_norm2_bits[4] = { - 1, 3, 3, 2 +const uint8_t ff_vc1_norm2_tab[4][2] = { + { 0, 1 }, { 1, 3 }, { 2, 3 }, { 3, 2 }, }; /* The negative lengths in the following table correspond to @@ -206,26 +192,39 @@ const uint8_t ff_vc1_norm6_tab[77][2] = { }; /* 4MV Block pattern VLC tables */ -const uint8_t ff_vc1_4mv_block_pattern_codes[4][16] = { - { 14, 58, 59, 25, 12, 26, 15, 15, 13, 24, 27, 0, 28, 1, 2, 2 }, - { 8, 18, 19, 4, 20, 5, 30, 11, 21, 31, 6, 12, 7, 13, 14, 0 }, - { 15, 6, 7, 2, 8, 3, 28, 9, 10, 29, 4, 11, 5, 12, 13, 0 }, - { 0, 11, 12, 4, 13, 5, 30, 16, 14, 31, 6, 17, 7, 18, 19, 10 } -}; -const uint8_t ff_vc1_4mv_block_pattern_bits[4][16] = { - { 5, 6, 6, 5, 5, 5, 5, 4, 5, 5, 5, 3, 5, 3, 3, 2 }, - { 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4, 4, 4, 4, 4, 2 }, - { 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 4, 4, 4, 4, 4, 3 }, - { 2, 4, 4, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4 } +const uint8_t ff_vc1_4mv_block_pattern_tabs[4][16][2] = { + { + { 0x0B, 3 }, { 0x0D, 3 }, { 0x0E, 3 }, { 0x04, 5 }, { 0x08, 5 }, + { 0x00, 5 }, { 0x06, 5 }, { 0x0F, 2 }, { 0x09, 5 }, { 0x03, 5 }, + { 0x05, 5 }, { 0x0A, 5 }, { 0x0C, 5 }, { 0x01, 6 }, { 0x02, 6 }, + { 0x07, 4 }, + }, + { + { 0x0F, 2 }, { 0x03, 4 }, { 0x05, 4 }, { 0x0A, 4 }, { 0x0C, 4 }, + { 0x00, 4 }, { 0x01, 5 }, { 0x02, 5 }, { 0x04, 5 }, { 0x08, 5 }, + { 0x07, 4 }, { 0x0B, 4 }, { 0x0D, 4 }, { 0x0E, 4 }, { 0x06, 5 }, + { 0x09, 5 }, + }, + { + { 0x0F, 3 }, { 0x03, 4 }, { 0x05, 4 }, { 0x0A, 4 }, { 0x0C, 4 }, + { 0x01, 4 }, { 0x02, 4 }, { 0x04, 4 }, { 0x07, 4 }, { 0x08, 4 }, + { 0x0B, 4 }, { 0x0D, 4 }, { 0x0E, 4 }, { 0x06, 5 }, { 0x09, 5 }, + { 0x00, 4 }, + }, + { + { 0x00, 2 }, { 0x03, 4 }, { 0x05, 4 }, { 0x0A, 4 }, { 0x0C, 4 }, + { 0x07, 5 }, { 0x0B, 5 }, { 0x0D, 5 }, { 0x0E, 5 }, { 0x0F, 4 }, + { 0x01, 4 }, { 0x02, 4 }, { 0x04, 4 }, { 0x08, 4 }, { 0x06, 5 }, + { 0x09, 5 }, + }, }; /* 2MV Block pattern VLC tables */ -const uint8_t ff_vc1_2mv_block_pattern_codes[4][4] = { - { 2, 1, 0, 3 }, { 1, 0, 2, 3 }, { 2, 0, 3, 1 }, { 1, 3, 2, 0 } -}; - -const uint8_t ff_vc1_2mv_block_pattern_bits[4][4] = { - { 2, 2, 2, 2 }, { 1, 2, 3, 3 }, { 3, 2, 3, 1 }, { 1, 3, 3, 2 } +const uint8_t ff_vc1_2mv_block_pattern_tabs[4][4][2] = { + { { 0x02, 2 }, { 0x01, 2 }, { 0x00, 2 }, { 0x03, 2 } }, + { { 0x01, 2 }, { 0x02, 3 }, { 0x03, 3 }, { 0x00, 1 } }, + { { 0x01, 2 }, { 0x00, 3 }, { 0x02, 3 }, { 0x03, 1 } }, + { { 0x03, 2 }, { 0x02, 3 }, { 0x01, 3 }, { 0x00, 1 } }, }; /* Interlaced frame picture 4MV MBMODE VLC tables (tables 160-163) */ @@ -350,46 +349,42 @@ const uint8_t ff_vc1_intfr_non4mv_mbmode_tabs[4][9][2] = { /* Interlaced field picture MBMODE VLC tables (p. 356 - 11.4.1, 11.4.2) */ /* mixed-MV */ -const uint8_t ff_vc1_if_mmv_mbmode_codes[8][8] = { - { 16, 17, 3, 3, 0, 5, 9, 2 }, - { 8, 9, 3, 6, 7, 0, 5, 2 }, - { 16, 17, 5, 3, 0, 3, 9, 2 }, - { 56, 57, 15, 4, 5, 6, 29, 0 }, - { 52, 53, 27, 14, 15, 2, 12, 0 }, - { 56, 57, 29, 5, 6, 0, 15, 4 }, - { 16, 17, 6, 7, 0, 1, 9, 5 }, - { 56, 57, 0, 5, 6, 29, 4, 15 } -}; -const uint8_t ff_vc1_if_mmv_mbmode_bits[8][8] = { - { 6, 6, 2, 3, 2, 4, 5, 2 }, - { 5, 5, 3, 3, 3, 2, 4, 2 }, - { 6, 6, 4, 3, 2, 2, 5, 2 }, - { 6, 6, 4, 3, 3, 3, 5, 1 }, - { 6, 6, 5, 4, 4, 2, 4, 1 }, - { 6, 6, 5, 3, 3, 1, 4, 3 }, - { 5, 5, 3, 3, 2, 2, 4, 3 }, - { 6, 6, 1, 3, 3, 5, 3, 4 } +const uint8_t ff_vc1_if_mmv_mbmode_tabs[8][8][2] = { + { { 0x04, 2 }, { 0x00, 6 }, { 0x01, 6 }, { 0x06, 5 }, + { 0x05, 4 }, { 0x03, 3 }, { 0x07, 2 }, { 0x02, 2 } }, + { { 0x05, 2 }, { 0x00, 5 }, { 0x01, 5 }, { 0x06, 4 }, + { 0x02, 3 }, { 0x07, 2 }, { 0x03, 3 }, { 0x04, 3 } }, + { { 0x04, 2 }, { 0x00, 6 }, { 0x01, 6 }, { 0x06, 5 }, + { 0x02, 4 }, { 0x03, 3 }, { 0x07, 2 }, { 0x05, 2 } }, + { { 0x07, 1 }, { 0x03, 3 }, { 0x04, 3 }, { 0x05, 3 }, + { 0x00, 6 }, { 0x01, 6 }, { 0x06, 5 }, { 0x02, 4 } }, + { { 0x07, 1 }, { 0x05, 2 }, { 0x06, 4 }, { 0x00, 6 }, + { 0x01, 6 }, { 0x02, 5 }, { 0x03, 4 }, { 0x04, 4 } }, + { { 0x05, 1 }, { 0x07, 3 }, { 0x03, 3 }, { 0x04, 3 }, + { 0x00, 6 }, { 0x01, 6 }, { 0x02, 5 }, { 0x06, 4 } }, + { { 0x04, 2 }, { 0x05, 2 }, { 0x00, 5 }, { 0x01, 5 }, + { 0x06, 4 }, { 0x07, 3 }, { 0x02, 3 }, { 0x03, 3 } }, + { { 0x02, 1 }, { 0x06, 3 }, { 0x03, 3 }, { 0x04, 3 }, + { 0x00, 6 }, { 0x01, 6 }, { 0x05, 5 }, { 0x07, 4 } }, }; /* 1MV */ -const uint8_t ff_vc1_if_1mv_mbmode_codes[8][6] = { - { 0, 1, 1, 1, 1, 1 }, - { 0, 1, 1, 1, 1, 1 }, - { 16, 17, 3, 0, 9, 5 }, - { 20, 21, 3, 11, 0, 4 }, - { 4, 5, 2, 3, 3, 0 }, - { 4, 5, 3, 2, 0, 3 }, - { 0, 1, 1, 1, 1, 1 }, - { 16, 17, 9, 5, 3, 0 } -}; -const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6] = { - { 5, 5, 1, 3, 2, 4 }, - { 5, 5, 1, 2, 3, 4 }, - { 5, 5, 2, 1, 4, 3 }, - { 5, 5, 2, 4, 1, 3 }, - { 4, 4, 2, 3, 2, 2 }, - { 4, 4, 3, 2, 2, 2 }, - { 5, 5, 3, 4, 1, 2 }, - { 5, 5, 4, 3, 2, 1 } +const uint8_t ff_vc1_if_1mv_mbmode_tabs[8][6][2] = { + { { 0x00, 5 }, { 0x01, 5 }, { 0x05, 4 }, + { 0x03, 3 }, { 0x04, 2 }, { 0x02, 1 } }, + { { 0x00, 5 }, { 0x01, 5 }, { 0x05, 4 }, + { 0x04, 3 }, { 0x03, 2 }, { 0x02, 1 } }, + { { 0x03, 1 }, { 0x00, 5 }, { 0x01, 5 }, + { 0x04, 4 }, { 0x05, 3 }, { 0x02, 2 } }, + { { 0x04, 1 }, { 0x05, 3 }, { 0x00, 5 }, + { 0x01, 5 }, { 0x03, 4 }, { 0x02, 2 } }, + { { 0x05, 2 }, { 0x00, 4 }, { 0x01, 4 }, + { 0x03, 3 }, { 0x02, 2 }, { 0x04, 2 } }, + { { 0x04, 2 }, { 0x00, 4 }, { 0x01, 4 }, + { 0x02, 3 }, { 0x03, 2 }, { 0x05, 2 } }, + { { 0x00, 5 }, { 0x01, 5 }, { 0x03, 4 }, + { 0x02, 3 }, { 0x05, 2 }, { 0x04, 1 } }, + { { 0x05, 1 }, { 0x00, 5 }, { 0x01, 5 }, + { 0x02, 4 }, { 0x03, 3 }, { 0x04, 2 } }, }; /* Interlaced frame/field picture MVDATA VLC tables */ diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h index 257ec2fd30..c64e3725a8 100644 --- a/libavcodec/vc1data.h +++ b/libavcodec/vc1data.h @@ -94,30 +94,25 @@ extern VLC ff_vc1_ac_coeff_table[8]; /* pre-computed scales for all bfractions and base=256 */ extern const int16_t ff_vc1_bfraction_lut[23]; -extern const uint8_t ff_vc1_bfraction_bits[23]; -extern const uint8_t ff_vc1_bfraction_codes[23]; +extern const uint8_t ff_vc1_bfraction_tab[23][2]; //Same as H.264 extern const AVRational ff_vc1_pixel_aspect[16]; /* BitPlane IMODE - such a small table... */ -extern const uint8_t ff_vc1_imode_codes[7]; -extern const uint8_t ff_vc1_imode_bits[7]; +extern const uint8_t ff_vc1_imode_tab[7][2]; /* Normal-2 imode */ -extern const uint8_t ff_vc1_norm2_codes[4]; -extern const uint8_t ff_vc1_norm2_bits[4]; +extern const uint8_t ff_vc1_norm2_tab[4][2]; extern const uint8_t ff_vc1_norm6_tab[77][2]; /* Normal-6 imode */ extern const uint8_t ff_vc1_norm6_spec[64][5]; /* 4MV Block pattern VLC tables */ -extern const uint8_t ff_vc1_4mv_block_pattern_codes[4][16]; -extern const uint8_t ff_vc1_4mv_block_pattern_bits[4][16]; +extern const uint8_t ff_vc1_4mv_block_pattern_tabs[4][16][2]; /* 2MV Block pattern VLC tables */ -extern const uint8_t ff_vc1_2mv_block_pattern_codes[4][4]; -extern const uint8_t ff_vc1_2mv_block_pattern_bits[4][4]; +extern const uint8_t ff_vc1_2mv_block_pattern_tabs[4][4][2]; extern const uint8_t ff_wmv3_dc_scale_table[32]; @@ -158,10 +153,8 @@ extern const uint8_t ff_vc1_intfr_4mv_mbmode_tabs[4][15][2]; extern const uint8_t ff_vc1_intfr_non4mv_mbmode_tabs[4][9][2]; /* Interlaced field picture MBMODE VLC tables (p. 356 - 11.4.1, 11.4.2) */ -extern const uint8_t ff_vc1_if_mmv_mbmode_codes[8][8]; -extern const uint8_t ff_vc1_if_mmv_mbmode_bits[8][8]; -extern const uint8_t ff_vc1_if_1mv_mbmode_codes[8][6]; -extern const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6]; +extern const uint8_t ff_vc1_if_mmv_mbmode_tabs[8][8][2]; +extern const uint8_t ff_vc1_if_1mv_mbmode_tabs[8][6][2]; /* Interlaced frame/field picture MVDATA VLC tables * The escape value of each table has the symbol 0; From patchwork Tue Nov 10 10:48:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23492 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 BAF4E44B3FF for ; Tue, 10 Nov 2020 12:54:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B261A68BF70; Tue, 10 Nov 2020 12:51:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 87C4F68BEA6 for ; Tue, 10 Nov 2020 12:50:46 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id j7so4892668wrp.3 for ; Tue, 10 Nov 2020 02:50:46 -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=JhDBMxi+U6O7QCJaNf2mlwMZkwDwuWw1QBdY5gxOxdw=; b=dzqhngpabnDBQVDAhYLfwfNuZ8kit2AxwjDBrkz5hxJ2//qajBQTdqLctHs5i44Dqz ai9l6stCTFjOrEQ//Sg0IlpaSNJNhVrZpqn9bQi3y6PgyyV+usvPDD6yBowL2RFuYcO0 5tjHYLPCE9GR2wIOiYEBGT3nnDH0wOPv1Wa68oWfsqrxHAXhG/nAj0rrwlOjkIJmcOwb BJmXKxFX4VuApOWQ72GV7tp0XpMivEedbyI7WKE5tstDTnY3ehh0vL+3gMYRYPnksZFK ibSTL0L5c8RF/hFz1/dopXoiFuzdA+M1L6vTJvENT9zVO6UKC2mfWUKAOCSqcqfpzsM0 OJvg== 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=JhDBMxi+U6O7QCJaNf2mlwMZkwDwuWw1QBdY5gxOxdw=; b=ZV1aLxUEdvEFDnaE3818g3tbe/C5W3YcTW05Q5B9As1TdNl8DKy2vGUSmg4WT2SWek W1cX5QfC4xN27gTXYfB9uMFbKpdGaIpmxgz3wxVi6p5sHFFowdYI+K2/5W+danVFyCQ5 f48nKhAhBe/TLM7H/v3EcGjLuK+pvg3VIH4yQ0U7kCJzKXH2DfMAvp7KbOBupeXXJCV7 n/hXFKFyUB0dtGN8g+HDC57VNp4UbOpFNokO66v3i75AHapIH1SYhSREWVJtXMe0hl4A y3QruxvoZDoZVZhwzrbC+WeqK8HBwwGUcas6vmZoHTLpLvTi3aTuolQ1PygCGKoQD93g mLUg== X-Gm-Message-State: AOAM532Kx//8kHpdq8C0fNHnjpibG7D2Xt3UeKnZ/fgtsZGunfR9ufi7 XOSioA9iiASi4BtQmku3tagNaBLiUgo= X-Google-Smtp-Source: ABdhPJxJA8FJxzSapp8fmTUzRnrAA4t5YuTeVVLwYmddsBfpwyEPxYVEUU4F7HmoDI+35zIPzyTCKw== X-Received: by 2002:a5d:4e48:: with SMTP id r8mr22097563wrt.141.1605005445785; Tue, 10 Nov 2020 02:50:45 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:45 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:25 +0100 Message-Id: <20201110104851.321029-89-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 088/114] avcodec/rv34: Avoid offsets table for initialization of static 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/rv34.c | 66 +++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 37 deletions(-) diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 09fa962b2f..00fbcef8ec 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -76,27 +76,6 @@ static int rv34_decode_mv(RV34DecContext *r, int block_type); * @{ */ -static const int table_offs[] = { - 0, 1818, 3622, 4144, 4698, 5234, 5804, 5868, 5900, 5932, - 5996, 6252, 6316, 6348, 6380, 7674, 8944, 10274, 11668, 12250, - 14060, 15846, 16372, 16962, 17512, 18148, 18180, 18212, 18244, 18308, - 18564, 18628, 18660, 18692, 20036, 21314, 22648, 23968, 24614, 26384, - 28190, 28736, 29366, 29938, 30608, 30640, 30672, 30704, 30768, 31024, - 31088, 31120, 31184, 32570, 33898, 35236, 36644, 37286, 39020, 40802, - 41368, 42052, 42692, 43348, 43380, 43412, 43444, 43476, 43604, 43668, - 43700, 43732, 45100, 46430, 47778, 49160, 49802, 51550, 53340, 53972, - 54648, 55348, 55994, 56122, 56154, 56186, 56218, 56346, 56410, 56442, - 56474, 57878, 59290, 60636, 62036, 62682, 64460, 64524, 64588, 64716, - 64844, 66076, 67466, 67978, 68542, 69064, 69648, 70296, 72010, 72074, - 72138, 72202, 72330, 73572, 74936, 75454, 76030, 76566, 77176, 77822, - 79582, 79646, 79678, 79742, 79870, 81180, 82536, 83064, 83672, 84242, - 84934, 85576, 87384, 87448, 87480, 87544, 87672, 88982, 90340, 90902, - 91598, 92182, 92846, 93488, 95246, 95278, 95310, 95374, 95502, 96878, - 98266, 98848, 99542, 100234, 100884, 101524, 103320, 103352, 103384, 103416, - 103480, 104874, 106222, 106910, 107584, 108258, 108902, 109544, 111366, 111398, - 111430, 111462, 111494, 112878, 114320, 114988, 115660, 116310, 116950, 117592 -}; - static VLC_TYPE table_data[117592][2]; /** @@ -108,7 +87,7 @@ static VLC_TYPE table_data[117592][2]; * @param num VLC table number (for static initialization) */ static void rv34_gen_vlc(const uint8_t *bits, int size, VLC *vlc, const uint8_t *syms, - const int num) + int *offset) { int counts[17] = {0}, codes[17]; uint16_t cw[MAX_VLC_SIZE]; @@ -128,12 +107,13 @@ static void rv34_gen_vlc(const uint8_t *bits, int size, VLC *vlc, const uint8_t for (int i = 0; i < size; i++) cw[i] = codes[bits[i]]++; - vlc->table = &table_data[table_offs[num]]; - vlc->table_allocated = table_offs[num + 1] - table_offs[num]; + vlc->table = &table_data[*offset]; + vlc->table_allocated = FF_ARRAY_ELEMS(table_data) - *offset; ff_init_vlc_sparse(vlc, FFMIN(maxbits, 9), size, bits, 1, 1, cw, 2, 2, syms, !!syms, !!syms, INIT_VLC_USE_NEW_STATIC); + *offset += vlc->table_size; } /** @@ -141,34 +121,46 @@ static void rv34_gen_vlc(const uint8_t *bits, int size, VLC *vlc, const uint8_t */ static av_cold void rv34_init_tables(void) { - int i, j, k; + int i, j, k, offset = 0; for(i = 0; i < NUM_INTRA_TABLES; i++){ for(j = 0; j < 2; j++){ - rv34_gen_vlc(rv34_table_intra_cbppat [i][j], CBPPAT_VLC_SIZE, &intra_vlcs[i].cbppattern[j], NULL, 19*i + 0 + j); - rv34_gen_vlc(rv34_table_intra_secondpat[i][j], OTHERBLK_VLC_SIZE, &intra_vlcs[i].second_pattern[j], NULL, 19*i + 2 + j); - rv34_gen_vlc(rv34_table_intra_thirdpat [i][j], OTHERBLK_VLC_SIZE, &intra_vlcs[i].third_pattern[j], NULL, 19*i + 4 + j); + rv34_gen_vlc(rv34_table_intra_cbppat [i][j], CBPPAT_VLC_SIZE, + &intra_vlcs[i].cbppattern[j], NULL, &offset); + rv34_gen_vlc(rv34_table_intra_secondpat[i][j], OTHERBLK_VLC_SIZE, + &intra_vlcs[i].second_pattern[j], NULL, &offset); + rv34_gen_vlc(rv34_table_intra_thirdpat [i][j], OTHERBLK_VLC_SIZE, + &intra_vlcs[i].third_pattern[j], NULL, &offset); for(k = 0; k < 4; k++){ - rv34_gen_vlc(rv34_table_intra_cbp[i][j+k*2], CBP_VLC_SIZE, &intra_vlcs[i].cbp[j][k], rv34_cbp_code, 19*i + 6 + j*4 + k); + rv34_gen_vlc(rv34_table_intra_cbp[i][j+k*2], CBP_VLC_SIZE, + &intra_vlcs[i].cbp[j][k], rv34_cbp_code, &offset); } } for(j = 0; j < 4; j++){ - rv34_gen_vlc(rv34_table_intra_firstpat[i][j], FIRSTBLK_VLC_SIZE, &intra_vlcs[i].first_pattern[j], NULL, 19*i + 14 + j); + rv34_gen_vlc(rv34_table_intra_firstpat[i][j], FIRSTBLK_VLC_SIZE, + &intra_vlcs[i].first_pattern[j], NULL, &offset); } - rv34_gen_vlc(rv34_intra_coeff[i], COEFF_VLC_SIZE, &intra_vlcs[i].coefficient, NULL, 19*i + 18); + rv34_gen_vlc(rv34_intra_coeff[i], COEFF_VLC_SIZE, + &intra_vlcs[i].coefficient, NULL, &offset); } for(i = 0; i < NUM_INTER_TABLES; i++){ - rv34_gen_vlc(rv34_inter_cbppat[i], CBPPAT_VLC_SIZE, &inter_vlcs[i].cbppattern[0], NULL, i*12 + 95); + rv34_gen_vlc(rv34_inter_cbppat[i], CBPPAT_VLC_SIZE, + &inter_vlcs[i].cbppattern[0], NULL, &offset); for(j = 0; j < 4; j++){ - rv34_gen_vlc(rv34_inter_cbp[i][j], CBP_VLC_SIZE, &inter_vlcs[i].cbp[0][j], rv34_cbp_code, i*12 + 96 + j); + rv34_gen_vlc(rv34_inter_cbp[i][j], CBP_VLC_SIZE, + &inter_vlcs[i].cbp[0][j], rv34_cbp_code, &offset); } for(j = 0; j < 2; j++){ - rv34_gen_vlc(rv34_table_inter_firstpat [i][j], FIRSTBLK_VLC_SIZE, &inter_vlcs[i].first_pattern[j], NULL, i*12 + 100 + j); - rv34_gen_vlc(rv34_table_inter_secondpat[i][j], OTHERBLK_VLC_SIZE, &inter_vlcs[i].second_pattern[j], NULL, i*12 + 102 + j); - rv34_gen_vlc(rv34_table_inter_thirdpat [i][j], OTHERBLK_VLC_SIZE, &inter_vlcs[i].third_pattern[j], NULL, i*12 + 104 + j); + rv34_gen_vlc(rv34_table_inter_firstpat [i][j], FIRSTBLK_VLC_SIZE, + &inter_vlcs[i].first_pattern[j], NULL, &offset); + rv34_gen_vlc(rv34_table_inter_secondpat[i][j], OTHERBLK_VLC_SIZE, + &inter_vlcs[i].second_pattern[j], NULL, &offset); + rv34_gen_vlc(rv34_table_inter_thirdpat [i][j], OTHERBLK_VLC_SIZE, + &inter_vlcs[i].third_pattern[j], NULL, &offset); } - rv34_gen_vlc(rv34_inter_coeff[i], COEFF_VLC_SIZE, &inter_vlcs[i].coefficient, NULL, i*12 + 106); + rv34_gen_vlc(rv34_inter_coeff[i], COEFF_VLC_SIZE, + &inter_vlcs[i].coefficient, NULL, &offset); } } From patchwork Tue Nov 10 10:48:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23563 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 B181244B922 for ; Tue, 10 Nov 2020 13:11:01 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9277A68BFA0; Tue, 10 Nov 2020 12:51:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 84C4868BF0C for ; Tue, 10 Nov 2020 12:50:47 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id h2so2545030wmm.0 for ; Tue, 10 Nov 2020 02:50:47 -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=Rf5ix6JEVS3caUukrTMhNiloUk0B0iLJVfJ19E/qJDI=; b=gYM156rvexQ5wZ9EDrc9Tf4UzEa0yAk/3BnjhbEU32rA0FY7iFDo8gtjxJhock4Uz5 uJ4NTWUGqwNhYqxtb3/rh9+u/V11TWDr7cD81GPeuzDf6Y8A9LOkjM+gST4cYKhXDxgX 4AHxm6wBAXo/ANPb2h9GeVAnfRsTzQPtrFd6LvLUJ5BedL1IvcFHoWgKMVkzB/o8JcbZ 4OZatFkwoi7/uu6u4+/2b2IvPYvsFB4xo7HybI1Kbfw0OJWS5IFa99e3SqaZ/hWH5kHM HfbrVjmpp8I8mX9BA1T43Wwv+P/sQZnj5PJy4PQv60bA9dpa85e1kp39nNW9ji+9wM4p Xtcw== 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=Rf5ix6JEVS3caUukrTMhNiloUk0B0iLJVfJ19E/qJDI=; b=eTQsYg/x1CCGBbYuEJT22GYA+nqRNpvrNS6er8E5mloux/KdwjIuKkkKV7sdSR2VG3 rk3WJagWQfCDdaGfFuxIR8kMup6I+jEu/LlG8DVvBTWRQvQK8HfSTyTunbitaJ1vQNO5 13q58oz8FWKNB16PIfhiCaCVgqtKpjS+bMynAG5Qx3yKbWNM3KEPhnEoSGpNY7XEXZ9l ZyMqdtCXC1Vm9YwVFHM+EZCoWwzYKvPwrwJHhgO3sxETkbPEc/BXszaAV30Ul8BJkdA2 Wejtq2zCALYKBhKJv0PJEzzERbRvYntFZ8DYGFLN2XbSzGCyKCEIdfD8L+xpKRuLdrkr 6zMA== X-Gm-Message-State: AOAM533vHMuO6O/C1+N5ZZbk3iiZYqRq+05XP2gSJpL9psCcsq4L5piV bDLo61oABtO5aPEEqfmoKSS9NlUkCb0= X-Google-Smtp-Source: ABdhPJxtSAeWTGogb60pPNO8zO0f8z+YOckw/fKqcLq8l2XwmY2g2oETzbohDctDjgXgOWGbXJGkoA== X-Received: by 2002:a05:600c:4147:: with SMTP id h7mr3858476wmm.146.1605005446599; Tue, 10 Nov 2020 02:50:46 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:46 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:26 +0100 Message-Id: <20201110104851.321029-90-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 089/114] avcodec/atrac9dec: Don't confuse max_depth of VLC with max codelength 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" The whole point of VLCs with their tables is to read more than one bit at a time; therefore max_depth, the number of times one has to (maximally) read further bits is given by ceil(max_code_length / table_bits) which in the case of ATRAC9's coefficient VLCs gives an upper bound of two. Instead the maximum length of a code of the given VLC has been used (which is not even a compile-time constant). Use two instead. Furthermore, given that this was the only usage of the field containing the maximum of all the code lengths of a given VLC the field has been removed from its containing struct. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac9dec.c | 2 +- libavcodec/atrac9tab.h | 105 ++++++++++++++++++++--------------------- 2 files changed, 53 insertions(+), 54 deletions(-) diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index 075d610e75..a1af3c22ef 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -411,7 +411,7 @@ static inline void read_coeffs_coarse(ATRAC9Context *s, ATRAC9BlockData *b, const int groups = bands >> huff->value_cnt_pow; for (int j = 0; j < groups; j++) { - uint16_t val = get_vlc2(gb, tab->table, 9, huff->max_bit_size); + uint16_t val = get_vlc2(gb, tab->table, 9, 2); for (int k = 0; k < huff->value_cnt; k++) { coeffs[k] = sign_extend(val, huff->value_bits); diff --git a/libavcodec/atrac9tab.h b/libavcodec/atrac9tab.h index 8f290f158c..c25d0e2744 100644 --- a/libavcodec/atrac9tab.h +++ b/libavcodec/atrac9tab.h @@ -476,26 +476,25 @@ typedef struct HuffmanCodebook { const int value_cnt; const int value_cnt_pow; const int value_bits; - const int max_bit_size; } HuffmanCodebook; static const HuffmanCodebook at9_huffman_sf_unsigned[] = { { 0 }, - { huff_sfb_a1_bits, huff_sfb_a1_codes, 2, 1, 0, 1, 1, }, - { huff_sfb_a2_bits, huff_sfb_a2_codes, 4, 1, 0, 2, 3, }, - { huff_sfb_a3_bits, huff_sfb_a3_codes, 8, 1, 0, 3, 6, }, - { huff_sfb_a4_bits, huff_sfb_a4_codes, 16, 1, 0, 4, 8, }, - { huff_sfb_a5_bits, huff_sfb_a5_codes, 32, 1, 0, 5, 8, }, - { huff_sfb_a6_bits, huff_sfb_a6_codes, 64, 1, 0, 6, 8, }, + { huff_sfb_a1_bits, huff_sfb_a1_codes, 2, 1, 0, 1 }, + { huff_sfb_a2_bits, huff_sfb_a2_codes, 4, 1, 0, 2 }, + { huff_sfb_a3_bits, huff_sfb_a3_codes, 8, 1, 0, 3 }, + { huff_sfb_a4_bits, huff_sfb_a4_codes, 16, 1, 0, 4 }, + { huff_sfb_a5_bits, huff_sfb_a5_codes, 32, 1, 0, 5 }, + { huff_sfb_a6_bits, huff_sfb_a6_codes, 64, 1, 0, 6 }, }; static const HuffmanCodebook at9_huffman_sf_signed[] = { { 0 }, { 0 }, - { huff_sfb_b2_bits, huff_sfb_b2_codes, 4, 1, 0, 2, 2, }, - { huff_sfb_b3_bits, huff_sfb_b3_codes, 8, 1, 0, 3, 6, }, - { huff_sfb_b4_bits, huff_sfb_b4_codes, 16, 1, 0, 4, 8, }, - { huff_sfb_b5_bits, huff_sfb_b5_codes, 32, 1, 0, 5, 8, }, + { huff_sfb_b2_bits, huff_sfb_b2_codes, 4, 1, 0, 2 }, + { huff_sfb_b3_bits, huff_sfb_b3_codes, 8, 1, 0, 3 }, + { huff_sfb_b4_bits, huff_sfb_b4_codes, 16, 1, 0, 4 }, + { huff_sfb_b5_bits, huff_sfb_b5_codes, 32, 1, 0, 5 }, }; static const uint8_t huff_spec_a21_bits[] = { @@ -1539,40 +1538,40 @@ static const HuffmanCodebook at9_huffman_coeffs[][8][4] = { { { 0 } }, { { 0 } }, { - { huff_spec_a21_bits, huff_spec_a21_codes, 16, 2, 1, 2, 3, }, - { huff_spec_a22_bits, huff_spec_a22_codes, 256, 4, 2, 2, 8, }, - { huff_spec_a23_bits, huff_spec_a23_codes, 256, 4, 2, 2, 9, }, - { huff_spec_a24_bits, huff_spec_a24_codes, 256, 4, 2, 2, 10, }, + { huff_spec_a21_bits, huff_spec_a21_codes, 16, 2, 1, 2 }, + { huff_spec_a22_bits, huff_spec_a22_codes, 256, 4, 2, 2 }, + { huff_spec_a23_bits, huff_spec_a23_codes, 256, 4, 2, 2 }, + { huff_spec_a24_bits, huff_spec_a24_codes, 256, 4, 2, 2 }, }, { - { huff_spec_a31_bits, huff_spec_a31_codes, 64, 2, 1, 3, 7, }, - { huff_spec_a32_bits, huff_spec_a32_codes, 64, 2, 1, 3, 7, }, - { huff_spec_a33_bits, huff_spec_a33_codes, 64, 2, 1, 3, 8, }, - { huff_spec_a34_bits, huff_spec_a34_codes, 64, 2, 1, 3, 10, }, + { huff_spec_a31_bits, huff_spec_a31_codes, 64, 2, 1, 3 }, + { huff_spec_a32_bits, huff_spec_a32_codes, 64, 2, 1, 3 }, + { huff_spec_a33_bits, huff_spec_a33_codes, 64, 2, 1, 3 }, + { huff_spec_a34_bits, huff_spec_a34_codes, 64, 2, 1, 3 }, }, { - { huff_spec_a41_bits, huff_spec_a41_codes, 256, 2, 1, 4, 9, }, - { huff_spec_a42_bits, huff_spec_a42_codes, 256, 2, 1, 4, 10, }, - { huff_spec_a43_bits, huff_spec_a43_codes, 256, 2, 1, 4, 10, }, - { huff_spec_a44_bits, huff_spec_a44_codes, 256, 2, 1, 4, 10, }, + { huff_spec_a41_bits, huff_spec_a41_codes, 256, 2, 1, 4 }, + { huff_spec_a42_bits, huff_spec_a42_codes, 256, 2, 1, 4 }, + { huff_spec_a43_bits, huff_spec_a43_codes, 256, 2, 1, 4 }, + { huff_spec_a44_bits, huff_spec_a44_codes, 256, 2, 1, 4 }, }, { - { huff_spec_a51_bits, huff_spec_a51_codes, 32, 1, 0, 5, 6, }, - { huff_spec_a52_bits, huff_spec_a52_codes, 32, 1, 0, 5, 6, }, - { huff_spec_a53_bits, huff_spec_a53_codes, 32, 1, 0, 5, 7, }, - { huff_spec_a54_bits, huff_spec_a54_codes, 32, 1, 0, 5, 8, }, + { huff_spec_a51_bits, huff_spec_a51_codes, 32, 1, 0, 5 }, + { huff_spec_a52_bits, huff_spec_a52_codes, 32, 1, 0, 5 }, + { huff_spec_a53_bits, huff_spec_a53_codes, 32, 1, 0, 5 }, + { huff_spec_a54_bits, huff_spec_a54_codes, 32, 1, 0, 5 }, }, { - { huff_spec_a61_bits, huff_spec_a61_codes, 64, 1, 0, 6, 7, }, - { huff_spec_a62_bits, huff_spec_a62_codes, 64, 1, 0, 6, 7, }, - { huff_spec_a63_bits, huff_spec_a63_codes, 64, 1, 0, 6, 8, }, - { huff_spec_a64_bits, huff_spec_a64_codes, 64, 1, 0, 6, 9, }, + { huff_spec_a61_bits, huff_spec_a61_codes, 64, 1, 0, 6 }, + { huff_spec_a62_bits, huff_spec_a62_codes, 64, 1, 0, 6 }, + { huff_spec_a63_bits, huff_spec_a63_codes, 64, 1, 0, 6 }, + { huff_spec_a64_bits, huff_spec_a64_codes, 64, 1, 0, 6 }, }, { - { huff_spec_a71_bits, huff_spec_a71_codes, 128, 1, 0, 7, 8, }, - { huff_spec_a72_bits, huff_spec_a72_codes, 128, 1, 0, 7, 8, }, - { huff_spec_a73_bits, huff_spec_a73_codes, 128, 1, 0, 7, 9, }, - { huff_spec_a74_bits, huff_spec_a74_codes, 128, 1, 0, 7, 10, }, + { huff_spec_a71_bits, huff_spec_a71_codes, 128, 1, 0, 7 }, + { huff_spec_a72_bits, huff_spec_a72_codes, 128, 1, 0, 7 }, + { huff_spec_a73_bits, huff_spec_a73_codes, 128, 1, 0, 7 }, + { huff_spec_a74_bits, huff_spec_a74_codes, 128, 1, 0, 7 }, }, }, { @@ -1580,39 +1579,39 @@ static const HuffmanCodebook at9_huffman_coeffs[][8][4] = { { { 0 } }, { { 0 }, - { huff_spec_b22_bits, huff_spec_b22_codes, 256, 4, 2, 2, 10, }, - { huff_spec_b23_bits, huff_spec_b23_codes, 256, 4, 2, 2, 10, }, - { huff_spec_b24_bits, huff_spec_b24_codes, 256, 4, 2, 2, 10, }, + { huff_spec_b22_bits, huff_spec_b22_codes, 256, 4, 2, 2 }, + { huff_spec_b23_bits, huff_spec_b23_codes, 256, 4, 2, 2 }, + { huff_spec_b24_bits, huff_spec_b24_codes, 256, 4, 2, 2 }, }, { { 0 }, - { huff_spec_b32_bits, huff_spec_b32_codes, 64, 2, 1, 3, 9, }, - { huff_spec_b33_bits, huff_spec_b33_codes, 64, 2, 1, 3, 10, }, - { huff_spec_b34_bits, huff_spec_b34_codes, 64, 2, 1, 3, 10, }, + { huff_spec_b32_bits, huff_spec_b32_codes, 64, 2, 1, 3 }, + { huff_spec_b33_bits, huff_spec_b33_codes, 64, 2, 1, 3 }, + { huff_spec_b34_bits, huff_spec_b34_codes, 64, 2, 1, 3 }, }, { { 0 }, - { huff_spec_b42_bits, huff_spec_b42_codes, 256, 2, 1, 4, 10, }, - { huff_spec_b43_bits, huff_spec_b43_codes, 256, 2, 1, 4, 10, }, - { huff_spec_b44_bits, huff_spec_b44_codes, 256, 2, 1, 4, 10, }, + { huff_spec_b42_bits, huff_spec_b42_codes, 256, 2, 1, 4 }, + { huff_spec_b43_bits, huff_spec_b43_codes, 256, 2, 1, 4 }, + { huff_spec_b44_bits, huff_spec_b44_codes, 256, 2, 1, 4 }, }, { { 0 }, - { huff_spec_b52_bits, huff_spec_b52_codes, 32, 1, 0, 5, 7, }, - { huff_spec_b53_bits, huff_spec_b53_codes, 32, 1, 0, 5, 8, }, - { huff_spec_b54_bits, huff_spec_b54_codes, 32, 1, 0, 5, 9, }, + { huff_spec_b52_bits, huff_spec_b52_codes, 32, 1, 0, 5 }, + { huff_spec_b53_bits, huff_spec_b53_codes, 32, 1, 0, 5 }, + { huff_spec_b54_bits, huff_spec_b54_codes, 32, 1, 0, 5 }, }, { { 0 }, - { huff_spec_b62_bits, huff_spec_b62_codes, 64, 1, 0, 6, 8, }, - { huff_spec_b63_bits, huff_spec_b63_codes, 64, 1, 0, 6, 9, }, - { huff_spec_b64_bits, huff_spec_b64_codes, 64, 1, 0, 6, 10, }, + { huff_spec_b62_bits, huff_spec_b62_codes, 64, 1, 0, 6 }, + { huff_spec_b63_bits, huff_spec_b63_codes, 64, 1, 0, 6 }, + { huff_spec_b64_bits, huff_spec_b64_codes, 64, 1, 0, 6 }, }, { { 0 }, - { huff_spec_b72_bits, huff_spec_b72_codes, 128, 1, 0, 7, 9, }, - { huff_spec_b73_bits, huff_spec_b73_codes, 128, 1, 0, 7, 10, }, - { huff_spec_b74_bits, huff_spec_b74_codes, 128, 1, 0, 7, 10, }, + { huff_spec_b72_bits, huff_spec_b72_codes, 128, 1, 0, 7 }, + { huff_spec_b73_bits, huff_spec_b73_codes, 128, 1, 0, 7 }, + { huff_spec_b74_bits, huff_spec_b74_codes, 128, 1, 0, 7 }, }, }, }; From patchwork Tue Nov 10 10:48:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23493 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 BE36244B3FF for ; Tue, 10 Nov 2020 12:54:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9BD0468BFA5; Tue, 10 Nov 2020 12:51:03 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5441F68BF71 for ; Tue, 10 Nov 2020 12:50:48 +0200 (EET) Received: by mail-wm1-f68.google.com with SMTP id a3so1218564wmb.5 for ; Tue, 10 Nov 2020 02:50:48 -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=4Tp92Ur2RGs+GrI42juDeTYy8Mdhfw7UMw5jweCYz3s=; b=TiLQD3lkDeT14VhkE0eXI+BA3knrE2t+F/3o8ztPRa1zsxy2/sqWJVR45NIZqJ0kq3 wmeXvtixe8CPosFVOLITb0H88yOMBwLwhjcGQuSd0Ez6kGKNeFDVrVg77h6vqo2oiMFz fLOcD7VquN/PJmNaYh1a2yYEWlTXARUGmzHgxSALoYP2iqw6cqbg+PwlGKRJQsgMmcfi WOaeEUIPBdJCmVIvbiA+YNwmBZBuXRsPFd8ocA49Pt0/pwNoM3zlSG7zD3Tf5ZGU23T7 qvoTwuYeEKoYCtZevlfEQNzzNX3//4+q4xpQfAfiTWLVjag8NaMuGIVr/5ZNtyqq//2g JFcA== 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=4Tp92Ur2RGs+GrI42juDeTYy8Mdhfw7UMw5jweCYz3s=; b=rn5UDRTWaJ94z388cWgoOwZENPI21rB7Bl6hRzJit73Dt8CGgeFag64VXgPl+I3wQu 42kxklNKwBP1HP6KJ/cIxnnMoGjpVW1eHf9No3L0Ad8sv3H4hX777oCZtbXaH8awNWaz qNTu8b+K02mrPtTc9R8pggy+NX+fHTtGok9bjFjuvpwtqFP9Ro6vOC7PRG/u2JFKFHDW rJo6T1aSMA7YF8JX/uKMEkkMZk/K4wRrLBv9z8VROrsfYFVzkt/DIn8R4/ui0GpyK9t4 BPKsSqrK6sZ11uKmgGAGtzL44OSxgSPZOT4xl1/hn5MFVFwUiMIakVSxl/laE39XIk+N MYRw== X-Gm-Message-State: AOAM531q7KsaFJrkwklW9kmgZs+73ZLHV81XhiA9jl9ToJ6/GpLr9WS7 AvvlmH+aI26lz6V1UY89+f4CrBxgkNw= X-Google-Smtp-Source: ABdhPJwClnoJvNes0lxODSw3kJYxWmIgSbkJswbby4jjQ1fRwbwelxZwB3z1ZAe89vL9sYa4f5tnOw== X-Received: by 2002:a1c:3907:: with SMTP id g7mr4029656wma.176.1605005447533; Tue, 10 Nov 2020 02:50:47 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:46 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:27 +0100 Message-Id: <20201110104851.321029-91-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 090/114] avcodec/atrac9dec: Use least max_depth in call to get_vlc2() 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac9dec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index a1af3c22ef..ecf95f1777 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -272,7 +272,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b, c->scalefactors[0] = get_bits(gb, len); for (int i = 1; i < b->band_ext_q_unit; i++) { - int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 2); + int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 1); c->scalefactors[i] = val & ((1 << len) - 1); } @@ -302,7 +302,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b, const VLC *tab = &s->sf_vlc[1][len]; for (int i = 0; i < unit_cnt; i++) { - int dist = get_vlc2(gb, tab->table, 9, 2); + int dist = get_vlc2(gb, tab->table, 9, 1); c->scalefactors[i] = baseline[i] + dist; } @@ -325,7 +325,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b, c->scalefactors[0] = get_bits(gb, len); for (int i = 1; i < unit_cnt; i++) { - int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 2); + int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 1); c->scalefactors[i] = val & ((1 << len) - 1); } From patchwork Tue Nov 10 10:48:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23564 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 2E70F44BA69 for ; Tue, 10 Nov 2020 13:11:34 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5F10468BFAB; Tue, 10 Nov 2020 12:51:04 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2988168BF73 for ; Tue, 10 Nov 2020 12:50:49 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id s8so5054300wrw.10 for ; Tue, 10 Nov 2020 02:50:49 -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=zAEfyK0D8FCXfVdA+6KrlxkCyINpFblxXGWWtiz0hgM=; b=GEg06YXSQ3v+v5CCzljj7i5y+OLNKILr3fxn/Q0idhgKXZbmcGlbqfBcTFCRb/yYqm ecvBFlXt1DX4vtSXW4fAlzj9wb53vbNF4nzLe03ZnTWqAGXWDlDywuC6Pn1mdZXvonMo QOvv9zqex6uSs/w3jj82Lzz5qx/Yz8pFLwVXUK+9q6A6qS5tG4nIWw8ahhSy14iFEk7v ol+2+4Oqs5vosKBvFXaJmBHoTKRrEQpYmpIPeUNucRo//HAroOrKwm0NrYgOo/ZB9M9m DZiHjQFZ0VwwVR+PwdG8+mdLZQL3HQBdweKUx6aWBrAO2gKiTfVtSbxN2XK3P3KYDo2C B9PQ== 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=zAEfyK0D8FCXfVdA+6KrlxkCyINpFblxXGWWtiz0hgM=; b=DY+k3HCl+YReunZchszO1wV9bg3D7Va3OMqBfZMjCQhYrUSQP2BG99kvPwokT9c0gN lp9bbhD3nqZvqMf3uPIuk7qCY5VUAY26ql1xxRF8+3mhnTmVUajcUffAM6XFddSsR5S4 8NhzMHmIw6buQXMaQjQ1A+EzHvMAZGm6lN+JIO6Oa9u69poyBvC2SW31QneVijTR2B+w h1ynfwmijpohBBQgdZM32HXik7G7UfzL9tsgBh3EJXkbCDUJe9Ba2qB05eyCLXCUQmL9 A6nvU29TfRSIDBGSBdLZ8s7dA0gdCmqddQtGjVgqYcImf6h6vMCM059k6ln71hbKvlbr QX7A== X-Gm-Message-State: AOAM533cewI4TCPXtusNcgPGfv3OoHIWc4wqAHIzMffU3Emi2dudwXAs 6KOW/wSoQKnU0+jzZxyPw5ck4rf5aXg= X-Google-Smtp-Source: ABdhPJw/EIBDRWNjP7e3RFkuPF2F8hCSQT7stOlihMXnIfYoz+O6/CalPzBrIyVmI8eUfMUQknLFrA== X-Received: by 2002:a05:6000:345:: with SMTP id e5mr22199873wre.333.1605005448391; Tue, 10 Nov 2020 02:50:48 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id l24sm2572543wmi.7.2020.11.10.02.50.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:50:47 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:48:28 +0100 Message-Id: <20201110104851.321029-92-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 091/114] avcodec/atrac9dec: Don't use unnecessarily large VLC tables 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 more bits for a VLC than the longest code has has no advantage. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac9dec.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index ecf95f1777..0477b304d2 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -26,6 +26,8 @@ #include "libavutil/lfg.h" #include "libavutil/float_dsp.h" +#define ATRAC9_SF_VLC_BITS 8 + typedef struct ATRAC9ChannelData { int band_ext; int q_unit_cnt; @@ -272,7 +274,8 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b, c->scalefactors[0] = get_bits(gb, len); for (int i = 1; i < b->band_ext_q_unit; i++) { - int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 1); + int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, + ATRAC9_SF_VLC_BITS, 1); c->scalefactors[i] = val & ((1 << len) - 1); } @@ -302,7 +305,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b, const VLC *tab = &s->sf_vlc[1][len]; for (int i = 0; i < unit_cnt; i++) { - int dist = get_vlc2(gb, tab->table, 9, 1); + int dist = get_vlc2(gb, tab->table, ATRAC9_SF_VLC_BITS, 1); c->scalefactors[i] = baseline[i] + dist; } @@ -325,7 +328,8 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b, c->scalefactors[0] = get_bits(gb, len); for (int i = 1; i < unit_cnt; i++) { - int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 1); + int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, + ATRAC9_SF_VLC_BITS, 1); c->scalefactors[i] = val & ((1 << len) - 1); } @@ -930,7 +934,8 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) for (int i = 1; i < 7; i++) { const HuffmanCodebook *hf = &at9_huffman_sf_unsigned[i]; - init_vlc(&s->sf_vlc[0][i], 9, hf->size, hf->bits, 1, 1, hf->codes, + init_vlc(&s->sf_vlc[0][i], ATRAC9_SF_VLC_BITS, hf->size, + hf->bits, 1, 1, hf->codes, 2, 2, 0); } @@ -943,7 +948,7 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) for (int j = 0; j < nums; j++) sym[j] = sign_extend(j, hf->value_bits); - ff_init_vlc_sparse(&s->sf_vlc[1][i], 9, hf->size, hf->bits, 1, 1, + ff_init_vlc_sparse(&s->sf_vlc[1][i], ATRAC9_SF_VLC_BITS, hf->size, hf->bits, 1, 1, hf->codes, 2, 2, sym, sizeof(*sym), sizeof(*sym), 0); } From patchwork Tue Nov 10 10:58:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23513 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 541DB449CD8 for ; Tue, 10 Nov 2020 12:58:58 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 386BB68BF7E; Tue, 10 Nov 2020 12:58:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4896C68BE93 for ; Tue, 10 Nov 2020 12:58:57 +0200 (EET) Received: by mail-wr1-f43.google.com with SMTP id 33so12164731wrl.7 for ; Tue, 10 Nov 2020 02:58:57 -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=LWakD2qePuXKDKhCGg6mMh/eCozIOtltRR3w/prJsg4=; b=RZT8+4+4lecuHmCvKK2FHM3Lf2xX8H6NzotKco1DqGoxx7SpYHaqo55x0s/ZkJ4qi3 5K2Z5in/MbGu3ErHlseT+3vm4mOI6xme4Ki/2e+VajZcBA0P28NQHyKepTsd6WLqEJP4 8fk17DcUxZ2cKo1y7ZgLD6aPHGv7XFUrhByOsAVgxZLoxuD8RrMvO4ph270moQkv8IOt JTk/euS/kSyIWhcb2dB4RYJh9QLUvD3Jk4q6XTNMyZ3t511XFEQMu1dCc+gW7NxHPMnx +ds4Q4Kgc7CUQv0SIfqPJWx0kHW0E6dqu9KVW/bANVASUx8PAPTldIDicvh3lYaSUotq H6Hg== 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=LWakD2qePuXKDKhCGg6mMh/eCozIOtltRR3w/prJsg4=; b=aZNQrBRqJe7HerEp4DUPpAoCZz0AmgJ8js3pdBSlEWg9fnHsWEMMxubqeIKbag8O75 YrDL148GYB854Z5oJatAlDFyg4XyzWE+lcd5q4sDL5XDrk9Ne46fbbajWZSSnrF19vAd 3i23oOiUctUA//YzZ6lMDbETIk97Tt0ll2nRxwyH5fKHGTS1sG0SA+jpH3BABoiyp4jF RCozyOu+ek9byX2QmqrMuwitKhYX+Sc3TVnZmylK+gAVrfJ0g4xOdiX835KiNoSpj3SL VOs6NcOpVTzadrvPrt0PskpCrNZHT/ACkdp0E+H00SZ/d9ch03vISPC4MYWVxMNnA4VP WjEw== X-Gm-Message-State: AOAM533OMe4Y5E0JxtPxcjfy6t6egeIJ2nyC9Czkk6GEitdE/tlD2A1r x3yuiCciXvgFHhXrO8CSshSnV0igzQE= X-Google-Smtp-Source: ABdhPJyN+F8qbB0f+JmjHOszOJv6087MiuJhXvD3Svp7nDTyZ7hyUr1MG4qwQTnp0zIFfjnVnOEVoQ== X-Received: by 2002:adf:fd06:: with SMTP id e6mr23447320wrr.206.1605005932994; Tue, 10 Nov 2020 02:58:52 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:58:52 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:14 +0100 Message-Id: <20201110105836.321916-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 092/114] avcodec/atrac9dec: Make tables used to initialize VLCs smaller 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" The ATRAC9 decoder uses VLCs which are currently initialized with static length tables of type uint8_t and code tables of type uint16_t. Furthermore, in one case the actually desired symbols are in the range -16..15 and in order to achieve this an ad-hoc symbols table of type int16_t is calculated. This commit modifies this process by replacing the codes tables by symbols tables and switching to ff_init_vlc_from_lengths(); the signed symbols are stored in the table after having been shifted by 16 to fit into an uint8_t and are shifted back when the VLC is created. This makes all symbols fit into an uint8_t, saving space. Furthermore, the earlier tables had holes in them (entries with length zero that were inserted because the actually used symbols were not contiguous); these holes are unnecessary in the new approach, leading to further saving. Finally, given that now both lengths as well as symbols are of the same type, they can be combined; this saves a pointer for each VLC. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac9dec.c | 31 +- libavcodec/atrac9tab.h | 2185 +++++++++++++++++++--------------------- 2 files changed, 1038 insertions(+), 1178 deletions(-) diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index 0477b304d2..3b26b6b486 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -848,6 +848,7 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) GetBitContext gb; ATRAC9Context *s = avctx->priv_data; int version, block_config_idx, superframe_idx, alloc_c_len; + int ret; s->avctx = avctx; @@ -934,22 +935,25 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) for (int i = 1; i < 7; i++) { const HuffmanCodebook *hf = &at9_huffman_sf_unsigned[i]; - init_vlc(&s->sf_vlc[0][i], ATRAC9_SF_VLC_BITS, hf->size, - hf->bits, 1, 1, hf->codes, - 2, 2, 0); + ret = ff_init_vlc_from_lengths(&s->sf_vlc[0][i], ATRAC9_SF_VLC_BITS, + hf->size, &hf->tab[0][1], 2, + &hf->tab[0][0], 2, 1, 0, 0); + if (ret < 0) + return ret; } /* Signed scalefactor VLCs */ for (int i = 2; i < 6; i++) { const HuffmanCodebook *hf = &at9_huffman_sf_signed[i]; - int nums = hf->size; - int16_t sym[32]; - for (int j = 0; j < nums; j++) - sym[j] = sign_extend(j, hf->value_bits); - - ff_init_vlc_sparse(&s->sf_vlc[1][i], ATRAC9_SF_VLC_BITS, hf->size, hf->bits, 1, 1, - hf->codes, 2, 2, sym, sizeof(*sym), sizeof(*sym), 0); + /* The symbols are signed integers in the range -16..15; + * the values in the source table are offset by 16 to make + * them fit into an uint8_t; the -16 reverses this shift. */ + ret = ff_init_vlc_from_lengths(&s->sf_vlc[1][i], ATRAC9_SF_VLC_BITS, + hf->size, &hf->tab[0][1], 2, + &hf->tab[0][0], 2, 1, -16, 0); + if (ret < 0) + return ret; } /* Coefficient VLCs */ @@ -957,8 +961,11 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) for (int j = 0; j < 8; j++) { for (int k = 0; k < 4; k++) { const HuffmanCodebook *hf = &at9_huffman_coeffs[i][j][k]; - init_vlc(&s->coeff_vlc[i][j][k], 9, hf->size, hf->bits, 1, 1, - hf->codes, 2, 2, 0); + ret = ff_init_vlc_from_lengths(&s->coeff_vlc[i][j][k], 9, + hf->size, &hf->tab[0][1], 2, + &hf->tab[0][0], 2, 1, 0, 0); + if (ret < 0) + return ret; } } } diff --git a/libavcodec/atrac9tab.h b/libavcodec/atrac9tab.h index c25d0e2744..c62b8070d0 100644 --- a/libavcodec/atrac9tab.h +++ b/libavcodec/atrac9tab.h @@ -373,105 +373,70 @@ static const uint8_t at9_tab_b_dist[] = { 27, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, }; -static const uint8_t huff_sfb_a1_bits[] = { - 1, 1, +static const uint8_t huff_sfb_a1_tab[2][2] = { + { 0, 1 }, { 1, 1 }, }; -static const uint16_t huff_sfb_a1_codes[] = { - 0x00, 0x01, +static const uint8_t huff_sfb_a2_tab[4][2] = { + { 0, 1 }, { 3, 2 }, { 1, 3 }, { 2, 3 }, }; -static const uint8_t huff_sfb_a2_bits[] = { - 1, 3, 3, 2, +static const uint8_t huff_sfb_a3_tab[8][2] = { + { 0, 2 }, { 1, 2 }, { 7, 2 }, { 6, 3 }, { 2, 4 }, { 5, 5 }, { 3, 6 }, + { 4, 6 }, }; -static const uint16_t huff_sfb_a2_codes[] = { - 0x00, 0x06, 0x07, 0x02, +static const uint8_t huff_sfb_a4_tab[16][2] = { + { 2, 4 }, { 14, 4 }, { 11, 8 }, { 10, 8 }, { 9, 8 }, { 6, 8 }, { 7, 8 }, + { 8, 8 }, { 5, 7 }, { 13, 5 }, { 3, 5 }, { 12, 6 }, { 4, 6 }, { 0, 2 }, + { 1, 2 }, { 15, 2 }, }; -static const uint8_t huff_sfb_a3_bits[] = { - 2, 2, 4, 6, 6, 5, 3, 2, +static const uint8_t huff_sfb_a5_tab[32][2] = { + { 31, 3 }, { 1, 3 }, { 26, 7 }, { 7, 7 }, { 20, 8 }, { 21, 8 }, { 23, 8 }, + { 22, 8 }, { 29, 5 }, { 30, 4 }, { 4, 5 }, { 11, 8 }, { 24, 8 }, { 9, 8 }, + { 10, 8 }, { 6, 6 }, { 25, 7 }, { 19, 8 }, { 12, 8 }, { 27, 6 }, { 18, 8 }, + { 13, 8 }, { 16, 8 }, { 17, 8 }, { 14, 8 }, { 15, 8 }, { 8, 7 }, { 0, 2 }, + { 5, 5 }, { 28, 5 }, { 3, 4 }, { 2, 3 }, }; -static const uint16_t huff_sfb_a3_codes[] = { - 0x00, 0x01, 0x0E, 0x3E, 0x3F, 0x1E, 0x06, 0x02, +static const uint8_t huff_sfb_a6_tab[64][2] = { + { 0, 3 }, { 1, 3 }, { 2, 4 }, { 3, 4 }, { 61, 4 }, { 62, 4 }, { 63, 4 }, + { 4, 5 }, { 5, 5 }, { 58, 5 }, { 59, 5 }, { 60, 5 }, { 6, 6 }, { 7, 6 }, + { 8, 6 }, { 56, 6 }, { 57, 6 }, { 9, 7 }, { 10, 7 }, { 53, 7 }, { 54, 7 }, + { 55, 7 }, { 11, 8 }, { 12, 8 }, { 13, 8 }, { 14, 8 }, { 15, 8 }, { 16, 8 }, + { 17, 8 }, { 18, 8 }, { 19, 8 }, { 20, 8 }, { 21, 8 }, { 22, 8 }, { 23, 8 }, + { 24, 8 }, { 25, 8 }, { 26, 8 }, { 27, 8 }, { 28, 8 }, { 29, 8 }, { 30, 8 }, + { 31, 8 }, { 32, 8 }, { 33, 8 }, { 34, 8 }, { 35, 8 }, { 36, 8 }, { 37, 8 }, + { 38, 8 }, { 39, 8 }, { 40, 8 }, { 41, 8 }, { 42, 8 }, { 43, 8 }, { 44, 8 }, + { 45, 8 }, { 46, 8 }, { 47, 8 }, { 48, 8 }, { 49, 8 }, { 50, 8 }, { 51, 8 }, + { 52, 8 }, }; -static const uint8_t huff_sfb_a4_bits[] = { - 2, 2, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 6, 5, 4, 2, +static const uint8_t huff_sfb_b2_tab[3][2] = { + { 16, 1 }, { 15, 2 }, { 17, 2 }, }; -static const uint16_t huff_sfb_a4_codes[] = { - 0x01, 0x02, 0x00, 0x06, 0x0F, 0x13, 0x23, 0x24, - 0x25, 0x22, 0x21, 0x20, 0x0E, 0x05, 0x01, 0x03, +static const uint8_t huff_sfb_b3_tab[7][2] = { + { 17, 3 }, { 18, 5 }, { 13, 6 }, { 19, 6 }, { 14, 4 }, { 15, 2 }, { 16, 1 }, }; -static const uint8_t huff_sfb_a5_bits[] = { - 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 6, 5, 5, 4, 3, +static const uint8_t huff_sfb_b4_tab[15][2] = { + { 15, 3 }, { 17, 3 }, { 18, 4 }, { 13, 6 }, { 12, 6 }, { 21, 7 }, { 22, 8 }, + { 10, 8 }, { 9, 8 }, { 23, 8 }, { 11, 7 }, { 14, 4 }, { 19, 5 }, { 20, 5 }, + { 16, 1 }, }; -static const uint16_t huff_sfb_a5_codes[] = { - 0x02, 0x01, 0x07, 0x0D, 0x0C, 0x18, 0x1B, 0x21, 0x3F, 0x6A, 0x6B, 0x68, - 0x73, 0x79, 0x7C, 0x7D, 0x7A, 0x7B, 0x78, 0x72, 0x44, 0x45, 0x47, 0x46, - 0x69, 0x38, 0x20, 0x1D, 0x19, 0x09, 0x05, 0x00, -}; - -static const uint8_t huff_sfb_a6_bits[] = { - 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, -}; - -static const uint16_t huff_sfb_a6_codes[] = { - 0x00, 0x01, 0x04, 0x05, 0x12, 0x13, 0x2E, 0x2F, 0x30, 0x66, 0x67, 0xD6, - 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, - 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, - 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, - 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0x68, 0x69, 0x6A, 0x31, 0x32, 0x14, 0x15, - 0x16, 0x06, 0x07, 0x08, -}; - -static const uint8_t huff_sfb_b2_bits[] = { - 1, 2, 0, 2, -}; - -static const uint16_t huff_sfb_b2_codes[] = { - 0x00, 0x03, 0x00, 0x02, -}; - -static const uint8_t huff_sfb_b3_bits[] = { - 1, 3, 5, 6, 0, 6, 4, 2, -}; - -static const uint16_t huff_sfb_b3_codes[] = { - 0x01, 0x00, 0x04, 0x0B, 0x00, 0x0A, 0x03, 0x01, -}; - -static const uint8_t huff_sfb_b4_bits[] = { - 1, 3, 4, 5, 5, 7, 8, 8, 0, 8, 8, 7, 6, 6, 4, 3, -}; - -static const uint16_t huff_sfb_b4_codes[] = { - 0x01, 0x01, 0x04, 0x0E, 0x0F, 0x2C, 0x5A, 0x5D, 0x00, 0x5C, 0x5B, 0x2F, - 0x15, 0x14, 0x06, 0x00, -}; - -static const uint8_t huff_sfb_b5_bits[] = { - 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 7, 7, 8, 8, - 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 3, -}; - -static const uint16_t huff_sfb_b5_codes[] = { - 0x00, 0x05, 0x07, 0x0C, 0x04, 0x02, 0x03, 0x05, 0x09, 0x10, 0x23, 0x33, - 0x36, 0x6E, 0x60, 0x65, 0x62, 0x61, 0x63, 0x64, 0x6F, 0x6D, 0x6C, 0x6B, - 0x6A, 0x68, 0x69, 0x45, 0x44, 0x37, 0x1A, 0x07, +static const uint8_t huff_sfb_b5_tab[32][2] = { + { 16, 3 }, { 21, 4 }, { 22, 4 }, { 20, 4 }, { 23, 4 }, { 30, 8 }, { 1, 8 }, + { 0, 8 }, { 2, 8 }, { 3, 8 }, { 31, 8 }, { 27, 7 }, { 14, 6 }, { 28, 7 }, + { 13, 7 }, { 18, 4 }, { 25, 5 }, { 12, 7 }, { 11, 7 }, { 26, 6 }, { 24, 4 }, + { 17, 3 }, { 19, 4 }, { 9, 7 }, { 10, 7 }, { 8, 7 }, { 7, 7 }, { 6, 7 }, + { 5, 7 }, { 29, 7 }, { 4, 7 }, { 15, 3 }, }; typedef struct HuffmanCodebook { - const uint8_t *bits; - const uint16_t *codes; + const uint8_t (*tab)[2]; const int size; const int value_cnt; const int value_cnt_pow; @@ -480,1057 +445,945 @@ typedef struct HuffmanCodebook { static const HuffmanCodebook at9_huffman_sf_unsigned[] = { { 0 }, - { huff_sfb_a1_bits, huff_sfb_a1_codes, 2, 1, 0, 1 }, - { huff_sfb_a2_bits, huff_sfb_a2_codes, 4, 1, 0, 2 }, - { huff_sfb_a3_bits, huff_sfb_a3_codes, 8, 1, 0, 3 }, - { huff_sfb_a4_bits, huff_sfb_a4_codes, 16, 1, 0, 4 }, - { huff_sfb_a5_bits, huff_sfb_a5_codes, 32, 1, 0, 5 }, - { huff_sfb_a6_bits, huff_sfb_a6_codes, 64, 1, 0, 6 }, + { huff_sfb_a1_tab, 2, 1, 0, 1 }, + { huff_sfb_a2_tab, 4, 1, 0, 2 }, + { huff_sfb_a3_tab, 8, 1, 0, 3 }, + { huff_sfb_a4_tab, 16, 1, 0, 4 }, + { huff_sfb_a5_tab, 32, 1, 0, 5 }, + { huff_sfb_a6_tab, 64, 1, 0, 6 }, }; static const HuffmanCodebook at9_huffman_sf_signed[] = { { 0 }, { 0 }, - { huff_sfb_b2_bits, huff_sfb_b2_codes, 4, 1, 0, 2 }, - { huff_sfb_b3_bits, huff_sfb_b3_codes, 8, 1, 0, 3 }, - { huff_sfb_b4_bits, huff_sfb_b4_codes, 16, 1, 0, 4 }, - { huff_sfb_b5_bits, huff_sfb_b5_codes, 32, 1, 0, 5 }, -}; - -static const uint8_t huff_spec_a21_bits[] = { - 0, 3, 0, 3, 3, 3, 0, 3, 0, 0, 0, 0, 3, 3, 0, 3, -}; - -static const uint16_t huff_spec_a21_codes[] = { - 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x06, -}; - -static const uint8_t huff_spec_a22_bits[] = { - 0, 4, 0, 4, 5, 6, 0, 6, 0, 0, 0, 0, 5, 6, 0, 6, - 5, 6, 0, 6, 6, 7, 0, 7, 0, 0, 0, 0, 6, 7, 0, 7, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 6, 0, 6, 6, 7, 0, 7, 0, 0, 0, 0, 6, 7, 0, 7, - 5, 6, 0, 6, 7, 7, 0, 7, 0, 0, 0, 0, 6, 7, 0, 7, - 6, 7, 0, 7, 7, 8, 0, 8, 0, 0, 0, 0, 7, 8, 0, 7, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 7, 0, 7, 7, 8, 0, 8, 0, 0, 0, 0, 7, 7, 0, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 6, 0, 6, 6, 7, 0, 7, 0, 0, 0, 0, 7, 7, 0, 7, - 6, 7, 0, 7, 7, 8, 0, 7, 0, 0, 0, 0, 7, 8, 0, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 7, 0, 7, 7, 7, 0, 8, 0, 0, 0, 0, 7, 8, 0, 8, -}; - -static const uint16_t huff_spec_a22_codes[] = { - 0x00, 0x02, 0x00, 0x03, 0x10, 0x3C, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0x00, 0x3D, - 0x0E, 0x00, 0x00, 0x39, 0x18, 0x26, 0x00, 0x75, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x24, 0x00, 0x6D, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0F, 0x38, 0x00, 0x01, 0x1A, 0x6C, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x19, 0x74, 0x00, 0x27, - 0x16, 0x14, 0x00, 0x17, 0x76, 0x06, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x35, 0x64, 0x00, 0x6F, - 0x26, 0x04, 0x00, 0x63, 0x22, 0xA2, 0x00, 0x97, 0x00, 0x00, 0x00, 0x00, 0x67, 0xA0, 0x00, 0x0D, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x2B, 0x52, 0x00, 0x0B, 0x20, 0x92, 0x00, 0x91, 0x00, 0x00, 0x00, 0x00, 0x61, 0x0E, 0x00, 0x95, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x17, 0x16, 0x00, 0x15, 0x34, 0x6E, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x77, 0x08, 0x00, 0x07, - 0x2A, 0x0A, 0x00, 0x53, 0x60, 0x94, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x21, 0x90, 0x00, 0x93, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x62, 0x00, 0x05, 0x66, 0x0C, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x23, 0x96, 0x00, 0xA3, -}; - -static const uint8_t huff_spec_a23_bits[] = { - 3, 4, 0, 4, 5, 6, 0, 6, 0, 0, 0, 0, 5, 6, 0, 6, - 5, 7, 0, 6, 6, 8, 0, 7, 0, 0, 0, 0, 6, 8, 0, 7, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 6, 0, 7, 6, 7, 0, 8, 0, 0, 0, 0, 6, 7, 0, 8, - 5, 6, 0, 6, 7, 8, 0, 8, 0, 0, 0, 0, 6, 7, 0, 7, - 6, 8, 0, 7, 8, 9, 0, 9, 0, 0, 0, 0, 7, 9, 0, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 8, 0, 8, 8, 9, 0, 9, 0, 0, 0, 0, 7, 8, 0, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 6, 0, 6, 6, 7, 0, 7, 0, 0, 0, 0, 7, 8, 0, 8, - 6, 8, 0, 8, 7, 9, 0, 8, 0, 0, 0, 0, 8, 9, 0, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 7, 0, 8, 7, 8, 0, 9, 0, 0, 0, 0, 8, 9, 0, 9, -}; - -static const uint16_t huff_spec_a23_codes[] = { - 0x006, 0x002, 0x000, 0x003, 0x016, 0x01E, 0x000, 0x021, 0x000, 0x000, 0x000, 0x000, - 0x017, 0x020, 0x000, 0x01F, 0x01C, 0x054, 0x000, 0x027, 0x010, 0x0A6, 0x000, 0x027, - 0x000, 0x000, 0x000, 0x000, 0x015, 0x0A4, 0x000, 0x02D, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x01D, 0x026, 0x000, 0x055, 0x014, 0x02C, 0x000, 0x0A5, 0x000, 0x000, 0x000, 0x000, - 0x011, 0x026, 0x000, 0x0A7, 0x01E, 0x000, 0x000, 0x003, 0x04A, 0x074, 0x000, 0x071, - 0x000, 0x000, 0x000, 0x000, 0x023, 0x00A, 0x000, 0x009, 0x018, 0x072, 0x000, 0x00D, - 0x0A2, 0x15A, 0x000, 0x123, 0x000, 0x000, 0x000, 0x000, 0x00F, 0x158, 0x000, 0x05D, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x01B, 0x0AE, 0x000, 0x077, 0x092, 0x140, 0x000, 0x121, - 0x000, 0x000, 0x000, 0x000, 0x025, 0x05E, 0x000, 0x143, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x01F, 0x002, 0x000, 0x001, 0x022, 0x008, 0x000, 0x00B, 0x000, 0x000, 0x000, 0x000, - 0x04B, 0x070, 0x000, 0x075, 0x01A, 0x076, 0x000, 0x0AF, 0x024, 0x142, 0x000, 0x05F, - 0x000, 0x000, 0x000, 0x000, 0x093, 0x120, 0x000, 0x141, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x019, 0x00C, 0x000, 0x073, 0x00E, 0x05C, 0x000, 0x159, 0x000, 0x000, 0x000, 0x000, - 0x0A3, 0x122, 0x000, 0x15B, -}; - -static const uint8_t huff_spec_a24_bits[] = { - 2, 4, 0, 4, 5, 6, 0, 6, 0, 0, 0, 0, 5, 6, 0, 6, - 5, 7, 0, 6, 6, 8, 0, 8, 0, 0, 0, 0, 6, 8, 0, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 6, 0, 7, 6, 8, 0, 8, 0, 0, 0, 0, 6, 8, 0, 8, - 5, 7, 0, 7, 7, 9, 0, 9, 0, 0, 0, 0, 6, 8, 0, 8, - 6, 9, 0, 8, 8, 10, 0, 10, 0, 0, 0, 0, 8, 10, 0, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 8, 0, 9, 9, 10, 0, 10, 0, 0, 0, 0, 8, 9, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 7, 0, 7, 6, 8, 0, 8, 0, 0, 0, 0, 7, 9, 0, 9, - 6, 9, 0, 8, 8, 10, 0, 9, 0, 0, 0, 0, 9, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 8, 0, 9, 8, 9, 0, 10, 0, 0, 0, 0, 8, 10, 0, 10, -}; - -static const uint16_t huff_spec_a24_codes[] = { - 0x002, 0x002, 0x000, 0x003, 0x01E, 0x010, 0x000, 0x013, 0x000, 0x000, 0x000, 0x000, - 0x01F, 0x012, 0x000, 0x011, 0x01A, 0x030, 0x000, 0x01B, 0x000, 0x064, 0x000, 0x0C1, - 0x000, 0x000, 0x000, 0x000, 0x003, 0x052, 0x000, 0x07D, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x01B, 0x01A, 0x000, 0x031, 0x002, 0x07C, 0x000, 0x053, 0x000, 0x000, 0x000, 0x000, - 0x001, 0x0C0, 0x000, 0x065, 0x01C, 0x062, 0x000, 0x065, 0x02A, 0x198, 0x000, 0x19B, - 0x000, 0x000, 0x000, 0x000, 0x017, 0x078, 0x000, 0x07B, 0x004, 0x0FE, 0x000, 0x077, - 0x050, 0x33A, 0x000, 0x1F9, 0x000, 0x000, 0x000, 0x000, 0x073, 0x338, 0x000, 0x0E1, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x007, 0x066, 0x000, 0x187, 0x19E, 0x308, 0x000, 0x30B, - 0x000, 0x000, 0x000, 0x000, 0x075, 0x0E2, 0x000, 0x1FB, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x01D, 0x064, 0x000, 0x063, 0x016, 0x07A, 0x000, 0x079, 0x000, 0x000, 0x000, 0x000, - 0x02B, 0x19A, 0x000, 0x199, 0x006, 0x186, 0x000, 0x067, 0x074, 0x1FA, 0x000, 0x0E3, - 0x000, 0x000, 0x000, 0x000, 0x19F, 0x30A, 0x000, 0x309, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x005, 0x076, 0x000, 0x0FF, 0x072, 0x0E0, 0x000, 0x339, 0x000, 0x000, 0x000, 0x000, - 0x051, 0x1F8, 0x000, 0x33B, -}; - -static const uint8_t huff_spec_a31_bits[] = { - 0, 0, 4, 5, 0, 5, 4, 0, 0, 0, 5, 5, 0, 5, 5, 0, - 5, 5, 6, 6, 0, 6, 5, 5, 5, 6, 6, 7, 0, 7, 6, 6, - 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 6, 7, 0, 7, 6, 6, - 5, 5, 5, 6, 0, 6, 6, 5, 0, 0, 5, 5, 0, 5, 5, 0, -}; - -static const uint16_t huff_spec_a31_codes[] = { - 0x00, 0x00, 0x02, 0x18, 0x00, 0x19, 0x03, 0x00, 0x00, 0x00, 0x12, 0x02, 0x00, 0x09, 0x15, 0x00, - 0x1A, 0x0A, 0x3E, 0x2C, 0x00, 0x2F, 0x01, 0x0D, 0x0E, 0x38, 0x20, 0x78, 0x00, 0x7B, 0x23, 0x3B, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x3A, 0x22, 0x7A, 0x00, 0x79, 0x21, 0x39, - 0x1B, 0x0C, 0x00, 0x2E, 0x00, 0x2D, 0x3F, 0x0B, 0x00, 0x00, 0x14, 0x08, 0x00, 0x03, 0x13, 0x00, -}; - -static const uint8_t huff_spec_a32_bits[] = { - 4, 5, 5, 6, 0, 6, 5, 5, 5, 6, 5, 6, 0, 6, 5, 5, - 5, 5, 6, 7, 0, 7, 6, 5, 6, 6, 7, 7, 0, 7, 7, 6, - 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 7, 7, 0, 7, 7, 6, - 5, 5, 6, 7, 0, 7, 6, 5, 5, 5, 5, 6, 0, 6, 5, 6, -}; - -static const uint16_t huff_spec_a32_codes[] = { - 0x0D, 0x18, 0x16, 0x3A, 0x00, 0x3B, 0x17, 0x19, 0x12, 0x3E, 0x08, 0x1C, 0x00, 0x1B, 0x07, 0x01, - 0x10, 0x02, 0x28, 0x78, 0x00, 0x7B, 0x1F, 0x05, 0x2A, 0x16, 0x72, 0x2A, 0x00, 0x29, 0x71, 0x19, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x18, 0x70, 0x28, 0x00, 0x2B, 0x73, 0x17, - 0x11, 0x04, 0x1E, 0x7A, 0x00, 0x79, 0x29, 0x03, 0x13, 0x00, 0x06, 0x1A, 0x00, 0x1D, 0x09, 0x3F, -}; - -static const uint8_t huff_spec_a33_bits[] = { - 3, 4, 5, 6, 0, 6, 5, 4, 4, 5, 6, 7, 0, 7, 6, 5, - 5, 6, 6, 7, 0, 7, 6, 6, 6, 7, 8, 8, 0, 8, 8, 7, - 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 8, 0, 8, 8, 7, - 5, 6, 6, 7, 0, 7, 6, 6, 4, 5, 6, 7, 0, 7, 6, 5, -}; - -static const uint16_t huff_spec_a33_codes[] = { - 0x05, 0x06, 0x10, 0x08, 0x00, 0x09, 0x11, 0x07, 0x04, 0x12, 0x3E, 0x6A, 0x00, 0x6D, 0x3D, 0x19, - 0x06, 0x3A, 0x06, 0x02, 0x00, 0x01, 0x05, 0x39, 0x02, 0x16, 0xDC, 0x2A, 0x00, 0x29, 0xDF, 0x69, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x68, 0xDE, 0x28, 0x00, 0x2B, 0xDD, 0x17, - 0x07, 0x38, 0x04, 0x00, 0x00, 0x03, 0x07, 0x3B, 0x05, 0x18, 0x3C, 0x6C, 0x00, 0x6B, 0x3F, 0x13, -}; - -static const uint8_t huff_spec_a34_bits[] = { - 2, 4, 5, 7, 0, 7, 5, 4, 4, 5, 6, 8, 0, 8, 6, 5, - 5, 6, 7, 8, 0, 8, 7, 6, 7, 8, 8, 10, 0, 10, 9, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 0, 10, 8, 8, - 5, 6, 7, 8, 0, 8, 7, 6, 4, 5, 6, 8, 0, 8, 6, 5, -}; - -static const uint16_t huff_spec_a34_codes[] = { - 0x000, 0x00A, 0x00A, 0x034, 0x000, 0x035, 0x00B, 0x00B, 0x008, 0x01C, 0x032, 0x0DA, - 0x000, 0x0DD, 0x035, 0x01F, 0x008, 0x01E, 0x03A, 0x06C, 0x000, 0x063, 0x039, 0x031, - 0x032, 0x06E, 0x060, 0x37A, 0x000, 0x379, 0x1BF, 0x0D9, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x033, 0x0D8, 0x1BE, 0x378, 0x000, 0x37B, 0x061, 0x06F, - 0x009, 0x030, 0x038, 0x062, 0x000, 0x06D, 0x03B, 0x01F, 0x009, 0x01E, 0x034, 0x0DC, - 0x000, 0x0DB, 0x033, 0x01D, -}; - -static const uint8_t huff_spec_a41_bits[] = { - 0, 0, 0, 0, 6, 6, 7, 7, 0, 7, 7, 6, 6, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 7, 7, 0, 7, 7, 7, 6, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 7, 8, 0, 8, 7, 7, 7, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 8, 8, 0, 8, 8, 7, 7, 0, 0, 0, - 7, 7, 7, 8, 7, 8, 8, 8, 0, 8, 8, 8, 7, 8, 7, 7, - 7, 7, 7, 7, 8, 8, 8, 9, 0, 8, 8, 8, 8, 7, 7, 7, - 7, 7, 8, 8, 8, 8, 9, 9, 0, 9, 8, 8, 8, 8, 8, 7, - 8, 8, 8, 8, 8, 9, 9, 9, 0, 9, 9, 9, 8, 8, 8, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8, 8, 8, 8, 8, 9, 9, 9, 0, 9, 9, 9, 8, 8, 8, 8, - 7, 7, 8, 8, 8, 8, 8, 9, 0, 9, 9, 8, 8, 8, 8, 7, - 7, 7, 7, 7, 8, 8, 8, 8, 0, 9, 8, 8, 8, 7, 7, 7, - 7, 7, 7, 8, 7, 8, 8, 8, 0, 8, 8, 8, 7, 8, 7, 7, - 0, 0, 0, 0, 7, 7, 8, 8, 0, 8, 8, 7, 7, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 7, 8, 0, 8, 7, 7, 7, 0, 0, 0, - 0, 0, 0, 0, 6, 7, 7, 7, 0, 7, 7, 7, 7, 0, 0, 0, -}; - -static const uint16_t huff_spec_a41_codes[] = { - 0x000, 0x000, 0x000, 0x000, 0x018, 0x00E, 0x05E, 0x028, 0x000, 0x029, 0x05F, 0x00F, - 0x019, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x076, 0x06E, 0x03E, 0x004, - 0x000, 0x017, 0x045, 0x07B, 0x013, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x04A, 0x048, 0x010, 0x0CE, 0x000, 0x0E1, 0x023, 0x055, 0x053, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x008, 0x018, 0x0D6, 0x09E, 0x000, 0x09D, 0x0E5, 0x02B, - 0x01B, 0x000, 0x000, 0x000, 0x07C, 0x05C, 0x038, 0x0FC, 0x002, 0x0D2, 0x09A, 0x05C, - 0x000, 0x06B, 0x0A3, 0x0D9, 0x00F, 0x0FF, 0x03D, 0x061, 0x074, 0x056, 0x036, 0x000, - 0x0CC, 0x08C, 0x058, 0x1E2, 0x000, 0x00F, 0x05F, 0x0A1, 0x0D5, 0x00D, 0x03B, 0x059, - 0x040, 0x014, 0x0DA, 0x0B6, 0x084, 0x040, 0x1E0, 0x196, 0x000, 0x1A1, 0x00D, 0x043, - 0x087, 0x0C7, 0x0E3, 0x00B, 0x0F2, 0x0C4, 0x08E, 0x05A, 0x024, 0x1CC, 0x194, 0x168, - 0x000, 0x16B, 0x1A3, 0x1CF, 0x027, 0x069, 0x099, 0x0C9, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x0F3, 0x0C8, 0x098, 0x068, 0x026, 0x1CE, 0x1A2, 0x16A, 0x000, 0x169, 0x195, 0x1CD, - 0x025, 0x05B, 0x08F, 0x0C5, 0x041, 0x00A, 0x0E2, 0x0C6, 0x086, 0x042, 0x00C, 0x1A0, - 0x000, 0x197, 0x1E1, 0x041, 0x085, 0x0B7, 0x0DB, 0x015, 0x075, 0x058, 0x03A, 0x00C, - 0x0D4, 0x0A0, 0x05E, 0x00E, 0x000, 0x1E3, 0x059, 0x08D, 0x0CD, 0x001, 0x037, 0x057, - 0x07D, 0x060, 0x03C, 0x0FE, 0x00E, 0x0D8, 0x0A2, 0x06A, 0x000, 0x05D, 0x09B, 0x0D3, - 0x003, 0x0FD, 0x039, 0x05D, 0x000, 0x000, 0x000, 0x000, 0x01A, 0x02A, 0x0E4, 0x09C, - 0x000, 0x09F, 0x0D7, 0x019, 0x009, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x052, 0x054, 0x022, 0x0E0, 0x000, 0x0CF, 0x011, 0x049, 0x04B, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x012, 0x07A, 0x044, 0x016, 0x000, 0x005, 0x03F, 0x06F, - 0x077, 0x000, 0x000, 0x000, -}; - -static const uint8_t huff_spec_a42_bits[] = { - 5, 6, 7, 7, 7, 7, 8, 8, 0, 8, 8, 7, 7, 7, 7, 6, - 6, 7, 7, 8, 7, 7, 8, 8, 0, 8, 8, 7, 7, 8, 7, 7, - 7, 7, 8, 8, 7, 8, 8, 9, 0, 9, 8, 8, 7, 8, 8, 7, - 8, 8, 8, 8, 8, 8, 8, 9, 0, 9, 8, 8, 8, 8, 8, 8, - 7, 7, 7, 8, 8, 8, 9, 9, 0, 9, 9, 8, 8, 8, 7, 7, - 7, 7, 8, 8, 8, 9, 9, 9, 0, 9, 9, 9, 8, 8, 8, 7, - 8, 8, 8, 8, 9, 9, 9, 10, 0, 10, 9, 9, 9, 8, 8, 8, - 8, 8, 9, 9, 9, 9, 10, 10, 0, 10, 10, 9, 9, 9, 9, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8, 9, 9, 9, 9, 9, 10, 10, 0, 10, 10, 9, 9, 9, 9, 8, - 8, 8, 8, 8, 9, 9, 9, 10, 0, 10, 9, 9, 9, 8, 8, 8, - 7, 7, 8, 8, 8, 9, 9, 9, 0, 9, 9, 9, 8, 8, 8, 7, - 7, 7, 7, 8, 8, 8, 9, 9, 0, 9, 9, 8, 8, 8, 7, 7, - 8, 8, 8, 8, 8, 8, 8, 9, 0, 9, 8, 8, 8, 8, 8, 8, - 7, 7, 8, 8, 7, 8, 8, 9, 0, 9, 8, 8, 7, 8, 8, 7, - 6, 7, 7, 8, 7, 7, 8, 8, 0, 8, 8, 7, 7, 8, 7, 7, -}; - -static const uint16_t huff_spec_a42_codes[] = { - 0x003, 0x018, 0x058, 0x000, 0x066, 0x03C, 0x0D6, 0x07C, 0x000, 0x07D, 0x0D7, 0x03D, - 0x067, 0x001, 0x059, 0x019, 0x002, 0x064, 0x036, 0x0DA, 0x04C, 0x01C, 0x0BE, 0x02C, - 0x000, 0x037, 0x0C5, 0x029, 0x04B, 0x0E7, 0x03B, 0x069, 0x044, 0x02E, 0x0FA, 0x092, - 0x020, 0x0F8, 0x086, 0x1FC, 0x000, 0x1E7, 0x07F, 0x0F5, 0x023, 0x0AD, 0x0FD, 0x02D, - 0x0F6, 0x0DC, 0x09C, 0x03E, 0x0F0, 0x0B6, 0x026, 0x186, 0x000, 0x18D, 0x02F, 0x0B5, - 0x0E1, 0x03D, 0x0AF, 0x0D9, 0x054, 0x040, 0x014, 0x0EC, 0x0BC, 0x054, 0x1C6, 0x108, - 0x000, 0x10B, 0x1C5, 0x069, 0x0B9, 0x0DF, 0x019, 0x047, 0x026, 0x008, 0x0E4, 0x0A2, - 0x056, 0x1DC, 0x142, 0x06A, 0x000, 0x091, 0x123, 0x1DF, 0x04B, 0x0A7, 0x0EB, 0x00B, - 0x0C0, 0x09E, 0x06A, 0x022, 0x1AA, 0x140, 0x092, 0x3CA, 0x000, 0x3A7, 0x04B, 0x121, - 0x18F, 0x007, 0x071, 0x0A5, 0x020, 0x004, 0x1A8, 0x174, 0x0E4, 0x068, 0x3A4, 0x2EE, - 0x000, 0x2ED, 0x3C9, 0x049, 0x0E7, 0x185, 0x1D1, 0x1FF, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x021, 0x1FE, 0x1D0, 0x184, 0x0E6, 0x048, 0x3C8, 0x2EC, 0x000, 0x2EF, 0x3A5, 0x069, - 0x0E5, 0x175, 0x1A9, 0x005, 0x0C1, 0x0A4, 0x070, 0x006, 0x18E, 0x120, 0x04A, 0x3A6, - 0x000, 0x3CB, 0x093, 0x141, 0x1AB, 0x023, 0x06B, 0x09F, 0x027, 0x00A, 0x0EA, 0x0A6, - 0x04A, 0x1DE, 0x122, 0x090, 0x000, 0x06B, 0x143, 0x1DD, 0x057, 0x0A3, 0x0E5, 0x009, - 0x055, 0x046, 0x018, 0x0DE, 0x0B8, 0x068, 0x1C4, 0x10A, 0x000, 0x109, 0x1C7, 0x055, - 0x0BD, 0x0ED, 0x015, 0x041, 0x0F7, 0x0D8, 0x0AE, 0x03C, 0x0E0, 0x0B4, 0x02E, 0x18C, - 0x000, 0x187, 0x027, 0x0B7, 0x0F1, 0x03F, 0x09D, 0x0DD, 0x045, 0x02C, 0x0FC, 0x0AC, - 0x022, 0x0F4, 0x07E, 0x1E6, 0x000, 0x1FD, 0x087, 0x0F9, 0x021, 0x093, 0x0FB, 0x02F, - 0x003, 0x068, 0x03A, 0x0E6, 0x04A, 0x028, 0x0C4, 0x036, 0x000, 0x02D, 0x0BF, 0x01D, - 0x04D, 0x0DB, 0x037, 0x065, -}; - -static const uint8_t huff_spec_a43_bits[] = { - 4, 6, 6, 7, 7, 8, 8, 9, 0, 9, 8, 8, 7, 7, 6, 6, - 5, 6, 7, 7, 7, 8, 8, 9, 0, 9, 8, 8, 7, 7, 7, 6, - 6, 7, 7, 7, 8, 8, 9, 9, 0, 9, 9, 8, 8, 7, 7, 7, - 7, 7, 7, 8, 8, 8, 9, 10, 0, 10, 9, 9, 8, 8, 7, 7, - 7, 7, 8, 8, 8, 9, 10, 10, 0, 10, 10, 9, 8, 8, 8, 7, - 8, 8, 8, 9, 9, 9, 10, 10, 0, 10, 10, 9, 9, 9, 8, 8, - 8, 9, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 9, - 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, - 8, 9, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 9, - 8, 8, 8, 9, 9, 9, 10, 10, 0, 10, 10, 9, 9, 9, 8, 8, - 7, 7, 8, 8, 8, 9, 10, 10, 0, 10, 10, 9, 8, 8, 8, 7, - 7, 7, 7, 8, 8, 9, 9, 10, 0, 10, 9, 8, 8, 8, 7, 7, - 6, 7, 7, 7, 8, 8, 9, 9, 0, 9, 9, 8, 8, 7, 7, 7, - 5, 6, 7, 7, 7, 8, 8, 9, 0, 9, 8, 8, 7, 7, 7, 6, -}; - -static const uint16_t huff_spec_a43_codes[] = { - 0x002, 0x03E, 0x016, 0x060, 0x04E, 0x0DC, 0x04A, 0x130, 0x000, 0x131, 0x04B, 0x0DD, - 0x04F, 0x061, 0x017, 0x03F, 0x002, 0x02C, 0x076, 0x042, 0x034, 0x0CE, 0x002, 0x0E8, - 0x000, 0x0CF, 0x001, 0x0D1, 0x037, 0x045, 0x07B, 0x02F, 0x014, 0x072, 0x052, 0x01A, - 0x0E0, 0x080, 0x198, 0x01E, 0x000, 0x01D, 0x19B, 0x083, 0x0DF, 0x019, 0x055, 0x079, - 0x050, 0x03C, 0x004, 0x0C4, 0x096, 0x00C, 0x0EA, 0x34A, 0x000, 0x34F, 0x0ED, 0x1D7, - 0x095, 0x0AF, 0x003, 0x03F, 0x046, 0x026, 0x0D6, 0x092, 0x046, 0x15A, 0x3A8, 0x108, - 0x000, 0x10F, 0x3A3, 0x135, 0x039, 0x091, 0x0D9, 0x031, 0x0D4, 0x0CA, 0x072, 0x1C6, - 0x136, 0x090, 0x2B2, 0x104, 0x000, 0x103, 0x111, 0x08B, 0x133, 0x1D3, 0x071, 0x0C9, - 0x03E, 0x1B4, 0x18C, 0x0CC, 0x38A, 0x2B0, 0x106, 0x0F2, 0x000, 0x0EF, 0x101, 0x113, - 0x3A1, 0x0CB, 0x18F, 0x1B7, 0x0EE, 0x092, 0x388, 0x348, 0x10A, 0x0F4, 0x0F0, 0x0EA, - 0x000, 0x0E9, 0x0ED, 0x0F7, 0x10D, 0x34D, 0x3AB, 0x0C9, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x0EF, 0x0C8, 0x3AA, 0x34C, 0x10C, 0x0F6, 0x0EC, 0x0E8, 0x000, 0x0EB, 0x0F1, 0x0F5, - 0x10B, 0x349, 0x389, 0x093, 0x03F, 0x1B6, 0x18E, 0x0CA, 0x3A0, 0x112, 0x100, 0x0EE, - 0x000, 0x0F3, 0x107, 0x2B1, 0x38B, 0x0CD, 0x18D, 0x1B5, 0x0D5, 0x0C8, 0x070, 0x1D2, - 0x132, 0x08A, 0x110, 0x102, 0x000, 0x105, 0x2B3, 0x091, 0x137, 0x1C7, 0x073, 0x0CB, - 0x047, 0x030, 0x0D8, 0x090, 0x038, 0x134, 0x3A2, 0x10E, 0x000, 0x109, 0x3A9, 0x15B, - 0x047, 0x093, 0x0D7, 0x027, 0x051, 0x03E, 0x002, 0x0AE, 0x094, 0x1D6, 0x0EC, 0x34E, - 0x000, 0x34B, 0x0EB, 0x00D, 0x097, 0x0C5, 0x005, 0x03D, 0x015, 0x078, 0x054, 0x018, - 0x0DE, 0x082, 0x19A, 0x01C, 0x000, 0x01F, 0x199, 0x081, 0x0E1, 0x01B, 0x053, 0x073, - 0x003, 0x02E, 0x07A, 0x044, 0x036, 0x0D0, 0x000, 0x0CE, 0x000, 0x0E9, 0x003, 0x0CF, - 0x035, 0x043, 0x077, 0x02D, -}; - -static const uint8_t huff_spec_a44_bits[] = { - 4, 5, 6, 7, 7, 8, 9, 10, 0, 10, 9, 8, 7, 7, 6, 5, - 5, 6, 6, 7, 7, 8, 9, 10, 0, 10, 9, 8, 7, 7, 6, 6, - 6, 6, 7, 7, 8, 9, 10, 10, 0, 10, 10, 9, 8, 7, 7, 6, - 7, 7, 7, 8, 8, 9, 10, 10, 0, 10, 10, 9, 8, 8, 7, 7, - 7, 8, 8, 8, 9, 10, 10, 10, 0, 10, 10, 10, 9, 8, 8, 7, - 8, 8, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 8, - 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, - 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, - 8, 8, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 8, - 7, 7, 8, 8, 9, 10, 10, 10, 0, 10, 10, 10, 9, 8, 8, 8, - 7, 7, 7, 8, 8, 9, 10, 10, 0, 10, 10, 9, 8, 8, 7, 7, - 6, 6, 7, 7, 8, 9, 10, 10, 0, 10, 10, 9, 8, 7, 7, 6, - 5, 6, 6, 7, 7, 8, 9, 10, 0, 10, 9, 8, 7, 7, 6, 6, -}; - -static const uint16_t huff_spec_a44_codes[] = { - 0x00A, 0x012, 0x030, 0x06E, 0x024, 0x074, 0x0EC, 0x07E, 0x000, 0x07F, 0x0ED, 0x075, - 0x025, 0x06F, 0x031, 0x013, 0x010, 0x03C, 0x018, 0x05A, 0x002, 0x046, 0x09E, 0x07C, - 0x000, 0x079, 0x0E5, 0x04D, 0x007, 0x065, 0x01B, 0x03F, 0x02E, 0x016, 0x072, 0x01A, - 0x0D6, 0x1C6, 0x3B4, 0x066, 0x000, 0x06B, 0x3B7, 0x1D9, 0x0D5, 0x021, 0x075, 0x015, - 0x06C, 0x03E, 0x01E, 0x0CC, 0x044, 0x0F2, 0x082, 0x05C, 0x000, 0x05F, 0x087, 0x0F5, - 0x031, 0x0CF, 0x017, 0x059, 0x01C, 0x0EE, 0x0D0, 0x024, 0x1C0, 0x08E, 0x06E, 0x048, - 0x000, 0x04D, 0x06D, 0x089, 0x0F7, 0x033, 0x0D3, 0x001, 0x070, 0x028, 0x1C2, 0x0F0, - 0x08A, 0x074, 0x054, 0x040, 0x000, 0x043, 0x053, 0x073, 0x099, 0x0EF, 0x1C5, 0x02B, - 0x0E6, 0x04E, 0x08C, 0x080, 0x068, 0x058, 0x046, 0x02A, 0x000, 0x029, 0x045, 0x051, - 0x065, 0x085, 0x09B, 0x09D, 0x07A, 0x076, 0x060, 0x056, 0x04E, 0x02C, 0x024, 0x022, - 0x000, 0x021, 0x027, 0x02F, 0x04B, 0x05B, 0x063, 0x071, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x07B, 0x070, 0x062, 0x05A, 0x04A, 0x02E, 0x026, 0x020, 0x000, 0x023, 0x025, 0x02D, - 0x04F, 0x057, 0x061, 0x077, 0x0E7, 0x09C, 0x09A, 0x084, 0x064, 0x050, 0x044, 0x028, - 0x000, 0x02B, 0x047, 0x059, 0x069, 0x081, 0x08D, 0x04F, 0x071, 0x02A, 0x1C4, 0x0EE, - 0x098, 0x072, 0x052, 0x042, 0x000, 0x041, 0x055, 0x075, 0x08B, 0x0F1, 0x1C3, 0x029, - 0x01D, 0x000, 0x0D2, 0x032, 0x0F6, 0x088, 0x06C, 0x04C, 0x000, 0x049, 0x06F, 0x08F, - 0x1C1, 0x025, 0x0D1, 0x0EF, 0x06D, 0x058, 0x016, 0x0CE, 0x030, 0x0F4, 0x086, 0x05E, - 0x000, 0x05D, 0x083, 0x0F3, 0x045, 0x0CD, 0x01F, 0x03F, 0x02F, 0x014, 0x074, 0x020, - 0x0D4, 0x1D8, 0x3B6, 0x06A, 0x000, 0x067, 0x3B5, 0x1C7, 0x0D7, 0x01B, 0x073, 0x017, - 0x011, 0x03E, 0x01A, 0x064, 0x006, 0x04C, 0x0E4, 0x078, 0x000, 0x07D, 0x09F, 0x047, - 0x003, 0x05B, 0x019, 0x03D, -}; - -static const uint8_t huff_spec_a51_bits[] = { - 5, 5, 5, 5, 5, 6, 6, 6, 4, 4, 5, 5, 5, 5, 5, 5, - 0, 5, 5, 5, 5, 5, 5, 4, 4, 6, 6, 6, 5, 5, 5, 5, -}; - -static const uint16_t huff_spec_a51_codes[] = { - 0x19, 0x16, 0x12, 0x0E, 0x06, 0x3A, 0x38, 0x30, 0x00, 0x04, 0x1E, 0x1A, - 0x14, 0x10, 0x0C, 0x04, 0x00, 0x05, 0x0D, 0x11, 0x15, 0x1B, 0x1F, 0x05, - 0x01, 0x31, 0x39, 0x3B, 0x07, 0x0F, 0x13, 0x17, -}; - -static const uint8_t huff_spec_a52_bits[] = { - 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, - 0, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, -}; - -static const uint16_t huff_spec_a52_codes[] = { - 0x09, 0x04, 0x00, 0x1E, 0x1A, 0x14, 0x0C, 0x06, 0x18, 0x16, 0x0E, 0x04, - 0x3A, 0x38, 0x22, 0x20, 0x00, 0x21, 0x23, 0x39, 0x3B, 0x05, 0x0F, 0x17, - 0x19, 0x07, 0x0D, 0x15, 0x1B, 0x1F, 0x01, 0x05, -}; - -static const uint8_t huff_spec_a53_bits[] = { - 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, - 0, 7, 7, 7, 7, 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, 4, -}; - -static const uint16_t huff_spec_a53_codes[] = { - 0x00, 0x0C, 0x08, 0x04, 0x1E, 0x16, 0x14, 0x06, 0x0C, 0x04, 0x38, 0x1E, - 0x76, 0x74, 0x3A, 0x38, 0x00, 0x39, 0x3B, 0x75, 0x77, 0x1F, 0x39, 0x05, - 0x0D, 0x07, 0x15, 0x17, 0x1F, 0x05, 0x09, 0x0D, -}; - -static const uint8_t huff_spec_a54_bits[] = { - 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8, - 0, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, -}; - -static const uint16_t huff_spec_a54_codes[] = { - 0x02, 0x0E, 0x0A, 0x08, 0x02, 0x1A, 0x0E, 0x02, 0x00, 0x30, 0x18, 0x66, - 0x36, 0x34, 0xCA, 0xC8, 0x00, 0xC9, 0xCB, 0x35, 0x37, 0x67, 0x19, 0x31, - 0x01, 0x03, 0x0F, 0x1B, 0x03, 0x09, 0x0B, 0x0F, -}; - -static const uint8_t huff_spec_a61_bits[] = { - 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, - 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, - 5, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, -}; - -static const uint16_t huff_spec_a61_codes[] = { - 0x35, 0x30, 0x2A, 0x28, 0x24, 0x20, 0x18, 0x0E, 0x0C, 0x7E, 0x7C, 0x72, - 0x70, 0x68, 0x5E, 0x5C, 0x04, 0x0E, 0x08, 0x00, 0x3C, 0x3A, 0x36, 0x32, - 0x2C, 0x26, 0x22, 0x1A, 0x16, 0x14, 0x06, 0x04, 0x00, 0x05, 0x07, 0x15, - 0x17, 0x1B, 0x23, 0x27, 0x2D, 0x33, 0x37, 0x3B, 0x3D, 0x01, 0x09, 0x0F, - 0x05, 0x5D, 0x5F, 0x69, 0x71, 0x73, 0x7D, 0x7F, 0x0D, 0x0F, 0x19, 0x21, - 0x25, 0x29, 0x2B, 0x31, -}; - -static const uint8_t huff_spec_a62_bits[] = { - 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, - 0, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, -}; - -static const uint16_t huff_spec_a62_codes[] = { - 0x14, 0x0E, 0x08, 0x04, 0x02, 0x3E, 0x3C, 0x38, 0x34, 0x30, 0x2A, 0x24, - 0x1A, 0x18, 0x0E, 0x02, 0x32, 0x36, 0x2C, 0x26, 0x20, 0x16, 0x0C, 0x00, - 0x76, 0x74, 0x5E, 0x5C, 0x46, 0x44, 0x2A, 0x28, 0x00, 0x29, 0x2B, 0x45, - 0x47, 0x5D, 0x5F, 0x75, 0x77, 0x01, 0x0D, 0x17, 0x21, 0x27, 0x2D, 0x37, - 0x33, 0x03, 0x0F, 0x19, 0x1B, 0x25, 0x2B, 0x31, 0x35, 0x39, 0x3D, 0x3F, - 0x03, 0x05, 0x09, 0x0F, -}; - -static const uint8_t huff_spec_a63_bits[] = { - 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, - 0, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, -}; - -static const uint16_t huff_spec_a63_codes[] = { - 0x00, 0x1C, 0x18, 0x14, 0x10, 0x0A, 0x08, 0x02, 0x3E, 0x36, 0x2E, 0x2C, - 0x24, 0x1C, 0x0E, 0x08, 0x1E, 0x1A, 0x0C, 0x7A, 0x6A, 0x68, 0x4C, 0x32, - 0x16, 0x14, 0xF2, 0xF0, 0x9E, 0x9C, 0x62, 0x60, 0x00, 0x61, 0x63, 0x9D, - 0x9F, 0xF1, 0xF3, 0x15, 0x17, 0x33, 0x4D, 0x69, 0x6B, 0x7B, 0x0D, 0x1B, - 0x1F, 0x09, 0x0F, 0x1D, 0x25, 0x2D, 0x2F, 0x37, 0x3F, 0x03, 0x09, 0x0B, - 0x11, 0x15, 0x19, 0x1D, -}; - -static const uint8_t huff_spec_a64_bits[] = { - 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, - 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, - 0, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, - 6, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, -}; - -static const uint16_t huff_spec_a64_codes[] = { - 0x006, 0x002, 0x01C, 0x01A, 0x016, 0x012, 0x00E, 0x00A, 0x002, 0x03E, - 0x032, 0x02A, 0x022, 0x020, 0x010, 0x07A, 0x000, 0x078, 0x060, 0x050, - 0x024, 0x006, 0x0C6, 0x0C4, 0x0A4, 0x04E, 0x00A, 0x008, 0x14E, 0x14C, - 0x09A, 0x098, 0x000, 0x099, 0x09B, 0x14D, 0x14F, 0x009, 0x00B, 0x04F, - 0x0A5, 0x0C5, 0x0C7, 0x007, 0x025, 0x051, 0x061, 0x079, 0x001, 0x07B, - 0x011, 0x021, 0x023, 0x02B, 0x033, 0x03F, 0x003, 0x00B, 0x00F, 0x013, - 0x017, 0x01B, 0x01D, 0x003, -}; - -static const uint8_t huff_spec_a71_bits[] = { - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, - 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, -}; - -static const uint16_t huff_spec_a71_codes[] = { - 0x6C, 0x66, 0x62, 0x5C, 0x56, 0x50, 0x52, 0x4E, 0x48, 0x3E, 0x36, 0x34, 0x2A, 0x26, 0x1E, 0x16, - 0x0E, 0x08, 0x00, 0xF6, 0xF4, 0xEE, 0xEC, 0xE2, 0xE0, 0xDA, 0xD2, 0xD0, 0xBE, 0xBC, 0xB2, 0xB0, - 0x0C, 0x20, 0x1C, 0x16, 0x10, 0x08, 0x02, 0x7E, 0x7C, 0x78, 0x74, 0x72, 0x6E, 0x6A, 0x64, 0x60, - 0x5A, 0x54, 0x4C, 0x4A, 0x46, 0x44, 0x3C, 0x32, 0x30, 0x28, 0x24, 0x1C, 0x14, 0x0C, 0x0A, 0x02, - 0x00, 0x03, 0x0B, 0x0D, 0x15, 0x1D, 0x25, 0x29, 0x31, 0x33, 0x3D, 0x45, 0x47, 0x4B, 0x4D, 0x55, - 0x5B, 0x61, 0x65, 0x6B, 0x6F, 0x73, 0x75, 0x79, 0x7D, 0x7F, 0x03, 0x09, 0x11, 0x17, 0x1D, 0x21, - 0x0D, 0xB1, 0xB3, 0xBD, 0xBF, 0xD1, 0xD3, 0xDB, 0xE1, 0xE3, 0xED, 0xEF, 0xF5, 0xF7, 0x01, 0x09, - 0x0F, 0x17, 0x1F, 0x27, 0x2B, 0x35, 0x37, 0x3F, 0x49, 0x4F, 0x53, 0x51, 0x57, 0x5D, 0x63, 0x67, -}; - -static const uint8_t huff_spec_a72_bits[] = { - 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, -}; - -static const uint16_t huff_spec_a72_codes[] = { - 0x2A, 0x24, 0x1C, 0x18, 0x12, 0x0E, 0x0A, 0x06, 0x02, 0x7E, 0x7C, 0x7A, 0x76, 0x72, 0x70, 0x6A, - 0x68, 0x62, 0x5C, 0x5A, 0x52, 0x4E, 0x46, 0x42, 0x3C, 0x34, 0x2A, 0x28, 0x20, 0x12, 0x10, 0x08, - 0x66, 0x74, 0x6C, 0x64, 0x5E, 0x58, 0x50, 0x44, 0x40, 0x36, 0x2C, 0x22, 0x1A, 0x0A, 0x02, 0x00, - 0xF2, 0xF0, 0xDE, 0xDC, 0xC2, 0xC0, 0xAE, 0xAC, 0x9A, 0x98, 0x7E, 0x7C, 0x5E, 0x5C, 0x32, 0x30, - 0x00, 0x31, 0x33, 0x5D, 0x5F, 0x7D, 0x7F, 0x99, 0x9B, 0xAD, 0xAF, 0xC1, 0xC3, 0xDD, 0xDF, 0xF1, - 0xF3, 0x01, 0x03, 0x0B, 0x1B, 0x23, 0x2D, 0x37, 0x41, 0x45, 0x51, 0x59, 0x5F, 0x65, 0x6D, 0x75, - 0x67, 0x09, 0x11, 0x13, 0x21, 0x29, 0x2B, 0x35, 0x3D, 0x43, 0x47, 0x4F, 0x53, 0x5B, 0x5D, 0x63, - 0x69, 0x6B, 0x71, 0x73, 0x77, 0x7B, 0x7D, 0x7F, 0x03, 0x07, 0x0B, 0x0F, 0x13, 0x19, 0x1D, 0x25, -}; - -static const uint8_t huff_spec_a73_bits[] = { - 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, -}; - -static const uint16_t huff_spec_a73_codes[] = { - 0x003, 0x03E, 0x038, 0x034, 0x030, 0x02C, 0x028, 0x024, 0x020, 0x01C, 0x016, 0x014, - 0x00E, 0x00A, 0x004, 0x000, 0x07A, 0x076, 0x06E, 0x06C, 0x064, 0x05E, 0x056, 0x04E, - 0x04C, 0x044, 0x036, 0x030, 0x022, 0x018, 0x012, 0x004, 0x03C, 0x03E, 0x032, 0x024, - 0x020, 0x010, 0x0F2, 0x0F0, 0x0E8, 0x0CE, 0x0BA, 0x0B8, 0x0A8, 0x08C, 0x06A, 0x04E, - 0x04C, 0x034, 0x00E, 0x00C, 0x1D6, 0x1D4, 0x19A, 0x198, 0x156, 0x154, 0x11E, 0x11C, - 0x0D2, 0x0D0, 0x06E, 0x06C, 0x000, 0x06D, 0x06F, 0x0D1, 0x0D3, 0x11D, 0x11F, 0x155, - 0x157, 0x199, 0x19B, 0x1D5, 0x1D7, 0x00D, 0x00F, 0x035, 0x04D, 0x04F, 0x06B, 0x08D, - 0x0A9, 0x0B9, 0x0BB, 0x0CF, 0x0E9, 0x0F1, 0x0F3, 0x011, 0x021, 0x025, 0x033, 0x03F, - 0x03D, 0x005, 0x013, 0x019, 0x023, 0x031, 0x037, 0x045, 0x04D, 0x04F, 0x057, 0x05F, - 0x065, 0x06D, 0x06F, 0x077, 0x07B, 0x001, 0x005, 0x00B, 0x00F, 0x015, 0x017, 0x01D, - 0x021, 0x025, 0x029, 0x02D, 0x031, 0x035, 0x039, 0x03F, -}; - -static const uint8_t huff_spec_a74_bits[] = { - 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 7, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, -}; - -static const uint16_t huff_spec_a74_codes[] = { - 0x00D, 0x00A, 0x004, 0x000, 0x03A, 0x036, 0x032, 0x030, 0x02C, 0x028, 0x026, 0x022, - 0x01E, 0x018, 0x012, 0x00E, 0x006, 0x07E, 0x07A, 0x070, 0x06A, 0x05E, 0x056, 0x054, - 0x048, 0x040, 0x038, 0x022, 0x01A, 0x00A, 0x0F8, 0x0E6, 0x008, 0x0FA, 0x0F0, 0x0D2, - 0x0BA, 0x0B8, 0x094, 0x084, 0x074, 0x042, 0x032, 0x1E6, 0x1CA, 0x1C8, 0x1A2, 0x12E, - 0x10E, 0x10C, 0x0EC, 0x082, 0x062, 0x060, 0x3CA, 0x3C8, 0x342, 0x340, 0x25A, 0x258, - 0x1DE, 0x1DC, 0x102, 0x100, 0x000, 0x101, 0x103, 0x1DD, 0x1DF, 0x259, 0x25B, 0x341, - 0x343, 0x3C9, 0x3CB, 0x061, 0x063, 0x083, 0x0ED, 0x10D, 0x10F, 0x12F, 0x1A3, 0x1C9, - 0x1CB, 0x1E7, 0x033, 0x043, 0x075, 0x085, 0x095, 0x0B9, 0x0BB, 0x0D3, 0x0F1, 0x0FB, - 0x009, 0x0E7, 0x0F9, 0x00B, 0x01B, 0x023, 0x039, 0x041, 0x049, 0x055, 0x057, 0x05F, - 0x06B, 0x071, 0x07B, 0x07F, 0x007, 0x00F, 0x013, 0x019, 0x01F, 0x023, 0x027, 0x029, - 0x02D, 0x031, 0x033, 0x037, 0x03B, 0x001, 0x005, 0x00B, -}; - -static const uint8_t huff_spec_b22_bits[] = { - 0, 4, 0, 4, 4, 5, 0, 5, 0, 0, 0, 0, 4, 5, 0, 5, - 4, 7, 0, 6, 6, 9, 0, 7, 0, 0, 0, 0, 6, 9, 0, 7, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 6, 0, 7, 6, 7, 0, 9, 0, 0, 0, 0, 6, 7, 0, 9, - 4, 8, 0, 8, 8, 10, 0, 10, 0, 0, 0, 0, 6, 9, 0, 9, - 5, 10, 0, 9, 9, 10, 0, 10, 0, 0, 0, 0, 7, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 9, 0, 10, 9, 10, 0, 10, 0, 0, 0, 0, 7, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 8, 0, 8, 6, 9, 0, 9, 0, 0, 0, 0, 8, 10, 0, 10, - 6, 10, 0, 9, 7, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 9, 0, 10, 7, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, -}; - -static const uint16_t huff_spec_b22_codes[] = { - 0x000, 0x00E, 0x000, 0x00F, 0x008, 0x006, 0x000, 0x00B, 0x000, 0x000, 0x000, 0x000, - 0x009, 0x00A, 0x000, 0x007, 0x006, 0x00A, 0x000, 0x029, 0x006, 0x158, 0x000, 0x023, - 0x000, 0x000, 0x000, 0x000, 0x013, 0x174, 0x000, 0x021, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x007, 0x028, 0x000, 0x00B, 0x012, 0x020, 0x000, 0x175, 0x000, 0x000, 0x000, 0x000, - 0x007, 0x022, 0x000, 0x159, 0x00C, 0x0BC, 0x000, 0x0BF, 0x022, 0x2B8, 0x000, 0x2BB, - 0x000, 0x000, 0x000, 0x000, 0x00B, 0x170, 0x000, 0x15B, 0x000, 0x04E, 0x000, 0x15F, - 0x042, 0x04A, 0x000, 0x041, 0x000, 0x000, 0x000, 0x000, 0x055, 0x044, 0x000, 0x04D, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x02D, 0x172, 0x000, 0x2ED, 0x040, 0x042, 0x000, 0x047, - 0x000, 0x000, 0x000, 0x000, 0x013, 0x2EE, 0x000, 0x049, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x00D, 0x0BE, 0x000, 0x0BD, 0x00A, 0x15A, 0x000, 0x171, 0x000, 0x000, 0x000, 0x000, - 0x023, 0x2BA, 0x000, 0x2B9, 0x02C, 0x2EC, 0x000, 0x173, 0x012, 0x048, 0x000, 0x2EF, - 0x000, 0x000, 0x000, 0x000, 0x041, 0x046, 0x000, 0x043, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x001, 0x15E, 0x000, 0x04F, 0x054, 0x04C, 0x000, 0x045, 0x000, 0x000, 0x000, 0x000, - 0x043, 0x040, 0x000, 0x04B, -}; - -static const uint8_t huff_spec_b23_bits[] = { - 2, 4, 0, 4, 4, 6, 0, 6, 0, 0, 0, 0, 4, 6, 0, 6, - 4, 9, 0, 7, 7, 9, 0, 8, 0, 0, 0, 0, 7, 9, 0, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 7, 0, 9, 7, 8, 0, 9, 0, 0, 0, 0, 7, 8, 0, 9, - 4, 8, 0, 8, 9, 10, 0, 10, 0, 0, 0, 0, 7, 10, 0, 10, - 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 8, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 8, 0, 8, 7, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, - 7, 10, 0, 10, 8, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 7, 10, 0, 10, 9, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, -}; - -static const uint16_t huff_spec_b23_codes[] = { - 0x003, 0x008, 0x000, 0x009, 0x002, 0x018, 0x000, 0x01B, 0x000, 0x000, 0x000, 0x000, - 0x003, 0x01A, 0x000, 0x019, 0x000, 0x17C, 0x000, 0x055, 0x056, 0x0E8, 0x000, 0x07D, - 0x000, 0x000, 0x000, 0x000, 0x059, 0x0F6, 0x000, 0x07F, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x001, 0x054, 0x000, 0x17D, 0x058, 0x07E, 0x000, 0x0F7, 0x000, 0x000, 0x000, 0x000, - 0x057, 0x07C, 0x000, 0x0E9, 0x004, 0x0A2, 0x000, 0x0A1, 0x17A, 0x1DA, 0x000, 0x1D9, - 0x000, 0x000, 0x000, 0x000, 0x053, 0x1E8, 0x000, 0x2F3, 0x05C, 0x1D6, 0x000, 0x1E7, - 0x1EA, 0x1E2, 0x000, 0x1CF, 0x000, 0x000, 0x000, 0x000, 0x17F, 0x1CA, 0x000, 0x1DD, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x05B, 0x2F0, 0x000, 0x1DF, 0x1E4, 0x1CC, 0x000, 0x1D5, - 0x000, 0x000, 0x000, 0x000, 0x071, 0x1E0, 0x000, 0x1C9, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x005, 0x0A0, 0x000, 0x0A3, 0x052, 0x2F2, 0x000, 0x1E9, 0x000, 0x000, 0x000, 0x000, - 0x17B, 0x1D8, 0x000, 0x1DB, 0x05A, 0x1DE, 0x000, 0x2F1, 0x070, 0x1C8, 0x000, 0x1E1, - 0x000, 0x000, 0x000, 0x000, 0x1E5, 0x1D4, 0x000, 0x1CD, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x05D, 0x1E6, 0x000, 0x1D7, 0x17E, 0x1DC, 0x000, 0x1CB, 0x000, 0x000, 0x000, 0x000, - 0x1EB, 0x1CE, 0x000, 0x1E3, -}; - -static const uint8_t huff_spec_b24_bits[] = { - 1, 4, 0, 4, 5, 7, 0, 7, 0, 0, 0, 0, 5, 7, 0, 7, - 5, 9, 0, 7, 8, 10, 0, 9, 0, 0, 0, 0, 7, 10, 0, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 7, 0, 9, 7, 9, 0, 10, 0, 0, 0, 0, 8, 9, 0, 10, - 5, 9, 0, 8, 9, 10, 0, 10, 0, 0, 0, 0, 7, 10, 0, 10, - 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 8, 0, 9, 7, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, - 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, -}; - -static const uint16_t huff_spec_b24_codes[] = { - 0x001, 0x000, 0x000, 0x001, 0x00A, 0x01C, 0x000, 0x033, 0x000, 0x000, 0x000, 0x000, - 0x00B, 0x032, 0x000, 0x01D, 0x008, 0x0D8, 0x000, 0x031, 0x06E, 0x0FA, 0x000, 0x0D7, - 0x000, 0x000, 0x000, 0x000, 0x011, 0x0F4, 0x000, 0x0D5, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x009, 0x030, 0x000, 0x0D9, 0x010, 0x0D4, 0x000, 0x0F5, 0x000, 0x000, 0x000, 0x000, - 0x06F, 0x0D6, 0x000, 0x0FB, 0x00E, 0x0DA, 0x000, 0x025, 0x0D2, 0x0D4, 0x000, 0x0DB, - 0x000, 0x000, 0x000, 0x000, 0x017, 0x0FE, 0x000, 0x0FD, 0x014, 0x0DC, 0x000, 0x0F9, - 0x0F2, 0x0D6, 0x000, 0x09B, 0x000, 0x000, 0x000, 0x000, 0x1A3, 0x09C, 0x000, 0x0D3, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x019, 0x0F6, 0x000, 0x0D9, 0x0F0, 0x09E, 0x000, 0x0D1, - 0x000, 0x000, 0x000, 0x000, 0x1A1, 0x0DE, 0x000, 0x099, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x00F, 0x024, 0x000, 0x0DB, 0x016, 0x0FC, 0x000, 0x0FF, 0x000, 0x000, 0x000, 0x000, - 0x0D3, 0x0DA, 0x000, 0x0D5, 0x018, 0x0D8, 0x000, 0x0F7, 0x1A0, 0x098, 0x000, 0x0DF, - 0x000, 0x000, 0x000, 0x000, 0x0F1, 0x0D0, 0x000, 0x09F, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x015, 0x0F8, 0x000, 0x0DD, 0x1A2, 0x0D2, 0x000, 0x09D, 0x000, 0x000, 0x000, 0x000, - 0x0F3, 0x09A, 0x000, 0x0D7 -}; - -static const uint8_t huff_spec_b32_bits[] = { - 2, 4, 5, 6, 0, 6, 5, 4, 5, 6, 6, 7, 0, 6, 5, 6, - 5, 6, 7, 7, 0, 8, 7, 6, 6, 7, 8, 9, 0, 9, 8, 7, - 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 9, 8, 7, - 5, 6, 7, 8, 0, 7, 7, 6, 5, 6, 5, 6, 0, 7, 6, 6, -}; - -static const uint16_t huff_spec_b32_codes[] = { - 0x001, 0x002, 0x01E, 0x02A, 0x000, 0x02B, 0x01F, 0x003, 0x016, 0x020, 0x03A, 0x064, - 0x000, 0x005, 0x001, 0x023, 0x01A, 0x026, 0x070, 0x00C, 0x000, 0x0CF, 0x073, 0x031, - 0x024, 0x00E, 0x0CC, 0x146, 0x000, 0x145, 0x0A1, 0x053, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x025, 0x052, 0x0A0, 0x144, 0x000, 0x147, 0x0CD, 0x00F, - 0x01B, 0x030, 0x072, 0x0CE, 0x000, 0x00D, 0x071, 0x027, 0x017, 0x022, 0x000, 0x004, - 0x000, 0x065, 0x03B, 0x021, -}; - -static const uint8_t huff_spec_b33_bits[] = { - 2, 4, 5, 7, 0, 7, 5, 4, 4, 5, 6, 8, 0, 7, 6, 5, - 5, 6, 7, 9, 0, 8, 7, 6, 7, 8, 9, 10, 0, 10, 9, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 0, 10, 9, 8, - 5, 6, 7, 8, 0, 9, 7, 6, 4, 5, 6, 7, 0, 8, 6, 5, -}; - -static const uint16_t huff_spec_b33_codes[] = { - 0x003, 0x008, 0x014, 0x05E, 0x000, 0x05F, 0x015, 0x009, 0x004, 0x002, 0x01C, 0x0BA, - 0x000, 0x011, 0x01F, 0x001, 0x00C, 0x00C, 0x014, 0x166, 0x000, 0x02D, 0x013, 0x00F, - 0x05A, 0x0B0, 0x05E, 0x0B8, 0x000, 0x0BB, 0x165, 0x0B9, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x05B, 0x0B8, 0x164, 0x0BA, 0x000, 0x0B9, 0x05F, 0x0B1, - 0x00D, 0x00E, 0x012, 0x02C, 0x000, 0x167, 0x015, 0x00D, 0x005, 0x000, 0x01E, 0x010, - 0x000, 0x0BB, 0x01D, 0x003 -}; - -static const uint8_t huff_spec_b34_bits[] = { - 1, 4, 6, 8, 0, 8, 6, 4, 4, 6, 7, 9, 0, 8, 7, 6, - 6, 7, 8, 10, 0, 10, 8, 7, 8, 9, 10, 10, 0, 10, 10, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 10, 10, 0, 10, 10, 9, - 6, 7, 8, 10, 0, 10, 8, 7, 4, 6, 7, 8, 0, 9, 7, 6, -}; - -static const uint16_t huff_spec_b34_codes[] = { - 0x000, 0x00A, 0x038, 0x0EE, 0x000, 0x0EF, 0x039, 0x00B, 0x008, 0x03C, 0x06E, 0x1D8, - 0x000, 0x0C1, 0x075, 0x03F, 0x032, 0x068, 0x0C4, 0x358, 0x000, 0x30F, 0x0C7, 0x06D, - 0x0D4, 0x1AE, 0x30C, 0x308, 0x000, 0x30B, 0x35B, 0x1DB, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x0D5, 0x1DA, 0x35A, 0x30A, 0x000, 0x309, 0x30D, 0x1AF, - 0x033, 0x06C, 0x0C6, 0x30E, 0x000, 0x359, 0x0C5, 0x069, 0x009, 0x03E, 0x074, 0x0C0, - 0x000, 0x1D9, 0x06F, 0x03D, -}; - -static const uint8_t huff_spec_b42_bits[] = { - 4, 5, 6, 8, 6, 7, 8, 8, 0, 8, 8, 7, 6, 8, 6, 5, - 5, 6, 7, 8, 7, 7, 8, 9, 0, 8, 8, 7, 7, 8, 7, 6, - 7, 7, 8, 9, 7, 8, 9, 9, 0, 9, 9, 8, 7, 9, 8, 7, - 8, 9, 9, 10, 8, 8, 9, 10, 0, 10, 9, 8, 8, 10, 9, 8, - 6, 7, 8, 8, 9, 9, 10, 10, 0, 10, 10, 9, 9, 8, 8, 7, - 7, 7, 8, 9, 9, 10, 10, 10, 0, 10, 10, 10, 9, 9, 8, 7, - 8, 8, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 8, - 8, 9, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8, 9, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 9, - 8, 8, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 8, - 7, 7, 8, 9, 9, 10, 10, 10, 0, 10, 10, 10, 9, 9, 8, 7, - 6, 7, 8, 8, 9, 9, 10, 10, 0, 10, 10, 9, 9, 8, 8, 7, - 8, 8, 9, 10, 8, 8, 9, 10, 0, 10, 9, 8, 8, 10, 9, 9, - 7, 7, 8, 9, 7, 8, 9, 9, 0, 9, 9, 8, 7, 9, 8, 7, - 5, 6, 7, 8, 7, 7, 8, 8, 0, 9, 8, 7, 7, 8, 7, 6, -}; - -static const uint16_t huff_spec_b42_codes[] = { - 0x00E, 0x018, 0x010, 0x0F0, 0x024, 0x05A, 0x0F6, 0x078, 0x000, 0x079, 0x0F7, 0x05B, - 0x025, 0x0F1, 0x011, 0x019, 0x00C, 0x014, 0x01C, 0x036, 0x05C, 0x012, 0x09E, 0x1E4, - 0x000, 0x00B, 0x0A9, 0x03B, 0x05F, 0x071, 0x019, 0x017, 0x06E, 0x000, 0x03E, 0x114, - 0x002, 0x0B0, 0x1AA, 0x07A, 0x000, 0x099, 0x1E7, 0x0B3, 0x00B, 0x131, 0x07F, 0x00D, - 0x0D8, 0x1FE, 0x112, 0x22E, 0x086, 0x010, 0x134, 0x35C, 0x000, 0x35F, 0x133, 0x013, - 0x081, 0x22D, 0x119, 0x07B, 0x00A, 0x050, 0x0F8, 0x04E, 0x1B4, 0x154, 0x3EC, 0x0D2, - 0x000, 0x0D7, 0x3D7, 0x137, 0x1FD, 0x073, 0x0FD, 0x057, 0x052, 0x010, 0x08E, 0x1E8, - 0x11A, 0x3EE, 0x0F2, 0x03C, 0x000, 0x03F, 0x0F1, 0x3D5, 0x111, 0x1F5, 0x09D, 0x025, - 0x0D2, 0x082, 0x1A0, 0x0F8, 0x36E, 0x0D4, 0x072, 0x03A, 0x000, 0x027, 0x071, 0x07D, - 0x36D, 0x0FB, 0x1AD, 0x085, 0x00C, 0x1A8, 0x03C, 0x346, 0x0D0, 0x076, 0x024, 0x020, - 0x000, 0x023, 0x039, 0x075, 0x07F, 0x345, 0x09B, 0x157, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x00D, 0x156, 0x09A, 0x344, 0x07E, 0x074, 0x038, 0x022, 0x000, 0x021, 0x025, 0x077, - 0x0D1, 0x347, 0x03D, 0x1A9, 0x0D3, 0x084, 0x1AC, 0x0FA, 0x36C, 0x07C, 0x070, 0x026, - 0x000, 0x03B, 0x073, 0x0D5, 0x36F, 0x0F9, 0x1A1, 0x083, 0x053, 0x024, 0x09C, 0x1F4, - 0x110, 0x3D4, 0x0F0, 0x03E, 0x000, 0x03D, 0x0F3, 0x3EF, 0x11B, 0x1E9, 0x08F, 0x011, - 0x00B, 0x056, 0x0FC, 0x072, 0x1FC, 0x136, 0x3D6, 0x0D6, 0x000, 0x0D3, 0x3ED, 0x155, - 0x1B5, 0x04F, 0x0F9, 0x051, 0x0D9, 0x07A, 0x118, 0x22C, 0x080, 0x012, 0x132, 0x35E, - 0x000, 0x35D, 0x135, 0x011, 0x087, 0x22F, 0x113, 0x1FF, 0x06F, 0x00C, 0x07E, 0x130, - 0x00A, 0x0B2, 0x1E6, 0x098, 0x000, 0x07B, 0x1AB, 0x0B1, 0x003, 0x115, 0x03F, 0x001, - 0x00D, 0x016, 0x018, 0x070, 0x05E, 0x03A, 0x0A8, 0x00A, 0x000, 0x1E5, 0x09F, 0x013, - 0x05D, 0x037, 0x01D, 0x015, -}; - -static const uint8_t huff_spec_b43_bits[] = { - 2, 5, 6, 7, 7, 8, 8, 9, 0, 9, 8, 8, 7, 7, 6, 5, - 5, 6, 7, 8, 7, 8, 9, 10, 0, 10, 9, 8, 7, 8, 7, 6, - 6, 7, 8, 9, 8, 9, 10, 10, 0, 10, 10, 9, 8, 9, 8, 7, - 7, 8, 9, 10, 9, 9, 10, 10, 0, 10, 10, 10, 9, 10, 9, 8, - 7, 8, 8, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 8, 7, - 8, 8, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 8, - 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, - 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, - 8, 8, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 8, - 7, 7, 8, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 8, 8, - 7, 8, 9, 10, 9, 10, 10, 10, 0, 10, 10, 9, 9, 10, 9, 8, - 6, 7, 8, 9, 8, 9, 10, 10, 0, 10, 10, 9, 8, 9, 8, 7, - 5, 6, 7, 8, 7, 8, 9, 10, 0, 10, 9, 8, 7, 8, 7, 6, -}; - -static const uint16_t huff_spec_b43_codes[] = { - 0x001, 0x01E, 0x022, 0x018, 0x064, 0x0EC, 0x008, 0x100, 0x000, 0x101, 0x009, 0x0ED, - 0x065, 0x019, 0x023, 0x01F, 0x01A, 0x030, 0x056, 0x09A, 0x00A, 0x090, 0x12C, 0x0A6, - 0x000, 0x0A9, 0x12F, 0x093, 0x00F, 0x09F, 0x059, 0x039, 0x00E, 0x054, 0x0BC, 0x19E, - 0x082, 0x176, 0x0AC, 0x088, 0x000, 0x08B, 0x0AF, 0x19D, 0x095, 0x1D1, 0x0BF, 0x051, - 0x002, 0x098, 0x1D4, 0x0B8, 0x170, 0x046, 0x090, 0x060, 0x000, 0x067, 0x095, 0x0BD, - 0x173, 0x0B5, 0x1D3, 0x09D, 0x052, 0x0EE, 0x034, 0x174, 0x0BA, 0x09C, 0x080, 0x044, - 0x000, 0x047, 0x06D, 0x099, 0x0BF, 0x16F, 0x085, 0x001, 0x0CC, 0x036, 0x16C, 0x0B0, - 0x09A, 0x084, 0x04E, 0x03E, 0x000, 0x037, 0x04B, 0x06B, 0x0A1, 0x0B3, 0x16B, 0x087, - 0x1D6, 0x102, 0x0A4, 0x092, 0x068, 0x04C, 0x034, 0x030, 0x000, 0x02D, 0x03D, 0x049, - 0x083, 0x097, 0x0AB, 0x169, 0x0B6, 0x09E, 0x06E, 0x064, 0x040, 0x038, 0x02E, 0x02A, - 0x000, 0x029, 0x033, 0x03B, 0x043, 0x063, 0x087, 0x0A3, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x0B7, 0x0A2, 0x086, 0x062, 0x042, 0x03A, 0x032, 0x028, 0x000, 0x02B, 0x02F, 0x039, - 0x041, 0x065, 0x06F, 0x09F, 0x1D7, 0x168, 0x0AA, 0x096, 0x082, 0x048, 0x03C, 0x02C, - 0x000, 0x031, 0x035, 0x04D, 0x069, 0x093, 0x0A5, 0x103, 0x0CD, 0x086, 0x16A, 0x0B2, - 0x0A0, 0x06A, 0x04A, 0x036, 0x000, 0x03F, 0x04F, 0x085, 0x09B, 0x0B1, 0x16D, 0x037, - 0x053, 0x000, 0x084, 0x16E, 0x0BE, 0x098, 0x06C, 0x046, 0x000, 0x045, 0x081, 0x09D, - 0x0BB, 0x175, 0x035, 0x0EF, 0x003, 0x09C, 0x1D2, 0x0B4, 0x172, 0x0BC, 0x094, 0x066, - 0x000, 0x061, 0x091, 0x047, 0x171, 0x0B9, 0x1D5, 0x099, 0x00F, 0x050, 0x0BE, 0x1D0, - 0x094, 0x19C, 0x0AE, 0x08A, 0x000, 0x089, 0x0AD, 0x177, 0x083, 0x19F, 0x0BD, 0x055, - 0x01B, 0x038, 0x058, 0x09E, 0x00E, 0x092, 0x12E, 0x0A8, 0x000, 0x0A7, 0x12D, 0x091, - 0x00B, 0x09B, 0x057, 0x031, -}; - -static const uint8_t huff_spec_b44_bits[] = { - 2, 4, 6, 7, 7, 8, 10, 10, 0, 10, 10, 8, 7, 7, 6, 4, - 5, 5, 7, 8, 8, 10, 10, 10, 0, 10, 10, 10, 8, 8, 7, 5, - 6, 7, 8, 9, 9, 10, 10, 10, 0, 10, 10, 10, 10, 9, 8, 7, - 8, 8, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 8, - 8, 8, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 8, - 9, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 9, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, - 8, 8, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 8, - 8, 8, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 8, - 6, 7, 8, 9, 10, 10, 10, 10, 0, 10, 10, 10, 9, 9, 8, 7, - 5, 5, 7, 8, 8, 10, 10, 10, 0, 10, 10, 10, 8, 8, 7, 5, -}; - -static const uint16_t huff_spec_b44_codes[] = { - 0x002, 0x002, 0x030, 0x000, 0x002, 0x00C, 0x1D2, 0x1AE, 0x000, 0x1AF, 0x1D3, 0x00D, - 0x003, 0x001, 0x031, 0x003, 0x01E, 0x002, 0x070, 0x0C8, 0x07E, 0x1E8, 0x1C0, 0x176, - 0x000, 0x17F, 0x1C3, 0x1EB, 0x0CF, 0x0D3, 0x073, 0x009, 0x018, 0x06A, 0x0EC, 0x1DE, - 0x1A2, 0x1CA, 0x1AA, 0x164, 0x000, 0x16D, 0x1AD, 0x1D1, 0x1EF, 0x1DD, 0x0EB, 0x06D, - 0x0E8, 0x0CA, 0x1BE, 0x1CE, 0x1DA, 0x1B6, 0x170, 0x154, 0x000, 0x153, 0x173, 0x1B1, - 0x1D7, 0x1D5, 0x343, 0x0CD, 0x0DC, 0x078, 0x340, 0x1CC, 0x1BA, 0x1A8, 0x156, 0x148, - 0x000, 0x145, 0x15F, 0x1A1, 0x1BD, 0x1D9, 0x1ED, 0x07D, 0x1BC, 0x1DC, 0x1C4, 0x1B2, - 0x17C, 0x15A, 0x14A, 0x03A, 0x000, 0x039, 0x147, 0x16B, 0x17B, 0x1B5, 0x1C9, 0x1DF, - 0x1C6, 0x1B8, 0x1A2, 0x168, 0x160, 0x14C, 0x02E, 0x024, 0x000, 0x027, 0x03D, 0x151, - 0x15D, 0x16F, 0x1A7, 0x1BF, 0x1A4, 0x174, 0x162, 0x14E, 0x140, 0x02C, 0x02A, 0x022, - 0x000, 0x021, 0x029, 0x03F, 0x143, 0x159, 0x167, 0x179, 0x000, 0x000, 0x000, 0x000, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, - 0x1A5, 0x178, 0x166, 0x158, 0x142, 0x03E, 0x028, 0x020, 0x000, 0x023, 0x02B, 0x02D, - 0x141, 0x14F, 0x163, 0x175, 0x1C7, 0x1BE, 0x1A6, 0x16E, 0x15C, 0x150, 0x03C, 0x026, - 0x000, 0x025, 0x02F, 0x14D, 0x161, 0x169, 0x1A3, 0x1B9, 0x1BD, 0x1DE, 0x1C8, 0x1B4, - 0x17A, 0x16A, 0x146, 0x038, 0x000, 0x03B, 0x14B, 0x15B, 0x17D, 0x1B3, 0x1C5, 0x1DD, - 0x0DD, 0x07C, 0x1EC, 0x1D8, 0x1BC, 0x1A0, 0x15E, 0x144, 0x000, 0x149, 0x157, 0x1A9, - 0x1BB, 0x1CD, 0x341, 0x079, 0x0E9, 0x0CC, 0x342, 0x1D4, 0x1D6, 0x1B0, 0x172, 0x152, - 0x000, 0x155, 0x171, 0x1B7, 0x1DB, 0x1CF, 0x1BF, 0x0CB, 0x019, 0x06C, 0x0EA, 0x1DC, - 0x1EE, 0x1D0, 0x1AC, 0x16C, 0x000, 0x165, 0x1AB, 0x1CB, 0x1A3, 0x1DF, 0x0ED, 0x06B, - 0x01F, 0x008, 0x072, 0x0D2, 0x0CE, 0x1EA, 0x1C2, 0x17E, 0x000, 0x177, 0x1C1, 0x1E9, - 0x07F, 0x0C9, 0x071, 0x003, -}; - -static const uint8_t huff_spec_b52_bits[] = { - 3, 4, 4, 4, 5, 5, 6, 6, 5, 5, 5, 6, 6, 6, 7, 7, - 0, 7, 7, 6, 6, 6, 5, 5, 5, 6, 6, 5, 5, 4, 4, 4, -}; - -static const uint16_t huff_spec_b52_codes[] = { - 0x06, 0x0E, 0x06, 0x00, 0x0A, 0x04, 0x2C, 0x12, 0x14, 0x10, 0x06, 0x2E, 0x24, 0x10, 0x4E, 0x4C, - 0x00, 0x4D, 0x4F, 0x11, 0x25, 0x2F, 0x07, 0x11, 0x15, 0x13, 0x2D, 0x05, 0x0B, 0x01, 0x07, 0x0F, -}; - -static const uint8_t huff_spec_b53_bits[] = { - 2, 3, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, - 0, 8, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 4, 3, -}; - -static const uint16_t huff_spec_b53_codes[] = { - 0x02, 0x00, 0x06, 0x1C, 0x18, 0x3E, 0x16, 0x10, 0x3C, 0x36, 0x14, 0x6A, 0x26, 0x24, 0xD2, 0xD0, - 0x00, 0xD1, 0xD3, 0x25, 0x27, 0x6B, 0x15, 0x37, 0x3D, 0x11, 0x17, 0x3F, 0x19, 0x1D, 0x07, 0x01, -}; - -static const uint8_t huff_spec_b54_bits[] = { - 2, 3, 4, 4, 5, 6, 6, 7, 6, 6, 7, 8, 8, 8, 9, 9, - 0, 9, 9, 8, 8, 8, 7, 6, 6, 7, 6, 6, 5, 4, 4, 3, -}; - -static const uint16_t huff_spec_b54_codes[] = { - 0x003, 0x002, 0x008, 0x000, 0x014, 0x02E, 0x00E, 0x05A, 0x00A, 0x008, 0x01A, 0x0B2, - 0x032, 0x030, 0x162, 0x160, 0x000, 0x161, 0x163, 0x031, 0x033, 0x0B3, 0x01B, 0x009, - 0x00B, 0x05B, 0x00F, 0x02F, 0x015, 0x001, 0x009, 0x003, -}; - -static const uint8_t huff_spec_b62_bits[] = { - 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, - 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, - 0, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, - 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, -}; - -static const uint16_t huff_spec_b62_codes[] = { - 0x0D, 0x06, 0x1C, 0x14, 0x0A, 0x04, 0x3E, 0x2E, 0x22, 0x0E, 0x06, 0x00, 0x5A, 0x4E, 0x40, 0x20, - 0x30, 0x32, 0x24, 0x12, 0x0C, 0x02, 0x78, 0x58, 0x42, 0x22, 0x0A, 0x08, 0xF6, 0xF4, 0x9A, 0x98, - 0x00, 0x99, 0x9B, 0xF5, 0xF7, 0x09, 0x0B, 0x23, 0x43, 0x59, 0x79, 0x03, 0x0D, 0x13, 0x25, 0x33, - 0x31, 0x21, 0x41, 0x4F, 0x5B, 0x01, 0x07, 0x0F, 0x23, 0x2F, 0x3F, 0x05, 0x0B, 0x15, 0x1D, 0x07, -}; - -static const uint8_t huff_spec_b63_bits[] = { - 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, - 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, - 0, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, - 6, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, -}; - -static const uint16_t huff_spec_b63_codes[] = { - 0x006, 0x00E, 0x004, 0x014, 0x010, 0x006, 0x000, 0x026, 0x01C, 0x018, 0x004, 0x05C, - 0x04A, 0x03C, 0x016, 0x0BC, 0x006, 0x008, 0x058, 0x03E, 0x036, 0x014, 0x0B6, 0x0B4, - 0x090, 0x068, 0x17E, 0x17C, 0x126, 0x124, 0x0D6, 0x0D4, 0x000, 0x0D5, 0x0D7, 0x125, - 0x127, 0x17D, 0x17F, 0x069, 0x091, 0x0B5, 0x0B7, 0x015, 0x037, 0x03F, 0x059, 0x009, - 0x007, 0x0BD, 0x017, 0x03D, 0x04B, 0x05D, 0x005, 0x019, 0x01D, 0x027, 0x001, 0x007, - 0x011, 0x015, 0x005, 0x00F, -}; - -static const uint8_t huff_spec_b64_bits[] = { - 3, 3, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, - 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, - 0, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, 8, 7, 7, - 7, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 3, -}; - -static const uint16_t huff_spec_b64_codes[] = { - 0x007, 0x000, 0x008, 0x01A, 0x014, 0x00C, 0x032, 0x02E, 0x01E, 0x014, 0x062, 0x05A, - 0x03A, 0x026, 0x020, 0x0B2, 0x038, 0x02C, 0x022, 0x0C0, 0x05E, 0x04A, 0x186, 0x184, - 0x160, 0x0BA, 0x092, 0x090, 0x2C6, 0x2C4, 0x172, 0x170, 0x000, 0x171, 0x173, 0x2C5, - 0x2C7, 0x091, 0x093, 0x0BB, 0x161, 0x185, 0x187, 0x04B, 0x05F, 0x0C1, 0x023, 0x02D, - 0x039, 0x0B3, 0x021, 0x027, 0x03B, 0x05B, 0x063, 0x015, 0x01F, 0x02F, 0x033, 0x00D, - 0x015, 0x01B, 0x009, 0x001, -}; - -static const uint8_t huff_spec_b72_bits[] = { - 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, -}; - -static const uint16_t huff_spec_b72_codes[] = { - 0x01E, 0x016, 0x00C, 0x000, 0x038, 0x032, 0x028, 0x022, 0x01C, 0x012, 0x00E, 0x006, - 0x076, 0x06C, 0x060, 0x04E, 0x03E, 0x02A, 0x022, 0x01A, 0x012, 0x00A, 0x0FC, 0x0DC, - 0x0C6, 0x0A8, 0x094, 0x086, 0x058, 0x042, 0x040, 0x02A, 0x068, 0x07C, 0x06A, 0x056, - 0x048, 0x040, 0x02E, 0x028, 0x016, 0x010, 0x008, 0x0EA, 0x0DE, 0x0AA, 0x09A, 0x096, - 0x07A, 0x078, 0x05A, 0x032, 0x030, 0x028, 0x1FE, 0x1FC, 0x1D2, 0x1D0, 0x18A, 0x188, - 0x132, 0x130, 0x10A, 0x108, 0x000, 0x109, 0x10B, 0x131, 0x133, 0x189, 0x18B, 0x1D1, - 0x1D3, 0x1FD, 0x1FF, 0x029, 0x031, 0x033, 0x05B, 0x079, 0x07B, 0x097, 0x09B, 0x0AB, - 0x0DF, 0x0EB, 0x009, 0x011, 0x017, 0x029, 0x02F, 0x041, 0x049, 0x057, 0x06B, 0x07D, - 0x069, 0x02B, 0x041, 0x043, 0x059, 0x087, 0x095, 0x0A9, 0x0C7, 0x0DD, 0x0FD, 0x00B, - 0x013, 0x01B, 0x023, 0x02B, 0x03F, 0x04F, 0x061, 0x06D, 0x077, 0x007, 0x00F, 0x013, - 0x01D, 0x023, 0x029, 0x033, 0x039, 0x001, 0x00D, 0x017, -}; - -static const uint8_t huff_spec_b73_bits[] = { - 3, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, - 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, - 8, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, -}; - -static const uint16_t huff_spec_b73_codes[] = { - 0x000, 0x006, 0x018, 0x010, 0x004, 0x03A, 0x034, 0x02A, 0x026, 0x014, 0x010, 0x07E, - 0x072, 0x06E, 0x05C, 0x052, 0x04A, 0x02C, 0x024, 0x018, 0x0F4, 0x0E0, 0x0DA, 0x0B6, - 0x0B2, 0x0A0, 0x05E, 0x04E, 0x038, 0x034, 0x1E6, 0x1B2, 0x0FA, 0x01E, 0x0F8, 0x0F0, - 0x0BE, 0x0B4, 0x0A2, 0x090, 0x04C, 0x03A, 0x1EE, 0x1E4, 0x1C6, 0x1B0, 0x178, 0x162, - 0x126, 0x124, 0x0B8, 0x06C, 0x3DA, 0x3D8, 0x38A, 0x388, 0x2F6, 0x2F4, 0x2C2, 0x2C0, - 0x176, 0x174, 0x0DC, 0x0DE, 0x000, 0x0DF, 0x0DD, 0x175, 0x177, 0x2C1, 0x2C3, 0x2F5, - 0x2F7, 0x389, 0x38B, 0x3D9, 0x3DB, 0x06D, 0x0B9, 0x125, 0x127, 0x163, 0x179, 0x1B1, - 0x1C7, 0x1E5, 0x1EF, 0x03B, 0x04D, 0x091, 0x0A3, 0x0B5, 0x0BF, 0x0F1, 0x0F9, 0x01F, - 0x0FB, 0x1B3, 0x1E7, 0x035, 0x039, 0x04F, 0x05F, 0x0A1, 0x0B3, 0x0B7, 0x0DB, 0x0E1, - 0x0F5, 0x019, 0x025, 0x02D, 0x04B, 0x053, 0x05D, 0x06F, 0x073, 0x07F, 0x011, 0x015, - 0x027, 0x02B, 0x035, 0x03B, 0x005, 0x011, 0x019, 0x007, -}; - -static const uint8_t huff_spec_b74_bits[] = { - 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, - 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, - 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, - 8, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, - 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, -}; - -static const uint16_t huff_spec_b74_codes[] = { - 0x001, 0x008, 0x01E, 0x018, 0x00C, 0x002, 0x03A, 0x034, 0x02C, 0x01E, 0x016, 0x012, - 0x072, 0x06E, 0x05E, 0x056, 0x050, 0x038, 0x022, 0x004, 0x0E2, 0x0DA, 0x0BA, 0x0A8, - 0x076, 0x054, 0x050, 0x002, 0x000, 0x1C0, 0x1B0, 0x156, 0x0A4, 0x0A6, 0x074, 0x052, - 0x004, 0x1C2, 0x1B2, 0x170, 0x154, 0x0AE, 0x0AC, 0x086, 0x2E6, 0x2E4, 0x10A, 0x108, - 0x106, 0x104, 0x102, 0x100, 0x03E, 0x03A, 0x03C, 0x038, 0x036, 0x034, 0x032, 0x030, - 0x01E, 0x01A, 0x01C, 0x018, 0x000, 0x019, 0x01D, 0x01B, 0x01F, 0x031, 0x033, 0x035, - 0x037, 0x039, 0x03D, 0x03B, 0x03F, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x2E5, - 0x2E7, 0x087, 0x0AD, 0x0AF, 0x155, 0x171, 0x1B3, 0x1C3, 0x005, 0x053, 0x075, 0x0A7, - 0x0A5, 0x157, 0x1B1, 0x1C1, 0x001, 0x003, 0x051, 0x055, 0x077, 0x0A9, 0x0BB, 0x0DB, - 0x0E3, 0x005, 0x023, 0x039, 0x051, 0x057, 0x05F, 0x06F, 0x073, 0x013, 0x017, 0x01F, - 0x02D, 0x035, 0x03B, 0x003, 0x00D, 0x019, 0x01F, 0x009, + { huff_sfb_b2_tab, 3, 1, 0, 2 }, + { huff_sfb_b3_tab, 7, 1, 0, 3 }, + { huff_sfb_b4_tab, 15, 1, 0, 4 }, + { huff_sfb_b5_tab, 32, 1, 0, 5 }, +}; + +static const uint8_t huff_spec_a21_tab[8][2] = { + { 1, 3 }, { 3, 3 }, { 12, 3 }, { 4, 3 }, { 7, 3 }, + { 13, 3 }, { 15, 3 }, { 5, 3 }, +}; + +static const uint8_t huff_spec_a22_tab[80][2] = { + { 17, 6 }, { 51, 6 }, { 81, 7 }, { 243, 7 }, { 69, 7 }, + { 207, 7 }, { 205, 7 }, { 71, 7 }, { 209, 7 }, { 115, 7 }, + { 245, 7 }, { 95, 7 }, { 125, 7 }, { 215, 7 }, { 1, 4 }, + { 3, 4 }, { 116, 7 }, { 220, 7 }, { 84, 7 }, { 252, 7 }, + { 29, 7 }, { 55, 7 }, { 21, 7 }, { 63, 7 }, { 65, 6 }, + { 195, 6 }, { 193, 6 }, { 67, 6 }, { 20, 6 }, { 60, 6 }, + { 52, 6 }, { 28, 6 }, { 16, 5 }, { 48, 5 }, { 4, 5 }, + { 12, 5 }, { 221, 8 }, { 119, 8 }, { 117, 8 }, { 223, 8 }, + { 213, 8 }, { 127, 8 }, { 253, 8 }, { 87, 8 }, { 80, 6 }, + { 240, 6 }, { 93, 8 }, { 247, 8 }, { 85, 8 }, { 255, 8 }, + { 113, 7 }, { 211, 7 }, { 208, 6 }, { 112, 6 }, { 64, 5 }, + { 192, 5 }, { 212, 7 }, { 124, 7 }, { 241, 7 }, { 83, 7 }, + { 77, 7 }, { 199, 7 }, { 244, 7 }, { 92, 7 }, { 196, 6 }, + { 76, 6 }, { 53, 7 }, { 31, 7 }, { 197, 7 }, { 79, 7 }, + { 49, 6 }, { 19, 6 }, { 61, 7 }, { 23, 7 }, { 68, 7 }, + { 204, 7 }, { 5, 6 }, { 15, 6 }, { 13, 6 }, { 7, 6 }, +}; + +static const uint8_t huff_spec_a23_tab[81][2] = { + { 65, 6 }, { 195, 6 }, { 193, 6 }, { 67, 6 }, { 197, 7 }, + { 79, 7 }, { 77, 7 }, { 199, 7 }, { 241, 7 }, { 83, 7 }, + { 244, 7 }, { 92, 7 }, { 1, 4 }, { 3, 4 }, { 20, 6 }, + { 60, 6 }, { 212, 7 }, { 124, 7 }, { 61, 7 }, { 23, 7 }, + { 52, 6 }, { 28, 6 }, { 53, 7 }, { 31, 7 }, { 245, 8 }, + { 95, 8 }, { 125, 8 }, { 215, 8 }, { 80, 6 }, { 240, 6 }, + { 208, 6 }, { 112, 6 }, { 205, 8 }, { 71, 8 }, { 81, 8 }, + { 243, 8 }, { 69, 8 }, { 207, 8 }, { 209, 8 }, { 115, 8 }, + { 5, 6 }, { 15, 6 }, { 13, 6 }, { 7, 6 }, { 196, 6 }, + { 76, 6 }, { 221, 9 }, { 119, 9 }, { 253, 9 }, { 87, 9 }, + { 116, 8 }, { 220, 8 }, { 68, 7 }, { 204, 7 }, { 49, 6 }, + { 19, 6 }, { 117, 9 }, { 223, 9 }, { 213, 9 }, { 127, 9 }, + { 84, 8 }, { 252, 8 }, { 29, 8 }, { 55, 8 }, { 21, 8 }, + { 63, 8 }, { 17, 7 }, { 51, 7 }, { 93, 9 }, { 247, 9 }, + { 85, 9 }, { 255, 9 }, { 113, 8 }, { 211, 8 }, { 4, 5 }, + { 12, 5 }, { 0, 3 }, { 16, 5 }, { 48, 5 }, { 64, 5 }, + { 192, 5 }, +}; + +static const uint8_t huff_spec_a24_tab[81][2] = { + { 20, 6 }, { 60, 6 }, { 52, 6 }, { 28, 6 }, { 80, 6 }, + { 240, 6 }, { 208, 6 }, { 112, 6 }, { 1, 4 }, { 3, 4 }, + { 5, 6 }, { 15, 6 }, { 13, 6 }, { 7, 6 }, { 84, 8 }, + { 252, 8 }, { 29, 8 }, { 55, 8 }, { 68, 7 }, { 204, 7 }, + { 196, 6 }, { 76, 6 }, { 17, 7 }, { 51, 7 }, { 21, 8 }, + { 63, 8 }, { 113, 8 }, { 211, 8 }, { 49, 6 }, { 19, 6 }, + { 245, 9 }, { 95, 9 }, { 125, 9 }, { 215, 9 }, { 244, 8 }, + { 92, 8 }, { 212, 8 }, { 124, 8 }, { 241, 8 }, { 83, 8 }, + { 77, 8 }, { 199, 8 }, { 197, 8 }, { 79, 8 }, { 53, 8 }, + { 31, 8 }, { 253, 10 }, { 87, 10 }, { 213, 10 }, { 127, 10 }, + { 81, 9 }, { 243, 9 }, { 0, 2 }, { 61, 8 }, { 23, 8 }, + { 117, 10 }, { 223, 10 }, { 221, 10 }, { 119, 10 }, { 209, 9 }, + { 115, 9 }, { 65, 7 }, { 195, 7 }, { 193, 7 }, { 67, 7 }, + { 69, 9 }, { 207, 9 }, { 205, 9 }, { 71, 9 }, { 93, 10 }, + { 247, 10 }, { 85, 10 }, { 255, 10 }, { 116, 9 }, { 220, 9 }, + { 16, 5 }, { 48, 5 }, { 64, 5 }, { 192, 5 }, { 4, 5 }, + { 12, 5 }, +}; + +static const uint8_t huff_spec_a31_tab[40][2] = { + { 50, 5 }, { 22, 5 }, { 11, 5 }, { 61, 5 }, { 2, 4 }, + { 6, 4 }, { 59, 5 }, { 13, 5 }, { 17, 5 }, { 55, 5 }, + { 49, 5 }, { 23, 5 }, { 24, 5 }, { 40, 5 }, { 26, 6 }, + { 46, 6 }, { 42, 6 }, { 30, 6 }, { 10, 5 }, { 62, 5 }, + { 58, 5 }, { 14, 5 }, { 19, 6 }, { 53, 6 }, { 51, 6 }, + { 21, 6 }, { 3, 5 }, { 5, 5 }, { 16, 5 }, { 48, 5 }, + { 25, 6 }, { 47, 6 }, { 41, 6 }, { 31, 6 }, { 27, 7 }, + { 45, 7 }, { 43, 7 }, { 29, 7 }, { 18, 6 }, { 54, 6 }, +}; + +static const uint8_t huff_spec_a32_tab[49][2] = { + { 57, 5 }, { 15, 5 }, { 17, 5 }, { 55, 5 }, { 49, 5 }, + { 23, 5 }, { 58, 5 }, { 14, 5 }, { 10, 5 }, { 62, 5 }, + { 43, 7 }, { 29, 7 }, { 27, 7 }, { 45, 7 }, { 25, 6 }, + { 47, 6 }, { 41, 6 }, { 31, 6 }, { 59, 6 }, { 13, 6 }, + { 11, 6 }, { 61, 6 }, { 50, 6 }, { 22, 6 }, { 16, 5 }, + { 48, 5 }, { 8, 5 }, { 56, 5 }, { 18, 6 }, { 54, 6 }, + { 24, 6 }, { 40, 6 }, { 2, 5 }, { 6, 5 }, { 1, 5 }, + { 7, 5 }, { 0, 4 }, { 42, 7 }, { 30, 7 }, { 26, 7 }, + { 46, 7 }, { 3, 6 }, { 5, 6 }, { 19, 7 }, { 53, 7 }, + { 51, 7 }, { 21, 7 }, { 9, 6 }, { 63, 6 }, +}; + +static const uint8_t huff_spec_a33_tab[49][2] = { + { 51, 7 }, { 21, 7 }, { 19, 7 }, { 53, 7 }, { 24, 6 }, + { 40, 6 }, { 50, 6 }, { 22, 6 }, { 18, 6 }, { 54, 6 }, + { 3, 6 }, { 5, 6 }, { 43, 8 }, { 29, 8 }, { 27, 8 }, + { 45, 8 }, { 25, 7 }, { 47, 7 }, { 16, 5 }, { 48, 5 }, + { 8, 4 }, { 56, 4 }, { 1, 4 }, { 7, 4 }, { 2, 5 }, + { 6, 5 }, { 9, 5 }, { 63, 5 }, { 0, 3 }, { 57, 5 }, + { 15, 5 }, { 41, 7 }, { 31, 7 }, { 11, 7 }, { 61, 7 }, + { 59, 7 }, { 13, 7 }, { 26, 8 }, { 46, 8 }, { 42, 8 }, + { 30, 8 }, { 49, 6 }, { 23, 6 }, { 17, 6 }, { 55, 6 }, + { 58, 6 }, { 14, 6 }, { 10, 6 }, { 62, 6 }, +}; + +static const uint8_t huff_spec_a34_tab[49][2] = { + { 0, 2 }, { 16, 5 }, { 48, 5 }, { 2, 5 }, { 6, 5 }, + { 26, 8 }, { 46, 8 }, { 51, 8 }, { 21, 8 }, { 24, 7 }, + { 40, 7 }, { 3, 7 }, { 5, 7 }, { 19, 8 }, { 53, 8 }, + { 25, 8 }, { 47, 8 }, { 50, 7 }, { 22, 7 }, { 18, 7 }, + { 54, 7 }, { 17, 6 }, { 55, 6 }, { 8, 4 }, { 56, 4 }, + { 1, 4 }, { 7, 4 }, { 49, 6 }, { 23, 6 }, { 10, 6 }, + { 62, 6 }, { 58, 6 }, { 14, 6 }, { 41, 8 }, { 31, 8 }, + { 11, 8 }, { 61, 8 }, { 59, 8 }, { 13, 8 }, { 43, 10 }, + { 29, 10 }, { 27, 10 }, { 45, 10 }, { 42, 9 }, { 30, 9 }, + { 9, 5 }, { 63, 5 }, { 57, 5 }, { 15, 5 }, +}; + +static const uint8_t huff_spec_a41_tab[176][2] = { + { 83, 7 }, { 189, 7 }, { 68, 7 }, { 204, 7 }, { 23, 7 }, + { 249, 7 }, { 166, 8 }, { 106, 8 }, { 183, 8 }, { 89, 8 }, + { 52, 7 }, { 220, 7 }, { 161, 7 }, { 111, 7 }, { 179, 7 }, + { 93, 7 }, { 196, 7 }, { 76, 7 }, { 38, 7 }, { 234, 7 }, + { 116, 8 }, { 156, 8 }, { 148, 8 }, { 124, 8 }, { 97, 7 }, + { 175, 7 }, { 247, 7 }, { 25, 7 }, { 53, 7 }, { 219, 7 }, + { 212, 7 }, { 60, 7 }, { 5, 6 }, { 11, 6 }, { 101, 8 }, + { 171, 8 }, { 165, 8 }, { 107, 8 }, { 230, 7 }, { 42, 7 }, + { 244, 6 }, { 28, 6 }, { 7, 7 }, { 9, 7 }, { 213, 7 }, + { 59, 7 }, { 86, 8 }, { 186, 8 }, { 115, 8 }, { 157, 8 }, + { 71, 8 }, { 201, 8 }, { 182, 8 }, { 90, 8 }, { 4, 6 }, + { 12, 6 }, { 147, 8 }, { 125, 8 }, { 199, 8 }, { 73, 8 }, + { 82, 7 }, { 190, 7 }, { 66, 7 }, { 206, 7 }, { 178, 7 }, + { 94, 7 }, { 194, 7 }, { 78, 7 }, { 22, 7 }, { 250, 7 }, + { 96, 7 }, { 160, 7 }, { 100, 8 }, { 172, 8 }, { 164, 8 }, + { 108, 8 }, { 246, 7 }, { 26, 7 }, { 85, 8 }, { 187, 8 }, + { 114, 8 }, { 158, 8 }, { 37, 7 }, { 235, 7 }, { 36, 7 }, + { 236, 7 }, { 146, 8 }, { 126, 8 }, { 70, 8 }, { 202, 8 }, + { 215, 8 }, { 57, 8 }, { 55, 8 }, { 217, 8 }, { 181, 8 }, + { 91, 8 }, { 198, 8 }, { 74, 8 }, { 228, 7 }, { 44, 7 }, + { 229, 7 }, { 43, 7 }, { 81, 7 }, { 191, 7 }, { 177, 7 }, + { 95, 7 }, { 119, 9 }, { 153, 9 }, { 151, 9 }, { 121, 9 }, + { 99, 8 }, { 173, 8 }, { 65, 7 }, { 207, 7 }, { 6, 7 }, + { 10, 7 }, { 193, 7 }, { 79, 7 }, { 113, 8 }, { 159, 8 }, + { 163, 8 }, { 109, 8 }, { 145, 8 }, { 127, 8 }, { 118, 9 }, + { 154, 9 }, { 103, 9 }, { 169, 9 }, { 84, 8 }, { 188, 8 }, + { 39, 8 }, { 233, 8 }, { 167, 9 }, { 105, 9 }, { 150, 9 }, + { 122, 9 }, { 69, 8 }, { 203, 8 }, { 180, 8 }, { 92, 8 }, + { 54, 8 }, { 218, 8 }, { 197, 8 }, { 75, 8 }, { 98, 8 }, + { 174, 8 }, { 21, 7 }, { 251, 7 }, { 231, 8 }, { 41, 8 }, + { 162, 8 }, { 110, 8 }, { 214, 8 }, { 58, 8 }, { 117, 9 }, + { 155, 9 }, { 149, 9 }, { 123, 9 }, { 80, 7 }, { 176, 7 }, + { 20, 7 }, { 252, 7 }, { 102, 9 }, { 170, 9 }, { 87, 9 }, + { 185, 9 }, { 112, 8 }, { 144, 8 }, { 245, 7 }, { 27, 7 }, + { 64, 7 }, { 192, 7 }, { 67, 8 }, { 205, 8 }, { 195, 8 }, + { 77, 8 }, +}; + +static const uint8_t huff_spec_a42_tab[225][2] = { + { 3, 7 }, { 13, 7 }, { 113, 8 }, { 159, 8 }, { 163, 8 }, + { 109, 8 }, { 16, 6 }, { 240, 6 }, { 81, 7 }, { 191, 7 }, + { 177, 7 }, { 95, 7 }, { 0, 5 }, { 112, 8 }, { 144, 8 }, + { 99, 8 }, { 173, 8 }, { 149, 9 }, { 123, 9 }, { 166, 9 }, + { 106, 9 }, { 54, 8 }, { 218, 8 }, { 66, 7 }, { 206, 7 }, + { 23, 8 }, { 249, 8 }, { 214, 8 }, { 58, 8 }, { 194, 7 }, + { 78, 7 }, { 117, 9 }, { 155, 9 }, { 87, 9 }, { 185, 9 }, + { 247, 8 }, { 25, 8 }, { 21, 7 }, { 251, 7 }, { 211, 8 }, + { 61, 8 }, { 51, 8 }, { 221, 8 }, { 36, 7 }, { 236, 7 }, + { 228, 7 }, { 44, 7 }, { 183, 9 }, { 89, 9 }, { 102, 9 }, + { 170, 9 }, { 180, 8 }, { 92, 8 }, { 80, 7 }, { 176, 7 }, + { 245, 7 }, { 27, 7 }, { 69, 8 }, { 203, 8 }, { 84, 8 }, + { 188, 8 }, { 225, 7 }, { 47, 7 }, { 33, 7 }, { 239, 7 }, + { 1, 6 }, { 15, 6 }, { 197, 8 }, { 75, 8 }, { 98, 8 }, + { 174, 8 }, { 18, 7 }, { 254, 7 }, { 162, 8 }, { 110, 8 }, + { 116, 9 }, { 156, 9 }, { 148, 9 }, { 124, 9 }, { 242, 7 }, + { 30, 7 }, { 5, 7 }, { 11, 7 }, { 7, 8 }, { 9, 8 }, + { 230, 8 }, { 42, 8 }, { 65, 7 }, { 207, 7 }, { 71, 9 }, + { 201, 9 }, { 199, 9 }, { 73, 9 }, { 38, 8 }, { 234, 8 }, + { 32, 7 }, { 224, 7 }, { 193, 7 }, { 79, 7 }, { 165, 9 }, + { 107, 9 }, { 182, 9 }, { 90, 9 }, { 35, 8 }, { 237, 8 }, + { 244, 7 }, { 28, 7 }, { 20, 7 }, { 252, 7 }, { 50, 8 }, + { 222, 8 }, { 97, 8 }, { 175, 8 }, { 101, 9 }, { 171, 9 }, + { 86, 9 }, { 186, 9 }, { 83, 8 }, { 189, 8 }, { 161, 8 }, + { 111, 8 }, { 179, 8 }, { 93, 8 }, { 64, 7 }, { 192, 7 }, + { 227, 8 }, { 45, 8 }, { 210, 8 }, { 62, 8 }, { 2, 7 }, + { 14, 7 }, { 213, 8 }, { 59, 8 }, { 53, 8 }, { 219, 8 }, + { 196, 8 }, { 76, 8 }, { 115, 9 }, { 157, 9 }, { 151, 10 }, + { 121, 10 }, { 119, 10 }, { 153, 10 }, { 68, 8 }, { 204, 8 }, + { 22, 8 }, { 250, 8 }, { 96, 8 }, { 160, 8 }, { 147, 9 }, + { 125, 9 }, { 55, 9 }, { 217, 9 }, { 246, 8 }, { 26, 8 }, + { 215, 9 }, { 57, 9 }, { 164, 9 }, { 108, 9 }, { 17, 7 }, + { 255, 7 }, { 4, 7 }, { 12, 7 }, { 241, 7 }, { 31, 7 }, + { 114, 9 }, { 158, 9 }, { 100, 9 }, { 172, 9 }, { 6, 8 }, + { 10, 8 }, { 209, 8 }, { 63, 8 }, { 19, 8 }, { 253, 8 }, + { 49, 8 }, { 223, 8 }, { 195, 8 }, { 77, 8 }, { 212, 8 }, + { 60, 8 }, { 198, 9 }, { 74, 9 }, { 70, 9 }, { 202, 9 }, + { 82, 8 }, { 190, 8 }, { 243, 8 }, { 29, 8 }, { 146, 9 }, + { 126, 9 }, { 118, 10 }, { 154, 10 }, { 167, 10 }, { 105, 10 }, + { 178, 8 }, { 94, 8 }, { 67, 8 }, { 205, 8 }, { 85, 9 }, + { 187, 9 }, { 181, 9 }, { 91, 9 }, { 52, 8 }, { 220, 8 }, + { 150, 10 }, { 122, 10 }, { 103, 10 }, { 169, 10 }, { 231, 9 }, + { 41, 9 }, { 229, 8 }, { 43, 8 }, { 48, 8 }, { 208, 8 }, + { 37, 8 }, { 235, 8 }, { 34, 8 }, { 238, 8 }, { 226, 8 }, + { 46, 8 }, { 39, 9 }, { 233, 9 }, { 145, 9 }, { 127, 9 }, +}; + +static const uint8_t huff_spec_a43_tab[225][2] = { + { 246, 8 }, { 26, 8 }, { 22, 8 }, { 250, 8 }, { 210, 7 }, + { 62, 7 }, { 50, 7 }, { 222, 7 }, { 53, 8 }, { 219, 8 }, + { 231, 9 }, { 41, 9 }, { 39, 9 }, { 233, 9 }, { 16, 5 }, + { 240, 5 }, { 0, 4 }, { 227, 7 }, { 45, 7 }, { 35, 7 }, + { 237, 7 }, { 196, 8 }, { 76, 8 }, { 151, 10 }, { 121, 10 }, + { 119, 10 }, { 153, 10 }, { 150, 10 }, { 122, 10 }, { 167, 10 }, + { 105, 10 }, { 118, 10 }, { 154, 10 }, { 103, 10 }, { 169, 10 }, + { 117, 10 }, { 155, 10 }, { 149, 10 }, { 123, 10 }, { 96, 8 }, + { 160, 8 }, { 166, 10 }, { 106, 10 }, { 183, 10 }, { 89, 10 }, + { 87, 10 }, { 185, 10 }, { 102, 10 }, { 170, 10 }, { 71, 10 }, + { 201, 10 }, { 116, 10 }, { 156, 10 }, { 148, 10 }, { 124, 10 }, + { 199, 10 }, { 73, 10 }, { 182, 10 }, { 90, 10 }, { 165, 10 }, + { 107, 10 }, { 181, 9 }, { 91, 9 }, { 68, 8 }, { 204, 8 }, + { 85, 9 }, { 187, 9 }, { 113, 9 }, { 159, 9 }, { 6, 8 }, + { 10, 8 }, { 65, 7 }, { 207, 7 }, { 32, 6 }, { 224, 6 }, + { 2, 6 }, { 14, 6 }, { 193, 7 }, { 79, 7 }, { 145, 9 }, + { 127, 9 }, { 163, 9 }, { 109, 9 }, { 99, 9 }, { 173, 9 }, + { 247, 9 }, { 25, 9 }, { 20, 7 }, { 252, 7 }, { 244, 7 }, + { 28, 7 }, { 178, 8 }, { 94, 8 }, { 82, 8 }, { 190, 8 }, + { 23, 9 }, { 249, 9 }, { 54, 9 }, { 218, 9 }, { 214, 9 }, + { 58, 9 }, { 112, 9 }, { 144, 9 }, { 49, 7 }, { 223, 7 }, + { 209, 7 }, { 63, 7 }, { 37, 8 }, { 235, 8 }, { 229, 8 }, + { 43, 8 }, { 19, 7 }, { 253, 7 }, { 243, 7 }, { 29, 7 }, + { 64, 7 }, { 192, 7 }, { 195, 8 }, { 77, 8 }, { 67, 8 }, + { 205, 8 }, { 212, 8 }, { 60, 8 }, { 52, 8 }, { 220, 8 }, + { 7, 9 }, { 9, 9 }, { 180, 9 }, { 92, 9 }, { 197, 9 }, + { 75, 9 }, { 84, 9 }, { 188, 9 }, { 4, 7 }, { 12, 7 }, + { 48, 7 }, { 208, 7 }, { 34, 7 }, { 238, 7 }, { 226, 7 }, + { 46, 7 }, { 101, 10 }, { 171, 10 }, { 86, 10 }, { 186, 10 }, + { 69, 9 }, { 203, 9 }, { 211, 8 }, { 61, 8 }, { 17, 6 }, + { 255, 6 }, { 241, 6 }, { 31, 6 }, { 3, 7 }, { 13, 7 }, + { 51, 8 }, { 221, 8 }, { 98, 9 }, { 174, 9 }, { 162, 9 }, + { 110, 9 }, { 177, 8 }, { 95, 8 }, { 81, 8 }, { 191, 8 }, + { 38, 9 }, { 234, 9 }, { 230, 9 }, { 42, 9 }, { 21, 8 }, + { 251, 8 }, { 245, 8 }, { 27, 8 }, { 115, 10 }, { 157, 10 }, + { 55, 10 }, { 217, 10 }, { 147, 10 }, { 125, 10 }, { 215, 10 }, + { 57, 10 }, { 80, 8 }, { 176, 8 }, { 66, 8 }, { 206, 8 }, + { 194, 8 }, { 78, 8 }, { 97, 9 }, { 175, 9 }, { 161, 9 }, + { 111, 9 }, { 5, 8 }, { 11, 8 }, { 228, 8 }, { 44, 8 }, + { 36, 8 }, { 236, 8 }, { 114, 10 }, { 158, 10 }, { 100, 10 }, + { 172, 10 }, { 83, 9 }, { 189, 9 }, { 33, 7 }, { 239, 7 }, + { 164, 10 }, { 108, 10 }, { 198, 10 }, { 74, 10 }, { 179, 9 }, + { 93, 9 }, { 70, 10 }, { 202, 10 }, { 146, 10 }, { 126, 10 }, + { 213, 9 }, { 59, 9 }, { 18, 7 }, { 254, 7 }, { 225, 7 }, + { 47, 7 }, { 242, 7 }, { 30, 7 }, { 1, 6 }, { 15, 6 }, +}; + +static const uint8_t huff_spec_a44_tab[225][2] = { + { 193, 7 }, { 79, 7 }, { 20, 7 }, { 252, 7 }, { 151, 10 }, + { 121, 10 }, { 119, 10 }, { 153, 10 }, { 118, 10 }, { 154, 10 }, + { 150, 10 }, { 122, 10 }, { 167, 10 }, { 105, 10 }, { 103, 10 }, + { 169, 10 }, { 117, 10 }, { 155, 10 }, { 149, 10 }, { 123, 10 }, + { 244, 7 }, { 28, 7 }, { 87, 10 }, { 185, 10 }, { 183, 10 }, + { 89, 10 }, { 166, 10 }, { 106, 10 }, { 102, 10 }, { 170, 10 }, + { 71, 10 }, { 201, 10 }, { 148, 10 }, { 124, 10 }, { 199, 10 }, + { 73, 10 }, { 116, 10 }, { 156, 10 }, { 165, 10 }, { 107, 10 }, + { 182, 10 }, { 90, 10 }, { 86, 10 }, { 186, 10 }, { 115, 10 }, + { 157, 10 }, { 101, 10 }, { 171, 10 }, { 147, 10 }, { 125, 10 }, + { 55, 10 }, { 217, 10 }, { 215, 10 }, { 57, 10 }, { 114, 10 }, + { 158, 10 }, { 146, 10 }, { 126, 10 }, { 164, 10 }, { 108, 10 }, + { 39, 10 }, { 233, 10 }, { 100, 10 }, { 172, 10 }, { 231, 10 }, + { 41, 10 }, { 198, 10 }, { 74, 10 }, { 70, 10 }, { 202, 10 }, + { 145, 10 }, { 127, 10 }, { 181, 10 }, { 91, 10 }, { 85, 10 }, + { 187, 10 }, { 113, 10 }, { 159, 10 }, { 247, 10 }, { 25, 10 }, + { 112, 10 }, { 144, 10 }, { 23, 10 }, { 249, 10 }, { 7, 10 }, + { 9, 10 }, { 99, 10 }, { 173, 10 }, { 54, 10 }, { 218, 10 }, + { 163, 10 }, { 109, 10 }, { 214, 10 }, { 58, 10 }, { 197, 10 }, + { 75, 10 }, { 84, 10 }, { 188, 10 }, { 98, 10 }, { 174, 10 }, + { 69, 10 }, { 203, 10 }, { 67, 8 }, { 205, 8 }, { 180, 10 }, + { 92, 10 }, { 162, 10 }, { 110, 10 }, { 97, 9 }, { 175, 9 }, + { 81, 8 }, { 191, 8 }, { 177, 8 }, { 95, 8 }, { 210, 7 }, + { 62, 7 }, { 212, 8 }, { 60, 8 }, { 195, 8 }, { 77, 8 }, + { 35, 7 }, { 237, 7 }, { 64, 7 }, { 192, 7 }, { 50, 7 }, + { 222, 7 }, { 227, 7 }, { 45, 7 }, { 52, 8 }, { 220, 8 }, + { 21, 8 }, { 251, 8 }, { 4, 7 }, { 12, 7 }, { 245, 8 }, + { 27, 8 }, { 161, 9 }, { 111, 9 }, { 22, 9 }, { 250, 9 }, + { 225, 6 }, { 47, 6 }, { 33, 6 }, { 239, 6 }, { 18, 6 }, + { 254, 6 }, { 242, 6 }, { 30, 6 }, { 80, 8 }, { 176, 8 }, + { 246, 9 }, { 26, 9 }, { 96, 9 }, { 160, 9 }, { 5, 8 }, + { 11, 8 }, { 6, 9 }, { 10, 9 }, { 179, 9 }, { 93, 9 }, + { 83, 9 }, { 189, 9 }, { 53, 9 }, { 219, 9 }, { 213, 9 }, + { 59, 9 }, { 196, 9 }, { 76, 9 }, { 49, 7 }, { 223, 7 }, + { 16, 5 }, { 240, 5 }, { 1, 5 }, { 15, 5 }, { 0, 4 }, + { 209, 7 }, { 63, 7 }, { 19, 7 }, { 253, 7 }, { 32, 6 }, + { 224, 6 }, { 2, 6 }, { 14, 6 }, { 243, 7 }, { 29, 7 }, + { 51, 8 }, { 221, 8 }, { 211, 8 }, { 61, 8 }, { 66, 8 }, + { 206, 8 }, { 194, 8 }, { 78, 8 }, { 228, 8 }, { 44, 8 }, + { 36, 8 }, { 236, 8 }, { 48, 7 }, { 208, 7 }, { 3, 7 }, + { 13, 7 }, { 68, 9 }, { 204, 9 }, { 82, 9 }, { 190, 9 }, + { 178, 9 }, { 94, 9 }, { 37, 9 }, { 235, 9 }, { 34, 7 }, + { 238, 7 }, { 226, 7 }, { 46, 7 }, { 229, 9 }, { 43, 9 }, + { 38, 10 }, { 234, 10 }, { 230, 10 }, { 42, 10 }, { 65, 8 }, + { 207, 8 }, { 17, 6 }, { 255, 6 }, { 241, 6 }, { 31, 6 }, +}; + +static const uint8_t huff_spec_a51_tab[31][2] = { + { 8, 4 }, { 24, 4 }, { 15, 5 }, { 17, 5 }, { 4, 5 }, + { 28, 5 }, { 9, 4 }, { 23, 4 }, { 14, 5 }, { 18, 5 }, + { 3, 5 }, { 29, 5 }, { 13, 5 }, { 19, 5 }, { 2, 5 }, + { 30, 5 }, { 12, 5 }, { 20, 5 }, { 1, 5 }, { 31, 5 }, + { 7, 6 }, { 25, 6 }, { 0, 5 }, { 11, 5 }, { 21, 5 }, + { 6, 6 }, { 26, 6 }, { 5, 6 }, { 27, 6 }, { 10, 5 }, + { 22, 5 }, +}; + +static const uint8_t huff_spec_a52_tab[31][2] = { + { 2, 4 }, { 30, 4 }, { 11, 5 }, { 21, 5 }, { 7, 5 }, + { 25, 5 }, { 1, 4 }, { 31, 4 }, { 6, 5 }, { 26, 5 }, + { 10, 5 }, { 22, 5 }, { 15, 6 }, { 17, 6 }, { 14, 6 }, + { 18, 6 }, { 0, 4 }, { 5, 5 }, { 27, 5 }, { 9, 5 }, + { 23, 5 }, { 8, 5 }, { 24, 5 }, { 4, 5 }, { 28, 5 }, + { 13, 6 }, { 19, 6 }, { 12, 6 }, { 20, 6 }, { 3, 5 }, + { 29, 5 }, +}; + +static const uint8_t huff_spec_a53_tab[31][2] = { + { 0, 3 }, { 9, 5 }, { 23, 5 }, { 7, 5 }, { 25, 5 }, + { 3, 4 }, { 29, 4 }, { 8, 5 }, { 24, 5 }, { 15, 7 }, + { 17, 7 }, { 14, 7 }, { 18, 7 }, { 11, 6 }, { 21, 6 }, + { 2, 4 }, { 30, 4 }, { 6, 5 }, { 26, 5 }, { 5, 5 }, + { 27, 5 }, { 1, 4 }, { 31, 4 }, { 10, 6 }, { 22, 6 }, + { 13, 7 }, { 19, 7 }, { 12, 7 }, { 20, 7 }, { 4, 5 }, + { 28, 5 }, +}; + +static const uint8_t huff_spec_a54_tab[31][2] = { + { 8, 5 }, { 24, 5 }, { 7, 5 }, { 25, 5 }, { 4, 4 }, + { 28, 4 }, { 0, 3 }, { 10, 6 }, { 22, 6 }, { 13, 7 }, + { 19, 7 }, { 12, 7 }, { 20, 7 }, { 6, 5 }, { 26, 5 }, + { 3, 4 }, { 29, 4 }, { 2, 4 }, { 30, 4 }, { 9, 6 }, + { 23, 6 }, { 15, 8 }, { 17, 8 }, { 14, 8 }, { 18, 8 }, + { 11, 7 }, { 21, 7 }, { 5, 5 }, { 27, 5 }, { 1, 4 }, + { 31, 4 }, +}; + +static const uint8_t huff_spec_a61_tab[63][2] = { + { 19, 5 }, { 45, 5 }, { 31, 6 }, { 33, 6 }, { 30, 6 }, + { 34, 6 }, { 16, 5 }, { 48, 5 }, { 8, 6 }, { 56, 6 }, + { 7, 6 }, { 57, 6 }, { 18, 5 }, { 46, 5 }, { 29, 6 }, + { 35, 6 }, { 28, 6 }, { 36, 6 }, { 6, 6 }, { 58, 6 }, + { 27, 6 }, { 37, 6 }, { 17, 5 }, { 47, 5 }, { 5, 6 }, + { 59, 6 }, { 26, 6 }, { 38, 6 }, { 4, 6 }, { 60, 6 }, + { 25, 6 }, { 39, 6 }, { 3, 6 }, { 61, 6 }, { 2, 6 }, + { 62, 6 }, { 24, 6 }, { 40, 6 }, { 15, 7 }, { 49, 7 }, + { 14, 7 }, { 50, 7 }, { 1, 6 }, { 63, 6 }, { 23, 6 }, + { 41, 6 }, { 13, 7 }, { 51, 7 }, { 0, 6 }, { 22, 6 }, + { 42, 6 }, { 12, 7 }, { 52, 7 }, { 11, 7 }, { 53, 7 }, + { 21, 6 }, { 43, 6 }, { 20, 6 }, { 44, 6 }, { 10, 7 }, + { 54, 7 }, { 9, 7 }, { 55, 7 }, +}; + +static const uint8_t huff_spec_a62_tab[63][2] = { + { 23, 6 }, { 41, 6 }, { 15, 6 }, { 49, 6 }, { 4, 5 }, + { 60, 5 }, { 3, 5 }, { 61, 5 }, { 22, 6 }, { 42, 6 }, + { 14, 6 }, { 50, 6 }, { 2, 5 }, { 62, 5 }, { 31, 7 }, + { 33, 7 }, { 30, 7 }, { 34, 7 }, { 21, 6 }, { 43, 6 }, + { 13, 6 }, { 51, 6 }, { 12, 6 }, { 52, 6 }, { 1, 5 }, + { 63, 5 }, { 20, 6 }, { 44, 6 }, { 29, 7 }, { 35, 7 }, + { 28, 7 }, { 36, 7 }, { 11, 6 }, { 53, 6 }, { 19, 6 }, + { 45, 6 }, { 0, 5 }, { 10, 6 }, { 54, 6 }, { 18, 6 }, + { 46, 6 }, { 27, 7 }, { 37, 7 }, { 26, 7 }, { 38, 7 }, + { 9, 6 }, { 55, 6 }, { 16, 6 }, { 48, 6 }, { 8, 6 }, + { 56, 6 }, { 17, 6 }, { 47, 6 }, { 7, 6 }, { 57, 6 }, + { 25, 7 }, { 39, 7 }, { 24, 7 }, { 40, 7 }, { 6, 6 }, + { 58, 6 }, { 5, 6 }, { 59, 6 }, +}; + +static const uint8_t huff_spec_a63_tab[63][2] = { + { 0, 4 }, { 7, 5 }, { 57, 5 }, { 15, 6 }, { 49, 6 }, + { 25, 7 }, { 39, 7 }, { 24, 7 }, { 40, 7 }, { 18, 6 }, + { 46, 6 }, { 14, 6 }, { 50, 6 }, { 6, 5 }, { 58, 5 }, + { 5, 5 }, { 59, 5 }, { 31, 8 }, { 33, 8 }, { 30, 8 }, + { 34, 8 }, { 23, 7 }, { 41, 7 }, { 17, 6 }, { 47, 6 }, + { 13, 6 }, { 51, 6 }, { 16, 6 }, { 48, 6 }, { 4, 5 }, + { 60, 5 }, { 12, 6 }, { 52, 6 }, { 22, 7 }, { 42, 7 }, + { 29, 8 }, { 35, 8 }, { 28, 8 }, { 36, 8 }, { 3, 5 }, + { 61, 5 }, { 11, 6 }, { 53, 6 }, { 10, 6 }, { 54, 6 }, + { 2, 5 }, { 62, 5 }, { 21, 7 }, { 43, 7 }, { 20, 7 }, + { 44, 7 }, { 9, 6 }, { 55, 6 }, { 1, 5 }, { 63, 5 }, + { 27, 8 }, { 37, 8 }, { 26, 8 }, { 38, 8 }, { 19, 7 }, + { 45, 7 }, { 8, 6 }, { 56, 6 }, +}; + +static const uint8_t huff_spec_a64_tab[63][2] = { + { 16, 6 }, { 48, 6 }, { 27, 8 }, { 37, 8 }, { 26, 8 }, + { 38, 8 }, { 21, 7 }, { 43, 7 }, { 8, 5 }, { 56, 5 }, + { 1, 4 }, { 63, 4 }, { 14, 6 }, { 50, 6 }, { 20, 7 }, + { 44, 7 }, { 31, 9 }, { 33, 9 }, { 30, 9 }, { 34, 9 }, + { 25, 8 }, { 39, 8 }, { 7, 5 }, { 57, 5 }, { 0, 4 }, + { 6, 5 }, { 58, 5 }, { 13, 6 }, { 51, 6 }, { 12, 6 }, + { 52, 6 }, { 5, 5 }, { 59, 5 }, { 19, 7 }, { 45, 7 }, + { 24, 8 }, { 40, 8 }, { 29, 9 }, { 35, 9 }, { 28, 9 }, + { 36, 9 }, { 11, 6 }, { 53, 6 }, { 4, 5 }, { 60, 5 }, + { 18, 7 }, { 46, 7 }, { 23, 8 }, { 41, 8 }, { 22, 8 }, + { 42, 8 }, { 10, 6 }, { 54, 6 }, { 3, 5 }, { 61, 5 }, + { 2, 5 }, { 62, 5 }, { 17, 7 }, { 47, 7 }, { 15, 7 }, + { 49, 7 }, { 9, 6 }, { 55, 6 }, +}; + +static const uint8_t huff_spec_a71_tab[127][2] = { + { 18, 7 }, { 110, 7 }, { 63, 7 }, { 65, 7 }, { 38, 6 }, + { 90, 6 }, { 17, 7 }, { 111, 7 }, { 62, 7 }, { 66, 7 }, + { 61, 7 }, { 67, 7 }, { 16, 7 }, { 112, 7 }, { 37, 6 }, + { 91, 6 }, { 60, 7 }, { 68, 7 }, { 15, 7 }, { 113, 7 }, + { 32, 6 }, { 96, 6 }, { 59, 7 }, { 69, 7 }, { 14, 7 }, + { 114, 7 }, { 36, 6 }, { 92, 6 }, { 58, 7 }, { 70, 7 }, + { 13, 7 }, { 115, 7 }, { 57, 7 }, { 71, 7 }, { 12, 7 }, + { 116, 7 }, { 35, 6 }, { 93, 6 }, { 56, 7 }, { 72, 7 }, + { 55, 7 }, { 73, 7 }, { 11, 7 }, { 117, 7 }, { 10, 7 }, + { 118, 7 }, { 34, 6 }, { 94, 6 }, { 54, 7 }, { 74, 7 }, + { 9, 7 }, { 119, 7 }, { 33, 6 }, { 95, 6 }, { 53, 7 }, + { 75, 7 }, { 52, 7 }, { 76, 7 }, { 8, 7 }, { 120, 7 }, + { 51, 7 }, { 77, 7 }, { 50, 7 }, { 78, 7 }, { 7, 7 }, + { 121, 7 }, { 5, 7 }, { 123, 7 }, { 6, 7 }, { 122, 7 }, + { 49, 7 }, { 79, 7 }, { 4, 7 }, { 124, 7 }, { 31, 8 }, + { 97, 8 }, { 30, 8 }, { 98, 8 }, { 48, 7 }, { 80, 7 }, + { 3, 7 }, { 125, 7 }, { 29, 8 }, { 99, 8 }, { 28, 8 }, + { 100, 8 }, { 47, 7 }, { 81, 7 }, { 2, 7 }, { 126, 7 }, + { 46, 7 }, { 82, 7 }, { 1, 7 }, { 127, 7 }, { 27, 8 }, + { 101, 8 }, { 26, 8 }, { 102, 8 }, { 45, 7 }, { 83, 7 }, + { 0, 7 }, { 25, 8 }, { 103, 8 }, { 44, 7 }, { 84, 7 }, + { 24, 8 }, { 104, 8 }, { 23, 8 }, { 105, 8 }, { 43, 7 }, + { 85, 7 }, { 42, 7 }, { 86, 7 }, { 22, 8 }, { 106, 8 }, + { 21, 8 }, { 107, 8 }, { 41, 7 }, { 87, 7 }, { 20, 8 }, + { 108, 8 }, { 19, 8 }, { 109, 8 }, { 40, 7 }, { 88, 7 }, + { 39, 7 }, { 89, 7 }, +}; + +static const uint8_t huff_spec_a72_tab[127][2] = { + { 47, 7 }, { 81, 7 }, { 46, 7 }, { 82, 7 }, { 8, 6 }, + { 120, 6 }, { 31, 7 }, { 97, 7 }, { 45, 7 }, { 83, 7 }, + { 7, 6 }, { 121, 6 }, { 30, 7 }, { 98, 7 }, { 29, 7 }, + { 99, 7 }, { 6, 6 }, { 122, 6 }, { 63, 8 }, { 65, 8 }, + { 62, 8 }, { 66, 8 }, { 44, 7 }, { 84, 7 }, { 5, 6 }, + { 123, 6 }, { 28, 7 }, { 100, 7 }, { 43, 7 }, { 85, 7 }, + { 4, 6 }, { 124, 6 }, { 27, 7 }, { 101, 7 }, { 26, 7 }, + { 102, 7 }, { 42, 7 }, { 86, 7 }, { 61, 8 }, { 67, 8 }, + { 60, 8 }, { 68, 8 }, { 3, 6 }, { 125, 6 }, { 25, 7 }, + { 103, 7 }, { 41, 7 }, { 87, 7 }, { 2, 6 }, { 126, 6 }, + { 24, 7 }, { 104, 7 }, { 59, 8 }, { 69, 8 }, { 58, 8 }, + { 70, 8 }, { 40, 7 }, { 88, 7 }, { 23, 7 }, { 105, 7 }, + { 39, 7 }, { 89, 7 }, { 22, 7 }, { 106, 7 }, { 1, 6 }, + { 127, 6 }, { 57, 8 }, { 71, 8 }, { 56, 8 }, { 72, 8 }, + { 21, 7 }, { 107, 7 }, { 38, 7 }, { 90, 7 }, { 20, 7 }, + { 108, 7 }, { 0, 6 }, { 55, 8 }, { 73, 8 }, { 54, 8 }, + { 74, 8 }, { 37, 7 }, { 91, 7 }, { 19, 7 }, { 109, 7 }, + { 18, 7 }, { 110, 7 }, { 36, 7 }, { 92, 7 }, { 53, 8 }, + { 75, 8 }, { 52, 8 }, { 76, 8 }, { 17, 7 }, { 111, 7 }, + { 35, 7 }, { 93, 7 }, { 32, 7 }, { 96, 7 }, { 16, 7 }, + { 112, 7 }, { 15, 7 }, { 113, 7 }, { 34, 7 }, { 94, 7 }, + { 51, 8 }, { 77, 8 }, { 50, 8 }, { 78, 8 }, { 14, 7 }, + { 114, 7 }, { 13, 7 }, { 115, 7 }, { 33, 7 }, { 95, 7 }, + { 12, 7 }, { 116, 7 }, { 49, 8 }, { 79, 8 }, { 48, 8 }, + { 80, 8 }, { 11, 7 }, { 117, 7 }, { 10, 7 }, { 118, 7 }, + { 9, 7 }, { 119, 7 }, +}; + +static const uint8_t huff_spec_a73_tab[127][2] = { + { 15, 6 }, { 113, 6 }, { 31, 7 }, { 97, 7 }, { 51, 8 }, + { 77, 8 }, { 50, 8 }, { 78, 8 }, { 14, 6 }, { 114, 6 }, + { 0, 5 }, { 37, 7 }, { 91, 7 }, { 30, 7 }, { 98, 7 }, + { 13, 6 }, { 115, 6 }, { 29, 7 }, { 99, 7 }, { 49, 8 }, + { 79, 8 }, { 63, 9 }, { 65, 9 }, { 62, 9 }, { 66, 9 }, + { 12, 6 }, { 116, 6 }, { 36, 7 }, { 92, 7 }, { 28, 7 }, + { 100, 7 }, { 35, 7 }, { 93, 7 }, { 48, 8 }, { 80, 8 }, + { 47, 8 }, { 81, 8 }, { 11, 6 }, { 117, 6 }, { 10, 6 }, + { 118, 6 }, { 27, 7 }, { 101, 7 }, { 34, 7 }, { 94, 7 }, + { 61, 9 }, { 67, 9 }, { 60, 9 }, { 68, 9 }, { 46, 8 }, + { 82, 8 }, { 26, 7 }, { 102, 7 }, { 9, 6 }, { 119, 6 }, + { 32, 7 }, { 96, 7 }, { 33, 7 }, { 95, 7 }, { 8, 6 }, + { 120, 6 }, { 25, 7 }, { 103, 7 }, { 45, 8 }, { 83, 8 }, + { 59, 9 }, { 69, 9 }, { 58, 9 }, { 70, 9 }, { 7, 6 }, + { 121, 6 }, { 24, 7 }, { 104, 7 }, { 23, 7 }, { 105, 7 }, + { 6, 6 }, { 122, 6 }, { 44, 8 }, { 84, 8 }, { 57, 9 }, + { 71, 9 }, { 56, 9 }, { 72, 9 }, { 22, 7 }, { 106, 7 }, + { 5, 6 }, { 123, 6 }, { 43, 8 }, { 85, 8 }, { 42, 8 }, + { 86, 8 }, { 21, 7 }, { 107, 7 }, { 4, 6 }, { 124, 6 }, + { 20, 7 }, { 108, 7 }, { 55, 9 }, { 73, 9 }, { 54, 9 }, + { 74, 9 }, { 41, 8 }, { 87, 8 }, { 3, 6 }, { 125, 6 }, + { 19, 7 }, { 109, 7 }, { 18, 7 }, { 110, 7 }, { 2, 6 }, + { 126, 6 }, { 40, 8 }, { 88, 8 }, { 53, 9 }, { 75, 9 }, + { 52, 9 }, { 76, 9 }, { 17, 7 }, { 111, 7 }, { 39, 8 }, + { 89, 8 }, { 38, 8 }, { 90, 8 }, { 16, 7 }, { 112, 7 }, + { 1, 6 }, { 127, 6 }, +}; + +static const uint8_t huff_spec_a74_tab[127][2] = { + { 3, 5 }, { 125, 5 }, { 32, 7 }, { 96, 7 }, { 29, 7 }, + { 99, 7 }, { 16, 6 }, { 112, 6 }, { 2, 5 }, { 126, 5 }, + { 53, 9 }, { 75, 9 }, { 52, 9 }, { 76, 9 }, { 42, 8 }, + { 86, 8 }, { 28, 7 }, { 100, 7 }, { 15, 6 }, { 113, 6 }, + { 63, 10 }, { 65, 10 }, { 62, 10 }, { 66, 10 }, { 51, 9 }, + { 77, 9 }, { 41, 8 }, { 87, 8 }, { 27, 7 }, { 101, 7 }, + { 14, 6 }, { 114, 6 }, { 1, 5 }, { 127, 5 }, { 13, 6 }, + { 115, 6 }, { 0, 5 }, { 26, 7 }, { 102, 7 }, { 40, 8 }, + { 88, 8 }, { 50, 9 }, { 78, 9 }, { 61, 10 }, { 67, 10 }, + { 60, 10 }, { 68, 10 }, { 12, 6 }, { 116, 6 }, { 25, 7 }, + { 103, 7 }, { 39, 8 }, { 89, 8 }, { 49, 9 }, { 79, 9 }, + { 48, 9 }, { 80, 9 }, { 11, 6 }, { 117, 6 }, { 24, 7 }, + { 104, 7 }, { 38, 8 }, { 90, 8 }, { 59, 10 }, { 69, 10 }, + { 58, 10 }, { 70, 10 }, { 47, 9 }, { 81, 9 }, { 10, 6 }, + { 118, 6 }, { 9, 6 }, { 119, 6 }, { 23, 7 }, { 105, 7 }, + { 22, 7 }, { 106, 7 }, { 8, 6 }, { 120, 6 }, { 37, 8 }, + { 91, 8 }, { 36, 8 }, { 92, 8 }, { 21, 7 }, { 107, 7 }, + { 7, 6 }, { 121, 6 }, { 6, 6 }, { 122, 6 }, { 57, 10 }, + { 71, 10 }, { 56, 10 }, { 72, 10 }, { 46, 9 }, { 82, 9 }, + { 35, 8 }, { 93, 8 }, { 20, 7 }, { 108, 7 }, { 5, 6 }, + { 123, 6 }, { 19, 7 }, { 109, 7 }, { 45, 9 }, { 83, 9 }, + { 44, 9 }, { 84, 9 }, { 31, 8 }, { 97, 8 }, { 4, 6 }, + { 124, 6 }, { 34, 8 }, { 94, 8 }, { 55, 10 }, { 73, 10 }, + { 54, 10 }, { 74, 10 }, { 43, 9 }, { 85, 9 }, { 18, 7 }, + { 110, 7 }, { 30, 8 }, { 98, 8 }, { 33, 8 }, { 95, 8 }, + { 17, 7 }, { 111, 7 }, +}; + +static const uint8_t huff_spec_b22_tab[80][2] = { + { 80, 5 }, { 240, 5 }, { 253, 10 }, { 87, 10 }, { 117, 10 }, + { 223, 10 }, { 93, 10 }, { 247, 10 }, { 221, 10 }, { 119, 10 }, + { 213, 10 }, { 127, 10 }, { 85, 10 }, { 255, 10 }, { 245, 10 }, + { 95, 10 }, { 81, 10 }, { 243, 10 }, { 17, 7 }, { 51, 7 }, + { 20, 6 }, { 60, 6 }, { 116, 9 }, { 220, 9 }, { 84, 9 }, + { 252, 9 }, { 68, 8 }, { 204, 8 }, { 212, 7 }, { 124, 7 }, + { 196, 6 }, { 76, 6 }, { 5, 5 }, { 15, 5 }, { 53, 7 }, + { 31, 7 }, { 61, 7 }, { 23, 7 }, { 52, 6 }, { 28, 6 }, + { 13, 5 }, { 7, 5 }, { 16, 4 }, { 48, 4 }, { 4, 4 }, + { 12, 4 }, { 49, 6 }, { 19, 6 }, { 244, 7 }, { 92, 7 }, + { 21, 9 }, { 63, 9 }, { 197, 9 }, { 79, 9 }, { 69, 10 }, + { 207, 10 }, { 205, 10 }, { 71, 10 }, { 241, 9 }, { 83, 9 }, + { 208, 6 }, { 112, 6 }, { 77, 9 }, { 199, 9 }, { 113, 9 }, + { 211, 9 }, { 29, 9 }, { 55, 9 }, { 209, 10 }, { 115, 10 }, + { 125, 10 }, { 215, 10 }, { 65, 8 }, { 195, 8 }, { 193, 8 }, + { 67, 8 }, { 64, 4 }, { 192, 4 }, { 1, 4 }, { 3, 4 }, +}; + +static const uint8_t huff_spec_b23_tab[81][2] = { + { 16, 4 }, { 48, 4 }, { 4, 4 }, { 12, 4 }, { 64, 4 }, + { 192, 4 }, { 5, 6 }, { 15, 6 }, { 13, 6 }, { 7, 6 }, + { 212, 8 }, { 124, 8 }, { 213, 10 }, { 127, 10 }, { 93, 10 }, + { 247, 10 }, { 117, 10 }, { 223, 10 }, { 253, 10 }, { 87, 10 }, + { 21, 9 }, { 63, 9 }, { 221, 10 }, { 119, 10 }, { 81, 10 }, + { 243, 10 }, { 205, 10 }, { 71, 10 }, { 69, 10 }, { 207, 10 }, + { 245, 10 }, { 95, 10 }, { 209, 10 }, { 115, 10 }, { 125, 10 }, + { 215, 10 }, { 85, 10 }, { 255, 10 }, { 116, 10 }, { 220, 10 }, + { 241, 10 }, { 83, 10 }, { 77, 10 }, { 199, 10 }, { 84, 10 }, + { 252, 10 }, { 29, 9 }, { 55, 9 }, { 61, 8 }, { 23, 8 }, + { 53, 8 }, { 31, 8 }, { 1, 4 }, { 3, 4 }, { 193, 8 }, + { 67, 8 }, { 65, 8 }, { 195, 8 }, { 196, 7 }, { 76, 7 }, + { 49, 7 }, { 19, 7 }, { 20, 7 }, { 60, 7 }, { 52, 7 }, + { 28, 7 }, { 208, 7 }, { 112, 7 }, { 80, 7 }, { 240, 7 }, + { 113, 10 }, { 211, 10 }, { 197, 10 }, { 79, 10 }, { 68, 9 }, + { 204, 9 }, { 17, 9 }, { 51, 9 }, { 244, 9 }, { 92, 9 }, + { 0, 2 }, +}; + +static const uint8_t huff_spec_b24_tab[81][2] = { + { 1, 4 }, { 3, 4 }, { 52, 7 }, { 28, 7 }, { 193, 8 }, + { 67, 8 }, { 213, 10 }, { 127, 10 }, { 253, 10 }, { 87, 10 }, + { 93, 10 }, { 247, 10 }, { 117, 10 }, { 223, 10 }, { 80, 7 }, + { 240, 7 }, { 196, 7 }, { 76, 7 }, { 208, 7 }, { 112, 7 }, + { 221, 10 }, { 119, 10 }, { 245, 10 }, { 95, 10 }, { 69, 10 }, + { 207, 10 }, { 85, 10 }, { 255, 10 }, { 209, 10 }, { 115, 10 }, + { 205, 10 }, { 71, 10 }, { 81, 10 }, { 243, 10 }, { 125, 10 }, + { 215, 10 }, { 5, 7 }, { 15, 7 }, { 116, 10 }, { 220, 10 }, + { 84, 10 }, { 252, 10 }, { 29, 10 }, { 55, 10 }, { 113, 10 }, + { 211, 10 }, { 241, 10 }, { 83, 10 }, { 21, 10 }, { 63, 10 }, + { 197, 10 }, { 79, 10 }, { 77, 10 }, { 199, 10 }, { 16, 5 }, + { 48, 5 }, { 4, 5 }, { 12, 5 }, { 49, 7 }, { 19, 7 }, + { 13, 7 }, { 7, 7 }, { 212, 10 }, { 124, 10 }, { 244, 10 }, + { 92, 10 }, { 68, 9 }, { 204, 9 }, { 53, 9 }, { 31, 9 }, + { 61, 9 }, { 23, 9 }, { 17, 9 }, { 51, 9 }, { 65, 9 }, + { 195, 9 }, { 20, 8 }, { 60, 8 }, { 64, 5 }, { 192, 5 }, + { 0, 1 }, +}; + +static const uint8_t huff_spec_b32_tab[49][2] = { + { 58, 5 }, { 14, 5 }, { 59, 6 }, { 13, 6 }, { 19, 7 }, + { 53, 7 }, { 25, 7 }, { 47, 7 }, { 1, 4 }, { 7, 4 }, + { 0, 2 }, { 9, 6 }, { 63, 6 }, { 57, 6 }, { 15, 6 }, + { 24, 6 }, { 40, 6 }, { 17, 6 }, { 55, 6 }, { 42, 8 }, + { 30, 8 }, { 43, 9 }, { 29, 9 }, { 27, 9 }, { 45, 9 }, + { 41, 7 }, { 31, 7 }, { 3, 6 }, { 5, 6 }, { 8, 5 }, + { 56, 5 }, { 49, 6 }, { 23, 6 }, { 11, 7 }, { 61, 7 }, + { 26, 8 }, { 46, 8 }, { 51, 8 }, { 21, 8 }, { 16, 5 }, + { 48, 5 }, { 18, 7 }, { 54, 7 }, { 50, 7 }, { 22, 7 }, + { 10, 6 }, { 62, 6 }, { 2, 5 }, { 6, 5 }, +}; + +static const uint8_t huff_spec_b33_tab[49][2] = { + { 57, 5 }, { 15, 5 }, { 9, 5 }, { 63, 5 }, { 59, 7 }, + { 13, 7 }, { 50, 7 }, { 22, 7 }, { 18, 7 }, { 54, 7 }, + { 51, 8 }, { 21, 8 }, { 27, 10 }, { 45, 10 }, { 43, 10 }, + { 29, 10 }, { 26, 9 }, { 46, 9 }, { 17, 6 }, { 55, 6 }, + { 49, 6 }, { 23, 6 }, { 8, 4 }, { 56, 4 }, { 16, 5 }, + { 48, 5 }, { 10, 6 }, { 62, 6 }, { 58, 6 }, { 14, 6 }, + { 1, 4 }, { 7, 4 }, { 2, 5 }, { 6, 5 }, { 25, 8 }, + { 47, 8 }, { 42, 9 }, { 30, 9 }, { 19, 9 }, { 53, 9 }, + { 24, 7 }, { 40, 7 }, { 41, 8 }, { 31, 8 }, { 11, 8 }, + { 61, 8 }, { 3, 7 }, { 5, 7 }, { 0, 2 }, +}; + +static const uint8_t huff_spec_b34_tab[49][2] = { + { 0, 1 }, { 8, 4 }, { 56, 4 }, { 1, 4 }, { 7, 4 }, + { 59, 8 }, { 13, 8 }, { 27, 10 }, { 45, 10 }, { 43, 10 }, + { 29, 10 }, { 26, 10 }, { 46, 10 }, { 51, 10 }, { 21, 10 }, + { 18, 8 }, { 54, 8 }, { 50, 8 }, { 22, 8 }, { 16, 6 }, + { 48, 6 }, { 17, 7 }, { 55, 7 }, { 24, 8 }, { 40, 8 }, + { 19, 10 }, { 53, 10 }, { 42, 10 }, { 30, 10 }, { 25, 9 }, + { 47, 9 }, { 49, 7 }, { 23, 7 }, { 10, 7 }, { 62, 7 }, + { 2, 6 }, { 6, 6 }, { 58, 7 }, { 14, 7 }, { 11, 9 }, + { 61, 9 }, { 41, 9 }, { 31, 9 }, { 3, 8 }, { 5, 8 }, + { 9, 6 }, { 63, 6 }, { 57, 6 }, { 15, 6 }, +}; + +static const uint8_t huff_spec_b42_tab[225][2] = { + { 33, 7 }, { 239, 7 }, { 36, 7 }, { 236, 7 }, { 119, 10 }, + { 153, 10 }, { 151, 10 }, { 121, 10 }, { 118, 10 }, { 154, 10 }, + { 167, 10 }, { 105, 10 }, { 247, 8 }, { 25, 8 }, { 112, 8 }, + { 144, 8 }, { 150, 10 }, { 122, 10 }, { 103, 10 }, { 169, 10 }, + { 87, 10 }, { 185, 10 }, { 183, 10 }, { 89, 10 }, { 53, 8 }, + { 219, 8 }, { 213, 8 }, { 59, 8 }, { 228, 7 }, { 44, 7 }, + { 225, 7 }, { 47, 7 }, { 166, 10 }, { 106, 10 }, { 102, 10 }, + { 170, 10 }, { 149, 10 }, { 123, 10 }, { 117, 10 }, { 155, 10 }, + { 114, 9 }, { 158, 9 }, { 165, 10 }, { 107, 10 }, { 148, 10 }, + { 124, 10 }, { 81, 7 }, { 191, 7 }, { 21, 7 }, { 251, 7 }, + { 64, 6 }, { 192, 6 }, { 242, 7 }, { 30, 7 }, { 116, 10 }, + { 156, 10 }, { 71, 10 }, { 201, 10 }, { 101, 10 }, { 171, 10 }, + { 199, 10 }, { 73, 10 }, { 19, 8 }, { 253, 8 }, { 18, 7 }, + { 254, 7 }, { 182, 10 }, { 90, 10 }, { 86, 10 }, { 186, 10 }, + { 39, 9 }, { 233, 9 }, { 34, 8 }, { 238, 8 }, { 2, 6 }, + { 14, 6 }, { 177, 7 }, { 95, 7 }, { 231, 9 }, { 41, 9 }, + { 146, 9 }, { 126, 9 }, { 67, 8 }, { 205, 8 }, { 17, 6 }, + { 255, 6 }, { 241, 6 }, { 31, 6 }, { 16, 5 }, { 240, 5 }, + { 243, 8 }, { 29, 8 }, { 195, 8 }, { 77, 8 }, { 245, 7 }, + { 27, 7 }, { 7, 8 }, { 9, 8 }, { 209, 8 }, { 63, 8 }, + { 99, 9 }, { 173, 9 }, { 163, 9 }, { 109, 9 }, { 226, 8 }, + { 46, 8 }, { 212, 8 }, { 60, 8 }, { 97, 8 }, { 175, 8 }, + { 161, 8 }, { 111, 8 }, { 52, 8 }, { 220, 8 }, { 180, 9 }, + { 92, 9 }, { 50, 9 }, { 222, 9 }, { 35, 9 }, { 237, 9 }, + { 211, 10 }, { 61, 10 }, { 51, 10 }, { 221, 10 }, { 210, 9 }, + { 62, 9 }, { 84, 9 }, { 188, 9 }, { 82, 8 }, { 190, 8 }, + { 4, 6 }, { 12, 6 }, { 227, 9 }, { 45, 9 }, { 214, 9 }, + { 58, 9 }, { 54, 9 }, { 218, 9 }, { 197, 9 }, { 75, 9 }, + { 178, 8 }, { 94, 8 }, { 22, 8 }, { 250, 8 }, { 65, 7 }, + { 207, 7 }, { 80, 7 }, { 176, 7 }, { 246, 8 }, { 26, 8 }, + { 69, 9 }, { 203, 9 }, { 145, 9 }, { 127, 9 }, { 193, 7 }, + { 79, 7 }, { 37, 8 }, { 235, 8 }, { 229, 8 }, { 43, 8 }, + { 5, 7 }, { 11, 7 }, { 20, 7 }, { 252, 7 }, { 244, 7 }, + { 28, 7 }, { 1, 5 }, { 15, 5 }, { 98, 9 }, { 174, 9 }, + { 147, 10 }, { 125, 10 }, { 115, 10 }, { 157, 10 }, { 96, 8 }, + { 160, 8 }, { 113, 9 }, { 159, 9 }, { 38, 9 }, { 234, 9 }, + { 162, 9 }, { 110, 9 }, { 55, 10 }, { 217, 10 }, { 215, 10 }, + { 57, 10 }, { 48, 8 }, { 208, 8 }, { 68, 9 }, { 204, 9 }, + { 164, 10 }, { 108, 10 }, { 100, 10 }, { 172, 10 }, { 32, 7 }, + { 224, 7 }, { 0, 4 }, { 3, 8 }, { 13, 8 }, { 23, 9 }, + { 249, 9 }, { 230, 9 }, { 42, 9 }, { 83, 9 }, { 189, 9 }, + { 181, 10 }, { 91, 10 }, { 198, 10 }, { 74, 10 }, { 6, 8 }, + { 10, 8 }, { 66, 8 }, { 206, 8 }, { 179, 9 }, { 93, 9 }, + { 70, 10 }, { 202, 10 }, { 85, 10 }, { 187, 10 }, { 194, 8 }, + { 78, 8 }, { 196, 9 }, { 76, 9 }, { 49, 9 }, { 223, 9 }, +}; + +static const uint8_t huff_spec_b43_tab[225][2] = { + { 193, 7 }, { 79, 7 }, { 48, 7 }, { 208, 7 }, { 6, 8 }, + { 10, 8 }, { 151, 10 }, { 121, 10 }, { 119, 10 }, { 153, 10 }, + { 167, 10 }, { 105, 10 }, { 118, 10 }, { 154, 10 }, { 103, 10 }, + { 169, 10 }, { 150, 10 }, { 122, 10 }, { 102, 10 }, { 170, 10 }, + { 183, 10 }, { 89, 10 }, { 117, 10 }, { 155, 10 }, { 149, 10 }, + { 123, 10 }, { 166, 10 }, { 106, 10 }, { 87, 10 }, { 185, 10 }, + { 116, 10 }, { 156, 10 }, { 148, 10 }, { 124, 10 }, { 71, 10 }, + { 201, 10 }, { 199, 10 }, { 73, 10 }, { 165, 10 }, { 107, 10 }, + { 182, 10 }, { 90, 10 }, { 101, 10 }, { 171, 10 }, { 86, 10 }, + { 186, 10 }, { 20, 7 }, { 252, 7 }, { 55, 10 }, { 217, 10 }, + { 147, 10 }, { 125, 10 }, { 115, 10 }, { 157, 10 }, { 215, 10 }, + { 57, 10 }, { 100, 10 }, { 172, 10 }, { 181, 10 }, { 91, 10 }, + { 198, 10 }, { 74, 10 }, { 114, 10 }, { 158, 10 }, { 244, 7 }, + { 28, 7 }, { 70, 10 }, { 202, 10 }, { 164, 10 }, { 108, 10 }, + { 85, 10 }, { 187, 10 }, { 146, 10 }, { 126, 10 }, { 39, 10 }, + { 233, 10 }, { 231, 10 }, { 41, 10 }, { 53, 9 }, { 219, 9 }, + { 54, 10 }, { 218, 10 }, { 99, 10 }, { 173, 10 }, { 214, 10 }, + { 58, 10 }, { 163, 10 }, { 109, 10 }, { 197, 10 }, { 75, 10 }, + { 84, 10 }, { 188, 10 }, { 69, 10 }, { 203, 10 }, { 113, 10 }, + { 159, 10 }, { 180, 10 }, { 92, 10 }, { 145, 10 }, { 127, 10 }, + { 98, 10 }, { 174, 10 }, { 23, 10 }, { 249, 10 }, { 247, 10 }, + { 25, 10 }, { 162, 10 }, { 110, 10 }, { 38, 10 }, { 234, 10 }, + { 230, 10 }, { 42, 10 }, { 83, 10 }, { 189, 10 }, { 179, 10 }, + { 93, 10 }, { 211, 10 }, { 61, 10 }, { 112, 10 }, { 144, 10 }, + { 51, 10 }, { 221, 10 }, { 68, 10 }, { 204, 10 }, { 213, 10 }, + { 59, 10 }, { 196, 10 }, { 76, 10 }, { 3, 7 }, { 13, 7 }, + { 66, 8 }, { 206, 8 }, { 81, 8 }, { 191, 8 }, { 32, 6 }, + { 224, 6 }, { 0, 2 }, { 7, 9 }, { 9, 9 }, { 97, 9 }, + { 175, 9 }, { 36, 8 }, { 236, 8 }, { 194, 8 }, { 78, 8 }, + { 177, 8 }, { 95, 8 }, { 2, 6 }, { 14, 6 }, { 21, 8 }, + { 251, 8 }, { 245, 8 }, { 27, 8 }, { 228, 8 }, { 44, 8 }, + { 22, 9 }, { 250, 9 }, { 246, 9 }, { 26, 9 }, { 49, 8 }, + { 223, 8 }, { 19, 8 }, { 253, 8 }, { 209, 8 }, { 63, 8 }, + { 243, 8 }, { 29, 8 }, { 225, 7 }, { 47, 7 }, { 64, 7 }, + { 192, 7 }, { 33, 7 }, { 239, 7 }, { 18, 7 }, { 254, 7 }, + { 242, 7 }, { 30, 7 }, { 161, 9 }, { 111, 9 }, { 178, 9 }, + { 94, 9 }, { 82, 9 }, { 190, 9 }, { 195, 9 }, { 77, 9 }, + { 52, 9 }, { 220, 9 }, { 212, 9 }, { 60, 9 }, { 67, 9 }, + { 205, 9 }, { 37, 9 }, { 235, 9 }, { 34, 8 }, { 238, 8 }, + { 226, 8 }, { 46, 8 }, { 17, 6 }, { 255, 6 }, { 4, 7 }, + { 12, 7 }, { 80, 8 }, { 176, 8 }, { 229, 9 }, { 43, 9 }, + { 35, 9 }, { 237, 9 }, { 16, 5 }, { 240, 5 }, { 241, 6 }, + { 31, 6 }, { 227, 9 }, { 45, 9 }, { 210, 9 }, { 62, 9 }, + { 50, 9 }, { 222, 9 }, { 96, 9 }, { 160, 9 }, { 5, 8 }, + { 11, 8 }, { 65, 8 }, { 207, 8 }, { 1, 5 }, { 15, 5 }, +}; + +static const uint8_t huff_spec_b44_tab[225][2] = { + { 3, 7 }, { 13, 7 }, { 4, 7 }, { 12, 7 }, { 151, 10 }, + { 121, 10 }, { 119, 10 }, { 153, 10 }, { 103, 10 }, { 169, 10 }, + { 167, 10 }, { 105, 10 }, { 150, 10 }, { 122, 10 }, { 118, 10 }, + { 154, 10 }, { 117, 10 }, { 155, 10 }, { 102, 10 }, { 170, 10 }, + { 5, 8 }, { 11, 8 }, { 183, 10 }, { 89, 10 }, { 87, 10 }, + { 185, 10 }, { 166, 10 }, { 106, 10 }, { 149, 10 }, { 123, 10 }, + { 17, 5 }, { 255, 5 }, { 1, 4 }, { 15, 4 }, { 241, 5 }, + { 31, 5 }, { 116, 10 }, { 156, 10 }, { 148, 10 }, { 124, 10 }, + { 199, 10 }, { 73, 10 }, { 182, 10 }, { 90, 10 }, { 71, 10 }, + { 201, 10 }, { 86, 10 }, { 186, 10 }, { 101, 10 }, { 171, 10 }, + { 115, 10 }, { 157, 10 }, { 165, 10 }, { 107, 10 }, { 215, 10 }, + { 57, 10 }, { 55, 10 }, { 217, 10 }, { 70, 10 }, { 202, 10 }, + { 147, 10 }, { 125, 10 }, { 85, 10 }, { 187, 10 }, { 164, 10 }, + { 108, 10 }, { 198, 10 }, { 74, 10 }, { 100, 10 }, { 172, 10 }, + { 114, 10 }, { 158, 10 }, { 39, 10 }, { 233, 10 }, { 146, 10 }, + { 126, 10 }, { 99, 10 }, { 173, 10 }, { 181, 10 }, { 91, 10 }, + { 231, 10 }, { 41, 10 }, { 163, 10 }, { 109, 10 }, { 54, 10 }, + { 218, 10 }, { 214, 10 }, { 58, 10 }, { 113, 10 }, { 159, 10 }, + { 23, 10 }, { 249, 10 }, { 145, 10 }, { 127, 10 }, { 180, 10 }, + { 92, 10 }, { 84, 10 }, { 188, 10 }, { 247, 10 }, { 25, 10 }, + { 32, 6 }, { 224, 6 }, { 197, 10 }, { 75, 10 }, { 98, 10 }, + { 174, 10 }, { 112, 10 }, { 144, 10 }, { 162, 10 }, { 110, 10 }, + { 69, 10 }, { 203, 10 }, { 38, 10 }, { 234, 10 }, { 230, 10 }, + { 42, 10 }, { 7, 10 }, { 9, 10 }, { 213, 10 }, { 59, 10 }, + { 83, 10 }, { 189, 10 }, { 179, 10 }, { 93, 10 }, { 53, 10 }, + { 219, 10 }, { 97, 10 }, { 175, 10 }, { 68, 10 }, { 204, 10 }, + { 196, 10 }, { 76, 10 }, { 161, 10 }, { 111, 10 }, { 22, 10 }, + { 250, 10 }, { 246, 10 }, { 26, 10 }, { 82, 10 }, { 190, 10 }, + { 96, 10 }, { 160, 10 }, { 178, 10 }, { 94, 10 }, { 37, 10 }, + { 235, 10 }, { 67, 10 }, { 205, 10 }, { 51, 10 }, { 221, 10 }, + { 229, 10 }, { 43, 10 }, { 6, 10 }, { 10, 10 }, { 211, 10 }, + { 61, 10 }, { 212, 10 }, { 60, 10 }, { 195, 10 }, { 77, 10 }, + { 52, 10 }, { 220, 10 }, { 81, 10 }, { 191, 10 }, { 177, 10 }, + { 95, 10 }, { 65, 8 }, { 207, 8 }, { 21, 10 }, { 251, 10 }, + { 245, 10 }, { 27, 10 }, { 194, 10 }, { 78, 10 }, { 228, 10 }, + { 44, 10 }, { 193, 8 }, { 79, 8 }, { 20, 8 }, { 252, 8 }, + { 0, 2 }, { 2, 6 }, { 14, 6 }, { 19, 8 }, { 253, 8 }, + { 49, 8 }, { 223, 8 }, { 209, 8 }, { 63, 8 }, { 244, 8 }, + { 28, 8 }, { 66, 10 }, { 206, 10 }, { 210, 10 }, { 62, 10 }, + { 36, 9 }, { 236, 9 }, { 243, 8 }, { 29, 8 }, { 33, 7 }, + { 239, 7 }, { 225, 7 }, { 47, 7 }, { 64, 8 }, { 192, 8 }, + { 80, 9 }, { 176, 9 }, { 50, 9 }, { 222, 9 }, { 18, 7 }, + { 254, 7 }, { 242, 7 }, { 30, 7 }, { 48, 8 }, { 208, 8 }, + { 226, 8 }, { 46, 8 }, { 34, 8 }, { 238, 8 }, { 227, 9 }, + { 45, 9 }, { 35, 9 }, { 237, 9 }, { 16, 5 }, { 240, 5 }, +}; + +static const uint8_t huff_spec_b52_tab[31][2] = { + { 3, 4 }, { 29, 4 }, { 5, 5 }, { 27, 5 }, { 10, 5 }, + { 22, 5 }, { 13, 6 }, { 19, 6 }, { 7, 6 }, { 25, 6 }, + { 4, 5 }, { 28, 5 }, { 2, 4 }, { 30, 4 }, { 9, 5 }, + { 23, 5 }, { 12, 6 }, { 20, 6 }, { 15, 7 }, { 17, 7 }, + { 14, 7 }, { 18, 7 }, { 8, 5 }, { 24, 5 }, { 6, 6 }, + { 26, 6 }, { 11, 6 }, { 21, 6 }, { 0, 3 }, { 1, 4 }, + { 31, 4 }, +}; + +static const uint8_t huff_spec_b53_tab[31][2] = { + { 1, 3 }, { 31, 3 }, { 7, 6 }, { 25, 6 }, { 13, 7 }, + { 19, 7 }, { 12, 7 }, { 20, 7 }, { 10, 6 }, { 22, 6 }, + { 6, 6 }, { 26, 6 }, { 2, 4 }, { 30, 4 }, { 0, 2 }, + { 4, 5 }, { 28, 5 }, { 15, 8 }, { 17, 8 }, { 14, 8 }, + { 18, 8 }, { 11, 7 }, { 21, 7 }, { 9, 6 }, { 23, 6 }, + { 3, 5 }, { 29, 5 }, { 8, 6 }, { 24, 6 }, { 5, 6 }, + { 27, 6 }, +}; + +static const uint8_t huff_spec_b54_tab[31][2] = { + { 3, 4 }, { 29, 4 }, { 9, 6 }, { 23, 6 }, { 8, 6 }, + { 24, 6 }, { 13, 8 }, { 19, 8 }, { 12, 8 }, { 20, 8 }, + { 10, 7 }, { 22, 7 }, { 6, 6 }, { 26, 6 }, { 1, 3 }, + { 31, 3 }, { 2, 4 }, { 30, 4 }, { 4, 5 }, { 28, 5 }, + { 15, 9 }, { 17, 9 }, { 14, 9 }, { 18, 9 }, { 11, 8 }, + { 21, 8 }, { 7, 7 }, { 25, 7 }, { 5, 6 }, { 27, 6 }, + { 0, 2 }, +}; + +static const uint8_t huff_spec_b62_tab[63][2] = { + { 11, 6 }, { 53, 6 }, { 21, 6 }, { 43, 6 }, { 27, 7 }, + { 37, 7 }, { 26, 7 }, { 38, 7 }, { 10, 6 }, { 54, 6 }, + { 5, 5 }, { 59, 5 }, { 20, 6 }, { 44, 6 }, { 9, 6 }, + { 55, 6 }, { 15, 7 }, { 49, 7 }, { 25, 7 }, { 39, 7 }, + { 19, 6 }, { 45, 6 }, { 4, 5 }, { 60, 5 }, { 1, 4 }, + { 63, 4 }, { 14, 7 }, { 50, 7 }, { 24, 7 }, { 40, 7 }, + { 8, 6 }, { 56, 6 }, { 18, 6 }, { 46, 6 }, { 31, 8 }, + { 33, 8 }, { 30, 8 }, { 34, 8 }, { 13, 7 }, { 51, 7 }, + { 3, 5 }, { 61, 5 }, { 23, 7 }, { 41, 7 }, { 12, 7 }, + { 52, 7 }, { 7, 6 }, { 57, 6 }, { 16, 6 }, { 48, 6 }, + { 17, 6 }, { 47, 6 }, { 0, 4 }, { 2, 5 }, { 62, 5 }, + { 22, 7 }, { 42, 7 }, { 29, 8 }, { 35, 8 }, { 28, 8 }, + { 36, 8 }, { 6, 6 }, { 58, 6 }, +}; + +static const uint8_t huff_spec_b63_tab[63][2] = { + { 6, 5 }, { 58, 5 }, { 10, 6 }, { 54, 6 }, { 16, 6 }, + { 48, 6 }, { 17, 6 }, { 47, 6 }, { 21, 7 }, { 43, 7 }, + { 14, 7 }, { 50, 7 }, { 5, 5 }, { 59, 5 }, { 2, 4 }, + { 62, 4 }, { 9, 6 }, { 55, 6 }, { 25, 8 }, { 39, 8 }, + { 31, 9 }, { 33, 9 }, { 30, 9 }, { 34, 9 }, { 20, 7 }, + { 44, 7 }, { 8, 6 }, { 56, 6 }, { 13, 7 }, { 51, 7 }, + { 19, 7 }, { 45, 7 }, { 4, 5 }, { 60, 5 }, { 24, 8 }, + { 40, 8 }, { 29, 9 }, { 35, 9 }, { 28, 9 }, { 36, 9 }, + { 12, 7 }, { 52, 7 }, { 7, 6 }, { 57, 6 }, { 3, 5 }, + { 61, 5 }, { 18, 7 }, { 46, 7 }, { 23, 8 }, { 41, 8 }, + { 22, 8 }, { 42, 8 }, { 11, 7 }, { 53, 7 }, { 15, 8 }, + { 49, 8 }, { 27, 9 }, { 37, 9 }, { 26, 9 }, { 38, 9 }, + { 0, 3 }, { 1, 4 }, { 63, 4 }, +}; + +static const uint8_t huff_spec_b64_tab[63][2] = { + { 1, 3 }, { 63, 3 }, { 14, 7 }, { 50, 7 }, { 18, 7 }, + { 46, 7 }, { 27, 9 }, { 37, 9 }, { 26, 9 }, { 38, 9 }, + { 21, 8 }, { 43, 8 }, { 13, 7 }, { 51, 7 }, { 9, 6 }, + { 55, 6 }, { 17, 7 }, { 47, 7 }, { 31, 10 }, { 33, 10 }, + { 30, 10 }, { 34, 10 }, { 25, 9 }, { 39, 9 }, { 20, 8 }, + { 44, 8 }, { 5, 5 }, { 59, 5 }, { 16, 7 }, { 48, 7 }, + { 12, 7 }, { 52, 7 }, { 8, 6 }, { 56, 6 }, { 2, 4 }, + { 62, 4 }, { 4, 5 }, { 60, 5 }, { 24, 9 }, { 40, 9 }, + { 29, 10 }, { 35, 10 }, { 28, 10 }, { 36, 10 }, { 15, 8 }, + { 49, 8 }, { 11, 7 }, { 53, 7 }, { 7, 6 }, { 57, 6 }, + { 19, 8 }, { 45, 8 }, { 23, 9 }, { 41, 9 }, { 22, 9 }, + { 42, 9 }, { 10, 7 }, { 54, 7 }, { 6, 6 }, { 58, 6 }, + { 3, 5 }, { 61, 5 }, { 0, 3 }, +}; + +static const uint8_t huff_spec_b72_tab[127][2] = { + { 3, 5 }, { 125, 5 }, { 42, 7 }, { 86, 7 }, { 21, 7 }, + { 107, 7 }, { 11, 6 }, { 117, 6 }, { 41, 7 }, { 87, 7 }, + { 20, 7 }, { 108, 7 }, { 53, 8 }, { 75, 8 }, { 31, 8 }, + { 97, 8 }, { 40, 7 }, { 88, 7 }, { 52, 8 }, { 76, 8 }, + { 51, 8 }, { 77, 8 }, { 19, 7 }, { 109, 7 }, { 10, 6 }, + { 118, 6 }, { 30, 8 }, { 98, 8 }, { 29, 8 }, { 99, 8 }, + { 18, 7 }, { 110, 7 }, { 9, 6 }, { 119, 6 }, { 39, 7 }, + { 89, 7 }, { 17, 7 }, { 111, 7 }, { 28, 8 }, { 100, 8 }, + { 50, 8 }, { 78, 8 }, { 38, 7 }, { 90, 7 }, { 2, 5 }, + { 126, 5 }, { 8, 6 }, { 120, 6 }, { 49, 8 }, { 79, 8 }, + { 48, 8 }, { 80, 8 }, { 16, 7 }, { 112, 7 }, { 37, 7 }, + { 91, 7 }, { 63, 9 }, { 65, 9 }, { 62, 9 }, { 66, 9 }, + { 27, 8 }, { 101, 8 }, { 7, 6 }, { 121, 6 }, { 36, 7 }, + { 92, 7 }, { 26, 8 }, { 102, 8 }, { 47, 8 }, { 81, 8 }, + { 61, 9 }, { 67, 9 }, { 60, 9 }, { 68, 9 }, { 46, 8 }, + { 82, 8 }, { 15, 7 }, { 113, 7 }, { 6, 6 }, { 122, 6 }, + { 25, 8 }, { 103, 8 }, { 45, 8 }, { 83, 8 }, { 35, 7 }, + { 93, 7 }, { 1, 5 }, { 127, 5 }, { 14, 7 }, { 114, 7 }, + { 59, 9 }, { 69, 9 }, { 58, 9 }, { 70, 9 }, { 24, 8 }, + { 104, 8 }, { 5, 6 }, { 123, 6 }, { 32, 7 }, { 96, 7 }, + { 34, 7 }, { 94, 7 }, { 13, 7 }, { 115, 7 }, { 23, 8 }, + { 105, 8 }, { 44, 8 }, { 84, 8 }, { 4, 6 }, { 124, 6 }, + { 57, 9 }, { 71, 9 }, { 56, 9 }, { 72, 9 }, { 43, 8 }, + { 85, 8 }, { 12, 7 }, { 116, 7 }, { 0, 5 }, { 33, 7 }, + { 95, 7 }, { 22, 8 }, { 106, 8 }, { 55, 9 }, { 73, 9 }, + { 54, 9 }, { 74, 9 }, +}; + +static const uint8_t huff_spec_b73_tab[127][2] = { + { 0, 3 }, { 4, 5 }, { 124, 5 }, { 19, 7 }, { 109, 7 }, + { 29, 8 }, { 99, 8 }, { 51, 9 }, { 77, 9 }, { 62, 10 }, + { 66, 10 }, { 63, 10 }, { 65, 10 }, { 28, 8 }, { 100, 8 }, + { 41, 8 }, { 87, 8 }, { 33, 7 }, { 95, 7 }, { 10, 6 }, + { 118, 6 }, { 18, 7 }, { 110, 7 }, { 40, 8 }, { 88, 8 }, + { 27, 8 }, { 101, 8 }, { 9, 6 }, { 119, 6 }, { 17, 7 }, + { 111, 7 }, { 50, 9 }, { 78, 9 }, { 61, 10 }, { 67, 10 }, + { 60, 10 }, { 68, 10 }, { 26, 8 }, { 102, 8 }, { 1, 4 }, + { 127, 4 }, { 3, 5 }, { 125, 5 }, { 39, 8 }, { 89, 8 }, + { 49, 9 }, { 79, 9 }, { 48, 9 }, { 80, 9 }, { 16, 7 }, + { 112, 7 }, { 8, 6 }, { 120, 6 }, { 25, 8 }, { 103, 8 }, + { 38, 8 }, { 90, 8 }, { 15, 7 }, { 113, 7 }, { 7, 6 }, + { 121, 6 }, { 59, 10 }, { 69, 10 }, { 58, 10 }, { 70, 10 }, + { 47, 9 }, { 81, 9 }, { 24, 8 }, { 104, 8 }, { 37, 8 }, + { 91, 8 }, { 23, 8 }, { 105, 8 }, { 14, 7 }, { 114, 7 }, + { 46, 9 }, { 82, 9 }, { 57, 10 }, { 71, 10 }, { 56, 10 }, + { 72, 10 }, { 36, 8 }, { 92, 8 }, { 2, 5 }, { 126, 5 }, + { 6, 6 }, { 122, 6 }, { 45, 9 }, { 83, 9 }, { 31, 9 }, + { 97, 9 }, { 22, 8 }, { 106, 8 }, { 13, 7 }, { 115, 7 }, + { 21, 8 }, { 107, 8 }, { 55, 10 }, { 73, 10 }, { 54, 10 }, + { 74, 10 }, { 44, 9 }, { 84, 9 }, { 12, 7 }, { 116, 7 }, + { 5, 6 }, { 123, 6 }, { 35, 8 }, { 93, 8 }, { 43, 9 }, + { 85, 9 }, { 30, 9 }, { 98, 9 }, { 20, 8 }, { 108, 8 }, + { 53, 10 }, { 75, 10 }, { 52, 10 }, { 76, 10 }, { 42, 9 }, + { 86, 9 }, { 34, 8 }, { 94, 8 }, { 32, 8 }, { 96, 8 }, + { 11, 7 }, { 117, 7 }, +}; + +static const uint8_t huff_spec_b74_tab[127][2] = { + { 28, 8 }, { 100, 8 }, { 27, 8 }, { 101, 8 }, { 36, 8 }, + { 92, 8 }, { 63, 10 }, { 65, 10 }, { 61, 10 }, { 67, 10 }, + { 62, 10 }, { 66, 10 }, { 60, 10 }, { 68, 10 }, { 19, 7 }, + { 109, 7 }, { 59, 10 }, { 69, 10 }, { 58, 10 }, { 70, 10 }, + { 57, 10 }, { 71, 10 }, { 56, 10 }, { 72, 10 }, { 55, 10 }, + { 73, 10 }, { 53, 10 }, { 75, 10 }, { 54, 10 }, { 74, 10 }, + { 52, 10 }, { 76, 10 }, { 5, 5 }, { 123, 5 }, { 0, 3 }, + { 51, 10 }, { 77, 10 }, { 50, 10 }, { 78, 10 }, { 49, 10 }, + { 79, 10 }, { 48, 10 }, { 80, 10 }, { 47, 10 }, { 81, 10 }, + { 46, 10 }, { 82, 10 }, { 43, 9 }, { 85, 9 }, { 18, 7 }, + { 110, 7 }, { 11, 6 }, { 117, 6 }, { 26, 8 }, { 102, 8 }, + { 35, 8 }, { 93, 8 }, { 25, 8 }, { 103, 8 }, { 42, 9 }, + { 86, 9 }, { 41, 9 }, { 87, 9 }, { 10, 6 }, { 118, 6 }, + { 4, 5 }, { 124, 5 }, { 17, 7 }, { 111, 7 }, { 34, 8 }, + { 94, 8 }, { 24, 8 }, { 104, 8 }, { 9, 6 }, { 119, 6 }, + { 1, 4 }, { 127, 4 }, { 16, 7 }, { 112, 7 }, { 32, 8 }, + { 96, 8 }, { 33, 8 }, { 95, 8 }, { 23, 8 }, { 105, 8 }, + { 40, 9 }, { 88, 9 }, { 31, 9 }, { 97, 9 }, { 15, 7 }, + { 113, 7 }, { 8, 6 }, { 120, 6 }, { 39, 9 }, { 89, 9 }, + { 45, 10 }, { 83, 10 }, { 44, 10 }, { 84, 10 }, { 22, 8 }, + { 106, 8 }, { 14, 7 }, { 114, 7 }, { 3, 5 }, { 125, 5 }, + { 7, 6 }, { 121, 6 }, { 30, 9 }, { 98, 9 }, { 38, 9 }, + { 90, 9 }, { 21, 8 }, { 107, 8 }, { 13, 7 }, { 115, 7 }, + { 29, 9 }, { 99, 9 }, { 37, 9 }, { 91, 9 }, { 20, 8 }, + { 108, 8 }, { 12, 7 }, { 116, 7 }, { 6, 6 }, { 122, 6 }, + { 2, 5 }, { 126, 5 }, }; static const HuffmanCodebook at9_huffman_coeffs[][8][4] = { @@ -1538,40 +1391,40 @@ static const HuffmanCodebook at9_huffman_coeffs[][8][4] = { { { 0 } }, { { 0 } }, { - { huff_spec_a21_bits, huff_spec_a21_codes, 16, 2, 1, 2 }, - { huff_spec_a22_bits, huff_spec_a22_codes, 256, 4, 2, 2 }, - { huff_spec_a23_bits, huff_spec_a23_codes, 256, 4, 2, 2 }, - { huff_spec_a24_bits, huff_spec_a24_codes, 256, 4, 2, 2 }, + { huff_spec_a21_tab, 8, 2, 1, 2 }, + { huff_spec_a22_tab, 80, 4, 2, 2 }, + { huff_spec_a23_tab, 81, 4, 2, 2 }, + { huff_spec_a24_tab, 81, 4, 2, 2 }, }, { - { huff_spec_a31_bits, huff_spec_a31_codes, 64, 2, 1, 3 }, - { huff_spec_a32_bits, huff_spec_a32_codes, 64, 2, 1, 3 }, - { huff_spec_a33_bits, huff_spec_a33_codes, 64, 2, 1, 3 }, - { huff_spec_a34_bits, huff_spec_a34_codes, 64, 2, 1, 3 }, + { huff_spec_a31_tab, 40, 2, 1, 3 }, + { huff_spec_a32_tab, 49, 2, 1, 3 }, + { huff_spec_a33_tab, 49, 2, 1, 3 }, + { huff_spec_a34_tab, 49, 2, 1, 3 }, }, { - { huff_spec_a41_bits, huff_spec_a41_codes, 256, 2, 1, 4 }, - { huff_spec_a42_bits, huff_spec_a42_codes, 256, 2, 1, 4 }, - { huff_spec_a43_bits, huff_spec_a43_codes, 256, 2, 1, 4 }, - { huff_spec_a44_bits, huff_spec_a44_codes, 256, 2, 1, 4 }, + { huff_spec_a41_tab, 176, 2, 1, 4 }, + { huff_spec_a42_tab, 225, 2, 1, 4 }, + { huff_spec_a43_tab, 225, 2, 1, 4 }, + { huff_spec_a44_tab, 225, 2, 1, 4 }, }, { - { huff_spec_a51_bits, huff_spec_a51_codes, 32, 1, 0, 5 }, - { huff_spec_a52_bits, huff_spec_a52_codes, 32, 1, 0, 5 }, - { huff_spec_a53_bits, huff_spec_a53_codes, 32, 1, 0, 5 }, - { huff_spec_a54_bits, huff_spec_a54_codes, 32, 1, 0, 5 }, + { huff_spec_a51_tab, 31, 1, 0, 5 }, + { huff_spec_a52_tab, 31, 1, 0, 5 }, + { huff_spec_a53_tab, 31, 1, 0, 5 }, + { huff_spec_a54_tab, 31, 1, 0, 5 }, }, { - { huff_spec_a61_bits, huff_spec_a61_codes, 64, 1, 0, 6 }, - { huff_spec_a62_bits, huff_spec_a62_codes, 64, 1, 0, 6 }, - { huff_spec_a63_bits, huff_spec_a63_codes, 64, 1, 0, 6 }, - { huff_spec_a64_bits, huff_spec_a64_codes, 64, 1, 0, 6 }, + { huff_spec_a61_tab, 63, 1, 0, 6 }, + { huff_spec_a62_tab, 63, 1, 0, 6 }, + { huff_spec_a63_tab, 63, 1, 0, 6 }, + { huff_spec_a64_tab, 63, 1, 0, 6 }, }, { - { huff_spec_a71_bits, huff_spec_a71_codes, 128, 1, 0, 7 }, - { huff_spec_a72_bits, huff_spec_a72_codes, 128, 1, 0, 7 }, - { huff_spec_a73_bits, huff_spec_a73_codes, 128, 1, 0, 7 }, - { huff_spec_a74_bits, huff_spec_a74_codes, 128, 1, 0, 7 }, + { huff_spec_a71_tab, 127, 1, 0, 7 }, + { huff_spec_a72_tab, 127, 1, 0, 7 }, + { huff_spec_a73_tab, 127, 1, 0, 7 }, + { huff_spec_a74_tab, 127, 1, 0, 7 }, }, }, { @@ -1579,39 +1432,39 @@ static const HuffmanCodebook at9_huffman_coeffs[][8][4] = { { { 0 } }, { { 0 }, - { huff_spec_b22_bits, huff_spec_b22_codes, 256, 4, 2, 2 }, - { huff_spec_b23_bits, huff_spec_b23_codes, 256, 4, 2, 2 }, - { huff_spec_b24_bits, huff_spec_b24_codes, 256, 4, 2, 2 }, + { huff_spec_b22_tab, 80, 4, 2, 2 }, + { huff_spec_b23_tab, 81, 4, 2, 2 }, + { huff_spec_b24_tab, 81, 4, 2, 2 }, }, { { 0 }, - { huff_spec_b32_bits, huff_spec_b32_codes, 64, 2, 1, 3 }, - { huff_spec_b33_bits, huff_spec_b33_codes, 64, 2, 1, 3 }, - { huff_spec_b34_bits, huff_spec_b34_codes, 64, 2, 1, 3 }, + { huff_spec_b32_tab, 49, 2, 1, 3 }, + { huff_spec_b33_tab, 49, 2, 1, 3 }, + { huff_spec_b34_tab, 49, 2, 1, 3 }, }, { { 0 }, - { huff_spec_b42_bits, huff_spec_b42_codes, 256, 2, 1, 4 }, - { huff_spec_b43_bits, huff_spec_b43_codes, 256, 2, 1, 4 }, - { huff_spec_b44_bits, huff_spec_b44_codes, 256, 2, 1, 4 }, + { huff_spec_b42_tab, 225, 2, 1, 4 }, + { huff_spec_b43_tab, 225, 2, 1, 4 }, + { huff_spec_b44_tab, 225, 2, 1, 4 }, }, { { 0 }, - { huff_spec_b52_bits, huff_spec_b52_codes, 32, 1, 0, 5 }, - { huff_spec_b53_bits, huff_spec_b53_codes, 32, 1, 0, 5 }, - { huff_spec_b54_bits, huff_spec_b54_codes, 32, 1, 0, 5 }, + { huff_spec_b52_tab, 31, 1, 0, 5 }, + { huff_spec_b53_tab, 31, 1, 0, 5 }, + { huff_spec_b54_tab, 31, 1, 0, 5 }, }, { { 0 }, - { huff_spec_b62_bits, huff_spec_b62_codes, 64, 1, 0, 6 }, - { huff_spec_b63_bits, huff_spec_b63_codes, 64, 1, 0, 6 }, - { huff_spec_b64_bits, huff_spec_b64_codes, 64, 1, 0, 6 }, + { huff_spec_b62_tab, 63, 1, 0, 6 }, + { huff_spec_b63_tab, 63, 1, 0, 6 }, + { huff_spec_b64_tab, 63, 1, 0, 6 }, }, { { 0 }, - { huff_spec_b72_bits, huff_spec_b72_codes, 128, 1, 0, 7 }, - { huff_spec_b73_bits, huff_spec_b73_codes, 128, 1, 0, 7 }, - { huff_spec_b74_bits, huff_spec_b74_codes, 128, 1, 0, 7 }, + { huff_spec_b72_tab, 127, 1, 0, 7 }, + { huff_spec_b73_tab, 127, 1, 0, 7 }, + { huff_spec_b74_tab, 127, 1, 0, 7 }, }, }, }; From patchwork Tue Nov 10 10:58:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23514 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 7808444A3F2 for ; Tue, 10 Nov 2020 12:59:12 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5F77068BFC2; Tue, 10 Nov 2020 12:59:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 28A0E68BFBE for ; Tue, 10 Nov 2020 12:59:10 +0200 (EET) Received: by mail-wr1-f50.google.com with SMTP id k2so8796474wrx.2 for ; Tue, 10 Nov 2020 02:59:10 -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=MQ0v+EuY8KD8Hq/vKS+JdCs+dGCZRSMUlcD53iDV3nI=; b=ZKgGSQlWWhROGb6ItwGH+LK2ZtUmz4w4uPy6LYAz6CSx/hnt2PMb5I2Vqb+mICxqts erHKTMYWpSVfyHq3Qo19RuhiJPGBGDQcaij1IfPcUXEejQHCSP8yGAD95USgzsscnlyH J0/lMswSPc4FhymF9o7OYeogOkl5VmPA+eM4wuvZwvXWDtOTfXRgmofk/QNOubC3U06U DbQJ8fPLLL8PnL4zf2klVB0rPNXRTEN/fh5CDsTxIJSHnwVJSRtNkFKhM2Kya2xmhbbI lrlv2xYrSo5k5fYLtZ00zSy8eaA6PNncnXrOBsa0P1jRQPDA5HKr3g2jYWilR/NpVQEJ 3oxQ== 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=MQ0v+EuY8KD8Hq/vKS+JdCs+dGCZRSMUlcD53iDV3nI=; b=tWmwOTXd4RUMI8407rueIOG2hCW3Ky7QBVuuiIXCBCh84zMeCrayKjrqKXG2G75iJI ns3SH2gGh/3/MGeZbaj6GOO3kcsmplO9XgIOeI6JvnwK9iqS3wu5acLsFzJB0G0jqTI0 ZfFrAFB0RyJygfaC0tcXV9J89qmd/07HFJyXPPP1mbJYForJDkqwgqL+VwG0mhOhso2m DcddPg/WQxRzZwiv/MXke9JDGZXv+7lAeCf/ZZNYqM/llCbfUV1M8JVA5ps0VA9YjKIt gILbk5YoGSxf/4kw1cw85PUheaMJ+XE3sga9sALQPNppN3EPpFxQUk8Kg1Jf/dTrEir4 rHDg== X-Gm-Message-State: AOAM5307xjNUHFV+7Dyu8Dh3zGFSyniVTD136sutX3Cc9fIgabIsQoK8 C9mMozebwxE62I/THI18YFEtSFDyd5A= X-Google-Smtp-Source: ABdhPJzPcTk/aKqGJTjCfFqOaPJhl63L8jy6LpndYOx7TvRQdq1jquN0tDAfZ+xxG8hCWbkVgeGvfw== X-Received: by 2002:a5d:66c3:: with SMTP id k3mr18336048wrw.123.1605005948807; Tue, 10 Nov 2020 02:59:08 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:08 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:15 +0100 Message-Id: <20201110105836.321916-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 093/114] avcodec/atrac9tab: Unify tables used to initialize 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 separate tables has the downside that one needs a big number of pointers to the separate tables (currently 77); unifying them avoids this. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac9dec.c | 19 ++- libavcodec/atrac9tab.h | 310 ++++++++++++++--------------------------- 2 files changed, 120 insertions(+), 209 deletions(-) diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index 3b26b6b486..ddfa02a393 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -848,6 +848,7 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) GetBitContext gb; ATRAC9Context *s = avctx->priv_data; int version, block_config_idx, superframe_idx, alloc_c_len; + const uint8_t (*tab)[2]; int ret; s->avctx = avctx; @@ -932,17 +933,20 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) s->alloc_curve[i - 1][j] = at9_tab_b_dist[(j * alloc_c_len) / i]; /* Unsigned scalefactor VLCs */ + tab = at9_sfb_a_tab; for (int i = 1; i < 7; i++) { const HuffmanCodebook *hf = &at9_huffman_sf_unsigned[i]; ret = ff_init_vlc_from_lengths(&s->sf_vlc[0][i], ATRAC9_SF_VLC_BITS, - hf->size, &hf->tab[0][1], 2, - &hf->tab[0][0], 2, 1, 0, 0); + hf->size, &tab[0][1], 2, + &tab[0][0], 2, 1, 0, 0); if (ret < 0) return ret; + tab += hf->size; } /* Signed scalefactor VLCs */ + tab = at9_sfb_b_tab; for (int i = 2; i < 6; i++) { const HuffmanCodebook *hf = &at9_huffman_sf_signed[i]; @@ -950,22 +954,25 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) * the values in the source table are offset by 16 to make * them fit into an uint8_t; the -16 reverses this shift. */ ret = ff_init_vlc_from_lengths(&s->sf_vlc[1][i], ATRAC9_SF_VLC_BITS, - hf->size, &hf->tab[0][1], 2, - &hf->tab[0][0], 2, 1, -16, 0); + hf->size, &tab[0][1], 2, + &tab[0][0], 2, 1, -16, 0); if (ret < 0) return ret; + tab += hf->size; } /* Coefficient VLCs */ + tab = at9_coeffs_tab; for (int i = 0; i < 2; i++) { for (int j = 0; j < 8; j++) { for (int k = 0; k < 4; k++) { const HuffmanCodebook *hf = &at9_huffman_coeffs[i][j][k]; ret = ff_init_vlc_from_lengths(&s->coeff_vlc[i][j][k], 9, - hf->size, &hf->tab[0][1], 2, - &hf->tab[0][0], 2, 1, 0, 0); + hf->size, &tab[0][1], 2, + &tab[0][0], 2, 1, 0, 0); if (ret < 0) return ret; + tab += hf->size; } } } diff --git a/libavcodec/atrac9tab.h b/libavcodec/atrac9tab.h index c62b8070d0..1882bf9f43 100644 --- a/libavcodec/atrac9tab.h +++ b/libavcodec/atrac9tab.h @@ -373,34 +373,25 @@ static const uint8_t at9_tab_b_dist[] = { 27, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, }; -static const uint8_t huff_sfb_a1_tab[2][2] = { +static const uint8_t at9_sfb_a_tab[][2] = { + /* Unsigned scalefactor table 1 - 2 entries */ { 0, 1 }, { 1, 1 }, -}; - -static const uint8_t huff_sfb_a2_tab[4][2] = { + /* Unsigned scalefactor table 2 - 4 entries */ { 0, 1 }, { 3, 2 }, { 1, 3 }, { 2, 3 }, -}; - -static const uint8_t huff_sfb_a3_tab[8][2] = { + /* Unsigned scalefactor table 3 - 8 entries */ { 0, 2 }, { 1, 2 }, { 7, 2 }, { 6, 3 }, { 2, 4 }, { 5, 5 }, { 3, 6 }, { 4, 6 }, -}; - -static const uint8_t huff_sfb_a4_tab[16][2] = { + /* Unsigned scalefactor table 4 - 16 entries */ { 2, 4 }, { 14, 4 }, { 11, 8 }, { 10, 8 }, { 9, 8 }, { 6, 8 }, { 7, 8 }, { 8, 8 }, { 5, 7 }, { 13, 5 }, { 3, 5 }, { 12, 6 }, { 4, 6 }, { 0, 2 }, { 1, 2 }, { 15, 2 }, -}; - -static const uint8_t huff_sfb_a5_tab[32][2] = { + /* Unsigned scalefactor table 5 - 32 entries */ { 31, 3 }, { 1, 3 }, { 26, 7 }, { 7, 7 }, { 20, 8 }, { 21, 8 }, { 23, 8 }, { 22, 8 }, { 29, 5 }, { 30, 4 }, { 4, 5 }, { 11, 8 }, { 24, 8 }, { 9, 8 }, { 10, 8 }, { 6, 6 }, { 25, 7 }, { 19, 8 }, { 12, 8 }, { 27, 6 }, { 18, 8 }, { 13, 8 }, { 16, 8 }, { 17, 8 }, { 14, 8 }, { 15, 8 }, { 8, 7 }, { 0, 2 }, { 5, 5 }, { 28, 5 }, { 3, 4 }, { 2, 3 }, -}; - -static const uint8_t huff_sfb_a6_tab[64][2] = { + /* Unsigned scalefactor table 6 - 64 entries */ { 0, 3 }, { 1, 3 }, { 2, 4 }, { 3, 4 }, { 61, 4 }, { 62, 4 }, { 63, 4 }, { 4, 5 }, { 5, 5 }, { 58, 5 }, { 59, 5 }, { 60, 5 }, { 6, 6 }, { 7, 6 }, { 8, 6 }, { 56, 6 }, { 57, 6 }, { 9, 7 }, { 10, 7 }, { 53, 7 }, { 54, 7 }, @@ -413,21 +404,16 @@ static const uint8_t huff_sfb_a6_tab[64][2] = { { 52, 8 }, }; -static const uint8_t huff_sfb_b2_tab[3][2] = { +static const uint8_t at9_sfb_b_tab[][2] = { + /* Signed scalefactor table 2 - 3 entries */ { 16, 1 }, { 15, 2 }, { 17, 2 }, -}; - -static const uint8_t huff_sfb_b3_tab[7][2] = { + /* Signed scalefactor table 3 - 7 entries */ { 17, 3 }, { 18, 5 }, { 13, 6 }, { 19, 6 }, { 14, 4 }, { 15, 2 }, { 16, 1 }, -}; - -static const uint8_t huff_sfb_b4_tab[15][2] = { + /* Signed scalefactor table 4 - 15 entries */ { 15, 3 }, { 17, 3 }, { 18, 4 }, { 13, 6 }, { 12, 6 }, { 21, 7 }, { 22, 8 }, { 10, 8 }, { 9, 8 }, { 23, 8 }, { 11, 7 }, { 14, 4 }, { 19, 5 }, { 20, 5 }, { 16, 1 }, -}; - -static const uint8_t huff_sfb_b5_tab[32][2] = { + /* Signed scalefactor table 5 - 32 entries */ { 16, 3 }, { 21, 4 }, { 22, 4 }, { 20, 4 }, { 23, 4 }, { 30, 8 }, { 1, 8 }, { 0, 8 }, { 2, 8 }, { 3, 8 }, { 31, 8 }, { 27, 7 }, { 14, 6 }, { 28, 7 }, { 13, 7 }, { 18, 4 }, { 25, 5 }, { 12, 7 }, { 11, 7 }, { 26, 6 }, { 24, 4 }, @@ -436,7 +422,6 @@ static const uint8_t huff_sfb_b5_tab[32][2] = { }; typedef struct HuffmanCodebook { - const uint8_t (*tab)[2]; const int size; const int value_cnt; const int value_cnt_pow; @@ -445,29 +430,28 @@ typedef struct HuffmanCodebook { static const HuffmanCodebook at9_huffman_sf_unsigned[] = { { 0 }, - { huff_sfb_a1_tab, 2, 1, 0, 1 }, - { huff_sfb_a2_tab, 4, 1, 0, 2 }, - { huff_sfb_a3_tab, 8, 1, 0, 3 }, - { huff_sfb_a4_tab, 16, 1, 0, 4 }, - { huff_sfb_a5_tab, 32, 1, 0, 5 }, - { huff_sfb_a6_tab, 64, 1, 0, 6 }, + { 2, 1, 0, 1 }, + { 4, 1, 0, 2 }, + { 8, 1, 0, 3 }, + { 16, 1, 0, 4 }, + { 32, 1, 0, 5 }, + { 64, 1, 0, 6 }, }; static const HuffmanCodebook at9_huffman_sf_signed[] = { { 0 }, { 0 }, - { huff_sfb_b2_tab, 3, 1, 0, 2 }, - { huff_sfb_b3_tab, 7, 1, 0, 3 }, - { huff_sfb_b4_tab, 15, 1, 0, 4 }, - { huff_sfb_b5_tab, 32, 1, 0, 5 }, + { 3, 1, 0, 2 }, + { 7, 1, 0, 3 }, + { 15, 1, 0, 4 }, + { 32, 1, 0, 5 }, }; -static const uint8_t huff_spec_a21_tab[8][2] = { +static const uint8_t at9_coeffs_tab[][2] = { + /* Coefficient table A.2.1 - 8 entries */ { 1, 3 }, { 3, 3 }, { 12, 3 }, { 4, 3 }, { 7, 3 }, { 13, 3 }, { 15, 3 }, { 5, 3 }, -}; - -static const uint8_t huff_spec_a22_tab[80][2] = { + /* Coefficient table A.2.2 - 80 entries */ { 17, 6 }, { 51, 6 }, { 81, 7 }, { 243, 7 }, { 69, 7 }, { 207, 7 }, { 205, 7 }, { 71, 7 }, { 209, 7 }, { 115, 7 }, { 245, 7 }, { 95, 7 }, { 125, 7 }, { 215, 7 }, { 1, 4 }, @@ -484,9 +468,7 @@ static const uint8_t huff_spec_a22_tab[80][2] = { { 76, 6 }, { 53, 7 }, { 31, 7 }, { 197, 7 }, { 79, 7 }, { 49, 6 }, { 19, 6 }, { 61, 7 }, { 23, 7 }, { 68, 7 }, { 204, 7 }, { 5, 6 }, { 15, 6 }, { 13, 6 }, { 7, 6 }, -}; - -static const uint8_t huff_spec_a23_tab[81][2] = { + /* Coefficient table A.2.3 - 81 entries */ { 65, 6 }, { 195, 6 }, { 193, 6 }, { 67, 6 }, { 197, 7 }, { 79, 7 }, { 77, 7 }, { 199, 7 }, { 241, 7 }, { 83, 7 }, { 244, 7 }, { 92, 7 }, { 1, 4 }, { 3, 4 }, { 20, 6 }, @@ -504,9 +486,7 @@ static const uint8_t huff_spec_a23_tab[81][2] = { { 85, 9 }, { 255, 9 }, { 113, 8 }, { 211, 8 }, { 4, 5 }, { 12, 5 }, { 0, 3 }, { 16, 5 }, { 48, 5 }, { 64, 5 }, { 192, 5 }, -}; - -static const uint8_t huff_spec_a24_tab[81][2] = { + /* Coefficient table A.2.4 - 81 entries */ { 20, 6 }, { 60, 6 }, { 52, 6 }, { 28, 6 }, { 80, 6 }, { 240, 6 }, { 208, 6 }, { 112, 6 }, { 1, 4 }, { 3, 4 }, { 5, 6 }, { 15, 6 }, { 13, 6 }, { 7, 6 }, { 84, 8 }, @@ -524,9 +504,7 @@ static const uint8_t huff_spec_a24_tab[81][2] = { { 247, 10 }, { 85, 10 }, { 255, 10 }, { 116, 9 }, { 220, 9 }, { 16, 5 }, { 48, 5 }, { 64, 5 }, { 192, 5 }, { 4, 5 }, { 12, 5 }, -}; - -static const uint8_t huff_spec_a31_tab[40][2] = { + /* Coefficient table A.3.1 - 40 entries */ { 50, 5 }, { 22, 5 }, { 11, 5 }, { 61, 5 }, { 2, 4 }, { 6, 4 }, { 59, 5 }, { 13, 5 }, { 17, 5 }, { 55, 5 }, { 49, 5 }, { 23, 5 }, { 24, 5 }, { 40, 5 }, { 26, 6 }, @@ -535,9 +513,7 @@ static const uint8_t huff_spec_a31_tab[40][2] = { { 21, 6 }, { 3, 5 }, { 5, 5 }, { 16, 5 }, { 48, 5 }, { 25, 6 }, { 47, 6 }, { 41, 6 }, { 31, 6 }, { 27, 7 }, { 45, 7 }, { 43, 7 }, { 29, 7 }, { 18, 6 }, { 54, 6 }, -}; - -static const uint8_t huff_spec_a32_tab[49][2] = { + /* Coefficient table A.3.2 - 49 entries */ { 57, 5 }, { 15, 5 }, { 17, 5 }, { 55, 5 }, { 49, 5 }, { 23, 5 }, { 58, 5 }, { 14, 5 }, { 10, 5 }, { 62, 5 }, { 43, 7 }, { 29, 7 }, { 27, 7 }, { 45, 7 }, { 25, 6 }, @@ -548,9 +524,7 @@ static const uint8_t huff_spec_a32_tab[49][2] = { { 7, 5 }, { 0, 4 }, { 42, 7 }, { 30, 7 }, { 26, 7 }, { 46, 7 }, { 3, 6 }, { 5, 6 }, { 19, 7 }, { 53, 7 }, { 51, 7 }, { 21, 7 }, { 9, 6 }, { 63, 6 }, -}; - -static const uint8_t huff_spec_a33_tab[49][2] = { + /* Coefficient table A.3.3 - 49 entries */ { 51, 7 }, { 21, 7 }, { 19, 7 }, { 53, 7 }, { 24, 6 }, { 40, 6 }, { 50, 6 }, { 22, 6 }, { 18, 6 }, { 54, 6 }, { 3, 6 }, { 5, 6 }, { 43, 8 }, { 29, 8 }, { 27, 8 }, @@ -561,9 +535,7 @@ static const uint8_t huff_spec_a33_tab[49][2] = { { 59, 7 }, { 13, 7 }, { 26, 8 }, { 46, 8 }, { 42, 8 }, { 30, 8 }, { 49, 6 }, { 23, 6 }, { 17, 6 }, { 55, 6 }, { 58, 6 }, { 14, 6 }, { 10, 6 }, { 62, 6 }, -}; - -static const uint8_t huff_spec_a34_tab[49][2] = { + /* Coefficient table A.3.4 - 49 entries */ { 0, 2 }, { 16, 5 }, { 48, 5 }, { 2, 5 }, { 6, 5 }, { 26, 8 }, { 46, 8 }, { 51, 8 }, { 21, 8 }, { 24, 7 }, { 40, 7 }, { 3, 7 }, { 5, 7 }, { 19, 8 }, { 53, 8 }, @@ -574,9 +546,7 @@ static const uint8_t huff_spec_a34_tab[49][2] = { { 11, 8 }, { 61, 8 }, { 59, 8 }, { 13, 8 }, { 43, 10 }, { 29, 10 }, { 27, 10 }, { 45, 10 }, { 42, 9 }, { 30, 9 }, { 9, 5 }, { 63, 5 }, { 57, 5 }, { 15, 5 }, -}; - -static const uint8_t huff_spec_a41_tab[176][2] = { + /* Coefficient table A.4.1 - 176 entries */ { 83, 7 }, { 189, 7 }, { 68, 7 }, { 204, 7 }, { 23, 7 }, { 249, 7 }, { 166, 8 }, { 106, 8 }, { 183, 8 }, { 89, 8 }, { 52, 7 }, { 220, 7 }, { 161, 7 }, { 111, 7 }, { 179, 7 }, @@ -613,9 +583,7 @@ static const uint8_t huff_spec_a41_tab[176][2] = { { 185, 9 }, { 112, 8 }, { 144, 8 }, { 245, 7 }, { 27, 7 }, { 64, 7 }, { 192, 7 }, { 67, 8 }, { 205, 8 }, { 195, 8 }, { 77, 8 }, -}; - -static const uint8_t huff_spec_a42_tab[225][2] = { + /* Coefficient table A.4.2 - 225 entries */ { 3, 7 }, { 13, 7 }, { 113, 8 }, { 159, 8 }, { 163, 8 }, { 109, 8 }, { 16, 6 }, { 240, 6 }, { 81, 7 }, { 191, 7 }, { 177, 7 }, { 95, 7 }, { 0, 5 }, { 112, 8 }, { 144, 8 }, @@ -661,9 +629,7 @@ static const uint8_t huff_spec_a42_tab[225][2] = { { 41, 9 }, { 229, 8 }, { 43, 8 }, { 48, 8 }, { 208, 8 }, { 37, 8 }, { 235, 8 }, { 34, 8 }, { 238, 8 }, { 226, 8 }, { 46, 8 }, { 39, 9 }, { 233, 9 }, { 145, 9 }, { 127, 9 }, -}; - -static const uint8_t huff_spec_a43_tab[225][2] = { + /* Coefficient table A.4.3 - 225 entries */ { 246, 8 }, { 26, 8 }, { 22, 8 }, { 250, 8 }, { 210, 7 }, { 62, 7 }, { 50, 7 }, { 222, 7 }, { 53, 8 }, { 219, 8 }, { 231, 9 }, { 41, 9 }, { 39, 9 }, { 233, 9 }, { 16, 5 }, @@ -709,9 +675,7 @@ static const uint8_t huff_spec_a43_tab[225][2] = { { 93, 9 }, { 70, 10 }, { 202, 10 }, { 146, 10 }, { 126, 10 }, { 213, 9 }, { 59, 9 }, { 18, 7 }, { 254, 7 }, { 225, 7 }, { 47, 7 }, { 242, 7 }, { 30, 7 }, { 1, 6 }, { 15, 6 }, -}; - -static const uint8_t huff_spec_a44_tab[225][2] = { + /* Coefficient table A.4.4 - 225 entries */ { 193, 7 }, { 79, 7 }, { 20, 7 }, { 252, 7 }, { 151, 10 }, { 121, 10 }, { 119, 10 }, { 153, 10 }, { 118, 10 }, { 154, 10 }, { 150, 10 }, { 122, 10 }, { 167, 10 }, { 105, 10 }, { 103, 10 }, @@ -757,9 +721,7 @@ static const uint8_t huff_spec_a44_tab[225][2] = { { 238, 7 }, { 226, 7 }, { 46, 7 }, { 229, 9 }, { 43, 9 }, { 38, 10 }, { 234, 10 }, { 230, 10 }, { 42, 10 }, { 65, 8 }, { 207, 8 }, { 17, 6 }, { 255, 6 }, { 241, 6 }, { 31, 6 }, -}; - -static const uint8_t huff_spec_a51_tab[31][2] = { + /* Coefficient table A.5.1 - 31 entries */ { 8, 4 }, { 24, 4 }, { 15, 5 }, { 17, 5 }, { 4, 5 }, { 28, 5 }, { 9, 4 }, { 23, 4 }, { 14, 5 }, { 18, 5 }, { 3, 5 }, { 29, 5 }, { 13, 5 }, { 19, 5 }, { 2, 5 }, @@ -767,9 +729,7 @@ static const uint8_t huff_spec_a51_tab[31][2] = { { 7, 6 }, { 25, 6 }, { 0, 5 }, { 11, 5 }, { 21, 5 }, { 6, 6 }, { 26, 6 }, { 5, 6 }, { 27, 6 }, { 10, 5 }, { 22, 5 }, -}; - -static const uint8_t huff_spec_a52_tab[31][2] = { + /* Coefficient table A.5.2 - 31 entries */ { 2, 4 }, { 30, 4 }, { 11, 5 }, { 21, 5 }, { 7, 5 }, { 25, 5 }, { 1, 4 }, { 31, 4 }, { 6, 5 }, { 26, 5 }, { 10, 5 }, { 22, 5 }, { 15, 6 }, { 17, 6 }, { 14, 6 }, @@ -777,9 +737,7 @@ static const uint8_t huff_spec_a52_tab[31][2] = { { 23, 5 }, { 8, 5 }, { 24, 5 }, { 4, 5 }, { 28, 5 }, { 13, 6 }, { 19, 6 }, { 12, 6 }, { 20, 6 }, { 3, 5 }, { 29, 5 }, -}; - -static const uint8_t huff_spec_a53_tab[31][2] = { + /* Coefficient table A.5.3 - 31 entries */ { 0, 3 }, { 9, 5 }, { 23, 5 }, { 7, 5 }, { 25, 5 }, { 3, 4 }, { 29, 4 }, { 8, 5 }, { 24, 5 }, { 15, 7 }, { 17, 7 }, { 14, 7 }, { 18, 7 }, { 11, 6 }, { 21, 6 }, @@ -787,9 +745,7 @@ static const uint8_t huff_spec_a53_tab[31][2] = { { 27, 5 }, { 1, 4 }, { 31, 4 }, { 10, 6 }, { 22, 6 }, { 13, 7 }, { 19, 7 }, { 12, 7 }, { 20, 7 }, { 4, 5 }, { 28, 5 }, -}; - -static const uint8_t huff_spec_a54_tab[31][2] = { + /* Coefficient table A.5.4 - 31 entries */ { 8, 5 }, { 24, 5 }, { 7, 5 }, { 25, 5 }, { 4, 4 }, { 28, 4 }, { 0, 3 }, { 10, 6 }, { 22, 6 }, { 13, 7 }, { 19, 7 }, { 12, 7 }, { 20, 7 }, { 6, 5 }, { 26, 5 }, @@ -797,9 +753,7 @@ static const uint8_t huff_spec_a54_tab[31][2] = { { 23, 6 }, { 15, 8 }, { 17, 8 }, { 14, 8 }, { 18, 8 }, { 11, 7 }, { 21, 7 }, { 5, 5 }, { 27, 5 }, { 1, 4 }, { 31, 4 }, -}; - -static const uint8_t huff_spec_a61_tab[63][2] = { + /* Coefficient table A.6.1 - 63 entries */ { 19, 5 }, { 45, 5 }, { 31, 6 }, { 33, 6 }, { 30, 6 }, { 34, 6 }, { 16, 5 }, { 48, 5 }, { 8, 6 }, { 56, 6 }, { 7, 6 }, { 57, 6 }, { 18, 5 }, { 46, 5 }, { 29, 6 }, @@ -813,9 +767,7 @@ static const uint8_t huff_spec_a61_tab[63][2] = { { 42, 6 }, { 12, 7 }, { 52, 7 }, { 11, 7 }, { 53, 7 }, { 21, 6 }, { 43, 6 }, { 20, 6 }, { 44, 6 }, { 10, 7 }, { 54, 7 }, { 9, 7 }, { 55, 7 }, -}; - -static const uint8_t huff_spec_a62_tab[63][2] = { + /* Coefficient table A.6.2 - 63 entries */ { 23, 6 }, { 41, 6 }, { 15, 6 }, { 49, 6 }, { 4, 5 }, { 60, 5 }, { 3, 5 }, { 61, 5 }, { 22, 6 }, { 42, 6 }, { 14, 6 }, { 50, 6 }, { 2, 5 }, { 62, 5 }, { 31, 7 }, @@ -829,9 +781,7 @@ static const uint8_t huff_spec_a62_tab[63][2] = { { 56, 6 }, { 17, 6 }, { 47, 6 }, { 7, 6 }, { 57, 6 }, { 25, 7 }, { 39, 7 }, { 24, 7 }, { 40, 7 }, { 6, 6 }, { 58, 6 }, { 5, 6 }, { 59, 6 }, -}; - -static const uint8_t huff_spec_a63_tab[63][2] = { + /* Coefficient table A.6.3 - 63 entries */ { 0, 4 }, { 7, 5 }, { 57, 5 }, { 15, 6 }, { 49, 6 }, { 25, 7 }, { 39, 7 }, { 24, 7 }, { 40, 7 }, { 18, 6 }, { 46, 6 }, { 14, 6 }, { 50, 6 }, { 6, 5 }, { 58, 5 }, @@ -845,9 +795,7 @@ static const uint8_t huff_spec_a63_tab[63][2] = { { 44, 7 }, { 9, 6 }, { 55, 6 }, { 1, 5 }, { 63, 5 }, { 27, 8 }, { 37, 8 }, { 26, 8 }, { 38, 8 }, { 19, 7 }, { 45, 7 }, { 8, 6 }, { 56, 6 }, -}; - -static const uint8_t huff_spec_a64_tab[63][2] = { + /* Coefficient table A.6.4 - 63 entries */ { 16, 6 }, { 48, 6 }, { 27, 8 }, { 37, 8 }, { 26, 8 }, { 38, 8 }, { 21, 7 }, { 43, 7 }, { 8, 5 }, { 56, 5 }, { 1, 4 }, { 63, 4 }, { 14, 6 }, { 50, 6 }, { 20, 7 }, @@ -861,9 +809,7 @@ static const uint8_t huff_spec_a64_tab[63][2] = { { 42, 8 }, { 10, 6 }, { 54, 6 }, { 3, 5 }, { 61, 5 }, { 2, 5 }, { 62, 5 }, { 17, 7 }, { 47, 7 }, { 15, 7 }, { 49, 7 }, { 9, 6 }, { 55, 6 }, -}; - -static const uint8_t huff_spec_a71_tab[127][2] = { + /* Coefficient table A.7.1 - 127 entries */ { 18, 7 }, { 110, 7 }, { 63, 7 }, { 65, 7 }, { 38, 6 }, { 90, 6 }, { 17, 7 }, { 111, 7 }, { 62, 7 }, { 66, 7 }, { 61, 7 }, { 67, 7 }, { 16, 7 }, { 112, 7 }, { 37, 6 }, @@ -890,9 +836,7 @@ static const uint8_t huff_spec_a71_tab[127][2] = { { 21, 8 }, { 107, 8 }, { 41, 7 }, { 87, 7 }, { 20, 8 }, { 108, 8 }, { 19, 8 }, { 109, 8 }, { 40, 7 }, { 88, 7 }, { 39, 7 }, { 89, 7 }, -}; - -static const uint8_t huff_spec_a72_tab[127][2] = { + /* Coefficient table A.7.2 - 127 entries */ { 47, 7 }, { 81, 7 }, { 46, 7 }, { 82, 7 }, { 8, 6 }, { 120, 6 }, { 31, 7 }, { 97, 7 }, { 45, 7 }, { 83, 7 }, { 7, 6 }, { 121, 6 }, { 30, 7 }, { 98, 7 }, { 29, 7 }, @@ -919,9 +863,7 @@ static const uint8_t huff_spec_a72_tab[127][2] = { { 12, 7 }, { 116, 7 }, { 49, 8 }, { 79, 8 }, { 48, 8 }, { 80, 8 }, { 11, 7 }, { 117, 7 }, { 10, 7 }, { 118, 7 }, { 9, 7 }, { 119, 7 }, -}; - -static const uint8_t huff_spec_a73_tab[127][2] = { + /* Coefficient table A.7.3 - 127 entries */ { 15, 6 }, { 113, 6 }, { 31, 7 }, { 97, 7 }, { 51, 8 }, { 77, 8 }, { 50, 8 }, { 78, 8 }, { 14, 6 }, { 114, 6 }, { 0, 5 }, { 37, 7 }, { 91, 7 }, { 30, 7 }, { 98, 7 }, @@ -948,9 +890,7 @@ static const uint8_t huff_spec_a73_tab[127][2] = { { 52, 9 }, { 76, 9 }, { 17, 7 }, { 111, 7 }, { 39, 8 }, { 89, 8 }, { 38, 8 }, { 90, 8 }, { 16, 7 }, { 112, 7 }, { 1, 6 }, { 127, 6 }, -}; - -static const uint8_t huff_spec_a74_tab[127][2] = { + /* Coefficient table A.7.4 - 127 entries */ { 3, 5 }, { 125, 5 }, { 32, 7 }, { 96, 7 }, { 29, 7 }, { 99, 7 }, { 16, 6 }, { 112, 6 }, { 2, 5 }, { 126, 5 }, { 53, 9 }, { 75, 9 }, { 52, 9 }, { 76, 9 }, { 42, 8 }, @@ -977,9 +917,7 @@ static const uint8_t huff_spec_a74_tab[127][2] = { { 54, 10 }, { 74, 10 }, { 43, 9 }, { 85, 9 }, { 18, 7 }, { 110, 7 }, { 30, 8 }, { 98, 8 }, { 33, 8 }, { 95, 8 }, { 17, 7 }, { 111, 7 }, -}; - -static const uint8_t huff_spec_b22_tab[80][2] = { + /* Coefficient table B.2.2 - 80 entries */ { 80, 5 }, { 240, 5 }, { 253, 10 }, { 87, 10 }, { 117, 10 }, { 223, 10 }, { 93, 10 }, { 247, 10 }, { 221, 10 }, { 119, 10 }, { 213, 10 }, { 127, 10 }, { 85, 10 }, { 255, 10 }, { 245, 10 }, @@ -996,9 +934,7 @@ static const uint8_t huff_spec_b22_tab[80][2] = { { 211, 9 }, { 29, 9 }, { 55, 9 }, { 209, 10 }, { 115, 10 }, { 125, 10 }, { 215, 10 }, { 65, 8 }, { 195, 8 }, { 193, 8 }, { 67, 8 }, { 64, 4 }, { 192, 4 }, { 1, 4 }, { 3, 4 }, -}; - -static const uint8_t huff_spec_b23_tab[81][2] = { + /* Coefficient table B.2.3 - 81 entries */ { 16, 4 }, { 48, 4 }, { 4, 4 }, { 12, 4 }, { 64, 4 }, { 192, 4 }, { 5, 6 }, { 15, 6 }, { 13, 6 }, { 7, 6 }, { 212, 8 }, { 124, 8 }, { 213, 10 }, { 127, 10 }, { 93, 10 }, @@ -1016,9 +952,7 @@ static const uint8_t huff_spec_b23_tab[81][2] = { { 113, 10 }, { 211, 10 }, { 197, 10 }, { 79, 10 }, { 68, 9 }, { 204, 9 }, { 17, 9 }, { 51, 9 }, { 244, 9 }, { 92, 9 }, { 0, 2 }, -}; - -static const uint8_t huff_spec_b24_tab[81][2] = { + /* Coefficient table B.2.4 - 81 entries */ { 1, 4 }, { 3, 4 }, { 52, 7 }, { 28, 7 }, { 193, 8 }, { 67, 8 }, { 213, 10 }, { 127, 10 }, { 253, 10 }, { 87, 10 }, { 93, 10 }, { 247, 10 }, { 117, 10 }, { 223, 10 }, { 80, 7 }, @@ -1036,9 +970,7 @@ static const uint8_t huff_spec_b24_tab[81][2] = { { 61, 9 }, { 23, 9 }, { 17, 9 }, { 51, 9 }, { 65, 9 }, { 195, 9 }, { 20, 8 }, { 60, 8 }, { 64, 5 }, { 192, 5 }, { 0, 1 }, -}; - -static const uint8_t huff_spec_b32_tab[49][2] = { + /* Coefficient table B.3.2 - 49 entries */ { 58, 5 }, { 14, 5 }, { 59, 6 }, { 13, 6 }, { 19, 7 }, { 53, 7 }, { 25, 7 }, { 47, 7 }, { 1, 4 }, { 7, 4 }, { 0, 2 }, { 9, 6 }, { 63, 6 }, { 57, 6 }, { 15, 6 }, @@ -1049,9 +981,7 @@ static const uint8_t huff_spec_b32_tab[49][2] = { { 26, 8 }, { 46, 8 }, { 51, 8 }, { 21, 8 }, { 16, 5 }, { 48, 5 }, { 18, 7 }, { 54, 7 }, { 50, 7 }, { 22, 7 }, { 10, 6 }, { 62, 6 }, { 2, 5 }, { 6, 5 }, -}; - -static const uint8_t huff_spec_b33_tab[49][2] = { + /* Coefficient table B.3.3 - 49 entries */ { 57, 5 }, { 15, 5 }, { 9, 5 }, { 63, 5 }, { 59, 7 }, { 13, 7 }, { 50, 7 }, { 22, 7 }, { 18, 7 }, { 54, 7 }, { 51, 8 }, { 21, 8 }, { 27, 10 }, { 45, 10 }, { 43, 10 }, @@ -1062,9 +992,7 @@ static const uint8_t huff_spec_b33_tab[49][2] = { { 47, 8 }, { 42, 9 }, { 30, 9 }, { 19, 9 }, { 53, 9 }, { 24, 7 }, { 40, 7 }, { 41, 8 }, { 31, 8 }, { 11, 8 }, { 61, 8 }, { 3, 7 }, { 5, 7 }, { 0, 2 }, -}; - -static const uint8_t huff_spec_b34_tab[49][2] = { + /* Coefficient table B.3.4 - 49 entries */ { 0, 1 }, { 8, 4 }, { 56, 4 }, { 1, 4 }, { 7, 4 }, { 59, 8 }, { 13, 8 }, { 27, 10 }, { 45, 10 }, { 43, 10 }, { 29, 10 }, { 26, 10 }, { 46, 10 }, { 51, 10 }, { 21, 10 }, @@ -1075,9 +1003,7 @@ static const uint8_t huff_spec_b34_tab[49][2] = { { 2, 6 }, { 6, 6 }, { 58, 7 }, { 14, 7 }, { 11, 9 }, { 61, 9 }, { 41, 9 }, { 31, 9 }, { 3, 8 }, { 5, 8 }, { 9, 6 }, { 63, 6 }, { 57, 6 }, { 15, 6 }, -}; - -static const uint8_t huff_spec_b42_tab[225][2] = { + /* Coefficient table B.4.2 - 225 entries */ { 33, 7 }, { 239, 7 }, { 36, 7 }, { 236, 7 }, { 119, 10 }, { 153, 10 }, { 151, 10 }, { 121, 10 }, { 118, 10 }, { 154, 10 }, { 167, 10 }, { 105, 10 }, { 247, 8 }, { 25, 8 }, { 112, 8 }, @@ -1123,9 +1049,7 @@ static const uint8_t huff_spec_b42_tab[225][2] = { { 10, 8 }, { 66, 8 }, { 206, 8 }, { 179, 9 }, { 93, 9 }, { 70, 10 }, { 202, 10 }, { 85, 10 }, { 187, 10 }, { 194, 8 }, { 78, 8 }, { 196, 9 }, { 76, 9 }, { 49, 9 }, { 223, 9 }, -}; - -static const uint8_t huff_spec_b43_tab[225][2] = { + /* Coefficient table B.4.3 - 225 entries */ { 193, 7 }, { 79, 7 }, { 48, 7 }, { 208, 7 }, { 6, 8 }, { 10, 8 }, { 151, 10 }, { 121, 10 }, { 119, 10 }, { 153, 10 }, { 167, 10 }, { 105, 10 }, { 118, 10 }, { 154, 10 }, { 103, 10 }, @@ -1171,9 +1095,7 @@ static const uint8_t huff_spec_b43_tab[225][2] = { { 31, 6 }, { 227, 9 }, { 45, 9 }, { 210, 9 }, { 62, 9 }, { 50, 9 }, { 222, 9 }, { 96, 9 }, { 160, 9 }, { 5, 8 }, { 11, 8 }, { 65, 8 }, { 207, 8 }, { 1, 5 }, { 15, 5 }, -}; - -static const uint8_t huff_spec_b44_tab[225][2] = { + /* Coefficient table B.4.4 - 225 entries */ { 3, 7 }, { 13, 7 }, { 4, 7 }, { 12, 7 }, { 151, 10 }, { 121, 10 }, { 119, 10 }, { 153, 10 }, { 103, 10 }, { 169, 10 }, { 167, 10 }, { 105, 10 }, { 150, 10 }, { 122, 10 }, { 118, 10 }, @@ -1219,9 +1141,7 @@ static const uint8_t huff_spec_b44_tab[225][2] = { { 254, 7 }, { 242, 7 }, { 30, 7 }, { 48, 8 }, { 208, 8 }, { 226, 8 }, { 46, 8 }, { 34, 8 }, { 238, 8 }, { 227, 9 }, { 45, 9 }, { 35, 9 }, { 237, 9 }, { 16, 5 }, { 240, 5 }, -}; - -static const uint8_t huff_spec_b52_tab[31][2] = { + /* Coefficient table B.5.2 - 31 entries */ { 3, 4 }, { 29, 4 }, { 5, 5 }, { 27, 5 }, { 10, 5 }, { 22, 5 }, { 13, 6 }, { 19, 6 }, { 7, 6 }, { 25, 6 }, { 4, 5 }, { 28, 5 }, { 2, 4 }, { 30, 4 }, { 9, 5 }, @@ -1229,9 +1149,7 @@ static const uint8_t huff_spec_b52_tab[31][2] = { { 14, 7 }, { 18, 7 }, { 8, 5 }, { 24, 5 }, { 6, 6 }, { 26, 6 }, { 11, 6 }, { 21, 6 }, { 0, 3 }, { 1, 4 }, { 31, 4 }, -}; - -static const uint8_t huff_spec_b53_tab[31][2] = { + /* Coefficient table B.5.3 - 31 entries */ { 1, 3 }, { 31, 3 }, { 7, 6 }, { 25, 6 }, { 13, 7 }, { 19, 7 }, { 12, 7 }, { 20, 7 }, { 10, 6 }, { 22, 6 }, { 6, 6 }, { 26, 6 }, { 2, 4 }, { 30, 4 }, { 0, 2 }, @@ -1239,9 +1157,7 @@ static const uint8_t huff_spec_b53_tab[31][2] = { { 18, 8 }, { 11, 7 }, { 21, 7 }, { 9, 6 }, { 23, 6 }, { 3, 5 }, { 29, 5 }, { 8, 6 }, { 24, 6 }, { 5, 6 }, { 27, 6 }, -}; - -static const uint8_t huff_spec_b54_tab[31][2] = { + /* Coefficient table B.5.4 - 31 entries */ { 3, 4 }, { 29, 4 }, { 9, 6 }, { 23, 6 }, { 8, 6 }, { 24, 6 }, { 13, 8 }, { 19, 8 }, { 12, 8 }, { 20, 8 }, { 10, 7 }, { 22, 7 }, { 6, 6 }, { 26, 6 }, { 1, 3 }, @@ -1249,9 +1165,7 @@ static const uint8_t huff_spec_b54_tab[31][2] = { { 15, 9 }, { 17, 9 }, { 14, 9 }, { 18, 9 }, { 11, 8 }, { 21, 8 }, { 7, 7 }, { 25, 7 }, { 5, 6 }, { 27, 6 }, { 0, 2 }, -}; - -static const uint8_t huff_spec_b62_tab[63][2] = { + /* Coefficient table B.6.2 - 63 entries */ { 11, 6 }, { 53, 6 }, { 21, 6 }, { 43, 6 }, { 27, 7 }, { 37, 7 }, { 26, 7 }, { 38, 7 }, { 10, 6 }, { 54, 6 }, { 5, 5 }, { 59, 5 }, { 20, 6 }, { 44, 6 }, { 9, 6 }, @@ -1265,9 +1179,7 @@ static const uint8_t huff_spec_b62_tab[63][2] = { { 17, 6 }, { 47, 6 }, { 0, 4 }, { 2, 5 }, { 62, 5 }, { 22, 7 }, { 42, 7 }, { 29, 8 }, { 35, 8 }, { 28, 8 }, { 36, 8 }, { 6, 6 }, { 58, 6 }, -}; - -static const uint8_t huff_spec_b63_tab[63][2] = { + /* Coefficient table B.6.3 - 63 entries */ { 6, 5 }, { 58, 5 }, { 10, 6 }, { 54, 6 }, { 16, 6 }, { 48, 6 }, { 17, 6 }, { 47, 6 }, { 21, 7 }, { 43, 7 }, { 14, 7 }, { 50, 7 }, { 5, 5 }, { 59, 5 }, { 2, 4 }, @@ -1281,9 +1193,7 @@ static const uint8_t huff_spec_b63_tab[63][2] = { { 22, 8 }, { 42, 8 }, { 11, 7 }, { 53, 7 }, { 15, 8 }, { 49, 8 }, { 27, 9 }, { 37, 9 }, { 26, 9 }, { 38, 9 }, { 0, 3 }, { 1, 4 }, { 63, 4 }, -}; - -static const uint8_t huff_spec_b64_tab[63][2] = { + /* Coefficient table B.6.4 - 63 entries */ { 1, 3 }, { 63, 3 }, { 14, 7 }, { 50, 7 }, { 18, 7 }, { 46, 7 }, { 27, 9 }, { 37, 9 }, { 26, 9 }, { 38, 9 }, { 21, 8 }, { 43, 8 }, { 13, 7 }, { 51, 7 }, { 9, 6 }, @@ -1297,9 +1207,7 @@ static const uint8_t huff_spec_b64_tab[63][2] = { { 19, 8 }, { 45, 8 }, { 23, 9 }, { 41, 9 }, { 22, 9 }, { 42, 9 }, { 10, 7 }, { 54, 7 }, { 6, 6 }, { 58, 6 }, { 3, 5 }, { 61, 5 }, { 0, 3 }, -}; - -static const uint8_t huff_spec_b72_tab[127][2] = { + /* Coefficient table B.7.2 - 127 entries */ { 3, 5 }, { 125, 5 }, { 42, 7 }, { 86, 7 }, { 21, 7 }, { 107, 7 }, { 11, 6 }, { 117, 6 }, { 41, 7 }, { 87, 7 }, { 20, 7 }, { 108, 7 }, { 53, 8 }, { 75, 8 }, { 31, 8 }, @@ -1326,9 +1234,7 @@ static const uint8_t huff_spec_b72_tab[127][2] = { { 85, 8 }, { 12, 7 }, { 116, 7 }, { 0, 5 }, { 33, 7 }, { 95, 7 }, { 22, 8 }, { 106, 8 }, { 55, 9 }, { 73, 9 }, { 54, 9 }, { 74, 9 }, -}; - -static const uint8_t huff_spec_b73_tab[127][2] = { + /* Coefficient table B.7.3 - 127 entries */ { 0, 3 }, { 4, 5 }, { 124, 5 }, { 19, 7 }, { 109, 7 }, { 29, 8 }, { 99, 8 }, { 51, 9 }, { 77, 9 }, { 62, 10 }, { 66, 10 }, { 63, 10 }, { 65, 10 }, { 28, 8 }, { 100, 8 }, @@ -1355,9 +1261,7 @@ static const uint8_t huff_spec_b73_tab[127][2] = { { 53, 10 }, { 75, 10 }, { 52, 10 }, { 76, 10 }, { 42, 9 }, { 86, 9 }, { 34, 8 }, { 94, 8 }, { 32, 8 }, { 96, 8 }, { 11, 7 }, { 117, 7 }, -}; - -static const uint8_t huff_spec_b74_tab[127][2] = { + /* Coefficient table B.7.4 - 127 entries */ { 28, 8 }, { 100, 8 }, { 27, 8 }, { 101, 8 }, { 36, 8 }, { 92, 8 }, { 63, 10 }, { 65, 10 }, { 61, 10 }, { 67, 10 }, { 62, 10 }, { 66, 10 }, { 60, 10 }, { 68, 10 }, { 19, 7 }, @@ -1391,40 +1295,40 @@ static const HuffmanCodebook at9_huffman_coeffs[][8][4] = { { { 0 } }, { { 0 } }, { - { huff_spec_a21_tab, 8, 2, 1, 2 }, - { huff_spec_a22_tab, 80, 4, 2, 2 }, - { huff_spec_a23_tab, 81, 4, 2, 2 }, - { huff_spec_a24_tab, 81, 4, 2, 2 }, + { 8, 2, 1, 2 }, + { 80, 4, 2, 2 }, + { 81, 4, 2, 2 }, + { 81, 4, 2, 2 }, }, { - { huff_spec_a31_tab, 40, 2, 1, 3 }, - { huff_spec_a32_tab, 49, 2, 1, 3 }, - { huff_spec_a33_tab, 49, 2, 1, 3 }, - { huff_spec_a34_tab, 49, 2, 1, 3 }, + { 40, 2, 1, 3 }, + { 49, 2, 1, 3 }, + { 49, 2, 1, 3 }, + { 49, 2, 1, 3 }, }, { - { huff_spec_a41_tab, 176, 2, 1, 4 }, - { huff_spec_a42_tab, 225, 2, 1, 4 }, - { huff_spec_a43_tab, 225, 2, 1, 4 }, - { huff_spec_a44_tab, 225, 2, 1, 4 }, + { 176, 2, 1, 4 }, + { 225, 2, 1, 4 }, + { 225, 2, 1, 4 }, + { 225, 2, 1, 4 }, }, { - { huff_spec_a51_tab, 31, 1, 0, 5 }, - { huff_spec_a52_tab, 31, 1, 0, 5 }, - { huff_spec_a53_tab, 31, 1, 0, 5 }, - { huff_spec_a54_tab, 31, 1, 0, 5 }, + { 31, 1, 0, 5 }, + { 31, 1, 0, 5 }, + { 31, 1, 0, 5 }, + { 31, 1, 0, 5 }, }, { - { huff_spec_a61_tab, 63, 1, 0, 6 }, - { huff_spec_a62_tab, 63, 1, 0, 6 }, - { huff_spec_a63_tab, 63, 1, 0, 6 }, - { huff_spec_a64_tab, 63, 1, 0, 6 }, + { 63, 1, 0, 6 }, + { 63, 1, 0, 6 }, + { 63, 1, 0, 6 }, + { 63, 1, 0, 6 }, }, { - { huff_spec_a71_tab, 127, 1, 0, 7 }, - { huff_spec_a72_tab, 127, 1, 0, 7 }, - { huff_spec_a73_tab, 127, 1, 0, 7 }, - { huff_spec_a74_tab, 127, 1, 0, 7 }, + { 127, 1, 0, 7 }, + { 127, 1, 0, 7 }, + { 127, 1, 0, 7 }, + { 127, 1, 0, 7 }, }, }, { @@ -1432,39 +1336,39 @@ static const HuffmanCodebook at9_huffman_coeffs[][8][4] = { { { 0 } }, { { 0 }, - { huff_spec_b22_tab, 80, 4, 2, 2 }, - { huff_spec_b23_tab, 81, 4, 2, 2 }, - { huff_spec_b24_tab, 81, 4, 2, 2 }, + { 80, 4, 2, 2 }, + { 81, 4, 2, 2 }, + { 81, 4, 2, 2 }, }, { { 0 }, - { huff_spec_b32_tab, 49, 2, 1, 3 }, - { huff_spec_b33_tab, 49, 2, 1, 3 }, - { huff_spec_b34_tab, 49, 2, 1, 3 }, + { 49, 2, 1, 3 }, + { 49, 2, 1, 3 }, + { 49, 2, 1, 3 }, }, { { 0 }, - { huff_spec_b42_tab, 225, 2, 1, 4 }, - { huff_spec_b43_tab, 225, 2, 1, 4 }, - { huff_spec_b44_tab, 225, 2, 1, 4 }, + { 225, 2, 1, 4 }, + { 225, 2, 1, 4 }, + { 225, 2, 1, 4 }, }, { { 0 }, - { huff_spec_b52_tab, 31, 1, 0, 5 }, - { huff_spec_b53_tab, 31, 1, 0, 5 }, - { huff_spec_b54_tab, 31, 1, 0, 5 }, + { 31, 1, 0, 5 }, + { 31, 1, 0, 5 }, + { 31, 1, 0, 5 }, }, { { 0 }, - { huff_spec_b62_tab, 63, 1, 0, 6 }, - { huff_spec_b63_tab, 63, 1, 0, 6 }, - { huff_spec_b64_tab, 63, 1, 0, 6 }, + { 63, 1, 0, 6 }, + { 63, 1, 0, 6 }, + { 63, 1, 0, 6 }, }, { { 0 }, - { huff_spec_b72_tab, 127, 1, 0, 7 }, - { huff_spec_b73_tab, 127, 1, 0, 7 }, - { huff_spec_b74_tab, 127, 1, 0, 7 }, + { 127, 1, 0, 7 }, + { 127, 1, 0, 7 }, + { 127, 1, 0, 7 }, }, }, }; From patchwork Tue Nov 10 10:58:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23516 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 78BB644A3F2 for ; Tue, 10 Nov 2020 12:59:23 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 64F9368BFC8; Tue, 10 Nov 2020 12:59:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8A7BD68BFC6 for ; Tue, 10 Nov 2020 12:59:17 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id j7so4921172wrp.3 for ; Tue, 10 Nov 2020 02:59:17 -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=8peZw8sPL4v3VOz7K0+VBd5PAzkTA73KI0lrqzLHFEU=; b=CqqJIpFzfmbTbEMrNuFgO1kO2T1vVUJb49CFbpAsbHFfM5650cEKlwX24V0k31jF2M BOz0FEkfq519hRRDo+n1R4IXqF70jU/kTty2qHh2DzQzCmiaqiA+HiCr4y8K7bsqusE/ rDqKpqLdub8aBqRpm4s9t92rfixA5F5taW18Q8yzq6hLKc2aoDvKvOpZPAP5PwlACrl9 spa3FOAwA2dn6NZPp36ji4wgTKbkcahcPp9bOs13wcp9mT808PJ32wutInUMxnnvgJdm u7odEKfRXou5rShZzKtg71LvmKziKASpfEq2dd0UU6mVU6Om3U8o/wkp2DWFmSEZIxak IbNg== 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=8peZw8sPL4v3VOz7K0+VBd5PAzkTA73KI0lrqzLHFEU=; b=nvjZjC5oQKVlMYeqRxWIXW4bGGdGUNtoHj8I7j3PnBZSYIgIizHIZAytUTKqtl1HI9 dQxQ8CRZ4K5q6DLF5XxrY6Eb+IOs4dQdLj0S66HIxy/IEi3VCR9NvgWH3raCJR+1CqNW 3vxCudVlAs5NfOQ2IiCN3fAkT7u0S9iGVQnzewxMAdlGPSTLQ7Mc+h5y9/qGAnxLo6yR gcrVvH6kmQjc0orRxBYwhkLLN2gHZymYcgY/Pj6y3sovCorH9m5WXrYuAbBypthL2Vgd qvGZG7u5SvokENCZKZc2Y5I9o1OKivUAhxhOnUnqUazOLf40z4e688L3Fh5hs09Ci/Kb 9T2g== X-Gm-Message-State: AOAM533bzmrp5ZlcvaSebAVivsP+m6KfeCDV+idyecszW6SuS8MK4xXu 3FLuZQ7prlDa6TBZQfIUP1/vETxIz4U= X-Google-Smtp-Source: ABdhPJxnZi0zd4C9rwuYY5tREJJN0xxIrvlj+7aUJNfyIQ/NT+wIs+byBl6QpjJwF2rXqyOSTB9oPA== X-Received: by 2002:adf:fd49:: with SMTP id h9mr24347399wrs.115.1605005956798; Tue, 10 Nov 2020 02:59:16 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:16 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:16 +0100 Message-Id: <20201110105836.321916-3-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 094/114] avcodec/atrac9dec: Don't create VLCs that are never used 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" The ATRAC9 decoder creates VLCs with parameters contained in HuffmanCodebooks; some of these HuffmanCodebooks are empty and yet VLCs (that were completely unused*) were created from them. Said VLC contained a single table with 512 VLC_TYPE[2] entries, each of which indicated that this is an invalid code. This commit stops creating said VLCs. *: read_coeffs_coarse() uses the HuffmanCodebook at9_huffman_coeffs[cb][prec][cbi]. prec is c->precision_coarse[i] + 1 and every precision_coarse entry is in the 1..15 range after calc_precision(), so prec is >= 2 (all codebooks with prec < 2 are empty). The remaining empty codebooks are those with cb == 1 and cbi == 0, yet this is impossible, too: cb is given by c->codebookset[i] and this is always 0 if i < 8 (because those are never set to anything else in calc_codebook_idx()) and cbi is given by at9_q_unit_to_codebookidx[i] which is never zero if i >= 8. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac9dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index ddfa02a393..4715ce42d7 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -964,8 +964,8 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) /* Coefficient VLCs */ tab = at9_coeffs_tab; for (int i = 0; i < 2; i++) { - for (int j = 0; j < 8; j++) { - for (int k = 0; k < 4; k++) { + for (int j = 2; j < 8; j++) { + for (int k = i; k < 4; k++) { const HuffmanCodebook *hf = &at9_huffman_coeffs[i][j][k]; ret = ff_init_vlc_from_lengths(&s->coeff_vlc[i][j][k], 9, hf->size, &tab[0][1], 2, From patchwork Tue Nov 10 10:58:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23517 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 61B2B44A3F2 for ; Tue, 10 Nov 2020 12:59:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 48BF268BFDF; Tue, 10 Nov 2020 12:59:26 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8DD0668BFD9 for ; Tue, 10 Nov 2020 12:59:18 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id 33so12165922wrl.7 for ; Tue, 10 Nov 2020 02:59:18 -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=JDUCS76cL76pOhDxqqRT8PoAMXCRImbCwINqeB+r6dE=; b=m4ulMGmJGntKy3ssslHnZRLx0IeUzPmaheVCdL/3LBJFglMtmmJ6HgHrVcYKHSiSxS GhONc4GM1X8zSj4AVweuty3MGu1Mx/EcUcup5s4xwEtdKVlOicWQrfvGhELbTTV8UZxi mUndtaHC33MWxga4PaXftJPjwJWODE7HA2Nz+Mu0ZI1+ZbG3w8MRcKA35tJmIR8/1HcK MQluJlbxcXa71HGRFiUnj2hzwS2J+x8phqqd/nsMPfVtJQrOIXWyOQCTn5fSEqErWhus ApvZspRlCuRyJ1miZPnueoOyqhJN/WmIr4znCrzRY8TigBg3nHqbMXx9SWiwkuUWroGu V+Zg== 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=JDUCS76cL76pOhDxqqRT8PoAMXCRImbCwINqeB+r6dE=; b=b6XuZilL9AY0wLE/MWum3Brnr7ceyT+VQlt2mia7I2boZo3EwRaWZnMyn+dBx+zGlm b9Hm9WO2/Je3ycN9i0rSVcX14IFAZjiN/9e0md6oirYlYXX9s8G0pKGHbwcBcGM88/8f Cqugz+KbuCn59WM4umZj77ysIFY5isY9lt/stWKuxkrEYgS95Io3RFLB1u50h0HPZkci 66AmohNljJqT4187h5qABiB42fvc8U6OQjpPCJWhf5LzmhJOx8u8kdpHmRmPHJjnpViK o0MbTpvVi7g8dHDK2fF+f7YwQDu4KoJ8Ww3Nx6a78ky7A3IOvZH6VTOU/qw6RVL/jww5 t1xg== X-Gm-Message-State: AOAM531jRpt/BPiOKw+PtVwcgB75YemeVh5Ef5ih+i33ZGU+ecRAPU4q Ik9NET2BLB9mSaDquhHpX3DauhxuAUk= X-Google-Smtp-Source: ABdhPJyALMz8a0VdJh7EcSwGSj5wkA3su9PCDANpjUQZqn9MhdL+w2nImq2qp+sYJ2k80mdrkOW79A== X-Received: by 2002:adf:b7c8:: with SMTP id t8mr24159226wre.143.1605005957647; Tue, 10 Nov 2020 02:59:17 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:17 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:17 +0100 Message-Id: <20201110105836.321916-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 095/114] avcodec/atrac9dec: Make VLCs static 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" Also remove code duplication and use a named constant for the number of VLC bits while just at it. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac9dec.c | 69 +++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index 4715ce42d7..d2dbffe92a 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -27,6 +27,7 @@ #include "libavutil/float_dsp.h" #define ATRAC9_SF_VLC_BITS 8 +#define ATRAC9_COEFF_VLC_BITS 9 typedef struct ATRAC9ChannelData { int band_ext; @@ -92,14 +93,15 @@ typedef struct ATRAC9Context { const ATRAC9BlockConfig *block_config; /* Generated on init */ - VLC sf_vlc[2][8]; /* Signed/unsigned, length */ - VLC coeff_vlc[2][8][4]; /* Cookbook, precision, cookbook index */ uint8_t alloc_curve[48][48]; DECLARE_ALIGNED(32, float, imdct_win)[256]; DECLARE_ALIGNED(32, float, temp)[256]; } ATRAC9Context; +static VLC sf_vlc[2][8]; /* Signed/unsigned, length */ +static VLC coeff_vlc[2][8][4]; /* Cookbook, precision, cookbook index */ + static inline int parse_gradient(ATRAC9Context *s, ATRAC9BlockData *b, GetBitContext *gb) { @@ -269,7 +271,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b, const uint8_t *sf_weights = at9_tab_sf_weights[get_bits(gb, 3)]; const int base = get_bits(gb, 5); const int len = get_bits(gb, 2) + 3; - const VLC *tab = &s->sf_vlc[0][len]; + const VLC *tab = &sf_vlc[0][len]; c->scalefactors[0] = get_bits(gb, len); @@ -302,7 +304,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b, const int len = get_bits(gb, 2) + 2; const int unit_cnt = FFMIN(b->band_ext_q_unit, baseline_len); - const VLC *tab = &s->sf_vlc[1][len]; + const VLC *tab = &sf_vlc[1][len]; for (int i = 0; i < unit_cnt; i++) { int dist = get_vlc2(gb, tab->table, ATRAC9_SF_VLC_BITS, 1); @@ -323,7 +325,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b, const int base = get_bits(gb, 5) - (1 << (5 - 1)); const int len = get_bits(gb, 2) + 1; const int unit_cnt = FFMIN(b->band_ext_q_unit, baseline_len); - const VLC *tab = &s->sf_vlc[0][len]; + const VLC *tab = &sf_vlc[0][len]; c->scalefactors[0] = get_bits(gb, len); @@ -410,12 +412,12 @@ static inline void read_coeffs_coarse(ATRAC9Context *s, ATRAC9BlockData *b, if (prec <= max_prec) { const int cb = c->codebookset[i]; const int cbi = at9_q_unit_to_codebookidx[i]; - const VLC *tab = &s->coeff_vlc[cb][prec][cbi]; + const VLC *tab = &coeff_vlc[cb][prec][cbi]; const HuffmanCodebook *huff = &at9_huffman_coeffs[cb][prec][cbi]; const int groups = bands >> huff->value_cnt_pow; for (int j = 0; j < groups; j++) { - uint16_t val = get_vlc2(gb, tab->table, 9, 2); + uint16_t val = get_vlc2(gb, tab->table, ATRAC9_COEFF_VLC_BITS, 2); for (int k = 0; k < huff->value_cnt; k++) { coeffs[k] = sign_extend(val, huff->value_bits); @@ -828,28 +830,34 @@ static av_cold int atrac9_decode_close(AVCodecContext *avctx) { ATRAC9Context *s = avctx->priv_data; - for (int i = 1; i < 7; i++) - ff_free_vlc(&s->sf_vlc[0][i]); - for (int i = 2; i < 6; i++) - ff_free_vlc(&s->sf_vlc[1][i]); - for (int i = 0; i < 2; i++) - for (int j = 0; j < 8; j++) - for (int k = 0; k < 4; k++) - ff_free_vlc(&s->coeff_vlc[i][j][k]); - ff_mdct_end(&s->imdct); av_free(s->fdsp); return 0; } +static av_cold void atrac9_init_vlc(VLC *vlc, int nb_bits, int nb_codes, + const uint8_t (**tab)[2], + unsigned *buf_offset, int offset) +{ + static VLC_TYPE vlc_buf[24812][2]; + + vlc->table = &vlc_buf[*buf_offset]; + vlc->table_allocated = FF_ARRAY_ELEMS(vlc_buf) - *buf_offset; + ff_init_vlc_from_lengths(vlc, nb_bits, nb_codes, + &(*tab)[0][1], 2, &(*tab)[0][0], 2, 1, + offset, INIT_VLC_USE_NEW_STATIC); + *buf_offset += vlc->table_size; + *tab += nb_codes; +} + static av_cold int atrac9_decode_init(AVCodecContext *avctx) { GetBitContext gb; ATRAC9Context *s = avctx->priv_data; int version, block_config_idx, superframe_idx, alloc_c_len; const uint8_t (*tab)[2]; - int ret; + unsigned offset = 0; s->avctx = avctx; @@ -932,17 +940,16 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) for (int j = 0; j < i; j++) s->alloc_curve[i - 1][j] = at9_tab_b_dist[(j * alloc_c_len) / i]; + if (coeff_vlc[1][7][3].table_size) + return 0; + /* Unsigned scalefactor VLCs */ tab = at9_sfb_a_tab; for (int i = 1; i < 7; i++) { const HuffmanCodebook *hf = &at9_huffman_sf_unsigned[i]; - ret = ff_init_vlc_from_lengths(&s->sf_vlc[0][i], ATRAC9_SF_VLC_BITS, - hf->size, &tab[0][1], 2, - &tab[0][0], 2, 1, 0, 0); - if (ret < 0) - return ret; - tab += hf->size; + atrac9_init_vlc(&sf_vlc[0][i], ATRAC9_SF_VLC_BITS, + hf->size, &tab, &offset, 0); } /* Signed scalefactor VLCs */ @@ -953,12 +960,8 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) /* The symbols are signed integers in the range -16..15; * the values in the source table are offset by 16 to make * them fit into an uint8_t; the -16 reverses this shift. */ - ret = ff_init_vlc_from_lengths(&s->sf_vlc[1][i], ATRAC9_SF_VLC_BITS, - hf->size, &tab[0][1], 2, - &tab[0][0], 2, 1, -16, 0); - if (ret < 0) - return ret; - tab += hf->size; + atrac9_init_vlc(&sf_vlc[1][i], ATRAC9_SF_VLC_BITS, + hf->size, &tab, &offset, -16); } /* Coefficient VLCs */ @@ -967,12 +970,8 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) for (int j = 2; j < 8; j++) { for (int k = i; k < 4; k++) { const HuffmanCodebook *hf = &at9_huffman_coeffs[i][j][k]; - ret = ff_init_vlc_from_lengths(&s->coeff_vlc[i][j][k], 9, - hf->size, &tab[0][1], 2, - &tab[0][0], 2, 1, 0, 0); - if (ret < 0) - return ret; - tab += hf->size; + atrac9_init_vlc(&coeff_vlc[i][j][k], ATRAC9_COEFF_VLC_BITS, + hf->size, &tab, &offset, 0); } } } From patchwork Tue Nov 10 10:58:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23520 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 5F26C44A3F2 for ; Tue, 10 Nov 2020 12:59:29 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4394568BFF0; Tue, 10 Nov 2020 12:59:29 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8F9F768BFDD for ; Tue, 10 Nov 2020 12:59:19 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id 23so12169273wrc.8 for ; Tue, 10 Nov 2020 02:59:19 -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=ju/HRGhr/MexDgjk5sHDFJSfzT5XnIDprz3uwituP0U=; b=YqSjUTA3L7jxWkhoyl+80OVStKULfMNZgskpDp+gtP0HluNC7bpbZSfcsq7kD3YIhC 7rOm4fhOu+5Il8bqo2TY9armkMbEz/yFed8vIUjsmCSAt6gl78mJvjsYfWgtn9BvdSQh IJhhjqrMfmpNAzCrfG7GNUPUOy+ajDs+ah/8M4FRFHeO5VNt7uJWc3fgybP9LPqITw4u TkgAg9sMRpzqg6YnXwdquxJjsRqncpZklgXzlYCevaC4qIELcEilAfpUzx2kQrfCC5BY GS5h3PJvEzId7QmkYrUtlClFyhbf7wgZljFJx2itgGv77RZ6mOCBeptXI6ICG+5zuBMG X3cQ== 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=ju/HRGhr/MexDgjk5sHDFJSfzT5XnIDprz3uwituP0U=; b=Hmzhxsy+GN/vVj9eSJB3YA3k0S1D3FB2tGZDeJKk2GFnS7klrLWX7zkc5bo+6Naubn eJTKe0OOr3XBhA49WU174Bz5St7MZTzDQSVX1ufgBwU8N9kuMm65tnHUnkEeIWZVTa+3 E0qPvQL181TFAwmXOqnaplf+5dv2d6MtJ6jyTU3B/0RVhbcp0PftkijSuEudTJlUQopa r4oNSspd1XJEGFxVxPcrYbkb7lWjhFWOX6ed4H1hTrhvktEFoCVkWC8w1FYXAhm5p0DF CWL4S6BZxLyV5wUFkN+TAkWD49fuUSjZmfDNo039C311RVtQ6ehhcHA1sFQnBhwhJd2J T/Xw== X-Gm-Message-State: AOAM532hD/9cPjyqFUesn633c/tbtGsPprQyLkYq4L19x9+tsjCi76rB EGysmLWB2PzlaMWdZbAfLtE+8QDbTJs= X-Google-Smtp-Source: ABdhPJyn+/HgQy0ZaqYIinyX8Z64MLriAVdad62s7lXeh9QNx4FNbc94aJgioTt35PWRdO736RMmrg== X-Received: by 2002:a05:6000:109:: with SMTP id o9mr22318060wrx.240.1605005958908; Tue, 10 Nov 2020 02:59:18 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:18 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:18 +0100 Message-Id: <20201110105836.321916-5-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 096/114] avcodec/atrac9dec: Replace av_free() by av_freep() in close function 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac9dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index d2dbffe92a..585c68f33a 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -831,7 +831,7 @@ static av_cold int atrac9_decode_close(AVCodecContext *avctx) ATRAC9Context *s = avctx->priv_data; ff_mdct_end(&s->imdct); - av_free(s->fdsp); + av_freep(&s->fdsp); return 0; } From patchwork Tue Nov 10 10:58:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23522 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 7BEDA44A3F2 for ; Tue, 10 Nov 2020 12:59:31 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5455968C088; Tue, 10 Nov 2020 12:59:31 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9CD5B68BFDD for ; Tue, 10 Nov 2020 12:59:20 +0200 (EET) Received: by mail-wr1-f42.google.com with SMTP id b6so840652wrt.4 for ; Tue, 10 Nov 2020 02:59:20 -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=X03fJfdwsw7/GvaGfOxnDtKWXEC8jwSAjyQ9c7he7BE=; b=S3EnjtYpRPBcoGyEhM9j24cINKPVdeYLRmT0nhzj+JjtlGI0nVpVCQaOx+yx/xBl1+ vgDygI5NgwVnO2YKYNoyL2NIS/ju2fx2GMb2/xhOxlXvXGBST9QXX8ql940n88d7Bzdy 0KXKyWa6IgLIetnN7LEmqu/niOqaGe7iNmhdY3eU3NBz6IPE8q5Au7xdLPcE/HEtOEz1 8KiZHAvcslBxKZdfSvYX/R7RctoWwmByhoXN2YRBH/oLc3yMEKCiV5jCzfjEt4T2kW6Y E0SeRh0iCe2IRMfwN3hBpOAb1p5GRXWcnvQ+0sWybDCrCW0Yw/moNwgUbEREnPFyN4R8 B7Fw== 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=X03fJfdwsw7/GvaGfOxnDtKWXEC8jwSAjyQ9c7he7BE=; b=TPqHWoStatgTEbAjMQQJxp1ZkU9zhgtG+jUGO5uI/8xYXQs/07ntWyvYAftruZiKRz 6hClIjk/EMseHY3LtEfOZXNiVJS/trxEV/LTkMiDX8261M3r3piF0Zi4DSpCUpToJPm6 Tnd32M/bRpEglXVjfuHmulKHU4CTBpJT0BS4bKkHAUtnwtOTN6lShIicBrpwoF3vig3t Wz7aN4BQutza3HZL2bTB7oCPy7r5J/wd9ZnhgaGQmLjSsAfFxPskbpZRsh3A7XPWBCZX 1QPGtmyMTCkXclyVXnFnU/tn0Ua0HznSsazAHokgro3Gex39VcqKW0gjwjg44Kkm0iy3 COgw== X-Gm-Message-State: AOAM533+B30Mu884CAxIway2Y6LFMmkLXXN1fpTeBiET/tUA1wP8Loho E0pjGHEQThKmJopLbK9jPb8b7cTcp44= X-Google-Smtp-Source: ABdhPJwElqf5WP65g27zMwJGbxXFu6Xo//cTcWL0SnnJAtHqeq0X8y2Kfuxkn61Do4DO3aO+AZo0LQ== X-Received: by 2002:a5d:5308:: with SMTP id e8mr22863666wrv.299.1605005959910; Tue, 10 Nov 2020 02:59:19 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:19 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:19 +0100 Message-Id: <20201110105836.321916-6-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 097/114] avcodec/atrac9tab: Add missing static to internal table 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac9tab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/atrac9tab.h b/libavcodec/atrac9tab.h index 1882bf9f43..b169035aad 100644 --- a/libavcodec/atrac9tab.h +++ b/libavcodec/atrac9tab.h @@ -104,7 +104,7 @@ static const int at9_q_unit_to_coeff_idx[] = { 72, 80, 88, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256 }; -const uint8_t at9_q_unit_to_codebookidx[] = { +static const uint8_t at9_q_unit_to_codebookidx[] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, }; From patchwork Tue Nov 10 10:58:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23568 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 C582A44B238 for ; Tue, 10 Nov 2020 13:14:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8CE3468C0A4; Tue, 10 Nov 2020 12:59:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9128968BFDD for ; Tue, 10 Nov 2020 12:59:22 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id r17so8261722wrw.1 for ; Tue, 10 Nov 2020 02:59:22 -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=VKqVKGM14uips9MzlyTySkWpau5WzFLsGaXH8tSPOSc=; b=GoRDmR6W4loJdkicOZWNWQCuc9UyZQ49JL1FCC5iHMDtIYMjPmYWJFgKjOoo8ig/0V WiadPeuHET/ITITWNnmB36Z0DsAWE+UDpYTjPtfqRML3ImRt2WAmOSI2+Gm+xyuziCzy 3rWVkIeqDOczz935vKuoX4De+1mAmqRHFSpCdQVUBI+BUMGdOpyvshaLL70X9qCSZYBt 8SglEh3QxTdfqIa745TrG2x7CiVXKv3zu3cw2YaEh2OVwoPUT70JoXyNh8HyHDVc4nUr rECQ8naKWNdngmK8a9AOMHD4Zyh5rhDHCSqVFQFvB8P1biJstqHiLKeecq2X2UVMuUiW g4uA== 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=VKqVKGM14uips9MzlyTySkWpau5WzFLsGaXH8tSPOSc=; b=UK+rc/4Pk2eaIyUgA/3w4A34G4pGrcRM/24qS0FZNvGy57/gzkZN20ZbIZZT1NJQQM zh/3RzMjn+wUV7enMNVGX0bdpEfDdk16kRWJkd1SE92GPoOvUkJdAxGhdmKiowFpVTA8 ApdvLKnGlOcewlJfVBytHqKHPvoVOKAOBmhGxkoH2PUadpJWRdt0/kH5h4E+ma6DaSIu ATB9coTE69NCMSq2eOvbvWrET8dQKNPW5motINHAeyThXlQmtdh1CKc/mIPMNgrt61IK b2hlciA3YM67Mx0MwhadHao/F+2Kft2fCTuC+sahAy9/ev8haZmlJEch3Fwzkm2kNa7E XPwg== X-Gm-Message-State: AOAM5310a4LZ0Lxx+18yiNkXg159y+ojxV3jRRaPC3jMgddr7i8oXUcc C7qmD4NcBuOwJXf65SXXNQk+EXdCrzM= X-Google-Smtp-Source: ABdhPJzaKnnShfxLvhkIRQxXQTLITI5UAE9MwlnCRXXRrDEhtk+crimoEu7auYKYQcxuexhNTfCwig== X-Received: by 2002:adf:80c8:: with SMTP id 66mr23414505wrl.415.1605005961000; Tue, 10 Nov 2020 02:59:21 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:20 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:20 +0100 Message-Id: <20201110105836.321916-7-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 098/114] avcodec/vp3: Apply VLC offset during init 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" By switching to ff_init_vlc_from_lengths() one can apply both positive as well as negative offsets for free; in this case it even saves space because one replaces codes tables that don't fit into an uint8_t by symbols tables that fit into an uint8_t or can even be completely avoided as they are trivial. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp3.c | 30 ++-- libavcodec/vp3data.h | 24 +-- libavcodec/vp4data.h | 412 +++++++++++++++++++------------------------ 3 files changed, 209 insertions(+), 257 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index c4ad43a299..f3eed114d8 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -48,6 +48,9 @@ #include "vp3dsp.h" #include "xiph.h" +#define VP4_MV_VLC_BITS 6 +#define SUPERBLOCK_VLC_BITS 6 + #define FRAGMENT_PIXELS 8 // FIXME split things out into their own arrays @@ -489,7 +492,7 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb) bit ^= 1; current_run = get_vlc2(gb, s->superblock_run_length_vlc.table, - 6, 2) + 1; + SUPERBLOCK_VLC_BITS, 2); if (current_run == 34) current_run += get_bits(gb, 12); @@ -523,7 +526,7 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb) bit ^= 1; current_run = get_vlc2(gb, s->superblock_run_length_vlc.table, - 6, 2) + 1; + SUPERBLOCK_VLC_BITS, 2); if (current_run == 34) current_run += get_bits(gb, 12); @@ -885,7 +888,8 @@ static int unpack_modes(Vp3DecodeContext *s, GetBitContext *gb) static int vp4_get_mv(Vp3DecodeContext *s, GetBitContext *gb, int axis, int last_motion) { - int v = get_vlc2(gb, s->vp4_mv_vlc[axis][vp4_mv_table_selector[FFABS(last_motion)]].table, 6, 2) - 31; + int v = get_vlc2(gb, s->vp4_mv_vlc[axis][vp4_mv_table_selector[FFABS(last_motion)]].table, + VP4_MV_VLC_BITS, 2); return last_motion < 0 ? -v : v; } @@ -1104,7 +1108,8 @@ static int unpack_block_qpis(Vp3DecodeContext *s, GetBitContext *gb) else bit ^= 1; - run_length = get_vlc2(gb, s->superblock_run_length_vlc.table, 6, 2) + 1; + run_length = get_vlc2(gb, s->superblock_run_length_vlc.table, + SUPERBLOCK_VLC_BITS, 2); if (run_length == 34) run_length += get_bits(gb, 12); blocks_decoded += run_length; @@ -2452,9 +2457,10 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) } } - if ((ret = init_vlc(&s->superblock_run_length_vlc, 6, 34, - &superblock_run_length_vlc_table[0][1], 4, 2, - &superblock_run_length_vlc_table[0][0], 4, 2, 0)) < 0) + ret = ff_init_vlc_from_lengths(&s->superblock_run_length_vlc, SUPERBLOCK_VLC_BITS, 34, + superblock_run_length_vlc_lens, 1, + NULL, 0, 0, 1, 0); + if (ret < 0) return ret; if ((ret = init_vlc(&s->fragment_run_length_vlc, 5, 30, @@ -2474,11 +2480,13 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) #if CONFIG_VP4_DECODER for (j = 0; j < 2; j++) - for (i = 0; i < 7; i++) - if ((ret = init_vlc(&s->vp4_mv_vlc[j][i], 6, 63, - &vp4_mv_vlc[j][i][0][1], 4, 2, - &vp4_mv_vlc[j][i][0][0], 4, 2, 0)) < 0) + for (i = 0; i < 7; i++) { + ret = ff_init_vlc_from_lengths(&s->vp4_mv_vlc[j][i], VP4_MV_VLC_BITS, 63, + &vp4_mv_vlc[j][i][0][1], 2, + &vp4_mv_vlc[j][i][0][0], 2, 1, -31, 0); + if (ret < 0) return ret; + } /* version >= 2 */ for (i = 0; i < 2; i++) diff --git a/libavcodec/vp3data.h b/libavcodec/vp3data.h index a1366788c5..93bfbe1fe1 100644 --- a/libavcodec/vp3data.h +++ b/libavcodec/vp3data.h @@ -95,25 +95,11 @@ static const uint8_t vp31_filter_limit_values[64] = { 0, 0, 0, 0, 0, 0, 0, 0 }; -static const uint16_t superblock_run_length_vlc_table[34][2] = { - { 0, 1 }, - - { 4, 3 }, { 5, 3 }, - - { 0xC, 4 }, { 0xD, 4 }, - - { 0x38, 6 }, { 0x39, 6 }, { 0x3A, 6 }, { 0x3B, 6 }, - - { 0xF0, 8 }, { 0xF1, 8 }, { 0xF2, 8 }, { 0xF3, 8 }, - { 0xF4, 8 }, { 0xF5, 8 }, { 0xF6, 8 }, { 0xF7, 8 }, - - { 0x3E0, 10 }, { 0x3E1, 10 }, { 0x3E2, 10 }, { 0x3E3, 10 }, - { 0x3E4, 10 }, { 0x3E5, 10 }, { 0x3E6, 10 }, { 0x3E7, 10 }, - { 0x3E8, 10 }, { 0x3E9, 10 }, { 0x3EA, 10 }, { 0x3EB, 10 }, - { 0x3EC, 10 }, { 0x3ED, 10 }, { 0x3EE, 10 }, { 0x3EF, 10 }, - - { 0x3F, 6 } /* this last VLC is a special case for reading 12 more - * bits from stream and adding the value 34 */ +static const uint8_t superblock_run_length_vlc_lens[34] = { + 1, 3, 3, 4, 4, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 6, /* this last VLC is a special case for reading 12 more + * bits from stream and adding the value 34 */ }; static const uint16_t fragment_run_length_vlc_table[30][2] = { diff --git a/libavcodec/vp4data.h b/libavcodec/vp4data.h index f711d16240..13c7b7cd5e 100644 --- a/libavcodec/vp4data.h +++ b/libavcodec/vp4data.h @@ -109,262 +109,220 @@ static const uint8_t vp4_mv_table_selector[32] = { 6, 6, 6, 6, 6, 6, 6, 6, }; -static const uint16_t vp4_mv_vlc[2][7][63][2] = { +static const uint8_t vp4_mv_vlc[2][7][63][2] = { { /* x-axis tables */ { - { 0x6A, 7 }, { 0x11A, 9 }, { 0x18E, 9 }, { 0x237, 10 }, - { 0x4A, 8 }, { 0x236, 10 }, { 0x7A, 8 }, { 0xD6, 9 }, - { 0x7E, 8 }, { 0x1FD, 10 }, { 0x8C, 8 }, { 0xD7, 9 }, - { 0x87, 8 }, { 0x183, 9 }, { 0x3C, 7 }, { 0x61, 7 }, - { 0x47, 7 }, { 0x69, 8 }, { 0x40, 7 }, { 0x48, 8 }, - { 0x49, 7 }, { 0x86, 8 }, { 0x13, 6 }, { 0xD2, 8 }, - { 0x1C, 6 }, { 0x42, 7 }, { 0x25, 6 }, { 0x1B, 6 }, - { 0x13, 5 }, { 0x5, 4 }, { 0x0, 2 }, { 0x7, 3 }, - { 0x5, 3 }, { 0x1B, 5 }, { 0x19, 5 }, { 0x19, 6 }, - { 0x8, 5 }, { 0x45, 7 }, { 0x1D, 6 }, { 0xC6, 8 }, - { 0x68, 7 }, { 0x90, 8 }, { 0x41, 7 }, { 0x4B, 8 }, - { 0x31, 7 }, { 0x18F, 9 }, { 0x62, 7 }, { 0x3E, 7 }, - { 0x44, 7 }, { 0x68, 8 }, { 0x30, 7 }, { 0x182, 9 }, - { 0xC0, 8 }, { 0x1A7, 9 }, { 0x91, 8 }, { 0x92, 9 }, - { 0x7B, 8 }, { 0xFF, 9 }, { 0x1A6, 9 }, { 0x1FC, 10 }, - { 0x6A, 8 }, { 0x93, 9 }, { 0x6B, 7 } + { 30, 2 }, { 36, 5 }, { 19, 8 }, { 55, 9 }, { 61, 9 }, + { 4, 8 }, { 43, 8 }, { 22, 6 }, { 29, 4 }, { 50, 7 }, + { 44, 7 }, { 35, 6 }, { 49, 8 }, { 17, 8 }, { 60, 8 }, + { 7, 9 }, { 11, 9 }, { 27, 6 }, { 24, 6 }, { 38, 6 }, + { 14, 7 }, { 6, 8 }, { 56, 8 }, { 47, 7 }, { 8, 8 }, + { 59, 10 }, { 9, 10 }, { 57, 9 }, { 18, 7 }, { 42, 7 }, + { 25, 7 }, { 21, 8 }, { 12, 8 }, { 48, 7 }, { 37, 7 }, + { 10, 8 }, { 1, 9 }, { 5, 10 }, { 3, 10 }, { 16, 7 }, + { 41, 8 }, { 54, 8 }, { 20, 7 }, { 26, 6 }, { 28, 5 }, + { 32, 3 }, { 52, 8 }, { 51, 9 }, { 13, 9 }, { 15, 7 }, + { 46, 7 }, { 39, 8 }, { 2, 9 }, { 45, 9 }, { 34, 5 }, + { 40, 7 }, { 23, 8 }, { 58, 9 }, { 53, 9 }, { 0, 7 }, + { 62, 7 }, { 33, 5 }, { 31, 3 }, }, { - { 0x39, 7 }, { 0x259, 10 }, { 0x1B, 8 }, { 0x1D1, 10 }, - { 0x137, 9 }, { 0x1D0, 10 }, { 0x1A, 8 }, { 0x1B5, 10 }, - { 0x1D, 8 }, { 0x4BC, 11 }, { 0x6C, 8 }, { 0x38, 9 }, - { 0x71, 8 }, { 0x2D, 9 }, { 0x7D, 8 }, { 0x75, 8 }, - { 0x19, 7 }, { 0xE9, 9 }, { 0x37, 7 }, { 0x15, 8 }, - { 0x1E, 7 }, { 0xDB, 9 }, { 0x4C, 7 }, { 0x70, 8 }, - { 0xD, 6 }, { 0xC, 7 }, { 0x27, 6 }, { 0x4, 6 }, - { 0x2, 4 }, { 0x0, 4 }, { 0x5, 3 }, { 0x7, 3 }, - { 0x6, 3 }, { 0x2, 3 }, { 0x8, 4 }, { 0x24, 6 }, - { 0xC, 5 }, { 0x3B, 7 }, { 0x1E, 6 }, { 0x9A, 8 }, - { 0xE, 6 }, { 0x69, 8 }, { 0x4A, 7 }, { 0x12D, 9 }, - { 0x35, 7 }, { 0xF9, 9 }, { 0x18, 7 }, { 0x7F, 8 }, - { 0xF, 7 }, { 0xF8, 9 }, { 0x7E, 8 }, { 0x25F, 10 }, - { 0x68, 8 }, { 0x2C, 9 }, { 0x14, 8 }, { 0x258, 10 }, - { 0x136, 9 }, { 0x4BD, 11 }, { 0x12E, 9 }, { 0x1B4, 10 }, - { 0x17, 8 }, { 0x39, 9 }, { 0x1F, 7 } + { 29, 4 }, { 27, 6 }, { 54, 8 }, { 19, 8 }, { 53, 9 }, + { 13, 9 }, { 60, 8 }, { 25, 7 }, { 6, 8 }, { 2, 8 }, + { 11, 9 }, { 61, 9 }, { 8, 8 }, { 48, 7 }, { 28, 4 }, + { 46, 7 }, { 16, 7 }, { 24, 6 }, { 40, 6 }, { 20, 7 }, + { 62, 7 }, { 33, 3 }, { 36, 5 }, { 52, 8 }, { 41, 8 }, + { 44, 7 }, { 10, 8 }, { 59, 10 }, { 7, 10 }, { 21, 9 }, + { 18, 7 }, { 23, 8 }, { 12, 8 }, { 0, 7 }, { 5, 10 }, + { 3, 10 }, { 17, 9 }, { 15, 8 }, { 37, 7 }, { 38, 6 }, + { 49, 9 }, { 45, 9 }, { 14, 8 }, { 50, 8 }, { 47, 8 }, + { 34, 4 }, { 35, 6 }, { 42, 7 }, { 55, 10 }, { 1, 10 }, + { 43, 9 }, { 58, 9 }, { 9, 11 }, { 57, 11 }, { 51, 10 }, + { 22, 7 }, { 39, 8 }, { 56, 9 }, { 4, 9 }, { 26, 6 }, + { 30, 3 }, { 32, 3 }, { 31, 3 }, }, { - { 0x29, 7 }, { 0x3CB, 10 }, { 0x1F5, 9 }, { 0x263, 10 }, - { 0x1F4, 9 }, { 0x3DA, 10 }, { 0x50, 8 }, { 0x260, 10 }, - { 0x1EC, 9 }, { 0x3D3, 10 }, { 0x109, 9 }, { 0x3D2, 10 }, - { 0x51, 8 }, { 0x792, 11 }, { 0xF3, 8 }, { 0x9A, 8 }, - { 0xF7, 8 }, { 0x132, 9 }, { 0xC1, 8 }, { 0x1E8, 9 }, - { 0x2A, 7 }, { 0x85, 8 }, { 0x61, 7 }, { 0x1F7, 9 }, - { 0x78, 7 }, { 0xC7, 8 }, { 0x23, 6 }, { 0x7C, 7 }, - { 0x12, 5 }, { 0xB, 5 }, { 0xE, 4 }, { 0xD, 4 }, - { 0x0, 2 }, { 0x5, 3 }, { 0x3, 3 }, { 0x4, 4 }, - { 0x19, 5 }, { 0x20, 6 }, { 0x3F, 6 }, { 0x43, 7 }, - { 0x62, 7 }, { 0x9F, 8 }, { 0x4E, 7 }, { 0x181, 9 }, - { 0x2B, 7 }, { 0x137, 9 }, { 0xF5, 8 }, { 0x89, 8 }, - { 0xC6, 8 }, { 0x262, 10 }, { 0x88, 8 }, { 0x3C8, 10 }, - { 0x1F6, 9 }, { 0x3CA, 10 }, { 0x9E, 8 }, { 0x261, 10 }, - { 0x136, 9 }, { 0x108, 9 }, { 0x133, 9 }, { 0x793, 11 }, - { 0x180, 9 }, { 0x3DB, 10 }, { 0x45, 7 } + { 32, 2 }, { 35, 4 }, { 6, 8 }, { 12, 8 }, { 0, 7 }, + { 20, 7 }, { 44, 7 }, { 29, 5 }, { 34, 3 }, { 37, 6 }, + { 57, 9 }, { 10, 9 }, { 21, 8 }, { 39, 7 }, { 50, 8 }, + { 47, 8 }, { 62, 7 }, { 26, 6 }, { 28, 5 }, { 7, 10 }, + { 55, 10 }, { 49, 10 }, { 3, 10 }, { 17, 9 }, { 58, 9 }, + { 15, 8 }, { 56, 9 }, { 45, 9 }, { 42, 7 }, { 54, 8 }, + { 41, 8 }, { 33, 3 }, { 60, 9 }, { 43, 9 }, { 18, 8 }, + { 22, 7 }, { 40, 7 }, { 48, 8 }, { 25, 8 }, { 36, 5 }, + { 31, 4 }, { 30, 4 }, { 24, 7 }, { 51, 10 }, { 13, 11 }, + { 59, 11 }, { 53, 10 }, { 1, 10 }, { 14, 8 }, { 19, 9 }, + { 11, 10 }, { 9, 10 }, { 46, 8 }, { 8, 9 }, { 5, 10 }, + { 61, 10 }, { 16, 8 }, { 27, 7 }, { 4, 9 }, { 2, 9 }, + { 52, 9 }, { 23, 9 }, { 38, 6 }, }, { - { 0x1, 6 }, { 0x1C7, 9 }, { 0x67, 8 }, { 0xB5, 9 }, - { 0x66, 8 }, { 0x139, 9 }, { 0x99, 8 }, { 0xB4, 9 }, - { 0xC3, 8 }, { 0x130, 9 }, { 0x0, 7 }, { 0x131, 9 }, - { 0x9E, 8 }, { 0xB7, 9 }, { 0x2C, 7 }, { 0x1, 7 }, - { 0x28, 7 }, { 0x138, 9 }, { 0x4B, 7 }, { 0x31, 8 }, - { 0x60, 7 }, { 0x91, 8 }, { 0x3, 6 }, { 0x9D, 8 }, - { 0x17, 6 }, { 0x4D, 7 }, { 0x31, 6 }, { 0x70, 7 }, - { 0x7, 5 }, { 0x3A, 6 }, { 0x7, 4 }, { 0x2, 4 }, - { 0xB, 4 }, { 0x1, 4 }, { 0xF, 4 }, { 0x8, 4 }, - { 0xD, 4 }, { 0x4, 4 }, { 0xA, 4 }, { 0xD, 5 }, - { 0x19, 5 }, { 0x2, 6 }, { 0x3B, 6 }, { 0x4A, 7 }, - { 0x15, 6 }, { 0xC2, 8 }, { 0x18, 6 }, { 0x32, 7 }, - { 0x72, 7 }, { 0x1C6, 9 }, { 0x29, 7 }, { 0x1C5, 9 }, - { 0x49, 7 }, { 0x121, 9 }, { 0x1B, 7 }, { 0x30, 8 }, - { 0x1A, 7 }, { 0x1C4, 9 }, { 0x9F, 8 }, { 0xB6, 9 }, - { 0x19, 7 }, { 0x120, 9 }, { 0x73, 7 } + { 10, 7 }, { 15, 7 }, { 0, 6 }, { 41, 6 }, { 22, 6 }, + { 33, 4 }, { 31, 4 }, { 55, 8 }, { 19, 8 }, { 60, 7 }, + { 56, 7 }, { 54, 7 }, { 28, 5 }, { 37, 4 }, { 16, 7 }, + { 50, 7 }, { 44, 6 }, { 14, 7 }, { 7, 9 }, { 3, 9 }, + { 59, 9 }, { 13, 9 }, { 24, 6 }, { 46, 6 }, { 47, 7 }, + { 4, 8 }, { 2, 8 }, { 39, 5 }, { 30, 4 }, { 35, 4 }, + { 61, 9 }, { 53, 9 }, { 21, 8 }, { 52, 7 }, { 43, 7 }, + { 18, 7 }, { 9, 9 }, { 11, 9 }, { 6, 8 }, { 25, 7 }, + { 17, 9 }, { 5, 9 }, { 23, 8 }, { 12, 8 }, { 58, 8 }, + { 38, 4 }, { 32, 4 }, { 20, 7 }, { 45, 8 }, { 8, 8 }, + { 26, 6 }, { 40, 5 }, { 36, 4 }, { 27, 7 }, { 57, 9 }, + { 51, 9 }, { 49, 9 }, { 1, 9 }, { 48, 7 }, { 62, 7 }, + { 29, 6 }, { 42, 6 }, { 34, 4 }, }, { - { 0x23, 6 }, { 0x1C8, 9 }, { 0x43, 8 }, { 0x110, 9 }, - { 0xC, 7 }, { 0x153, 9 }, { 0x22, 7 }, { 0x111, 9 }, - { 0xF, 7 }, { 0x42, 8 }, { 0x23, 7 }, { 0x1C9, 9 }, - { 0x2A, 7 }, { 0x1B, 8 }, { 0x73, 7 }, { 0x45, 7 }, - { 0x6E, 7 }, { 0x89, 8 }, { 0x6C, 7 }, { 0x1A, 8 }, - { 0x6F, 7 }, { 0xB6, 8 }, { 0xB, 6 }, { 0xE5, 8 }, - { 0x25, 6 }, { 0x20, 7 }, { 0x29, 6 }, { 0x4D, 7 }, - { 0x2, 5 }, { 0x14, 6 }, { 0x1A, 5 }, { 0x17, 5 }, - { 0x1E, 5 }, { 0x27, 6 }, { 0x18, 5 }, { 0x28, 6 }, - { 0x1F, 5 }, { 0x0, 5 }, { 0x6, 4 }, { 0x10, 5 }, - { 0x7, 4 }, { 0xB, 5 }, { 0x3, 4 }, { 0x4, 5 }, - { 0x1D, 5 }, { 0x2C, 6 }, { 0x19, 5 }, { 0x2B, 6 }, - { 0x9, 5 }, { 0x55, 7 }, { 0x38, 6 }, { 0xE, 7 }, - { 0x24, 6 }, { 0xA8, 8 }, { 0xA, 6 }, { 0x99, 8 }, - { 0x5A, 7 }, { 0x98, 8 }, { 0x6D, 7 }, { 0x152, 9 }, - { 0x2B, 7 }, { 0xB7, 8 }, { 0x1, 5 } + { 37, 5 }, { 62, 5 }, { 28, 5 }, { 4, 7 }, { 19, 8 }, + { 13, 8 }, { 51, 7 }, { 8, 7 }, { 43, 5 }, { 54, 6 }, + { 22, 6 }, { 42, 4 }, { 25, 7 }, { 9, 8 }, { 2, 8 }, + { 6, 7 }, { 10, 7 }, { 48, 5 }, { 29, 6 }, { 12, 7 }, + { 60, 7 }, { 41, 5 }, { 38, 4 }, { 40, 4 }, { 39, 5 }, + { 3, 9 }, { 7, 9 }, { 17, 8 }, { 15, 7 }, { 0, 6 }, + { 52, 6 }, { 24, 6 }, { 57, 8 }, { 55, 8 }, { 27, 7 }, + { 33, 6 }, { 35, 6 }, { 26, 6 }, { 53, 8 }, { 59, 9 }, + { 5, 9 }, { 49, 7 }, { 47, 6 }, { 45, 6 }, { 56, 7 }, + { 21, 8 }, { 61, 8 }, { 31, 5 }, { 34, 5 }, { 46, 5 }, + { 30, 5 }, { 18, 7 }, { 58, 7 }, { 16, 7 }, { 20, 7 }, + { 50, 6 }, { 1, 9 }, { 11, 9 }, { 23, 8 }, { 14, 7 }, + { 44, 5 }, { 32, 5 }, { 36, 5 }, }, { - { 0x3D, 6 }, { 0xB1, 8 }, { 0xDD, 8 }, { 0x1F6, 9 }, - { 0xC5, 8 }, { 0x188, 9 }, { 0x37, 7 }, { 0x3F, 8 }, - { 0x1E, 7 }, { 0x189, 9 }, { 0xF, 7 }, { 0x3E, 8 }, - { 0x6A, 7 }, { 0x1F7, 9 }, { 0x61, 7 }, { 0x79, 7 }, - { 0x18, 6 }, { 0xB0, 8 }, { 0xE, 6 }, { 0xB3, 8 }, - { 0xC, 6 }, { 0xDF, 8 }, { 0x6, 6 }, { 0xDC, 8 }, - { 0x19, 6 }, { 0xDE, 8 }, { 0x27, 6 }, { 0xE, 7 }, - { 0x1A, 6 }, { 0x63, 7 }, { 0xF, 5 }, { 0xE, 5 }, - { 0x14, 5 }, { 0x7C, 7 }, { 0x36, 6 }, { 0x6B, 7 }, - { 0x3F, 6 }, { 0x60, 7 }, { 0x8, 5 }, { 0x74, 7 }, - { 0x9, 5 }, { 0x78, 7 }, { 0x12, 5 }, { 0xD, 6 }, - { 0x15, 5 }, { 0x2D, 6 }, { 0x2, 4 }, { 0x1C, 5 }, - { 0x5, 4 }, { 0x3B, 6 }, { 0x0, 4 }, { 0x34, 6 }, - { 0x19, 5 }, { 0x26, 6 }, { 0x10, 5 }, { 0x75, 7 }, - { 0x2, 5 }, { 0x36, 7 }, { 0x23, 6 }, { 0xB2, 8 }, - { 0x22, 6 }, { 0xFA, 8 }, { 0x17, 5 } + { 50, 4 }, { 56, 5 }, { 22, 6 }, { 27, 7 }, { 10, 7 }, + { 46, 4 }, { 20, 6 }, { 43, 6 }, { 18, 6 }, { 8, 7 }, + { 11, 8 }, { 7, 8 }, { 38, 5 }, { 40, 5 }, { 48, 4 }, + { 16, 6 }, { 24, 6 }, { 28, 6 }, { 57, 7 }, { 6, 7 }, + { 31, 5 }, { 30, 5 }, { 54, 5 }, { 60, 6 }, { 58, 6 }, + { 42, 5 }, { 53, 6 }, { 26, 6 }, { 32, 5 }, { 44, 5 }, + { 17, 8 }, { 1, 8 }, { 59, 8 }, { 19, 8 }, { 45, 6 }, + { 62, 5 }, { 37, 7 }, { 14, 7 }, { 5, 9 }, { 9, 9 }, + { 4, 8 }, { 29, 7 }, { 52, 5 }, { 51, 6 }, { 12, 7 }, + { 35, 7 }, { 34, 6 }, { 23, 8 }, { 2, 8 }, { 25, 8 }, + { 21, 8 }, { 47, 5 }, { 39, 7 }, { 55, 7 }, { 49, 6 }, + { 41, 7 }, { 15, 7 }, { 0, 6 }, { 33, 7 }, { 61, 8 }, + { 3, 9 }, { 13, 9 }, { 36, 6 }, }, { - { 0x15, 5 }, { 0xDD, 8 }, { 0x3E, 7 }, { 0x16E, 9 }, - { 0x4C, 7 }, { 0x12, 8 }, { 0x5D, 7 }, { 0xB6, 8 }, - { 0x6F, 7 }, { 0x1F1, 9 }, { 0x69, 7 }, { 0x1F0, 9 }, - { 0x1D, 7 }, { 0x16F, 9 }, { 0x2, 6 }, { 0x6B, 7 }, - { 0xC, 6 }, { 0xDC, 8 }, { 0x68, 7 }, { 0x9B, 8 }, - { 0x7D, 7 }, { 0x9A, 8 }, { 0xD, 6 }, { 0x13, 8 }, - { 0x8, 6 }, { 0xF9, 8 }, { 0x2C, 6 }, { 0x12, 7 }, - { 0x33, 6 }, { 0x4F, 7 }, { 0xD, 5 }, { 0x5, 5 }, - { 0x12, 5 }, { 0x3F, 7 }, { 0x32, 6 }, { 0x13, 7 }, - { 0x3B, 6 }, { 0x5, 6 }, { 0x2F, 6 }, { 0x5A, 7 }, - { 0x3F, 6 }, { 0x1C, 7 }, { 0x3A, 6 }, { 0x8, 7 }, - { 0x36, 6 }, { 0x5C, 7 }, { 0x10, 5 }, { 0x0, 5 }, - { 0xC, 5 }, { 0x4E, 7 }, { 0x3, 5 }, { 0x6A, 7 }, - { 0xE, 5 }, { 0x3, 6 }, { 0x14, 5 }, { 0x1E, 6 }, - { 0x1C, 5 }, { 0xF, 6 }, { 0x18, 5 }, { 0x23, 6 }, - { 0x1E, 5 }, { 0x22, 6 }, { 0x2, 3 } - } + { 47, 5 }, { 14, 6 }, { 53, 6 }, { 43, 7 }, { 5, 8 }, + { 23, 8 }, { 37, 6 }, { 50, 5 }, { 24, 6 }, { 27, 7 }, + { 35, 7 }, { 31, 5 }, { 16, 6 }, { 22, 6 }, { 41, 7 }, + { 12, 7 }, { 57, 6 }, { 62, 3 }, { 48, 5 }, { 30, 5 }, + { 52, 5 }, { 55, 6 }, { 2, 7 }, { 33, 7 }, { 46, 5 }, + { 61, 6 }, { 59, 6 }, { 32, 5 }, { 4, 7 }, { 21, 8 }, + { 19, 8 }, { 49, 7 }, { 29, 7 }, { 54, 5 }, { 0, 5 }, + { 26, 6 }, { 39, 7 }, { 7, 8 }, { 3, 9 }, { 13, 9 }, + { 45, 7 }, { 6, 7 }, { 38, 6 }, { 58, 5 }, { 34, 6 }, + { 28, 6 }, { 18, 7 }, { 10, 7 }, { 51, 7 }, { 15, 7 }, + { 44, 6 }, { 17, 8 }, { 1, 8 }, { 8, 7 }, { 56, 5 }, + { 42, 6 }, { 36, 6 }, { 60, 5 }, { 11, 9 }, { 9, 9 }, + { 25, 8 }, { 20, 7 }, { 40, 6 }, + }, }, { /* y-axis tables */ { - { 0x52, 7 }, { 0x14C, 9 }, { 0x1FA, 9 }, { 0x124, 9 }, - { 0x82, 8 }, { 0x29E, 10 }, { 0x8E, 8 }, { 0x24B, 10 }, - { 0x9C, 8 }, { 0x3F7, 10 }, { 0x86, 8 }, { 0x114, 9 }, - { 0x83, 8 }, { 0x3A5, 10 }, { 0xFA, 8 }, { 0x4F, 7 }, - { 0xFB, 8 }, { 0x13B, 9 }, { 0xFC, 8 }, { 0x172, 9 }, - { 0x44, 7 }, { 0x173, 9 }, { 0x51, 7 }, { 0x87, 8 }, - { 0x5F, 7 }, { 0xBA, 8 }, { 0x26, 6 }, { 0x5E, 7 }, - { 0x16, 5 }, { 0x15, 5 }, { 0x6, 3 }, { 0x1, 2 }, - { 0x0, 2 }, { 0x1C, 5 }, { 0x1E, 5 }, { 0x75, 7 }, - { 0x3B, 6 }, { 0xFF, 8 }, { 0x25, 6 }, { 0xBB, 8 }, - { 0x7C, 7 }, { 0x8B, 8 }, { 0x48, 7 }, { 0x171, 9 }, - { 0x42, 7 }, { 0x14E, 9 }, { 0x46, 7 }, { 0xFE, 8 }, - { 0x40, 7 }, { 0x13A, 9 }, { 0x93, 8 }, { 0x115, 9 }, - { 0x8F, 8 }, { 0x3F6, 10 }, { 0x170, 9 }, { 0x29F, 10 }, - { 0x1D1, 9 }, { 0x24A, 10 }, { 0x1D3, 9 }, { 0x3A4, 10 }, - { 0x1D0, 9 }, { 0x14D, 9 }, { 0x50, 7 } + { 32, 2 }, { 31, 2 }, { 48, 7 }, { 4, 8 }, { 12, 8 }, + { 44, 7 }, { 10, 8 }, { 23, 8 }, { 20, 7 }, { 11, 9 }, + { 51, 9 }, { 41, 8 }, { 46, 7 }, { 6, 8 }, { 52, 8 }, + { 42, 7 }, { 3, 9 }, { 57, 10 }, { 7, 10 }, { 50, 8 }, + { 38, 6 }, { 26, 6 }, { 8, 8 }, { 49, 9 }, { 17, 9 }, + { 15, 7 }, { 62, 7 }, { 22, 7 }, { 0, 7 }, { 1, 9 }, + { 61, 9 }, { 45, 9 }, { 5, 10 }, { 55, 10 }, { 29, 5 }, + { 28, 5 }, { 54, 9 }, { 43, 9 }, { 19, 9 }, { 21, 9 }, + { 25, 8 }, { 39, 8 }, { 27, 7 }, { 24, 7 }, { 30, 3 }, + { 33, 5 }, { 60, 9 }, { 56, 9 }, { 59, 10 }, { 13, 10 }, + { 58, 9 }, { 35, 7 }, { 36, 6 }, { 34, 5 }, { 40, 7 }, + { 14, 8 }, { 16, 8 }, { 18, 8 }, { 2, 9 }, { 53, 10 }, + { 9, 10 }, { 47, 8 }, { 37, 8 }, }, { - { 0xDE, 8 }, { 0x223, 10 }, { 0x136, 9 }, { 0x7C5, 11 }, - { 0x12F, 9 }, { 0x4A1, 11 }, { 0x3D7, 10 }, { 0x7AC, 11 }, - { 0x133, 9 }, { 0x7C4, 11 }, { 0x1B8, 9 }, { 0x222, 10 }, - { 0x96, 8 }, { 0x251, 10 }, { 0x95, 8 }, { 0x1F0, 9 }, - { 0xDA, 8 }, { 0x110, 9 }, { 0x9A, 8 }, { 0x360, 10 }, - { 0xDD, 8 }, { 0x12E, 9 }, { 0x48, 7 }, { 0x92, 8 }, - { 0x78, 7 }, { 0x98, 8 }, { 0x27, 6 }, { 0x45, 7 }, - { 0x1A, 5 }, { 0x10, 5 }, { 0x5, 3 }, { 0x0, 2 }, - { 0x1, 2 }, { 0xE, 4 }, { 0xC, 4 }, { 0x23, 6 }, - { 0x3F, 6 }, { 0xF4, 8 }, { 0x7D, 7 }, { 0x89, 8 }, - { 0x7B, 7 }, { 0x1BE, 9 }, { 0xF9, 8 }, { 0x3E3, 10 }, - { 0xF3, 8 }, { 0x127, 9 }, { 0xDB, 8 }, { 0x1EA, 9 }, - { 0xD9, 8 }, { 0x6E7, 11 }, { 0x1BF, 9 }, { 0x4A0, 11 }, - { 0x1B1, 9 }, { 0x6E6, 11 }, { 0x137, 9 }, { 0x7AD, 11 }, - { 0x126, 9 }, { 0x6C2, 11 }, { 0x132, 9 }, { 0x6C3, 11 }, - { 0x129, 9 }, { 0x372, 10 }, { 0xF2, 8 } + { 31, 2 }, { 32, 2 }, { 29, 5 }, { 17, 9 }, { 11, 10 }, + { 1, 10 }, { 39, 8 }, { 27, 7 }, { 35, 6 }, { 22, 7 }, + { 23, 8 }, { 56, 9 }, { 45, 9 }, { 51, 11 }, { 5, 11 }, + { 13, 10 }, { 60, 9 }, { 14, 8 }, { 12, 8 }, { 21, 9 }, + { 4, 9 }, { 25, 8 }, { 58, 9 }, { 8, 9 }, { 18, 8 }, + { 2, 9 }, { 54, 9 }, { 26, 6 }, { 30, 3 }, { 34, 4 }, + { 28, 5 }, { 19, 10 }, { 57, 11 }, { 59, 11 }, { 52, 9 }, + { 48, 8 }, { 16, 8 }, { 46, 8 }, { 10, 9 }, { 61, 10 }, + { 53, 11 }, { 49, 11 }, { 20, 8 }, { 0, 8 }, { 41, 9 }, + { 50, 9 }, { 33, 4 }, { 24, 7 }, { 62, 8 }, { 44, 8 }, + { 37, 8 }, { 47, 9 }, { 7, 11 }, { 55, 11 }, { 6, 10 }, + { 40, 7 }, { 15, 9 }, { 9, 11 }, { 3, 11 }, { 43, 10 }, + { 42, 8 }, { 38, 7 }, { 36, 6 }, }, { - { 0x16, 7 }, { 0x9C, 9 }, { 0x13C, 9 }, { 0x9E, 10 }, - { 0x12B, 9 }, { 0xBA, 10 }, { 0x181, 9 }, { 0x317, 10 }, - { 0x84, 8 }, { 0x4E, 9 }, { 0x26, 8 }, { 0x316, 10 }, - { 0x180, 9 }, { 0x5C, 9 }, { 0xC1, 8 }, { 0x2F, 8 }, - { 0x10, 7 }, { 0x45, 9 }, { 0x12, 7 }, { 0x189, 9 }, - { 0x24, 7 }, { 0x13D, 9 }, { 0x66, 7 }, { 0x23, 8 }, - { 0x67, 7 }, { 0xC6, 8 }, { 0x24, 6 }, { 0x4B, 7 }, - { 0x11, 5 }, { 0x32, 6 }, { 0xD, 4 }, { 0x0, 3 }, - { 0x7, 3 }, { 0x5, 3 }, { 0x3, 3 }, { 0x3, 4 }, - { 0x5, 4 }, { 0x20, 6 }, { 0x8, 5 }, { 0x25, 7 }, - { 0x26, 6 }, { 0x4F, 8 }, { 0x61, 7 }, { 0x2B, 8 }, - { 0x4E, 7 }, { 0x18A, 9 }, { 0x43, 7 }, { 0x9F, 8 }, - { 0x14, 7 }, { 0x254, 10 }, { 0x94, 8 }, { 0x310, 10 }, - { 0x85, 8 }, { 0x311, 10 }, { 0x2A, 8 }, { 0xBB, 10 }, - { 0x18F, 9 }, { 0x255, 10 }, { 0x9D, 9 }, { 0x9F, 10 }, - { 0x18E, 9 }, { 0x44, 9 }, { 0x26, 7 } + { 31, 3 }, { 16, 7 }, { 61, 9 }, { 17, 9 }, { 23, 8 }, + { 18, 7 }, { 10, 8 }, { 9, 9 }, { 3, 10 }, { 59, 10 }, + { 48, 7 }, { 54, 8 }, { 43, 8 }, { 0, 7 }, { 13, 9 }, + { 5, 10 }, { 55, 10 }, { 15, 8 }, { 35, 4 }, { 38, 5 }, + { 20, 7 }, { 39, 7 }, { 62, 7 }, { 1, 9 }, { 58, 9 }, + { 41, 8 }, { 36, 4 }, { 34, 3 }, { 37, 6 }, { 8, 8 }, + { 52, 8 }, { 46, 7 }, { 28, 5 }, { 26, 6 }, { 50, 8 }, + { 49, 10 }, { 57, 10 }, { 4, 9 }, { 27, 7 }, { 40, 6 }, + { 44, 7 }, { 2, 9 }, { 21, 9 }, { 47, 8 }, { 33, 3 }, + { 12, 9 }, { 6, 9 }, { 14, 8 }, { 42, 7 }, { 51, 10 }, + { 53, 10 }, { 19, 9 }, { 45, 9 }, { 11, 10 }, { 7, 10 }, + { 25, 8 }, { 60, 9 }, { 56, 9 }, { 29, 6 }, { 22, 7 }, + { 24, 7 }, { 30, 4 }, { 32, 3 }, }, { - { 0x61, 7 }, { 0x12A, 9 }, { 0xD, 8 }, { 0x3BD, 10 }, - { 0x89, 8 }, { 0x109, 9 }, { 0x18E, 9 }, { 0x210, 10 }, - { 0x1D3, 9 }, { 0x211, 10 }, { 0x88, 8 }, { 0x19, 9 }, - { 0x85, 8 }, { 0x18, 9 }, { 0xE8, 8 }, { 0xCE, 8 }, - { 0x40, 7 }, { 0x119, 9 }, { 0x45, 7 }, { 0x1D2, 9 }, - { 0x4B, 7 }, { 0x1DD, 9 }, { 0x62, 7 }, { 0x94, 8 }, - { 0x75, 7 }, { 0xC, 7 }, { 0x27, 6 }, { 0xD, 7 }, - { 0x2, 5 }, { 0x26, 6 }, { 0x6, 4 }, { 0x1E, 5 }, - { 0xD, 4 }, { 0x1F, 5 }, { 0x1, 3 }, { 0xA, 4 }, - { 0x2, 3 }, { 0x7, 4 }, { 0xB, 4 }, { 0x0, 5 }, - { 0x1C, 5 }, { 0x76, 7 }, { 0x32, 6 }, { 0x7, 7 }, - { 0x24, 6 }, { 0xC0, 8 }, { 0x7, 6 }, { 0x41, 7 }, - { 0x2, 6 }, { 0x18F, 9 }, { 0x47, 7 }, { 0x1DC, 9 }, - { 0x43, 7 }, { 0x12B, 9 }, { 0xCF, 8 }, { 0x118, 9 }, - { 0xC6, 8 }, { 0x3BC, 10 }, { 0x8D, 8 }, { 0x3BF, 10 }, - { 0xC1, 8 }, { 0x3BE, 10 }, { 0x66, 7 } + { 39, 5 }, { 48, 6 }, { 13, 9 }, { 11, 9 }, { 2, 8 }, + { 43, 7 }, { 28, 5 }, { 25, 7 }, { 27, 7 }, { 46, 6 }, + { 34, 3 }, { 36, 3 }, { 30, 4 }, { 37, 4 }, { 16, 7 }, + { 47, 7 }, { 7, 10 }, { 9, 10 }, { 5, 9 }, { 12, 8 }, + { 52, 7 }, { 10, 8 }, { 4, 8 }, { 18, 7 }, { 55, 9 }, + { 17, 9 }, { 58, 8 }, { 50, 7 }, { 44, 6 }, { 23, 8 }, + { 1, 9 }, { 53, 9 }, { 20, 7 }, { 29, 6 }, { 26, 6 }, + { 35, 4 }, { 38, 4 }, { 45, 8 }, { 60, 8 }, { 0, 7 }, + { 22, 7 }, { 56, 8 }, { 6, 9 }, { 49, 9 }, { 42, 6 }, + { 62, 7 }, { 15, 8 }, { 54, 8 }, { 32, 4 }, { 40, 5 }, + { 14, 8 }, { 19, 9 }, { 8, 9 }, { 24, 7 }, { 41, 7 }, + { 51, 9 }, { 21, 9 }, { 57, 10 }, { 3, 10 }, { 61, 10 }, + { 59, 10 }, { 31, 5 }, { 33, 5 }, }, { - { 0x7, 6 }, { 0x14D, 9 }, { 0xA0, 8 }, { 0x9E, 9 }, - { 0xCF, 8 }, { 0x39C, 10 }, { 0xA1, 8 }, { 0x39D, 10 }, - { 0xAB, 8 }, { 0x1C5, 9 }, { 0x26, 7 }, { 0x14C, 9 }, - { 0x25, 7 }, { 0x19C, 9 }, { 0x3F, 7 }, { 0xE1, 8 }, - { 0x66, 7 }, { 0x1CF, 9 }, { 0x3E, 7 }, { 0x1C4, 9 }, - { 0x72, 7 }, { 0x4E, 8 }, { 0x6, 6 }, { 0xAA, 8 }, - { 0x1C, 6 }, { 0xE6, 8 }, { 0x32, 6 }, { 0x51, 7 }, - { 0x3B, 6 }, { 0x5, 6 }, { 0x1F, 5 }, { 0x18, 5 }, - { 0x2, 4 }, { 0x3A, 6 }, { 0x0, 4 }, { 0x36, 6 }, - { 0x5, 4 }, { 0x8, 5 }, { 0x8, 4 }, { 0x16, 5 }, - { 0x9, 4 }, { 0xD, 5 }, { 0x3, 4 }, { 0x2F, 6 }, - { 0x1E, 5 }, { 0x2E, 6 }, { 0x1A, 5 }, { 0x2B, 6 }, - { 0xC, 5 }, { 0x24, 7 }, { 0x1E, 6 }, { 0xE0, 8 }, - { 0x4, 6 }, { 0xA7, 8 }, { 0x54, 7 }, { 0x1C7, 9 }, - { 0x52, 7 }, { 0x19D, 9 }, { 0x3A, 7 }, { 0x9F, 9 }, - { 0x3B, 7 }, { 0x1C6, 9 }, { 0x37, 6 } + { 34, 4 }, { 52, 6 }, { 29, 6 }, { 22, 6 }, { 0, 6 }, + { 32, 4 }, { 42, 4 }, { 37, 5 }, { 49, 7 }, { 12, 7 }, + { 10, 7 }, { 21, 8 }, { 3, 9 }, { 59, 9 }, { 36, 4 }, + { 48, 5 }, { 41, 5 }, { 24, 6 }, { 58, 7 }, { 60, 7 }, + { 50, 6 }, { 18, 7 }, { 14, 7 }, { 38, 4 }, { 40, 4 }, + { 2, 8 }, { 6, 8 }, { 27, 7 }, { 56, 7 }, { 11, 9 }, + { 1, 9 }, { 53, 8 }, { 54, 7 }, { 23, 8 }, { 8, 8 }, + { 47, 6 }, { 39, 5 }, { 45, 6 }, { 43, 6 }, { 31, 5 }, + { 26, 6 }, { 16, 7 }, { 13, 9 }, { 57, 9 }, { 4, 8 }, + { 46, 5 }, { 35, 6 }, { 62, 6 }, { 51, 8 }, { 15, 8 }, + { 19, 9 }, { 9, 9 }, { 61, 9 }, { 55, 9 }, { 20, 7 }, + { 25, 8 }, { 5, 10 }, { 7, 10 }, { 17, 9 }, { 33, 6 }, + { 28, 6 }, { 44, 5 }, { 30, 5 }, }, { - { 0x2A, 6 }, { 0x39, 8 }, { 0x25, 7 }, { 0x115, 9 }, - { 0x24, 7 }, { 0x1FA, 9 }, { 0x2F, 7 }, { 0x114, 9 }, - { 0x75, 7 }, { 0x38, 8 }, { 0xFC, 8 }, { 0x36, 8 }, - { 0x1E, 7 }, { 0x1FB, 9 }, { 0x7F, 7 }, { 0x68, 7 }, - { 0x16, 6 }, { 0x37, 8 }, { 0x1F, 7 }, { 0x5C, 8 }, - { 0x13, 6 }, { 0x8B, 8 }, { 0x1, 6 }, { 0xFB, 8 }, - { 0x21, 6 }, { 0x44, 7 }, { 0x2B, 6 }, { 0x6B, 7 }, - { 0x3B, 6 }, { 0xC, 6 }, { 0x1C, 5 }, { 0x19, 5 }, - { 0x1, 4 }, { 0x20, 6 }, { 0x16, 5 }, { 0x7C, 7 }, - { 0xC, 5 }, { 0x74, 7 }, { 0xA, 5 }, { 0x1C, 6 }, - { 0x12, 5 }, { 0x69, 7 }, { 0xF, 5 }, { 0x6A, 7 }, - { 0x14, 5 }, { 0x11, 6 }, { 0x1E, 5 }, { 0x17, 5 }, - { 0x2, 4 }, { 0x31, 6 }, { 0x1B, 5 }, { 0x30, 6 }, - { 0xD, 5 }, { 0x0, 6 }, { 0x1, 5 }, { 0x1D, 7 }, - { 0x23, 6 }, { 0x1A, 7 }, { 0x1D, 6 }, { 0x5D, 8 }, - { 0x10, 6 }, { 0xFA, 8 }, { 0x13, 5 } + { 53, 6 }, { 22, 6 }, { 54, 5 }, { 32, 4 }, { 48, 4 }, + { 29, 6 }, { 57, 7 }, { 11, 8 }, { 17, 8 }, { 9, 8 }, + { 1, 8 }, { 55, 7 }, { 12, 7 }, { 18, 7 }, { 60, 6 }, + { 45, 6 }, { 4, 7 }, { 2, 7 }, { 20, 6 }, { 38, 5 }, + { 16, 6 }, { 19, 8 }, { 59, 8 }, { 6, 7 }, { 36, 5 }, + { 52, 5 }, { 39, 6 }, { 58, 6 }, { 42, 5 }, { 33, 6 }, + { 24, 6 }, { 25, 7 }, { 7, 9 }, { 3, 9 }, { 21, 8 }, + { 56, 6 }, { 40, 5 }, { 62, 5 }, { 44, 5 }, { 0, 6 }, + { 26, 6 }, { 34, 5 }, { 47, 5 }, { 51, 6 }, { 49, 6 }, + { 31, 5 }, { 15, 7 }, { 41, 7 }, { 43, 7 }, { 27, 7 }, + { 50, 5 }, { 30, 5 }, { 37, 7 }, { 8, 7 }, { 28, 6 }, + { 46, 5 }, { 35, 7 }, { 61, 8 }, { 23, 8 }, { 10, 8 }, + { 5, 9 }, { 13, 9 }, { 14, 7 }, }, { - { 0x12, 5 }, { 0x26, 7 }, { 0x41, 7 }, { 0x22, 8 }, - { 0x1A, 7 }, { 0xA9, 8 }, { 0x4C, 7 }, { 0x1B2, 9 }, - { 0x5C, 7 }, { 0xA8, 8 }, { 0x58, 7 }, { 0x1B3, 9 }, - { 0x40, 7 }, { 0x79, 8 }, { 0xC, 6 }, { 0x55, 7 }, - { 0x1F, 6 }, { 0xD8, 8 }, { 0x76, 7 }, { 0x23, 8 }, - { 0x5F, 7 }, { 0x78, 8 }, { 0xB, 6 }, { 0x1B, 7 }, - { 0x2D, 6 }, { 0x10, 7 }, { 0x37, 6 }, { 0x6D, 7 }, - { 0x32, 6 }, { 0xA, 6 }, { 0x1A, 5 }, { 0x1E, 5 }, - { 0x1F, 5 }, { 0x2B, 6 }, { 0xD, 5 }, { 0x77, 7 }, - { 0x31, 6 }, { 0x5D, 7 }, { 0x38, 6 }, { 0x27, 7 }, - { 0xC, 5 }, { 0xE9, 8 }, { 0x33, 6 }, { 0x5E, 7 }, - { 0x30, 6 }, { 0x4D, 7 }, { 0xA, 5 }, { 0x21, 6 }, - { 0x7, 5 }, { 0x3D, 7 }, { 0x39, 6 }, { 0xE8, 8 }, - { 0xB, 5 }, { 0x59, 7 }, { 0x14, 5 }, { 0x27, 6 }, - { 0x11, 5 }, { 0x75, 7 }, { 0xE, 5 }, { 0x9, 6 }, - { 0x8, 5 }, { 0x12, 6 }, { 0x0, 3 } - } + { 62, 3 }, { 25, 7 }, { 3, 8 }, { 19, 8 }, { 59, 6 }, + { 29, 6 }, { 22, 6 }, { 14, 6 }, { 4, 7 }, { 23, 7 }, + { 48, 5 }, { 60, 5 }, { 61, 6 }, { 1, 7 }, { 39, 7 }, + { 46, 5 }, { 52, 5 }, { 40, 5 }, { 34, 5 }, { 58, 5 }, + { 21, 8 }, { 13, 8 }, { 49, 7 }, { 16, 6 }, { 12, 7 }, + { 2, 7 }, { 47, 6 }, { 56, 5 }, { 0, 5 }, { 6, 7 }, + { 45, 7 }, { 55, 6 }, { 54, 5 }, { 9, 8 }, { 5, 8 }, + { 15, 7 }, { 33, 6 }, { 10, 7 }, { 53, 7 }, { 24, 6 }, + { 8, 7 }, { 37, 7 }, { 43, 7 }, { 20, 7 }, { 44, 6 }, + { 36, 6 }, { 28, 6 }, { 42, 6 }, { 30, 5 }, { 17, 8 }, + { 7, 9 }, { 11, 9 }, { 27, 7 }, { 26, 6 }, { 38, 6 }, + { 50, 6 }, { 51, 8 }, { 41, 8 }, { 57, 7 }, { 18, 7 }, + { 35, 7 }, { 31, 5 }, { 32, 5 }, + }, } }; From patchwork Tue Nov 10 10:58:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23567 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 A1DD144B238 for ; Tue, 10 Nov 2020 13:14:04 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 80EA768BFF4; Tue, 10 Nov 2020 12:59:33 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D552968BFD6 for ; Tue, 10 Nov 2020 12:59:25 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id 33so12166327wrl.7 for ; Tue, 10 Nov 2020 02:59:25 -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=9qjG0qq1oMERvD6kNOulvZlk4OPRIRFsrwlayHZGIC8=; b=r1wCsRnV55bL/7dJ1Z67vPP2JuwI1t4OwC3/9mcrBsCY7UnA+tFM11COcMq/1S7jmV UvoLDyMakrBdcE4BWlpppeEPwtfrtprHp5ew0jVydxC4T9f3Ih1PCGp9GJJpUJ14Soi0 hgRgir+ZArCfa4G1RSt24FIsrfC4RcTTjZCOwV3t7WM43zdRI0ggiYvQQYap1nkYrou6 bq4Ij/ZsQGijHhYBCQ4ILUEKC319p2twNOTiqjPbxqvpxvacqBe/xyRxh73vXRz4cwvd xVg7grOlah2KJVqcWe/CG52dSwusjniRrJ4rUTeRohu/YtPQm1GJl4NpzvLY4ATcMfAt dsng== 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=9qjG0qq1oMERvD6kNOulvZlk4OPRIRFsrwlayHZGIC8=; b=Cw+aJH2qhmf7bx7EDh0S1pOwxEHPatQuGC/y0GusA92l9qjOy9jQW/2Bet5auWhAMQ THIi3kJGa3uwF/inEToikC6ikfiHwWCkh4HVkE9EFwiPKT5q7scg+dt/cjWJnJRB777r HxrnU+1hIMJ/HG4RhikRRjf7OSSozhV795h+PedXXOflISnZdET4a/QBAE2CKop4u4j+ 3AytNzDKpK7CTVAxB30WydhRx7GmAeEO8L5g3u2ALLdv14tSthQqJyG6JtJf1tBHX04U 3aUlmH51qtO25novi8vSif04Ol8zs9W4EkiBweH1msPpWEZ0zzfTv1MWZRHx/4H12spk rSBg== X-Gm-Message-State: AOAM530NYZxS6HG6NKkP8vbwXyodq5dPzMYqf2qPZ9SZPqvkad/+joq/ OqcWcYpJnaeNE3aSypqiDrssSszEdGo= X-Google-Smtp-Source: ABdhPJw1M0oB9+MpTWtk5UlDSNEYHax3ZXfNTX+Gx7ITrsejCEpHMrkyz/168Drz09uPkR7nRtANEA== X-Received: by 2002:adf:b7c8:: with SMTP id t8mr24159564wre.143.1605005962409; Tue, 10 Nov 2020 02:59:22 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:21 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:21 +0100 Message-Id: <20201110105836.321916-8-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 099/114] avcodec/vp3: Make tables used to initialize VLCs smaller 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" This is possible by switching to ff_init_vlc_from_lengths() because it allows to replace codes of type uint16_t by symbols of type uint8_t; in some cases (like here) it also allows to replace explicitly coded codes by implicitly coded symbols. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp3.c | 28 +- libavcodec/vp3data.h | 3077 +++++++----------------------------------- libavcodec/vp4data.h | 1124 +++++++-------- 3 files changed, 985 insertions(+), 3244 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index f3eed114d8..7037d03a98 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2434,17 +2434,19 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) /* init VLC tables */ if (s->version < 2) { for (i = 0; i < FF_ARRAY_ELEMS(s->coeff_vlc); i++) { - if ((ret = init_vlc(&s->coeff_vlc[i], 11, 32, - &vp3_bias[i][0][1], 4, 2, - &vp3_bias[i][0][0], 4, 2, 0)) < 0) + ret = ff_init_vlc_from_lengths(&s->coeff_vlc[i], 11, 32, + &vp3_bias[i][0][1], 2, + &vp3_bias[i][0][0], 2, 1, 0, 0); + if (ret < 0) return ret; } #if CONFIG_VP4_DECODER } else { /* version >= 2 */ for (i = 0; i < FF_ARRAY_ELEMS(s->coeff_vlc); i++) { - if ((ret = init_vlc(&s->coeff_vlc[i], 11, 32, - &vp4_bias[i][0][1], 4, 2, - &vp4_bias[i][0][0], 4, 2, 0)) < 0) + ret = ff_init_vlc_from_lengths(&s->coeff_vlc[i], 11, 32, + &vp4_bias[i][0][1], 2, + &vp4_bias[i][0][0], 2, 1, 0, 0); + if (ret < 0) return ret; } #endif @@ -2463,14 +2465,16 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) if (ret < 0) return ret; - if ((ret = init_vlc(&s->fragment_run_length_vlc, 5, 30, - &fragment_run_length_vlc_table[0][1], 4, 2, - &fragment_run_length_vlc_table[0][0], 4, 2, 0)) < 0) + ret = ff_init_vlc_from_lengths(&s->fragment_run_length_vlc, 5, 30, + fragment_run_length_vlc_len, 1, + NULL, 0, 0, 0, 0); + if (ret < 0) return ret; - if ((ret = init_vlc(&s->mode_code_vlc, 3, 8, - &mode_code_vlc_table[0][1], 2, 1, - &mode_code_vlc_table[0][0], 2, 1, 0)) < 0) + ret = ff_init_vlc_from_lengths(&s->mode_code_vlc, 3, 8, + mode_code_vlc_len, 1, + NULL, 0, 0, 0, 0); + if (ret < 0) return ret; if ((ret = init_vlc(&s->motion_vector_vlc, 6, 63, diff --git a/libavcodec/vp3data.h b/libavcodec/vp3data.h index 93bfbe1fe1..eb516a0add 100644 --- a/libavcodec/vp3data.h +++ b/libavcodec/vp3data.h @@ -102,36 +102,13 @@ static const uint8_t superblock_run_length_vlc_lens[34] = { * bits from stream and adding the value 34 */ }; -static const uint16_t fragment_run_length_vlc_table[30][2] = { - /* 1 -> 2 */ - { 0x0, 2 }, { 0x1, 2 }, - - /* 3 -> 4 */ - { 0x4, 3 }, { 0x5, 3 }, - - /* 5 -> 6 */ - { 0xC, 4 }, { 0xD, 4 }, - - /* 7 -> 10 */ - { 0x38, 6 }, { 0x39, 6 }, - { 0x3A, 6 }, { 0x3B, 6 }, - - /* 11 -> 14 */ - { 0x78, 7 }, { 0x79, 7 }, - { 0x7A, 7 }, { 0x7B, 7 }, - - /* 15 -> 30 */ - { 0x1F0, 9 }, { 0x1F1, 9 }, { 0x1F2, 9 }, { 0x1F3, 9 }, - { 0x1F4, 9 }, { 0x1F5, 9 }, { 0x1F6, 9 }, { 0x1F7, 9 }, - { 0x1F8, 9 }, { 0x1F9, 9 }, { 0x1FA, 9 }, { 0x1FB, 9 }, - { 0x1FC, 9 }, { 0x1FD, 9 }, { 0x1FE, 9 }, { 0x1FF, 9 } +static const uint8_t fragment_run_length_vlc_len[30] = { + 2, 2, 3, 3, 4, 4, 6, 6, 6, 6, 7, 7, 7, 7, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, }; -static const uint8_t mode_code_vlc_table[8][2] = { - { 0, 1 }, { 2, 2 }, - { 6, 3 }, { 14, 4 }, - { 30, 5 }, { 62, 6 }, - { 126, 7 }, { 127, 7 } +static const uint8_t mode_code_vlc_len[8] = { + 1, 2, 3, 4, 5, 6, 7, 7, }; static const uint8_t motion_vector_vlc_table[63][2] = { @@ -428,2727 +405,647 @@ static const int16_t *const coeff_tables[32] = { coeff_table_token_31 }; -static const uint16_t vp3_bias[5 * 16][32][2] = { +static const uint8_t vp3_bias[5 * 16][32][2] = { { /* DC bias table 0 */ - { 0x2D, 6 }, - { 0x26, 7 }, - { 0x166, 9 }, - { 0x4E, 8 }, - { 0x2CE, 10 }, - { 0x59E, 11 }, - { 0x27D, 11 }, - { 0x8, 5 }, - { 0x4F9, 12 }, - { 0xF, 4 }, - { 0xE, 4 }, - { 0x1B, 5 }, - { 0x6, 4 }, - { 0x8, 4 }, - { 0x5, 4 }, - { 0x1A, 5 }, - { 0x15, 5 }, - { 0x7, 4 }, - { 0xC, 4 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0x9, 4 }, - { 0x17, 5 }, - { 0x29, 6 }, - { 0x28, 6 }, - { 0xB2, 8 }, - { 0x4F8, 12 }, - { 0x59F, 11 }, - { 0x9E, 9 }, - { 0x13F, 10 }, - { 0x12, 6 }, - { 0x58, 7 } + { 20, 3 }, { 19, 3 }, { 7, 5 }, { 30, 6 }, { 1, 7 }, { 3, 8 }, + { 28, 9 }, { 26, 12 }, { 8, 12 }, { 6, 11 }, { 29, 10 }, { 14, 4 }, + { 12, 4 }, { 17, 4 }, { 13, 4 }, { 21, 4 }, { 24, 6 }, { 23, 6 }, + { 16, 5 }, { 31, 7 }, { 25, 8 }, { 2, 9 }, { 4, 10 }, { 5, 11 }, + { 27, 11 }, { 0, 6 }, { 22, 5 }, { 18, 4 }, { 15, 5 }, { 11, 5 }, + { 10, 4 }, { 9, 4 }, }, { /* DC bias table 1 */ - { 0x10, 5 }, - { 0x47, 7 }, - { 0x1FF, 9 }, - { 0x8C, 8 }, - { 0x3FC, 10 }, - { 0x46A, 11 }, - { 0x469, 11 }, - { 0x22, 6 }, - { 0x11A1, 13 }, - { 0xE, 4 }, - { 0xD, 4 }, - { 0x4, 4 }, - { 0x5, 4 }, - { 0x9, 4 }, - { 0x6, 4 }, - { 0x1E, 5 }, - { 0x16, 5 }, - { 0x7, 4 }, - { 0xC, 4 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0xA, 4 }, - { 0x17, 5 }, - { 0x7D, 7 }, - { 0x7E, 7 }, - { 0x11B, 9 }, - { 0x8D1, 12 }, - { 0x3FD, 10 }, - { 0x46B, 11 }, - { 0x11A0, 13 }, - { 0x7C, 7 }, - { 0xFE, 8 } + { 20, 3 }, { 19, 3 }, { 11, 4 }, { 12, 4 }, { 14, 4 }, { 17, 4 }, + { 0, 5 }, { 7, 6 }, { 3, 8 }, { 29, 13 }, { 8, 13 }, { 26, 12 }, + { 6, 11 }, { 5, 11 }, { 28, 11 }, { 25, 9 }, { 1, 7 }, { 13, 4 }, + { 21, 4 }, { 16, 5 }, { 22, 5 }, { 18, 4 }, { 10, 4 }, { 9, 4 }, + { 15, 5 }, { 30, 7 }, { 23, 7 }, { 24, 7 }, { 31, 8 }, { 4, 10 }, + { 27, 10 }, { 2, 9 }, }, { /* DC bias table 2 */ - { 0x16, 5 }, - { 0x20, 6 }, - { 0x86, 8 }, - { 0x87, 8 }, - { 0x367, 10 }, - { 0x6CC, 11 }, - { 0x6CB, 11 }, - { 0x6E, 7 }, - { 0x366D, 14 }, - { 0xF, 4 }, - { 0xE, 4 }, - { 0x4, 4 }, - { 0x5, 4 }, - { 0xA, 4 }, - { 0x6, 4 }, - { 0x1A, 5 }, - { 0x11, 5 }, - { 0x7, 4 }, - { 0xC, 4 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0x9, 4 }, - { 0x17, 5 }, - { 0x6F, 7 }, - { 0x6D, 7 }, - { 0x364, 10 }, - { 0xD9A, 12 }, - { 0x6CA, 11 }, - { 0x1B37, 13 }, - { 0x366C, 14 }, - { 0x42, 7 }, - { 0xD8, 8 } + { 20, 3 }, { 19, 3 }, { 11, 4 }, { 12, 4 }, { 14, 4 }, { 17, 4 }, + { 1, 6 }, { 30, 7 }, { 2, 8 }, { 3, 8 }, { 16, 5 }, { 21, 4 }, + { 13, 4 }, { 0, 5 }, { 22, 5 }, { 18, 4 }, { 15, 5 }, { 31, 8 }, + { 25, 10 }, { 27, 11 }, { 6, 11 }, { 5, 11 }, { 26, 12 }, { 29, 14 }, + { 8, 14 }, { 28, 13 }, { 4, 10 }, { 24, 7 }, { 7, 7 }, { 23, 7 }, + { 10, 4 }, { 9, 4 }, }, { /* DC bias table 3 */ - { 0x0, 4 }, - { 0x2D, 6 }, - { 0xF7, 8 }, - { 0x58, 7 }, - { 0x167, 9 }, - { 0x2CB, 10 }, - { 0x2CA, 10 }, - { 0xE, 6 }, - { 0x1661, 13 }, - { 0x3, 3 }, - { 0x2, 3 }, - { 0x8, 4 }, - { 0x9, 4 }, - { 0xD, 4 }, - { 0x2, 4 }, - { 0x1F, 5 }, - { 0x17, 5 }, - { 0x1, 4 }, - { 0xC, 4 }, - { 0xE, 4 }, - { 0xA, 4 }, - { 0x6, 5 }, - { 0x78, 7 }, - { 0xF, 6 }, - { 0x7A, 7 }, - { 0x164, 9 }, - { 0x599, 11 }, - { 0x2CD, 10 }, - { 0xB31, 12 }, - { 0x1660, 13 }, - { 0x79, 7 }, - { 0xF6, 8 } + { 0, 4 }, { 17, 4 }, { 14, 4 }, { 21, 5 }, { 7, 6 }, { 23, 6 }, + { 10, 3 }, { 9, 3 }, { 11, 4 }, { 12, 4 }, { 20, 4 }, { 3, 7 }, + { 25, 9 }, { 6, 10 }, { 5, 10 }, { 29, 13 }, { 8, 13 }, { 28, 12 }, + { 26, 11 }, { 27, 10 }, { 4, 9 }, { 1, 6 }, { 16, 5 }, { 18, 4 }, + { 13, 4 }, { 19, 4 }, { 22, 7 }, { 30, 7 }, { 24, 7 }, { 31, 8 }, + { 2, 8 }, { 15, 5 }, }, { /* DC bias table 4 */ - { 0x3, 4 }, - { 0x3C, 6 }, - { 0xF, 7 }, - { 0x7A, 7 }, - { 0x1D, 8 }, - { 0x20, 9 }, - { 0x72, 10 }, - { 0x6, 6 }, - { 0x399, 13 }, - { 0x4, 3 }, - { 0x5, 3 }, - { 0x5, 4 }, - { 0x6, 4 }, - { 0xE, 4 }, - { 0x4, 4 }, - { 0x0, 4 }, - { 0x19, 5 }, - { 0x2, 4 }, - { 0xD, 4 }, - { 0x7, 4 }, - { 0x1F, 5 }, - { 0x30, 6 }, - { 0x11, 8 }, - { 0x31, 6 }, - { 0x5, 6 }, - { 0x21, 9 }, - { 0xE7, 11 }, - { 0x38, 9 }, - { 0x1CD, 12 }, - { 0x398, 13 }, - { 0x7B, 7 }, - { 0x9, 7 } + { 15, 4 }, { 5, 9 }, { 25, 9 }, { 22, 8 }, { 31, 7 }, { 24, 6 }, + { 7, 6 }, { 27, 9 }, { 6, 10 }, { 29, 13 }, { 8, 13 }, { 28, 12 }, + { 26, 11 }, { 4, 8 }, { 2, 7 }, { 17, 4 }, { 0, 4 }, { 14, 4 }, + { 11, 4 }, { 12, 4 }, { 19, 4 }, { 9, 3 }, { 10, 3 }, { 21, 6 }, + { 23, 6 }, { 16, 5 }, { 18, 4 }, { 13, 4 }, { 1, 6 }, { 3, 7 }, + { 30, 7 }, { 20, 5 }, }, { /* DC bias table 5 */ - { 0x9, 4 }, - { 0x2, 5 }, - { 0x74, 7 }, - { 0x7, 6 }, - { 0xEC, 8 }, - { 0xD1, 9 }, - { 0x1A6, 10 }, - { 0x6, 6 }, - { 0xD21, 13 }, - { 0x5, 3 }, - { 0x6, 3 }, - { 0x8, 4 }, - { 0x7, 4 }, - { 0xF, 4 }, - { 0x4, 4 }, - { 0x0, 4 }, - { 0x1C, 5 }, - { 0x2, 4 }, - { 0x5, 4 }, - { 0x3, 4 }, - { 0xC, 5 }, - { 0x35, 7 }, - { 0x1A7, 10 }, - { 0x1B, 6 }, - { 0x77, 7 }, - { 0x1A5, 10 }, - { 0x349, 11 }, - { 0xD0, 9 }, - { 0x691, 12 }, - { 0xD20, 13 }, - { 0x75, 7 }, - { 0xED, 8 } + { 15, 4 }, { 1, 5 }, { 7, 6 }, { 3, 6 }, { 17, 4 }, { 19, 4 }, + { 14, 4 }, { 18, 4 }, { 20, 5 }, { 27, 9 }, { 5, 9 }, { 29, 13 }, + { 8, 13 }, { 28, 12 }, { 26, 11 }, { 25, 10 }, { 6, 10 }, { 22, 10 }, + { 21, 7 }, { 23, 6 }, { 12, 4 }, { 11, 4 }, { 0, 4 }, { 9, 3 }, + { 10, 3 }, { 16, 5 }, { 2, 7 }, { 30, 7 }, { 4, 8 }, { 31, 8 }, + { 24, 7 }, { 13, 4 }, }, { /* DC bias table 6 */ - { 0xA, 4 }, - { 0xC, 5 }, - { 0x12, 6 }, - { 0x1B, 6 }, - { 0xB7, 8 }, - { 0x16C, 9 }, - { 0x99, 9 }, - { 0x5A, 7 }, - { 0x16D8, 13 }, - { 0x7, 3 }, - { 0x6, 3 }, - { 0x9, 4 }, - { 0x8, 4 }, - { 0x0, 3 }, - { 0x5, 4 }, - { 0x17, 5 }, - { 0xE, 5 }, - { 0x2, 4 }, - { 0x3, 4 }, - { 0xF, 5 }, - { 0x1A, 6 }, - { 0x4D, 8 }, - { 0x2DB3, 14 }, - { 0x2C, 6 }, - { 0x11, 6 }, - { 0x2DA, 10 }, - { 0x5B7, 11 }, - { 0x98, 9 }, - { 0xB6D, 12 }, - { 0x2DB2, 14 }, - { 0x10, 6 }, - { 0x27, 7 } + { 13, 3 }, { 17, 4 }, { 18, 4 }, { 30, 6 }, { 24, 6 }, { 2, 6 }, + { 27, 9 }, { 6, 9 }, { 21, 8 }, { 31, 7 }, { 14, 4 }, { 1, 5 }, + { 20, 6 }, { 3, 6 }, { 16, 5 }, { 19, 5 }, { 12, 4 }, { 11, 4 }, + { 0, 4 }, { 23, 6 }, { 7, 7 }, { 5, 9 }, { 25, 10 }, { 8, 13 }, + { 29, 14 }, { 22, 14 }, { 28, 12 }, { 26, 11 }, { 4, 8 }, { 15, 5 }, + { 10, 3 }, { 9, 3 }, }, { /* DC bias table 7 */ - { 0xD, 4 }, - { 0xF, 5 }, - { 0x1D, 6 }, - { 0x8, 5 }, - { 0x51, 7 }, - { 0x56, 8 }, - { 0xAF, 9 }, - { 0x2A, 7 }, - { 0x148A, 13 }, - { 0x7, 3 }, - { 0x0, 2 }, - { 0x8, 4 }, - { 0x9, 4 }, - { 0xC, 4 }, - { 0x6, 4 }, - { 0x17, 5 }, - { 0xB, 5 }, - { 0x16, 5 }, - { 0x15, 5 }, - { 0x9, 5 }, - { 0x50, 7 }, - { 0xAE, 9 }, - { 0x2917, 14 }, - { 0x1C, 6 }, - { 0x14, 6 }, - { 0x290, 10 }, - { 0x523, 11 }, - { 0x149, 9 }, - { 0xA44, 12 }, - { 0x2916, 14 }, - { 0x53, 7 }, - { 0xA5, 8 } + { 10, 2 }, { 3, 5 }, { 19, 5 }, { 24, 6 }, { 7, 7 }, { 5, 8 }, + { 21, 9 }, { 6, 9 }, { 16, 5 }, { 14, 4 }, { 23, 6 }, { 2, 6 }, + { 1, 5 }, { 11, 4 }, { 12, 4 }, { 20, 7 }, { 4, 7 }, { 25, 10 }, + { 28, 12 }, { 8, 13 }, { 29, 14 }, { 22, 14 }, { 26, 11 }, { 27, 9 }, + { 31, 8 }, { 30, 7 }, { 18, 5 }, { 17, 5 }, { 15, 5 }, { 13, 4 }, + { 0, 4 }, { 9, 3 }, }, { /* DC bias table 8 */ - { 0x1, 4 }, - { 0x1D, 6 }, - { 0xF5, 8 }, - { 0xF4, 8 }, - { 0x24D, 10 }, - { 0x499, 11 }, - { 0x498, 11 }, - { 0x1, 5 }, - { 0x21, 6 }, - { 0x6, 3 }, - { 0x5, 3 }, - { 0x6, 4 }, - { 0x5, 4 }, - { 0x2, 4 }, - { 0x7, 5 }, - { 0x25, 6 }, - { 0x7B, 7 }, - { 0x1C, 6 }, - { 0x20, 6 }, - { 0xD, 6 }, - { 0x48, 7 }, - { 0x92, 8 }, - { 0x127, 9 }, - { 0xE, 4 }, - { 0x4, 4 }, - { 0x11, 5 }, - { 0xC, 6 }, - { 0x3C, 6 }, - { 0xF, 5 }, - { 0x0, 5 }, - { 0x1F, 5 }, - { 0x13, 5 } + { 29, 5 }, { 7, 5 }, { 0, 4 }, { 13, 4 }, { 26, 6 }, { 19, 6 }, + { 14, 5 }, { 24, 4 }, { 12, 4 }, { 11, 4 }, { 17, 6 }, { 1, 6 }, + { 28, 5 }, { 18, 6 }, { 8, 6 }, { 25, 5 }, { 20, 7 }, { 21, 8 }, + { 6, 11 }, { 5, 11 }, { 4, 10 }, { 22, 9 }, { 15, 6 }, { 31, 5 }, + { 10, 3 }, { 9, 3 }, { 23, 4 }, { 27, 6 }, { 3, 8 }, { 2, 8 }, + { 16, 7 }, { 30, 5 }, }, { /* DC bias table 9 */ - { 0x5, 4 }, - { 0x3C, 6 }, - { 0x40, 7 }, - { 0xD, 7 }, - { 0x31, 9 }, - { 0x61, 10 }, - { 0x60, 10 }, - { 0x2, 5 }, - { 0xF5, 8 }, - { 0x6, 3 }, - { 0x5, 3 }, - { 0x7, 4 }, - { 0x6, 4 }, - { 0x2, 4 }, - { 0x9, 5 }, - { 0x25, 6 }, - { 0x7, 6 }, - { 0x21, 6 }, - { 0x24, 6 }, - { 0x10, 6 }, - { 0x41, 7 }, - { 0xF4, 8 }, - { 0x19, 8 }, - { 0xE, 4 }, - { 0x3, 4 }, - { 0x11, 5 }, - { 0x11, 6 }, - { 0x3F, 6 }, - { 0x3E, 6 }, - { 0x7B, 7 }, - { 0x0, 4 }, - { 0x13, 5 } + { 30, 4 }, { 7, 5 }, { 6, 10 }, { 5, 10 }, { 4, 9 }, { 22, 8 }, + { 3, 7 }, { 16, 6 }, { 13, 4 }, { 24, 4 }, { 19, 6 }, { 26, 6 }, + { 14, 5 }, { 0, 4 }, { 12, 4 }, { 11, 4 }, { 2, 7 }, { 20, 7 }, + { 17, 6 }, { 25, 5 }, { 18, 6 }, { 15, 6 }, { 31, 5 }, { 10, 3 }, + { 9, 3 }, { 23, 4 }, { 1, 6 }, { 21, 8 }, { 8, 8 }, { 29, 7 }, + { 28, 6 }, { 27, 6 }, }, { /* DC bias table 10 */ - { 0xA, 4 }, - { 0x7, 5 }, - { 0x1, 6 }, - { 0x9, 6 }, - { 0x131, 9 }, - { 0x261, 10 }, - { 0x260, 10 }, - { 0x15, 6 }, - { 0x1, 7 }, - { 0x7, 3 }, - { 0x6, 3 }, - { 0x8, 4 }, - { 0x7, 4 }, - { 0x6, 4 }, - { 0x12, 5 }, - { 0x2F, 6 }, - { 0x14, 6 }, - { 0x27, 6 }, - { 0x2D, 6 }, - { 0x16, 6 }, - { 0x4D, 7 }, - { 0x99, 8 }, - { 0x0, 7 }, - { 0x4, 4 }, - { 0x1, 4 }, - { 0x5, 5 }, - { 0x17, 6 }, - { 0x2E, 6 }, - { 0x2C, 6 }, - { 0x8, 6 }, - { 0x6, 5 }, - { 0x1, 5 } + { 22, 7 }, { 8, 7 }, { 2, 6 }, { 31, 5 }, { 24, 4 }, { 29, 6 }, + { 3, 6 }, { 25, 5 }, { 30, 5 }, { 1, 5 }, { 23, 4 }, { 16, 6 }, + { 7, 6 }, { 19, 6 }, { 26, 6 }, { 13, 4 }, { 12, 4 }, { 11, 4 }, + { 14, 5 }, { 6, 10 }, { 5, 10 }, { 4, 9 }, { 21, 8 }, { 20, 7 }, + { 17, 6 }, { 0, 4 }, { 28, 6 }, { 18, 6 }, { 27, 6 }, { 15, 6 }, + { 10, 3 }, { 9, 3 }, }, { /* DC bias table 11 */ - { 0x0, 3 }, - { 0xE, 5 }, - { 0x17, 6 }, - { 0x2A, 6 }, - { 0x10, 7 }, - { 0xF9, 10 }, - { 0xF8, 10 }, - { 0x1E, 7 }, - { 0x3F, 8 }, - { 0x7, 3 }, - { 0x6, 3 }, - { 0x9, 4 }, - { 0x8, 4 }, - { 0x6, 4 }, - { 0xF, 5 }, - { 0x5, 5 }, - { 0x16, 6 }, - { 0x29, 6 }, - { 0x2B, 6 }, - { 0x15, 6 }, - { 0x50, 7 }, - { 0x11, 7 }, - { 0x7D, 9 }, - { 0x4, 4 }, - { 0x17, 5 }, - { 0x6, 5 }, - { 0x14, 6 }, - { 0x2C, 6 }, - { 0x2D, 6 }, - { 0xE, 6 }, - { 0x9, 6 }, - { 0x51, 7 } + { 0, 3 }, { 4, 7 }, { 21, 7 }, { 30, 6 }, { 15, 5 }, { 25, 5 }, + { 29, 6 }, { 7, 7 }, { 6, 10 }, { 5, 10 }, { 22, 9 }, { 8, 8 }, + { 23, 4 }, { 26, 6 }, { 19, 6 }, { 16, 6 }, { 2, 6 }, { 13, 4 }, + { 1, 5 }, { 14, 5 }, { 12, 4 }, { 11, 4 }, { 20, 7 }, { 31, 7 }, + { 17, 6 }, { 3, 6 }, { 18, 6 }, { 27, 6 }, { 28, 6 }, { 24, 5 }, + { 10, 3 }, { 9, 3 }, }, { /* DC bias table 12 */ - { 0x2, 3 }, - { 0x18, 5 }, - { 0x2F, 6 }, - { 0xD, 5 }, - { 0x53, 7 }, - { 0x295, 10 }, - { 0x294, 10 }, - { 0xA4, 8 }, - { 0x7C, 8 }, - { 0x0, 2 }, - { 0x7, 3 }, - { 0x9, 4 }, - { 0x8, 4 }, - { 0x1B, 5 }, - { 0xC, 5 }, - { 0x28, 6 }, - { 0x6A, 7 }, - { 0x1E, 6 }, - { 0x1D, 6 }, - { 0x69, 7 }, - { 0xD7, 8 }, - { 0x7D, 8 }, - { 0x14B, 9 }, - { 0x19, 5 }, - { 0x16, 5 }, - { 0x2E, 6 }, - { 0x1C, 6 }, - { 0x2B, 6 }, - { 0x2A, 6 }, - { 0x68, 7 }, - { 0x3F, 7 }, - { 0xD6, 8 } + { 9, 2 }, { 0, 3 }, { 14, 5 }, { 3, 5 }, { 26, 6 }, { 18, 6 }, + { 17, 6 }, { 8, 8 }, { 21, 8 }, { 30, 7 }, { 12, 4 }, { 11, 4 }, + { 15, 6 }, { 7, 8 }, { 6, 10 }, { 5, 10 }, { 22, 9 }, { 4, 7 }, + { 28, 6 }, { 27, 6 }, { 24, 5 }, { 25, 6 }, { 2, 6 }, { 1, 5 }, + { 23, 5 }, { 29, 7 }, { 19, 7 }, { 16, 7 }, { 31, 8 }, { 20, 8 }, + { 13, 5 }, { 10, 3 }, }, { /* DC bias table 13 */ - { 0x2, 3 }, - { 0x1B, 5 }, - { 0xC, 5 }, - { 0x18, 5 }, - { 0x29, 6 }, - { 0x7F, 8 }, - { 0x2F0, 10 }, - { 0x198, 9 }, - { 0x179, 9 }, - { 0x0, 2 }, - { 0x7, 3 }, - { 0x9, 4 }, - { 0x8, 4 }, - { 0x1A, 5 }, - { 0xD, 5 }, - { 0x2A, 6 }, - { 0x64, 7 }, - { 0x1E, 6 }, - { 0x67, 7 }, - { 0x5F, 7 }, - { 0xCD, 8 }, - { 0x7E, 8 }, - { 0x2F1, 10 }, - { 0x16, 5 }, - { 0xE, 5 }, - { 0x2E, 6 }, - { 0x65, 7 }, - { 0x2B, 6 }, - { 0x28, 6 }, - { 0x3E, 7 }, - { 0xBD, 8 }, - { 0x199, 9 } + { 9, 2 }, { 0, 3 }, { 2, 5 }, { 14, 5 }, { 24, 5 }, { 17, 6 }, + { 29, 7 }, { 21, 8 }, { 5, 8 }, { 12, 4 }, { 11, 4 }, { 28, 6 }, + { 4, 6 }, { 15, 6 }, { 27, 6 }, { 23, 5 }, { 25, 6 }, { 6, 10 }, + { 22, 10 }, { 8, 9 }, { 30, 8 }, { 19, 7 }, { 3, 5 }, { 16, 7 }, + { 26, 7 }, { 7, 9 }, { 31, 9 }, { 20, 8 }, { 18, 7 }, { 13, 5 }, + { 1, 5 }, { 10, 3 }, }, { /* DC bias table 14 */ - { 0x2, 3 }, - { 0x7, 4 }, - { 0x16, 5 }, - { 0x6, 4 }, - { 0x36, 6 }, - { 0x5C, 7 }, - { 0x15D, 9 }, - { 0x15C, 9 }, - { 0x2BF, 10 }, - { 0x0, 2 }, - { 0x7, 3 }, - { 0x9, 4 }, - { 0x8, 4 }, - { 0x18, 5 }, - { 0x34, 6 }, - { 0x2A, 6 }, - { 0x5E, 7 }, - { 0x6A, 7 }, - { 0x64, 7 }, - { 0x5D, 7 }, - { 0xCB, 8 }, - { 0xAD, 8 }, - { 0x2BE, 10 }, - { 0x14, 5 }, - { 0x33, 6 }, - { 0x6E, 7 }, - { 0x5F, 7 }, - { 0x6F, 7 }, - { 0x6B, 7 }, - { 0xCA, 8 }, - { 0xAC, 8 }, - { 0x15E, 9 } + { 9, 2 }, { 0, 3 }, { 3, 4 }, { 1, 4 }, { 12, 4 }, { 11, 4 }, + { 23, 5 }, { 15, 6 }, { 30, 8 }, { 21, 8 }, { 7, 9 }, { 6, 9 }, + { 31, 9 }, { 22, 10 }, { 8, 10 }, { 2, 5 }, { 5, 7 }, { 19, 7 }, + { 16, 7 }, { 26, 7 }, { 13, 5 }, { 18, 7 }, { 29, 8 }, { 20, 8 }, + { 24, 6 }, { 14, 6 }, { 17, 7 }, { 28, 7 }, { 4, 6 }, { 25, 7 }, + { 27, 7 }, { 10, 3 }, }, { /* DC bias table 15 */ - { 0xF, 4 }, - { 0x1D, 5 }, - { 0x18, 5 }, - { 0xB, 4 }, - { 0x19, 5 }, - { 0x29, 6 }, - { 0xD6, 8 }, - { 0x551, 11 }, - { 0xAA1, 12 }, - { 0x1, 2 }, - { 0x0, 2 }, - { 0x9, 4 }, - { 0x8, 4 }, - { 0x1B, 5 }, - { 0x38, 6 }, - { 0x28, 6 }, - { 0x57, 7 }, - { 0x6A, 7 }, - { 0x68, 7 }, - { 0x56, 7 }, - { 0xE5, 8 }, - { 0x155, 9 }, - { 0xAA0, 12 }, - { 0x73, 7 }, - { 0x69, 7 }, - { 0xD7, 8 }, - { 0xAB, 8 }, - { 0xE4, 8 }, - { 0xA9, 8 }, - { 0x151, 9 }, - { 0x150, 9 }, - { 0x2A9, 10 } + { 10, 2 }, { 9, 2 }, { 12, 4 }, { 11, 4 }, { 15, 6 }, { 5, 6 }, + { 30, 9 }, { 29, 9 }, { 28, 8 }, { 22, 12 }, { 8, 12 }, { 7, 11 }, + { 31, 10 }, { 21, 9 }, { 26, 8 }, { 19, 7 }, { 16, 7 }, { 3, 4 }, + { 2, 5 }, { 4, 5 }, { 18, 7 }, { 24, 7 }, { 17, 7 }, { 6, 8 }, + { 25, 8 }, { 13, 5 }, { 14, 6 }, { 27, 8 }, { 20, 8 }, { 23, 7 }, + { 1, 5 }, { 0, 4 }, }, { /* AC bias group 1, table 0 */ - { 0x8, 5 }, - { 0x25, 7 }, - { 0x17A, 9 }, - { 0x2F7, 10 }, - { 0xBDB, 12 }, - { 0x17B4, 13 }, - { 0x2F6B, 14 }, - { 0x1D, 5 }, - { 0x2F6A, 14 }, - { 0x8, 4 }, - { 0x7, 4 }, - { 0x1, 4 }, - { 0x2, 4 }, - { 0xA, 4 }, - { 0x6, 4 }, - { 0x0, 4 }, - { 0x1C, 5 }, - { 0x9, 4 }, - { 0xD, 4 }, - { 0xF, 4 }, - { 0xC, 4 }, - { 0x3, 4 }, - { 0xA, 5 }, - { 0x16, 5 }, - { 0x13, 6 }, - { 0x5D, 7 }, - { 0x24, 7 }, - { 0xBC, 8 }, - { 0x5C, 7 }, - { 0x5EC, 11 }, - { 0xB, 5 }, - { 0x5F, 7 } + { 15, 4 }, { 11, 4 }, { 12, 4 }, { 21, 4 }, { 0, 5 }, { 26, 7 }, + { 1, 7 }, { 24, 6 }, { 22, 5 }, { 30, 5 }, { 14, 4 }, { 10, 4 }, + { 9, 4 }, { 17, 4 }, { 13, 4 }, { 23, 5 }, { 28, 7 }, { 25, 7 }, + { 27, 8 }, { 2, 9 }, { 29, 11 }, { 5, 13 }, { 8, 14 }, { 6, 14 }, + { 4, 12 }, { 3, 10 }, { 31, 7 }, { 20, 4 }, { 18, 4 }, { 16, 5 }, + { 7, 5 }, { 19, 4 }, }, { /* AC bias group 1, table 1 */ - { 0xF, 5 }, - { 0x10, 6 }, - { 0x4B, 8 }, - { 0xC6, 8 }, - { 0x31D, 10 }, - { 0xC71, 12 }, - { 0xC70, 12 }, - { 0x1, 4 }, - { 0xC73, 12 }, - { 0x8, 4 }, - { 0x9, 4 }, - { 0x2, 4 }, - { 0x3, 4 }, - { 0xB, 4 }, - { 0x6, 4 }, - { 0x0, 4 }, - { 0x1C, 5 }, - { 0x5, 4 }, - { 0xD, 4 }, - { 0xF, 4 }, - { 0xA, 4 }, - { 0x19, 5 }, - { 0x13, 6 }, - { 0x1D, 5 }, - { 0x30, 6 }, - { 0x62, 7 }, - { 0x24, 7 }, - { 0x4A, 8 }, - { 0x18F, 9 }, - { 0xC72, 12 }, - { 0xE, 5 }, - { 0x11, 6 } + { 15, 4 }, { 7, 4 }, { 11, 4 }, { 12, 4 }, { 1, 6 }, { 31, 6 }, + { 26, 7 }, { 27, 8 }, { 2, 8 }, { 22, 6 }, { 17, 4 }, { 14, 4 }, + { 30, 5 }, { 0, 5 }, { 9, 4 }, { 10, 4 }, { 20, 4 }, { 13, 4 }, + { 24, 6 }, { 25, 7 }, { 3, 8 }, { 6, 12 }, { 5, 12 }, { 29, 12 }, + { 8, 12 }, { 4, 10 }, { 28, 9 }, { 21, 5 }, { 18, 4 }, { 16, 5 }, + { 23, 5 }, { 19, 4 }, }, { /* AC bias group 1, table 2 */ - { 0x1B, 5 }, - { 0x3, 6 }, - { 0x8D, 8 }, - { 0x40, 7 }, - { 0x239, 10 }, - { 0x471, 11 }, - { 0x8E0, 12 }, - { 0x3, 4 }, - { 0x11C3, 13 }, - { 0xA, 4 }, - { 0x9, 4 }, - { 0x4, 4 }, - { 0x5, 4 }, - { 0xE, 4 }, - { 0x7, 4 }, - { 0x1, 4 }, - { 0x1E, 5 }, - { 0x6, 4 }, - { 0xC, 4 }, - { 0xB, 4 }, - { 0x2, 4 }, - { 0x0, 5 }, - { 0x41, 7 }, - { 0x1F, 5 }, - { 0x22, 6 }, - { 0x2, 6 }, - { 0x8F, 8 }, - { 0x8C, 8 }, - { 0x11D, 9 }, - { 0x11C2, 13 }, - { 0x1A, 5 }, - { 0x21, 6 } + { 21, 5 }, { 25, 6 }, { 1, 6 }, { 15, 4 }, { 20, 4 }, { 7, 4 }, + { 11, 4 }, { 12, 4 }, { 17, 4 }, { 14, 4 }, { 3, 7 }, { 22, 7 }, + { 31, 6 }, { 24, 6 }, { 27, 8 }, { 2, 8 }, { 6, 12 }, { 29, 13 }, + { 8, 13 }, { 5, 11 }, { 4, 10 }, { 28, 9 }, { 26, 8 }, { 10, 4 }, + { 9, 4 }, { 19, 4 }, { 18, 4 }, { 30, 5 }, { 0, 5 }, { 13, 4 }, + { 16, 5 }, { 23, 5 }, }, { /* AC bias group 1, table 3 */ - { 0x1F, 5 }, - { 0x3, 6 }, - { 0x3, 7 }, - { 0x43, 7 }, - { 0xB, 9 }, - { 0x15, 10 }, - { 0x51, 12 }, - { 0x3, 4 }, - { 0x50, 12 }, - { 0xD, 4 }, - { 0xC, 4 }, - { 0x4, 4 }, - { 0x6, 4 }, - { 0xE, 4 }, - { 0xA, 4 }, - { 0x1, 4 }, - { 0x1E, 5 }, - { 0x5, 4 }, - { 0x9, 4 }, - { 0x7, 4 }, - { 0x11, 5 }, - { 0x2, 6 }, - { 0x4, 8 }, - { 0x2, 4 }, - { 0x2D, 6 }, - { 0x20, 6 }, - { 0x42, 7 }, - { 0x1, 7 }, - { 0x0, 7 }, - { 0x29, 11 }, - { 0x17, 5 }, - { 0x2C, 6 } + { 28, 7 }, { 27, 7 }, { 22, 8 }, { 8, 12 }, { 6, 12 }, { 29, 11 }, + { 5, 10 }, { 4, 9 }, { 2, 7 }, { 21, 6 }, { 1, 6 }, { 15, 4 }, + { 23, 4 }, { 7, 4 }, { 11, 4 }, { 17, 4 }, { 12, 4 }, { 19, 4 }, + { 25, 6 }, { 26, 7 }, { 3, 7 }, { 20, 5 }, { 18, 4 }, { 14, 4 }, + { 31, 6 }, { 24, 6 }, { 30, 5 }, { 10, 4 }, { 9, 4 }, { 13, 4 }, + { 16, 5 }, { 0, 5 }, }, { /* AC bias group 1, table 4 */ - { 0x3, 4 }, - { 0x1F, 6 }, - { 0x3A, 7 }, - { 0x5D, 7 }, - { 0x173, 9 }, - { 0x2E4, 10 }, - { 0x172D, 13 }, - { 0x4, 4 }, - { 0x172C, 13 }, - { 0xF, 4 }, - { 0xE, 4 }, - { 0x9, 4 }, - { 0x8, 4 }, - { 0xC, 4 }, - { 0xA, 4 }, - { 0x1, 4 }, - { 0x16, 5 }, - { 0x2, 4 }, - { 0x5, 4 }, - { 0x1A, 5 }, - { 0x2F, 6 }, - { 0x38, 7 }, - { 0x5CA, 11 }, - { 0x6, 4 }, - { 0x37, 6 }, - { 0x1E, 6 }, - { 0x3B, 7 }, - { 0x39, 7 }, - { 0xB8, 8 }, - { 0xB97, 12 }, - { 0x0, 4 }, - { 0x36, 6 } + { 30, 4 }, { 15, 4 }, { 17, 4 }, { 0, 4 }, { 7, 4 }, { 18, 4 }, + { 23, 4 }, { 21, 7 }, { 27, 7 }, { 2, 7 }, { 26, 7 }, { 25, 6 }, + { 1, 6 }, { 12, 4 }, { 11, 4 }, { 14, 4 }, { 16, 5 }, { 28, 8 }, + { 5, 10 }, { 22, 11 }, { 8, 13 }, { 6, 13 }, { 29, 12 }, { 4, 9 }, + { 3, 7 }, { 20, 6 }, { 13, 4 }, { 19, 5 }, { 31, 6 }, { 24, 6 }, + { 10, 4 }, { 9, 4 }, }, { /* AC bias group 1, table 5 */ - { 0x6, 4 }, - { 0x37, 6 }, - { 0x5D, 7 }, - { 0xC, 6 }, - { 0xB9, 8 }, - { 0x2E3, 10 }, - { 0x5C4, 11 }, - { 0x4, 4 }, - { 0x1715, 13 }, - { 0x0, 3 }, - { 0xF, 4 }, - { 0x8, 4 }, - { 0x7, 4 }, - { 0xC, 4 }, - { 0x9, 4 }, - { 0x1D, 5 }, - { 0x16, 5 }, - { 0x1C, 5 }, - { 0x1A, 5 }, - { 0xB, 5 }, - { 0x5E, 7 }, - { 0x170, 9 }, - { 0x1714, 13 }, - { 0xA, 4 }, - { 0xA, 5 }, - { 0x36, 6 }, - { 0x5F, 7 }, - { 0x1B, 7 }, - { 0x1A, 7 }, - { 0xB8B, 12 }, - { 0x2, 4 }, - { 0x7, 5 } + { 9, 3 }, { 30, 4 }, { 3, 6 }, { 28, 7 }, { 27, 7 }, { 31, 5 }, + { 7, 4 }, { 24, 5 }, { 19, 5 }, { 0, 4 }, { 12, 4 }, { 11, 4 }, + { 14, 4 }, { 23, 4 }, { 16, 5 }, { 21, 9 }, { 6, 11 }, { 22, 13 }, + { 8, 13 }, { 29, 12 }, { 5, 10 }, { 4, 8 }, { 2, 7 }, { 20, 7 }, + { 26, 7 }, { 13, 4 }, { 18, 5 }, { 25, 6 }, { 1, 6 }, { 17, 5 }, + { 15, 5 }, { 10, 4 }, }, { /* AC bias group 1, table 6 */ - { 0xC, 4 }, - { 0xB, 5 }, - { 0x79, 7 }, - { 0x22, 6 }, - { 0xF0, 8 }, - { 0x119, 9 }, - { 0x230, 10 }, - { 0x1D, 5 }, - { 0x8C4, 12 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0xA, 4 }, - { 0x9, 4 }, - { 0xB, 4 }, - { 0x7, 4 }, - { 0x1C, 5 }, - { 0x3D, 6 }, - { 0xD, 5 }, - { 0x8, 5 }, - { 0x15, 6 }, - { 0x8D, 8 }, - { 0x118B, 13 }, - { 0x118A, 13 }, - { 0xD, 4 }, - { 0x10, 5 }, - { 0x9, 5 }, - { 0x14, 6 }, - { 0x47, 7 }, - { 0xF1, 8 }, - { 0x463, 11 }, - { 0x1F, 5 }, - { 0xC, 5 } + { 10, 3 }, { 9, 3 }, { 18, 5 }, { 25, 5 }, { 26, 6 }, { 19, 6 }, + { 1, 5 }, { 31, 5 }, { 17, 5 }, { 14, 4 }, { 24, 5 }, { 3, 6 }, + { 6, 10 }, { 8, 12 }, { 22, 13 }, { 21, 13 }, { 29, 11 }, { 5, 9 }, + { 20, 8 }, { 27, 7 }, { 12, 4 }, { 11, 4 }, { 13, 4 }, { 0, 4 }, + { 23, 4 }, { 15, 5 }, { 7, 5 }, { 4, 8 }, { 28, 8 }, { 2, 7 }, + { 16, 6 }, { 30, 5 }, }, { /* AC bias group 1, table 7 */ - { 0x0, 3 }, - { 0x1A, 5 }, - { 0x33, 6 }, - { 0xC, 5 }, - { 0x46, 7 }, - { 0x1E3, 9 }, - { 0x3C5, 10 }, - { 0x17, 5 }, - { 0x1E21, 13 }, - { 0x2, 3 }, - { 0x1, 3 }, - { 0x9, 4 }, - { 0xA, 4 }, - { 0x7, 4 }, - { 0x1B, 5 }, - { 0x3D, 6 }, - { 0x1B, 6 }, - { 0x22, 6 }, - { 0x79, 7 }, - { 0xF0, 8 }, - { 0x1E20, 13 }, - { 0x1E23, 13 }, - { 0x1E22, 13 }, - { 0xE, 4 }, - { 0x16, 5 }, - { 0x18, 5 }, - { 0x32, 6 }, - { 0x1A, 6 }, - { 0x47, 7 }, - { 0x789, 11 }, - { 0x1F, 5 }, - { 0x10, 5 } + { 0, 3 }, { 10, 3 }, { 9, 3 }, { 3, 5 }, { 27, 6 }, { 16, 6 }, + { 13, 4 }, { 31, 5 }, { 17, 6 }, { 4, 7 }, { 28, 7 }, { 11, 4 }, + { 12, 4 }, { 24, 5 }, { 7, 5 }, { 25, 5 }, { 26, 6 }, { 2, 6 }, + { 1, 5 }, { 14, 5 }, { 23, 4 }, { 19, 8 }, { 20, 13 }, { 8, 13 }, + { 22, 13 }, { 21, 13 }, { 29, 11 }, { 6, 10 }, { 5, 9 }, { 18, 7 }, + { 15, 6 }, { 30, 5 }, }, { /* AC bias group 1, table 8 */ - { 0x1D, 5 }, - { 0x61, 7 }, - { 0x4E, 8 }, - { 0x9E, 9 }, - { 0x27C, 11 }, - { 0x9F5, 13 }, - { 0x9F4, 13 }, - { 0x3, 4 }, - { 0x60, 7 }, - { 0x0, 3 }, - { 0xF, 4 }, - { 0xB, 4 }, - { 0xA, 4 }, - { 0x9, 4 }, - { 0x5, 4 }, - { 0xD, 5 }, - { 0x31, 6 }, - { 0x8, 5 }, - { 0x38, 6 }, - { 0x12, 6 }, - { 0x26, 7 }, - { 0x13F, 10 }, - { 0x4FB, 12 }, - { 0xD, 4 }, - { 0x2, 4 }, - { 0xC, 5 }, - { 0x39, 6 }, - { 0x1C, 6 }, - { 0xF, 5 }, - { 0x1D, 6 }, - { 0x8, 4 }, - { 0x19, 5 } + { 9, 3 }, { 24, 4 }, { 7, 4 }, { 17, 5 }, { 19, 6 }, { 20, 7 }, + { 2, 8 }, { 3, 9 }, { 4, 11 }, { 6, 13 }, { 5, 13 }, { 22, 12 }, + { 21, 10 }, { 14, 4 }, { 25, 5 }, { 15, 5 }, { 27, 6 }, { 29, 6 }, + { 28, 5 }, { 30, 4 }, { 13, 4 }, { 12, 4 }, { 11, 4 }, { 8, 7 }, + { 1, 7 }, { 16, 6 }, { 31, 5 }, { 23, 4 }, { 18, 6 }, { 26, 6 }, + { 0, 5 }, { 10, 4 }, }, { /* AC bias group 1, table 9 */ - { 0x7, 4 }, - { 0x19, 6 }, - { 0xAB, 8 }, - { 0xAA, 8 }, - { 0x119, 10 }, - { 0x461, 12 }, - { 0x460, 12 }, - { 0x1B, 5 }, - { 0x47, 8 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0xC, 4 }, - { 0xB, 4 }, - { 0x9, 4 }, - { 0x5, 4 }, - { 0xD, 5 }, - { 0x35, 6 }, - { 0x3D, 6 }, - { 0x3C, 6 }, - { 0x18, 6 }, - { 0x22, 7 }, - { 0x8D, 9 }, - { 0x231, 11 }, - { 0xE, 4 }, - { 0x1F, 5 }, - { 0x9, 5 }, - { 0x2B, 6 }, - { 0x10, 6 }, - { 0x34, 6 }, - { 0x54, 7 }, - { 0x8, 4 }, - { 0x14, 5 } + { 10, 3 }, { 9, 3 }, { 27, 6 }, { 20, 7 }, { 6, 12 }, { 5, 12 }, + { 22, 11 }, { 4, 10 }, { 21, 9 }, { 8, 8 }, { 25, 5 }, { 14, 4 }, + { 19, 6 }, { 1, 6 }, { 15, 5 }, { 0, 4 }, { 30, 4 }, { 13, 4 }, + { 31, 5 }, { 29, 7 }, { 3, 8 }, { 2, 8 }, { 26, 6 }, { 12, 4 }, + { 11, 4 }, { 28, 6 }, { 16, 6 }, { 7, 5 }, { 23, 4 }, { 18, 6 }, + { 17, 6 }, { 24, 5 }, }, { /* AC bias group 1, table 10 */ - { 0xC, 4 }, - { 0x5, 5 }, - { 0x8, 6 }, - { 0x5B, 7 }, - { 0x4D, 9 }, - { 0x131, 11 }, - { 0x261, 12 }, - { 0x1A, 5 }, - { 0x12, 7 }, - { 0x0, 3 }, - { 0xF, 4 }, - { 0xA, 4 }, - { 0x9, 4 }, - { 0x6, 4 }, - { 0x1B, 5 }, - { 0x6, 5 }, - { 0x1C, 6 }, - { 0x2C, 6 }, - { 0x15, 6 }, - { 0x5A, 7 }, - { 0x27, 8 }, - { 0x99, 10 }, - { 0x260, 12 }, - { 0xE, 4 }, - { 0x4, 4 }, - { 0xF, 5 }, - { 0x7, 5 }, - { 0x1D, 6 }, - { 0xB, 5 }, - { 0x14, 6 }, - { 0x8, 4 }, - { 0x17, 5 } + { 9, 3 }, { 2, 6 }, { 8, 7 }, { 22, 12 }, { 6, 12 }, { 5, 11 }, + { 21, 10 }, { 4, 9 }, { 20, 8 }, { 1, 5 }, { 15, 5 }, { 26, 5 }, + { 24, 4 }, { 29, 6 }, { 18, 6 }, { 28, 5 }, { 13, 4 }, { 16, 6 }, + { 27, 6 }, { 25, 5 }, { 30, 4 }, { 12, 4 }, { 11, 4 }, { 17, 6 }, + { 19, 7 }, { 3, 7 }, { 31, 5 }, { 0, 4 }, { 7, 5 }, { 14, 5 }, + { 23, 4 }, { 10, 4 }, }, { /* AC bias group 1, table 11 */ - { 0xF, 4 }, - { 0x13, 5 }, - { 0x75, 7 }, - { 0x24, 6 }, - { 0x95, 8 }, - { 0x251, 10 }, - { 0x4A0, 11 }, - { 0x10, 5 }, - { 0xC8, 8 }, - { 0x2, 3 }, - { 0x1, 3 }, - { 0x1, 4 }, - { 0x0, 4 }, - { 0x1A, 5 }, - { 0x11, 5 }, - { 0x2C, 6 }, - { 0x65, 7 }, - { 0x74, 7 }, - { 0x4B, 7 }, - { 0xC9, 8 }, - { 0x129, 9 }, - { 0x943, 12 }, - { 0x942, 12 }, - { 0x3, 3 }, - { 0xA, 4 }, - { 0x1C, 5 }, - { 0x18, 5 }, - { 0x33, 6 }, - { 0x17, 5 }, - { 0x2D, 6 }, - { 0x1B, 5 }, - { 0x3B, 6 } + { 12, 4 }, { 11, 4 }, { 10, 3 }, { 9, 3 }, { 23, 3 }, { 7, 5 }, + { 14, 5 }, { 3, 6 }, { 6, 11 }, { 22, 12 }, { 21, 12 }, { 5, 10 }, + { 20, 9 }, { 4, 8 }, { 18, 7 }, { 1, 5 }, { 24, 4 }, { 15, 6 }, + { 29, 6 }, { 28, 5 }, { 26, 5 }, { 8, 8 }, { 19, 8 }, { 16, 7 }, + { 27, 6 }, { 13, 5 }, { 30, 5 }, { 25, 5 }, { 17, 7 }, { 2, 7 }, + { 31, 6 }, { 0, 4 }, }, { /* AC bias group 1, table 12 */ - { 0x3, 3 }, - { 0x1A, 5 }, - { 0x2D, 6 }, - { 0x38, 6 }, - { 0x28, 7 }, - { 0x395, 10 }, - { 0xE51, 12 }, - { 0x37, 6 }, - { 0xE4, 8 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0x1F, 5 }, - { 0x1E, 5 }, - { 0x17, 5 }, - { 0x3A, 6 }, - { 0x73, 7 }, - { 0x2A, 7 }, - { 0x2B, 7 }, - { 0x29, 7 }, - { 0x1CB, 9 }, - { 0x729, 11 }, - { 0x1CA1, 13 }, - { 0x1CA0, 13 }, - { 0x4, 3 }, - { 0xA, 4 }, - { 0x4, 4 }, - { 0x18, 5 }, - { 0x36, 6 }, - { 0xB, 5 }, - { 0x2C, 6 }, - { 0x19, 5 }, - { 0x3B, 6 } + { 10, 3 }, { 9, 3 }, { 25, 4 }, { 4, 7 }, { 18, 7 }, { 16, 7 }, + { 17, 7 }, { 28, 5 }, { 0, 3 }, { 23, 3 }, { 24, 4 }, { 29, 6 }, + { 2, 6 }, { 13, 5 }, { 26, 5 }, { 30, 5 }, { 1, 5 }, { 27, 6 }, + { 7, 6 }, { 3, 6 }, { 8, 8 }, { 22, 13 }, { 21, 13 }, { 6, 12 }, + { 20, 11 }, { 5, 10 }, { 19, 9 }, { 15, 7 }, { 14, 6 }, { 31, 6 }, + { 12, 5 }, { 11, 5 }, }, { /* AC bias group 1, table 13 */ - { 0x4, 3 }, - { 0x4, 4 }, - { 0x3F, 6 }, - { 0x17, 5 }, - { 0x75, 7 }, - { 0x1F5, 9 }, - { 0x7D1, 11 }, - { 0x17, 6 }, - { 0x1F6, 9 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0x1B, 5 }, - { 0x1A, 5 }, - { 0xA, 5 }, - { 0x32, 6 }, - { 0x74, 7 }, - { 0xF8, 8 }, - { 0xF9, 8 }, - { 0x1F7, 9 }, - { 0x3E9, 10 }, - { 0xFA0, 12 }, - { 0x1F43, 13 }, - { 0x1F42, 13 }, - { 0x3, 3 }, - { 0xA, 4 }, - { 0x1E, 5 }, - { 0x1C, 5 }, - { 0x3B, 6 }, - { 0x18, 5 }, - { 0x16, 6 }, - { 0x16, 5 }, - { 0x33, 6 } + { 10, 3 }, { 9, 3 }, { 1, 4 }, { 13, 5 }, { 29, 6 }, { 7, 6 }, + { 23, 3 }, { 0, 3 }, { 24, 4 }, { 30, 5 }, { 3, 5 }, { 28, 5 }, + { 14, 6 }, { 31, 6 }, { 12, 5 }, { 11, 5 }, { 26, 5 }, { 15, 7 }, + { 4, 7 }, { 27, 6 }, { 25, 5 }, { 16, 8 }, { 17, 8 }, { 20, 12 }, + { 22, 13 }, { 21, 13 }, { 6, 11 }, { 19, 10 }, { 5, 9 }, { 8, 9 }, + { 18, 9 }, { 2, 6 }, }, { /* AC bias group 1, table 14 */ - { 0x4, 3 }, - { 0x7, 4 }, - { 0x18, 5 }, - { 0x1E, 5 }, - { 0x36, 6 }, - { 0x31, 7 }, - { 0x177, 9 }, - { 0x77, 7 }, - { 0x176, 9 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0x1A, 5 }, - { 0x19, 5 }, - { 0x3A, 6 }, - { 0x19, 6 }, - { 0x5C, 7 }, - { 0xBA, 8 }, - { 0x61, 8 }, - { 0xC1, 9 }, - { 0x180, 10 }, - { 0x302, 11 }, - { 0x607, 12 }, - { 0x606, 12 }, - { 0x2, 3 }, - { 0xA, 4 }, - { 0x1F, 5 }, - { 0x1C, 5 }, - { 0x37, 6 }, - { 0x16, 5 }, - { 0x76, 7 }, - { 0xD, 5 }, - { 0x2F, 6 } + { 10, 3 }, { 9, 3 }, { 23, 3 }, { 19, 10 }, { 20, 11 }, { 22, 12 }, + { 21, 12 }, { 18, 9 }, { 17, 8 }, { 5, 7 }, { 14, 6 }, { 30, 5 }, + { 1, 4 }, { 0, 3 }, { 24, 4 }, { 28, 5 }, { 15, 7 }, { 16, 8 }, + { 8, 9 }, { 6, 9 }, { 31, 6 }, { 2, 5 }, { 12, 5 }, { 11, 5 }, + { 4, 6 }, { 27, 6 }, { 26, 5 }, { 13, 6 }, { 29, 7 }, { 7, 7 }, + { 3, 5 }, { 25, 5 }, }, { /* AC bias group 1, table 15 */ - { 0x0, 3 }, - { 0xA, 4 }, - { 0x1A, 5 }, - { 0xC, 4 }, - { 0x1D, 5 }, - { 0x39, 6 }, - { 0x78, 7 }, - { 0x5E, 7 }, - { 0x393, 11 }, - { 0x2, 3 }, - { 0x1, 3 }, - { 0x16, 5 }, - { 0xF, 5 }, - { 0x2E, 6 }, - { 0x5F, 7 }, - { 0x73, 8 }, - { 0xE5, 9 }, - { 0x1C8, 10 }, - { 0xE4A, 13 }, - { 0x1C97, 14 }, - { 0x1C96, 14 }, - { 0xE49, 13 }, - { 0xE48, 13 }, - { 0x4, 3 }, - { 0x6, 4 }, - { 0x1F, 5 }, - { 0x1B, 5 }, - { 0x1D, 6 }, - { 0x38, 6 }, - { 0x38, 7 }, - { 0x3D, 6 }, - { 0x79, 7 } + { 0, 3 }, { 10, 3 }, { 9, 3 }, { 24, 4 }, { 29, 7 }, { 17, 10 }, + { 22, 13 }, { 21, 13 }, { 18, 13 }, { 20, 14 }, { 19, 14 }, { 8, 11 }, + { 16, 9 }, { 15, 8 }, { 27, 6 }, { 12, 5 }, { 23, 3 }, { 1, 4 }, + { 11, 5 }, { 13, 6 }, { 7, 7 }, { 14, 7 }, { 3, 4 }, { 2, 5 }, + { 26, 5 }, { 28, 6 }, { 5, 6 }, { 4, 5 }, { 6, 7 }, { 31, 7 }, + { 30, 6 }, { 25, 5 }, }, { /* AC bias group 2, table 0 */ - { 0xB, 5 }, - { 0x2B, 7 }, - { 0x54, 8 }, - { 0x1B7, 9 }, - { 0x6D9, 11 }, - { 0xDB1, 12 }, - { 0xDB0, 12 }, - { 0x2, 4 }, - { 0xAB, 9 }, - { 0x9, 4 }, - { 0xA, 4 }, - { 0x7, 4 }, - { 0x8, 4 }, - { 0xF, 4 }, - { 0xC, 4 }, - { 0x3, 4 }, - { 0x1D, 5 }, - { 0x4, 4 }, - { 0xB, 4 }, - { 0x6, 4 }, - { 0x1A, 5 }, - { 0x3, 6 }, - { 0xAA, 9 }, - { 0x1, 4 }, - { 0x0, 5 }, - { 0x14, 6 }, - { 0x6C, 7 }, - { 0xDA, 8 }, - { 0x2, 6 }, - { 0x36D, 10 }, - { 0x1C, 5 }, - { 0x37, 6 } + { 24, 5 }, { 28, 6 }, { 21, 6 }, { 23, 4 }, { 7, 4 }, { 15, 4 }, + { 17, 4 }, { 25, 6 }, { 2, 8 }, { 22, 9 }, { 8, 9 }, { 1, 7 }, + { 0, 5 }, { 19, 4 }, { 11, 4 }, { 12, 4 }, { 9, 4 }, { 10, 4 }, + { 18, 4 }, { 14, 4 }, { 20, 5 }, { 26, 7 }, { 27, 8 }, { 6, 12 }, + { 5, 12 }, { 4, 11 }, { 29, 10 }, { 3, 9 }, { 31, 6 }, { 30, 5 }, + { 16, 5 }, { 13, 4 }, }, { /* AC bias group 2, table 1 */ - { 0x1D, 5 }, - { 0x4, 6 }, - { 0xB6, 8 }, - { 0x6A, 8 }, - { 0x5B9, 11 }, - { 0x16E1, 13 }, - { 0x16E0, 13 }, - { 0x7, 4 }, - { 0x16F, 9 }, - { 0xC, 4 }, - { 0xD, 4 }, - { 0x9, 4 }, - { 0x8, 4 }, - { 0xF, 4 }, - { 0xA, 4 }, - { 0x3, 4 }, - { 0x17, 5 }, - { 0x2, 4 }, - { 0x4, 4 }, - { 0x1C, 5 }, - { 0x2C, 6 }, - { 0x6B, 8 }, - { 0xB71, 12 }, - { 0x5, 4 }, - { 0x3, 5 }, - { 0x1B, 6 }, - { 0x5A, 7 }, - { 0x34, 7 }, - { 0x5, 6 }, - { 0x2DD, 10 }, - { 0x0, 4 }, - { 0xC, 5 } + { 30, 4 }, { 1, 6 }, { 28, 6 }, { 24, 5 }, { 17, 4 }, { 15, 4 }, + { 18, 4 }, { 23, 4 }, { 31, 5 }, { 27, 7 }, { 3, 8 }, { 21, 8 }, + { 25, 6 }, { 7, 4 }, { 12, 4 }, { 11, 4 }, { 14, 4 }, { 20, 6 }, + { 26, 7 }, { 2, 8 }, { 6, 13 }, { 5, 13 }, { 22, 12 }, { 4, 11 }, + { 29, 10 }, { 8, 9 }, { 16, 5 }, { 9, 4 }, { 10, 4 }, { 19, 5 }, + { 0, 5 }, { 13, 4 }, }, { /* AC bias group 2, table 2 */ - { 0x3, 4 }, - { 0x7F, 7 }, - { 0xA1, 8 }, - { 0xA0, 8 }, - { 0x20C, 10 }, - { 0x834, 12 }, - { 0x106B, 13 }, - { 0x7, 4 }, - { 0x82, 8 }, - { 0xE, 4 }, - { 0xD, 4 }, - { 0xB, 4 }, - { 0xC, 4 }, - { 0x0, 3 }, - { 0x9, 4 }, - { 0x2, 4 }, - { 0x11, 5 }, - { 0x1E, 5 }, - { 0x15, 5 }, - { 0x3E, 6 }, - { 0x40, 7 }, - { 0x41B, 11 }, - { 0x106A, 13 }, - { 0x6, 4 }, - { 0xA, 5 }, - { 0x29, 6 }, - { 0x7E, 7 }, - { 0x51, 7 }, - { 0x21, 6 }, - { 0x107, 9 }, - { 0x4, 4 }, - { 0xB, 5 } + { 13, 3 }, { 15, 4 }, { 0, 4 }, { 30, 4 }, { 24, 5 }, { 31, 5 }, + { 23, 4 }, { 7, 4 }, { 20, 7 }, { 8, 8 }, { 4, 10 }, { 5, 12 }, + { 22, 13 }, { 6, 13 }, { 21, 11 }, { 29, 9 }, { 28, 6 }, { 16, 5 }, + { 14, 4 }, { 3, 8 }, { 2, 8 }, { 27, 7 }, { 25, 6 }, { 18, 5 }, + { 11, 4 }, { 12, 4 }, { 10, 4 }, { 9, 4 }, { 17, 5 }, { 19, 6 }, + { 26, 7 }, { 1, 7 }, }, { /* AC bias group 2, table 3 */ - { 0x7, 4 }, - { 0x1B, 6 }, - { 0xF6, 8 }, - { 0xE9, 8 }, - { 0x3A1, 10 }, - { 0x740, 11 }, - { 0xE82, 12 }, - { 0x1F, 5 }, - { 0x1EF, 9 }, - { 0x1, 3 }, - { 0x2, 3 }, - { 0xB, 4 }, - { 0xC, 4 }, - { 0xD, 4 }, - { 0x8, 4 }, - { 0x1C, 5 }, - { 0x3, 5 }, - { 0x12, 5 }, - { 0x2, 5 }, - { 0x75, 7 }, - { 0x1D1, 9 }, - { 0x1D07, 13 }, - { 0x1D06, 13 }, - { 0xA, 4 }, - { 0x13, 5 }, - { 0x3B, 6 }, - { 0x1A, 6 }, - { 0x7A, 7 }, - { 0x3C, 6 }, - { 0x1EE, 9 }, - { 0x0, 4 }, - { 0xC, 5 } + { 30, 4 }, { 18, 5 }, { 16, 5 }, { 9, 3 }, { 10, 3 }, { 31, 5 }, + { 26, 6 }, { 1, 6 }, { 0, 4 }, { 14, 4 }, { 17, 5 }, { 24, 5 }, + { 23, 4 }, { 11, 4 }, { 12, 4 }, { 13, 4 }, { 15, 5 }, { 5, 11 }, + { 6, 12 }, { 22, 13 }, { 21, 13 }, { 4, 10 }, { 20, 9 }, { 3, 8 }, + { 19, 7 }, { 25, 6 }, { 28, 6 }, { 27, 7 }, { 2, 8 }, { 29, 9 }, + { 8, 9 }, { 7, 5 }, }, { /* AC bias group 2, table 4 */ - { 0xD, 4 }, - { 0x3D, 6 }, - { 0x42, 7 }, - { 0x37, 7 }, - { 0xD9, 9 }, - { 0x362, 11 }, - { 0x6C6, 12 }, - { 0x1F, 5 }, - { 0x86, 8 }, - { 0x1, 3 }, - { 0x2, 3 }, - { 0xC, 4 }, - { 0xB, 4 }, - { 0xA, 4 }, - { 0x1, 4 }, - { 0xF, 5 }, - { 0x25, 6 }, - { 0x3C, 6 }, - { 0x1A, 6 }, - { 0x87, 8 }, - { 0x1B0, 10 }, - { 0xD8F, 13 }, - { 0xD8E, 13 }, - { 0xE, 4 }, - { 0x13, 5 }, - { 0xC, 5 }, - { 0x24, 6 }, - { 0x20, 6 }, - { 0x11, 5 }, - { 0x6D, 8 }, - { 0x0, 4 }, - { 0xE, 5 } + { 30, 4 }, { 14, 4 }, { 9, 3 }, { 10, 3 }, { 25, 5 }, { 18, 6 }, + { 20, 10 }, { 5, 11 }, { 6, 12 }, { 22, 13 }, { 21, 13 }, { 4, 9 }, + { 29, 8 }, { 3, 7 }, { 31, 5 }, { 15, 5 }, { 27, 6 }, { 2, 7 }, + { 8, 8 }, { 19, 8 }, { 28, 5 }, { 26, 6 }, { 16, 6 }, { 24, 5 }, + { 13, 4 }, { 12, 4 }, { 11, 4 }, { 0, 4 }, { 23, 4 }, { 17, 6 }, + { 1, 6 }, { 7, 5 }, }, { /* AC bias group 2, table 5 */ - { 0x0, 3 }, - { 0x12, 5 }, - { 0x76, 7 }, - { 0x77, 7 }, - { 0x14D, 9 }, - { 0x533, 11 }, - { 0x14C9, 13 }, - { 0x13, 5 }, - { 0xA5, 8 }, - { 0x2, 3 }, - { 0x3, 3 }, - { 0xB, 4 }, - { 0xC, 4 }, - { 0x8, 4 }, - { 0x1A, 5 }, - { 0x2B, 6 }, - { 0x75, 7 }, - { 0x74, 7 }, - { 0xA7, 8 }, - { 0x298, 10 }, - { 0x14C8, 13 }, - { 0x14CB, 13 }, - { 0x14CA, 13 }, - { 0xF, 4 }, - { 0x1C, 5 }, - { 0x7, 5 }, - { 0x2A, 6 }, - { 0x28, 6 }, - { 0x1B, 5 }, - { 0xA4, 8 }, - { 0x2, 4 }, - { 0x6, 5 } + { 0, 3 }, { 30, 4 }, { 31, 5 }, { 25, 5 }, { 9, 3 }, { 10, 3 }, + { 13, 4 }, { 1, 5 }, { 7, 5 }, { 27, 6 }, { 29, 8 }, { 8, 8 }, + { 19, 10 }, { 20, 13 }, { 6, 13 }, { 22, 13 }, { 21, 13 }, { 5, 11 }, + { 4, 9 }, { 18, 8 }, { 26, 6 }, { 15, 6 }, { 11, 4 }, { 12, 4 }, + { 14, 5 }, { 28, 5 }, { 24, 5 }, { 17, 7 }, { 16, 7 }, { 2, 7 }, + { 3, 7 }, { 23, 4 }, }, { /* AC bias group 2, table 6 */ - { 0x2, 3 }, - { 0x1A, 5 }, - { 0x2B, 6 }, - { 0x3A, 6 }, - { 0xED, 8 }, - { 0x283, 10 }, - { 0xA0A, 12 }, - { 0x4, 5 }, - { 0xA1, 8 }, - { 0x4, 3 }, - { 0x3, 3 }, - { 0xB, 4 }, - { 0xC, 4 }, - { 0x1F, 5 }, - { 0x6, 5 }, - { 0x77, 7 }, - { 0xA3, 8 }, - { 0xA2, 8 }, - { 0x140, 9 }, - { 0x1417, 13 }, - { 0x1416, 13 }, - { 0xA09, 12 }, - { 0xA08, 12 }, - { 0x0, 3 }, - { 0x1E, 5 }, - { 0x7, 5 }, - { 0x2A, 6 }, - { 0x29, 6 }, - { 0x1C, 5 }, - { 0xEC, 8 }, - { 0x1B, 5 }, - { 0x5, 5 } + { 23, 3 }, { 7, 5 }, { 31, 5 }, { 14, 5 }, { 25, 5 }, { 0, 3 }, + { 10, 3 }, { 9, 3 }, { 18, 9 }, { 22, 12 }, { 21, 12 }, { 6, 12 }, + { 20, 13 }, { 19, 13 }, { 5, 10 }, { 8, 8 }, { 17, 8 }, { 16, 8 }, + { 27, 6 }, { 26, 6 }, { 2, 6 }, { 11, 4 }, { 12, 4 }, { 1, 5 }, + { 30, 5 }, { 28, 5 }, { 3, 6 }, { 29, 8 }, { 4, 8 }, { 15, 7 }, + { 24, 5 }, { 13, 5 }, }, { /* AC bias group 2, table 7 */ - { 0x2, 3 }, - { 0x2, 4 }, - { 0x18, 5 }, - { 0x1D, 5 }, - { 0x35, 6 }, - { 0xE4, 8 }, - { 0x1CF, 11 }, - { 0x1D, 7 }, - { 0x72, 9 }, - { 0x4, 3 }, - { 0x5, 3 }, - { 0x6, 4 }, - { 0x7, 4 }, - { 0x6, 5 }, - { 0x73, 7 }, - { 0x38, 8 }, - { 0x1CE, 11 }, - { 0x39B, 12 }, - { 0x398, 12 }, - { 0x733, 13 }, - { 0x732, 13 }, - { 0x735, 13 }, - { 0x734, 13 }, - { 0x0, 3 }, - { 0x1F, 5 }, - { 0x1B, 5 }, - { 0x34, 6 }, - { 0xF, 6 }, - { 0x1E, 5 }, - { 0xE5, 8 }, - { 0x19, 5 }, - { 0x38, 6 } + { 23, 3 }, { 1, 4 }, { 13, 5 }, { 15, 8 }, { 8, 9 }, { 18, 12 }, + { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, { 17, 12 }, { 16, 11 }, + { 6, 11 }, { 7, 7 }, { 27, 6 }, { 0, 3 }, { 11, 4 }, { 12, 4 }, + { 9, 3 }, { 10, 3 }, { 2, 5 }, { 30, 5 }, { 26, 6 }, { 4, 6 }, + { 25, 5 }, { 31, 6 }, { 5, 8 }, { 29, 8 }, { 14, 7 }, { 3, 5 }, + { 28, 5 }, { 24, 5 }, }, { /* AC bias group 2, table 8 */ - { 0x16, 5 }, - { 0x50, 7 }, - { 0x172, 9 }, - { 0x2E7, 10 }, - { 0x1732, 13 }, - { 0x2E67, 14 }, - { 0x2E66, 14 }, - { 0x6, 4 }, - { 0x51, 7 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0xD, 4 }, - { 0xC, 4 }, - { 0x9, 4 }, - { 0x1C, 5 }, - { 0x9, 5 }, - { 0x1C, 6 }, - { 0x1D, 6 }, - { 0x5D, 7 }, - { 0xB8, 8 }, - { 0x5CD, 11 }, - { 0x1731, 13 }, - { 0x1730, 13 }, - { 0xF, 4 }, - { 0x5, 4 }, - { 0xF, 5 }, - { 0x8, 5 }, - { 0x29, 6 }, - { 0x1D, 5 }, - { 0x2F, 6 }, - { 0x8, 4 }, - { 0x15, 5 } + { 10, 3 }, { 9, 3 }, { 26, 5 }, { 15, 5 }, { 24, 4 }, { 7, 4 }, + { 16, 6 }, { 17, 6 }, { 25, 5 }, { 30, 4 }, { 13, 4 }, { 1, 7 }, + { 8, 7 }, { 27, 6 }, { 31, 5 }, { 0, 5 }, { 19, 8 }, { 2, 9 }, + { 22, 13 }, { 21, 13 }, { 4, 13 }, { 6, 14 }, { 5, 14 }, { 20, 11 }, + { 3, 10 }, { 18, 7 }, { 29, 6 }, { 12, 4 }, { 11, 4 }, { 14, 5 }, + { 28, 5 }, { 23, 4 }, }, { /* AC bias group 2, table 9 */ - { 0x9, 4 }, - { 0x21, 6 }, - { 0x40, 7 }, - { 0xAD, 8 }, - { 0x2B0, 10 }, - { 0x1589, 13 }, - { 0x1588, 13 }, - { 0x1C, 5 }, - { 0x5F, 7 }, - { 0x0, 3 }, - { 0xF, 4 }, - { 0xD, 4 }, - { 0xC, 4 }, - { 0x6, 4 }, - { 0x11, 5 }, - { 0x2A, 6 }, - { 0x57, 7 }, - { 0x5E, 7 }, - { 0x41, 7 }, - { 0x159, 9 }, - { 0x563, 11 }, - { 0x158B, 13 }, - { 0x158A, 13 }, - { 0x1, 3 }, - { 0x5, 4 }, - { 0x14, 5 }, - { 0x3B, 6 }, - { 0x2E, 6 }, - { 0x4, 4 }, - { 0x3A, 6 }, - { 0x7, 4 }, - { 0x16, 5 } + { 9, 3 }, { 23, 3 }, { 28, 4 }, { 24, 4 }, { 13, 4 }, { 30, 4 }, + { 2, 7 }, { 18, 7 }, { 1, 6 }, { 14, 5 }, { 0, 4 }, { 25, 5 }, + { 15, 6 }, { 4, 10 }, { 6, 13 }, { 5, 13 }, { 22, 13 }, { 21, 13 }, + { 20, 11 }, { 19, 9 }, { 3, 8 }, { 16, 7 }, { 31, 5 }, { 27, 6 }, + { 17, 7 }, { 8, 7 }, { 12, 4 }, { 11, 4 }, { 7, 5 }, { 29, 6 }, + { 26, 6 }, { 10, 4 }, }, { /* AC bias group 2, table 10 */ - { 0xE, 4 }, - { 0x7, 5 }, - { 0x46, 7 }, - { 0x45, 7 }, - { 0x64, 9 }, - { 0x32A, 12 }, - { 0x657, 13 }, - { 0x18, 5 }, - { 0xD, 6 }, - { 0x0, 3 }, - { 0xF, 4 }, - { 0xA, 4 }, - { 0xB, 4 }, - { 0x1A, 5 }, - { 0x36, 6 }, - { 0x47, 7 }, - { 0x44, 7 }, - { 0x18, 7 }, - { 0x33, 8 }, - { 0xCB, 10 }, - { 0x656, 13 }, - { 0x329, 12 }, - { 0x328, 12 }, - { 0x2, 3 }, - { 0x6, 4 }, - { 0x19, 5 }, - { 0xE, 5 }, - { 0x37, 6 }, - { 0x9, 4 }, - { 0xF, 5 }, - { 0x2, 4 }, - { 0x10, 5 } + { 9, 3 }, { 30, 4 }, { 17, 7 }, { 4, 9 }, { 22, 12 }, { 21, 12 }, + { 5, 12 }, { 20, 13 }, { 6, 13 }, { 19, 10 }, { 18, 8 }, { 8, 6 }, + { 1, 5 }, { 23, 3 }, { 24, 4 }, { 26, 5 }, { 29, 5 }, { 31, 5 }, + { 16, 7 }, { 3, 7 }, { 2, 7 }, { 15, 7 }, { 28, 4 }, { 11, 4 }, + { 12, 4 }, { 7, 5 }, { 25, 5 }, { 13, 5 }, { 14, 6 }, { 27, 6 }, + { 0, 4 }, { 10, 4 }, }, { /* AC bias group 2, table 11 */ - { 0x3, 3 }, - { 0x18, 5 }, - { 0x23, 6 }, - { 0x77, 7 }, - { 0x194, 9 }, - { 0x1956, 13 }, - { 0x32AF, 14 }, - { 0x3A, 6 }, - { 0x76, 7 }, - { 0x2, 3 }, - { 0x1, 3 }, - { 0x1F, 5 }, - { 0x1E, 5 }, - { 0x14, 5 }, - { 0x22, 6 }, - { 0x64, 7 }, - { 0x197, 9 }, - { 0x196, 9 }, - { 0x32B, 10 }, - { 0x654, 11 }, - { 0x32AE, 14 }, - { 0x1955, 13 }, - { 0x1954, 13 }, - { 0x0, 3 }, - { 0x9, 4 }, - { 0x1C, 5 }, - { 0x15, 5 }, - { 0x10, 5 }, - { 0xD, 4 }, - { 0x17, 5 }, - { 0x16, 5 }, - { 0x33, 6 } + { 23, 3 }, { 10, 3 }, { 9, 3 }, { 0, 3 }, { 27, 5 }, { 14, 6 }, + { 2, 6 }, { 24, 4 }, { 13, 5 }, { 26, 5 }, { 30, 5 }, { 29, 5 }, + { 1, 5 }, { 15, 7 }, { 4, 9 }, { 19, 11 }, { 22, 13 }, { 21, 13 }, + { 5, 13 }, { 20, 14 }, { 6, 14 }, { 18, 10 }, { 17, 9 }, { 16, 9 }, + { 31, 6 }, { 28, 4 }, { 25, 5 }, { 7, 6 }, { 8, 7 }, { 3, 7 }, + { 12, 5 }, { 11, 5 }, }, { /* AC bias group 2, table 12 */ - { 0x5, 3 }, - { 0x6, 4 }, - { 0x3E, 6 }, - { 0x10, 5 }, - { 0x48, 7 }, - { 0x93F, 12 }, - { 0x24FA, 14 }, - { 0x32, 6 }, - { 0x67, 7 }, - { 0x2, 3 }, - { 0x1, 3 }, - { 0x1B, 5 }, - { 0x1E, 5 }, - { 0x34, 6 }, - { 0x66, 7 }, - { 0x92, 8 }, - { 0x126, 9 }, - { 0x24E, 10 }, - { 0x49E, 11 }, - { 0x49F7, 15 }, - { 0x49F6, 15 }, - { 0x24F9, 14 }, - { 0x24F8, 14 }, - { 0x0, 3 }, - { 0x7, 4 }, - { 0x18, 5 }, - { 0x11, 5 }, - { 0x3F, 6 }, - { 0xE, 4 }, - { 0x13, 5 }, - { 0x35, 6 }, - { 0x25, 6 } + { 23, 3 }, { 10, 3 }, { 9, 3 }, { 1, 4 }, { 24, 4 }, { 3, 5 }, + { 26, 5 }, { 4, 7 }, { 15, 8 }, { 16, 9 }, { 17, 10 }, { 18, 11 }, + { 22, 14 }, { 21, 14 }, { 6, 14 }, { 20, 15 }, { 19, 15 }, { 5, 12 }, + { 31, 6 }, { 29, 5 }, { 0, 3 }, { 25, 5 }, { 7, 6 }, { 14, 7 }, + { 8, 7 }, { 13, 6 }, { 30, 6 }, { 11, 5 }, { 28, 4 }, { 12, 5 }, + { 2, 6 }, { 27, 6 }, }, { /* AC bias group 2, table 13 */ - { 0x5, 3 }, - { 0x8, 4 }, - { 0x12, 5 }, - { 0x1C, 5 }, - { 0x1C, 6 }, - { 0xEA, 9 }, - { 0x1D75, 14 }, - { 0x1E, 6 }, - { 0x66, 7 }, - { 0x1, 3 }, - { 0x2, 3 }, - { 0x1B, 5 }, - { 0x1A, 5 }, - { 0x1F, 6 }, - { 0x3B, 7 }, - { 0x74, 8 }, - { 0x1D6, 10 }, - { 0x3AF, 11 }, - { 0x1D74, 14 }, - { 0x1D77, 14 }, - { 0x1D76, 14 }, - { 0xEB9, 13 }, - { 0xEB8, 13 }, - { 0xF, 4 }, - { 0x6, 4 }, - { 0x13, 5 }, - { 0x3B, 6 }, - { 0x3A, 6 }, - { 0x0, 3 }, - { 0x18, 5 }, - { 0x32, 6 }, - { 0x67, 7 } + { 28, 3 }, { 9, 3 }, { 10, 3 }, { 24, 4 }, { 4, 6 }, { 15, 8 }, + { 5, 9 }, { 16, 10 }, { 22, 13 }, { 21, 13 }, { 18, 14 }, { 6, 14 }, + { 20, 14 }, { 19, 14 }, { 17, 11 }, { 14, 7 }, { 7, 6 }, { 13, 6 }, + { 1, 4 }, { 2, 5 }, { 25, 5 }, { 0, 3 }, { 29, 5 }, { 30, 6 }, + { 8, 7 }, { 31, 7 }, { 12, 5 }, { 11, 5 }, { 3, 5 }, { 27, 6 }, + { 26, 6 }, { 23, 4 }, }, { /* AC bias group 2, table 14 */ - { 0x4, 3 }, - { 0xA, 4 }, - { 0x1B, 5 }, - { 0xC, 4 }, - { 0xD, 5 }, - { 0xE6, 8 }, - { 0x684, 11 }, - { 0x72, 7 }, - { 0xE7, 8 }, - { 0x2, 3 }, - { 0x1, 3 }, - { 0x17, 5 }, - { 0x16, 5 }, - { 0x18, 6 }, - { 0xD1, 8 }, - { 0x1A0, 9 }, - { 0x686, 11 }, - { 0xD0F, 12 }, - { 0xD0A, 12 }, - { 0x1A17, 13 }, - { 0x1A16, 13 }, - { 0x1A1D, 13 }, - { 0x1A1C, 13 }, - { 0xF, 4 }, - { 0x1D, 5 }, - { 0xE, 5 }, - { 0x35, 6 }, - { 0x38, 6 }, - { 0x0, 3 }, - { 0xF, 5 }, - { 0x19, 6 }, - { 0x69, 7 } + { 28, 3 }, { 10, 3 }, { 9, 3 }, { 13, 6 }, { 30, 6 }, { 4, 5 }, + { 25, 5 }, { 29, 5 }, { 0, 3 }, { 1, 4 }, { 12, 5 }, { 11, 5 }, + { 3, 4 }, { 15, 9 }, { 6, 11 }, { 18, 12 }, { 20, 13 }, { 19, 13 }, + { 16, 11 }, { 22, 13 }, { 21, 13 }, { 17, 12 }, { 14, 8 }, { 31, 7 }, + { 26, 6 }, { 2, 5 }, { 27, 6 }, { 7, 7 }, { 5, 8 }, { 8, 8 }, + { 24, 5 }, { 23, 4 }, }, { /* AC bias group 2, table 15 */ - { 0x3, 3 }, - { 0xC, 4 }, - { 0x1B, 5 }, - { 0x0, 3 }, - { 0x3, 4 }, - { 0x2E, 6 }, - { 0x51, 9 }, - { 0xBC, 8 }, - { 0x53, 9 }, - { 0x4, 3 }, - { 0x2, 3 }, - { 0x16, 5 }, - { 0x15, 5 }, - { 0x15, 7 }, - { 0x50, 9 }, - { 0xA4, 10 }, - { 0x294, 12 }, - { 0x52B, 13 }, - { 0x52A, 13 }, - { 0x52D, 13 }, - { 0x52C, 13 }, - { 0x52F, 13 }, - { 0x52E, 13 }, - { 0xE, 4 }, - { 0x1A, 5 }, - { 0x4, 5 }, - { 0x28, 6 }, - { 0x29, 6 }, - { 0xF, 4 }, - { 0xB, 6 }, - { 0x5F, 7 }, - { 0xBD, 8 } + { 3, 3 }, { 25, 5 }, { 14, 9 }, { 6, 9 }, { 15, 10 }, { 16, 12 }, + { 18, 13 }, { 17, 13 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, + { 8, 9 }, { 13, 7 }, { 29, 6 }, { 4, 4 }, { 10, 3 }, { 0, 3 }, + { 9, 3 }, { 26, 6 }, { 27, 6 }, { 12, 5 }, { 11, 5 }, { 5, 6 }, + { 7, 8 }, { 31, 8 }, { 30, 7 }, { 1, 4 }, { 24, 5 }, { 2, 5 }, + { 23, 4 }, { 28, 4 }, }, { /* AC bias group 3, table 0 */ - { 0x3, 4 }, - { 0x9, 6 }, - { 0xD0, 8 }, - { 0x1A3, 9 }, - { 0x344, 10 }, - { 0xD14, 12 }, - { 0x1A2B, 13 }, - { 0x4, 4 }, - { 0x15, 7 }, - { 0x0, 3 }, - { 0xF, 4 }, - { 0xB, 4 }, - { 0xC, 4 }, - { 0xE, 4 }, - { 0x9, 4 }, - { 0x1B, 5 }, - { 0xA, 5 }, - { 0x14, 5 }, - { 0xD, 5 }, - { 0x2A, 6 }, - { 0x14, 7 }, - { 0x68B, 11 }, - { 0x1A2A, 13 }, - { 0x8, 4 }, - { 0xB, 5 }, - { 0x2B, 6 }, - { 0xB, 6 }, - { 0x69, 7 }, - { 0x35, 6 }, - { 0x8, 6 }, - { 0x7, 4 }, - { 0xC, 5 } + { 9, 3 }, { 29, 6 }, { 1, 6 }, { 20, 7 }, { 8, 7 }, { 26, 6 }, + { 0, 4 }, { 7, 4 }, { 16, 5 }, { 24, 5 }, { 31, 5 }, { 18, 5 }, + { 30, 4 }, { 23, 4 }, { 14, 4 }, { 17, 5 }, { 19, 6 }, { 25, 6 }, + { 11, 4 }, { 12, 4 }, { 2, 8 }, { 4, 10 }, { 5, 12 }, { 22, 13 }, + { 6, 13 }, { 21, 11 }, { 3, 9 }, { 27, 7 }, { 28, 6 }, { 15, 5 }, + { 13, 4 }, { 10, 4 }, }, { /* AC bias group 3, table 1 */ - { 0xA, 4 }, - { 0x3C, 6 }, - { 0x32, 7 }, - { 0x30, 7 }, - { 0xC5, 9 }, - { 0x621, 12 }, - { 0x620, 12 }, - { 0x1F, 5 }, - { 0x33, 7 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0xE, 4 }, - { 0xD, 4 }, - { 0xC, 4 }, - { 0x4, 4 }, - { 0xD, 5 }, - { 0x26, 6 }, - { 0x27, 6 }, - { 0x14, 6 }, - { 0x63, 8 }, - { 0x189, 10 }, - { 0x623, 12 }, - { 0x622, 12 }, - { 0xB, 4 }, - { 0x12, 5 }, - { 0x3D, 6 }, - { 0x22, 6 }, - { 0x15, 6 }, - { 0xB, 5 }, - { 0x23, 6 }, - { 0x7, 4 }, - { 0x10, 5 } + { 10, 3 }, { 9, 3 }, { 14, 4 }, { 18, 6 }, { 27, 6 }, { 28, 5 }, + { 3, 7 }, { 6, 12 }, { 5, 12 }, { 22, 12 }, { 21, 12 }, { 20, 10 }, + { 4, 9 }, { 19, 8 }, { 2, 7 }, { 8, 7 }, { 15, 5 }, { 30, 4 }, + { 31, 5 }, { 26, 6 }, { 29, 6 }, { 24, 5 }, { 16, 6 }, { 17, 6 }, + { 0, 4 }, { 23, 4 }, { 13, 4 }, { 12, 4 }, { 11, 4 }, { 1, 6 }, + { 25, 6 }, { 7, 5 }, }, { /* AC bias group 3, table 2 */ - { 0xF, 4 }, - { 0xC, 5 }, - { 0x43, 7 }, - { 0x10, 6 }, - { 0x44, 8 }, - { 0x114, 10 }, - { 0x455, 12 }, - { 0x18, 5 }, - { 0x23, 7 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0xE, 4 }, - { 0xD, 4 }, - { 0x9, 4 }, - { 0x19, 5 }, - { 0x9, 5 }, - { 0x17, 6 }, - { 0x16, 6 }, - { 0x42, 7 }, - { 0x8B, 9 }, - { 0x454, 12 }, - { 0x457, 12 }, - { 0x456, 12 }, - { 0xB, 4 }, - { 0x15, 5 }, - { 0xA, 5 }, - { 0x29, 6 }, - { 0x20, 6 }, - { 0xD, 5 }, - { 0x28, 6 }, - { 0x7, 4 }, - { 0x11, 5 } + { 10, 3 }, { 9, 3 }, { 3, 6 }, { 4, 8 }, { 5, 10 }, { 20, 12 }, + { 6, 12 }, { 22, 12 }, { 21, 12 }, { 19, 9 }, { 8, 7 }, { 15, 5 }, + { 25, 5 }, { 17, 6 }, { 16, 6 }, { 1, 5 }, { 28, 5 }, { 30, 4 }, + { 27, 6 }, { 18, 7 }, { 2, 7 }, { 31, 5 }, { 13, 4 }, { 29, 6 }, + { 26, 6 }, { 24, 5 }, { 23, 4 }, { 7, 5 }, { 14, 5 }, { 12, 4 }, + { 11, 4 }, { 0, 4 }, }, { /* AC bias group 3, table 3 */ - { 0x1, 3 }, - { 0x1A, 5 }, - { 0x29, 6 }, - { 0x2A, 6 }, - { 0xA0, 8 }, - { 0x285, 10 }, - { 0x1425, 13 }, - { 0x2, 5 }, - { 0x0, 7 }, - { 0x2, 3 }, - { 0x3, 3 }, - { 0xC, 4 }, - { 0xB, 4 }, - { 0x8, 4 }, - { 0x12, 5 }, - { 0x1, 6 }, - { 0x51, 7 }, - { 0x1, 7 }, - { 0x143, 9 }, - { 0x508, 11 }, - { 0x1424, 13 }, - { 0x1427, 13 }, - { 0x1426, 13 }, - { 0xF, 4 }, - { 0x1C, 5 }, - { 0x3, 5 }, - { 0x37, 6 }, - { 0x2B, 6 }, - { 0x13, 5 }, - { 0x36, 6 }, - { 0x1D, 5 }, - { 0x1, 5 } + { 8, 7 }, { 17, 7 }, { 15, 6 }, { 31, 5 }, { 7, 5 }, { 25, 5 }, + { 0, 3 }, { 9, 3 }, { 10, 3 }, { 13, 4 }, { 14, 5 }, { 28, 5 }, + { 4, 8 }, { 19, 11 }, { 20, 13 }, { 6, 13 }, { 22, 13 }, { 21, 13 }, + { 5, 10 }, { 18, 9 }, { 16, 7 }, { 2, 6 }, { 3, 6 }, { 27, 6 }, + { 12, 4 }, { 11, 4 }, { 1, 5 }, { 29, 6 }, { 26, 6 }, { 24, 5 }, + { 30, 5 }, { 23, 4 }, }, { /* AC bias group 3, table 4 */ - { 0x4, 3 }, - { 0x1F, 5 }, - { 0x3D, 6 }, - { 0x6, 5 }, - { 0x16, 7 }, - { 0x53, 9 }, - { 0x14A, 11 }, - { 0x34, 6 }, - { 0x2A, 8 }, - { 0x2, 3 }, - { 0x3, 3 }, - { 0xB, 4 }, - { 0xC, 4 }, - { 0x1C, 5 }, - { 0x37, 6 }, - { 0x17, 7 }, - { 0x2B, 8 }, - { 0x28, 8 }, - { 0xA4, 10 }, - { 0x52D, 13 }, - { 0x52C, 13 }, - { 0x52F, 13 }, - { 0x52E, 13 }, - { 0x0, 3 }, - { 0x1D, 5 }, - { 0x7, 5 }, - { 0x4, 5 }, - { 0x35, 6 }, - { 0x14, 5 }, - { 0x36, 6 }, - { 0x15, 5 }, - { 0x3C, 6 } + { 23, 3 }, { 26, 5 }, { 17, 8 }, { 18, 10 }, { 6, 11 }, { 20, 13 }, + { 19, 13 }, { 22, 13 }, { 21, 13 }, { 5, 9 }, { 8, 8 }, { 16, 8 }, + { 4, 7 }, { 15, 7 }, { 3, 5 }, { 25, 5 }, { 9, 3 }, { 10, 3 }, + { 0, 3 }, { 28, 5 }, { 30, 5 }, { 11, 4 }, { 12, 4 }, { 7, 6 }, + { 27, 6 }, { 29, 6 }, { 14, 6 }, { 13, 5 }, { 24, 5 }, { 31, 6 }, + { 2, 6 }, { 1, 5 }, }, { /* AC bias group 3, table 5 */ - { 0x4, 3 }, - { 0xA, 4 }, - { 0x7, 5 }, - { 0x1D, 5 }, - { 0x9, 6 }, - { 0x1F3, 9 }, - { 0x7C7, 11 }, - { 0x8, 6 }, - { 0x1F0, 9 }, - { 0x3, 3 }, - { 0x2, 3 }, - { 0xD, 4 }, - { 0xC, 4 }, - { 0x17, 5 }, - { 0x7D, 7 }, - { 0x1F2, 9 }, - { 0x7C6, 11 }, - { 0x7C5, 11 }, - { 0x1F12, 13 }, - { 0x3E27, 14 }, - { 0x3E26, 14 }, - { 0x1F11, 13 }, - { 0x1F10, 13 }, - { 0x0, 3 }, - { 0x1E, 5 }, - { 0x6, 5 }, - { 0x39, 6 }, - { 0x38, 6 }, - { 0x3F, 6 }, - { 0x2C, 6 }, - { 0x5, 5 }, - { 0x2D, 6 } + { 23, 3 }, { 7, 6 }, { 4, 6 }, { 30, 5 }, { 25, 5 }, { 2, 5 }, + { 10, 3 }, { 9, 3 }, { 0, 3 }, { 1, 4 }, { 29, 6 }, { 31, 6 }, + { 13, 5 }, { 12, 4 }, { 11, 4 }, { 27, 6 }, { 26, 6 }, { 3, 5 }, + { 24, 5 }, { 8, 9 }, { 22, 13 }, { 21, 13 }, { 18, 13 }, { 20, 14 }, + { 19, 14 }, { 17, 11 }, { 16, 11 }, { 6, 11 }, { 15, 9 }, { 5, 9 }, + { 14, 7 }, { 28, 6 }, }, { /* AC bias group 3, table 6 */ - { 0x2, 3 }, - { 0x7, 4 }, - { 0x18, 5 }, - { 0x3, 4 }, - { 0x5, 5 }, - { 0x35, 7 }, - { 0x4F, 9 }, - { 0x12, 7 }, - { 0x4E5, 13 }, - { 0x5, 3 }, - { 0x4, 3 }, - { 0xD, 4 }, - { 0xE, 4 }, - { 0x33, 6 }, - { 0x26, 8 }, - { 0x9D, 10 }, - { 0x4E4, 13 }, - { 0x4E7, 13 }, - { 0x4E6, 13 }, - { 0x4E1, 13 }, - { 0x4E0, 13 }, - { 0x4E3, 13 }, - { 0x4E2, 13 }, - { 0x0, 3 }, - { 0x1F, 5 }, - { 0xC, 5 }, - { 0x3D, 6 }, - { 0x3C, 6 }, - { 0x32, 6 }, - { 0x34, 7 }, - { 0x1B, 6 }, - { 0x8, 6 } + { 23, 3 }, { 31, 6 }, { 7, 7 }, { 14, 8 }, { 20, 13 }, { 19, 13 }, + { 22, 13 }, { 21, 13 }, { 16, 13 }, { 8, 13 }, { 18, 13 }, { 17, 13 }, + { 15, 10 }, { 6, 9 }, { 4, 5 }, { 3, 4 }, { 0, 3 }, { 25, 5 }, + { 29, 7 }, { 5, 7 }, { 30, 6 }, { 1, 4 }, { 10, 3 }, { 9, 3 }, + { 2, 5 }, { 28, 6 }, { 13, 6 }, { 11, 4 }, { 12, 4 }, { 27, 6 }, + { 26, 6 }, { 24, 5 }, }, { /* AC bias group 3, table 7 */ - { 0x0, 3 }, - { 0x4, 4 }, - { 0x1C, 5 }, - { 0xF, 4 }, - { 0x2, 4 }, - { 0x7, 5 }, - { 0x75, 7 }, - { 0xE8, 8 }, - { 0x1D2A, 13 }, - { 0x5, 3 }, - { 0x4, 3 }, - { 0xD, 4 }, - { 0xC, 4 }, - { 0x77, 7 }, - { 0xE96, 12 }, - { 0x3A57, 14 }, - { 0x3A56, 14 }, - { 0x3A5D, 14 }, - { 0x3A5C, 14 }, - { 0x3A5F, 14 }, - { 0x3A5E, 14 }, - { 0x1D29, 13 }, - { 0x1D28, 13 }, - { 0x3, 3 }, - { 0x6, 5 }, - { 0xA, 5 }, - { 0x2C, 7 }, - { 0x17, 6 }, - { 0x76, 7 }, - { 0x1D3, 9 }, - { 0x3A4, 10 }, - { 0x2D, 7 } + { 0, 3 }, { 4, 4 }, { 24, 5 }, { 5, 5 }, { 1, 4 }, { 25, 5 }, + { 26, 7 }, { 31, 7 }, { 27, 6 }, { 23, 3 }, { 10, 3 }, { 9, 3 }, + { 12, 4 }, { 11, 4 }, { 2, 5 }, { 7, 8 }, { 30, 10 }, { 22, 13 }, + { 21, 13 }, { 8, 13 }, { 16, 14 }, { 15, 14 }, { 14, 12 }, { 18, 14 }, + { 17, 14 }, { 20, 14 }, { 19, 14 }, { 29, 9 }, { 6, 7 }, { 28, 7 }, + { 13, 7 }, { 3, 4 }, }, { /* AC bias group 3, table 8 */ - { 0xA, 4 }, - { 0x24, 6 }, - { 0xBF, 8 }, - { 0x85, 8 }, - { 0x211, 10 }, - { 0x842, 12 }, - { 0x1087, 13 }, - { 0x18, 5 }, - { 0x20, 6 }, - { 0x1, 3 }, - { 0x2, 3 }, - { 0xE, 4 }, - { 0xD, 4 }, - { 0x7, 4 }, - { 0x13, 5 }, - { 0x25, 6 }, - { 0x5E, 7 }, - { 0x43, 7 }, - { 0xBE, 8 }, - { 0x109, 9 }, - { 0x1086, 13 }, - { 0x841, 12 }, - { 0x840, 12 }, - { 0xF, 4 }, - { 0x1, 4 }, - { 0x11, 5 }, - { 0x0, 5 }, - { 0x2E, 6 }, - { 0x19, 5 }, - { 0x1, 5 }, - { 0x6, 4 }, - { 0x16, 5 } + { 26, 5 }, { 29, 5 }, { 24, 4 }, { 9, 3 }, { 10, 3 }, { 30, 4 }, + { 13, 4 }, { 8, 6 }, { 22, 12 }, { 21, 12 }, { 5, 12 }, { 20, 13 }, + { 6, 13 }, { 4, 10 }, { 19, 9 }, { 3, 8 }, { 17, 7 }, { 25, 5 }, + { 1, 6 }, { 15, 6 }, { 14, 5 }, { 0, 4 }, { 31, 5 }, { 27, 6 }, + { 16, 7 }, { 18, 8 }, { 2, 8 }, { 7, 5 }, { 28, 5 }, { 12, 4 }, + { 11, 4 }, { 23, 4 }, }, { /* AC bias group 3, table 9 */ - { 0x2, 3 }, - { 0xF, 5 }, - { 0x6F, 7 }, - { 0x61, 7 }, - { 0x374, 10 }, - { 0x1BA8, 13 }, - { 0x3753, 14 }, - { 0x12, 5 }, - { 0x36, 6 }, - { 0x0, 3 }, - { 0x1, 3 }, - { 0xA, 4 }, - { 0xB, 4 }, - { 0x1A, 5 }, - { 0x31, 6 }, - { 0x60, 7 }, - { 0xDC, 8 }, - { 0x1BB, 9 }, - { 0x6EB, 11 }, - { 0x1BAB, 13 }, - { 0x3752, 14 }, - { 0x3755, 14 }, - { 0x3754, 14 }, - { 0xE, 4 }, - { 0x6, 4 }, - { 0x13, 5 }, - { 0xE, 5 }, - { 0x3E, 6 }, - { 0x8, 4 }, - { 0x1E, 5 }, - { 0x19, 5 }, - { 0x3F, 6 } + { 9, 3 }, { 10, 3 }, { 0, 3 }, { 24, 4 }, { 26, 5 }, { 1, 5 }, + { 28, 4 }, { 7, 5 }, { 25, 5 }, { 11, 4 }, { 12, 4 }, { 15, 7 }, + { 3, 7 }, { 14, 6 }, { 30, 5 }, { 13, 5 }, { 8, 6 }, { 16, 8 }, + { 4, 10 }, { 5, 13 }, { 20, 14 }, { 6, 14 }, { 22, 14 }, { 21, 14 }, + { 19, 13 }, { 18, 11 }, { 17, 9 }, { 2, 7 }, { 23, 4 }, { 29, 5 }, + { 27, 6 }, { 31, 6 }, }, { /* AC bias group 3, table 10 */ - { 0x3, 3 }, - { 0x1C, 5 }, - { 0x25, 6 }, - { 0x24, 6 }, - { 0x1DA, 9 }, - { 0x1DBD, 13 }, - { 0x3B7C, 14 }, - { 0x3C, 6 }, - { 0x3D, 6 }, - { 0x0, 3 }, - { 0x1, 3 }, - { 0xB, 4 }, - { 0xA, 4 }, - { 0xB, 5 }, - { 0x77, 7 }, - { 0xEC, 8 }, - { 0x3B6, 10 }, - { 0x76E, 11 }, - { 0x1DBF, 13 }, - { 0x76FB, 15 }, - { 0x76FA, 15 }, - { 0x3B79, 14 }, - { 0x3B78, 14 }, - { 0xD, 4 }, - { 0x1F, 5 }, - { 0x13, 5 }, - { 0xA, 5 }, - { 0x8, 5 }, - { 0xC, 4 }, - { 0x8, 4 }, - { 0x9, 5 }, - { 0x3A, 6 } + { 9, 3 }, { 10, 3 }, { 27, 5 }, { 30, 5 }, { 26, 5 }, { 13, 5 }, + { 0, 3 }, { 29, 4 }, { 3, 6 }, { 2, 6 }, { 25, 5 }, { 12, 4 }, + { 11, 4 }, { 28, 4 }, { 23, 4 }, { 1, 5 }, { 31, 6 }, { 15, 8 }, + { 4, 9 }, { 16, 10 }, { 17, 11 }, { 22, 14 }, { 21, 14 }, { 5, 13 }, + { 6, 14 }, { 20, 15 }, { 19, 15 }, { 18, 13 }, { 14, 7 }, { 7, 6 }, + { 8, 6 }, { 24, 5 }, }, { /* AC bias group 3, table 11 */ - { 0x5, 3 }, - { 0x3, 4 }, - { 0x4, 5 }, - { 0x10, 5 }, - { 0x8F, 8 }, - { 0x475, 11 }, - { 0x11D1, 13 }, - { 0x79, 7 }, - { 0x27, 6 }, - { 0x2, 3 }, - { 0x3, 3 }, - { 0x1, 4 }, - { 0x0, 4 }, - { 0x26, 6 }, - { 0x46, 7 }, - { 0x11C, 9 }, - { 0x477, 11 }, - { 0x8ED, 12 }, - { 0x11D0, 13 }, - { 0x11D3, 13 }, - { 0x11D2, 13 }, - { 0x11D9, 13 }, - { 0x11D8, 13 }, - { 0xD, 4 }, - { 0x1F, 5 }, - { 0x12, 5 }, - { 0x5, 5 }, - { 0x3D, 6 }, - { 0xC, 4 }, - { 0xE, 4 }, - { 0x22, 6 }, - { 0x78, 7 } + { 12, 4 }, { 11, 4 }, { 2, 5 }, { 26, 5 }, { 1, 4 }, { 9, 3 }, + { 10, 3 }, { 3, 5 }, { 30, 6 }, { 14, 7 }, { 15, 9 }, { 18, 13 }, + { 6, 13 }, { 20, 13 }, { 19, 13 }, { 5, 11 }, { 22, 13 }, { 21, 13 }, + { 17, 12 }, { 16, 11 }, { 4, 8 }, { 25, 5 }, { 13, 6 }, { 8, 6 }, + { 0, 3 }, { 28, 4 }, { 23, 4 }, { 29, 4 }, { 31, 7 }, { 7, 7 }, + { 27, 6 }, { 24, 5 }, }, { /* AC bias group 3, table 12 */ - { 0x5, 3 }, - { 0xC, 4 }, - { 0x1B, 5 }, - { 0x0, 4 }, - { 0x6, 6 }, - { 0x3E2, 10 }, - { 0x3E3D, 14 }, - { 0xF, 7 }, - { 0x34, 6 }, - { 0x3, 3 }, - { 0x2, 3 }, - { 0x1E, 5 }, - { 0x1D, 5 }, - { 0x7D, 7 }, - { 0x1F0, 9 }, - { 0x7C6, 11 }, - { 0x3E3C, 14 }, - { 0x3E3F, 14 }, - { 0x3E3E, 14 }, - { 0x3E39, 14 }, - { 0x3E38, 14 }, - { 0x3E3B, 14 }, - { 0x3E3A, 14 }, - { 0x8, 4 }, - { 0x1C, 5 }, - { 0x2, 5 }, - { 0x3F, 6 }, - { 0x35, 6 }, - { 0x9, 4 }, - { 0x1, 3 }, - { 0xE, 7 }, - { 0xF9, 8 } + { 3, 4 }, { 25, 5 }, { 4, 6 }, { 30, 7 }, { 7, 7 }, { 29, 3 }, + { 10, 3 }, { 9, 3 }, { 23, 4 }, { 28, 4 }, { 0, 3 }, { 1, 4 }, + { 8, 6 }, { 27, 6 }, { 2, 5 }, { 24, 5 }, { 12, 5 }, { 11, 5 }, + { 14, 9 }, { 5, 10 }, { 15, 11 }, { 20, 14 }, { 19, 14 }, { 22, 14 }, + { 21, 14 }, { 16, 14 }, { 6, 14 }, { 18, 14 }, { 17, 14 }, { 31, 8 }, + { 13, 7 }, { 26, 6 }, }, { /* AC bias group 3, table 13 */ - { 0x4, 3 }, - { 0xB, 4 }, - { 0x1, 4 }, - { 0xA, 4 }, - { 0x1E, 6 }, - { 0xE0, 9 }, - { 0xE1E, 13 }, - { 0x71, 8 }, - { 0x39, 7 }, - { 0x7, 3 }, - { 0x6, 3 }, - { 0xD, 5 }, - { 0xC, 5 }, - { 0x20, 7 }, - { 0x1C2, 10 }, - { 0x1C3F, 14 }, - { 0x1C3E, 14 }, - { 0xE19, 13 }, - { 0xE18, 13 }, - { 0xE1B, 13 }, - { 0xE1A, 13 }, - { 0xE1D, 13 }, - { 0xE1C, 13 }, - { 0x0, 4 }, - { 0x9, 5 }, - { 0x1D, 6 }, - { 0x1F, 6 }, - { 0x11, 6 }, - { 0x5, 4 }, - { 0x1, 3 }, - { 0x43, 8 }, - { 0x42, 8 } + { 23, 4 }, { 2, 4 }, { 29, 3 }, { 13, 7 }, { 31, 8 }, { 30, 8 }, + { 27, 6 }, { 24, 5 }, { 28, 4 }, { 12, 5 }, { 11, 5 }, { 5, 9 }, + { 14, 10 }, { 18, 13 }, { 17, 13 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, + { 21, 13 }, { 6, 13 }, { 16, 14 }, { 15, 14 }, { 7, 8 }, { 8, 7 }, + { 25, 6 }, { 4, 6 }, { 26, 6 }, { 0, 3 }, { 3, 4 }, { 1, 4 }, + { 10, 3 }, { 9, 3 }, }, { /* AC bias group 3, table 14 */ - { 0x4, 3 }, - { 0xD, 4 }, - { 0x7, 4 }, - { 0x2, 3 }, - { 0x14, 5 }, - { 0x16C, 9 }, - { 0x16D1, 13 }, - { 0x2DF, 10 }, - { 0x16E, 9 }, - { 0x0, 2 }, - { 0x7, 3 }, - { 0x2C, 6 }, - { 0x2B, 6 }, - { 0x2DE, 10 }, - { 0x16D0, 13 }, - { 0x16D3, 13 }, - { 0x16D2, 13 }, - { 0x2DB5, 14 }, - { 0x2DB4, 14 }, - { 0x2DB7, 14 }, - { 0x2DB6, 14 }, - { 0x16D9, 13 }, - { 0x16D8, 13 }, - { 0xC, 5 }, - { 0x2A, 6 }, - { 0x5A, 7 }, - { 0x1B, 6 }, - { 0x1A, 6 }, - { 0x17, 5 }, - { 0xC, 4 }, - { 0x5B7, 11 }, - { 0x5B5, 11 } + { 9, 2 }, { 3, 3 }, { 23, 5 }, { 27, 6 }, { 26, 6 }, { 2, 4 }, + { 0, 3 }, { 4, 5 }, { 24, 6 }, { 12, 6 }, { 11, 6 }, { 25, 7 }, + { 5, 9 }, { 14, 13 }, { 6, 13 }, { 16, 13 }, { 15, 13 }, { 31, 11 }, + { 22, 13 }, { 21, 13 }, { 18, 14 }, { 17, 14 }, { 20, 14 }, { 19, 14 }, + { 30, 11 }, { 8, 9 }, { 13, 10 }, { 7, 10 }, { 28, 5 }, { 29, 4 }, + { 1, 4 }, { 10, 3 }, }, { /* AC bias group 3, table 15 */ - { 0x2, 2 }, - { 0xF, 4 }, - { 0x1C, 5 }, - { 0xC, 4 }, - { 0x3B, 6 }, - { 0x1AC, 9 }, - { 0x1AD8, 13 }, - { 0x35B3, 14 }, - { 0x35B2, 14 }, - { 0x1, 2 }, - { 0x0, 2 }, - { 0x69, 7 }, - { 0x68, 7 }, - { 0x35BD, 14 }, - { 0x35BC, 14 }, - { 0x35BF, 14 }, - { 0x35BE, 14 }, - { 0x35B9, 14 }, - { 0x35B8, 14 }, - { 0x35BB, 14 }, - { 0x35BA, 14 }, - { 0x35B5, 14 }, - { 0x35B4, 14 }, - { 0x1A9, 9 }, - { 0x1A8, 9 }, - { 0x35A, 10 }, - { 0xD7, 8 }, - { 0xD5, 8 }, - { 0x3A, 6 }, - { 0x1B, 5 }, - { 0x35B7, 14 }, - { 0x35B6, 14 } + { 10, 2 }, { 9, 2 }, { 0, 2 }, { 3, 4 }, { 12, 7 }, { 11, 7 }, + { 24, 9 }, { 23, 9 }, { 27, 8 }, { 5, 9 }, { 25, 10 }, { 6, 13 }, + { 8, 14 }, { 7, 14 }, { 22, 14 }, { 21, 14 }, { 31, 14 }, { 30, 14 }, + { 18, 14 }, { 17, 14 }, { 20, 14 }, { 19, 14 }, { 14, 14 }, { 13, 14 }, + { 16, 14 }, { 15, 14 }, { 26, 8 }, { 29, 5 }, { 2, 5 }, { 28, 6 }, + { 4, 6 }, { 1, 4 }, }, { /* AC bias group 4, table 0 */ - { 0x0, 3 }, - { 0x10, 5 }, - { 0x72, 7 }, - { 0x71, 7 }, - { 0x154, 9 }, - { 0xAAB, 12 }, - { 0xAA8, 12 }, - { 0x14, 5 }, - { 0x70, 7 }, - { 0x2, 3 }, - { 0x3, 3 }, - { 0xC, 4 }, - { 0xB, 4 }, - { 0x3, 4 }, - { 0x11, 5 }, - { 0x73, 7 }, - { 0x54, 7 }, - { 0xAB, 8 }, - { 0x2AB, 10 }, - { 0x1553, 13 }, - { 0x1552, 13 }, - { 0x1555, 13 }, - { 0x1554, 13 }, - { 0xD, 4 }, - { 0x1E, 5 }, - { 0x12, 5 }, - { 0x3E, 6 }, - { 0x2B, 6 }, - { 0x2, 4 }, - { 0x3F, 6 }, - { 0x1D, 5 }, - { 0x13, 5 } + { 0, 3 }, { 28, 4 }, { 13, 4 }, { 9, 3 }, { 10, 3 }, { 1, 5 }, + { 14, 5 }, { 25, 5 }, { 31, 5 }, { 7, 5 }, { 16, 7 }, { 4, 9 }, + { 6, 12 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, { 5, 12 }, + { 18, 10 }, { 17, 8 }, { 27, 6 }, { 12, 4 }, { 11, 4 }, { 23, 4 }, + { 8, 7 }, { 3, 7 }, { 2, 7 }, { 15, 7 }, { 30, 5 }, { 24, 5 }, + { 26, 6 }, { 29, 6 }, }, { /* AC bias group 4, table 1 */ - { 0x3, 3 }, - { 0x1F, 5 }, - { 0x29, 6 }, - { 0x3D, 6 }, - { 0xC, 7 }, - { 0x69, 10 }, - { 0x345, 13 }, - { 0x2, 5 }, - { 0x28, 6 }, - { 0x2, 3 }, - { 0x1, 3 }, - { 0xE, 4 }, - { 0xC, 4 }, - { 0x15, 5 }, - { 0x7, 6 }, - { 0x1B, 8 }, - { 0x6B, 10 }, - { 0x6A, 10 }, - { 0x344, 13 }, - { 0x347, 13 }, - { 0x346, 13 }, - { 0x1A1, 12 }, - { 0x1A0, 12 }, - { 0xB, 4 }, - { 0x1A, 5 }, - { 0x12, 5 }, - { 0x0, 5 }, - { 0x3C, 6 }, - { 0x8, 4 }, - { 0x1B, 5 }, - { 0x13, 5 }, - { 0x1, 5 } + { 26, 5 }, { 31, 5 }, { 7, 5 }, { 4, 7 }, { 22, 12 }, { 21, 12 }, + { 18, 13 }, { 6, 13 }, { 20, 13 }, { 19, 13 }, { 5, 10 }, { 17, 10 }, + { 16, 10 }, { 15, 8 }, { 14, 6 }, { 10, 3 }, { 9, 3 }, { 0, 3 }, + { 28, 4 }, { 25, 5 }, { 30, 5 }, { 8, 6 }, { 2, 6 }, { 13, 5 }, + { 23, 4 }, { 12, 4 }, { 24, 5 }, { 29, 5 }, { 11, 4 }, { 27, 6 }, + { 3, 6 }, { 1, 5 }, }, { /* AC bias group 4, table 2 */ - { 0x4, 3 }, - { 0x4, 4 }, - { 0x3F, 6 }, - { 0x14, 5 }, - { 0x56, 7 }, - { 0x15C, 9 }, - { 0x15D5, 13 }, - { 0x3C, 6 }, - { 0x2A, 6 }, - { 0x0, 3 }, - { 0x1, 3 }, - { 0xE, 4 }, - { 0xD, 4 }, - { 0xC, 5 }, - { 0xAF, 8 }, - { 0x2BB, 10 }, - { 0x15D4, 13 }, - { 0x15D7, 13 }, - { 0x15D6, 13 }, - { 0x15D1, 13 }, - { 0x15D0, 13 }, - { 0x15D3, 13 }, - { 0x15D2, 13 }, - { 0xB, 4 }, - { 0x19, 5 }, - { 0xD, 5 }, - { 0x3E, 6 }, - { 0x31, 6 }, - { 0x7, 4 }, - { 0x5, 4 }, - { 0x3D, 6 }, - { 0x30, 6 } + { 9, 3 }, { 10, 3 }, { 1, 4 }, { 29, 4 }, { 13, 5 }, { 25, 5 }, + { 28, 4 }, { 0, 3 }, { 3, 5 }, { 8, 6 }, { 4, 7 }, { 5, 9 }, + { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, { 16, 13 }, { 6, 13 }, + { 18, 13 }, { 17, 13 }, { 15, 10 }, { 14, 8 }, { 23, 4 }, { 31, 6 }, + { 27, 6 }, { 24, 5 }, { 12, 4 }, { 11, 4 }, { 7, 6 }, { 30, 6 }, + { 26, 6 }, { 2, 6 }, }, { /* AC bias group 4, table 3 */ - { 0x5, 3 }, - { 0x8, 4 }, - { 0x1A, 5 }, - { 0x0, 4 }, - { 0x36, 6 }, - { 0x11, 8 }, - { 0x106, 12 }, - { 0xA, 7 }, - { 0x6E, 7 }, - { 0x2, 3 }, - { 0x3, 3 }, - { 0x3, 4 }, - { 0x2, 4 }, - { 0x6F, 7 }, - { 0x21, 9 }, - { 0x20F, 13 }, - { 0x20E, 13 }, - { 0x101, 12 }, - { 0x100, 12 }, - { 0x103, 12 }, - { 0x102, 12 }, - { 0x105, 12 }, - { 0x104, 12 }, - { 0xC, 4 }, - { 0x1E, 5 }, - { 0x3, 5 }, - { 0x3E, 6 }, - { 0x3F, 6 }, - { 0x9, 4 }, - { 0xE, 4 }, - { 0xB, 7 }, - { 0x9, 7 } + { 3, 4 }, { 18, 12 }, { 17, 12 }, { 20, 12 }, { 19, 12 }, { 22, 12 }, + { 21, 12 }, { 6, 12 }, { 16, 13 }, { 15, 13 }, { 14, 9 }, { 5, 8 }, + { 31, 7 }, { 7, 7 }, { 30, 7 }, { 25, 5 }, { 12, 4 }, { 11, 4 }, + { 9, 3 }, { 10, 3 }, { 1, 4 }, { 28, 4 }, { 0, 3 }, { 23, 4 }, + { 2, 5 }, { 4, 6 }, { 8, 7 }, { 13, 7 }, { 29, 4 }, { 24, 5 }, + { 26, 6 }, { 27, 6 }, }, { /* AC bias group 4, table 4 */ - { 0x2, 3 }, - { 0xE, 4 }, - { 0x1E, 5 }, - { 0xC, 4 }, - { 0x1F, 5 }, - { 0x6E, 7 }, - { 0xAD, 10 }, - { 0xAF, 10 }, - { 0x14, 7 }, - { 0x4, 3 }, - { 0x3, 3 }, - { 0x1A, 5 }, - { 0x17, 5 }, - { 0x2A, 8 }, - { 0x576, 13 }, - { 0xAEF, 14 }, - { 0xAEE, 14 }, - { 0x571, 13 }, - { 0x570, 13 }, - { 0x573, 13 }, - { 0x572, 13 }, - { 0x575, 13 }, - { 0x574, 13 }, - { 0x3, 4 }, - { 0x16, 5 }, - { 0x4, 5 }, - { 0x36, 6 }, - { 0xB, 6 }, - { 0xA, 4 }, - { 0x0, 3 }, - { 0x6F, 7 }, - { 0xAC, 10 } + { 29, 3 }, { 25, 5 }, { 8, 7 }, { 13, 8 }, { 31, 10 }, { 6, 10 }, + { 18, 13 }, { 17, 13 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, + { 14, 13 }, { 16, 14 }, { 15, 14 }, { 7, 10 }, { 27, 6 }, { 23, 4 }, + { 0, 3 }, { 10, 3 }, { 9, 3 }, { 28, 4 }, { 24, 5 }, { 12, 5 }, + { 3, 4 }, { 11, 5 }, { 26, 6 }, { 5, 7 }, { 30, 7 }, { 1, 4 }, + { 2, 5 }, { 4, 5 }, }, { /* AC bias group 4, table 5 */ - { 0x4, 3 }, - { 0x5, 4 }, - { 0x3, 3 }, - { 0x1, 3 }, - { 0x4, 4 }, - { 0x2F, 6 }, - { 0x526, 11 }, - { 0x1495, 13 }, - { 0xA6, 8 }, - { 0x7, 3 }, - { 0x6, 3 }, - { 0x2D, 6 }, - { 0x2C, 6 }, - { 0x1494, 13 }, - { 0x1497, 13 }, - { 0x1496, 13 }, - { 0x1491, 13 }, - { 0x1490, 13 }, - { 0x1493, 13 }, - { 0x1492, 13 }, - { 0x293D, 14 }, - { 0x293C, 14 }, - { 0x293F, 14 }, - { 0x0, 3 }, - { 0x28, 6 }, - { 0xA5, 8 }, - { 0x148, 9 }, - { 0xA7, 8 }, - { 0x2E, 6 }, - { 0x15, 5 }, - { 0xA4E, 12 }, - { 0x293E, 14 } + { 23, 3 }, { 3, 3 }, { 4, 4 }, { 1, 4 }, { 2, 3 }, { 0, 3 }, + { 24, 6 }, { 26, 9 }, { 17, 13 }, { 16, 13 }, { 19, 13 }, { 18, 13 }, + { 13, 13 }, { 7, 13 }, { 15, 13 }, { 14, 13 }, { 6, 11 }, { 30, 12 }, + { 21, 14 }, { 20, 14 }, { 31, 14 }, { 22, 14 }, { 25, 8 }, { 8, 8 }, + { 27, 8 }, { 29, 5 }, { 12, 6 }, { 11, 6 }, { 28, 6 }, { 5, 6 }, + { 10, 3 }, { 9, 3 }, }, { /* AC bias group 4, table 6 */ - { 0x4, 3 }, - { 0x5, 4 }, - { 0x3, 3 }, - { 0x1, 3 }, - { 0x4, 4 }, - { 0x2F, 6 }, - { 0x526, 11 }, - { 0x1495, 13 }, - { 0xA6, 8 }, - { 0x7, 3 }, - { 0x6, 3 }, - { 0x2D, 6 }, - { 0x2C, 6 }, - { 0x1494, 13 }, - { 0x1497, 13 }, - { 0x1496, 13 }, - { 0x1491, 13 }, - { 0x1490, 13 }, - { 0x1493, 13 }, - { 0x1492, 13 }, - { 0x293D, 14 }, - { 0x293C, 14 }, - { 0x293F, 14 }, - { 0x0, 3 }, - { 0x28, 6 }, - { 0xA5, 8 }, - { 0x148, 9 }, - { 0xA7, 8 }, - { 0x2E, 6 }, - { 0x15, 5 }, - { 0xA4E, 12 }, - { 0x293E, 14 } + { 23, 3 }, { 3, 3 }, { 4, 4 }, { 1, 4 }, { 2, 3 }, { 0, 3 }, + { 24, 6 }, { 26, 9 }, { 17, 13 }, { 16, 13 }, { 19, 13 }, { 18, 13 }, + { 13, 13 }, { 7, 13 }, { 15, 13 }, { 14, 13 }, { 6, 11 }, { 30, 12 }, + { 21, 14 }, { 20, 14 }, { 31, 14 }, { 22, 14 }, { 25, 8 }, { 8, 8 }, + { 27, 8 }, { 29, 5 }, { 12, 6 }, { 11, 6 }, { 28, 6 }, { 5, 6 }, + { 10, 3 }, { 9, 3 }, }, { /* AC bias group 4, table 7 */ - { 0x4, 3 }, - { 0x5, 4 }, - { 0x3, 3 }, - { 0x1, 3 }, - { 0x4, 4 }, - { 0x2F, 6 }, - { 0x526, 11 }, - { 0x1495, 13 }, - { 0xA6, 8 }, - { 0x7, 3 }, - { 0x6, 3 }, - { 0x2D, 6 }, - { 0x2C, 6 }, - { 0x1494, 13 }, - { 0x1497, 13 }, - { 0x1496, 13 }, - { 0x1491, 13 }, - { 0x1490, 13 }, - { 0x1493, 13 }, - { 0x1492, 13 }, - { 0x293D, 14 }, - { 0x293C, 14 }, - { 0x293F, 14 }, - { 0x0, 3 }, - { 0x28, 6 }, - { 0xA5, 8 }, - { 0x148, 9 }, - { 0xA7, 8 }, - { 0x2E, 6 }, - { 0x15, 5 }, - { 0xA4E, 12 }, - { 0x293E, 14 } + { 23, 3 }, { 3, 3 }, { 4, 4 }, { 1, 4 }, { 2, 3 }, { 0, 3 }, + { 24, 6 }, { 26, 9 }, { 17, 13 }, { 16, 13 }, { 19, 13 }, { 18, 13 }, + { 13, 13 }, { 7, 13 }, { 15, 13 }, { 14, 13 }, { 6, 11 }, { 30, 12 }, + { 21, 14 }, { 20, 14 }, { 31, 14 }, { 22, 14 }, { 25, 8 }, { 8, 8 }, + { 27, 8 }, { 29, 5 }, { 12, 6 }, { 11, 6 }, { 28, 6 }, { 5, 6 }, + { 10, 3 }, { 9, 3 }, }, { /* AC bias group 4, table 8 */ - { 0x3, 3 }, - { 0x11, 5 }, - { 0x20, 6 }, - { 0x74, 7 }, - { 0x10D, 9 }, - { 0x863, 12 }, - { 0x860, 12 }, - { 0xA, 5 }, - { 0x75, 7 }, - { 0x1, 3 }, - { 0x0, 3 }, - { 0xB, 4 }, - { 0xA, 4 }, - { 0x18, 5 }, - { 0x38, 6 }, - { 0x42, 7 }, - { 0x10F, 9 }, - { 0x10E, 9 }, - { 0x219, 10 }, - { 0x10C3, 13 }, - { 0x10C2, 13 }, - { 0x10C5, 13 }, - { 0x10C4, 13 }, - { 0xF, 4 }, - { 0x4, 4 }, - { 0x19, 5 }, - { 0xB, 5 }, - { 0x39, 6 }, - { 0x9, 4 }, - { 0x1B, 5 }, - { 0x1A, 5 }, - { 0x3B, 6 } + { 10, 3 }, { 9, 3 }, { 24, 4 }, { 7, 5 }, { 26, 5 }, { 0, 3 }, + { 2, 6 }, { 15, 7 }, { 6, 12 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, + { 21, 13 }, { 5, 12 }, { 18, 10 }, { 4, 9 }, { 17, 9 }, { 16, 9 }, + { 1, 5 }, { 28, 4 }, { 12, 4 }, { 11, 4 }, { 13, 5 }, { 25, 5 }, + { 30, 5 }, { 29, 5 }, { 14, 6 }, { 27, 6 }, { 3, 7 }, { 8, 7 }, + { 31, 6 }, { 23, 4 }, }, { /* AC bias group 4, table 9 */ - { 0x5, 3 }, - { 0x1, 4 }, - { 0x3E, 6 }, - { 0x1, 5 }, - { 0xE2, 8 }, - { 0x1C6F, 13 }, - { 0x38D9, 14 }, - { 0x39, 6 }, - { 0x1F, 6 }, - { 0x2, 3 }, - { 0x1, 3 }, - { 0x9, 4 }, - { 0x8, 4 }, - { 0x0, 5 }, - { 0x70, 7 }, - { 0x1C7, 9 }, - { 0x38C, 10 }, - { 0x71A, 11 }, - { 0x38D8, 14 }, - { 0x38DB, 14 }, - { 0x38DA, 14 }, - { 0x38DD, 14 }, - { 0x38DC, 14 }, - { 0xD, 4 }, - { 0x1D, 5 }, - { 0xE, 5 }, - { 0x3F, 6 }, - { 0x3C, 6 }, - { 0xC, 4 }, - { 0x6, 4 }, - { 0x3D, 6 }, - { 0x1E, 6 } + { 13, 5 }, { 3, 5 }, { 1, 4 }, { 10, 3 }, { 9, 3 }, { 29, 4 }, + { 25, 5 }, { 31, 6 }, { 8, 6 }, { 12, 4 }, { 11, 4 }, { 0, 3 }, + { 28, 4 }, { 23, 4 }, { 14, 7 }, { 4, 8 }, { 16, 10 }, { 17, 11 }, + { 18, 14 }, { 6, 14 }, { 20, 14 }, { 19, 14 }, { 22, 14 }, { 21, 14 }, + { 5, 13 }, { 15, 9 }, { 7, 6 }, { 24, 5 }, { 27, 6 }, { 30, 6 }, + { 2, 6 }, { 26, 6 }, }, { /* AC bias group 4, table 10 */ - { 0x6, 3 }, - { 0xB, 4 }, - { 0x11, 5 }, - { 0x1E, 5 }, - { 0x74, 7 }, - { 0x3AA, 10 }, - { 0x1D5C, 13 }, - { 0x1, 6 }, - { 0x21, 6 }, - { 0x1, 3 }, - { 0x2, 3 }, - { 0x7, 4 }, - { 0x6, 4 }, - { 0x3E, 6 }, - { 0xEB, 8 }, - { 0x1D4, 9 }, - { 0xEAF, 12 }, - { 0x3ABB, 14 }, - { 0x3ABA, 14 }, - { 0x1D59, 13 }, - { 0x1D58, 13 }, - { 0x1D5B, 13 }, - { 0x1D5A, 13 }, - { 0xA, 4 }, - { 0x1C, 5 }, - { 0x1, 5 }, - { 0x3F, 6 }, - { 0x3B, 6 }, - { 0x1, 4 }, - { 0x9, 4 }, - { 0x20, 6 }, - { 0x0, 6 } + { 31, 6 }, { 7, 6 }, { 25, 5 }, { 28, 4 }, { 9, 3 }, { 10, 3 }, + { 12, 4 }, { 11, 4 }, { 30, 6 }, { 8, 6 }, { 2, 5 }, { 29, 4 }, + { 23, 4 }, { 1, 4 }, { 0, 3 }, { 24, 5 }, { 4, 7 }, { 15, 9 }, + { 5, 10 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, { 6, 13 }, + { 18, 14 }, { 17, 14 }, { 16, 12 }, { 14, 8 }, { 27, 6 }, { 3, 5 }, + { 13, 6 }, { 26, 6 }, }, { /* AC bias group 4, table 11 */ - { 0x4, 3 }, - { 0xA, 4 }, - { 0x17, 5 }, - { 0x4, 4 }, - { 0x16, 6 }, - { 0x16A, 9 }, - { 0x16B1, 13 }, - { 0x17, 7 }, - { 0x5B, 7 }, - { 0x6, 3 }, - { 0x7, 3 }, - { 0x1, 4 }, - { 0x0, 4 }, - { 0xA, 6 }, - { 0x2D7, 10 }, - { 0xB5A, 12 }, - { 0x16B0, 13 }, - { 0x16B3, 13 }, - { 0x16B2, 13 }, - { 0x2D6D, 14 }, - { 0x2D6C, 14 }, - { 0x2D6F, 14 }, - { 0x2D6E, 14 }, - { 0x6, 4 }, - { 0xA, 5 }, - { 0x4, 5 }, - { 0x2C, 6 }, - { 0x17, 6 }, - { 0x3, 4 }, - { 0x7, 4 }, - { 0x16, 7 }, - { 0xB4, 8 } + { 12, 4 }, { 11, 4 }, { 25, 5 }, { 13, 6 }, { 30, 7 }, { 7, 7 }, + { 28, 4 }, { 3, 4 }, { 24, 5 }, { 4, 6 }, { 27, 6 }, { 23, 4 }, + { 29, 4 }, { 0, 3 }, { 1, 4 }, { 26, 6 }, { 31, 8 }, { 5, 9 }, + { 16, 13 }, { 6, 13 }, { 18, 13 }, { 17, 13 }, { 15, 12 }, { 20, 14 }, + { 19, 14 }, { 22, 14 }, { 21, 14 }, { 14, 10 }, { 8, 7 }, { 2, 5 }, + { 9, 3 }, { 10, 3 }, }, { /* AC bias group 4, table 12 */ - { 0x5, 3 }, - { 0xD, 4 }, - { 0x5, 4 }, - { 0x9, 4 }, - { 0x33, 6 }, - { 0x193, 9 }, - { 0x192C, 13 }, - { 0x61, 8 }, - { 0x31, 7 }, - { 0x0, 2 }, - { 0x7, 3 }, - { 0x10, 5 }, - { 0x11, 5 }, - { 0xC8, 8 }, - { 0x192F, 13 }, - { 0x325B, 14 }, - { 0x325A, 14 }, - { 0x1929, 13 }, - { 0x1928, 13 }, - { 0x192B, 13 }, - { 0x192A, 13 }, - { 0x325D, 14 }, - { 0x325C, 14 }, - { 0x18, 5 }, - { 0x1A, 6 }, - { 0x1B, 6 }, - { 0x65, 7 }, - { 0x19, 6 }, - { 0x4, 4 }, - { 0x7, 4 }, - { 0x60, 8 }, - { 0x324, 10 } + { 9, 2 }, { 28, 4 }, { 2, 4 }, { 30, 8 }, { 7, 8 }, { 8, 7 }, + { 27, 6 }, { 24, 6 }, { 25, 6 }, { 29, 4 }, { 11, 5 }, { 12, 5 }, + { 3, 4 }, { 0, 3 }, { 23, 5 }, { 13, 8 }, { 31, 10 }, { 18, 13 }, + { 17, 13 }, { 20, 13 }, { 19, 13 }, { 6, 13 }, { 16, 14 }, { 15, 14 }, + { 22, 14 }, { 21, 14 }, { 14, 13 }, { 5, 9 }, { 26, 7 }, { 4, 6 }, + { 1, 4 }, { 10, 3 }, }, { /* AC bias group 4, table 13 */ - { 0x6, 3 }, - { 0x0, 3 }, - { 0x2, 4 }, - { 0xF, 4 }, - { 0x39, 6 }, - { 0x1D9, 9 }, - { 0x1D82, 13 }, - { 0x761, 11 }, - { 0x3BE, 10 }, - { 0x1, 2 }, - { 0x2, 2 }, - { 0xF, 6 }, - { 0xE, 6 }, - { 0x762, 11 }, - { 0x3B07, 14 }, - { 0x3B06, 14 }, - { 0x3B1D, 14 }, - { 0x3B1C, 14 }, - { 0x3B1F, 14 }, - { 0x3B1E, 14 }, - { 0x3B19, 14 }, - { 0x3B18, 14 }, - { 0x3B1B, 14 }, - { 0x38, 6 }, - { 0x1DE, 9 }, - { 0xED, 8 }, - { 0x3BF, 10 }, - { 0xEE, 8 }, - { 0x3A, 6 }, - { 0x6, 5 }, - { 0xEC0, 12 }, - { 0x3B1A, 14 } + { 1, 3 }, { 2, 4 }, { 29, 5 }, { 12, 6 }, { 11, 6 }, { 9, 2 }, + { 10, 2 }, { 0, 3 }, { 23, 6 }, { 4, 6 }, { 28, 6 }, { 30, 12 }, + { 6, 13 }, { 15, 14 }, { 14, 14 }, { 7, 11 }, { 13, 11 }, { 21, 14 }, + { 20, 14 }, { 31, 14 }, { 22, 14 }, { 17, 14 }, { 16, 14 }, { 19, 14 }, + { 18, 14 }, { 5, 9 }, { 25, 8 }, { 27, 8 }, { 24, 9 }, { 8, 10 }, + { 26, 10 }, { 3, 4 }, }, { /* AC bias group 4, table 14 */ - { 0x0, 2 }, - { 0x2, 3 }, - { 0xF, 5 }, - { 0x6, 4 }, - { 0x1C, 6 }, - { 0x1D0, 10 }, - { 0xE8C, 13 }, - { 0x1D1B, 14 }, - { 0x1D1A, 14 }, - { 0x3, 2 }, - { 0x2, 2 }, - { 0xEA, 9 }, - { 0xE9, 9 }, - { 0xE89, 13 }, - { 0xE88, 13 }, - { 0xE8B, 13 }, - { 0xE8A, 13 }, - { 0x1D65, 14 }, - { 0x1D64, 14 }, - { 0x1D67, 14 }, - { 0x1D66, 14 }, - { 0x1D61, 14 }, - { 0x1D60, 14 }, - { 0x3AD, 11 }, - { 0x1D63, 14 }, - { 0x1D62, 14 }, - { 0x1D1D, 14 }, - { 0x1D1C, 14 }, - { 0x3B, 7 }, - { 0x1D7, 10 }, - { 0x1D1F, 14 }, - { 0x1D1E, 14 } + { 0, 2 }, { 1, 3 }, { 3, 4 }, { 4, 6 }, { 5, 10 }, { 14, 13 }, + { 13, 13 }, { 16, 13 }, { 15, 13 }, { 6, 13 }, { 8, 14 }, { 7, 14 }, + { 27, 14 }, { 26, 14 }, { 31, 14 }, { 30, 14 }, { 12, 9 }, { 11, 9 }, + { 22, 14 }, { 21, 14 }, { 25, 14 }, { 24, 14 }, { 18, 14 }, { 17, 14 }, + { 20, 14 }, { 19, 14 }, { 23, 11 }, { 29, 10 }, { 28, 7 }, { 2, 5 }, + { 10, 2 }, { 9, 2 }, }, { /* AC bias group 4, table 15 */ - { 0x2, 2 }, - { 0xF, 4 }, - { 0x1C, 5 }, - { 0xC, 4 }, - { 0x3B, 6 }, - { 0x1AC, 9 }, - { 0x1AD8, 13 }, - { 0x35B3, 14 }, - { 0x35B2, 14 }, - { 0x1, 2 }, - { 0x0, 2 }, - { 0x69, 7 }, - { 0x68, 7 }, - { 0x35BD, 14 }, - { 0x35BC, 14 }, - { 0x35BF, 14 }, - { 0x35BE, 14 }, - { 0x35B9, 14 }, - { 0x35B8, 14 }, - { 0x35BB, 14 }, - { 0x35BA, 14 }, - { 0x35B5, 14 }, - { 0x35B4, 14 }, - { 0x1A9, 9 }, - { 0x1A8, 9 }, - { 0x35A, 10 }, - { 0xD7, 8 }, - { 0xD5, 8 }, - { 0x3A, 6 }, - { 0x1B, 5 }, - { 0x35B7, 14 }, - { 0x35B6, 14 } - } + { 10, 2 }, { 9, 2 }, { 0, 2 }, { 3, 4 }, { 12, 7 }, { 11, 7 }, + { 24, 9 }, { 23, 9 }, { 27, 8 }, { 5, 9 }, { 25, 10 }, { 6, 13 }, + { 8, 14 }, { 7, 14 }, { 22, 14 }, { 21, 14 }, { 31, 14 }, { 30, 14 }, + { 18, 14 }, { 17, 14 }, { 20, 14 }, { 19, 14 }, { 14, 14 }, { 13, 14 }, + { 16, 14 }, { 15, 14 }, { 26, 8 }, { 29, 5 }, { 2, 5 }, { 28, 6 }, + { 4, 6 }, { 1, 4 }, + }, }; #endif /* AVCODEC_VP3DATA_H */ diff --git a/libavcodec/vp4data.h b/libavcodec/vp4data.h index 13c7b7cd5e..156cfd011f 100644 --- a/libavcodec/vp4data.h +++ b/libavcodec/vp4data.h @@ -326,807 +326,647 @@ static const uint8_t vp4_mv_vlc[2][7][63][2] = { } }; -static const uint16_t vp4_bias[5 * 16][32][2] = { +static const uint8_t vp4_bias[5 * 16][32][2] = { { /* DC bias table 0 */ - { 0xC, 5 }, { 0x70, 7 }, { 0x1CA, 9 }, { 0x1CB, 9 }, - { 0x391, 10 }, { 0x1C9B, 13 }, { 0x3935, 14 }, { 0x71, 7 }, - { 0x3934, 14 }, { 0xB, 4 }, { 0xF, 4 }, { 0x19, 5 }, - { 0x2, 4 }, { 0x9, 4 }, { 0x3, 4 }, { 0x1D, 5 }, - { 0x18, 5 }, { 0x7, 4 }, { 0xD, 4 }, { 0x2, 3 }, - { 0x0, 3 }, { 0xA, 4 }, { 0x8, 4 }, { 0x1A, 6 }, - { 0x73, 7 }, { 0x6F, 8 }, { 0xE4C, 12 }, { 0x727, 11 }, - { 0x392, 10 }, { 0x390, 10 }, { 0x36, 7 }, { 0x6E, 8 } + { 20, 3 }, { 12, 4 }, { 14, 4 }, { 19, 3 }, { 0, 5 }, { 23, 6 }, + { 30, 7 }, { 31, 8 }, { 25, 8 }, { 17, 4 }, { 22, 4 }, { 13, 4 }, + { 21, 4 }, { 9, 4 }, { 16, 5 }, { 11, 5 }, { 18, 4 }, { 1, 7 }, + { 7, 7 }, { 29, 10 }, { 4, 10 }, { 28, 10 }, { 26, 12 }, { 8, 14 }, + { 6, 14 }, { 5, 13 }, { 27, 11 }, { 2, 9 }, { 3, 9 }, { 24, 7 }, + { 15, 5 }, { 10, 4 }, }, { /* DC bias table 1 */ - { 0x11, 5 }, { 0x7A, 7 }, { 0x83, 8 }, { 0x40, 7 }, - { 0x105, 9 }, { 0x413, 11 }, { 0x410, 11 }, { 0x7B, 7 }, - { 0x822, 12 }, { 0xE, 4 }, { 0x2, 3 }, { 0x2, 4 }, - { 0x6, 4 }, { 0xA, 4 }, { 0x7, 4 }, { 0x1F, 5 }, - { 0x17, 5 }, { 0x9, 4 }, { 0xD, 4 }, { 0x0, 3 }, - { 0xC, 4 }, { 0x3, 4 }, { 0x3C, 6 }, { 0x2C, 6 }, - { 0x21, 6 }, { 0x169, 9 }, { 0x412, 11 }, { 0x2D0, 10 }, - { 0x2D1, 10 }, { 0x823, 12 }, { 0x5B, 7 }, { 0xB5, 8 } + { 19, 3 }, { 11, 4 }, { 21, 4 }, { 10, 3 }, { 12, 4 }, { 14, 4 }, + { 3, 7 }, { 6, 11 }, { 8, 12 }, { 29, 12 }, { 26, 11 }, { 5, 11 }, + { 4, 9 }, { 2, 8 }, { 24, 6 }, { 0, 5 }, { 17, 4 }, { 13, 4 }, + { 23, 6 }, { 27, 10 }, { 28, 10 }, { 25, 9 }, { 31, 8 }, { 30, 7 }, + { 16, 5 }, { 20, 4 }, { 18, 4 }, { 9, 4 }, { 22, 6 }, { 1, 7 }, + { 7, 7 }, { 15, 5 }, }, { /* DC bias table 2 */ - { 0x17, 5 }, { 0x10, 6 }, { 0xB6, 8 }, { 0x22, 7 }, - { 0x16A, 9 }, { 0x2D0, 10 }, { 0xB48, 12 }, { 0x77, 7 }, - { 0x1692, 13 }, { 0x0, 3 }, { 0x3, 3 }, { 0x3, 4 }, - { 0x9, 4 }, { 0xC, 4 }, { 0x5, 4 }, { 0x2, 4 }, - { 0x1C, 5 }, { 0x8, 4 }, { 0xD, 4 }, { 0xF, 4 }, - { 0xA, 4 }, { 0x9, 5 }, { 0x23, 7 }, { 0x3A, 6 }, - { 0x2C, 6 }, { 0x16B, 9 }, { 0x5A5, 11 }, { 0x2D3, 10 }, - { 0x2D1, 10 }, { 0x1693, 13 }, { 0x76, 7 }, { 0xB7, 8 } + { 9, 3 }, { 15, 4 }, { 11, 4 }, { 1, 6 }, { 3, 7 }, { 22, 7 }, + { 21, 5 }, { 14, 4 }, { 10, 3 }, { 17, 4 }, { 12, 4 }, { 20, 4 }, + { 24, 6 }, { 5, 10 }, { 28, 10 }, { 6, 12 }, { 8, 13 }, { 29, 13 }, + { 26, 11 }, { 27, 10 }, { 4, 9 }, { 25, 9 }, { 2, 8 }, { 31, 8 }, + { 0, 5 }, { 13, 4 }, { 18, 4 }, { 16, 5 }, { 23, 6 }, { 30, 7 }, + { 7, 7 }, { 19, 4 }, }, { /* DC bias table 3 */ - { 0x1E, 5 }, { 0x13, 6 }, { 0xFB, 8 }, { 0x7C, 7 }, - { 0x46, 8 }, { 0x7D6, 11 }, { 0xFA9, 12 }, { 0x12, 6 }, - { 0x1F50, 13 }, { 0x1, 3 }, { 0x4, 3 }, { 0x5, 4 }, - { 0xA, 4 }, { 0xE, 4 }, { 0x7, 4 }, { 0x0, 4 }, - { 0x17, 5 }, { 0x6, 4 }, { 0xD, 4 }, { 0xC, 4 }, - { 0x1, 4 }, { 0x2C, 6 }, { 0x8F, 9 }, { 0x3F, 6 }, - { 0x2D, 6 }, { 0x1F4, 9 }, { 0x7D5, 11 }, { 0x8E, 9 }, - { 0x7D7, 11 }, { 0x1F51, 13 }, { 0x10, 6 }, { 0x22, 7 } + { 15, 4 }, { 20, 4 }, { 9, 3 }, { 30, 6 }, { 31, 7 }, { 4, 8 }, + { 27, 9 }, { 22, 9 }, { 7, 6 }, { 1, 6 }, { 11, 4 }, { 17, 4 }, + { 14, 4 }, { 10, 3 }, { 12, 4 }, { 21, 6 }, { 24, 6 }, { 16, 5 }, + { 19, 4 }, { 18, 4 }, { 13, 4 }, { 0, 5 }, { 3, 7 }, { 25, 9 }, + { 8, 13 }, { 29, 13 }, { 6, 12 }, { 26, 11 }, { 5, 11 }, { 28, 11 }, + { 2, 8 }, { 23, 6 }, }, { /* DC bias table 4 */ - { 0x1, 4 }, { 0x2B, 6 }, { 0x12, 7 }, { 0x55, 7 }, - { 0x27, 8 }, { 0x3B0, 10 }, { 0x762, 11 }, { 0x77, 7 }, - { 0x261, 12 }, { 0x2, 3 }, { 0x6, 3 }, { 0x7, 4 }, - { 0xB, 4 }, { 0xF, 4 }, { 0x8, 4 }, { 0x0, 4 }, - { 0x1C, 5 }, { 0x3, 4 }, { 0x9, 4 }, { 0x6, 4 }, - { 0x14, 5 }, { 0x54, 7 }, { 0x131, 11 }, { 0x5, 5 }, - { 0x3A, 6 }, { 0x1D9, 9 }, { 0x99, 10 }, { 0x4D, 9 }, - { 0x763, 11 }, { 0x260, 12 }, { 0x8, 6 }, { 0xED, 8 } + { 15, 4 }, { 0, 4 }, { 30, 6 }, { 2, 7 }, { 29, 12 }, { 8, 12 }, + { 22, 11 }, { 26, 10 }, { 27, 9 }, { 4, 8 }, { 23, 5 }, { 17, 4 }, + { 9, 3 }, { 19, 4 }, { 11, 4 }, { 14, 4 }, { 18, 4 }, { 20, 5 }, + { 21, 7 }, { 3, 7 }, { 1, 6 }, { 12, 4 }, { 10, 3 }, { 16, 5 }, + { 24, 6 }, { 5, 10 }, { 6, 11 }, { 28, 11 }, { 25, 9 }, { 31, 8 }, + { 7, 7 }, { 13, 4 }, }, { /* DC bias table 5 */ - { 0x4, 4 }, { 0x33, 6 }, { 0x60, 7 }, { 0x65, 7 }, - { 0xC2, 8 }, { 0x30D, 10 }, { 0x619, 11 }, { 0x64, 7 }, - { 0x1862, 13 }, { 0x4, 3 }, { 0x7, 3 }, { 0xA, 4 }, - { 0xB, 4 }, { 0xD, 4 }, { 0x6, 4 }, { 0x0, 4 }, - { 0xF, 5 }, { 0x3, 4 }, { 0x5, 4 }, { 0x2, 4 }, - { 0x2, 5 }, { 0x77, 8 }, { 0xC30, 12 }, { 0x3, 5 }, - { 0x31, 6 }, { 0x187, 9 }, { 0x1D9, 10 }, { 0xED, 9 }, - { 0x1D8, 10 }, { 0x1863, 13 }, { 0x1C, 6 }, { 0x3A, 7 } + { 15, 4 }, { 20, 5 }, { 23, 5 }, { 19, 4 }, { 17, 4 }, { 0, 4 }, + { 18, 4 }, { 14, 4 }, { 30, 6 }, { 31, 7 }, { 28, 10 }, { 26, 10 }, + { 27, 9 }, { 21, 8 }, { 16, 5 }, { 9, 3 }, { 11, 4 }, { 12, 4 }, + { 2, 7 }, { 4, 8 }, { 22, 12 }, { 8, 13 }, { 29, 13 }, { 6, 11 }, + { 5, 10 }, { 25, 9 }, { 24, 6 }, { 7, 7 }, { 3, 7 }, { 1, 6 }, + { 13, 4 }, { 10, 3 }, }, { /* DC bias table 6 */ - { 0x8, 4 }, { 0xA, 5 }, { 0x6A, 7 }, { 0x16, 6 }, - { 0x1E, 7 }, { 0x34E, 10 }, { 0x69F, 11 }, { 0x68, 7 }, - { 0xD28, 12 }, { 0x5, 3 }, { 0x7, 3 }, { 0x7, 4 }, - { 0xC, 4 }, { 0x0, 3 }, { 0x6, 4 }, { 0x1B, 5 }, - { 0x12, 5 }, { 0x2, 4 }, { 0x4, 4 }, { 0x13, 5 }, - { 0xE, 6 }, { 0x34B, 10 }, { 0x1A53, 13 }, { 0x6, 5 }, - { 0x17, 6 }, { 0x1A6, 9 }, { 0x69E, 11 }, { 0x1A4, 9 }, - { 0x695, 11 }, { 0x1A52, 13 }, { 0x6B, 7 }, { 0x1F, 7 } + { 13, 3 }, { 17, 4 }, { 23, 5 }, { 20, 6 }, { 4, 7 }, { 31, 7 }, + { 18, 4 }, { 1, 5 }, { 3, 6 }, { 24, 6 }, { 14, 4 }, { 11, 4 }, + { 0, 4 }, { 16, 5 }, { 19, 5 }, { 9, 3 }, { 12, 4 }, { 7, 7 }, + { 27, 9 }, { 8, 12 }, { 29, 13 }, { 22, 13 }, { 28, 11 }, { 21, 10 }, + { 25, 9 }, { 5, 10 }, { 26, 11 }, { 6, 11 }, { 2, 7 }, { 30, 7 }, + { 15, 5 }, { 10, 3 }, }, { /* DC bias table 7 */ - { 0xE, 4 }, { 0xF, 5 }, { 0x17, 6 }, { 0x25, 6 }, - { 0x9F, 8 }, { 0x138, 9 }, { 0x24B, 10 }, { 0x93, 8 }, - { 0x92A, 12 }, { 0x5, 3 }, { 0x0, 2 }, { 0x8, 4 }, - { 0xD, 4 }, { 0xF, 4 }, { 0x6, 4 }, { 0x4, 4 }, - { 0xE, 5 }, { 0x19, 5 }, { 0x18, 5 }, { 0xA, 5 }, - { 0x9E, 8 }, { 0x494, 11 }, { 0x1256, 13 }, { 0x26, 6 }, - { 0x16, 6 }, { 0x124, 9 }, { 0x4E5, 11 }, { 0x273, 10 }, - { 0x4E4, 11 }, { 0x1257, 13 }, { 0x48, 7 }, { 0x9D, 8 } + { 10, 2 }, { 15, 4 }, { 19, 5 }, { 24, 6 }, { 2, 6 }, { 14, 4 }, + { 16, 5 }, { 1, 5 }, { 11, 4 }, { 30, 7 }, { 25, 9 }, { 21, 11 }, + { 8, 12 }, { 22, 13 }, { 29, 13 }, { 6, 10 }, { 7, 8 }, { 3, 6 }, + { 23, 6 }, { 5, 9 }, { 28, 11 }, { 26, 11 }, { 27, 10 }, { 31, 8 }, + { 20, 8 }, { 4, 8 }, { 9, 3 }, { 18, 5 }, { 17, 5 }, { 12, 4 }, + { 0, 4 }, { 13, 4 }, }, { /* DC bias table 8 */ - { 0x4, 4 }, { 0x2C, 6 }, { 0x50, 7 }, { 0x1E, 7 }, - { 0x71, 9 }, { 0xE1, 10 }, { 0xE0, 10 }, { 0x1D, 7 }, - { 0x6, 6 }, { 0x7, 3 }, { 0x6, 3 }, { 0x7, 4 }, - { 0x5, 4 }, { 0x6, 4 }, { 0x15, 5 }, { 0x0, 5 }, - { 0x29, 6 }, { 0x2, 5 }, { 0x6, 5 }, { 0x1, 5 }, - { 0x23, 6 }, { 0x1F, 7 }, { 0x39, 8 }, { 0x9, 4 }, - { 0x2, 4 }, { 0x10, 5 }, { 0x7, 6 }, { 0x2D, 6 }, - { 0x2F, 6 }, { 0x2E, 6 }, { 0x22, 6 }, { 0x51, 7 } + { 15, 5 }, { 19, 5 }, { 17, 5 }, { 8, 6 }, { 26, 6 }, { 24, 4 }, + { 18, 5 }, { 6, 10 }, { 5, 10 }, { 4, 9 }, { 22, 8 }, { 7, 7 }, + { 3, 7 }, { 21, 7 }, { 0, 4 }, { 12, 4 }, { 13, 4 }, { 11, 4 }, + { 25, 5 }, { 30, 6 }, { 20, 6 }, { 23, 4 }, { 2, 7 }, { 31, 7 }, + { 16, 6 }, { 14, 5 }, { 1, 6 }, { 27, 6 }, { 29, 6 }, { 28, 6 }, + { 10, 3 }, { 9, 3 }, }, { /* DC bias table 9 */ - { 0x8, 4 }, { 0x2F, 6 }, { 0x51, 7 }, { 0x50, 7 }, - { 0x2ED, 10 }, { 0x5D9, 11 }, { 0x5D8, 11 }, { 0xBA, 8 }, - { 0x5C, 7 }, { 0x7, 3 }, { 0x6, 3 }, { 0x9, 4 }, - { 0x6, 4 }, { 0x7, 4 }, { 0x16, 5 }, { 0x5, 5 }, - { 0x2B, 6 }, { 0x6, 5 }, { 0xA, 5 }, { 0x1, 5 }, - { 0xF, 6 }, { 0x1D, 7 }, { 0x177, 9 }, { 0x4, 4 }, - { 0x1, 4 }, { 0x4, 5 }, { 0x1, 6 }, { 0x2A, 6 }, - { 0xB, 5 }, { 0x29, 6 }, { 0x0, 6 }, { 0x1C, 7 } + { 30, 6 }, { 26, 6 }, { 19, 5 }, { 24, 4 }, { 25, 5 }, { 15, 5 }, + { 17, 5 }, { 31, 7 }, { 21, 7 }, { 20, 6 }, { 23, 4 }, { 18, 5 }, + { 28, 5 }, { 12, 4 }, { 13, 4 }, { 0, 4 }, { 11, 4 }, { 3, 7 }, + { 2, 7 }, { 29, 6 }, { 27, 6 }, { 16, 6 }, { 14, 5 }, { 8, 7 }, + { 7, 8 }, { 6, 11 }, { 5, 11 }, { 4, 10 }, { 22, 9 }, { 1, 6 }, + { 10, 3 }, { 9, 3 }, }, { /* DC bias table 10 */ - { 0xA, 4 }, { 0x3C, 6 }, { 0x74, 7 }, { 0x4E, 7 }, - { 0x26D, 10 }, { 0x4D9, 11 }, { 0x4D8, 11 }, { 0x9A, 8 }, - { 0x4C, 7 }, { 0x0, 2 }, { 0x6, 3 }, { 0x8, 4 }, - { 0x7, 4 }, { 0x6, 4 }, { 0x16, 5 }, { 0x8, 5 }, - { 0x2E, 6 }, { 0xA, 5 }, { 0xB, 5 }, { 0x3D, 6 }, - { 0x24, 6 }, { 0xEB, 8 }, { 0x137, 9 }, { 0x1F, 5 }, - { 0x1C, 5 }, { 0x3B, 6 }, { 0x12, 6 }, { 0x25, 6 }, - { 0x2F, 6 }, { 0x13, 6 }, { 0x4F, 7 }, { 0xEA, 8 } + { 9, 2 }, { 15, 5 }, { 26, 6 }, { 29, 6 }, { 17, 5 }, { 18, 5 }, + { 13, 4 }, { 12, 4 }, { 11, 4 }, { 20, 6 }, { 27, 6 }, { 8, 7 }, + { 7, 8 }, { 6, 11 }, { 5, 11 }, { 4, 10 }, { 22, 9 }, { 3, 7 }, + { 30, 7 }, { 0, 4 }, { 14, 5 }, { 16, 6 }, { 28, 6 }, { 10, 3 }, + { 24, 5 }, { 2, 7 }, { 31, 8 }, { 21, 8 }, { 25, 6 }, { 1, 6 }, + { 19, 6 }, { 23, 5 }, }, { /* DC bias table 11 */ - { 0xA, 4 }, { 0xA, 5 }, { 0x3, 6 }, { 0x16, 6 }, - { 0x9, 8 }, { 0x21, 10 }, { 0x20, 10 }, { 0xB3, 8 }, - { 0x58, 7 }, { 0x7, 3 }, { 0x6, 3 }, { 0x7, 4 }, - { 0x6, 4 }, { 0x4, 4 }, { 0x13, 5 }, { 0x2, 5 }, - { 0x25, 6 }, { 0x0, 5 }, { 0x3, 5 }, { 0x2D, 6 }, - { 0x5D, 7 }, { 0xB2, 8 }, { 0x11, 9 }, { 0x8, 4 }, - { 0x2, 4 }, { 0x6, 5 }, { 0x17, 6 }, { 0x2F, 6 }, - { 0x7, 5 }, { 0x24, 6 }, { 0x5C, 7 }, { 0x5, 7 } + { 17, 5 }, { 6, 10 }, { 5, 10 }, { 22, 9 }, { 4, 8 }, { 31, 7 }, + { 2, 6 }, { 15, 5 }, { 18, 5 }, { 24, 4 }, { 25, 5 }, { 28, 5 }, + { 13, 4 }, { 1, 5 }, { 3, 6 }, { 26, 6 }, { 12, 4 }, { 11, 4 }, + { 23, 4 }, { 29, 6 }, { 16, 6 }, { 14, 5 }, { 0, 4 }, { 8, 7 }, + { 21, 8 }, { 7, 8 }, { 19, 6 }, { 30, 7 }, { 20, 7 }, { 27, 6 }, + { 10, 3 }, { 9, 3 }, }, { /* DC bias table 12 */ - { 0xB, 4 }, { 0x13, 5 }, { 0x1F, 6 }, { 0x31, 6 }, - { 0x21, 7 }, { 0x295, 10 }, { 0x528, 11 }, { 0xA4, 8 }, - { 0x3C, 7 }, { 0x0, 2 }, { 0x7, 3 }, { 0x6, 4 }, - { 0x5, 4 }, { 0x1B, 5 }, { 0x12, 5 }, { 0x32, 6 }, - { 0x1D, 6 }, { 0x2B, 6 }, { 0x30, 6 }, { 0x1C, 6 }, - { 0x3D, 7 }, { 0x14B, 9 }, { 0x529, 11 }, { 0x8, 4 }, - { 0x1A, 5 }, { 0x33, 6 }, { 0x11, 6 }, { 0x2A, 6 }, - { 0x9, 5 }, { 0x28, 6 }, { 0x53, 7 }, { 0x20, 7 } + { 9, 2 }, { 31, 7 }, { 4, 7 }, { 26, 6 }, { 28, 5 }, { 12, 4 }, + { 11, 4 }, { 19, 6 }, { 16, 6 }, { 8, 7 }, { 20, 7 }, { 2, 6 }, + { 23, 4 }, { 14, 5 }, { 1, 5 }, { 29, 6 }, { 7, 8 }, { 6, 11 }, + { 22, 11 }, { 5, 10 }, { 21, 9 }, { 30, 7 }, { 27, 6 }, { 17, 6 }, + { 0, 4 }, { 18, 6 }, { 3, 6 }, { 15, 6 }, { 25, 6 }, { 24, 5 }, + { 13, 5 }, { 10, 3 }, }, { /* DC bias table 13 */ - { 0xE, 4 }, { 0x15, 5 }, { 0x29, 6 }, { 0x3F, 6 }, - { 0x4D, 7 }, { 0x2F1, 10 }, { 0x5E0, 11 }, { 0x92, 8 }, - { 0x48, 7 }, { 0x0, 2 }, { 0x6, 3 }, { 0x6, 4 }, - { 0x5, 4 }, { 0x4, 4 }, { 0xF, 5 }, { 0x2E, 6 }, - { 0x1D, 6 }, { 0x28, 6 }, { 0x27, 6 }, { 0x5F, 7 }, - { 0xBD, 8 }, { 0x179, 9 }, { 0x5E1, 11 }, { 0x8, 4 }, - { 0x1E, 5 }, { 0x2D, 6 }, { 0x1C, 6 }, { 0x2C, 6 }, - { 0x3E, 6 }, { 0x25, 6 }, { 0x4C, 7 }, { 0x93, 8 } + { 9, 2 }, { 13, 4 }, { 12, 4 }, { 11, 4 }, { 26, 6 }, { 16, 6 }, + { 14, 5 }, { 23, 4 }, { 8, 7 }, { 7, 8 }, { 31, 8 }, { 29, 6 }, + { 30, 7 }, { 4, 7 }, { 18, 6 }, { 17, 6 }, { 2, 6 }, { 1, 5 }, + { 27, 6 }, { 25, 6 }, { 15, 6 }, { 6, 11 }, { 22, 11 }, { 5, 10 }, + { 21, 9 }, { 20, 8 }, { 19, 7 }, { 10, 3 }, { 0, 4 }, { 24, 5 }, + { 28, 6 }, { 3, 6 }, }, { /* DC bias table 14 */ - { 0xC, 4 }, { 0x17, 5 }, { 0x35, 6 }, { 0x13, 5 }, - { 0x21, 6 }, { 0xAD, 8 }, { 0x6F1, 11 }, { 0x1BD, 9 }, - { 0xD9, 8 }, { 0x0, 2 }, { 0x7, 3 }, { 0x7, 4 }, - { 0x6, 4 }, { 0x4, 4 }, { 0x11, 5 }, { 0x2A, 6 }, - { 0x6E, 7 }, { 0x25, 6 }, { 0x24, 6 }, { 0x57, 7 }, - { 0xD8, 8 }, { 0x379, 10 }, { 0x6F0, 11 }, { 0x5, 4 }, - { 0x16, 5 }, { 0x29, 6 }, { 0x6D, 7 }, { 0x28, 6 }, - { 0x34, 6 }, { 0x20, 6 }, { 0xDF, 8 }, { 0xAC, 8 } + { 9, 2 }, { 13, 4 }, { 23, 4 }, { 12, 4 }, { 11, 4 }, { 29, 6 }, + { 4, 6 }, { 14, 5 }, { 18, 6 }, { 17, 6 }, { 3, 5 }, { 27, 6 }, + { 25, 6 }, { 15, 6 }, { 31, 8 }, { 5, 8 }, { 19, 7 }, { 24, 5 }, + { 1, 5 }, { 0, 4 }, { 28, 6 }, { 2, 6 }, { 20, 8 }, { 8, 8 }, + { 26, 7 }, { 16, 7 }, { 22, 11 }, { 6, 11 }, { 21, 10 }, { 7, 9 }, + { 30, 8 }, { 10, 3 }, }, { /* DC bias table 15 */ - { 0x0, 3 }, { 0x1A, 5 }, { 0x6, 5 }, { 0x19, 5 }, - { 0x30, 6 }, { 0x5A, 7 }, { 0x18A, 9 }, { 0x2DD, 10 }, - { 0x18B, 9 }, { 0x1, 2 }, { 0x7, 3 }, { 0xA, 4 }, - { 0x9, 4 }, { 0x2, 4 }, { 0x10, 5 }, { 0x2E, 6 }, - { 0x6E, 7 }, { 0x2C, 6 }, { 0xE, 6 }, { 0x5E, 7 }, - { 0xC4, 8 }, { 0x5B9, 11 }, { 0x5B8, 11 }, { 0x11, 5 }, - { 0x36, 6 }, { 0x5F, 7 }, { 0x1E, 7 }, { 0x63, 7 }, - { 0x6F, 7 }, { 0x1F, 7 }, { 0xB6, 8 }, { 0x16F, 9 } + { 0, 3 }, { 13, 4 }, { 2, 5 }, { 18, 6 }, { 26, 7 }, { 29, 7 }, + { 9, 2 }, { 14, 5 }, { 23, 5 }, { 12, 4 }, { 11, 4 }, { 17, 6 }, + { 5, 7 }, { 30, 8 }, { 22, 11 }, { 21, 11 }, { 7, 10 }, { 31, 9 }, + { 15, 6 }, { 19, 7 }, { 25, 7 }, { 4, 6 }, { 20, 8 }, { 6, 9 }, + { 8, 9 }, { 27, 7 }, { 3, 5 }, { 1, 5 }, { 24, 6 }, { 16, 7 }, + { 28, 7 }, { 10, 3 }, }, { /* AC bias group 1, table 0 */ - { 0x6, 5 }, { 0x1E, 7 }, { 0x1CC, 9 }, { 0x1CE, 9 }, - { 0x734, 11 }, { 0x1CD5, 13 }, { 0x1CD4, 13 }, { 0x18, 5 }, - { 0xE6B, 12 }, { 0x0, 3 }, { 0xF, 4 }, { 0x6, 4 }, - { 0x7, 4 }, { 0xD, 4 }, { 0x8, 4 }, { 0x2, 4 }, - { 0x19, 5 }, { 0x5, 4 }, { 0xB, 4 }, { 0xA, 4 }, - { 0x1D, 5 }, { 0x27, 6 }, { 0x1CF, 9 }, { 0x4, 4 }, - { 0x38, 6 }, { 0xE, 6 }, { 0x4C, 7 }, { 0x1F, 7 }, - { 0x4D, 7 }, { 0x39B, 10 }, { 0x12, 5 }, { 0x72, 7 } + { 9, 3 }, { 15, 4 }, { 0, 5 }, { 25, 6 }, { 1, 7 }, { 27, 7 }, + { 23, 4 }, { 17, 4 }, { 11, 4 }, { 12, 4 }, { 14, 4 }, { 30, 5 }, + { 26, 7 }, { 28, 7 }, { 21, 6 }, { 19, 4 }, { 18, 4 }, { 7, 5 }, + { 16, 5 }, { 13, 4 }, { 24, 6 }, { 31, 7 }, { 2, 9 }, { 4, 11 }, + { 6, 13 }, { 5, 13 }, { 8, 12 }, { 29, 10 }, { 3, 9 }, { 22, 9 }, + { 20, 5 }, { 10, 4 }, }, { /* AC bias group 1, table 1 */ - { 0x9, 5 }, { 0x4B, 7 }, { 0x90, 8 }, { 0x91, 8 }, - { 0x745, 11 }, { 0x1D11, 13 }, { 0x1D10, 13 }, { 0x19, 5 }, - { 0xE89, 12 }, { 0x0, 3 }, { 0xF, 4 }, { 0x8, 4 }, - { 0x7, 4 }, { 0xD, 4 }, { 0xB, 4 }, { 0x2, 4 }, - { 0x1C, 5 }, { 0x3, 4 }, { 0xA, 4 }, { 0x5, 4 }, - { 0x18, 5 }, { 0x10, 6 }, { 0x1D0, 9 }, { 0x6, 4 }, - { 0x3B, 6 }, { 0x11, 6 }, { 0x4A, 7 }, { 0x49, 7 }, - { 0xE9, 8 }, { 0x3A3, 10 }, { 0x13, 5 }, { 0x75, 7 } + { 9, 3 }, { 15, 4 }, { 17, 4 }, { 21, 6 }, { 25, 6 }, { 0, 5 }, + { 19, 4 }, { 23, 4 }, { 12, 4 }, { 11, 4 }, { 2, 8 }, { 3, 8 }, + { 27, 7 }, { 26, 7 }, { 1, 7 }, { 30, 5 }, { 18, 4 }, { 14, 4 }, + { 20, 5 }, { 7, 5 }, { 13, 4 }, { 16, 5 }, { 22, 9 }, { 6, 13 }, + { 5, 13 }, { 8, 12 }, { 4, 11 }, { 29, 10 }, { 28, 8 }, { 31, 7 }, + { 24, 6 }, { 10, 4 }, }, { /* AC bias group 1, table 2 */ - { 0x19, 5 }, { 0x74, 7 }, { 0x1D, 8 }, { 0xEA, 8 }, - { 0x73, 10 }, { 0x1CA, 12 }, { 0x396, 13 }, { 0x1C, 5 }, - { 0xE4, 11 }, { 0x2, 3 }, { 0x1, 3 }, { 0x7, 4 }, - { 0x8, 4 }, { 0xD, 4 }, { 0x9, 4 }, { 0x1F, 5 }, - { 0x18, 5 }, { 0x0, 4 }, { 0x6, 4 }, { 0x1E, 5 }, - { 0x3B, 6 }, { 0xEB, 8 }, { 0x397, 13 }, { 0xA, 4 }, - { 0x2, 5 }, { 0x2C, 6 }, { 0x5B, 7 }, { 0x5A, 7 }, - { 0xF, 7 }, { 0x38, 9 }, { 0x17, 5 }, { 0x6, 6 } + { 17, 4 }, { 24, 5 }, { 31, 6 }, { 29, 9 }, { 8, 11 }, { 5, 12 }, + { 6, 13 }, { 22, 13 }, { 4, 10 }, { 2, 8 }, { 28, 7 }, { 10, 3 }, + { 9, 3 }, { 18, 4 }, { 11, 4 }, { 12, 4 }, { 14, 4 }, { 23, 4 }, + { 25, 6 }, { 27, 7 }, { 26, 7 }, { 30, 5 }, { 16, 5 }, { 0, 5 }, + { 13, 4 }, { 7, 5 }, { 1, 7 }, { 3, 8 }, { 21, 8 }, { 20, 6 }, + { 19, 5 }, { 15, 5 }, }, { /* AC bias group 1, table 3 */ - { 0x1E, 5 }, { 0x6F, 7 }, { 0xAE, 8 }, { 0xAF, 8 }, - { 0x187, 10 }, { 0x61B, 12 }, { 0xC35, 13 }, { 0x1A, 5 }, - { 0x30C, 11 }, { 0x2, 3 }, { 0x1, 3 }, { 0x7, 4 }, - { 0x8, 4 }, { 0xE, 4 }, { 0x9, 4 }, { 0x1F, 5 }, - { 0x14, 5 }, { 0x0, 4 }, { 0x1, 4 }, { 0x19, 5 }, - { 0x2A, 6 }, { 0x60, 8 }, { 0xC34, 13 }, { 0xB, 4 }, - { 0xD, 5 }, { 0x36, 6 }, { 0x6E, 7 }, { 0x56, 7 }, - { 0x31, 7 }, { 0xC2, 9 }, { 0x18, 5 }, { 0x19, 6 } + { 17, 4 }, { 18, 4 }, { 10, 3 }, { 9, 3 }, { 21, 8 }, { 29, 9 }, + { 8, 11 }, { 22, 13 }, { 6, 13 }, { 5, 12 }, { 4, 10 }, { 28, 7 }, + { 31, 6 }, { 24, 5 }, { 11, 4 }, { 12, 4 }, { 14, 4 }, { 16, 5 }, + { 20, 6 }, { 27, 7 }, { 2, 8 }, { 3, 8 }, { 23, 4 }, { 30, 5 }, + { 19, 5 }, { 7, 5 }, { 25, 6 }, { 26, 7 }, { 1, 7 }, { 13, 4 }, + { 0, 5 }, { 15, 5 }, }, { /* AC bias group 1, table 4 */ - { 0x1, 4 }, { 0x2C, 6 }, { 0x5, 7 }, { 0x15, 7 }, - { 0x8, 8 }, { 0x97, 12 }, { 0x12D, 13 }, { 0x17, 5 }, - { 0x4A, 11 }, { 0x3, 3 }, { 0x2, 3 }, { 0x9, 4 }, - { 0xA, 4 }, { 0xE, 4 }, { 0x8, 4 }, { 0x1F, 5 }, - { 0x7, 5 }, { 0x1E, 5 }, { 0x1B, 5 }, { 0x4, 5 }, - { 0x5A, 7 }, { 0x24, 10 }, { 0x12C, 13 }, { 0xC, 4 }, - { 0x6, 5 }, { 0x0, 5 }, { 0x3, 6 }, { 0x5B, 7 }, - { 0x14, 7 }, { 0x13, 9 }, { 0x1A, 5 }, { 0xB, 6 } + { 25, 5 }, { 4, 8 }, { 21, 10 }, { 8, 11 }, { 22, 13 }, { 6, 13 }, + { 5, 12 }, { 29, 9 }, { 2, 7 }, { 26, 6 }, { 0, 4 }, { 19, 5 }, + { 28, 7 }, { 3, 7 }, { 31, 6 }, { 24, 5 }, { 16, 5 }, { 10, 3 }, + { 9, 3 }, { 14, 4 }, { 11, 4 }, { 12, 4 }, { 1, 6 }, { 20, 7 }, + { 27, 7 }, { 7, 5 }, { 23, 4 }, { 30, 5 }, { 18, 5 }, { 13, 4 }, + { 17, 5 }, { 15, 5 }, }, { /* AC bias group 1, table 5 */ - { 0x4, 4 }, { 0x0, 5 }, { 0x17, 7 }, { 0x63, 7 }, - { 0x18B, 9 }, { 0x310, 10 }, { 0xC44, 12 }, { 0x19, 5 }, - { 0x623, 11 }, { 0x4, 3 }, { 0x3, 3 }, { 0xA, 4 }, - { 0xB, 4 }, { 0xD, 4 }, { 0x3, 4 }, { 0x1C, 5 }, - { 0x3, 5 }, { 0xA, 5 }, { 0x4, 5 }, { 0x3, 6 }, - { 0x18A, 9 }, { 0x188B, 13 }, { 0x188A, 13 }, { 0xF, 4 }, - { 0xB, 5 }, { 0x2, 5 }, { 0xA, 6 }, { 0x2, 6 }, - { 0x16, 7 }, { 0x189, 9 }, { 0x1D, 5 }, { 0x30, 6 } + { 1, 5 }, { 27, 6 }, { 19, 6 }, { 25, 5 }, { 16, 5 }, { 18, 5 }, + { 26, 6 }, { 28, 7 }, { 2, 7 }, { 14, 4 }, { 0, 4 }, { 17, 5 }, + { 24, 5 }, { 10, 3 }, { 9, 3 }, { 11, 4 }, { 12, 4 }, { 31, 6 }, + { 5, 10 }, { 6, 12 }, { 22, 13 }, { 21, 13 }, { 8, 11 }, { 29, 9 }, + { 20, 9 }, { 4, 9 }, { 3, 7 }, { 7, 5 }, { 13, 4 }, { 15, 5 }, + { 30, 5 }, { 23, 4 }, }, { /* AC bias group 1, table 6 */ - { 0xD, 4 }, { 0x3, 5 }, { 0x77, 7 }, { 0xD, 6 }, - { 0x82, 8 }, { 0x20D, 10 }, { 0x830, 12 }, { 0x19, 5 }, - { 0x419, 11 }, { 0x3, 3 }, { 0x2, 3 }, { 0xA, 4 }, - { 0x9, 4 }, { 0xB, 4 }, { 0x2, 4 }, { 0x11, 5 }, - { 0x39, 6 }, { 0x2, 5 }, { 0x21, 6 }, { 0x40, 7 }, - { 0x1063, 13 }, { 0x20C5, 14 }, { 0x20C4, 14 }, { 0xF, 4 }, - { 0x18, 5 }, { 0x7, 5 }, { 0x38, 6 }, { 0xC, 6 }, - { 0x76, 7 }, { 0x107, 9 }, { 0x0, 4 }, { 0x3A, 6 } + { 30, 4 }, { 17, 5 }, { 1, 5 }, { 14, 4 }, { 27, 6 }, { 3, 6 }, + { 25, 5 }, { 10, 3 }, { 9, 3 }, { 19, 7 }, { 4, 8 }, { 6, 12 }, + { 22, 14 }, { 21, 14 }, { 20, 13 }, { 8, 11 }, { 5, 10 }, { 29, 9 }, + { 18, 6 }, { 15, 5 }, { 12, 4 }, { 11, 4 }, { 13, 4 }, { 24, 5 }, + { 7, 5 }, { 0, 4 }, { 26, 6 }, { 16, 6 }, { 31, 6 }, { 28, 7 }, + { 2, 7 }, { 23, 4 }, }, { /* AC bias group 1, table 7 */ - { 0xF, 4 }, { 0x1C, 5 }, { 0x36, 6 }, { 0x8, 5 }, - { 0x61, 7 }, { 0x91, 8 }, { 0x243, 10 }, { 0x9, 5 }, - { 0x120, 9 }, { 0x5, 3 }, { 0x3, 3 }, { 0x8, 4 }, - { 0x5, 4 }, { 0x1, 4 }, { 0x13, 5 }, { 0x31, 6 }, - { 0x76, 7 }, { 0x60, 7 }, { 0x93, 8 }, { 0x909, 12 }, - { 0x908, 12 }, { 0x90B, 12 }, { 0x90A, 12 }, { 0x1, 3 }, - { 0x1A, 5 }, { 0x19, 5 }, { 0x3A, 6 }, { 0x25, 6 }, - { 0x77, 7 }, { 0x92, 8 }, { 0x0, 4 }, { 0x37, 6 } + { 30, 4 }, { 13, 4 }, { 23, 3 }, { 3, 5 }, { 7, 5 }, { 12, 4 }, + { 10, 3 }, { 11, 4 }, { 8, 9 }, { 20, 12 }, { 19, 12 }, { 22, 12 }, + { 21, 12 }, { 6, 10 }, { 5, 8 }, { 29, 8 }, { 18, 8 }, { 27, 6 }, + { 14, 5 }, { 9, 3 }, { 17, 7 }, { 4, 7 }, { 15, 6 }, { 25, 5 }, + { 24, 5 }, { 2, 6 }, { 31, 6 }, { 1, 5 }, { 26, 6 }, { 16, 7 }, + { 28, 7 }, { 0, 4 }, }, { /* AC bias group 1, table 8 */ - { 0x1F, 5 }, { 0x79, 7 }, { 0xF1, 8 }, { 0xF0, 8 }, - { 0x11B, 10 }, { 0x469, 12 }, { 0x468, 12 }, { 0x3B, 6 }, - { 0x22, 7 }, { 0x5, 3 }, { 0x4, 3 }, { 0x7, 4 }, - { 0x5, 4 }, { 0x6, 4 }, { 0x1C, 5 }, { 0x1, 5 }, - { 0x35, 6 }, { 0x3D, 6 }, { 0x3A, 6 }, { 0x10, 6 }, - { 0x47, 8 }, { 0x8C, 9 }, { 0x235, 11 }, { 0x1, 3 }, - { 0x1, 4 }, { 0x19, 5 }, { 0x0, 5 }, { 0x30, 6 }, - { 0x9, 5 }, { 0x31, 6 }, { 0x1B, 5 }, { 0x34, 6 } + { 26, 5 }, { 15, 5 }, { 24, 4 }, { 23, 3 }, { 19, 6 }, { 8, 7 }, + { 21, 9 }, { 6, 12 }, { 5, 12 }, { 22, 11 }, { 4, 10 }, { 20, 8 }, + { 28, 5 }, { 12, 4 }, { 13, 4 }, { 11, 4 }, { 10, 3 }, { 9, 3 }, + { 27, 6 }, { 29, 6 }, { 25, 5 }, { 31, 6 }, { 16, 6 }, { 30, 5 }, + { 14, 5 }, { 18, 6 }, { 7, 6 }, { 3, 8 }, { 2, 8 }, { 1, 7 }, + { 17, 6 }, { 0, 5 }, }, { /* AC bias group 1, table 9 */ - { 0x3, 4 }, { 0x1B, 6 }, { 0xF3, 8 }, { 0xFD, 8 }, - { 0x3C9, 10 }, { 0xF20, 12 }, { 0x1E42, 13 }, { 0x3D, 6 }, - { 0xFC, 8 }, { 0x6, 3 }, { 0x4, 3 }, { 0x2, 4 }, - { 0x0, 4 }, { 0x1, 4 }, { 0x17, 5 }, { 0x3E, 6 }, - { 0x1A, 6 }, { 0x39, 6 }, { 0x2B, 6 }, { 0x78, 7 }, - { 0x1E5, 9 }, { 0x791, 11 }, { 0x1E43, 13 }, { 0x2, 3 }, - { 0x7, 4 }, { 0x1D, 5 }, { 0xC, 5 }, { 0x38, 6 }, - { 0x14, 5 }, { 0x7F, 7 }, { 0x16, 5 }, { 0x2A, 6 } + { 12, 4 }, { 13, 4 }, { 11, 4 }, { 0, 4 }, { 23, 3 }, { 26, 5 }, + { 16, 6 }, { 1, 6 }, { 24, 4 }, { 10, 3 }, { 28, 5 }, { 31, 6 }, + { 18, 6 }, { 30, 5 }, { 14, 5 }, { 9, 3 }, { 27, 6 }, { 17, 6 }, + { 25, 5 }, { 19, 7 }, { 5, 12 }, { 6, 13 }, { 22, 13 }, { 21, 11 }, + { 4, 10 }, { 20, 9 }, { 2, 8 }, { 7, 6 }, { 15, 6 }, { 8, 8 }, + { 3, 8 }, { 29, 7 }, }, { /* AC bias group 1, table 10 */ - { 0x7, 4 }, { 0x39, 6 }, { 0x51, 7 }, { 0x78, 7 }, - { 0x3CB, 10 }, { 0xF29, 12 }, { 0x1E51, 13 }, { 0x3D, 6 }, - { 0xF3, 8 }, { 0x6, 3 }, { 0x4, 3 }, { 0x2, 4 }, - { 0x0, 4 }, { 0x1, 4 }, { 0x17, 5 }, { 0x3E, 6 }, - { 0x7F, 7 }, { 0x2B, 6 }, { 0x7E, 7 }, { 0x50, 7 }, - { 0x1E4, 9 }, { 0x795, 11 }, { 0x1E50, 13 }, { 0x2, 3 }, - { 0x6, 4 }, { 0x1D, 5 }, { 0x6, 5 }, { 0x38, 6 }, - { 0x7, 5 }, { 0x29, 6 }, { 0x16, 5 }, { 0x2A, 6 } + { 12, 4 }, { 13, 4 }, { 11, 4 }, { 26, 5 }, { 28, 5 }, { 23, 3 }, + { 24, 4 }, { 0, 4 }, { 10, 3 }, { 19, 7 }, { 2, 7 }, { 29, 6 }, + { 31, 6 }, { 17, 6 }, { 30, 5 }, { 14, 5 }, { 9, 3 }, { 27, 6 }, + { 1, 6 }, { 25, 5 }, { 3, 7 }, { 20, 9 }, { 22, 13 }, { 6, 13 }, + { 5, 12 }, { 21, 11 }, { 4, 10 }, { 8, 8 }, { 7, 6 }, { 15, 6 }, + { 18, 7 }, { 16, 7 }, }, { /* AC bias group 1, table 11 */ - { 0x8, 4 }, { 0x3B, 6 }, { 0x1D, 7 }, { 0x72, 7 }, - { 0x1CC, 9 }, { 0x734, 11 }, { 0x1CD5, 13 }, { 0x3A, 6 }, - { 0x1C, 7 }, { 0x6, 3 }, { 0x5, 3 }, { 0x2, 4 }, - { 0x1, 4 }, { 0x0, 4 }, { 0x12, 5 }, { 0x3E, 6 }, - { 0x7F, 7 }, { 0x1E, 6 }, { 0x7E, 7 }, { 0xE7, 8 }, - { 0x39B, 10 }, { 0xE6B, 12 }, { 0x1CD4, 13 }, { 0x2, 3 }, - { 0x6, 4 }, { 0x1E, 5 }, { 0xE, 5 }, { 0x38, 6 }, - { 0x6, 5 }, { 0xF, 6 }, { 0x13, 5 }, { 0x1F, 6 } + { 13, 4 }, { 12, 4 }, { 11, 4 }, { 28, 5 }, { 8, 7 }, { 2, 7 }, + { 29, 6 }, { 23, 3 }, { 24, 4 }, { 26, 5 }, { 17, 6 }, { 31, 6 }, + { 0, 4 }, { 14, 5 }, { 30, 5 }, { 10, 3 }, { 9, 3 }, { 27, 6 }, + { 3, 7 }, { 4, 9 }, { 5, 11 }, { 22, 13 }, { 6, 13 }, { 21, 12 }, + { 20, 10 }, { 19, 8 }, { 7, 6 }, { 1, 6 }, { 25, 5 }, { 15, 6 }, + { 18, 7 }, { 16, 7 }, }, { /* AC bias group 1, table 12 */ - { 0xD, 4 }, { 0x3F, 6 }, { 0x73, 7 }, { 0xC, 6 }, - { 0xE4, 8 }, { 0x72B, 11 }, { 0xE54, 12 }, { 0x3A, 6 }, - { 0x1A, 7 }, { 0x5, 3 }, { 0x4, 3 }, { 0x2, 4 }, - { 0x1, 4 }, { 0x0, 4 }, { 0x7, 5 }, { 0x38, 6 }, - { 0x76, 7 }, { 0x77, 7 }, { 0x1B, 7 }, { 0x1CB, 9 }, - { 0x394, 10 }, { 0x1CAB, 13 }, { 0x1CAA, 13 }, { 0x2, 3 }, - { 0x6, 4 }, { 0x1E, 5 }, { 0xE, 5 }, { 0x3E, 6 }, - { 0x19, 5 }, { 0x1F, 6 }, { 0x18, 5 }, { 0x1E, 6 } + { 13, 4 }, { 12, 4 }, { 11, 4 }, { 3, 6 }, { 8, 7 }, { 18, 7 }, + { 14, 5 }, { 23, 3 }, { 24, 4 }, { 26, 5 }, { 31, 6 }, { 29, 6 }, + { 10, 3 }, { 9, 3 }, { 30, 5 }, { 28, 5 }, { 0, 4 }, { 15, 6 }, + { 4, 8 }, { 20, 10 }, { 6, 12 }, { 22, 13 }, { 21, 13 }, { 5, 11 }, + { 19, 9 }, { 2, 7 }, { 7, 6 }, { 16, 7 }, { 17, 7 }, { 25, 5 }, + { 27, 6 }, { 1, 6 }, }, { /* AC bias group 1, table 13 */ - { 0xE, 4 }, { 0x7, 5 }, { 0xC, 6 }, { 0x1C, 6 }, - { 0xBD, 8 }, { 0x2F3, 10 }, { 0xBC9, 12 }, { 0x1F, 6 }, - { 0xBF, 8 }, { 0x6, 3 }, { 0x4, 3 }, { 0x2, 4 }, - { 0x1, 4 }, { 0x1E, 5 }, { 0x1, 5 }, { 0xD, 6 }, - { 0x3A, 7 }, { 0x3B, 7 }, { 0xBE, 8 }, { 0x178, 9 }, - { 0x5E5, 11 }, { 0x1791, 13 }, { 0x1790, 13 }, { 0x2, 3 }, - { 0x6, 4 }, { 0x1F, 5 }, { 0x16, 5 }, { 0x0, 5 }, - { 0x15, 5 }, { 0x2E, 6 }, { 0x14, 5 }, { 0x1E, 6 } + { 27, 5 }, { 14, 5 }, { 12, 4 }, { 11, 4 }, { 2, 6 }, { 15, 6 }, + { 1, 5 }, { 23, 3 }, { 24, 4 }, { 3, 6 }, { 16, 7 }, { 17, 7 }, + { 31, 6 }, { 7, 6 }, { 10, 3 }, { 30, 5 }, { 28, 5 }, { 26, 5 }, + { 29, 6 }, { 19, 9 }, { 22, 13 }, { 21, 13 }, { 6, 12 }, { 20, 11 }, + { 5, 10 }, { 4, 8 }, { 18, 8 }, { 8, 8 }, { 9, 3 }, { 0, 4 }, + { 13, 5 }, { 25, 5 }, }, { /* AC bias group 1, table 14 */ - { 0x0, 3 }, { 0x1B, 5 }, { 0x31, 6 }, { 0x3A, 6 }, - { 0x60, 7 }, { 0x6F, 9 }, { 0x1B9, 11 }, { 0xE, 6 }, - { 0x1A, 7 }, { 0x5, 3 }, { 0x3, 3 }, { 0x2, 4 }, - { 0x1F, 5 }, { 0x1A, 5 }, { 0x39, 6 }, { 0xC, 6 }, - { 0xC3, 8 }, { 0xC2, 8 }, { 0x36, 8 }, { 0xDD, 10 }, - { 0x370, 12 }, { 0x6E3, 13 }, { 0x6E2, 13 }, { 0x2, 3 }, - { 0x8, 4 }, { 0x1E, 5 }, { 0x19, 5 }, { 0x3B, 6 }, - { 0x12, 5 }, { 0xF, 6 }, { 0x13, 5 }, { 0x38, 6 } + { 0, 3 }, { 11, 4 }, { 15, 6 }, { 8, 7 }, { 18, 8 }, { 20, 12 }, + { 22, 13 }, { 21, 13 }, { 6, 11 }, { 19, 10 }, { 5, 9 }, { 7, 6 }, + { 29, 6 }, { 23, 3 }, { 10, 3 }, { 24, 4 }, { 28, 5 }, { 30, 5 }, + { 9, 3 }, { 4, 7 }, { 17, 8 }, { 16, 8 }, { 2, 6 }, { 26, 5 }, + { 13, 5 }, { 1, 5 }, { 31, 6 }, { 14, 6 }, { 3, 6 }, { 27, 6 }, + { 25, 5 }, { 12, 5 }, }, { /* AC bias group 1, table 15 */ - { 0x2, 3 }, { 0x0, 4 }, { 0x3, 5 }, { 0x1C, 5 }, - { 0x32, 6 }, { 0x1C, 7 }, { 0x199, 9 }, { 0x4, 6 }, - { 0xCD, 8 }, { 0x4, 3 }, { 0x3, 3 }, { 0x1B, 5 }, - { 0x1A, 5 }, { 0x3D, 6 }, { 0x67, 7 }, { 0x3B, 8 }, - { 0x198, 9 }, { 0x75, 9 }, { 0xE9, 10 }, { 0x3A1, 12 }, - { 0x3A0, 12 }, { 0x3A3, 12 }, { 0x3A2, 12 }, { 0x5, 3 }, - { 0x2, 4 }, { 0x1F, 5 }, { 0x1D, 5 }, { 0x3C, 6 }, - { 0x18, 5 }, { 0xF, 6 }, { 0x6, 5 }, { 0x5, 6 } + { 1, 4 }, { 7, 6 }, { 31, 6 }, { 2, 5 }, { 24, 4 }, { 30, 5 }, + { 5, 7 }, { 20, 12 }, { 19, 12 }, { 22, 12 }, { 21, 12 }, { 18, 10 }, + { 17, 9 }, { 15, 8 }, { 29, 6 }, { 0, 3 }, { 10, 3 }, { 9, 3 }, + { 23, 3 }, { 28, 5 }, { 4, 6 }, { 16, 9 }, { 6, 9 }, { 8, 8 }, + { 14, 7 }, { 12, 5 }, { 11, 5 }, { 3, 5 }, { 26, 5 }, { 27, 6 }, + { 13, 6 }, { 25, 5 }, }, { /* AC bias group 2, table 0 */ - { 0x4, 5 }, { 0xF5, 8 }, { 0x182, 9 }, { 0x60F, 11 }, - { 0x1839, 13 }, { 0x1838, 13 }, { 0x183B, 13 }, { 0x13, 5 }, - { 0xC0, 8 }, { 0x3, 3 }, { 0x2, 3 }, { 0xB, 4 }, - { 0xA, 4 }, { 0xE, 4 }, { 0x8, 4 }, { 0x1, 4 }, - { 0x12, 5 }, { 0x1F, 5 }, { 0x0, 4 }, { 0x6, 5 }, - { 0x7B, 7 }, { 0x306, 10 }, { 0x183A, 13 }, { 0xD, 4 }, - { 0x7, 5 }, { 0x31, 6 }, { 0xA, 6 }, { 0x61, 7 }, - { 0x3C, 6 }, { 0xF4, 8 }, { 0x19, 5 }, { 0xB, 6 } + { 18, 4 }, { 15, 4 }, { 0, 5 }, { 26, 6 }, { 31, 6 }, { 19, 5 }, + { 24, 5 }, { 10, 3 }, { 9, 3 }, { 14, 4 }, { 16, 5 }, { 7, 5 }, + { 12, 4 }, { 11, 4 }, { 8, 8 }, { 2, 9 }, { 21, 10 }, { 5, 13 }, + { 4, 13 }, { 22, 13 }, { 6, 13 }, { 3, 11 }, { 27, 7 }, { 25, 6 }, + { 30, 5 }, { 23, 4 }, { 13, 4 }, { 28, 6 }, { 29, 8 }, { 1, 8 }, + { 20, 7 }, { 17, 5 }, }, { /* AC bias group 2, table 1 */ - { 0xA, 5 }, { 0x1A, 7 }, { 0x1D8, 9 }, { 0x3B3, 10 }, - { 0xECA, 12 }, { 0x1D96, 13 }, { 0x3B2F, 14 }, { 0x14, 5 }, - { 0x36, 8 }, { 0x4, 3 }, { 0x3, 3 }, { 0xC, 4 }, - { 0xB, 4 }, { 0x0, 3 }, { 0x4, 4 }, { 0x1C, 5 }, - { 0x5, 5 }, { 0x15, 5 }, { 0x7, 5 }, { 0x17, 6 }, - { 0x37, 8 }, { 0x764, 11 }, { 0x3B2E, 14 }, { 0xF, 4 }, - { 0x1A, 5 }, { 0x3A, 6 }, { 0xC, 6 }, { 0x77, 7 }, - { 0x4, 5 }, { 0xED, 8 }, { 0x1B, 5 }, { 0x16, 6 } + { 13, 3 }, { 28, 5 }, { 16, 5 }, { 26, 6 }, { 1, 7 }, { 8, 8 }, + { 20, 8 }, { 18, 5 }, { 14, 4 }, { 0, 5 }, { 31, 6 }, { 19, 6 }, + { 10, 3 }, { 9, 3 }, { 7, 5 }, { 17, 5 }, { 12, 4 }, { 11, 4 }, + { 24, 5 }, { 30, 5 }, { 15, 5 }, { 25, 6 }, { 2, 9 }, { 21, 11 }, + { 4, 12 }, { 5, 13 }, { 22, 14 }, { 6, 14 }, { 3, 10 }, { 29, 8 }, + { 27, 7 }, { 23, 4 }, }, { /* AC bias group 2, table 2 */ - { 0x1A, 5 }, { 0x2D, 7 }, { 0x58, 8 }, { 0x1F4, 9 }, - { 0x7D4, 11 }, { 0x1F55, 13 }, { 0x1F54, 13 }, { 0x14, 5 }, - { 0x59, 8 }, { 0x4, 3 }, { 0x3, 3 }, { 0xB, 4 }, - { 0xC, 4 }, { 0xE, 4 }, { 0x4, 4 }, { 0x15, 5 }, - { 0x5, 5 }, { 0x7, 5 }, { 0x4, 5 }, { 0x7C, 7 }, - { 0x3EB, 10 }, { 0x1F57, 13 }, { 0x1F56, 13 }, { 0x0, 3 }, - { 0x1B, 5 }, { 0x3F, 6 }, { 0xD, 6 }, { 0xC, 6 }, - { 0xA, 5 }, { 0xFB, 8 }, { 0x1E, 5 }, { 0x17, 6 } + { 23, 3 }, { 18, 5 }, { 16, 5 }, { 27, 6 }, { 26, 6 }, { 17, 5 }, + { 14, 4 }, { 28, 5 }, { 2, 8 }, { 8, 8 }, { 1, 7 }, { 31, 6 }, + { 10, 3 }, { 9, 3 }, { 7, 5 }, { 15, 5 }, { 11, 4 }, { 12, 4 }, + { 0, 5 }, { 24, 5 }, { 13, 4 }, { 30, 5 }, { 19, 7 }, { 3, 9 }, + { 4, 11 }, { 6, 13 }, { 5, 13 }, { 22, 13 }, { 21, 13 }, { 20, 10 }, + { 29, 8 }, { 25, 6 }, }, { /* AC bias group 2, table 3 */ - { 0x0, 4 }, { 0x75, 7 }, { 0x4A, 8 }, { 0x97, 9 }, - { 0x25B, 11 }, { 0x969, 13 }, { 0x968, 13 }, { 0xB, 5 }, - { 0xE8, 8 }, { 0x5, 3 }, { 0x4, 3 }, { 0x7, 4 }, - { 0xC, 4 }, { 0xD, 4 }, { 0x1, 4 }, { 0xA, 5 }, - { 0x39, 6 }, { 0x3B, 6 }, { 0x18, 6 }, { 0xE9, 8 }, - { 0x12C, 10 }, { 0x96B, 13 }, { 0x96A, 13 }, { 0x1, 3 }, - { 0x1F, 5 }, { 0x8, 5 }, { 0x19, 6 }, { 0x13, 6 }, - { 0xD, 5 }, { 0x24, 7 }, { 0x1E, 5 }, { 0x38, 6 } + { 0, 4 }, { 14, 4 }, { 23, 3 }, { 25, 5 }, { 29, 7 }, { 2, 8 }, + { 20, 10 }, { 6, 13 }, { 5, 13 }, { 22, 13 }, { 21, 13 }, { 4, 11 }, + { 3, 9 }, { 27, 6 }, { 15, 5 }, { 7, 5 }, { 18, 6 }, { 26, 6 }, + { 28, 5 }, { 11, 4 }, { 10, 3 }, { 9, 3 }, { 12, 4 }, { 13, 4 }, + { 31, 6 }, { 16, 6 }, { 8, 8 }, { 19, 8 }, { 1, 7 }, { 17, 6 }, + { 30, 5 }, { 24, 5 }, }, { /* AC bias group 2, table 4 */ - { 0x4, 4 }, { 0x14, 6 }, { 0x6E, 8 }, { 0x57, 8 }, - { 0x159, 10 }, { 0x562, 12 }, { 0xAC7, 13 }, { 0xB, 5 }, - { 0x6F, 8 }, { 0x6, 3 }, { 0x5, 3 }, { 0x8, 4 }, - { 0x9, 4 }, { 0x7, 4 }, { 0x1E, 5 }, { 0x2, 5 }, - { 0x7, 6 }, { 0x6, 6 }, { 0x2A, 7 }, { 0xAD, 9 }, - { 0xAC6, 13 }, { 0x561, 12 }, { 0x560, 12 }, { 0x1, 3 }, - { 0x1F, 5 }, { 0xC, 5 }, { 0x39, 6 }, { 0x1A, 6 }, - { 0x0, 4 }, { 0x36, 7 }, { 0x1D, 5 }, { 0x38, 6 } + { 28, 4 }, { 15, 5 }, { 17, 6 }, { 16, 6 }, { 23, 3 }, { 0, 4 }, + { 1, 6 }, { 18, 7 }, { 22, 12 }, { 21, 12 }, { 5, 12 }, { 20, 13 }, + { 6, 13 }, { 4, 10 }, { 19, 9 }, { 3, 8 }, { 7, 5 }, { 25, 5 }, + { 27, 6 }, { 29, 7 }, { 2, 8 }, { 8, 8 }, { 13, 4 }, { 11, 4 }, + { 12, 4 }, { 10, 3 }, { 9, 3 }, { 31, 6 }, { 26, 6 }, { 30, 5 }, + { 14, 5 }, { 24, 5 }, }, { /* AC bias group 2, table 5 */ - { 0x7, 4 }, { 0x1B, 6 }, { 0xE, 7 }, { 0xD, 7 }, - { 0x3E1, 10 }, { 0x1F06, 13 }, { 0x3E0F, 14 }, { 0x2, 5 }, - { 0xF9, 8 }, { 0x5, 3 }, { 0x6, 3 }, { 0x8, 4 }, - { 0x9, 4 }, { 0x4, 4 }, { 0xC, 5 }, { 0x1A, 6 }, - { 0xF, 7 }, { 0xC, 7 }, { 0x1F1, 9 }, { 0x7C0, 11 }, - { 0x3E0E, 14 }, { 0x1F05, 13 }, { 0x1F04, 13 }, { 0x1, 3 }, - { 0x0, 4 }, { 0x1C, 5 }, { 0x3F, 6 }, { 0x3D, 6 }, - { 0x5, 4 }, { 0x7D, 7 }, { 0x1D, 5 }, { 0x3C, 6 } + { 24, 4 }, { 7, 5 }, { 17, 7 }, { 3, 7 }, { 2, 7 }, { 16, 7 }, + { 23, 3 }, { 13, 4 }, { 28, 4 }, { 14, 5 }, { 15, 6 }, { 1, 6 }, + { 0, 4 }, { 11, 4 }, { 12, 4 }, { 9, 3 }, { 10, 3 }, { 25, 5 }, + { 30, 5 }, { 31, 6 }, { 27, 6 }, { 19, 11 }, { 22, 13 }, { 21, 13 }, + { 5, 13 }, { 20, 14 }, { 6, 14 }, { 4, 10 }, { 18, 9 }, { 8, 8 }, + { 29, 7 }, { 26, 6 }, }, { /* AC bias group 2, table 6 */ - { 0xF, 4 }, { 0xA, 5 }, { 0x71, 7 }, { 0x6, 6 }, - { 0x1C2, 9 }, { 0x702, 11 }, { 0x1C0E, 13 }, { 0x2, 5 }, - { 0xE, 7 }, { 0x5, 3 }, { 0x4, 3 }, { 0x6, 4 }, - { 0x7, 4 }, { 0x1D, 5 }, { 0x17, 6 }, { 0xF, 7 }, - { 0x1C3, 9 }, { 0x1C1, 9 }, { 0x380, 10 }, { 0x381F, 14 }, - { 0x381E, 14 }, { 0x1C0D, 13 }, { 0x1C0C, 13 }, { 0x1, 3 }, - { 0x4, 4 }, { 0x18, 5 }, { 0x1, 5 }, { 0x0, 5 }, - { 0xD, 4 }, { 0x16, 6 }, { 0x19, 5 }, { 0x39, 6 } + { 27, 5 }, { 26, 5 }, { 7, 5 }, { 3, 6 }, { 8, 7 }, { 15, 7 }, + { 23, 3 }, { 24, 4 }, { 1, 5 }, { 29, 6 }, { 14, 6 }, { 11, 4 }, + { 12, 4 }, { 10, 3 }, { 9, 3 }, { 25, 5 }, { 30, 5 }, { 28, 4 }, + { 18, 10 }, { 5, 11 }, { 22, 13 }, { 21, 13 }, { 6, 13 }, { 20, 14 }, + { 19, 14 }, { 17, 9 }, { 4, 9 }, { 16, 9 }, { 2, 7 }, { 31, 6 }, + { 13, 5 }, { 0, 4 }, }, { /* AC bias group 2, table 7 */ - { 0x2, 3 }, { 0x1E, 5 }, { 0x3B, 6 }, { 0xD, 5 }, - { 0x61, 7 }, { 0x1FA, 9 }, { 0x1FB5, 13 }, { 0x31, 6 }, - { 0xFC, 8 }, { 0x4, 3 }, { 0x5, 3 }, { 0x1, 4 }, - { 0x7, 4 }, { 0x3A, 6 }, { 0x60, 7 }, { 0x3F7, 10 }, - { 0x7EC, 11 }, { 0x1FB7, 13 }, { 0x3F6C, 14 }, { 0x7EDB, 15 }, - { 0x7EDA, 15 }, { 0x3F69, 14 }, { 0x3F68, 14 }, { 0x1, 3 }, - { 0x0, 4 }, { 0x19, 5 }, { 0x3E, 6 }, { 0x39, 6 }, - { 0xD, 4 }, { 0x38, 6 }, { 0xC, 5 }, { 0x7F, 7 } + { 24, 4 }, { 11, 4 }, { 23, 3 }, { 0, 3 }, { 30, 5 }, { 3, 5 }, + { 12, 4 }, { 9, 3 }, { 10, 3 }, { 14, 7 }, { 4, 7 }, { 7, 6 }, + { 25, 5 }, { 28, 4 }, { 29, 6 }, { 27, 6 }, { 13, 6 }, { 2, 6 }, + { 1, 5 }, { 26, 6 }, { 8, 8 }, { 5, 9 }, { 16, 11 }, { 22, 14 }, + { 21, 14 }, { 6, 13 }, { 18, 14 }, { 20, 15 }, { 19, 15 }, { 17, 13 }, + { 15, 10 }, { 31, 7 }, }, { /* AC bias group 2, table 8 */ - { 0x1E, 5 }, { 0x70, 7 }, { 0x127, 9 }, { 0x126, 9 }, - { 0x492, 11 }, { 0x124D, 13 }, { 0x124C, 13 }, { 0x1, 5 }, - { 0x7F, 7 }, { 0x6, 3 }, { 0x5, 3 }, { 0x5, 4 }, - { 0x4, 4 }, { 0x1, 4 }, { 0x7, 5 }, { 0x25, 6 }, - { 0x71, 7 }, { 0x7E, 7 }, { 0x48, 7 }, { 0x125, 9 }, - { 0x248, 10 }, { 0x124F, 13 }, { 0x124E, 13 }, { 0x3, 3 }, - { 0x8, 4 }, { 0x1D, 5 }, { 0x6, 5 }, { 0x3E, 6 }, - { 0x2, 4 }, { 0x0, 5 }, { 0x13, 5 }, { 0x39, 6 } + { 29, 5 }, { 7, 5 }, { 13, 4 }, { 28, 4 }, { 26, 5 }, { 14, 5 }, + { 12, 4 }, { 11, 4 }, { 23, 3 }, { 24, 4 }, { 18, 7 }, { 20, 10 }, + { 4, 11 }, { 6, 13 }, { 5, 13 }, { 22, 13 }, { 21, 13 }, { 19, 9 }, + { 3, 9 }, { 2, 9 }, { 15, 6 }, { 30, 5 }, { 10, 3 }, { 9, 3 }, + { 1, 7 }, { 16, 7 }, { 31, 6 }, { 25, 5 }, { 0, 5 }, { 27, 6 }, + { 17, 7 }, { 8, 7 }, }, { /* AC bias group 2, table 9 */ - { 0x1, 4 }, { 0x1, 6 }, { 0xE7, 8 }, { 0x91, 8 }, - { 0x240, 10 }, { 0x120D, 13 }, { 0x120C, 13 }, { 0x3C, 6 }, - { 0x0, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x5, 4 }, - { 0x4, 4 }, { 0x1F, 5 }, { 0x4, 5 }, { 0x25, 6 }, - { 0x72, 7 }, { 0x49, 7 }, { 0xE6, 8 }, { 0x121, 9 }, - { 0x482, 11 }, { 0x120F, 13 }, { 0x120E, 13 }, { 0x3, 3 }, - { 0x8, 4 }, { 0x1D, 5 }, { 0x5, 5 }, { 0x3D, 6 }, - { 0x3, 4 }, { 0x1, 5 }, { 0x13, 5 }, { 0x38, 6 } + { 8, 6 }, { 1, 6 }, { 29, 5 }, { 0, 4 }, { 14, 5 }, { 26, 5 }, + { 28, 4 }, { 12, 4 }, { 11, 4 }, { 23, 3 }, { 24, 4 }, { 4, 10 }, + { 20, 11 }, { 6, 13 }, { 5, 13 }, { 22, 13 }, { 21, 13 }, { 19, 9 }, + { 3, 8 }, { 17, 7 }, { 15, 6 }, { 30, 5 }, { 10, 3 }, { 9, 3 }, + { 31, 6 }, { 16, 7 }, { 18, 8 }, { 2, 8 }, { 25, 5 }, { 7, 6 }, + { 27, 6 }, { 13, 5 }, }, { /* AC bias group 2, table 10 */ - { 0x4, 4 }, { 0xF, 6 }, { 0xF4, 8 }, { 0x5B, 8 }, - { 0x2D3, 11 }, { 0xB4A, 13 }, { 0x1697, 14 }, { 0x3C, 6 }, - { 0xE, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x2, 4 }, - { 0x1, 4 }, { 0x1D, 5 }, { 0x0, 5 }, { 0x7B, 7 }, - { 0x2C, 7 }, { 0xF5, 8 }, { 0xB5, 9 }, { 0x168, 10 }, - { 0x1696, 14 }, { 0xB49, 13 }, { 0xB48, 13 }, { 0x3, 3 }, - { 0x9, 4 }, { 0x1F, 5 }, { 0xA, 5 }, { 0x1, 5 }, - { 0x8, 4 }, { 0x6, 5 }, { 0x1C, 5 }, { 0x17, 6 } + { 14, 5 }, { 27, 5 }, { 12, 4 }, { 11, 4 }, { 29, 5 }, { 8, 6 }, + { 1, 6 }, { 0, 4 }, { 26, 5 }, { 16, 7 }, { 19, 10 }, { 22, 13 }, + { 21, 13 }, { 5, 13 }, { 20, 14 }, { 6, 14 }, { 4, 11 }, { 18, 9 }, + { 3, 8 }, { 31, 6 }, { 23, 3 }, { 28, 4 }, { 24, 4 }, { 10, 3 }, + { 9, 3 }, { 30, 5 }, { 13, 5 }, { 7, 6 }, { 2, 8 }, { 17, 8 }, + { 15, 7 }, { 25, 5 }, }, { /* AC bias group 2, table 11 */ - { 0x8, 4 }, { 0x39, 6 }, { 0x1A, 7 }, { 0x3, 7 }, - { 0xDB, 10 }, { 0x6D6, 13 }, { 0xDAF, 14 }, { 0x3C, 6 }, - { 0xC, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x2, 4 }, - { 0x1, 4 }, { 0x1D, 5 }, { 0x3D, 6 }, { 0x0, 6 }, - { 0x2, 7 }, { 0x37, 8 }, { 0x6C, 9 }, { 0x1B4, 11 }, - { 0xDAE, 14 }, { 0x6D5, 13 }, { 0x6D4, 13 }, { 0x2, 3 }, - { 0x7, 4 }, { 0x1F, 5 }, { 0x7, 5 }, { 0x1, 5 }, - { 0x9, 4 }, { 0xD, 5 }, { 0xC, 5 }, { 0x38, 6 } + { 15, 6 }, { 16, 7 }, { 3, 7 }, { 27, 5 }, { 12, 4 }, { 11, 4 }, + { 8, 6 }, { 2, 7 }, { 18, 9 }, { 19, 11 }, { 22, 13 }, { 21, 13 }, + { 5, 13 }, { 20, 14 }, { 6, 14 }, { 4, 10 }, { 17, 8 }, { 26, 5 }, + { 23, 3 }, { 30, 5 }, { 29, 5 }, { 24, 4 }, { 0, 4 }, { 28, 4 }, + { 10, 3 }, { 9, 3 }, { 31, 6 }, { 1, 6 }, { 13, 5 }, { 7, 6 }, + { 14, 6 }, { 25, 5 }, }, { /* AC bias group 2, table 12 */ - { 0xF, 4 }, { 0x4, 5 }, { 0x2F, 7 }, { 0x2E, 7 }, - { 0x54, 9 }, { 0x555, 13 }, { 0x554, 13 }, { 0x16, 6 }, - { 0xE, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x1, 4 }, - { 0x0, 4 }, { 0x9, 5 }, { 0xB, 6 }, { 0x14, 7 }, - { 0x57, 9 }, { 0x56, 9 }, { 0xAB, 10 }, { 0x557, 13 }, - { 0x556, 13 }, { 0x2A9, 12 }, { 0x2A8, 12 }, { 0x3, 3 }, - { 0x8, 4 }, { 0x13, 5 }, { 0xA, 5 }, { 0x8, 5 }, - { 0xE, 4 }, { 0x12, 5 }, { 0x6, 5 }, { 0xF, 6 } + { 12, 4 }, { 11, 4 }, { 1, 5 }, { 15, 7 }, { 4, 9 }, { 22, 12 }, + { 21, 12 }, { 6, 13 }, { 5, 13 }, { 20, 13 }, { 19, 13 }, { 18, 10 }, + { 17, 9 }, { 16, 9 }, { 14, 6 }, { 30, 5 }, { 8, 6 }, { 31, 6 }, + { 27, 5 }, { 13, 5 }, { 26, 5 }, { 7, 6 }, { 3, 7 }, { 2, 7 }, + { 23, 3 }, { 24, 4 }, { 29, 5 }, { 25, 5 }, { 10, 3 }, { 9, 3 }, + { 28, 4 }, { 0, 4 }, }, { /* AC bias group 2, table 13 */ - { 0x1, 3 }, { 0xE, 5 }, { 0x6, 6 }, { 0x4, 6 }, - { 0xDA, 9 }, { 0xDBE, 13 }, { 0x1B7E, 14 }, { 0x7, 6 }, - { 0x1A, 6 }, { 0x5, 3 }, { 0x4, 3 }, { 0x1C, 5 }, - { 0x1B, 5 }, { 0x3A, 6 }, { 0x37, 7 }, { 0x6C, 8 }, - { 0x1B6, 10 }, { 0x36E, 11 }, { 0xDBD, 13 }, { 0x36FF, 15 }, - { 0x36FE, 15 }, { 0x1B79, 14 }, { 0x1B78, 14 }, { 0x2, 3 }, - { 0xC, 4 }, { 0x0, 4 }, { 0xF, 5 }, { 0xC, 5 }, - { 0xF, 4 }, { 0x1A, 5 }, { 0x3B, 6 }, { 0x5, 6 } + { 25, 4 }, { 3, 6 }, { 31, 6 }, { 2, 6 }, { 7, 6 }, { 0, 3 }, + { 23, 3 }, { 27, 5 }, { 8, 6 }, { 15, 8 }, { 4, 9 }, { 16, 10 }, + { 17, 11 }, { 22, 14 }, { 21, 14 }, { 18, 13 }, { 5, 13 }, { 6, 14 }, + { 20, 15 }, { 19, 15 }, { 14, 7 }, { 1, 5 }, { 26, 5 }, { 10, 3 }, + { 9, 3 }, { 24, 4 }, { 29, 5 }, { 12, 5 }, { 11, 5 }, { 13, 6 }, + { 30, 6 }, { 28, 4 }, }, { /* AC bias group 2, table 14 */ - { 0x5, 3 }, { 0x1E, 5 }, { 0x3A, 6 }, { 0x3E, 6 }, - { 0xFC, 8 }, { 0xFD7, 12 }, { 0x3F55, 14 }, { 0x77, 7 }, - { 0x30, 6 }, { 0x3, 3 }, { 0x4, 3 }, { 0x1A, 5 }, - { 0x19, 5 }, { 0x7F, 7 }, { 0x1FB, 9 }, { 0x3F4, 10 }, - { 0xFD6, 12 }, { 0x1FA9, 13 }, { 0x3F54, 14 }, { 0x3F57, 14 }, - { 0x3F56, 14 }, { 0x3F51, 14 }, { 0x3F50, 14 }, { 0x1, 3 }, - { 0x4, 4 }, { 0x1C, 5 }, { 0xB, 5 }, { 0xA, 5 }, - { 0x0, 3 }, { 0x1B, 5 }, { 0x31, 6 }, { 0x76, 7 } + { 28, 3 }, { 23, 3 }, { 24, 4 }, { 27, 5 }, { 26, 5 }, { 9, 3 }, + { 10, 3 }, { 0, 3 }, { 8, 6 }, { 30, 6 }, { 12, 5 }, { 11, 5 }, + { 29, 5 }, { 25, 5 }, { 2, 6 }, { 31, 7 }, { 7, 7 }, { 1, 5 }, + { 3, 6 }, { 4, 8 }, { 15, 10 }, { 22, 14 }, { 21, 14 }, { 17, 13 }, + { 18, 14 }, { 6, 14 }, { 20, 14 }, { 19, 14 }, { 16, 12 }, { 5, 12 }, + { 14, 9 }, { 13, 7 }, }, { /* AC bias group 2, table 15 */ - { 0x5, 3 }, { 0xC, 4 }, { 0x1B, 5 }, { 0x8, 4 }, - { 0x38, 6 }, { 0x15, 8 }, { 0xA3, 11 }, { 0xE6, 8 }, - { 0x4, 6 }, { 0x1, 3 }, { 0x2, 3 }, { 0x12, 5 }, - { 0x3, 5 }, { 0xB, 7 }, { 0x29, 9 }, { 0xA0, 11 }, - { 0x142, 12 }, { 0x287, 13 }, { 0x286, 13 }, { 0x289, 13 }, - { 0x288, 13 }, { 0x28B, 13 }, { 0x28A, 13 }, { 0xF, 4 }, - { 0x1D, 5 }, { 0x13, 5 }, { 0x1, 5 }, { 0x0, 5 }, - { 0x3, 3 }, { 0x1A, 5 }, { 0x72, 7 }, { 0xE7, 8 } + { 27, 5 }, { 26, 5 }, { 8, 6 }, { 15, 11 }, { 16, 12 }, { 18, 13 }, + { 17, 13 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, { 6, 11 }, + { 14, 9 }, { 5, 8 }, { 13, 7 }, { 12, 5 }, { 9, 3 }, { 10, 3 }, + { 28, 3 }, { 3, 4 }, { 11, 5 }, { 25, 5 }, { 0, 3 }, { 1, 4 }, + { 29, 5 }, { 2, 5 }, { 4, 6 }, { 30, 7 }, { 7, 8 }, { 31, 8 }, + { 24, 5 }, { 23, 4 }, }, { /* AC bias group 3, table 0 */ - { 0x9, 5 }, { 0x15, 7 }, { 0x28, 8 }, { 0x52, 9 }, - { 0x29A, 12 }, { 0x537, 13 }, { 0x536, 13 }, { 0xA, 5 }, - { 0x54, 7 }, { 0x4, 3 }, { 0x3, 3 }, { 0xC, 4 }, - { 0xB, 4 }, { 0xD, 4 }, { 0x3, 4 }, { 0x14, 5 }, - { 0x3A, 6 }, { 0x4, 5 }, { 0x38, 6 }, { 0x55, 7 }, - { 0xA7, 10 }, { 0x299, 12 }, { 0x298, 12 }, { 0x0, 3 }, - { 0x1E, 5 }, { 0x8, 5 }, { 0x2B, 6 }, { 0xB, 6 }, - { 0xB, 5 }, { 0x3B, 6 }, { 0x1F, 5 }, { 0x39, 6 } + { 23, 3 }, { 17, 5 }, { 2, 8 }, { 3, 9 }, { 22, 12 }, { 21, 12 }, + { 4, 12 }, { 6, 13 }, { 5, 13 }, { 20, 10 }, { 1, 7 }, { 27, 6 }, + { 14, 4 }, { 25, 5 }, { 0, 5 }, { 7, 5 }, { 28, 5 }, { 10, 3 }, + { 9, 3 }, { 15, 5 }, { 8, 7 }, { 19, 7 }, { 26, 6 }, { 12, 4 }, + { 11, 4 }, { 13, 4 }, { 18, 6 }, { 31, 6 }, { 16, 6 }, { 29, 6 }, + { 24, 5 }, { 30, 5 }, }, { /* AC bias group 3, table 1 */ - { 0x1D, 5 }, { 0x2F, 7 }, { 0x2, 8 }, { 0x7, 9 }, - { 0x19, 11 }, { 0x35, 12 }, { 0x34, 12 }, { 0x9, 5 }, - { 0x2E, 7 }, { 0x6, 3 }, { 0x5, 3 }, { 0x9, 4 }, - { 0x8, 4 }, { 0x7, 4 }, { 0x1F, 5 }, { 0x8, 5 }, - { 0x18, 6 }, { 0x19, 6 }, { 0x1, 6 }, { 0x0, 7 }, - { 0x18, 11 }, { 0x37, 12 }, { 0x36, 12 }, { 0x1, 3 }, - { 0x1, 4 }, { 0xA, 5 }, { 0x39, 6 }, { 0x16, 6 }, - { 0xD, 5 }, { 0x1, 5 }, { 0x1E, 5 }, { 0x38, 6 } + { 19, 7 }, { 2, 8 }, { 20, 11 }, { 4, 11 }, { 6, 12 }, { 5, 12 }, + { 22, 12 }, { 21, 12 }, { 3, 9 }, { 18, 6 }, { 29, 5 }, { 24, 4 }, + { 23, 3 }, { 15, 5 }, { 7, 5 }, { 25, 5 }, { 27, 6 }, { 8, 7 }, + { 1, 7 }, { 16, 6 }, { 17, 6 }, { 28, 5 }, { 13, 4 }, { 12, 4 }, + { 11, 4 }, { 10, 3 }, { 9, 3 }, { 31, 6 }, { 26, 6 }, { 0, 5 }, + { 30, 5 }, { 14, 5 }, }, { /* AC bias group 3, table 2 */ - { 0x1, 4 }, { 0x71, 7 }, { 0xE0, 8 }, { 0x1C3, 9 }, - { 0x708, 11 }, { 0x1C26, 13 }, { 0x384F, 14 }, { 0x1, 5 }, - { 0x31, 7 }, { 0x6, 3 }, { 0x5, 3 }, { 0x9, 4 }, - { 0x8, 4 }, { 0x5, 4 }, { 0xF, 5 }, { 0x39, 6 }, - { 0x77, 7 }, { 0x76, 7 }, { 0x30, 7 }, { 0x385, 10 }, - { 0x384E, 14 }, { 0x1C25, 13 }, { 0x1C24, 13 }, { 0x1, 3 }, - { 0x4, 4 }, { 0xD, 5 }, { 0x0, 5 }, { 0x19, 6 }, - { 0x1F, 5 }, { 0xE, 5 }, { 0x1E, 5 }, { 0x3A, 6 } + { 26, 5 }, { 7, 5 }, { 0, 4 }, { 23, 3 }, { 24, 4 }, { 13, 4 }, + { 18, 7 }, { 8, 7 }, { 27, 6 }, { 25, 5 }, { 29, 5 }, { 14, 5 }, + { 12, 4 }, { 11, 4 }, { 10, 3 }, { 9, 3 }, { 2, 8 }, { 4, 11 }, + { 22, 13 }, { 21, 13 }, { 5, 13 }, { 20, 14 }, { 6, 14 }, { 19, 10 }, + { 3, 9 }, { 1, 7 }, { 15, 6 }, { 31, 6 }, { 17, 7 }, { 16, 7 }, + { 30, 5 }, { 28, 5 }, }, { /* AC bias group 3, table 3 */ - { 0x6, 4 }, { 0xC, 6 }, { 0xD6, 8 }, { 0x7B, 8 }, - { 0x1E8, 10 }, { 0x7A4, 12 }, { 0xF4B, 13 }, { 0x36, 6 }, - { 0x6A, 7 }, { 0x7, 3 }, { 0x5, 3 }, { 0x8, 4 }, - { 0x9, 4 }, { 0x1, 4 }, { 0x7, 5 }, { 0xD, 6 }, - { 0x3C, 7 }, { 0xD7, 8 }, { 0xF5, 9 }, { 0x7A7, 12 }, - { 0xF4A, 13 }, { 0xF4D, 13 }, { 0xF4C, 13 }, { 0x2, 3 }, - { 0x2, 4 }, { 0xE, 5 }, { 0x37, 6 }, { 0x34, 6 }, - { 0x0, 4 }, { 0x19, 5 }, { 0x18, 5 }, { 0x1F, 6 } + { 28, 4 }, { 13, 4 }, { 24, 4 }, { 1, 6 }, { 15, 6 }, { 14, 5 }, + { 23, 3 }, { 0, 4 }, { 25, 5 }, { 16, 7 }, { 4, 10 }, { 5, 12 }, + { 20, 13 }, { 6, 13 }, { 22, 13 }, { 21, 13 }, { 19, 12 }, { 18, 9 }, + { 3, 8 }, { 31, 6 }, { 11, 4 }, { 12, 4 }, { 10, 3 }, { 30, 5 }, + { 29, 5 }, { 27, 6 }, { 8, 7 }, { 2, 8 }, { 17, 8 }, { 7, 6 }, + { 26, 6 }, { 9, 3 }, }, { /* AC bias group 3, table 4 */ - { 0xA, 4 }, { 0x27, 6 }, { 0xBF, 8 }, { 0xBE, 8 }, - { 0x224, 10 }, { 0x225D, 14 }, { 0x225C, 14 }, { 0x26, 6 }, - { 0x5E, 7 }, { 0x7, 3 }, { 0x6, 3 }, { 0x6, 4 }, - { 0x7, 4 }, { 0x16, 5 }, { 0x2E, 6 }, { 0x45, 7 }, - { 0x88, 8 }, { 0x113, 9 }, { 0x44A, 11 }, { 0x225F, 14 }, - { 0x225E, 14 }, { 0x112D, 13 }, { 0x112C, 13 }, { 0x2, 3 }, - { 0x2, 4 }, { 0x12, 5 }, { 0x3, 5 }, { 0x2, 5 }, - { 0x3, 4 }, { 0x0, 4 }, { 0x10, 5 }, { 0x23, 6 } + { 29, 4 }, { 27, 5 }, { 26, 5 }, { 24, 4 }, { 28, 4 }, { 23, 3 }, + { 11, 4 }, { 12, 4 }, { 30, 5 }, { 16, 8 }, { 4, 10 }, { 18, 11 }, + { 22, 13 }, { 21, 13 }, { 6, 14 }, { 5, 14 }, { 20, 14 }, { 19, 14 }, + { 17, 9 }, { 15, 7 }, { 31, 6 }, { 25, 5 }, { 7, 6 }, { 1, 6 }, + { 0, 4 }, { 13, 5 }, { 14, 6 }, { 8, 7 }, { 3, 8 }, { 2, 8 }, + { 10, 3 }, { 9, 3 }, }, { /* AC bias group 3, table 5 */ - { 0xF, 4 }, { 0x6, 5 }, { 0x75, 7 }, { 0x74, 7 }, - { 0xA, 9 }, { 0xBF, 13 }, { 0xB9, 13 }, { 0x22, 6 }, - { 0x3, 7 }, { 0x5, 3 }, { 0x6, 3 }, { 0x1, 4 }, - { 0x2, 4 }, { 0x7, 5 }, { 0x0, 6 }, { 0x4, 8 }, - { 0x16, 10 }, { 0x5E, 12 }, { 0xB8, 13 }, { 0xBB, 13 }, - { 0xBA, 13 }, { 0x17D, 14 }, { 0x17C, 14 }, { 0x2, 3 }, - { 0x6, 4 }, { 0x1C, 5 }, { 0x10, 5 }, { 0x3B, 6 }, - { 0x9, 4 }, { 0x7, 4 }, { 0x1, 5 }, { 0x23, 6 } + { 14, 6 }, { 15, 8 }, { 4, 9 }, { 16, 10 }, { 18, 13 }, { 6, 13 }, + { 20, 13 }, { 19, 13 }, { 17, 12 }, { 22, 14 }, { 21, 14 }, { 5, 13 }, + { 8, 7 }, { 30, 5 }, { 11, 4 }, { 12, 4 }, { 1, 5 }, { 13, 5 }, + { 23, 3 }, { 24, 4 }, { 29, 4 }, { 26, 5 }, { 7, 6 }, { 31, 6 }, + { 28, 4 }, { 9, 3 }, { 10, 3 }, { 25, 5 }, { 3, 7 }, { 2, 7 }, + { 27, 6 }, { 0, 4 }, }, { /* AC bias group 3, table 6 */ - { 0x1, 3 }, { 0x1C, 5 }, { 0x36, 6 }, { 0x3B, 6 }, - { 0xEA, 8 }, { 0x75B, 11 }, { 0x1D65, 13 }, { 0x19, 6 }, - { 0x74, 7 }, { 0x4, 3 }, { 0x5, 3 }, { 0x0, 4 }, - { 0x1, 4 }, { 0x37, 6 }, { 0x1D7, 9 }, { 0x75A, 11 }, - { 0x1D64, 13 }, { 0x1D67, 13 }, { 0x1D66, 13 }, { 0x1D61, 13 }, - { 0x1D60, 13 }, { 0x1D63, 13 }, { 0x1D62, 13 }, { 0x2, 3 }, - { 0x1F, 5 }, { 0x1A, 5 }, { 0xD, 5 }, { 0x3D, 6 }, - { 0xC, 4 }, { 0x7, 4 }, { 0x3C, 6 }, { 0x18, 6 } + { 11, 4 }, { 12, 4 }, { 0, 3 }, { 23, 3 }, { 31, 6 }, { 7, 6 }, + { 26, 5 }, { 29, 4 }, { 9, 3 }, { 10, 3 }, { 28, 4 }, { 25, 5 }, + { 2, 6 }, { 13, 6 }, { 1, 5 }, { 8, 7 }, { 4, 8 }, { 20, 13 }, + { 19, 13 }, { 22, 13 }, { 21, 13 }, { 16, 13 }, { 6, 13 }, { 18, 13 }, + { 17, 13 }, { 15, 11 }, { 5, 11 }, { 14, 9 }, { 3, 6 }, { 30, 6 }, + { 27, 6 }, { 24, 5 }, }, { /* AC bias group 3, table 7 */ - { 0x2, 3 }, { 0x1, 4 }, { 0x14, 5 }, { 0x0, 4 }, - { 0x2F, 6 }, { 0xBB, 8 }, { 0x2E4, 10 }, { 0x7D, 7 }, - { 0xBA, 8 }, { 0x3, 3 }, { 0x4, 3 }, { 0x16, 5 }, - { 0x1A, 5 }, { 0xB8, 8 }, { 0x172E, 13 }, { 0x2E5F, 14 }, - { 0x2E5E, 14 }, { 0x1729, 13 }, { 0x1728, 13 }, { 0x172B, 13 }, - { 0x172A, 13 }, { 0x172D, 13 }, { 0x172C, 13 }, { 0x1, 3 }, - { 0x1E, 5 }, { 0x15, 5 }, { 0x1B, 5 }, { 0x3F, 6 }, - { 0xC, 4 }, { 0xE, 4 }, { 0x7C, 7 }, { 0x173, 9 } + { 3, 4 }, { 1, 4 }, { 23, 3 }, { 0, 3 }, { 9, 3 }, { 10, 3 }, + { 2, 5 }, { 25, 5 }, { 11, 5 }, { 13, 8 }, { 6, 10 }, { 18, 13 }, + { 17, 13 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, { 14, 13 }, + { 16, 14 }, { 15, 14 }, { 31, 9 }, { 8, 8 }, { 5, 8 }, { 4, 6 }, + { 28, 4 }, { 12, 5 }, { 26, 5 }, { 29, 4 }, { 24, 5 }, { 30, 7 }, + { 7, 7 }, { 27, 6 }, }, { /* AC bias group 3, table 8 */ - { 0x3, 4 }, { 0x7B, 7 }, { 0x58, 8 }, { 0x1EA, 9 }, - { 0x1EB1, 13 }, { 0x1EB0, 13 }, { 0x1EB3, 13 }, { 0x13, 6 }, - { 0x12, 6 }, { 0x5, 3 }, { 0x6, 3 }, { 0x2, 4 }, - { 0x1, 4 }, { 0x13, 5 }, { 0x3C, 6 }, { 0x2D, 7 }, - { 0xF4, 8 }, { 0x59, 8 }, { 0x3D7, 10 }, { 0xF5B, 12 }, - { 0x1EB2, 13 }, { 0x1EB5, 13 }, { 0x1EB4, 13 }, { 0x3, 3 }, - { 0xE, 4 }, { 0x1F, 5 }, { 0x12, 5 }, { 0x8, 5 }, - { 0x8, 4 }, { 0x0, 4 }, { 0xA, 5 }, { 0x17, 6 } + { 29, 4 }, { 12, 4 }, { 11, 4 }, { 0, 4 }, { 27, 5 }, { 8, 6 }, + { 7, 6 }, { 30, 5 }, { 2, 8 }, { 17, 8 }, { 15, 7 }, { 31, 6 }, + { 23, 3 }, { 28, 4 }, { 26, 5 }, { 13, 5 }, { 9, 3 }, { 10, 3 }, + { 24, 4 }, { 14, 6 }, { 16, 8 }, { 3, 9 }, { 5, 13 }, { 4, 13 }, + { 20, 13 }, { 6, 13 }, { 22, 13 }, { 21, 13 }, { 19, 12 }, { 18, 10 }, + { 1, 7 }, { 25, 5 }, }, { /* AC bias group 3, table 9 */ - { 0x8, 4 }, { 0x3C, 6 }, { 0xF5, 8 }, { 0xF4, 8 }, - { 0x1EF7, 13 }, { 0x3DE9, 14 }, { 0x3DE8, 14 }, { 0x1C, 6 }, - { 0xD, 6 }, { 0x5, 3 }, { 0x6, 3 }, { 0x1, 4 }, - { 0x0, 4 }, { 0x7, 5 }, { 0xC, 6 }, { 0xF6, 8 }, - { 0x1EE, 9 }, { 0x3DF, 10 }, { 0x7BC, 11 }, { 0x3DEB, 14 }, - { 0x3DEA, 14 }, { 0x3DED, 14 }, { 0x3DEC, 14 }, { 0x2, 3 }, - { 0x9, 4 }, { 0x1F, 5 }, { 0xF, 5 }, { 0x5, 5 }, - { 0xE, 4 }, { 0x6, 4 }, { 0x4, 5 }, { 0x1D, 6 } + { 12, 4 }, { 11, 4 }, { 30, 5 }, { 27, 5 }, { 14, 6 }, { 8, 6 }, + { 13, 5 }, { 23, 3 }, { 29, 4 }, { 7, 6 }, { 31, 6 }, { 26, 5 }, + { 0, 4 }, { 24, 4 }, { 9, 3 }, { 10, 3 }, { 28, 4 }, { 1, 6 }, + { 3, 8 }, { 2, 8 }, { 15, 8 }, { 16, 9 }, { 18, 11 }, { 6, 14 }, + { 5, 14 }, { 20, 14 }, { 19, 14 }, { 22, 14 }, { 21, 14 }, { 4, 13 }, + { 17, 10 }, { 25, 5 }, }, { /* AC bias group 3, table 10 */ - { 0x9, 4 }, { 0x39, 6 }, { 0x19, 7 }, { 0x18, 7 }, - { 0x706, 11 }, { 0x383D, 14 }, { 0x383C, 14 }, { 0xD, 6 }, - { 0xF, 6 }, { 0x5, 3 }, { 0x6, 3 }, { 0x0, 4 }, - { 0x1D, 5 }, { 0x3, 5 }, { 0x71, 7 }, { 0xE1, 8 }, - { 0x1C0, 9 }, { 0x382, 10 }, { 0x1C1D, 13 }, { 0x383F, 14 }, - { 0x383E, 14 }, { 0x3839, 14 }, { 0x3838, 14 }, { 0x2, 3 }, - { 0x8, 4 }, { 0x2, 4 }, { 0xD, 5 }, { 0xC, 5 }, - { 0xF, 4 }, { 0x7, 4 }, { 0x2, 5 }, { 0xE, 6 } + { 11, 4 }, { 30, 5 }, { 13, 5 }, { 25, 4 }, { 3, 7 }, { 2, 7 }, + { 7, 6 }, { 31, 6 }, { 8, 6 }, { 23, 3 }, { 27, 5 }, { 26, 5 }, + { 29, 4 }, { 24, 4 }, { 0, 4 }, { 9, 3 }, { 10, 3 }, { 16, 9 }, + { 17, 10 }, { 4, 11 }, { 22, 14 }, { 21, 14 }, { 18, 13 }, { 6, 14 }, + { 5, 14 }, { 20, 14 }, { 19, 14 }, { 15, 8 }, { 14, 7 }, { 1, 6 }, + { 12, 5 }, { 28, 4 }, }, { /* AC bias group 3, table 11 */ - { 0x0, 3 }, { 0x6, 5 }, { 0x35, 7 }, { 0x34, 7 }, - { 0x777, 11 }, { 0x1DD4, 13 }, { 0x3BAB, 14 }, { 0xE, 6 }, - { 0xF, 6 }, { 0x5, 3 }, { 0x4, 3 }, { 0x1C, 5 }, - { 0x19, 5 }, { 0x3A, 6 }, { 0xEF, 8 }, { 0x1DC, 9 }, - { 0x776, 11 }, { 0x774, 11 }, { 0x3BAA, 14 }, { 0x3BAD, 14 }, - { 0x3BAC, 14 }, { 0x3BAF, 14 }, { 0x3BAE, 14 }, { 0x2, 3 }, - { 0x7, 4 }, { 0x2, 4 }, { 0x18, 5 }, { 0xC, 5 }, - { 0xF, 4 }, { 0xD, 4 }, { 0x1B, 6 }, { 0x76, 7 } + { 0, 3 }, { 25, 4 }, { 1, 5 }, { 7, 6 }, { 8, 6 }, { 23, 3 }, + { 27, 5 }, { 3, 7 }, { 2, 7 }, { 30, 6 }, { 24, 4 }, { 10, 3 }, + { 9, 3 }, { 26, 5 }, { 12, 5 }, { 29, 4 }, { 11, 5 }, { 13, 6 }, + { 31, 7 }, { 15, 9 }, { 17, 11 }, { 5, 13 }, { 18, 14 }, { 6, 14 }, + { 20, 14 }, { 19, 14 }, { 22, 14 }, { 21, 14 }, { 16, 11 }, { 4, 11 }, + { 14, 8 }, { 28, 4 }, }, { /* AC bias group 3, table 12 */ - { 0x2, 3 }, { 0x11, 5 }, { 0x6, 6 }, { 0x4F, 7 }, - { 0x130, 9 }, { 0x1319, 13 }, { 0x1318, 13 }, { 0x4E, 7 }, - { 0x7, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x10, 5 }, - { 0xD, 5 }, { 0x5, 6 }, { 0x99, 8 }, { 0x262, 10 }, - { 0x98E, 12 }, { 0x131B, 13 }, { 0x131A, 13 }, { 0x263D, 14 }, - { 0x263C, 14 }, { 0x263F, 14 }, { 0x263E, 14 }, { 0x1, 3 }, - { 0x7, 4 }, { 0x0, 4 }, { 0x12, 5 }, { 0xC, 5 }, - { 0xE, 4 }, { 0xF, 4 }, { 0x4, 6 }, { 0x4D, 7 } + { 25, 4 }, { 30, 6 }, { 13, 6 }, { 2, 6 }, { 8, 6 }, { 23, 3 }, + { 0, 3 }, { 27, 5 }, { 12, 5 }, { 24, 4 }, { 11, 5 }, { 1, 5 }, + { 26, 5 }, { 4, 9 }, { 15, 10 }, { 6, 13 }, { 5, 13 }, { 18, 13 }, + { 17, 13 }, { 16, 12 }, { 20, 14 }, { 19, 14 }, { 22, 14 }, { 21, 14 }, + { 14, 8 }, { 31, 7 }, { 7, 7 }, { 3, 7 }, { 10, 3 }, { 9, 3 }, + { 28, 4 }, { 29, 4 }, }, { /* AC bias group 3, table 13 */ - { 0x3, 3 }, { 0x0, 4 }, { 0x2, 5 }, { 0x37, 6 }, - { 0x1B7, 9 }, { 0xDB5, 12 }, { 0x36DD, 14 }, { 0x6C, 7 }, - { 0x16, 6 }, { 0x5, 3 }, { 0x4, 3 }, { 0x3, 5 }, - { 0xA, 5 }, { 0x2E, 7 }, { 0x36C, 10 }, { 0xDB4, 12 }, - { 0x36DC, 14 }, { 0x36DF, 14 }, { 0x36DE, 14 }, { 0x36D9, 14 }, - { 0x36D8, 14 }, { 0x36DB, 14 }, { 0x36DA, 14 }, { 0xE, 4 }, - { 0x4, 4 }, { 0x1A, 5 }, { 0x19, 5 }, { 0x18, 5 }, - { 0xF, 4 }, { 0x1, 3 }, { 0x2F, 7 }, { 0xDA, 8 } + { 1, 4 }, { 2, 5 }, { 11, 5 }, { 29, 3 }, { 24, 4 }, { 12, 5 }, + { 8, 6 }, { 13, 7 }, { 30, 7 }, { 0, 3 }, { 10, 3 }, { 9, 3 }, + { 27, 5 }, { 26, 5 }, { 25, 5 }, { 7, 7 }, { 31, 8 }, { 14, 10 }, + { 15, 12 }, { 5, 12 }, { 20, 14 }, { 19, 14 }, { 22, 14 }, { 21, 14 }, + { 16, 14 }, { 6, 14 }, { 18, 14 }, { 17, 14 }, { 4, 9 }, { 3, 6 }, + { 23, 4 }, { 28, 4 }, }, { /* AC bias group 3, table 14 */ - { 0x6, 3 }, { 0x6, 4 }, { 0xF, 5 }, { 0x0, 4 }, - { 0x75, 7 }, { 0x3B8, 10 }, { 0x1DCA, 13 }, { 0x74, 7 }, - { 0x76, 7 }, { 0x4, 3 }, { 0x5, 3 }, { 0x3, 5 }, - { 0x2, 5 }, { 0x1DE, 9 }, { 0xEE6, 12 }, { 0x3B97, 14 }, - { 0x3B96, 14 }, { 0x3B9D, 14 }, { 0x3B9C, 14 }, { 0x3B9F, 14 }, - { 0x3B9E, 14 }, { 0x1DC9, 13 }, { 0x1DC8, 13 }, { 0x5, 4 }, - { 0x1C, 5 }, { 0x9, 5 }, { 0xE, 5 }, { 0x8, 5 }, - { 0xF, 4 }, { 0x1, 3 }, { 0x1DF, 9 }, { 0x1DD, 9 } + { 3, 4 }, { 12, 5 }, { 11, 5 }, { 29, 3 }, { 27, 5 }, { 25, 5 }, + { 23, 4 }, { 1, 4 }, { 26, 5 }, { 2, 5 }, { 9, 3 }, { 10, 3 }, + { 0, 3 }, { 24, 5 }, { 7, 7 }, { 4, 7 }, { 8, 7 }, { 5, 10 }, + { 22, 13 }, { 21, 13 }, { 6, 13 }, { 16, 14 }, { 15, 14 }, { 14, 12 }, + { 18, 14 }, { 17, 14 }, { 20, 14 }, { 19, 14 }, { 31, 9 }, { 13, 9 }, + { 30, 9 }, { 28, 4 }, }, { /* AC bias group 3, table 15 */ - { 0x4, 3 }, { 0xB, 4 }, { 0x1D, 5 }, { 0xC, 4 }, - { 0x14, 5 }, { 0xE0, 8 }, { 0x3875, 14 }, { 0x386, 10 }, - { 0x1C2, 9 }, { 0x0, 2 }, { 0x1, 2 }, { 0x71, 7 }, - { 0x72, 7 }, { 0x1C3F, 13 }, { 0x3874, 14 }, { 0x3877, 14 }, - { 0x3876, 14 }, { 0x3871, 14 }, { 0x3870, 14 }, { 0x3873, 14 }, - { 0x3872, 14 }, { 0x3879, 14 }, { 0x3878, 14 }, { 0x3C, 6 }, - { 0x73, 7 }, { 0x2A, 6 }, { 0x3D, 6 }, { 0x2B, 6 }, - { 0x1F, 5 }, { 0xD, 4 }, { 0x1C3E, 13 }, { 0x1C3D, 13 } + { 9, 2 }, { 10, 2 }, { 0, 3 }, { 4, 5 }, { 25, 6 }, { 27, 6 }, + { 1, 4 }, { 3, 4 }, { 29, 4 }, { 5, 8 }, { 8, 9 }, { 7, 10 }, + { 18, 14 }, { 17, 14 }, { 20, 14 }, { 19, 14 }, { 14, 14 }, { 6, 14 }, + { 16, 14 }, { 15, 14 }, { 22, 14 }, { 21, 14 }, { 31, 13 }, { 30, 13 }, + { 13, 13 }, { 11, 7 }, { 12, 7 }, { 24, 7 }, { 2, 5 }, { 23, 6 }, + { 26, 6 }, { 28, 5 }, }, { /* AC bias group 4, table 0 */ - { 0x7, 4 }, { 0xF, 6 }, { 0xBB, 8 }, { 0xBA, 8 }, - { 0x5CF, 11 }, { 0x173A, 13 }, { 0x2E77, 14 }, { 0x29, 6 }, - { 0x172, 9 }, { 0x7, 3 }, { 0x6, 3 }, { 0x9, 4 }, - { 0x8, 4 }, { 0x1, 4 }, { 0x5, 5 }, { 0xD, 6 }, - { 0x1D, 7 }, { 0x1C, 7 }, { 0xB8, 8 }, { 0x2E6, 10 }, - { 0x2E76, 14 }, { 0x1739, 13 }, { 0x1738, 13 }, { 0x2, 3 }, - { 0x6, 4 }, { 0x16, 5 }, { 0x4, 5 }, { 0x28, 6 }, - { 0x15, 5 }, { 0xC, 6 }, { 0x0, 4 }, { 0x2F, 6 } + { 30, 4 }, { 13, 4 }, { 26, 5 }, { 14, 5 }, { 29, 6 }, { 15, 6 }, + { 17, 7 }, { 16, 7 }, { 1, 6 }, { 23, 3 }, { 24, 4 }, { 0, 4 }, + { 12, 4 }, { 11, 4 }, { 27, 6 }, { 7, 6 }, { 28, 5 }, { 25, 5 }, + { 18, 8 }, { 8, 9 }, { 19, 10 }, { 22, 13 }, { 21, 13 }, { 5, 13 }, + { 20, 14 }, { 6, 14 }, { 4, 11 }, { 3, 8 }, { 2, 8 }, { 31, 6 }, + { 10, 3 }, { 9, 3 }, }, { /* AC bias group 4, table 1 */ - { 0xB, 4 }, { 0x2, 5 }, { 0x54, 7 }, { 0x2F, 7 }, - { 0x2AC, 10 }, { 0x156B, 13 }, { 0x1568, 13 }, { 0x16, 6 }, - { 0x154, 9 }, { 0x7, 3 }, { 0x6, 3 }, { 0x4, 4 }, - { 0x3, 4 }, { 0x13, 5 }, { 0x28, 6 }, { 0x2E, 7 }, - { 0x157, 9 }, { 0x155, 9 }, { 0x55B, 11 }, { 0x2AD3, 14 }, - { 0x2AD2, 14 }, { 0x2AD5, 14 }, { 0x2AD4, 14 }, { 0x3, 3 }, - { 0x8, 4 }, { 0x0, 4 }, { 0xA, 5 }, { 0x3, 5 }, - { 0x2, 4 }, { 0x2B, 6 }, { 0x12, 5 }, { 0x29, 6 } + { 25, 4 }, { 1, 5 }, { 27, 5 }, { 28, 4 }, { 12, 4 }, { 11, 4 }, + { 26, 5 }, { 7, 6 }, { 15, 7 }, { 3, 7 }, { 23, 3 }, { 24, 4 }, + { 30, 5 }, { 13, 5 }, { 14, 6 }, { 31, 6 }, { 2, 7 }, { 8, 9 }, + { 17, 9 }, { 4, 10 }, { 6, 13 }, { 20, 14 }, { 19, 14 }, { 22, 14 }, + { 21, 14 }, { 5, 13 }, { 18, 11 }, { 16, 9 }, { 29, 6 }, { 0, 4 }, + { 10, 3 }, { 9, 3 }, }, { /* AC bias group 4, table 2 */ - { 0xF, 4 }, { 0x7, 5 }, { 0x1, 6 }, { 0x0, 6 }, - { 0x1C4, 9 }, { 0x703, 11 }, { 0xE02, 12 }, { 0x11, 6 }, - { 0xE1, 8 }, { 0x5, 3 }, { 0x6, 3 }, { 0x2, 4 }, - { 0x1, 4 }, { 0x9, 5 }, { 0x10, 6 }, { 0xE3, 8 }, - { 0x1C5, 9 }, { 0x1C1, 9 }, { 0x702, 11 }, { 0x1C07, 13 }, - { 0x1C06, 13 }, { 0xE01, 12 }, { 0xE00, 12 }, { 0x4, 3 }, - { 0x7, 4 }, { 0x1D, 5 }, { 0xD, 5 }, { 0x1, 5 }, - { 0x5, 4 }, { 0x6, 5 }, { 0xC, 5 }, { 0x39, 6 } + { 3, 6 }, { 2, 6 }, { 27, 5 }, { 12, 4 }, { 11, 4 }, { 29, 5 }, + { 1, 5 }, { 14, 6 }, { 7, 6 }, { 13, 5 }, { 28, 4 }, { 30, 5 }, + { 26, 5 }, { 24, 4 }, { 23, 3 }, { 9, 3 }, { 10, 3 }, { 22, 12 }, + { 21, 12 }, { 6, 12 }, { 20, 13 }, { 19, 13 }, { 18, 11 }, { 5, 11 }, + { 17, 9 }, { 8, 8 }, { 4, 9 }, { 16, 9 }, { 15, 8 }, { 31, 6 }, + { 25, 5 }, { 0, 4 }, }, { /* AC bias group 4, table 3 */ - { 0x1, 3 }, { 0x1C, 5 }, { 0x11, 6 }, { 0x13, 6 }, - { 0x42, 8 }, { 0x207, 11 }, { 0x815, 13 }, { 0x75, 7 }, - { 0x41, 8 }, { 0x5, 3 }, { 0x6, 3 }, { 0x0, 4 }, - { 0x1F, 5 }, { 0x3B, 6 }, { 0x74, 7 }, { 0x43, 8 }, - { 0x80, 9 }, { 0x206, 11 }, { 0x814, 13 }, { 0x817, 13 }, - { 0x816, 13 }, { 0x409, 12 }, { 0x408, 12 }, { 0x3, 3 }, - { 0x9, 4 }, { 0x1E, 5 }, { 0x11, 5 }, { 0x3, 5 }, - { 0x5, 4 }, { 0x10, 5 }, { 0x2, 5 }, { 0x12, 6 } + { 11, 4 }, { 30, 5 }, { 27, 5 }, { 0, 3 }, { 16, 9 }, { 22, 12 }, + { 21, 12 }, { 18, 13 }, { 6, 13 }, { 20, 13 }, { 19, 13 }, { 17, 11 }, + { 5, 11 }, { 8, 8 }, { 4, 8 }, { 15, 8 }, { 2, 6 }, { 31, 6 }, + { 3, 6 }, { 28, 4 }, { 23, 3 }, { 29, 5 }, { 26, 5 }, { 24, 4 }, + { 9, 3 }, { 10, 3 }, { 1, 5 }, { 14, 7 }, { 7, 7 }, { 13, 6 }, + { 25, 5 }, { 12, 5 }, }, { /* AC bias group 4, table 4 */ - { 0x1, 3 }, { 0x1F, 5 }, { 0x27, 6 }, { 0x1, 5 }, - { 0x4B, 8 }, { 0x123, 10 }, { 0x915, 13 }, { 0x0, 6 }, - { 0x49, 8 }, { 0x5, 3 }, { 0x6, 3 }, { 0x1D, 5 }, - { 0x1C, 5 }, { 0x13, 6 }, { 0x4A, 8 }, { 0x90, 9 }, - { 0x914, 13 }, { 0x917, 13 }, { 0x916, 13 }, { 0x911, 13 }, - { 0x910, 13 }, { 0x913, 13 }, { 0x912, 13 }, { 0x3, 3 }, - { 0x5, 4 }, { 0x1, 4 }, { 0x12, 5 }, { 0x8, 5 }, - { 0x8, 4 }, { 0x1E, 5 }, { 0x26, 6 }, { 0x1, 6 } + { 7, 6 }, { 31, 6 }, { 3, 5 }, { 25, 4 }, { 0, 3 }, { 27, 5 }, + { 15, 9 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, { 16, 13 }, + { 6, 13 }, { 18, 13 }, { 17, 13 }, { 5, 10 }, { 8, 8 }, { 14, 8 }, + { 4, 8 }, { 13, 6 }, { 24, 4 }, { 23, 3 }, { 28, 4 }, { 26, 5 }, + { 30, 6 }, { 2, 6 }, { 9, 3 }, { 10, 3 }, { 12, 5 }, { 11, 5 }, + { 29, 5 }, { 1, 5 }, }, { /* AC bias group 4, table 5 */ - { 0x3, 3 }, { 0x1, 4 }, { 0x3F, 6 }, { 0xB, 5 }, - { 0x4E, 7 }, { 0x132, 9 }, { 0x99A, 12 }, { 0x4F, 7 }, - { 0x98, 8 }, { 0x6, 3 }, { 0x5, 3 }, { 0x1D, 5 }, - { 0x1C, 5 }, { 0x7C, 7 }, { 0x267, 10 }, { 0x1331, 13 }, - { 0x1330, 13 }, { 0x1333, 13 }, { 0x1332, 13 }, { 0x266D, 14 }, - { 0x266C, 14 }, { 0x266F, 14 }, { 0x266E, 14 }, { 0x1, 3 }, - { 0x4, 4 }, { 0x1E, 5 }, { 0x12, 5 }, { 0xA, 5 }, - { 0x8, 4 }, { 0x0, 4 }, { 0x7D, 7 }, { 0x4D, 7 } + { 29, 4 }, { 1, 4 }, { 23, 3 }, { 24, 4 }, { 27, 5 }, { 3, 5 }, + { 0, 3 }, { 28, 4 }, { 26, 5 }, { 8, 8 }, { 5, 9 }, { 16, 13 }, + { 15, 13 }, { 18, 13 }, { 17, 13 }, { 6, 12 }, { 20, 14 }, { 19, 14 }, + { 22, 14 }, { 21, 14 }, { 14, 10 }, { 31, 7 }, { 4, 7 }, { 7, 7 }, + { 10, 3 }, { 9, 3 }, { 12, 5 }, { 11, 5 }, { 25, 5 }, { 13, 7 }, + { 30, 7 }, { 2, 6 }, }, { /* AC bias group 4, table 6 */ - { 0x2, 3 }, { 0x7, 4 }, { 0x15, 5 }, { 0x3, 4 }, - { 0x4, 5 }, { 0xA7, 8 }, { 0x536, 11 }, { 0x28, 6 }, - { 0x29A, 10 }, { 0x6, 3 }, { 0x4, 3 }, { 0x1C, 5 }, - { 0x17, 5 }, { 0xA4, 8 }, { 0x29BE, 14 }, { 0x537F, 15 }, - { 0x537E, 15 }, { 0x29B9, 14 }, { 0x29B8, 14 }, { 0x29BB, 14 }, - { 0x29BA, 14 }, { 0x29BD, 14 }, { 0x29BC, 14 }, { 0xF, 4 }, - { 0x0, 4 }, { 0x5, 5 }, { 0x16, 5 }, { 0x1D, 5 }, - { 0x6, 4 }, { 0x1, 4 }, { 0xA5, 8 }, { 0x14C, 9 } + { 24, 4 }, { 29, 4 }, { 4, 5 }, { 25, 5 }, { 3, 4 }, { 0, 3 }, + { 28, 4 }, { 1, 4 }, { 10, 3 }, { 7, 6 }, { 13, 8 }, { 30, 8 }, + { 31, 9 }, { 8, 10 }, { 6, 11 }, { 18, 14 }, { 17, 14 }, { 20, 14 }, + { 19, 14 }, { 22, 14 }, { 21, 14 }, { 14, 14 }, { 16, 15 }, { 15, 15 }, + { 5, 8 }, { 2, 5 }, { 26, 5 }, { 12, 5 }, { 9, 3 }, { 11, 5 }, + { 27, 5 }, { 23, 4 }, }, { /* AC bias group 4, table 7 */ - { 0x4, 3 }, { 0x7, 4 }, { 0x1A, 5 }, { 0xC, 4 }, - { 0x6, 4 }, { 0x29, 6 }, { 0x1BD, 9 }, { 0x1BE3, 13 }, - { 0x1BE0, 13 }, { 0x0, 2 }, { 0x7, 3 }, { 0x6E, 7 }, - { 0x1BC, 9 }, { 0x37C3, 14 }, { 0x37C2, 14 }, { 0x37CD, 14 }, - { 0x37CC, 14 }, { 0x37CF, 14 }, { 0x37CE, 14 }, { 0x37C9, 14 }, - { 0x37C8, 14 }, { 0x37CB, 14 }, { 0x37CA, 14 }, { 0x15, 5 }, - { 0x1BF, 9 }, { 0x37D, 10 }, { 0x36, 6 }, { 0x2, 3 }, - { 0xB, 4 }, { 0x28, 6 }, { 0x37C5, 14 }, { 0x37C4, 14 } + { 9, 2 }, { 27, 3 }, { 4, 4 }, { 1, 4 }, { 0, 3 }, { 29, 6 }, + { 5, 6 }, { 23, 5 }, { 28, 4 }, { 3, 4 }, { 2, 5 }, { 26, 6 }, + { 11, 7 }, { 12, 9 }, { 6, 9 }, { 8, 13 }, { 14, 14 }, { 13, 14 }, + { 31, 14 }, { 30, 14 }, { 7, 13 }, { 20, 14 }, { 19, 14 }, { 22, 14 }, + { 21, 14 }, { 16, 14 }, { 15, 14 }, { 18, 14 }, { 17, 14 }, { 25, 10 }, + { 24, 9 }, { 10, 3 }, }, { /* AC bias group 4, table 8 */ - { 0x1, 3 }, { 0x9, 5 }, { 0x3, 6 }, { 0x2, 6 }, - { 0x11F, 10 }, { 0x8E9, 13 }, { 0x8E8, 13 }, { 0x2D, 7 }, - { 0x22, 7 }, { 0x6, 3 }, { 0x7, 3 }, { 0x10, 5 }, - { 0x11, 5 }, { 0x17, 6 }, { 0x2C, 7 }, { 0x46, 8 }, - { 0x11E, 10 }, { 0x11C, 10 }, { 0x477, 12 }, { 0x8EB, 13 }, - { 0x8EA, 13 }, { 0x8ED, 13 }, { 0x8EC, 13 }, { 0x3, 3 }, - { 0xB, 4 }, { 0x1, 4 }, { 0x14, 5 }, { 0xA, 5 }, - { 0x9, 4 }, { 0x15, 5 }, { 0x0, 5 }, { 0x10, 6 } + { 30, 5 }, { 3, 6 }, { 2, 6 }, { 25, 4 }, { 0, 3 }, { 31, 6 }, + { 8, 7 }, { 15, 8 }, { 17, 10 }, { 6, 13 }, { 5, 13 }, { 20, 13 }, + { 19, 13 }, { 22, 13 }, { 21, 13 }, { 18, 12 }, { 16, 10 }, { 4, 10 }, + { 1, 5 }, { 27, 5 }, { 14, 7 }, { 7, 7 }, { 13, 6 }, { 23, 3 }, + { 11, 5 }, { 12, 5 }, { 28, 4 }, { 26, 5 }, { 29, 5 }, { 24, 4 }, + { 9, 3 }, { 10, 3 }, }, { /* AC bias group 4, table 9 */ - { 0x1, 3 }, { 0x1D, 5 }, { 0x22, 6 }, { 0x13, 6 }, - { 0x11E, 9 }, { 0x8FC, 12 }, { 0x23F5, 14 }, { 0x23, 7 }, - { 0x22, 7 }, { 0x5, 3 }, { 0x6, 3 }, { 0x10, 5 }, - { 0xB, 5 }, { 0x10, 6 }, { 0x8E, 8 }, { 0x23E, 10 }, - { 0x8FF, 12 }, { 0x11FD, 13 }, { 0x23F4, 14 }, { 0x23F7, 14 }, - { 0x23F6, 14 }, { 0x23F9, 14 }, { 0x23F8, 14 }, { 0x3, 3 }, - { 0x9, 4 }, { 0x0, 4 }, { 0x1C, 5 }, { 0xA, 5 }, - { 0xF, 4 }, { 0x1, 4 }, { 0x12, 6 }, { 0x46, 7 } + { 25, 4 }, { 29, 4 }, { 0, 3 }, { 13, 6 }, { 8, 7 }, { 7, 7 }, + { 30, 6 }, { 3, 6 }, { 27, 5 }, { 12, 5 }, { 23, 3 }, { 11, 5 }, + { 2, 6 }, { 31, 7 }, { 14, 8 }, { 4, 9 }, { 15, 10 }, { 5, 12 }, + { 18, 14 }, { 6, 14 }, { 20, 14 }, { 19, 14 }, { 22, 14 }, { 21, 14 }, + { 17, 13 }, { 16, 12 }, { 24, 4 }, { 9, 3 }, { 10, 3 }, { 26, 5 }, + { 1, 5 }, { 28, 4 }, }, { /* AC bias group 4, table 10 */ - { 0x3, 3 }, { 0x1F, 5 }, { 0x3C, 6 }, { 0x3D, 6 }, - { 0x86, 8 }, { 0x877, 12 }, { 0x10E8, 13 }, { 0x41, 7 }, - { 0x40, 7 }, { 0x5, 3 }, { 0x6, 3 }, { 0x7, 5 }, - { 0x6, 5 }, { 0x4, 6 }, { 0x10F, 9 }, { 0x21C, 10 }, - { 0x875, 12 }, { 0x21D3, 14 }, { 0x21D2, 14 }, { 0x21D9, 14 }, - { 0x21D8, 14 }, { 0x21DB, 14 }, { 0x21DA, 14 }, { 0x2, 3 }, - { 0x9, 4 }, { 0x0, 4 }, { 0x11, 5 }, { 0x3, 5 }, - { 0xE, 4 }, { 0x2, 4 }, { 0x5, 6 }, { 0x42, 7 } + { 25, 4 }, { 13, 6 }, { 30, 6 }, { 27, 5 }, { 29, 4 }, { 12, 5 }, + { 11, 5 }, { 23, 3 }, { 0, 3 }, { 8, 7 }, { 7, 7 }, { 31, 7 }, + { 4, 8 }, { 15, 10 }, { 6, 13 }, { 18, 14 }, { 17, 14 }, { 16, 12 }, + { 20, 14 }, { 19, 14 }, { 22, 14 }, { 21, 14 }, { 5, 12 }, { 14, 9 }, + { 26, 5 }, { 24, 4 }, { 9, 3 }, { 10, 3 }, { 28, 4 }, { 2, 6 }, + { 3, 6 }, { 1, 5 }, }, { /* AC bias group 4, table 11 */ - { 0x4, 3 }, { 0x1, 4 }, { 0x3D, 6 }, { 0x9, 5 }, - { 0xF3, 8 }, { 0x793, 11 }, { 0x1E45, 13 }, { 0x0, 7 }, - { 0x2, 7 }, { 0x5, 3 }, { 0x6, 3 }, { 0x8, 5 }, - { 0x1, 5 }, { 0x3, 7 }, { 0x1E5, 9 }, { 0x792, 11 }, - { 0x1E44, 13 }, { 0x1E47, 13 }, { 0x1E46, 13 }, { 0x1E41, 13 }, - { 0x1E40, 13 }, { 0x1E43, 13 }, { 0x1E42, 13 }, { 0x1, 3 }, - { 0x6, 4 }, { 0x1F, 5 }, { 0xF, 5 }, { 0xE, 5 }, - { 0xE, 4 }, { 0x5, 4 }, { 0x78, 7 }, { 0x1, 7 } + { 7, 7 }, { 31, 7 }, { 8, 7 }, { 13, 7 }, { 12, 5 }, { 1, 4 }, + { 23, 3 }, { 11, 5 }, { 3, 5 }, { 29, 4 }, { 24, 4 }, { 27, 5 }, + { 26, 5 }, { 0, 3 }, { 9, 3 }, { 10, 3 }, { 28, 4 }, { 30, 7 }, + { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, { 16, 13 }, { 6, 13 }, + { 18, 13 }, { 17, 13 }, { 15, 11 }, { 5, 11 }, { 14, 9 }, { 4, 8 }, + { 2, 6 }, { 25, 5 }, }, { /* AC bias group 4, table 12 */ - { 0x4, 3 }, { 0x5, 4 }, { 0xE, 5 }, { 0x17, 5 }, - { 0x3E, 7 }, { 0xF0, 9 }, { 0xF1E, 13 }, { 0x7A, 8 }, - { 0x7F, 8 }, { 0x6, 3 }, { 0x7, 3 }, { 0x5, 5 }, - { 0x4, 5 }, { 0x7B, 8 }, { 0x1E2, 10 }, { 0x1E3F, 14 }, - { 0x1E3E, 14 }, { 0xF19, 13 }, { 0xF18, 13 }, { 0xF1B, 13 }, - { 0xF1A, 13 }, { 0xF1D, 13 }, { 0xF1C, 13 }, { 0x0, 3 }, - { 0x3, 4 }, { 0x16, 5 }, { 0x9, 5 }, { 0x8, 5 }, - { 0xA, 4 }, { 0x6, 4 }, { 0x7E, 8 }, { 0x79, 8 } + { 23, 3 }, { 12, 5 }, { 11, 5 }, { 24, 4 }, { 27, 5 }, { 26, 5 }, + { 1, 4 }, { 29, 4 }, { 2, 5 }, { 5, 9 }, { 14, 10 }, { 18, 13 }, + { 17, 13 }, { 20, 13 }, { 19, 13 }, { 22, 13 }, { 21, 13 }, { 6, 13 }, + { 16, 14 }, { 15, 14 }, { 31, 8 }, { 7, 8 }, { 13, 8 }, { 4, 7 }, + { 30, 8 }, { 8, 8 }, { 0, 3 }, { 28, 4 }, { 25, 5 }, { 3, 5 }, + { 9, 3 }, { 10, 3 }, }, { /* AC bias group 4, table 13 */ - { 0x5, 3 }, { 0xC, 4 }, { 0x1A, 5 }, { 0x4, 4 }, - { 0x1A, 6 }, { 0xDE, 9 }, { 0xDF4, 13 }, { 0xDD, 9 }, - { 0x6D, 8 }, { 0x0, 2 }, { 0x7, 3 }, { 0x25, 6 }, - { 0x24, 6 }, { 0xDC, 9 }, { 0xDF7, 13 }, { 0x1BEB, 14 }, - { 0x1BEA, 14 }, { 0xDF1, 13 }, { 0xDF0, 13 }, { 0xDF3, 13 }, - { 0xDF2, 13 }, { 0x1BED, 14 }, { 0x1BEC, 14 }, { 0x8, 4 }, - { 0x13, 5 }, { 0xC, 5 }, { 0x37, 6 }, { 0x36, 6 }, - { 0x5, 4 }, { 0x7, 4 }, { 0x6C, 8 }, { 0x1BF, 10 } + { 9, 2 }, { 3, 4 }, { 28, 4 }, { 25, 5 }, { 4, 6 }, { 30, 8 }, + { 8, 8 }, { 13, 9 }, { 7, 9 }, { 5, 9 }, { 18, 13 }, { 17, 13 }, + { 20, 13 }, { 19, 13 }, { 6, 13 }, { 16, 14 }, { 15, 14 }, { 22, 14 }, + { 21, 14 }, { 14, 13 }, { 31, 10 }, { 29, 4 }, { 23, 4 }, { 12, 6 }, + { 11, 6 }, { 24, 5 }, { 0, 3 }, { 1, 4 }, { 2, 5 }, { 27, 6 }, + { 26, 6 }, { 10, 3 }, }, { /* AC bias group 4, table 14 */ - { 0x5, 3 }, { 0xD, 4 }, { 0x1F, 5 }, { 0xC, 4 }, - { 0x3B, 6 }, { 0x40, 7 }, { 0x41A, 11 }, { 0x104, 9 }, - { 0x107, 9 }, { 0x1, 2 }, { 0x0, 2 }, { 0x24, 6 }, - { 0x21, 6 }, { 0x20B, 10 }, { 0x106E, 13 }, { 0x20DF, 14 }, - { 0x20DE, 14 }, { 0x1055, 13 }, { 0x1054, 13 }, { 0x1057, 13 }, - { 0x1056, 13 }, { 0x106D, 13 }, { 0x106C, 13 }, { 0x11, 5 }, - { 0x3A, 6 }, { 0x25, 6 }, { 0x38, 6 }, { 0x39, 6 }, - { 0x13, 5 }, { 0x1E, 5 }, { 0x20C, 10 }, { 0x414, 11 } + { 10, 2 }, { 9, 2 }, { 5, 7 }, { 7, 9 }, { 31, 11 }, { 18, 13 }, + { 17, 13 }, { 20, 13 }, { 19, 13 }, { 13, 10 }, { 30, 10 }, { 6, 11 }, + { 22, 13 }, { 21, 13 }, { 14, 13 }, { 16, 14 }, { 15, 14 }, { 8, 9 }, + { 12, 6 }, { 23, 5 }, { 11, 6 }, { 25, 6 }, { 28, 5 }, { 0, 3 }, + { 3, 4 }, { 1, 4 }, { 26, 6 }, { 27, 6 }, { 24, 6 }, { 4, 6 }, + { 29, 5 }, { 2, 5 }, }, { /* AC bias group 4, table 15 */ - { 0x0, 2 }, { 0x7, 4 }, { 0xD, 5 }, { 0x5, 4 }, - { 0x9, 5 }, { 0x22, 7 }, { 0xCD1, 13 }, { 0xCD0, 13 }, - { 0xCD3, 13 }, { 0x3, 2 }, { 0x2, 2 }, { 0x8D, 9 }, - { 0xCC, 9 }, { 0x66B, 12 }, { 0xCD2, 13 }, { 0x19B5, 14 }, - { 0x19B4, 14 }, { 0x19B7, 14 }, { 0x19B6, 14 }, { 0x19B1, 14 }, - { 0x19B0, 14 }, { 0x19B3, 14 }, { 0x19B2, 14 }, { 0x47, 8 }, - { 0x8C, 9 }, { 0x337, 11 }, { 0x67, 8 }, { 0x18, 6 }, - { 0x10, 6 }, { 0x32, 7 }, { 0xCD5, 13 }, { 0xCD4, 13 } - } + { 0, 2 }, { 28, 6 }, { 5, 7 }, { 24, 9 }, { 11, 9 }, { 23, 8 }, + { 4, 5 }, { 3, 4 }, { 27, 6 }, { 29, 7 }, { 12, 9 }, { 7, 13 }, + { 6, 13 }, { 14, 13 }, { 8, 13 }, { 31, 13 }, { 30, 13 }, { 13, 12 }, + { 20, 14 }, { 19, 14 }, { 22, 14 }, { 21, 14 }, { 16, 14 }, { 15, 14 }, + { 18, 14 }, { 17, 14 }, { 25, 11 }, { 26, 8 }, { 2, 5 }, { 1, 4 }, + { 10, 2 }, { 9, 2 }, + }, }; #endif /* AVCODEC_VP4DATA_H */ From patchwork Tue Nov 10 10:58:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23518 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 4545144A3F2 for ; Tue, 10 Nov 2020 12:59:28 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2B16668BFF5; Tue, 10 Nov 2020 12:59:28 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0E50068BFDD for ; Tue, 10 Nov 2020 12:59:24 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id d12so10664170wrr.13 for ; Tue, 10 Nov 2020 02:59:23 -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=C7wGmQQoL6O+3IJqAKqfCy0Po/nzBi0nGPmeYwWamn0=; b=P2BwCBpuJZXkKDJ0DQPF4Szjeo6r8ERhcu3Hr7z5WoO3Z4qev6p0HWxP5wrCghbMIG 8NFUA4aYpsk+cbYsXo8W0Ve54AWtoVSs/lDE94fv3PR78VzLdCysDpdFSCwDEeNXpYb/ bDEnOgsWNzw7RnxR8p3x/DTvfXaVU7TosARevZR3avnU8qXVgFml4QcpoNcLh+AqnIp7 BPnwVjRInqostKbruSR4MQn5Em3ICyMc9kr1qIWduIG+OZmiOR6srD4dFMywDiv3GHhT lPDyx8PGdJkJ2cHE2p2+zzRh7UKRbr7iVDA2oi7kwTbFhKMQ0xeGNnCxRzxFjBml/9JC DA9g== 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=C7wGmQQoL6O+3IJqAKqfCy0Po/nzBi0nGPmeYwWamn0=; b=VzPDdYIne3Zy4vBFK8k2I1O+UJ4fCSbu/N4Ho0c15ft+KvcrMg1cknONo5kL1TvXJM roYub6myhItJwac4IGYNkX3qNd+gKyzMTMPvr08bfiF3dYxaL+TrBz8ghkHgXw9uJRgt mYQASKY5mKXFWm6ACMg0ONHpVCEWKF9uARiRu3h4KEMFXX6iFqzX9xLh+34D6qsoKQ0X sWA+FpabK0uoXqFb0hlMSOB/G8V1QdeVdsTCG3ghDHmaIInzkOsu4xzxEl2d2beqkyGo vQzZjZsehMRSGewVaJ/0iXTY/uZ5l1vqgmAcHKAsKT/xfA6yr/+j927B12kIKangU+P2 3llQ== X-Gm-Message-State: AOAM533JEoH2zHM8x7ZXLwYfU4Hf9k2ddsYBVyfKCXixp4/0oxRY1+H1 LNGgQ25usKKIc6PwKTaedKhiyyQF20k= X-Google-Smtp-Source: ABdhPJyKMM9+z0OgCgPlTCFE9Sj9qXffbtU8D8XfUTJVg6kngf+nxgyU97hdhbO97qtzA3pFKsPSBw== X-Received: by 2002:a5d:474f:: with SMTP id o15mr23266899wrs.100.1605005963242; Tue, 10 Nov 2020 02:59:23 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:22 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:22 +0100 Message-Id: <20201110105836.321916-9-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 100/114] avcodec/vp3: Use symbols table for VP3 motion vectors 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" Expressions like array[get_vlc2()] can be optimized by using a symbols table if the array is always the same for a given VLC. This requirement is fulfilled for the VLC used for VP3 motion vectors. The reason it hasn't been done before is probably that the array in this case contained entries in the range -31..31; but this is no problem with ff_init_vlc_from_lengths(): Just apply an offset of 31 to the symbols before storing them in the table used to initialize VP3 motion vectors and apply an offset of -31 when initializing the actual VLC. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp3.c | 20 ++++++++++++------- libavcodec/vp3data.h | 46 +++++++++++--------------------------------- 2 files changed, 24 insertions(+), 42 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 7037d03a98..f288a53fe1 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -48,6 +48,7 @@ #include "vp3dsp.h" #include "xiph.h" +#define VP3_MV_VLC_BITS 6 #define VP4_MV_VLC_BITS 6 #define SUPERBLOCK_VLC_BITS 6 @@ -946,8 +947,10 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb) case MODE_INTER_PLUS_MV: /* all 6 fragments use the same motion vector */ if (coding_mode == 0) { - motion_x[0] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)]; - motion_y[0] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)]; + motion_x[0] = get_vlc2(gb, s->motion_vector_vlc.table, + VP3_MV_VLC_BITS, 2); + motion_y[0] = get_vlc2(gb, s->motion_vector_vlc.table, + VP3_MV_VLC_BITS, 2); } else if (coding_mode == 1) { motion_x[0] = fixed_motion_vector_table[get_bits(gb, 6)]; motion_y[0] = fixed_motion_vector_table[get_bits(gb, 6)]; @@ -976,8 +979,10 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb) current_fragment = BLOCK_Y * s->fragment_width[0] + BLOCK_X; if (s->all_fragments[current_fragment].coding_method != MODE_COPY) { if (coding_mode == 0) { - motion_x[k] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)]; - motion_y[k] = motion_vector_table[get_vlc2(gb, s->motion_vector_vlc.table, 6, 2)]; + motion_x[k] = get_vlc2(gb, s->motion_vector_vlc.table, + VP3_MV_VLC_BITS, 2); + motion_y[k] = get_vlc2(gb, s->motion_vector_vlc.table, + VP3_MV_VLC_BITS, 2); } else if (coding_mode == 1) { motion_x[k] = fixed_motion_vector_table[get_bits(gb, 6)]; motion_y[k] = fixed_motion_vector_table[get_bits(gb, 6)]; @@ -2477,9 +2482,10 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) if (ret < 0) return ret; - if ((ret = init_vlc(&s->motion_vector_vlc, 6, 63, - &motion_vector_vlc_table[0][1], 2, 1, - &motion_vector_vlc_table[0][0], 2, 1, 0)) < 0) + ret = ff_init_vlc_from_lengths(&s->motion_vector_vlc, VP3_MV_VLC_BITS, 63, + &motion_vector_vlc_table[0][1], 2, + &motion_vector_vlc_table[0][0], 2, 1, -31, 0); + if (ret < 0) return ret; #if CONFIG_VP4_DECODER diff --git a/libavcodec/vp3data.h b/libavcodec/vp3data.h index eb516a0add..901850bd75 100644 --- a/libavcodec/vp3data.h +++ b/libavcodec/vp3data.h @@ -112,41 +112,17 @@ static const uint8_t mode_code_vlc_len[8] = { }; static const uint8_t motion_vector_vlc_table[63][2] = { - { 0, 3 }, - { 1, 3 }, - { 2, 3 }, - - { 6, 4 }, { 7, 4 }, - - { 8, 4 }, { 9, 4 }, - - { 40, 6 }, { 41, 6 }, { 42, 6 }, { 43, 6 }, - { 44, 6 }, { 45, 6 }, { 46, 6 }, { 47, 6 }, - - { 96, 7 }, { 97, 7 }, { 98, 7 }, { 99, 7 }, - { 100, 7 }, { 101, 7 }, { 102, 7 }, { 103, 7 }, - { 104, 7 }, { 105, 7 }, { 106, 7 }, { 107, 7 }, - { 108, 7 }, { 109, 7 }, { 110, 7 }, { 111, 7 }, - - { 0xE0, 8 }, { 0xE1, 8 }, { 0xE2, 8 }, { 0xE3, 8 }, - { 0xE4, 8 }, { 0xE5, 8 }, { 0xE6, 8 }, { 0xE7, 8 }, - { 0xE8, 8 }, { 0xE9, 8 }, { 0xEA, 8 }, { 0xEB, 8 }, - { 0xEC, 8 }, { 0xED, 8 }, { 0xEE, 8 }, { 0xEF, 8 }, - - { 0xF0, 8 }, { 0xF1, 8 }, { 0xF2, 8 }, { 0xF3, 8 }, - { 0xF4, 8 }, { 0xF5, 8 }, { 0xF6, 8 }, { 0xF7, 8 }, - { 0xF8, 8 }, { 0xF9, 8 }, { 0xFA, 8 }, { 0xFB, 8 }, - { 0xFC, 8 }, { 0xFD, 8 }, { 0xFE, 8 }, { 0xFF, 8 } -}; - -static const int8_t motion_vector_table[63] = { - 0, 1, -1, - 2, -2, - 3, -3, - 4, -4, 5, -5, 6, -6, 7, -7, - 8, -8, 9, -9, 10, -10, 11, -11, 12, -12, 13, -13, 14, -14, 15, -15, - 16, -16, 17, -17, 18, -18, 19, -19, 20, -20, 21, -21, 22, -22, 23, -23, - 24, -24, 25, -25, 26, -26, 27, -27, 28, -28, 29, -29, 30, -30, 31, -31 + { 31, 3 }, { 32, 3 }, { 30, 3 }, { 33, 4 }, { 29, 4 }, { 34, 4 }, + { 28, 4 }, { 35, 6 }, { 27, 6 }, { 36, 6 }, { 26, 6 }, { 37, 6 }, + { 25, 6 }, { 38, 6 }, { 24, 6 }, { 39, 7 }, { 23, 7 }, { 40, 7 }, + { 22, 7 }, { 41, 7 }, { 21, 7 }, { 42, 7 }, { 20, 7 }, { 43, 7 }, + { 19, 7 }, { 44, 7 }, { 18, 7 }, { 45, 7 }, { 17, 7 }, { 46, 7 }, + { 16, 7 }, { 47, 8 }, { 15, 8 }, { 48, 8 }, { 14, 8 }, { 49, 8 }, + { 13, 8 }, { 50, 8 }, { 12, 8 }, { 51, 8 }, { 11, 8 }, { 52, 8 }, + { 10, 8 }, { 53, 8 }, { 9, 8 }, { 54, 8 }, { 8, 8 }, { 55, 8 }, + { 7, 8 }, { 56, 8 }, { 6, 8 }, { 57, 8 }, { 5, 8 }, { 58, 8 }, + { 4, 8 }, { 59, 8 }, { 3, 8 }, { 60, 8 }, { 2, 8 }, { 61, 8 }, + { 1, 8 }, { 62, 8 }, { 0, 8 }, }; static const int8_t fixed_motion_vector_table[64] = { From patchwork Tue Nov 10 10:58:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23521 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 870AC44A3F2 for ; Tue, 10 Nov 2020 12:59:30 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6B45768BFDB; Tue, 10 Nov 2020 12:59:30 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DB18A68BFDD for ; Tue, 10 Nov 2020 12:59:24 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id k2so8797352wrx.2 for ; Tue, 10 Nov 2020 02:59:24 -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=HXn0rAwPqFv7NM5Xe1dzZrLpfaBJvg55XXpTNF7geKE=; b=hsMjWl9XhSmgu4bDV4uL5lqcAZO/txqmM+UyVgqe7e9xzWY0limotDQARNhltBGNG3 +Pnyh2AV0llXXWuAYK6g4/mnQnICHGIggp6X+3d0cICugu0DMLsLvEujCDCP3tJS0jKH WZoCcF6lhgC73jKrQlHvBms91LJFmUajRb1Ir8e/+GWeDt0lBxNdcSN9qriEp3gcOsC1 mgymYdMc7zHzLGquPZyMpNZHG3U0K+rizEfHVF1cRM8fdasFcVUrMF1CPwsOG96V+LcP IUx5wrdv/rGOcM4t0rzuXhBAKV3uv5MVGfdGaARlhWdbsFLA3unKc8UyMOPDtXg/b0MF dY5g== 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=HXn0rAwPqFv7NM5Xe1dzZrLpfaBJvg55XXpTNF7geKE=; b=tR6ngJwYUGmo5GZW8i590flK+NIJIxfCh3W2uL1r3aQzDLENqeqdNt3+0r+0gziiXj zcfOBZhb9JfBIsrA6goceu8nxua3EKC3QV/8RH9ngA7kIXHFJB89RsmIMUyVCzfLcOeT Z97I2OCCUOu+x8t9MPYKJ2gZfKvFcfEdkzCbjnHKro9mFlAHnF5gNbnxsx+zZTYymefw XFs1Na6wpZqTc9Esw7F4eD5D/goyrBzAEIdmaHj1dfR1bn+ZZKOQVt18o+Pt/7CIanLu 7aqLRPLIClNmT9SwZsCufE2QAru+bGuYqR/mhAFBBgJ9fGheE3KKEwE2SocdkNZ2M88V pdzw== X-Gm-Message-State: AOAM532pRXfxYeFxGIQ7go1Dj50nzZox5cGhzlMI4Q+OJ1NY1lfi4XSK /ubKgT0aqHQGKp0XUpROVDezRf1F8Cs= X-Google-Smtp-Source: ABdhPJy3aGHUZnwEsSEcOyuBrwF4O3fuxiAzB+YfNDkmL1IIdkgY1ZACVePZuICx8w4/FJu1skQpGw== X-Received: by 2002:a5d:6a0b:: with SMTP id m11mr7228383wru.190.1605005964181; Tue, 10 Nov 2020 02:59:24 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:23 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:23 +0100 Message-Id: <20201110105836.321916-10-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 101/114] avcodec/vp3: Remove code duplication when initializing Theora 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" theora_init_huffman_tables() does essentially the same as ff_init_vlcs_from_lengths(). Signed-off-by: Andreas Rheinhardt --- libavcodec/vp3.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index f288a53fe1..743d00390c 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2319,20 +2319,6 @@ static av_cold int init_frames(Vp3DecodeContext *s) return 0; } -static av_cold int theora_init_huffman_tables(VLC *vlc, const HuffTable *huff) -{ - uint32_t code = 0, codes[32]; - - for (unsigned i = 0; i < huff->nb_entries; i++) { - codes[i] = code >> (31 - huff->entries[i].len); - code += 0x80000000U >> huff->entries[i].len; - } - return ff_init_vlc_sparse(vlc, 11, huff->nb_entries, - &huff->entries[0].len, sizeof(huff->entries[0]), 1, - codes, 4, 4, - &huff->entries[0].sym, sizeof(huff->entries[0]), 1, 0); -} - static av_cold int vp3_decode_init(AVCodecContext *avctx) { Vp3DecodeContext *s = avctx->priv_data; @@ -2458,7 +2444,11 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) } } else { for (i = 0; i < FF_ARRAY_ELEMS(s->coeff_vlc); i++) { - ret = theora_init_huffman_tables(&s->coeff_vlc[i], &s->huffman_table[i]); + const HuffTable *tab = &s->huffman_table[i]; + + ret = ff_init_vlc_from_lengths(&s->coeff_vlc[i], 11, tab->nb_entries, + &tab->entries[0].len, sizeof(*tab->entries), + &tab->entries[0].sym, sizeof(*tab->entries), 1, 0, 0); if (ret < 0) return ret; } From patchwork Tue Nov 10 10:58:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23565 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 BFB4844AD0B for ; Tue, 10 Nov 2020 13:13:52 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3699968C099; Tue, 10 Nov 2020 12:59:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ED95168BFDD for ; Tue, 10 Nov 2020 12:59:25 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id d12so10664272wrr.13 for ; Tue, 10 Nov 2020 02:59:25 -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=hZ2ijUsrJJ5KvXhffCFJuZ1eeK3eiRmhw4VFuhKS9f0=; b=g9o5olvV6UNM3yYvkJsCzlJmZO4NPFbfwVGcYf6Vs0aop/hGxpPxFLDXoCgkoyfx9K zQZ0qpqiJClmYInH6mitimcDTGyja0/tdepG+AjxbmmjlD0N9EevKu7pRc9rIVulbvZ5 od+B+cNh0ZPG1hIgxt9unwEFhT7+nuvgqqTMcIOM28S8Pu9iQSDTmuAOzFqliPMljxiG 1OVS8NiOofWG2KWY5xdTc5akDQcYCWNJFfvGJ7GnHYm2jRW5Sk7YCKXLWRfih5pTOUnX S0i2kmAETMaZI+WFGMGbojEq3OMbeHhjKucyG4bl2dUzmte12Y9IPDzxskO9y9WASFv1 MoaQ== 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=hZ2ijUsrJJ5KvXhffCFJuZ1eeK3eiRmhw4VFuhKS9f0=; b=FCjhesngd3KZ/NvmsvzgS2zbPv5zehzTSbIfDoTRfPUqDyp9MbZ7w76zDRLlb+hLb5 WbeBOBNFeVjx9IrVXe6lI96dXz9KBBzX/I9J3zNAscW/VTWY7OEvhoRyzuBGCHAVWB1L Jjb28zSWYYXEXCxyccd7nM6790MaLOIeoHP9BVprW3sVlOmNfctcNXkKQoMNUfS7WA4u v7dwdQPXpeqFRCSdIXGmxzIzDDyz+9dqbaCjoeWiqR67UXbdGUnwHiZixBFMkA5EeHbV uk0/pkcC01NNTV/+a7vfr1YP5UpoRvwDjVoTzlGQl9FSO0B2QA0PBkEx4CB0yso9IEio DQag== X-Gm-Message-State: AOAM531kcM6ERoZW7ScwJzBjMMpok/qeo+NhqcLB4RDTLdcoHDh35FSx UVlKEA4CEcRBYvKLjJlwCvzQWDC6GHE= X-Google-Smtp-Source: ABdhPJy3goB3pLEEUOPOQUdfoDZAbU1rSPcw2hOQhnbZsLyWLBA2h8T1ckgsvSzhVa/x4rzapy9txA== X-Received: by 2002:a5d:6b8e:: with SMTP id n14mr22208728wrx.238.1605005965198; Tue, 10 Nov 2020 02:59:25 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:24 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:24 +0100 Message-Id: <20201110105836.321916-11-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 102/114] avcodec/intrax8: Replace always-false check by assert 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/intrax8.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c index f385423dc1..bd00a3e027 100644 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@ -115,11 +115,7 @@ static av_cold int x8_vlc_init(void) init_or_vlc(j_orient_vlc[1][i], x8_orient_lowquant_table[i][0]); #undef init_or_vlc - if (offset != sizeof(table) / sizeof(VLC_TYPE) / 2) { - av_log(NULL, AV_LOG_ERROR, "table size %"SIZE_SPECIFIER" does not match needed %i\n", - sizeof(table) / sizeof(VLC_TYPE) / 2, offset); - return AVERROR_INVALIDDATA; - } + av_assert2(offset == FF_ARRAY_ELEMS(table)); return 0; } From patchwork Tue Nov 10 10:58:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23570 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 0847044B238 for ; Tue, 10 Nov 2020 13:14:51 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 908DD68C089; Tue, 10 Nov 2020 12:59:36 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AA0E668BFF0 for ; Tue, 10 Nov 2020 12:59:26 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id o15so4334048wru.6 for ; Tue, 10 Nov 2020 02:59:26 -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=EH4KD5qFk9+kKsqq/pdR97VCPTAamWxKAr/a9KKpu08=; b=KeHGCNkDA/uoGdJ966GR3JeESjwFLaiDAidQ/OjCwQazBhZsrWwv/bHRNpYvz2VO66 99RZeGrO3MX5ARMFuXN4UbHr+FDgbR2OZKuA0kQd7q6Q4VA6ofyxuh4l54NRrA09vajp Q57biFJy018OFDBj9dcvURc6VPXU86cB9Bka1iNvdYlW8cTnBbamXrXgtNLx6glFaVra 5aEwpjXhyL08bM4h/qp7K2qMkjfCeO42piE7VRJVF5jzsxSk8P6oe/dpVh+Dq2FPwy9i 3UVW7fOX0gXi99ABWdLdKh9hW3b4eEsykWNvAg4licUAm+m+acDm+WTEQVLNohe+QORy QHJw== 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=EH4KD5qFk9+kKsqq/pdR97VCPTAamWxKAr/a9KKpu08=; b=FmTfjQQ9nZRbmJ2VZVEoBWCAC1x6KAxBYwpzsMwXrp907B3zjjbSNStMyYKNa5B/zL qWlW3rzNCgqaKVy/7Ur5q1v+3RqK3cKY0jTqEXXKqB0SvdHUUGwoNn45JD5xVQEZtCaE hXAlsA4J69UtW4T8JnduOX3DnUniO1CUXhF7Gx31zrltyhTGHjTsGz0WTYIJpe88PtLs jbUtSTOGzuXbMQdK2PgbMj5N3BD6q11TFrl9JyN3HLP3KTOJaJiM8sExg0H+/wN0wNUN 3FcTKRWUC8A8K7MvSwj9jBWDsJySgYco6jxR9Z3MD3+5X2xVGsZl6fOgZn4wJCMAyNqG DQ4Q== X-Gm-Message-State: AOAM5310dV7wsf0+RoLgAKufYgV3nSFy8ugCv+ldNONcDC6d9MfzsGOd qeXKPyVw6aODF+yRrhXg2DAdxCErxj4= X-Google-Smtp-Source: ABdhPJxMrhqLLWa5+7sOqoG7w0u4APrybC/7kxLeHh0+m8hqLHZ5tyqsqiOXNvhSJGVdmIe7T5nItw== X-Received: by 2002:adf:dc4c:: with SMTP id m12mr23620315wrj.177.1605005966146; Tue, 10 Nov 2020 02:59:26 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:25 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:25 +0100 Message-Id: <20201110105836.321916-12-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 103/114] avcodec/intrax8: Remove VLC offsets table 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/intrax8.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c index bd00a3e027..71a50cc063 100644 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@ -50,18 +50,6 @@ static av_cold int x8_vlc_init(void) { int i; int offset = 0; - int sizeidx = 0; - static const uint16_t sizes[8 * 4 + 8 * 2 + 2 + 4] = { - 576, 548, 582, 618, 546, 616, 560, 642, - 584, 582, 704, 664, 512, 544, 656, 640, - 512, 648, 582, 566, 532, 614, 596, 648, - 586, 552, 584, 590, 544, 578, 584, 624, - - 528, 528, 526, 528, 536, 528, 526, 544, - 544, 512, 512, 528, 528, 544, 512, 544, - - 128, 128, 128, 128, 128, 128, - }; static VLC_TYPE table[28150][2]; @@ -69,10 +57,10 @@ static av_cold int x8_vlc_init(void) #define init_ac_vlc(dst, src) \ do { \ dst.table = &table[offset]; \ - dst.table_allocated = sizes[sizeidx]; \ - offset += sizes[sizeidx++]; \ + dst.table_allocated = FF_ARRAY_ELEMS(table) - offset; \ init_vlc(&dst, AC_VLC_BITS, 77, &src[1], 4, 2, &src[0], 4, 2, \ INIT_VLC_USE_NEW_STATIC); \ + offset += dst.table_size; \ } while(0) for (i = 0; i < 8; i++) { @@ -87,10 +75,10 @@ static av_cold int x8_vlc_init(void) #define init_dc_vlc(dst, src) \ do { \ dst.table = &table[offset]; \ - dst.table_allocated = sizes[sizeidx]; \ - offset += sizes[sizeidx++]; \ + dst.table_allocated = FF_ARRAY_ELEMS(table) - offset; \ init_vlc(&dst, DC_VLC_BITS, 34, &src[1], 4, 2, &src[0], 4, 2, \ INIT_VLC_USE_NEW_STATIC); \ + offset += dst.table_size; \ } while(0) for (i = 0; i < 8; i++) { @@ -103,10 +91,10 @@ static av_cold int x8_vlc_init(void) #define init_or_vlc(dst, src) \ do { \ dst.table = &table[offset]; \ - dst.table_allocated = sizes[sizeidx]; \ - offset += sizes[sizeidx++]; \ + dst.table_allocated = FF_ARRAY_ELEMS(table) - offset; \ init_vlc(&dst, OR_VLC_BITS, 12, &src[1], 4, 2, &src[0], 4, 2, \ INIT_VLC_USE_NEW_STATIC); \ + offset += dst.table_size; \ } while(0) for (i = 0; i < 2; i++) From patchwork Tue Nov 10 10:58:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23569 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 D827344B238 for ; Tue, 10 Nov 2020 13:14:37 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 89C3868C0AE; Tue, 10 Nov 2020 12:59:35 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A726368BFEB for ; Tue, 10 Nov 2020 12:59:27 +0200 (EET) Received: by mail-wr1-f66.google.com with SMTP id s8so5082823wrw.10 for ; Tue, 10 Nov 2020 02:59:27 -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=s2FFLMfC1uzdUpCAPabFWeKoiqS29D4vNN2RV7T26yM=; b=AxFxVeCRU7Lvy4Ewn6ZINA+AmrSZKmE0t0fnkDdglaNXpZ/OyvI9HYv+U/TPbIY9f1 caTb68XGI9fvr2e8APAikbMnFq/WyQ8y2usMuORwcIf+vnBOr0SUQgQ8mhB0mkO0wrAR cWfgoSI/lMmWIHiYj8ItufG18cvW0F5d2CM7U6qodROnS78bcLS/TBc+Tou0KhEdQ7gp IwiVklht8ti1dQAMh+u8rWDQ2zBRqsEPPSlEZ6EECYn6iy+Qq53X+xq2Om6Xjt0oK+0R N17h0YVHBTk03xLwLBy8VTgUGKPd/1mFfyj2qpELhjGjY30zzIT2HqYgiZ+yyCVjp8xU 6fVQ== 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=s2FFLMfC1uzdUpCAPabFWeKoiqS29D4vNN2RV7T26yM=; b=XNO5vVOInLqucC6PYXnEdIRDdlj27z1mlcz3V+KOo0wAch20K8I4xoE5KvElg0NsWq hpEwEMbYzver6Lh5LnNvrItII1qZnTkFFX6InfRTyBOOTyTv1XgKAveumdUEfydcCQi6 KwBSHbqWYzkyqTz87OimCAyzswS+2Eda4ngcgsnzaxyyNAAXJFGSjGZ0PpRQPmHlK6sC zIFK685b6djlZv6swoZgPThW908TZetSym0yCruut4L38Uxiy9gisSvjKrzlyLwP7fg4 a+aD7O5rwU/fDYxcVZf/LVj13zv/fsBg9MuT86EItk1neqFK+EXm0QFROYHOR2l9rg9t 6+yw== X-Gm-Message-State: AOAM530nk/0lY6DOyHS55fdKNGC8s3wsXw+oEgfFP9xyvhevI/ZoPqD2 R44wF2hKuBFBCwLnZnmLO8xOlaUSr50= X-Google-Smtp-Source: ABdhPJxrPipEaNtPUZ4Ci0dCrOjFktAILtjN6DsW6Vnu8OqspipOBNOk7vG3OimnrF6cnM4C2P5b8A== X-Received: by 2002:adf:de05:: with SMTP id b5mr21300159wrm.131.1605005966971; Tue, 10 Nov 2020 02:59:26 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:26 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:26 +0100 Message-Id: <20201110105836.321916-13-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 104/114] avcodec/intrax8: Avoid code duplication when 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/intrax8.c | 46 ++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c index 71a50cc063..9b7958e5f2 100644 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@ -31,6 +31,8 @@ #include "intrax8dsp.h" #include "mpegutils.h" +#define VLC_BUFFER_SIZE 28150 + #define MAX_TABLE_DEPTH(table_bits, max_bits) \ ((max_bits + table_bits - 1) / table_bits) @@ -46,21 +48,27 @@ static VLC j_ac_vlc[2][2][8]; // [quant < 13], [intra / inter], [select] static VLC j_dc_vlc[2][8]; // [quant], [select] static VLC j_orient_vlc[2][4]; // [quant], [select] +static av_cold void x8_init_vlc(VLC *vlc, int nb_bits, int nb_codes, + int *offset, const uint16_t table[][2]) +{ + static VLC_TYPE vlc_buf[VLC_BUFFER_SIZE][2]; + + vlc->table = &vlc_buf[*offset]; + vlc->table_allocated = VLC_BUFFER_SIZE - *offset; + init_vlc(vlc, nb_bits, nb_codes, &table[0][1], 4, 2, + &table[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC); + *offset += vlc->table_size; +} + static av_cold int x8_vlc_init(void) { int i; int offset = 0; - static VLC_TYPE table[28150][2]; - // set ac tables #define init_ac_vlc(dst, src) \ do { \ - dst.table = &table[offset]; \ - dst.table_allocated = FF_ARRAY_ELEMS(table) - offset; \ - init_vlc(&dst, AC_VLC_BITS, 77, &src[1], 4, 2, &src[0], 4, 2, \ - INIT_VLC_USE_NEW_STATIC); \ - offset += dst.table_size; \ + x8_init_vlc(&dst, AC_VLC_BITS, 77, &offset, &src); \ } while(0) for (i = 0; i < 8; i++) { @@ -74,11 +82,7 @@ static av_cold int x8_vlc_init(void) // set dc tables #define init_dc_vlc(dst, src) \ do { \ - dst.table = &table[offset]; \ - dst.table_allocated = FF_ARRAY_ELEMS(table) - offset; \ - init_vlc(&dst, DC_VLC_BITS, 34, &src[1], 4, 2, &src[0], 4, 2, \ - INIT_VLC_USE_NEW_STATIC); \ - offset += dst.table_size; \ + x8_init_vlc(&dst, DC_VLC_BITS, 34, &offset, &src); \ } while(0) for (i = 0; i < 8; i++) { @@ -88,22 +92,14 @@ static av_cold int x8_vlc_init(void) #undef init_dc_vlc // set orient tables -#define init_or_vlc(dst, src) \ - do { \ - dst.table = &table[offset]; \ - dst.table_allocated = FF_ARRAY_ELEMS(table) - offset; \ - init_vlc(&dst, OR_VLC_BITS, 12, &src[1], 4, 2, &src[0], 4, 2, \ - INIT_VLC_USE_NEW_STATIC); \ - offset += dst.table_size; \ - } while(0) - for (i = 0; i < 2; i++) - init_or_vlc(j_orient_vlc[0][i], x8_orient_highquant_table[i][0]); + x8_init_vlc(&j_orient_vlc[0][i], OR_VLC_BITS, 12, + &offset, x8_orient_highquant_table[i]); for (i = 0; i < 4; i++) - init_or_vlc(j_orient_vlc[1][i], x8_orient_lowquant_table[i][0]); -#undef init_or_vlc + x8_init_vlc(&j_orient_vlc[1][i], OR_VLC_BITS, 12, + &offset, x8_orient_lowquant_table[i]); - av_assert2(offset == FF_ARRAY_ELEMS(table)); + av_assert2(offset == VLC_BUFFER_SIZE); return 0; } From patchwork Tue Nov 10 10:58:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23573 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 51A9444B3E8 for ; Tue, 10 Nov 2020 13:15:32 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 64E7A68C0A0; Tue, 10 Nov 2020 12:59:39 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A055E68C094 for ; Tue, 10 Nov 2020 12:59:31 +0200 (EET) Received: by mail-wr1-f54.google.com with SMTP id c17so12170909wrc.11 for ; Tue, 10 Nov 2020 02:59:31 -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=ST+zntEz0pMkZMA3AsimIz3WkqU0dSu1S5P5uYP3+gs=; b=jN4erG8otbfWeQI9w/ALd/u+qj1rxOJ0YL+LGzWWMrw5fuKAweWXc/wdw4TaxmGom7 MTw4zZhw2ifyO5U66UaPayT5l64yx2/f5qwp68YzLZjbR5WOZRKV5ze/qkJqxdH8Zb1a c/hwVwsSJSyDxQf/MBXNFwL0XWFaJN1wKrWbtz5oPeoJa2a1viNwuaO1WSySeU//LwLD H80gqrCUri+Jo33ksn17bNl9SrTo4fJWhGFpEHzvaT6r5ZZ6XoZmgAg+UqQd+EOYx9Ts NZLCGdNumLRwdha/YzpU9/knfRKSCMskY0XtLS4pciP2i4UPNV/YvzEEc/FE3AGrLW3W JMoQ== 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=ST+zntEz0pMkZMA3AsimIz3WkqU0dSu1S5P5uYP3+gs=; b=aX4+DBvXmZodfjp/p6R2xb+2FzbmknRjduZ1Cpc/qL7Gyvd/ghO3cdS65lf9a3agzI iqqCaTozhjcBTwxBVo5gEWDuX45GDMfcqTZxZ3X8IR6y1QpiqbHiV3ko1HdWWfirVdP4 Pze02YeT5jMpG3g75C4pTR6s89AokRoZXbZsURr800n022Fo4lWJuRUNd5snQ/2EYkD+ OqYg8NDRJjSV3Rr4yqDe2ttpkfAgA38YdPw4uQNlroBO0ABqME0Secfu/2ZmdR1pDaCJ uwlZ2xD9lm9vtZobFoygxIzjkimxJ4FjPOYN0yIsoIiBrkALoYyqs9AKQgAbUD1i8WOW XucA== X-Gm-Message-State: AOAM530fVAkxEhJCtbUG111pDm1JHstAFhmR58utAIzmLVV6AmuuEBQD 7O96FQ4cCtmcSlbX6ZFPbEYe706avK0= X-Google-Smtp-Source: ABdhPJxNdz4E0L+WgfAhePJwSNTD/HtuAHGopSgAn0Va7hpWlCDaQD+yH+DyL0yf4ThLUjF8Fs+XKg== X-Received: by 2002:adf:eb47:: with SMTP id u7mr22947616wrn.163.1605005968295; Tue, 10 Nov 2020 02:59:28 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:27 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:27 +0100 Message-Id: <20201110105836.321916-14-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 105/114] avcodec/intrax8: Reduce the size of tables used to initialize 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" By switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths() one can replace an array of codes of type uint16_t with an array of symbols of type uint8_t, saving space. Also remove some more code duplication while at it. Signed-off-by: Andreas Rheinhardt --- libavcodec/intrax8.c | 37 +- libavcodec/intrax8huf.h | 1674 ++++++++++++++++++--------------------- 2 files changed, 768 insertions(+), 943 deletions(-) diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c index 9b7958e5f2..eec6447c85 100644 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@ -49,14 +49,14 @@ static VLC j_dc_vlc[2][8]; // [quant], [select] static VLC j_orient_vlc[2][4]; // [quant], [select] static av_cold void x8_init_vlc(VLC *vlc, int nb_bits, int nb_codes, - int *offset, const uint16_t table[][2]) + int *offset, const uint8_t table[][2]) { static VLC_TYPE vlc_buf[VLC_BUFFER_SIZE][2]; vlc->table = &vlc_buf[*offset]; vlc->table_allocated = VLC_BUFFER_SIZE - *offset; - init_vlc(vlc, nb_bits, nb_codes, &table[0][1], 4, 2, - &table[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(vlc, nb_bits, nb_codes, &table[0][1], 2, + &table[0][0], 2, 1, 0, INIT_VLC_USE_NEW_STATIC); *offset += vlc->table_size; } @@ -66,30 +66,17 @@ static av_cold int x8_vlc_init(void) int offset = 0; // set ac tables -#define init_ac_vlc(dst, src) \ - do { \ - x8_init_vlc(&dst, AC_VLC_BITS, 77, &offset, &src); \ - } while(0) - - for (i = 0; i < 8; i++) { - init_ac_vlc(j_ac_vlc[0][0][i], x8_ac0_highquant_table[i][0]); - init_ac_vlc(j_ac_vlc[0][1][i], x8_ac1_highquant_table[i][0]); - init_ac_vlc(j_ac_vlc[1][0][i], x8_ac0_lowquant_table[i][0]); - init_ac_vlc(j_ac_vlc[1][1][i], x8_ac1_lowquant_table[i][0]); - } -#undef init_ac_vlc + for (int i = 0; i < 2; i++) + for (int j = 0; j < 2; j++) + for (int k = 0; k < 8; k++) + x8_init_vlc(&j_ac_vlc[i][j][k], AC_VLC_BITS, 77, + &offset, x8_ac_quant_table[i][j][k]); // set dc tables -#define init_dc_vlc(dst, src) \ - do { \ - x8_init_vlc(&dst, DC_VLC_BITS, 34, &offset, &src); \ - } while(0) - - for (i = 0; i < 8; i++) { - init_dc_vlc(j_dc_vlc[0][i], x8_dc_highquant_table[i][0]); - init_dc_vlc(j_dc_vlc[1][i], x8_dc_lowquant_table[i][0]); - } -#undef init_dc_vlc + for (int i = 0; i < 2; i++) + for (int j = 0; j < 8; j++) + x8_init_vlc(&j_dc_vlc[i][j], DC_VLC_BITS, 34, &offset, + x8_dc_quant_table[i][j]); // set orient tables for (i = 0; i < 2; i++) diff --git a/libavcodec/intrax8huf.h b/libavcodec/intrax8huf.h index 558d0e540d..f91b6728cc 100644 --- a/libavcodec/intrax8huf.h +++ b/libavcodec/intrax8huf.h @@ -21,939 +21,777 @@ #include -static const uint16_t x8_orient_lowquant_table[4][12][2] = { - { // 0 - { 0x0000, 1 }, { 0x0004, 3 }, { 0x0005, 3 }, { 0x000C, 4 }, - { 0x000D, 4 }, { 0x0038, 6 }, { 0x001D, 5 }, { 0x0039, 6 }, - { 0x003C, 6 }, { 0x003D, 6 }, { 0x003E, 6 }, { 0x003F, 6 }, +static const uint8_t x8_orient_lowquant_table[4][12][2] = { + { /* Orient lowquant table 0 */ + { 0, 1 }, { 1, 3 }, { 2, 3 }, { 3, 4 }, { 4, 4 }, { 5, 6 }, + { 7, 6 }, { 6, 5 }, { 8, 6 }, { 9, 6 }, { 10, 6 }, { 11, 6 }, }, - { // 1 - { 0x0000, 5 }, { 0x0001, 5 }, { 0x0002, 5 }, { 0x0001, 2 }, - { 0x0002, 2 }, { 0x0002, 4 }, { 0x0003, 5 }, { 0x0006, 3 }, - { 0x0003, 4 }, { 0x000E, 4 }, { 0x001E, 5 }, { 0x001F, 5 }, + { /* Orient lowquant table 1 */ + { 0, 5 }, { 1, 5 }, { 2, 5 }, { 6, 5 }, { 5, 4 }, { 8, 4 }, + { 3, 2 }, { 4, 2 }, { 7, 3 }, { 9, 4 }, { 10, 5 }, { 11, 5 }, }, - { // 2 - { 0x0000, 2 }, { 0x0001, 2 }, { 0x0004, 3 }, { 0x0005, 3 }, - { 0x0006, 3 }, { 0x0038, 6 }, { 0x0039, 6 }, { 0x001D, 5 }, - { 0x003C, 6 }, { 0x003D, 6 }, { 0x003E, 6 }, { 0x003F, 6 }, + { /* Orient lowquant table 2 */ + { 0, 2 }, { 1, 2 }, { 2, 3 }, { 3, 3 }, { 4, 3 }, { 5, 6 }, + { 6, 6 }, { 7, 5 }, { 8, 6 }, { 9, 6 }, { 10, 6 }, { 11, 6 }, }, - { // 3 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0001, 2 }, - { 0x0002, 2 }, { 0x0018, 5 }, { 0x0019, 5 }, { 0x000D, 4 }, - { 0x001C, 5 }, { 0x001D, 5 }, { 0x001E, 5 }, { 0x001F, 5 }, + { /* Orient lowquant table 3 */ + { 0, 3 }, { 1, 4 }, { 2, 4 }, { 3, 2 }, { 4, 2 }, { 5, 5 }, + { 6, 5 }, { 7, 4 }, { 8, 5 }, { 9, 5 }, { 10, 5 }, { 11, 5 }, }, }; -static const uint16_t x8_orient_highquant_table[2][12][2] = { - { // 0 - { 0x0000, 2 }, { 0x0001, 2 }, { 0x0004, 3 }, { 0x0005, 3 }, - { 0x0006, 3 }, { 0x0038, 6 }, { 0x001D, 5 }, { 0x0039, 6 }, - { 0x003C, 6 }, { 0x003D, 6 }, { 0x003E, 6 }, { 0x003F, 6 }, +static const uint8_t x8_orient_highquant_table[2][12][2] = { + { /* Orient highquant table 0 */ + { 0, 2 }, { 1, 2 }, { 2, 3 }, { 3, 3 }, { 4, 3 }, { 5, 6 }, + { 7, 6 }, { 6, 5 }, { 8, 6 }, { 9, 6 }, { 10, 6 }, { 11, 6 }, }, - { // 1 - { 0x0000, 1 }, { 0x0002, 2 }, { 0x0006, 3 }, { 0x001C, 5 }, - { 0x001D, 5 }, { 0x0078, 7 }, { 0x003D, 6 }, { 0x0079, 7 }, - { 0x007C, 7 }, { 0x007D, 7 }, { 0x007E, 7 }, { 0x007F, 7 }, + { /* Orient highquant table 1 */ + { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 5 }, { 4, 5 }, { 5, 7 }, + { 7, 7 }, { 6, 6 }, { 8, 7 }, { 9, 7 }, { 10, 7 }, { 11, 7 }, }, }; #define MAX_OR_VLC_BITS 7 -static const uint16_t x8_dc_lowquant_table[8][34][2] = { - { // 0 - { 0x0000, 5 }, { 0x0001, 4 }, { 0x0001, 5 }, { 0x0004, 5 }, - { 0x0005, 5 }, { 0x0006, 5 }, { 0x000E, 6 }, { 0x000F, 6 }, - { 0x0040, 8 }, { 0x0041, 8 }, { 0x0840, 13 }, { 0x0841, 13 }, - { 0x0842, 13 }, { 0x0843, 13 }, { 0x0844, 13 }, { 0x0845, 13 }, - { 0x0846, 13 }, { 0x0002, 2 }, { 0x0003, 2 }, { 0x0003, 3 }, - { 0x0005, 4 }, { 0x0009, 5 }, { 0x0011, 6 }, { 0x0043, 8 }, - { 0x0085, 9 }, { 0x0847, 13 }, { 0x0848, 13 }, { 0x0849, 13 }, - { 0x084A, 13 }, { 0x084B, 13 }, { 0x084C, 13 }, { 0x084D, 13 }, - { 0x084E, 13 }, { 0x084F, 13 }, - }, - { // 1 - { 0x0000, 4 }, { 0x0001, 3 }, { 0x0002, 3 }, { 0x0001, 4 }, - { 0x0006, 4 }, { 0x0004, 3 }, { 0x0007, 4 }, { 0x0005, 3 }, - { 0x000C, 4 }, { 0x000D, 4 }, { 0x001C, 5 }, { 0x003A, 6 }, - { 0x01D8, 9 }, { 0x01D9, 9 }, { 0x1DA0, 13 }, { 0x1DA1, 13 }, - { 0x1DA2, 13 }, { 0x003C, 6 }, { 0x003D, 6 }, { 0x003E, 6 }, - { 0x0077, 7 }, { 0x01DB, 9 }, { 0x007E, 7 }, { 0x00FE, 8 }, - { 0x01FE, 9 }, { 0x1DA3, 13 }, { 0x1DA4, 13 }, { 0x1DA5, 13 }, - { 0x0ED3, 12 }, { 0x0ED4, 12 }, { 0x01FF, 9 }, { 0x0ED5, 12 }, - { 0x0ED6, 12 }, { 0x0ED7, 12 }, - }, - { // 2 - { 0x0000, 4 }, { 0x0001, 3 }, { 0x0002, 3 }, { 0x0001, 4 }, - { 0x0006, 4 }, { 0x0007, 4 }, { 0x0008, 4 }, { 0x0009, 4 }, - { 0x0028, 6 }, { 0x0029, 6 }, { 0x0054, 7 }, { 0x0055, 7 }, - { 0x0AC0, 12 }, { 0x0AC1, 12 }, { 0x0AC2, 12 }, { 0x0AC3, 12 }, - { 0x0AC4, 12 }, { 0x000B, 4 }, { 0x0006, 3 }, { 0x000E, 4 }, - { 0x001E, 5 }, { 0x003E, 6 }, { 0x003F, 6 }, { 0x0057, 7 }, - { 0x00AD, 8 }, { 0x0AC5, 12 }, { 0x0AC6, 12 }, { 0x0AC7, 12 }, - { 0x0AC8, 12 }, { 0x0AC9, 12 }, { 0x0ACA, 12 }, { 0x0ACB, 12 }, - { 0x0566, 11 }, { 0x0567, 11 }, - }, - { // 3 - { 0x0000, 4 }, { 0x0001, 2 }, { 0x0001, 3 }, { 0x0004, 3 }, - { 0x0005, 3 }, { 0x0006, 3 }, { 0x0001, 4 }, { 0x000E, 4 }, - { 0x003C, 6 }, { 0x003D, 6 }, { 0x007C, 7 }, { 0x00FA, 8 }, - { 0x3EC0, 14 }, { 0x3EC1, 14 }, { 0x3EC2, 14 }, { 0x3EC3, 14 }, - { 0x1F62, 13 }, { 0x01F7, 9 }, { 0x007E, 7 }, { 0x00FE, 8 }, - { 0x00FF, 8 }, { 0x1F63, 13 }, { 0x1F64, 13 }, { 0x1F65, 13 }, - { 0x1F66, 13 }, { 0x1F67, 13 }, { 0x1F68, 13 }, { 0x1F69, 13 }, - { 0x1F6A, 13 }, { 0x1F6B, 13 }, { 0x1F6C, 13 }, { 0x1F6D, 13 }, - { 0x1F6E, 13 }, { 0x1F6F, 13 }, - }, - { // 4 - { 0x0000, 7 }, { 0x0001, 7 }, { 0x0002, 7 }, { 0x0003, 7 }, - { 0x0004, 7 }, { 0x0005, 7 }, { 0x0006, 7 }, { 0x0007, 7 }, - { 0x0008, 7 }, { 0x0009, 7 }, { 0x000A, 7 }, { 0x000B, 7 }, - { 0x000C, 7 }, { 0x000D, 7 }, { 0x000E, 7 }, { 0x000F, 7 }, - { 0x0010, 7 }, { 0x0001, 1 }, { 0x0001, 2 }, { 0x0011, 7 }, - { 0x0012, 7 }, { 0x0013, 7 }, { 0x0014, 7 }, { 0x0015, 7 }, - { 0x0016, 7 }, { 0x0017, 7 }, { 0x0018, 7 }, { 0x0019, 7 }, - { 0x001A, 7 }, { 0x001B, 7 }, { 0x001C, 7 }, { 0x001D, 7 }, - { 0x001E, 7 }, { 0x001F, 7 }, - }, - { // 5 - { 0x0000, 5 }, { 0x0001, 4 }, { 0x0001, 5 }, { 0x0008, 6 }, - { 0x0009, 6 }, { 0x000A, 6 }, { 0x0016, 7 }, { 0x000C, 6 }, - { 0x0017, 7 }, { 0x000D, 6 }, { 0x0038, 8 }, { 0x001D, 7 }, - { 0x0039, 8 }, { 0x0780, 13 }, { 0x0781, 13 }, { 0x0782, 13 }, - { 0x0783, 13 }, { 0x0002, 3 }, { 0x0001, 1 }, { 0x0003, 3 }, - { 0x001F, 7 }, { 0x003D, 8 }, { 0x0079, 9 }, { 0x0784, 13 }, - { 0x0785, 13 }, { 0x0786, 13 }, { 0x0787, 13 }, { 0x0788, 13 }, - { 0x0789, 13 }, { 0x078A, 13 }, { 0x078B, 13 }, { 0x078C, 13 }, - { 0x078D, 13 }, { 0x03C7, 12 }, - }, - { // 6 - { 0x0000, 4 }, { 0x0001, 2 }, { 0x0001, 3 }, { 0x0004, 3 }, - { 0x0001, 4 }, { 0x000A, 4 }, { 0x0016, 5 }, { 0x002E, 6 }, - { 0x005E, 7 }, { 0x005F, 7 }, { 0x00C0, 8 }, { 0x3040, 14 }, - { 0x3041, 14 }, { 0x0305, 10 }, { 0x0183, 9 }, { 0x3042, 14 }, - { 0x3043, 14 }, { 0x000D, 4 }, { 0x0007, 3 }, { 0x0019, 5 }, - { 0x0031, 6 }, { 0x00C2, 8 }, { 0x00C3, 8 }, { 0x3044, 14 }, - { 0x3045, 14 }, { 0x3046, 14 }, { 0x3047, 14 }, { 0x3048, 14 }, - { 0x3049, 14 }, { 0x304A, 14 }, { 0x304B, 14 }, { 0x304C, 14 }, - { 0x304D, 14 }, { 0x1827, 13 }, - }, - { // 7 - { 0x0000, 6 }, { 0x0001, 6 }, { 0x0002, 6 }, { 0x0006, 7 }, - { 0x0007, 7 }, { 0x0004, 6 }, { 0x0005, 6 }, { 0x0006, 6 }, - { 0x000E, 7 }, { 0x001E, 8 }, { 0x001F, 8 }, { 0x0040, 9 }, - { 0x0082, 10 }, { 0x0830, 14 }, { 0x0831, 14 }, { 0x0832, 14 }, - { 0x0833, 14 }, { 0x0001, 1 }, { 0x0001, 2 }, { 0x0003, 4 }, - { 0x0005, 5 }, { 0x0009, 6 }, { 0x0011, 7 }, { 0x0021, 8 }, - { 0x0834, 14 }, { 0x0835, 14 }, { 0x0836, 14 }, { 0x0837, 14 }, - { 0x0838, 14 }, { 0x0839, 14 }, { 0x083A, 14 }, { 0x083B, 14 }, - { 0x041E, 13 }, { 0x041F, 13 }, - }, -}; - -static const uint16_t x8_dc_highquant_table[8][34][2] = { - { // 0 - { 0x0000, 5 }, { 0x0001, 4 }, { 0x0002, 4 }, { 0x0001, 5 }, - { 0x0006, 5 }, { 0x0004, 4 }, { 0x0007, 5 }, { 0x000A, 5 }, - { 0x002C, 7 }, { 0x002D, 7 }, { 0x05C0, 12 }, { 0x05C1, 12 }, - { 0x05C2, 12 }, { 0x05C3, 12 }, { 0x05C4, 12 }, { 0x05C5, 12 }, - { 0x05C6, 12 }, { 0x0003, 3 }, { 0x0002, 2 }, { 0x0006, 3 }, - { 0x000E, 4 }, { 0x001E, 5 }, { 0x001F, 5 }, { 0x002F, 7 }, - { 0x005D, 8 }, { 0x05C7, 12 }, { 0x05C8, 12 }, { 0x05C9, 12 }, - { 0x05CA, 12 }, { 0x05CB, 12 }, { 0x05CC, 12 }, { 0x05CD, 12 }, - { 0x05CE, 12 }, { 0x05CF, 12 }, - }, - { // 1 - { 0x0000, 3 }, { 0x0001, 3 }, { 0x0002, 3 }, { 0x0006, 4 }, - { 0x0007, 4 }, { 0x0004, 3 }, { 0x000A, 4 }, { 0x000B, 4 }, - { 0x0030, 6 }, { 0x0062, 7 }, { 0x0063, 7 }, { 0x0640, 11 }, - { 0x0641, 11 }, { 0x0642, 11 }, { 0x0643, 11 }, { 0x0644, 11 }, - { 0x0645, 11 }, { 0x0033, 6 }, { 0x000D, 4 }, { 0x001C, 5 }, - { 0x001D, 5 }, { 0x003C, 6 }, { 0x001F, 5 }, { 0x0065, 7 }, - { 0x007A, 7 }, { 0x0646, 11 }, { 0x007B, 7 }, { 0x0647, 11 }, - { 0x0648, 11 }, { 0x0649, 11 }, { 0x064A, 11 }, { 0x064B, 11 }, - { 0x0326, 10 }, { 0x0327, 10 }, - }, - { // 2 - { 0x0000, 7 }, { 0x0001, 7 }, { 0x0001, 6 }, { 0x0004, 7 }, - { 0x0003, 6 }, { 0x0005, 7 }, { 0x0010, 8 }, { 0x0011, 8 }, - { 0x0240, 13 }, { 0x0241, 13 }, { 0x0242, 13 }, { 0x0243, 13 }, - { 0x0244, 13 }, { 0x0245, 13 }, { 0x0246, 13 }, { 0x0247, 13 }, - { 0x0124, 12 }, { 0x0001, 1 }, { 0x0001, 2 }, { 0x0001, 3 }, - { 0x0003, 5 }, { 0x0005, 6 }, { 0x0013, 8 }, { 0x0125, 12 }, - { 0x0126, 12 }, { 0x0127, 12 }, { 0x0128, 12 }, { 0x0129, 12 }, - { 0x012A, 12 }, { 0x012B, 12 }, { 0x012C, 12 }, { 0x012D, 12 }, - { 0x012E, 12 }, { 0x012F, 12 }, - }, - { // 3 - { 0x0000, 4 }, { 0x0001, 3 }, { 0x0002, 3 }, { 0x0001, 4 }, - { 0x0006, 4 }, { 0x0004, 3 }, { 0x0005, 3 }, { 0x0006, 3 }, - { 0x000E, 5 }, { 0x000F, 5 }, { 0x0070, 7 }, { 0x0710, 11 }, - { 0x0711, 11 }, { 0x0712, 11 }, { 0x0713, 11 }, { 0x0714, 11 }, - { 0x0715, 11 }, { 0x001D, 5 }, { 0x0072, 7 }, { 0x003C, 6 }, - { 0x003D, 6 }, { 0x0073, 7 }, { 0x007C, 7 }, { 0x007D, 7 }, - { 0x007E, 7 }, { 0x0716, 11 }, { 0x0717, 11 }, { 0x0718, 11 }, - { 0x007F, 7 }, { 0x0719, 11 }, { 0x071A, 11 }, { 0x071B, 11 }, - { 0x038E, 10 }, { 0x038F, 10 }, - }, - { // 4 - { 0x0000, 8 }, { 0x0001, 7 }, { 0x0002, 7 }, { 0x0003, 7 }, - { 0x0002, 9 }, { 0x0008, 8 }, { 0x0003, 9 }, { 0x0240, 14 }, - { 0x0241, 14 }, { 0x0242, 14 }, { 0x0243, 14 }, { 0x0244, 14 }, - { 0x0245, 14 }, { 0x0246, 14 }, { 0x0247, 14 }, { 0x0124, 13 }, - { 0x0125, 13 }, { 0x0001, 2 }, { 0x0001, 1 }, { 0x0001, 3 }, - { 0x0001, 4 }, { 0x0003, 6 }, { 0x0005, 7 }, { 0x0013, 9 }, - { 0x0126, 13 }, { 0x0127, 13 }, { 0x0128, 13 }, { 0x0129, 13 }, - { 0x012A, 13 }, { 0x012B, 13 }, { 0x012C, 13 }, { 0x012D, 13 }, - { 0x012E, 13 }, { 0x012F, 13 }, - }, - { // 5 - { 0x0000, 7 }, { 0x0001, 7 }, { 0x0001, 6 }, { 0x0002, 6 }, - { 0x0003, 6 }, { 0x0004, 6 }, { 0x0005, 6 }, { 0x0006, 6 }, - { 0x0007, 6 }, { 0x0008, 6 }, { 0x0009, 6 }, { 0x000A, 6 }, - { 0x000B, 6 }, { 0x000C, 6 }, { 0x000D, 6 }, { 0x000E, 6 }, - { 0x000F, 6 }, { 0x0010, 6 }, { 0x0011, 6 }, { 0x0012, 6 }, - { 0x0013, 6 }, { 0x0014, 6 }, { 0x0015, 6 }, { 0x0016, 6 }, - { 0x0017, 6 }, { 0x0018, 6 }, { 0x0019, 6 }, { 0x0001, 1 }, - { 0x001A, 6 }, { 0x001B, 6 }, { 0x001C, 6 }, { 0x001D, 6 }, - { 0x001E, 6 }, { 0x001F, 6 }, - }, - { // 6 - { 0x0000, 5 }, { 0x0001, 4 }, { 0x0001, 5 }, { 0x0004, 5 }, - { 0x000A, 6 }, { 0x0006, 5 }, { 0x000B, 6 }, { 0x000E, 6 }, - { 0x003C, 8 }, { 0x003D, 8 }, { 0x07C0, 13 }, { 0x07C1, 13 }, - { 0x07C2, 13 }, { 0x07C3, 13 }, { 0x07C4, 13 }, { 0x07C5, 13 }, - { 0x07C6, 13 }, { 0x0001, 2 }, { 0x0002, 2 }, { 0x0006, 3 }, - { 0x000E, 4 }, { 0x001E, 5 }, { 0x001F, 5 }, { 0x003F, 8 }, - { 0x007D, 9 }, { 0x07C7, 13 }, { 0x07C8, 13 }, { 0x07C9, 13 }, - { 0x07CA, 13 }, { 0x07CB, 13 }, { 0x07CC, 13 }, { 0x07CD, 13 }, - { 0x07CE, 13 }, { 0x07CF, 13 }, - }, - { // 7 - { 0x0000, 7 }, { 0x0001, 7 }, { 0x0002, 7 }, { 0x0003, 7 }, - { 0x0004, 7 }, { 0x0005, 7 }, { 0x0006, 7 }, { 0x0007, 7 }, - { 0x0008, 7 }, { 0x0009, 7 }, { 0x000A, 7 }, { 0x000B, 7 }, - { 0x000C, 7 }, { 0x000D, 7 }, { 0x000E, 7 }, { 0x000F, 7 }, - { 0x0010, 7 }, { 0x0001, 1 }, { 0x0001, 2 }, { 0x0011, 7 }, - { 0x0012, 7 }, { 0x0013, 7 }, { 0x0014, 7 }, { 0x0015, 7 }, - { 0x0016, 7 }, { 0x0017, 7 }, { 0x0018, 7 }, { 0x0019, 7 }, - { 0x001A, 7 }, { 0x001B, 7 }, { 0x001C, 7 }, { 0x001D, 7 }, - { 0x001E, 7 }, { 0x001F, 7 }, +static const uint8_t x8_dc_quant_table[2][8][34][2] = { + { + { /* DC highquant table 0 */ + { 0, 5 }, { 3, 5 }, { 1, 4 }, { 2, 4 }, { 4, 5 }, + { 6, 5 }, { 5, 4 }, { 7, 5 }, { 8, 7 }, { 9, 7 }, + { 10, 12 }, { 11, 12 }, { 12, 12 }, { 13, 12 }, { 14, 12 }, + { 15, 12 }, { 16, 12 }, { 25, 12 }, { 26, 12 }, { 27, 12 }, + { 28, 12 }, { 29, 12 }, { 30, 12 }, { 31, 12 }, { 32, 12 }, + { 33, 12 }, { 24, 8 }, { 23, 7 }, { 17, 3 }, { 18, 2 }, + { 19, 3 }, { 20, 4 }, { 21, 5 }, { 22, 5 }, + }, + { /* DC highquant table 1 */ + { 0, 3 }, { 1, 3 }, { 2, 3 }, { 3, 4 }, { 4, 4 }, + { 5, 3 }, { 6, 4 }, { 7, 4 }, { 8, 6 }, { 9, 7 }, + { 10, 7 }, { 11, 11 }, { 12, 11 }, { 13, 11 }, { 14, 11 }, + { 15, 11 }, { 16, 11 }, { 25, 11 }, { 27, 11 }, { 28, 11 }, + { 29, 11 }, { 30, 11 }, { 31, 11 }, { 32, 10 }, { 33, 10 }, + { 23, 7 }, { 17, 6 }, { 18, 4 }, { 19, 5 }, { 20, 5 }, + { 21, 6 }, { 24, 7 }, { 26, 7 }, { 22, 5 }, + }, + { /* DC highquant table 2 */ + { 0, 7 }, { 1, 7 }, { 2, 6 }, { 3, 7 }, { 5, 7 }, + { 4, 6 }, { 6, 8 }, { 7, 8 }, { 8, 13 }, { 9, 13 }, + { 10, 13 }, { 11, 13 }, { 12, 13 }, { 13, 13 }, { 14, 13 }, + { 15, 13 }, { 16, 12 }, { 23, 12 }, { 24, 12 }, { 25, 12 }, + { 26, 12 }, { 27, 12 }, { 28, 12 }, { 29, 12 }, { 30, 12 }, + { 31, 12 }, { 32, 12 }, { 33, 12 }, { 22, 8 }, { 21, 6 }, + { 20, 5 }, { 19, 3 }, { 18, 2 }, { 17, 1 }, + }, + { /* DC highquant table 3 */ + { 0, 4 }, { 3, 4 }, { 1, 3 }, { 2, 3 }, { 4, 4 }, + { 8, 5 }, { 9, 5 }, { 5, 3 }, { 6, 3 }, { 7, 3 }, + { 10, 7 }, { 11, 11 }, { 12, 11 }, { 13, 11 }, { 14, 11 }, + { 15, 11 }, { 16, 11 }, { 25, 11 }, { 26, 11 }, { 27, 11 }, + { 29, 11 }, { 30, 11 }, { 31, 11 }, { 32, 10 }, { 33, 10 }, + { 18, 7 }, { 21, 7 }, { 17, 5 }, { 19, 6 }, { 20, 6 }, + { 22, 7 }, { 23, 7 }, { 24, 7 }, { 28, 7 }, + }, + { /* DC highquant table 4 */ + { 0, 8 }, { 4, 9 }, { 6, 9 }, { 1, 7 }, { 2, 7 }, + { 3, 7 }, { 5, 8 }, { 7, 14 }, { 8, 14 }, { 9, 14 }, + { 10, 14 }, { 11, 14 }, { 12, 14 }, { 13, 14 }, { 14, 14 }, + { 15, 13 }, { 16, 13 }, { 24, 13 }, { 25, 13 }, { 26, 13 }, + { 27, 13 }, { 28, 13 }, { 29, 13 }, { 30, 13 }, { 31, 13 }, + { 32, 13 }, { 33, 13 }, { 23, 9 }, { 22, 7 }, { 21, 6 }, + { 20, 4 }, { 19, 3 }, { 17, 2 }, { 18, 1 }, + }, + { /* DC highquant table 5 */ + { 0, 7 }, { 1, 7 }, { 2, 6 }, { 3, 6 }, { 4, 6 }, + { 5, 6 }, { 6, 6 }, { 7, 6 }, { 8, 6 }, { 9, 6 }, + { 10, 6 }, { 11, 6 }, { 12, 6 }, { 13, 6 }, { 14, 6 }, + { 15, 6 }, { 16, 6 }, { 17, 6 }, { 18, 6 }, { 19, 6 }, + { 20, 6 }, { 21, 6 }, { 22, 6 }, { 23, 6 }, { 24, 6 }, + { 25, 6 }, { 26, 6 }, { 28, 6 }, { 29, 6 }, { 30, 6 }, + { 31, 6 }, { 32, 6 }, { 33, 6 }, { 27, 1 }, + }, + { /* DC highquant table 6 */ + { 0, 5 }, { 2, 5 }, { 1, 4 }, { 3, 5 }, { 4, 6 }, + { 6, 6 }, { 5, 5 }, { 7, 6 }, { 8, 8 }, { 9, 8 }, + { 10, 13 }, { 11, 13 }, { 12, 13 }, { 13, 13 }, { 14, 13 }, + { 15, 13 }, { 16, 13 }, { 25, 13 }, { 26, 13 }, { 27, 13 }, + { 28, 13 }, { 29, 13 }, { 30, 13 }, { 31, 13 }, { 32, 13 }, + { 33, 13 }, { 24, 9 }, { 23, 8 }, { 17, 2 }, { 18, 2 }, + { 19, 3 }, { 20, 4 }, { 21, 5 }, { 22, 5 }, + }, + { /* DC highquant table 7 */ + { 0, 7 }, { 1, 7 }, { 2, 7 }, { 3, 7 }, { 4, 7 }, + { 5, 7 }, { 6, 7 }, { 7, 7 }, { 8, 7 }, { 9, 7 }, + { 10, 7 }, { 11, 7 }, { 12, 7 }, { 13, 7 }, { 14, 7 }, + { 15, 7 }, { 16, 7 }, { 19, 7 }, { 20, 7 }, { 21, 7 }, + { 22, 7 }, { 23, 7 }, { 24, 7 }, { 25, 7 }, { 26, 7 }, + { 27, 7 }, { 28, 7 }, { 29, 7 }, { 30, 7 }, { 31, 7 }, + { 32, 7 }, { 33, 7 }, { 18, 2 }, { 17, 1 }, + }, + }, + { + { /* DC lowquant table 0 */ + { 0, 5 }, { 2, 5 }, { 1, 4 }, { 3, 5 }, { 4, 5 }, + { 5, 5 }, { 6, 6 }, { 7, 6 }, { 8, 8 }, { 9, 8 }, + { 10, 13 }, { 11, 13 }, { 12, 13 }, { 13, 13 }, { 14, 13 }, + { 15, 13 }, { 16, 13 }, { 25, 13 }, { 26, 13 }, { 27, 13 }, + { 28, 13 }, { 29, 13 }, { 30, 13 }, { 31, 13 }, { 32, 13 }, + { 33, 13 }, { 24, 9 }, { 23, 8 }, { 22, 6 }, { 21, 5 }, + { 20, 4 }, { 19, 3 }, { 17, 2 }, { 18, 2 }, + }, + { /* DC lowquant table 1 */ + { 0, 4 }, { 3, 4 }, { 1, 3 }, { 2, 3 }, { 4, 4 }, + { 6, 4 }, { 5, 3 }, { 7, 3 }, { 8, 4 }, { 9, 4 }, + { 10, 5 }, { 11, 6 }, { 12, 9 }, { 13, 9 }, { 14, 13 }, + { 15, 13 }, { 16, 13 }, { 25, 13 }, { 26, 13 }, { 27, 13 }, + { 28, 12 }, { 29, 12 }, { 31, 12 }, { 32, 12 }, { 33, 12 }, + { 21, 9 }, { 20, 7 }, { 17, 6 }, { 18, 6 }, { 19, 6 }, + { 22, 7 }, { 23, 8 }, { 24, 9 }, { 30, 9 }, + }, + { /* DC lowquant table 2 */ + { 0, 4 }, { 3, 4 }, { 1, 3 }, { 2, 3 }, { 4, 4 }, + { 5, 4 }, { 6, 4 }, { 7, 4 }, { 8, 6 }, { 9, 6 }, + { 10, 7 }, { 11, 7 }, { 12, 12 }, { 13, 12 }, { 14, 12 }, + { 15, 12 }, { 16, 12 }, { 25, 12 }, { 26, 12 }, { 27, 12 }, + { 28, 12 }, { 29, 12 }, { 30, 12 }, { 31, 12 }, { 32, 11 }, + { 33, 11 }, { 24, 8 }, { 23, 7 }, { 17, 4 }, { 18, 3 }, + { 19, 4 }, { 20, 5 }, { 21, 6 }, { 22, 6 }, + }, + { /* DC lowquant table 3 */ + { 0, 4 }, { 6, 4 }, { 2, 3 }, { 1, 2 }, { 3, 3 }, + { 4, 3 }, { 5, 3 }, { 7, 4 }, { 8, 6 }, { 9, 6 }, + { 10, 7 }, { 11, 8 }, { 12, 14 }, { 13, 14 }, { 14, 14 }, + { 15, 14 }, { 16, 13 }, { 21, 13 }, { 22, 13 }, { 23, 13 }, + { 24, 13 }, { 25, 13 }, { 26, 13 }, { 27, 13 }, { 28, 13 }, + { 29, 13 }, { 30, 13 }, { 31, 13 }, { 32, 13 }, { 33, 13 }, + { 17, 9 }, { 18, 7 }, { 19, 8 }, { 20, 8 }, + }, + { /* DC lowquant table 4 */ + { 0, 7 }, { 1, 7 }, { 2, 7 }, { 3, 7 }, { 4, 7 }, + { 5, 7 }, { 6, 7 }, { 7, 7 }, { 8, 7 }, { 9, 7 }, + { 10, 7 }, { 11, 7 }, { 12, 7 }, { 13, 7 }, { 14, 7 }, + { 15, 7 }, { 16, 7 }, { 19, 7 }, { 20, 7 }, { 21, 7 }, + { 22, 7 }, { 23, 7 }, { 24, 7 }, { 25, 7 }, { 26, 7 }, + { 27, 7 }, { 28, 7 }, { 29, 7 }, { 30, 7 }, { 31, 7 }, + { 32, 7 }, { 33, 7 }, { 18, 2 }, { 17, 1 }, + }, + { /* DC lowquant table 5 */ + { 0, 5 }, { 2, 5 }, { 1, 4 }, { 3, 6 }, { 4, 6 }, + { 5, 6 }, { 6, 7 }, { 8, 7 }, { 7, 6 }, { 9, 6 }, + { 10, 8 }, { 12, 8 }, { 11, 7 }, { 13, 13 }, { 14, 13 }, + { 15, 13 }, { 16, 13 }, { 23, 13 }, { 24, 13 }, { 25, 13 }, + { 26, 13 }, { 27, 13 }, { 28, 13 }, { 29, 13 }, { 30, 13 }, + { 31, 13 }, { 32, 13 }, { 33, 12 }, { 22, 9 }, { 21, 8 }, + { 20, 7 }, { 17, 3 }, { 19, 3 }, { 18, 1 }, + }, + { /* DC lowquant table 6 */ + { 0, 4 }, { 4, 4 }, { 2, 3 }, { 1, 2 }, { 3, 3 }, + { 5, 4 }, { 6, 5 }, { 7, 6 }, { 8, 7 }, { 9, 7 }, + { 10, 8 }, { 11, 14 }, { 12, 14 }, { 15, 14 }, { 16, 14 }, + { 23, 14 }, { 24, 14 }, { 25, 14 }, { 26, 14 }, { 27, 14 }, + { 28, 14 }, { 29, 14 }, { 30, 14 }, { 31, 14 }, { 32, 14 }, + { 33, 13 }, { 13, 10 }, { 14, 9 }, { 21, 8 }, { 22, 8 }, + { 20, 6 }, { 19, 5 }, { 17, 4 }, { 18, 3 }, + }, + { /* DC lowquant table 7 */ + { 0, 6 }, { 1, 6 }, { 2, 6 }, { 3, 7 }, { 4, 7 }, + { 5, 6 }, { 6, 6 }, { 7, 6 }, { 8, 7 }, { 9, 8 }, + { 10, 8 }, { 11, 9 }, { 12, 10 }, { 13, 14 }, { 14, 14 }, + { 15, 14 }, { 16, 14 }, { 24, 14 }, { 25, 14 }, { 26, 14 }, + { 27, 14 }, { 28, 14 }, { 29, 14 }, { 30, 14 }, { 31, 14 }, + { 32, 13 }, { 33, 13 }, { 23, 8 }, { 22, 7 }, { 21, 6 }, + { 20, 5 }, { 19, 4 }, { 18, 2 }, { 17, 1 }, + }, }, }; #define MAX_DC_VLC_BITS 14 -static const uint16_t x8_ac0_lowquant_table[8][77][2] = { - { // 0 - { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x000E, 5 }, - { 0x001E, 6 }, { 0x003E, 7 }, { 0x003F, 7 }, { 0x0040, 7 }, - { 0x0104, 9 }, { 0x0083, 8 }, { 0x0084, 8 }, { 0x0085, 8 }, - { 0x020A, 10 }, { 0x020B, 10 }, { 0x0218, 10 }, { 0x0219, 10 }, - { 0x0009, 4 }, { 0x0044, 7 }, { 0x010D, 9 }, { 0x021C, 10 }, - { 0x0023, 6 }, { 0x0045, 7 }, { 0x0050, 7 }, { 0x000B, 4 }, - { 0x000C, 4 }, { 0x0015, 5 }, { 0x001A, 5 }, { 0x001B, 5 }, - { 0x0029, 6 }, { 0x0038, 6 }, { 0x0039, 6 }, { 0x003A, 6 }, - { 0x0051, 7 }, { 0x0076, 7 }, { 0x0077, 7 }, { 0x0078, 7 }, - { 0x0079, 7 }, { 0x007A, 7 }, { 0x007B, 7 }, { 0x00F8, 8 }, - { 0x010F, 9 }, { 0x021D, 10 }, { 0x3E40, 14 }, { 0x3E41, 14 }, - { 0x3E42, 14 }, { 0x3E43, 14 }, { 0x03E5, 10 }, { 0x3E44, 14 }, - { 0x01F3, 9 }, { 0x3E45, 14 }, { 0x3E46, 14 }, { 0x3E47, 14 }, - { 0x00FA, 8 }, { 0x3E48, 14 }, { 0x3E49, 14 }, { 0x3E4A, 14 }, - { 0x3E4B, 14 }, { 0x03EC, 10 }, { 0x3E4C, 14 }, { 0x007E, 7 }, - { 0x00FE, 8 }, { 0x00FF, 8 }, { 0x01F7, 9 }, { 0x3E4D, 14 }, - { 0x3E4E, 14 }, { 0x3E4F, 14 }, { 0x3ED0, 14 }, { 0x3ED1, 14 }, - { 0x3ED2, 14 }, { 0x3ED3, 14 }, { 0x3ED4, 14 }, { 0x3ED5, 14 }, - { 0x1F6B, 13 }, { 0x1F6C, 13 }, { 0x1F6D, 13 }, { 0x1F6E, 13 }, - { 0x1F6F, 13 }, - }, - { // 1 - { 0x0000, 3 }, { 0x0004, 5 }, { 0x0014, 7 }, { 0x000B, 6 }, - { 0x000C, 6 }, { 0x002A, 8 }, { 0x002B, 8 }, { 0x0034, 8 }, - { 0x0D40, 14 }, { 0x0D41, 14 }, { 0x001B, 7 }, { 0x0D42, 14 }, - { 0x0D43, 14 }, { 0x0D44, 14 }, { 0x0D45, 14 }, { 0x0D46, 14 }, - { 0x000E, 6 }, { 0x003C, 8 }, { 0x0D47, 14 }, { 0x003D, 8 }, - { 0x0D48, 14 }, { 0x0D49, 14 }, { 0x0D4A, 14 }, { 0x0001, 2 }, - { 0x0004, 3 }, { 0x0014, 5 }, { 0x000B, 4 }, { 0x000C, 4 }, - { 0x000D, 4 }, { 0x002A, 6 }, { 0x001F, 7 }, { 0x0056, 7 }, - { 0x0057, 7 }, { 0x0070, 7 }, { 0x00E2, 8 }, { 0x0072, 7 }, - { 0x003A, 6 }, { 0x003B, 6 }, { 0x003C, 6 }, { 0x003D, 6 }, - { 0x00E3, 8 }, { 0x0D4B, 14 }, { 0x00E6, 8 }, { 0x00E7, 8 }, - { 0x00F8, 8 }, { 0x0D4C, 14 }, { 0x0D4D, 14 }, { 0x0D4E, 14 }, - { 0x00F9, 8 }, { 0x0D4F, 14 }, { 0x0D50, 14 }, { 0x0D51, 14 }, - { 0x06A9, 13 }, { 0x06AA, 13 }, { 0x06AB, 13 }, { 0x06AC, 13 }, - { 0x06AD, 13 }, { 0x06AE, 13 }, { 0x06AF, 13 }, { 0x003F, 6 }, - { 0x06B0, 13 }, { 0x06B1, 13 }, { 0x06B2, 13 }, { 0x06B3, 13 }, - { 0x06B4, 13 }, { 0x007D, 7 }, { 0x06B5, 13 }, { 0x06B6, 13 }, - { 0x06B7, 13 }, { 0x06B8, 13 }, { 0x06B9, 13 }, { 0x06BA, 13 }, - { 0x06BB, 13 }, { 0x06BC, 13 }, { 0x06BD, 13 }, { 0x06BE, 13 }, - { 0x06BF, 13 }, - }, - { // 2 - { 0x0000, 2 }, { 0x0002, 3 }, { 0x0003, 3 }, { 0x0008, 4 }, - { 0x0012, 5 }, { 0x0013, 5 }, { 0x0028, 6 }, { 0x0029, 6 }, - { 0x0054, 7 }, { 0x0055, 7 }, { 0x0056, 7 }, { 0x00AE, 8 }, - { 0x00AF, 8 }, { 0x00B0, 8 }, { 0x0162, 9 }, { 0x02C6, 10 }, - { 0x000C, 4 }, { 0x002D, 6 }, { 0x00B2, 8 }, { 0x0166, 9 }, - { 0x002E, 6 }, { 0x0167, 9 }, { 0x00BC, 8 }, { 0x001A, 5 }, - { 0x0036, 6 }, { 0x0037, 6 }, { 0x0038, 6 }, { 0x005F, 7 }, - { 0x0072, 7 }, { 0x0073, 7 }, { 0x0074, 7 }, { 0x0075, 7 }, - { 0x0076, 7 }, { 0x0077, 7 }, { 0x0078, 7 }, { 0x0079, 7 }, - { 0x007A, 7 }, { 0x007B, 7 }, { 0x00BD, 8 }, { 0xB1C0, 16 }, - { 0xB1C1, 16 }, { 0x58E1, 15 }, { 0x0B1D, 12 }, { 0x58E2, 15 }, - { 0x58E3, 15 }, { 0x58E4, 15 }, { 0x00F8, 8 }, { 0x03E4, 10 }, - { 0x01F3, 9 }, { 0x0B1E, 12 }, { 0x58E5, 15 }, { 0x58E6, 15 }, - { 0x00FA, 8 }, { 0x58E7, 15 }, { 0x58F8, 15 }, { 0x58F9, 15 }, - { 0x58FA, 15 }, { 0x01F6, 9 }, { 0x58FB, 15 }, { 0x007E, 7 }, - { 0x00FE, 8 }, { 0x00FF, 8 }, { 0x07CA, 11 }, { 0x0F96, 12 }, - { 0x58FC, 15 }, { 0x58FD, 15 }, { 0x58FE, 15 }, { 0x58FF, 15 }, - { 0x7CB8, 15 }, { 0x7CB9, 15 }, { 0x7CBA, 15 }, { 0x7CBB, 15 }, - { 0x7CBC, 15 }, { 0x01F7, 9 }, { 0x7CBD, 15 }, { 0x7CBE, 15 }, - { 0x7CBF, 15 }, - }, - { // 3 - { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x000E, 5 }, - { 0x000F, 5 }, { 0x0020, 6 }, { 0x0021, 6 }, { 0x0044, 7 }, - { 0x0045, 7 }, { 0x008C, 8 }, { 0x008D, 8 }, { 0x011C, 9 }, - { 0x011D, 9 }, { 0x011E, 9 }, { 0x023E, 10 }, { 0x023F, 10 }, - { 0x0005, 3 }, { 0x0012, 5 }, { 0x004C, 7 }, { 0x004D, 7 }, - { 0x000C, 4 }, { 0x004E, 7 }, { 0x001A, 5 }, { 0x0036, 6 }, - { 0x004F, 7 }, { 0x006E, 7 }, { 0x006F, 7 }, { 0x00E0, 8 }, - { 0x00E1, 8 }, { 0x00E2, 8 }, { 0x00E3, 8 }, { 0x00E4, 8 }, - { 0x00E5, 8 }, { 0x01CC, 9 }, { 0x00E7, 8 }, { 0x00E8, 8 }, - { 0x00E9, 8 }, { 0x01CD, 9 }, { 0x0750, 11 }, { 0x03A9, 10 }, - { 0x0751, 11 }, { 0x7540, 15 }, { 0x03AB, 10 }, { 0x7541, 15 }, - { 0x7542, 15 }, { 0x7543, 15 }, { 0x01D6, 9 }, { 0x0755, 11 }, - { 0x0076, 7 }, { 0x0EA9, 12 }, { 0x7544, 15 }, { 0x7545, 15 }, - { 0x001E, 5 }, { 0x0077, 7 }, { 0x00F8, 8 }, { 0x03AE, 10 }, - { 0x075E, 11 }, { 0x007D, 7 }, { 0x03E4, 10 }, { 0x00FC, 8 }, - { 0x00FD, 8 }, { 0x03E5, 10 }, { 0x03E6, 10 }, { 0x0EBE, 12 }, - { 0x7546, 15 }, { 0x07CE, 11 }, { 0x7547, 15 }, { 0x75F8, 15 }, - { 0x75F9, 15 }, { 0x75FA, 15 }, { 0x75FB, 15 }, { 0x75FC, 15 }, - { 0x75FD, 15 }, { 0x007F, 7 }, { 0x3AFF, 14 }, { 0x0F9E, 12 }, - { 0x0F9F, 12 }, - }, - { // 4 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, - { 0x0012, 6 }, { 0x0013, 6 }, { 0x0014, 6 }, { 0x002A, 7 }, - { 0x0016, 6 }, { 0x002B, 7 }, { 0x005C, 8 }, { 0x005D, 8 }, - { 0x005E, 8 }, { 0x00BE, 9 }, { 0x00BF, 9 }, { 0x0060, 8 }, - { 0x0007, 4 }, { 0x000D, 5 }, { 0x0019, 6 }, { 0x0020, 6 }, - { 0x0009, 4 }, { 0x0021, 6 }, { 0x0011, 5 }, { 0x0014, 5 }, - { 0x002A, 6 }, { 0x002B, 6 }, { 0x002C, 6 }, { 0x002D, 6 }, - { 0x002E, 6 }, { 0x002F, 6 }, { 0x0030, 6 }, { 0x0031, 7 }, - { 0x0062, 7 }, { 0x0063, 7 }, { 0x0064, 7 }, { 0x0065, 7 }, - { 0x0066, 7 }, { 0x0061, 8 }, { 0x0670, 11 }, { 0x0068, 7 }, - { 0x0069, 7 }, { 0x00CF, 8 }, { 0x019D, 9 }, { 0x01A8, 9 }, - { 0x01A9, 9 }, { 0x0339, 10 }, { 0x01AA, 9 }, { 0x0356, 10 }, - { 0x0036, 6 }, { 0x00D6, 8 }, { 0x6710, 15 }, { 0x6711, 15 }, - { 0x000E, 4 }, { 0x006E, 7 }, { 0x01AE, 9 }, { 0x6712, 15 }, - { 0x6713, 15 }, { 0x003C, 6 }, { 0x0357, 10 }, { 0x006F, 7 }, - { 0x00F4, 8 }, { 0x00F5, 8 }, { 0x035E, 10 }, { 0x01EC, 9 }, - { 0x6714, 15 }, { 0x01ED, 9 }, { 0x035F, 10 }, { 0x03DC, 10 }, - { 0x03DD, 10 }, { 0x6715, 15 }, { 0x338B, 14 }, { 0x338C, 14 }, - { 0x338D, 14 }, { 0x001F, 5 }, { 0x01EF, 9 }, { 0x338E, 14 }, - { 0x338F, 14 }, - }, - { // 5 - { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x000B, 5 }, - { 0x0018, 6 }, { 0x0019, 6 }, { 0x0034, 7 }, { 0x006A, 8 }, - { 0x006B, 8 }, { 0x006C, 8 }, { 0x00DA, 9 }, { 0x036C, 11 }, - { 0x006E, 8 }, { 0x01B7, 10 }, { 0x036D, 11 }, { 0x3780, 15 }, - { 0x0004, 3 }, { 0x000E, 5 }, { 0x001E, 6 }, { 0x003E, 7 }, - { 0x000A, 4 }, { 0x002C, 6 }, { 0x0017, 5 }, { 0x002D, 6 }, - { 0x003F, 7 }, { 0x00C0, 8 }, { 0x0061, 7 }, { 0x00C1, 8 }, - { 0x0062, 7 }, { 0x00C6, 8 }, { 0x0064, 7 }, { 0x00C7, 8 }, - { 0x00CA, 8 }, { 0x00DF, 9 }, { 0x0196, 9 }, { 0x0197, 9 }, - { 0x0198, 9 }, { 0x0199, 9 }, { 0x0379, 11 }, { 0x019A, 9 }, - { 0x01BD, 10 }, { 0x066C, 11 }, { 0x3781, 15 }, { 0x0337, 10 }, - { 0x066D, 11 }, { 0x0670, 11 }, { 0x0339, 10 }, { 0x0671, 11 }, - { 0x0034, 6 }, { 0x00CF, 8 }, { 0x3782, 15 }, { 0x3783, 15 }, - { 0x000E, 4 }, { 0x001B, 5 }, { 0x006A, 7 }, { 0x006B, 7 }, - { 0x019D, 9 }, { 0x003C, 6 }, { 0x00F4, 8 }, { 0x00F5, 8 }, - { 0x03D8, 10 }, { 0x07B2, 11 }, { 0x3784, 15 }, { 0x03DA, 10 }, - { 0x3785, 15 }, { 0x03DB, 10 }, { 0x03DC, 10 }, { 0x3786, 15 }, - { 0x3787, 15 }, { 0x1BC4, 14 }, { 0x1BC5, 14 }, { 0x1BC6, 14 }, - { 0x1BC7, 14 }, { 0x001F, 5 }, { 0x03DD, 10 }, { 0x07B3, 11 }, - { 0x01EF, 9 }, - }, - { // 6 - { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x0016, 6 }, - { 0x0017, 6 }, { 0x0060, 8 }, { 0x00C2, 9 }, { 0x0186, 10 }, - { 0x0187, 10 }, { 0x00C4, 9 }, { 0x3140, 15 }, { 0x3141, 15 }, - { 0x018B, 10 }, { 0x3142, 15 }, { 0x018C, 10 }, { 0x3143, 15 }, - { 0x0007, 4 }, { 0x000D, 5 }, { 0x0064, 8 }, { 0x0065, 8 }, - { 0x0010, 5 }, { 0x00C7, 9 }, { 0x0066, 8 }, { 0x0005, 3 }, - { 0x0006, 3 }, { 0x0009, 4 }, { 0x0011, 5 }, { 0x0038, 6 }, - { 0x0039, 6 }, { 0x0074, 7 }, { 0x0075, 7 }, { 0x0076, 7 }, - { 0x0067, 8 }, { 0x00EE, 8 }, { 0x01DE, 9 }, { 0x00F0, 8 }, - { 0x018D, 10 }, { 0x3144, 15 }, { 0x01DF, 9 }, { 0x003D, 6 }, - { 0x003E, 6 }, { 0x01E2, 9 }, { 0x03C6, 10 }, { 0x00F2, 8 }, - { 0x00F3, 8 }, { 0x03C7, 10 }, { 0x3145, 15 }, { 0x3146, 15 }, - { 0x01F8, 9 }, { 0x3147, 15 }, { 0x3148, 15 }, { 0x3149, 15 }, - { 0x00FD, 8 }, { 0x314A, 15 }, { 0x314B, 15 }, { 0x314C, 15 }, - { 0x314D, 15 }, { 0x01F9, 9 }, { 0x314E, 15 }, { 0x01FC, 9 }, - { 0x314F, 15 }, { 0x3150, 15 }, { 0x3151, 15 }, { 0x3152, 15 }, - { 0x3153, 15 }, { 0x03FA, 10 }, { 0x03FB, 10 }, { 0x3154, 15 }, - { 0x3155, 15 }, { 0x3156, 15 }, { 0x3157, 15 }, { 0x3158, 15 }, - { 0x3159, 15 }, { 0x00FF, 8 }, { 0x18AD, 14 }, { 0x18AE, 14 }, - { 0x18AF, 14 }, - }, - { // 7 - { 0x0000, 4 }, { 0x0080, 11 }, { 0x0081, 11 }, { 0x0082, 11 }, - { 0x0083, 11 }, { 0x0084, 11 }, { 0x0085, 11 }, { 0x0086, 11 }, - { 0x0087, 11 }, { 0x0088, 11 }, { 0x0089, 11 }, { 0x008A, 11 }, - { 0x008B, 11 }, { 0x008C, 11 }, { 0x008D, 11 }, { 0x008E, 11 }, - { 0x008F, 11 }, { 0x0048, 10 }, { 0x0049, 10 }, { 0x004A, 10 }, - { 0x004B, 10 }, { 0x004C, 10 }, { 0x004D, 10 }, { 0x0001, 1 }, - { 0x0001, 2 }, { 0x004E, 10 }, { 0x0002, 4 }, { 0x0003, 4 }, - { 0x004F, 10 }, { 0x0050, 10 }, { 0x0051, 10 }, { 0x0052, 10 }, - { 0x0053, 10 }, { 0x0054, 10 }, { 0x0055, 10 }, { 0x0056, 10 }, - { 0x0057, 10 }, { 0x0058, 10 }, { 0x0059, 10 }, { 0x005A, 10 }, - { 0x005B, 10 }, { 0x005C, 10 }, { 0x005D, 10 }, { 0x005E, 10 }, - { 0x005F, 10 }, { 0x0060, 10 }, { 0x0061, 10 }, { 0x0062, 10 }, - { 0x0063, 10 }, { 0x0064, 10 }, { 0x0065, 10 }, { 0x0066, 10 }, - { 0x0067, 10 }, { 0x0068, 10 }, { 0x0069, 10 }, { 0x006A, 10 }, - { 0x006B, 10 }, { 0x006C, 10 }, { 0x006D, 10 }, { 0x006E, 10 }, - { 0x006F, 10 }, { 0x0070, 10 }, { 0x0071, 10 }, { 0x0072, 10 }, - { 0x0073, 10 }, { 0x0074, 10 }, { 0x0075, 10 }, { 0x0076, 10 }, - { 0x0077, 10 }, { 0x0078, 10 }, { 0x0079, 10 }, { 0x007A, 10 }, - { 0x007B, 10 }, { 0x007C, 10 }, { 0x007D, 10 }, { 0x007E, 10 }, - { 0x007F, 10 }, - }, -}; - -static const uint16_t x8_ac0_highquant_table[8][77][2] = { - { // 0 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x000C, 6 }, { 0x000D, 6 }, - { 0x001C, 7 }, { 0x000F, 6 }, { 0x1D00, 15 }, { 0x003B, 8 }, - { 0x1D01, 15 }, { 0x0075, 9 }, { 0x1D02, 15 }, { 0x0080, 9 }, - { 0x1D03, 15 }, { 0x1D04, 15 }, { 0x1D05, 15 }, { 0x0E83, 14 }, - { 0x0009, 5 }, { 0x0011, 6 }, { 0x0081, 9 }, { 0x0082, 9 }, - { 0x0021, 7 }, { 0x0028, 7 }, { 0x0083, 9 }, { 0x0002, 2 }, - { 0x0003, 3 }, { 0x000C, 4 }, { 0x000D, 4 }, { 0x000B, 5 }, - { 0x0015, 6 }, { 0x0052, 8 }, { 0x0070, 7 }, { 0x0039, 6 }, - { 0x0071, 7 }, { 0x0053, 8 }, { 0x0E84, 14 }, { 0x0074, 7 }, - { 0x0075, 7 }, { 0x0076, 7 }, { 0x01DC, 9 }, { 0x001E, 5 }, - { 0x003E, 6 }, { 0x01DD, 9 }, { 0x00EF, 8 }, { 0x01F8, 9 }, - { 0x01F9, 9 }, { 0x0E85, 14 }, { 0x0E86, 14 }, { 0x0E87, 14 }, - { 0x00FD, 8 }, { 0x0E88, 14 }, { 0x0E89, 14 }, { 0x0E8A, 14 }, - { 0x0E8B, 14 }, { 0x0E8C, 14 }, { 0x0E8D, 14 }, { 0x0E8E, 14 }, - { 0x0E8F, 14 }, { 0x0E90, 14 }, { 0x0E91, 14 }, { 0x01FC, 9 }, - { 0x0E92, 14 }, { 0x0E93, 14 }, { 0x0E94, 14 }, { 0x0E95, 14 }, - { 0x0E96, 14 }, { 0x0E97, 14 }, { 0x01FD, 9 }, { 0x0E98, 14 }, - { 0x01FE, 9 }, { 0x0E99, 14 }, { 0x0E9A, 14 }, { 0x0E9B, 14 }, - { 0x0E9C, 14 }, { 0x01FF, 9 }, { 0x0E9D, 14 }, { 0x0E9E, 14 }, - { 0x0E9F, 14 }, - }, - { // 1 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, - { 0x0012, 6 }, { 0x0013, 6 }, { 0x0014, 6 }, { 0x0015, 6 }, - { 0x002C, 7 }, { 0x005A, 8 }, { 0x005B, 8 }, { 0x005C, 8 }, - { 0x005D, 8 }, { 0x1780, 14 }, { 0x0179, 10 }, { 0x017A, 10 }, - { 0x0006, 4 }, { 0x000E, 5 }, { 0x001E, 6 }, { 0x003E, 7 }, - { 0x0010, 5 }, { 0x0022, 6 }, { 0x0012, 5 }, { 0x000A, 4 }, - { 0x0013, 5 }, { 0x0016, 5 }, { 0x0023, 6 }, { 0x002E, 6 }, - { 0x002F, 6 }, { 0x0030, 6 }, { 0x0031, 6 }, { 0x003F, 7 }, - { 0x005F, 8 }, { 0x00C8, 8 }, { 0x0065, 7 }, { 0x0066, 7 }, - { 0x0067, 7 }, { 0x0068, 7 }, { 0x00C9, 8 }, { 0x0069, 7 }, - { 0x006A, 7 }, { 0x00D6, 8 }, { 0x00D7, 8 }, { 0x00D8, 8 }, - { 0x1781, 14 }, { 0x017B, 10 }, { 0x01B2, 9 }, { 0x1782, 14 }, - { 0x001C, 5 }, { 0x01B3, 9 }, { 0x1783, 14 }, { 0x1784, 14 }, - { 0x001D, 5 }, { 0x00DA, 8 }, { 0x1785, 14 }, { 0x1786, 14 }, - { 0x1787, 14 }, { 0x0037, 6 }, { 0x00DB, 8 }, { 0x0078, 7 }, - { 0x00F2, 8 }, { 0x01E6, 9 }, { 0x00F4, 8 }, { 0x1788, 14 }, - { 0x1789, 14 }, { 0x00F5, 8 }, { 0x01E7, 9 }, { 0x178A, 14 }, - { 0x178B, 14 }, { 0x178C, 14 }, { 0x178D, 14 }, { 0x01EC, 9 }, - { 0x178E, 14 }, { 0x001F, 5 }, { 0x00F7, 8 }, { 0x01ED, 9 }, - { 0x178F, 14 }, - }, - { // 2 - { 0x0000, 4 }, { 0x0002, 5 }, { 0x0180, 12 }, { 0x0181, 12 }, - { 0x0182, 12 }, { 0x0183, 12 }, { 0x0184, 12 }, { 0x0185, 12 }, - { 0x0186, 12 }, { 0x0187, 12 }, { 0x0188, 12 }, { 0x0189, 12 }, - { 0x00C5, 11 }, { 0x00C6, 11 }, { 0x00C7, 11 }, { 0x00C8, 11 }, - { 0x00C9, 11 }, { 0x00CA, 11 }, { 0x00CB, 11 }, { 0x00CC, 11 }, - { 0x00CD, 11 }, { 0x00CE, 11 }, { 0x00CF, 11 }, { 0x0001, 1 }, - { 0x0001, 2 }, { 0x0004, 5 }, { 0x0005, 5 }, { 0x0006, 5 }, - { 0x00D0, 11 }, { 0x00D1, 11 }, { 0x00D2, 11 }, { 0x00D3, 11 }, - { 0x00D4, 11 }, { 0x00D5, 11 }, { 0x00D6, 11 }, { 0x00D7, 11 }, - { 0x00D8, 11 }, { 0x00D9, 11 }, { 0x00DA, 11 }, { 0x0007, 5 }, - { 0x00DB, 11 }, { 0x00DC, 11 }, { 0x00DD, 11 }, { 0x00DE, 11 }, - { 0x00DF, 11 }, { 0x00E0, 11 }, { 0x00E1, 11 }, { 0x00E2, 11 }, - { 0x00E3, 11 }, { 0x00E4, 11 }, { 0x00E5, 11 }, { 0x00E6, 11 }, - { 0x00E7, 11 }, { 0x00E8, 11 }, { 0x00E9, 11 }, { 0x00EA, 11 }, - { 0x00EB, 11 }, { 0x00EC, 11 }, { 0x00ED, 11 }, { 0x00EE, 11 }, - { 0x00EF, 11 }, { 0x00F0, 11 }, { 0x00F1, 11 }, { 0x00F2, 11 }, - { 0x00F3, 11 }, { 0x00F4, 11 }, { 0x00F5, 11 }, { 0x00F6, 11 }, - { 0x00F7, 11 }, { 0x00F8, 11 }, { 0x00F9, 11 }, { 0x00FA, 11 }, - { 0x00FB, 11 }, { 0x00FC, 11 }, { 0x00FD, 11 }, { 0x00FE, 11 }, - { 0x00FF, 11 }, - }, - { // 3 - { 0x0000, 8 }, { 0x0001, 8 }, { 0x0002, 8 }, { 0x0003, 8 }, - { 0x0004, 8 }, { 0x0005, 8 }, { 0x0006, 8 }, { 0x0007, 8 }, - { 0x0008, 8 }, { 0x0009, 8 }, { 0x000A, 8 }, { 0x000B, 8 }, - { 0x000C, 8 }, { 0x000D, 8 }, { 0x000E, 8 }, { 0x000F, 8 }, - { 0x0010, 8 }, { 0x0011, 8 }, { 0x0012, 8 }, { 0x0013, 8 }, - { 0x0014, 8 }, { 0x0015, 8 }, { 0x0016, 8 }, { 0x0001, 1 }, - { 0x0017, 8 }, { 0x000C, 7 }, { 0x000D, 7 }, { 0x000E, 7 }, - { 0x000F, 7 }, { 0x0010, 7 }, { 0x0011, 7 }, { 0x0012, 7 }, - { 0x0013, 7 }, { 0x0014, 7 }, { 0x0015, 7 }, { 0x0016, 7 }, - { 0x0017, 7 }, { 0x0018, 7 }, { 0x0019, 7 }, { 0x001A, 7 }, - { 0x001B, 7 }, { 0x001C, 7 }, { 0x001D, 7 }, { 0x001E, 7 }, - { 0x001F, 7 }, { 0x0020, 7 }, { 0x0021, 7 }, { 0x0022, 7 }, - { 0x0023, 7 }, { 0x0024, 7 }, { 0x0025, 7 }, { 0x0026, 7 }, - { 0x0027, 7 }, { 0x0028, 7 }, { 0x0029, 7 }, { 0x002A, 7 }, - { 0x002B, 7 }, { 0x002C, 7 }, { 0x002D, 7 }, { 0x002E, 7 }, - { 0x002F, 7 }, { 0x0030, 7 }, { 0x0031, 7 }, { 0x0032, 7 }, - { 0x0033, 7 }, { 0x0034, 7 }, { 0x0035, 7 }, { 0x0036, 7 }, - { 0x0037, 7 }, { 0x0038, 7 }, { 0x0039, 7 }, { 0x003A, 7 }, - { 0x003B, 7 }, { 0x003C, 7 }, { 0x003D, 7 }, { 0x003E, 7 }, - { 0x003F, 7 }, - }, - { // 4 - { 0x0000, 9 }, { 0x0001, 9 }, { 0x0002, 9 }, { 0x0003, 9 }, - { 0x0004, 9 }, { 0x0005, 9 }, { 0x0006, 9 }, { 0x0007, 9 }, - { 0x0008, 9 }, { 0x0009, 9 }, { 0x000A, 9 }, { 0x000B, 9 }, - { 0x000C, 9 }, { 0x000D, 9 }, { 0x000E, 9 }, { 0x000F, 9 }, - { 0x0010, 9 }, { 0x0011, 9 }, { 0x0012, 9 }, { 0x0013, 9 }, - { 0x0014, 9 }, { 0x0015, 9 }, { 0x000B, 8 }, { 0x0001, 2 }, - { 0x0001, 1 }, { 0x000C, 8 }, { 0x000D, 8 }, { 0x000E, 8 }, - { 0x000F, 8 }, { 0x0010, 8 }, { 0x0011, 8 }, { 0x0012, 8 }, - { 0x0013, 8 }, { 0x0014, 8 }, { 0x0015, 8 }, { 0x0016, 8 }, - { 0x0017, 8 }, { 0x0018, 8 }, { 0x0019, 8 }, { 0x001A, 8 }, - { 0x001B, 8 }, { 0x001C, 8 }, { 0x001D, 8 }, { 0x001E, 8 }, - { 0x001F, 8 }, { 0x0020, 8 }, { 0x0021, 8 }, { 0x0022, 8 }, - { 0x0023, 8 }, { 0x0024, 8 }, { 0x0025, 8 }, { 0x0026, 8 }, - { 0x0027, 8 }, { 0x0028, 8 }, { 0x0029, 8 }, { 0x002A, 8 }, - { 0x002B, 8 }, { 0x002C, 8 }, { 0x002D, 8 }, { 0x002E, 8 }, - { 0x002F, 8 }, { 0x0030, 8 }, { 0x0031, 8 }, { 0x0032, 8 }, - { 0x0033, 8 }, { 0x0034, 8 }, { 0x0035, 8 }, { 0x0036, 8 }, - { 0x0037, 8 }, { 0x0038, 8 }, { 0x0039, 8 }, { 0x003A, 8 }, - { 0x003B, 8 }, { 0x003C, 8 }, { 0x003D, 8 }, { 0x003E, 8 }, - { 0x003F, 8 }, - }, - { // 5 - { 0x0000, 10 }, { 0x0001, 10 }, { 0x0002, 10 }, { 0x0003, 10 }, - { 0x0004, 10 }, { 0x0005, 10 }, { 0x0006, 10 }, { 0x0007, 10 }, - { 0x0008, 10 }, { 0x0009, 10 }, { 0x000A, 10 }, { 0x000B, 10 }, - { 0x000C, 10 }, { 0x000D, 10 }, { 0x000E, 10 }, { 0x000F, 10 }, - { 0x0010, 10 }, { 0x0011, 10 }, { 0x0012, 10 }, { 0x0013, 10 }, - { 0x000A, 9 }, { 0x000B, 9 }, { 0x000C, 9 }, { 0x0001, 1 }, - { 0x0001, 3 }, { 0x000D, 9 }, { 0x000E, 9 }, { 0x0001, 2 }, - { 0x000F, 9 }, { 0x0010, 9 }, { 0x0011, 9 }, { 0x0012, 9 }, - { 0x0013, 9 }, { 0x0014, 9 }, { 0x0015, 9 }, { 0x0016, 9 }, - { 0x0017, 9 }, { 0x0018, 9 }, { 0x0019, 9 }, { 0x001A, 9 }, - { 0x001B, 9 }, { 0x001C, 9 }, { 0x001D, 9 }, { 0x001E, 9 }, - { 0x001F, 9 }, { 0x0020, 9 }, { 0x0021, 9 }, { 0x0022, 9 }, - { 0x0023, 9 }, { 0x0024, 9 }, { 0x0025, 9 }, { 0x0026, 9 }, - { 0x0027, 9 }, { 0x0028, 9 }, { 0x0029, 9 }, { 0x002A, 9 }, - { 0x002B, 9 }, { 0x002C, 9 }, { 0x002D, 9 }, { 0x002E, 9 }, - { 0x002F, 9 }, { 0x0030, 9 }, { 0x0031, 9 }, { 0x0032, 9 }, - { 0x0033, 9 }, { 0x0034, 9 }, { 0x0035, 9 }, { 0x0036, 9 }, - { 0x0037, 9 }, { 0x0038, 9 }, { 0x0039, 9 }, { 0x003A, 9 }, - { 0x003B, 9 }, { 0x003C, 9 }, { 0x003D, 9 }, { 0x003E, 9 }, - { 0x003F, 9 }, - }, - { // 6 - { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x000B, 5 }, - { 0x0018, 6 }, { 0x0019, 6 }, { 0x0034, 7 }, { 0x006A, 8 }, - { 0x006B, 8 }, { 0x006C, 8 }, { 0x00DA, 9 }, { 0x00DB, 9 }, - { 0x01B8, 10 }, { 0x00DD, 9 }, { 0x01B9, 10 }, { 0x3780, 15 }, - { 0x0004, 3 }, { 0x000E, 5 }, { 0x001E, 6 }, { 0x001F, 6 }, - { 0x000A, 4 }, { 0x0058, 7 }, { 0x0017, 5 }, { 0x0018, 5 }, - { 0x0059, 7 }, { 0x005A, 7 }, { 0x005B, 7 }, { 0x00C8, 8 }, - { 0x0065, 7 }, { 0x0066, 7 }, { 0x00C9, 8 }, { 0x00CE, 8 }, - { 0x00CF, 8 }, { 0x00D0, 8 }, { 0x00D1, 8 }, { 0x00D2, 8 }, - { 0x00D3, 8 }, { 0x00DF, 9 }, { 0x00D4, 8 }, { 0x00D5, 8 }, - { 0x00D6, 8 }, { 0x01AE, 9 }, { 0x3781, 15 }, { 0x01BD, 10 }, - { 0x035E, 10 }, { 0x035F, 10 }, { 0x3782, 15 }, { 0x0360, 10 }, - { 0x0037, 6 }, { 0x01B1, 9 }, { 0x3783, 15 }, { 0x3784, 15 }, - { 0x000E, 4 }, { 0x003C, 6 }, { 0x0361, 10 }, { 0x3785, 15 }, - { 0x1BC3, 14 }, { 0x003D, 6 }, { 0x00D9, 8 }, { 0x1BC4, 14 }, - { 0x0368, 10 }, { 0x1BC5, 14 }, { 0x1BC6, 14 }, { 0x1BC7, 14 }, - { 0x1BC8, 14 }, { 0x00DB, 8 }, { 0x0369, 10 }, { 0x036A, 10 }, - { 0x1BC9, 14 }, { 0x1BCA, 14 }, { 0x1BCB, 14 }, { 0x1BCC, 14 }, - { 0x1BCD, 14 }, { 0x001F, 5 }, { 0x036B, 10 }, { 0x1BCE, 14 }, - { 0x1BCF, 14 }, - }, - { // 7 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x0007, 5 }, - { 0x0010, 6 }, { 0x0044, 8 }, { 0x0023, 7 }, { 0x0012, 6 }, - { 0x0026, 7 }, { 0x08A0, 13 }, { 0x004E, 8 }, { 0x004F, 8 }, - { 0x08A1, 13 }, { 0x08A2, 13 }, { 0x08A3, 13 }, { 0x0050, 8 }, - { 0x0006, 4 }, { 0x000B, 5 }, { 0x0029, 7 }, { 0x0015, 6 }, - { 0x001C, 6 }, { 0x003A, 7 }, { 0x001E, 6 }, { 0x0004, 3 }, - { 0x0014, 5 }, { 0x0015, 5 }, { 0x000B, 4 }, { 0x001F, 6 }, - { 0x0030, 6 }, { 0x0031, 6 }, { 0x0019, 5 }, { 0x0051, 8 }, - { 0x0034, 6 }, { 0x0035, 6 }, { 0x0036, 6 }, { 0x0037, 6 }, - { 0x0076, 8 }, { 0x0077, 8 }, { 0x0070, 7 }, { 0x001D, 5 }, - { 0x0071, 7 }, { 0x0072, 7 }, { 0x08A4, 13 }, { 0x0073, 7 }, - { 0x00F0, 8 }, { 0x08A5, 13 }, { 0x08A6, 13 }, { 0x08A7, 13 }, - { 0x0079, 7 }, { 0x007A, 7 }, { 0x08A8, 13 }, { 0x08A9, 13 }, - { 0x00F1, 8 }, { 0x08AA, 13 }, { 0x08AB, 13 }, { 0x08AC, 13 }, - { 0x08AD, 13 }, { 0x00F6, 8 }, { 0x08AE, 13 }, { 0x007C, 7 }, - { 0x00F7, 8 }, { 0x08AF, 13 }, { 0x08B0, 13 }, { 0x08B1, 13 }, - { 0x08B2, 13 }, { 0x00FA, 8 }, { 0x08B3, 13 }, { 0x08B4, 13 }, - { 0x08B5, 13 }, { 0x08B6, 13 }, { 0x08B7, 13 }, { 0x00FB, 8 }, - { 0x045C, 12 }, { 0x003F, 6 }, { 0x045D, 12 }, { 0x045E, 12 }, - { 0x045F, 12 }, - }, -}; - -static const uint16_t x8_ac1_lowquant_table[8][77][2] = { - { // 0 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, - { 0x0012, 6 }, { 0x0026, 7 }, { 0x0014, 6 }, { 0x004E, 8 }, - { 0x004F, 8 }, { 0x00A8, 9 }, { 0x0152, 10 }, { 0x00AA, 9 }, - { 0x00AB, 9 }, { 0x00AC, 9 }, { 0x2A60, 15 }, { 0x02A7, 11 }, - { 0x0006, 4 }, { 0x000B, 5 }, { 0x001C, 6 }, { 0x003A, 7 }, - { 0x000F, 5 }, { 0x003B, 7 }, { 0x0010, 5 }, { 0x0005, 3 }, - { 0x0009, 4 }, { 0x0011, 5 }, { 0x0018, 5 }, { 0x0019, 5 }, - { 0x001A, 5 }, { 0x0036, 6 }, { 0x0037, 6 }, { 0x0070, 7 }, - { 0x0057, 8 }, { 0x00E2, 8 }, { 0x00E3, 8 }, { 0x00E4, 8 }, - { 0x00E5, 8 }, { 0x00AD, 9 }, { 0x0398, 10 }, { 0x003A, 6 }, - { 0x0076, 7 }, { 0x00E7, 8 }, { 0x00EE, 8 }, { 0x00EF, 8 }, - { 0x0732, 11 }, { 0x039A, 10 }, { 0x0733, 11 }, { 0x2A61, 15 }, - { 0x0078, 7 }, { 0x1531, 14 }, { 0x1532, 14 }, { 0x1533, 14 }, - { 0x003D, 6 }, { 0x039B, 10 }, { 0x1534, 14 }, { 0x1535, 14 }, - { 0x1536, 14 }, { 0x0079, 7 }, { 0x1537, 14 }, { 0x00F8, 8 }, - { 0x01F2, 9 }, { 0x07CC, 11 }, { 0x03E7, 10 }, { 0x07CD, 11 }, - { 0x3E80, 14 }, { 0x00FB, 8 }, { 0x03E9, 10 }, { 0x3E81, 14 }, - { 0x3E82, 14 }, { 0x3E83, 14 }, { 0x3E84, 14 }, { 0x3E85, 14 }, - { 0x3E86, 14 }, { 0x003F, 6 }, { 0x01F5, 9 }, { 0x07D1, 11 }, - { 0x3E87, 14 }, - }, - { // 1 - { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x000E, 5 }, - { 0x001E, 6 }, { 0x001F, 6 }, { 0x0040, 7 }, { 0x0082, 8 }, - { 0x0083, 8 }, { 0x0084, 8 }, { 0x010A, 9 }, { 0x010B, 9 }, - { 0x0430, 11 }, { 0x0431, 11 }, { 0x0432, 11 }, { 0x0433, 11 }, - { 0x0005, 3 }, { 0x0011, 5 }, { 0x0024, 6 }, { 0x004A, 7 }, - { 0x000C, 4 }, { 0x0026, 6 }, { 0x000D, 4 }, { 0x0087, 8 }, - { 0x010D, 9 }, { 0x0258, 10 }, { 0x012D, 9 }, { 0x0259, 10 }, - { 0x025C, 10 }, { 0x0974, 12 }, { 0x025E, 10 }, { 0x025F, 10 }, - { 0x0270, 10 }, { 0x0271, 10 }, { 0x04BB, 11 }, { 0x0975, 12 }, - { 0x0272, 10 }, { 0x09CC, 12 }, { 0x09CD, 12 }, { 0x4E70, 15 }, - { 0x4E71, 15 }, { 0x4E72, 15 }, { 0x4E73, 15 }, { 0x273A, 14 }, - { 0x273B, 14 }, { 0x273C, 14 }, { 0x04E8, 11 }, { 0x04E9, 11 }, - { 0x009E, 8 }, { 0x0275, 10 }, { 0x09D8, 12 }, { 0x273D, 14 }, - { 0x000E, 4 }, { 0x003C, 6 }, { 0x007A, 7 }, { 0x009F, 8 }, - { 0x0277, 10 }, { 0x003E, 6 }, { 0x00F6, 8 }, { 0x04ED, 11 }, - { 0x03DC, 10 }, { 0x273E, 14 }, { 0x07BA, 11 }, { 0x09D9, 12 }, - { 0x273F, 14 }, { 0x3DD8, 14 }, { 0x3DD9, 14 }, { 0x3DDA, 14 }, - { 0x3DDB, 14 }, { 0x3DDC, 14 }, { 0x3DDD, 14 }, { 0x3DDE, 14 }, - { 0x3DDF, 14 }, { 0x003F, 6 }, { 0x07BC, 11 }, { 0x07BD, 11 }, - { 0x03DF, 10 }, - }, - { // 2 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x000E, 6 }, - { 0x001E, 7 }, { 0x003E, 8 }, { 0x003F, 8 }, { 0x0040, 8 }, - { 0x0104, 10 }, { 0x0083, 9 }, { 0x0105, 10 }, { 0x0108, 10 }, - { 0x4240, 16 }, { 0x010A, 10 }, { 0x010B, 10 }, { 0x4241, 16 }, - { 0x0003, 3 }, { 0x0009, 5 }, { 0x0011, 6 }, { 0x0043, 8 }, - { 0x0004, 3 }, { 0x000A, 5 }, { 0x000A, 4 }, { 0x002C, 7 }, - { 0x00B4, 9 }, { 0x00B5, 9 }, { 0x00B6, 9 }, { 0x00B7, 9 }, - { 0x00B8, 9 }, { 0x0172, 10 }, { 0x0173, 10 }, { 0x0174, 10 }, - { 0x0175, 10 }, { 0x0176, 10 }, { 0x0177, 10 }, { 0x00BC, 9 }, - { 0x017A, 10 }, { 0x0213, 11 }, { 0x4242, 16 }, { 0x017B, 10 }, - { 0x02F8, 11 }, { 0x017D, 10 }, { 0x02F9, 11 }, { 0x017E, 10 }, - { 0x4243, 16 }, { 0x02FE, 11 }, { 0x2122, 15 }, { 0x2123, 15 }, - { 0x0058, 7 }, { 0x0164, 9 }, { 0x2124, 15 }, { 0x2125, 15 }, - { 0x0006, 3 }, { 0x000E, 4 }, { 0x002D, 6 }, { 0x002E, 6 }, - { 0x00B3, 8 }, { 0x001E, 5 }, { 0x005E, 7 }, { 0x2126, 15 }, - { 0x2127, 15 }, { 0x2128, 15 }, { 0x2129, 15 }, { 0x02FF, 11 }, - { 0x212A, 15 }, { 0x0594, 11 }, { 0x0595, 11 }, { 0x0596, 11 }, - { 0x212B, 15 }, { 0x212C, 15 }, { 0x212D, 15 }, { 0x212E, 15 }, - { 0x212F, 15 }, { 0x001F, 5 }, { 0x0597, 11 }, { 0x00BE, 8 }, - { 0x00BF, 8 }, - }, - { // 3 - { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x0007, 4 }, - { 0x0010, 5 }, { 0x0011, 5 }, { 0x0024, 6 }, { 0x0025, 6 }, - { 0x0026, 6 }, { 0x0027, 6 }, { 0x0050, 7 }, { 0x0051, 7 }, - { 0x00A4, 8 }, { 0x00A5, 8 }, { 0x00A6, 8 }, { 0x014E, 9 }, - { 0x000B, 4 }, { 0x002A, 6 }, { 0x0056, 7 }, { 0x014F, 9 }, - { 0x0030, 6 }, { 0x00AE, 8 }, { 0x0062, 7 }, { 0x0032, 6 }, - { 0x0033, 6 }, { 0x0034, 6 }, { 0x0035, 6 }, { 0x0036, 6 }, - { 0x0063, 7 }, { 0x006E, 7 }, { 0x006F, 7 }, { 0x0070, 7 }, - { 0x0071, 7 }, { 0x0072, 7 }, { 0x0073, 7 }, { 0x0074, 7 }, - { 0x00AF, 8 }, { 0x00EA, 8 }, { 0x01D6, 9 }, { 0x075C, 11 }, - { 0x03AF, 10 }, { 0x75D0, 15 }, { 0x75D1, 15 }, { 0x75D2, 15 }, - { 0x75D3, 15 }, { 0x75D4, 15 }, { 0x0076, 7 }, { 0x00EE, 8 }, - { 0x00EF, 8 }, { 0x0EBB, 12 }, { 0x01E0, 9 }, { 0x75D5, 15 }, - { 0x0079, 7 }, { 0x01E1, 9 }, { 0x75D6, 15 }, { 0x75D7, 15 }, - { 0x7880, 15 }, { 0x00F4, 8 }, { 0x0789, 11 }, { 0x003E, 6 }, - { 0x007B, 7 }, { 0x00F5, 8 }, { 0x00FC, 8 }, { 0x007F, 7 }, - { 0x01E3, 9 }, { 0x078A, 11 }, { 0x078B, 11 }, { 0x7881, 15 }, - { 0x7882, 15 }, { 0x7883, 15 }, { 0x3C42, 14 }, { 0x3C43, 14 }, - { 0x3C44, 14 }, { 0x00FD, 8 }, { 0x3C45, 14 }, { 0x3C46, 14 }, - { 0x3C47, 14 }, - }, - { // 4 - { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x0016, 6 }, - { 0x0017, 6 }, { 0x0030, 7 }, { 0x0031, 7 }, { 0x0064, 8 }, - { 0x0065, 8 }, { 0x0066, 8 }, { 0x00CE, 9 }, { 0x00CF, 9 }, - { 0x01A0, 10 }, { 0x01A1, 10 }, { 0x1A20, 14 }, { 0x0689, 12 }, - { 0x0004, 3 }, { 0x000E, 5 }, { 0x001B, 6 }, { 0x0035, 7 }, - { 0x000A, 4 }, { 0x001E, 6 }, { 0x0016, 5 }, { 0x0017, 5 }, - { 0x001F, 6 }, { 0x0030, 6 }, { 0x0031, 6 }, { 0x0064, 7 }, - { 0x0065, 7 }, { 0x0069, 8 }, { 0x0066, 7 }, { 0x00CE, 8 }, - { 0x00CF, 8 }, { 0x00D0, 8 }, { 0x00D1, 8 }, { 0x00D2, 8 }, - { 0x01A6, 9 }, { 0x01A3, 10 }, { 0x034E, 10 }, { 0x006A, 7 }, - { 0x00D6, 8 }, { 0x01AE, 9 }, { 0x01AF, 9 }, { 0x034F, 10 }, - { 0x0345, 11 }, { 0x01B0, 9 }, { 0x01B1, 9 }, { 0x0364, 10 }, - { 0x006D, 7 }, { 0x00DC, 8 }, { 0x0D94, 12 }, { 0x0D95, 12 }, - { 0x000E, 4 }, { 0x003C, 6 }, { 0x00DD, 8 }, { 0x00DE, 8 }, - { 0x01B3, 9 }, { 0x003D, 6 }, { 0x00DF, 8 }, { 0x01F0, 9 }, - { 0x03E2, 10 }, { 0x03E3, 10 }, { 0x06CB, 11 }, { 0x03E4, 10 }, - { 0x07CA, 11 }, { 0x01F3, 9 }, { 0x01F4, 9 }, { 0x07CB, 11 }, - { 0x07D4, 11 }, { 0x1A21, 14 }, { 0x1A22, 14 }, { 0x07D5, 11 }, - { 0x1A23, 14 }, { 0x003F, 6 }, { 0x01F6, 9 }, { 0x01F7, 9 }, - { 0x03EB, 10 }, - }, - { // 5 - { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x000E, 5 }, - { 0x000F, 5 }, { 0x0020, 6 }, { 0x0021, 6 }, { 0x0044, 7 }, - { 0x0045, 7 }, { 0x0046, 7 }, { 0x008E, 8 }, { 0x008F, 8 }, - { 0x0090, 8 }, { 0x0122, 9 }, { 0x0246, 10 }, { 0x0124, 9 }, - { 0x0005, 3 }, { 0x0013, 5 }, { 0x004A, 7 }, { 0x0093, 8 }, - { 0x0018, 5 }, { 0x004B, 7 }, { 0x0032, 6 }, { 0x001A, 5 }, - { 0x0033, 6 }, { 0x006C, 7 }, { 0x006D, 7 }, { 0x006E, 7 }, - { 0x00DE, 8 }, { 0x00DF, 8 }, { 0x0070, 7 }, { 0x00E2, 8 }, - { 0x00E3, 8 }, { 0x00E4, 8 }, { 0x00E5, 8 }, { 0x00E6, 8 }, - { 0x00E7, 8 }, { 0x0125, 9 }, { 0x01D0, 9 }, { 0x048E, 11 }, - { 0x091E, 12 }, { 0x091F, 12 }, { 0x7440, 15 }, { 0x1D11, 13 }, - { 0x7441, 15 }, { 0x7442, 15 }, { 0x00E9, 8 }, { 0x01D4, 9 }, - { 0x00EB, 8 }, { 0x03A3, 10 }, { 0x01D5, 9 }, { 0x1D12, 13 }, - { 0x001E, 5 }, { 0x0076, 7 }, { 0x01DC, 9 }, { 0x01DD, 9 }, - { 0x7443, 15 }, { 0x007C, 7 }, { 0x0745, 11 }, { 0x00EF, 8 }, - { 0x00FA, 8 }, { 0x00FB, 8 }, { 0x01F8, 9 }, { 0x00FD, 8 }, - { 0x07E4, 11 }, { 0x0FCA, 12 }, { 0x1D13, 13 }, { 0x7E58, 15 }, - { 0x7E59, 15 }, { 0x7E5A, 15 }, { 0x7E5B, 15 }, { 0x7E5C, 15 }, - { 0x7E5D, 15 }, { 0x007F, 7 }, { 0x3F2F, 14 }, { 0x07E6, 11 }, - { 0x07E7, 11 }, - }, - { // 6 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, - { 0x0009, 5 }, { 0x0014, 6 }, { 0x0015, 6 }, { 0x002C, 7 }, - { 0x005A, 8 }, { 0x005B, 8 }, { 0x005C, 8 }, { 0x00BA, 9 }, - { 0x00BB, 9 }, { 0x00BC, 9 }, { 0x02F4, 11 }, { 0x05EA, 12 }, - { 0x0003, 3 }, { 0x0010, 5 }, { 0x0022, 6 }, { 0x0046, 7 }, - { 0x0009, 4 }, { 0x0028, 6 }, { 0x0015, 5 }, { 0x000B, 4 }, - { 0x0018, 5 }, { 0x0029, 6 }, { 0x0032, 6 }, { 0x0047, 7 }, - { 0x0066, 7 }, { 0x0067, 7 }, { 0x0068, 7 }, { 0x0069, 7 }, - { 0x006A, 7 }, { 0x005F, 8 }, { 0x00D6, 8 }, { 0x00D7, 8 }, - { 0x01B0, 9 }, { 0x00D9, 8 }, { 0x017B, 10 }, { 0x006D, 7 }, - { 0x00DC, 8 }, { 0x01B1, 9 }, { 0x06E8, 11 }, { 0x01BB, 9 }, - { 0x0375, 10 }, { 0x05EB, 12 }, { 0x01BC, 9 }, { 0x6E90, 15 }, - { 0x0038, 6 }, { 0x0072, 7 }, { 0x6E91, 15 }, { 0x6E92, 15 }, - { 0x001D, 5 }, { 0x0073, 7 }, { 0x01BD, 9 }, { 0x06F8, 11 }, - { 0x6E93, 15 }, { 0x003C, 6 }, { 0x01BF, 9 }, { 0x00F4, 8 }, - { 0x01EA, 9 }, { 0x037D, 10 }, { 0x03D6, 10 }, { 0x06F9, 11 }, - { 0x6E94, 15 }, { 0x00F6, 8 }, { 0x01EE, 9 }, { 0x6E95, 15 }, - { 0x6E96, 15 }, { 0x6E97, 15 }, { 0x374C, 14 }, { 0x374D, 14 }, - { 0x374E, 14 }, { 0x001F, 5 }, { 0x03D7, 10 }, { 0x01EF, 9 }, - { 0x374F, 14 }, - }, - { // 7 - { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x0016, 6 }, - { 0x002E, 7 }, { 0x002F, 7 }, { 0x0060, 8 }, { 0x0061, 8 }, - { 0x00C4, 9 }, { 0x00C5, 9 }, { 0x00C6, 9 }, { 0x018E, 10 }, - { 0x31E0, 15 }, { 0x31E1, 15 }, { 0x31E2, 15 }, { 0x31E3, 15 }, - { 0x0004, 3 }, { 0x000D, 5 }, { 0x0019, 6 }, { 0x0038, 7 }, - { 0x000A, 4 }, { 0x001D, 6 }, { 0x000B, 4 }, { 0x0072, 8 }, - { 0x0073, 8 }, { 0x00F0, 9 }, { 0x01E2, 10 }, { 0x00F2, 9 }, - { 0x01E3, 10 }, { 0x00F3, 9 }, { 0x01E8, 10 }, { 0x01E9, 10 }, - { 0x31E4, 15 }, { 0x01EA, 10 }, { 0x031F, 11 }, { 0x03D6, 11 }, - { 0x31E5, 15 }, { 0x01EC, 10 }, { 0x31E6, 15 }, { 0x00F7, 9 }, - { 0x03D7, 11 }, { 0x31E7, 15 }, { 0x31E8, 15 }, { 0x03DA, 11 }, - { 0x03DB, 11 }, { 0x31E9, 15 }, { 0x03E0, 11 }, { 0x31EA, 15 }, - { 0x003F, 7 }, { 0x01F1, 10 }, { 0x31EB, 15 }, { 0x31EC, 15 }, - { 0x0006, 3 }, { 0x001C, 5 }, { 0x0074, 7 }, { 0x0075, 7 }, - { 0x00F9, 9 }, { 0x001E, 5 }, { 0x0076, 7 }, { 0x00FA, 9 }, - { 0x03E1, 11 }, { 0x31ED, 15 }, { 0x18F7, 14 }, { 0x1F60, 14 }, - { 0x1F61, 14 }, { 0x01DC, 9 }, { 0x01DD, 9 }, { 0x1F62, 14 }, - { 0x1F63, 14 }, { 0x1F64, 14 }, { 0x1F65, 14 }, { 0x1F66, 14 }, - { 0x1F67, 14 }, { 0x001F, 5 }, { 0x03ED, 11 }, { 0x00EF, 8 }, - { 0x01F7, 10 }, - }, -}; - -static const uint16_t x8_ac1_highquant_table[8][77][2] = { - { // 0 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x0007, 5 }, - { 0x0008, 5 }, { 0x0009, 5 }, { 0x0014, 6 }, { 0x002A, 7 }, - { 0x0016, 6 }, { 0x002B, 7 }, { 0x005C, 8 }, { 0x002F, 7 }, - { 0x0030, 7 }, { 0x005D, 8 }, { 0x0062, 8 }, { 0x00C6, 9 }, - { 0x0007, 4 }, { 0x0019, 6 }, { 0x001A, 6 }, { 0x0036, 7 }, - { 0x0010, 5 }, { 0x006E, 8 }, { 0x0022, 6 }, { 0x0009, 4 }, - { 0x000A, 4 }, { 0x0016, 5 }, { 0x0023, 6 }, { 0x002E, 6 }, - { 0x002F, 6 }, { 0x0030, 6 }, { 0x0062, 7 }, { 0x0063, 7 }, - { 0x0064, 7 }, { 0x0065, 7 }, { 0x0066, 7 }, { 0x0067, 7 }, - { 0x0068, 7 }, { 0x0069, 7 }, { 0x006A, 7 }, { 0x006B, 7 }, - { 0x006C, 7 }, { 0x00C7, 9 }, { 0x00DE, 9 }, { 0x00DF, 9 }, - { 0x06D0, 11 }, { 0x01B5, 9 }, { 0x0037, 6 }, { 0x00DB, 8 }, - { 0x001C, 5 }, { 0x0074, 7 }, { 0x01D4, 9 }, { 0x01D5, 9 }, - { 0x0076, 7 }, { 0x0369, 10 }, { 0x3688, 14 }, { 0x3689, 14 }, - { 0x368A, 14 }, { 0x0077, 7 }, { 0x03AC, 10 }, { 0x0078, 7 }, - { 0x00F2, 8 }, { 0x01D7, 9 }, { 0x00F3, 8 }, { 0x007A, 7 }, - { 0x368B, 14 }, { 0x007B, 7 }, { 0x007C, 7 }, { 0x03AD, 10 }, - { 0x03E8, 10 }, { 0x368C, 14 }, { 0x368D, 14 }, { 0x03E9, 10 }, - { 0x368E, 14 }, { 0x003F, 6 }, { 0x01F5, 9 }, { 0x00FB, 8 }, - { 0x368F, 14 }, - }, - { // 1 - { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x000B, 5 }, - { 0x0018, 6 }, { 0x0032, 7 }, { 0x0033, 7 }, { 0x0034, 7 }, - { 0x006A, 8 }, { 0x00D6, 9 }, { 0x00D7, 9 }, { 0x00D8, 9 }, - { 0x00D9, 9 }, { 0x3680, 15 }, { 0x01B5, 10 }, { 0x0369, 11 }, - { 0x0004, 3 }, { 0x000E, 5 }, { 0x001E, 6 }, { 0x0037, 7 }, - { 0x000A, 4 }, { 0x0016, 5 }, { 0x000C, 4 }, { 0x001F, 6 }, - { 0x005C, 7 }, { 0x005D, 7 }, { 0x00BC, 8 }, { 0x00BD, 8 }, - { 0x005F, 7 }, { 0x00D0, 8 }, { 0x00DB, 9 }, { 0x00D1, 8 }, - { 0x01A4, 9 }, { 0x01A5, 9 }, { 0x01A6, 9 }, { 0x01A7, 9 }, - { 0x0350, 10 }, { 0x06A2, 11 }, { 0x06A3, 11 }, { 0x01A9, 9 }, - { 0x01AA, 9 }, { 0x06AC, 11 }, { 0x3681, 15 }, { 0x0357, 10 }, - { 0x3682, 15 }, { 0x3683, 15 }, { 0x3684, 15 }, { 0x3685, 15 }, - { 0x0036, 6 }, { 0x00D6, 8 }, { 0x3686, 15 }, { 0x3687, 15 }, - { 0x000E, 4 }, { 0x006E, 7 }, { 0x00D7, 8 }, { 0x06AD, 11 }, - { 0x3688, 15 }, { 0x001E, 5 }, { 0x00DE, 8 }, { 0x06F8, 11 }, - { 0x037D, 10 }, { 0x3689, 15 }, { 0x368A, 15 }, { 0x368B, 15 }, - { 0x368C, 15 }, { 0x01BF, 9 }, { 0x368D, 15 }, { 0x1B47, 14 }, - { 0x37C8, 14 }, { 0x37C9, 14 }, { 0x37CA, 14 }, { 0x37CB, 14 }, - { 0x37CC, 14 }, { 0x001F, 5 }, { 0x37CD, 14 }, { 0x37CE, 14 }, - { 0x37CF, 14 }, - }, - { // 2 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, - { 0x0012, 6 }, { 0x0026, 7 }, { 0x0014, 6 }, { 0x0027, 7 }, - { 0x00A8, 9 }, { 0x00A9, 9 }, { 0x0055, 8 }, { 0x2B00, 15 }, - { 0x00AD, 9 }, { 0x2B01, 15 }, { 0x2B02, 15 }, { 0x2B03, 15 }, - { 0x0003, 3 }, { 0x000B, 5 }, { 0x0040, 7 }, { 0x0041, 7 }, - { 0x0009, 4 }, { 0x0021, 6 }, { 0x0011, 5 }, { 0x000A, 4 }, - { 0x000B, 4 }, { 0x0018, 5 }, { 0x0032, 6 }, { 0x0033, 6 }, - { 0x0034, 6 }, { 0x0035, 6 }, { 0x006C, 7 }, { 0x0057, 8 }, - { 0x006D, 7 }, { 0x00DC, 8 }, { 0x0159, 10 }, { 0x00DD, 8 }, - { 0x01BC, 9 }, { 0x037A, 10 }, { 0x037B, 10 }, { 0x0038, 6 }, - { 0x0072, 7 }, { 0x01BE, 9 }, { 0x01BF, 9 }, { 0x00E6, 8 }, - { 0x039C, 10 }, { 0x01CF, 9 }, { 0x2B04, 15 }, { 0x2B05, 15 }, - { 0x0074, 7 }, { 0x01D4, 9 }, { 0x2B06, 15 }, { 0x2B07, 15 }, - { 0x001E, 5 }, { 0x00EB, 8 }, { 0x1584, 14 }, { 0x1585, 14 }, - { 0x1586, 14 }, { 0x003B, 6 }, { 0x01D5, 9 }, { 0x01F0, 9 }, - { 0x039D, 10 }, { 0x03E2, 10 }, { 0x1587, 14 }, { 0x1588, 14 }, - { 0x1589, 14 }, { 0x00F9, 8 }, { 0x158A, 14 }, { 0x158B, 14 }, - { 0x03E3, 10 }, { 0x158C, 14 }, { 0x158D, 14 }, { 0x01F4, 9 }, - { 0x158E, 14 }, { 0x003F, 6 }, { 0x00FB, 8 }, { 0x01F5, 9 }, - { 0x158F, 14 }, - }, - { // 3 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x0007, 5 }, - { 0x0010, 6 }, { 0x0011, 6 }, { 0x0024, 7 }, { 0x0025, 7 }, - { 0x0013, 6 }, { 0x0014, 6 }, { 0x002A, 7 }, { 0x002B, 7 }, - { 0x00B0, 9 }, { 0x00B1, 9 }, { 0x002D, 7 }, { 0x0059, 8 }, - { 0x000C, 5 }, { 0x0017, 6 }, { 0x00D0, 9 }, { 0x0035, 7 }, - { 0x001B, 6 }, { 0x0038, 7 }, { 0x0039, 7 }, { 0x0004, 3 }, - { 0x0005, 3 }, { 0x000F, 5 }, { 0x0018, 5 }, { 0x001D, 6 }, - { 0x0032, 6 }, { 0x0033, 6 }, { 0x0068, 7 }, { 0x0069, 7 }, - { 0x0069, 8 }, { 0x00D4, 8 }, { 0x00D5, 8 }, { 0x00D6, 8 }, - { 0x006C, 7 }, { 0x0037, 6 }, { 0x006D, 7 }, { 0x0070, 7 }, - { 0x0039, 6 }, { 0x00D7, 8 }, { 0x00D1, 9 }, { 0x3880, 14 }, - { 0x3881, 14 }, { 0x3882, 14 }, { 0x0074, 7 }, { 0x01C5, 9 }, - { 0x0075, 7 }, { 0x00E3, 8 }, { 0x3883, 14 }, { 0x3884, 14 }, - { 0x00EC, 8 }, { 0x3885, 14 }, { 0x1C43, 13 }, { 0x1C44, 13 }, - { 0x1C45, 13 }, { 0x00ED, 8 }, { 0x1C46, 13 }, { 0x003C, 6 }, - { 0x0077, 7 }, { 0x01E8, 9 }, { 0x003E, 6 }, { 0x007B, 7 }, - { 0x1C47, 13 }, { 0x007E, 7 }, { 0x007F, 7 }, { 0x1C48, 13 }, - { 0x1C49, 13 }, { 0x1C4A, 13 }, { 0x1C4B, 13 }, { 0x1C4C, 13 }, - { 0x1C4D, 13 }, { 0x00F5, 8 }, { 0x1C4E, 13 }, { 0x01E9, 9 }, - { 0x1C4F, 13 }, - }, - { // 4 - { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x000B, 5 }, - { 0x0018, 6 }, { 0x0019, 6 }, { 0x0034, 7 }, { 0x0035, 7 }, - { 0x0036, 7 }, { 0x006E, 8 }, { 0x00DE, 9 }, { 0x00DF, 9 }, - { 0x01C0, 10 }, { 0x01C1, 10 }, { 0x01C2, 10 }, { 0x3860, 15 }, - { 0x0004, 3 }, { 0x000F, 5 }, { 0x001D, 6 }, { 0x0039, 7 }, - { 0x000A, 4 }, { 0x002C, 6 }, { 0x002D, 6 }, { 0x000C, 4 }, - { 0x0017, 5 }, { 0x0034, 6 }, { 0x0035, 6 }, { 0x0036, 6 }, - { 0x006E, 7 }, { 0x006F, 7 }, { 0x0070, 7 }, { 0x0071, 7 }, - { 0x0071, 8 }, { 0x00E4, 8 }, { 0x00E5, 8 }, { 0x00E6, 8 }, - { 0x00E7, 8 }, { 0x00E8, 8 }, { 0x03A4, 10 }, { 0x0075, 7 }, - { 0x00EC, 8 }, { 0x01D3, 9 }, { 0x01DA, 9 }, { 0x03A5, 10 }, - { 0x03B6, 10 }, { 0x070D, 12 }, { 0x03B7, 10 }, { 0x070E, 12 }, - { 0x003C, 6 }, { 0x00EE, 8 }, { 0x3861, 15 }, { 0x3862, 15 }, - { 0x003D, 6 }, { 0x01DE, 9 }, { 0x3863, 15 }, { 0x3864, 15 }, - { 0x3865, 15 }, { 0x007C, 7 }, { 0x070F, 12 }, { 0x03BE, 10 }, - { 0x03BF, 10 }, { 0x3866, 15 }, { 0x0FA0, 12 }, { 0x07D1, 11 }, - { 0x3867, 15 }, { 0x00FB, 8 }, { 0x01F5, 9 }, { 0x7D08, 15 }, - { 0x0FA4, 12 }, { 0x7D09, 15 }, { 0x7D0A, 15 }, { 0x7D0B, 15 }, - { 0x3E86, 14 }, { 0x003F, 6 }, { 0x0FA5, 12 }, { 0x07D3, 11 }, - { 0x3E87, 14 }, - }, - { // 5 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, - { 0x0009, 5 }, { 0x0014, 6 }, { 0x002A, 7 }, { 0x0056, 8 }, - { 0x02B8, 11 }, { 0x00AF, 9 }, { 0x02B9, 11 }, { 0x015D, 10 }, - { 0x02C0, 11 }, { 0x2C10, 15 }, { 0x2C11, 15 }, { 0x2C12, 15 }, - { 0x0006, 4 }, { 0x000E, 5 }, { 0x0017, 6 }, { 0x002D, 7 }, - { 0x000F, 5 }, { 0x0040, 7 }, { 0x0021, 6 }, { 0x0005, 3 }, - { 0x0009, 4 }, { 0x0011, 5 }, { 0x0018, 5 }, { 0x0019, 5 }, - { 0x001A, 5 }, { 0x0036, 6 }, { 0x0037, 6 }, { 0x0041, 7 }, - { 0x0059, 8 }, { 0x00E0, 8 }, { 0x00E1, 8 }, { 0x0071, 7 }, - { 0x00E4, 8 }, { 0x00B1, 9 }, { 0x02C2, 11 }, { 0x001D, 5 }, - { 0x0073, 7 }, { 0x00E5, 8 }, { 0x00F0, 8 }, { 0x0079, 7 }, - { 0x03C4, 10 }, { 0x01E3, 9 }, { 0x01E8, 9 }, { 0x2C13, 15 }, - { 0x007B, 7 }, { 0x2C14, 15 }, { 0x2C15, 15 }, { 0x2C16, 15 }, - { 0x007C, 7 }, { 0x02C3, 11 }, { 0x2C17, 15 }, { 0x160C, 14 }, - { 0x160D, 14 }, { 0x007D, 7 }, { 0x160E, 14 }, { 0x01E9, 9 }, - { 0x03C5, 10 }, { 0x03D4, 10 }, { 0x01EB, 9 }, { 0x160F, 14 }, - { 0x3D50, 14 }, { 0x00FC, 8 }, { 0x07AB, 11 }, { 0x3D51, 14 }, - { 0x3D52, 14 }, { 0x3D53, 14 }, { 0x3D54, 14 }, { 0x01FA, 9 }, - { 0x3D55, 14 }, { 0x007F, 7 }, { 0x01FB, 9 }, { 0x3D56, 14 }, - { 0x3D57, 14 }, - }, - { // 6 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, - { 0x0009, 5 }, { 0x000A, 5 }, { 0x000B, 5 }, { 0x0018, 6 }, - { 0x0032, 7 }, { 0x000D, 5 }, { 0x0033, 7 }, { 0x0E00, 13 }, - { 0x0039, 7 }, { 0x0E01, 13 }, { 0x003A, 7 }, { 0x0E02, 13 }, - { 0x0008, 4 }, { 0x001E, 6 }, { 0x003B, 7 }, { 0x003E, 7 }, - { 0x0012, 5 }, { 0x003F, 7 }, { 0x0013, 5 }, { 0x0028, 6 }, - { 0x0029, 6 }, { 0x0054, 7 }, { 0x002B, 6 }, { 0x0055, 7 }, - { 0x0058, 7 }, { 0x0E03, 13 }, { 0x0059, 7 }, { 0x005A, 7 }, - { 0x0E04, 13 }, { 0x0E05, 13 }, { 0x0703, 12 }, { 0x005B, 7 }, - { 0x005C, 7 }, { 0x0704, 12 }, { 0x0705, 12 }, { 0x005D, 7 }, - { 0x0706, 12 }, { 0x0707, 12 }, { 0x0708, 12 }, { 0x0709, 12 }, - { 0x070A, 12 }, { 0x070B, 12 }, { 0x0018, 5 }, { 0x002F, 6 }, - { 0x000D, 4 }, { 0x0019, 5 }, { 0x070C, 12 }, { 0x0070, 7 }, - { 0x001D, 5 }, { 0x070D, 12 }, { 0x070E, 12 }, { 0x070F, 12 }, - { 0x0710, 12 }, { 0x0039, 6 }, { 0x0711, 12 }, { 0x003C, 6 }, - { 0x0712, 12 }, { 0x0713, 12 }, { 0x0714, 12 }, { 0x0715, 12 }, - { 0x0716, 12 }, { 0x003D, 6 }, { 0x0717, 12 }, { 0x0718, 12 }, - { 0x0719, 12 }, { 0x071A, 12 }, { 0x071B, 12 }, { 0x071C, 12 }, - { 0x071D, 12 }, { 0x001F, 5 }, { 0x071E, 12 }, { 0x0071, 7 }, - { 0x071F, 12 }, - }, - { // 7 - { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x000E, 6 }, - { 0x000F, 6 }, { 0x0040, 8 }, { 0x0041, 8 }, { 0x0042, 8 }, - { 0x0218, 11 }, { 0x2190, 15 }, { 0x2191, 15 }, { 0x2192, 15 }, - { 0x2193, 15 }, { 0x2194, 15 }, { 0x2195, 15 }, { 0x2196, 15 }, - { 0x0005, 4 }, { 0x0011, 6 }, { 0x0024, 7 }, { 0x0087, 9 }, - { 0x000C, 5 }, { 0x004A, 8 }, { 0x004B, 8 }, { 0x0002, 2 }, - { 0x0006, 3 }, { 0x000D, 5 }, { 0x000E, 5 }, { 0x000F, 5 }, - { 0x0013, 6 }, { 0x0038, 6 }, { 0x00E4, 8 }, { 0x00E5, 8 }, - { 0x01CC, 9 }, { 0x00E7, 8 }, { 0x0074, 7 }, { 0x00EA, 8 }, - { 0x01CD, 9 }, { 0x021A, 11 }, { 0x2197, 15 }, { 0x001E, 5 }, - { 0x0076, 7 }, { 0x00EB, 8 }, { 0x01DC, 9 }, { 0x00EF, 8 }, - { 0x01DD, 9 }, { 0x01F0, 9 }, { 0x2198, 15 }, { 0x2199, 15 }, - { 0x00F9, 8 }, { 0x03E2, 10 }, { 0x219A, 15 }, { 0x219B, 15 }, - { 0x00FA, 8 }, { 0x219C, 15 }, { 0x219D, 15 }, { 0x219E, 15 }, - { 0x219F, 15 }, { 0x01F6, 9 }, { 0x21B0, 15 }, { 0x00FC, 8 }, - { 0x01F7, 9 }, { 0x21B1, 15 }, { 0x21B2, 15 }, { 0x21B3, 15 }, - { 0x21B4, 15 }, { 0x01FA, 9 }, { 0x21B5, 15 }, { 0x21B6, 15 }, - { 0x21B7, 15 }, { 0x21B8, 15 }, { 0x21B9, 15 }, { 0x03E3, 10 }, - { 0x10DD, 14 }, { 0x007F, 7 }, { 0x01FB, 9 }, { 0x10DE, 14 }, - { 0x10DF, 14 }, +static const uint8_t x8_ac_quant_table[2][2][8][77][2] = { + { + { + { /* AC highquant table group 0, table 0 */ + { 0, 3 }, { 1, 4 }, { 2, 6 }, { 3, 6 }, { 4, 7 }, + { 6, 15 }, { 8, 15 }, { 10, 15 }, { 12, 15 }, { 13, 15 }, + { 14, 15 }, { 15, 14 }, { 34, 14 }, { 45, 14 }, { 46, 14 }, + { 47, 14 }, { 49, 14 }, { 50, 14 }, { 51, 14 }, { 52, 14 }, + { 53, 14 }, { 54, 14 }, { 55, 14 }, { 56, 14 }, { 57, 14 }, + { 58, 14 }, { 60, 14 }, { 61, 14 }, { 62, 14 }, { 63, 14 }, + { 64, 14 }, { 65, 14 }, { 67, 14 }, { 69, 14 }, { 70, 14 }, + { 71, 14 }, { 72, 14 }, { 74, 14 }, { 75, 14 }, { 76, 14 }, + { 9, 9 }, { 7, 8 }, { 5, 6 }, { 11, 9 }, { 18, 9 }, + { 19, 9 }, { 22, 9 }, { 20, 7 }, { 17, 6 }, { 16, 5 }, + { 21, 7 }, { 29, 8 }, { 33, 8 }, { 28, 6 }, { 27, 5 }, + { 24, 3 }, { 23, 2 }, { 25, 4 }, { 26, 4 }, { 30, 7 }, + { 32, 7 }, { 31, 6 }, { 35, 7 }, { 36, 7 }, { 37, 7 }, + { 38, 9 }, { 41, 9 }, { 42, 8 }, { 39, 5 }, { 40, 6 }, + { 43, 9 }, { 44, 9 }, { 48, 8 }, { 59, 9 }, { 66, 9 }, + { 68, 9 }, { 73, 9 }, + }, + { /* AC highquant table group 0, table 1 */ + { 0, 3 }, { 1, 4 }, { 2, 4 }, { 3, 5 }, { 4, 6 }, + { 5, 6 }, { 6, 6 }, { 7, 6 }, { 8, 7 }, { 9, 8 }, + { 10, 8 }, { 11, 8 }, { 12, 8 }, { 13, 14 }, { 44, 14 }, + { 47, 14 }, { 50, 14 }, { 51, 14 }, { 54, 14 }, { 55, 14 }, + { 56, 14 }, { 63, 14 }, { 64, 14 }, { 67, 14 }, { 68, 14 }, + { 69, 14 }, { 70, 14 }, { 72, 14 }, { 76, 14 }, { 14, 10 }, + { 15, 10 }, { 45, 10 }, { 32, 8 }, { 16, 4 }, { 17, 5 }, + { 18, 6 }, { 19, 7 }, { 31, 7 }, { 20, 5 }, { 21, 6 }, + { 26, 6 }, { 22, 5 }, { 24, 5 }, { 23, 4 }, { 25, 5 }, + { 27, 6 }, { 28, 6 }, { 29, 6 }, { 30, 6 }, { 33, 8 }, + { 38, 8 }, { 34, 7 }, { 35, 7 }, { 36, 7 }, { 37, 7 }, + { 39, 7 }, { 40, 7 }, { 41, 8 }, { 42, 8 }, { 43, 8 }, + { 46, 9 }, { 49, 9 }, { 53, 8 }, { 58, 8 }, { 57, 6 }, + { 48, 5 }, { 52, 5 }, { 59, 7 }, { 60, 8 }, { 61, 9 }, + { 66, 9 }, { 62, 8 }, { 65, 8 }, { 71, 9 }, { 75, 9 }, + { 74, 8 }, { 73, 5 }, + }, + { /* AC highquant table group 0, table 2 */ + { 0, 4 }, { 1, 5 }, { 2, 12 }, { 3, 12 }, { 4, 12 }, + { 5, 12 }, { 6, 12 }, { 7, 12 }, { 8, 12 }, { 9, 12 }, + { 10, 12 }, { 11, 12 }, { 12, 11 }, { 13, 11 }, { 14, 11 }, + { 15, 11 }, { 16, 11 }, { 17, 11 }, { 18, 11 }, { 19, 11 }, + { 20, 11 }, { 21, 11 }, { 22, 11 }, { 28, 11 }, { 29, 11 }, + { 30, 11 }, { 31, 11 }, { 32, 11 }, { 33, 11 }, { 34, 11 }, + { 35, 11 }, { 36, 11 }, { 37, 11 }, { 38, 11 }, { 40, 11 }, + { 41, 11 }, { 42, 11 }, { 43, 11 }, { 44, 11 }, { 45, 11 }, + { 46, 11 }, { 47, 11 }, { 48, 11 }, { 49, 11 }, { 50, 11 }, + { 51, 11 }, { 52, 11 }, { 53, 11 }, { 54, 11 }, { 55, 11 }, + { 56, 11 }, { 57, 11 }, { 58, 11 }, { 59, 11 }, { 60, 11 }, + { 61, 11 }, { 62, 11 }, { 63, 11 }, { 64, 11 }, { 65, 11 }, + { 66, 11 }, { 67, 11 }, { 68, 11 }, { 69, 11 }, { 70, 11 }, + { 71, 11 }, { 72, 11 }, { 73, 11 }, { 74, 11 }, { 75, 11 }, + { 76, 11 }, { 25, 5 }, { 26, 5 }, { 27, 5 }, { 39, 5 }, + { 24, 2 }, { 23, 1 }, + }, + { /* AC highquant table group 0, table 3 */ + { 0, 8 }, { 1, 8 }, { 2, 8 }, { 3, 8 }, { 4, 8 }, + { 5, 8 }, { 6, 8 }, { 7, 8 }, { 8, 8 }, { 9, 8 }, + { 10, 8 }, { 11, 8 }, { 12, 8 }, { 13, 8 }, { 14, 8 }, + { 15, 8 }, { 16, 8 }, { 17, 8 }, { 18, 8 }, { 19, 8 }, + { 20, 8 }, { 21, 8 }, { 22, 8 }, { 24, 8 }, { 25, 7 }, + { 26, 7 }, { 27, 7 }, { 28, 7 }, { 29, 7 }, { 30, 7 }, + { 31, 7 }, { 32, 7 }, { 33, 7 }, { 34, 7 }, { 35, 7 }, + { 36, 7 }, { 37, 7 }, { 38, 7 }, { 39, 7 }, { 40, 7 }, + { 41, 7 }, { 42, 7 }, { 43, 7 }, { 44, 7 }, { 45, 7 }, + { 46, 7 }, { 47, 7 }, { 48, 7 }, { 49, 7 }, { 50, 7 }, + { 51, 7 }, { 52, 7 }, { 53, 7 }, { 54, 7 }, { 55, 7 }, + { 56, 7 }, { 57, 7 }, { 58, 7 }, { 59, 7 }, { 60, 7 }, + { 61, 7 }, { 62, 7 }, { 63, 7 }, { 64, 7 }, { 65, 7 }, + { 66, 7 }, { 67, 7 }, { 68, 7 }, { 69, 7 }, { 70, 7 }, + { 71, 7 }, { 72, 7 }, { 73, 7 }, { 74, 7 }, { 75, 7 }, + { 76, 7 }, { 23, 1 }, + }, + { /* AC highquant table group 0, table 4 */ + { 0, 9 }, { 1, 9 }, { 2, 9 }, { 3, 9 }, { 4, 9 }, + { 5, 9 }, { 6, 9 }, { 7, 9 }, { 8, 9 }, { 9, 9 }, + { 10, 9 }, { 11, 9 }, { 12, 9 }, { 13, 9 }, { 14, 9 }, + { 15, 9 }, { 16, 9 }, { 17, 9 }, { 18, 9 }, { 19, 9 }, + { 20, 9 }, { 21, 9 }, { 22, 8 }, { 25, 8 }, { 26, 8 }, + { 27, 8 }, { 28, 8 }, { 29, 8 }, { 30, 8 }, { 31, 8 }, + { 32, 8 }, { 33, 8 }, { 34, 8 }, { 35, 8 }, { 36, 8 }, + { 37, 8 }, { 38, 8 }, { 39, 8 }, { 40, 8 }, { 41, 8 }, + { 42, 8 }, { 43, 8 }, { 44, 8 }, { 45, 8 }, { 46, 8 }, + { 47, 8 }, { 48, 8 }, { 49, 8 }, { 50, 8 }, { 51, 8 }, + { 52, 8 }, { 53, 8 }, { 54, 8 }, { 55, 8 }, { 56, 8 }, + { 57, 8 }, { 58, 8 }, { 59, 8 }, { 60, 8 }, { 61, 8 }, + { 62, 8 }, { 63, 8 }, { 64, 8 }, { 65, 8 }, { 66, 8 }, + { 67, 8 }, { 68, 8 }, { 69, 8 }, { 70, 8 }, { 71, 8 }, + { 72, 8 }, { 73, 8 }, { 74, 8 }, { 75, 8 }, { 76, 8 }, + { 23, 2 }, { 24, 1 }, + }, + { /* AC highquant table group 0, table 5 */ + { 0, 10 }, { 1, 10 }, { 2, 10 }, { 3, 10 }, { 4, 10 }, + { 5, 10 }, { 6, 10 }, { 7, 10 }, { 8, 10 }, { 9, 10 }, + { 10, 10 }, { 11, 10 }, { 12, 10 }, { 13, 10 }, { 14, 10 }, + { 15, 10 }, { 16, 10 }, { 17, 10 }, { 18, 10 }, { 19, 10 }, + { 20, 9 }, { 21, 9 }, { 22, 9 }, { 25, 9 }, { 26, 9 }, + { 28, 9 }, { 29, 9 }, { 30, 9 }, { 31, 9 }, { 32, 9 }, + { 33, 9 }, { 34, 9 }, { 35, 9 }, { 36, 9 }, { 37, 9 }, + { 38, 9 }, { 39, 9 }, { 40, 9 }, { 41, 9 }, { 42, 9 }, + { 43, 9 }, { 44, 9 }, { 45, 9 }, { 46, 9 }, { 47, 9 }, + { 48, 9 }, { 49, 9 }, { 50, 9 }, { 51, 9 }, { 52, 9 }, + { 53, 9 }, { 54, 9 }, { 55, 9 }, { 56, 9 }, { 57, 9 }, + { 58, 9 }, { 59, 9 }, { 60, 9 }, { 61, 9 }, { 62, 9 }, + { 63, 9 }, { 64, 9 }, { 65, 9 }, { 66, 9 }, { 67, 9 }, + { 68, 9 }, { 69, 9 }, { 70, 9 }, { 71, 9 }, { 72, 9 }, + { 73, 9 }, { 74, 9 }, { 75, 9 }, { 76, 9 }, { 24, 3 }, + { 27, 2 }, { 23, 1 }, + }, + { /* AC highquant table group 0, table 6 */ + { 0, 2 }, { 1, 4 }, { 2, 5 }, { 3, 5 }, { 4, 6 }, + { 5, 6 }, { 6, 7 }, { 7, 8 }, { 8, 8 }, { 9, 8 }, + { 10, 9 }, { 11, 9 }, { 12, 10 }, { 14, 10 }, { 13, 9 }, + { 15, 15 }, { 42, 15 }, { 46, 15 }, { 50, 15 }, { 51, 15 }, + { 55, 15 }, { 56, 14 }, { 59, 14 }, { 61, 14 }, { 62, 14 }, + { 63, 14 }, { 64, 14 }, { 68, 14 }, { 69, 14 }, { 70, 14 }, + { 71, 14 }, { 72, 14 }, { 75, 14 }, { 76, 14 }, { 43, 10 }, + { 37, 9 }, { 17, 5 }, { 18, 6 }, { 19, 6 }, { 16, 3 }, + { 20, 4 }, { 21, 7 }, { 24, 7 }, { 25, 7 }, { 26, 7 }, + { 22, 5 }, { 23, 5 }, { 27, 8 }, { 30, 8 }, { 28, 7 }, + { 29, 7 }, { 31, 8 }, { 32, 8 }, { 33, 8 }, { 34, 8 }, + { 35, 8 }, { 36, 8 }, { 38, 8 }, { 39, 8 }, { 40, 8 }, + { 41, 9 }, { 44, 10 }, { 45, 10 }, { 47, 10 }, { 54, 10 }, + { 49, 9 }, { 58, 8 }, { 60, 10 }, { 66, 10 }, { 67, 10 }, + { 74, 10 }, { 65, 8 }, { 48, 6 }, { 52, 4 }, { 53, 6 }, + { 57, 6 }, { 73, 5 }, + }, + { /* AC highquant table group 0, table 7 */ + { 0, 3 }, { 1, 4 }, { 2, 5 }, { 3, 5 }, { 4, 6 }, + { 5, 8 }, { 9, 13 }, { 12, 13 }, { 13, 13 }, { 14, 13 }, + { 42, 13 }, { 45, 13 }, { 46, 13 }, { 47, 13 }, { 50, 13 }, + { 51, 13 }, { 53, 13 }, { 54, 13 }, { 55, 13 }, { 56, 13 }, + { 58, 13 }, { 61, 13 }, { 62, 13 }, { 63, 13 }, { 64, 13 }, + { 66, 13 }, { 67, 13 }, { 68, 13 }, { 69, 13 }, { 70, 13 }, + { 72, 12 }, { 74, 12 }, { 75, 12 }, { 76, 12 }, { 6, 7 }, + { 7, 6 }, { 8, 7 }, { 10, 8 }, { 11, 8 }, { 15, 8 }, + { 31, 8 }, { 18, 7 }, { 19, 6 }, { 17, 5 }, { 16, 4 }, + { 20, 6 }, { 21, 7 }, { 36, 8 }, { 37, 8 }, { 22, 6 }, + { 27, 6 }, { 23, 3 }, { 24, 5 }, { 25, 5 }, { 26, 4 }, + { 28, 6 }, { 29, 6 }, { 30, 5 }, { 32, 6 }, { 33, 6 }, + { 34, 6 }, { 35, 6 }, { 38, 7 }, { 40, 7 }, { 41, 7 }, + { 43, 7 }, { 39, 5 }, { 44, 8 }, { 52, 8 }, { 48, 7 }, + { 49, 7 }, { 57, 8 }, { 60, 8 }, { 59, 7 }, { 65, 8 }, + { 71, 8 }, { 73, 6 }, + }, + }, + { + { /* AC highquant table group 1, table 0 */ + { 0, 3 }, { 1, 4 }, { 2, 5 }, { 3, 5 }, { 4, 5 }, + { 5, 5 }, { 6, 6 }, { 7, 7 }, { 9, 7 }, { 8, 6 }, + { 10, 8 }, { 13, 8 }, { 11, 7 }, { 12, 7 }, { 14, 8 }, + { 15, 9 }, { 41, 9 }, { 17, 6 }, { 18, 6 }, { 19, 7 }, + { 21, 8 }, { 42, 9 }, { 43, 9 }, { 16, 4 }, { 20, 5 }, + { 22, 6 }, { 26, 6 }, { 23, 4 }, { 24, 4 }, { 25, 5 }, + { 27, 6 }, { 28, 6 }, { 29, 6 }, { 30, 7 }, { 31, 7 }, + { 32, 7 }, { 33, 7 }, { 34, 7 }, { 35, 7 }, { 36, 7 }, + { 37, 7 }, { 38, 7 }, { 39, 7 }, { 40, 7 }, { 44, 11 }, + { 54, 14 }, { 55, 14 }, { 56, 14 }, { 64, 14 }, { 69, 14 }, + { 70, 14 }, { 72, 14 }, { 76, 14 }, { 53, 10 }, { 45, 9 }, + { 47, 8 }, { 46, 6 }, { 48, 5 }, { 49, 7 }, { 50, 9 }, + { 51, 9 }, { 58, 10 }, { 67, 10 }, { 61, 9 }, { 52, 7 }, + { 57, 7 }, { 59, 7 }, { 60, 8 }, { 62, 8 }, { 63, 7 }, + { 65, 7 }, { 66, 7 }, { 68, 10 }, { 71, 10 }, { 74, 9 }, + { 75, 8 }, { 73, 6 }, + }, + { /* AC highquant table group 1, table 1 */ + { 0, 2 }, { 1, 4 }, { 2, 5 }, { 3, 5 }, { 4, 6 }, + { 5, 7 }, { 6, 7 }, { 7, 7 }, { 8, 8 }, { 9, 9 }, + { 10, 9 }, { 11, 9 }, { 12, 9 }, { 13, 15 }, { 42, 15 }, + { 44, 15 }, { 45, 15 }, { 46, 15 }, { 47, 15 }, { 50, 15 }, + { 51, 15 }, { 56, 15 }, { 61, 15 }, { 62, 15 }, { 63, 15 }, + { 64, 15 }, { 66, 15 }, { 67, 14 }, { 15, 11 }, { 14, 10 }, + { 30, 9 }, { 19, 7 }, { 17, 5 }, { 18, 6 }, { 23, 6 }, + { 16, 3 }, { 20, 4 }, { 21, 5 }, { 24, 7 }, { 25, 7 }, + { 26, 8 }, { 27, 8 }, { 28, 7 }, { 22, 4 }, { 29, 8 }, + { 31, 8 }, { 32, 9 }, { 33, 9 }, { 34, 9 }, { 35, 9 }, + { 36, 10 }, { 37, 11 }, { 38, 11 }, { 39, 9 }, { 40, 9 }, + { 41, 11 }, { 55, 11 }, { 43, 10 }, { 49, 8 }, { 54, 8 }, + { 48, 6 }, { 53, 7 }, { 58, 8 }, { 59, 11 }, { 68, 14 }, + { 69, 14 }, { 70, 14 }, { 71, 14 }, { 72, 14 }, { 74, 14 }, + { 75, 14 }, { 76, 14 }, { 60, 10 }, { 65, 9 }, { 52, 4 }, + { 57, 5 }, { 73, 5 }, + }, + { /* AC highquant table group 1, table 2 */ + { 0, 3 }, { 1, 4 }, { 2, 4 }, { 3, 5 }, { 4, 6 }, + { 5, 7 }, { 7, 7 }, { 6, 6 }, { 8, 9 }, { 9, 9 }, + { 10, 8 }, { 11, 15 }, { 13, 15 }, { 14, 15 }, { 15, 15 }, + { 46, 15 }, { 47, 15 }, { 50, 15 }, { 51, 15 }, { 54, 14 }, + { 55, 14 }, { 56, 14 }, { 62, 14 }, { 63, 14 }, { 64, 14 }, + { 66, 14 }, { 67, 14 }, { 69, 14 }, { 70, 14 }, { 72, 14 }, + { 76, 14 }, { 34, 10 }, { 12, 9 }, { 31, 8 }, { 17, 5 }, + { 16, 3 }, { 18, 7 }, { 19, 7 }, { 21, 6 }, { 22, 5 }, + { 20, 4 }, { 23, 4 }, { 24, 4 }, { 25, 5 }, { 26, 6 }, + { 27, 6 }, { 28, 6 }, { 29, 6 }, { 30, 7 }, { 32, 7 }, + { 33, 8 }, { 35, 8 }, { 36, 9 }, { 37, 10 }, { 38, 10 }, + { 41, 9 }, { 42, 9 }, { 39, 6 }, { 40, 7 }, { 43, 8 }, + { 44, 10 }, { 60, 10 }, { 45, 9 }, { 48, 7 }, { 49, 9 }, + { 58, 9 }, { 53, 8 }, { 57, 6 }, { 52, 5 }, { 59, 9 }, + { 61, 10 }, { 68, 10 }, { 65, 8 }, { 71, 9 }, { 75, 9 }, + { 74, 8 }, { 73, 6 }, + }, + { /* AC highquant table group 1, table 3 */ + { 0, 3 }, { 1, 4 }, { 2, 5 }, { 3, 5 }, { 4, 6 }, + { 5, 6 }, { 6, 7 }, { 7, 7 }, { 8, 6 }, { 9, 6 }, + { 10, 7 }, { 11, 7 }, { 12, 9 }, { 13, 9 }, { 15, 8 }, + { 14, 7 }, { 17, 6 }, { 16, 5 }, { 18, 9 }, { 42, 9 }, + { 32, 8 }, { 19, 7 }, { 20, 6 }, { 21, 7 }, { 22, 7 }, + { 27, 6 }, { 25, 5 }, { 23, 3 }, { 24, 3 }, { 26, 5 }, + { 28, 6 }, { 29, 6 }, { 30, 7 }, { 31, 7 }, { 33, 8 }, + { 34, 8 }, { 35, 8 }, { 41, 8 }, { 36, 7 }, { 38, 7 }, + { 37, 6 }, { 39, 7 }, { 43, 14 }, { 44, 14 }, { 45, 14 }, + { 50, 14 }, { 51, 14 }, { 53, 14 }, { 54, 13 }, { 55, 13 }, + { 56, 13 }, { 58, 13 }, { 64, 13 }, { 67, 13 }, { 68, 13 }, + { 69, 13 }, { 70, 13 }, { 71, 13 }, { 72, 13 }, { 74, 13 }, + { 76, 13 }, { 47, 9 }, { 49, 8 }, { 40, 6 }, { 46, 7 }, + { 48, 7 }, { 52, 8 }, { 57, 8 }, { 60, 7 }, { 59, 6 }, + { 61, 9 }, { 75, 9 }, { 73, 8 }, { 63, 7 }, { 62, 6 }, + { 65, 7 }, { 66, 7 }, + }, + { /* AC highquant table group 1, table 4 */ + { 0, 2 }, { 1, 4 }, { 2, 5 }, { 3, 5 }, { 4, 6 }, + { 5, 6 }, { 6, 7 }, { 7, 7 }, { 8, 7 }, { 9, 8 }, + { 10, 9 }, { 11, 9 }, { 12, 10 }, { 13, 10 }, { 14, 10 }, + { 15, 15 }, { 50, 15 }, { 51, 15 }, { 54, 15 }, { 55, 15 }, + { 56, 15 }, { 61, 15 }, { 64, 15 }, { 45, 12 }, { 47, 12 }, + { 58, 12 }, { 32, 8 }, { 19, 7 }, { 18, 6 }, { 17, 5 }, + { 16, 3 }, { 20, 4 }, { 21, 6 }, { 22, 6 }, { 24, 5 }, + { 23, 4 }, { 25, 6 }, { 26, 6 }, { 27, 6 }, { 28, 7 }, + { 29, 7 }, { 30, 7 }, { 31, 7 }, { 33, 8 }, { 34, 8 }, + { 35, 8 }, { 36, 8 }, { 37, 8 }, { 38, 10 }, { 43, 10 }, + { 41, 9 }, { 39, 7 }, { 40, 8 }, { 42, 9 }, { 44, 10 }, + { 46, 10 }, { 49, 8 }, { 53, 9 }, { 59, 10 }, { 60, 10 }, + { 48, 6 }, { 52, 6 }, { 57, 7 }, { 62, 12 }, { 67, 15 }, + { 69, 15 }, { 70, 15 }, { 71, 15 }, { 72, 14 }, { 76, 14 }, + { 63, 11 }, { 68, 12 }, { 74, 12 }, { 75, 11 }, { 66, 9 }, + { 65, 8 }, { 73, 6 }, + }, + { /* AC highquant table group 1, table 5 */ + { 0, 3 }, { 1, 4 }, { 2, 4 }, { 3, 5 }, { 4, 5 }, + { 5, 6 }, { 6, 7 }, { 7, 8 }, { 8, 11 }, { 10, 11 }, + { 11, 10 }, { 9, 9 }, { 12, 11 }, { 13, 15 }, { 14, 15 }, + { 15, 15 }, { 47, 15 }, { 49, 15 }, { 50, 15 }, { 51, 15 }, + { 54, 15 }, { 55, 14 }, { 56, 14 }, { 58, 14 }, { 63, 14 }, + { 38, 11 }, { 53, 11 }, { 37, 9 }, { 32, 8 }, { 19, 7 }, + { 18, 6 }, { 16, 4 }, { 17, 5 }, { 20, 5 }, { 21, 7 }, + { 31, 7 }, { 22, 6 }, { 25, 5 }, { 24, 4 }, { 23, 3 }, + { 26, 5 }, { 27, 5 }, { 28, 5 }, { 29, 6 }, { 30, 6 }, + { 33, 8 }, { 34, 8 }, { 35, 7 }, { 36, 8 }, { 41, 8 }, + { 40, 7 }, { 39, 5 }, { 42, 8 }, { 44, 10 }, { 60, 10 }, + { 45, 9 }, { 43, 7 }, { 46, 9 }, { 59, 9 }, { 61, 10 }, + { 64, 14 }, { 67, 14 }, { 68, 14 }, { 69, 14 }, { 70, 14 }, + { 72, 14 }, { 75, 14 }, { 76, 14 }, { 66, 11 }, { 62, 9 }, + { 48, 7 }, { 52, 7 }, { 57, 7 }, { 65, 8 }, { 71, 9 }, + { 74, 9 }, { 73, 7 }, + }, + { /* AC highquant table group 1, table 6 */ + { 0, 3 }, { 1, 4 }, { 2, 4 }, { 3, 5 }, { 4, 5 }, + { 5, 5 }, { 6, 5 }, { 7, 6 }, { 8, 7 }, { 10, 7 }, + { 9, 5 }, { 11, 13 }, { 13, 13 }, { 15, 13 }, { 29, 13 }, + { 32, 13 }, { 33, 13 }, { 34, 12 }, { 37, 12 }, { 38, 12 }, + { 40, 12 }, { 41, 12 }, { 42, 12 }, { 43, 12 }, { 44, 12 }, + { 45, 12 }, { 50, 12 }, { 53, 12 }, { 54, 12 }, { 55, 12 }, + { 56, 12 }, { 58, 12 }, { 60, 12 }, { 61, 12 }, { 62, 12 }, + { 63, 12 }, { 64, 12 }, { 66, 12 }, { 67, 12 }, { 68, 12 }, + { 69, 12 }, { 70, 12 }, { 71, 12 }, { 72, 12 }, { 74, 12 }, + { 76, 12 }, { 12, 7 }, { 14, 7 }, { 18, 7 }, { 17, 6 }, + { 19, 7 }, { 21, 7 }, { 16, 4 }, { 20, 5 }, { 22, 5 }, + { 23, 6 }, { 24, 6 }, { 25, 7 }, { 27, 7 }, { 26, 6 }, + { 28, 7 }, { 30, 7 }, { 31, 7 }, { 35, 7 }, { 36, 7 }, + { 39, 7 }, { 47, 6 }, { 46, 5 }, { 49, 5 }, { 48, 4 }, + { 51, 7 }, { 75, 7 }, { 57, 6 }, { 52, 5 }, { 59, 6 }, + { 65, 6 }, { 73, 5 }, + }, + { /* AC highquant table group 1, table 7 */ + { 0, 3 }, { 1, 4 }, { 2, 5 }, { 3, 6 }, { 4, 6 }, + { 5, 8 }, { 6, 8 }, { 7, 8 }, { 8, 11 }, { 9, 15 }, + { 10, 15 }, { 11, 15 }, { 12, 15 }, { 13, 15 }, { 14, 15 }, + { 15, 15 }, { 38, 15 }, { 46, 15 }, { 47, 15 }, { 50, 15 }, + { 51, 15 }, { 53, 15 }, { 54, 15 }, { 55, 15 }, { 56, 15 }, + { 37, 11 }, { 58, 15 }, { 61, 15 }, { 62, 15 }, { 63, 15 }, + { 64, 15 }, { 66, 15 }, { 67, 15 }, { 68, 15 }, { 69, 15 }, + { 70, 15 }, { 72, 14 }, { 75, 14 }, { 76, 14 }, { 19, 9 }, + { 17, 6 }, { 18, 7 }, { 21, 8 }, { 22, 8 }, { 28, 6 }, + { 16, 4 }, { 20, 5 }, { 25, 5 }, { 26, 5 }, { 27, 5 }, + { 23, 2 }, { 24, 3 }, { 29, 6 }, { 30, 8 }, { 31, 8 }, + { 32, 9 }, { 36, 9 }, { 33, 8 }, { 34, 7 }, { 35, 8 }, + { 41, 8 }, { 40, 7 }, { 42, 9 }, { 44, 9 }, { 43, 8 }, + { 39, 5 }, { 45, 9 }, { 49, 10 }, { 71, 10 }, { 48, 8 }, + { 52, 8 }, { 57, 9 }, { 60, 9 }, { 59, 8 }, { 65, 9 }, + { 74, 9 }, { 73, 7 }, + }, + }, + }, + { + { + { /* AC lowquant table group 0, table 0 */ + { 0, 2 }, { 1, 3 }, { 2, 4 }, { 3, 5 }, { 4, 6 }, + { 5, 7 }, { 6, 7 }, { 7, 7 }, { 8, 9 }, { 12, 10 }, + { 13, 10 }, { 9, 8 }, { 10, 8 }, { 11, 8 }, { 14, 10 }, + { 15, 10 }, { 18, 9 }, { 19, 10 }, { 41, 10 }, { 40, 9 }, + { 17, 7 }, { 21, 7 }, { 20, 6 }, { 16, 4 }, { 22, 7 }, + { 32, 7 }, { 28, 6 }, { 25, 5 }, { 23, 4 }, { 24, 4 }, + { 26, 5 }, { 27, 5 }, { 29, 6 }, { 30, 6 }, { 31, 6 }, + { 33, 7 }, { 34, 7 }, { 35, 7 }, { 36, 7 }, { 37, 7 }, + { 38, 7 }, { 39, 8 }, { 42, 14 }, { 43, 14 }, { 44, 14 }, + { 45, 14 }, { 47, 14 }, { 49, 14 }, { 50, 14 }, { 51, 14 }, + { 53, 14 }, { 54, 14 }, { 55, 14 }, { 56, 14 }, { 58, 14 }, + { 63, 14 }, { 64, 14 }, { 65, 14 }, { 46, 10 }, { 48, 9 }, + { 52, 8 }, { 57, 10 }, { 66, 14 }, { 67, 14 }, { 68, 14 }, + { 69, 14 }, { 70, 14 }, { 71, 14 }, { 72, 13 }, { 73, 13 }, + { 74, 13 }, { 75, 13 }, { 76, 13 }, { 62, 9 }, { 59, 7 }, + { 60, 8 }, { 61, 8 }, + }, + { /* AC lowquant table group 0, table 1 */ + { 0, 3 }, { 1, 5 }, { 2, 7 }, { 5, 8 }, { 6, 8 }, + { 3, 6 }, { 4, 6 }, { 7, 8 }, { 8, 14 }, { 9, 14 }, + { 11, 14 }, { 12, 14 }, { 13, 14 }, { 14, 14 }, { 15, 14 }, + { 18, 14 }, { 20, 14 }, { 21, 14 }, { 22, 14 }, { 41, 14 }, + { 45, 14 }, { 46, 14 }, { 47, 14 }, { 49, 14 }, { 50, 14 }, + { 51, 14 }, { 52, 13 }, { 53, 13 }, { 54, 13 }, { 55, 13 }, + { 56, 13 }, { 57, 13 }, { 58, 13 }, { 60, 13 }, { 61, 13 }, + { 62, 13 }, { 63, 13 }, { 64, 13 }, { 66, 13 }, { 67, 13 }, + { 68, 13 }, { 69, 13 }, { 70, 13 }, { 71, 13 }, { 72, 13 }, + { 73, 13 }, { 74, 13 }, { 75, 13 }, { 76, 13 }, { 10, 7 }, + { 16, 6 }, { 17, 8 }, { 19, 8 }, { 30, 7 }, { 23, 2 }, + { 24, 3 }, { 25, 5 }, { 29, 6 }, { 31, 7 }, { 32, 7 }, + { 26, 4 }, { 27, 4 }, { 28, 4 }, { 33, 7 }, { 34, 8 }, + { 40, 8 }, { 35, 7 }, { 42, 8 }, { 43, 8 }, { 36, 6 }, + { 37, 6 }, { 38, 6 }, { 39, 6 }, { 44, 8 }, { 48, 8 }, + { 65, 7 }, { 59, 6 }, + }, + { /* AC lowquant table group 0, table 2 */ + { 0, 2 }, { 1, 3 }, { 2, 3 }, { 3, 4 }, { 4, 5 }, + { 5, 5 }, { 6, 6 }, { 7, 6 }, { 8, 7 }, { 9, 7 }, + { 10, 7 }, { 11, 8 }, { 12, 8 }, { 13, 8 }, { 14, 9 }, + { 15, 10 }, { 39, 16 }, { 40, 16 }, { 41, 15 }, { 43, 15 }, + { 44, 15 }, { 45, 15 }, { 50, 15 }, { 51, 15 }, { 53, 15 }, + { 42, 12 }, { 49, 12 }, { 54, 15 }, { 55, 15 }, { 56, 15 }, + { 58, 15 }, { 64, 15 }, { 65, 15 }, { 66, 15 }, { 67, 15 }, + { 18, 8 }, { 19, 9 }, { 21, 9 }, { 17, 6 }, { 20, 6 }, + { 22, 8 }, { 38, 8 }, { 27, 7 }, { 16, 4 }, { 23, 5 }, + { 24, 6 }, { 25, 6 }, { 26, 6 }, { 28, 7 }, { 29, 7 }, + { 30, 7 }, { 31, 7 }, { 32, 7 }, { 33, 7 }, { 34, 7 }, + { 35, 7 }, { 36, 7 }, { 37, 7 }, { 46, 8 }, { 47, 10 }, + { 62, 11 }, { 63, 12 }, { 68, 15 }, { 69, 15 }, { 70, 15 }, + { 71, 15 }, { 72, 15 }, { 74, 15 }, { 75, 15 }, { 76, 15 }, + { 48, 9 }, { 52, 8 }, { 57, 9 }, { 73, 9 }, { 59, 7 }, + { 60, 8 }, { 61, 8 }, + }, + { /* AC lowquant table group 0, table 3 */ + { 0, 2 }, { 1, 3 }, { 2, 4 }, { 3, 5 }, { 4, 5 }, + { 5, 6 }, { 6, 6 }, { 7, 7 }, { 8, 7 }, { 9, 8 }, + { 10, 8 }, { 11, 9 }, { 12, 9 }, { 13, 9 }, { 14, 10 }, + { 15, 10 }, { 17, 5 }, { 18, 7 }, { 19, 7 }, { 21, 7 }, + { 24, 7 }, { 16, 3 }, { 20, 4 }, { 22, 5 }, { 23, 6 }, + { 25, 7 }, { 26, 7 }, { 27, 8 }, { 28, 8 }, { 29, 8 }, + { 30, 8 }, { 31, 8 }, { 32, 8 }, { 33, 9 }, { 37, 9 }, + { 34, 8 }, { 35, 8 }, { 36, 8 }, { 38, 11 }, { 40, 11 }, + { 39, 10 }, { 41, 15 }, { 43, 15 }, { 44, 15 }, { 45, 15 }, + { 50, 15 }, { 51, 15 }, { 64, 15 }, { 66, 15 }, { 49, 12 }, + { 47, 11 }, { 42, 10 }, { 46, 9 }, { 55, 10 }, { 56, 11 }, + { 63, 12 }, { 67, 15 }, { 68, 15 }, { 69, 15 }, { 70, 15 }, + { 71, 15 }, { 72, 15 }, { 74, 14 }, { 48, 7 }, { 53, 7 }, + { 52, 5 }, { 54, 8 }, { 58, 10 }, { 61, 10 }, { 62, 10 }, + { 65, 11 }, { 75, 12 }, { 76, 12 }, { 57, 7 }, { 59, 8 }, + { 60, 8 }, { 73, 7 }, + }, + { /* AC lowquant table group 0, table 4 */ + { 0, 3 }, { 1, 4 }, { 2, 4 }, { 3, 5 }, { 4, 6 }, + { 5, 6 }, { 6, 6 }, { 7, 7 }, { 9, 7 }, { 8, 6 }, + { 10, 8 }, { 11, 8 }, { 12, 8 }, { 13, 9 }, { 14, 9 }, + { 15, 8 }, { 37, 8 }, { 31, 7 }, { 18, 6 }, { 17, 5 }, + { 16, 4 }, { 19, 6 }, { 21, 6 }, { 22, 5 }, { 20, 4 }, + { 23, 5 }, { 24, 6 }, { 25, 6 }, { 26, 6 }, { 27, 6 }, + { 28, 6 }, { 29, 6 }, { 30, 6 }, { 32, 7 }, { 33, 7 }, + { 34, 7 }, { 35, 7 }, { 36, 7 }, { 38, 11 }, { 50, 15 }, + { 51, 15 }, { 55, 15 }, { 56, 15 }, { 64, 15 }, { 69, 15 }, + { 70, 14 }, { 71, 14 }, { 72, 14 }, { 75, 14 }, { 76, 14 }, + { 45, 10 }, { 42, 9 }, { 41, 8 }, { 39, 7 }, { 40, 7 }, + { 43, 9 }, { 44, 9 }, { 46, 9 }, { 47, 10 }, { 58, 10 }, + { 49, 8 }, { 54, 9 }, { 62, 10 }, { 66, 10 }, { 48, 6 }, + { 53, 7 }, { 59, 7 }, { 52, 4 }, { 57, 6 }, { 60, 8 }, + { 61, 8 }, { 63, 9 }, { 65, 9 }, { 67, 10 }, { 68, 10 }, + { 74, 9 }, { 73, 5 }, + }, + { /* AC lowquant table group 0, table 5 */ + { 0, 2 }, { 1, 4 }, { 2, 5 }, { 3, 5 }, { 4, 6 }, + { 5, 6 }, { 6, 7 }, { 7, 8 }, { 8, 8 }, { 9, 8 }, + { 10, 9 }, { 11, 11 }, { 14, 11 }, { 13, 10 }, { 12, 8 }, + { 15, 15 }, { 42, 15 }, { 50, 15 }, { 51, 15 }, { 62, 15 }, + { 64, 15 }, { 67, 15 }, { 68, 15 }, { 69, 14 }, { 70, 14 }, + { 71, 14 }, { 72, 14 }, { 38, 11 }, { 40, 10 }, { 33, 9 }, + { 17, 5 }, { 18, 6 }, { 19, 7 }, { 24, 7 }, { 16, 3 }, + { 20, 4 }, { 21, 6 }, { 23, 6 }, { 22, 5 }, { 25, 8 }, + { 27, 8 }, { 26, 7 }, { 28, 7 }, { 29, 8 }, { 31, 8 }, + { 30, 7 }, { 32, 8 }, { 34, 9 }, { 35, 9 }, { 36, 9 }, + { 37, 9 }, { 39, 9 }, { 41, 11 }, { 44, 11 }, { 43, 10 }, + { 45, 11 }, { 47, 11 }, { 46, 10 }, { 56, 9 }, { 49, 8 }, + { 48, 6 }, { 54, 7 }, { 55, 7 }, { 53, 5 }, { 52, 4 }, + { 57, 6 }, { 58, 8 }, { 59, 8 }, { 60, 10 }, { 61, 11 }, + { 75, 11 }, { 63, 10 }, { 65, 10 }, { 66, 10 }, { 74, 10 }, + { 76, 9 }, { 73, 5 }, + }, + { /* AC lowquant table group 0, table 6 */ + { 0, 2 }, { 1, 4 }, { 2, 5 }, { 3, 6 }, { 4, 6 }, + { 5, 8 }, { 6, 9 }, { 7, 10 }, { 8, 10 }, { 9, 9 }, + { 10, 15 }, { 11, 15 }, { 13, 15 }, { 15, 15 }, { 37, 15 }, + { 46, 15 }, { 47, 15 }, { 49, 15 }, { 50, 15 }, { 51, 15 }, + { 53, 15 }, { 54, 15 }, { 55, 15 }, { 56, 15 }, { 58, 15 }, + { 60, 15 }, { 61, 15 }, { 62, 15 }, { 63, 15 }, { 64, 15 }, + { 67, 15 }, { 68, 15 }, { 69, 15 }, { 70, 15 }, { 71, 15 }, + { 72, 15 }, { 74, 14 }, { 75, 14 }, { 76, 14 }, { 12, 10 }, + { 14, 10 }, { 36, 10 }, { 21, 9 }, { 18, 8 }, { 19, 8 }, + { 22, 8 }, { 32, 8 }, { 17, 5 }, { 16, 4 }, { 20, 5 }, + { 26, 5 }, { 25, 4 }, { 23, 3 }, { 24, 3 }, { 27, 6 }, + { 28, 6 }, { 29, 7 }, { 30, 7 }, { 31, 7 }, { 33, 8 }, + { 34, 9 }, { 38, 9 }, { 35, 8 }, { 41, 9 }, { 42, 10 }, + { 45, 10 }, { 43, 8 }, { 44, 8 }, { 39, 6 }, { 40, 6 }, + { 48, 9 }, { 57, 9 }, { 52, 8 }, { 59, 9 }, { 65, 10 }, + { 66, 10 }, { 73, 8 }, + }, + { /* AC lowquant table group 0, table 7 */ + { 0, 4 }, { 1, 11 }, { 2, 11 }, { 3, 11 }, { 4, 11 }, + { 5, 11 }, { 6, 11 }, { 7, 11 }, { 8, 11 }, { 9, 11 }, + { 10, 11 }, { 11, 11 }, { 12, 11 }, { 13, 11 }, { 14, 11 }, + { 15, 11 }, { 16, 11 }, { 17, 10 }, { 18, 10 }, { 19, 10 }, + { 20, 10 }, { 21, 10 }, { 22, 10 }, { 25, 10 }, { 28, 10 }, + { 29, 10 }, { 30, 10 }, { 31, 10 }, { 32, 10 }, { 33, 10 }, + { 34, 10 }, { 35, 10 }, { 36, 10 }, { 37, 10 }, { 38, 10 }, + { 39, 10 }, { 40, 10 }, { 41, 10 }, { 42, 10 }, { 43, 10 }, + { 44, 10 }, { 45, 10 }, { 46, 10 }, { 47, 10 }, { 48, 10 }, + { 49, 10 }, { 50, 10 }, { 51, 10 }, { 52, 10 }, { 53, 10 }, + { 54, 10 }, { 55, 10 }, { 56, 10 }, { 57, 10 }, { 58, 10 }, + { 59, 10 }, { 60, 10 }, { 61, 10 }, { 62, 10 }, { 63, 10 }, + { 64, 10 }, { 65, 10 }, { 66, 10 }, { 67, 10 }, { 68, 10 }, + { 69, 10 }, { 70, 10 }, { 71, 10 }, { 72, 10 }, { 73, 10 }, + { 74, 10 }, { 75, 10 }, { 76, 10 }, { 26, 4 }, { 27, 4 }, + { 24, 2 }, { 23, 1 }, + }, + }, + { + { /* AC lowquant table group 1, table 0 */ + { 0, 3 }, { 1, 4 }, { 2, 4 }, { 3, 5 }, { 4, 6 }, + { 5, 7 }, { 7, 8 }, { 8, 8 }, { 6, 6 }, { 9, 9 }, + { 10, 10 }, { 14, 15 }, { 47, 15 }, { 49, 14 }, { 50, 14 }, + { 51, 14 }, { 54, 14 }, { 55, 14 }, { 56, 14 }, { 58, 14 }, + { 15, 11 }, { 11, 9 }, { 12, 9 }, { 13, 9 }, { 37, 9 }, + { 32, 8 }, { 17, 5 }, { 16, 4 }, { 18, 6 }, { 19, 7 }, + { 21, 7 }, { 20, 5 }, { 22, 5 }, { 25, 5 }, { 24, 4 }, + { 23, 3 }, { 26, 5 }, { 27, 5 }, { 28, 5 }, { 29, 6 }, + { 30, 6 }, { 31, 7 }, { 33, 8 }, { 34, 8 }, { 35, 8 }, + { 36, 8 }, { 38, 10 }, { 44, 11 }, { 46, 11 }, { 45, 10 }, + { 53, 10 }, { 41, 8 }, { 39, 6 }, { 40, 7 }, { 42, 8 }, + { 43, 8 }, { 48, 7 }, { 57, 7 }, { 52, 6 }, { 59, 8 }, + { 60, 9 }, { 61, 11 }, { 63, 11 }, { 62, 10 }, { 64, 14 }, + { 67, 14 }, { 68, 14 }, { 69, 14 }, { 70, 14 }, { 71, 14 }, + { 72, 14 }, { 76, 14 }, { 75, 11 }, { 66, 10 }, { 74, 9 }, + { 65, 8 }, { 73, 6 }, + }, + { /* AC lowquant table group 1, table 1 */ + { 0, 2 }, { 1, 3 }, { 2, 4 }, { 3, 5 }, { 4, 6 }, + { 5, 6 }, { 6, 7 }, { 7, 8 }, { 8, 8 }, { 9, 8 }, + { 10, 9 }, { 11, 9 }, { 12, 11 }, { 13, 11 }, { 14, 11 }, + { 15, 11 }, { 24, 9 }, { 23, 8 }, { 17, 5 }, { 18, 6 }, + { 19, 7 }, { 25, 10 }, { 27, 10 }, { 26, 9 }, { 28, 10 }, + { 29, 12 }, { 35, 12 }, { 34, 11 }, { 30, 10 }, { 31, 10 }, + { 21, 6 }, { 32, 10 }, { 33, 10 }, { 36, 10 }, { 37, 12 }, + { 38, 12 }, { 39, 15 }, { 40, 15 }, { 41, 15 }, { 42, 15 }, + { 43, 14 }, { 44, 14 }, { 45, 14 }, { 51, 14 }, { 61, 14 }, + { 64, 14 }, { 46, 11 }, { 47, 11 }, { 49, 10 }, { 50, 12 }, + { 63, 12 }, { 59, 11 }, { 56, 10 }, { 48, 8 }, { 55, 8 }, + { 16, 3 }, { 20, 4 }, { 22, 4 }, { 52, 4 }, { 53, 6 }, + { 54, 7 }, { 58, 8 }, { 60, 10 }, { 62, 11 }, { 65, 14 }, + { 66, 14 }, { 67, 14 }, { 68, 14 }, { 69, 14 }, { 70, 14 }, + { 71, 14 }, { 72, 14 }, { 74, 11 }, { 75, 11 }, { 76, 10 }, + { 57, 6 }, { 73, 6 }, + }, + { /* AC lowquant table group 1, table 2 */ + { 0, 3 }, { 1, 4 }, { 2, 5 }, { 3, 6 }, { 4, 7 }, + { 5, 8 }, { 6, 8 }, { 7, 8 }, { 8, 10 }, { 10, 10 }, + { 9, 9 }, { 11, 10 }, { 12, 16 }, { 15, 16 }, { 38, 16 }, + { 44, 16 }, { 46, 15 }, { 47, 15 }, { 50, 15 }, { 51, 15 }, + { 59, 15 }, { 60, 15 }, { 61, 15 }, { 62, 15 }, { 64, 15 }, + { 68, 15 }, { 69, 15 }, { 70, 15 }, { 71, 15 }, { 72, 15 }, + { 37, 11 }, { 13, 10 }, { 14, 10 }, { 19, 8 }, { 18, 6 }, + { 17, 5 }, { 21, 5 }, { 23, 7 }, { 24, 9 }, { 25, 9 }, + { 26, 9 }, { 27, 9 }, { 28, 9 }, { 29, 10 }, { 30, 10 }, + { 31, 10 }, { 32, 10 }, { 33, 10 }, { 34, 10 }, { 35, 9 }, + { 36, 10 }, { 39, 10 }, { 40, 11 }, { 42, 11 }, { 41, 10 }, + { 43, 10 }, { 45, 11 }, { 63, 11 }, { 16, 3 }, { 20, 3 }, + { 22, 4 }, { 48, 7 }, { 49, 9 }, { 65, 11 }, { 66, 11 }, + { 67, 11 }, { 74, 11 }, { 56, 8 }, { 54, 6 }, { 55, 6 }, + { 58, 7 }, { 75, 8 }, { 76, 8 }, { 52, 3 }, { 53, 4 }, + { 57, 5 }, { 73, 5 }, + }, + { /* AC lowquant table group 1, table 3 */ + { 0, 2 }, { 1, 3 }, { 2, 4 }, { 3, 4 }, { 4, 5 }, + { 5, 5 }, { 6, 6 }, { 7, 6 }, { 8, 6 }, { 9, 6 }, + { 10, 7 }, { 11, 7 }, { 12, 8 }, { 13, 8 }, { 14, 8 }, + { 15, 9 }, { 19, 9 }, { 17, 6 }, { 18, 7 }, { 21, 8 }, + { 36, 8 }, { 16, 4 }, { 20, 6 }, { 22, 7 }, { 28, 7 }, + { 23, 6 }, { 24, 6 }, { 25, 6 }, { 26, 6 }, { 27, 6 }, + { 29, 7 }, { 30, 7 }, { 31, 7 }, { 32, 7 }, { 33, 7 }, + { 34, 7 }, { 35, 7 }, { 37, 8 }, { 38, 9 }, { 39, 11 }, + { 41, 15 }, { 42, 15 }, { 43, 15 }, { 44, 15 }, { 45, 15 }, + { 51, 15 }, { 54, 15 }, { 55, 15 }, { 49, 12 }, { 40, 10 }, + { 46, 7 }, { 47, 8 }, { 48, 8 }, { 50, 9 }, { 53, 9 }, + { 56, 15 }, { 67, 15 }, { 68, 15 }, { 69, 15 }, { 70, 14 }, + { 71, 14 }, { 72, 14 }, { 74, 14 }, { 75, 14 }, { 76, 14 }, + { 58, 11 }, { 65, 11 }, { 66, 11 }, { 64, 9 }, { 52, 7 }, + { 57, 8 }, { 61, 8 }, { 60, 7 }, { 59, 6 }, { 62, 8 }, + { 73, 8 }, { 63, 7 }, + }, + { /* AC lowquant table group 1, table 4 */ + { 0, 2 }, { 1, 4 }, { 2, 5 }, { 3, 6 }, { 4, 6 }, + { 5, 7 }, { 6, 7 }, { 7, 8 }, { 8, 8 }, { 9, 8 }, + { 10, 9 }, { 11, 9 }, { 12, 10 }, { 13, 10 }, { 14, 14 }, + { 69, 14 }, { 70, 14 }, { 72, 14 }, { 15, 12 }, { 44, 11 }, + { 37, 10 }, { 29, 8 }, { 19, 7 }, { 18, 6 }, { 17, 5 }, + { 21, 6 }, { 24, 6 }, { 16, 3 }, { 20, 4 }, { 22, 5 }, + { 23, 5 }, { 25, 6 }, { 26, 6 }, { 27, 7 }, { 28, 7 }, + { 30, 7 }, { 31, 8 }, { 32, 8 }, { 33, 8 }, { 34, 8 }, + { 35, 8 }, { 36, 9 }, { 38, 10 }, { 43, 10 }, { 39, 7 }, + { 40, 8 }, { 41, 9 }, { 42, 9 }, { 45, 9 }, { 46, 9 }, + { 47, 10 }, { 50, 12 }, { 51, 12 }, { 62, 11 }, { 56, 9 }, + { 48, 7 }, { 49, 8 }, { 54, 8 }, { 55, 8 }, { 58, 8 }, + { 52, 4 }, { 53, 6 }, { 57, 6 }, { 59, 9 }, { 60, 10 }, + { 61, 10 }, { 63, 10 }, { 64, 11 }, { 67, 11 }, { 65, 9 }, + { 66, 9 }, { 68, 11 }, { 71, 11 }, { 76, 10 }, { 74, 9 }, + { 75, 9 }, { 73, 6 }, + }, + { /* AC lowquant table group 1, table 5 */ + { 0, 2 }, { 1, 3 }, { 2, 4 }, { 3, 5 }, { 4, 5 }, + { 5, 6 }, { 6, 6 }, { 7, 7 }, { 8, 7 }, { 9, 7 }, + { 10, 8 }, { 11, 8 }, { 12, 8 }, { 13, 9 }, { 14, 10 }, + { 39, 11 }, { 40, 12 }, { 41, 12 }, { 15, 9 }, { 37, 9 }, + { 19, 8 }, { 18, 7 }, { 21, 7 }, { 17, 5 }, { 16, 3 }, + { 20, 5 }, { 22, 6 }, { 24, 6 }, { 23, 5 }, { 25, 7 }, + { 26, 7 }, { 27, 7 }, { 28, 8 }, { 29, 8 }, { 30, 7 }, + { 31, 8 }, { 32, 8 }, { 33, 8 }, { 34, 8 }, { 35, 8 }, + { 36, 8 }, { 38, 9 }, { 42, 15 }, { 44, 15 }, { 45, 15 }, + { 56, 15 }, { 43, 13 }, { 51, 13 }, { 66, 13 }, { 58, 11 }, + { 49, 10 }, { 46, 8 }, { 47, 9 }, { 50, 9 }, { 48, 8 }, + { 53, 7 }, { 54, 9 }, { 55, 9 }, { 59, 8 }, { 52, 5 }, + { 57, 7 }, { 60, 8 }, { 61, 8 }, { 62, 9 }, { 64, 11 }, + { 65, 12 }, { 67, 15 }, { 68, 15 }, { 69, 15 }, { 70, 15 }, + { 71, 15 }, { 72, 15 }, { 74, 14 }, { 75, 11 }, { 76, 11 }, + { 63, 8 }, { 73, 7 }, + }, + { /* AC lowquant table group 1, table 6 */ + { 0, 3 }, { 1, 4 }, { 2, 4 }, { 3, 5 }, { 4, 5 }, + { 5, 6 }, { 6, 6 }, { 7, 7 }, { 8, 8 }, { 9, 8 }, + { 10, 8 }, { 11, 9 }, { 12, 9 }, { 13, 9 }, { 14, 11 }, + { 15, 12 }, { 45, 12 }, { 38, 10 }, { 33, 8 }, { 16, 3 }, + { 17, 5 }, { 18, 6 }, { 19, 7 }, { 27, 7 }, { 20, 4 }, + { 21, 6 }, { 25, 6 }, { 22, 5 }, { 23, 4 }, { 24, 5 }, + { 26, 6 }, { 28, 7 }, { 29, 7 }, { 30, 7 }, { 31, 7 }, + { 32, 7 }, { 34, 8 }, { 35, 8 }, { 36, 9 }, { 41, 9 }, + { 37, 8 }, { 39, 7 }, { 40, 8 }, { 42, 11 }, { 47, 15 }, + { 50, 15 }, { 51, 15 }, { 56, 15 }, { 64, 15 }, { 67, 15 }, + { 68, 15 }, { 69, 15 }, { 70, 14 }, { 71, 14 }, { 72, 14 }, + { 76, 14 }, { 44, 10 }, { 43, 9 }, { 46, 9 }, { 54, 9 }, + { 55, 11 }, { 63, 11 }, { 61, 10 }, { 58, 9 }, { 48, 6 }, + { 49, 7 }, { 53, 7 }, { 52, 5 }, { 57, 6 }, { 59, 8 }, + { 60, 9 }, { 62, 10 }, { 74, 10 }, { 65, 8 }, { 66, 9 }, + { 75, 9 }, { 73, 5 }, + }, + { /* AC lowquant table group 1, table 7 */ + { 0, 2 }, { 1, 4 }, { 2, 5 }, { 3, 6 }, { 4, 7 }, + { 5, 7 }, { 6, 8 }, { 7, 8 }, { 8, 9 }, { 9, 9 }, + { 10, 9 }, { 11, 10 }, { 12, 15 }, { 13, 15 }, { 14, 15 }, + { 15, 15 }, { 32, 15 }, { 36, 15 }, { 38, 15 }, { 41, 15 }, + { 42, 15 }, { 45, 15 }, { 47, 15 }, { 50, 15 }, { 51, 15 }, + { 61, 15 }, { 62, 14 }, { 34, 11 }, { 18, 6 }, { 17, 5 }, + { 19, 7 }, { 23, 8 }, { 24, 8 }, { 21, 6 }, { 25, 9 }, + { 26, 10 }, { 28, 10 }, { 27, 9 }, { 29, 9 }, { 30, 10 }, + { 31, 10 }, { 33, 10 }, { 35, 11 }, { 40, 11 }, { 37, 10 }, + { 43, 11 }, { 44, 11 }, { 39, 9 }, { 46, 11 }, { 60, 11 }, + { 49, 10 }, { 56, 9 }, { 59, 9 }, { 63, 14 }, { 64, 14 }, + { 67, 14 }, { 68, 14 }, { 69, 14 }, { 70, 14 }, { 71, 14 }, + { 72, 14 }, { 74, 11 }, { 76, 10 }, { 48, 7 }, { 16, 3 }, + { 20, 4 }, { 22, 4 }, { 52, 3 }, { 53, 5 }, { 54, 7 }, + { 55, 7 }, { 58, 7 }, { 65, 9 }, { 66, 9 }, { 75, 8 }, + { 57, 5 }, { 73, 5 }, + }, + }, }, }; #define MAX_AC_VLC_BITS 16 From patchwork Tue Nov 10 10:58:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23571 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 CD8B144B238 for ; Tue, 10 Nov 2020 13:15:04 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 541B868C0B2; Tue, 10 Nov 2020 12:59:37 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4770768C080 for ; Tue, 10 Nov 2020 12:59:30 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id p1so12159551wrf.12 for ; Tue, 10 Nov 2020 02:59:30 -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=QsF7DEL6y8LGpcnR7rrSa802b+WMFosAevcTfBUKbLo=; b=dIWIzXQ2LQwn7MHlAhGS3F1zhlxv0fz5nWHCnXciosmQWAxEv9CWFf7PdAzYttSDdW kpXPrJQVrLbM0PpqXh+hWoAijS/H9RUnUhgipQW0ooaYmOXkyfKY1E1Uo4w6N+SNq367 Nin8Tia0Y2snNBUo4HhXAstKUYpTcumtpndthC8HdGE50S0CDnJ+fs/X/+83/9Kga8MY 7zqXZkC0rmf+V4J47We9H8v/9XolWVwrK+C94XADeeUSLaj0KTyyRJ7ccDOwhn5Kmztu 2CPsbbbeeIsUvjB9v76Y75cIlAb5U0KhwJUp8TLiP4QSPQMwkfddn1Spt++7v5MIce57 vOog== 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=QsF7DEL6y8LGpcnR7rrSa802b+WMFosAevcTfBUKbLo=; b=pLZHS1Bwlx4fVKYFBRM6xqrb85nSTlzbEpJF18LHUxITVMPbI/qQZW/STbUdcV/RB9 lPRiSZpf20Bn8HC6FE+RL9rOjOHR17K5z+KenMSI6/H6AkgBCC8kYgAqxb1s1iuIn3CX MmVU4f952rrxwb4uxtUMN89MZqnXhoOqMjt58x4IgRRSQool3VzO4JPOfXNCAiHkwW4n MpOBbJtK9QdelOPSsdXNQh0BYltdq9kpTxNA/mEjFAPejdH4hAjLhiBEiOA12LR1h7OP R1eSEGDWA/6i+SJ6/qAGcKkSaV4gEto/3ozhjXpQXDC7XdKjvs4mA1YkncyS5i9HqqnH wLfw== X-Gm-Message-State: AOAM530diMgSEMzTnnziTq+L8cmfkpXi9jJVWvITLEUJ/TaCPCPh2qa0 HlA45Iy5uQdvBkb9VzDErqa758OEaGY= X-Google-Smtp-Source: ABdhPJwZsA0SyfDBL+2r/sCda2tXI6a2GGmgIZ7AOzgmy0ieVd7Ra0/hczg8pYeRJd88ggzQiR8ojQ== X-Received: by 2002:adf:df88:: with SMTP id z8mr23016444wrl.113.1605005969344; Tue, 10 Nov 2020 02:59:29 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:28 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:28 +0100 Message-Id: <20201110105836.321916-15-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 106/114] avcodec/atrac3: Use symbols table 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" Expressions like array[get_vlc2()] can be optimized by using a symbols table if the array is always the same for a given VLC. This requirement is fulfilled for several VLCs used by ATRAC3, therefore this commit implements this. This comes without any additional costs when using ff_init_vlc_from_lengths() as one can then remove the codes tables. While at it, remove the arrays of pointers to the individual arrays and put all lengths+symbol pairs in one big array. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac3.c | 18 ++++---- libavcodec/atrac3data.h | 100 ++++++++++++++-------------------------- 2 files changed, 43 insertions(+), 75 deletions(-) diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 1e884a56b6..cd09b6dbb0 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -246,13 +246,8 @@ static void read_quant_spectral_coeffs(GetBitContext *gb, int selector, /* variable length coding (VLC) */ if (selector != 1) { for (i = 0; i < num_codes; i++) { - huff_symb = get_vlc2(gb, spectral_coeff_tab[selector-1].table, - ATRAC3_VLC_BITS, 1); - huff_symb += 1; - code = huff_symb >> 1; - if (huff_symb & 1) - code = -code; - mantissas[i] = code; + mantissas[i] = get_vlc2(gb, spectral_coeff_tab[selector-1].table, + ATRAC3_VLC_BITS, 1); } } else { for (i = 0; i < num_codes; i++) { @@ -854,6 +849,7 @@ static int atrac3al_decode_frame(AVCodecContext *avctx, void *data, static av_cold void atrac3_init_static_data(void) { VLC_TYPE (*table)[2] = atrac3_vlc_table; + const uint8_t (*hufftabs)[2] = atrac3_hufftabs; int i; init_imdct_window(); @@ -863,9 +859,11 @@ static av_cold void atrac3_init_static_data(void) for (i = 0; i < 7; i++) { spectral_coeff_tab[i].table = table; spectral_coeff_tab[i].table_allocated = 256; - init_vlc(&spectral_coeff_tab[i], ATRAC3_VLC_BITS, huff_tab_sizes[i], - huff_bits[i], 1, 1, - huff_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_from_lengths(&spectral_coeff_tab[i], ATRAC3_VLC_BITS, huff_tab_sizes[i], + &hufftabs[0][1], 2, + &hufftabs[0][0], 2, 1, + -31, INIT_VLC_USE_NEW_STATIC); + hufftabs += huff_tab_sizes[i]; table += 256; } } diff --git a/libavcodec/atrac3data.h b/libavcodec/atrac3data.h index a731fb7c4a..d050c0f380 100644 --- a/libavcodec/atrac3data.h +++ b/libavcodec/atrac3data.h @@ -32,77 +32,47 @@ /* VLC tables */ -static const uint8_t huffcode1[9] = { - 0x0, 0x4, 0x5, 0xC, 0xD, 0x1C, 0x1D, 0x1E, 0x1F -}; - -static const uint8_t huffbits1[9] = { 1, 3, 3, 4, 4, 5, 5, 5, 5 }; - -static const uint8_t huffcode2[5] = { 0x0, 0x4, 0x5, 0x6, 0x7 }; - -static const uint8_t huffbits2[5] = { 1, 3, 3, 3, 3 }; - -static const uint8_t huffcode3[7] = { 0x0, 0x4, 0x5, 0xC, 0xD, 0xE, 0xF }; - -static const uint8_t huffbits3[7] = { 1, 3, 3, 4, 4, 4, 4 }; - -static const uint8_t huffcode4[9] = { - 0x0, 0x4, 0x5, 0xC, 0xD, 0x1C, 0x1D, 0x1E, 0x1F -}; - -static const uint8_t huffbits4[9] = { 1, 3, 3, 4, 4, 5, 5, 5, 5 }; - -static const uint8_t huffcode5[15] = { - 0x00, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, 0x1C, - 0x1D, 0x3C, 0x3D, 0x3E, 0x3F, 0x0C, 0x0D -}; - -static const uint8_t huffbits5[15] = { - 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 4, 4 -}; - -static const uint8_t huffcode6[31] = { - 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x14, - 0x15, 0x16, 0x17, 0x18, 0x19, 0x34, 0x35, 0x36, - 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x78, 0x79, 0x7A, - 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, 0x08, 0x09 -}; - -static const uint8_t huffbits6[31] = { - 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4 -}; - -static const uint8_t huffcode7[63] = { - 0x00, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, - 0x0F, 0x10, 0x11, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, - 0x31, 0x32, 0x33, 0x68, 0x69, 0x6A, 0x6B, 0x6C, - 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, - 0x75, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, - 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, - 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0x02, 0x03 -}; - -static const uint8_t huffbits7[63] = { - 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4 +static const uint8_t atrac3_hufftabs[][2] = { + /* Spectral coefficient 1 - 9 entries */ + { 31, 1 }, { 32, 3 }, { 33, 3 }, { 34, 4 }, { 35, 4 }, + { 36, 5 }, { 37, 5 }, { 38, 5 }, { 39, 5 }, + /* Spectral coefficient 2 - 5 entries */ + { 31, 1 }, { 32, 3 }, { 30, 3 }, { 33, 3 }, { 29, 3 }, + /* Spectral coefficient 3 - 7 entries */ + { 31, 1 }, { 32, 3 }, { 30, 3 }, { 33, 4 }, + { 29, 4 }, { 34, 4 }, { 28, 4 }, + /* Spectral coefficient 4 - 9 entries */ + { 31, 1 }, { 32, 3 }, { 30, 3 }, { 33, 4 }, { 29, 4 }, + { 34, 5 }, { 28, 5 }, { 35, 5 }, { 27, 5 }, + /* Spectral coefficient 5 - 15 entries */ + { 31, 2 }, { 32, 3 }, { 30, 3 }, { 33, 4 }, { 29, 4 }, + { 34, 4 }, { 28, 4 }, { 38, 4 }, { 24, 4 }, { 35, 5 }, + { 27, 5 }, { 36, 6 }, { 26, 6 }, { 37, 6 }, { 25, 6 }, + /* Spectral coefficient 6 - 31 entries */ + { 31, 3 }, { 32, 4 }, { 30, 4 }, { 33, 4 }, { 29, 4 }, { 34, 4 }, + { 28, 4 }, { 46, 4 }, { 16, 4 }, { 35, 5 }, { 27, 5 }, { 36, 5 }, + { 26, 5 }, { 37, 5 }, { 25, 5 }, { 38, 6 }, { 24, 6 }, { 39, 6 }, + { 23, 6 }, { 40, 6 }, { 22, 6 }, { 41, 6 }, { 21, 6 }, { 42, 7 }, + { 20, 7 }, { 43, 7 }, { 19, 7 }, { 44, 7 }, { 18, 7 }, { 45, 7 }, + { 17, 7 }, + /* Spectral coefficient 7 - 63 entries */ + { 31, 3 }, { 62, 4 }, { 0, 4 }, { 32, 5 }, { 30, 5 }, { 33, 5 }, + { 29, 5 }, { 34, 5 }, { 28, 5 }, { 35, 5 }, { 27, 5 }, { 36, 5 }, + { 26, 5 }, { 37, 6 }, { 25, 6 }, { 38, 6 }, { 24, 6 }, { 39, 6 }, + { 23, 6 }, { 40, 6 }, { 22, 6 }, { 41, 6 }, { 21, 6 }, { 42, 6 }, + { 20, 6 }, { 43, 6 }, { 19, 6 }, { 44, 6 }, { 18, 6 }, { 45, 7 }, + { 17, 7 }, { 46, 7 }, { 16, 7 }, { 47, 7 }, { 15, 7 }, { 48, 7 }, + { 14, 7 }, { 49, 7 }, { 13, 7 }, { 50, 7 }, { 12, 7 }, { 51, 7 }, + { 11, 7 }, { 52, 8 }, { 10, 8 }, { 53, 8 }, { 9, 8 }, { 54, 8 }, + { 8, 8 }, { 55, 8 }, { 7, 8 }, { 56, 8 }, { 6, 8 }, { 57, 8 }, + { 5, 8 }, { 58, 8 }, { 4, 8 }, { 59, 8 }, { 3, 8 }, { 60, 8 }, + { 2, 8 }, { 61, 8 }, { 1, 8 }, }; static const uint8_t huff_tab_sizes[7] = { 9, 5, 7, 9, 15, 31, 63, }; -static const uint8_t* const huff_codes[7] = { - huffcode1, huffcode2, huffcode3, huffcode4, huffcode5, huffcode6, huffcode7 -}; - -static const uint8_t* const huff_bits[7] = { - huffbits1, huffbits2, huffbits3, huffbits4, huffbits5, huffbits6, huffbits7, -}; - /* selector tables */ static const uint8_t clc_length_tab[8] = { 0, 4, 3, 3, 4, 4, 5, 6 }; From patchwork Tue Nov 10 10:58:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23572 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 73C5244B3E8 for ; Tue, 10 Nov 2020 13:15:18 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5E6F768C0B3; Tue, 10 Nov 2020 12:59:38 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EE17768C08A for ; Tue, 10 Nov 2020 12:59:30 +0200 (EET) Received: by mail-wr1-f48.google.com with SMTP id p8so11369695wrx.5 for ; Tue, 10 Nov 2020 02:59:30 -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=p/oMjQvxdx07FZpYLcfD90CVwtTdtlHcIvAfgrtfdhg=; b=UMVc/3ibKE1mUAbB0ShB8MlbvUOdafMZ2oxrOBFHGT7iyPOyKqjViih2KEPjCmpq+P X4vN1bWn5zutGPdGIY3gfbJQN68CyIfh19XD3HvogbPVjovXtjI8IPgY+sUKl9o9ntDf TPWn2vzN7tsor/tfrwnkdg/E07J4723MVyjj15/SwI4kHmhrhIagA5C5EqLzsozcyqek or+xIGovMJ/rkfE9r+Fp7st4BX4QdUh5tyrnaeBECpQWEyR2Osg1FruR8VQroscNWZuh AUuKvxMumzKLlZN/p06EpG/ReAXnhow/UOkZyjAQELVP7U0vh8AwaDE2yyPdM/X34gvQ q8tQ== 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=p/oMjQvxdx07FZpYLcfD90CVwtTdtlHcIvAfgrtfdhg=; b=XNMRl9FLQcE6BHB6vg+r6kgM03PYe4a5UFTDbYMLDW9ZwPxQqKqmF9e4vmsEAFslmZ ajlcjCfllf6FF20Sj+L+MgAsV0NQu3PDea0olNqCBRPy3FWgk43NqsIvcb7phFMXJ9Ki Us5GKhEfObmGiZyDeZGWvX/vIWhmj/Ba6ZbXzSKkyI8MHlmD9wW1FQFv8GdyHmhgjswg /cRi8g0XyU8ke4b2izVxjhk1D4Ojylk4Sjr8DWPYNaDdrcuVWr+tMQOdTTfsjSHYjhHA SKViFZ1RVs/Eo/SvqipUjzgMpzGRyNKteb+D9SurPOecXn4+ARfoHtbrI1nmTo03cF4E P0Pw== X-Gm-Message-State: AOAM532sVt0E0ihbjNO47z1FYNVyGIePFQm0KNuxPf8uhpWQEgSencbh B1vj2vYv+2jppImhX6Z9tvIgZ8ti9mM= X-Google-Smtp-Source: ABdhPJxoYwUWUqpnQusnsP7XcQz/HLe06Y9AyH/1gOZjKxEtfJ2ORD3UBYuWm+mq3mswvS+8hnkrMg== X-Received: by 2002:adf:fd49:: with SMTP id h9mr24348346wrs.115.1605005970206; Tue, 10 Nov 2020 02:59:30 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:29 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:29 +0100 Message-Id: <20201110105836.321916-16-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 107/114] avcodec/hqx: Inline constants 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/hqx.c | 4 ++-- libavcodec/hqx.h | 1 + libavcodec/hqxvlc.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c index e2b895ac40..44c6c1883c 100644 --- a/libavcodec/hqx.c +++ b/libavcodec/hqx.c @@ -197,7 +197,7 @@ static int hqx_decode_422a(HQXContext *ctx, int slice_no, int x, int y) int i, ret; int cbp; - cbp = get_vlc2(gb, ctx->cbp_vlc.table, ctx->cbp_vlc.bits, 1); + cbp = get_vlc2(gb, ctx->cbp_vlc.table, HQX_CBP_VLC_BITS, 1); for (i = 0; i < 12; i++) memset(slice->block[i], 0, sizeof(**slice->block) * 64); @@ -283,7 +283,7 @@ static int hqx_decode_444a(HQXContext *ctx, int slice_no, int x, int y) int i, ret; int cbp; - cbp = get_vlc2(gb, ctx->cbp_vlc.table, ctx->cbp_vlc.bits, 1); + cbp = get_vlc2(gb, ctx->cbp_vlc.table, HQX_CBP_VLC_BITS, 1); for (i = 0; i < 16; i++) memset(slice->block[i], 0, sizeof(**slice->block) * 64); diff --git a/libavcodec/hqx.h b/libavcodec/hqx.h index 42d382de1f..50d60f9e03 100644 --- a/libavcodec/hqx.h +++ b/libavcodec/hqx.h @@ -77,6 +77,7 @@ typedef struct HQXContext { VLC dc_vlc[3]; } HQXContext; +#define HQX_CBP_VLC_BITS 5 #define HQX_DC_VLC_BITS 9 extern const HQXAC ff_hqx_ac[NUM_HQX_AC]; diff --git a/libavcodec/hqxvlc.c b/libavcodec/hqxvlc.c index 06a8073661..7ab2427660 100644 --- a/libavcodec/hqxvlc.c +++ b/libavcodec/hqxvlc.c @@ -2150,7 +2150,7 @@ const HQXAC ff_hqx_ac[NUM_HQX_AC] = { av_cold int ff_hqx_init_vlcs(HQXContext *ctx) { - int ret = init_vlc(&ctx->cbp_vlc, 5, FF_ARRAY_ELEMS(cbp_vlc_lens), + int ret = init_vlc(&ctx->cbp_vlc, HQX_CBP_VLC_BITS, FF_ARRAY_ELEMS(cbp_vlc_lens), cbp_vlc_lens, 1, 1, cbp_vlc_bits, 1, 1, 0); if (ret < 0) return ret; From patchwork Tue Nov 10 10:58:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23574 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 B393644B3E8 for ; Tue, 10 Nov 2020 13:15:52 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 62D5968C082; Tue, 10 Nov 2020 12:59:40 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0855268BE69 for ; Tue, 10 Nov 2020 12:59:31 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id p22so2552775wmg.3 for ; Tue, 10 Nov 2020 02:59:31 -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=NUWunh/Vuw8QnyHgizMGWl8l5Q7fVLNKXS/IPJyWBrw=; b=gButSqZbK8/jGFUVWVwZ5rdRSe04CCcJqf9FOdhGMCvYl+jGscuRpOtHkhN6peRt/T xo5VzUMnSOpFJpW5hRHkkrb0IKxIaOl2c4frjKK6fBYn26wNSFP0mqYI539pat5xd8WM vaFoPH15VcFfDR6RxNAm3yLpl2XYZol6Tbx6DGjlu9wAzSSJnDKdGe4TYKXGYxBbbvUt OKPBVoBxHJr40S5T+5GiyOtPsDi665LPiy06281W7lSyVqsoUvg17j/qRzJUaKZ8qrJG MCg9p08m5OAR7m3Tk7uhLCk1M1GhFqLZxJyUX/RZ4gce/z3MRMICQo7IP9gv3ngem/nz Y0MQ== 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=NUWunh/Vuw8QnyHgizMGWl8l5Q7fVLNKXS/IPJyWBrw=; b=lZXBGADBkqXFTLsNNoWvCaJaM7t/o9gW/gU3EhfCkzfkya4zuaPnABC8iubdNc+NSz G3dYwjmOh4mWKUxefIiOnFPAQThxVhNr/kk26Qc2ZDMtzeMo9pfBxfYiZOwpsjs6ykiE f4dTQ0IQXWRYTb/y6wjAAKsGhK1oIdI2/+YQbfEogK/kFUT6nr/CPFA68W+KunzRl+4E EAjWoT0hdyN6n7A+Dcqthc7/YtXflEbmlXB87a+RqZMrgm+9ArIAkoM40z+Ez3oWLWx7 KNue+de1K+XhE6wTL0L1pML1pFW7EOeQkn1pN3ksGLE+l9wVZnPery9GM/S3/G9bsaaf rS7Q== X-Gm-Message-State: AOAM532QppCVkC2bvW5nCVhIFxV3AuuAisJKkOYTSGuenL3b0CXaCK+L IM2jitinShAMwuHj41pJJIdpzf8Lsus= X-Google-Smtp-Source: ABdhPJwgZa01aH9vF2DJ6uWnMXBHnCsH+rJYB3T9qcFQsRINdxnO4hxbrpmy/LF3TI9/FR28LAVmZg== X-Received: by 2002:a1c:9d94:: with SMTP id g142mr4263244wme.66.1605005971348; Tue, 10 Nov 2020 02:59:31 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:30 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:30 +0100 Message-Id: <20201110105836.321916-17-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 108/114] avcodec/hqx: Don't check for errors for complete 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/hqx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c index 44c6c1883c..aa4ff22a8f 100644 --- a/libavcodec/hqx.c +++ b/libavcodec/hqx.c @@ -122,8 +122,6 @@ static int decode_block(GetBitContext *gb, VLC *vlc, memset(block, 0, 64 * sizeof(*block)); dc = get_vlc2(gb, vlc->table, HQX_DC_VLC_BITS, 2); - if (dc < 0) - return AVERROR_INVALIDDATA; *last_dc += dc; block[0] = sign_extend(*last_dc << (12 - dcb), 12); From patchwork Tue Nov 10 10:58:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23575 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 44EDC44B529 for ; Tue, 10 Nov 2020 13:16:08 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2425D68BFF2; Tue, 10 Nov 2020 12:59:41 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2841868BFDD for ; Tue, 10 Nov 2020 12:59:33 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id b8so12178945wrn.0 for ; Tue, 10 Nov 2020 02:59:33 -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=DVrNJ3JXtBHj/jatnS5QL6t8DQX23hiQrOjIQS+5gtU=; b=m2lJaNEmgu2qEBrMHRlJ1KRoVNRJhFOkGBakY919pOvZ8MwAEHZVSn/iCGwtVibX8w GuHRwygCL1BqHIn5G18rSCN6a9ZAIZlLi2/kRX2fQ0qzP+X2GqVbdCYbTQlWJnq97rwh eqPQLKJuxj7fXo7txskfZCvkcEQvmlmsRrSeOte+c2JuM/i54HyYZlUfVP3bl/dc1vSj A0ie9ateyjQlbX4ZjjLUv7VLupW7l57Lt5vig0BGP1IWSaU7BUj8e142+j5xX2MRCR43 uBJRJxmHIL2YwJCrdfZO1wMRtJTmrC4d9g4m9rE7hGzUQN0FRpJ2T8oNIkPrq5y8HDwL ttIQ== 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=DVrNJ3JXtBHj/jatnS5QL6t8DQX23hiQrOjIQS+5gtU=; b=AipoRv7bO7CvuFx5+8bv4xH5UyPhQD/gZOZjTYNJIjdpHwN96r7k1Em2ykDUWaLwih qfcKynN36NlrAHjh5SOCkVy7mbXndtK+WY/WQW1bLwAykMjBnVFs0v9+oFT6F8lRJ323 9BCj/fn95HnXIHp1XYNiaZAxkMrl3rF4yfnf4lwQCOlAjchXphVX6hgflhD+5cQCkjZm halKXlb7xY2HD+gExfEeliwMuZcs5WM6pyT6hH6DKt9e21AL2cDQABnlVXZGQpJWWNYw nKBhXy6rnfeKpzkVb43XUWQgn2NFeDmTmFmSb74yBGxXUOx6gHsfJNS1gZnDnFBNVakn YUCA== X-Gm-Message-State: AOAM530SXr9Uawt/XjoKCO4jOC/gmtS7RSvC2AcZ6dXDdl6uUN7jt3Sh 8NIQO0JkfidyJeelLbT0KQq7Pf3tGjw= X-Google-Smtp-Source: ABdhPJy99hgEUj6UxIZKcGESiGiUdBgnRKQbBSWmqQW5rggfxwH3bXfCgXAoipRiZFZfYPrVQgnp6Q== X-Received: by 2002:a5d:66c3:: with SMTP id k3mr18337640wrw.123.1605005972418; Tue, 10 Nov 2020 02:59:32 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:31 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:31 +0100 Message-Id: <20201110105836.321916-18-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 109/114] avcodec/utvideodec: Avoid implicit qsort when creating Huffman tables 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" The Huffman trees used by Ut Video have two important characteristics: (i) Longer codes are on the left of the tree and (ii) for codes of the same length, the symbol is descending from left to right in the tree. Therefore all the information that needs to be transmitted is how long the code corresponding to a given symbol is; and this is also all that is transmitted. Before 341914495e5c2f60bc920b0c6f660e5948a47f5a, the decoder used qsort to sort the (length, symbol) pairs by ascending length and for equal lengths by ascending symbol. Since said commit, the decoder uses the first pass over the lengths table to count how many symbols of each length there are; with (i) one can then easily calculate the code of the left-most code with a given length in the tree and from there one can calculate the codes for all entries, using one running counter for each possible length. This eliminated the explicit qsort in build_huff(). Yet ff_init_vlc_sparse() sorts the table itself as it has to ensure that all the entries that will be placed in the same subtable are contiguous. The tables created now are non-contiguous (they are ordered by symbol and codes of different length aren't ordered at all; only codes of the same length are ordered according to (ii)). This commit therefore modifies the algorithm used to automatically create tables whose codes are sorted from left to right in the tree. The key to do so is the observation that the counts obtained in the first pass can be used to contain the range of the codes of each length in the second pass: If counts[i] is the count of codes with length i, then the first counts[32] codes are of length 32, the next counts[31] codes are of length 31 etc. So one knows the index of the lowest symbol whose code has length 32 (if any): It is counts[32] - 1 due to (ii), whereas the index of the lowest symbol whose code has length 31 (if any) is counts[32] + counts[31] - 1; the index of the second-to-lowest symbol of length 32 (if existing) is counts[32] - 2 etc. If one follows the algorithm outlined above, one can switch to ff_init_vlc_from_lengths() which has no implicit qsort; it also means that one can offload the computation of the codes. This turned out to be beneficial for performance: For the sample from ticket #4044 it decreased the decicycles spent on one call to build_huff() from 508480 to 340688 (GCC 9.3, looping 10 times over the file to get enough runs and then repeating this ten times); for another sample; for another sample (YUV420p, natural content, 5500 frames, also ten iterations) the time went down from 382346 to 275533 decicycles. Signed-off-by: Andreas Rheinhardt --- libavcodec/utvideodec.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index 8b47c14d98..3d505ea2a3 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvideodec.c @@ -40,10 +40,15 @@ #include "thread.h" #include "utvideo.h" +typedef struct HuffEntry { + uint8_t len; + uint16_t sym; +} HuffEntry; + static int build_huff(const uint8_t *src, VLC *vlc, int *fsym, unsigned nb_elems) { int i; - uint32_t codes[1024]; + HuffEntry he[1024]; uint8_t bits[1024]; uint16_t codes_count[33] = { 0 }; @@ -64,23 +69,21 @@ static int build_huff(const uint8_t *src, VLC *vlc, int *fsym, unsigned nb_elems if (codes_count[0] == nb_elems) return AVERROR_INVALIDDATA; - for (unsigned i = 32, nb_codes = 0; i > 0; i--) { - uint16_t curr = codes_count[i]; // # of leafs of length i - codes_count[i] = nb_codes / 2; // # of non-leaf nodes on level i - nb_codes = codes_count[i] + curr; // # of nodes on level i - } + /* For Ut Video, longer codes are to the left of the tree and + * for codes with the same length the symbol is descending from + * left to right. So after the next loop --codes_count[i] will + * be the index of the first (lowest) symbol of length i when + * indexed by the position in the tree with left nodes being first. */ + for (int i = 31; i >= 0; i--) + codes_count[i] += codes_count[i + 1]; + + for (unsigned i = 0; i < nb_elems; i++) + he[--codes_count[bits[i]]] = (HuffEntry) { bits[i], i }; - for (unsigned i = nb_elems; i-- > 0;) { - if (!bits[i]) { - codes[i] = 0; - continue; - } - codes[i] = codes_count[bits[i]]++; - } #define VLC_BITS 11 - return init_vlc(vlc, VLC_BITS, nb_elems, - bits, sizeof(*bits), sizeof(*bits), - codes, sizeof(*codes), sizeof(*codes), 0); + return ff_init_vlc_from_lengths(vlc, VLC_BITS, codes_count[0], + &he[0].len, sizeof(*he), + &he[0].sym, sizeof(*he), 2, 0, 0); } static int decode_plane10(UtvideoContext *c, int plane_no, From patchwork Tue Nov 10 10:58:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23576 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 5DBB544B529 for ; Tue, 10 Nov 2020 13:16:24 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CF8A268C0CB; Tue, 10 Nov 2020 12:59:41 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C60668C09E for ; Tue, 10 Nov 2020 12:59:34 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id c9so2544954wml.5 for ; Tue, 10 Nov 2020 02:59:34 -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=C52pJRJUWmycv9jPVF98r0s1VfQfwB8vRSq446BOP9w=; b=MBtCBWx3hBjGsd1uQiVbe1x7jHoXofkYKpdXQo8Z1uYTdwQRDPkp2UJ/0yOct5LYT9 SosPNYlvQLEOiiKpdXEd7W9wzny2rYTe+ja+T27hk06njosdrYcFLIkGmx+pxcLf5fQs +yi9Bt9gE06UAik3jIoGZFs+Aw3sKeZYWg4smbFLuO5hIg9uTY7Xbcmj7uH+X5eSzuaZ RYkF+JRFkBiNWUnlqPVmbi10Nw+ne6lPgl80QnxSZ+9gafpqAVQQ704P3+U030EIgpxs Jcm/pTMm+zRmDJdwa9KsomdDgEHYZPk3vFrlYlBAXP8heaakOVDIcPLAPrqbptBXAK/o OkyA== 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=C52pJRJUWmycv9jPVF98r0s1VfQfwB8vRSq446BOP9w=; b=tW/VxHVuBNUiweeKmCkrg96UcjNT/zJ+ejikjckrqYE/FLI9PwVkrHqETkkNTMcd3+ qW621ZCCMVpzwVu+M82YJSLjdFBkKiavSxYtr2ktICz/mv8yO+z0jhe0bs1/tSJpq2qb jdgw58VJAqUfMlNYwORQpiyXd03eBDjJNkUVLFsgWEcayxwB7gvUiD/mdtjvVaCFgWol mvKUS8HMG98EIinbSy/Sf9qnEwY+xS7kP/6NhPU3u0jyYD+nMm7ya5C/2aCUYL2CT39J kzvIJ5u2bbaiIi7N9ReBt/qqJPZYJoibWMKymmX8mEW7qwwXI6w+jGB7k2o7zg0+XPNd bTEQ== X-Gm-Message-State: AOAM533DNVygKpZcXOEQ/zB+9pIvnohtn7j0LJV9w3foza58IOMB4RxY TsXJRXgcyQloIx4Mk6ogwn9E9lCvysk= X-Google-Smtp-Source: ABdhPJxhbG0TqXldW8DZV0vZCTNw5ByfwYESl4mV58lk1IROieixcL6HTTB5j1H1y3F/BXdeKKIEUA== X-Received: by 2002:a1c:3803:: with SMTP id f3mr4029281wma.14.1605005973360; Tue, 10 Nov 2020 02:59:33 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:32 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:32 +0100 Message-Id: <20201110105836.321916-19-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 110/114] avcodec/magicyuv: Optimize creating Huffman tables 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" MagicYUV transmits its Huffman trees by providing the length of the code corresponding to each symbol; then the decoder has to assemble the table in such a way that (i) longer codes are to the left of the tree and (ii) for codes of the same length the symbols are ascending from left to right. Up until now the decoder did this as follows: It counted the number of codes of each length and derived the first code of a given length via (ii). Then the array of lengths is traversed a second time to create the codes; there is one running counter for each length to do so. This process creates a default symbol table (that is omitted). This commit changes this as follows: Everything is indexed by the position in the tree (with codes to the left first); given (i), we can calculate the ranges occupied by the codes of each length; and with (ii) we can derive the actual symbols of each code; the running counters for each length are now used for the symbols and not for the codes. Doing so allows us to switch to ff_init_vlc_from_lengths(); this has the advantage that the codes table needs only be traversed once and that the codes need not be sorted any more (right now, the codes that are so long that they will be put into subtables need to be sorted so that codes that end up in the same subtable are contiguous). For a sample produced by our encoder (natural content, 4000 frames, YUV420p, ten iterations, GCC 9.3) this decreased the amount of decicycles for each call to build_huffman() from 1336049 to 1309401. Notice that our encoder restricts the code lengths to 12 and our decoder only uses subtables when the code is longer than 12 bits, so the sorting that can be avoided does not happen at the moment. If one reduces the decoder's tables to nine bits, the performance improvement becomes more apparent: The amount of decicycles for build_huffman() decreased from 1165210 to 654055. Signed-off-by: Andreas Rheinhardt --- libavcodec/magicyuv.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/libavcodec/magicyuv.c b/libavcodec/magicyuv.c index c7e2754c44..83bf14ae3a 100644 --- a/libavcodec/magicyuv.c +++ b/libavcodec/magicyuv.c @@ -47,7 +47,7 @@ typedef enum Prediction { typedef struct HuffEntry { uint8_t len; - uint16_t code; + uint16_t sym; } HuffEntry; typedef struct MagicYUVContext { @@ -72,27 +72,22 @@ typedef struct MagicYUVContext { LLVidDSPContext llviddsp; } MagicYUVContext; -static int huff_build(HuffEntry he[], uint16_t codes_count[33], +static int huff_build(const uint8_t len[], uint16_t codes_pos[33], VLC *vlc, int nb_elems) { - unsigned nb_codes = 0, max = 0; - - for (int i = 32; i > 0; i--) { - uint16_t curr = codes_count[i]; // # of leafs of length i - codes_count[i] = nb_codes / 2; // # of non-leaf nodes on level i - nb_codes = codes_count[i] + curr; // # of nodes on level i - if (curr && !max) - max = i; - } + HuffEntry he[4096]; + + for (int i = 31; i > 0; i--) + codes_pos[i] += codes_pos[i + 1]; + + for (unsigned i = nb_elems; i-- > 0;) + he[--codes_pos[len[i]]] = (HuffEntry){ len[i], i }; - for (unsigned i = 0; i < nb_elems; i++) { - he[i].code = codes_count[he[i].len]; - codes_count[he[i].len]++; - } ff_free_vlc(vlc); - return init_vlc(vlc, FFMIN(max, 12), nb_elems, - &he[0].len, sizeof(he[0]), sizeof(he[0].len), - &he[0].code, sizeof(he[0]), sizeof(he[0].code), 0); + return ff_init_vlc_from_lengths(vlc, FFMIN(he[0].len, 12), nb_elems, + &he[0].len, sizeof(he[0]), + &he[0].sym, sizeof(he[0]), sizeof(he[0].sym), + 0, 0); } static void magicyuv_median_pred16(uint16_t *dst, const uint16_t *src1, @@ -384,7 +379,7 @@ static int build_huffman(AVCodecContext *avctx, const uint8_t *table, { MagicYUVContext *s = avctx->priv_data; GetByteContext gb; - HuffEntry he[4096]; + uint8_t len[4096]; uint16_t length_count[33] = { 0 }; int i = 0, j = 0, k; @@ -408,11 +403,11 @@ static int build_huffman(AVCodecContext *avctx, const uint8_t *table, length_count[x] += l; for (; j < k; j++) - he[j].len = x; + len[j] = x; if (j == max) { j = 0; - if (huff_build(he, length_count, &s->vlc[i], max)) { + if (huff_build(len, length_count, &s->vlc[i], max)) { av_log(avctx, AV_LOG_ERROR, "Cannot build Huffman codes\n"); return AVERROR_INVALIDDATA; } From patchwork Tue Nov 10 10:58:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23577 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 DAB9744B529 for ; Tue, 10 Nov 2020 13:16:39 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A722568C0CD; Tue, 10 Nov 2020 12:59:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E5A8168C0AC for ; Tue, 10 Nov 2020 12:59:34 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id d12so10664779wrr.13 for ; Tue, 10 Nov 2020 02:59:34 -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=X1NJ13m65STiu+wnUEc83y9aMTCjbu88EoCQPgM2Loc=; b=XovyF69CXO3iJBCTrhwC40Wk3UHEZ4vlXT4MAbn9Ce7Fud5Kx1ymWHVpFcK82V7cgp 4Crn0N07bjIj7mPpwHvkMXJp/tJLaoFzoDWf8zwBect1GYoDHGEuJr/BKaQP8jtoupfR iaTIko3O2AeB2QxuAghmQyc2iFHtNtlwTmwvFJtrCn0lPFqFC4obA2GqopF3YwowhQjN CHOs08pBXqv6MiuzbYtqzwPrOtuVzwEM8iw+QeN9zu83YGlczjR3+1mVeBSTSen8A2eh duoruXTSAWn5O54UrR1Z4iwDzoNFjPRQBAh/sDP4DIKvdOXZPSiWLGTGU/nO3vp5Sipi KoSg== 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=X1NJ13m65STiu+wnUEc83y9aMTCjbu88EoCQPgM2Loc=; b=OgSIXZR5TsP/tsnfN5JtJzTXgEtWAAzYiynbJO/2m5RiORAx69d6eG05KXT2N6NyD7 52dKOvEu+1FToBw3oiFZexgXO3HMiBTshHFGpt45BHDc4lZWOlRyXaerkQrYVn1HdWoY /EySAkb5VsVG7kBr1q5AsKQzI7bBaWpAqOFMveHPgEP78Nb1Ci5YY23/Lktta8v5AwCf lR3PcKAyRLESdU6HCGqmZfW6PNOB/8VUE+8fkf5ETITfw/lL3o2Y6N6uj8rk04C03Xwp 2ww+YvOnYOu0+h3EngluwPNGOsRHvtLIaCRQUen3z7/0nFL1iilso9YVrILrZ9XV6bLR CAeA== X-Gm-Message-State: AOAM532DEada4CVKk9BIM/NS60RYU/5fg5PWcGw/7j0EBBy/npdFoTM9 vNfuQCOhTj8JFqsZkjW1vvaUZoHSjM0= X-Google-Smtp-Source: ABdhPJzuv4Wa7h8oFvSEbGQOKSAgvZTretVcrQrnZiG0QDjIber1SJXA/mcY5kWiTLfQZ704tPOGyA== X-Received: by 2002:a5d:474f:: with SMTP id o15mr23267638wrs.100.1605005974314; Tue, 10 Nov 2020 02:59:34 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:33 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:33 +0100 Message-Id: <20201110105836.321916-20-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 111/114] avcodec/qdmc: Don't check for errors for complete 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/qdmc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c index ff1cc86c6b..f4e507fa60 100644 --- a/libavcodec/qdmc.c +++ b/libavcodec/qdmc.c @@ -370,8 +370,6 @@ static int qdmc_get_vlc(GetBitContext *gb, VLC *table, int flag) if (get_bits_left(gb) < 1) return AVERROR_INVALIDDATA; v = get_vlc2(gb, table->table, table->bits, 2); - if (v < 0) - return AVERROR_INVALIDDATA; if (v) v = v - 1; else From patchwork Tue Nov 10 10:58:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23578 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 D8B7644B529 for ; Tue, 10 Nov 2020 13:16:53 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8E19368C0D5; Tue, 10 Nov 2020 12:59:43 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 11DC868BFF6 for ; Tue, 10 Nov 2020 12:59:36 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id c17so12171184wrc.11 for ; Tue, 10 Nov 2020 02:59:36 -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=slfBDbBID+hZkmigRqplltMYvGPET1v/OnCz2Fw3O4A=; b=llh7MZQJFB1yqTkGd5SMqaE8X3d77YL7+1zi719uFsBEtKgo91gekJDkknHjbCzDCj hgOdUJvsRGKZIH4V/HIvP3Qu04tTajr+3qGV0aWi4VwYSXl5BJP3dmOpME3DksousQXl lJaD3elTSvGhlHy698NENXydBDyeVO8B7dCJunSBJb2ciTgLq0xHM4Gz3twFQbZk6Woj MpMl4Bvak/6W4c89FqtjAq8EYQkNspUui1Iy1bh5zphVq8N4uXEvRtJPnnTPnjsIZN9Q w4Pdgg1tHOlRPexN+CulbbJNDKcPRXEN4rgmvedT587r+l8fYgAPrfMJLWqFDPYH9jtc UdEQ== 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=slfBDbBID+hZkmigRqplltMYvGPET1v/OnCz2Fw3O4A=; b=KyjAnNZ/3uj8CHLwgv9R/hlpI1FoieLcYpg8CuBe9TjNxiahMyiD2ohKNeM0UEae4B zdD7dgrMaHRJEbSBQrIvNtzJJwwAfznyv/rY2zExbLDFwEtA5eaO5wqLa2GSglCXaJjA nS4SiYUMFRi5PvvyKzbonzTAJ/dpZYXpO7z2cC5EwjRY7LWSQV0f6Z4wPcC+gLf5YugD 7iEYJ9JYEoxMCokaaxVH0D4XdwADnkjzJAJt6gR2wx2BfKdRqDZInkS6kXETplRBeSu/ aZ7npQMvcXdRi7Jj1RlmGMIRb8v4T5GhcsX8qmbtp+Z8+OGFW6oyYRe+4wDXwZteN5FQ 9foQ== X-Gm-Message-State: AOAM530h2eP87Q5CZGZ28js/eLzOZrdHCiryMr1MO9JWXRwLb8Vu7TWt 3DOah/td21+ygAZSyHmXoiRvMVrysMQ= X-Google-Smtp-Source: ABdhPJwr4xv9IXvFU/BZaPVBw+M7AoFyD8yVirmjj3JZJ4qGRTwpfpL2eM1UN+2t0NSUkwFi/QfaOA== X-Received: by 2002:a5d:6a0b:: with SMTP id m11mr7229145wru.190.1605005975209; Tue, 10 Nov 2020 02:59:35 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:34 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:34 +0100 Message-Id: <20201110105836.321916-21-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 112/114] avcodec/qdmc: Make tables used to initialize VLCs smaller 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" This is possible by switching to ff_init_vlc_from_lengths() which allows to replace tables of codes of size uint16_t or uint32_t by tables of symbols of size uint8_t; in case there already were symbols tables the savings are even bigger. Signed-off-by: Andreas Rheinhardt --- libavcodec/qdmc.c | 91 +++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 55 deletions(-) diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c index f4e507fa60..8b50fbf30a 100644 --- a/libavcodec/qdmc.c +++ b/libavcodec/qdmc.c @@ -119,58 +119,36 @@ static const uint8_t noise_bands_selector[] = { 4, 3, 2, 1, 0, 0, 0, }; -static const uint8_t noise_value_bits[] = { - 12, 7, 9, 7, 10, 9, 11, 9, 9, 2, 9, 9, 9, 9, - 9, 3, 9, 10, 10, 12, 2, 3, 3, 5, 5, 6, 7, +static const uint8_t noise_value[][2] = { + { 1, 2 }, { 10, 7 }, { 26, 9 }, { 22, 9 }, { 24, 9 }, { 14, 9 }, + { 8, 6 }, { 6, 5 }, { 7, 5 }, { 9, 7 }, { 30, 9 }, { 32, 10 }, + { 13, 10 }, { 20, 9 }, { 28, 9 }, { 12, 7 }, { 15, 11 }, { 36, 12 }, + { 0, 12 }, { 34, 10 }, { 18, 9 }, { 11, 9 }, { 16, 9 }, { 5, 3 }, + { 2, 3 }, { 4, 3 }, { 3, 2 }, }; -static const uint8_t noise_value_symbols[] = { - 0, 10, 11, 12, 13, 14, 15, 16, 18, 1, 20, 22, 24, - 26, 28, 2, 30, 32, 34, 36, 3, 4, 5, 6, 7, 8, 9, +static const uint8_t noise_segment_length[][2] = { + { 1, 1 }, { 2, 2 }, { 3, 4 }, { 8, 9 }, { 9, 10 }, { 0, 10 }, + { 13, 8 }, { 7, 7 }, { 6, 6 }, { 17, 5 }, { 4, 4 }, { 5, 4 }, }; -static const uint16_t noise_value_codes[] = { - 0xC7A, 0x002, 0x0FA, 0x03A, 0x35A, 0x1C2, 0x07A, 0x1FA, - 0x17A, 0x000, 0x0DA, 0x142, 0x0C2, 0x042, 0x1DA, 0x001, - 0x05A, 0x15A, 0x27A, 0x47A, 0x003, 0x005, 0x006, 0x012, - 0x00A, 0x022, 0x01A, +static const uint8_t amplitude[][2] = { + { 18, 3 }, { 16, 3 }, { 22, 7 }, { 8, 10 }, { 4, 10 }, { 3, 9 }, + { 2, 8 }, { 23, 8 }, { 10, 8 }, { 11, 7 }, { 21, 5 }, { 20, 4 }, + { 1, 7 }, { 7, 10 }, { 5, 10 }, { 9, 9 }, { 6, 10 }, { 25, 11 }, + { 26, 12 }, { 27, 13 }, { 0, 13 }, { 24, 9 }, { 12, 6 }, { 13, 5 }, + { 14, 4 }, { 19, 3 }, { 15, 3 }, { 17, 2 }, }; -static const uint8_t noise_segment_length_bits[] = { - 10, 8, 5, 1, 2, 4, 4, 4, 6, 7, 9, 10, -}; - -static const uint8_t noise_segment_length_symbols[] = { - 0, 13, 17, 1, 2, 3, 4, 5, 6, 7, 8, 9, -}; - -static const uint16_t noise_segment_length_codes[] = { - 0x30B, 0x8B, 0x1B, 0x0, 0x1, 0x3, 0x7, 0xF, 0x2b, 0x4B, 0xB, 0x10B, -}; - -static const uint8_t freq_diff_bits[] = { - 18, 2, 4, 4, 5, 4, 4, 5, 5, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 6, - 7, 6, 6, 6, 7, 7, 7, 7, 7, 8, 9, 9, 8, 9, 11, 11, 12, 12, 13, 12, - 14, 15, 18, 16, 17, -}; - -static const uint32_t freq_diff_codes[] = { - 0x2AD46, 0x1, 0x0, 0x3, 0xC, 0xA, 0x7, 0x18, 0x12, 0xE, 0x4, 0x16, - 0xF, 0x1C, 0x8, 0x22, 0x26, 0x2, 0x3B, 0x34, 0x74, 0x1F, 0x14, 0x2B, - 0x1B, 0x3F, 0x28, 0x54, 0x6, 0x4B, 0xB, 0x68, 0xE8, 0x46, 0xC6, 0x1E8, - 0x146, 0x346, 0x546, 0x746, 0x1D46, 0xF46, 0xD46, 0x6D46, 0xAD46, 0x2D46, - 0x1AD46, -}; - -static const uint8_t amplitude_bits[] = { - 13, 7, 8, 9, 10, 10, 10, 10, 10, 9, 8, 7, 6, - 5, 4, 3, 3, 2, 3, 3, 4, 5, 7, 8, 9, 11, 12, 13, -}; - -static const uint16_t amplitude_codes[] = { - 0x1EC6, 0x6, 0xC2, 0x142, 0x242, 0x246, 0xC6, 0x46, 0x42, 0x146, 0xA2, - 0x62, 0x26, 0x16, 0xE, 0x5, 0x4, 0x3, 0x0, 0x1, 0xA, 0x12, 0x2, 0x22, - 0x1C6, 0x2C6, 0x6C6, 0xEC6, +static const uint8_t freq_diff[][2] = { + { 2, 4 }, { 14, 6 }, { 26, 7 }, { 31, 8 }, { 32, 9 }, { 35, 9 }, + { 7, 5 }, { 10, 5 }, { 22, 7 }, { 27, 7 }, { 19, 7 }, { 20, 7 }, + { 4, 5 }, { 13, 5 }, { 17, 6 }, { 15, 6 }, { 8, 5 }, { 5, 4 }, + { 28, 7 }, { 33, 9 }, { 36, 11 }, { 38, 12 }, { 42, 14 }, { 45, 16 }, + { 44, 18 }, { 0, 18 }, { 46, 17 }, { 43, 15 }, { 40, 13 }, { 37, 11 }, + { 39, 12 }, { 41, 12 }, { 34, 8 }, { 16, 6 }, { 11, 5 }, { 9, 4 }, + { 1, 2 }, { 3, 4 }, { 30, 7 }, { 29, 7 }, { 23, 6 }, { 24, 6 }, + { 18, 6 }, { 6, 4 }, { 12, 5 }, { 21, 6 }, { 25, 6 }, }; static const uint8_t amplitude_diff_bits[] = { @@ -209,15 +187,18 @@ static av_cold void qdmc_init_static_data(void) { int i; - INIT_VLC_STATIC_LE(&vtable[0], 12, FF_ARRAY_ELEMS(noise_value_bits), - noise_value_bits, 1, 1, noise_value_codes, 2, 2, noise_value_symbols, 1, 1, 4096); - INIT_VLC_STATIC_LE(&vtable[1], 10, FF_ARRAY_ELEMS(noise_segment_length_bits), - noise_segment_length_bits, 1, 1, noise_segment_length_codes, 2, 2, - noise_segment_length_symbols, 1, 1, 1024); - INIT_VLC_STATIC_LE(&vtable[2], 12, FF_ARRAY_ELEMS(amplitude_bits), - amplitude_bits, 1, 1, amplitude_codes, 2, 2, NULL, 0, 0, 4098); - INIT_VLC_STATIC_LE(&vtable[3], 12, FF_ARRAY_ELEMS(freq_diff_bits), - freq_diff_bits, 1, 1, freq_diff_codes, 4, 4, NULL, 0, 0, 4160); + INIT_VLC_STATIC_FROM_LENGTHS(&vtable[0], 12, FF_ARRAY_ELEMS(noise_value), + &noise_value[0][1], 2, + &noise_value[0][0], 2, 1, 0, INIT_VLC_LE, 4096); + INIT_VLC_STATIC_FROM_LENGTHS(&vtable[1], 10, FF_ARRAY_ELEMS(noise_segment_length), + &noise_segment_length[0][1], 2, + &noise_segment_length[0][0], 2, 1, 0, INIT_VLC_LE, 1024); + INIT_VLC_STATIC_FROM_LENGTHS(&vtable[2], 12, FF_ARRAY_ELEMS(amplitude), + &litude[0][1], 2, + &litude[0][0], 2, 1, 0, INIT_VLC_LE, 4098); + INIT_VLC_STATIC_FROM_LENGTHS(&vtable[3], 12, FF_ARRAY_ELEMS(freq_diff), + &freq_diff[0][1], 2, + &freq_diff[0][0], 2, 1, 0, INIT_VLC_LE, 4160); INIT_VLC_STATIC_LE(&vtable[4], 8, FF_ARRAY_ELEMS(amplitude_diff_bits), amplitude_diff_bits, 1, 1, amplitude_diff_codes, 1, 1, NULL, 0, 0, 256); INIT_VLC_STATIC_LE(&vtable[5], 6, FF_ARRAY_ELEMS(phase_diff_bits), From patchwork Tue Nov 10 10:58:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23579 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 68C794498CF for ; Tue, 10 Nov 2020 13:17:08 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7FA4B68C08A; Tue, 10 Nov 2020 12:59:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E7B4168C0B2 for ; Tue, 10 Nov 2020 12:59:36 +0200 (EET) Received: by mail-wm1-f67.google.com with SMTP id s13so2553950wmh.4 for ; Tue, 10 Nov 2020 02:59:36 -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=9eIYFmpUyQ6Ix4KgJ7cpCFKR2v3Dfk4bdgr4NZdU9Gg=; b=R4KbnaEC+FAZXgBVTI6bURsif4tN7Op76BxeLAzFOAFg88XUoIwMKg1tOWiP/UoN3D D4H0Z/83Ppr4+Wk4Cmo4zA9jrSXjrl6o08jNeJ22faka9aSrReocl14AI+El6Um6SquD 0+rLtSr3zxd126dllm51qlhdR3a1yhMRSMV++0V+AMsRc+pc6If70W3F5wlg4TGBglGo LStbkMfEpSQwEy5ExYaAJs9SmuM6V5bqUz4cZ20c8u7LBEBSIZLJ5xTmPtf9N3OmahjZ 0xVVnAwTNbk84FsjJ9wrQAr7ANYzS8UA3UnJPRP725PQ1xsTWdhrKWw2Z6L7SkQwWdcj CiPw== 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=9eIYFmpUyQ6Ix4KgJ7cpCFKR2v3Dfk4bdgr4NZdU9Gg=; b=RzB5QFEU2x07jNc5RNIt9i4zEg8CE2wbRx/sO2tvXfmMEj/ApMuBYZ8B1LCDdaLEvE vqSG8SsJGvjVDDzNAgPpXlF/NdF8s7MNX4E+1nv4p/ds0s7M8JI1rlN9v2IKRXLoD0NO sVXXkeW2spA4K6b4dxnf41bFrdV8JkZKg6iYUxG9V8TbZKZvxEcImPOoZUdCmxovrQrK VeQBTDBC83VHfOewfGVXdaqZFWftj/Sc4kxuZ4H8rW1zOaQKtYd3JQZCqs2jOiyi1gT7 3lZUvRjklFEAKaHzwEb5xFFFexSfRDCLaRM/48TkVQil/70IpJEMshYJPCl/xyYK5Gas OVEg== X-Gm-Message-State: AOAM530vdFMA3A7EO1h3cBq7+Cqjz3Edi/iWE41V5YdgDSg5kuLxGuop RHmIc3k1VH6MT0S/IFtvfsZE67kCdaY= X-Google-Smtp-Source: ABdhPJwjBDlN3NPtIgcGfI3rMOVE1Y9yoa/rQA3KeQIymZFYRXNEklwGIepM/Iouvul+mde/TcPCVw== X-Received: by 2002:a1c:bbc4:: with SMTP id l187mr4324274wmf.133.1605005976071; Tue, 10 Nov 2020 02:59:36 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:35 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:35 +0100 Message-Id: <20201110105836.321916-22-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 113/114] avcodec/qdmc: Apply offset when creating VLC 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/qdmc.c | 56 ++++++++++++++--------------------------------- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c index 8b50fbf30a..2c870fcc1b 100644 --- a/libavcodec/qdmc.c +++ b/libavcodec/qdmc.c @@ -151,58 +151,38 @@ static const uint8_t freq_diff[][2] = { { 18, 6 }, { 6, 4 }, { 12, 5 }, { 21, 6 }, { 25, 6 }, }; -static const uint8_t amplitude_diff_bits[] = { - 8, 2, 1, 3, 4, 5, 6, 7, 8, +static const uint8_t amplitude_diff[][2] = { + { 1, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 }, { 6, 6 }, { 7, 7 }, + { 8, 8 }, { 0, 8 }, { 2, 1 }, }; -static const uint8_t amplitude_diff_codes[] = { - 0xFE, 0x0, 0x1, 0x2, 0x6, 0xE, 0x1E, 0x3E, 0x7E, +static const uint8_t phase_diff[][2] = { + { 2, 2 }, { 1, 2 }, { 3, 4 }, { 7, 4 }, { 6, 5 }, { 5, 6 }, + { 0, 6 }, { 4, 4 }, { 8, 2 }, }; -static const uint8_t phase_diff_bits[] = { - 6, 2, 2, 4, 4, 6, 5, 4, 2, -}; - -static const uint8_t phase_diff_codes[] = { - 0x35, 0x2, 0x0, 0x1, 0xD, 0x15, 0x5, 0x9, 0x3, -}; - -#define INIT_VLC_STATIC_LE(vlc, nb_bits, nb_codes, \ - bits, bits_wrap, bits_size, \ - codes, codes_wrap, codes_size, \ - symbols, symbols_wrap, symbols_size, \ - static_size) \ - do { \ - static VLC_TYPE table[static_size][2]; \ - (vlc)->table = table; \ - (vlc)->table_allocated = static_size; \ - ff_init_vlc_sparse(vlc, nb_bits, nb_codes, \ - bits, bits_wrap, bits_size, \ - codes, codes_wrap, codes_size, \ - symbols, symbols_wrap, symbols_size, \ - INIT_VLC_LE | INIT_VLC_USE_NEW_STATIC); \ - } while (0) - static av_cold void qdmc_init_static_data(void) { int i; INIT_VLC_STATIC_FROM_LENGTHS(&vtable[0], 12, FF_ARRAY_ELEMS(noise_value), &noise_value[0][1], 2, - &noise_value[0][0], 2, 1, 0, INIT_VLC_LE, 4096); + &noise_value[0][0], 2, 1, -1, INIT_VLC_LE, 4096); INIT_VLC_STATIC_FROM_LENGTHS(&vtable[1], 10, FF_ARRAY_ELEMS(noise_segment_length), &noise_segment_length[0][1], 2, - &noise_segment_length[0][0], 2, 1, 0, INIT_VLC_LE, 1024); + &noise_segment_length[0][0], 2, 1, -1, INIT_VLC_LE, 1024); INIT_VLC_STATIC_FROM_LENGTHS(&vtable[2], 12, FF_ARRAY_ELEMS(amplitude), &litude[0][1], 2, - &litude[0][0], 2, 1, 0, INIT_VLC_LE, 4098); + &litude[0][0], 2, 1, -1, INIT_VLC_LE, 4098); INIT_VLC_STATIC_FROM_LENGTHS(&vtable[3], 12, FF_ARRAY_ELEMS(freq_diff), &freq_diff[0][1], 2, - &freq_diff[0][0], 2, 1, 0, INIT_VLC_LE, 4160); - INIT_VLC_STATIC_LE(&vtable[4], 8, FF_ARRAY_ELEMS(amplitude_diff_bits), - amplitude_diff_bits, 1, 1, amplitude_diff_codes, 1, 1, NULL, 0, 0, 256); - INIT_VLC_STATIC_LE(&vtable[5], 6, FF_ARRAY_ELEMS(phase_diff_bits), - phase_diff_bits, 1, 1, phase_diff_codes, 1, 1, NULL, 0, 0, 64); + &freq_diff[0][0], 2, 1, -1, INIT_VLC_LE, 4160); + INIT_VLC_STATIC_FROM_LENGTHS(&vtable[4], 8, FF_ARRAY_ELEMS(amplitude_diff), + &litude_diff[0][1], 2, + &litude_diff[0][0], 2, 1, -1, INIT_VLC_LE, 256); + INIT_VLC_STATIC_FROM_LENGTHS(&vtable[5], 6, FF_ARRAY_ELEMS(phase_diff), + &phase_diff[0][1], 2, + &phase_diff[0][0], 2, 1, -1, INIT_VLC_LE, 64); for (i = 0; i < 512; i++) sin_table[i] = sin(2.0f * i * M_PI * 0.001953125f); @@ -351,9 +331,7 @@ static int qdmc_get_vlc(GetBitContext *gb, VLC *table, int flag) if (get_bits_left(gb) < 1) return AVERROR_INVALIDDATA; v = get_vlc2(gb, table->table, table->bits, 2); - if (v) - v = v - 1; - else + if (v < 0) v = get_bits(gb, get_bits(gb, 3) + 1); if (flag) { From patchwork Tue Nov 10 10:58: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: 23580 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 47D634498CF for ; Tue, 10 Nov 2020 13:17:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3125968C0DB; Tue, 10 Nov 2020 12:59:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C4AA168C0BB for ; Tue, 10 Nov 2020 12:59:37 +0200 (EET) Received: by mail-wr1-f48.google.com with SMTP id c17so12171284wrc.11 for ; Tue, 10 Nov 2020 02:59:37 -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=S59SQ5W9MrazHvjhRifH0nm66H1HvS39zbFWhrjNn/o=; b=sdppSMaJu9SzsYTSegCK3vcpOdJS3vgfNj+fbADVC2q5XDmPiJbntx3AihUAaOAmMb b3tu2Ydilr5XObZb+GPemHKFiJtZf1MAE1JYSPowGwLocZZj9FINa6Hasv087FgFs4cL wzhjHxfkqRz1shGM0Co4AEhlYnK5a3tow18YjTNfiZRfk7CZUd+3AFzohAmoeXUVDhAT D+h1XQ/4DDfNfxAT6V6oaNKc7/OiS3eMkKNWNB+RD2O1UfDVQZo+uXOSRh1DbewI+ltD CzpuTWjbyrz3pm/7VpwZcI+KNXwFT3/75hOXGamraa4JwXNaEqfUi44dKpoSXsrcB4aH HDJw== 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=S59SQ5W9MrazHvjhRifH0nm66H1HvS39zbFWhrjNn/o=; b=RPNy9D5uaPr/dMP56BDUpUXmcoXeJIgOzbeJoAjmiRyjftgcIneLC8Sr1/uSJBM2n5 qOAibe/vQ/FDbx9PCQN681BmJ2CajWxPdqYNZ8GW8zufKi7gGy6sOeWeu0Q8v0bjDjRu yNkOhOXz0V5psT1wOPJfo75ojo/ZUD/FkNTm07vh0Ydyt3T60Dwqfmjuyh0e9SYISHI9 VX+bXnYh3pwXSfrdfF7ORosVPasDMjtAAQzPrz/5FHcM4RU0qpbGuZ9wUiznbFhajOv3 NmMcSiLtkJ2Y/aGezGokh7BU5SmOlmnSDKWeSyn5iqn+RtDXU9N91a7mNuuxLS1txeEt VkyA== X-Gm-Message-State: AOAM531lWxJoSWSXkbnUSZKplvnc98Hv+TZpVyw6OhgLM5jrahjW9Pj1 ierzb4GNJ7RARaLqedlaj2HfKUNutvc= X-Google-Smtp-Source: ABdhPJwhNiMTblbPj9b9lEk3q2OHUYBey5hOQCm21zofT5s0M8ldGoP8MvAYwvbUb1uD0jSCzOBrwg== X-Received: by 2002:adf:ed11:: with SMTP id a17mr8531685wro.197.1605005976944; Tue, 10 Nov 2020 02:59:36 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o197sm2561308wme.17.2020.11.10.02.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 02:59:36 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Nov 2020 11:58:36 +0100 Message-Id: <20201110105836.321916-23-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> References: <20201110104851.321029-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 114/114] avcodec/qdmc: Avoid code duplication when initializing VLC 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/qdmc.c | 60 ++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c index 2c870fcc1b..5aa13d8e8e 100644 --- a/libavcodec/qdmc.c +++ b/libavcodec/qdmc.c @@ -119,28 +119,23 @@ static const uint8_t noise_bands_selector[] = { 4, 3, 2, 1, 0, 0, 0, }; -static const uint8_t noise_value[][2] = { +static const uint8_t qdmc_hufftab[][2] = { + /* Noise value - 27 entries */ { 1, 2 }, { 10, 7 }, { 26, 9 }, { 22, 9 }, { 24, 9 }, { 14, 9 }, { 8, 6 }, { 6, 5 }, { 7, 5 }, { 9, 7 }, { 30, 9 }, { 32, 10 }, { 13, 10 }, { 20, 9 }, { 28, 9 }, { 12, 7 }, { 15, 11 }, { 36, 12 }, { 0, 12 }, { 34, 10 }, { 18, 9 }, { 11, 9 }, { 16, 9 }, { 5, 3 }, { 2, 3 }, { 4, 3 }, { 3, 2 }, -}; - -static const uint8_t noise_segment_length[][2] = { + /* Noise segment length - 12 entries */ { 1, 1 }, { 2, 2 }, { 3, 4 }, { 8, 9 }, { 9, 10 }, { 0, 10 }, { 13, 8 }, { 7, 7 }, { 6, 6 }, { 17, 5 }, { 4, 4 }, { 5, 4 }, -}; - -static const uint8_t amplitude[][2] = { + /* Amplitude - 28 entries */ { 18, 3 }, { 16, 3 }, { 22, 7 }, { 8, 10 }, { 4, 10 }, { 3, 9 }, { 2, 8 }, { 23, 8 }, { 10, 8 }, { 11, 7 }, { 21, 5 }, { 20, 4 }, { 1, 7 }, { 7, 10 }, { 5, 10 }, { 9, 9 }, { 6, 10 }, { 25, 11 }, { 26, 12 }, { 27, 13 }, { 0, 13 }, { 24, 9 }, { 12, 6 }, { 13, 5 }, { 14, 4 }, { 19, 3 }, { 15, 3 }, { 17, 2 }, -}; - -static const uint8_t freq_diff[][2] = { + /* Frequency differences - 47 entries */ { 2, 4 }, { 14, 6 }, { 26, 7 }, { 31, 8 }, { 32, 9 }, { 35, 9 }, { 7, 5 }, { 10, 5 }, { 22, 7 }, { 27, 7 }, { 19, 7 }, { 20, 7 }, { 4, 5 }, { 13, 5 }, { 17, 6 }, { 15, 6 }, { 8, 5 }, { 5, 4 }, @@ -149,40 +144,37 @@ static const uint8_t freq_diff[][2] = { { 39, 12 }, { 41, 12 }, { 34, 8 }, { 16, 6 }, { 11, 5 }, { 9, 4 }, { 1, 2 }, { 3, 4 }, { 30, 7 }, { 29, 7 }, { 23, 6 }, { 24, 6 }, { 18, 6 }, { 6, 4 }, { 12, 5 }, { 21, 6 }, { 25, 6 }, -}; - -static const uint8_t amplitude_diff[][2] = { + /* Amplitude differences - 9 entries */ { 1, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 }, { 6, 6 }, { 7, 7 }, { 8, 8 }, { 0, 8 }, { 2, 1 }, -}; - -static const uint8_t phase_diff[][2] = { + /* Phase differences - 9 entries */ { 2, 2 }, { 1, 2 }, { 3, 4 }, { 7, 4 }, { 6, 5 }, { 5, 6 }, { 0, 6 }, { 4, 4 }, { 8, 2 }, }; +static const uint8_t huff_sizes[] = { + 27, 12, 28, 47, 9, 9 +}; + +static const uint8_t huff_bits[] = { + 12, 10, 12, 12, 8, 6 +}; + static av_cold void qdmc_init_static_data(void) { + const uint8_t (*hufftab)[2] = qdmc_hufftab; int i; - INIT_VLC_STATIC_FROM_LENGTHS(&vtable[0], 12, FF_ARRAY_ELEMS(noise_value), - &noise_value[0][1], 2, - &noise_value[0][0], 2, 1, -1, INIT_VLC_LE, 4096); - INIT_VLC_STATIC_FROM_LENGTHS(&vtable[1], 10, FF_ARRAY_ELEMS(noise_segment_length), - &noise_segment_length[0][1], 2, - &noise_segment_length[0][0], 2, 1, -1, INIT_VLC_LE, 1024); - INIT_VLC_STATIC_FROM_LENGTHS(&vtable[2], 12, FF_ARRAY_ELEMS(amplitude), - &litude[0][1], 2, - &litude[0][0], 2, 1, -1, INIT_VLC_LE, 4098); - INIT_VLC_STATIC_FROM_LENGTHS(&vtable[3], 12, FF_ARRAY_ELEMS(freq_diff), - &freq_diff[0][1], 2, - &freq_diff[0][0], 2, 1, -1, INIT_VLC_LE, 4160); - INIT_VLC_STATIC_FROM_LENGTHS(&vtable[4], 8, FF_ARRAY_ELEMS(amplitude_diff), - &litude_diff[0][1], 2, - &litude_diff[0][0], 2, 1, -1, INIT_VLC_LE, 256); - INIT_VLC_STATIC_FROM_LENGTHS(&vtable[5], 6, FF_ARRAY_ELEMS(phase_diff), - &phase_diff[0][1], 2, - &phase_diff[0][0], 2, 1, -1, INIT_VLC_LE, 64); + for (unsigned i = 0, offset = 0; i < FF_ARRAY_ELEMS(vtable); i++) { + static VLC_TYPE vlc_buffer[13698][2]; + vtable[i].table = &vlc_buffer[offset]; + vtable[i].table_allocated = FF_ARRAY_ELEMS(vlc_buffer) - offset; + ff_init_vlc_from_lengths(&vtable[i], huff_bits[i], huff_sizes[i], + &hufftab[0][1], 2, &hufftab[0][0], 2, 1, + -1, INIT_VLC_OUTPUT_LE | INIT_VLC_USE_NEW_STATIC); + hufftab += huff_sizes[i]; + offset += vtable[i].table_size; + } for (i = 0; i < 512; i++) sin_table[i] = sin(2.0f * i * M_PI * 0.001953125f);