Mercurial > libavcodec.hg
comparison ppc/gmc_altivec.c @ 5019:41cabe79ba25 libavcodec
use macro Use DECLARE_ALIGNED_16 to align stack-allocated variables
instead of compiler-dependent __attribute__((aligned(16)))
Origiginal thread:
Date: May 17, 2007 12:30 AM
Subject: [PATCH] Use DECLARE_ALIGNED_16 in libavcodec/ppc/
author | gpoirier |
---|---|
date | Thu, 17 May 2007 14:14:53 +0000 |
parents | d5ba514e3f4a |
children | 55ed6dc5d476 |
comparison
equal
deleted
inserted
replaced
5018:06adf4be28f4 | 5019:41cabe79ba25 |
---|---|
32 */ | 32 */ |
33 #define GMC1_PERF_COND (h==8) | 33 #define GMC1_PERF_COND (h==8) |
34 void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder) | 34 void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder) |
35 { | 35 { |
36 POWERPC_PERF_DECLARE(altivec_gmc1_num, GMC1_PERF_COND); | 36 POWERPC_PERF_DECLARE(altivec_gmc1_num, GMC1_PERF_COND); |
37 const unsigned short __attribute__ ((aligned(16))) rounder_a[8] = | 37 const DECLARE_ALIGNED_16(unsigned short, rounder_a[8]) = |
38 {rounder, rounder, rounder, rounder, | 38 {rounder, rounder, rounder, rounder, |
39 rounder, rounder, rounder, rounder}; | 39 rounder, rounder, rounder, rounder}; |
40 const unsigned short __attribute__ ((aligned(16))) ABCD[8] = | 40 const DECLARE_ALIGNED_16(unsigned short, ABCD[8]) = |
41 { | 41 { |
42 (16-x16)*(16-y16), /* A */ | 42 (16-x16)*(16-y16), /* A */ |
43 ( x16)*(16-y16), /* B */ | 43 ( x16)*(16-y16), /* B */ |
44 (16-x16)*( y16), /* C */ | 44 (16-x16)*( y16), /* C */ |
45 ( x16)*( y16), /* D */ | 45 ( x16)*( y16), /* D */ |