24 #include "config_components.h"
38 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
39 uint8_t **ref_picture)
42 int src_x, src_y, motion_x, motion_y;
46 motion_x =
s->sprite_offset[0][0];
47 motion_y =
s->sprite_offset[0][1];
48 src_x =
s->mb_x * 16 + (motion_x >> (
s->sprite_warping_accuracy + 1));
49 src_y =
s->mb_y * 16 + (motion_y >> (
s->sprite_warping_accuracy + 1));
50 motion_x *= 1 << (3 -
s->sprite_warping_accuracy);
51 motion_y *= 1 << (3 -
s->sprite_warping_accuracy);
52 src_x =
av_clip(src_x, -16,
s->width);
53 if (src_x ==
s->width)
55 src_y =
av_clip(src_y, -16,
s->height);
56 if (src_y ==
s->height)
62 ptr = ref_picture[0] + src_y *
linesize + src_x;
64 if ((
unsigned)src_x >=
FFMAX(
s->h_edge_pos - 17, 0) ||
65 (
unsigned)src_y >=
FFMAX(
s->v_edge_pos - 17, 0)) {
66 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
70 s->h_edge_pos,
s->v_edge_pos);
71 ptr =
s->sc.edge_emu_buffer;
74 if ((motion_x | motion_y) & 7) {
76 motion_x & 15, motion_y & 15, 128 -
s->no_rounding);
77 s->mdsp.gmc1(dest_y + 8, ptr + 8,
linesize, 16,
78 motion_x & 15, motion_y & 15, 128 -
s->no_rounding);
82 dxy = ((motion_x >> 3) & 1) | ((motion_y >> 2) & 2);
84 s->hdsp.put_no_rnd_pixels_tab[0][dxy](dest_y, ptr,
linesize, 16);
86 s->hdsp.put_pixels_tab[0][dxy](dest_y, ptr,
linesize, 16);
93 motion_x =
s->sprite_offset[1][0];
94 motion_y =
s->sprite_offset[1][1];
95 src_x =
s->mb_x * 8 + (motion_x >> (
s->sprite_warping_accuracy + 1));
96 src_y =
s->mb_y * 8 + (motion_y >> (
s->sprite_warping_accuracy + 1));
97 motion_x *= 1 << (3 -
s->sprite_warping_accuracy);
98 motion_y *= 1 << (3 -
s->sprite_warping_accuracy);
99 src_x =
av_clip(src_x, -8,
s->width >> 1);
100 if (src_x ==
s->width >> 1)
102 src_y =
av_clip(src_y, -8,
s->height >> 1);
103 if (src_y ==
s->height >> 1)
107 ptr = ref_picture[1] +
offset;
108 if ((
unsigned)src_x >=
FFMAX((
s->h_edge_pos >> 1) - 9, 0) ||
109 (unsigned)src_y >=
FFMAX((
s->v_edge_pos >> 1) - 9, 0)) {
110 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
114 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
115 ptr =
s->sc.edge_emu_buffer;
119 motion_x & 15, motion_y & 15, 128 -
s->no_rounding);
121 ptr = ref_picture[2] +
offset;
123 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
127 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
128 ptr =
s->sc.edge_emu_buffer;
131 motion_x & 15, motion_y & 15, 128 -
s->no_rounding);
135 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
136 uint8_t **ref_picture)
140 const int a =
s->sprite_warping_accuracy;
146 ptr = ref_picture[0];
148 ox =
s->sprite_offset[0][0] +
s->sprite_delta[0][0] *
s->mb_x * 16 +
149 s->sprite_delta[0][1] *
s->mb_y * 16;
150 oy =
s->sprite_offset[0][1] +
s->sprite_delta[1][0] *
s->mb_x * 16 +
151 s->sprite_delta[1][1] *
s->mb_y * 16;
155 s->sprite_delta[0][0],
s->sprite_delta[0][1],
156 s->sprite_delta[1][0],
s->sprite_delta[1][1],
157 a + 1, (1 << (2 *
a + 1)) -
s->no_rounding,
158 s->h_edge_pos,
s->v_edge_pos);
159 s->mdsp.gmc(dest_y + 8, ptr,
linesize, 16,
160 ox +
s->sprite_delta[0][0] * 8,
161 oy +
s->sprite_delta[1][0] * 8,
162 s->sprite_delta[0][0],
s->sprite_delta[0][1],
163 s->sprite_delta[1][0],
s->sprite_delta[1][1],
164 a + 1, (1 << (2 *
a + 1)) -
s->no_rounding,
165 s->h_edge_pos,
s->v_edge_pos);
170 ox =
s->sprite_offset[1][0] +
s->sprite_delta[0][0] *
s->mb_x * 8 +
171 s->sprite_delta[0][1] *
s->mb_y * 8;
172 oy =
s->sprite_offset[1][1] +
s->sprite_delta[1][0] *
s->mb_x * 8 +
173 s->sprite_delta[1][1] *
s->mb_y * 8;
175 ptr = ref_picture[1];
178 s->sprite_delta[0][0],
s->sprite_delta[0][1],
179 s->sprite_delta[1][0],
s->sprite_delta[1][1],
180 a + 1, (1 << (2 *
a + 1)) -
s->no_rounding,
181 (
s->h_edge_pos + 1) >> 1, (
s->v_edge_pos + 1) >> 1);
183 ptr = ref_picture[2];
186 s->sprite_delta[0][0],
s->sprite_delta[0][1],
187 s->sprite_delta[1][0],
s->sprite_delta[1][1],
188 a + 1, (1 << (2 *
a + 1)) -
s->no_rounding,
189 (
s->h_edge_pos + 1) >> 1, (
s->v_edge_pos + 1) >> 1);
194 int src_x,
int src_y,
196 int motion_x,
int motion_y)
201 src_x += motion_x >> 1;
202 src_y += motion_y >> 1;
205 src_x =
av_clip(src_x, -16,
s->width);
206 if (src_x !=
s->width)
208 src_y =
av_clip(src_y, -16,
s->height);
209 if (src_y !=
s->height)
210 dxy |= (motion_y & 1) << 1;
211 src += src_y *
s->linesize + src_x;
213 if ((
unsigned)src_x >=
FFMAX(
s->h_edge_pos - (motion_x & 1) - 7, 0) ||
214 (unsigned)src_y >=
FFMAX(
s->v_edge_pos - (motion_y & 1) - 7, 0)) {
215 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
src,
216 s->linesize,
s->linesize,
219 s->h_edge_pos,
s->v_edge_pos);
220 src =
s->sc.edge_emu_buffer;
223 pix_op[dxy](
dest,
src,
s->linesize, 8);
235 uint8_t **ref_picture,
244 uint8_t *ptr_y, *ptr_cb, *ptr_cr;
245 int dxy, uvdxy, mx, my, src_x, src_y,
250 linesize =
s->current_picture.f->linesize[0] << field_based;
251 uvlinesize =
s->current_picture.f->linesize[1] << field_based;
252 block_y_half = (field_based | is_16x8);
254 dxy = ((motion_y & 1) << 1) | (motion_x & 1);
255 src_x =
s->mb_x * 16 + (motion_x >> 1);
256 src_y = (
mb_y << (4 - block_y_half)) + (motion_y >> 1);
258 if (!is_mpeg12 &&
s->out_format ==
FMT_H263) {
260 mx = (motion_x >> 1) | (motion_x & 1);
262 uvdxy = ((my & 1) << 1) | (mx & 1);
263 uvsrc_x =
s->mb_x * 8 + (mx >> 1);
264 uvsrc_y = (
mb_y << (3 - block_y_half)) + (my >> 1);
266 uvdxy = dxy | (motion_y & 2) | ((motion_x & 2) >> 1);
267 uvsrc_x = src_x >> 1;
268 uvsrc_y = src_y >> 1;
271 }
else if (!is_mpeg12 &&
s->out_format ==
FMT_H261) {
275 uvsrc_x =
s->mb_x * 8 + mx;
276 uvsrc_y =
mb_y * 8 + my;
278 if (
s->chroma_y_shift) {
281 uvdxy = ((my & 1) << 1) | (mx & 1);
282 uvsrc_x =
s->mb_x * 8 + (mx >> 1);
283 uvsrc_y = (
mb_y << (3 - block_y_half)) + (my >> 1);
285 if (
s->chroma_x_shift) {
288 uvdxy = ((motion_y & 1) << 1) | (mx & 1);
289 uvsrc_x =
s->mb_x * 8 + (mx >> 1);
300 ptr_y = ref_picture[0] + src_y *
linesize + src_x;
301 ptr_cb = ref_picture[1] + uvsrc_y *
uvlinesize + uvsrc_x;
302 ptr_cr = ref_picture[2] + uvsrc_y *
uvlinesize + uvsrc_x;
304 if ((
unsigned)src_x >=
FFMAX(
s->h_edge_pos - (motion_x & 1) - 15 , 0) ||
306 if (is_mpeg12 || (CONFIG_SMALL &&
310 "MPEG motion vector out of boundary (%d %d)\n", src_x,
314 src_y = (unsigned)src_y << field_based;
315 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr_y,
316 s->linesize,
s->linesize,
317 17, 17 + field_based,
319 s->h_edge_pos,
s->v_edge_pos);
320 ptr_y =
s->sc.edge_emu_buffer;
322 uint8_t *ubuf =
s->sc.edge_emu_buffer + 18 *
s->linesize;
323 uint8_t *vbuf = ubuf + 10 *
s->uvlinesize;
325 vbuf -=
s->uvlinesize;
326 uvsrc_y = (unsigned)uvsrc_y << field_based;
327 s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
328 s->uvlinesize,
s->uvlinesize,
331 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
332 s->vdsp.emulated_edge_mc(vbuf, ptr_cr,
333 s->uvlinesize,
s->uvlinesize,
336 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
345 dest_y +=
s->linesize;
346 dest_cb +=
s->uvlinesize;
347 dest_cr +=
s->uvlinesize;
351 ptr_y +=
s->linesize;
352 ptr_cb +=
s->uvlinesize;
353 ptr_cr +=
s->uvlinesize;
356 pix_op[0][dxy](dest_y, ptr_y,
linesize,
h);
359 pix_op[
s->chroma_x_shift][uvdxy]
361 pix_op[
s->chroma_x_shift][uvdxy]
364 if (!is_mpeg12 && (CONFIG_H261_ENCODER || CONFIG_H261_DECODER) &&
371 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
374 int motion_x,
int motion_y,
int h,
int is_16x8,
int mb_y)
380 motion_x, motion_y,
h, 1, is_16x8,
mb_y);
385 motion_x, motion_y,
h, 0, is_16x8,
mb_y);
389 uint8_t *dest_cb, uint8_t *dest_cr,
391 uint8_t **ref_picture,
393 int motion_x,
int motion_y,
int h,
int mb_y)
399 motion_x, motion_y,
h, 1, 0,
mb_y);
404 motion_x, motion_y,
h, 0, 0,
mb_y);
411 uint8_t *
const top =
src[1];
413 uint8_t *
const mid =
src[0];
414 uint8_t *
const right =
src[3];
415 uint8_t *
const bottom =
src[4];
416 #define OBMC_FILTER(x, t, l, m, r, b)\
417 dst[x]= (t*top[x] + l*left[x] + m*mid[x] + r*right[x] + b*bottom[x] + 4)>>3
418 #define OBMC_FILTER4(x, t, l, m, r, b)\
419 OBMC_FILTER(x , t, l, m, r, b);\
420 OBMC_FILTER(x+1 , t, l, m, r, b);\
421 OBMC_FILTER(x +stride, t, l, m, r, b);\
422 OBMC_FILTER(x+1+stride, t, l, m, r, b);
463 int src_x,
int src_y,
473 for (
i = 0;
i < 5;
i++) {
477 ptr[
i] =
s->sc.obmc_scratchpad + 8 * (
i & 1) +
478 s->linesize * 8 * (
i >> 1);
491 int field_based,
int bottom_field,
495 int motion_x,
int motion_y,
int h)
497 uint8_t *ptr_y, *ptr_cb, *ptr_cr;
498 int dxy, uvdxy, mx, my, src_x, src_y, uvsrc_x, uvsrc_y,
v_edge_pos;
501 dxy = ((motion_y & 3) << 2) | (motion_x & 3);
503 src_x =
s->mb_x * 16 + (motion_x >> 2);
504 src_y =
s->mb_y * (16 >> field_based) + (motion_y >> 2);
514 static const int rtab[8] = { 0, 0, 1, 1, 0, 0, 0, 1 };
515 mx = (motion_x >> 1) + rtab[motion_x & 7];
516 my = (motion_y >> 1) + rtab[motion_y & 7];
518 mx = (motion_x >> 1) | (motion_x & 1);
519 my = (motion_y >> 1) | (motion_y & 1);
524 mx = (mx >> 1) | (mx & 1);
525 my = (my >> 1) | (my & 1);
527 uvdxy = (mx & 1) | ((my & 1) << 1);
531 uvsrc_x =
s->mb_x * 8 + mx;
532 uvsrc_y =
s->mb_y * (8 >> field_based) + my;
534 ptr_y = ref_picture[0] + src_y *
linesize + src_x;
535 ptr_cb = ref_picture[1] + uvsrc_y *
uvlinesize + uvsrc_x;
536 ptr_cr = ref_picture[2] + uvsrc_y *
uvlinesize + uvsrc_x;
538 if ((
unsigned)src_x >=
FFMAX(
s->h_edge_pos - (motion_x & 3) - 15 , 0) ||
540 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr_y,
541 s->linesize,
s->linesize,
542 17, 17 + field_based,
543 src_x, src_y * (1 << field_based),
544 s->h_edge_pos,
s->v_edge_pos);
545 ptr_y =
s->sc.edge_emu_buffer;
547 uint8_t *ubuf =
s->sc.edge_emu_buffer + 18 *
s->linesize;
548 uint8_t *vbuf = ubuf + 10 *
s->uvlinesize;
550 vbuf -=
s->uvlinesize;
551 s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
552 s->uvlinesize,
s->uvlinesize,
554 uvsrc_x, uvsrc_y * (1 << field_based),
555 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
556 s->vdsp.emulated_edge_mc(vbuf, ptr_cr,
557 s->uvlinesize,
s->uvlinesize,
559 uvsrc_x, uvsrc_y * (1 << field_based),
560 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
567 qpix_op[0][dxy](dest_y, ptr_y,
linesize);
570 dest_y +=
s->linesize;
571 dest_cb +=
s->uvlinesize;
572 dest_cr +=
s->uvlinesize;
576 ptr_y +=
s->linesize;
577 ptr_cb +=
s->uvlinesize;
578 ptr_cr +=
s->uvlinesize;
582 qpix_op[1][dxy](dest_y, ptr_y,
linesize);
583 qpix_op[1][dxy](dest_y + 8, ptr_y + 8,
linesize);
586 pix_op[1][uvdxy](dest_cr, ptr_cr,
uvlinesize,
h >> 1);
587 pix_op[1][uvdxy](dest_cb, ptr_cb,
uvlinesize,
h >> 1);
595 uint8_t *dest_cb, uint8_t *dest_cr,
596 uint8_t **ref_picture,
601 int src_x, src_y, dxy, emu = 0;
609 dxy = ((my & 1) << 1) | (mx & 1);
613 src_x =
s->mb_x * 8 + mx;
614 src_y =
s->mb_y * 8 + my;
615 src_x =
av_clip(src_x, -8, (
s->width >> 1));
616 if (src_x == (
s->width >> 1))
618 src_y =
av_clip(src_y, -8, (
s->height >> 1));
619 if (src_y == (
s->height >> 1))
622 offset = src_y *
s->uvlinesize + src_x;
623 ptr = ref_picture[1] +
offset;
624 if ((
unsigned)src_x >=
FFMAX((
s->h_edge_pos >> 1) - (dxy & 1) - 7, 0) ||
625 (
unsigned)src_y >=
FFMAX((
s->v_edge_pos >> 1) - (dxy >> 1) - 7, 0)) {
626 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
627 s->uvlinesize,
s->uvlinesize,
629 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
630 ptr =
s->sc.edge_emu_buffer;
633 pix_op[dxy](dest_cb, ptr,
s->uvlinesize, 8);
635 ptr = ref_picture[2] +
offset;
637 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
638 s->uvlinesize,
s->uvlinesize,
640 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
641 ptr =
s->sc.edge_emu_buffer;
643 pix_op[dxy](dest_cr, ptr,
s->uvlinesize, 8);
650 const int shift =
s->quarter_sample ? 2 : 1;
651 const int mx = (
s->mv[dir][0][0] >>
shift) + 16 *
s->mb_x + 8;
652 const int my = (
s->mv[dir][0][1] >>
shift) + 16 *
s->mb_y;
653 int off = mx + (my + (
s->mb_x & 3) * 4) *
s->linesize + 64;
655 s->vdsp.prefetch(pix[0] + off,
s->linesize, 4);
656 off = (mx >> 1) + ((my >> 1) + (
s->mb_x & 7)) *
s->uvlinesize + 64;
657 s->vdsp.prefetch(pix[1] + off, pix[2] - pix[1], 2);
664 uint8_t **ref_picture,
668 Picture *cur_frame = &
s->current_picture;
671 const int xy =
mb_x +
mb_y *
s->mb_stride;
672 const int mot_stride =
s->b8_stride;
673 const int mot_xy =
mb_x * 2 +
mb_y * 2 * mot_stride;
682 cur_frame->
motion_val[0][mot_xy + mot_stride]);
684 cur_frame->
motion_val[0][mot_xy + mot_stride + 1]);
687 cur_frame->
motion_val[0][mot_xy + mot_stride]);
689 cur_frame->
motion_val[0][mot_xy + mot_stride + 1]);
692 AV_COPY32(mv_cache[0][1], mv_cache[1][1]);
693 AV_COPY32(mv_cache[0][2], mv_cache[1][2]);
696 cur_frame->
motion_val[0][mot_xy - mot_stride]);
698 cur_frame->
motion_val[0][mot_xy - mot_stride + 1]);
702 AV_COPY32(mv_cache[1][0], mv_cache[1][1]);
703 AV_COPY32(mv_cache[2][0], mv_cache[2][1]);
707 cur_frame->
motion_val[0][mot_xy - 1 + mot_stride]);
711 AV_COPY32(mv_cache[1][3], mv_cache[1][2]);
712 AV_COPY32(mv_cache[2][3], mv_cache[2][2]);
716 cur_frame->
motion_val[0][mot_xy + 2 + mot_stride]);
721 for (
i = 0;
i < 4;
i++) {
722 const int x = (
i & 1) + 1;
723 const int y = (
i >> 1) + 1;
725 { mv_cache[y][x][0], mv_cache[y][x][1] },
726 { mv_cache[y - 1][x][0], mv_cache[y - 1][x][1] },
727 { mv_cache[y][x - 1][0], mv_cache[y][x - 1][1] },
728 { mv_cache[y][x + 1][0], mv_cache[y][x + 1][1] },
729 { mv_cache[y + 1][x][0], mv_cache[y + 1][x][1] }
734 mb_x * 16 + (
i & 1) * 8,
mb_y * 16 + (
i >> 1) * 8,
743 ref_picture, pix_op[1],
752 uint8_t **ref_picture,
756 int dxy, mx, my, src_x, src_y;
764 if (
s->quarter_sample) {
765 for (
i = 0;
i < 4;
i++) {
766 int motion_x =
s->mv[dir][
i][0];
767 int motion_y =
s->mv[dir][
i][1];
769 dxy = ((motion_y & 3) << 2) | (motion_x & 3);
770 src_x =
mb_x * 16 + (motion_x >> 2) + (
i & 1) * 8;
771 src_y =
mb_y * 16 + (motion_y >> 2) + (
i >> 1) * 8;
774 src_x =
av_clip(src_x, -16,
s->width);
775 if (src_x ==
s->width)
777 src_y =
av_clip(src_y, -16,
s->height);
778 if (src_y ==
s->height)
781 ptr = ref_picture[0] + (src_y *
s->linesize) + (src_x);
782 if ((
unsigned)src_x >=
FFMAX(
s->h_edge_pos - (motion_x & 3) - 7, 0) ||
783 (
unsigned)src_y >=
FFMAX(
s->v_edge_pos - (motion_y & 3) - 7, 0)) {
784 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
785 s->linesize,
s->linesize,
790 ptr =
s->sc.edge_emu_buffer;
792 dest = dest_y + ((
i & 1) * 8) + (
i >> 1) * 8 *
s->linesize;
793 qpix_op[1][dxy](
dest, ptr,
s->linesize);
795 mx +=
s->mv[dir][
i][0] / 2;
796 my +=
s->mv[dir][
i][1] / 2;
799 for (
i = 0;
i < 4;
i++) {
801 dest_y + ((
i & 1) * 8) + (
i >> 1) * 8 *
s->linesize,
803 mb_x * 16 + (
i & 1) * 8,
804 mb_y * 16 + (
i >> 1) * 8,
809 mx +=
s->mv[dir][
i][0];
810 my +=
s->mv[dir][
i][1];
816 ref_picture, pix_op[1], mx, my);
836 uint8_t **ref_picture,
845 apply_obmc(
s, dest_y, dest_cb, dest_cr, ref_picture, pix_op);
849 switch (
s->mv_type) {
851 if (!is_mpeg12 &&
s->mcsel) {
852 if (
s->real_sprite_warping_points == 1) {
859 }
else if (!is_mpeg12 &&
s->quarter_sample) {
862 ref_picture, pix_op, qpix_op,
863 s->mv[dir][0][0],
s->mv[dir][0][1], 16);
864 }
else if (!is_mpeg12 && (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER) &&
868 s->mv[dir][0][0],
s->mv[dir][0][1], 16);
872 s->mv[dir][0][0],
s->mv[dir][0][1], 16, 0,
mb_y);
878 dir, ref_picture, qpix_op, pix_op);
882 if (!is_mpeg12 &&
s->quarter_sample) {
883 for (
i = 0;
i < 2;
i++)
885 1,
i,
s->field_select[dir][
i],
886 ref_picture, pix_op, qpix_op,
887 s->mv[dir][
i][0],
s->mv[dir][
i][1], 8);
891 0,
s->field_select[dir][0],
893 s->mv[dir][0][0],
s->mv[dir][0][1], 8,
mb_y);
896 1,
s->field_select[dir][1],
898 s->mv[dir][1][0],
s->mv[dir][1][1], 8,
mb_y);
901 if (
s->picture_structure !=
s->field_select[dir][0] + 1 &&
s->pict_type !=
AV_PICTURE_TYPE_B && !
s->first_field
902 || !ref_picture[0]) {
903 ref_picture =
s->current_picture_ptr->f->data;
907 s->field_select[dir][0],
909 s->mv[dir][0][0],
s->mv[dir][0][1], 16, 0,
mb_y >> 1);
913 if (CONFIG_SMALL || is_mpeg12) {
914 for (
i = 0;
i < 2;
i++) {
915 uint8_t **ref2picture;
917 if ((
s->picture_structure ==
s->field_select[dir][
i] + 1 ||
920 ref2picture = ref_picture;
922 ref2picture =
s->current_picture_ptr->f->data;
926 s->field_select[dir][
i],
928 s->mv[dir][
i][0],
s->mv[dir][
i][1],
929 8, 1, (
mb_y & ~1) +
i);
931 dest_y += 16 *
s->linesize;
932 dest_cb += (16 >>
s->chroma_y_shift) *
s->uvlinesize;
933 dest_cr += (16 >>
s->chroma_y_shift) *
s->uvlinesize;
938 if (CONFIG_SMALL || is_mpeg12) {
940 for (
i = 0;
i < 2;
i++) {
941 for (
int j = 0; j < 2; j++)
943 j, j ^
i, ref_picture, pix_op,
944 s->mv[dir][2 *
i + j][0],
945 s->mv[dir][2 *
i + j][1], 8,
mb_y);
946 pix_op =
s->hdsp.avg_pixels_tab;
949 if (!ref_picture[0]) {
950 ref_picture =
s->current_picture_ptr->f->data;
952 for (
i = 0;
i < 2;
i++) {
954 s->picture_structure !=
i + 1,
956 s->mv[dir][2 *
i][0],
s->mv[dir][2 *
i][1],
960 pix_op =
s->hdsp.avg_pixels_tab;
965 ref_picture =
s->current_picture_ptr->f->data;
975 uint8_t *dest_y, uint8_t *dest_cb,
976 uint8_t *dest_cr,
int dir,
977 uint8_t **ref_picture,
986 ref_picture, pix_op, qpix_op, 1);
990 ref_picture, pix_op, qpix_op, 0);