OpenJPH
Open-source implementation of JPEG2000 Part-15
Loading...
Searching...
No Matches
ojph_simd_vsx.h File Reference
#include <altivec.h>
#include <cstring>

Go to the source code of this file.

Macros

#define vsx_v128_store32_lane(p, a, i)
#define vsx_u8x16_extract_lane(a, i)
#define vsx_u16x8_extract_lane(a, i)
#define vsx_i32x4_extract_lane(a, i)
#define vsx_u32x4_extract_lane(a, i)
#define vsx_i64x2_extract_lane(a, i)
#define vsx_i8x16_shuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15)
#define vsx_i16x8_shuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7)
#define vsx_i32x4_shuffle(a, b, c0, c1, c2, c3)
#define vsx_i64x2_shuffle(a, b, c0, c1)

Typedefs

typedef __vector unsigned char v128_t
typedef __vector signed char vsx_v_i8
typedef __vector unsigned char vsx_v_u8
typedef __vector signed short vsx_v_i16
typedef __vector unsigned short vsx_v_u16
typedef __vector signed int vsx_v_i32
typedef __vector unsigned int vsx_v_u32
typedef __vector signed long long vsx_v_i64
typedef __vector unsigned long long vsx_v_u64
typedef __vector float vsx_v_f32

Functions

static v128_t vsx_v128_load (const void *p)
static void vsx_v128_store (void *p, v128_t a)
static v128_t vsx_i8x16_const (signed char c0, signed char c1, signed char c2, signed char c3, signed char c4, signed char c5, signed char c6, signed char c7, signed char c8, signed char c9, signed char c10, signed char c11, signed char c12, signed char c13, signed char c14, signed char c15)
static v128_t vsx_i16x8_const (short c0, short c1, short c2, short c3, short c4, short c5, short c6, short c7)
static v128_t vsx_u16x8_const (unsigned short c0, unsigned short c1, unsigned short c2, unsigned short c3, unsigned short c4, unsigned short c5, unsigned short c6, unsigned short c7)
static v128_t vsx_i32x4_const (int c0, int c1, int c2, int c3)
static v128_t vsx_u32x4_const (unsigned int c0, unsigned int c1, unsigned int c2, unsigned int c3)
static v128_t vsx_i64x2_const (long long c0, long long c1)
static v128_t vsx_u64x2_const (unsigned long long c0, unsigned long long c1)
static v128_t vsx_i8x16_splat (signed char x)
static v128_t vsx_i16x8_splat (short x)
static v128_t vsx_i32x4_splat (int x)
static v128_t vsx_u32x4_splat (unsigned int x)
static v128_t vsx_i64x2_splat (long long x)
static v128_t vsx_f32x4_splat (float x)
static v128_t vsx_i32x4_make (int a, int b, int c, int d)
static v128_t vsx_v128_and (v128_t a, v128_t b)
static v128_t vsx_v128_or (v128_t a, v128_t b)
static v128_t vsx_v128_xor (v128_t a, v128_t b)
static v128_t vsx_v128_andnot (v128_t a, v128_t b)
static v128_t vsx_i8x16_add (v128_t a, v128_t b)
static v128_t vsx_i16x8_add (v128_t a, v128_t b)
static v128_t vsx_i32x4_add (v128_t a, v128_t b)
static v128_t vsx_i64x2_add (v128_t a, v128_t b)
static v128_t vsx_i16x8_sub (v128_t a, v128_t b)
static v128_t vsx_i32x4_sub (v128_t a, v128_t b)
static v128_t vsx_i64x2_sub (v128_t a, v128_t b)
static v128_t vsx_i16x8_mul (v128_t a, v128_t b)
static v128_t vsx_i32x4_mul (v128_t a, v128_t b)
static v128_t vsx_i64x2_mul (v128_t a, v128_t b)
static v128_t vsx_i8x16_abs (v128_t a)
static v128_t vsx_u8x16_min (v128_t a, v128_t b)
static v128_t vsx_i16x8_max (v128_t a, v128_t b)
static v128_t vsx_i16x8_shl (v128_t a, int n)
static v128_t vsx_i32x4_shl (v128_t a, int n)
static v128_t vsx_i64x2_shl (v128_t a, int n)
static v128_t vsx_i32x4_shr (v128_t a, int n)
static v128_t vsx_i64x2_shr (v128_t a, int n)
static v128_t vsx_u16x8_shr (v128_t a, int n)
static v128_t vsx_u32x4_shr (v128_t a, int n)
static v128_t vsx_u64x2_shr (v128_t a, int n)
static v128_t vsx_i8x16_eq (v128_t a, v128_t b)
static v128_t vsx_i16x8_eq (v128_t a, v128_t b)
static v128_t vsx_i32x4_eq (v128_t a, v128_t b)
static v128_t vsx_i8x16_gt (v128_t a, v128_t b)
static v128_t vsx_i32x4_gt (v128_t a, v128_t b)
static v128_t vsx_i32x4_lt (v128_t a, v128_t b)
static v128_t vsx_i64x2_lt (v128_t a, v128_t b)
static v128_t vsx_f32x4_ge (v128_t a, v128_t b)
static v128_t vsx_f32x4_lt (v128_t a, v128_t b)
static v128_t vsx_f32x4_add (v128_t a, v128_t b)
static v128_t vsx_f32x4_sub (v128_t a, v128_t b)
static v128_t vsx_f32x4_mul (v128_t a, v128_t b)
static v128_t vsx_i32x4_trunc_sat_f32x4 (v128_t a)
static v128_t vsx_f32x4_convert_i32x4 (v128_t a)
static v128_t vsx_i64x2_extend_low_i32x4 (v128_t a)
static v128_t vsx_i64x2_extend_high_i32x4 (v128_t a)
static v128_t vsx_i8x16_swizzle (v128_t a, v128_t idx)
static int vsx_i8x16_bitmask (v128_t a)

