mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
make the 'last_cpuinfo_used' variable names unique
allows the sources to be #include'd in some hackish builds (don't do that!) Change-Id: I0c7a43acbebd0e2d5068845e6daa8ce47361cd91
This commit is contained in:
parent
b9489861a3
commit
67f601cd46
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user