25 int x16,
int y16,
int rounder)
27 const int A = (16 - x16) * (16 - y16);
28 const int B = (x16) * (16 - y16);
29 const int C = (16 - x16) * (y16);
30 const int D = (x16) * (y16);
33 for (i = 0; i <
h; i++) {
34 dst[0] = (A * src[0] + B * src[1] + C * src[stride + 0] + D * src[stride + 1] + rounder) >> 8;
35 dst[1] = (A * src[1] + B * src[2] + C * src[stride + 1] + D * src[stride + 2] + rounder) >> 8;
36 dst[2] = (A * src[2] + B * src[3] + C * src[stride + 2] + D * src[stride + 3] + rounder) >> 8;
37 dst[3] = (A * src[3] + B * src[4] + C * src[stride + 3] + D * src[stride + 4] + rounder) >> 8;
38 dst[4] = (A * src[4] + B * src[5] + C * src[stride + 4] + D * src[stride + 5] + rounder) >> 8;
39 dst[5] = (A * src[5] + B * src[6] + C * src[stride + 5] + D * src[stride + 6] + rounder) >> 8;
40 dst[6] = (A * src[6] + B * src[7] + C * src[stride + 6] + D * src[stride + 7] + rounder) >> 8;
41 dst[7] = (A * src[7] + B * src[8] + C * src[stride + 7] + D * src[stride + 8] + rounder) >> 8;
48 int dxx,
int dxy,
int dyx,
int dyy,
int shift,
int r,
57 for (y = 0; y <
h; y++) {
62 for (x = 0; x < 8; x++) {
66 int frac_x = src_x & (s - 1);
67 int frac_y = src_y & (s - 1);
72 if ((
unsigned) src_x <
width) {
73 if ((
unsigned) src_y <
height) {
74 index = src_x + src_y *
stride;
76 ((src[
index] * (s - frac_x) +
77 src[index + 1] * frac_x) * (s - frac_y) +
78 (src[index + stride] * (s - frac_x) +
79 src[index + stride + 1] * frac_x) * frac_y +
82 index = src_x + av_clip(src_y, 0, height) *
stride;
84 ((src[
index] * (s - frac_x) +
85 src[index + 1] * frac_x) * s +
89 if ((
unsigned) src_y <
height) {
90 index = av_clip(src_x, 0, width) + src_y *
stride;
92 ((src[
index] * (s - frac_y) +
93 src[index + stride] * frac_y) * s +
96 index = av_clip(src_x, 0, width) +
97 av_clip(src_y, 0, height) *
stride;
98 dst[y * stride + x] = src[
index];
av_cold void ff_mpegvideodsp_init(MpegVideoDSPContext *c)
static int shift(int a, int b)
static void gmc1_c(uint8_t *dst, uint8_t *src, int stride, int h, int x16, int y16, int rounder)
Macro definitions for various function/variable attributes.
void(* gmc)(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height)
global motion compensation.
void(* gmc1)(uint8_t *dst, uint8_t *src, int srcStride, int h, int x16, int y16, int rounder)
translational global motion compensation.
av_cold void ff_mpegvideodsp_init_x86(MpegVideoDSPContext *c)
void ff_gmc_c(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height)
BYTE int const BYTE int int int height
GLint GLenum GLboolean GLsizei stride
common internal and external API header
av_cold void ff_mpegvideodsp_init_ppc(MpegVideoDSPContext *c)