mips: Add dependencies on HAVE_INLINE_ASM
Add dependencies on HAVE_INLINE_ASM for files and parts of code where it is necessary. Signed-off-by: Nedeljko Babic <nbabic@mips.com> Reviewed-by: Vitor Sessak <vitor1001@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
							parent
							
								
									2d71f31df2
								
							
						
					
					
						commit
						304a1ed1e8
					
				@ -11,5 +11,5 @@ MIPSFPU-OBJS-$(CONFIG_MPEGAUDIODSP)       += mips/mpegaudiodsp_mips_float.o
 | 
				
			|||||||
MIPSDSPR1-OBJS-$(CONFIG_MPEGAUDIODSP)     += mips/mpegaudiodsp_mips_fixed.o
 | 
					MIPSDSPR1-OBJS-$(CONFIG_MPEGAUDIODSP)     += mips/mpegaudiodsp_mips_fixed.o
 | 
				
			||||||
OBJS-$(CONFIG_FFT)                        += mips/fft_init_table.o
 | 
					OBJS-$(CONFIG_FFT)                        += mips/fft_init_table.o
 | 
				
			||||||
MIPSFPU-OBJS-$(CONFIG_FFT)                += mips/fft_mips.o
 | 
					MIPSFPU-OBJS-$(CONFIG_FFT)                += mips/fft_mips.o
 | 
				
			||||||
MIPSFPU-OBJS-$(HAVE_INLINE_ASM)           += mips/fmtconvert_mips.o
 | 
					MIPSFPU-OBJS                              += mips/dsputil_mips.o           \
 | 
				
			||||||
MIPSFPU-OBJS-$(HAVE_INLINE_ASM)           += mips/dsputil_mips.o
 | 
					                                             mips/fmtconvert_mips.o
 | 
				
			||||||
 | 
				
			|||||||
@ -51,9 +51,11 @@
 | 
				
			|||||||
 * @file
 | 
					 * @file
 | 
				
			||||||
 * Reference: libavcodec/acelp_filters.c
 | 
					 * Reference: libavcodec/acelp_filters.c
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include "config.h"
 | 
				
			||||||
#include "libavutil/attributes.h"
 | 
					#include "libavutil/attributes.h"
 | 
				
			||||||
#include "libavcodec/acelp_filters.h"
 | 
					#include "libavcodec/acelp_filters.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
static void ff_acelp_interpolatef_mips(float *out, const float *in,
 | 
					static void ff_acelp_interpolatef_mips(float *out, const float *in,
 | 
				
			||||||
                           const float *filter_coeffs, int precision,
 | 
					                           const float *filter_coeffs, int precision,
 | 
				
			||||||
                           int frac_pos, int filter_length, int length)
 | 
					                           int frac_pos, int filter_length, int length)
 | 
				
			||||||
