24#include "config_components.h"
40 uint8_t *dest, uint8_t *
src,
43 int motion_x,
int motion_y)
48 src_x += motion_x >> 1;
49 src_y += motion_y >> 1;
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)
57 dxy |= (motion_y & 1) << 1;
58 src += src_y *
s->linesize + src_x;
60 if ((
unsigned)src_x >=
FFMAX(
s->h_edge_pos - (motion_x & 1) - 7, 0) ||
61 (
unsigned)src_y >=
FFMAX(
s->v_edge_pos - (motion_y & 1) - 7, 0)) {
62 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer,
src,
63 s->linesize,
s->linesize,
66 s->h_edge_pos,
s->v_edge_pos);
67 src =
s->sc.edge_emu_buffer;
70 pix_op[dxy](dest,
src,
s->linesize, 8);
82 uint8_t *
const *ref_picture,
91 const uint8_t *ptr_y, *ptr_cb, *ptr_cr;
92 int dxy, uvdxy,
mx,
my, src_x, src_y,
93 uvsrc_x, uvsrc_y, v_edge_pos, block_y_half;
94 ptrdiff_t uvlinesize, linesize;
96 v_edge_pos =
s->v_edge_pos >> field_based;
97 linesize =
s->cur_pic.linesize[0] << field_based;
98 uvlinesize =
s->cur_pic.linesize[1] << field_based;
99 block_y_half = (field_based | is_16x8);
101 dxy = ((motion_y & 1) << 1) | (motion_x & 1);
102 src_x =
s->mb_x * 16 + (motion_x >> 1);
103 src_y = (mb_y << (4 - block_y_half)) + (motion_y >> 1);
105 if (!is_mpeg12 &&
s->out_format ==
FMT_H263) {
107 mx = (motion_x >> 1) | (motion_x & 1);
109 uvdxy = ((
my & 1) << 1) | (
mx & 1);
110 uvsrc_x =
s->mb_x * 8 + (
mx >> 1);
111 uvsrc_y = (mb_y << (3 - block_y_half)) + (
my >> 1);
113 uvdxy = dxy | (motion_y & 2) | ((motion_x & 2) >> 1);
114 uvsrc_x = src_x >> 1;
115 uvsrc_y = src_y >> 1;
118 }
else if (!CONFIG_SMALL && !is_mpeg12 ||
119 CONFIG_SMALL &&
s->out_format ==
FMT_H261) {
124 uvsrc_x =
s->mb_x * 8 +
mx;
125 uvsrc_y = mb_y * 8 +
my;
128 if (
s->chroma_y_shift) {
131 uvdxy = ((
my & 1) << 1) | (
mx & 1);
132 uvsrc_x =
s->mb_x * 8 + (
mx >> 1);
133 uvsrc_y = (mb_y << (3 - block_y_half)) + (
my >> 1);
135 if (
s->chroma_x_shift) {
138 uvdxy = ((motion_y & 1) << 1) | (
mx & 1);
139 uvsrc_x =
s->mb_x * 8 + (
mx >> 1);
150 ptr_y = ref_picture[0] + src_y * linesize + src_x;
151 ptr_cb = ref_picture[1] + uvsrc_y * uvlinesize + uvsrc_x;
152 ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
154 if ((
unsigned)src_x >=
FFMAX(
s->h_edge_pos - (motion_x & 1) - 15 , 0) ||
155 (
unsigned)src_y >=
FFMAX( v_edge_pos - (motion_y & 1) -
h + 1, 0)) {
156 if (is_mpeg12 || (CONFIG_SMALL &&
160 "MPEG motion vector out of boundary (%d %d)\n", src_x,
164 src_y = (unsigned)src_y << field_based;
165 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr_y,
166 s->linesize,
s->linesize,
167 17, 17 + field_based,
169 s->h_edge_pos,
s->v_edge_pos);
170 ptr_y =
s->sc.edge_emu_buffer;
172 uint8_t *ubuf =
s->sc.edge_emu_buffer + 18 *
s->linesize;
173 uint8_t *vbuf = ubuf + 10 *
s->uvlinesize;
175 vbuf -=
s->uvlinesize;
176 uvsrc_y = (unsigned)uvsrc_y << field_based;
177 s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
178 s->uvlinesize,
s->uvlinesize,
181 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
182 s->vdsp.emulated_edge_mc(vbuf, ptr_cr,
183 s->uvlinesize,
s->uvlinesize,
186 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
195 dest_y +=
s->linesize;
196 dest_cb +=
s->uvlinesize;
197 dest_cr +=
s->uvlinesize;
201 ptr_y +=
s->linesize;
202 ptr_cb +=
s->uvlinesize;
203 ptr_cr +=
s->uvlinesize;
206 pix_op[0][dxy](dest_y, ptr_y, linesize,
h);
209 pix_op[
s->chroma_x_shift][uvdxy]
210 (dest_cb, ptr_cb, uvlinesize,
h >>
s->chroma_y_shift);
211 pix_op[
s->chroma_x_shift][uvdxy]
212 (dest_cr, ptr_cr, uvlinesize,
h >>
s->chroma_y_shift);
214 if (!is_mpeg12 && (CONFIG_H261_ENCODER || CONFIG_H261_DECODER) &&
221 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
222 int field_select, uint8_t *
const *ref_picture,
224 int motion_x,
int motion_y,
int h,
int is_16x8,
int mb_y)
229 field_select, ref_picture, pix_op,
230 motion_x, motion_y,
h, 1, is_16x8, mb_y);
234 field_select, ref_picture, pix_op,
235 motion_x, motion_y,
h, 0, is_16x8, mb_y);
239 uint8_t *dest_cb, uint8_t *dest_cr,
240 int bottom_field,
int field_select,
241 uint8_t *
const *ref_picture,
243 int motion_x,
int motion_y,
int mb_y)
248 bottom_field, field_select, ref_picture, pix_op,
249 motion_x, motion_y, 8, 1, 0, mb_y);
253 bottom_field, field_select, ref_picture, pix_op,
254 motion_x, motion_y, 8, 0, 0, mb_y);
261 uint8_t *
const top =
src[1];
263 uint8_t *
const mid =
src[0];
264 uint8_t *
const right =
src[3];
265 uint8_t *
const bottom =
src[4];
266#define OBMC_FILTER(x, t, l, m, r, b)\
267 dst[x]= (t*top[x] + l*left[x] + m*mid[x] + r*right[x] + b*bottom[x] + 4)>>3
268#define OBMC_FILTER4(x, t, l, m, r, b)\
269 OBMC_FILTER(x , t, l, m, r, b);\
270 OBMC_FILTER(x+1 , t, l, m, r, b);\
271 OBMC_FILTER(x +stride, t, l, m, r, b);\
272 OBMC_FILTER(x+1+stride, t, l, m, r, b);
312 uint8_t *dest, uint8_t *
src,
313 int src_x,
int src_y,
323 for (
i = 0;
i < 5;
i++) {
327 ptr[
i] =
s->sc.obmc_scratchpad + 8 * (
i & 1) +
328 s->linesize * 8 * (
i >> 1);
341 int field_based,
int bottom_field,
342 int field_select, uint8_t *
const *ref_picture,
345 int motion_x,
int motion_y,
int h)
347 const uint8_t *ptr_y, *ptr_cb, *ptr_cr;
348 int dxy, uvdxy,
mx,
my, src_x, src_y, uvsrc_x, uvsrc_y, v_edge_pos;
349 ptrdiff_t linesize, uvlinesize;
351 dxy = ((motion_y & 3) << 2) | (motion_x & 3);
353 src_x =
s->mb_x * 16 + (motion_x >> 2);
354 src_y =
s->mb_y * (16 >> field_based) + (motion_y >> 2);
356 v_edge_pos =
s->v_edge_pos >> field_based;
357 linesize =
s->linesize << field_based;
358 uvlinesize =
s->uvlinesize << field_based;
364 static const int rtab[8] = { 0, 0, 1, 1, 0, 0, 0, 1 };
365 mx = (motion_x >> 1) + rtab[motion_x & 7];
366 my = (motion_y >> 1) + rtab[motion_y & 7];
368 mx = (motion_x >> 1) | (motion_x & 1);
369 my = (motion_y >> 1) | (motion_y & 1);
374 mx = (
mx >> 1) | (
mx & 1);
375 my = (
my >> 1) | (
my & 1);
377 uvdxy = (
mx & 1) | ((
my & 1) << 1);
381 uvsrc_x =
s->mb_x * 8 +
mx;
382 uvsrc_y =
s->mb_y * (8 >> field_based) +
my;
384 ptr_y = ref_picture[0] + src_y * linesize + src_x;
385 ptr_cb = ref_picture[1] + uvsrc_y * uvlinesize + uvsrc_x;
386 ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
388 if ((
unsigned)src_x >=
FFMAX(
s->h_edge_pos - (motion_x & 3) - 15 , 0) ||
389 (
unsigned)src_y >=
FFMAX( v_edge_pos - (motion_y & 3) -
h + 1, 0)) {
390 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr_y,
391 s->linesize,
s->linesize,
392 17, 17 + field_based,
393 src_x, src_y * (1 << field_based),
394 s->h_edge_pos,
s->v_edge_pos);
395 ptr_y =
s->sc.edge_emu_buffer;
397 uint8_t *ubuf =
s->sc.edge_emu_buffer + 18 *
s->linesize;
398 uint8_t *vbuf = ubuf + 10 *
s->uvlinesize;
400 vbuf -=
s->uvlinesize;
401 s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
402 s->uvlinesize,
s->uvlinesize,
404 uvsrc_x, uvsrc_y * (1 << field_based),
405 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
406 s->vdsp.emulated_edge_mc(vbuf, ptr_cr,
407 s->uvlinesize,
s->uvlinesize,
409 uvsrc_x, uvsrc_y * (1 << field_based),
410 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
417 qpix_op[0][dxy](dest_y, ptr_y, linesize);
420 dest_y +=
s->linesize;
421 dest_cb +=
s->uvlinesize;
422 dest_cr +=
s->uvlinesize;
426 ptr_y +=
s->linesize;
427 ptr_cb +=
s->uvlinesize;
428 ptr_cr +=
s->uvlinesize;
432 qpix_op[1][dxy](dest_y, ptr_y, linesize);
433 qpix_op[1][dxy](dest_y + 8, ptr_y + 8, linesize);
436 pix_op[1][uvdxy](dest_cr, ptr_cr, uvlinesize,
h >> 1);
437 pix_op[1][uvdxy](dest_cb, ptr_cb, uvlinesize,
h >> 1);
445 uint8_t *dest_cb, uint8_t *dest_cr,
446 uint8_t *
const *ref_picture,
451 int src_x, src_y, dxy, emu = 0;
459 dxy = ((
my & 1) << 1) | (
mx & 1);
463 src_x =
s->mb_x * 8 +
mx;
464 src_y =
s->mb_y * 8 +
my;
465 src_x =
av_clip(src_x, -8, (
s->width >> 1));
466 if (src_x == (
s->width >> 1))
468 src_y =
av_clip(src_y, -8, (
s->height >> 1));
469 if (src_y == (
s->height >> 1))
472 offset = src_y *
s->uvlinesize + src_x;
473 ptr = ref_picture[1] +
offset;
474 if ((
unsigned)src_x >=
FFMAX((
s->h_edge_pos >> 1) - (dxy & 1) - 7, 0) ||
475 (
unsigned)src_y >=
FFMAX((
s->v_edge_pos >> 1) - (dxy >> 1) - 7, 0)) {
476 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
477 s->uvlinesize,
s->uvlinesize,
479 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
480 ptr =
s->sc.edge_emu_buffer;
483 pix_op[dxy](dest_cb, ptr,
s->uvlinesize, 8);
485 ptr = ref_picture[2] +
offset;
487 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
488 s->uvlinesize,
s->uvlinesize,
490 s->h_edge_pos >> 1,
s->v_edge_pos >> 1);
491 ptr =
s->sc.edge_emu_buffer;
493 pix_op[dxy](dest_cr, ptr,
s->uvlinesize, 8);
500 const int shift =
s->quarter_sample ? 2 : 1;
501 const int mx = (
s->mv[dir][0][0] >>
shift) + 16 *
s->mb_x + 8;
502 const int my = (
s->mv[dir][0][1] >>
shift) + 16 *
s->mb_y;
503 int off =
mx + (
my + (
s->mb_x & 3) * 4) *
s->linesize + 64;
505 s->vdsp.prefetch(
pix[0] + off,
s->linesize, 4);
506 off = (
mx >> 1) + ((
my >> 1) + (
s->mb_x & 7)) *
s->uvlinesize + 64;
507 s->vdsp.prefetch(
pix[1] + off,
pix[2] -
pix[1], 2);
514 uint8_t *
const *ref_picture,
521 const int xy = mb_x + mb_y *
s->mb_stride;
522 const int mot_stride =
s->b8_stride;
523 const int mot_xy = mb_x * 2 + mb_y * 2 * mot_stride;
532 cur_frame->
motion_val[0][mot_xy + mot_stride]);
534 cur_frame->
motion_val[0][mot_xy + mot_stride + 1]);
537 cur_frame->
motion_val[0][mot_xy + mot_stride]);
539 cur_frame->
motion_val[0][mot_xy + mot_stride + 1]);
542 AV_COPY32(mv_cache[0][1], mv_cache[1][1]);
543 AV_COPY32(mv_cache[0][2], mv_cache[1][2]);
546 cur_frame->
motion_val[0][mot_xy - mot_stride]);
548 cur_frame->
motion_val[0][mot_xy - mot_stride + 1]);
552 AV_COPY32(mv_cache[1][0], mv_cache[1][1]);
553 AV_COPY32(mv_cache[2][0], mv_cache[2][1]);
557 cur_frame->
motion_val[0][mot_xy - 1 + mot_stride]);
561 AV_COPY32(mv_cache[1][3], mv_cache[1][2]);
562 AV_COPY32(mv_cache[2][3], mv_cache[2][2]);
566 cur_frame->
motion_val[0][mot_xy + 2 + mot_stride]);
571 for (
i = 0;
i < 4;
i++) {
572 const int x = (
i & 1) + 1;
573 const int y = (
i >> 1) + 1;
575 { mv_cache[y][x][0], mv_cache[y][x][1] },
576 { mv_cache[y - 1][x][0], mv_cache[y - 1][x][1] },
577 { mv_cache[y][x - 1][0], mv_cache[y][x - 1][1] },
578 { mv_cache[y][x + 1][0], mv_cache[y][x + 1][1] },
579 { mv_cache[y + 1][x][0], mv_cache[y + 1][x][1] }
584 mb_x * 16 + (
i & 1) * 8, mb_y * 16 + (
i >> 1) * 8,
593 ref_picture, pix_op[1],
602 uint8_t *
const *ref_picture,
606 int dxy,
mx,
my, src_x, src_y;
615 if (
s->quarter_sample) {
616 for (
i = 0;
i < 4;
i++) {
617 int motion_x =
s->mv[dir][
i][0];
618 int motion_y =
s->mv[dir][
i][1];
620 dxy = ((motion_y & 3) << 2) | (motion_x & 3);
621 src_x = mb_x * 16 + (motion_x >> 2) + (
i & 1) * 8;
622 src_y = mb_y * 16 + (motion_y >> 2) + (
i >> 1) * 8;
625 src_x =
av_clip(src_x, -16,
s->width);
626 if (src_x ==
s->width)
628 src_y =
av_clip(src_y, -16,
s->height);
629 if (src_y ==
s->height)
632 ptr = ref_picture[0] + (src_y *
s->linesize) + (src_x);
633 if ((
unsigned)src_x >=
FFMAX(
s->h_edge_pos - (motion_x & 3) - 7, 0) ||
634 (
unsigned)src_y >=
FFMAX(
s->v_edge_pos - (motion_y & 3) - 7, 0)) {
635 s->vdsp.emulated_edge_mc(
s->sc.edge_emu_buffer, ptr,
636 s->linesize,
s->linesize,
641 ptr =
s->sc.edge_emu_buffer;
643 dest = dest_y + ((
i & 1) * 8) + (
i >> 1) * 8 *
s->linesize;
644 qpix_op[1][dxy](dest, ptr,
s->linesize);
646 mx +=
s->mv[dir][
i][0] / 2;
647 my +=
s->mv[dir][
i][1] / 2;
650 for (
i = 0;
i < 4;
i++) {
652 dest_y + ((
i & 1) * 8) + (
i >> 1) * 8 *
s->linesize,
654 mb_x * 16 + (
i & 1) * 8,
655 mb_y * 16 + (
i >> 1) * 8,
660 mx +=
s->mv[dir][
i][0];
661 my +=
s->mv[dir][
i][1];
667 ref_picture, pix_op[1],
mx,
my);
687 uint8_t *
const *ref_picture,
696 apply_obmc(
s, dest_y, dest_cb, dest_cr, ref_picture, pix_op);
700 switch (
s->mv_type) {
702 if (CONFIG_MPEG4_DECODER && !is_mpeg12 &&
s->mcsel) {
704 }
else if (!is_mpeg12 &&
s->quarter_sample) {
707 ref_picture, pix_op, qpix_op,
708 s->mv[dir][0][0],
s->mv[dir][0][1], 16);
709#if CONFIG_WMV2_DECODER
714 s->mv[dir][0][0],
s->mv[dir][0][1], 16);
719 s->mv[dir][0][0],
s->mv[dir][0][1], 16, 0, mb_y);
725 dir, ref_picture, qpix_op, pix_op);
731 if ((!CONFIG_SMALL && !is_mpeg12) ||
733 if (!is_mpeg12 &&
s->quarter_sample) {
734 for (
i = 0;
i < 2;
i++)
736 1,
i,
s->field_select[dir][
i],
737 ref_picture, pix_op, qpix_op,
738 s->mv[dir][
i][0],
s->mv[dir][
i][1], 8);
742 0,
s->field_select[dir][0],
744 s->mv[dir][0][0],
s->mv[dir][0][1], mb_y);
747 1,
s->field_select[dir][1],
749 s->mv[dir][1][0],
s->mv[dir][1][1], mb_y);
753 if (
s->picture_structure !=
s->field_select[dir][0] + 1 &&
755 ref_picture =
s->cur_pic.ptr->f->data;
759 s->field_select[dir][0],
761 s->mv[dir][0][0],
s->mv[dir][0][1], 16, 0, mb_y >> 1);
765 if (CONFIG_SMALL || is_mpeg12) {
766 for (
i = 0;
i < 2;
i++) {
767 uint8_t *
const *ref2picture;
769 if (
s->picture_structure ==
s->field_select[dir][
i] + 1 ||
771 ref2picture = ref_picture;
773 ref2picture =
s->cur_pic.ptr->f->data;
777 s->field_select[dir][
i],
779 s->mv[dir][
i][0],
s->mv[dir][
i][1],
780 8, 1, (mb_y & ~1) +
i);
782 dest_y += 16 *
s->linesize;
783 dest_cb += (16 >>
s->chroma_y_shift) *
s->uvlinesize;
784 dest_cr += (16 >>
s->chroma_y_shift) *
s->uvlinesize;
790 if (CONFIG_SMALL || is_mpeg12) {
792 for (
i = 0;
i < 2;
i++) {
793 for (
int j = 0; j < 2; j++)
795 j, j ^
i, ref_picture, pix_op,
796 s->mv[dir][2 *
i + j][0],
797 s->mv[dir][2 *
i + j][1], mb_y);
798 pix_op =
s->hdsp.avg_pixels_tab;
801 for (
i = 0;
i < 2;
i++) {
803 s->picture_structure !=
i + 1,
805 s->mv[dir][2 *
i][0],
s->mv[dir][2 *
i][1],
809 pix_op =
s->hdsp.avg_pixels_tab;
814 ref_picture =
s->cur_pic.ptr->f->data;
826 uint8_t *dest_y, uint8_t *dest_cb,
827 uint8_t *dest_cr,
int dir,
828 uint8_t *
const *ref_picture,
840 ref_picture, pix_op, qpix_op, 1);
844 ref_picture, pix_op, qpix_op, 0);
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t my
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t mx
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define av_unreachable(msg)
Asserts that are used as compiler optimization hints depending upon ASSERT_LEVEL and NBDEBUG.
Libavcodec external API header.
#define FF_BUG_HPEL_CHROMA
#define FF_BUG_QPEL_CHROMA2
#define FF_BUG_QPEL_CHROMA
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
#define i(width, name, range_min, range_max)
int av_codec_is_decoder(const AVCodec *codec)
#define AV_CODEC_FLAG_GRAY
Only decode/encode grayscale.
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
void ff_h261_loop_filter(MpegEncContext *s)
static int ff_h263_round_chroma(int x)
void(* op_pixels_func)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Average and put pixel Widths can be 16, 8, 4 or 2.
static const int8_t mv[256][2]
static int shift(int a, int b)
common internal API header
#define LOCAL_ALIGNED_8(t, v,...)
void ff_mpeg4_mcsel_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t *const *ref_picture)
#define MV_TYPE_16X8
2 vectors, one per 16x8 block
#define MV_TYPE_DMV
2 vectors, special mpeg2 Dual Prime Vectors
#define MV_TYPE_FIELD
2 vectors, one per field
#define MV_TYPE_8X8
4 vectors (H.263, MPEG-4 4MV)
#define MV_TYPE_16X16
1 vector for the whole mb
static int hpel_motion(MpegEncContext *s, uint8_t *dest, uint8_t *src, int src_x, int src_y, const op_pixels_func *pix_op, int motion_x, int motion_y)
static void mpeg_motion_field(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int bottom_field, int field_select, uint8_t *const *ref_picture, const op_pixels_func(*pix_op)[4], int motion_x, int motion_y, int mb_y)
void ff_mpv_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t *const *ref_picture, const op_pixels_func(*pix_op)[4], const qpel_mc_func(*qpix_op)[16])
static av_always_inline void mpv_motion_internal(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t *const *ref_picture, const op_pixels_func(*pix_op)[4], const qpel_mc_func(*qpix_op)[16], int is_mpeg12)
motion compensation of a single macroblock
static av_always_inline void mpeg_motion_internal(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t *const *ref_picture, const op_pixels_func(*pix_op)[4], int motion_x, int motion_y, int h, int is_mpeg12, int is_16x8, int mb_y)
static void chroma_4mv_motion(MpegEncContext *s, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t *const *ref_picture, const op_pixels_func *pix_op, int mx, int my)
H.263 chroma 4mv motion compensation.
#define OBMC_FILTER4(x, t, l, m, r, b)
static void apply_8x8(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t *const *ref_picture, const qpel_mc_func(*qpix_op)[16], const op_pixels_func(*pix_op)[4])
static void put_obmc(uint8_t *dst, uint8_t *const src[5], int stride)
static void qpel_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t *const *ref_picture, const op_pixels_func(*pix_op)[4], const qpel_mc_func(*qpix_op)[16], int motion_x, int motion_y, int h)
static void obmc_motion(MpegEncContext *s, uint8_t *dest, uint8_t *src, int src_x, int src_y, const op_pixels_func *pix_op, int16_t mv[5][2])
static void mpeg_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_select, uint8_t *const *ref_picture, const op_pixels_func(*pix_op)[4], int motion_x, int motion_y, int h, int is_16x8, int mb_y)
static void apply_obmc(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t *const *ref_picture, const op_pixels_func(*pix_op)[4])
#define OBMC_FILTER(x, t, l, m, r, b)
static void prefetch_motion(MpegEncContext *s, uint8_t *const *pix, int dir)
void(* qpel_mc_func)(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
uint32_t * mb_type
types and macros are defined in mpegutils.h
int16_t(*[2] motion_val)[2]
void ff_mspel_motion(MPVContext *const s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t *const *ref_picture, const op_pixels_func(*pix_op)[4], int motion_x, int motion_y, int h)