43 const int mb_xy =
s->mb_y *
s->mb_stride +
s->mb_x;
45 const int wrap =
s->b8_stride;
46 const int xy =
s->block_index[0];
48 s->current_picture.mbskip_table[mb_xy] =
s->mb_skipped;
51 int motion_x, motion_y;
56 motion_x =
s->mv[0][0][0];
57 motion_y =
s->mv[0][0][1];
60 motion_x =
s->mv[0][0][0] +
s->mv[0][1][0];
61 motion_y =
s->mv[0][0][1] +
s->mv[0][1][1];
62 motion_x = (motion_x>>1) | (motion_x&1);
64 s->p_field_mv_table[
i][0][mb_xy][0]=
s->mv[0][
i][0];
65 s->p_field_mv_table[
i][0][mb_xy][1]=
s->mv[0][
i][1];
67 s->current_picture.ref_index[0][4*mb_xy ] =
68 s->current_picture.ref_index[0][4*mb_xy + 1] =
s->field_select[0][0];
69 s->current_picture.ref_index[0][4*mb_xy + 2] =
70 s->current_picture.ref_index[0][4*mb_xy + 3] =
s->field_select[0][1];
74 s->current_picture.motion_val[0][xy][0] = motion_x;
75 s->current_picture.motion_val[0][xy][1] = motion_y;
76 s->current_picture.motion_val[0][xy + 1][0] = motion_x;
77 s->current_picture.motion_val[0][xy + 1][1] = motion_y;
78 s->current_picture.motion_val[0][xy +
wrap][0] = motion_x;
79 s->current_picture.motion_val[0][xy +
wrap][1] = motion_y;
80 s->current_picture.motion_val[0][xy + 1 +
wrap][0] = motion_x;
81 s->current_picture.motion_val[0][xy + 1 +
wrap][1] = motion_y;
101 x = 2 *
s->mb_x + (
n & 1);
102 y = 2 *
s->mb_y + ((
n & 2) >> 1);
104 dc_val =
s->dc_val[0];
109 dc_val =
s->dc_val[
n - 4 + 1];
114 a = dc_val[(x - 1) + (y) *
wrap];
115 c = dc_val[(x) + (y - 1) *
wrap];
118 if(
s->first_slice_line &&
n!=3){
120 if(
n!=1 &&
s->mb_x ==
s->resync_mb_x)
a= 1024;
123 if (
a != 1024 &&
c != 1024)
131 *dc_val_ptr = &dc_val[x + y *
wrap];
137 const int linesize =
s->linesize;
138 const int uvlinesize=
s->uvlinesize;
139 const int xy =
s->mb_y *
s->mb_stride +
s->mb_x;
148 if (!
IS_SKIP(
s->current_picture.mb_type[xy])) {
150 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize, linesize, qp_c);
151 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize + 8, linesize, qp_c);
156 int qp_dt, qp_tt, qp_tc;
158 if (
IS_SKIP(
s->current_picture.mb_type[xy -
s->mb_stride]))
161 qp_tt =
s->current_picture.qscale_table[xy -
s->mb_stride];
169 const int chroma_qp=
s->chroma_qscale_table[qp_tc];
170 s->h263dsp.h263_v_loop_filter(dest_y, linesize, qp_tc);
171 s->h263dsp.h263_v_loop_filter(dest_y + 8, linesize, qp_tc);
173 s->h263dsp.h263_v_loop_filter(dest_cb, uvlinesize, chroma_qp);
174 s->h263dsp.h263_v_loop_filter(dest_cr, uvlinesize, chroma_qp);
178 s->h263dsp.h263_h_loop_filter(dest_y - 8 * linesize + 8, linesize, qp_tt);
181 if (qp_tt ||
IS_SKIP(
s->current_picture.mb_type[xy - 1 -
s->mb_stride]))
184 qp_dt =
s->current_picture.qscale_table[xy - 1 -
s->mb_stride];
187 const int chroma_qp=
s->chroma_qscale_table[qp_dt];
188 s->h263dsp.h263_h_loop_filter(dest_y - 8 * linesize, linesize, qp_dt);
189 s->h263dsp.h263_h_loop_filter(dest_cb - 8 * uvlinesize, uvlinesize, chroma_qp);
190 s->h263dsp.h263_h_loop_filter(dest_cr - 8 * uvlinesize, uvlinesize, chroma_qp);
196 s->h263dsp.h263_h_loop_filter(dest_y + 8, linesize, qp_c);
197 if(
s->mb_y + 1 ==
s->mb_height)
198 s->h263dsp.h263_h_loop_filter(dest_y + 8 * linesize + 8, linesize, qp_c);
203 if (qp_c ||
IS_SKIP(
s->current_picture.mb_type[xy - 1]))
206 qp_lc =
s->current_picture.qscale_table[xy - 1];
209 s->h263dsp.h263_h_loop_filter(dest_y, linesize, qp_lc);
210 if(
s->mb_y + 1 ==
s->mb_height){
211 const int chroma_qp=
s->chroma_qscale_table[qp_lc];
212 s->h263dsp.h263_h_loop_filter(dest_y + 8 * linesize, linesize, qp_lc);
213 s->h263dsp.h263_h_loop_filter(dest_cb, uvlinesize, chroma_qp);
214 s->h263dsp.h263_h_loop_filter(dest_cr, uvlinesize, chroma_qp);
223 int16_t *dc_val, *ac_val, *ac_val1;
227 x = 2 *
s->mb_x + (
n & 1);
228 y = 2 *
s->mb_y + (
n>> 1);
230 dc_val =
s->dc_val[0];
231 ac_val =
s->ac_val[0][0];
232 scale =
s->y_dc_scale;
237 dc_val =
s->dc_val[
n - 4 + 1];
238 ac_val =
s->ac_val[
n - 4 + 1][0];
239 scale =
s->c_dc_scale;
242 ac_val += ((y) *
wrap + (x)) * 16;
248 a = dc_val[(x - 1) + (y) *
wrap];
249 c = dc_val[(x) + (y - 1) *
wrap];
252 if(
s->first_slice_line &&
n!=3){
254 if(
n!=1 &&
s->mb_x ==
s->resync_mb_x)
a= 1024;
259 if (
s->h263_aic_dir) {
264 block[
s->idsp.idct_permutation[
i << 3]] += ac_val[
i];
273 block[
s->idsp.idct_permutation[
i]] += ac_val[
i + 8];
280 if (
a != 1024 &&
c != 1024)
301 ac_val1[
i] =
block[
s->idsp.idct_permutation[
i << 3]];
304 ac_val1[8 +
i] =
block[
s->idsp.idct_permutation[
i]];
311 int16_t *
A, *
B, *
C, (*mot_val)[2];
312 static const int off[4]= {2, 1, 1, -1};
315 mot_val =
s->current_picture.motion_val[dir] +
s->block_index[
block];
319 if (
s->first_slice_line &&
block<3) {
323 if(
s->mb_x ==
s->resync_mb_x){
325 }
else if(
s->mb_x + 1 ==
s->resync_mb_x &&
s->h263_pred){
339 if(
s->mb_x + 1 ==
s->resync_mb_x &&
s->h263_pred){
348 B = mot_val[ -
wrap];
350 if(
s->mb_x ==
s->resync_mb_x)
357 B = mot_val[ -
wrap];