54 const int mb_xy =
s->mb_y *
s->mb_stride +
s->mb_x;
56 const int wrap =
s->b8_stride;
57 const int xy =
s->block_index[0];
59 s->current_picture.mbskip_table[mb_xy] =
s->mb_skipped;
62 int motion_x, motion_y;
67 motion_x =
s->mv[0][0][0];
68 motion_y =
s->mv[0][0][1];
71 motion_x =
s->mv[0][0][0] +
s->mv[0][1][0];
72 motion_y =
s->mv[0][0][1] +
s->mv[0][1][1];
73 motion_x = (motion_x>>1) | (motion_x&1);
75 s->p_field_mv_table[
i][0][mb_xy][0]=
s->mv[0][
i][0];
76 s->p_field_mv_table[
i][0][mb_xy][1]=
s->mv[0][
i][1];
78 s->current_picture.ref_index[0][4*mb_xy ] =
79 s->current_picture.ref_index[0][4*mb_xy + 1] =
s->field_select[0][0];
80 s->current_picture.ref_index[0][4*mb_xy + 2] =
81 s->current_picture.ref_index[0][4*mb_xy + 3] =
s->field_select[0][1];
85 s->current_picture.motion_val[0][xy][0] = motion_x;
86 s->current_picture.motion_val[0][xy][1] = motion_y;
87 s->current_picture.motion_val[0][xy + 1][0] = motion_x;
88 s->current_picture.motion_val[0][xy + 1][1] = motion_y;
89 s->current_picture.motion_val[0][xy +
wrap][0] = motion_x;
90 s->current_picture.motion_val[0][xy +
wrap][1] = motion_y;
91 s->current_picture.motion_val[0][xy + 1 +
wrap][0] = motion_x;
92 s->current_picture.motion_val[0][xy + 1 +
wrap][1] = motion_y;
112 x = 2 *
s->mb_x + (n & 1);
113 y = 2 *
s->mb_y + ((n & 2) >> 1);
115 dc_val =
s->dc_val[0];
120 dc_val =
s->dc_val[n - 4 + 1];
125 a = dc_val[(x - 1) + (y) *
wrap];
126 c = dc_val[(x) + (y - 1) *
wrap];
129 if(
s->first_slice_line && n!=3){
131 if(n!=1 &&
s->mb_x ==
s->resync_mb_x)
a= 1024;
134 if (
a != 1024 &&
c != 1024)
142 *dc_val_ptr = &dc_val[x + y *
wrap];
148 const int linesize =
s->linesize;
149 const int uvlinesize=
s->uvlinesize;
150 const int xy =
s->mb_y *
s->mb_stride +
s->mb_x;
151 uint8_t *dest_y =
s->dest[0];
152 uint8_t *dest_cb=
s->dest[1];
153 uint8_t *dest_cr=
s->dest[2];
159 if (!
IS_SKIP(
s->current_picture.mb_type[xy])) {
161 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize, linesize, qp_c);
162 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize + 8, linesize, qp_c);
167 int qp_dt, qp_tt, qp_tc;
169 if (
IS_SKIP(
s->current_picture.mb_type[xy -
s->mb_stride]))
172 qp_tt =
s->current_picture.qscale_table[xy -
s->mb_stride];
180 const int chroma_qp=
s->chroma_qscale_table[qp_tc];
181 s->h263dsp.h263_v_loop_filter(dest_y, linesize, qp_tc);
182 s->h263dsp.h263_v_loop_filter(dest_y + 8, linesize, qp_tc);
184 s->h263dsp.h263_v_loop_filter(dest_cb, uvlinesize, chroma_qp);
185 s->h263dsp.h263_v_loop_filter(dest_cr, uvlinesize, chroma_qp);
189 s->h263dsp.h263_h_loop_filter(dest_y - 8 * linesize + 8, linesize, qp_tt);
192 if (qp_tt ||
IS_SKIP(
s->current_picture.mb_type[xy - 1 -
s->mb_stride]))
195 qp_dt =
s->current_picture.qscale_table[xy - 1 -
s->mb_stride];
198 const int chroma_qp=
s->chroma_qscale_table[qp_dt];
199 s->h263dsp.h263_h_loop_filter(dest_y - 8 * linesize, linesize, qp_dt);
200 s->h263dsp.h263_h_loop_filter(dest_cb - 8 * uvlinesize, uvlinesize, chroma_qp);
201 s->h263dsp.h263_h_loop_filter(dest_cr - 8 * uvlinesize, uvlinesize, chroma_qp);
207 s->h263dsp.h263_h_loop_filter(dest_y + 8, linesize, qp_c);
208 if(
s->mb_y + 1 ==
s->mb_height)
209 s->h263dsp.h263_h_loop_filter(dest_y + 8 * linesize + 8, linesize, qp_c);
214 if (qp_c ||
IS_SKIP(
s->current_picture.mb_type[xy - 1]))
217 qp_lc =
s->current_picture.qscale_table[xy - 1];
220 s->h263dsp.h263_h_loop_filter(dest_y, linesize, qp_lc);
221 if(
s->mb_y + 1 ==
s->mb_height){
222 const int chroma_qp=
s->chroma_qscale_table[qp_lc];
223 s->h263dsp.h263_h_loop_filter(dest_y + 8 * linesize, linesize, qp_lc);
224 s->h263dsp.h263_h_loop_filter(dest_cb, uvlinesize, chroma_qp);
225 s->h263dsp.h263_h_loop_filter(dest_cr, uvlinesize, chroma_qp);
234 int16_t *dc_val, *ac_val, *ac_val1;
238 x = 2 *
s->mb_x + (n & 1);
239 y = 2 *
s->mb_y + (n>> 1);
241 dc_val =
s->dc_val[0];
242 ac_val =
s->ac_val[0][0];
248 dc_val =
s->dc_val[n - 4 + 1];
249 ac_val =
s->ac_val[n - 4 + 1][0];
253 ac_val += ((y) *
wrap + (x)) * 16;
259 a = dc_val[(x - 1) + (y) *
wrap];
260 c = dc_val[(x) + (y - 1) *
wrap];
263 if(
s->first_slice_line && n!=3){
265 if(n!=1 &&
s->mb_x ==
s->resync_mb_x)
a= 1024;
270 if (
s->h263_aic_dir) {
275 block[
s->idsp.idct_permutation[
i << 3]] += ac_val[
i];
284 block[
s->idsp.idct_permutation[
i]] += ac_val[
i + 8];
291 if (
a != 1024 &&
c != 1024)
312 ac_val1[
i] =
block[
s->idsp.idct_permutation[
i << 3]];
315 ac_val1[8 +
i] =
block[
s->idsp.idct_permutation[
i]];
322 int16_t *
A, *
B, *
C, (*mot_val)[2];
323 static const int off[4]= {2, 1, 1, -1};
326 mot_val =
s->current_picture.motion_val[dir] +
s->block_index[
block];
330 if (
s->first_slice_line &&
block<3) {
334 if(
s->mb_x ==
s->resync_mb_x){
336 }
else if(
s->mb_x + 1 ==
s->resync_mb_x &&
s->h263_pred){
350 if(
s->mb_x + 1 ==
s->resync_mb_x &&
s->h263_pred){
359 B = mot_val[ -
wrap];
361 if(
s->mb_x ==
s->resync_mb_x)
368 B = mot_val[ -
wrap];