diff --git a/src/dsp/alpha_processing.c b/src/dsp/alpha_processing.c index 20c245d8..58465f9c 100644 --- a/src/dsp/alpha_processing.c +++ b/src/dsp/alpha_processing.c @@ -347,10 +347,11 @@ extern void VP8FiltersInitMIPSdspR2(void); extern void WebPInitAlphaProcessingMIPSdspR2(void); extern void WebPInitAlphaProcessingSSE2(void); -static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used; +static volatile VP8CPUInfo alpha_processing_last_cpuinfo_used = + (VP8CPUInfo)&alpha_processing_last_cpuinfo_used; WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessing(void) { - if (last_cpuinfo_used == VP8GetCPUInfo) return; + if (alpha_processing_last_cpuinfo_used == VP8GetCPUInfo) return; WebPMultARGBRow = WebPMultARGBRowC; WebPMultRow = WebPMultRowC; @@ -374,5 +375,5 @@ WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessing(void) { } #endif } - last_cpuinfo_used = VP8GetCPUInfo; + alpha_processing_last_cpuinfo_used = VP8GetCPUInfo; } diff --git a/src/dsp/argb.c b/src/dsp/argb.c index c5deac7c..cc1f9a96 100644 --- a/src/dsp/argb.c +++ b/src/dsp/argb.c @@ -42,10 +42,11 @@ void (*VP8PackRGB)(const uint8_t*, const uint8_t*, const uint8_t*, extern void VP8EncDspARGBInitMIPSdspR2(void); extern void VP8EncDspARGBInitSSE2(void); -static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used; +static volatile VP8CPUInfo argb_last_cpuinfo_used = + (VP8CPUInfo)&argb_last_cpuinfo_used; WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspARGBInit(void) { - if (last_cpuinfo_used == VP8GetCPUInfo) return; + if (argb_last_cpuinfo_used == VP8GetCPUInfo) return; VP8PackARGB = PackARGB; VP8PackRGB = PackRGB; @@ -63,5 +64,5 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspARGBInit(void) { } #endif } - last_cpuinfo_used = VP8GetCPUInfo; + argb_last_cpuinfo_used = VP8GetCPUInfo; } diff --git a/src/dsp/dec.c b/src/dsp/dec.c index 91c01c0d..01f6c94d 100644 --- a/src/dsp/dec.c +++ b/src/dsp/dec.c @@ -684,10 +684,11 @@ extern void VP8DspInitNEON(void); extern void VP8DspInitMIPS32(void); extern void VP8DspInitMIPSdspR2(void); -static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used; +static volatile VP8CPUInfo dec_last_cpuinfo_used = + (VP8CPUInfo)&dec_last_cpuinfo_used; WEBP_TSAN_IGNORE_FUNCTION void VP8DspInit(void) { - if (last_cpuinfo_used == VP8GetCPUInfo) return; + if (dec_last_cpuinfo_used == VP8GetCPUInfo) return; VP8InitClipTables(); @@ -753,5 +754,5 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8DspInit(void) { } #endif } - last_cpuinfo_used = VP8GetCPUInfo; + dec_last_cpuinfo_used = VP8GetCPUInfo; } diff --git a/src/dsp/enc.c b/src/dsp/enc.c index fc2b62ab..591e540f 100644 --- a/src/dsp/enc.c +++ b/src/dsp/enc.c @@ -727,10 +727,11 @@ extern void VP8EncDspInitNEON(void); extern void VP8EncDspInitMIPS32(void); extern void VP8EncDspInitMIPSdspR2(void); -static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used; +static volatile VP8CPUInfo enc_last_cpuinfo_used = + (VP8CPUInfo)&enc_last_cpuinfo_used; WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInit(void) { - if (last_cpuinfo_used == VP8GetCPUInfo) return; + if (enc_last_cpuinfo_used == VP8GetCPUInfo) return; VP8DspInit(); // common inverse transforms InitTables(); @@ -783,5 +784,5 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInit(void) { } #endif } - last_cpuinfo_used = VP8GetCPUInfo; + enc_last_cpuinfo_used = VP8GetCPUInfo; } diff --git a/src/dsp/lossless.c b/src/dsp/lossless.c index b32bff7e..0af443ca 100644 --- a/src/dsp/lossless.c +++ b/src/dsp/lossless.c @@ -1745,10 +1745,11 @@ extern void VP8LDspInitNEON(void); extern void VP8LDspInitMIPS32(void); extern void VP8LDspInitMIPSdspR2(void); -static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used; +static volatile VP8CPUInfo lossless_last_cpuinfo_used = + (VP8CPUInfo)&lossless_last_cpuinfo_used; WEBP_TSAN_IGNORE_FUNCTION void VP8LDspInit(void) { - if (last_cpuinfo_used == VP8GetCPUInfo) return; + if (lossless_last_cpuinfo_used == VP8GetCPUInfo) return; memcpy(VP8LPredictors, kPredictorsC, sizeof(VP8LPredictors)); @@ -1801,7 +1802,7 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8LDspInit(void) { } #endif } - last_cpuinfo_used = VP8GetCPUInfo; + lossless_last_cpuinfo_used = VP8GetCPUInfo; } //------------------------------------------------------------------------------ diff --git a/src/dsp/upsampling.c b/src/dsp/upsampling.c index 807ee8d6..5702c2d0 100644 --- a/src/dsp/upsampling.c +++ b/src/dsp/upsampling.c @@ -173,10 +173,11 @@ WebPYUV444Converter WebPYUV444Converters[MODE_LAST]; extern WEBP_TSAN_IGNORE_FUNCTION void WebPInitYUV444ConvertersMIPSdspR2(void); -static volatile VP8CPUInfo last_cpuinfo_used1 = (VP8CPUInfo)&last_cpuinfo_used1; +static volatile VP8CPUInfo upsampling_last_cpuinfo_used1 = + (VP8CPUInfo)&upsampling_last_cpuinfo_used1; WEBP_TSAN_IGNORE_FUNCTION void WebPInitYUV444Converters(void) { - if (last_cpuinfo_used1 == VP8GetCPUInfo) return; + if (upsampling_last_cpuinfo_used1 == VP8GetCPUInfo) return; WebPYUV444Converters[MODE_RGB] = Yuv444ToRgb; WebPYUV444Converters[MODE_RGBA] = Yuv444ToRgba; @@ -197,7 +198,7 @@ WEBP_TSAN_IGNORE_FUNCTION void WebPInitYUV444Converters(void) { } #endif } - last_cpuinfo_used1 = VP8GetCPUInfo; + upsampling_last_cpuinfo_used1 = VP8GetCPUInfo; } //------------------------------------------------------------------------------ @@ -207,10 +208,11 @@ extern WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplersSSE2(void); extern WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplersNEON(void); extern WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplersMIPSdspR2(void); -static volatile VP8CPUInfo last_cpuinfo_used2 = (VP8CPUInfo)&last_cpuinfo_used2; +static volatile VP8CPUInfo upsampling_last_cpuinfo_used2 = + (VP8CPUInfo)&upsampling_last_cpuinfo_used2; WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplers(void) { - if (last_cpuinfo_used2 == VP8GetCPUInfo) return; + if (upsampling_last_cpuinfo_used2 == VP8GetCPUInfo) return; #ifdef FANCY_UPSAMPLING WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair; @@ -244,7 +246,7 @@ WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplers(void) { #endif } #endif // FANCY_UPSAMPLING - last_cpuinfo_used2 = VP8GetCPUInfo; + upsampling_last_cpuinfo_used2 = VP8GetCPUInfo; } //------------------------------------------------------------------------------ diff --git a/src/dsp/yuv.c b/src/dsp/yuv.c index 558ffd43..2407ca54 100644 --- a/src/dsp/yuv.c +++ b/src/dsp/yuv.c @@ -124,10 +124,11 @@ extern WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersSSE2(void); extern WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPS32(void); extern WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPSdspR2(void); -static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used; +static volatile VP8CPUInfo yuv_last_cpuinfo_used = + (VP8CPUInfo)&yuv_last_cpuinfo_used; WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplers(void) { - if (last_cpuinfo_used == VP8GetCPUInfo) return; + if (yuv_last_cpuinfo_used == VP8GetCPUInfo) return; WebPSamplers[MODE_RGB] = YuvToRgbRow; WebPSamplers[MODE_RGBA] = YuvToRgbaRow; @@ -159,7 +160,7 @@ WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplers(void) { } #endif // WEBP_USE_MIPS_DSP_R2 } - last_cpuinfo_used = VP8GetCPUInfo; + yuv_last_cpuinfo_used = VP8GetCPUInfo; } //-----------------------------------------------------------------------------