50 _ANSI_ARGS_ ((
int *pred,
int r_size,
int motion_code,
51 int motion_residualesidual,
int full_pel_vector));
56 motion_vector_count, mv_format, h_r_size, v_r_size, dmv,
60 int motion_vertical_field_select[2][2];
61 int s, motion_vector_count, mv_format, h_r_size, v_r_size, dmv, mvscale;
63 if (motion_vector_count == 1)
67 motion_vertical_field_select[1][s] =
68 motion_vertical_field_select[0][s] =
Get_Bits (1);
71 motion_vector (PMV[0][s], dmvector, h_r_size, v_r_size, dmv, mvscale,
75 PMV[1][s][0] = PMV[0][s][0];
76 PMV[1][s][1] = PMV[0][s][1];
80 motion_vertical_field_select[0][s] =
Get_Bits (1);
82 motion_vector (PMV[0][s], dmvector, h_r_size, v_r_size, dmv, mvscale,
85 motion_vertical_field_select[1][s] =
Get_Bits (1);
87 motion_vector (PMV[1][s], dmvector, h_r_size, v_r_size, dmv, mvscale,
112 motion_residual = (h_r_size != 0
113 && motion_code != 0) ?
Get_Bits (h_r_size) : 0;
124 motion_residual = (v_r_size != 0
125 && motion_code != 0) ?
Get_Bits (v_r_size) : 0;
150 int r_size, motion_code, motion_residual;
155 r_size = r_size % 32;
157 vec = full_pel_vector ? (*pred >> 1) : (*pred);
161 vec += ((motion_code - 1) << r_size) + motion_residual + 1;
165 else if (motion_code < 0)
167 vec -= ((-motion_code - 1) << r_size) + motion_residual + 1;
171 *pred = full_pel_vector ? (vec << 1) : vec;
static void decode_motion_vector _ANSI_ARGS_((int *pred, int r_size, int motion_code, int motion_residualesidual, int full_pel_vector))
unsigned int Get_Bits(int N)
void motion_vector(int *PMV, int *dmvector, int h_r_size, int v_r_size, int dmv, int mvscale, 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)
static void decode_motion_vector(int *pred, int r_size, int motion_code, int motion_residual, int full_pel_vector)