[FFmpeg-cvslog] x86: cavs: Remove an unneeded scratch buffer
Michael Niedermayer
git at videolan.org
Mon Jun 1 13:42:26 CEST 2015
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Thu May 28 12:38:35 2015 +0200| [60852532ba0971c4d253b755a3596e0a004a8bd9] | committer: Reinhard Tartler
x86: cavs: Remove an unneeded scratch buffer
Simplifies the code and makes it build on certain compilers
running out of registers on x86.
CC: libav-stable at libav.org
Reported-By: mudler
(cherry picked from commit e4610300de6869bd6b3b00e76cfeabb6d7653dcd)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit 4dc0fbb13c33b4e5bdb766652f4daf900ccc952f)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=60852532ba0971c4d253b755a3596e0a004a8bd9
---
libavcodec/x86/cavsdsp.c | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c
index bc9cbf7..fef299c 100644
--- a/libavcodec/x86/cavsdsp.c
+++ b/libavcodec/x86/cavsdsp.c
@@ -140,9 +140,7 @@ static void cavs_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
DECLARE_ALIGNED(8, int16_t, b2)[64];
for(i=0; i<2; i++){
- DECLARE_ALIGNED(8, uint64_t, tmp);
-
- cavs_idct8_1d(block+4*i, ff_pw_4.a);
+ cavs_idct8_1d(block + 4 * i, ff_pw_4.a);
__asm__ volatile(
"psraw $3, %%mm7 \n\t"
@@ -153,20 +151,20 @@ static void cavs_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
"psraw $3, %%mm2 \n\t"
"psraw $3, %%mm1 \n\t"
"psraw $3, %%mm0 \n\t"
- "movq %%mm7, %0 \n\t"
+ "movq %%mm7, (%0) \n\t"
TRANSPOSE4( %%mm0, %%mm2, %%mm4, %%mm6, %%mm7 )
- "movq %%mm0, 8(%1) \n\t"
- "movq %%mm6, 24(%1) \n\t"
- "movq %%mm7, 40(%1) \n\t"
- "movq %%mm4, 56(%1) \n\t"
- "movq %0, %%mm7 \n\t"
+ "movq %%mm0, 8(%0) \n\t"
+ "movq %%mm6, 24(%0) \n\t"
+ "movq %%mm7, 40(%0) \n\t"
+ "movq %%mm4, 56(%0) \n\t"
+ "movq (%0), %%mm7 \n\t"
TRANSPOSE4( %%mm7, %%mm5, %%mm3, %%mm1, %%mm0 )
- "movq %%mm7, (%1) \n\t"
- "movq %%mm1, 16(%1) \n\t"
- "movq %%mm0, 32(%1) \n\t"
- "movq %%mm3, 48(%1) \n\t"
- : "=m"(tmp)
- : "r"(b2+32*i)
+ "movq %%mm7, (%0) \n\t"
+ "movq %%mm1, 16(%0) \n\t"
+ "movq %%mm0, 32(%0) \n\t"
+ "movq %%mm3, 48(%0) \n\t"
+ :
+ : "r"(b2 + 32 * i)
: "memory"
);
}
More information about the ffmpeg-cvslog
mailing list