static int decode_residual_block(AVSContext *h, GetBitContext *gb,
                                 const dec_2dvlc_t *r, int esc_golomb_order,
                                 int qp, uint8_t *dst, int stride) {
    int i, level_code, esc_code, level, run, mask;
    DCTELEM level_buf[64];
    uint8_t run_buf[64];
    DCTELEM *block = h->block;
    for(i=0;i<65;i++) {
        level_code = get_ue_code(gb,r->golomb_order);
        if(level_code >= ESCAPE_CODE) {
            run = ((level_code - ESCAPE_CODE) >> 1) + 1;
            esc_code = get_ue_code(gb,esc_golomb_order);
            level = esc_code + (run > r->max_run ? 1 : r->level_add[run]);
            while(level > r->inc_limit)
                r++;
            mask = -(level_code & 1);
            level = (level^mask) - mask;
        } else {
            level = r->rltab[level_code][0];
            if(!level)
                break;
            run   = r->rltab[level_code][1];
            r += r->rltab[level_code][2];
        }
        level_buf[i] = level;
        run_buf[i] = run;
    }
    if(dequant(h,level_buf, run_buf, block, ff_cavs_dequant_mul[qp],
               ff_cavs_dequant_shift[qp], i))
        return -1;
    h->s.dsp.cavs_idct8_add(dst,block,stride);
    return 0;
}
['static int decode_residual_block(AVSContext *h, GetBitContext *gb,\n                                 const dec_2dvlc_t *r, int esc_golomb_order,\n                                 int qp, uint8_t *dst, int stride) {\n    int i, level_code, esc_code, level, run, mask;\n    DCTELEM level_buf[64];\n    uint8_t run_buf[64];\n    DCTELEM *block = h->block;\n    for(i=0;i<65;i++) {\n        level_code = get_ue_code(gb,r->golomb_order);\n        if(level_code >= ESCAPE_CODE) {\n            run = ((level_code - ESCAPE_CODE) >> 1) + 1;\n            esc_code = get_ue_code(gb,esc_golomb_order);\n            level = esc_code + (run > r->max_run ? 1 : r->level_add[run]);\n            while(level > r->inc_limit)\n                r++;\n            mask = -(level_code & 1);\n            level = (level^mask) - mask;\n        } else {\n            level = r->rltab[level_code][0];\n            if(!level)\n                break;\n            run   = r->rltab[level_code][1];\n            r += r->rltab[level_code][2];\n        }\n        level_buf[i] = level;\n        run_buf[i] = run;\n    }\n    if(dequant(h,level_buf, run_buf, block, ff_cavs_dequant_mul[qp],\n               ff_cavs_dequant_shift[qp], i))\n        return -1;\n    h->s.dsp.cavs_idct8_add(dst,block,stride);\n    return 0;\n}']