History

Merge commit '39929e55eb13eeb8dfbe1bc99301fecf6b8942dd'

* commit '39929e55eb13eeb8dfbe1bc99301fecf6b8942dd': ppc: hevcdsp: Use shorthands for vector types

Clément Bœsch committed 9 years ago

Commit 3a033bc2 parents 40cc925 39929e52 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
@@ -32,7 +32,7 @@ · 31 unmodified lines
32#include "libavcodec/hevcdsp.h"32#include "libavcodec/hevcdsp.h"
33 33
34#if HAVE_ALTIVEC34#if HAVE_ALTIVEC
35static const vector int16_t trans4[4] = {35static const vec_s16 trans4[4] = {
36 { 64, 64, 64, 64, 64, 64, 64, 64 },36 { 64, 64, 64, 64, 64, 64, 64, 64 },
37 { 83, 36, 83, 36, 83, 36, 83, 36 },37 { 83, 36, 83, 36, 83, 36, 83, 36 },
38 { 64, -64, 64, -64, 64, -64, 64, -64 },38 { 64, -64, 64, -64, 64, -64, 64, -64 },
@@ -44,13 +44,13 @@ static const vec_u8 mask[2] = { · 5 unmodified lines
44 { 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D, 0x06, 0x07, 0x0E, 0x0F, 0x16, 0x17, 0x1E, 0x1F },44 { 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D, 0x06, 0x07, 0x0E, 0x0F, 0x16, 0x17, 0x1E, 0x1F },
45};45};
46 46
47static void transform4x4(vector int16_t src_01, vector int16_t src_23,47static void transform4x4(vec_s16 src_01, vec_s16 src_23, vec_s32 res[4],
48 vector int32_t res[4], const int shift, int16_t *coeffs)48 const int shift, int16_t *coeffs)
49{49{
50 vector int16_t src_02, src_13;50 vec_s16 src_02, src_13;
51 vector int32_t zero = vec_splat_s32(0);51 vec_s32 zero = vec_splat_s32(0);
52 vector int32_t e0, o0, e1, o1;52 vec_s32 e0, o0, e1, o1;
53 vector int32_t add;53 vec_s32 add;
54 54
55 src_13 = vec_mergel(src_01, src_23);55 src_13 = vec_mergel(src_01, src_23);
56 src_02 = vec_mergeh(src_01, src_23);56 src_02 = vec_mergeh(src_01, src_23);
@@ -70,10 +70,10 @@ static void transform4x4(vector int16_t src_01, vector int16_t src_23, · 13 unmodified lines
70 res[3] = vec_sub(e0, o0);70 res[3] = vec_sub(e0, o0);
71}71}
72 72
73static void scale(vector int32_t res[4], vector int16_t res_packed[2], int shift)73static void scale(vec_s32 res[4], vec_s16 res_packed[2], int shift)
74{74{
75 int i;75 int i;
76 vector unsigned int v_shift = vec_splat_u32(shift);76 vec_u32 v_shift = vec_splat_u32(shift);
77 77
78 for (i = 0; i < 4; i++)78 for (i = 0; i < 4; i++)
79 res[i] = vec_sra(res[i], v_shift);79 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
22{22{
23 const int shift = 7;23 const int shift = 7;
24 const int shift2 = 20 - BIT_DEPTH;24 const int shift2 = 20 - BIT_DEPTH;
25 vector int16_t src_01, src_23;25 vec_s16 src_01, src_23;
26 vector int32_t res[4];26 vec_s32 res[4];
27 vector int16_t res_packed[2];27 vec_s16 res_packed[2];
28 28
29 src_01 = vec_ld(0, coeffs);29 src_01 = vec_ld(0, coeffs);
30 src_23 = vec_ld(16, coeffs);30 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