mirror of
				https://github.com/webmproject/libwebp.git
				synced 2025-10-31 02:15:42 +01:00 
			
		
		
		
	picture_csp::InitGammaTables*: add missing TSan annotations
Change-Id: I66ca5b3e7b1614f861a9b68bd437f58b24cb1ebb
This commit is contained in:
		| @@ -85,9 +85,9 @@ int WebPPictureHasTransparency(const WebPPicture* picture) { | ||||
|  | ||||
| static int kLinearToGammaTab[kGammaTabSize + 1]; | ||||
| static uint16_t kGammaToLinearTab[256]; | ||||
| static int kGammaTablesOk = 0; | ||||
| static volatile int kGammaTablesOk = 0; | ||||
|  | ||||
| static void InitGammaTables(void) { | ||||
| static WEBP_TSAN_IGNORE_FUNCTION void InitGammaTables(void) { | ||||
|   if (!kGammaTablesOk) { | ||||
|     int v; | ||||
|     const double scale = (double)(1 << kGammaTabFix) / kGammaScale; | ||||
| @@ -126,7 +126,7 @@ static WEBP_INLINE int LinearToGamma(uint32_t base_value, int shift) { | ||||
|  | ||||
| #else | ||||
|  | ||||
| static void InitGammaTables(void) {} | ||||
| static WEBP_TSAN_IGNORE_FUNCTION void InitGammaTables(void) {} | ||||
| static WEBP_INLINE uint32_t GammaToLinear(uint8_t v) { return v; } | ||||
| static WEBP_INLINE int LinearToGamma(uint32_t base_value, int shift) { | ||||
|   return (int)(base_value << shift); | ||||
| @@ -180,9 +180,9 @@ typedef uint16_t fixed_y_t;   // unsigned type with extra YFIX precision for W | ||||
| #define kGammaF 2.2 | ||||
| static float kGammaToLinearTabF[MAX_Y_T + 1];   // size scales with Y_FIX | ||||
| static float kLinearToGammaTabF[kGammaTabSize + 2]; | ||||
| static int kGammaTablesFOk = 0; | ||||
| static volatile int kGammaTablesFOk = 0; | ||||
|  | ||||
| static void InitGammaTablesF(void) { | ||||
| static WEBP_TSAN_IGNORE_FUNCTION void InitGammaTablesF(void) { | ||||
|   if (!kGammaTablesFOk) { | ||||
|     int v; | ||||
|     const double norm = 1. / MAX_Y_T; | ||||
| @@ -215,7 +215,7 @@ static WEBP_INLINE int LinearToGammaF(float value) { | ||||
|  | ||||
| #else | ||||
|  | ||||
| static void InitGammaTablesF(void) {} | ||||
| static WEBP_TSAN_IGNORE_FUNCTION void InitGammaTablesF(void) {} | ||||
| static WEBP_INLINE float GammaToLinearF(int v) { | ||||
|   const float norm = 1.f / MAX_Y_T; | ||||
|   return norm * v; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user