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

                             uint16_t *dst, int dst_stride,

                             const uint8_t *buf, unsigned buf_size,

                             const int16_t *qmat)

{

    ProresContext *ctx = avctx->priv_data;

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

    int16_t *block;

    GetBitContext gb;

    int i, blocks_per_slice = slice->mb_count<<2;

    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++) {

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

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

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

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

        block += 4*64;

        dst += 16;

    }

    return 0;

}

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

                             uint16_t *dst, int dst_stride,

                             const uint8_t *buf, unsigned buf_size,

                             const int16_t *qmat)

{

    ProresContext *ctx = avctx->priv_data;

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

    int16_t *block;

    GetBitContext gb;

    int i, blocks_per_slice = slice->mb_count<<2;

    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++) {

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

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

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

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

        block += 4*64;

        dst += 16;

    }

    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)

{

    ProresContext *ctx = VAR_0->priv_data;

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

    int16_t *block;

    GetBitContext gb;

    int VAR_7, VAR_8 = VAR_1->mb_count<<2;

    int VAR_9;



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

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



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



    decode_dc_coeffs(&gb, blocks, VAR_8);

    if ((VAR_9 = decode_ac_coeffs(VAR_0, &gb, blocks, VAR_8)) < 0)

        return VAR_9;



    block = blocks;

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

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

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

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

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

        block += 4*64;

        VAR_2 += 16;

    }

    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)
{ ProresContext *ctx = VAR_0->priv_data; LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]); int16_t *block; GetBitContext gb; int VAR_7, VAR_8 = VAR_1->mb_count<<2; int VAR_9; for (VAR_7 = 0; VAR_7 < VAR_8; VAR_7++) ctx->bdsp.clear_block(blocks+(VAR_7<<6)); init_get_bits(&gb, VAR_4, VAR_5 << 3); decode_dc_coeffs(&gb, blocks, VAR_8); if ((VAR_9 = decode_ac_coeffs(VAR_0, &gb, blocks, VAR_8)) < 0)
return VAR_9; block = blocks; for (VAR_7 = 0; VAR_7 < VAR_1->mb_count; VAR_7++) { ctx->prodsp.idct_put(VAR_2, VAR_3, block+(0<<6), VAR_6); ctx->prodsp.idct_put(VAR_2             +8, VAR_3, block+(1<<6), VAR_6); ctx->prodsp.idct_put(VAR_2+4*VAR_3  , VAR_3, block+(2<<6), VAR_6); ctx->prodsp.idct_put(VAR_2+4*VAR_3+8, VAR_3, block+(3<<6), VAR_6); block += 4*64; VAR_2 += 16; } return 0; }