FFmpeg
Loading...
Searching...
No Matches
vp3dsp_altivec.c File Reference
#include <string.h>
#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/vp3dsp.h"
#include "vp3dsp_altivec.h"

Go to the source code of this file.

Macros

#define IDCT_START
 
#define IDCT_1D(ADD, SHIFT)
 
#define NOP(a)
 
#define ADD8(a)
 
#define SHIFT4(a)
 
#define PUT(a)
 
#define GET_VDST16
 
#define ADD(a)
 

Functions

static vec_s16 M15 (vec_s16 a, vec_s16 C)
 
static vec_s16 M16 (vec_s16 a, vec_s16 C)
 
static void vp3_idct_put_altivec (uint8_t *dst, ptrdiff_t stride, int16_t block[64])
 
static void vp3_idct_add_altivec (uint8_t *dst, ptrdiff_t stride, int16_t block[64])
 
av_cold void ff_vp3dsp_init_altivec (VP3DSPContext *c)
 

Variables

static const vec_s16 constants
 
static const vec_u8 interleave_high
 

Macro Definition Documentation

◆ IDCT_START

#define IDCT_START
Value:
vec_s16 A, B, C, D, Ad, Bd, Cd, Dd, E, F, G, H;\
vec_s16 Ed, Gd, Add, Bdd, Fd, Hd;\
vec_s16 eight = vec_splat_s16(8);\
vec_u16 four = vec_splat_u16(4);\
\
vec_s16 C1 = vec_splat(constants, 1);\
vec_s16 C2 = vec_splat(constants, 2);\
vec_s16 C3 = vec_splat(constants, 3);\
vec_s16 C4 = vec_splat(constants, 4);\
vec_s16 C5 = vec_splat(constants, 5);\
vec_s16 C6 = vec_splat(constants, 6);\
vec_s16 C7 = vec_splat(constants, 7);\
\
vec_s16 b0 = vec_ld(0x00, block);\
vec_s16 b1 = vec_ld(0x10, block);\
vec_s16 b2 = vec_ld(0x20, block);\
vec_s16 b3 = vec_ld(0x30, block);\
vec_s16 b4 = vec_ld(0x40, block);\
vec_s16 b5 = vec_ld(0x50, block);\
vec_s16 b6 = vec_ld(0x60, block);\
vec_s16 b7 = vec_ld(0x70, block);
#define A(x)
Definition vpx_arith.h:28
#define E
Definition avdct.c:34
#define D
Definition avdct.c:35
static int16_t block[64]
Definition dct.c:125
#define F(x)
#define B
Definition huffyuv.h:42
#define G
Definition huffyuv.h:43
static const vec_s16 constants[5]
#define C
#define C5
#define C6
#define C3
#define C4
#define C1
#define C2
#define C7
#define H
Definition pixlet.c:39
#define vec_s16
#define vec_u16
static double b1(void *priv, double x, double y)
Definition vf_xfade.c:2041
static double b2(void *priv, double x, double y)
Definition vf_xfade.c:2042
static double b3(void *priv, double x, double y)
Definition vf_xfade.c:2043
static double b0(void *priv, double x, double y)
Definition vf_xfade.c:2040

Definition at line 42 of file vp3dsp_altivec.c.

Referenced by vp3_idct_add_altivec(), and vp3_idct_put_altivec().

◆ IDCT_1D

#define IDCT_1D ( ADD,
SHIFT )

Definition at line 78 of file vp3dsp_altivec.c.

Referenced by vp3_idct_add_altivec(), and vp3_idct_put_altivec().

◆ NOP

#define NOP ( a)
Value:
int a

Definition at line 117 of file vp3dsp_altivec.c.

Referenced by amplify_frame(), mix_frames(), vp3_idct_add_altivec(), and vp3_idct_put_altivec().

◆ ADD8

#define ADD8 ( a)
Value:
vec_add(a, eight)

Definition at line 118 of file vp3dsp_altivec.c.

Referenced by vp3_idct_add_altivec(), and vp3_idct_put_altivec().

◆ SHIFT4

#define SHIFT4 ( a)
Value:
vec_sra(a, four)

Definition at line 119 of file vp3dsp_altivec.c.

Referenced by vp3_idct_add_altivec(), and vp3_idct_put_altivec().

◆ PUT

#define PUT ( a)
Value:
t = vec_packsu(a, a);\
vec_ste((vec_u32)t, 0, (unsigned int *)dst);\
vec_ste((vec_u32)t, 4, (unsigned int *)dst);
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:97
#define vec_u32

Referenced by vp3_idct_put_altivec().

◆ GET_VDST16

#define GET_VDST16
Value:
vdst = vec_vsx_ld(0,dst);\
vdst_16 = (vec_s16)vec_mergeh(vdst, zero_u8v);
#define zero_u8v

◆ ADD

#define ADD ( a)
Value:
vdst_16 = vec_adds(a, vdst_16);\
t = vec_packsu(vdst_16, vdst_16);\
vec_ste((vec_u32)t, 0, (unsigned int *)dst);\
vec_ste((vec_u32)t, 4, (unsigned int *)dst);
#define GET_VDST16

Referenced by vp3_idct_add_altivec().

Function Documentation

◆ M15()

static vec_s16 M15 ( vec_s16 a,
vec_s16 C )
inlinestatic

Definition at line 69 of file vp3dsp_altivec.c.

Referenced by M16().

◆ M16()

static vec_s16 M16 ( vec_s16 a,
vec_s16 C )
inlinestatic

Definition at line 73 of file vp3dsp_altivec.c.

◆ vp3_idct_put_altivec()

static void vp3_idct_put_altivec ( uint8_t * dst,
ptrdiff_t stride,
int16_t block[64] )
static

Definition at line 121 of file vp3dsp_altivec.c.

Referenced by ff_vp3dsp_init_altivec().

◆ vp3_idct_add_altivec()

static void vp3_idct_add_altivec ( uint8_t * dst,
ptrdiff_t stride,
int16_t block[64] )
static

Definition at line 150 of file vp3dsp_altivec.c.

Referenced by ff_vp3dsp_init_altivec().

◆ ff_vp3dsp_init_altivec()

av_cold void ff_vp3dsp_init_altivec ( VP3DSPContext * c)

Definition at line 191 of file vp3dsp_altivec.c.

Referenced by ff_vp3dsp_init_ppc().

Variable Documentation

◆ constants

const vec_s16 constants
static
Initial value:
=
{0, 64277, 60547, 54491, 46341, 36410, 25080, 12785}

Definition at line 32 of file vp3dsp_altivec.c.

◆ interleave_high

const vec_u8 interleave_high
static
Initial value:
=
{2, 3, 18, 19, 6, 7, 22, 23, 10, 11, 26, 27, 14, 15, 30, 31}

Definition at line 38 of file vp3dsp_altivec.c.

Referenced by M15().