55 const int mb_xy =
s->mb_y *
s->mb_stride +
s->mb_x;
57 const int wrap =
s->b8_stride;
58 const int xy =
s->block_index[0];
60 s->current_picture.mbskip_table[mb_xy] =
s->mb_skipped;
63 int motion_x, motion_y;
68 motion_x =
s->mv[0][0][0];
69 motion_y =
s->mv[0][0][1];
72 motion_x =
s->mv[0][0][0] +
s->mv[0][1][0];
73 motion_y =
s->mv[0][0][1] +
s->mv[0][1][1];
74 motion_x = (motion_x>>1) | (motion_x&1);
76 s->p_field_mv_table[
i][0][mb_xy][0]=
s->mv[0][
i][0];
77 s->p_field_mv_table[
i][0][mb_xy][1]=
s->mv[0][
i][1];
79 s->current_picture.ref_index[0][4*mb_xy ] =
80 s->current_picture.ref_index[0][4*mb_xy + 1] =
s->field_select[0][0];
81 s->current_picture.ref_index[0][4*mb_xy + 2] =
82 s->current_picture.ref_index[0][4*mb_xy + 3] =
s->field_select[0][1];
86 s->current_picture.motion_val[0][xy][0] = motion_x;
87 s->current_picture.motion_val[0][xy][1] = motion_y;
88 s->current_picture.motion_val[0][xy + 1][0] = motion_x;
89 s->current_picture.motion_val[0][xy + 1][1] = motion_y;
90 s->current_picture.motion_val[0][xy +
wrap][0] = motion_x;
91 s->current_picture.motion_val[0][xy +
wrap][1] = motion_y;
92 s->current_picture.motion_val[0][xy + 1 +
wrap][0] = motion_x;
93 s->current_picture.motion_val[0][xy + 1 +
wrap][1] = motion_y;
113 x = 2 *
s->mb_x + (n & 1);
114 y = 2 *
s->mb_y + ((n & 2) >> 1);
116 dc_val =
s->dc_val[0];
121 dc_val =
s->dc_val[n - 4 + 1];
126 a = dc_val[(x - 1) + (y) *
wrap];
127 c = dc_val[(x) + (y - 1) *
wrap];
130 if(
s->first_slice_line && n!=3){
132 if(n!=1 &&
s->mb_x ==
s->resync_mb_x)
a= 1024;
135 if (
a != 1024 &&
c != 1024)
143 *dc_val_ptr = &dc_val[x + y *
wrap];
149 const int linesize =
s->linesize;
150 const int uvlinesize=
s->uvlinesize;
151 const int xy =
s->mb_y *
s->mb_stride +
s->mb_x;
160 if (!
IS_SKIP(
s->current_picture.mb_type[xy])) {
162 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize, linesize, qp_c);
163 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize + 8, linesize, qp_c);
168 int qp_dt, qp_tt, qp_tc;
170 if (
IS_SKIP(
s->current_picture.mb_type[xy -
s->mb_stride]))
173 qp_tt =
s->current_picture.qscale_table[xy -
s->mb_stride];
181 const int chroma_qp=
s->chroma_qscale_table[qp_tc];
182 s->h263dsp.h263_v_loop_filter(dest_y, linesize, qp_tc);
183 s->h263dsp.h263_v_loop_filter(dest_y + 8, linesize, qp_tc);
185 s->h263dsp.h263_v_loop_filter(dest_cb, uvlinesize, chroma_qp);
186 s->h263dsp.h263_v_loop_filter(dest_cr, uvlinesize, chroma_qp);
190 s->h263dsp.h263_h_loop_filter(dest_y - 8 * linesize + 8, linesize, qp_tt);
193 if (qp_tt ||
IS_SKIP(
s->current_picture.mb_type[xy - 1 -
s->mb_stride]))
196 qp_dt =
s->current_picture.qscale_table[xy - 1 -
s->mb_stride];
199 const int chroma_qp=
s->chroma_qscale_table[qp_dt];
200 s->h263dsp.h263_h_loop_filter(dest_y - 8 * linesize, linesize, qp_dt);
201 s->h263dsp.h263_h_loop_filter(dest_cb - 8 * uvlinesize, uvlinesize, chroma_qp);
202 s->h263dsp.h263_h_loop_filter(dest_cr - 8 * uvlinesize, uvlinesize, chroma_qp);
208 s->h263dsp.h263_h_loop_filter(dest_y + 8, linesize, qp_c);
209 if(
s->mb_y + 1 ==
s->mb_height)
210 s->h263dsp.h263_h_loop_filter(dest_y + 8 * linesize + 8, linesize, qp_c);
215 if (qp_c ||
IS_SKIP(
s->current_picture.mb_type[xy - 1]))
218 qp_lc =
s->current_picture.qscale_table[xy - 1];
221 s->h263dsp.h263_h_loop_filter(dest_y, linesize, qp_lc);
222 if(
s->mb_y + 1 ==
s->mb_height){
223 const int chroma_qp=
s->chroma_qscale_table[qp_lc];
224 s->h263dsp.h263_h_loop_filter(dest_y + 8 * linesize, linesize, qp_lc);
225 s->h263dsp.h263_h_loop_filter(dest_cb, uvlinesize, chroma_qp);
226 s->h263dsp.h263_h_loop_filter(dest_cr, uvlinesize, chroma_qp);
235 int16_t *dc_val, *ac_val, *ac_val1;
239 x = 2 *
s->mb_x + (n & 1);
240 y = 2 *
s->mb_y + (n>> 1);
242 dc_val =
s->dc_val[0];
243 ac_val =
s->ac_val[0][0];
244 scale =
s->y_dc_scale;
249 dc_val =
s->dc_val[n - 4 + 1];
250 ac_val =
s->ac_val[n - 4 + 1][0];
251 scale =
s->c_dc_scale;
254 ac_val += ((y) *
wrap + (x)) * 16;
260 a = dc_val[(x - 1) + (y) *
wrap];
261 c = dc_val[(x) + (y - 1) *
wrap];
264 if(
s->first_slice_line && n!=3){
266 if(n!=1 &&
s->mb_x ==
s->resync_mb_x)
a= 1024;
271 if (
s->h263_aic_dir) {
276 block[
s->idsp.idct_permutation[
i << 3]] += ac_val[
i];
285 block[
s->idsp.idct_permutation[
i]] += ac_val[
i + 8];
292 if (
a != 1024 &&
c != 1024)
313 ac_val1[
i] =
block[
s->idsp.idct_permutation[
i << 3]];
316 ac_val1[8 +
i] =
block[
s->idsp.idct_permutation[
i]];
323 int16_t *
A, *
B, *
C, (*mot_val)[2];
324 static const int off[4]= {2, 1, 1, -1};
327 mot_val =
s->current_picture.motion_val[dir] +
s->block_index[
block];
331 if (
s->first_slice_line &&
block<3) {
335 if(
s->mb_x ==
s->resync_mb_x){
337 }
else if(
s->mb_x + 1 ==
s->resync_mb_x &&
s->h263_pred){
351 if(
s->mb_x + 1 ==
s->resync_mb_x &&
s->h263_pred){
360 B = mot_val[ -
wrap];
362 if(
s->mb_x ==
s->resync_mb_x)
369 B = mot_val[ -
wrap];