- *data_size = 2 * 3 * buf_size;
-
- return buf_size;
-}
-
-static int mace6_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
- const uint8_t *buf, int buf_size)
-{
- int16_t *samples = data;
- MACEContext *ctx = avctx->priv_data;
- int i, j, l;
-
- if (*data_size < 2 * 6 * buf_size) {
- av_log(avctx, AV_LOG_ERROR, "Output buffer too small!\n");
- return -1;
- }
-
- for(i = 0; i < avctx->channels; i++) {
- int16_t *output = samples + i;
-
- for (j = 0; j < buf_size / avctx->channels; j++) {
- uint8_t pkt = buf[i + j*avctx->channels];
- uint8_t val[3] = {pkt >> 5, (pkt >> 3) & 3, pkt & 7};
-
- for (l=0; l < 3; l++) {
- chomp6(&ctx->chd[i], output, val[l], l, avctx->channels);
- output += avctx->channels << 1;
- }
- }
- }
-
- *data_size = 2 * 6 * buf_size;