39#define IdctAdjustBeforeShift 8
48#define M(a, b) ((int)((SUINT)(a) * (b)) >> 16)
51 int16_t *input,
int type)
55 int A,
B,
C,
D, Ad, Bd, Cd, Dd,
E,
F,
G,
H;
56 int Ed, Gd, Add, Bdd, Fd, Hd;
61 for (
i = 0;
i < 8;
i++) {
63 if (ip[0 * 8] | ip[1 * 8] | ip[2 * 8] | ip[3 * 8] |
64 ip[4 * 8] | ip[5 * 8] | ip[6 * 8] | ip[7 * 8]) {
76 E =
M(
xC4S4, (ip[0 * 8] + ip[4 * 8]));
77 F =
M(
xC4S4, (ip[0 * 8] - ip[4 * 8]));
101 ip[5 * 8] = Fd + Bdd;
102 ip[6 * 8] = Fd - Bdd;
110 for (
i = 0;
i < 8;
i++) {
112 if (ip[1] | ip[2] | ip[3] |
113 ip[4] | ip[5] | ip[6] | ip[7]) {
125 E =
M(
xC4S4, (ip[0] + ip[4])) + 8;
126 F =
M(
xC4S4, (ip[0] - ip[4])) + 8;
202 int16_t *input,
int type)
206 int A,
B,
C,
D, Ad, Bd, Cd, Dd,
E,
F,
G,
H;
207 int Ed, Gd, Add, Bdd, Fd, Hd;
212 for (
i = 0;
i < 4;
i++) {
214 if (ip[0 * 8] | ip[1 * 8] | ip[2 * 8] | ip[3 * 8]) {
245 ip[1 * 8] = Add + Hd;
246 ip[2 * 8] = Add - Hd;
251 ip[5 * 8] = Fd + Bdd;
252 ip[6 * 8] = Fd - Bdd;
261 for (
i = 0;
i < 8;
i++) {
263 if (ip[0] | ip[1] | ip[2] | ip[3]) {
370 int i, dc = (
block[0] + 15) >> 5;
372 for (
i = 0;
i < 8;
i++) {
387 int *bounding_values,
int count)
391 const ptrdiff_t nstride = -
stride;
393 for (end = first_pixel + count; first_pixel < end; first_pixel++) {
395 (first_pixel[0] - first_pixel[nstride]) * 3;
404 int *bounding_values,
int count)
409 for (end = first_pixel + count *
stride; first_pixel != end; first_pixel +=
stride) {
411 (first_pixel[ 0] - first_pixel[-1]) * 3;
419#define LOOP_FILTER(prefix, suffix, dim, count) \
420void prefix##_##dim##_loop_filter_##count##suffix(uint8_t *first_pixel, ptrdiff_t stride, \
421 int *bounding_values) \
423 vp3_##dim##_loop_filter_c(first_pixel, stride, bounding_values, count); \
431static
void put_no_rnd_pixels_l2(uint8_t *
dst, const uint8_t *
src1,
436 for (
i = 0;
i <
h;
i++) {
450 c->put_no_rnd_pixels_l2 = put_no_rnd_pixels_l2;
455 c->v_loop_filter =
c->v_loop_filter_unaligned = vp3_v_loop_filter_8_c;
456 c->h_loop_filter =
c->h_loop_filter_unaligned = vp3_h_loop_filter_8_c;
462#elif ARCH_X86 && HAVE_X86ASM
479 int *bounding_values = bounding_values_array + 127;
486 memset(bounding_values_array, 0, 256 *
sizeof(
int));
487 for (x = 0; x < filter_limit; x++) {
488 bounding_values[-x] = -x;
489 bounding_values[x] = x;
492 bounding_values[ x] =
value;
493 bounding_values[-x] = -
value;
496 bounding_values[128] =
value;
498 bounding_values[129] = bounding_values[130] =
499 bounding_values[131] = bounding_values[132] = filter_limit * 0x00020002U;
501 bounding_values[129] = bounding_values[130] = filter_limit * 0x02020202U;
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_assert0(cond)
assert() equivalent, that is always enabled.
#define i(width, name, range_min, range_max)
common internal and external API header
static int filter_value(int in, int rrp[8], int v[9])
static void vp3_idct_dc_add_c(uint8_t *dest, ptrdiff_t stride, int16_t *block)
static void vp3_idct_put_c(uint8_t *dest, ptrdiff_t stride, int16_t *block)
static av_always_inline void vp3_h_loop_filter_c(uint8_t *first_pixel, ptrdiff_t stride, int *bounding_values, int count)
static av_always_inline void idct(uint8_t *dst, ptrdiff_t stride, int16_t *input, int type)
static av_always_inline void idct10(uint8_t *dst, ptrdiff_t stride, int16_t *input, int type)
void ff_vp3dsp_set_bounding_values(int *bounding_values_array, int filter_limit)
static av_always_inline void vp3_v_loop_filter_c(uint8_t *first_pixel, ptrdiff_t stride, int *bounding_values, int count)
av_cold void ff_vp3dsp_init(VP3DSPContext *c)
static void vp3_idct_add_c(uint8_t *dest, ptrdiff_t stride, int16_t *block)
#define IdctAdjustBeforeShift
void ff_vp3dsp_idct10_put(uint8_t *dest, ptrdiff_t stride, int16_t *block)
void ff_vp3dsp_idct10_add(uint8_t *dest, ptrdiff_t stride, int16_t *block)
#define LOOP_FILTER(prefix, suffix, dim, count)
Macro definitions for various function/variable attributes.
common internal API header
static uint32_t no_rnd_avg32(uint32_t a, uint32_t b)
void ff_vp3dsp_init_x86(VP3DSPContext *c)
av_cold void ff_vp3dsp_init_ppc(VP3DSPContext *c)
av_cold void ff_vp3dsp_init_arm(VP3DSPContext *c)
av_cold void ff_vp3dsp_init_mips(VP3DSPContext *c)