comparison motion_est_template.c @ 2979:bfabfdf9ce55 libavcodec

COSMETICS: tabs --> spaces, some prettyprinting
author diego
date Thu, 22 Dec 2005 01:10:11 +0000
parents ef2149182f1c
children 0b546eab515d
comparison
equal deleted inserted replaced
2978:403183bbb505 2979:bfabfdf9ce55
43 COPY3_IF_LT(dmin, d, bx, hx, by, hy)\ 43 COPY3_IF_LT(dmin, d, bx, hx, by, hy)\
44 } 44 }
45 45
46 #if 0 46 #if 0
47 static int hpel_motion_search)(MpegEncContext * s, 47 static int hpel_motion_search)(MpegEncContext * s,
48 int *mx_ptr, int *my_ptr, int dmin, 48 int *mx_ptr, int *my_ptr, int dmin,
49 uint8_t *ref_data[3], 49 uint8_t *ref_data[3],
50 int size) 50 int size)
51 { 51 {
52 const int xx = 16 * s->mb_x + 8*(n&1); 52 const int xx = 16 * s->mb_x + 8*(n&1);
53 const int yy = 16 * s->mb_y + 8*(n>>1); 53 const int yy = 16 * s->mb_y + 8*(n>>1);
111 return dmin; 111 return dmin;
112 } 112 }
113 113
114 #else 114 #else
115 static int hpel_motion_search(MpegEncContext * s, 115 static int hpel_motion_search(MpegEncContext * s,
116 int *mx_ptr, int *my_ptr, int dmin, 116 int *mx_ptr, int *my_ptr, int dmin,
117 int src_index, int ref_index, 117 int src_index, int ref_index,
118 int size, int h) 118 int size, int h)
119 { 119 {
120 MotionEstContext * const c= &s->me; 120 MotionEstContext * const c= &s->me;
121 const int mx = *mx_ptr; 121 const int mx = *mx_ptr;
269 d += (mv_penalty[hx - pred_x] + mv_penalty[hy - pred_y])*penalty_factor;\ 269 d += (mv_penalty[hx - pred_x] + mv_penalty[hy - pred_y])*penalty_factor;\
270 COPY3_IF_LT(dmin, d, bx, hx, by, hy)\ 270 COPY3_IF_LT(dmin, d, bx, hx, by, hy)\
271 } 271 }
272 272
273 static int qpel_motion_search(MpegEncContext * s, 273 static int qpel_motion_search(MpegEncContext * s,
274 int *mx_ptr, int *my_ptr, int dmin, 274 int *mx_ptr, int *my_ptr, int dmin,
275 int src_index, int ref_index, 275 int src_index, int ref_index,
276 int size, int h) 276 int size, int h)
277 { 277 {
278 MotionEstContext * const c= &s->me; 278 MotionEstContext * const c= &s->me;
279 const int mx = *mx_ptr; 279 const int mx = *mx_ptr;
1003 1003
1004 dmin = 1000000; 1004 dmin = 1000000;
1005 //printf("%d %d %d %d //",xmin, ymin, xmax, ymax); 1005 //printf("%d %d %d %d //",xmin, ymin, xmax, ymax);
1006 /* first line */ 1006 /* first line */
1007 if (s->first_slice_line) { 1007 if (s->first_slice_line) {
1008 CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift) 1008 CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift)
1009 CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16, 1009 CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16,
1010 (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16) 1010 (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16)
1011 CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift) 1011 CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift)
1012 }else{ 1012 }else{
1013 CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift) 1013 CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift)
1065 1065
1066 dmin = 1000000; 1066 dmin = 1000000;
1067 //printf("%d %d %d %d //",xmin, ymin, xmax, ymax); 1067 //printf("%d %d %d %d //",xmin, ymin, xmax, ymax);
1068 /* first line */ 1068 /* first line */
1069 if (s->first_slice_line) { 1069 if (s->first_slice_line) {
1070 CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift) 1070 CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift)
1071 CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16, 1071 CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16,
1072 (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16) 1072 (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16)
1073 CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift) 1073 CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift)
1074 }else{ 1074 }else{
1075 CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift) 1075 CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift)