aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ppc
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-01-20 01:02:29 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2013-01-22 18:32:56 -0800
commit88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f (patch)
tree86f541af3a6bc6b60ec737d8011435e105a77cd9 /libavcodec/ppc
parent2e4bb99f4df7052b3e147ee898fcb4013a34d904 (diff)
downloadffmpeg-88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f.tar.gz
Drop DCTELEM typedef
It does not help as an abstraction and adds dsputil dependencies. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/ppc')
-rw-r--r--libavcodec/ppc/dsputil_altivec.c6
-rw-r--r--libavcodec/ppc/dsputil_ppc.c14
-rw-r--r--libavcodec/ppc/h264_altivec.c18
-rw-r--r--libavcodec/ppc/mpegvideo_altivec.c2
-rw-r--r--libavcodec/ppc/vc1dsp_altivec.c4
-rw-r--r--libavcodec/ppc/vp3dsp_altivec.c4
6 files changed, 24 insertions, 24 deletions
diff --git a/libavcodec/ppc/dsputil_altivec.c b/libavcodec/ppc/dsputil_altivec.c
index 1007fbd2b7..4f7e12a7b2 100644
--- a/libavcodec/ppc/dsputil_altivec.c
+++ b/libavcodec/ppc/dsputil_altivec.c
@@ -476,7 +476,7 @@ static int pix_sum_altivec(uint8_t * pix, int line_size)
return s;
}
-static void get_pixels_altivec(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
+static void get_pixels_altivec(int16_t *restrict block, const uint8_t *pixels, int line_size)
{
int i;
vector unsigned char perm = vec_lvsl(0, pixels);
@@ -502,7 +502,7 @@ static void get_pixels_altivec(DCTELEM *restrict block, const uint8_t *pixels, i
}
}
-static void diff_pixels_altivec(DCTELEM *restrict block, const uint8_t *s1,
+static void diff_pixels_altivec(int16_t *restrict block, const uint8_t *s1,
const uint8_t *s2, int stride)
{
int i;
@@ -576,7 +576,7 @@ static void diff_pixels_altivec(DCTELEM *restrict block, const uint8_t *s1,
}
-static void clear_block_altivec(DCTELEM *block) {
+static void clear_block_altivec(int16_t *block) {
LOAD_ZERO;
vec_st(zero_s16v, 0, block);
vec_st(zero_s16v, 16, block);
diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c
index 24dbb8c10e..b73778ed6b 100644
--- a/libavcodec/ppc/dsputil_ppc.c
+++ b/libavcodec/ppc/dsputil_ppc.c
@@ -47,7 +47,7 @@ distinguish, and use dcbz (32 bytes) or dcbzl (one cache line) as required.
see <http://developer.apple.com/technotes/tn/tn2087.html>
and <http://developer.apple.com/technotes/tn/tn2086.html>
*/
-static void clear_blocks_dcbz32_ppc(DCTELEM *blocks)
+static void clear_blocks_dcbz32_ppc(int16_t *blocks)
{
register int misal = ((unsigned long)blocks & 0x00000010);
register int i = 0;
@@ -58,7 +58,7 @@ static void clear_blocks_dcbz32_ppc(DCTELEM *blocks)
((unsigned long*)blocks)[3] = 0L;
i += 16;
}
- for ( ; i < sizeof(DCTELEM)*6*64-31 ; i += 32) {
+ for ( ; i < sizeof(int16_t)*6*64-31 ; i += 32) {
__asm__ volatile("dcbz %0,%1" : : "b" (blocks), "r" (i) : "memory");
}
if (misal) {
@@ -73,7 +73,7 @@ static void clear_blocks_dcbz32_ppc(DCTELEM *blocks)
/* same as above, when dcbzl clear a whole 128B cache line
i.e. the PPC970 aka G5 */
#if HAVE_DCBZL
-static void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
+static void clear_blocks_dcbz128_ppc(int16_t *blocks)
{
register int misal = ((unsigned long)blocks & 0x0000007f);
register int i = 0;
@@ -81,17 +81,17 @@ static void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
// we could probably also optimize this case,
// but there's not much point as the machines
// aren't available yet (2003-06-26)
- memset(blocks, 0, sizeof(DCTELEM)*6*64);
+ memset(blocks, 0, sizeof(int16_t)*6*64);
}
else
- for ( ; i < sizeof(DCTELEM)*6*64 ; i += 128) {
+ for ( ; i < sizeof(int16_t)*6*64 ; i += 128) {
__asm__ volatile("dcbzl %0,%1" : : "b" (blocks), "r" (i) : "memory");
}
}
#else
-static void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
+static void clear_blocks_dcbz128_ppc(int16_t *blocks)
{
- memset(blocks, 0, sizeof(DCTELEM)*6*64);
+ memset(blocks, 0, sizeof(int16_t)*6*64);
}
#endif
diff --git a/libavcodec/ppc/h264_altivec.c b/libavcodec/ppc/h264_altivec.c
index 73e2adb776..36d39d4698 100644
--- a/libavcodec/ppc/h264_altivec.c
+++ b/libavcodec/ppc/h264_altivec.c
@@ -315,7 +315,7 @@ H264_MC(avg_, 16, altivec)
va_u32 = vec_splat((vec_u32)va_u8, 0); \
vec_ste(va_u32, element, (uint32_t*)dst);
-static void ff_h264_idct_add_altivec(uint8_t *dst, DCTELEM *block, int stride)
+static void ff_h264_idct_add_altivec(uint8_t *dst, int16_t *block, int stride)
{
vec_s16 va0, va1, va2, va3;
vec_s16 vz0, vz1, vz2, vz3;
@@ -429,7 +429,7 @@ static void ff_h264_idct_add_altivec(uint8_t *dst, DCTELEM *block, int stride)
vec_st( hv, 0, dest ); \
}
-static void ff_h264_idct8_add_altivec( uint8_t *dst, DCTELEM *dct, int stride ) {
+static void ff_h264_idct8_add_altivec( uint8_t *dst, int16_t *dct, int stride ) {
vec_s16 s0, s1, s2, s3, s4, s5, s6, s7;
vec_s16 d0, d1, d2, d3, d4, d5, d6, d7;
vec_s16 idct0, idct1, idct2, idct3, idct4, idct5, idct6, idct7;
@@ -473,7 +473,7 @@ static void ff_h264_idct8_add_altivec( uint8_t *dst, DCTELEM *dct, int stride )
ALTIVEC_STORE_SUM_CLIP(&dst[7*stride], idct7, perm_ldv, perm_stv, sel);
}
-static av_always_inline void h264_idct_dc_add_internal(uint8_t *dst, DCTELEM *block, int stride, int size)
+static av_always_inline void h264_idct_dc_add_internal(uint8_t *dst, int16_t *block, int stride, int size)
{
vec_s16 dc16;
vec_u8 dcplus, dcminus, v0, v1, v2, v3, aligner;
@@ -518,17 +518,17 @@ static av_always_inline void h264_idct_dc_add_internal(uint8_t *dst, DCTELEM *bl
}
}
-static void h264_idct_dc_add_altivec(uint8_t *dst, DCTELEM *block, int stride)
+static void h264_idct_dc_add_altivec(uint8_t *dst, int16_t *block, int stride)
{
h264_idct_dc_add_internal(dst, block, stride, 4);
}
-static void ff_h264_idct8_dc_add_altivec(uint8_t *dst, DCTELEM *block, int stride)
+static void ff_h264_idct8_dc_add_altivec(uint8_t *dst, int16_t *block, int stride)
{
h264_idct_dc_add_internal(dst, block, stride, 8);
}
-static void ff_h264_idct_add16_altivec(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[15*8]){
+static void ff_h264_idct_add16_altivec(uint8_t *dst, const int *block_offset, int16_t *block, int stride, const uint8_t nnzc[15*8]){
int i;
for(i=0; i<16; i++){
int nnz = nnzc[ scan8[i] ];
@@ -539,7 +539,7 @@ static void ff_h264_idct_add16_altivec(uint8_t *dst, const int *block_offset, DC
}
}
-static void ff_h264_idct_add16intra_altivec(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[15*8]){
+static void ff_h264_idct_add16intra_altivec(uint8_t *dst, const int *block_offset, int16_t *block, int stride, const uint8_t nnzc[15*8]){
int i;
for(i=0; i<16; i++){
if(nnzc[ scan8[i] ]) ff_h264_idct_add_altivec(dst + block_offset[i], block + i*16, stride);
@@ -547,7 +547,7 @@ static void ff_h264_idct_add16intra_altivec(uint8_t *dst, const int *block_offse
}
}
-static void ff_h264_idct8_add4_altivec(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[15*8]){
+static void ff_h264_idct8_add4_altivec(uint8_t *dst, const int *block_offset, int16_t *block, int stride, const uint8_t nnzc[15*8]){
int i;
for(i=0; i<16; i+=4){
int nnz = nnzc[ scan8[i] ];
@@ -558,7 +558,7 @@ static void ff_h264_idct8_add4_altivec(uint8_t *dst, const int *block_offset, DC
}
}
-static void ff_h264_idct_add8_altivec(uint8_t **dest, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[15*8]){
+static void ff_h264_idct_add8_altivec(uint8_t **dest, const int *block_offset, int16_t *block, int stride, const uint8_t nnzc[15*8]){
int i, j;
for (j = 1; j < 3; j++) {
for(i = j * 16; i < j * 16 + 4; i++){
diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c
index df111e997c..9aa0ae7449 100644
--- a/libavcodec/ppc/mpegvideo_altivec.c
+++ b/libavcodec/ppc/mpegvideo_altivec.c
@@ -35,7 +35,7 @@
/* AltiVec version of dct_unquantize_h263
this code assumes `block' is 16 bytes-aligned */
static void dct_unquantize_h263_altivec(MpegEncContext *s,
- DCTELEM *block, int n, int qscale)
+ int16_t *block, int n, int qscale)
{
int i, level, qmul, qadd;
int nCoeffs;
diff --git a/libavcodec/ppc/vc1dsp_altivec.c b/libavcodec/ppc/vc1dsp_altivec.c
index 6c110dba47..b081989c68 100644
--- a/libavcodec/ppc/vc1dsp_altivec.c
+++ b/libavcodec/ppc/vc1dsp_altivec.c
@@ -129,7 +129,7 @@ do { \
/** Do inverse transform on 8x8 block
*/
-static void vc1_inv_trans_8x8_altivec(DCTELEM block[64])
+static void vc1_inv_trans_8x8_altivec(int16_t block[64])
{
vector signed short src0, src1, src2, src3, src4, src5, src6, src7;
vector signed int s0, s1, s2, s3, s4, s5, s6, s7;
@@ -224,7 +224,7 @@ static void vc1_inv_trans_8x8_altivec(DCTELEM block[64])
/** Do inverse transform on 8x4 part of block
*/
-static void vc1_inv_trans_8x4_altivec(uint8_t *dest, int stride, DCTELEM *block)
+static void vc1_inv_trans_8x4_altivec(uint8_t *dest, int stride, int16_t *block)
{
vector signed short src0, src1, src2, src3, src4, src5, src6, src7;
vector signed int s0, s1, s2, s3, s4, s5, s6, s7;
diff --git a/libavcodec/ppc/vp3dsp_altivec.c b/libavcodec/ppc/vp3dsp_altivec.c
index 24ad09f03b..6bf5f0e033 100644
--- a/libavcodec/ppc/vp3dsp_altivec.c
+++ b/libavcodec/ppc/vp3dsp_altivec.c
@@ -116,7 +116,7 @@ static inline vec_s16 M16(vec_s16 a, vec_s16 C)
#define ADD8(a) vec_add(a, eight)
#define SHIFT4(a) vec_sra(a, four)
-static void vp3_idct_put_altivec(uint8_t *dst, int stride, DCTELEM block[64])
+static void vp3_idct_put_altivec(uint8_t *dst, int stride, int16_t block[64])
{
vec_u8 t;
IDCT_START
@@ -145,7 +145,7 @@ static void vp3_idct_put_altivec(uint8_t *dst, int stride, DCTELEM block[64])
memset(block, 0, sizeof(*block) * 64);
}
-static void vp3_idct_add_altivec(uint8_t *dst, int stride, DCTELEM block[64])
+static void vp3_idct_add_altivec(uint8_t *dst, int stride, int16_t block[64])
{
LOAD_ZERO;
vec_u8 t, vdst;