History

ppc: hevcdsp: Use shorthands for vector types

This is more consistent and fixes compilation with clang.

Diego Biurrun committed 9 years ago

Commit 39929e51 parent 554e55b2 files · +12 −12Browse files

Unified · Split

2 files
  1. libavcodec/ppc/hevcdsp.c +9 −9
  2. libavcodec/ppc/hevcdsp_template.c +3 −3
libavcodec/ppc/hevcdsp.c+9−9
@@ -31,7 +31,7 @@ · 30 unmodified lines
3131 #include "libavcodec/hevcdsp.h"
3232
3333 #if HAVE_ALTIVEC
34−static const vector int16_t trans4[4] = {
34+static const vec_s16 trans4[4] = {
3535 { 64, 64, 64, 64, 64, 64, 64, 64 },
3636 { 83, 36, 83, 36, 83, 36, 83, 36 },
3737 { 64, -64, 64, -64, 64, -64, 64, -64 },
@@ -43,13 +43,13 @@ static const vec_u8 mask[2] = { · 5 unmodified lines
4343 { 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D, 0x06, 0x07, 0x0E, 0x0F, 0x16, 0x17, 0x1E, 0x1F },
4444 };
4545
46−static void transform4x4(vector int16_t src_01, vector int16_t src_23,
47− vector int32_t res[4], const int shift, int16_t *coeffs)
46+static void transform4x4(vec_s16 src_01, vec_s16 src_23, vec_s32 res[4],
47+ const int shift, int16_t *coeffs)
4848 {
49− vector int16_t src_02, src_13;
50− vector int32_t zero = vec_splat_s32(0);
51− vector int32_t e0, o0, e1, o1;
52− vector int32_t add;
49+ vec_s16 src_02, src_13;
50+ vec_s32 zero = vec_splat_s32(0);
51+ vec_s32 e0, o0, e1, o1;
52+ vec_s32 add;
5353
5454 src_13 = vec_mergel(src_01, src_23);
5555 src_02 = vec_mergeh(src_01, src_23);
@@ -69,10 +69,10 @@ static void transform4x4(vector int16_t src_01, vector int16_t src_23, · 13 unmodified lines
6969 res[3] = vec_sub(e0, o0);
7070 }
7171
72−static void scale(vector int32_t res[4], vector int16_t res_packed[2], int shift)
72+static void scale(vec_s32 res[4], vec_s16 res_packed[2], int shift)
7373 {
7474 int i;
75− vector unsigned int v_shift = vec_splat_u32(shift);
75+ vec_u32 v_shift = vec_splat_u32(shift);
7676
7777 for (i = 0; i < 4; i++)
7878 res[i] = vec_sra(res[i], v_shift);
libavcodec/ppc/hevcdsp_template.c+3−3
@@ -22,9 +22,9 @@ static void FUNC(ff_hevc_idct_4x4, BIT_DEPTH)(int16_t *coeffs, int col_limit) · 21 unmodified lines
2222 {
2323 const int shift = 7;
2424 const int shift2 = 20 - BIT_DEPTH;
25− vector int16_t src_01, src_23;
26− vector int32_t res[4];
27− vector int16_t res_packed[2];
25+ vec_s16 src_01, src_23;
26+ vec_s32 res[4];
27+ vec_s16 res_packed[2];
2828
2929 src_01 = vec_ld(0, coeffs);
3030 src_23 = vec_ld(16, coeffs);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t