picture_csp::InitGammaTables*: add missing TSan annotations

Change-Id: I66ca5b3e7b1614f861a9b68bd437f58b24cb1ebb
This commit is contained in:
James Zern 2015-02-09 22:43:08 -08:00
parent 97f6aff874
commit 0ec4da960d

View File

@ -85,9 +85,9 @@ int WebPPictureHasTransparency(const WebPPicture* picture) {
static int kLinearToGammaTab[kGammaTabSize + 1]; static int kLinearToGammaTab[kGammaTabSize + 1];
static uint16_t kGammaToLinearTab[256]; 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) { if (!kGammaTablesOk) {
int v; int v;
const double scale = (double)(1 << kGammaTabFix) / kGammaScale; const double scale = (double)(1 << kGammaTabFix) / kGammaScale;
@ -126,7 +126,7 @@ static WEBP_INLINE int LinearToGamma(uint32_t base_value, int shift) {
#else #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 uint32_t GammaToLinear(uint8_t v) { return v; }
static WEBP_INLINE int LinearToGamma(uint32_t base_value, int shift) { static WEBP_INLINE int LinearToGamma(uint32_t base_value, int shift) {
return (int)(base_value << 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 #define kGammaF 2.2
static float kGammaToLinearTabF[MAX_Y_T + 1]; // size scales with Y_FIX static float kGammaToLinearTabF[MAX_Y_T + 1]; // size scales with Y_FIX
static float kLinearToGammaTabF[kGammaTabSize + 2]; 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) { if (!kGammaTablesFOk) {
int v; int v;
const double norm = 1. / MAX_Y_T; const double norm = 1. / MAX_Y_T;
@ -215,7 +215,7 @@ static WEBP_INLINE int LinearToGammaF(float value) {
#else #else
static void InitGammaTablesF(void) {} static WEBP_TSAN_IGNORE_FUNCTION void InitGammaTablesF(void) {}
static WEBP_INLINE float GammaToLinearF(int v) { static WEBP_INLINE float GammaToLinearF(int v) {
const float norm = 1.f / MAX_Y_T; const float norm = 1.f / MAX_Y_T;
return norm * v; return norm * v;