1a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora// Copyright 2010 Google Inc. All Rights Reserved. 203d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora// 30406ce1417f76f2034833414dcecc9f56253640cVikas Arora// Use of this source code is governed by a BSD-style license 40406ce1417f76f2034833414dcecc9f56253640cVikas Arora// that can be found in the COPYING file in the root of the source 50406ce1417f76f2034833414dcecc9f56253640cVikas Arora// tree. An additional intellectual property rights grant can be found 60406ce1417f76f2034833414dcecc9f56253640cVikas Arora// in the file PATENTS. All contributing project authors may 70406ce1417f76f2034833414dcecc9f56253640cVikas Arora// be found in the AUTHORS file in the root of the source tree. 803d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora// ----------------------------------------------------------------------------- 903d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora// 1003d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora// Common types 1103d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora// 1203d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora// Author: Skal (pascal.massimino@gmail.com) 1303d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora 1403d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora#ifndef WEBP_WEBP_TYPES_H_ 1503d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora#define WEBP_WEBP_TYPES_H_ 1603d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora 17a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora#include <stddef.h> // for size_t 18a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora 1903d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora#ifndef _MSC_VER 2003d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora#include <inttypes.h> 21a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora#ifdef __STRICT_ANSI__ 22a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora#define WEBP_INLINE 23a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora#else /* __STRICT_ANSI__ */ 24a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora#define WEBP_INLINE inline 25a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora#endif 2603d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora#else 2703d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Aroratypedef signed char int8_t; 2803d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Aroratypedef unsigned char uint8_t; 2903d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Aroratypedef signed short int16_t; 3003d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Aroratypedef unsigned short uint16_t; 3103d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Aroratypedef signed int int32_t; 3203d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Aroratypedef unsigned int uint32_t; 3303d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Aroratypedef unsigned long long int uint64_t; 3403d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Aroratypedef long long int int64_t; 35a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora#define WEBP_INLINE __forceinline 3603d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora#endif /* _MSC_VER */ 3703d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora 38466727975bcc57c0c5597bcd0747a2fe4777b303Vikas Arora#ifndef WEBP_EXTERN 39466727975bcc57c0c5597bcd0747a2fe4777b303Vikas Arora// This explicitly marks library functions and allows for changing the 40466727975bcc57c0c5597bcd0747a2fe4777b303Vikas Arora// signature for e.g., Windows DLL builds. 41466727975bcc57c0c5597bcd0747a2fe4777b303Vikas Arora#define WEBP_EXTERN(type) extern type 42466727975bcc57c0c5597bcd0747a2fe4777b303Vikas Arora#endif /* WEBP_EXTERN */ 43466727975bcc57c0c5597bcd0747a2fe4777b303Vikas Arora 44a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora// Macro to check ABI compatibility (same major revision number) 45a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora#define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8)) 46a2415724fb3466168b2af5b08bd94ba732c0e753Vikas Arora 4703d5e34c70f174c16282b0efdc6bb9473df5f8f1Vikas Arora#endif /* WEBP_WEBP_TYPES_H_ */ 48