diff options
author | James Cowgill <james410@cowgill.org.uk> | 2015-03-05 17:40:15 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-06 14:37:44 +0100 |
commit | 157d6f0d5b95261bf053566d8a1c2652387da30c (patch) | |
tree | ca481834165a1f3c103eea9dc50fd5e877bbcbde /libavcodec/mips/aacpsy_mips.h | |
parent | eae13eae9d6499e81cd77bcd9e13f7bcb31b5577 (diff) | |
download | ffmpeg-streaming-157d6f0d5b95261bf053566d8a1c2652387da30c.zip ffmpeg-streaming-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/aacpsy_mips.h')
-rw-r--r-- | libavcodec/mips/aacpsy_mips.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mips/aacpsy_mips.h b/libavcodec/mips/aacpsy_mips.h index d1353c4..596dcad 100644 --- a/libavcodec/mips/aacpsy_mips.h +++ b/libavcodec/mips/aacpsy_mips.h @@ -56,6 +56,8 @@ #ifndef AVCODEC_MIPS_AACPSY_MIPS_H #define AVCODEC_MIPS_AACPSY_MIPS_H +#include "libavutil/mips/asmdefs.h" + #if HAVE_INLINE_ASM && HAVE_MIPSFPU && ( PSY_LAME_FIR_LEN == 21 ) static void calc_thr_3gpp_mips(const FFPsyWindowInfo *wi, const int num_bands, AacPsyChannel *pch, const uint8_t *band_sizes, @@ -185,7 +187,7 @@ static void psy_hp_filter_mips(const float *firbuf, float *hpfsmpl, const float "madd.s %[sum1], %[sum1], $f8, %[coeff3] \n\t" "madd.s %[sum2], %[sum2], $f11, %[coeff3] \n\t" "lwc1 $f1, 36(%[fb]) \n\t" - "addiu %[fb], %[fb], 16 \n\t" + PTR_ADDIU "%[fb], %[fb], 16 \n\t" "madd.s %[sum4], %[sum4], $f0, %[coeff3] \n\t" "madd.s %[sum3], %[sum3], $f1, %[coeff3] \n\t" "madd.s %[sum1], %[sum1], $f1, %[coeff4] \n\t" @@ -207,7 +209,7 @@ static void psy_hp_filter_mips(const float *firbuf, float *hpfsmpl, const float "swc1 %[sum4], 12(%[hp]) \n\t" "swc1 %[sum3], 8(%[hp]) \n\t" "bne %[fb], %[fb_end], 1b \n\t" - " addiu %[hp], %[hp], 16 \n\t" + PTR_ADDIU "%[hp], %[hp], 16 \n\t" ".set pop \n\t" |