summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-07 02:02:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-07 02:30:27 +0100
commit6a56f4e63423d616b2224f654c1794fac25d6cfb (patch)
treeec0756ebd0ecbdee1932c95824101214367c96ee /libavcodec/h264.c
parent12d8340f16eed211f153e859b749ad415c1ba384 (diff)
parentb348c852aa8312d361123df0fa20e16feff7c2f1 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: flicvideo: fix invalid reads vorbis: Avoid some out-of-bounds reads vqf: add more known extensions cabac: remove unused function renorm_cabac_decoder h264: Only use symbols from the SVQ3 decoder under proper conditionals. add bytestream2_tell() and bytestream2_seek() functions parsers: initialize MpegEncContext.slice_context_count to 1 spdifenc: use special alignment for DTS-HD length_code Conflicts: libavcodec/flicvideo.c libavcodec/h264.c libavcodec/mpeg4video_parser.c libavcodec/vorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 8cd9fe72ef..e4d6ee10a9 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1818,7 +1818,7 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, int mb_ty
idct_dc_add(ptr, h->mb + (i*16+p*256 << pixel_shift), linesize);
else
idct_add (ptr, h->mb + (i*16+p*256 << pixel_shift), linesize);
- }else if(CONFIG_SVQ3_DECODER)
+ } else if (CONFIG_SVQ3_DECODER)
ff_svq3_add_idct_c(ptr, h->mb + i*16+p*256, linesize, qscale, 0);
}
}
@@ -1838,7 +1838,7 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, int mb_ty
dctcoef_set(h->mb+(p*256 << pixel_shift), pixel_shift, dc_mapping[i], dctcoef_get(h->mb_luma_dc[p], pixel_shift, i));
}
}
- }else if(CONFIG_SVQ3_DECODER)
+ } else if (CONFIG_SVQ3_DECODER)
ff_svq3_luma_dc_dequant_idct_c(h->mb+p*256, h->mb_luma_dc[p], qscale);
}
}
@@ -1882,7 +1882,7 @@ static av_always_inline void hl_decode_mb_idct_luma(H264Context *h, int mb_type,
}
}
}
- }else if(CONFIG_SVQ3_DECODER) {
+ } else if (CONFIG_SVQ3_DECODER) {
for(i=0; i<16; i++){
if(h->non_zero_count_cache[ scan8[i+p*16] ] || h->mb[i*16+p*256]){ //FIXME benchmark weird rule, & below
uint8_t * const ptr= dest_y + block_offset[i];
@@ -2076,9 +2076,7 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, i
h->h264dsp.h264_idct_add8(dest, block_offset,
h->mb, uvlinesize,
h->non_zero_count_cache);
- }
-#if CONFIG_SVQ3_DECODER
- else{
+ } else if (CONFIG_SVQ3_DECODER) {
h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + 16*16*1, h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]);
h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + 16*16*2, h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][h->chroma_qp[1]][0]);
for(j=1; j<3; j++){
@@ -2090,7 +2088,6 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, i
}
}
}
-#endif
}
}
}