Macro Definition Documentation

◆ vsx_i16x8_shuffle

#define vsx_i16x8_shuffle ( a,
b,
c0,
c1,
c2,
c3,
c4,
c5,
c6,
c7 )
Value:
((v128_t)__builtin_shufflevector((vsx_v_i16)(a), (vsx_v_i16)(b), \
c0,c1,c2,c3,c4,c5,c6,c7))
__vector signed short vsx_v_i16
__vector unsigned char v128_t

Definition at line 281 of file ojph_simd_vsx.h.

Referenced by ojph::local::decode_two_quad16(), and ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_i32x4_extract_lane

#define vsx_i32x4_extract_lane ( a,
i )
Value:
(((vsx_v_i32)(a))[(i)])
__vector signed int vsx_v_i32

Definition at line 140 of file ojph_simd_vsx.h.

Referenced by ojph::local::vsx_find_max_val32().

◆ vsx_i32x4_shuffle

◆ vsx_i64x2_extract_lane

#define vsx_i64x2_extract_lane ( a,
i )
Value:
(((vsx_v_i64)(a))[(i)])
__vector signed long long vsx_v_i64

Definition at line 142 of file ojph_simd_vsx.h.

Referenced by ojph::local::vsx_find_max_val64().

◆ vsx_i64x2_shuffle

◆ vsx_i8x16_shuffle

#define vsx_i8x16_shuffle ( a,
b,
c0,
c1,
c2,
c3,
c4,
c5,
c6,
c7,
c8,
c9,
c10,
c11,
c12,
c13,
c14,
c15 )
Value:
((v128_t)__builtin_shufflevector((vsx_v_u8)(a), (vsx_v_u8)(b), \
c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15))
__vector unsigned char vsx_v_u8

Definition at line 277 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_u16x8_extract_lane

#define vsx_u16x8_extract_lane ( a,
i )
Value:
(((vsx_v_u16)(a))[(i)])
__vector unsigned short vsx_v_u16

Definition at line 139 of file ojph_simd_vsx.h.

Referenced by ojph::local::decode_one_quad32(), ojph::local::decode_two_quad16(), and ojph::local::frwd_read().

◆ vsx_u32x4_extract_lane

#define vsx_u32x4_extract_lane ( a,
i )
Value:
(((vsx_v_u32)(a))[(i)])
__vector unsigned int vsx_v_u32

Definition at line 141 of file ojph_simd_vsx.h.

Referenced by ojph::local::decode_one_quad32(), and ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_u8x16_extract_lane

#define vsx_u8x16_extract_lane ( a,
i )
Value:
(((vsx_v_u8)(a))[(i)])

Definition at line 138 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_v128_store32_lane

