static av_always_inline void decode_dc_coeffs(GetBitContext *gb, DCTELEM *out,

                                              int blocks_per_slice)

{

    DCTELEM prev_dc;

    int code, i, sign;



    OPEN_READER(re, gb);



    DECODE_CODEWORD(code, FIRST_DC_CB);

    prev_dc = TOSIGNED(code);

    out[0] = prev_dc;



    out += 64; // dc coeff for the next block



    code = 5;

    sign = 0;

    for (i = 1; i < blocks_per_slice; i++, out += 64) {

        DECODE_CODEWORD(code, dc_codebook[FFMIN(code, 6)]);

        if(code) sign ^= -(code & 1);

        else     sign  = 0;

        prev_dc += (((code + 1) >> 1) ^ sign) - sign;

        out[0] = prev_dc;

    }

    CLOSE_READER(re, gb);

}

static av_always_inline void decode_dc_coeffs(GetBitContext *gb, DCTELEM *out,

                                              int blocks_per_slice)

{

    DCTELEM prev_dc;

    int code, i, sign;



    OPEN_READER(re, gb);



    DECODE_CODEWORD(code, FIRST_DC_CB);

    prev_dc = TOSIGNED(code);

    out[0] = prev_dc;



    out += 64; 



    code = 5;

    sign = 0;

    for (i = 1; i < blocks_per_slice; i++, out += 64) {

        DECODE_CODEWORD(code, dc_codebook[FFMIN(code, 6)]);

        if(code) sign ^= -(code & 1);

        else     sign  = 0;

        prev_dc += (((code + 1) >> 1) ^ sign) - sign;

        out[0] = prev_dc;

    }

    CLOSE_READER(re, gb);

}

static av_always_inline void FUNC_0(GetBitContext *gb, DCTELEM *out,

                                              int blocks_per_slice)

{

    DCTELEM prev_dc;

    int VAR_0, VAR_1, VAR_2;



    OPEN_READER(re, gb);



    DECODE_CODEWORD(VAR_0, FIRST_DC_CB);

    prev_dc = TOSIGNED(VAR_0);

    out[0] = prev_dc;



    out += 64; 



    VAR_0 = 5;

    VAR_2 = 0;

    for (VAR_1 = 1; VAR_1 < blocks_per_slice; VAR_1++, out += 64) {

        DECODE_CODEWORD(VAR_0, dc_codebook[FFMIN(VAR_0, 6)]);

        if(VAR_0) VAR_2 ^= -(VAR_0 & 1);

        else     VAR_2  = 0;

        prev_dc += (((VAR_0 + 1) >> 1) ^ VAR_2) - VAR_2;

        out[0] = prev_dc;

    }

    CLOSE_READER(re, gb);

}

static av_always_inline void FUNC_0(GetBitContext *gb, DCTELEM *out,
int blocks_per_slice)
{ DCTELEM prev_dc; int VAR_0, VAR_1, VAR_2; OPEN_READER(re, gb); DECODE_CODEWORD(VAR_0, FIRST_DC_CB); prev_dc = TOSIGNED(VAR_0); out[0] = prev_dc; out += 64; VAR_0 = 5; VAR_2 = 0; for (VAR_1 = 1; VAR_1 < blocks_per_slice; VAR_1++, out += 64) { DECODE_CODEWORD(VAR_0, dc_codebook[FFMIN(VAR_0, 6)]); if(VAR_0) VAR_2 ^= -(VAR_0 & 1); else     VAR_2  = 0; prev_dc += (((VAR_0 + 1) >> 1) ^ VAR_2) - VAR_2; out[0] = prev_dc; } CLOSE_READER(re, gb); }