aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mips/lsp_mips.h
diff options
context:
space:
mode:
authorJames Cowgill <james410@cowgill.org.uk>2015-03-05 17:40:15 +0000
committerMichael Niedermayer <michaelni@gmx.at>2015-03-06 14:37:44 +0100
commit157d6f0d5b95261bf053566d8a1c2652387da30c (patch)
treeca481834165a1f3c103eea9dc50fd5e877bbcbde /libavcodec/mips/lsp_mips.h
parenteae13eae9d6499e81cd77bcd9e13f7bcb31b5577 (diff)
downloadffmpeg-157d6f0d5b95261bf053566d8a1c2652387da30c.tar.gz
mips: port optimizations to mips n64
This mainly consists of replacing all the pointer arithmatic 'addiu' instructions with PTR_ADDIU which will handle the differences in pointer sizes when compiled on 64 bit mips systems. The header asmdefs.h contains the PTR_ macros which expend to the correct mips instructions to manipulate registers containing pointers. Signed-off-by: James Cowgill <james410@cowgill.org.uk> Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mips/lsp_mips.h')
-rw-r--r--libavcodec/mips/lsp_mips.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mips/lsp_mips.h b/libavcodec/mips/lsp_mips.h
index c55ef03ad4..9d7521865b 100644
--- a/libavcodec/mips/lsp_mips.h
+++ b/libavcodec/mips/lsp_mips.h
@@ -55,6 +55,8 @@
#define AVCODEC_LSP_MIPS_H
#if HAVE_MIPSFPU && HAVE_INLINE_ASM
+#include "libavutil/mips/asmdefs.h"
+
static av_always_inline void ff_lsp2polyf_mips(const double *lsp, double *f, int lp_half_order)
{
int i, j = 0;
@@ -73,7 +75,7 @@ static av_always_inline void ff_lsp2polyf_mips(const double *lsp, double *f, int
__asm__ volatile(
"move %[p_f], %[p_fi] \n\t"
"add.d %[val], %[val], %[val] \n\t"
- "addiu %[p_fi], 8 \n\t"
+ PTR_ADDIU "%[p_fi], 8 \n\t"
"ldc1 %[f_j_1], 0(%[p_f]) \n\t"
"ldc1 %[f_j], 8(%[p_f]) \n\t"
"neg.d %[val], %[val] \n\t"
@@ -91,7 +93,7 @@ static av_always_inline void ff_lsp2polyf_mips(const double *lsp, double *f, int
"mov.d %[f_j_1], %[f_j_2] \n\t"
"ldc1 %[f_j_2], -16(%[p_f]) \n\t"
"sdc1 %[tmp], 8(%[p_f]) \n\t"
- "addiu %[p_f], -8 \n\t"
+ PTR_ADDIU "%[p_f], -8 \n\t"
"bgtz %[j], ff_lsp2polyf_lp_j%= \n\t"
"ff_lsp2polyf_lp_j_end%=: \n\t"