39 for (j = 0; j < k; j++) {
40 for (
i = 0;
i < k;
i++)
41 srcY[
i] = ((srcY[
i] - 128) >> 1) + 128;
47 int k,
int uvlinesize)
50 for (j = 0; j < k; j++) {
51 for (
i = 0;
i < k;
i++) {
52 srcU[
i] = ((srcU[
i] - 128) >> 1) + 128;
53 srcV[
i] = ((srcV[
i] - 128) >> 1) + 128;
66 for (j = 0; j < k; j += 2) {
67 for (
i = 0;
i < k;
i++)
68 srcY[
i] = lut1[srcY[
i]];
74 for (
i = 0;
i < k;
i++)
75 srcY[
i] = lut2[srcY[
i]];
82 int k,
int uvlinesize)
86 for (j = 0; j < k; j += 2) {
87 for (
i = 0;
i < k;
i++) {
88 srcU[
i] = lut1[srcU[
i]];
89 srcV[
i] = lut1[srcV[
i]];
97 for (
i = 0;
i < k;
i++) {
98 srcU[
i] = lut2[srcU[
i]];
99 srcV[
i] = lut2[srcV[
i]];
106 static const uint8_t popcount4[16] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 };
115 static const uint8_t index2[16] = { 0, 0, 0, 0x23, 0, 0x13, 0x03, 0, 0, 0x12, 0x02, 0, 0x01, 0, 0, 0 };
121 *tx =
median4(
s->mv[dir][0][0],
s->mv[dir][1][0],
s->mv[dir][2][0],
s->mv[dir][3][0]);
122 *ty =
median4(
s->mv[dir][0][1],
s->mv[dir][1][1],
s->mv[dir][2][1],
s->mv[dir][3][1]);
125 *tx =
mid_pred(
s->mv[dir][idx < 2][0],
s->mv[dir][1 + (idx < 4)][0],
s->mv[dir][2 + (idx < 8)][0]);
126 *ty =
mid_pred(
s->mv[dir][idx < 2][1],
s->mv[dir][1 + (idx < 4)][1],
s->mv[dir][2 + (idx < 8)][1]);
129 *tx =
mid_pred(
s->mv[dir][idx > 0xd][0],
s->mv[dir][1 + (idx > 0xb)][0],
s->mv[dir][2 + (idx > 0x7)][0]);
130 *ty =
mid_pred(
s->mv[dir][idx > 0xd][1],
s->mv[dir][1 + (idx > 0xb)][1],
s->mv[dir][2 + (idx > 0x7)][1]);
133 *tx = (
s->mv[dir][index2[idx] >> 4][0] +
s->mv[dir][index2[idx] & 0xf][0]) / 2;
134 *ty = (
s->mv[dir][index2[idx] >> 4][1] +
s->mv[dir][index2[idx] & 0xf][1]) / 2;
143 int idx = !v->
mb_type[0][
s->block_index[0]] |
144 (!v->
mb_type[0][
s->block_index[1]] << 1) |
145 (!v->
mb_type[0][
s->block_index[2]] << 2) |
146 (!v->
mb_type[0][
s->block_index[3]] << 3);
147 static const uint8_t index2[16] = { 0, 0, 0, 0x01, 0, 0x02, 0x12, 0, 0, 0x03, 0x13, 0, 0x23, 0, 0, 0 };
150 switch (valid_count) {
152 *tx =
median4(
s->mv[dir][0][0],
s->mv[dir][1][0],
s->mv[dir][2][0],
s->mv[dir][3][0]);
153 *ty =
median4(
s->mv[dir][0][1],
s->mv[dir][1][1],
s->mv[dir][2][1],
s->mv[dir][3][1]);
156 *tx =
mid_pred(
s->mv[dir][idx > 0xd][0],
s->mv[dir][1 + (idx > 0xb)][0],
s->mv[dir][2 + (idx > 0x7)][0]);
157 *ty =
mid_pred(
s->mv[dir][idx > 0xd][1],
s->mv[dir][1 + (idx > 0xb)][1],
s->mv[dir][2 + (idx > 0x7)][1]);
160 *tx = (
s->mv[dir][index2[idx] >> 4][0] +
s->mv[dir][index2[idx] & 0xf][0]) / 2;
161 *ty = (
s->mv[dir][index2[idx] >> 4][1] +
s->mv[dir][index2[idx] & 0xf][1]) / 2;
177 int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
180 uint8_t (*luty)[256], (*lutuv)[256];
183 int linesize, uvlinesize;
190 linesize =
s->current_picture_ptr->f->linesize[0];
191 uvlinesize =
s->current_picture_ptr->f->linesize[1];
193 mx =
s->mv[dir][0][0];
194 my =
s->mv[dir][0][1];
198 for (
i = 0;
i < 4;
i++) {
199 s->current_picture.motion_val[1][
s->block_index[
i] + v->
blocks_off][0] = mx;
200 s->current_picture.motion_val[1][
s->block_index[
i] + v->
blocks_off][1] = my;
204 uvmx = (mx + ((mx & 3) == 3)) >> 1;
205 uvmy = (my + ((my & 3) == 3)) >> 1;
217 uvmx = uvmx + ((uvmx < 0) ? (uvmx & 1) : -(uvmx & 1));
218 uvmy = uvmy + ((uvmy < 0) ? (uvmy & 1) : -(uvmy & 1));
222 srcY =
s->current_picture.f->data[0];
223 srcU =
s->current_picture.f->data[1];
224 srcV =
s->current_picture.f->data[2];
230 srcY =
s->last_picture.f->data[0];
231 srcU =
s->last_picture.f->data[1];
232 srcV =
s->last_picture.f->data[2];
236 interlace =
s->last_picture.f->interlaced_frame;
239 srcY =
s->next_picture.f->data[0];
240 srcU =
s->next_picture.f->data[1];
241 srcV =
s->next_picture.f->data[2];
245 interlace =
s->next_picture.f->interlaced_frame;
248 if (!srcY || !srcU) {
253 src_x =
s->mb_x * 16 + (mx >> 2);
254 src_y =
s->mb_y * 16 + (my >> 2);
255 uvsrc_x =
s->mb_x * 8 + (uvmx >> 2);
256 uvsrc_y =
s->mb_y * 8 + (uvmy >> 2);
259 src_x =
av_clip( src_x, -16,
s->mb_width * 16);
260 src_y =
av_clip( src_y, -16,
s->mb_height * 16);
261 uvsrc_x =
av_clip(uvsrc_x, -8,
s->mb_width * 8);
262 uvsrc_y =
av_clip(uvsrc_y, -8,
s->mb_height * 8);
264 src_x =
av_clip( src_x, -17,
s->avctx->coded_width);
265 uvsrc_x =
av_clip(uvsrc_x, -8,
s->avctx->coded_width >> 1);
267 src_y =
av_clip(src_y, -18 + (src_y & 1),
s->avctx->coded_height + (src_y & 1));
268 uvsrc_y =
av_clip(uvsrc_y, -8 + (uvsrc_y & 1), (
s->avctx->coded_height >> 1) + (uvsrc_y & 1));
270 src_y =
av_clip(src_y, -18,
s->avctx->coded_height + 1);
271 uvsrc_y =
av_clip(uvsrc_y, -8,
s->avctx->coded_height >> 1);
275 srcY += src_y *
s->linesize + src_x;
276 srcU += uvsrc_y *
s->uvlinesize + uvsrc_x;
277 srcV += uvsrc_y *
s->uvlinesize + uvsrc_x;
287 srcU =
s->sc.edge_emu_buffer + 18 *
s->linesize;
288 srcV =
s->sc.edge_emu_buffer + 18 *
s->linesize;
292 ||
s->h_edge_pos < 22 || v_edge_pos < 22
293 || (
unsigned)(src_x -
s->mspel) >
s->h_edge_pos - (mx&3) - 16 -
s->mspel * 3
294 || (
unsigned)(src_y - 1) > v_edge_pos - (my&3) - 16 - 3) {
295 uint8_t *ubuf =
s->sc.edge_emu_buffer + 19 *
s->linesize;
296 uint8_t *vbuf = ubuf + 9 *
s->uvlinesize;
297 const int k = 17 +
s->mspel * 2;
299 srcY -=
s->mspel * (1 +
s->linesize);
301 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
312 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + linesize,
319 src_y -
s->mspel + 1 >> 1,
323 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
334 srcY =
s->sc.edge_emu_buffer;
336 s->vdsp.emulated_edge_mc(ubuf,
346 s->vdsp.emulated_edge_mc(vbuf,
357 s->vdsp.emulated_edge_mc(ubuf + uvlinesize,
367 s->vdsp.emulated_edge_mc(vbuf + uvlinesize,
379 s->vdsp.emulated_edge_mc(ubuf,
389 s->vdsp.emulated_edge_mc(vbuf,
418 srcY +=
s->mspel * (1 +
s->linesize);
422 dxy = ((my & 3) << 2) | (mx & 3);
425 dxy = (my & 2) | ((mx & 2) >> 1);
427 s->hdsp.put_pixels_tab[0][dxy](
s->dest[0], srcY,
s->linesize, 16);
429 s->hdsp.put_no_rnd_pixels_tab[0][dxy](
s->dest[0], srcY,
s->linesize, 16);
435 uvmx = (uvmx & 3) << 1;
436 uvmy = (uvmy & 3) << 1;
456 int dxy, mx, my, src_x, src_y;
470 linesize =
s->current_picture_ptr->f->linesize[0];
472 mx =
s->mv[dir][n][0];
473 my =
s->mv[dir][n][1];
477 srcY =
s->current_picture.f->data[0];
482 srcY =
s->last_picture.f->data[0];
485 interlace =
s->last_picture.f->interlaced_frame;
488 srcY =
s->next_picture.f->data[0];
491 interlace =
s->next_picture.f->interlaced_frame;
506 &
s->current_picture.motion_val[1][
s->block_index[0] + v->
blocks_off][0],
507 &
s->current_picture.motion_val[1][
s->block_index[0] + v->
blocks_off][1]);
508 int k,
f = opp_count > 2;
509 for (k = 0; k < 4; k++)
515 int width =
s->avctx->coded_width;
516 int height =
s->avctx->coded_height >> 1;
518 s->current_picture.motion_val[1][
s->block_index[n] + v->
blocks_off][0] = mx;
519 s->current_picture.motion_val[1][
s->block_index[n] + v->
blocks_off][1] = my;
521 qx = (
s->mb_x * 16) + (mx >> 2);
522 qy = (
s->mb_y * 8) + (my >> 3);
527 mx -= 4 * (qx -
width);
531 my -= 8 * (qy -
height - 1);
535 off = ((n > 1) ?
s->linesize : 0) + (n & 1) * 8;
537 off =
s->linesize * 4 * (n & 2) + (n & 1) * 8;
539 src_x =
s->mb_x * 16 + (n & 1) * 8 + (mx >> 2);
541 src_y =
s->mb_y * 16 + (n & 2) * 4 + (my >> 2);
543 src_y =
s->mb_y * 16 + ((n > 1) ? 1 : 0) + (my >> 2);
546 src_x =
av_clip(src_x, -16,
s->mb_width * 16);
547 src_y =
av_clip(src_y, -16,
s->mb_height * 16);
549 src_x =
av_clip(src_x, -17,
s->avctx->coded_width);
551 src_y =
av_clip(src_y, -18 + (src_y & 1),
s->avctx->coded_height + (src_y & 1));
553 src_y =
av_clip(src_y, -18,
s->avctx->coded_height + 1);
556 srcY += src_y *
s->linesize + src_x;
561 ||
s->h_edge_pos < 13 || v_edge_pos < 23
562 || (
unsigned)(src_x -
s->mspel) >
s->h_edge_pos - (mx & 3) - 8 -
s->mspel * 2
563 || (
unsigned)(src_y - (
s->mspel << fieldmv)) > v_edge_pos - (my & 3) - ((8 +
s->mspel * 2) << fieldmv)) {
564 const int k = 9 +
s->mspel * 2;
566 srcY -=
s->mspel * (1 + (
s->linesize << fieldmv));
569 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
580 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + linesize,
587 src_y -
s->mspel + 1 >> 1,
591 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
599 src_y - (
s->mspel << fieldmv),
602 srcY =
s->sc.edge_emu_buffer;
612 k,
s->linesize << fieldmv);
614 srcY +=
s->mspel * (1 + (
s->linesize << fieldmv));
618 dxy = ((my & 3) << 2) | (mx & 3);
624 dxy = (my & 2) | ((mx & 2) >> 1);
626 s->hdsp.put_pixels_tab[1][dxy](
s->dest[0] + off, srcY,
s->linesize, 8);
628 s->hdsp.put_no_rnd_pixels_tab[1][dxy](
s->dest[0] + off, srcY,
s->linesize, 8);
639 int uvmx, uvmy, uvsrc_x, uvsrc_y;
657 s->current_picture.motion_val[1][
s->block_index[0] + v->
blocks_off][0] = 0;
658 s->current_picture.motion_val[1][
s->block_index[0] + v->
blocks_off][1] = 0;
669 s->current_picture.motion_val[1][
s->block_index[0] + v->
blocks_off][0] = tx;
670 s->current_picture.motion_val[1][
s->block_index[0] + v->
blocks_off][1] = ty;
672 uvlinesize =
s->current_picture_ptr->f->linesize[1];
674 uvmx = (tx + ((tx & 3) == 3)) >> 1;
675 uvmy = (ty + ((ty & 3) == 3)) >> 1;
681 uvmx = uvmx + ((uvmx < 0) ? (uvmx & 1) : -(uvmx & 1));
682 uvmy = uvmy + ((uvmy < 0) ? (uvmy & 1) : -(uvmy & 1));
686 uvmy += 2 - 4 * chroma_ref_type;
688 uvsrc_x =
s->mb_x * 8 + (uvmx >> 2);
689 uvsrc_y =
s->mb_y * 8 + (uvmy >> 2);
692 uvsrc_x =
av_clip(uvsrc_x, -8,
s->mb_width * 8);
693 uvsrc_y =
av_clip(uvsrc_y, -8,
s->mb_height * 8);
695 uvsrc_x =
av_clip(uvsrc_x, -8,
s->avctx->coded_width >> 1);
696 uvsrc_y =
av_clip(uvsrc_y, -8,
s->avctx->coded_height >> 1);
701 srcU =
s->current_picture.f->data[1];
702 srcV =
s->current_picture.f->data[2];
707 srcU =
s->last_picture.f->data[1];
708 srcV =
s->last_picture.f->data[2];
711 interlace =
s->last_picture.f->interlaced_frame;
714 srcU =
s->next_picture.f->data[1];
715 srcV =
s->next_picture.f->data[2];
718 interlace =
s->next_picture.f->interlaced_frame;
726 srcU += uvsrc_y *
s->uvlinesize + uvsrc_x;
727 srcV += uvsrc_y *
s->uvlinesize + uvsrc_x;
730 if (chroma_ref_type) {
737 ||
s->h_edge_pos < 18 || v_edge_pos < 18
738 || (
unsigned)uvsrc_x > (
s->h_edge_pos >> 1) - 9
739 || (
unsigned)uvsrc_y > (v_edge_pos >> 1) - 9) {
741 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
751 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + 16,
762 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + uvlinesize,
772 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + 16 + uvlinesize,
784 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
791 v->
field_mode ? 2 * uvsrc_y + chroma_ref_type : uvsrc_y,
794 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + 16,
801 v->
field_mode ? 2 * uvsrc_y + chroma_ref_type : uvsrc_y,
805 srcU =
s->sc.edge_emu_buffer;
806 srcV =
s->sc.edge_emu_buffer + 16;
815 lutuv[v->
field_mode ? chroma_ref_type : ((0 + uvsrc_y) & 1)],
816 lutuv[v->
field_mode ? chroma_ref_type : ((1 + uvsrc_y) & 1)],
822 uvmx = (uvmx & 3) << 1;
823 uvmy = (uvmy & 3) << 1;
844 int uvsrc_x, uvsrc_y;
845 int uvmx_field[4], uvmy_field[4];
848 static const uint8_t s_rndtblfield[16] = { 0, 0, 1, 2, 4, 4, 5, 6, 2, 2, 3, 8, 6, 6, 7, 12 };
849 int v_dist = fieldmv ? 1 : 4;
850 int v_edge_pos =
s->v_edge_pos >> 1;
859 uvlinesize =
s->current_picture_ptr->f->linesize[1];
861 for (
i = 0;
i < 4;
i++) {
862 int d =
i < 2 ? dir: dir2;
864 uvmx_field[
i] = (tx + ((tx & 3) == 3)) >> 1;
867 uvmy_field[
i] = (ty >> 4) * 8 + s_rndtblfield[ty & 0xF];
869 uvmy_field[
i] = (ty + ((ty & 3) == 3)) >> 1;
872 for (
i = 0;
i < 4;
i++) {
873 off = (
i & 1) * 4 + ((
i & 2) ? v_dist *
s->uvlinesize : 0);
874 uvsrc_x =
s->mb_x * 8 + (
i & 1) * 4 + (uvmx_field[
i] >> 2);
875 uvsrc_y =
s->mb_y * 8 + ((
i & 2) ? v_dist : 0) + (uvmy_field[
i] >> 2);
877 uvsrc_x =
av_clip(uvsrc_x, -8,
s->avctx->coded_width >> 1);
879 uvsrc_y =
av_clip(uvsrc_y, -8 + (uvsrc_y & 1), (
s->avctx->coded_height >> 1) + (uvsrc_y & 1));
881 uvsrc_y =
av_clip(uvsrc_y, -8,
s->avctx->coded_height >> 1);
882 if (
i < 2 ? dir : dir2) {
883 srcU =
s->next_picture.f->data[1];
884 srcV =
s->next_picture.f->data[2];
887 interlace =
s->next_picture.f->interlaced_frame;
889 srcU =
s->last_picture.f->data[1];
890 srcV =
s->last_picture.f->data[2];
893 interlace =
s->last_picture.f->interlaced_frame;
897 srcU += uvsrc_y *
s->uvlinesize + uvsrc_x;
898 srcV += uvsrc_y *
s->uvlinesize + uvsrc_x;
899 uvmx_field[
i] = (uvmx_field[
i] & 3) << 1;
900 uvmy_field[
i] = (uvmy_field[
i] & 3) << 1;
903 ||
s->h_edge_pos < 10 || v_edge_pos < (5 << fieldmv)
904 || (unsigned)uvsrc_x > (
s->h_edge_pos >> 1) - 5
905 || (unsigned)uvsrc_y > v_edge_pos - (5 << fieldmv)) {
907 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
912 (5 << fieldmv) + 1 >> 1,
917 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + 16,
922 (5 << fieldmv) + 1 >> 1,
928 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + uvlinesize,
938 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + 16 + uvlinesize,
950 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
960 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + 16,
971 srcU =
s->sc.edge_emu_buffer;
972 srcV =
s->sc.edge_emu_buffer + 16;
977 lutuv[(uvsrc_y + (0 << fieldmv)) & 1],
978 lutuv[(uvsrc_y + (1 << fieldmv)) & 1],
979 5,
s->uvlinesize << fieldmv);
1009 int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
1013 int linesize, uvlinesize;
1018 linesize =
s->current_picture_ptr->f->linesize[0];
1019 uvlinesize =
s->current_picture_ptr->f->linesize[1];
1021 mx =
s->mv[1][0][0];
1022 my =
s->mv[1][0][1];
1023 uvmx = (mx + ((mx & 3) == 3)) >> 1;
1024 uvmy = (my + ((my & 3) == 3)) >> 1;
1030 uvmx = uvmx + ((uvmx < 0) ? -(uvmx & 1) : (uvmx & 1));
1031 uvmy = uvmy + ((uvmy < 0) ? -(uvmy & 1) : (uvmy & 1));
1033 srcY =
s->next_picture.f->data[0];
1034 srcU =
s->next_picture.f->data[1];
1035 srcV =
s->next_picture.f->data[2];
1037 interlace =
s->next_picture.f->interlaced_frame;
1039 src_x =
s->mb_x * 16 + (mx >> 2);
1040 src_y =
s->mb_y * 16 + (my >> 2);
1041 uvsrc_x =
s->mb_x * 8 + (uvmx >> 2);
1042 uvsrc_y =
s->mb_y * 8 + (uvmy >> 2);
1045 src_x =
av_clip( src_x, -16,
s->mb_width * 16);
1046 src_y =
av_clip( src_y, -16,
s->mb_height * 16);
1047 uvsrc_x =
av_clip(uvsrc_x, -8,
s->mb_width * 8);
1048 uvsrc_y =
av_clip(uvsrc_y, -8,
s->mb_height * 8);
1050 src_x =
av_clip( src_x, -17,
s->avctx->coded_width);
1051 uvsrc_x =
av_clip(uvsrc_x, -8,
s->avctx->coded_width >> 1);
1053 src_y =
av_clip(src_y, -18 + (src_y & 1),
s->avctx->coded_height + (src_y & 1));
1054 uvsrc_y =
av_clip(uvsrc_y, -8 + (uvsrc_y & 1), (
s->avctx->coded_height >> 1) + (uvsrc_y & 1));
1056 src_y =
av_clip(src_y, -18,
s->avctx->coded_height + 1);
1057 uvsrc_y =
av_clip(uvsrc_y, -8,
s->avctx->coded_height >> 1);
1061 srcY += src_y *
s->linesize + src_x;
1062 srcU += uvsrc_y *
s->uvlinesize + uvsrc_x;
1063 srcV += uvsrc_y *
s->uvlinesize + uvsrc_x;
1073 srcU =
s->sc.edge_emu_buffer + 18 *
s->linesize;
1074 srcV =
s->sc.edge_emu_buffer + 18 *
s->linesize;
1077 if (v->
rangeredfrm ||
s->h_edge_pos < 22 || v_edge_pos < 22 || use_ic
1078 || (
unsigned)(src_x - 1) >
s->h_edge_pos - (mx & 3) - 16 - 3
1079 || (
unsigned)(src_y - 1) > v_edge_pos - (my & 3) - 16 - 3) {
1080 uint8_t *ubuf =
s->sc.edge_emu_buffer + 19 *
s->linesize;
1081 uint8_t *vbuf = ubuf + 9 *
s->uvlinesize;
1082 const int k = 17 +
s->mspel * 2;
1084 srcY -=
s->mspel * (1 +
s->linesize);
1086 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
1095 s->v_edge_pos >> 1);
1097 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer + linesize,
1104 src_y -
s->mspel + 1 >> 1,
1106 s->v_edge_pos >> 1);
1108 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
1119 srcY =
s->sc.edge_emu_buffer;
1121 s->vdsp.emulated_edge_mc(ubuf,
1130 s->v_edge_pos >> 2);
1131 s->vdsp.emulated_edge_mc(vbuf,
1140 s->v_edge_pos >> 2);
1142 s->vdsp.emulated_edge_mc(ubuf + uvlinesize,
1151 s->v_edge_pos >> 2);
1152 s->vdsp.emulated_edge_mc(vbuf + uvlinesize,
1161 s->v_edge_pos >> 2);
1164 s->vdsp.emulated_edge_mc(ubuf,
1173 s->v_edge_pos >> 1);
1174 s->vdsp.emulated_edge_mc(vbuf,
1183 s->v_edge_pos >> 1);
1205 srcY +=
s->mspel * (1 +
s->linesize);
1209 dxy = ((my & 3) << 2) | (mx & 3);
1212 dxy = (my & 2) | ((mx & 2) >> 1);
1215 s->hdsp.avg_pixels_tab[0][dxy](
s->dest[0], srcY,
s->linesize, 16);
1217 s->hdsp.avg_no_rnd_pixels_tab[dxy](
s->dest[0], srcY,
s->linesize, 16);
1223 uvmx = (uvmx & 3) << 1;
1224 uvmy = (uvmy & 3) << 1;