#include "get_bits.h"
#include "unary.h"
#include "mpeg4audio.h"
-#include "bytestream.h"
#include "bgmc.h"
#include "bswapdsp.h"
#include "internal.h"
}
for (k = 2; k < opt_order; k++)
- quant_cof[k] = (quant_cof[k] << 14) + (add_base << 13);
+ quant_cof[k] = (quant_cof[k] * (1 << 14)) + (add_base << 13);
}
}
res >>= 1;
if (cur_k) {
- res <<= cur_k;
+ res *= 1 << cur_k;
res |= get_bits_long(gb, cur_k);
}
}
independent_bs = 2;
// if this is the last channel, it has to be decoded independently
- if (c == avctx->channels - 1)
+ if (c == avctx->channels - 1 || (c & 1))
independent_bs = 1;
if (independent_bs) {