Revision e7077f5e libavcodec/h264_cabac.c

View differences:

libavcodec/h264_cabac.c
1143 1143
            } \
1144 1144
        }
1145 1145

  
1146
        if (h->pixel_size == 2) {
1146
        if (h->pixel_shift) {
1147 1147
            STORE_BLOCK(int32_t)
1148 1148
        } else {
1149 1149
            STORE_BLOCK(int16_t)
......
1670 1670
                qmul = h->dequant4_coeff[0][s->qscale];
1671 1671
                for( i = 0; i < 16; i++ ) {
1672 1672
                    //av_log( s->avctx, AV_LOG_ERROR, "INTRA16x16 AC:%d\n", i );
1673
                    decode_cabac_residual_nondc(h, h->mb + 16*i*h->pixel_size, 1, i, scan + 1, qmul, 15);
1673
                    decode_cabac_residual_nondc(h, h->mb + (16*i<<h->pixel_shift), 1, i, scan + 1, qmul, 15);
1674 1674
                }
1675 1675
            } else {
1676 1676
                fill_rectangle(&h->non_zero_count_cache[scan8[0]], 4, 4, 8, 0, 1);
......
1680 1680
            for( i8x8 = 0; i8x8 < 4; i8x8++ ) {
1681 1681
                if( cbp & (1<<i8x8) ) {
1682 1682
                    if( IS_8x8DCT(mb_type) ) {
1683
                        decode_cabac_residual_nondc(h, h->mb + 64*i8x8*h->pixel_size, 5, 4*i8x8,
1683
                        decode_cabac_residual_nondc(h, h->mb + (64*i8x8<<h->pixel_shift), 5, 4*i8x8,
1684 1684
                            scan8x8, h->dequant8_coeff[IS_INTRA( mb_type ) ? 0:1][s->qscale], 64);
1685 1685
                    } else {
1686 1686
                        qmul = h->dequant4_coeff[IS_INTRA( mb_type ) ? 0:3][s->qscale];
......
1688 1688
                            const int index = 4*i8x8 + i4x4;
1689 1689
                            //av_log( s->avctx, AV_LOG_ERROR, "Luma4x4: %d\n", index );
1690 1690
//START_TIMER
1691
                            decode_cabac_residual_nondc(h, h->mb + 16*index*h->pixel_size, 2, index, scan, qmul, 16);
1691
                            decode_cabac_residual_nondc(h, h->mb + (16*index<<h->pixel_shift), 2, index, scan, qmul, 16);
1692 1692
//STOP_TIMER("decode_residual")
1693 1693
                        }
1694 1694
                    }
......
1703 1703
            int c;
1704 1704
            for( c = 0; c < 2; c++ ) {
1705 1705
                //av_log( s->avctx, AV_LOG_ERROR, "INTRA C%d-DC\n",c );
1706
                decode_cabac_residual_dc(h, h->mb + (256 + 16*4*c)*h->pixel_size, 3, CHROMA_DC_BLOCK_INDEX+c, chroma_dc_scan, 4);
1706
                decode_cabac_residual_dc(h, h->mb + ((256 + 16*4*c)<<h->pixel_shift), 3, CHROMA_DC_BLOCK_INDEX+c, chroma_dc_scan, 4);
1707 1707
            }
1708 1708
        }
1709 1709

  
......
1714 1714
                for( i = 0; i < 4; i++ ) {
1715 1715
                    const int index = 16 + 4 * c + i;
1716 1716
                    //av_log( s->avctx, AV_LOG_ERROR, "INTRA C%d-AC %d\n",c, index - 16 );
1717
                    decode_cabac_residual_nondc(h, h->mb + 16*index*h->pixel_size, 4, index, scan + 1, qmul, 15);
1717
                    decode_cabac_residual_nondc(h, h->mb + (16*index<<h->pixel_shift), 4, index, scan + 1, qmul, 15);
1718 1718
                }
1719 1719
            }
1720 1720
        } else {

Also available in: Unified diff