Revision e39e3aba libavcodec/h264.c

View differences:

libavcodec/h264.c
288 288
#undef xStride
289 289
#undef stride
290 290

  
291
static void chroma_dc_dequant_idct_c(DCTELEM *block, int qmul){
292
    const int stride= 16*2;
293
    const int xStride= 16;
294
    int a,b,c,d,e;
295

  
296
    a= block[stride*0 + xStride*0];
297
    b= block[stride*0 + xStride*1];
298
    c= block[stride*1 + xStride*0];
299
    d= block[stride*1 + xStride*1];
300

  
301
    e= a-b;
302
    a= a+b;
303
    b= c-d;
304
    c= c+d;
305

  
306
    block[stride*0 + xStride*0]= ((a+c)*qmul) >> 7;
307
    block[stride*0 + xStride*1]= ((e+b)*qmul) >> 7;
308
    block[stride*1 + xStride*0]= ((a-c)*qmul) >> 7;
309
    block[stride*1 + xStride*1]= ((e-b)*qmul) >> 7;
310
}
311

  
312 291
#if 0
313 292
static void chroma_dc_dct_c(DCTELEM *block){
314 293
    const int stride= 16*2;
......
1286 1265
            }else{
1287 1266
                if(is_h264){
1288 1267
                    if(h->non_zero_count_cache[ scan8[CHROMA_DC_BLOCK_INDEX+0] ])
1289
                        chroma_dc_dequant_idct_c(h->mb + 16*16     , h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]);
1268
                        h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + 16*16     , h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]);
1290 1269
                    if(h->non_zero_count_cache[ scan8[CHROMA_DC_BLOCK_INDEX+1] ])
1291
                        chroma_dc_dequant_idct_c(h->mb + 16*16+4*16, h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][h->chroma_qp[1]][0]);
1270
                        h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + 16*16+4*16, h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][h->chroma_qp[1]][0]);
1292 1271
                    h->h264dsp.h264_idct_add8(dest, block_offset,
1293 1272
                                              h->mb, uvlinesize,
1294 1273
                                              h->non_zero_count_cache);
1295 1274
                }else{
1296
                    chroma_dc_dequant_idct_c(h->mb + 16*16     , h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]);
1297
                    chroma_dc_dequant_idct_c(h->mb + 16*16+4*16, h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][h->chroma_qp[1]][0]);
1275
                    h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + 16*16     , h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]);
1276
                    h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + 16*16+4*16, h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][h->chroma_qp[1]][0]);
1298 1277
                    for(i=16; i<16+8; i++){
1299 1278
                        if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16]){
1300 1279
                            uint8_t * const ptr= dest[(i&4)>>2] + block_offset[i];

Also available in: Unified diff