diff --git a/src/dsp/alpha_processing.c b/src/dsp/alpha_processing.c index 138fdb56..5d3dce6d 100644 --- a/src/dsp/alpha_processing.c +++ b/src/dsp/alpha_processing.c @@ -347,7 +347,7 @@ extern void VP8FiltersInitMIPSdspR2(void); extern void WebPInitAlphaProcessingMIPSdspR2(void); extern void WebPInitAlphaProcessingSSE2(void); -void WebPInitAlphaProcessing(void) { +void WebPInitAlphaProcessing(void) WEBP_TSAN_IGNORE_FUNCTION { WebPMultARGBRow = WebPMultARGBRowC; WebPMultRow = WebPMultRowC; WebPApplyAlphaMultiply = ApplyAlphaMultiply; diff --git a/src/dsp/alpha_processing_sse2.c b/src/dsp/alpha_processing_sse2.c index 9e0d2d69..8d897e88 100644 --- a/src/dsp/alpha_processing_sse2.c +++ b/src/dsp/alpha_processing_sse2.c @@ -282,9 +282,9 @@ static void MultRow(uint8_t* const ptr, const uint8_t* const alpha, //------------------------------------------------------------------------------ // Init function -extern void WebPInitAlphaProcessingSSE2(void); +extern void WebPInitAlphaProcessingSSE2(void) WEBP_TSAN_IGNORE_FUNCTION; -void WebPInitAlphaProcessingSSE2(void) { +void WebPInitAlphaProcessingSSE2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_SSE2) WebPMultARGBRow = MultARGBRow; WebPMultRow = MultRow; diff --git a/src/dsp/dec.c b/src/dsp/dec.c index dabc0c25..80ba211d 100644 --- a/src/dsp/dec.c +++ b/src/dsp/dec.c @@ -689,7 +689,7 @@ extern void VP8DspInitNEON(void); extern void VP8DspInitMIPS32(void); extern void VP8DspInitMIPSdspR2(void); -void VP8DspInit(void) { +void VP8DspInit(void) WEBP_TSAN_IGNORE_FUNCTION { VP8InitClipTables(); VP8TransformWHT = TransformWHT; diff --git a/src/dsp/dec_clip_tables.c b/src/dsp/dec_clip_tables.c index eec5a6d1..989f1b6d 100644 --- a/src/dsp/dec_clip_tables.c +++ b/src/dsp/dec_clip_tables.c @@ -344,7 +344,7 @@ const int8_t* const VP8ksclip2 = &sclip2[112]; const uint8_t* const VP8kclip1 = &clip1[255]; const uint8_t* const VP8kabs0 = &abs0[255]; -void VP8InitClipTables(void) { +void VP8InitClipTables(void) WEBP_TSAN_IGNORE_FUNCTION { #if !defined(USE_STATIC_TABLES) int i; if (!tables_ok) { diff --git a/src/dsp/dec_mips32.c b/src/dsp/dec_mips32.c index 8bfeedb3..f463f810 100644 --- a/src/dsp/dec_mips32.c +++ b/src/dsp/dec_mips32.c @@ -558,9 +558,9 @@ static void TransformTwo(const int16_t* in, uint8_t* dst, int do_two) { //------------------------------------------------------------------------------ // Entry point -extern void VP8DspInitMIPS32(void); +extern void VP8DspInitMIPS32(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8DspInitMIPS32(void) { +void VP8DspInitMIPS32(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_MIPS32) VP8InitClipTables(); diff --git a/src/dsp/dec_mips_dsp_r2.c b/src/dsp/dec_mips_dsp_r2.c index 85bdedb9..97837a9d 100644 --- a/src/dsp/dec_mips_dsp_r2.c +++ b/src/dsp/dec_mips_dsp_r2.c @@ -658,9 +658,9 @@ static void HFilter8i(uint8_t* u, uint8_t* v, int stride, //------------------------------------------------------------------------------ // Entry point -extern void VP8DspInitMIPSdspR2(void); +extern void VP8DspInitMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8DspInitMIPSdspR2(void) { +void VP8DspInitMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_MIPS_DSP_R2) VP8TransformDC = TransformDC; VP8TransformAC3 = TransformAC3; diff --git a/src/dsp/dec_neon.c b/src/dsp/dec_neon.c index 9c5bc1c7..52574555 100644 --- a/src/dsp/dec_neon.c +++ b/src/dsp/dec_neon.c @@ -1263,9 +1263,9 @@ static void TransformAC3(const int16_t* in, uint8_t* dst) { //------------------------------------------------------------------------------ // Entry point -extern void VP8DspInitNEON(void); +extern void VP8DspInitNEON(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8DspInitNEON(void) { +void VP8DspInitNEON(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_NEON) VP8Transform = TransformTwo; VP8TransformAC3 = TransformAC3; diff --git a/src/dsp/dec_sse2.c b/src/dsp/dec_sse2.c index c37a637f..1d9e30e9 100644 --- a/src/dsp/dec_sse2.c +++ b/src/dsp/dec_sse2.c @@ -952,9 +952,9 @@ static void HFilter8i(uint8_t* u, uint8_t* v, int stride, //------------------------------------------------------------------------------ // Entry point -extern void VP8DspInitSSE2(void); +extern void VP8DspInitSSE2(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8DspInitSSE2(void) { +void VP8DspInitSSE2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_SSE2) VP8Transform = Transform; #if defined(USE_TRANSFORM_AC3) diff --git a/src/dsp/dsp.h b/src/dsp/dsp.h index d94a7b7d..8c643050 100644 --- a/src/dsp/dsp.h +++ b/src/dsp/dsp.h @@ -80,6 +80,15 @@ extern "C" { #endif #endif +// This macro prevents thread_sanitizer from reporting known concurrent writes. +#define WEBP_TSAN_IGNORE_FUNCTION +#if defined(__has_feature) +#if __has_feature(thread_sanitizer) +#undef WEBP_TSAN_IGNORE_FUNCTION +#define WEBP_TSAN_IGNORE_FUNCTION __attribute__((no_sanitize_thread)) +#endif +#endif + typedef enum { kSSE2, kSSE3, @@ -147,7 +156,8 @@ typedef void (*VP8CHisto)(const uint8_t* ref, const uint8_t* pred, extern const int VP8DspScan[16 + 4 + 4]; extern VP8CHisto VP8CollectHistogram; -void VP8EncDspInit(void); // must be called before using any of the above +// must be called before using any of the above +void VP8EncDspInit(void) WEBP_TSAN_IGNORE_FUNCTION; //------------------------------------------------------------------------------ // Decoding @@ -174,7 +184,8 @@ extern const int8_t* const VP8ksclip1; // clips [-1020, 1020] to [-128, 127] extern const int8_t* const VP8ksclip2; // clips [-112, 112] to [-16, 15] extern const uint8_t* const VP8kclip1; // clips [-255,511] to [0,255] extern const uint8_t* const VP8kabs0; // abs(x) for x in [-255,255] -void VP8InitClipTables(void); // must be called first +// must be called first +void VP8InitClipTables(void) WEBP_TSAN_IGNORE_FUNCTION; // simple filter (only for luma) typedef void (*VP8SimpleFilterFunc)(uint8_t* p, int stride, int thresh); @@ -201,7 +212,7 @@ extern VP8ChromaFilterFunc VP8VFilter8i; // filtering u and v altogether extern VP8ChromaFilterFunc VP8HFilter8i; // must be called before anything using the above -void VP8DspInit(void); +void VP8DspInit(void) WEBP_TSAN_IGNORE_FUNCTION; //------------------------------------------------------------------------------ // WebP I/O @@ -250,11 +261,11 @@ extern WebPYUV444Converter WebPYUV444Converters[/* MODE_LAST */]; // Must be called before using the WebPUpsamplers[] (and for premultiplied // colorspaces like rgbA, rgbA4444, etc) -void WebPInitUpsamplers(void); +void WebPInitUpsamplers(void) WEBP_TSAN_IGNORE_FUNCTION; // Must be called before using WebPSamplers[] -void WebPInitSamplers(void); +void WebPInitSamplers(void) WEBP_TSAN_IGNORE_FUNCTION; // Must be called before using WebPYUV444Converters[] -void WebPInitYUV444Converters(void); +void WebPInitYUV444Converters(void) WEBP_TSAN_IGNORE_FUNCTION; //------------------------------------------------------------------------------ // Utilities for processing transparent channel. @@ -312,7 +323,7 @@ void WebPMultRowC(uint8_t* const ptr, const uint8_t* const alpha, void WebPMultARGBRowC(uint32_t* const ptr, int width, int inverse); // To be called first before using the above. -void WebPInitAlphaProcessing(void); +void WebPInitAlphaProcessing(void) WEBP_TSAN_IGNORE_FUNCTION; #ifdef __cplusplus } // extern "C" diff --git a/src/dsp/enc.c b/src/dsp/enc.c index 3a17c690..0b33beaa 100644 --- a/src/dsp/enc.c +++ b/src/dsp/enc.c @@ -701,7 +701,7 @@ extern void VP8EncDspInitAVX2(void); extern void VP8EncDspInitNEON(void); extern void VP8EncDspInitMIPS32(void); -void VP8EncDspInit(void) { +void VP8EncDspInit(void) WEBP_TSAN_IGNORE_FUNCTION { VP8DspInit(); // common inverse transforms InitTables(); diff --git a/src/dsp/enc_mips32.c b/src/dsp/enc_mips32.c index c5ff6f46..2e30c066 100644 --- a/src/dsp/enc_mips32.c +++ b/src/dsp/enc_mips32.c @@ -765,9 +765,9 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) { //------------------------------------------------------------------------------ // Entry point -extern void VP8EncDspInitMIPS32(void); +extern void VP8EncDspInitMIPS32(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8EncDspInitMIPS32(void) { +void VP8EncDspInitMIPS32(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_MIPS32) VP8ITransform = ITransform; VP8EncQuantizeBlock = QuantizeBlock; diff --git a/src/dsp/enc_neon.c b/src/dsp/enc_neon.c index cd6cdc25..37b13755 100644 --- a/src/dsp/enc_neon.c +++ b/src/dsp/enc_neon.c @@ -904,9 +904,9 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32], //------------------------------------------------------------------------------ // Entry point -extern void VP8EncDspInitNEON(void); +extern void VP8EncDspInitNEON(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8EncDspInitNEON(void) { +void VP8EncDspInitNEON(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_NEON) VP8ITransform = ITransform; VP8FTransform = FTransform; diff --git a/src/dsp/enc_sse2.c b/src/dsp/enc_sse2.c index b34346fb..fa2f485f 100644 --- a/src/dsp/enc_sse2.c +++ b/src/dsp/enc_sse2.c @@ -944,9 +944,9 @@ void VP8SetResidualCoeffsSSE2(const int16_t* const coeffs, //------------------------------------------------------------------------------ // Entry point -extern void VP8EncDspInitSSE2(void); +extern void VP8EncDspInitSSE2(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8EncDspInitSSE2(void) { +void VP8EncDspInitSSE2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_SSE2) VP8CollectHistogram = CollectHistogram; VP8EncQuantizeBlock = QuantizeBlock; diff --git a/src/dsp/lossless.c b/src/dsp/lossless.c index 084c9230..bf739f2b 100644 --- a/src/dsp/lossless.c +++ b/src/dsp/lossless.c @@ -1585,7 +1585,7 @@ extern void VP8LDspInitNEON(void); extern void VP8LDspInitMIPS32(void); extern void VP8LDspInitMIPSdspR2(void); -void VP8LDspInit(void) { +void VP8LDspInit(void) WEBP_TSAN_IGNORE_FUNCTION { memcpy(VP8LPredictors, kPredictorsC, sizeof(VP8LPredictors)); VP8LSubtractGreenFromBlueAndRed = VP8LSubtractGreenFromBlueAndRed_C; diff --git a/src/dsp/lossless_mips32.c b/src/dsp/lossless_mips32.c index 13085807..872d41ce 100644 --- a/src/dsp/lossless_mips32.c +++ b/src/dsp/lossless_mips32.c @@ -401,9 +401,9 @@ static void HistogramAdd(const VP8LHistogram* const a, //------------------------------------------------------------------------------ // Entry point -extern void VP8LDspInitMIPS32(void); +extern void VP8LDspInitMIPS32(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8LDspInitMIPS32(void) { +void VP8LDspInitMIPS32(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_MIPS32) VP8LFastSLog2Slow = FastSLog2Slow; VP8LFastLog2Slow = FastLog2Slow; diff --git a/src/dsp/lossless_neon.c b/src/dsp/lossless_neon.c index 987767b5..5d759761 100644 --- a/src/dsp/lossless_neon.c +++ b/src/dsp/lossless_neon.c @@ -301,9 +301,9 @@ static void AddGreenToBlueAndRed(uint32_t* argb_data, int num_pixels) { //------------------------------------------------------------------------------ -extern void VP8LDspInitNEON(void); +extern void VP8LDspInitNEON(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8LDspInitNEON(void) { +void VP8LDspInitNEON(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_NEON) VP8LConvertBGRAToRGBA = ConvertBGRAToRGBA; VP8LConvertBGRAToBGR = ConvertBGRAToBGR; diff --git a/src/dsp/lossless_sse2.c b/src/dsp/lossless_sse2.c index 71309098..679044b7 100644 --- a/src/dsp/lossless_sse2.c +++ b/src/dsp/lossless_sse2.c @@ -503,9 +503,9 @@ static void HistogramAdd(const VP8LHistogram* const a, //------------------------------------------------------------------------------ -extern void VP8LDspInitSSE2(void); +extern void VP8LDspInitSSE2(void) WEBP_TSAN_IGNORE_FUNCTION; -void VP8LDspInitSSE2(void) { +void VP8LDspInitSSE2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_SSE2) VP8LPredictors[5] = Predictor5; VP8LPredictors[6] = Predictor6; diff --git a/src/dsp/upsampling.c b/src/dsp/upsampling.c index fd4b83ae..0002e80b 100644 --- a/src/dsp/upsampling.c +++ b/src/dsp/upsampling.c @@ -171,9 +171,9 @@ YUV444_FUNC(Yuv444ToRgb565, VP8YuvToRgb565, 2) WebPYUV444Converter WebPYUV444Converters[MODE_LAST]; -extern void WebPInitYUV444ConvertersMIPSdspR2(void); +extern void WebPInitYUV444ConvertersMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION; -void WebPInitYUV444Converters(void) { +void WebPInitYUV444Converters(void) WEBP_TSAN_IGNORE_FUNCTION { WebPYUV444Converters[MODE_RGB] = Yuv444ToRgb; WebPYUV444Converters[MODE_RGBA] = Yuv444ToRgba; WebPYUV444Converters[MODE_BGR] = Yuv444ToBgr; @@ -198,11 +198,11 @@ void WebPInitYUV444Converters(void) { //------------------------------------------------------------------------------ // Main calls -extern void WebPInitUpsamplersSSE2(void); -extern void WebPInitUpsamplersNEON(void); -extern void WebPInitUpsamplersMIPSdspR2(void); +extern void WebPInitUpsamplersSSE2(void) WEBP_TSAN_IGNORE_FUNCTION; +extern void WebPInitUpsamplersNEON(void) WEBP_TSAN_IGNORE_FUNCTION; +extern void WebPInitUpsamplersMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION; -void WebPInitUpsamplers(void) { +void WebPInitUpsamplers(void) WEBP_TSAN_IGNORE_FUNCTION { #ifdef FANCY_UPSAMPLING WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair; WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair; diff --git a/src/dsp/upsampling_mips_dsp_r2.c b/src/dsp/upsampling_mips_dsp_r2.c index fa8b3c13..5d99b8f7 100644 --- a/src/dsp/upsampling_mips_dsp_r2.c +++ b/src/dsp/upsampling_mips_dsp_r2.c @@ -215,9 +215,9 @@ UPSAMPLE_FUNC(UpsampleRgb565LinePair, YuvToRgb565, 2) #endif // WEBP_USE_MIPS_DSP_R2 -extern void WebPInitUpsamplersMIPSdspR2(void); +extern void WebPInitUpsamplersMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION; -void WebPInitUpsamplersMIPSdspR2(void) { +void WebPInitUpsamplersMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_MIPS_DSP_R2) #ifdef FANCY_UPSAMPLING WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair; @@ -259,9 +259,9 @@ YUV444_FUNC(Yuv444ToRgb565, YuvToRgb565, 2) #endif // WEBP_USE_MIPS_DSP_R2 -extern void WebPInitYUV444ConvertersMIPSdspR2(void); +extern void WebPInitYUV444ConvertersMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION; -void WebPInitYUV444ConvertersMIPSdspR2(void) { +void WebPInitYUV444ConvertersMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_MIPS_DSP_R2) WebPYUV444Converters[MODE_RGB] = Yuv444ToRgb; WebPYUV444Converters[MODE_RGBA] = Yuv444ToRgba; diff --git a/src/dsp/upsampling_neon.c b/src/dsp/upsampling_neon.c index d31ed4d6..2a8ed04c 100644 --- a/src/dsp/upsampling_neon.c +++ b/src/dsp/upsampling_neon.c @@ -242,13 +242,13 @@ NEON_UPSAMPLE_FUNC(UpsampleBgraLinePair, Bgra, 4) //------------------------------------------------------------------------------ -extern void WebPInitUpsamplersNEON(void); +extern void WebPInitUpsamplersNEON(void) WEBP_TSAN_IGNORE_FUNCTION; #ifdef FANCY_UPSAMPLING extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */]; -void WebPInitUpsamplersNEON(void) { +void WebPInitUpsamplersNEON(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_NEON) WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair; WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair; @@ -262,6 +262,6 @@ void WebPInitUpsamplersNEON(void) { #else // this empty function is to avoid an empty .o -void WebPInitUpsamplersNEON(void) {} +void WebPInitUpsamplersNEON(void) WEBP_TSAN_IGNORE_FUNCTION {} #endif // FANCY_UPSAMPLING diff --git a/src/dsp/upsampling_sse2.c b/src/dsp/upsampling_sse2.c index 45cf0906..ca7197ad 100644 --- a/src/dsp/upsampling_sse2.c +++ b/src/dsp/upsampling_sse2.c @@ -188,13 +188,13 @@ SSE2_UPSAMPLE_FUNC(UpsampleBgraLinePair, VP8YuvToBgra, 4) //------------------------------------------------------------------------------ -extern void WebPInitUpsamplersSSE2(void); +extern void WebPInitUpsamplersSSE2(void) WEBP_TSAN_IGNORE_FUNCTION; #ifdef FANCY_UPSAMPLING extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */]; -void WebPInitUpsamplersSSE2(void) { +void WebPInitUpsamplersSSE2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_SSE2) VP8YUVInitSSE2(); WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair; @@ -209,6 +209,6 @@ void WebPInitUpsamplersSSE2(void) { #else // this empty function is to avoid an empty .o -void WebPInitUpsamplersSSE2(void) {} +void WebPInitUpsamplersSSE2(void) WEBP_TSAN_IGNORE_FUNCTION {} #endif // FANCY_UPSAMPLING diff --git a/src/dsp/yuv.c b/src/dsp/yuv.c index 7d538abb..3ca4e0d3 100644 --- a/src/dsp/yuv.c +++ b/src/dsp/yuv.c @@ -26,7 +26,7 @@ int32_t VP8kVToG[256], VP8kUToG[256]; uint8_t VP8kClip[YUV_RANGE_MAX - YUV_RANGE_MIN]; uint8_t VP8kClip4Bits[YUV_RANGE_MAX - YUV_RANGE_MIN]; -void VP8YUVInit(void) { +void VP8YUVInit(void) WEBP_TSAN_IGNORE_FUNCTION { int i; if (done) { return; @@ -62,7 +62,7 @@ void VP8YUVInit(void) { #else -void VP8YUVInit(void) {} +void VP8YUVInit(void) WEBP_TSAN_IGNORE_FUNCTION {} #endif // WEBP_YUV_USE_TABLE @@ -120,11 +120,11 @@ void WebPSamplerProcessPlane(const uint8_t* y, int y_stride, WebPSamplerRowFunc WebPSamplers[MODE_LAST]; -extern void WebPInitSamplersSSE2(void); -extern void WebPInitSamplersMIPS32(void); -extern void WebPInitSamplersMIPSdspR2(void); +extern void WebPInitSamplersSSE2(void) WEBP_TSAN_IGNORE_FUNCTION; +extern void WebPInitSamplersMIPS32(void) WEBP_TSAN_IGNORE_FUNCTION; +extern void WebPInitSamplersMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION; -void WebPInitSamplers(void) { +void WebPInitSamplers(void) WEBP_TSAN_IGNORE_FUNCTION { WebPSamplers[MODE_RGB] = YuvToRgbRow; WebPSamplers[MODE_RGBA] = YuvToRgbaRow; WebPSamplers[MODE_BGR] = YuvToBgrRow; diff --git a/src/dsp/yuv_mips32.c b/src/dsp/yuv_mips32.c index c82b4dfd..b824f96b 100644 --- a/src/dsp/yuv_mips32.c +++ b/src/dsp/yuv_mips32.c @@ -88,9 +88,9 @@ ROW_FUNC(YuvToBgraRow, 4, 2, 1, 0, 3) //------------------------------------------------------------------------------ -extern void WebPInitSamplersMIPS32(void); +extern void WebPInitSamplersMIPS32(void) WEBP_TSAN_IGNORE_FUNCTION; -void WebPInitSamplersMIPS32(void) { +void WebPInitSamplersMIPS32(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_MIPS32) WebPSamplers[MODE_RGB] = YuvToRgbRow; WebPSamplers[MODE_RGBA] = YuvToRgbaRow; diff --git a/src/dsp/yuv_mips_dsp_r2.c b/src/dsp/yuv_mips_dsp_r2.c index 31709919..cef8e056 100644 --- a/src/dsp/yuv_mips_dsp_r2.c +++ b/src/dsp/yuv_mips_dsp_r2.c @@ -119,9 +119,9 @@ ROW_FUNC(YuvToBgraRow, 4, 2, 1, 0, 3) //------------------------------------------------------------------------------ -extern void WebPInitSamplersMIPSdspR2(void); +extern void WebPInitSamplersMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION; -void WebPInitSamplersMIPSdspR2(void) { +void WebPInitSamplersMIPSdspR2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_MIPS_DSP_R2) WebPSamplers[MODE_RGB] = YuvToRgbRow; WebPSamplers[MODE_RGBA] = YuvToRgbaRow; diff --git a/src/dsp/yuv_sse2.c b/src/dsp/yuv_sse2.c index 6fe0f3b0..50aa43e4 100644 --- a/src/dsp/yuv_sse2.c +++ b/src/dsp/yuv_sse2.c @@ -28,14 +28,14 @@ typedef union { // handy struct for converting SSE2 registers #include "./yuv_tables_sse2.h" -void VP8YUVInitSSE2(void) {} +void VP8YUVInitSSE2(void) WEBP_TSAN_IGNORE_FUNCTION {} #else static int done_sse2 = 0; static VP8kCstSSE2 VP8kUtoRGBA[256], VP8kVtoRGBA[256], VP8kYtoRGBA[256]; -void VP8YUVInitSSE2(void) { +void VP8YUVInitSSE2(void) WEBP_TSAN_IGNORE_FUNCTION { if (!done_sse2) { int i; for (i = 0; i < 256; ++i) { @@ -309,9 +309,9 @@ static void YuvToBgrRowSSE2(const uint8_t* y, //------------------------------------------------------------------------------ // Entry point -extern void WebPInitSamplersSSE2(void); +extern void WebPInitSamplersSSE2(void) WEBP_TSAN_IGNORE_FUNCTION; -void WebPInitSamplersSSE2(void) { +void WebPInitSamplersSSE2(void) WEBP_TSAN_IGNORE_FUNCTION { #if defined(WEBP_USE_SSE2) WebPSamplers[MODE_RGB] = YuvToRgbRowSSE2; WebPSamplers[MODE_RGBA] = YuvToRgbaRowSSE2;