fix most of the warnings
This commit is contained in:
parent
2a885ca461
commit
a688f5278a
@ -1,6 +1,6 @@
|
||||
include build/platform-arch.mk
|
||||
SHAREDLIBSUFFIX = so
|
||||
CFLAGS += -Wall -fno-strict-aliasing -Wno-sign-compare -Wno-missing-braces -fPIC -DLINUX -DMT_ENABLED -MMD -MP
|
||||
CFLAGS += -Wall -fno-strict-aliasing -fPIC -DLINUX -DMT_ENABLED -MMD -MP
|
||||
LDFLAGS += -lpthread
|
||||
ifeq ($(ASM_ARCH), x86)
|
||||
ifeq ($(ENABLE64BIT), Yes)
|
||||
|
@ -228,10 +228,10 @@ typedef struct TagEncParamExt
|
||||
/*LTR settings*/
|
||||
bool bEnableLongTermReference; // 0: on, 1: off
|
||||
int iLTRRefNum;
|
||||
int iLtrMarkPeriod;
|
||||
unsigned int iLtrMarkPeriod;
|
||||
|
||||
/* multi-thread settings*/
|
||||
short iMultipleThreadIdc; // 1 # 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
|
||||
unsigned short iMultipleThreadIdc; // 1 # 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
|
||||
|
||||
/* Deblocking loop filter */
|
||||
int iLoopFilterDisableIdc; // 0: on, 1: off, 2: on except for slice boundaries
|
||||
|
@ -141,7 +141,7 @@ void H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, cons
|
||||
goto label_exit;
|
||||
}
|
||||
|
||||
if (fread (pBuf, 1, iFileSize, pH264File) != iFileSize) {
|
||||
if (fread (pBuf, 1, iFileSize, pH264File) != (uint32_t)iFileSize) {
|
||||
fprintf (stderr, "Unable to read whole file\n");
|
||||
goto label_exit;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ int ParseLayerConfig( CReadConfig & cRdLayerCfg, const int iLayer, SEncParamExt&
|
||||
} else if (strTag[0].compare ("FrameRateOut") == 0) {
|
||||
pDLayer->fFrameRate = (float)atof (strTag[1].c_str());
|
||||
}else if (strTag[0].compare ("ReconFile") == 0) {
|
||||
const int kiLen = strTag[1].length();
|
||||
const unsigned int kiLen = strTag[1].length();
|
||||
if (kiLen >= sizeof(sFileSet.sRecFileName[iLayer]))
|
||||
return -1;
|
||||
sFileSet.sRecFileName[iLayer][kiLen] = '\0';
|
||||
@ -487,7 +487,7 @@ int ParseCommandLine (int argc, char** argv, SSourcePicture* pSrcPic, SEncParamE
|
||||
}
|
||||
else if (!strcmp (pCommand, "-drec") && (n + 1 < argc)) {
|
||||
unsigned int iLayer = atoi (argv[n++]);
|
||||
const int iLen = strlen (argv[n]);
|
||||
const unsigned int iLen = strlen (argv[n]);
|
||||
if (iLen >= sizeof(sFileSet.sRecFileName[iLayer]))
|
||||
return 1;
|
||||
sFileSet.sRecFileName[iLayer][iLen] = '\0';
|
||||
|
@ -131,7 +131,7 @@ static const uint8_t g_kuiTableBIdx[2][8] = {
|
||||
},
|
||||
|
||||
{
|
||||
0, 1, 2, 3 ,
|
||||
0, 1, 2, 3,
|
||||
12, 13, 14, 15
|
||||
},
|
||||
};
|
||||
@ -573,7 +573,7 @@ void DeblockingIntraMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_
|
||||
}
|
||||
|
||||
void WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
|
||||
uint8_t nBS[2][4][4] = { 0 };
|
||||
uint8_t nBS[2][4][4] = {{{ 0 }}};
|
||||
|
||||
int32_t iMbXyIndex = pCurDqLayer->iMbXyIndex;
|
||||
int32_t iCurMbType = pCurDqLayer->pMbType[iMbXyIndex];
|
||||
@ -630,8 +630,8 @@ void WelsDeblockingFilterSlice (PWelsDecoderContext pCtx, PDeblockingFilterMbFun
|
||||
int32_t iMbWidth = pCurDqLayer->iMbWidth;
|
||||
int32_t iTotalMbCount = pSliceHeaderExt->sSliceHeader.pSps->uiTotalMbCount;
|
||||
|
||||
SDeblockingFilter pFilter = {0};
|
||||
|
||||
SDeblockingFilter pFilter;
|
||||
memset (&pFilter, 0, sizeof(pFilter));
|
||||
PFmo pFmo = pCtx->pFmo;
|
||||
int32_t iNextMbXyIndex = 0;
|
||||
int32_t iTotalNumMb = pCurDqLayer->sLayerInfo.sSliceInLayer.iTotalMbInCurSlice;
|
||||
|
@ -117,32 +117,32 @@ static const uint8_t g_kuiTableBIdx[2][8] = {
|
||||
|
||||
static const ALIGNED_DECLARE (int32_t, g_kiTableBlock8x8Idx[2][4][4], 16) = {
|
||||
{
|
||||
0, 0, 2, 2,
|
||||
0, 0, 2, 2,
|
||||
1, 1, 3, 3,
|
||||
1, 1, 3, 3
|
||||
{0, 0, 2, 2},
|
||||
{0, 0, 2, 2},
|
||||
{1, 1, 3, 3},
|
||||
{1, 1, 3, 3}
|
||||
},
|
||||
|
||||
{
|
||||
0, 0, 1, 1,
|
||||
0, 0, 1, 1,
|
||||
2, 2, 3, 3,
|
||||
2, 2, 3, 3
|
||||
{0, 0, 1, 1},
|
||||
{0, 0, 1, 1},
|
||||
{2, 2, 3, 3},
|
||||
{2, 2, 3, 3}
|
||||
}
|
||||
};
|
||||
static const ALIGNED_DECLARE (int32_t, g_kiTableBlock8x8NIdx[2][4][4], 16) = {
|
||||
{
|
||||
1, 1, 3, 3,
|
||||
0, 0, 2, 2,
|
||||
0, 0, 2, 2,
|
||||
1, 1, 3, 3
|
||||
{1, 1, 3, 3},
|
||||
{0, 0, 2, 2},
|
||||
{0, 0, 2, 2},
|
||||
{1, 1, 3, 3}
|
||||
},
|
||||
|
||||
{
|
||||
2, 2, 3, 3,
|
||||
0, 0, 1, 1,
|
||||
0, 0, 1, 1,
|
||||
2, 2, 3, 3
|
||||
{2, 2, 3, 3},
|
||||
{0, 0, 1, 1},
|
||||
{0, 0, 1, 1},
|
||||
{2, 2, 3, 3}
|
||||
}
|
||||
};
|
||||
|
||||
@ -584,7 +584,7 @@ void DeblockingIntraMb (DeblockingFunc* pfDeblocking, SMB* pCurMb, SDeblockingFi
|
||||
}
|
||||
|
||||
void DeblockingMbAvcbase (SWelsFuncPtrList* pFunc, SMB* pCurMb, SDeblockingFilter* pFilter) {
|
||||
uint8_t uiBS[2][4][4] = { 0 };
|
||||
uint8_t uiBS[2][4][4] = {{{ 0 }}};
|
||||
|
||||
Mb_Type uiCurMbType = pCurMb->uiMbType;
|
||||
int32_t iMbStride = pFilter->iMbStride;
|
||||
|
@ -177,10 +177,10 @@ int32_t ParamValidationExt (sWelsEncCtx*pCtx,SWelsSvcCodingParam* pCodingParam)
|
||||
SDLayerParam* fDlp = &pCodingParam->sDependencyLayers[i];
|
||||
const int32_t kiPicWidth = fDlp->iFrameWidth;
|
||||
const int32_t kiPicHeight = fDlp->iFrameHeight;
|
||||
int32_t iMbWidth = 0;
|
||||
int32_t iMbHeight = 0;
|
||||
uint32_t iMbWidth = 0;
|
||||
uint32_t iMbHeight = 0;
|
||||
int32_t iMbNumInFrame = 0;
|
||||
int32_t iMaxSliceNum = MAX_SLICES_NUM;
|
||||
uint32_t iMaxSliceNum = MAX_SLICES_NUM;
|
||||
if (kiPicWidth <= 0 || kiPicHeight <= 0) {
|
||||
WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid %d x %d in dependency layer settings!\n", kiPicWidth, kiPicHeight);
|
||||
return ENC_RETURN_UNSUPPORTED_PARA;
|
||||
@ -924,10 +924,10 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers
|
||||
int32_t iMbWidth;
|
||||
int32_t iCountMbNum; // count number of SMB in each spatial
|
||||
int32_t iSizeAllMbAlignCache; // cache line size aligned in each spatial
|
||||
} sMbSizeMap[MAX_DEPENDENCY_LAYER] = {0};
|
||||
int32_t iLineSizeY[MAX_DEPENDENCY_LAYER][2] = {0};
|
||||
int32_t iLineSizeUV[MAX_DEPENDENCY_LAYER][2] = {0};
|
||||
int32_t iMapSpatialIdx[MAX_DEPENDENCY_LAYER][2] = {0};
|
||||
} sMbSizeMap[MAX_DEPENDENCY_LAYER] = {{ 0 }};
|
||||
int32_t iLineSizeY[MAX_DEPENDENCY_LAYER][2] = {{ 0 }};
|
||||
int32_t iLineSizeUV[MAX_DEPENDENCY_LAYER][2] = {{ 0 }};
|
||||
int32_t iMapSpatialIdx[MAX_DEPENDENCY_LAYER][2] = {{ 0 }};
|
||||
int32_t iSizeDec = 0;
|
||||
int32_t iSizeEnc = 0;
|
||||
int32_t iCountLayersNeedCs[2] = {0};
|
||||
@ -1668,7 +1668,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) {
|
||||
|
||||
int32_t InitSliceSettings (SWelsSvcCodingParam* pCodingParam, const int32_t kiCpuCores, int16_t* pMaxSliceCount) {
|
||||
int32_t iSpatialIdx = 0, iSpatialNum = pCodingParam->iSpatialLayerNum;
|
||||
int16_t iMaxSliceCount = 0;
|
||||
uint16_t iMaxSliceCount = 0;
|
||||
|
||||
do {
|
||||
SDLayerParam* pDlp = &pCodingParam->sDependencyLayers[iSpatialIdx];
|
||||
|
@ -110,7 +110,7 @@ int32_t WelsSampleSad16x16_c (uint8_t* pSample1, int32_t iStride1, uint8_t* pSam
|
||||
|
||||
int32_t WelsSampleSatd4x4_c (uint8_t* pSample1, int32_t iStride1, uint8_t* pSample2, int32_t iStride2) {
|
||||
int32_t iSatdSum = 0;
|
||||
int32_t pSampleMix[4][4] = { 0 };
|
||||
int32_t pSampleMix[4][4] = {{ 0 }};
|
||||
int32_t iSample0, iSample1, iSample2, iSample3;
|
||||
int32_t i = 0;
|
||||
uint8_t* pSrc1 = pSample1;
|
||||
|
@ -206,7 +206,7 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx,
|
||||
int32_t iRunLen[MAX_THREADS_NUM] = {0};
|
||||
int32_t iSliceIdx = 0;
|
||||
|
||||
int32_t iNumMbInEachGom;
|
||||
int32_t iNumMbInEachGom = 0;
|
||||
SWelsSvcRc* pWelsSvcRc = &pCtx->pWelsSvcRc[iCurDid];
|
||||
if (pCtx->pSvcParam->bEnableRc) {
|
||||
iNumMbInEachGom = pWelsSvcRc->iNumberMbGom;
|
||||
|
@ -585,8 +585,8 @@ int32_t CWelsPreProcess::ColorspaceConvert (SWelsSvcCodingParam* pSvcParam, SPic
|
||||
|
||||
void CWelsPreProcess::BilateralDenoising (SPicture* pSrc, const int32_t kiWidth, const int32_t kiHeight) {
|
||||
int32_t iMethodIdx = METHOD_DENOISE;
|
||||
SPixMap sSrcPixMap = {0};
|
||||
|
||||
SPixMap sSrcPixMap;
|
||||
memset (&sSrcPixMap, 0, sizeof(sSrcPixMap));
|
||||
sSrcPixMap.pPixel[0] = pSrc->pData[0];
|
||||
sSrcPixMap.pPixel[1] = pSrc->pData[1];
|
||||
sSrcPixMap.pPixel[2] = pSrc->pData[2];
|
||||
@ -605,9 +605,10 @@ bool CWelsPreProcess::DetectSceneChange (SPicture* pCurPicture, SPicture* pRefPi
|
||||
bool bSceneChangeFlag = false;
|
||||
int32_t iMethodIdx = METHOD_SCENE_CHANGE_DETECTION;
|
||||
SSceneChangeResult sSceneChangeDetectResult = { SIMILAR_SCENE };
|
||||
SPixMap sSrcPixMap = {0};
|
||||
SPixMap sRefPixMap = {0};
|
||||
|
||||
SPixMap sSrcPixMap;
|
||||
SPixMap sRefPixMap;
|
||||
memset (&sSrcPixMap, 0, sizeof(sSrcPixMap));
|
||||
memset (&sRefPixMap, 0, sizeof(sRefPixMap));
|
||||
sSrcPixMap.pPixel[0] = pCurPicture->pData[0];
|
||||
sSrcPixMap.iSizeInBits = g_kiPixMapSizeInBits;
|
||||
sSrcPixMap.iStride[0] = pCurPicture->iLineSize[0];
|
||||
@ -635,9 +636,10 @@ bool CWelsPreProcess::DetectSceneChange (SPicture* pCurPicture, SPicture* pRefPi
|
||||
int32_t CWelsPreProcess::DownsamplePadding (SPicture* pSrc, SPicture* pDstPic, int32_t iSrcWidth, int32_t iSrcHeight,
|
||||
int32_t iShrinkWidth, int32_t iShrinkHeight, int32_t iTargetWidth, int32_t iTargetHeight) {
|
||||
int32_t iRet = 0;
|
||||
SPixMap sSrcPixMap = {0};
|
||||
SPixMap sDstPicMap = {0};
|
||||
|
||||
SPixMap sSrcPixMap;
|
||||
SPixMap sDstPicMap;
|
||||
memset (&sSrcPixMap, 0, sizeof(sSrcPixMap));
|
||||
memset (&sDstPicMap, 0, sizeof(sDstPicMap));
|
||||
sSrcPixMap.pPixel[0] = pSrc->pData[0];
|
||||
sSrcPixMap.pPixel[1] = pSrc->pData[1];
|
||||
sSrcPixMap.pPixel[2] = pSrc->pData[2];
|
||||
@ -683,8 +685,10 @@ void CWelsPreProcess::VaaCalculation (SVAAFrameInfo* pVaaInfo, SPicture* pCurPic
|
||||
pVaaInfo->sVaaCalcInfo.pRefY = pRefPicture->pData[0];
|
||||
{
|
||||
int32_t iMethodIdx = METHOD_VAA_STATISTICS;
|
||||
SPixMap sCurPixMap = {0};
|
||||
SPixMap sRefPixMap = {0};
|
||||
SPixMap sCurPixMap;
|
||||
SPixMap sRefPixMap;
|
||||
memset (&sCurPixMap, 0, sizeof(sCurPixMap));
|
||||
memset (&sRefPixMap, 0, sizeof(sRefPixMap));
|
||||
SVAACalcParam calc_param = {0};
|
||||
|
||||
sCurPixMap.pPixel[0] = pCurPicture->pData[0];
|
||||
@ -727,8 +731,10 @@ void CWelsPreProcess::BackgroundDetection (SVAAFrameInfo* pVaaInfo, SPicture* pC
|
||||
pVaaInfo->pRefV = pRefPicture->pData[2];
|
||||
|
||||
int32_t iMethodIdx = METHOD_BACKGROUND_DETECTION;
|
||||
SPixMap sSrcPixMap = {0};
|
||||
SPixMap sRefPixMap = {0};
|
||||
SPixMap sSrcPixMap;
|
||||
SPixMap sRefPixMap;
|
||||
memset (&sSrcPixMap, 0, sizeof(sSrcPixMap));
|
||||
memset (&sRefPixMap, 0, sizeof(sRefPixMap));
|
||||
SBGDInterface BGDParam = {0};
|
||||
|
||||
sSrcPixMap.pPixel[0] = pCurPicture->pData[0];
|
||||
@ -770,8 +776,10 @@ void CWelsPreProcess::AdaptiveQuantCalculation (SVAAFrameInfo* pVaaInfo, SPictur
|
||||
|
||||
{
|
||||
int32_t iMethodIdx = METHOD_ADAPTIVE_QUANT;
|
||||
SPixMap pSrc = {0};
|
||||
SPixMap pRef = {0};
|
||||
SPixMap pSrc;
|
||||
SPixMap pRef;
|
||||
memset (&pSrc, 0, sizeof(pSrc));
|
||||
memset (&pRef, 0, sizeof(pRef));
|
||||
int32_t iRet = 0;
|
||||
|
||||
pSrc.pPixel[0] = pCurPicture->pData[0];
|
||||
@ -858,8 +866,10 @@ void CWelsPreProcess::AnalyzePictureComplexity (sWelsEncCtx* pCtx, SPicture* pCu
|
||||
|
||||
{
|
||||
int32_t iMethodIdx = METHOD_COMPLEXITY_ANALYSIS;
|
||||
SPixMap sSrcPixMap = {0};
|
||||
SPixMap sRefPixMap = {0};
|
||||
SPixMap sSrcPixMap;
|
||||
SPixMap sRefPixMap;
|
||||
memset (&sSrcPixMap, 0, sizeof(SPixMap));
|
||||
memset (&sRefPixMap, 0, sizeof(SPixMap));
|
||||
int32_t iRet = 0;
|
||||
|
||||
sSrcPixMap.pPixel[0] = pCurPicture->pData[0];
|
||||
|
Loading…
Reference in New Issue
Block a user