53 _ANSI_ARGS_ ((
int *pred,
int r_size,
int motion_code,
54 int motion_residualesidual,
int full_pel_vector));
60 motion_vector_count, mv_format, h_r_size, v_r_size, dmv,
64 int motion_vertical_field_select[2][2];
65 int s, motion_vector_count, mv_format, h_r_size, v_r_size, dmv, mvscale;
68 if (motion_vector_count == 1)
72 motion_vertical_field_select[1][s] =
73 motion_vertical_field_select[0][s] =
Get_Bits (1);
76 motion_vector (PMV[0][s], dmvector, h_r_size, v_r_size, dmv, mvscale,
80 PMV[1][s][0] = PMV[0][s][0];
81 PMV[1][s][1] = PMV[0][s][1];
85 motion_vertical_field_select[0][s] =
Get_Bits (1);
87 motion_vector (PMV[0][s], dmvector, h_r_size, v_r_size, dmv, mvscale,
90 motion_vertical_field_select[1][s] =
Get_Bits (1);
92 motion_vector (PMV[1][s], dmvector, h_r_size, v_r_size, dmv, mvscale,
118 motion_residual = (h_r_size != 0
119 && motion_code != 0) ?
Get_Bits (h_r_size) : 0;
130 motion_residual = (v_r_size != 0
131 && motion_code != 0) ?
Get_Bits (v_r_size) : 0;
156 int r_size, motion_code, motion_residual;
161 r_size = r_size % 32;
163 vec = full_pel_vector ? (*pred >> 1) : (*pred);
167 vec += ((motion_code - 1) << r_size) + motion_residual + 1;
171 else if (motion_code < 0)
173 vec -= ((-motion_code - 1) << r_size) + motion_residual + 1;
177 *pred = full_pel_vector ? (vec << 1) : vec;
unsigned int Get_Bits(int N)
static void decode_motion_vector(int *pred, int r_size, int motion_code, int motion_residual, int full_pel_vector)
void __builtin_bambu_time_stop()
void __attribute__((noinline))
void motion_vector(int *PMV, int *dmvector, int h_r_size, int v_r_size, int dmv, int mvscale, int full_pel_vector)
void __builtin_bambu_time_start()
static void decode_motion_vector _ANSI_ARGS_((int *pred, int r_size, int motion_code, int motion_residualesidual, int full_pel_vector))
void motion_vectors(PMV, dmvector, motion_vertical_field_select, int s, int motion_vector_count, int mv_format, int h_r_size, int v_r_size, int dmv, int mvscale)