Mercurial > libavcodec.hg
changeset 1933:12408a3bf741 libavcodec
fixing alignment problems -> SSE2 support enabled again in libavcodec (from ffdshow / milan_cutka)
author | michael |
---|---|
date | Fri, 09 Apr 2004 16:32:49 +0000 |
parents | 7f437fe3fbc6 |
children | 0181b79f9a00 |
files | i386/fdct_mmx.c |
diffstat | 1 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/i386/fdct_mmx.c Fri Apr 09 16:29:00 2004 +0000 +++ b/i386/fdct_mmx.c Fri Apr 09 16:32:49 2004 +0000 @@ -50,7 +50,14 @@ static const long fdct_r_row[2] ATTR_ALIGN(8) = {RND_FRW_ROW, RND_FRW_ROW }; -static const long fdct_r_row_sse2[4] ATTR_ALIGN(16) = {RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW}; +struct +{ + const long fdct_r_row_sse2[4] ATTR_ALIGN(16); +} fdct_r_row_sse2 ATTR_ALIGN(16)= +{{ + RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW +}}; +//static const long fdct_r_row_sse2[4] ATTR_ALIGN(16) = {RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW}; static const int16_t tab_frw_01234567[] ATTR_ALIGN(8) = { // forward_dct coeff table 16384, 16384, -8867, -21407, @@ -126,7 +133,12 @@ 6270, 26722, 6270, -17855, }; -static const int16_t tab_frw_01234567_sse2[] ATTR_ALIGN(16) = { // forward_dct coeff table +struct +{ + const int16_t tab_frw_01234567_sse2[256] ATTR_ALIGN(16); +} tab_frw_01234567_sse2 ATTR_ALIGN(16) = +{{ +//static const int16_t tab_frw_01234567_sse2[] ATTR_ALIGN(16) = { // forward_dct coeff table #define TABLE_SSE2 C4, C4, C1, C3, -C6, -C2, -C1, -C5, \ C4, C4, C5, C7, C2, C6, C3, -C7, \ -C4, C4, C7, C3, C6, -C2, C7, -C5, \ @@ -252,7 +264,8 @@ #define C6 12299 #define C7 6270 TABLE_SSE2 -}; +}}; + static always_inline void fdct_col(const int16_t *in, int16_t *out, int offset) { @@ -392,7 +405,7 @@ "FDCT_ROW_SSE2_H2 80 192 \n\t" "FDCT_ROW_SSE2 80 \n\t" : - : "r" (in), "r" (tab_frw_01234567_sse2), "r" (fdct_r_row_sse2), "i" (SHIFT_FRW_ROW), "r" (out) + : "r" (in), "r" (tab_frw_01234567_sse2.tab_frw_01234567_sse2), "r" (fdct_r_row_sse2.fdct_r_row_sse2), "i" (SHIFT_FRW_ROW), "r" (out) ); }