mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
VP8EncDspCostInit*: add missing TSan annotations
Change-Id: I4cdb84bc8c9a8c6aa34b5773c8fb69e5810a9809
This commit is contained in:
parent
d97c143da6
commit
e3d9771aa1
@ -78,7 +78,12 @@ extern void VP8SetResidualCoeffsSSE2(const int16_t* const coeffs,
|
||||
VP8Residual* const res);
|
||||
#endif // WEBP_USE_SSE2
|
||||
|
||||
void VP8EncDspCostInit(void) {
|
||||
static volatile VP8CPUInfo cost_last_cpuinfo_used =
|
||||
(VP8CPUInfo)&cost_last_cpuinfo_used;
|
||||
|
||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInit(void) {
|
||||
if (cost_last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
|
||||
VP8GetResidualCost = GetResidualCost;
|
||||
VP8SetResidualCoeffs = SetResidualCoeffs;
|
||||
|
||||
@ -100,6 +105,8 @@ void VP8EncDspCostInit(void) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
cost_last_cpuinfo_used = VP8GetCPUInfo;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -173,7 +173,7 @@ static void SetResidualCoeffs(const int16_t* const coeffs,
|
||||
|
||||
extern WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPS32(void);
|
||||
|
||||
void VP8EncDspCostInitMIPS32(void) {
|
||||
void WEBP_TSAN_IGNORE_FUNCTION VP8EncDspCostInitMIPS32(void) {
|
||||
#if defined(WEBP_USE_MIPS32)
|
||||
VP8GetResidualCost = GetResidualCost;
|
||||
VP8SetResidualCoeffs = SetResidualCoeffs;
|
||||
|
@ -103,7 +103,7 @@ static int GetResidualCost(int ctx0, const VP8Residual* const res) {
|
||||
|
||||
extern WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPSdspR2(void);
|
||||
|
||||
void VP8EncDspCostInitMIPSdspR2(void) {
|
||||
void WEBP_TSAN_IGNORE_FUNCTION VP8EncDspCostInitMIPSdspR2(void) {
|
||||
#if defined(WEBP_USE_MIPS_DSP_R2)
|
||||
VP8GetResidualCost = GetResidualCost;
|
||||
#endif // WEBP_USE_MIPS_DSP_R2
|
||||
|
@ -189,7 +189,8 @@ typedef int (*VP8GetResidualCostFunc)(int ctx0,
|
||||
const struct VP8Residual* const res);
|
||||
extern VP8GetResidualCostFunc VP8GetResidualCost;
|
||||
|
||||
void VP8EncDspCostInit(void); // must be called first
|
||||
// must be called before anything using the above
|
||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInit(void);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Decoding
|
||||
|
Loading…
Reference in New Issue
Block a user