make *InitSSE2() functions be empty on non-SSE2 platform

this avoids the '*.o has no symbols' warning messages

Change-Id: Idbaa02f5c2f7c632997a26f9507926922d191b6e
This commit is contained in:
Pascal Massimino 2012-08-27 23:40:47 -07:00
parent c7eb45764f
commit 7c6e60f4bd
2 changed files with 23 additions and 12 deletions

View File

@ -12,15 +12,15 @@
#include "./dsp.h" #include "./dsp.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#if defined(WEBP_USE_SSE2) #if defined(WEBP_USE_SSE2)
#include <emmintrin.h> #include <emmintrin.h>
#include "../dec/vp8i.h" #include "../dec/vp8i.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Transforms (Paragraph 14.4) // Transforms (Paragraph 14.4)
@ -876,9 +876,15 @@ static void HFilter8iSSE2(uint8_t* u, uint8_t* v, int stride,
Store16x4(u, v, stride, &p1, &p0, &q0, &q1); Store16x4(u, v, stride, &p1, &p0, &q0, &q1);
} }
#endif // WEBP_USE_SSE2
//------------------------------------------------------------------------------
// Entry point
extern void VP8DspInitSSE2(void); extern void VP8DspInitSSE2(void);
void VP8DspInitSSE2(void) { void VP8DspInitSSE2(void) {
#if defined(WEBP_USE_SSE2)
VP8Transform = TransformSSE2; VP8Transform = TransformSSE2;
VP8VFilter16 = VFilter16SSE2; VP8VFilter16 = VFilter16SSE2;
@ -894,10 +900,9 @@ void VP8DspInitSSE2(void) {
VP8SimpleHFilter16 = SimpleHFilter16SSE2; VP8SimpleHFilter16 = SimpleHFilter16SSE2;
VP8SimpleVFilter16i = SimpleVFilter16iSSE2; VP8SimpleVFilter16i = SimpleVFilter16iSSE2;
VP8SimpleHFilter16i = SimpleHFilter16iSSE2; VP8SimpleHFilter16i = SimpleHFilter16iSSE2;
#endif // WEBP_USE_SSE2
} }
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
} // extern "C" } // extern "C"
#endif #endif
#endif // WEBP_USE_SSE2

View File

@ -11,16 +11,16 @@
#include "./dsp.h" #include "./dsp.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#if defined(WEBP_USE_SSE2) #if defined(WEBP_USE_SSE2)
#include <stdlib.h> // for abs() #include <stdlib.h> // for abs()
#include <emmintrin.h> #include <emmintrin.h>
#include "../enc/vp8enci.h" #include "../enc/vp8enci.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Compute susceptibility based on DCT-coeff histograms: // Compute susceptibility based on DCT-coeff histograms:
// the higher, the "easier" the macroblock is to compress. // the higher, the "easier" the macroblock is to compress.
@ -819,8 +819,15 @@ static int QuantizeBlockSSE2(int16_t in[16], int16_t out[16],
} }
} }
#endif // WEBP_USE_SSE2
//------------------------------------------------------------------------------
// Entry point
extern void VP8EncDspInitSSE2(void); extern void VP8EncDspInitSSE2(void);
void VP8EncDspInitSSE2(void) { void VP8EncDspInitSSE2(void) {
#if defined(WEBP_USE_SSE2)
VP8CollectHistogram = CollectHistogramSSE2; VP8CollectHistogram = CollectHistogramSSE2;
VP8EncQuantizeBlock = QuantizeBlockSSE2; VP8EncQuantizeBlock = QuantizeBlockSSE2;
VP8ITransform = ITransformSSE2; VP8ITransform = ITransformSSE2;
@ -828,10 +835,9 @@ void VP8EncDspInitSSE2(void) {
VP8SSE4x4 = SSE4x4SSE2; VP8SSE4x4 = SSE4x4SSE2;
VP8TDisto4x4 = Disto4x4SSE2; VP8TDisto4x4 = Disto4x4SSE2;
VP8TDisto16x16 = Disto16x16SSE2; VP8TDisto16x16 = Disto16x16SSE2;
#endif // WEBP_USE_SSE2
} }
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
} // extern "C" } // extern "C"
#endif #endif
#endif // WEBP_USE_SSE2