x86: Replace checks for CPU extensions and flags by convenience macros
This separates code relying on inline from that relying on external assembly and fixes instances where the coalesced check was incorrect.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/x86/cpu.h"
|
||||
#include "libavcodec/sbrdsp.h"
|
||||
|
||||
float ff_sbr_sum_square_sse(float (*x)[2], int n);
|
||||
@@ -29,12 +30,10 @@ void ff_sbr_hf_g_filt_sse(float (*Y)[2], const float (*X_high)[40][2],
|
||||
|
||||
void ff_sbrdsp_init_x86(SBRDSPContext *s)
|
||||
{
|
||||
if (HAVE_YASM) {
|
||||
int mm_flags = av_get_cpu_flags();
|
||||
int mm_flags = av_get_cpu_flags();
|
||||
|
||||
if (mm_flags & AV_CPU_FLAG_SSE) {
|
||||
s->sum_square = ff_sbr_sum_square_sse;
|
||||
s->hf_g_filt = ff_sbr_hf_g_filt_sse;
|
||||
}
|
||||
if (EXTERNAL_SSE(mm_flags)) {
|
||||
s->sum_square = ff_sbr_sum_square_sse;
|
||||
s->hf_g_filt = ff_sbr_hf_g_filt_sse;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user