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!)
(cherry picked from commit 67f601cd46
)
Conflicts:
src/dsp/alpha_processing.c
src/dsp/argb.c
src/dsp/dec.c
src/dsp/enc.c
src/dsp/lossless.c
src/dsp/upsampling.c
src/dsp/yuv.c
Change-Id: I0c7a43acbebd0e2d5068845e6daa8ce47361cd91
This commit is contained in:
parent
1273e84517
commit
b2e71a9080
@ -311,10 +311,11 @@ int (*WebPExtractAlpha)(const uint8_t*, int, int, int, uint8_t*, int);
|
||||
|
||||
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;
|
||||
|
||||
void WebPInitAlphaProcessing(void) {
|
||||
if (last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
if (alpha_processing_last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
|
||||
WebPMultARGBRow = MultARGBRow;
|
||||
WebPMultRow = MultRow;
|
||||
@ -330,5 +331,5 @@ void WebPInitAlphaProcessing(void) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
last_cpuinfo_used = VP8GetCPUInfo;
|
||||
alpha_processing_last_cpuinfo_used = VP8GetCPUInfo;
|
||||
}
|
||||
|
@ -688,10 +688,11 @@ extern void VP8DspInitSSE2(void);
|
||||
extern void VP8DspInitNEON(void);
|
||||
extern void VP8DspInitMIPS32(void);
|
||||
|
||||
static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used;
|
||||
static volatile VP8CPUInfo dec_last_cpuinfo_used =
|
||||
(VP8CPUInfo)&dec_last_cpuinfo_used;
|
||||
|
||||
void VP8DspInit(void) {
|
||||
if (last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
if (dec_last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
|
||||
VP8InitClipTables();
|
||||
|
||||
@ -731,5 +732,5 @@ void VP8DspInit(void) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
last_cpuinfo_used = VP8GetCPUInfo;
|
||||
dec_last_cpuinfo_used = VP8GetCPUInfo;
|
||||
}
|
||||
|
@ -692,10 +692,11 @@ extern void VP8EncDspInitAVX2(void);
|
||||
extern void VP8EncDspInitNEON(void);
|
||||
extern void VP8EncDspInitMIPS32(void);
|
||||
|
||||
static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used;
|
||||
static volatile VP8CPUInfo enc_last_cpuinfo_used =
|
||||
(VP8CPUInfo)&enc_last_cpuinfo_used;
|
||||
|
||||
void VP8EncDspInit(void) {
|
||||
if (last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
if (enc_last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
|
||||
VP8DspInit(); // common inverse transforms
|
||||
InitTables();
|
||||
@ -741,6 +742,6 @@ void VP8EncDspInit(void) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
last_cpuinfo_used = VP8GetCPUInfo;
|
||||
enc_last_cpuinfo_used = VP8GetCPUInfo;
|
||||
}
|
||||
|
||||
|
@ -1590,10 +1590,11 @@ extern void VP8LDspInitSSE2(void);
|
||||
extern void VP8LDspInitNEON(void);
|
||||
extern void VP8LDspInitMIPS32(void);
|
||||
|
||||
static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used;
|
||||
static volatile VP8CPUInfo lossless_last_cpuinfo_used =
|
||||
(VP8CPUInfo)&lossless_last_cpuinfo_used;
|
||||
|
||||
void VP8LDspInit(void) {
|
||||
if (last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
if (lossless_last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
|
||||
memcpy(VP8LPredictors, kPredictorsC, sizeof(VP8LPredictors));
|
||||
|
||||
@ -1638,7 +1639,7 @@ void VP8LDspInit(void) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
last_cpuinfo_used = VP8GetCPUInfo;
|
||||
lossless_last_cpuinfo_used = VP8GetCPUInfo;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -189,10 +189,11 @@ const WebPYUV444Converter WebPYUV444Converters[MODE_LAST] = {
|
||||
extern void WebPInitUpsamplersSSE2(void);
|
||||
extern void WebPInitUpsamplersNEON(void);
|
||||
|
||||
static volatile VP8CPUInfo last_cpuinfo_used2 = (VP8CPUInfo)&last_cpuinfo_used2;
|
||||
static volatile VP8CPUInfo upsampling_last_cpuinfo_used2 =
|
||||
(VP8CPUInfo)&upsampling_last_cpuinfo_used2;
|
||||
|
||||
void WebPInitUpsamplers(void) {
|
||||
if (last_cpuinfo_used2 == VP8GetCPUInfo) return;
|
||||
if (upsampling_last_cpuinfo_used2 == VP8GetCPUInfo) return;
|
||||
|
||||
#ifdef FANCY_UPSAMPLING
|
||||
WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair;
|
||||
@ -221,7 +222,7 @@ void WebPInitUpsamplers(void) {
|
||||
#endif
|
||||
}
|
||||
#endif // FANCY_UPSAMPLING
|
||||
last_cpuinfo_used2 = VP8GetCPUInfo;
|
||||
upsampling_last_cpuinfo_used2 = VP8GetCPUInfo;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -123,10 +123,11 @@ WebPSamplerRowFunc WebPSamplers[MODE_LAST];
|
||||
extern void WebPInitSamplersSSE2(void);
|
||||
extern void WebPInitSamplersMIPS32(void);
|
||||
|
||||
static volatile VP8CPUInfo last_cpuinfo_used = (VP8CPUInfo)&last_cpuinfo_used;
|
||||
static volatile VP8CPUInfo yuv_last_cpuinfo_used =
|
||||
(VP8CPUInfo)&yuv_last_cpuinfo_used;
|
||||
|
||||
void WebPInitSamplers(void) {
|
||||
if (last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
if (yuv_last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
|
||||
WebPSamplers[MODE_RGB] = YuvToRgbRow;
|
||||
WebPSamplers[MODE_RGBA] = YuvToRgbaRow;
|
||||
@ -153,7 +154,7 @@ void WebPInitSamplers(void) {
|
||||
}
|
||||
#endif // WEBP_USE_MIPS32
|
||||
}
|
||||
last_cpuinfo_used = VP8GetCPUInfo;
|
||||
yuv_last_cpuinfo_used = VP8GetCPUInfo;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user