FFmpeg
Loading...
Searching...
No Matches
vc1dsp_altivec.c File Reference
#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/vc1dsp.h"
#include "vc1dsp_altivec.h"
#include "h264chroma_template.c"

Go to the source code of this file.

Macros

#define STEP8(s0, s1, s2, s3, s4, s5, s6, s7, vec_rnd)
 
#define SHIFT_HOR8(s0, s1, s2, s3, s4, s5, s6, s7)
 
#define SHIFT_VERT8(s0, s1, s2, s3, s4, s5, s6, s7)
 
#define STEP4(s0, s1, s2, s3, vec_rnd)
 
#define SHIFT_HOR4(s0, s1, s2, s3)
 
#define SHIFT_VERT4(s0, s1, s2, s3)
 
#define GET_TMP2(dst, p)
 
#define ADD(dest, src, perm)
 
#define PUT_OP_U8_ALTIVEC(d, s, dst)
 
#define AVG_OP_U8_ALTIVEC(d, s, dst)
 
#define OP_U8_ALTIVEC   PUT_OP_U8_ALTIVEC
 
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec   put_no_rnd_vc1_chroma_mc8_altivec
 
#define OP_U8_ALTIVEC   AVG_OP_U8_ALTIVEC
 
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec   avg_no_rnd_vc1_chroma_mc8_altivec
 

Functions

static void vc1_inv_trans_8x8_altivec (int16_t block[64])
 Do inverse transform on 8x8 block.
 
static void vc1_inv_trans_8x4_altivec (uint8_t *dest, ptrdiff_t stride, int16_t *block)
 Do inverse transform on 8x4 part of block.
 
av_cold void ff_vc1dsp_init_altivec (VC1DSPContext *dsp)
 

Macro Definition Documentation

◆ STEP8

#define STEP8 ( s0,
s1,
s2,
s3,
s4,
s5,
s6,
s7,
vec_rnd )

Definition at line 32 of file vc1dsp_altivec.c.

Referenced by vc1_inv_trans_8x4_altivec(), and vc1_inv_trans_8x8_altivec().

◆ SHIFT_HOR8

#define SHIFT_HOR8 ( s0,
s1,
s2,
s3,
s4,
s5,
s6,
s7 )
Value:
do { \
s0 = vec_sra(s0, vec_3); \
s1 = vec_sra(s1, vec_3); \
s2 = vec_sra(s2, vec_3); \
s3 = vec_sra(s3, vec_3); \
s4 = vec_sra(s4, vec_3); \
s5 = vec_sra(s5, vec_3); \
s6 = vec_sra(s6, vec_3); \
s7 = vec_sra(s7, vec_3); \
}while(0)

Definition at line 79 of file vc1dsp_altivec.c.

Referenced by vc1_inv_trans_8x4_altivec(), and vc1_inv_trans_8x8_altivec().

◆ SHIFT_VERT8

#define SHIFT_VERT8 ( s0,
s1,
s2,
s3,
s4,
s5,
s6,
s7 )
Value:
do { \
s0 = vec_sra(s0, vec_7); \
s1 = vec_sra(s1, vec_7); \
s2 = vec_sra(s2, vec_7); \
s3 = vec_sra(s3, vec_7); \
s4 = vec_sra(vec_add(s4, vec_1s), vec_7); \
s5 = vec_sra(vec_add(s5, vec_1s), vec_7); \
s6 = vec_sra(vec_add(s6, vec_1s), vec_7); \
s7 = vec_sra(vec_add(s7, vec_1s), vec_7); \
}while(0)

Definition at line 91 of file vc1dsp_altivec.c.

Referenced by vc1_inv_trans_8x8_altivec().

◆ STEP4

#define STEP4 ( s0,
s1,
s2,
s3,
vec_rnd )
Value:
do { \
t1 = vec_add(vec_sl(s0, vec_4), s0); \
t1 = vec_add(t1, vec_rnd); \
t2 = vec_add(vec_sl(s2, vec_4), s2); \
t0 = vec_add(t1, t2); \
t1 = vec_sub(t1, t2); \
t3 = vec_sl(vec_sub(s3, s1), vec_1); \
t3 = vec_add(t3, vec_sl(t3, vec_2)); \
t2 = vec_add(t3, vec_sl(s1, vec_5)); \
t3 = vec_add(t3, vec_sl(s3, vec_3)); \
t3 = vec_add(t3, vec_sl(s3, vec_2)); \
s0 = vec_add(t0, t2); \
s1 = vec_sub(t1, t3); \
s2 = vec_add(t1, t3); \
s3 = vec_sub(t0, t2); \
}while (0)

