[MPlayer-cvslog] r36822 - in trunk/libmpcodecs: vf_fspp.c vf_pp7.c vf_uspp.c

reimar subversion at mplayerhq.hu
Sun Feb 9 23:19:07 CET 2014


Author: reimar
Date: Sun Feb  9 23:19:07 2014
New Revision: 36822

Log:
Use DECLARE_ALIGNED helper macros.

Patch by Matt Oliver [protogonoi gmail.com].

Modified:
   trunk/libmpcodecs/vf_fspp.c
   trunk/libmpcodecs/vf_pp7.c
   trunk/libmpcodecs/vf_uspp.c

Modified: trunk/libmpcodecs/vf_fspp.c
==============================================================================
--- trunk/libmpcodecs/vf_fspp.c	Sun Feb  9 18:56:11 2014	(r36821)
+++ trunk/libmpcodecs/vf_fspp.c	Sun Feb  9 23:19:07 2014	(r36822)
@@ -75,7 +75,7 @@ static const short custom_threshold[64]=
   20,  27,  26,  23,  20,  15,  11,   5
 };
 
-static const uint8_t  __attribute__((aligned(32))) dither[8][8]={
+DECLARE_ASM_CONST(32, uint8_t, dither)[8][8]={
     {  0,  48,  12,  60,   3,  51,  15,  63, },
     { 32,  16,  44,  28,  35,  19,  47,  31, },
     {  8,  56,   4,  52,  11,  59,   7,  55, },
@@ -416,7 +416,7 @@ static void filter(struct vf_priv_s *p, 
     const int stride= is_luma ? p->temp_stride : (width+16);//((width+16+15)&(~15))
     const int step=6-p->log2_count;
     const int qps= 3 + is_luma;
-    int32_t __attribute__((aligned(32))) block_align[4*8*BLOCKSZ+ 4*8*BLOCKSZ];
+    DECLARE_ALIGNED(32, int32_t, block_align)[4*8*BLOCKSZ+ 4*8*BLOCKSZ];
     int16_t *block= (int16_t *)block_align;
     int16_t *block3=(int16_t *)(block_align+4*8*BLOCKSZ);
 
@@ -873,7 +873,7 @@ static void column_fidct_c(int16_t* thr_
 
 static void column_fidct_mmx(int16_t* thr_adr,  int16_t *data,  int16_t *output,  int cnt)
 {
-    uint64_t __attribute__((aligned(8))) temps[4];
+    DECLARE_ALIGNED(8, uint64_t, temps)[4];
     __asm__ volatile(
         ASMALIGN(4)
         "1:                   \n\t"
@@ -1674,7 +1674,7 @@ static void row_idct_c(int16_t* workspac
 static void row_idct_mmx (int16_t* workspace,
                           int16_t* output_adr,  int output_stride,  int cnt)
 {
-    uint64_t __attribute__((aligned(8))) temps[4];
+    DECLARE_ALIGNED(8, uint64_t, temps)[4];
     __asm__ volatile(
         "lea (%%"REG_a",%%"REG_a",2), %%"REG_d"    \n\t"
         "1:                     \n\t"
@@ -1940,7 +1940,7 @@ static void row_fdct_c(int16_t *data, co
 
 static void row_fdct_mmx(int16_t *data,  const uint8_t *pixels,  int line_size,  int cnt)
 {
-    uint64_t __attribute__((aligned(8))) temps[4];
+    DECLARE_ALIGNED(8, uint64_t, temps)[4];
     __asm__ volatile(
         "lea (%%"REG_a",%%"REG_a",2), %%"REG_d"    \n\t"
         "6:                     \n\t"

Modified: trunk/libmpcodecs/vf_pp7.c
==============================================================================
--- trunk/libmpcodecs/vf_pp7.c	Sun Feb  9 18:56:11 2014	(r36821)
+++ trunk/libmpcodecs/vf_pp7.c	Sun Feb  9 23:19:07 2014	(r36822)
@@ -45,7 +45,7 @@
 #define XMAX(a,b) ((a) > (b) ? (a) : (b))
 
 //===========================================================================//
-static const uint8_t  __attribute__((aligned(8))) dither[8][8]={
+DECLARE_ASM_CONST(8, uint8_t, dither)[8][8]={
 {  0,  48,  12,  60,   3,  51,  15,  63, },
 { 32,  16,  44,  28,  35,  19,  47,  31, },
 {  8,  56,   4,  52,  11,  59,   7,  55, },

Modified: trunk/libmpcodecs/vf_uspp.c
==============================================================================
--- trunk/libmpcodecs/vf_uspp.c	Sun Feb  9 18:56:11 2014	(r36821)
+++ trunk/libmpcodecs/vf_uspp.c	Sun Feb  9 23:19:07 2014	(r36822)
@@ -44,7 +44,7 @@
 #define BLOCK 16
 
 //===========================================================================//
-static const uint8_t  __attribute__((aligned(8))) dither[8][8]={
+DECLARE_ASM_CONST(8, uint8_t, dither)[8][8]={
 {  0*4,  48*4,  12*4,  60*4,   3*4,  51*4,  15*4,  63*4, },
 { 32*4,  16*4,  44*4,  28*4,  35*4,  19*4,  47*4,  31*4, },
 {  8*4,  56*4,   4*4,  52*4,  11*4,  59*4,   7*4,  55*4, },


More information about the MPlayer-cvslog mailing list