Merge commit '45ff7c93dd84a254cc96acc589e5ac3d7bd16bce'

* commit '45ff7c93dd84a254cc96acc589e5ac3d7bd16bce':
  dca: K&R formatting cosmetics

Conflicts:
	libavcodec/dca_parser.c
	libavcodec/dcadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/113/head
Michael Niedermayer 11 years ago
commit 7d43fbe3ae
  1. 3
      libavcodec/dca.c
  2. 21
      libavcodec/dca_parser.c
  3. 2280
      libavcodec/dcadata.h
  4. 183
      libavcodec/dcadec.c
  5. 15
      libavcodec/dcadsp.c
  6. 479
      libavcodec/dcahuff.h

@ -30,8 +30,7 @@
#include "dca.h" #include "dca.h"
#include "put_bits.h" #include "put_bits.h"
const uint32_t avpriv_dca_sample_rates[16] = const uint32_t avpriv_dca_sample_rates[16] = {
{
0, 8000, 16000, 32000, 0, 0, 11025, 22050, 44100, 0, 0, 0, 8000, 16000, 32000, 0, 0, 11025, 22050, 44100, 0, 0,
12000, 24000, 48000, 96000, 192000 12000, 24000, 48000, 96000, 192000
}; };

@ -22,9 +22,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "parser.h"
#include "dca.h" #include "dca.h"
#include "get_bits.h" #include "get_bits.h"
#include "parser.h"
typedef struct DCAParseContext { typedef struct DCAParseContext {
ParseContext pc; ParseContext pc;
@ -35,15 +35,15 @@ typedef struct DCAParseContext {
} DCAParseContext; } DCAParseContext;
#define IS_MARKER(state, i, buf, buf_size) \ #define IS_MARKER(state, i, buf, buf_size) \
((state == DCA_MARKER_14B_LE && (i < buf_size-2) && (buf[i+1] & 0xF0) == 0xF0 && buf[i+2] == 0x07) \ ((state == DCA_MARKER_14B_LE && (i < buf_size - 2) && (buf[i + 1] & 0xF0) == 0xF0 && buf[i + 2] == 0x07) || \
|| (state == DCA_MARKER_14B_BE && (i < buf_size-2) && buf[i+1] == 0x07 && (buf[i+2] & 0xF0) == 0xF0) \ (state == DCA_MARKER_14B_BE && (i < buf_size - 2) && buf[i + 1] == 0x07 && (buf[i + 2] & 0xF0) == 0xF0) || \
|| state == DCA_MARKER_RAW_LE || state == DCA_MARKER_RAW_BE || state == DCA_HD_MARKER) state == DCA_MARKER_RAW_LE || state == DCA_MARKER_RAW_BE || state == DCA_HD_MARKER)
/** /**
* Find the end of the current frame in the bitstream. * Find the end of the current frame in the bitstream.
* @return the position of the first byte of the next frame, or -1 * @return the position of the first byte of the next frame, or -1
*/ */
static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf, static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
int buf_size) int buf_size)
{ {
int start_found, i; int start_found, i;
@ -74,7 +74,7 @@ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf,
if (state == DCA_HD_MARKER && !pc1->hd_pos) if (state == DCA_HD_MARKER && !pc1->hd_pos)
pc1->hd_pos = pc1->size; pc1->hd_pos = pc1->size;
if (IS_MARKER(state, i, buf, buf_size) && (state == pc1->lastmarker || pc1->lastmarker == DCA_HD_MARKER)) { if (IS_MARKER(state, i, buf, buf_size) && (state == pc1->lastmarker || pc1->lastmarker == DCA_HD_MARKER)) {
if(pc1->framesize > pc1->size) if (pc1->framesize > pc1->size)
continue; continue;
pc->frame_start_found = 0; pc->frame_start_found = 0;
pc->state = -1; pc->state = -1;
@ -88,7 +88,7 @@ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf,
return END_NOT_FOUND; return END_NOT_FOUND;
} }
static av_cold int dca_parse_init(AVCodecParserContext * s) static av_cold int dca_parse_init(AVCodecParserContext *s)
{ {
DCAParseContext *pc1 = s->priv_data; DCAParseContext *pc1 = s->priv_data;
@ -130,10 +130,9 @@ static int dca_parse_params(const uint8_t *buf, int buf_size, int *duration,
return 0; return 0;
} }
static int dca_parse(AVCodecParserContext * s, static int dca_parse(AVCodecParserContext *s, AVCodecContext *avctx,
AVCodecContext * avctx, const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t ** poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
const uint8_t * buf, int buf_size)
{ {
DCAParseContext *pc1 = s->priv_data; DCAParseContext *pc1 = s->priv_data;
ParseContext *pc = &pc1->pc; ParseContext *pc = &pc1->pc;

File diff suppressed because it is too large Load Diff

@ -34,17 +34,18 @@
#include "libavutil/mathematics.h" #include "libavutil/mathematics.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "libavutil/samplefmt.h" #include "libavutil/samplefmt.h"
#include "avcodec.h" #include "avcodec.h"
#include "fft.h"
#include "get_bits.h"
#include "dcadata.h"
#include "dcahuff.h"
#include "dca.h" #include "dca.h"
#include "mathops.h" #include "dcadata.h"
#include "synth_filter.h"
#include "dcadsp.h" #include "dcadsp.h"
#include "dcahuff.h"
#include "fft.h"
#include "fmtconvert.h" #include "fmtconvert.h"
#include "get_bits.h"
#include "internal.h" #include "internal.h"
#include "mathops.h"
#include "synth_filter.h"
#if ARCH_ARM #if ARCH_ARM
# include "arm/dca.h" # include "arm/dca.h"
@ -236,79 +237,79 @@ static const int8_t dca_lfe_index[] = {
}; };
static const int8_t dca_channel_reorder_lfe[][9] = { static const int8_t dca_channel_reorder_lfe[][9] = {
{ 0, -1, -1, -1, -1, -1, -1, -1, -1}, { 0, -1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1}, { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1}, { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1}, { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1}, { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, -1, -1, -1, -1, -1, -1}, { 2, 0, 1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1}, { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 4, -1, -1, -1, -1, -1}, { 2, 0, 1, 4, -1, -1, -1, -1, -1 },
{ 0, 1, 3, 4, -1, -1, -1, -1, -1}, { 0, 1, 3, 4, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 4, 5, -1, -1, -1, -1}, { 2, 0, 1, 4, 5, -1, -1, -1, -1 },
{ 3, 4, 0, 1, 5, 6, -1, -1, -1}, { 3, 4, 0, 1, 5, 6, -1, -1, -1 },
{ 2, 0, 1, 4, 5, 6, -1, -1, -1}, { 2, 0, 1, 4, 5, 6, -1, -1, -1 },
{ 0, 6, 4, 5, 2, 3, -1, -1, -1}, { 0, 6, 4, 5, 2, 3, -1, -1, -1 },
{ 4, 2, 5, 0, 1, 6, 7, -1, -1}, { 4, 2, 5, 0, 1, 6, 7, -1, -1 },
{ 5, 6, 0, 1, 7, 3, 8, 4, -1}, { 5, 6, 0, 1, 7, 3, 8, 4, -1 },
{ 4, 2, 5, 0, 1, 6, 8, 7, -1}, { 4, 2, 5, 0, 1, 6, 8, 7, -1 },
}; };
static const int8_t dca_channel_reorder_lfe_xch[][9] = { static const int8_t dca_channel_reorder_lfe_xch[][9] = {
{ 0, 2, -1, -1, -1, -1, -1, -1, -1}, { 0, 2, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1}, { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1}, { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1}, { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1}, { 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 4, -1, -1, -1, -1, -1}, { 2, 0, 1, 4, -1, -1, -1, -1, -1 },
{ 0, 1, 3, 4, -1, -1, -1, -1, -1}, { 0, 1, 3, 4, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 4, 5, -1, -1, -1, -1}, { 2, 0, 1, 4, 5, -1, -1, -1, -1 },
{ 0, 1, 4, 5, 3, -1, -1, -1, -1}, { 0, 1, 4, 5, 3, -1, -1, -1, -1 },
{ 2, 0, 1, 5, 6, 4, -1, -1, -1}, { 2, 0, 1, 5, 6, 4, -1, -1, -1 },
{ 3, 4, 0, 1, 6, 7, 5, -1, -1}, { 3, 4, 0, 1, 6, 7, 5, -1, -1 },
{ 2, 0, 1, 4, 5, 6, 7, -1, -1}, { 2, 0, 1, 4, 5, 6, 7, -1, -1 },
{ 0, 6, 4, 5, 2, 3, 7, -1, -1}, { 0, 6, 4, 5, 2, 3, 7, -1, -1 },
{ 4, 2, 5, 0, 1, 7, 8, 6, -1}, { 4, 2, 5, 0, 1, 7, 8, 6, -1 },
{ 5, 6, 0, 1, 8, 3, 9, 4, 7}, { 5, 6, 0, 1, 8, 3, 9, 4, 7 },
{ 4, 2, 5, 0, 1, 6, 9, 8, 7}, { 4, 2, 5, 0, 1, 6, 9, 8, 7 },
}; };
static const int8_t dca_channel_reorder_nolfe[][9] = { static const int8_t dca_channel_reorder_nolfe[][9] = {
{ 0, -1, -1, -1, -1, -1, -1, -1, -1}, { 0, -1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1}, { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1}, { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1}, { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1}, { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, -1, -1, -1, -1, -1, -1}, { 2, 0, 1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1}, { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 3, -1, -1, -1, -1, -1}, { 2, 0, 1, 3, -1, -1, -1, -1, -1 },
{ 0, 1, 2, 3, -1, -1, -1, -1, -1}, { 0, 1, 2, 3, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 3, 4, -1, -1, -1, -1}, { 2, 0, 1, 3, 4, -1, -1, -1, -1 },
{ 2, 3, 0, 1, 4, 5, -1, -1, -1}, { 2, 3, 0, 1, 4, 5, -1, -1, -1 },
{ 2, 0, 1, 3, 4, 5, -1, -1, -1}, { 2, 0, 1, 3, 4, 5, -1, -1, -1 },
{ 0, 5, 3, 4, 1, 2, -1, -1, -1}, { 0, 5, 3, 4, 1, 2, -1, -1, -1 },
{ 3, 2, 4, 0, 1, 5, 6, -1, -1}, { 3, 2, 4, 0, 1, 5, 6, -1, -1 },
{ 4, 5, 0, 1, 6, 2, 7, 3, -1}, { 4, 5, 0, 1, 6, 2, 7, 3, -1 },
{ 3, 2, 4, 0, 1, 5, 7, 6, -1}, { 3, 2, 4, 0, 1, 5, 7, 6, -1 },
}; };
static const int8_t dca_channel_reorder_nolfe_xch[][9] = { static const int8_t dca_channel_reorder_nolfe_xch[][9] = {
{ 0, 1, -1, -1, -1, -1, -1, -1, -1}, { 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1}, { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1}, { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1}, { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1}, { 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 3, -1, -1, -1, -1, -1}, { 2, 0, 1, 3, -1, -1, -1, -1, -1 },
{ 0, 1, 2, 3, -1, -1, -1, -1, -1}, { 0, 1, 2, 3, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 3, 4, -1, -1, -1, -1}, { 2, 0, 1, 3, 4, -1, -1, -1, -1 },
{ 0, 1, 3, 4, 2, -1, -1, -1, -1}, { 0, 1, 3, 4, 2, -1, -1, -1, -1 },
{ 2, 0, 1, 4, 5, 3, -1, -1, -1}, { 2, 0, 1, 4, 5, 3, -1, -1, -1 },
{ 2, 3, 0, 1, 5, 6, 4, -1, -1}, { 2, 3, 0, 1, 5, 6, 4, -1, -1 },
{ 2, 0, 1, 3, 4, 5, 6, -1, -1}, { 2, 0, 1, 3, 4, 5, 6, -1, -1 },
{ 0, 5, 3, 4, 1, 2, 6, -1, -1}, { 0, 5, 3, 4, 1, 2, 6, -1, -1 },
{ 3, 2, 4, 0, 1, 6, 7, 5, -1}, { 3, 2, 4, 0, 1, 6, 7, 5, -1 },
{ 4, 5, 0, 1, 7, 2, 8, 3, 6}, { 4, 5, 0, 1, 7, 2, 8, 3, 6 },
{ 3, 2, 4, 0, 1, 5, 8, 7, 6}, { 3, 2, 4, 0, 1, 5, 8, 7, 6 },
}; };
#define DCA_DOLBY 101 /* FIXME */ #define DCA_DOLBY 101 /* FIXME */
@ -642,7 +643,6 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel,
if (s->prim_channels > DCA_PRIM_CHANNELS_MAX) if (s->prim_channels > DCA_PRIM_CHANNELS_MAX)
s->prim_channels = DCA_PRIM_CHANNELS_MAX; s->prim_channels = DCA_PRIM_CHANNELS_MAX;
for (i = base_channel; i < s->prim_channels; i++) { for (i = base_channel; i < s->prim_channels; i++) {
s->subband_activity[i] = get_bits(&s->gb, 5) + 2; s->subband_activity[i] = get_bits(&s->gb, 5) + 2;
if (s->subband_activity[i] > DCA_SUBBANDS) if (s->subband_activity[i] > DCA_SUBBANDS)
@ -821,7 +821,6 @@ static int dca_parse_frame_header(DCAContext *s)
return dca_parse_audio_coding_header(s, 0, 0); return dca_parse_audio_coding_header(s, 0, 0);
} }
static inline int get_scale(GetBitContext *gb, int level, int value, int log2range) static inline int get_scale(GetBitContext *gb, int level, int value, int log2range)
{ {
if (level < 5) { if (level < 5) {
@ -1219,7 +1218,7 @@ static void dca_downmix(float **samples, int srcfmt, int lfe_present,
} }
if (lfe_present) { if (lfe_present) {
int lf_buf = dca_lfe_index[srcfmt]; int lf_buf = dca_lfe_index[srcfmt];
int lf_idx = dca_channels [srcfmt]; int lf_idx = dca_channels[srcfmt];
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
samples[0][i] += samples[lf_buf][i] * coef[lf_idx][0]; samples[0][i] += samples[lf_buf][i] * coef[lf_idx][0];
samples[1][i] += samples[lf_buf][i] * coef[lf_idx][1]; samples[1][i] += samples[lf_buf][i] * coef[lf_idx][1];
@ -1227,7 +1226,6 @@ static void dca_downmix(float **samples, int srcfmt, int lfe_present,
} }
} }
#ifndef decode_blockcodes #ifndef decode_blockcodes
/* Very compact version of the block code decoder that does not use table /* Very compact version of the block code decoder that does not use table
* look-up but is slightly slower */ * look-up but is slightly slower */
@ -1337,7 +1335,6 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
block[8 * l + m] = get_bitalloc(&s->gb, block[8 * l + m] = get_bitalloc(&s->gb,
&dca_smpl_bitalloc[abits], sel); &dca_smpl_bitalloc[abits], sel);
} }
} }
} }
@ -1445,7 +1442,6 @@ static int dca_filter_channels(DCAContext *s, int block_index)
return 0; return 0;
} }
static int dca_subframe_footer(DCAContext *s, int base_channel) static int dca_subframe_footer(DCAContext *s, int base_channel)
{ {
int in, out, aux_data_count, aux_data_end, reserved; int in, out, aux_data_count, aux_data_end, reserved;
@ -1707,7 +1703,6 @@ static int dca_exss_parse_asset_header(DCAContext *s)
skip_bits_long(&s->gb, num_dec_ch * 5); // remap codes skip_bits_long(&s->gb, num_dec_ch * 5); // remap codes
} }
} }
} else { } else {
skip_bits(&s->gb, 3); // representation type skip_bits(&s->gb, 3); // representation type
} }
@ -1750,10 +1745,18 @@ static int dca_exss_parse_asset_header(DCAContext *s)
} }
switch (get_bits(&s->gb, 2)) { switch (get_bits(&s->gb, 2)) {
case 0: extensions_mask = get_bits(&s->gb, 12); break; case 0:
case 1: extensions_mask = DCA_EXT_EXSS_XLL; break; extensions_mask = get_bits(&s->gb, 12);
case 2: extensions_mask = DCA_EXT_EXSS_LBR; break; break;
case 3: extensions_mask = 0; /* aux coding */ break; case 1:
extensions_mask = DCA_EXT_EXSS_XLL;
break;
case 2:
extensions_mask = DCA_EXT_EXSS_LBR;
break;
case 3:
extensions_mask = 0; /* aux coding */
break;
} }
/* not parsed further, we were only interested in the extensions mask */ /* not parsed further, we were only interested in the extensions mask */
@ -2160,10 +2163,10 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
} }
if ((ret = dca_parse_frame_header(s)) < 0) { if ((ret = dca_parse_frame_header(s)) < 0) {
//seems like the frame is corrupt, try with the next one // seems like the frame is corrupt, try with the next one
return ret; return ret;
} }
//set AVCodec values with parsed data // set AVCodec values with parsed data
avctx->sample_rate = s->sample_rate; avctx->sample_rate = s->sample_rate;
avctx->bit_rate = s->bit_rate; avctx->bit_rate = s->bit_rate;
@ -2232,7 +2235,6 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
/* only scan for extensions if ext_descr was unknown or indicated a /* only scan for extensions if ext_descr was unknown or indicated a
* supported XCh extension */ * supported XCh extension */
if (s->core_ext_mask < 0 || s->core_ext_mask & (DCA_EXT_XCH | DCA_EXT_XXCH)) { if (s->core_ext_mask < 0 || s->core_ext_mask & (DCA_EXT_XCH | DCA_EXT_XXCH)) {
/* if ext_descr was unknown, clear s->core_ext_mask so that the /* if ext_descr was unknown, clear s->core_ext_mask so that the
* extensions scan can fill it up */ * extensions scan can fill it up */
s->core_ext_mask = FFMAX(s->core_ext_mask, 0); s->core_ext_mask = FFMAX(s->core_ext_mask, 0);
@ -2263,8 +2265,9 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
/* extension amode(number of channels in extension) should be 1 */ /* extension amode(number of channels in extension) should be 1 */
/* AFAIK XCh is not used for more channels */ /* AFAIK XCh is not used for more channels */
if ((ext_amode = get_bits(&s->gb, 4)) != 1) { if ((ext_amode = get_bits(&s->gb, 4)) != 1) {
av_log(avctx, AV_LOG_ERROR, "XCh extension amode %d not" av_log(avctx, AV_LOG_ERROR,
" supported!\n", ext_amode); "XCh extension amode %d not supported!\n",
ext_amode);
continue; continue;
} }
@ -2478,7 +2481,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
frame->nb_samples = 256 * (s->sample_blocks / 8); frame->nb_samples = 256 * (s->sample_blocks / 8);
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret; return ret;
samples_flt = (float **)frame->extended_data; samples_flt = (float **) frame->extended_data;
/* allocate buffer for extra channels if downmixing */ /* allocate buffer for extra channels if downmixing */
if (avctx->channels < full_channels) { if (avctx->channels < full_channels) {
@ -2493,7 +2496,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (!s->extra_channels_buffer) if (!s->extra_channels_buffer)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ret = av_samples_fill_arrays((uint8_t **)s->extra_channels, NULL, ret = av_samples_fill_arrays((uint8_t **) s->extra_channels, NULL,
s->extra_channels_buffer, s->extra_channels_buffer,
full_channels - channels, full_channels - channels,
frame->nb_samples, avctx->sample_fmt, 0); frame->nb_samples, avctx->sample_fmt, 0);
@ -2589,8 +2592,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
return buf_size; return buf_size;
} }
/** /**
* DCA initialization * DCA initialization
* *
@ -2644,7 +2645,7 @@ static const AVProfile profiles[] = {
}; };
static const AVOption options[] = { static const AVOption options[] = {
{ "disable_xch", "disable decoding of the XCh extension", offsetof(DCAContext, xch_disable), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_DECODING_PARAM|AV_OPT_FLAG_AUDIO_PARAM }, { "disable_xch", "disable decoding of the XCh extension", offsetof(DCAContext, xch_disable), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM },
{ NULL }, { NULL },
}; };

@ -20,8 +20,10 @@
*/ */
#include "config.h" #include "config.h"
#include "libavutil/attributes.h" #include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
#include "dcadsp.h" #include "dcadsp.h"
static void decode_hf_c(float dst[DCA_SUBBANDS][8], static void decode_hf_c(float dst[DCA_SUBBANDS][8],
@ -42,8 +44,7 @@ static void decode_hf_c(float dst[DCA_SUBBANDS][8],
} }
} }
static inline void static inline void dca_lfe_fir(float *out, const float *in, const float *coefs,
dca_lfe_fir(float *out, const float *in, const float *coefs,
int decifactor) int decifactor)
{ {
float *out2 = out + 2 * decifactor - 1; float *out2 = out + 2 * decifactor - 1;
@ -86,7 +87,8 @@ static void dca_qmf_32_subbands(float samples_in[32][8], int sb_act,
} }
synth->synth_filter_float(imdct, synth_buf_ptr, synth_buf_offset, synth->synth_filter_float(imdct, synth_buf_ptr, synth_buf_offset,
synth_buf2, window, samples_out, raXin, scale); synth_buf2, window, samples_out, raXin,
scale);
samples_out += 32; samples_out += 32;
} }
} }
@ -107,6 +109,9 @@ av_cold void ff_dcadsp_init(DCADSPContext *s)
s->lfe_fir[1] = dca_lfe_fir1_c; s->lfe_fir[1] = dca_lfe_fir1_c;
s->qmf_32_subbands = dca_qmf_32_subbands; s->qmf_32_subbands = dca_qmf_32_subbands;
s->decode_hf = decode_hf_c; s->decode_hf = decode_hf_c;
if (ARCH_ARM) ff_dcadsp_init_arm(s);
if (ARCH_X86) ff_dcadsp_init_x86(s); if (ARCH_ARM)
ff_dcadsp_init_arm(s);
if (ARCH_X86)
ff_dcadsp_init_x86(s);
} }

