remove some warings

This commit is contained in:
ruil2
2014-05-22 15:09:32 +08:00
parent 2db1123bec
commit fe05db7bca
2 changed files with 12 additions and 1 deletions

View File

@@ -64,7 +64,7 @@ namespace WelsSVCEnc {
*/ */
typedef struct TagRefList { typedef struct TagRefList {
SPicture* pShortRefList[1 + MAX_SHORT_REF_COUNT]; // reference list 0 - int16_t SPicture* pShortRefList[1 + MAX_SHORT_REF_COUNT]; // reference list 0 - int16_t
SPicture* pLongRefList[1 + MAX_LONG_REF_COUNT]; // reference list 1 - int32_t SPicture* pLongRefList[1 + MAX_REF_PIC_COUNT]; // reference list 1 - int32_t
SPicture* pNextBuffer; SPicture* pNextBuffer;
SPicture* pRef[1 + MAX_REF_PIC_COUNT]; // plus 1 for swap intend SPicture* pRef[1 + MAX_REF_PIC_COUNT]; // plus 1 for swap intend
uint8_t uiShortRefCount; uint8_t uiShortRefCount;

View File

@@ -67,12 +67,23 @@ WELSVP_NAMESPACE_BEGIN
#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y)) #define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y)) #define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
#ifndef WELS_SIGN
#define WELS_SIGN(a) ((int32_t)(a) >> 31) #define WELS_SIGN(a) ((int32_t)(a) >> 31)
#endif
#ifndef WELS_ABS
#define WELS_ABS(a) ((WELS_SIGN(a) ^ (int32_t)(a)) - WELS_SIGN(a)) #define WELS_ABS(a) ((WELS_SIGN(a) ^ (int32_t)(a)) - WELS_SIGN(a))
#endif
#define WELS_CLAMP(x, minv, maxv) WELS_MIN(WELS_MAX(x, minv), maxv) #define WELS_CLAMP(x, minv, maxv) WELS_MIN(WELS_MAX(x, minv), maxv)
#define ALIGNBYTES (16) /* Worst case is requiring alignment to an 16 byte boundary */ #define ALIGNBYTES (16) /* Worst case is requiring alignment to an 16 byte boundary */
#ifndef WELS_ALIGN
#define WELS_ALIGN(iInput) ((iInput+(ALIGNMENT-1)) & ~(ALIGNMENT-1)) #define WELS_ALIGN(iInput) ((iInput+(ALIGNMENT-1)) & ~(ALIGNMENT-1))
#endif
#define WELS_ALIGN2(iInput) ((iInput+1) & ~1) #define WELS_ALIGN2(iInput) ((iInput+1) & ~1)
#define WELS_ALIGN4(iInput) ((iInput+3) & ~3) #define WELS_ALIGN4(iInput) ((iInput+3) & ~3)
#define WELS_ALIGN8(iInput) ((iInput+7) & ~7) #define WELS_ALIGN8(iInput) ((iInput+7) & ~7)