mirror of
https://github.com/libretro/RetroArch
synced 2024-12-29 12:31:05 +00:00
(ARM NEON) Buildfix
This commit is contained in:
parent
070b7b78b1
commit
4af31cee97
@ -310,7 +310,8 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
size_t outsamples_max, max_bufsamples = AUDIO_CHUNK_SIZE_NONBLOCKING * 2;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
convert_init_simd();
|
||||
convert_s16_to_float_init_simd();
|
||||
convert_float_to_s16_init_simd();
|
||||
|
||||
/* Accomodate rewind since at some point we might have two full buffers. */
|
||||
outsamples_max = max_bufsamples * AUDIO_MAX_RATIO *
|
||||
|
@ -28,6 +28,9 @@
|
||||
#include <altivec.h>
|
||||
#endif
|
||||
|
||||
#include <features/features_cpu.h>
|
||||
#include <conversion/float_to_s16.h>
|
||||
|
||||
/**
|
||||
* convert_float_to_s16_C:
|
||||
* @out : output buffer
|
||||
@ -195,3 +198,20 @@ void convert_float_to_s16_ALLEGREX(int16_t *out,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* convert_float_to_s16_init_simd:
|
||||
*
|
||||
* Sets up function pointers for conversion
|
||||
* functions based on CPU features.
|
||||
**/
|
||||
void convert_float_to_s16_init_simd(void)
|
||||
{
|
||||
unsigned cpu = cpu_features_get();
|
||||
|
||||
(void)cpu;
|
||||
#if defined(__ARM_NEON__) && !defined(VITA)
|
||||
convert_float_to_s16_arm = (cpu & RETRO_SIMD_NEON) ?
|
||||
convert_float_to_s16_neon : convert_float_to_s16_C;
|
||||
#endif
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
#include <features/features_cpu.h>
|
||||
#include <conversion/float_to_s16.h>
|
||||
#include <conversion/s16_to_float.h>
|
||||
|
||||
/**
|
||||
* convert_s16_to_float_C:
|
||||
@ -224,26 +224,19 @@ void convert_s16_to_float_ALLEGREX(float *out,
|
||||
}
|
||||
#endif
|
||||
|
||||
static unsigned convert_get_cpu_features(void)
|
||||
{
|
||||
return cpu_features_get();
|
||||
}
|
||||
|
||||
/**
|
||||
* convert_init_simd:
|
||||
* convert_s16_to_float_init_simd:
|
||||
*
|
||||
* Sets up function pointers for conversion
|
||||
* functions based on CPU features.
|
||||
**/
|
||||
void convert_init_simd(void)
|
||||
void convert_s16_to_float_init_simd(void)
|
||||
{
|
||||
unsigned cpu = convert_get_cpu_features();
|
||||
unsigned cpu = cpu_features_get();
|
||||
|
||||
(void)cpu;
|
||||
#if defined(__ARM_NEON__) && !defined(VITA)
|
||||
convert_s16_to_float_arm = (cpu & RETRO_SIMD_NEON) ?
|
||||
convert_s16_to_float_neon : convert_s16_to_float_C;
|
||||
convert_float_to_s16_arm = (cpu & RETRO_SIMD_NEON) ?
|
||||
convert_float_to_s16_neon : convert_float_to_s16_C;
|
||||
#endif
|
||||
}
|
||||
|
@ -23,13 +23,13 @@
|
||||
#ifndef __LIBRETRO_SDK_CONVERSION_FLOAT_TO_S16_H__
|
||||
#define __LIBRETRO_SDK_CONVERSION_FLOAT_TO_S16_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/**
|
||||
* convert_float_to_s16_C:
|
||||
* @out : output buffer
|
||||
@ -81,20 +81,6 @@ void (*convert_float_to_s16_arm)(int16_t *out,
|
||||
const float *in, size_t samples);
|
||||
|
||||
void convert_float_s16_asm(int16_t *out, const float *in, size_t samples);
|
||||
|
||||
/**
|
||||
* convert_float_to_s16_neon:
|
||||
* @out : output buffer
|
||||
* @in : input buffer
|
||||
* @samples : size of samples to be converted
|
||||
*
|
||||
* Converts floating point
|
||||
* to signed integer 16-bit.
|
||||
*
|
||||
* ARM NEON implementation callback function.
|
||||
**/
|
||||
static void convert_float_to_s16_neon(int16_t *out,
|
||||
const float *in, size_t samples);
|
||||
#elif defined(_MIPS_ARCH_ALLEGREX)
|
||||
#define convert_float_to_s16 convert_float_to_s16_ALLEGREX
|
||||
/**
|
||||
@ -114,6 +100,14 @@ void convert_float_to_s16_ALLEGREX(int16_t *out,
|
||||
#define convert_float_to_s16 convert_float_to_s16_C
|
||||
#endif
|
||||
|
||||
/**
|
||||
* convert_float_to_s16_init_simd:
|
||||
*
|
||||
* Sets up function pointers for conversion
|
||||
* functions based on CPU features.
|
||||
**/
|
||||
void convert_float_to_s16_init_simd(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -108,12 +108,12 @@ void convert_s16_to_float_C(float *out,
|
||||
const int16_t *in, size_t samples, float gain);
|
||||
|
||||
/**
|
||||
* convert_init_simd:
|
||||
* convert_s16_to_float_init_simd:
|
||||
*
|
||||
* Sets up function pointers for conversion
|
||||
* functions based on CPU features.
|
||||
**/
|
||||
void convert_init_simd(void);
|
||||
void convert_s16_to_float_init_simd(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user