summaryrefslogtreecommitdiff
path: root/libavcodec/h264_mvpred.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-19 02:07:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-19 02:07:12 +0000
commit26c83a4161567c4aee8d746d341a02a1897fd033 (patch)
tree894671aa24834547051aff0744be071642b29778 /libavcodec/h264_mvpred.h
parent350fc614b48190d46e6e66e78ba4031a8290e574 (diff)
Move a few things into a deeper if() in fetch_diagonal_mv().
Originally committed as revision 21313 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_mvpred.h')
-rw-r--r--libavcodec/h264_mvpred.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h
index 6b89ad7209..3409919692 100644
--- a/libavcodec/h264_mvpred.h
+++ b/libavcodec/h264_mvpred.h
@@ -42,10 +42,6 @@ static inline int fetch_diagonal_mv(H264Context *h, const int16_t **C, int i, in
/* there is no consistent mapping of mvs to neighboring locations that will
* make mbaff happy, so we can't move all this logic to fill_caches */
if(FRAME_MBAFF){
- const uint32_t *mb_types = s->current_picture_ptr->mb_type;
- const int16_t *mv;
- *(uint32_t*)h->mv_cache[list][scan8[0]-2] = 0;
- *C = h->mv_cache[list][scan8[0]-2];
#define SET_DIAG_MV(MV_OP, REF_OP, X4, Y4)\
const int x4 = X4, y4 = Y4;\
@@ -60,6 +56,11 @@ static inline int fetch_diagonal_mv(H264Context *h, const int16_t **C, int i, in
if(topright_ref == PART_NOT_AVAILABLE
&& ((s->mb_y&1) || i >= scan8[0]+8) && (i&7)==4
&& h->ref_cache[list][scan8[0]-1] != PART_NOT_AVAILABLE){
+ const uint32_t *mb_types = s->current_picture_ptr->mb_type;
+ const int16_t *mv;
+ *(uint32_t*)h->mv_cache[list][scan8[0]-2] = 0;
+ *C = h->mv_cache[list][scan8[0]-2];
+
if(!MB_FIELD
&& IS_INTERLACED(mb_types[h->left_mb_xy[0]])){
SET_DIAG_MV(*2, >>1, s->mb_x*4-1, (s->mb_y|1)*4+(s->mb_y&1)*2+(i>>4)-1);