static int decode_i_block(FourXContext *f, DCTELEM *block){
    int code, i, j, level, val;
    /* DC coef */
    val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
    if (val>>4){
        av_log(f->avctx, AV_LOG_ERROR, "error dc run != 0\n");
    if(val)
        val = get_xbits(&f->gb, val);
    val = val * dequant_table[0] + f->last_dc;
    f->last_dc =
    block[0] = val;
    /* AC coefs */
    i = 1;
    for(;;) {
        code = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
        /* EOB */
        if (code == 0)
            break;
        if (code == 0xf0) {
            i += 16;
        } else {
            level = get_xbits(&f->gb, code & 0xf);
            i += code >> 4;
            if (i >= 64) {
                av_log(f->avctx, AV_LOG_ERROR, "run %d oveflow\n", i);
                return 0;
            j= ff_zigzag_direct[i];
            block[j] = level * dequant_table[j];
            i++;
            if (i >= 64)
                break;
    return 0;
static int decode_i_block(FourXContext *f, DCTELEM *block){
    int code, i, j, level, val;
    
    val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
    if (val>>4){
        av_log(f->avctx, AV_LOG_ERROR, "error dc run != 0\n");
    if(val)
        val = get_xbits(&f->gb, val);
    val = val * dequant_table[0] + f->last_dc;
    f->last_dc =
    block[0] = val;
    
    i = 1;
    for(;;) {
        code = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
        
        if (code == 0)
            break;
        if (code == 0xf0) {
            i += 16;
        } else {
            level = get_xbits(&f->gb, code & 0xf);
            i += code >> 4;
            if (i >= 64) {
                av_log(f->avctx, AV_LOG_ERROR, "run %d oveflow\n", i);
                return 0;
            j= ff_zigzag_direct[i];
            block[j] = level * dequant_table[j];
            i++;
            if (i >= 64)
                break;
    return 0;
static int FUNC_0(FourXContext *VAR_0, DCTELEM *VAR_1){
    int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
    
    VAR_6 = get_vlc2(&VAR_0->pre_gb, VAR_0->pre_vlc.table, ACDC_VLC_BITS, 3);
    if (VAR_6>>4){
        av_log(VAR_0->avctx, AV_LOG_ERROR, "error dc run != 0\n");
    if(VAR_6)
        VAR_6 = get_xbits(&VAR_0->gb, VAR_6);
    VAR_6 = VAR_6 * dequant_table[0] + VAR_0->last_dc;
    VAR_0->last_dc =
    VAR_1[0] = VAR_6;
    
    VAR_3 = 1;
    for(;;) {
        VAR_2 = get_vlc2(&VAR_0->pre_gb, VAR_0->pre_vlc.table, ACDC_VLC_BITS, 3);
        
        if (VAR_2 == 0)
            break;
        if (VAR_2 == 0xf0) {
            VAR_3 += 16;
        } else {
            VAR_5 = get_xbits(&VAR_0->gb, VAR_2 & 0xf);
            VAR_3 += VAR_2 >> 4;
            if (VAR_3 >= 64) {
                av_log(VAR_0->avctx, AV_LOG_ERROR, "run %d oveflow\n", VAR_3);
                return 0;
            VAR_4= ff_zigzag_direct[VAR_3];
            VAR_1[VAR_4] = VAR_5 * dequant_table[VAR_4];
            VAR_3++;
            if (VAR_3 >= 64)
                break;
    return 0;
static int FUNC_0(FourXContext *VAR_0, DCTELEM *VAR_1){ int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6; VAR_6 = get_vlc2(&VAR_0->pre_gb, VAR_0->pre_vlc.table, ACDC_VLC_BITS, 3); if (VAR_6>>4){ av_log(VAR_0->avctx, AV_LOG_ERROR, "error dc run != 0\n"); if(VAR_6)
VAR_6 = get_xbits(&VAR_0->gb, VAR_6); VAR_6 = VAR_6 * dequant_table[0] + VAR_0->last_dc; VAR_0->last_dc =
VAR_1[0] = VAR_6; VAR_3 = 1; for(;;) { VAR_2 = get_vlc2(&VAR_0->pre_gb, VAR_0->pre_vlc.table, ACDC_VLC_BITS, 3); if (VAR_2 == 0)
break; if (VAR_2 == 0xf0) { VAR_3 += 16; } else { VAR_5 = get_xbits(&VAR_0->gb, VAR_2 & 0xf); VAR_3 += VAR_2 >> 4; if (VAR_3 >= 64) { av_log(VAR_0->avctx, AV_LOG_ERROR, "run %d oveflow\n", VAR_3); return 0; VAR_4= ff_zigzag_direct[VAR_3]; VAR_1[VAR_4] = VAR_5 * dequant_table[VAR_4]; VAR_3++; if (VAR_3 >= 64)
break; return 0;