33 int16_t
basis[64],
int scale)
38 for (i = 0; i < 8 * 8; i++) {
39 int b = rem[i] + ((basis[i] * scale +
46 sum += (w *
b) * (w * b) >> 4;
55 for (i = 0; i < 8 * 8; i++)
56 rem[i] += (basis[i] * scale +
65 for (i = 0; i < 16; i++) {
66 for (j = 0; j < 16; j += 8) {
77 pix += line_size - 16;
87 for (i = 0; i < 16; i++) {
88 for (j = 0; j < 16; j += 8) {
100 register uint64_t x = *(uint64_t *) pix;
102 s += sq[(x >> 8) & 0xff];
103 s += sq[(x >> 16) & 0xff];
104 s += sq[(x >> 24) & 0xff];
105 s += sq[(x >> 32) & 0xff];
106 s += sq[(x >> 40) & 0xff];
107 s += sq[(x >> 48) & 0xff];
108 s += sq[(x >> 56) & 0xff];
110 register uint32_t x = *(uint32_t *) pix;
112 s += sq[(x >> 8) & 0xff];
113 s += sq[(x >> 16) & 0xff];
114 s += sq[(x >> 24) & 0xff];
115 x = *(uint32_t *) (pix + 4);
117 s += sq[(x >> 8) & 0xff];
118 s += sq[(x >> 16) & 0xff];
119 s += sq[(x >> 24) & 0xff];
124 pix += line_size - 16;
132 int w,
int h,
int sides)
138 for (i = 0; i <
height; i++) {
139 memset(ptr - w, ptr[0], w);
140 memset(ptr + width, ptr[width - 1], w);
146 last_line = buf + (height - 1) * wrap;
148 for (i = 0; i <
h; i++)
150 memcpy(buf - (i + 1) *
wrap,
buf, width + w + w);
152 for (i = 0; i <
h; i++)
154 memcpy(last_line + (i + 1) *
wrap, last_line, width + w + w);
int(* try_8x8basis)(int16_t rem[64], int16_t weight[64], int16_t basis[64], int scale)
static int pix_norm1_c(uint8_t *pix, int line_size)
void(* shrink[4])(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
void(* add_8x8basis)(int16_t rem[64], int16_t basis[64], int scale)
av_cold void ff_mpegvideoencdsp_init_ppc(MpegvideoEncDSPContext *c, AVCodecContext *avctx)
uint32_t ff_square_tab[512]
Macro definitions for various function/variable attributes.
av_cold void ff_mpegvideoencdsp_init(MpegvideoEncDSPContext *c, AVCodecContext *avctx)
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
void ff_shrink44(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static void draw_edges_8_c(uint8_t *buf, int wrap, int width, int height, int w, int h, int sides)
simple assert() macros that are a bit more flexible than ISO C assert().
Libavcodec external API header.
void ff_shrink88(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
void ff_shrink22(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
int(* pix_sum)(uint8_t *pix, int line_size)
static void add_8x8basis_c(int16_t rem[64], int16_t basis[64], int scale)
av_cold void ff_mpegvideoencdsp_init_arm(MpegvideoEncDSPContext *c, AVCodecContext *avctx)
main external API structure.
BYTE int const BYTE int int int height
int(* pix_norm1)(uint8_t *pix, int line_size)
static int pix_sum_c(uint8_t *pix, int line_size)
static int weight(int i, int blen, int offset)
void ff_mpegvideoencdsp_init_x86(MpegvideoEncDSPContext *c, AVCodecContext *avctx)
static int16_t basis[64][64]
void(* draw_edges)(uint8_t *buf, int wrap, int width, int height, int w, int h, int sides)
static int try_8x8basis_c(int16_t rem[64], int16_t weight[64], int16_t basis[64], int scale)
void av_image_copy_plane(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)
Copy image plane from src to dst.