summaryrefslogtreecommitdiff
path: root/libavcodec/h264_mvpred.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-17 04:42:04 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-17 04:42:04 +0100
commit4d70023a2a83c5c7690708a5a5acfe8ac8ed8f19 (patch)
tree94d4f19f964c050bb5ba9e721c16822c441ad1ef /libavcodec/h264_mvpred.h
parent53b6503184a9403e9ac7eb77a35059be64a308b0 (diff)
h264: fix init of topleft ref/mv.
Fixes Ticket778 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_mvpred.h')
-rw-r--r--libavcodec/h264_mvpred.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h
index 8f524efd03..85405c1542 100644
--- a/libavcodec/h264_mvpred.h
+++ b/libavcodec/h264_mvpred.h
@@ -633,7 +633,7 @@ static void fill_decode_caches(H264Context *h, int mb_type){
AV_ZERO32(mv_cache[4 - 1*8]);
ref_cache[4 - 1*8]= topright_type ? LIST_NOT_USED : PART_NOT_AVAILABLE;
}
- if(ref_cache[4 - 1*8] < 0){
+ if(ref_cache[2 - 1*8] < 0 || ref_cache[4 - 1*8] < 0){
if(USES_LIST(topleft_type, list)){
const int b_xy = h->mb2b_xy[topleft_xy] + 3 + b_stride + (h->topleft_partition & 2*b_stride);
const int b8_xy= 4*topleft_xy + 1 + (h->topleft_partition & 2);