#define vsx_v128_store32_lane ( p,
a,
i )
Value:
do { vsx_v_i32 t_ = (vsx_v_i32)(a); int v_ = t_[(i)]; \
std::memcpy((p), &v_, 4); } while (0)

Definition at line 83 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

Typedef Documentation

◆ v128_t

typedef __vector unsigned char v128_t

Definition at line 62 of file ojph_simd_vsx.h.

◆ vsx_v_f32

typedef __vector float vsx_v_f32

Definition at line 72 of file ojph_simd_vsx.h.

◆ vsx_v_i16

typedef __vector signed short vsx_v_i16

Definition at line 66 of file ojph_simd_vsx.h.

◆ vsx_v_i32

typedef __vector signed int vsx_v_i32

Definition at line 68 of file ojph_simd_vsx.h.

◆ vsx_v_i64

typedef __vector signed long long vsx_v_i64

Definition at line 70 of file ojph_simd_vsx.h.

◆ vsx_v_i8

typedef __vector signed char vsx_v_i8

Definition at line 64 of file ojph_simd_vsx.h.

◆ vsx_v_u16

typedef __vector unsigned short vsx_v_u16

Definition at line 67 of file ojph_simd_vsx.h.

◆ vsx_v_u32

typedef __vector unsigned int vsx_v_u32

Definition at line 69 of file ojph_simd_vsx.h.

◆ vsx_v_u64

typedef __vector unsigned long long vsx_v_u64

Definition at line 71 of file ojph_simd_vsx.h.

◆ vsx_v_u8

typedef __vector unsigned char vsx_v_u8

Definition at line 65 of file ojph_simd_vsx.h.

Function Documentation

◆ vsx_f32x4_add()

◆ vsx_f32x4_convert_i32x4()

◆ vsx_f32x4_ge()

v128_t vsx_f32x4_ge ( v128_t a,
v128_t b )
inlinestatic

Definition at line 236 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_vsx_i32x4_max_ge().

◆ vsx_f32x4_lt()

v128_t vsx_f32x4_lt ( v128_t a,
v128_t b )
inlinestatic

Definition at line 238 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_vsx_i32x4_min_lt().

◆ vsx_f32x4_mul()

◆ vsx_f32x4_splat()

◆ vsx_f32x4_sub()

◆ vsx_i16x8_add()

v128_t vsx_i16x8_add ( v128_t a,
v128_t b )
inlinestatic

◆ vsx_i16x8_const()

v128_t vsx_i16x8_const ( short c0,
short c1,
short c2,
short c3,
short c4,
short c5,
short c6,
short c7 )
inlinestatic

◆ vsx_i16x8_eq()

v128_t vsx_i16x8_eq ( v128_t a,
v128_t b )
inlinestatic

Definition at line 222 of file ojph_simd_vsx.h.

Referenced by ojph::local::decode_two_quad16().

◆ vsx_i16x8_max()

v128_t vsx_i16x8_max ( v128_t a,
v128_t b )
inlinestatic

Definition at line 189 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_i16x8_mul()

v128_t vsx_i16x8_mul ( v128_t a,
v128_t b )
inlinestatic

◆ vsx_i16x8_shl()

v128_t vsx_i16x8_shl ( v128_t a,
int n )
inlinestatic

Definition at line 195 of file ojph_simd_vsx.h.

Referenced by ojph::local::decode_two_quad16().

◆ vsx_i16x8_splat()

v128_t vsx_i16x8_splat ( short x)
inlinestatic

Definition at line 121 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_i16x8_sub()

v128_t vsx_i16x8_sub ( v128_t a,
v128_t b )
inlinestatic

◆ vsx_i32x4_add()

◆ vsx_i32x4_const()

v128_t vsx_i32x4_const ( int c0,
int c1,
int c2,
int c3 )
inlinestatic

◆ vsx_i32x4_eq()

v128_t vsx_i32x4_eq ( v128_t a,
v128_t b )
inlinestatic

◆ vsx_i32x4_gt()

◆ vsx_i32x4_lt()

◆ vsx_i32x4_make()

v128_t vsx_i32x4_make ( int a,
int b,
int c,
int d )
inlinestatic

◆ vsx_i32x4_mul()

v128_t vsx_i32x4_mul ( v128_t a,
v128_t b )
inlinestatic

◆ vsx_i32x4_shl()

◆ vsx_i32x4_shr()

◆ vsx_i32x4_splat()

◆ vsx_i32x4_sub()

