Mercurial > libpostproc.hg
comparison postprocess_template.c @ 45:0e28dba3f9e7 libpostproc
Use DECLARE_ALIGNED for alignment in libpostprocess
author | reimar |
---|---|
date | Thu, 17 May 2007 09:30:38 +0000 |
parents | 00ab07579dc3 |
children | 72675332ed82 |
comparison
equal
deleted
inserted
replaced
44:2ed02a33f02a | 45:0e28dba3f9e7 |
---|---|
3346 * Filters array of bytes (Y or U or V values) | 3346 * Filters array of bytes (Y or U or V values) |
3347 */ | 3347 */ |
3348 static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, | 3348 static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, |
3349 QP_STORE_T QPs[], int QPStride, int isColor, PPContext *c2) | 3349 QP_STORE_T QPs[], int QPStride, int isColor, PPContext *c2) |
3350 { | 3350 { |
3351 PPContext __attribute__((aligned(8))) c= *c2; //copy to stack for faster access | 3351 DECLARE_ALIGNED(8, PPContext, c)= *c2; //copy to stack for faster access |
3352 int x,y; | 3352 int x,y; |
3353 #ifdef COMPILE_TIME_MODE | 3353 #ifdef COMPILE_TIME_MODE |
3354 const int mode= COMPILE_TIME_MODE; | 3354 const int mode= COMPILE_TIME_MODE; |
3355 #else | 3355 #else |
3356 const int mode= isColor ? c.ppMode.chromMode : c.ppMode.lumMode; | 3356 const int mode= isColor ? c.ppMode.chromMode : c.ppMode.lumMode; |
3715 if(mode & H_X1_FILTER) | 3715 if(mode & H_X1_FILTER) |
3716 horizX1Filter(dstBlock-4, stride, QP); | 3716 horizX1Filter(dstBlock-4, stride, QP); |
3717 else if(mode & H_DEBLOCK) | 3717 else if(mode & H_DEBLOCK) |
3718 { | 3718 { |
3719 #ifdef HAVE_ALTIVEC | 3719 #ifdef HAVE_ALTIVEC |
3720 unsigned char __attribute__ ((aligned(16))) tempBlock[272]; | 3720 DECLARE_ALIGNED(16, unsigned char, tempBlock[272]); |
3721 transpose_16x8_char_toPackedAlign_altivec(tempBlock, dstBlock - (4 + 1), stride); | 3721 transpose_16x8_char_toPackedAlign_altivec(tempBlock, dstBlock - (4 + 1), stride); |
3722 | 3722 |
3723 const int t=vertClassify_altivec(tempBlock-48, 16, &c); | 3723 const int t=vertClassify_altivec(tempBlock-48, 16, &c); |
3724 if(t==1) { | 3724 if(t==1) { |
3725 doVertLowPass_altivec(tempBlock-48, 16, &c); | 3725 doVertLowPass_altivec(tempBlock-48, 16, &c); |