summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-13 15:30:27 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-13 15:30:27 +0000
commitda452acac6a80a36415078114f961313f1ec2881 (patch)
tree9ebc338b4c2ef274f74822ae0b73ca2dd09af36c
parent0d88ff4ce06fafcaeb07c53f1082faa6410ca994 (diff)
Dont calculate any surrounding MVs for temporal MBs
Originally committed as revision 21793 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h264.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index d0f555313f..0135348d66 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -947,7 +947,7 @@ static void fill_decode_caches(H264Context *h, int mb_type){
}
#if 1
- if(IS_INTER(mb_type) || IS_DIRECT(mb_type)){
+ if(IS_INTER(mb_type) || (IS_DIRECT(mb_type) && h->direct_spatial_mv_pred)){
int list;
for(list=0; list<h->list_count; list++){
if(!USES_LIST(mb_type, list) && !IS_DIRECT(mb_type)){
@@ -958,6 +958,8 @@ static void fill_decode_caches(H264Context *h, int mb_type){
}*/
continue;
}
+ assert(!(IS_DIRECT(mb_type) && !h->direct_spatial_mv_pred));
+
h->mv_cache_clean[list]= 0;
if(USES_LIST(top_type, list)){
@@ -990,9 +992,6 @@ static void fill_decode_caches(H264Context *h, int mb_type){
}
}
- if((IS_DIRECT(mb_type) && !h->direct_spatial_mv_pred))
- continue;
-
if(USES_LIST(topleft_type, list)){
const int b_xy = h->mb2b_xy[topleft_xy] + 3 + h->b_stride + (topleft_partition & 2*h->b_stride);
const int b8_xy= h->mb2b8_xy[topleft_xy] + 1 + (topleft_partition & h->b8_stride);