diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-01-14 02:35:04 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-01-14 02:35:04 +0000 |
commit | 237da0fa20a3d940b86853265fa36f117c0070f1 (patch) | |
tree | 17aa969b78e1bed810ac254225c51cb2850580ad | |
parent | a75b43fd7399f9836b1943184e39c551de59eaaf (diff) | |
download | ffmpeg-237da0fa20a3d940b86853265fa36f117c0070f1.tar.gz |
dont calculate stuff if its not used ...
Originally committed as revision 2699 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/motion_est.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index bb4b923437..a1d56a1f19 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -840,7 +840,8 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift) dmin4= s->me.sub_motion_search(s, &mx4, &my4, dmin4, pred_x4, pred_y4, src_data, ref_data, stride, uvstride, size, h, mv_penalty); - if(s->dsp.me_sub_cmp[0] != s->dsp.mb_cmp[0]){ + if(s->dsp.me_sub_cmp[0] != s->dsp.mb_cmp[0] + && s->avctx->mb_decision == FF_MB_DECISION_SIMPLE){ int dxy; const int offset= ((block&1) + (block>>1)*stride)*8; uint8_t *dest_y = s->me.scratchpad + offset; @@ -990,7 +991,8 @@ static int interlaced_search(MpegEncContext *s, uint8_t *frame_src_data[3], uint mv_table[xy][0]= mx_i; mv_table[xy][1]= my_i; - if(s->dsp.me_sub_cmp[0] != s->dsp.mb_cmp[0]){ + if(s->dsp.me_sub_cmp[0] != s->dsp.mb_cmp[0] + && s->avctx->mb_decision == FF_MB_DECISION_SIMPLE){ int dxy; //FIXME chroma ME |