[x264-devel] commit: more alignment (Loren Merritt )
git version control
git at videolan.org
Sat Mar 22 11:33:57 CET 2008
x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Sat Mar 22 03:14:33 2008 -0600| [170f57bf8c186427c3e160afb3db6c71e1aafabd]
more alignment
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=170f57bf8c186427c3e160afb3db6c71e1aafabd
---
encoder/analyse.c | 7 ++++---
encoder/me.c | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/encoder/analyse.c b/encoder/analyse.c
index 0264621..1217e65 100644
--- a/encoder/analyse.c
+++ b/encoder/analyse.c
@@ -1443,7 +1443,8 @@ static void x264_mb_analyse_inter_direct( x264_t *h, x264_mb_analysis_t *a )
static void x264_mb_analyse_inter_b16x16( x264_t *h, x264_mb_analysis_t *a )
{
- uint8_t pix1[16*16], pix2[16*16];
+ DECLARE_ALIGNED( uint8_t, pix1[16*16], 16 );
+ DECLARE_ALIGNED( uint8_t, pix2[16*16], 16 );
uint8_t *src2;
int stride2 = 16;
int weight;
@@ -1654,7 +1655,7 @@ static void x264_mb_analyse_inter_b8x8( x264_t *h, x264_mb_analysis_t *a )
uint8_t **p_fref[2] =
{ h->mb.pic.p_fref[0][a->l0.i_ref],
h->mb.pic.p_fref[1][a->l1.i_ref] };
- uint8_t pix[2][8*8];
+ DECLARE_ALIGNED( uint8_t, pix[2][8*8], 8 );
int i, l;
/* XXX Needed for x264_mb_predict_mv */
@@ -1787,7 +1788,7 @@ static void x264_mb_analyse_inter_b8x16( x264_t *h, x264_mb_analysis_t *a )
uint8_t **p_fref[2] =
{ h->mb.pic.p_fref[0][a->l0.i_ref],
h->mb.pic.p_fref[1][a->l1.i_ref] };
- uint8_t pix[2][8*16];
+ DECLARE_ALIGNED( uint8_t, pix[2][8*16], 8 );
DECLARE_ALIGNED( int, mvc[2][2], 8 );
int i, l;
diff --git a/encoder/me.c b/encoder/me.c
index 4242fe8..32d6044 100644
--- a/encoder/me.c
+++ b/encoder/me.c
@@ -461,8 +461,8 @@ me_hex2:
/* successive elimination by comparing DC before a full SAD,
* because sum(abs(diff)) >= abs(diff(sum)). */
const int stride = m->i_stride[0];
- static uint8_t zero[16*16] = {0,};
uint16_t *sums_base = m->integral;
+ DECLARE_ALIGNED( static uint8_t, zero[16*16], 16 ) = {0,};
DECLARE_ALIGNED( int, enc_dc[4], 16 );
int sad_size = i_pixel <= PIXEL_8x8 ? PIXEL_8x8 : PIXEL_4x4;
int delta = x264_pixel_size[sad_size].w;
More information about the x264-devel
mailing list