summaryrefslogtreecommitdiff
path: root/libavcodec/motion_est.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-08-25 22:54:53 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-08-25 22:54:53 +0000
commite4eadb4b44a5bd446d2f83e92a7baeddb82448ad (patch)
treeca506eb297f2c908f53b75bdadb330c730446933 /libavcodec/motion_est.c
parent029911d1c362939b4664e471bb9b13060a31ebde (diff)
oooooops, having 2 Eterms open and doing cvs diff in one and cvs commit in the other sucks, especially if they are in different directories (MPlayer/main/libavcodec vs. ffmpeg/libavcodec)
Originally committed as revision 2165 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est.c')
-rw-r--r--libavcodec/motion_est.c54
1 files changed, 2 insertions, 52 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 3de019b4b6..17a5b1f79c 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -32,8 +32,8 @@
#include "dsputil.h"
#include "mpegvideo.h"
-#undef NDEBUG
-#include <assert.h>
+//#undef NDEBUG
+//#include <assert.h>
#define SQ(a) ((a)*(a))
@@ -1674,53 +1674,3 @@ void ff_fix_long_b_mvs(MpegEncContext * s, int16_t (*mv_table)[2], int f_code, i
}
}
}
-#if 0
-/**
- * estimates global motion and inits sprite_ref
- */
-void ff_estimate_global_motion(MpegEncContext *s, int sprite_ref[3][2]){
- int y;
- int num= 16<<s->f_code;
- int score[2][num];
- int best_i[2]={0,0};
- int best_score[2]={0,0};
-
- memset(score, 0, 2*num*sizeof(int));
-
- for(y=0; y<s->mb_height; y++){
- int x;
- int xy= (y+1)* (s->mb_width+2)+1;
- int i= y*s->mb_width;
- for(x=0; x<s->mb_width; x++){
- int mv[2];
-
- if(!(s->mb_type[i]&MB_TYPE_INTER))
- continue;
-
- mv[0]= s->p_mv_table[xy][0];
- mv[1]= s->p_mv_table[xy][1];
-
- if(mv[0]==0 && mv[1]==0) continue;
-
- score[0][mv[0] + num/2]++;
- score[1][mv[1] + num/2]++;
- }
- }
-
- for(n=0; n<2; n++){
- for(i=1; i<num-1; i++){
- int s= score[n][i-1] + score[n][i]*2 + score[n][i+1];
-
- if(s > best_score[n]){
- best_score[n]= s;
- best_i[n]= i;
- }
- }
- }
-
- sprite_ref[0][0]= best_i[0] - num/2;
- sprite_ref[0][1]= best_i[1] - num/2;
-
- // decide block type
-}
-#endif