summaryrefslogtreecommitdiff
path: root/libavcodec/motion_est.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-10-30 00:51:52 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-11-03 10:15:53 -0500
commit240b22afe14ef477da1b439b9ed7bca6cc7d6c26 (patch)
tree916a7b179b1358a7ce7cdf373ef0f26ba0108aba /libavcodec/motion_est.c
parent351d0f8b7a6ecce411ae75fb3511573c34317218 (diff)
downloadffmpeg-240b22afe14ef477da1b439b9ed7bca6cc7d6c26.tar.gz
motion_est: remove dead code
mb_type is initialized to 0 and never updated before the check. Bug-Id: CID 1238782
Diffstat (limited to 'libavcodec/motion_est.c')
-rw-r--r--libavcodec/motion_est.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 21d2c04544..a765b26a1a 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -949,27 +949,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s,
pic->mc_mb_var[s->mb_stride * mb_y + mb_x] = (vard+128)>>8;
c->mc_mb_var_sum_temp += (vard+128)>>8;
- if(mb_type){
- int p_score= FFMIN(vard, varc-500+(s->lambda2>>FF_LAMBDA_SHIFT)*100);
- int i_score= varc-500+(s->lambda2>>FF_LAMBDA_SHIFT)*20;
- c->scene_change_score+= ff_sqrt(p_score) - ff_sqrt(i_score);
-
- if(mb_type == CANDIDATE_MB_TYPE_INTER){
- c->sub_motion_search(s, &mx, &my, dmin, 0, 0, 0, 16);
- set_p_mv_tables(s, mx, my, 1);
- }else{
- mx <<=shift;
- my <<=shift;
- }
- if(mb_type == CANDIDATE_MB_TYPE_INTER4V){
- h263_mv4_search(s, mx, my, shift);
-
- set_p_mv_tables(s, mx, my, 0);
- }
- if(mb_type == CANDIDATE_MB_TYPE_INTER_I){
- interlaced_search(s, 0, s->p_field_mv_table, s->p_field_select_table, mx, my, 1);
- }
- }else if(c->avctx->mb_decision > FF_MB_DECISION_SIMPLE){
+ if (c->avctx->mb_decision > FF_MB_DECISION_SIMPLE) {
int p_score= FFMIN(vard, varc-500+(s->lambda2>>FF_LAMBDA_SHIFT)*100);
int i_score= varc-500+(s->lambda2>>FF_LAMBDA_SHIFT)*20;
c->scene_change_score+= ff_sqrt(p_score) - ff_sqrt(i_score);