From e7077f5e7b509c4fec62620d136a80b676428bb1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 10 Apr 2011 16:12:56 +0200 Subject: H264: replace pixel_size by pixel_shift Signed-off-by: Michael Niedermayer --- libavcodec/h264_cavlc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavcodec/h264_cavlc.c') diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index 41bafee582..92911c13e7 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -522,7 +522,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in } \ } - if (h->pixel_size == 2) { + if (h->pixel_shift) { STORE_BLOCK(int32_t) } else { STORE_BLOCK(int16_t) @@ -961,7 +961,7 @@ decode_intra_mb: for(i8x8=0; i8x8<4; i8x8++){ for(i4x4=0; i4x4<4; i4x4++){ const int index= i4x4 + 4*i8x8; - if( decode_residual(h, h->intra_gb_ptr, h->mb + 16*index*h->pixel_size, index, scan + 1, h->dequant4_coeff[0][s->qscale], 15) < 0 ){ + if( decode_residual(h, h->intra_gb_ptr, h->mb + (16*index<pixel_shift), index, scan + 1, h->dequant4_coeff[0][s->qscale], 15) < 0 ){ return -1; } } @@ -973,7 +973,7 @@ decode_intra_mb: for(i8x8=0; i8x8<4; i8x8++){ if(cbp & (1<mb[64*i8x8*h->pixel_size]; + DCTELEM *buf = &h->mb[64*i8x8<pixel_shift]; uint8_t *nnz; for(i4x4=0; i4x4<4; i4x4++){ if( decode_residual(h, gb, buf, i4x4+4*i8x8, scan8x8+16*i4x4, @@ -986,7 +986,7 @@ decode_intra_mb: for(i4x4=0; i4x4<4; i4x4++){ const int index= i4x4 + 4*i8x8; - if( decode_residual(h, gb, h->mb + 16*index*h->pixel_size, index, scan, h->dequant4_coeff[IS_INTRA( mb_type ) ? 0:3][s->qscale], 16) <0 ){ + if( decode_residual(h, gb, h->mb + (16*index<pixel_shift), index, scan, h->dequant4_coeff[IS_INTRA( mb_type ) ? 0:3][s->qscale], 16) <0 ){ return -1; } } @@ -1000,7 +1000,7 @@ decode_intra_mb: if(cbp&0x30){ for(chroma_idx=0; chroma_idx<2; chroma_idx++) - if( decode_residual(h, gb, h->mb + (256 + 16*4*chroma_idx)*h->pixel_size, CHROMA_DC_BLOCK_INDEX+chroma_idx, chroma_dc_scan, NULL, 4) < 0){ + if( decode_residual(h, gb, h->mb + ((256 + 16*4*chroma_idx)<pixel_shift), CHROMA_DC_BLOCK_INDEX+chroma_idx, chroma_dc_scan, NULL, 4) < 0){ return -1; } } @@ -1010,7 +1010,7 @@ decode_intra_mb: const uint32_t *qmul = h->dequant4_coeff[chroma_idx+1+(IS_INTRA( mb_type ) ? 0:3)][h->chroma_qp[chroma_idx]]; for(i4x4=0; i4x4<4; i4x4++){ const int index= 16 + 4*chroma_idx + i4x4; - if( decode_residual(h, gb, h->mb + 16*index*h->pixel_size, index, scan + 1, qmul, 15) < 0){ + if( decode_residual(h, gb, h->mb + (16*index<pixel_shift), index, scan + 1, qmul, 15) < 0){ return -1; } } -- cgit v1.2.3