43 static av_cold void h263_init_rl_inter(
void)
57 const int mb_xy =
s->mb_y *
s->mb_stride +
s->mb_x;
59 const int wrap =
s->b8_stride;
60 const int xy =
s->block_index[0];
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->cur_pic.ref_index[0][4*mb_xy ] =
80 s->cur_pic.ref_index[0][4*mb_xy + 1] =
s->field_select[0][0];
81 s->cur_pic.ref_index[0][4*mb_xy + 2] =
82 s->cur_pic.ref_index[0][4*mb_xy + 3] =
s->field_select[0][1];
86 s->cur_pic.motion_val[0][xy][0] = motion_x;
87 s->cur_pic.motion_val[0][xy][1] = motion_y;
88 s->cur_pic.motion_val[0][xy + 1][0] = motion_x;
89 s->cur_pic.motion_val[0][xy + 1][1] = motion_y;
90 s->cur_pic.motion_val[0][xy +
wrap][0] = motion_x;
91 s->cur_pic.motion_val[0][xy +
wrap][1] = motion_y;
92 s->cur_pic.motion_val[0][xy + 1 +
wrap][0] = motion_x;
93 s->cur_pic.motion_val[0][xy + 1 +
wrap][1] = motion_y;
99 const int linesize =
s->linesize;
100 const int uvlinesize=
s->uvlinesize;
101 const int xy =
s->mb_y *
s->mb_stride +
s->mb_x;
102 uint8_t *dest_y =
s->dest[0];
103 uint8_t *dest_cb=
s->dest[1];
104 uint8_t *dest_cr=
s->dest[2];
110 if (!
IS_SKIP(
s->cur_pic.mb_type[xy])) {
112 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize, linesize, qp_c);
113 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize + 8, linesize, qp_c);
118 int qp_dt, qp_tt, qp_tc;
120 if (
IS_SKIP(
s->cur_pic.mb_type[xy -
s->mb_stride]))
123 qp_tt =
s->cur_pic.qscale_table[xy -
s->mb_stride];
131 const int chroma_qp=
s->chroma_qscale_table[qp_tc];
132 s->h263dsp.h263_v_loop_filter(dest_y, linesize, qp_tc);
133 s->h263dsp.h263_v_loop_filter(dest_y + 8, linesize, qp_tc);
135 s->h263dsp.h263_v_loop_filter(dest_cb, uvlinesize, chroma_qp);
136 s->h263dsp.h263_v_loop_filter(dest_cr, uvlinesize, chroma_qp);
140 s->h263dsp.h263_h_loop_filter(dest_y - 8 * linesize + 8, linesize, qp_tt);
143 if (qp_tt ||
IS_SKIP(
s->cur_pic.mb_type[xy - 1 -
s->mb_stride]))
146 qp_dt =
s->cur_pic.qscale_table[xy - 1 -
s->mb_stride];
149 const int chroma_qp=
s->chroma_qscale_table[qp_dt];
150 s->h263dsp.h263_h_loop_filter(dest_y - 8 * linesize, linesize, qp_dt);
151 s->h263dsp.h263_h_loop_filter(dest_cb - 8 * uvlinesize, uvlinesize, chroma_qp);
152 s->h263dsp.h263_h_loop_filter(dest_cr - 8 * uvlinesize, uvlinesize, chroma_qp);
158 s->h263dsp.h263_h_loop_filter(dest_y + 8, linesize, qp_c);
159 if(
s->mb_y + 1 ==
s->mb_height)
160 s->h263dsp.h263_h_loop_filter(dest_y + 8 * linesize + 8, linesize, qp_c);
165 if (qp_c ||
IS_SKIP(
s->cur_pic.mb_type[xy - 1]))
168 qp_lc =
s->cur_pic.qscale_table[xy - 1];
171 s->h263dsp.h263_h_loop_filter(dest_y, linesize, qp_lc);
172 if(
s->mb_y + 1 ==
s->mb_height){
173 const int chroma_qp=
s->chroma_qscale_table[qp_lc];
174 s->h263dsp.h263_h_loop_filter(dest_y + 8 * linesize, linesize, qp_lc);
175 s->h263dsp.h263_h_loop_filter(dest_cb, uvlinesize, chroma_qp);
176 s->h263dsp.h263_h_loop_filter(dest_cr, uvlinesize, chroma_qp);
186 int16_t *
A, *
B, *
C, (*mot_val)[2];
187 static const int off[4]= {2, 1, 1, -1};
190 mot_val =
s->cur_pic.motion_val[dir] +
s->block_index[
block];
194 if (
s->first_slice_line &&
block<3) {
198 if(
s->mb_x ==
s->resync_mb_x){
200 }
else if(
s->mb_x + 1 ==
s->resync_mb_x &&
s->h263_pred){
214 if(
s->mb_x + 1 ==
s->resync_mb_x &&
s->h263_pred){
223 B = mot_val[ -
wrap];
225 if(
s->mb_x ==
s->resync_mb_x)
232 B = mot_val[ -
wrap];