shithub: openh264

Download patch

ref: f30047646823705cac9e3d06ab645392fa05c230
parent: 12b6244129fd11da4a73c212f35544a1d92b6aa2
author: Martin Storsjö <[email protected]>
date: Sat Jun 28 20:36:02 EDT 2014

Use the ALIGNED_DECLARE macro instead of __align16

--- a/codec/decoder/core/inc/wels_common_basis.h
+++ b/codec/decoder/core/inc/wels_common_basis.h
@@ -47,7 +47,7 @@
 extern const uint8_t g_kuiScan8[24];
 extern const uint8_t g_kuiLumaDcZigzagScan[16];
 extern const uint8_t g_kuiChromaDcScan[4];
-extern __align16 (const uint16_t, g_kuiDequantCoeff[52][8]);
+extern ALIGNED_DECLARE (const uint16_t, g_kuiDequantCoeff[52][8], 16);
 /* Profile IDC */
 typedef uint8_t		ProfileIdc;
 enum {
--- a/codec/decoder/core/src/decoder_data_tables.cpp
+++ b/codec/decoder/core/src/decoder_data_tables.cpp
@@ -155,7 +155,7 @@
   0, 16, 32, 48
 };
 
-__align16 (const uint16_t, g_kuiDequantCoeff[52][8]) = {
+ALIGNED_DECLARE (const uint16_t, g_kuiDequantCoeff[52][8], 16) = {
   /* 0*/{   10,   13,   10,   13,   13,   16,   13,   16 },	/* 1*/{   11,   14,   11,   14,   14,   18,   14,   18 },
   /* 2*/{   13,   16,   13,   16,   16,   20,   16,   20 },	/* 3*/{   14,   18,   14,   18,   18,   23,   18,   23 },
   /* 4*/{   16,   20,   16,   20,   20,   25,   20,   25 },	/* 5*/{   18,   23,   18,   23,   23,   29,   23,   29 },
--- a/codec/encoder/core/inc/encode_mb_aux.h
+++ b/codec/encoder/core/inc/encode_mb_aux.h
@@ -126,8 +126,8 @@
 }
 #endif//__cplusplus
 
-__align16 (extern const int16_t, g_kiQuantInterFF[58][8]);
+ALIGNED_DECLARE (extern const int16_t, g_kiQuantInterFF[58][8], 16);
 #define g_iQuantIntraFF (g_kiQuantInterFF +6 )
-__align16 (extern const int16_t, g_kiQuantMF[52][8]) ;
+ALIGNED_DECLARE (extern const int16_t, g_kiQuantMF[52][8], 16);
 }
 #endif//ENCODE_MB_AUX_H
--- a/codec/encoder/core/src/encode_mb_aux.cpp
+++ b/codec/encoder/core/src/encode_mb_aux.cpp
@@ -36,7 +36,7 @@
 #include "cpu_core.h"
 namespace WelsSVCEnc {
 
-__align16 (const int16_t, g_kiQuantInterFF[58][8]) = {
+ALIGNED_DECLARE (const int16_t, g_kiQuantInterFF[58][8], 16) = {
   /* 0*/ {   0,   1,   0,   1,   1,   1,   1,   1 },
   /* 1*/ {   0,   1,   0,   1,   1,   1,   1,   1 },
   /* 2*/ {   1,   1,   1,   1,   1,   1,   1,   1 },
@@ -100,7 +100,7 @@
 
 
 
-__align16 (const int16_t, g_kiQuantMF[52][8]) = {
+ALIGNED_DECLARE (const int16_t, g_kiQuantMF[52][8], 16) = {
   /* 0*/	{26214, 16132, 26214, 16132, 16132, 10486, 16132, 10486 },
   /* 1*/	{23832, 14980, 23832, 14980, 14980,  9320, 14980,  9320 },
   /* 2*/	{20164, 13108, 20164, 13108, 13108,  8388, 13108,  8388 },
--- a/codec/encoder/core/src/encoder_data_tables.cpp
+++ b/codec/encoder/core/src/encoder_data_tables.cpp
@@ -132,7 +132,7 @@
   { NON_VCL,	NON_VCL }	// 31: NAL_UNIT_UNSPEC_31
 };
 
-__align16 (const uint16_t, g_kuiDequantCoeff[52][8]) = {
+ALIGNED_DECLARE (const uint16_t, g_kuiDequantCoeff[52][8], 16) = {
   /* 0*/{   10,   13,   10,   13,   13,   16,   13,   16 },	/* 1*/{   11,   14,   11,   14,   14,   18,   14,   18 },
   /* 2*/{   13,   16,   13,   16,   16,   20,   16,   20 },	/* 3*/{   14,   18,   14,   18,   18,   23,   18,   23 },
   /* 4*/{   16,   20,   16,   20,   20,   25,   20,   25 },	/* 5*/{   18,   23,   18,   23,   23,   29,   23,   29 },
--- a/codec/encoder/core/src/svc_base_layer_md.cpp
+++ b/codec/encoder/core/src/svc_base_layer_md.cpp
@@ -239,7 +239,7 @@
   {	15,	15,	15,	7,	15,	15,	15,	7,	15,	15,	15,	7,	15,	7,	15,	7},
 };
 
-__align16 (const int8_t, g_kiMapModeI4x4[14]) = {
+ALIGNED_DECLARE (const int8_t, g_kiMapModeI4x4[14], 16) = {
   0, 1, 2, 3, 4, 5, 6, 7, 8, 2, 2, 2, 3, 7
 };
 
--- a/test/encoder/EncUT_EncoderMb.cpp
+++ b/test/encoder/EncUT_EncoderMb.cpp
@@ -6,7 +6,7 @@
 using namespace WelsSVCEnc;
 #include "encode_mb_aux.h"
 
-__align16 (const int16_t, g_kiQuantInterFFCompare[104][8]) = {
+ALIGNED_DECLARE (const int16_t, g_kiQuantInterFFCompare[104][8], 16) = {
   /* 0*/	{   0,     1,     0,     1,     1,     1,     1,     1 },
   /* 1*/	{   0,     1,     0,     1,     1,     1,     1,     1 },
   /* 2*/	{   1,     1,     1,     1,     1,     1,     1,     1 },