32 static const vec_s16 trans4[4] = {
33 { 64, 64, 64, 64, 64, 64, 64, 64 },
34 { 83, 36, 83, 36, 83, 36, 83, 36 },
35 { 64, -64, 64, -64, 64, -64, 64, -64 },
36 { 36, -83, 36, -83, 36, -83, 36, -83 },
40 { 0x00, 0x01, 0x08, 0x09, 0x10, 0x11, 0x18, 0x19, 0x02, 0x03, 0x0A, 0x0B, 0x12, 0x13, 0x1A, 0x1B },
41 { 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D, 0x06, 0x07, 0x0E, 0x0F, 0x16, 0x17, 0x1E, 0x1F },
52 src_13 = vec_mergel(src_01, src_23);
53 src_02 = vec_mergeh(src_01, src_23);
55 e0 = vec_msums(src_02, trans4[0], zero);
56 o0 = vec_msums(src_13, trans4[1], zero);
57 e1 = vec_msums(src_02, trans4[2], zero);
58 o1 = vec_msums(src_13, trans4[3], zero);
60 add = vec_sl(vec_splat_s32(1), vec_splat_u32(shift - 1));
61 e0 = vec_add(e0, add);
62 e1 = vec_add(e1, add);
64 res[0] = vec_add(e0, o0);
65 res[1] = vec_add(e1, o1);
66 res[2] = vec_sub(e1, o1);
67 res[3] = vec_sub(e0, o0);
70 static void scale(
vec_s32 res[4],
vec_s16 res_packed[2],
int shift)
73 vec_u32 v_shift = vec_splat_u32(shift);
75 for (i = 0; i < 4; i++)
76 res[i] = vec_sra(res[i], v_shift);
79 res_packed[0] = vec_packs(res[0], res[1]);
80 res_packed[1] = vec_packs(res[2], res[3]);
83 #define FUNCDECL(a, depth) a ## _ ## depth ## _altivec
84 #define FUNC(a, b) FUNCDECL(a, b)
87 #include "hevcdsp_template.c"
91 #include "hevcdsp_template.c"
102 c->
idct[0] = ff_hevc_idct_4x4_8_altivec;
104 c->
idct[0] = ff_hevc_idct_4x4_10_altivec;
static int shift(int a, int b)
Macro definitions for various function/variable attributes.
void(* idct[4])(int16_t *coeffs, int col_limit)
static const uint16_t mask[17]
#define PPC_ALTIVEC(flags)
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
av_cold void ff_hevc_dsp_init_ppc(HEVCDSPContext *c, const int bit_depth)
Contains misc utility macros and inline functions.
static const int16_t coeffs[]