Revision af0b2d67 libavcodec/h264.c

View differences:

libavcodec/h264.c
428 428
#undef xStride
429 429
#undef stride
430 430

  
431
static void chroma_dc_dequant_idct_c(DCTELEM *block, int qmul){
432
    const int stride= 16*2;
433
    const int xStride= 16;
434
    int a,b,c,d,e;
435

  
436
    a= block[stride*0 + xStride*0];
437
    b= block[stride*0 + xStride*1];
438
    c= block[stride*1 + xStride*0];
439
    d= block[stride*1 + xStride*1];
440

  
441
    e= a-b;
442
    a= a+b;
443
    b= c-d;
444
    c= c+d;
445

  
446
    block[stride*0 + xStride*0]= ((a+c)*qmul) >> 7;
447
    block[stride*0 + xStride*1]= ((e+b)*qmul) >> 7;
448
    block[stride*1 + xStride*0]= ((a-c)*qmul) >> 7;
449
    block[stride*1 + xStride*1]= ((e-b)*qmul) >> 7;
450
}
451

  
452 431
#if 0
453 432
static void chroma_dc_dct_c(DCTELEM *block){
454 433
    const int stride= 16*2;
......
1712 1691
            }else{
1713 1692
                if(is_h264){
1714 1693
                    if(h->non_zero_count_cache[ scan8[CHROMA_DC_BLOCK_INDEX+0] ])
1715
                        chroma_dc_dequant_idct_c(h->mb + 16*16     , h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]);
1694
                        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]);
1716 1695
                    if(h->non_zero_count_cache[ scan8[CHROMA_DC_BLOCK_INDEX+1] ])
1717
                        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]);
1696
                        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]);
1718 1697
                    h->h264dsp.h264_idct_add8(dest, block_offset,
1719 1698
                                              h->mb, uvlinesize,
1720 1699
                                              h->non_zero_count_cache);
1721 1700
                }
1722 1701
#if CONFIG_SVQ3_DECODER
1723 1702
                else{
1724
                    chroma_dc_dequant_idct_c(h->mb + 16*16     , h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]);
1725
                    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]);
1703
                    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]);
1704
                    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]);
1726 1705
                    for(i=16; i<16+8; i++){
1727 1706
                        if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16]){
1728 1707
                            uint8_t * const ptr= dest[(i&4)>>2] + block_offset[i];

Also available in: Unified diff