static int decode_slice_chroma(AVCodecContext *avctx, SliceContext *slice,

                               uint16_t *dst, int dst_stride,

                               const uint8_t *buf, unsigned buf_size,

                               const int16_t *qmat, int log2_blocks_per_mb)

{

    ProresContext *ctx = avctx->priv_data;

    LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]);

    int16_t *block;

    GetBitContext gb;

    int i, j, blocks_per_slice = slice->mb_count << log2_blocks_per_mb;

    int ret;



    for (i = 0; i < blocks_per_slice; i++)

        ctx->bdsp.clear_block(blocks+(i<<6));



    init_get_bits(&gb, buf, buf_size << 3);



    decode_dc_coeffs(&gb, blocks, blocks_per_slice);

    if ((ret = decode_ac_coeffs(avctx, &gb, blocks, blocks_per_slice)) < 0)

        return ret;



    block = blocks;

    for (i = 0; i < slice->mb_count; i++) {

        for (j = 0; j < log2_blocks_per_mb; j++) {

            ctx->prodsp.idct_put(dst,              dst_stride, block+(0<<6), qmat);

            ctx->prodsp.idct_put(dst+4*dst_stride, dst_stride, block+(1<<6), qmat);

            block += 2*64;

            dst += 8;

        }

    }

    return 0;

}

static int decode_slice_chroma(AVCodecContext *avctx, SliceContext *slice,

                               uint16_t *dst, int dst_stride,

                               const uint8_t *buf, unsigned buf_size,

                               const int16_t *qmat, int log2_blocks_per_mb)

{

    ProresContext *ctx = avctx->priv_data;

    LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]);

    int16_t *block;

    GetBitContext gb;

    int i, j, blocks_per_slice = slice->mb_count << log2_blocks_per_mb;

    int ret;



    for (i = 0; i < blocks_per_slice; i++)

        ctx->bdsp.clear_block(blocks+(i<<6));



    init_get_bits(&gb, buf, buf_size << 3);



    decode_dc_coeffs(&gb, blocks, blocks_per_slice);

    if ((ret = decode_ac_coeffs(avctx, &gb, blocks, blocks_per_slice)) < 0)

        return ret;



    block = blocks;

    for (i = 0; i < slice->mb_count; i++) {

        for (j = 0; j < log2_blocks_per_mb; j++) {

            ctx->prodsp.idct_put(dst,              dst_stride, block+(0<<6), qmat);

            ctx->prodsp.idct_put(dst+4*dst_stride, dst_stride, block+(1<<6), qmat);

            block += 2*64;

            dst += 8;

        }

    }

    return 0;

}

    decode_dc_coeffs(&gb, blocks, blocks_per_slice);     decode_dc_coeffs(&gb, blocks, blocks_per_slice);
static int FUNC_0(AVCodecContext *VAR_0, SliceContext *VAR_1,

                               uint16_t *VAR_2, int VAR_3,

                               const uint8_t *VAR_4, unsigned VAR_5,

                               const int16_t *VAR_6, int VAR_7)

{

    ProresContext *ctx = VAR_0->priv_data;

    LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]);

    int16_t *block;

    GetBitContext gb;

    int VAR_8, VAR_9, VAR_10 = VAR_1->mb_count << VAR_7;

    int VAR_11;



    for (VAR_8 = 0; VAR_8 < VAR_10; VAR_8++)

        ctx->bdsp.clear_block(blocks+(VAR_8<<6));



    init_get_bits(&gb, VAR_4, VAR_5 << 3);



    decode_dc_coeffs(&gb, blocks, VAR_10);

    if ((VAR_11 = decode_ac_coeffs(VAR_0, &gb, blocks, VAR_10)) < 0)

        return VAR_11;



    block = blocks;

    for (VAR_8 = 0; VAR_8 < VAR_1->mb_count; VAR_8++) {

        for (VAR_9 = 0; VAR_9 < VAR_7; VAR_9++) {

            ctx->prodsp.idct_put(VAR_2,              VAR_3, block+(0<<6), VAR_6);

            ctx->prodsp.idct_put(VAR_2+4*VAR_3, VAR_3, block+(1<<6), VAR_6);

            block += 2*64;

            VAR_2 += 8;

        }

    }

    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0, SliceContext *VAR_1,
uint16_t *VAR_2, int VAR_3,
const uint8_t *VAR_4, unsigned VAR_5,
const int16_t *VAR_6, int VAR_7)
{ ProresContext *ctx = VAR_0->priv_data; LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]); int16_t *block; GetBitContext gb; int VAR_8, VAR_9, VAR_10 = VAR_1->mb_count << VAR_7; int VAR_11; for (VAR_8 = 0; VAR_8 < VAR_10; VAR_8++) ctx->bdsp.clear_block(blocks+(VAR_8<<6)); init_get_bits(&gb, VAR_4, VAR_5 << 3); decode_dc_coeffs(&gb, blocks, VAR_10); if ((VAR_11 = decode_ac_coeffs(VAR_0, &gb, blocks, VAR_10)) < 0)
return VAR_11; block = blocks; for (VAR_8 = 0; VAR_8 < VAR_1->mb_count; VAR_8++) { for (VAR_9 = 0; VAR_9 < VAR_7; VAR_9++) { ctx->prodsp.idct_put(VAR_2,              VAR_3, block+(0<<6), VAR_6); ctx->prodsp.idct_put(VAR_2+4*VAR_3, VAR_3, block+(1<<6), VAR_6); block += 2*64; VAR_2 += 8; } } return 0; }