Revision 042e3bfe libavcodec/h264.c

View differences:

libavcodec/h264.c
1257 1257
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
1258 1258

  
1259 1259
    block[0] += 32;
1260
#if 1
1261
    for(i=0; i<4; i++){
1262
        const int z0=  block[i + 4*0]     +  block[i + 4*2];
1263
        const int z1=  block[i + 4*0]     -  block[i + 4*2];
1264
        const int z2= (block[i + 4*1]>>1) -  block[i + 4*3];
1265
        const int z3=  block[i + 4*1]     + (block[i + 4*3]>>1);
1266

  
1267
        block[i + 4*0]= z0 + z3;
1268
        block[i + 4*1]= z1 + z2;
1269
        block[i + 4*2]= z1 - z2;
1270
        block[i + 4*3]= z0 - z3;
1271
    }
1272

  
1273
    for(i=0; i<4; i++){
1274
        const int z0=  block[0 + 4*i]     +  block[2 + 4*i];
1275
        const int z1=  block[0 + 4*i]     -  block[2 + 4*i];
1276
        const int z2= (block[1 + 4*i]>>1) -  block[3 + 4*i];
1277
        const int z3=  block[1 + 4*i]     + (block[3 + 4*i]>>1);
1278 1260

  
1279
        dst[0 + i*stride]= cm[ dst[0 + i*stride] + ((z0 + z3) >> 6) ];
1280
        dst[1 + i*stride]= cm[ dst[1 + i*stride] + ((z1 + z2) >> 6) ];
1281
        dst[2 + i*stride]= cm[ dst[2 + i*stride] + ((z1 - z2) >> 6) ];
1282
        dst[3 + i*stride]= cm[ dst[3 + i*stride] + ((z0 - z3) >> 6) ];
1283
    }
1284
#else
1285 1261
    for(i=0; i<4; i++){
1286 1262
        const int z0=  block[0 + 4*i]     +  block[2 + 4*i];
1287 1263
        const int z1=  block[0 + 4*i]     -  block[2 + 4*i];
......
1305 1281
        dst[i + 2*stride]= cm[ dst[i + 2*stride] + ((z1 - z2) >> 6) ];
1306 1282
        dst[i + 3*stride]= cm[ dst[i + 3*stride] + ((z0 - z3) >> 6) ];
1307 1283
    }
1308
#endif
1309 1284
}
1310 1285

  
1311 1286
#if 0
......
2162 2137
    if( h->pps.cabac ) {
2163 2138
        CHECKED_ALLOCZ(h->chroma_pred_mode_table, big_mb_num * sizeof(uint8_t))
2164 2139
        CHECKED_ALLOCZ(h->cbp_table, big_mb_num * sizeof(uint16_t))
2165
    } else {
2166
        h->chroma_pred_mode_table = NULL;
2167
        h->cbp_table = NULL;
2168 2140
    }
2169 2141

  
2170 2142
    memset(h->slice_table_base, -1, big_mb_num  * sizeof(uint8_t));

Also available in: Unified diff