aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/flacdsp_init.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-05-12 11:53:44 -0300
committerJames Almer <jamrial@gmail.com>2024-05-12 17:24:08 -0300
commit0664cbd732fd9d95037d9110b64fb2a32360de2c (patch)
tree924cfd0f30b6a8140af20d854a701f896875e04e /libavcodec/x86/flacdsp_init.c
parent5acec189afa300b28a581b7c4cfaa510d0f3a9c1 (diff)
downloadffmpeg-0664cbd732fd9d95037d9110b64fb2a32360de2c.tar.gz
x86/flacdsp: add a SSE2 version of wasted32
flac_wasted_32_c: 851.3 flac_wasted_32_sse2: 41.3 Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/x86/flacdsp_init.c')
-rw-r--r--libavcodec/x86/flacdsp_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c
index dee4bf88fc..67aa118760 100644
--- a/libavcodec/x86/flacdsp_init.c
+++ b/libavcodec/x86/flacdsp_init.c
@@ -30,6 +30,8 @@ void ff_flac_lpc_32_sse4(int32_t *samples, const int coeffs[32], int order,
void ff_flac_lpc_32_xop(int32_t *samples, const int coeffs[32], int order,
int qlevel, int len);
+void ff_flac_wasted_32_sse2(int32_t *decoded, int wasted, int len);
+
#define DECORRELATE_FUNCS(fmt, opt) \
void ff_flac_decorrelate_ls_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \
int len, int shift); \
@@ -63,6 +65,7 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
+ c->wasted32 = ff_flac_wasted_32_sse2;
if (fmt == AV_SAMPLE_FMT_S16) {
c->decorrelate[1] = ff_flac_decorrelate_ls_16_sse2;
c->decorrelate[2] = ff_flac_decorrelate_rs_16_sse2;