summaryrefslogtreecommitdiff
path: root/libavcodec/h264_cavlc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-21 15:30:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 15:36:57 +0100
commit739edc1a7e83cdca27c3defbc3f057e98a3de472 (patch)
tree6d7c29f22fd58077d5d20682bc73433179c55a0d /libavcodec/h264_cavlc.c
parent35a788d953838c1b7f34038ef54fddc3d11994fe (diff)
parentbf03a878a76dea29b36f368759e9f66102b39a5f (diff)
Merge commit 'bf03a878a76dea29b36f368759e9f66102b39a5f'
* commit 'bf03a878a76dea29b36f368759e9f66102b39a5f': h264: move mb[_{padding,luma_dc}] into the per-slice context Conflicts: libavcodec/h264.h libavcodec/h264_cavlc.c libavcodec/h264_mb.c libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_cavlc.c')
-rw-r--r--libavcodec/h264_cavlc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c
index 09b5038a18..af8a8b637c 100644
--- a/libavcodec/h264_cavlc.c
+++ b/libavcodec/h264_cavlc.c
@@ -639,11 +639,11 @@ static av_always_inline int decode_luma_residual(H264Context *h, H264SliceContex
int i4x4, i8x8;
int qscale = p == 0 ? sl->qscale : sl->chroma_qp[p - 1];
if(IS_INTRA16x16(mb_type)){
- AV_ZERO128(h->mb_luma_dc[p]+0);
- AV_ZERO128(h->mb_luma_dc[p]+8);
- AV_ZERO128(h->mb_luma_dc[p]+16);
- AV_ZERO128(h->mb_luma_dc[p]+24);
- if( decode_residual(h, sl, h->intra_gb_ptr, h->mb_luma_dc[p], LUMA_DC_BLOCK_INDEX+p, scan, NULL, 16) < 0){
+ AV_ZERO128(sl->mb_luma_dc[p]+0);
+ AV_ZERO128(sl->mb_luma_dc[p]+8);
+ AV_ZERO128(sl->mb_luma_dc[p]+16);
+ AV_ZERO128(sl->mb_luma_dc[p]+24);
+ if( decode_residual(h, sl, h->intra_gb_ptr, sl->mb_luma_dc[p], LUMA_DC_BLOCK_INDEX+p, scan, NULL, 16) < 0){
return -1; //FIXME continue if partitioned and other return -1 too
}
@@ -653,7 +653,7 @@ static av_always_inline int decode_luma_residual(H264Context *h, H264SliceContex
for(i8x8=0; i8x8<4; i8x8++){
for(i4x4=0; i4x4<4; i4x4++){
const int index= i4x4 + 4*i8x8 + p*16;
- if( decode_residual(h, sl, h->intra_gb_ptr, h->mb + (16*index << pixel_shift),
+ if( decode_residual(h, sl, h->intra_gb_ptr, sl->mb + (16*index << pixel_shift),
index, scan + 1, h->dequant4_coeff[p][qscale], 15) < 0 ){
return -1;
}
@@ -671,7 +671,7 @@ static av_always_inline int decode_luma_residual(H264Context *h, H264SliceContex
for(i8x8=0; i8x8<4; i8x8++){
if(cbp & (1<<i8x8)){
if(IS_8x8DCT(mb_type)){
- int16_t *buf = &h->mb[64*i8x8+256*p << pixel_shift];
+ int16_t *buf = &sl->mb[64*i8x8+256*p << pixel_shift];
uint8_t *nnz;
for(i4x4=0; i4x4<4; i4x4++){
const int index= i4x4 + 4*i8x8 + p*16;
@@ -685,7 +685,7 @@ static av_always_inline int decode_luma_residual(H264Context *h, H264SliceContex
}else{
for(i4x4=0; i4x4<4; i4x4++){
const int index= i4x4 + 4*i8x8 + p*16;
- if( decode_residual(h, sl, gb, h->mb + (16*index << pixel_shift), index,
+ if( decode_residual(h, sl, gb, sl->mb + (16*index << pixel_shift), index,
scan, h->dequant4_coeff[cqm][qscale], 16) < 0 ){
return -1;
}
@@ -1140,7 +1140,7 @@ decode_intra_mb:
if(cbp&0x30){
for(chroma_idx=0; chroma_idx<2; chroma_idx++)
- if (decode_residual(h, sl, gb, h->mb + ((256 + 16*16*chroma_idx) << pixel_shift),
+ if (decode_residual(h, sl, gb, sl->mb + ((256 + 16*16*chroma_idx) << pixel_shift),
CHROMA_DC_BLOCK_INDEX+chroma_idx,
CHROMA422(h) ? chroma422_dc_scan : chroma_dc_scan,
NULL, 4*num_c8x8) < 0) {
@@ -1151,7 +1151,7 @@ decode_intra_mb:
if(cbp&0x20){
for(chroma_idx=0; chroma_idx<2; chroma_idx++){
const uint32_t *qmul = h->dequant4_coeff[chroma_idx+1+(IS_INTRA( mb_type ) ? 0:3)][sl->chroma_qp[chroma_idx]];
- int16_t *mb = h->mb + (16*(16 + 16*chroma_idx) << pixel_shift);
+ int16_t *mb = sl->mb + (16*(16 + 16*chroma_idx) << pixel_shift);
for (i8x8 = 0; i8x8<num_c8x8; i8x8++) {
for (i4x4 = 0; i4x4 < 4; i4x4++) {
const int index = 16 + 16*chroma_idx + 8*i8x8 + i4x4;