50     { {-52, 4}, {-29, 5}, {-31, 4}, { 19, 4}, {-16, 4},
 
   51       { 12, 3}, { -7, 3}, {  9, 3}, { -5, 3}, {  6, 3},
 
   52       { -4, 3}, {  3, 3}, { -3, 2}, {  3, 2}, { -2, 2},
 
   53       {  3, 2}, { -1, 2}, {  2, 2}, { -1, 2}, {  2, 2} },
 
   54     { {-58, 3}, {-42, 4}, {-46, 4}, { 37, 5}, {-36, 4},
 
   55       { 29, 4}, {-29, 4}, { 25, 4}, {-23, 4}, { 20, 4},
 
   56       {-17, 4}, { 16, 4}, {-12, 4}, { 12, 3}, {-10, 4},
 
   57       {  7, 3}, { -4, 4}, {  3, 3}, { -1, 3}, {  1, 3} },
 
   58     { {-59, 3}, {-45, 5}, {-50, 4}, { 38, 4}, {-39, 4},
 
   59       { 32, 4}, {-30, 4}, { 25, 3}, {-23, 3}, { 20, 3},
 
   60       {-20, 3}, { 16, 3}, {-13, 3}, { 10, 3}, { -7, 3},
 
   61       {  3, 3}, {  0, 3}, { -1, 3}, {  2, 3}, { -1, 2} }
 
   71     -1048544 / 32, -1048288 / 32, -1047776 / 32, -1047008 / 32,
 
   72     -1045984 / 32, -1044704 / 32, -1043168 / 32, -1041376 / 32,
 
   73     -1039328 / 32, -1037024 / 32, -1034464 / 32, -1031648 / 32,
 
   74     -1028576 / 32, -1025248 / 32, -1021664 / 32, -1017824 / 32,
 
   75     -1013728 / 32, -1009376 / 32, -1004768 / 32,  -999904 / 32,
 
   76      -994784 / 32,  -989408 / 32,  -983776 / 32,  -977888 / 32,
 
   77      -971744 / 32,  -965344 / 32,  -958688 / 32,  -951776 / 32,
 
   78      -944608 / 32,  -937184 / 32,  -929504 / 32,  -921568 / 32,
 
   79      -913376 / 32,  -904928 / 32,  -896224 / 32,  -887264 / 32,
 
   80      -878048 / 32,  -868576 / 32,  -858848 / 32,  -848864 / 32,
 
   81      -838624 / 32,  -828128 / 32,  -817376 / 32,  -806368 / 32,
 
   82      -795104 / 32,  -783584 / 32,  -771808 / 32,  -759776 / 32,
 
   83      -747488 / 32,  -734944 / 32,  -722144 / 32,  -709088 / 32,
 
   84      -695776 / 32,  -682208 / 32,  -668384 / 32,  -654304 / 32,
 
   85      -639968 / 32,  -625376 / 32,  -610528 / 32,  -595424 / 32,
 
   86      -580064 / 32,  -564448 / 32,  -548576 / 32,  -532448 / 32,
 
   87      -516064 / 32,  -499424 / 32,  -482528 / 32,  -465376 / 32,
 
   88      -447968 / 32,  -430304 / 32,  -412384 / 32,  -394208 / 32,
 
   89      -375776 / 32,  -357088 / 32,  -338144 / 32,  -318944 / 32,
 
   90      -299488 / 32,  -279776 / 32,  -259808 / 32,  -239584 / 32,
 
   91      -219104 / 32,  -198368 / 32,  -177376 / 32,  -156128 / 32,
 
   92      -134624 / 32,  -112864 / 32,   -90848 / 32,   -68576 / 32,
 
   93       -46048 / 32,   -23264 / 32,     -224 / 32,    23072 / 32,
 
   94        46624 / 32,    70432 / 32,    94496 / 32,   118816 / 32,
 
   95       143392 / 32,   168224 / 32,   193312 / 32,   218656 / 32,
 
   96       244256 / 32,   270112 / 32,   296224 / 32,   322592 / 32,
 
   97       349216 / 32,   376096 / 32,   403232 / 32,   430624 / 32,
 
   98       458272 / 32,   486176 / 32,   514336 / 32,   542752 / 32,
 
   99       571424 / 32,   600352 / 32,   629536 / 32,   658976 / 32,
 
  100       688672 / 32,   718624 / 32,   748832 / 32,   779296 / 32,
 
  101       810016 / 32,   840992 / 32,   872224 / 32,   903712 / 32,
 
  102       935456 / 32,   967456 / 32,   999712 / 32,  1032224 / 32
 
  121     204,  192,  179,  166,  153,  140,  128,  115,
 
  122     102,   89,   76,   64,   51,   38,   25,   12,
 
  123       0,  -12,  -25,  -38,  -51,  -64,  -76,  -89,
 
  124    -102, -115, -128, -140, -153, -166, -179, -192
 
  131     { 74, 44, 25, 13,  7, 3},
 
  132     { 68, 42, 24, 13,  7, 3},
 
  133     { 58, 39, 23, 13,  7, 3},
 
  134     {126, 70, 37, 19, 10, 5},
 
  135     {132, 70, 37, 20, 10, 5},
 
  136     {124, 70, 38, 20, 10, 5},
 
  137     {120, 69, 37, 20, 11, 5},
 
  138     {116, 67, 37, 20, 11, 5},
 
  139     {108, 66, 36, 20, 10, 5},
 
  140     {102, 62, 36, 20, 10, 5},
 
  141     { 88, 58, 34, 19, 10, 5},
 
  142     {162, 89, 49, 25, 13, 7},
 
  143     {156, 87, 49, 26, 14, 7},
 
  144     {150, 86, 47, 26, 14, 7},
 
  145     {142, 84, 47, 26, 14, 7},
 
  146     {131, 79, 46, 26, 14, 7}
 
  286     int i, config_offset;
 
  290     uint32_t als_id, header_size, trailer_size;
 
  299     if (config_offset < 0)
 
  339     if (als_id != 
MKBETAG(
'A',
'L',
'S',
'\0'))
 
  352         int chan_pos_bits = av_ceil_log2(avctx->
channels);
 
  353         int bits_needed  = avctx->
