summaryrefslogtreecommitdiff
path: root/libavcodec/mips/ac3dsp_mips.c
diff options
context:
space:
mode:
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>2016-02-24 16:38:22 +0000
committerMichael Niedermayer <michael@niedermayer.cc>2016-03-09 20:05:04 +0100
commitad16eff64ba78d8dc98a8324640025c7cb2857f3 (patch)
treebec1d6bfbf92ce1a90c645d5dad006a6f9dea48d /libavcodec/mips/ac3dsp_mips.c
parenta62d768894709b3cbdda88f558accf0099c08215 (diff)
mips: add support for R6
Understanding the mips32r6 and mips64r6 ISAs in the configure script is not enough. In order to have full support for MIPS R6 in FFmpeg we need to be able to build it, and for that we need to make sure we don't use incompatible assembler code which makes the build fail. Ifdefing the offending code is sufficient to fix the problem. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mips/ac3dsp_mips.c')
-rw-r--r--libavcodec/mips/ac3dsp_mips.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/mips/ac3dsp_mips.c b/libavcodec/mips/ac3dsp_mips.c
index da4919f6eb..f9aaf15639 100644
--- a/libavcodec/mips/ac3dsp_mips.c
+++ b/libavcodec/mips/ac3dsp_mips.c
@@ -201,6 +201,7 @@ static void ac3_update_bap_counts_mips(uint16_t mant_cnt[16], uint8_t *bap,
#endif
#if HAVE_MIPSFPU
+#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6
static void float_to_fixed24_mips(int32_t *dst, const float *src, unsigned int len)
{
const float scale = 1 << 24;
@@ -395,7 +396,8 @@ static void ac3_downmix_mips(float **samples, float (*matrix)[2],
:"memory"
);
}
-#endif
+#endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */
+#endif /* HAVE_MIPSFPU */
#endif /* HAVE_INLINE_ASM */
void ff_ac3dsp_init_mips(AC3DSPContext *c, int bit_exact) {
@@ -405,9 +407,11 @@ void ff_ac3dsp_init_mips(AC3DSPContext *c, int bit_exact) {
c->update_bap_counts = ac3_update_bap_counts_mips;
#endif
#if HAVE_MIPSFPU
+#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6
c->float_to_fixed24 = float_to_fixed24_mips;
c->downmix = ac3_downmix_mips;
#endif
#endif
+#endif
}