Definition at line 104 of file vc1dsp_altivec.c.

Referenced by vc1_inv_trans_8x4_altivec().

◆ SHIFT_HOR4

#define SHIFT_HOR4 ( s0,
s1,
s2,
s3 )
Value:
s0 = vec_sra(s0, vec_3); \
s1 = vec_sra(s1, vec_3); \
s2 = vec_sra(s2, vec_3); \
s3 = vec_sra(s3, vec_3);

Definition at line 122 of file vc1dsp_altivec.c.

◆ SHIFT_VERT4

#define SHIFT_VERT4 ( s0,
s1,
s2,
s3 )
Value:
s0 = vec_sra(s0, vec_7); \
s1 = vec_sra(s1, vec_7); \
s2 = vec_sra(s2, vec_7); \
s3 = vec_sra(s3, vec_7);

Definition at line 128 of file vc1dsp_altivec.c.

Referenced by vc1_inv_trans_8x4_altivec().

◆ GET_TMP2

#define GET_TMP2 ( dst,
p )
Value:
tmp = vec_vsx_ld (0, dst); \
tmp2 = (vector signed short)vec_mergeh (tmp, vec_splat_u8(0));
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:97
static uint8_t tmp[40]
Definition aes_ctr.c:52

◆ ADD

#define ADD ( dest,
src,
perm )
Value:
GET_TMP2(dest, perm); \
tmp3 = vec_adds (tmp2, src); \
tmp = vec_packsu (tmp3, tmp3); \
vec_ste ((vector unsigned int)tmp, 0, (unsigned int *)dest); \
vec_ste ((vector unsigned int)tmp, 4, (unsigned int *)dest);
perm
Definition f_perms.c:75
#define GET_TMP2(dest, prm)
#define src
Definition vp8dsp.c:248

Referenced by vc1_inv_trans_8x4_altivec().

◆ PUT_OP_U8_ALTIVEC

#define PUT_OP_U8_ALTIVEC ( d,
s,
dst )
Value:
d = s
#define s(width, name)
Definition cbs_vp9.c:198

Definition at line 337 of file vc1dsp_altivec.c.

◆ AVG_OP_U8_ALTIVEC

#define AVG_OP_U8_ALTIVEC ( d,
s,
dst )
Value:
d = vec_avg(dst, s)

Definition at line 338 of file vc1dsp_altivec.c.

◆ OP_U8_ALTIVEC [1/2]

#define OP_U8_ALTIVEC   PUT_OP_U8_ALTIVEC

Definition at line 340 of file vc1dsp_altivec.c.

◆ PREFIX_no_rnd_vc1_chroma_mc8_altivec [1/2]

#define PREFIX_no_rnd_vc1_chroma_mc8_altivec   put_no_rnd_vc1_chroma_mc8_altivec

Definition at line 341 of file vc1dsp_altivec.c.

◆ OP_U8_ALTIVEC [2/2]

#define OP_U8_ALTIVEC   AVG_OP_U8_ALTIVEC

Definition at line 340 of file vc1dsp_altivec.c.

◆ PREFIX_no_rnd_vc1_chroma_mc8_altivec [2/2]

#define PREFIX_no_rnd_vc1_chroma_mc8_altivec   avg_no_rnd_vc1_chroma_mc8_altivec

Definition at line 341 of file vc1dsp_altivec.c.

Function Documentation

◆ vc1_inv_trans_8x8_altivec()

static void vc1_inv_trans_8x8_altivec ( int16_t block[64])
static

Do inverse transform on 8x8 block.

Definition at line 136 of file vc1dsp_altivec.c.

Referenced by ff_vc1dsp_init_altivec().

◆ vc1_inv_trans_8x4_altivec()

static void vc1_inv_trans_8x4_altivec ( uint8_t * dest,
ptrdiff_t stride,
int16_t * block )
static

Do inverse transform on 8x4 part of block.

Definition at line 231 of file vc1dsp_altivec.c.

Referenced by ff_vc1dsp_init_altivec().

◆ ff_vc1dsp_init_altivec()

av_cold void ff_vc1dsp_init_altivec ( VC1DSPContext * dsp)

Definition at line 352 of file vc1dsp_altivec.c.

Referenced by ff_vc1dsp_init_ppc().