channels * chan_pos_bits + 7;
 
  362         for (i = 0; i < avctx->
channels; i++) {
 
  385     if (header_size  == 0xFFFFFFFF)
 
  387     if (trailer_size == 0xFFFFFFFF)
 
  390     ht_size = ((int64_t)(header_size) + (int64_t)(trailer_size)) << 3;
 
  397     if (ht_size > INT32_MAX)
 
  410             ctx->
crc       = 0xFFFFFFFF;
 
  433     #define MISSING_ERR(cond, str, errval)              \ 
  436             av_log_missing_feature(ctx->avctx, str, 0); \ 
  452                           unsigned int div, 
unsigned int **div_blocks,
 
  453                           unsigned int *num_blocks)
 
  455     if (n < 31 && ((bs_info << n) & 0x40000000)) {
 
  496     for (i = 0, j = k - 1; i < j; i++, j--) {
 
  497         int tmp1 = ((
MUL64(par[k], cof[j]) + (1 << 19)) >> 20);
 
  498         cof[j]  += ((
MUL64(par[k], cof[i]) + (1 << 19)) >> 20);
 
  502         cof[i] += ((
MUL64(par[k], cof[j]) + (1 << 19)) >> 20);
 
  517     unsigned int *ptr_div_blocks = div_blocks;
 
  523         *bs_info <<= (32 - bs_info_len);
 
  551             if (remaining <= div_blocks[b]) {
 
  552                 div_blocks[
b] = remaining;
 
  557             remaining -= div_blocks[
b];
 
  617     unsigned int sub_blocks, log2_sub_blocks, sb_length;
 
  618     unsigned int start      = 0;
 
  619     unsigned int opt_order;
 
  643     sub_blocks = 1 << log2_sub_blocks;
 
  649                "Block length is not evenly divisible by the number of subblocks.\n");
 
  657         for (k = 1; k < sub_blocks; k++)
 
  660         for (k = 0; k < sub_blocks; k++) {
 
  666         for (k = 1; k < sub_blocks; k++)
 
  669     for (k = 1; k < sub_blocks; k++)
 
  683             int opt_order_length = av_ceil_log2(av_clip((bd->
block_length >> 3) - 1,
 
  711                 for (k = 2; k < opt_order; k++)
 
  718                 k_max = 
FFMIN(opt_order, 20);
 
  719                 for (k = 0; k < k_max; k++) {
 
  723                     if (quant_cof[k] < -64 || quant_cof[k] > 63) {
 
  730                 k_max = 
FFMIN(opt_order, 127);
 
  731                 for (; k < k_max; k++)
 
  735                 for (; k < opt_order; k++)
 
  744             for (k = 2; k < opt_order; k++)
 
  745                 quant_cof[k] = (quant_cof[k] << 14) + (add_base << 13);
 
  780         start = 
FFMIN(opt_order, 3);
 
  787         unsigned int b = av_clip((av_ceil_log2(bd->
block_length) - 3) >> 1, 0, 5);
 
  798         for (sb = 0; sb < sub_blocks; sb++) {
 
  799             unsigned int sb_len  = sb_length - (sb ? 0 : start);
 
  801             k    [sb] = s[sb] > b ? s[sb] - b : 0;
 
  802             delta[sb] = 5 - s[sb] + k[sb];
 
  807             current_res += sb_len;
 
  816         for (sb = 0; sb < sub_blocks; sb++, start = 0) {
 
  817             unsigned int cur_tail_code = 
tail_code[sx[sb]][delta[sb]];
 
  818             unsigned int cur_k         = k[sb];
 
  819             unsigned int cur_s         = s[sb];
 
  821             for (; start < sb_length; start++) {
 
  824                 if (res == cur_tail_code) {
 
  825                     unsigned int max_msb =   (2 + (sx[sb] > 2) + (sx[sb] > 10))
 
  831                         res += (max_msb    ) << cur_k;
 
  833                         res -= (max_msb - 1) << cur_k;
 
  836                     if (res > cur_tail_code)
 
  850                 *current_res++ = res;
 
  856         for (sb = 0; sb < sub_blocks; sb++, start = 0)
 
  857             for (; start < sb_length; start++)
 
  874     unsigned int smp = 0;
 
  889         for (ltp_smp = 
FFMAX(*bd->
ltp_lag - 2, 0); ltp_smp < block_length; ltp_smp++) {
 
  890             int center = ltp_smp - *bd->
ltp_lag;
 
  891             int begin  = 
FFMAX(0, center - 2);
 
  892             int end    = center + 3;
 
  893             int tab    = 5 - (end - begin);
 
  898             for (base = begin; base < 
end; base++, tab++)
 
  901             raw_samples[ltp_smp] += y >> 7;
 
  907         for (smp = 0; smp < opt_order; smp++) {
 
  910             for (sb = 0; sb < smp; sb++)
 
  911                 y += 
MUL64(lpc_cof[sb], raw_samples[-(sb + 1)]);
 
  913             *raw_samples++ -= y >> 20;
 
  917         for (k = 0; k < opt_order; k++)
 
  937             for (sb = -1; sb >= -sconf->
max_order; sb--)
 
  938                 raw_samples[sb] = right[sb] - left[sb];
 
  943             for (sb = -1; sb >= -sconf->
max_order; sb--)
 
  948     lpc_cof = lpc_cof + opt_order;
 
  950     for (sb = 0; sb < opt_order; sb++)
 
  951         lpc_cof_reversed[sb] = lpc_cof[-(sb + 1)];
 
  955     lpc_cof     = lpc_cof_reversed + opt_order;
 
  957     for (; raw_samples < raw_samples_end; raw_samples++) {
 
  960         for (sb = -opt_order; sb < 0; sb++)
 
  961             y += 
MUL64(lpc_cof[sb], raw_samples[sb]);
 
  963         *raw_samples -= y >> 20;
 
  971                sizeof(*raw_samples) * sconf->
max_order);
 
 1041                            const unsigned int *div_blocks, 
int32_t *buf)
 
 1043     unsigned int count = 0;
 
 1046         count += div_blocks[b++];
 
 1049         memset(buf, 0, 
sizeof(*buf) * count);
 
 1056                              unsigned int c, 
const unsigned int *div_blocks,
 
 1057                              unsigned int *js_blocks)
 
 1095                          unsigned int c, 
const unsigned int *div_blocks,
 
 1096                          unsigned int *js_blocks)
 
 1150         if (bd[0].js_blocks) {
 
 1151             if (bd[1].js_blocks)
 
 1154             for (s = 0; s < div_blocks[
b]; s++)
 
 1155                 bd[0].raw_samples[s] = bd[1].raw_samples[s] - bd[0].raw_samples[s];
 
 1156         } 
else if (bd[1].js_blocks) {
 
 1157             for (s = 0; s < div_blocks[
b]; s++)
 
 1158                 bd[1].raw_samples[s] = bd[1].raw_samples[s] + bd[0].raw_samples[s];
 
 1161         offset  += div_blocks[
b];
 
 1213     if (entries == channels) {
 
 1230     unsigned int   dep = 0;
 
 1238     while (dep < channels && !ch[dep].stop_flag) {
 
 1240                                    ch[dep].master_channel);
 
 1245     if (dep == channels) {
 
 1262     while (!ch[dep].stop_flag) {
 
 1264         unsigned int begin = 1;
 
 1269         if (ch[dep].time_diff_flag) {
 
 1272             if (ch[dep].time_diff_sign) {
 
 1279             for (smp = begin; smp < 
end; smp++) {
 
 1281                      MUL64(ch[dep].weighting[0], master[smp - 1    ]) +
 
 1282                      MUL64(ch[dep].weighting[1], master[smp        ]) +
 
 1283                      MUL64(ch[dep].weighting[2], master[smp + 1    ]) +
 
 1284                      MUL64(ch[dep].weighting[3], master[smp - 1 + t]) +
 
 1285                      MUL64(ch[dep].weighting[4], master[smp     + t]) +
 
 1286                      MUL64(ch[dep].weighting[5], master[smp + 1 + t]);
 
 1291             for (smp = begin; smp < 
end; smp++) {
 
 1293                      MUL64(ch[dep].weighting[0], master[smp - 1]) +
 
 1294                      MUL64(ch[dep].weighting[1], master[smp    ]) +
 
 1295                      MUL64(ch[dep].weighting[2], master[smp + 1]);
 
 1315     unsigned int div_blocks[32];                
 
 1317     unsigned int js_blocks[2];
 
 1319     uint32_t bs_info = 0;
 
 1333         for (c = 0; c < avctx->
channels; c++) {
 
 1349             if (independent_bs) {
 
 1372         for (c = 0; c < avctx->
channels; c++)
 
 1378         memset(reverted_channels, 0, 
sizeof(*reverted_channels) * avctx->
channels);
 
 1388             for (c = 0; c < avctx->
channels; c++) {
 
 1407             for (c = 0; c < avctx->
channels; c++)
 
 1409                                                reverted_channels, offset, c))
 
 1412             for (c = 0; c < avctx->
channels; c++) {
 
 1428             memset(reverted_channels, 0, avctx->
channels * 
sizeof(*reverted_channels));
 
 1429             offset      += div_blocks[
b];
 
 1434         for (c = 0; c < avctx->
channels; c++)
 
 1455     int buffer_size          = avpkt->
size;
 
 1456     int invalid_frame, ret;
 
 1468     if (sconf->
samples != 0xFFFFFFFF)
 
 1477                "Reading frame data failed. Skipping RA unit.\n");
 
 1489     #define INTERLEAVE_OUTPUT(bps)                                                   \ 
 1491         int##bps##_t *dest = (int##bps##_t*)frame->data[0];                          \ 
 1492         shift = bps - ctx->avctx->bits_per_raw_sample;                               \ 
 1493         if (!ctx->cs_switch) {                                                       \ 
 1494             for (sample = 0; sample < ctx->cur_frame_length; sample++)               \ 
 1495                 for (c = 0; c < avctx->channels; c++)                                \ 
 1496                     *dest++ = ctx->raw_samples[c][sample] << shift;                  \ 
 1498             for (sample = 0; sample < ctx->cur_frame_length; sample++)               \ 
 1499                 for (c = 0; c < avctx->channels; c++)                                \ 
 1500                     *dest++ = ctx->raw_samples[sconf->chan_pos[c]][sample] << shift; \ 
 1512         int swap = HAVE_BIGENDIAN != sconf->
msb_first;
 
 1526                 if (!HAVE_BIGENDIAN)
 
 1536                     int16_t *src  = (int16_t*) frame->
data[0];
 
 1544                                        (uint32_t *)frame->
data[0],
 
 1549                 crc_source = frame->
data[0];
 
 1567     bytes_read = invalid_frame ? buffer_size :
 
 1614     unsigned int channel_size;
 
 1677     for (c = 0; c < num_buffers; c++) {
 
 1702     for (c = 0; c < num_buffers; c++)
 
 1708                                            num_buffers * num_buffers);
 
 1720         for (c = 0; c < num_buffers; c++)
 
 1743     for (c = 1; c < avctx->
channels; c++)