aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dca_core.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-08 15:09:26 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-11 21:08:04 +0200
commitdf215e575850e41b19aeb1fd99e53372a6b3d537 (patch)
tree23412de5569f437c076d68e15166102d0e0fc676 /libavcodec/dca_core.c
parent29c4c0886d143790fcbeddbe40a23dfc6f56345c (diff)
downloadffmpeg-df215e575850e41b19aeb1fd99e53372a6b3d537.tar.gz
avcodec/dca_core: Only call emms_c() if needed
It is not needed on x64, because the AV_COPY* and AV_ZERO* macros never use MMX on x64. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/dca_core.c')
-rw-r--r--libavcodec/dca_core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c
index 1655116eed..bbf36ea678 100644
--- a/libavcodec/dca_core.c
+++ b/libavcodec/dca_core.c
@@ -767,7 +767,9 @@ static void erase_adpcm_history(DCACoreDecoder *s)
for (band = 0; band < DCA_SUBBANDS; band++)
AV_ZERO128(s->subband_samples[ch][band] - DCA_ADPCM_COEFFS);
+#ifdef FF_COPY_SWAP_ZERO_USES_MMX
emms_c();
+#endif
}
static int alloc_sample_buffer(DCACoreDecoder *s)
@@ -831,7 +833,9 @@ static int parse_frame_data(DCACoreDecoder *s, enum HeaderType header, int xch_b
}
}
+#ifdef FF_COPY_SWAP_ZERO_USES_MMX
emms_c();
+#endif
return 0;
}
@@ -1276,7 +1280,9 @@ static void erase_x96_adpcm_history(DCACoreDecoder *s)
for (band = 0; band < DCA_SUBBANDS_X96; band++)
AV_ZERO128(s->x96_subband_samples[ch][band] - DCA_ADPCM_COEFFS);
+#ifdef FF_COPY_SWAP_ZERO_USES_MMX
emms_c();
+#endif
}
static int alloc_x96_sample_buffer(DCACoreDecoder *s)
@@ -1506,7 +1512,9 @@ static int parse_x96_frame_data(DCACoreDecoder *s, int exss, int xch_base)
}
}
+#ifdef FF_COPY_SWAP_ZERO_USES_MMX
emms_c();
+#endif
return 0;
}