◆ vsx_i32x4_trunc_sat_f32x4()

v128_t vsx_i32x4_trunc_sat_f32x4 ( v128_t a)
inlinestatic

Definition at line 253 of file ojph_simd_vsx.h.

Referenced by ojph::local::vsx_irv_tx_to_cb32().

◆ vsx_i64x2_add()

◆ vsx_i64x2_const()

◆ vsx_i64x2_extend_high_i32x4()

v128_t vsx_i64x2_extend_high_i32x4 ( v128_t a)
inlinestatic

◆ vsx_i64x2_extend_low_i32x4()

v128_t vsx_i64x2_extend_low_i32x4 ( v128_t a)
inlinestatic

◆ vsx_i64x2_lt()

◆ vsx_i64x2_mul()

v128_t vsx_i64x2_mul ( v128_t a,
v128_t b )
inlinestatic

◆ vsx_i64x2_shl()

◆ vsx_i64x2_shr()

◆ vsx_i64x2_splat()

◆ vsx_i64x2_sub()

◆ vsx_i8x16_abs()

v128_t vsx_i8x16_abs ( v128_t a)
inlinestatic

Definition at line 185 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_i8x16_add()

v128_t vsx_i8x16_add ( v128_t a,
v128_t b )
inlinestatic

Definition at line 160 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_i8x16_bitmask()

◆ vsx_i8x16_const()

v128_t vsx_i8x16_const ( signed char c0,
signed char c1,
signed char c2,
signed char c3,
signed char c4,
signed char c5,
signed char c6,
signed char c7,
signed char c8,
signed char c9,
signed char c10,
signed char c11,
signed char c12,
signed char c13,
signed char c14,
signed char c15 )
inlinestatic

◆ vsx_i8x16_eq()

v128_t vsx_i8x16_eq ( v128_t a,
v128_t b )
inlinestatic

◆ vsx_i8x16_gt()

v128_t vsx_i8x16_gt ( v128_t a,
v128_t b )
inlinestatic

Definition at line 227 of file ojph_simd_vsx.h.

Referenced by ojph::local::frwd_read().

◆ vsx_i8x16_splat()

v128_t vsx_i8x16_splat ( signed char x)
inlinestatic

Definition at line 119 of file ojph_simd_vsx.h.

Referenced by ojph::local::frwd_read().

◆ vsx_i8x16_swizzle()

v128_t vsx_i8x16_swizzle ( v128_t a,
v128_t idx )
inlinestatic

◆ vsx_u16x8_const()

v128_t vsx_u16x8_const ( unsigned short c0,
unsigned short c1,
unsigned short c2,
unsigned short c3,
unsigned short c4,
unsigned short c5,
unsigned short c6,
unsigned short c7 )
inlinestatic

Definition at line 103 of file ojph_simd_vsx.h.

Referenced by ojph::local::decode_two_quad16().

◆ vsx_u16x8_shr()

v128_t vsx_u16x8_shr ( v128_t a,
int n )
inlinestatic

◆ vsx_u32x4_const()

v128_t vsx_u32x4_const ( unsigned int c0,
unsigned int c1,
unsigned int c2,
unsigned int c3 )
inlinestatic

Definition at line 110 of file ojph_simd_vsx.h.

Referenced by ojph::local::decode_one_quad32().

◆ vsx_u32x4_shr()

v128_t vsx_u32x4_shr ( v128_t a,
int n )
inlinestatic

◆ vsx_u32x4_splat()

v128_t vsx_u32x4_splat ( unsigned int x)
inlinestatic

Definition at line 125 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_u64x2_const()

v128_t vsx_u64x2_const ( unsigned long long c0,
unsigned long long c1 )
inlinestatic

Definition at line 115 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_u64x2_shr()

v128_t vsx_u64x2_shr ( v128_t a,
int n )
inlinestatic

◆ vsx_u8x16_min()

v128_t vsx_u8x16_min ( v128_t a,
v128_t b )
inlinestatic

Definition at line 187 of file ojph_simd_vsx.h.

Referenced by ojph::local::ojph_decode_codeblock_vsx().

◆ vsx_v128_and()

◆ vsx_v128_andnot()

◆ vsx_v128_load()

v128_t vsx_v128_load ( const void * p)
inlinestatic

◆ vsx_v128_or()

◆ vsx_v128_store()

◆ vsx_v128_xor()