37 s->idsp.perm_type =
w->wdsp.idct_perm;
52 s->idsp.idct_put =
w->wdsp.idct_put;
53 s->idsp.idct_add =
w->wdsp.idct_add;
62 if (
s->block_last_index[n] >= 0) {
63 switch (
w->abt_type_table[n]) {
70 s->bdsp.clear_block(
w->abt_block2[n]);
75 s->bdsp.clear_block(
w->abt_block2[n]);
103 int motion_x,
int motion_y,
int h)
107 int dxy, mx, my, src_x, src_y, v_edge_pos;
108 ptrdiff_t
offset, linesize, uvlinesize;
111 dxy = ((motion_y & 1) << 1) | (motion_x & 1);
112 dxy = 2 * dxy +
w->hshift;
113 src_x =
s->mb_x * 16 + (motion_x >> 1);
114 src_y =
s->mb_y * 16 + (motion_y >> 1);
117 v_edge_pos =
s->v_edge_pos;
118 src_x = av_clip(src_x, -16,
s->width);
119 src_y = av_clip(src_y, -16,
s->height);
121 if (src_x <= -16 || src_x >=
s->width)
123 if (src_y <= -16 || src_y >=
s->height)
126 linesize =
s->linesize;
127 uvlinesize =
s->uvlinesize;
128 ptr = ref_picture[0] + (src_y * linesize) + src_x;
130 if (src_x < 1 || src_y < 1 || src_x + 17 >=
s->h_edge_pos ||
131 src_y +
h + 1 >= v_edge_pos) {
132 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr - 1 -
s->linesize,
133 s->linesize,
s->linesize, 19, 19,
134 src_x - 1, src_y - 1,
135 s->h_edge_pos,
s->v_edge_pos);
136 ptr =
s->sc.edge_emu_buffer + 1 +
s->linesize;
140 w->wdsp.put_mspel_pixels_tab[dxy](dest_y, ptr, linesize);
141 w->wdsp.put_mspel_pixels_tab[dxy](dest_y + 8, ptr + 8, linesize);
142 w->wdsp.put_mspel_pixels_tab[dxy](dest_y + 8 * linesize, ptr + 8 * linesize, linesize);
143 w->wdsp.put_mspel_pixels_tab[dxy](dest_y + 8 + 8 * linesize, ptr + 8 + 8 * linesize, linesize);
149 if ((motion_x & 3) != 0)
151 if ((motion_y & 3) != 0)
156 src_x =
s->mb_x * 8 + mx;
157 src_y =
s->mb_y * 8 + my;
158 src_x = av_clip(src_x, -8,
s->width >> 1);
159 if (src_x == (
s->width >> 1))
161 src_y = av_clip(src_y, -8,
s->height >> 1);
162 if (src_y == (
s->height >> 1))
164 offset = (src_y * uvlinesize) + src_x;
165 ptr = ref_picture[1] +
offset;
167 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
168 s->uvlinesize,
s->uvlinesize,
171 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
172 ptr =
s->sc.edge_emu_buffer;
174 pix_op[1][dxy](dest_cb, ptr, uvlinesize,
h >> 1);
176 ptr = ref_picture[2] +
offset;
178 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
179 s->uvlinesize,
s->uvlinesize,
182 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
183 ptr =
s->sc.edge_emu_buffer;
185 pix_op[1][dxy](dest_cr, ptr, uvlinesize,
h >> 1);