comparison motion_est_template.c @ 11573:a734f92c94b4 libavcodec

slice dice, inline and outline cmp() motion_est.o is now less than half its previous size. No speedchange meassureable.
author michael
date Fri, 02 Apr 2010 01:07:03 +0000
parents e9d9d946f213
children 7dd2a45249a9
comparison
equal deleted inserted replaced
11572:e00f9288527a 11573:a734f92c94b4
37 37
38 #define CHECK_HALF_MV(dx, dy, x, y)\ 38 #define CHECK_HALF_MV(dx, dy, x, y)\
39 {\ 39 {\
40 const int hx= 2*(x)+(dx);\ 40 const int hx= 2*(x)+(dx);\
41 const int hy= 2*(y)+(dy);\ 41 const int hy= 2*(y)+(dy);\
42 d= cmp(s, x, y, dx, dy, size, h, ref_index, src_index, cmp_sub, chroma_cmp_sub, flags);\ 42 d= cmp_hpel(s, x, y, dx, dy, size, h, ref_index, src_index, cmp_sub, chroma_cmp_sub, flags);\
43 d += (mv_penalty[hx - pred_x] + mv_penalty[hy - pred_y])*penalty_factor;\ 43 d += (mv_penalty[hx - pred_x] + mv_penalty[hy - pred_y])*penalty_factor;\
44 COPY3_IF_LT(dmin, d, bx, hx, by, hy)\ 44 COPY3_IF_LT(dmin, d, bx, hx, by, hy)\
45 } 45 }
46 46
47 #if 0 47 #if 0
264 264
265 #define CHECK_QUARTER_MV(dx, dy, x, y)\ 265 #define CHECK_QUARTER_MV(dx, dy, x, y)\
266 {\ 266 {\
267 const int hx= 4*(x)+(dx);\ 267 const int hx= 4*(x)+(dx);\
268 const int hy= 4*(y)+(dy);\ 268 const int hy= 4*(y)+(dy);\
269 d= cmp(s, x, y, dx, dy, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);\ 269 d= cmp_qpel(s, x, y, dx, dy, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);\
270 d += (mv_penalty[hx - pred_x] + mv_penalty[hy - pred_y])*penalty_factor;\ 270 d += (mv_penalty[hx - pred_x] + mv_penalty[hy - pred_y])*penalty_factor;\
271 COPY3_IF_LT(dmin, d, bx, hx, by, hy)\ 271 COPY3_IF_LT(dmin, d, bx, hx, by, hy)\
272 } 272 }
273 273
274 static int qpel_motion_search(MpegEncContext * s, 274 static int qpel_motion_search(MpegEncContext * s,