@ -202,9 +204,12 @@ static void ff_acelp_apply_order_2_transfer_function_mips(float *out, const floa
 | 
				
			|||||||
           "$f12", "$f13", "$f14", "$f15", "$f16"
 | 
					           "$f12", "$f13", "$f14", "$f15", "$f16"
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ff_acelp_filter_init_mips(ACELPFContext *c)
 | 
					void ff_acelp_filter_init_mips(ACELPFContext *c)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
    c->acelp_interpolatef                      = ff_acelp_interpolatef_mips;
 | 
					    c->acelp_interpolatef                      = ff_acelp_interpolatef_mips;
 | 
				
			||||||
    c->acelp_apply_order_2_transfer_function   = ff_acelp_apply_order_2_transfer_function_mips;
 | 
					    c->acelp_apply_order_2_transfer_function   = ff_acelp_apply_order_2_transfer_function_mips;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -52,8 +52,10 @@
 | 
				
			|||||||
 * @file
 | 
					 * @file
 | 
				
			||||||
 * Reference: libavcodec/acelp_vectors.c
 | 
					 * Reference: libavcodec/acelp_vectors.c
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include "config.h"
 | 
				
			||||||
#include "libavcodec/acelp_vectors.h"
 | 
					#include "libavcodec/acelp_vectors.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
static void ff_weighted_vector_sumf_mips(
 | 
					static void ff_weighted_vector_sumf_mips(
 | 
				
			||||||
                  float *out, const float *in_a, const float *in_b,
 | 
					                  float *out, const float *in_a, const float *in_b,
 | 
				
			||||||
                  float weight_coeff_a, float weight_coeff_b, int length)
 | 
					                  float weight_coeff_a, float weight_coeff_b, int length)
 | 
				
			||||||
@ -89,8 +91,11 @@ static void ff_weighted_vector_sumf_mips(
 | 
				
			|||||||
        : "$f0", "$f1", "$f2", "$f3", "$f4", "$f5"
 | 
					        : "$f0", "$f1", "$f2", "$f3", "$f4", "$f5"
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ff_acelp_vectors_init_mips(ACELPVContext *c)
 | 
					void ff_acelp_vectors_init_mips(ACELPVContext *c)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
    c->weighted_vector_sumf = ff_weighted_vector_sumf_mips;
 | 
					    c->weighted_vector_sumf = ff_weighted_vector_sumf_mips;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -53,6 +53,7 @@
 | 
				
			|||||||
#include "libavcodec/amrwbdata.h"
 | 
					#include "libavcodec/amrwbdata.h"
 | 
				
			||||||
#include "amrwbdec_mips.h"
 | 
					#include "amrwbdec_mips.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
void hb_fir_filter_mips(float *out, const float fir_coef[HB_FIR_SIZE + 1],
 | 
					void hb_fir_filter_mips(float *out, const float fir_coef[HB_FIR_SIZE + 1],
 | 
				
			||||||
                          float mem[HB_FIR_SIZE], const float *in)
 | 
					                          float mem[HB_FIR_SIZE], const float *in)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -183,3 +184,4 @@ void hb_fir_filter_mips(float *out, const float fir_coef[HB_FIR_SIZE + 1],
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    memcpy(mem, data + AMRWB_SFR_SIZE_16k, HB_FIR_SIZE * sizeof(float));
 | 
					    memcpy(mem, data + AMRWB_SFR_SIZE_16k, HB_FIR_SIZE * sizeof(float));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
				
			|||||||
@ -51,10 +51,12 @@
 | 
				
			|||||||
 * @file
 | 
					 * @file
 | 
				
			||||||
 * Reference: libavcodec/celp_filters.c
 | 
					 * Reference: libavcodec/celp_filters.c
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include "config.h"
 | 
				
			||||||
#include "libavutil/attributes.h"
 | 
					#include "libavutil/attributes.h"
 | 
				
			||||||
#include "libavutil/common.h"
 | 
					#include "libavutil/common.h"
 | 
				
			||||||
#include "libavcodec/celp_filters.h"
 | 
					#include "libavcodec/celp_filters.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
static void ff_celp_lp_synthesis_filterf_mips(float *out,
 | 
					static void ff_celp_lp_synthesis_filterf_mips(float *out,
 | 
				
			||||||
                                  const float *filter_coeffs,
 | 
					                                  const float *filter_coeffs,
 | 
				
			||||||
                                  const float* in, int buffer_length,
 | 
					                                  const float* in, int buffer_length,
 | 
				
			||||||
@ -273,9 +275,12 @@ static void ff_celp_lp_zero_synthesis_filterf_mips(float *out,
 | 
				
			|||||||
        out[n] = sum_out1;
 | 
					        out[n] = sum_out1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ff_celp_filter_init_mips(CELPFContext *c)
 | 
					void ff_celp_filter_init_mips(CELPFContext *c)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
    c->celp_lp_synthesis_filterf        = ff_celp_lp_synthesis_filterf_mips;
 | 
					    c->celp_lp_synthesis_filterf        = ff_celp_lp_synthesis_filterf_mips;
 | 
				
			||||||
    c->celp_lp_zero_synthesis_filterf   = ff_celp_lp_zero_synthesis_filterf_mips;
 | 
					    c->celp_lp_zero_synthesis_filterf   = ff_celp_lp_zero_synthesis_filterf_mips;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -51,8 +51,10 @@
 | 
				
			|||||||
 * @file
 | 
					 * @file
 | 
				
			||||||
 * Reference: libavcodec/celp_math.c
 | 
					 * Reference: libavcodec/celp_math.c
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#include "config.h"
 | 
				
			||||||
#include "libavcodec/celp_math.h"
 | 
					#include "libavcodec/celp_math.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
static float ff_dot_productf_mips(const float* a, const float* b,
 | 
					static float ff_dot_productf_mips(const float* a, const float* b,
 | 
				
			||||||
                                              int length)
 | 
					                                              int length)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -77,8 +79,11 @@ static float ff_dot_productf_mips(const float* a, const float* b,
 | 
				
			|||||||
    );
 | 
					    );
 | 
				
			||||||
    return sum;
 | 
					    return sum;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ff_celp_math_init_mips(CELPMContext *c)
 | 
					void ff_celp_math_init_mips(CELPMContext *c)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
    c->dot_productf = ff_dot_productf_mips;
 | 
					    c->dot_productf = ff_dot_productf_mips;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -55,6 +55,7 @@
 | 
				
			|||||||
#ifndef AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H
 | 
					#ifndef AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H
 | 
				
			||||||
#define AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H
 | 
					#define AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
static void compute_antialias_mips_fixed(MPADecodeContext *s,
 | 
					static void compute_antialias_mips_fixed(MPADecodeContext *s,
 | 
				
			||||||
                                        GranuleDef *g)
 | 
					                                        GranuleDef *g)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -242,5 +243,6 @@ static void compute_antialias_mips_fixed(MPADecodeContext *s,
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#define compute_antialias compute_antialias_mips_fixed
 | 
					#define compute_antialias compute_antialias_mips_fixed
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H */
 | 
					#endif /* AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H */
 | 
				
			||||||
 | 
				
			|||||||
@ -55,6 +55,7 @@
 | 
				
			|||||||
#ifndef AVCODEC_MIPS_COMPUTE_ANTIALIAS_FLOAT_H
 | 
					#ifndef AVCODEC_MIPS_COMPUTE_ANTIALIAS_FLOAT_H
 | 
				
			||||||
#define AVCODEC_MIPS_COMPUTE_ANTIALIAS_FLOAT_H
 | 
					#define AVCODEC_MIPS_COMPUTE_ANTIALIAS_FLOAT_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
static void compute_antialias_mips_float(MPADecodeContext *s,
 | 
					static void compute_antialias_mips_float(MPADecodeContext *s,
 | 
				
			||||||
                                        GranuleDef *g)
 | 
					                                        GranuleDef *g)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -178,5 +179,6 @@ static void compute_antialias_mips_float(MPADecodeContext *s,
 | 
				
			|||||||
    );
 | 
					    );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#define compute_antialias compute_antialias_mips_float
 | 
					#define compute_antialias compute_antialias_mips_float
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* AVCODEC_MIPS_COMPUTE_ANTIALIAS_FLOAT_H */
 | 
					#endif /* AVCODEC_MIPS_COMPUTE_ANTIALIAS_FLOAT_H */
 | 
				
			||||||
 | 
				
			|||||||
@ -47,6 +47,7 @@
 | 
				
			|||||||
#include "config.h"
 | 
					#include "config.h"
 | 
				
			||||||
#include "libavcodec/dsputil.h"
 | 
					#include "libavcodec/dsputil.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
static void vector_fmul_window_mips(float *dst, const float *src0,
 | 
					static void vector_fmul_window_mips(float *dst, const float *src0,
 | 
				
			||||||
        const float *src1, const float *win, int len)
 | 
					        const float *src1, const float *win, int len)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -157,8 +158,11 @@ static void vector_fmul_window_mips(float *dst, const float *src0,
 | 
				
			|||||||
        );
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
av_cold void ff_dsputil_init_mips( DSPContext* c, AVCodecContext *avctx )
 | 
					av_cold void ff_dsputil_init_mips( DSPContext* c, AVCodecContext *avctx )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
    c->vector_fmul_window = vector_fmul_window_mips;
 | 
					    c->vector_fmul_window = vector_fmul_window_mips;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -485,7 +485,6 @@ static void ff_imdct_half_mips(FFTContext *s, FFTSample *output, const FFTSample
 | 
				
			|||||||
        z2[1].im = temp12;
 | 
					        z2[1].im = temp12;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif /* HAVE_INLINE_ASM */
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Compute inverse MDCT of size N = 2^nbits
 | 
					 * Compute inverse MDCT of size N = 2^nbits
 | 
				
			||||||
@ -513,6 +512,7 @@ static void ff_imdct_calc_mips(FFTContext *s, FFTSample *output, const FFTSample
 | 
				
			|||||||
        output[n-k-4] = output[n2+k+3];
 | 
					        output[n-k-4] = output[n2+k+3];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
av_cold void ff_fft_init_mips(FFTContext *s)
 | 
					av_cold void ff_fft_init_mips(FFTContext *s)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -522,9 +522,9 @@ av_cold void ff_fft_init_mips(FFTContext *s)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#if HAVE_INLINE_ASM
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
    s->fft_calc     = ff_fft_calc_mips;
 | 
					    s->fft_calc     = ff_fft_calc_mips;
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#if CONFIG_MDCT
 | 
					#if CONFIG_MDCT
 | 
				
			||||||
    s->imdct_calc   = ff_imdct_calc_mips;
 | 
					    s->imdct_calc   = ff_imdct_calc_mips;
 | 
				
			||||||
    s->imdct_half   = ff_imdct_half_mips;
 | 
					    s->imdct_half   = ff_imdct_half_mips;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -51,6 +51,7 @@
 | 
				
			|||||||
#include "libavcodec/avcodec.h"
 | 
					#include "libavcodec/avcodec.h"
 | 
				
			||||||
#include "libavcodec/fmtconvert.h"
 | 
					#include "libavcodec/fmtconvert.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
#if HAVE_MIPSDSPR1
 | 
					#if HAVE_MIPSDSPR1
 | 
				
			||||||
static void float_to_int16_mips(int16_t *dst, const float *src, long len)
 | 
					static void float_to_int16_mips(int16_t *dst, const float *src, long len)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -327,12 +328,15 @@ static void int32_to_float_fmul_scalar_mips(float *dst, const int *src,
 | 
				
			|||||||
        : "memory"
 | 
					        : "memory"
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* HAVE_INLINE_ASM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
av_cold void ff_fmt_convert_init_mips(FmtConvertContext *c)
 | 
					av_cold void ff_fmt_convert_init_mips(FmtConvertContext *c)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					#if HAVE_INLINE_ASM
 | 
				
			||||||
#if HAVE_MIPSDSPR1
 | 
					#if HAVE_MIPSDSPR1
 | 
				
			||||||
    c->float_to_int16_interleave = float_to_int16_interleave_mips;
 | 
					    c->float_to_int16_interleave = float_to_int16_interleave_mips;
 | 
				
			||||||
    c->float_to_int16 = float_to_int16_mips;
 | 
					    c->float_to_int16 = float_to_int16_mips;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_mips;
 | 
					    c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_mips;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user