[FFmpeg-cvslog] x86/flacdsp: separate decoder and encoder dsp initialization

James Almer git at videolan.org
Wed Nov 12 18:42:47 CET 2014


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Nov 10 17:06:08 2014 -0300| [84ccc317cecf3e0feebbdec2e6c21dc9bc35d505] | committer: James Almer

x86/flacdsp: separate decoder and encoder dsp initialization

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=84ccc317cecf3e0feebbdec2e6c21dc9bc35d505
---

 libavcodec/x86/flacdsp_init.c |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c
index ad88e5b..33b31f1 100644
--- a/libavcodec/x86/flacdsp_init.c
+++ b/libavcodec/x86/flacdsp_init.c
@@ -35,15 +35,22 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt,
 #if HAVE_YASM
     int cpu_flags = av_get_cpu_flags();
 
+#if CONFIG_FLAC_DECODER
     if (EXTERNAL_SSE4(cpu_flags)) {
-        if (bps > 16 && CONFIG_FLAC_DECODER)
+        if (bps > 16)
             c->lpc = ff_flac_lpc_32_sse4;
-        if (bps == 16 && CONFIG_FLAC_ENCODER && CONFIG_GPL)
-            c->lpc_encode = ff_flac_enc_lpc_16_sse4;
     }
     if (EXTERNAL_XOP(cpu_flags)) {
-        if (bps > 16 && CONFIG_FLAC_DECODER)
+        if (bps > 16)
             c->lpc = ff_flac_lpc_32_xop;
     }
 #endif
+
+#if CONFIG_FLAC_ENCODER
+    if (EXTERNAL_SSE4(cpu_flags)) {
+        if (CONFIG_GPL && bps == 16)
+            c->lpc_encode = ff_flac_enc_lpc_16_sse4;
+    }
+#endif
+#endif /* HAVE_YASM */
 }



More information about the ffmpeg-cvslog mailing list