[vlc-devel] Subject: [PATCH] Fix adjust compilation on non-SSE machines

Martin Briza Gamajun at seznam.cz
Tue Aug 16 20:27:07 CEST 2011


From: Martin Briza <xbriza00 at stud.fit.vutbr.cz>

Forgot compatibility checks
---
  modules/video_filter/adjust.c |   10 +++++++---
  1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/video_filter/adjust.c b/modules/video_filter/adjust.c
index 056af0f..6b71ff3 100644
--- a/modules/video_filter/adjust.c
+++ b/modules/video_filter/adjust.c
@@ -167,18 +167,21 @@ static int Create( vlc_object_t *p_this )
          CASE_PLANAR_YUV
              /* Planar YUV */
              p_filter->pf_video_filter = FilterPlanar;
-
+#ifdef CAN_COMPILE_SSE4_1
              if (vlc_CPU() & CPU_CAPABILITY_SSE4_1)
              {
                  p_sys->pf_process_sat_hue_clip =  
planar_sat_hue_clip_SSE41;
                  p_sys->pf_process_sat_hue = planar_sat_hue_SSE2;
              }
-            else if (vlc_CPU() & CPU_CAPABILITY_SSE2)
+            else
+#elif defined( CAN_COMPILE_SSE4_1 )
+            if (vlc_CPU() & CPU_CAPABILITY_SSE2)
              {
                  p_sys->pf_process_sat_hue_clip = planar_sat_hue_clip_C;
                  p_sys->pf_process_sat_hue = planar_sat_hue_SSE2;
              }
              else
+#endif
              {
                  p_sys->pf_process_sat_hue_clip = planar_sat_hue_clip_C;
                  p_sys->pf_process_sat_hue = planar_sat_hue_C;
@@ -188,13 +191,14 @@ static int Create( vlc_object_t *p_this )
          CASE_PACKED_YUV_422
              /* Packed YUV 4:2:2 */
              p_filter->pf_video_filter = FilterPacked;
-
+#ifdef CAN_COMPILE_SSE4_1
              if (vlc_CPU() & CPU_CAPABILITY_SSE4_1)
              {
                  p_sys->pf_process_sat_hue_clip =  
packed_sat_hue_clip_SSE41;
                  p_sys->pf_process_sat_hue = packed_sat_hue_SSE41;
              }
              else
+#endif
              {
                  p_sys->pf_process_sat_hue_clip = packed_sat_hue_clip_C;
                  p_sys->pf_process_sat_hue = packed_sat_hue_C;
-- 
1.7.1



More information about the vlc-devel mailing list