@ -34,6 +34,7 @@ static const uint16_t tmode_codes[TMODE_COUNT][4] = {
{ 0x0006, 0x0007, 0x0000, 0x0002 }, { 0x0006, 0x0007, 0x0000, 0x0002 },
{ 0x0000, 0x0001, 0x0002, 0x0003 } { 0x0000, 0x0001, 0x0002, 0x0003 }
}; };
static const uint8_t tmode_bits[TMODE_COUNT][4] = { static const uint8_t tmode_bits[TMODE_COUNT][4] = {
{ 1, 2, 3, 3 }, { 1, 2, 3, 3 },
{ 2, 3, 3, 1 }, { 2, 3, 3, 1 },
@ -41,34 +42,25 @@ static const uint8_t tmode_bits[TMODE_COUNT][4] = {
{ 2, 2, 2, 2 } { 2, 2, 2, 2 }
}; };
#define BITALLOC_12_COUNT 5 #define BITALLOC_12_COUNT 5
#define BITALLOC_12_VLC_BITS 9 #define BITALLOC_12_VLC_BITS 9
static const uint8_t bitalloc_12_vlc_bits[BITALLOC_12_COUNT] = { static const uint8_t bitalloc_12_vlc_bits[BITALLOC_12_COUNT] = {
9, 7, 7, 9, 9 9, 7, 7, 9, 9
}; };
static const uint16_t bitalloc_12_codes[BITALLOC_12_COUNT][12] = { static const uint16_t bitalloc_12_codes[BITALLOC_12_COUNT][12] = {
{ { 0x0000, 0x0002, 0x0006, 0x000E, 0x001E, 0x003E, 0x00FF, 0x00FE,
0x0000, 0x0002, 0x0006, 0x000E, 0x001E, 0x003E, 0x00FF, 0x00FE, 0x01FB, 0x01FA, 0x01F9, 0x01F8, },
0x01FB, 0x01FA, 0x01F9, 0x01F8, { 0x0001, 0x0000, 0x0002, 0x000F, 0x000C, 0x001D, 0x0039, 0x0038,
}, 0x0037, 0x0036, 0x0035, 0x0034, },
{ { 0x0000, 0x0007, 0x0005, 0x0004, 0x0002, 0x000D, 0x000C, 0x0006,
0x0001, 0x0000, 0x0002, 0x000F, 0x000C, 0x001D, 0x0039, 0x0038, 0x000F, 0x001D, 0x0039, 0x0038, },
0x0037, 0x0036, 0x0035, 0x0034, { 0x0003, 0x0002, 0x0000, 0x0002, 0x0006, 0x000E, 0x001E, 0x003E,
}, 0x007E, 0x00FE, 0x01FF, 0x01FE, },
{ { 0x0001, 0x0000, 0x0002, 0x0006, 0x000E, 0x003F, 0x003D, 0x007C,
0x0000, 0x0007, 0x0005, 0x0004, 0x0002, 0x000D, 0x000C, 0x0006, 0x0079, 0x0078, 0x00FB, 0x00FA, }
0x000F, 0x001D, 0x0039, 0x0038,
},
{
0x0003, 0x0002, 0x0000, 0x0002, 0x0006, 0x000E, 0x001E, 0x003E,
0x007E, 0x00FE, 0x01FF, 0x01FE,
},
{
0x0001, 0x0000, 0x0002, 0x0006, 0x000E, 0x003F, 0x003D, 0x007C,
0x0079, 0x0078, 0x00FB, 0x00FA,
}
}; };
static const uint8_t bitalloc_12_bits[BITALLOC_12_COUNT][12] = { static const uint8_t bitalloc_12_bits[BITALLOC_12_COUNT][12] = {
{ 1, 2, 3, 4, 5, 6, 8, 8, 9, 9, 9, 9 }, { 1, 2, 3, 4, 5, 6, 8, 8, 9, 9, 9, 9 },
{ 1, 2, 3, 5, 5, 6, 7, 7, 7, 7, 7, 7 }, { 1, 2, 3, 5, 5, 6, 7, 7, 7, 7, 7, 7 },
@ -77,12 +69,10 @@ static const uint8_t bitalloc_12_bits[BITALLOC_12_COUNT][12] = {
{ 1, 2, 3, 4, 5, 7, 7, 8, 8, 8, 9, 9 } { 1, 2, 3, 4, 5, 7, 7, 8, 8, 8, 9, 9 }
}; };
#define SCALES_COUNT 5 #define SCALES_COUNT 5
#define SCALES_VLC_BITS 9 #define SCALES_VLC_BITS 9
static const uint16_t scales_codes[SCALES_COUNT][129] = { static const uint16_t scales_codes[SCALES_COUNT][129] = {
{ { 0x3AB0, 0x3AB2, 0x3AB4, 0x3AB6, 0x3AB8, 0x3ABA, 0x3ABC, 0x3ABE,
0x3AB0, 0x3AB2, 0x3AB4, 0x3AB6, 0x3AB8, 0x3ABA, 0x3ABC, 0x3ABE,
0x3AC0, 0x3AC2, 0x3AC4, 0x3AC6, 0x3AC8, 0x3ACA, 0x3ACC, 0x3ACE, 0x3AC0, 0x3AC2, 0x3AC4, 0x3AC6, 0x3AC8, 0x3ACA, 0x3ACC, 0x3ACE,
0x3AD0, 0x3AD2, 0x3AD4, 0x3AD6, 0x3AD8, 0x3ADA, 0x3ADC, 0x3ADE, 0x3AD0, 0x3AD2, 0x3AD4, 0x3AD6, 0x3AD8, 0x3ADA, 0x3ADC, 0x3ADE,
0x3AE0, 0x3AE2, 0x3AE4, 0x3AE6, 0x3AE8, 0x3AEA, 0x3AEC, 0x3AEE, 0x3AE0, 0x3AE2, 0x3AE4, 0x3AE6, 0x3AE8, 0x3AEA, 0x3AEC, 0x3AEE,
@ -98,10 +88,8 @@ static const uint16_t scales_codes[SCALES_COUNT][129] = {
0x3AE1, 0x3ADF, 0x3ADD, 0x3ADB, 0x3AD9, 0x3AD7, 0x3AD5, 0x3AD3, 0x3AE1, 0x3ADF, 0x3ADD, 0x3ADB, 0x3AD9, 0x3AD7, 0x3AD5, 0x3AD3,
0x3AD1, 0x3ACF, 0x3ACD, 0x3ACB, 0x3AC9, 0x3AC7, 0x3AC5, 0x3AC3, 0x3AD1, 0x3ACF, 0x3ACD, 0x3ACB, 0x3AC9, 0x3AC7, 0x3AC5, 0x3AC3,
0x3AC1, 0x3ABF, 0x3ABD, 0x3ABB, 0x3AB9, 0x3AB7, 0x3AB5, 0x3AB3, 0x3AC1, 0x3ABF, 0x3ABD, 0x3ABB, 0x3AB9, 0x3AB7, 0x3AB5, 0x3AB3,
0x3AB1, 0x3AB1, },
}, { 0x0F60, 0x0F62, 0x0F64, 0x0F66, 0x0F68, 0x0F6A, 0x0F6C, 0x0F6E,
{
0x0F60, 0x0F62, 0x0F64, 0x0F66, 0x0F68, 0x0F6A, 0x0F6C, 0x0F6E,
0x0F70, 0x0F72, 0x0F74, 0x0F76, 0x0F78, 0x0F7A, 0x0F7C, 0x0F7E, 0x0F70, 0x0F72, 0x0F74, 0x0F76, 0x0F78, 0x0F7A, 0x0F7C, 0x0F7E,
0x0F80, 0x0F82, 0x0F84, 0x0F86, 0x0F88, 0x0F8A, 0x0F8C, 0x0F8E, 0x0F80, 0x0F82, 0x0F84, 0x0F86, 0x0F88, 0x0F8A, 0x0F8C, 0x0F8E,
0x0F90, 0x0F92, 0x0F94, 0x0F96, 0x0F98, 0x0F9A, 0x0F9C, 0x0F9E, 0x0F90, 0x0F92, 0x0F94, 0x0F96, 0x0F98, 0x0F9A, 0x0F9C, 0x0F9E,
@ -117,10 +105,8 @@ static const uint16_t scales_codes[SCALES_COUNT][129] = {
0x0F91, 0x0F8F, 0x0F8D, 0x0F8B, 0x0F89, 0x0F87, 0x0F85, 0x0F83, 0x0F91, 0x0F8F, 0x0F8D, 0x0F8B, 0x0F89, 0x0F87, 0x0F85, 0x0F83,
0x0F81, 0x0F7F, 0x0F7D, 0x0F7B, 0x0F79, 0x0F77, 0x0F75, 0x0F73, 0x0F81, 0x0F7F, 0x0F7D, 0x0F7B, 0x0F79, 0x0F77, 0x0F75, 0x0F73,
0x0F71, 0x0F6F, 0x0F6D, 0x0F6B, 0x0F69, 0x0F67, 0x0F65, 0x0F63, 0x0F71, 0x0F6F, 0x0F6D, 0x0F6B, 0x0F69, 0x0F67, 0x0F65, 0x0F63,
0x0F61, 0x0F61, },
}, { 0x51D0, 0x51D2, 0x51D4, 0x51D6, 0x51D8, 0x51DA, 0x51DC, 0x51DE,
{
0x51D0, 0x51D2, 0x51D4, 0x51D6, 0x51D8, 0x51DA, 0x51DC, 0x51DE,
0x51E0, 0x51E2, 0x51E4, 0x51E6, 0x51E8, 0x51EA, 0x51EC, 0x51EE, 0x51E0, 0x51E2, 0x51E4, 0x51E6, 0x51E8, 0x51EA, 0x51EC, 0x51EE,
0x51F0, 0x51F2, 0x51F4, 0x51F6, 0x51F8, 0x51FA, 0x51FC, 0x51FE, 0x51F0, 0x51F2, 0x51F4, 0x51F6, 0x51F8, 0x51FA, 0x51FC, 0x51FE,
0x70C0, 0x70C2, 0x70C4, 0x70C6, 0x70C8, 0x70CA, 0x70CC, 0x70CE, 0x70C0, 0x70C2, 0x70C4, 0x70C6, 0x70C8, 0x70CA, 0x70CC, 0x70CE,
@ -136,10 +122,8 @@ static const uint16_t scales_codes[SCALES_COUNT][129] = {
0x70C1, 0x51FF, 0x51FD, 0x51FB, 0x51F9, 0x51F7, 0x51F5, 0x51F3, 0x70C1, 0x51FF, 0x51FD, 0x51FB, 0x51F9, 0x51F7, 0x51F5, 0x51F3,
0x51F1, 0x51EF, 0x51ED, 0x51EB, 0x51E9, 0x51E7, 0x51E5, 0x51E3, 0x51F1, 0x51EF, 0x51ED, 0x51EB, 0x51E9, 0x51E7, 0x51E5, 0x51E3,
0x51E1, 0x51DF, 0x51DD, 0x51DB, 0x51D9, 0x51D7, 0x51D5, 0x51D3, 0x51E1, 0x51DF, 0x51DD, 0x51DB, 0x51D9, 0x51D7, 0x51D5, 0x51D3,
0x51D1, 0x51D1, },
}, { 0x6F64, 0x6F66, 0x6F68, 0x6F6A, 0x6F6C, 0x6F6E, 0x6F70, 0x6F72,
{
0x6F64, 0x6F66, 0x6F68, 0x6F6A, 0x6F6C, 0x6F6E, 0x6F70, 0x6F72,
0x6F74, 0x6F76, 0x6F78, 0x6F7A, 0x6F7C, 0x6F7E, 0x6F80, 0x6F82, 0x6F74, 0x6F76, 0x6F78, 0x6F7A, 0x6F7C, 0x6F7E, 0x6F80, 0x6F82,
0x6F84, 0x6F86, 0x6F88, 0x6F8A, 0x6F8C, 0x6F8E, 0x6F90, 0x6F92, 0x6F84, 0x6F86, 0x6F88, 0x6F8A, 0x6F8C, 0x6F8E, 0x6F90, 0x6F92,
0x6F94, 0x6F96, 0x6F98, 0x6F9A, 0x6F9C, 0x6F9E, 0x6FA0, 0x6FA2, 0x6F94, 0x6F96, 0x6F98, 0x6F9A, 0x6F9C, 0x6F9E, 0x6FA0, 0x6FA2,
@ -155,10 +139,8 @@ static const uint16_t scales_codes[SCALES_COUNT][129] = {
0x6F95, 0x6F93, 0x6F91, 0x6F8F, 0x6F8D, 0x6F8B, 0x6F89, 0x6F87, 0x6F95, 0x6F93, 0x6F91, 0x6F8F, 0x6F8D, 0x6F8B, 0x6F89, 0x6F87,
0x6F85, 0x6F83, 0x6F81, 0x6F7F, 0x6F7D, 0x6F7B, 0x6F79, 0x6F77, 0x6F85, 0x6F83, 0x6F81, 0x6F7F, 0x6F7D, 0x6F7B, 0x6F79, 0x6F77,
0x6F75, 0x6F73, 0x6F71, 0x6F6F, 0x6F6D, 0x6F6B, 0x6F69, 0x6F67, 0x6F75, 0x6F73, 0x6F71, 0x6F6F, 0x6F6D, 0x6F6B, 0x6F69, 0x6F67,
0x6F65, 0x6F65, },
}, { 0xDF54, 0xDF56, 0xDFC8, 0xDFCA, 0xDFCC, 0xDFCE, 0xDFD0, 0xDFD2,
{
0xDF54, 0xDF56, 0xDFC8, 0xDFCA, 0xDFCC, 0xDFCE, 0xDFD0, 0xDFD2,
0xDFD4, 0xDFD6, 0xDFD8, 0xDFDA, 0xDFDC, 0xDFDE, 0xDFE0, 0xDFE2, 0xDFD4, 0xDFD6, 0xDFD8, 0xDFDA, 0xDFDC, 0xDFDE, 0xDFE0, 0xDFE2,
0x0FE8, 0x2FEA, 0x6FA8, 0x6FF6, 0x07F5, 0x07F7, 0x37D2, 0x37F9, 0x0FE8, 0x2FEA, 0x6FA8, 0x6FF6, 0x07F5, 0x07F7, 0x37D2, 0x37F9,
0x03F8, 0x0BF8, 0x0BFB, 0x1BEB, 0x01FA, 0x05FA, 0x09FA, 0x0DFA, 0x03F8, 0x0BF8, 0x0BFB, 0x1BEB, 0x01FA, 0x05FA, 0x09FA, 0x0DFA,
@ -174,13 +156,11 @@ static const uint16_t scales_codes[SCALES_COUNT][129] = {
0x03F9, 0x37FA, 0x37D3, 0x17F4, 0x07F6, 0x6FF7, 0x6FA9, 0x2FEB, 0x03F9, 0x37FA, 0x37D3, 0x17F4, 0x07F6, 0x6FF7, 0x6FA9, 0x2FEB,
0x0FE9, 0xDFE3, 0xDFE1, 0xDFDF, 0xDFDD, 0xDFDB, 0xDFD9, 0xDFD7, 0x0FE9, 0xDFE3, 0xDFE1, 0xDFDF, 0xDFDD, 0xDFDB, 0xDFD9, 0xDFD7,
0xDFD5, 0xDFD3, 0xDFD1, 0xDFCF, 0xDFCD, 0xDFCB, 0xDFC9, 0xDF57, 0xDFD5, 0xDFD3, 0xDFD1, 0xDFCF, 0xDFCD, 0xDFCB, 0xDFC9, 0xDF57,
0xDF55, 0xDF55, }
}
}; };
static const uint8_t scales_bits[SCALES_COUNT][129] = { static const uint8_t scales_bits[SCALES_COUNT][129] = {
{ { 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
@ -196,10 +176,8 @@ static const uint8_t scales_bits[SCALES_COUNT][129] = {
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 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,
@ -215,10 +193,8 @@ static const uint8_t scales_bits[SCALES_COUNT][129] = {
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, },
}, { 15, 15, 15, 15, 15, 15, 15, 15,
{
15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
@ -234,10 +210,8 @@ static const uint8_t scales_bits[SCALES_COUNT][129] = {
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, },
}, { 15, 15, 15, 15, 15, 15, 15, 15,
{
15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
@ -253,10 +227,8 @@ static const uint8_t scales_bits[SCALES_COUNT][129] = {
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 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,
15, 15, 15, 15, 14, 14, 14, 14, 15, 15, 15, 15, 14, 14, 14, 14,
13, 13, 13, 13, 12, 12, 12, 12, 13, 13, 13, 13, 12, 12, 12, 12,
@ -276,385 +248,376 @@ static const uint8_t scales_bits[SCALES_COUNT][129] = {
} }
}; };
static const uint16_t bitalloc_3_codes[3] = static const uint16_t bitalloc_3_codes[3] = {
{
0x0003, 0x0000, 0x0002, 0x0003, 0x0000, 0x0002,
}; };
static const uint8_t bitalloc_3_bits[3] =
{ static const uint8_t bitalloc_3_bits[3] = {
2, 1, 2, 2, 1, 2,
}; };
static const uint16_t bitalloc_5_codes_a[5] = static const uint16_t bitalloc_5_codes_a[5] = {
{
0x000F, 0x0006, 0x0000, 0x0002, 0x000E, 0x000F, 0x0006, 0x0000, 0x0002, 0x000E,
}; };
static const uint16_t bitalloc_5_codes_b[5] =
{ static const uint16_t bitalloc_5_codes_b[5] = {
0x0007, 0x0001, 0x0002, 0x0000, 0x0006, 0x0007, 0x0001, 0x0002, 0x0000, 0x0006,
}; };
static const uint16_t bitalloc_5_codes_c[5] =
{ static const uint16_t bitalloc_5_codes_c[5] = {
0x0007, 0x0005, 0x0000, 0x0004, 0x0006, 0x0007, 0x0005, 0x0000, 0x0004, 0x0006,
}; };
static const uint8_t bitalloc_5_bits_a[5] =
{ static const uint8_t bitalloc_5_bits_a[5] = {
4, 3, 1, 2, 4, 4, 3, 1, 2, 4,
}; };
static const uint8_t bitalloc_5_bits_b[5] =
{ static const uint8_t bitalloc_5_bits_b[5] = {
3, 2, 2, 2, 3, 3, 2, 2, 2, 3,
}; };
static const uint8_t bitalloc_5_bits_c[5] =
{ static const uint8_t bitalloc_5_bits_c[5] = {
3, 3, 1, 3, 3, 3, 3, 1, 3, 3,
}; };
static const uint16_t bitalloc_7_codes_a[7] = static const uint16_t bitalloc_7_codes_a[7] = {
{
0x001E, 0x000E, 0x0005, 0x0000, 0x0006, 0x0004, 0x001F, 0x001E, 0x000E, 0x0005, 0x0000, 0x0006, 0x0004, 0x001F,
}; };
static const uint16_t bitalloc_7_codes_b[7] =
{ static const uint16_t bitalloc_7_codes_b[7] = {
0x0014, 0x000B, 0x0000, 0x0003, 0x0001, 0x0004, 0x0015, 0x0014, 0x000B, 0x0000, 0x0003, 0x0001, 0x0004, 0x0015,
}; };
static const uint16_t bitalloc_7_codes_c[7] =
{ static const uint16_t bitalloc_7_codes_c[7] = {
0x0000, 0x0002, 0x0001, 0x0003, 0x0002, 0x0003, 0x0001, 0x0000, 0x0002, 0x0001, 0x0003, 0x0002, 0x0003, 0x0001,
}; };
static const uint8_t bitalloc_7_bits_a[7] =
{ static const uint8_t bitalloc_7_bits_a[7] = {
5, 4, 3, 1, 3, 3, 5, 5, 4, 3, 1, 3, 3, 5,
}; };
static const uint8_t bitalloc_7_bits_b[7] =
{ static const uint8_t bitalloc_7_bits_b[7] = {
5, 4, 2, 2, 2, 3, 5, 5, 4, 2, 2, 2, 3, 5,
}; };
static const uint8_t bitalloc_7_bits_c[7] =
{ static const uint8_t bitalloc_7_bits_c[7] = {
4, 4, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 4, 4,
}; };
static const uint16_t bitalloc_9_codes_a[9] = static const uint16_t bitalloc_9_codes_a[9] = {
{
0x0030, 0x0019, 0x0009, 0x0005, 0x0000, 0x0007, 0x000D, 0x0008, 0x0030, 0x0019, 0x0009, 0x0005, 0x0000, 0x0007, 0x000D, 0x0008,
0x0031, 0x0031,
}; };
static const uint16_t bitalloc_9_codes_b[9] =
{ static const uint16_t bitalloc_9_codes_b[9] = {
0x0018, 0x001A, 0x0002, 0x0007, 0x0002, 0x0000, 0x0003, 0x001B, 0x0018, 0x001A, 0x0002, 0x0007, 0x0002, 0x0000, 0x0003, 0x001B,
0x0019, 0x0019,
}; };
static const uint16_t bitalloc_9_codes_c[9] =
{ static const uint16_t bitalloc_9_codes_c[9] = {
0x001C, 0x000F, 0x0002, 0x0007, 0x0002, 0x0000, 0x0006, 0x0006, 0x001C, 0x000F, 0x0002, 0x0007, 0x0002, 0x0000, 0x0006, 0x0006,
0x001D, 0x001D,
}; };
static const uint8_t bitalloc_9_bits_a[9] =
{ static const uint8_t bitalloc_9_bits_a[9] = {
6, 5, 4, 3, 1, 3, 4, 4, 6, 6, 5, 4, 3, 1, 3, 4, 4, 6,
}; };
static const uint8_t bitalloc_9_bits_b[9] =
{ static const uint8_t bitalloc_9_bits_b[9] = {
5, 5, 3, 3, 2, 2, 3, 5, 5, 5, 5, 3, 3, 2, 2, 3, 5, 5,
}; };
static const uint8_t bitalloc_9_bits_c[9] =
{ static const uint8_t bitalloc_9_bits_c[9] = {
6, 5, 3, 3, 2, 2, 3, 4, 6, 6, 5, 3, 3, 2, 2, 3, 4, 6,
}; };
static const uint16_t bitalloc_13_codes_a[13] = static const uint16_t bitalloc_13_codes_a[13] = {
{
0x0070, 0x002E, 0x0039, 0x001D, 0x000C, 0x000F, 0x0000, 0x0004, 0x0070, 0x002E, 0x0039, 0x001D, 0x000C, 0x000F, 0x0000, 0x0004,
0x000D, 0x000A, 0x0016, 0x002F, 0x0071, 0x000D, 0x000A, 0x0016, 0x002F, 0x0071,
}; };
static const uint16_t bitalloc_13_codes_b[13] =
{ static const uint16_t bitalloc_13_codes_b[13] = {
0x0038, 0x0010, 0x001D, 0x0007, 0x000F, 0x0005, 0x0000, 0x0006, 0x0038, 0x0010, 0x001D, 0x0007, 0x000F, 0x0005, 0x0000, 0x0006,
0x0002, 0x0009, 0x0006, 0x0011, 0x0039, 0x0002, 0x0009, 0x0006, 0x0011, 0x0039,
}; };
static const uint16_t bitalloc_13_codes_c[13] =
{ static const uint16_t bitalloc_13_codes_c[13] = {
0x0004, 0x001A, 0x0003, 0x000E, 0x0000, 0x0003, 0x0005, 0x0004, 0x0004, 0x001A, 0x0003, 0x000E, 0x0000, 0x0003, 0x0005, 0x0004,
0x0002, 0x000F, 0x000C, 0x001B, 0x0005, 0x0002, 0x000F, 0x000C, 0x001B, 0x0005,
}; };
static const uint8_t bitalloc_13_bits_a[13] =
{ static const uint8_t bitalloc_13_bits_a[13] = {
7, 6, 6, 5, 4, 4, 1, 3, 4, 4, 5, 6, 7, 7, 6, 6, 5, 4, 4, 1, 3, 4, 4, 5, 6, 7,
}; };
static const uint8_t bitalloc_13_bits_b[13] =
{ static const uint8_t bitalloc_13_bits_b[13] = {
6, 5, 5, 4, 4, 3, 2, 3, 3, 4, 4, 5, 6, 6, 5, 5, 4, 4, 3, 2, 3, 3, 4, 4, 5, 6,
}; };
static const uint8_t bitalloc_13_bits_c[13] =
{ static const uint8_t bitalloc_13_bits_c[13] = {
5, 5, 4, 4, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 4, 4, 3, 3, 3, 3, 3, 4, 4, 5, 5,
}; };
static const uint16_t bitalloc_17_codes_a[17] = static const uint16_t bitalloc_17_codes_a[17] = {
{
0x0154, 0x00AB, 0x002B, 0x000B, 0x0003, 0x000A, 0x0001, 0x0006, 0x0154, 0x00AB, 0x002B, 0x000B, 0x0003, 0x000A, 0x0001, 0x0006,
0x0001, 0x0007, 0x0004, 0x000B, 0x0000, 0x0004, 0x0014, 0x0054, 0x0001, 0x0007, 0x0004, 0x000B, 0x0000, 0x0004, 0x0014, 0x0054,
0x0155, 0x0155,
}; };
static const uint16_t bitalloc_17_codes_b[17] =
{ static const uint16_t bitalloc_17_codes_b[17] = {
0x007C, 0x003F, 0x0019, 0x000D, 0x001C, 0x0008, 0x000F, 0x0005, 0x007C, 0x003F, 0x0019, 0x000D, 0x001C, 0x0008, 0x000F, 0x0005,
0x0000, 0x0006, 0x0002, 0x0009, 0x001D, 0x000E, 0x001E, 0x0018, 0x0000, 0x0006, 0x0002, 0x0009, 0x001D, 0x000E, 0x001E, 0x0018,
0x007D, 0x007D,
}; };
static const uint16_t bitalloc_17_codes_c[17] =
{ static const uint16_t bitalloc_17_codes_c[17] = {
0x002C, 0x0017, 0x0005, 0x001C, 0x0003, 0x000A, 0x000F, 0x0003, 0x002C, 0x0017, 0x0005, 0x001C, 0x0003, 0x000A, 0x000F, 0x0003,
0x0006, 0x0004, 0x0000, 0x000B, 0x0004, 0x001D, 0x000A, 0x0004, 0x0006, 0x0004, 0x0000, 0x000B, 0x0004, 0x001D, 0x000A, 0x0004,
0x002D, 0x002D,
}; };
static const uint16_t bitalloc_17_codes_d[17] =
{ static const uint16_t bitalloc_17_codes_d[17] = {
0x0100, 0x0102, 0x0082, 0x0042, 0x0022, 0x0012, 0x000A, 0x0006, 0x0100, 0x0102, 0x0082, 0x0042, 0x0022, 0x0012, 0x000A, 0x0006,
0x0000, 0x0007, 0x000B, 0x0013, 0x0023, 0x0043, 0x0083, 0x0103, 0x0000, 0x0007, 0x000B, 0x0013, 0x0023, 0x0043, 0x0083, 0x0103,
0x0101, 0x0101,
}; };
static const uint16_t bitalloc_17_codes_e[17] =
{ static const uint16_t bitalloc_17_codes_e[17] = {
0x00E8, 0x00F6, 0x0075, 0x0034, 0x003B, 0x001B, 0x001F, 0x0004, 0x00E8, 0x00F6, 0x0075, 0x0034, 0x003B, 0x001B, 0x001F, 0x0004,
0x0000, 0x0005, 0x000C, 0x001C, 0x003C, 0x0035, 0x007A, 0x00F7, 0x0000, 0x0005, 0x000C, 0x001C, 0x003C, 0x0035, 0x007A, 0x00F7,
0x00E9, 0x00E9,
}; };
static const uint16_t bitalloc_17_codes_f[17] =
{ static const uint16_t bitalloc_17_codes_f[17] = {
0x0004, 0x0003, 0x001E, 0x0001, 0x0001, 0x000E, 0x0001, 0x0004, 0x0004, 0x0003, 0x001E, 0x0001, 0x0001, 0x000E, 0x0001, 0x0004,
0x0006, 0x0005, 0x0002, 0x000F, 0x0006, 0x000E, 0x001F, 0x0000, 0x0006, 0x0005, 0x0002, 0x000F, 0x0006, 0x000E, 0x001F, 0x0000,
0x0005, 0x0005,
}; };
static const uint16_t bitalloc_17_codes_g[17] =
{ static const uint16_t bitalloc_17_codes_g[17] = {
0x0060, 0x007E, 0x0031, 0x0019, 0x000D, 0x0004, 0x0000, 0x0006, 0x0060, 0x007E, 0x0031, 0x0019, 0x000D, 0x0004, 0x0000, 0x0006,
0x0002, 0x0007, 0x0001, 0x0005, 0x000E, 0x001E, 0x003E, 0x007F, 0x0002, 0x0007, 0x0001, 0x0005, 0x000E, 0x001E, 0x003E, 0x007F,
0x0061, 0x0061,
}; };
static const uint8_t bitalloc_17_bits_a[17] =
{ static const uint8_t bitalloc_17_bits_a[17] = {
12, 11, 9, 7, 5, 4, 3, 3, 2, 3, 3, 4, 4, 6, 8, 10, 12, 11, 9, 7, 5, 4, 3, 3, 2, 3, 3, 4, 4, 6, 8, 10,
12, 12,
}; };
static const uint8_t bitalloc_17_bits_b[17] =
{ static const uint8_t bitalloc_17_bits_b[17] = {
8, 7, 6, 5, 5, 4, 4, 3, 2, 3, 3, 4, 5, 5, 6, 6, 8, 7, 6, 5, 5, 4, 4, 3, 2, 3, 3, 4, 5, 5, 6, 6,
8, 8,
}; };
static const uint8_t bitalloc_17_bits_c[17] =
{ static const uint8_t bitalloc_17_bits_c[17] = {
7, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 4, 4, 5, 5, 5, 7, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 4, 4, 5, 5, 5,
7, 7,
}; };
static const uint8_t bitalloc_17_bits_d[17] =
{ static const uint8_t bitalloc_17_bits_d[17] = {
9, 9, 8, 7, 6, 5, 4, 3, 1, 3, 4, 5, 6, 7, 8, 9, 9, 9, 8, 7, 6, 5, 4, 3, 1, 3, 4, 5, 6, 7, 8, 9,
9, 9,
}; };
static const uint8_t bitalloc_17_bits_e[17] =
{ static const uint8_t bitalloc_17_bits_e[17] = {
8, 8, 7, 6, 6, 5, 5, 3, 1, 3, 4, 5, 6, 6, 7, 8, 8, 8, 7, 6, 6, 5, 5, 3, 1, 3, 4, 5, 6, 6, 7, 8,
8, 8,
}; };
static const uint8_t bitalloc_17_bits_f[17] =
{ static const uint8_t bitalloc_17_bits_f[17] = {
8, 7, 6, 5, 4, 4, 3, 3, 3, 3, 3, 4, 4, 5, 6, 6, 8, 7, 6, 5, 4, 4, 3, 3, 3, 3, 3, 4, 4, 5, 6, 6,
8, 8,
}; };
static const uint8_t bitalloc_17_bits_g[17] =
{ static const uint8_t bitalloc_17_bits_g[17] = {
8, 8, 7, 6, 5, 4, 3, 3, 2, 3, 3, 4, 5, 6, 7, 8, 8, 8, 7, 6, 5, 4, 3, 3, 2, 3, 3, 4, 5, 6, 7, 8,
8, 8,
}; };
static const uint16_t bitalloc_25_codes_a[25] = static const uint16_t bitalloc_25_codes_a[25] = {
{
0x2854, 0x142B, 0x050B, 0x0143, 0x00A2, 0x0052, 0x002E, 0x0015, 0x2854, 0x142B, 0x050B, 0x0143, 0x00A2, 0x0052, 0x002E, 0x0015,
0x0004, 0x000E, 0x0000, 0x0003, 0x0006, 0x0004, 0x0001, 0x000F, 0x0004, 0x000E, 0x0000, 0x0003, 0x0006, 0x0004, 0x0001, 0x000F,
0x0005, 0x0016, 0x002F, 0x0053, 0x00A3, 0x00A0, 0x0284, 0x0A14, 0x0005, 0x0016, 0x002F, 0x0053, 0x00A3, 0x00A0, 0x0284, 0x0A14,
0x2855, 0x2855,
}; };
static const uint16_t bitalloc_25_codes_b[25] =
{ static const uint16_t bitalloc_25_codes_b[25] = {
0x001C, 0x000F, 0x0005, 0x0000, 0x0030, 0x0036, 0x000E, 0x0019, 0x001C, 0x000F, 0x0005, 0x0000, 0x0030, 0x0036, 0x000E, 0x0019,
0x0001, 0x0008, 0x000E, 0x0001, 0x0005, 0x0002, 0x000F, 0x0009, 0x0001, 0x0008, 0x000E, 0x0001, 0x0005, 0x0002, 0x000F, 0x0009,
0x0006, 0x001A, 0x000F, 0x0037, 0x0031, 0x0001, 0x0006, 0x0004, 0x0006, 0x001A, 0x000F, 0x0037, 0x0031, 0x0001, 0x0006, 0x0004,
0x001D, 0x001D,
}; };
static const uint16_t bitalloc_25_codes_c[25] =
{ static const uint16_t bitalloc_25_codes_c[25] = {
0x004C, 0x0027, 0x006D, 0x0028, 0x0037, 0x000E, 0x0015, 0x0000, 0x004C, 0x0027, 0x006D, 0x0028, 0x0037, 0x000E, 0x0015, 0x0000,
0x0005, 0x0008, 0x000B, 0x000E, 0x0001, 0x000F, 0x000C, 0x0009, 0x0005, 0x0008, 0x000B, 0x000E, 0x0001, 0x000F, 0x000C, 0x0009,
0x0006, 0x0001, 0x001A, 0x000F, 0x0008, 0x0029, 0x0012, 0x006C, 0x0006, 0x0001, 0x001A, 0x000F, 0x0008, 0x0029, 0x0012, 0x006C,
0x004D, 0x004D,
}; };
static const uint16_t bitalloc_25_codes_d[25] =
{ static const uint16_t bitalloc_25_codes_d[25] = {
0x0780, 0x0782, 0x03C2, 0x01E2, 0x00FE, 0x0079, 0x003D, 0x001C, 0x0780, 0x0782, 0x03C2, 0x01E2, 0x00FE, 0x0079, 0x003D, 0x001C,
0x000C, 0x0004, 0x0000, 0x0006, 0x0002, 0x0007, 0x0001, 0x0005, 0x000C, 0x0004, 0x0000, 0x0006, 0x0002, 0x0007, 0x0001, 0x0005,
0x000D, 0x001D, 0x003E, 0x007E, 0x00FF, 0x01E3, 0x03C3, 0x0783, 0x000D, 0x001D, 0x003E, 0x007E, 0x00FF, 0x01E3, 0x03C3, 0x0783,
0x0781, 0x0781,
}; };
static const uint16_t bitalloc_25_codes_e[25] =
{ static const uint16_t bitalloc_25_codes_e[25] = {
0x003C, 0x0092, 0x0018, 0x001F, 0x004E, 0x000D, 0x0025, 0x0004, 0x003C, 0x0092, 0x0018, 0x001F, 0x004E, 0x000D, 0x0025, 0x0004,
0x0010, 0x0000, 0x000A, 0x0002, 0x0003, 0x0003, 0x000B, 0x0001, 0x0010, 0x0000, 0x000A, 0x0002, 0x0003, 0x0003, 0x000B, 0x0001,
0x0011, 0x0005, 0x0026, 0x000E, 0x004F, 0x0048, 0x0019, 0x0093, 0x0011, 0x0005, 0x0026, 0x000E, 0x004F, 0x0048, 0x0019, 0x0093,
0x003D, 0x003D,
}; };
static const uint16_t bitalloc_25_codes_f[25] =
{ static const uint16_t bitalloc_25_codes_f[25] = {
0x0324, 0x0193, 0x00CE, 0x0065, 0x0024, 0x000C, 0x0013, 0x0004, 0x0324, 0x0193, 0x00CE, 0x0065, 0x0024, 0x000C, 0x0013, 0x0004,
0x0007, 0x000A, 0x000D, 0x000F, 0x0001, 0x0000, 0x000E, 0x000B, 0x0007, 0x000A, 0x000D, 0x000F, 0x0001, 0x0000, 0x000E, 0x000B,
0x0008, 0x0005, 0x0018, 0x000D, 0x0025, 0x0066, 0x00CF, 0x00C8, 0x0008, 0x0005, 0x0018, 0x000D, 0x0025, 0x0066, 0x00CF, 0x00C8,
0x0325, 0x0325,
}; };
static const uint16_t bitalloc_25_codes_g[25] =
{ static const uint16_t bitalloc_25_codes_g[25] = {
0x03A8, 0x03AE, 0x01D5, 0x0094, 0x0014, 0x004B, 0x000B, 0x003B, 0x03A8, 0x03AE, 0x01D5, 0x0094, 0x0014, 0x004B, 0x000B, 0x003B,
0x0013, 0x0003, 0x000F, 0x0005, 0x0001, 0x0006, 0x0000, 0x0008, 0x0013, 0x0003, 0x000F, 0x0005, 0x0001, 0x0006, 0x0000, 0x0008,
0x001C, 0x0004, 0x0024, 0x0074, 0x0015, 0x0095, 0x01D6, 0x03AF, 0x001C, 0x0004, 0x0024, 0x0074, 0x0015, 0x0095, 0x01D6, 0x03AF,
0x03A9, 0x03A9,
}; };
static const uint8_t bitalloc_25_bits_a[25] =
{ static const uint8_t bitalloc_25_bits_a[25] = {
14, 13, 11, 9, 8, 7, 6, 5, 4, 4, 3, 3, 3, 3, 3, 4, 14, 13, 11, 9, 8, 7, 6, 5, 4, 4, 3, 3, 3, 3, 3, 4,
4, 5, 6, 7, 8, 8, 10, 12, 14, 4, 5, 6, 7, 8, 8, 10, 12, 14,
}; };
static const uint8_t bitalloc_25_bits_b[25] =
{ static const uint8_t bitalloc_25_bits_b[25] = {
9, 8, 7, 6, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 4, 4, 9, 8, 7, 6, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 4, 4,
4, 5, 5, 6, 6, 6, 7, 7, 9, 4, 5, 5, 6, 6, 6, 7, 7, 9,
}; };
static const uint8_t bitalloc_25_bits_c[25] =
{ static const uint8_t bitalloc_25_bits_c[25] = {
8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 4, 4, 3, 4, 4, 4, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 4, 4, 3, 4, 4, 4,
4, 4, 5, 5, 5, 6, 6, 7, 8, 4, 4, 5, 5, 5, 6, 6, 7, 8,
}; };
static const uint8_t bitalloc_25_bits_d[25] =
{ static const uint8_t bitalloc_25_bits_d[25] = {
12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 3, 2, 3, 3, 4, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 3, 2, 3, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 12, 5, 6, 7, 8, 9, 10, 11, 12, 12,
}; };
static const uint8_t bitalloc_25_bits_e[25] =
{ static const uint8_t bitalloc_25_bits_e[25] = {
8, 8, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 2, 3, 4, 4, 8, 8, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 2, 3, 4, 4,
5, 5, 6, 6, 7, 7, 7, 8, 8, 5, 5, 6, 6, 7, 7, 7, 8, 8,
}; };
static const uint8_t bitalloc_25_bits_f[25] =
{ static const uint8_t bitalloc_25_bits_f[25] = {
10, 9, 8, 7, 6, 5, 5, 4, 4, 4, 4, 4, 3, 3, 4, 4, 10, 9, 8, 7, 6, 5, 5, 4, 4, 4, 4, 4, 3, 3, 4, 4,
4, 4, 5, 5, 6, 7, 8, 8, 10, 4, 4, 5, 5, 6, 7, 8, 8, 10,
}; };
static const uint8_t bitalloc_25_bits_g[25] =
{ static const uint8_t bitalloc_25_bits_g[25] = {
10, 10, 9, 8, 7, 7, 6, 6, 5, 4, 4, 3, 2, 3, 3, 4, 10, 10, 9, 8, 7, 7, 6, 6, 5, 4, 4, 3, 2, 3, 3, 4,
5, 5, 6, 7, 7, 8, 9, 10, 10, 5, 5, 6, 7, 7, 8, 9, 10, 10,
}; };
static const uint16_t bitalloc_33_codes_a[33] = static const uint16_t bitalloc_33_codes_a[33] = {
{
0x1580, 0x1582, 0x0AC2, 0x0562, 0x02B2, 0x015E, 0x00AD, 0x0054, 0x1580, 0x1582, 0x0AC2, 0x0562, 0x02B2, 0x015E, 0x00AD, 0x0054,
0x001C, 0x003C, 0x000F, 0x001F, 0x0008, 0x000B, 0x000D, 0x0000, 0x001C, 0x003C, 0x000F, 0x001F, 0x0008, 0x000B, 0x000D, 0x0000,
0x0002, 0x0001, 0x000E, 0x000C, 0x0009, 0x0006, 0x0014, 0x003D, 0x0002, 0x0001, 0x000E, 0x000C, 0x0009, 0x0006, 0x0014, 0x003D,
0x001D, 0x0055, 0x00AE, 0x015F, 0x02B3, 0x0563, 0x0AC3, 0x1583, 0x001D, 0x0055, 0x00AE, 0x015F, 0x02B3, 0x0563, 0x0AC3, 0x1583,
0x1581, 0x1581,
}; };
static const uint16_t bitalloc_33_codes_b[33] =
{ static const uint16_t bitalloc_33_codes_b[33] = {
0x030C, 0x0187, 0x006D, 0x0028, 0x0037, 0x0066, 0x0015, 0x0031, 0x030C, 0x0187, 0x006D, 0x0028, 0x0037, 0x0066, 0x0015, 0x0031,
0x0000, 0x000B, 0x0012, 0x001A, 0x0001, 0x0007, 0x000A, 0x000E, 0x0000, 0x000B, 0x0012, 0x001A, 0x0001, 0x0007, 0x000A, 0x000E,
0x0001, 0x000F, 0x000B, 0x0008, 0x0004, 0x001B, 0x0013, 0x000C, 0x0001, 0x000F, 0x000B, 0x0008, 0x0004, 0x001B, 0x0013, 0x000C,
0x0001, 0x0032, 0x001A, 0x0067, 0x0060, 0x0029, 0x00C2, 0x006C, 0x0001, 0x0032, 0x001A, 0x0067, 0x0060, 0x0029, 0x00C2, 0x006C,
0x030D, 0x030D,
}; };
static const uint16_t bitalloc_33_codes_c[33] =
{ static const uint16_t bitalloc_33_codes_c[33] = {
0x00CC, 0x0067, 0x0005, 0x0070, 0x0003, 0x001A, 0x0039, 0x003F, 0x00CC, 0x0067, 0x0005, 0x0070, 0x0003, 0x001A, 0x0039, 0x003F,
0x000A, 0x0012, 0x0018, 0x001D, 0x0001, 0x0003, 0x0007, 0x000A, 0x000A, 0x0012, 0x0018, 0x001D, 0x0001, 0x0003, 0x0007, 0x000A,
0x000D, 0x000B, 0x0008, 0x0004, 0x0002, 0x001E, 0x0019, 0x0013, 0x000D, 0x000B, 0x0008, 0x0004, 0x0002, 0x001E, 0x0019, 0x0013,
0x000B, 0x0000, 0x003E, 0x001B, 0x0018, 0x0071, 0x0032, 0x0004, 0x000B, 0x0000, 0x003E, 0x001B, 0x0018, 0x0071, 0x0032, 0x0004,
0x00CD, 0x00CD,
}; };
static const uint16_t bitalloc_33_codes_d[33] =
{ static const uint16_t bitalloc_33_codes_d[33] = {
0x3AF8, 0x3AFA, 0x1D7E, 0x0EBC, 0x075C, 0x03AC, 0x01D4, 0x0094, 0x3AF8, 0x3AFA, 0x1D7E, 0x0EBC, 0x075C, 0x03AC, 0x01D4, 0x0094,
0x0014, 0x004B, 0x000B, 0x003B, 0x0013, 0x0003, 0x000F, 0x0005, 0x0014, 0x004B, 0x000B, 0x003B, 0x0013, 0x0003, 0x000F, 0x0005,
0x0001, 0x0006, 0x0000, 0x0008, 0x001C, 0x0004, 0x0024, 0x0074, 0x0001, 0x0006, 0x0000, 0x0008, 0x001C, 0x0004, 0x0024, 0x0074,
0x0015, 0x0095, 0x01D5, 0x03AD, 0x075D, 0x0EBD, 0x1D7F, 0x3AFB, 0x0015, 0x0095, 0x01D5, 0x03AD, 0x075D, 0x0EBD, 0x1D7F, 0x3AFB,
0x3AF9, 0x3AF9,
}; };
static const uint16_t bitalloc_33_codes_e[33] =
{ static const uint16_t bitalloc_33_codes_e[33] = {
0x01C8, 0x01E6, 0x0064, 0x00E2, 0x00E5, 0x0030, 0x0033, 0x0073, 0x01C8, 0x01E6, 0x0064, 0x00E2, 0x00E5, 0x0030, 0x0033, 0x0073,
0x007A, 0x001A, 0x003A, 0x0002, 0x001A, 0x001F, 0x0007, 0x0001, 0x007A, 0x001A, 0x003A, 0x0002, 0x001A, 0x001F, 0x0007, 0x0001,
0x0002, 0x0002, 0x000C, 0x0000, 0x001B, 0x0003, 0x003B, 0x001B, 0x0002, 0x0002, 0x000C, 0x0000, 0x001B, 0x0003, 0x003B, 0x001B,
0x007B, 0x0078, 0x0070, 0x0031, 0x00F2, 0x00E3, 0x0065, 0x01E7, 0x007B, 0x0078, 0x0070, 0x0031, 0x00F2, 0x00E3, 0x0065, 0x01E7,
0x01C9, 0x01C9,
}; };
static const uint16_t bitalloc_33_codes_f[33] =
{ static const uint16_t bitalloc_33_codes_f[33] = {
0x0724, 0x0393, 0x01CE, 0x00E5, 0x002C, 0x0008, 0x0017, 0x003E, 0x0724, 0x0393, 0x01CE, 0x00E5, 0x002C, 0x0008, 0x0017, 0x003E,
0x0005, 0x0014, 0x001D, 0x0000, 0x0003, 0x0006, 0x0008, 0x000B, 0x0005, 0x0014, 0x001D, 0x0000, 0x0003, 0x0006, 0x0008, 0x000B,
0x000D, 0x000C, 0x0009, 0x0007, 0x0004, 0x0001, 0x001E, 0x0015, 0x000D, 0x000C, 0x0009, 0x0007, 0x0004, 0x0001, 0x001E, 0x0015,
0x000A, 0x003F, 0x0038, 0x0009, 0x002D, 0x00E6, 0x01CF, 0x01C8, 0x000A, 0x003F, 0x0038, 0x0009, 0x002D, 0x00E6, 0x01CF, 0x01C8,
0x0725, 0x0725,
}; };
static const uint16_t bitalloc_33_codes_g[33] =
{ static const uint16_t bitalloc_33_codes_g[33] = {
0x0284, 0x0042, 0x0140, 0x0143, 0x003E, 0x00BE, 0x0011, 0x0051, 0x0284, 0x0042, 0x0140, 0x0143, 0x003E, 0x00BE, 0x0011, 0x0051,
0x0009, 0x0029, 0x0005, 0x0015, 0x0000, 0x0008, 0x000E, 0x0002, 0x0009, 0x0029, 0x0005, 0x0015, 0x0000, 0x0008, 0x000E, 0x0002,
0x0006, 0x0003, 0x000F, 0x0009, 0x0001, 0x0016, 0x0006, 0x002E, 0x0006, 0x0003, 0x000F, 0x0009, 0x0001, 0x0016, 0x0006, 0x002E,
0x000E, 0x005E, 0x001E, 0x00BF, 0x003F, 0x0020, 0x0141, 0x0043, 0x000E, 0x005E, 0x001E, 0x00BF, 0x003F, 0x0020, 0x0141, 0x0043,
0x0285, 0x0285,
}; };
static const uint8_t bitalloc_33_bits_a[33] =
{ static const uint8_t bitalloc_33_bits_a[33] = {
13, 13, 12, 11, 10, 9, 8, 7, 6, 6, 5, 5, 4, 4, 4, 3, 13, 13, 12, 11, 10, 9, 8, 7, 6, 6, 5, 5, 4, 4, 4, 3,
3, 3, 4, 4, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13, 3, 3, 4, 4, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13,
13, 13,
}; };
static const uint8_t bitalloc_33_bits_b[33] =
{ static const uint8_t bitalloc_33_bits_b[33] = {
10, 9, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 10, 9, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4,
3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8,
10, 10,
}; };
static const uint8_t bitalloc_33_bits_c[33] =
{ static const uint8_t bitalloc_33_bits_c[33] = {
9, 8, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 9, 8, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4,
4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7,
9, 9,
}; };
static const uint8_t bitalloc_33_bits_d[33] =
{ static const uint8_t bitalloc_33_bits_d[33] = {
14, 14, 13, 12, 11, 10, 9, 8, 7, 7, 6, 6, 5, 4, 4, 3, 14, 14, 13, 12, 11, 10, 9, 8, 7, 7, 6, 6, 5, 4, 4, 3,
2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14,
14, 14,
}; };
static const uint8_t bitalloc_33_bits_e[33] =
{ static const uint8_t bitalloc_33_bits_e[33] = {
9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 5, 5, 5, 4, 3, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 5, 5, 5, 4, 3,
2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9,
9, 9,
}; };
static const uint8_t bitalloc_33_bits_f[33] =
{ static const uint8_t bitalloc_33_bits_f[33] = {
11, 10, 9, 8, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 11, 10, 9, 8, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9,
11, 11,
}; };
static const uint8_t bitalloc_33_bits_g[33] =
{ static const uint8_t bitalloc_33_bits_g[33] = {
10, 9, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 10, 9, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3,
3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9,
10, 10,
}; };
static const uint16_t bitalloc_65_codes_a[65] = static const uint16_t bitalloc_65_codes_a[65] = {
{
0x9E5C, 0x9E5E, 0x4F2C, 0x2794, 0x13C4, 0x1E44, 0x09E3, 0x0F23, 0x9E5C, 0x9E5E, 0x4F2C, 0x2794, 0x13C4, 0x1E44, 0x09E3, 0x0F23,
0x04F3, 0x0792, 0x027E, 0x03CE, 0x013D, 0x01E5, 0x009C, 0x00CC, 0x04F3, 0x0792, 0x027E, 0x03CE, 0x013D, 0x01E5, 0x009C, 0x00CC,
0x0040, 0x0058, 0x0067, 0x001E, 0x0021, 0x002D, 0x003D, 0x0007, 0x0040, 0x0058, 0x0067, 0x001E, 0x0021, 0x002D, 0x003D, 0x0007,
@ -665,8 +628,8 @@ static const uint16_t bitalloc_65_codes_a[65] =
0x0790, 0x04F0, 0x09E4, 0x1E45, 0x13C5, 0x2795, 0x4F2D, 0x9E5F, 0x0790, 0x04F0, 0x09E4, 0x1E45, 0x13C5, 0x2795, 0x4F2D, 0x9E5F,
0x9E5D, 0x9E5D,
}; };
static const uint16_t bitalloc_65_codes_b[65] =
{ static const uint16_t bitalloc_65_codes_b[65] = {
0x0A8C, 0x0547, 0x01B5, 0x0008, 0x00DB, 0x0152, 0x0005, 0x000B, 0x0A8C, 0x0547, 0x01B5, 0x0008, 0x00DB, 0x0152, 0x0005, 0x000B,
0x008E, 0x00AE, 0x00E4, 0x0003, 0x0037, 0x0039, 0x0055, 0x006C, 0x008E, 0x00AE, 0x00E4, 0x0003, 0x0037, 0x0039, 0x0055, 0x006C,
0x0073, 0x0003, 0x0015, 0x001D, 0x0028, 0x0030, 0x0037, 0x003E, 0x0073, 0x0003, 0x0015, 0x001D, 0x0028, 0x0030, 0x0037, 0x003E,
@ -677,8 +640,8 @@ static const uint16_t bitalloc_65_codes_b[65] =
0x008F, 0x006C, 0x000A, 0x0153, 0x0150, 0x0009, 0x02A2, 0x01B4, 0x008F, 0x006C, 0x000A, 0x0153, 0x0150, 0x0009, 0x02A2, 0x01B4,
0x0A8D, 0x0A8D,
}; };
static const uint16_t bitalloc_65_codes_c[65] =
{ static const uint16_t bitalloc_65_codes_c[65] = {
0x045C, 0x022F, 0x03F5, 0x01BC, 0x01FB, 0x0059, 0x00D0, 0x00DF, 0x045C, 0x022F, 0x03F5, 0x01BC, 0x01FB, 0x0059, 0x00D0, 0x00DF,
0x000A, 0x002D, 0x002F, 0x0052, 0x0069, 0x0078, 0x007F, 0x000A, 0x000A, 0x002D, 0x002F, 0x0052, 0x0069, 0x0078, 0x007F, 0x000A,
0x0010, 0x001C, 0x0023, 0x002A, 0x0035, 0x003A, 0x003D, 0x0000, 0x0010, 0x001C, 0x0023, 0x002A, 0x0035, 0x003A, 0x003D, 0x0000,
@ -689,8 +652,8 @@ static const uint16_t bitalloc_65_codes_c[65] =
0x000B, 0x00FC, 0x00D1, 0x008A, 0x0058, 0x01BD, 0x0116, 0x03F4, 0x000B, 0x00FC, 0x00D1, 0x008A, 0x0058, 0x01BD, 0x0116, 0x03F4,
0x045D, 0x045D,
}; };
static const uint16_t bitalloc_65_codes_d[65] =
{ static const uint16_t bitalloc_65_codes_d[65] = {
0x70B0, 0x70B2, 0x70B4, 0x2852, 0x385B, 0x142E, 0x1C2E, 0x0A15, 0x70B0, 0x70B2, 0x70B4, 0x2852, 0x385B, 0x142E, 0x1C2E, 0x0A15,
0x0E14, 0x0214, 0x0704, 0x0104, 0x010B, 0x0383, 0x0083, 0x0143, 0x0E14, 0x0214, 0x0704, 0x0104, 0x010B, 0x0383, 0x0083, 0x0143,
0x01C3, 0x0043, 0x00A2, 0x00E2, 0x0022, 0x0052, 0x0072, 0x0012, 0x01C3, 0x0043, 0x00A2, 0x00E2, 0x0022, 0x0052, 0x0072, 0x0012,
@ -701,8 +664,8 @@ static const uint16_t bitalloc_65_codes_d[65] =
0x0E15, 0x0A16, 0x1C2F, 0x142F, 0x1428, 0x2853, 0x70B5, 0x70B3, 0x0E15, 0x0A16, 0x1C2F, 0x142F, 0x1428, 0x2853, 0x70B5, 0x70B3,
0x70B1, 0x70B1,
}; };
static const uint16_t bitalloc_65_codes_e[65] =
{ static const uint16_t bitalloc_65_codes_e[65] = {
0x032C, 0x0332, 0x0378, 0x037E, 0x008C, 0x014A, 0x0188, 0x0197, 0x032C, 0x0332, 0x0378, 0x037E, 0x008C, 0x014A, 0x0188, 0x0197,
0x019E, 0x01BD, 0x0044, 0x0047, 0x00AA, 0x00C5, 0x00CD, 0x00DC, 0x019E, 0x01BD, 0x0044, 0x0047, 0x00AA, 0x00C5, 0x00CD, 0x00DC,
0x001C, 0x002C, 0x0053, 0x0063, 0x0068, 0x0008, 0x000F, 0x0017, 0x001C, 0x002C, 0x0053, 0x0063, 0x0068, 0x0008, 0x000F, 0x0017,
@ -713,8 +676,8 @@ static const uint16_t bitalloc_65_codes_e[65] =
0x019F, 0x0198, 0x0189, 0x014B, 0x008D, 0x037F, 0x0379, 0x0333, 0x019F, 0x0198, 0x0189, 0x014B, 0x008D, 0x037F, 0x0379, 0x0333,
0x032D, 0x032D,
}; };
static const uint16_t bitalloc_65_codes_f[65] =
{ static const uint16_t bitalloc_65_codes_f[65] = {
0x0FE0, 0x0FE2, 0x0FE8, 0x0FEA, 0x0FEC, 0x0FEE, 0x0FF0, 0x0FF2, 0x0FE0, 0x0FE2, 0x0FE8, 0x0FEA, 0x0FEC, 0x0FEE, 0x0FF0, 0x0FF2,
0x0FF4, 0x2FF2, 0x07F2, 0x07FB, 0x03F6, 0x0BFA, 0x0BFD, 0x01FF, 0x0FF4, 0x2FF2, 0x07F2, 0x07FB, 0x03F6, 0x0BFA, 0x0BFD, 0x01FF,
0x05FF, 0x02FC, 0x007C, 0x017C, 0x003C, 0x00BC, 0x001C, 0x005C, 0x05FF, 0x02FC, 0x007C, 0x017C, 0x003C, 0x00BC, 0x001C, 0x005C,
@ -725,8 +688,8 @@ static const uint16_t bitalloc_65_codes_f[65] =
0x0FF5, 0x0FF3, 0x0FF1, 0x0FEF, 0x0FED, 0x0FEB, 0x0FE9, 0x0FE3, 0x0FF5, 0x0FF3, 0x0FF1, 0x0FEF, 0x0FED, 0x0FEB, 0x0FE9, 0x0FE3,
0x0FE1, 0x0FE1,
}; };
static const uint16_t bitalloc_65_codes_g[65] =
{ static const uint16_t bitalloc_65_codes_g[65] = {
0x010C, 0x038A, 0x0608, 0x0786, 0x0084, 0x0087, 0x0302, 0x0305, 0x010C, 0x038A, 0x0608, 0x0786, 0x0084, 0x0087, 0x0302, 0x0305,
0x0040, 0x00E0, 0x00E3, 0x0183, 0x001E, 0x005E, 0x009E, 0x00DE, 0x0040, 0x00E0, 0x00E3, 0x0183, 0x001E, 0x005E, 0x009E, 0x00DE,
0x00F1, 0x0011, 0x0039, 0x0061, 0x0079, 0x0009, 0x001D, 0x0031, 0x00F1, 0x0011, 0x0039, 0x0061, 0x0079, 0x0009, 0x001D, 0x0031,
@ -737,56 +700,56 @@ static const uint16_t bitalloc_65_codes_g[65] =
0x0041, 0x03C2, 0x0303, 0x01C4, 0x0085, 0x0787, 0x0609, 0x038B, 0x0041, 0x03C2, 0x0303, 0x01C4, 0x0085, 0x0787, 0x0609, 0x038B,
0x010D, 0x010D,
}; };
static const uint8_t bitalloc_65_bits_a[65] =
{ static const uint8_t bitalloc_65_bits_a[65] = {
16, 16, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 16, 16, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8,
7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4,
4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7,
7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 13, 13, 14, 15, 16, 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 13, 13, 14, 15, 16,
16, 16,
}; };
static const uint8_t bitalloc_65_bits_b[65] =
{ static const uint8_t bitalloc_65_bits_b[65] = {
12, 11, 10, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 12, 11, 10, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7,
7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4,
4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10,
12, 12,
}; };
static const uint8_t bitalloc_65_bits_c[65] =
{ static const uint8_t bitalloc_65_bits_c[65] = {
11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6,
6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6,
6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10,
11, 11,
}; };
static const uint8_t bitalloc_65_bits_d[65] =
{ static const uint8_t bitalloc_65_bits_d[65] = {
15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9,
9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 3, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 3,
3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8,
8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 15, 15, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 15, 15,
15, 15,
}; };
static const uint8_t bitalloc_65_bits_e[65] =
{ static const uint8_t bitalloc_65_bits_e[65] = {
10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8,
7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4,
3, 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 3, 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7,
7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10,
10, 10,
}; };
static const uint8_t bitalloc_65_bits_f[65] =
{ static const uint8_t bitalloc_65_bits_f[65] = {
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 11, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 11,
11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3,
3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10,
10, 11, 11, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 10, 11, 11, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14,
}; };
static const uint8_t bitalloc_65_bits_g[65] =
{ static const uint8_t bitalloc_65_bits_g[65] = {
11, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 11, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8,
8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4,
4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7,
@ -794,8 +757,7 @@ static const uint8_t bitalloc_65_bits_g[65] =
11, 11,
}; };
static const uint16_t bitalloc_129_codes_a[129] = static const uint16_t bitalloc_129_codes_a[129] = {
{
0x0660, 0x0666, 0x06EC, 0x0722, 0x0760, 0x076E, 0x004C, 0x004E, 0x0660, 0x0666, 0x06EC, 0x0722, 0x0760, 0x076E, 0x004C, 0x004E,
0x00F4, 0x010A, 0x0148, 0x0156, 0x01D4, 0x01F2, 0x0331, 0x0370, 0x00F4, 0x010A, 0x0148, 0x0156, 0x01D4, 0x01F2, 0x0331, 0x0370,
0x0377, 0x0396, 0x03B1, 0x0024, 0x0064, 0x007B, 0x008A, 0x00A5, 0x0377, 0x0396, 0x03B1, 0x0024, 0x0064, 0x007B, 0x008A, 0x00A5,
@ -814,8 +776,8 @@ static const uint16_t bitalloc_129_codes_a[129] =
0x00F5, 0x004F, 0x004D, 0x076F, 0x0761, 0x0723, 0x06ED, 0x0667, 0x00F5, 0x004F, 0x004D, 0x076F, 0x0761, 0x0723, 0x06ED, 0x0667,
0x0661, 0x0661,
}; };
static const uint16_t bitalloc_129_codes_b[129] =
{ static const uint16_t bitalloc_129_codes_b[129] = {
0x29DC, 0x14EF, 0x0455, 0x0E9C, 0x022B, 0x0489, 0x0740, 0x074F, 0x29DC, 0x14EF, 0x0455, 0x0E9C, 0x022B, 0x0489, 0x0740, 0x074F,
0x0172, 0x0245, 0x0247, 0x030A, 0x03A1, 0x001C, 0x008B, 0x00D6, 0x0172, 0x0245, 0x0247, 0x030A, 0x03A1, 0x001C, 0x008B, 0x00D6,
0x010C, 0x0148, 0x014F, 0x0186, 0x01D1, 0x0008, 0x000F, 0x0046, 0x010C, 0x0148, 0x014F, 0x0186, 0x01D1, 0x0008, 0x000F, 0x0046,
@ -834,8 +796,8 @@ static const uint16_t bitalloc_129_codes_b[129] =
0x0173, 0x0114, 0x0741, 0x053A, 0x0488, 0x0E9D, 0x0A76, 0x0454, 0x0173, 0x0114, 0x0741, 0x053A, 0x0488, 0x0E9D, 0x0A76, 0x0454,
0x29DD, 0x29DD,
}; };
static const uint16_t bitalloc_129_codes_c[129] =
{ static const uint16_t bitalloc_129_codes_c[129] = {
0x0E5C, 0x072F, 0x001D, 0x0724, 0x000F, 0x010D, 0x0324, 0x0393, 0x0E5C, 0x072F, 0x001D, 0x0724, 0x000F, 0x010D, 0x0324, 0x0393,
0x03E9, 0x0080, 0x0087, 0x00FA, 0x0164, 0x0193, 0x01DE, 0x01F5, 0x03E9, 0x0080, 0x0087, 0x00FA, 0x0164, 0x0193, 0x01DE, 0x01F5,
0x0010, 0x002A, 0x0041, 0x0064, 0x0073, 0x008E, 0x00A4, 0x00B3, 0x0010, 0x002A, 0x0041, 0x0064, 0x0073, 0x008E, 0x00A4, 0x00B3,
@ -854,8 +816,8 @@ static const uint16_t bitalloc_129_codes_c[129] =
0x0006, 0x03E8, 0x0325, 0x01CA, 0x010C, 0x0725, 0x0396, 0x001C, 0x0006, 0x03E8, 0x0325, 0x01CA, 0x010C, 0x0725, 0x0396, 0x001C,
0x0E5D, 0x0E5D,
}; };
static const uint16_t bitalloc_129_codes_d[129] =
{ static const uint16_t bitalloc_129_codes_d[129] = {
0xA598, 0xA59A, 0xA59C, 0xA59E, 0xC598, 0xE586, 0x3ACC, 0x52CA, 0xA598, 0xA59A, 0xA59C, 0xA59E, 0xC598, 0xE586, 0x3ACC, 0x52CA,
0x62CD, 0x0D48, 0x1D67, 0x2978, 0x3167, 0x3966, 0x06A5, 0x0EBC, 0x62CD, 0x0D48, 0x1D67, 0x2978, 0x3167, 0x3966, 0x06A5, 0x0EBC,
0x14BD, 0x1CB1, 0x0350, 0x0353, 0x075F, 0x0A5F, 0x0C5E, 0x0E5E, 0x14BD, 0x1CB1, 0x0350, 0x0353, 0x075F, 0x0A5F, 0x0C5E, 0x0E5E,
@ -874,8 +836,8 @@ static const uint16_t bitalloc_129_codes_d[129] =
0x72C2, 0x52CB, 0x3ACD, 0xE587, 0xC599, 0xA59F, 0xA59D, 0xA59B, 0x72C2, 0x52CB, 0x3ACD, 0xE587, 0xC599, 0xA59F, 0xA59D, 0xA59B,
0xA599, 0xA599,
}; };
static const uint16_t bitalloc_129_codes_e[129] =
{ static const uint16_t bitalloc_129_codes_e[129] = {
0xA13C, 0xC720, 0xA13F, 0xA13E, 0xA13D, 0xE722, 0x5090, 0x6393, 0xA13C, 0xC720, 0xA13F, 0xA13E, 0xA13D, 0xE722, 0x5090, 0x6393,
0x7392, 0x2849, 0x31CE, 0x39CE, 0x1425, 0x18E5, 0x1CE5, 0x0844, 0x7392, 0x2849, 0x31CE, 0x39CE, 0x1425, 0x18E5, 0x1CE5, 0x0844,
0x0A1C, 0x0C7C, 0x036C, 0x0423, 0x050F, 0x063F, 0x01B7, 0x0216, 0x0A1C, 0x0C7C, 0x036C, 0x0423, 0x050F, 0x063F, 0x01B7, 0x0216,
@ -894,8 +856,8 @@ static const uint16_t bitalloc_129_codes_e[129] =
0x7393, 0x7390, 0x5091, 0xE723, 0xC724, 0xC725, 0xC722, 0xC723, 0x7393, 0x7390, 0x5091, 0xE723, 0xC724, 0xC725, 0xC722, 0xC723,
0xC721, 0xC721,
}; };
static const uint16_t bitalloc_129_codes_f[129] =
{ static const uint16_t bitalloc_129_codes_f[129] = {
0x762C, 0x3B17, 0x1555, 0x0608, 0x0AAB, 0x0FF2, 0x0305, 0x0307, 0x762C, 0x3B17, 0x1555, 0x0608, 0x0AAB, 0x0FF2, 0x0305, 0x0307,
0x0763, 0x0046, 0x010C, 0x01BC, 0x02AB, 0x03B6, 0x03FD, 0x0080, 0x0763, 0x0046, 0x010C, 0x01BC, 0x02AB, 0x03B6, 0x03FD, 0x0080,
0x0087, 0x00DF, 0x0156, 0x01D9, 0x01F8, 0x01FF, 0x002A, 0x0041, 0x0087, 0x00DF, 0x0156, 0x01D9, 0x01F8, 0x01FF, 0x002A, 0x0041,
@ -914,8 +876,8 @@ static const uint16_t bitalloc_129_codes_f[129] =
0x07F8, 0x0554, 0x0306, 0x0FF3, 0x0EC4, 0x0609, 0x1D8A, 0x1554, 0x07F8, 0x0554, 0x0306, 0x0FF3, 0x0EC4, 0x0609, 0x1D8A, 0x1554,
0x762D, 0x762D,
}; };
static const uint16_t bitalloc_129_codes_g[129] =
{ static const uint16_t bitalloc_129_codes_g[129] = {
0x1E20, 0x1E5E, 0x031C, 0x051A, 0x0718, 0x0916, 0x0B14, 0x0D12, 0x1E20, 0x1E5E, 0x031C, 0x051A, 0x0718, 0x0916, 0x0B14, 0x0D12,
0x0F11, 0x0090, 0x018F, 0x028E, 0x038D, 0x048C, 0x058B, 0x068A, 0x0F11, 0x0090, 0x018F, 0x028E, 0x038D, 0x048C, 0x058B, 0x068A,
0x0789, 0x0049, 0x00C8, 0x0148, 0x01C7, 0x0247, 0x02C6, 0x0346, 0x0789, 0x0049, 0x00C8, 0x0148, 0x01C7, 0x0247, 0x02C6, 0x0346,
@ -934,8 +896,8 @@ static const uint16_t bitalloc_129_codes_g[129] =
0x0F2E, 0x0D13, 0x0B15, 0x0917, 0x0719, 0x051B, 0x031D, 0x1E5F, 0x0F2E, 0x0D13, 0x0B15, 0x0917, 0x0719, 0x051B, 0x031D, 0x1E5F,
0x1E21, 0x1E21,
}; };
static const uint8_t bitalloc_129_bits_a[129] =
{ static const uint8_t bitalloc_129_bits_a[129] = {
11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 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, 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, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7,
@ -946,8 +908,8 @@ static const uint8_t bitalloc_129_bits_a[129] =
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11,
11, 11,
}; };
static const uint8_t bitalloc_129_bits_b[129] =
{ static const uint8_t bitalloc_129_bits_b[129] = {
14, 13, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 9, 14, 13, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 9,
9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 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, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6,
@ -958,8 +920,8 @@ static const uint8_t bitalloc_129_bits_b[129] =
9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12,
14, 14,
}; };
static const uint8_t bitalloc_129_bits_c[129] =
{ static const uint8_t bitalloc_129_bits_c[129] = {
13, 12, 11, 11, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 13, 12, 11, 11, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 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, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6,
@ -970,8 +932,8 @@ static const uint8_t bitalloc_129_bits_c[129] =
8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11,
13, 13,
}; };
static const uint8_t bitalloc_129_bits_d[129] =
{ static const uint8_t bitalloc_129_bits_d[129] = {
16, 16, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 16, 16, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13,
13, 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 10, 10, 10, 13, 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 10, 10, 10,
10, 10, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 7, 7, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 7, 7,
@ -982,8 +944,8 @@ static const uint8_t bitalloc_129_bits_d[129] =
13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16,
16, 16,
}; };
static const uint8_t bitalloc_129_bits_e[129] =
{ static const uint8_t bitalloc_129_bits_e[129] = {
16, 16, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 16, 16, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12,
12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9,
8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6,
@ -994,8 +956,8 @@ static const uint8_t bitalloc_129_bits_e[129] =
12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16,
16, 16,
}; };
static const uint8_t bitalloc_129_bits_f[129] =
{ static const uint8_t bitalloc_129_bits_f[129] = {
15, 14, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 10, 10, 9, 15, 14, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 10, 10, 9,
9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 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, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6,
@ -1006,8 +968,8 @@ static const uint8_t bitalloc_129_bits_f[129] =
9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13,
15, 15,
}; };
static const uint8_t bitalloc_129_bits_g[129] =
{ static const uint8_t bitalloc_129_bits_g[129] = {
13, 13, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 13, 13, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11,
11, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 11, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9,
9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7,
@ -1019,10 +981,13 @@ static const uint8_t bitalloc_129_bits_g[129] =
13, 13,
}; };
static const uint8_t bitalloc_sizes[10] = { 3, 5, 7, 9, 13, 17, 25, 33, 65, 129 }; static const uint8_t bitalloc_sizes[10] = {
3, 5, 7, 9, 13, 17, 25, 33, 65, 129
};
static const int8_t bitalloc_offsets[10] = static const int8_t bitalloc_offsets[10] = {
{ -1, -2, -3, -4, -6, -8, -12, -16, -32, -64 }; -1, -2, -3, -4, -6, -8, -12, -16, -32, -64
};
static const uint8_t bitalloc_maxbits[10][7] = { static const uint8_t bitalloc_maxbits[10][7] = {
{ 2 }, { 2 },
@ -1037,7 +1002,7 @@ static const uint8_t bitalloc_maxbits[10][7] = {
{ 9, 9, 9, 9, 9, 9, 9 } { 9, 9, 9, 9, 9, 9, 9 }
}; };
static const uint16_t* const bitalloc_codes[10][8] = { static const uint16_t *const bitalloc_codes[10][8] = {
{ bitalloc_3_codes, NULL }, { bitalloc_3_codes, NULL },
{ bitalloc_5_codes_a, bitalloc_5_codes_b, bitalloc_5_codes_c, NULL }, { bitalloc_5_codes_a, bitalloc_5_codes_b, bitalloc_5_codes_c, NULL },
{ bitalloc_7_codes_a, bitalloc_7_codes_b, bitalloc_7_codes_c, NULL }, { bitalloc_7_codes_a, bitalloc_7_codes_b, bitalloc_7_codes_c, NULL },
@ -1055,7 +1020,7 @@ static const uint16_t* const bitalloc_codes[10][8] = {
bitalloc_129_codes_e, bitalloc_129_codes_f, bitalloc_129_codes_g, NULL } bitalloc_129_codes_e, bitalloc_129_codes_f, bitalloc_129_codes_g, NULL }
}; };
static const uint8_t* const bitalloc_bits[10][8] = { static const uint8_t *const bitalloc_bits[10][8] = {
{ bitalloc_3_bits, NULL }, { bitalloc_3_bits, NULL },
{ bitalloc_5_bits_a, bitalloc_5_bits_b, bitalloc_5_bits_c, NULL }, { bitalloc_5_bits_a, bitalloc_5_bits_b, bitalloc_5_bits_c, NULL },
{ bitalloc_7_bits_a, bitalloc_7_bits_b, bitalloc_7_bits_c, NULL }, { bitalloc_7_bits_a, bitalloc_7_bits_b, bitalloc_7_bits_c, NULL },

Loading…
Cancel
Save