ref: 78e0ec613021861b1434b05eba0f4191a30de42d
parent: 3052b7ac6428aaf47dbc28fe81a2dc68852d1f8c
author: Martin Storsjö <martin@martin.st>
date: Fri May 15 07:09:11 EDT 2015
Convert tabs to spaces before comments
--- a/codec/common/inc/WelsThreadLib.h
+++ b/codec/common/inc/WelsThreadLib.h
@@ -60,7 +60,7 @@
#define WELS_THREAD_ROUTINE_TYPE DWORD WINAPI
#define WELS_THREAD_ROUTINE_RETURN(rc) return (DWORD)rc;
-#else // NON-WINDOWS
+#else // NON-WINDOWS
#include <stdlib.h>
#include <unistd.h>
--- a/codec/common/inc/copy_mb.h
+++ b/codec/common/inc/copy_mb.h
@@ -42,8 +42,8 @@
void WelsCopy8x4_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
void WelsCopy4x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
void WelsCopy8x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
-void WelsCopy8x16_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
-void WelsCopy16x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
+void WelsCopy8x16_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
+void WelsCopy16x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
void WelsCopy16x16_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
#if defined(__cplusplus)
--- a/codec/common/inc/wels_common_defs.h
+++ b/codec/common/inc/wels_common_defs.h
@@ -218,14 +218,14 @@
* Bit-stream auxiliary reading / writing
*/
typedef struct TagBitStringAux {
- uint8_t* pStartBuf; // buffer to start position
- uint8_t* pEndBuf; // buffer + length
+ uint8_t* pStartBuf; // buffer to start position
+ uint8_t* pEndBuf; // buffer + length
int32_t iBits; // count bits of overall bitstreaming input
intX_t iIndex; //only for cavlc usage
- uint8_t* pCurBuf; // current reading position
+ uint8_t* pCurBuf; // current reading position
uint32_t uiCurBits;
- int32_t iLeftBits; // count number of available bits left ([1, 8]),
+ int32_t iLeftBits; // count number of available bits left ([1, 8]),
// need pointer to next byte start position in case 0 bit left then 8 instead
} SBitStringAux, *PBitStringAux;
@@ -234,7 +234,7 @@
uint8_t uiForbiddenZeroBit;
uint8_t uiNalRefIdc;
EWelsNalUnitType eNalUnitType;
- uint8_t uiReservedOneByte; // only padding usage
+ uint8_t uiReservedOneByte; // only padding usage
} SNalUnitHeader, *PNalUnitHeader;
/* NAL Unit Header in scalable extension syntax, refer to Page 390 in JVT X201wcm */
@@ -244,7 +244,7 @@
// uint8_t reserved_one_bit;
bool bIdrFlag;
uint8_t uiPriorityId;
- int8_t iNoInterLayerPredFlag; // change as int8_t to support 3 values probably in encoder
+ int8_t iNoInterLayerPredFlag; // change as int8_t to support 3 values probably in encoder
uint8_t uiDependencyId;
uint8_t uiQualityId;
--- a/codec/common/src/WelsThreadLib.cpp
+++ b/codec/common/src/WelsThreadLib.cpp
@@ -299,12 +299,12 @@
}
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_name) {
#ifdef __APPLE__
- WELS_THREAD_ERROR_CODE err = sem_close (*event); // match with sem_open
+ WELS_THREAD_ERROR_CODE err = sem_close (*event); // match with sem_open
if (event_name)
sem_unlink (event_name);
return err;
#else
- WELS_THREAD_ERROR_CODE err = sem_destroy (*event); // match with sem_init
+ WELS_THREAD_ERROR_CODE err = sem_destroy (*event); // match with sem_init
free (*event);
return err;
#endif
@@ -322,7 +322,7 @@
}
WELS_THREAD_ERROR_CODE WelsEventWait (WELS_EVENT* event) {
- return sem_wait (*event); // blocking until signaled
+ return sem_wait (*event); // blocking until signaled
}
WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t dwMilliseconds) {
@@ -360,7 +360,7 @@
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking (uint32_t nCount,
WELS_EVENT* event_list, WELS_EVENT* master_event) {
uint32_t nIdx = 0;
- uint32_t uiAccessTime = 2; // 2 us once
+ uint32_t uiAccessTime = 2; // 2 us once
if (nCount == 0)
return WELS_THREAD_ERROR_WAIT_FAILED;
@@ -378,7 +378,7 @@
}
while (1) {
- nIdx = 0; // access each event by order
+ nIdx = 0; // access each event by order
while (nIdx < nCount) {
int32_t err = 0;
int32_t wait_count = 0;
@@ -399,7 +399,7 @@
// we do need access next event next time
++ nIdx;
}
- usleep (1); // switch to working threads
+ usleep (1); // switch to working threads
if (master_event != NULL) {
// A master event was used and was signalled, but none of the events in the
// list was found to be signalled, thus wait a little more when rechecking
@@ -423,7 +423,7 @@
return WELS_THREAD_ERROR_WAIT_FAILED;
while (1) {
- nIdx = 0; // access each event by order
+ nIdx = 0; // access each event by order
while (nIdx < nCount) {
const uint32_t kuiBitwiseFlag = (1 << nIdx);
--- a/codec/common/src/cpu.cpp
+++ b/codec/common/src/cpu.cpp
@@ -96,7 +96,7 @@
uiCPU |= WELS_CPU_CMOV;
}
if ((!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL)) ||
- (!strcmp ((const char*)chVendorName, CPU_Vendor_AMD))) { // confirmed_safe_unsafe_usage
+ (!strcmp ((const char*)chVendorName, CPU_Vendor_AMD))) { // confirmed_safe_unsafe_usage
if (uiFeatureD & 0x10000000) {
/* Multi-Threading checking: contains of multiple logic processors */
uiCPU |= WELS_CPU_HTT;
@@ -165,7 +165,7 @@
WelsCPUId (0x80000000, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
if ((!strcmp ((const char*)chVendorName, CPU_Vendor_AMD))
- && (uiFeatureA >= 0x80000001)) { // confirmed_safe_unsafe_usage
+ && (uiFeatureA >= 0x80000001)) { // confirmed_safe_unsafe_usage
WelsCPUId (0x80000001, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
if (uiFeatureD & 0x00400000) {
uiCPU |= WELS_CPU_MMXEXT;
@@ -175,7 +175,7 @@
}
}
- if (!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL)) { // confirmed_safe_unsafe_usage
+ if (!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL)) { // confirmed_safe_unsafe_usage
int32_t family, model;
WelsCPUId (1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
@@ -189,11 +189,11 @@
// get cache line size
if ((!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL))
- || ! (strcmp ((const char*)chVendorName, CPU_Vendor_CYRIX))) { // confirmed_safe_unsafe_usage
+ || ! (strcmp ((const char*)chVendorName, CPU_Vendor_CYRIX))) { // confirmed_safe_unsafe_usage
WelsCPUId (1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
CacheLineSize = (uiFeatureB & 0xff00) >>
- 5; // ((clflush_line_size >> 8) << 3), CLFLUSH_line_size * 8 = CacheLineSize_in_byte
+ 5; // ((clflush_line_size >> 8) << 3), CLFLUSH_line_size * 8 = CacheLineSize_in_byte
if (CacheLineSize == 128) {
uiCPU |= WELS_CPU_CACHELINE_128;
--- a/codec/common/src/crt_util_safe_x.cpp
+++ b/codec/common/src/crt_util_safe_x.cpp
@@ -54,7 +54,7 @@
#endif //_WIN32
#include "macros.h"
-#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms
+#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms
#if defined(_WIN32) && defined(_MSC_VER)
--- a/codec/common/src/deblocking_common.cpp
+++ b/codec/common/src/deblocking_common.cpp
@@ -56,23 +56,23 @@
bool bDetaQ2Q0 = WELS_ABS (q2 - q0) < iBeta;
if (bDetaP2P0) {
const int32_t p3 = pPix[-4 * iStrideX];
- pPix[-iStrideX] = (p2 + (p1 << 1) + (p0 << 1) + (q0 << 1) + q1 + 4) >> 3; //p0
- pPix[-2 * iStrideX] = (p2 + p1 + p0 + q0 + 2) >> 2; //p1
- pPix[-3 * iStrideX] = ((p3 << 1) + p2 + (p2 << 1) + p1 + p0 + q0 + 4) >> 3;//p2
+ pPix[-iStrideX] = (p2 + (p1 << 1) + (p0 << 1) + (q0 << 1) + q1 + 4) >> 3; //p0
+ pPix[-2 * iStrideX] = (p2 + p1 + p0 + q0 + 2) >> 2; //p1
+ pPix[-3 * iStrideX] = ((p3 << 1) + p2 + (p2 << 1) + p1 + p0 + q0 + 4) >> 3; //p2
} else {
- pPix[-1 * iStrideX] = ((p1 << 1) + p0 + q1 + 2) >> 2; //p0
+ pPix[-1 * iStrideX] = ((p1 << 1) + p0 + q1 + 2) >> 2; //p0
}
if (bDetaQ2Q0) {
const int32_t q3 = pPix[3 * iStrideX];
- pPix[0] = (p1 + (p0 << 1) + (q0 << 1) + (q1 << 1) + q2 + 4) >> 3; //q0
- pPix[iStrideX] = (p0 + q0 + q1 + q2 + 2) >> 2; //q1
- pPix[2 * iStrideX] = ((q3 << 1) + q2 + (q2 << 1) + q1 + q0 + p0 + 4) >> 3;//q2
+ pPix[0] = (p1 + (p0 << 1) + (q0 << 1) + (q1 << 1) + q2 + 4) >> 3; //q0
+ pPix[iStrideX] = (p0 + q0 + q1 + q2 + 2) >> 2; //q1
+ pPix[2 * iStrideX] = ((q3 << 1) + q2 + (q2 << 1) + q1 + q0 + p0 + 4) >> 3; //q2
} else {
- pPix[0] = ((q1 << 1) + q0 + p1 + 2) >> 2; //q0
+ pPix[0] = ((q1 << 1) + q0 + p1 + 2) >> 2; //q0
}
} else {
pPix[-iStrideX] = ((p1 << 1) + p0 + q1 + 2) >> 2; //p0
- pPix[ 0] = ((q1 << 1) + q0 + p1 + 2) >> 2; //q0
+ pPix[ 0] = ((q1 << 1) + q0 + p1 + 2) >> 2; //q0
}
}
pPix += iStrideY;
--- a/codec/common/src/expand_pic.cpp
+++ b/codec/common/src/expand_pic.cpp
@@ -51,8 +51,8 @@
uint8_t* pBottom = pDstLastLine + kiStrides;
// pad pTop and pBottom
- memcpy (pTop, pTmp, kiPicW); // confirmed_safe_unsafe_usage
- memcpy (pBottom, pDstLastLine, kiPicW); // confirmed_safe_unsafe_usage
+ memcpy (pTop, pTmp, kiPicW); // confirmed_safe_unsafe_usage
+ memcpy (pBottom, pDstLastLine, kiPicW); // confirmed_safe_unsafe_usage
// pad corners
memset (pTop - kiPaddingLen, kuiTL, kiPaddingLen); //pTop left
@@ -91,8 +91,8 @@
uint8_t* pBottom = pDstLastLine + kiStrides;
// pad pTop and pBottom
- memcpy (pTop, pTmp, kiPicW); // confirmed_safe_unsafe_usage
- memcpy (pBottom, pDstLastLine, kiPicW); // confirmed_safe_unsafe_usage
+ memcpy (pTop, pTmp, kiPicW); // confirmed_safe_unsafe_usage
+ memcpy (pBottom, pDstLastLine, kiPicW); // confirmed_safe_unsafe_usage
// pad corners
memset (pTop - kiPaddingLen, kuiTL, kiPaddingLen); //pTop left
@@ -160,7 +160,7 @@
pExpLuma (pPicY, iStride[0], kiWidthY, kiHeightY);
if (kiWidthUV >= 16) {
// fix coding picture size as 16x16
- const bool kbChrAligned = /*(iWidthUV >= 16) && */ ((kiWidthUV & 0x0F) == 0); // chroma planes: (16+iWidthUV) & 15
+ const bool kbChrAligned = /*(iWidthUV >= 16) && */ ((kiWidthUV & 0x0F) == 0); // chroma planes: (16+iWidthUV) & 15
pExpChrom[kbChrAligned] (pPicCb, iStride[1], kiWidthUV, kiHeightUV);
pExpChrom[kbChrAligned] (pPicCr, iStride[2], kiWidthUV, kiHeightUV);
} else {
--- a/codec/common/src/intra_pred_common.cpp
+++ b/codec/common/src/intra_pred_common.cpp
@@ -61,7 +61,7 @@
void WelsI16x16LumaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
int32_t iStridex15 = (kiStride << 4) - kiStride;
int32_t iPredStride = 16;
- int32_t iPredStridex15 = 240; //(iPredStride<<4)-iPredStride;
+ int32_t iPredStridex15 = 240; //(iPredStride<<4)-iPredStride;
uint8_t i = 15;
do {
--- a/codec/common/src/mc.cpp
+++ b/codec/common/src/mc.cpp
@@ -58,7 +58,7 @@
//iB = dx * (8 - dy);
//iC = (8 - dx) * dy;
//iD = dx * dy
-static const uint8_t g_kuiABCD[8][8][4] = { //g_kA[dy][dx], g_kB[dy][dx], g_kC[dy][dx], g_kD[dy][dx]
+static const uint8_t g_kuiABCD[8][8][4] = { //g_kA[dy][dx], g_kB[dy][dx], g_kC[dy][dx], g_kD[dy][dx]
{
{64, 0, 0, 0}, {56, 8, 0, 0}, {48, 16, 0, 0}, {40, 24, 0, 0},
{32, 32, 0, 0}, {24, 40, 0, 0}, {16, 48, 0, 0}, {8, 56, 0, 0}
--- a/codec/common/src/utils.cpp
+++ b/codec/common/src/utils.cpp
@@ -38,7 +38,7 @@
*************************************************************************************
*/
#include "utils.h"
-#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms
+#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms
#include "codec_app_def.h"
float WelsCalcPsnr (const void* kpTarPic,
const int32_t kiTarStride,
@@ -112,7 +112,7 @@
if (NULL == pTar || NULL == pRef)
return (-1.0f);
- for (y = 0; y < kiHeight; ++ y) { // OPTable !!
+ for (y = 0; y < kiHeight; ++ y) { // OPTable !!
for (x = 0; x < kiWidth; ++ x) {
const int32_t kiT = pTar[y * kiTarStride + x] - pRef[y * kiRefStride + x];
iSqe += kiT * kiT;
--- a/codec/common/src/welsCodecTrace.cpp
+++ b/codec/common/src/welsCodecTrace.cpp
@@ -39,7 +39,7 @@
#include <stdarg.h>
#include <string.h>
-#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms
+#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms
#include "welsCodecTrace.h"
#include "utils.h"
@@ -78,7 +78,7 @@
}
char pBuf[MAX_LOG_SIZE] = {0};
- WelsVsnprintf (pBuf, MAX_LOG_SIZE, Str_Format, vl); // confirmed_safe_unsafe_usage
+ WelsVsnprintf (pBuf, MAX_LOG_SIZE, Str_Format, vl); // confirmed_safe_unsafe_usage
if (m_fpTrace) {
m_fpTrace (m_pTraceCtx, iLevel, pBuf);
}
--- a/codec/console/common/inc/read_config.h
+++ b/codec/console/common/inc/read_config.h
@@ -64,5 +64,5 @@
unsigned int m_iLines;
};
-#endif // READ_CONFIG_H__
+#endif // READ_CONFIG_H__
--- a/codec/console/common/src/read_config.cpp
+++ b/codec/console/common/src/read_config.cpp
@@ -53,7 +53,7 @@
: m_pCfgFile (0)
, m_strCfgFileName (kpConfigFileName)
, m_iLines (0) {
- if (strlen (kpConfigFileName) > 0) { // confirmed_safe_unsafe_usage
+ if (strlen (kpConfigFileName) > 0) { // confirmed_safe_unsafe_usage
m_pCfgFile = fopen (kpConfigFileName, "r");
}
}
@@ -75,7 +75,7 @@
}
void CReadConfig::Openf (const char* kpStrFile) {
- if (kpStrFile != NULL && strlen (kpStrFile) > 0) { // confirmed_safe_unsafe_usage
+ if (kpStrFile != NULL && strlen (kpStrFile) > 0) { // confirmed_safe_unsafe_usage
m_strCfgFileName = kpStrFile;
m_pCfgFile = fopen (kpStrFile, "r");
}
--- a/codec/console/dec/src/h264dec.cpp
+++ b/codec/console/dec/src/h264dec.cpp
@@ -69,7 +69,7 @@
#endif
//using namespace WelsDec;
-//#define NO_DELAY_DECODING // For Demo interfaces test with no delay decoding
+//#define NO_DELAY_DECODING // For Demo interfaces test with no delay decoding
void H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, const char* kpOuputFileName,
int32_t& iWidth, int32_t& iHeight, const char* pOptionFileName, const char* pLengthFileName) {
@@ -129,7 +129,7 @@
if (pYuvFile == NULL) {
fprintf (stderr, "Can not open yuv file to output result of decoding..\n");
// any options
- //return; // can let decoder work in quiet mode, no writing any output
+ //return; // can let decoder work in quiet mode, no writing any output
} else
fprintf (stderr, "Sequence output file name: %s..\n", kpOuputFileName);
} else {
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -148,7 +148,7 @@
if (kiLen >= sizeof (sFileSet.sRecFileName[iLayer]))
return -1;
sFileSet.sRecFileName[iLayer][kiLen] = '\0';
- strncpy (sFileSet.sRecFileName[iLayer], strTag[1].c_str(), kiLen); // confirmed_safe_unsafe_usage
+ strncpy (sFileSet.sRecFileName[iLayer], strTag[1].c_str(), kiLen); // confirmed_safe_unsafe_usage
} else if (strTag[0].compare ("ProfileIdc") == 0) {
pDLayer->uiProfileIdc = (EProfileIdc)atoi (strTag[1].c_str());
} else if (strTag[0].compare ("FRExt") == 0) {
@@ -200,9 +200,9 @@
pDLayer->iDLayerQp = sLayerCtx.iDLayerQp;
pDLayer->sSliceCfg.uiSliceMode = sLayerCtx.sSliceCfg.uiSliceMode;
- memcpy (&pDLayer->sSliceCfg, &sLayerCtx.sSliceCfg, sizeof (SSliceConfig)); // confirmed_safe_unsafe_usage
+ memcpy (&pDLayer->sSliceCfg, &sLayerCtx.sSliceCfg, sizeof (SSliceConfig)); // confirmed_safe_unsafe_usage
memcpy (&pDLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0], &sLayerCtx.sSliceCfg.sSliceArgument.uiSliceMbNum[0],
- sizeof (sLayerCtx.sSliceCfg.sSliceArgument.uiSliceMbNum)); // confirmed_safe_unsafe_usage
+ sizeof (sLayerCtx.sSliceCfg.sSliceArgument.uiSliceMbNum)); // confirmed_safe_unsafe_usage
return 0;
}
@@ -539,7 +539,7 @@
if (iLen >= sizeof (sFileSet.sRecFileName[iLayer]))
return 1;
sFileSet.sRecFileName[iLayer][iLen] = '\0';
- strncpy (sFileSet.sRecFileName[iLayer], argv[n++], iLen); // confirmed_safe_unsafe_usage
+ strncpy (sFileSet.sRecFileName[iLayer], argv[n++], iLen); // confirmed_safe_unsafe_usage
} else if (!strcmp (pCommand, "-dw") && (n + 1 < argc)) {
unsigned int iLayer = atoi (argv[n++]);
SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
@@ -794,7 +794,7 @@
iTotalFrameMax = (int32_t)fs.uiFrameToBeCoded;
- if (cmResultSuccess != pPtrEnc->InitializeExt (&sSvcParam)) { // SVC encoder initialization
+ if (cmResultSuccess != pPtrEnc->InitializeExt (&sSvcParam)) { // SVC encoder initialization
fprintf (stderr, "SVC encoder Initialize failed\n");
iRet = 1;
goto INSIDE_MEM_FREE;
@@ -900,7 +900,7 @@
delete [] pUCArry;
}
#endif
- fwrite (pLayerBsInfo->pBsBuf, 1, iLayerSize, pFpBs); // write pure bit stream into file
+ fwrite (pLayerBsInfo->pBsBuf, 1, iLayerSize, pFpBs); // write pure bit stream into file
iFrameSize += iLayerSize;
}
++ iLayer;
@@ -910,7 +910,7 @@
fwrite (&iFrameSize, 1, sizeof (int), fTrackStream);
}
#endif//STICK_STREAM_SIZE
- ++ iActualFrameEncodedCount; // excluding skipped frame time
+ ++ iActualFrameEncodedCount; // excluding skipped frame time
} else {
fprintf (stderr, "EncodeFrame(), ret: %d, frame index: %d.\n", iEncFrames, iFrameIdx);
}
--- a/codec/decoder/core/inc/au_parser.h
+++ b/codec/decoder/core/inc/au_parser.h
@@ -159,7 +159,7 @@
* \note Call it in case eNalUnitType is NAL_UNIT_SEI.
*************************************************************************************
*/
-int32_t ParseSei (void* pSei, PBitStringAux pBsAux); // reserved Sei_Msg type
+int32_t ParseSei (void* pSei, PBitStringAux pBsAux); // reserved Sei_Msg type
/*!
*************************************************************************************
--- a/codec/decoder/core/inc/picture.h
+++ b/codec/decoder/core/inc/picture.h
@@ -82,7 +82,7 @@
int32_t iMbEcedNum;
int32_t iMbEcedPropNum;
int32_t iMbNum;
-} SPicture, *PPicture; // "Picture" declaration is comflict with Mac system
+} SPicture, *PPicture; // "Picture" declaration is comflict with Mac system
} // namespace WelsDec
--- a/codec/decoder/core/src/au_parser.cpp
+++ b/codec/decoder/core/src/au_parser.cpp
@@ -603,7 +603,7 @@
}
}
iErr = ParseSps (pCtx, pBs, &iPicWidth, &iPicHeight, pSrcNal, kSrcNalLen);
- if (ERR_NONE != iErr) { // modified for pSps/pSubsetSps invalid, 12/1/2009
+ if (ERR_NONE != iErr) { // modified for pSps/pSubsetSps invalid, 12/1/2009
if (pCtx->eErrorConMethod == ERROR_CON_DISABLE)
pCtx->iErrorCode |= dsNoParamSets;
else
@@ -625,7 +625,7 @@
}
}
iErr = ParsePps (pCtx, &pCtx->sPpsBuffer[0], pBs, pSrcNal, kSrcNalLen);
- if (ERR_NONE != iErr) { // modified for pps invalid, 12/1/2009
+ if (ERR_NONE != iErr) { // modified for pps invalid, 12/1/2009
if (pCtx->eErrorConMethod == ERROR_CON_DISABLE)
pCtx->iErrorCode |= dsNoParamSets;
else
@@ -934,7 +934,7 @@
WELS_READ_VERIFY (BsGetBits (pBs, 8, &uiCode)); // level_idc
uiLevelIdc = uiCode;
WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //seq_parameter_set_id
- if (uiCode >= MAX_SPS_COUNT) { // Modified to check invalid negative iSpsId, 12/1/2009
+ if (uiCode >= MAX_SPS_COUNT) { // Modified to check invalid negative iSpsId, 12/1/2009
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " iSpsId is out of range! \n");
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_SPS_ID_OVERFLOW);
}
@@ -1451,7 +1451,7 @@
* \note Call it in case eNalUnitType is NAL_UNIT_SEI.
*************************************************************************************
*/
-int32_t ParseSei (void* pSei, PBitStringAux pBsAux) { // reserved Sei_Msg type
+int32_t ParseSei (void* pSei, PBitStringAux pBsAux) { // reserved Sei_Msg type
return ERR_NONE;
@@ -1470,7 +1470,7 @@
*************************************************************************************
*/
int32_t SetScalingListValue (uint8_t* pScalingList, int iScalingListNum, bool* bUseDefaultScalingMatrixFlag,
- PBitStringAux pBsAux) { // reserved Sei_Msg type
+ PBitStringAux pBsAux) { // reserved Sei_Msg type
int iLastScale = 8;
int iNextScale = 8;
int iDeltaScale;
--- a/codec/decoder/core/src/deblocking.cpp
+++ b/codec/decoder/core/src/deblocking.cpp
@@ -921,7 +921,7 @@
} else {
++iNextMbXyIndex;
}
- if (-1 == iNextMbXyIndex || iNextMbXyIndex >= iTotalMbCount) { // slice group boundary or end of a frame
+ if (-1 == iNextMbXyIndex || iNextMbXyIndex >= iTotalMbCount) { // slice group boundary or end of a frame
break;
}
--- a/codec/decoder/core/src/decode_slice.cpp
+++ b/codec/decoder/core/src/decode_slice.cpp
@@ -120,7 +120,7 @@
} else {
++iNextMbXyIndex;
}
- if (-1 == iNextMbXyIndex || iNextMbXyIndex >= iTotalMbTargetLayer) { // slice group boundary or end of a frame
+ if (-1 == iNextMbXyIndex || iNextMbXyIndex >= iTotalMbTargetLayer) { // slice group boundary or end of a frame
break;
}
pCurLayer->iMbX = iNextMbXyIndex % pCurLayer->iMbWidth;
@@ -155,8 +155,8 @@
int32_t iMbXy = pCurLayer->iMbXyIndex;
int32_t i, iIndex, iOffset;
- WelsChromaDcIdct (pCurLayer->pScaledTCoeff[iMbXy] + 256); // 256 = 16*16
- WelsChromaDcIdct (pCurLayer->pScaledTCoeff[iMbXy] + 320); // 320 = 16*16 + 16*4
+ WelsChromaDcIdct (pCurLayer->pScaledTCoeff[iMbXy] + 256); // 256 = 16*16
+ WelsChromaDcIdct (pCurLayer->pScaledTCoeff[iMbXy] + 320); // 320 = 16*16 + 16*4
if (pCurLayer->pTransformSize8x8Flag[iMbXy]) {
for (i = 0; i < 4; i++) {
@@ -227,7 +227,7 @@
const int32_t kiX1 = kiOffset + kiXOffset[2];
const int32_t kiX2 = STRIDE + kiOffset;
const int32_t kiX3 = kiOffset + kiXOffset[3];
- const int32_t kiI4 = i << 2; // 4*i
+ const int32_t kiI4 = i << 2; // 4*i
const int32_t kiZ0 = pBlk[kiOffset] + pBlk[kiX1];
const int32_t kiZ1 = pBlk[kiOffset] - pBlk[kiX1];
const int32_t kiZ2 = pBlk[kiX2] - pBlk[kiX3];
@@ -1227,7 +1227,7 @@
pCurLayer->iMbXyIndex = iNextMbXyIndex;
do {
- if ((-1 == iNextMbXyIndex) || (iNextMbXyIndex >= kiCountNumMb)) { // slice group boundary or end of a frame
+ if ((-1 == iNextMbXyIndex) || (iNextMbXyIndex >= kiCountNumMb)) { // slice group boundary or end of a frame
break;
}
@@ -1564,7 +1564,7 @@
// check whether there is left bits to read next time in case multiple slices
iUsedBits = ((pBs->pCurBuf - pBs->pStartBuf) << 3) - (16 - pBs->iLeftBits);
// sub 1, for stop bit
- if ((iUsedBits == (pBs->iBits - 1)) && (0 >= pCurLayer->sLayerInfo.sSliceInLayer.iMbSkipRun)) { // slice boundary
+ if ((iUsedBits == (pBs->iBits - 1)) && (0 >= pCurLayer->sLayerInfo.sSliceInLayer.iMbSkipRun)) { // slice boundary
uiEosFlag = 1;
}
if (iUsedBits > (pBs->iBits -
@@ -1987,7 +1987,7 @@
// check whether there is left bits to read next time in case multiple slices
iUsedBits = ((pBs->pCurBuf - pBs->pStartBuf) << 3) - (16 - pBs->iLeftBits);
// sub 1, for stop bit
- if ((iUsedBits == (pBs->iBits - 1)) && (0 >= pCurLayer->sLayerInfo.sSliceInLayer.iMbSkipRun)) { // slice boundary
+ if ((iUsedBits == (pBs->iBits - 1)) && (0 >= pCurLayer->sLayerInfo.sSliceInLayer.iMbSkipRun)) { // slice boundary
uiEosFlag = 1;
}
if (iUsedBits > (pBs->iBits -
--- a/codec/decoder/core/src/decoder.cpp
+++ b/codec/decoder/core/src/decoder.cpp
@@ -272,7 +272,7 @@
*/
void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx) {
int32_t iCpuCores = 1;
- memset (pCtx, 0, sizeof (SWelsDecoderContext)); // fill zero first
+ memset (pCtx, 0, sizeof (SWelsDecoderContext)); // fill zero first
pCtx->sLogCtx = *pLogCtx;
pCtx->pArgDec = NULL;
@@ -369,14 +369,14 @@
pCtx->iPicQueueNumber = iPicQueueSize;
if (pCtx->pPicBuff[LIST_0] != NULL
&& pCtx->pPicBuff[LIST_0]->iCapacity ==
- iPicQueueSize) // comparing current picture queue size requested and previous allocation picture queue
- bNeedChangePicQueue = false;
+ iPicQueueSize) // comparing current picture queue size requested and previous allocation picture queue
+ bNeedChangePicQueue = false;
// HD based pic buffer need consider memory size consumed when switch from 720p to other lower size
WELS_VERIFY_RETURN_IF (ERR_NONE, pCtx->bHaveGotMemory && (kiPicWidth == pCtx->iImgWidthInPixel
- && kiPicHeight == pCtx->iImgHeightInPixel) && (!bNeedChangePicQueue)) // have same scaled buffer
+ && kiPicHeight == pCtx->iImgHeightInPixel) && (!bNeedChangePicQueue)) // have same scaled buffer
// sync update pRefList
- WelsResetRefPic (pCtx); // added to sync update ref list due to pictures are free
+ WelsResetRefPic (pCtx); // added to sync update ref list due to pictures are free
if (pCtx->bHaveGotMemory && (kiPicWidth == pCtx->iImgWidthInPixel && kiPicHeight == pCtx->iImgHeightInPixel)
&& pCtx->pPicBuff[LIST_0] != NULL && pCtx->pPicBuff[LIST_0]->iCapacity != iPicQueueSize) {
@@ -621,7 +621,7 @@
int32_t iSrcIdx = 0; //the index of source bit-stream till now after parsing one or more NALs
int32_t iSrcConsumed = 0; // consumed bit count of source bs
int32_t iDstIdx = 0; //the size of current NAL after 0x03 removal and 00 00 01 removal
- int32_t iSrcLength = 0; //the total size of current AU or NAL
+ int32_t iSrcLength = 0; //the total size of current AU or NAL
int32_t iRet = 0;
int32_t iConsumedBytes = 0;
int32_t iOffset = 0;
@@ -820,7 +820,7 @@
const int32_t kiPicWidth = kiMbWidth << 4;
const int32_t kiPicHeight = kiMbHeight << 4;
- iErr = WelsRequestMem (pCtx, kiMbWidth, kiMbHeight); // common memory used
+ iErr = WelsRequestMem (pCtx, kiMbWidth, kiMbHeight); // common memory used
if (ERR_NONE != iErr) {
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
"SyncPictureResolutionExt()::WelsRequestMem--buffer allocated failure.");
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -60,7 +60,7 @@
#ifdef LONG_TERM_REF
pCtx->bParamSetsLostFlag = false;
#else
- pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/2010
+ pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/2010
#endif //LONG_TERM_REF
if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) {
pCtx->bPrintFrameErrorTraceFlag = true;
@@ -354,7 +354,7 @@
WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //abs_diff_pic_num_minus1
WELS_CHECK_SE_UPPER_ERROR_NOLOG (uiCode, (uint32_t) (1 << pSps->uiLog2MaxFrameNum), "abs_diff_pic_num_minus1",
GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_REORDERING));
- pRefPicListReordering->sReorderingSyn[iList][iIdx].uiAbsDiffPicNumMinus1 = uiCode; // uiAbsDiffPicNumMinus1
+ pRefPicListReordering->sReorderingSyn[iList][iIdx].uiAbsDiffPicNumMinus1 = uiCode; // uiAbsDiffPicNumMinus1
} else if (kuiIdc == 2) {
WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_pic_num
pRefPicListReordering->sReorderingSyn[iList][iIdx].uiLongTermPicNum = uiCode;
@@ -1186,7 +1186,7 @@
++ uiActualIdx;
}
if (uiActualIdx ==
- pCurAu->uiActualUnitsNum) { // no found IDR nal within incoming AU, need exit to avoid mosaic issue, 11/19/2009
+ pCurAu->uiActualUnitsNum) { // no found IDR nal within incoming AU, need exit to avoid mosaic issue, 11/19/2009
pCtx->sDecoderStatistics.uiIDRLostNum++;
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
@@ -1215,7 +1215,7 @@
pCtx->sMb.iMbHeight = (kiMaxHeight + 15) >> 4;
if (pCtx->bInitialDqLayersMem && kiMaxWidth <= pCtx->iPicWidthReq
- && kiMaxHeight <= pCtx->iPicHeightReq) // have same dimension memory, skipped
+ && kiMaxHeight <= pCtx->iPicHeightReq) // have same dimension memory, skipped
return ERR_NONE;
@@ -1270,7 +1270,7 @@
sizeof (
int8_t) * MB_PARTITION_SIZE, "pCtx->sMb.pSubMbType[]");
pCtx->sMb.pSliceIdc[i] = (int32_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t),
- "pCtx->sMb.pSliceIdc[]"); // using int32_t for slice_idc, 4/21/2010
+ "pCtx->sMb.pSliceIdc[]"); // using int32_t for slice_idc, 4/21/2010
pCtx->sMb.pResidualPredFlag[i] = (int8_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t),
"pCtx->sMb.pResidualPredFlag[]");
//pCtx->sMb.pMotionPredFlag[i] = (uint8_t *) WelsMallocz(pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof(uint8_t), "pCtx->sMb.pMotionPredFlag[]");
@@ -2146,7 +2146,7 @@
GetI4LumaIChromaAddrTable (pCtx->iDecBlockOffsetArray, pCtx->pDec->iLinesize[0], pCtx->pDec->iLinesize[1]);
if (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId) { // confirmed pNalCur will never be NULL
- break; // Per formance it need not to decode the remaining bits any more due to given uiLayerDqId required, 9/2/2009
+ break; // Per formance it need not to decode the remaining bits any more due to given uiLayerDqId required, 9/2/2009
}
memset (&pLayerInfo, 0, sizeof (SLayerInfo));
--- a/codec/decoder/core/src/fmo.cpp
+++ b/codec/decoder/core/src/fmo.cpp
@@ -139,7 +139,7 @@
pFmo->iCountMbNum = iNumMb;
if (kpPps->uiNumSliceGroups < 2 && iNumMb > 0) { // only one slice group, exactly it is single slice based
- memset (pFmo->pMbAllocMap, 0, iNumMb * sizeof (int8_t)); // for safe
+ memset (pFmo->pMbAllocMap, 0, iNumMb * sizeof (int8_t)); // for safe
pFmo->iSliceGroupCount = 1;
--- a/codec/decoder/core/src/manage_dec_ref.cpp
+++ b/codec/decoder/core/src/manage_dec_ref.cpp
@@ -213,7 +213,7 @@
&& (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) { //check;
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "WelsReorderRefList()::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d",
pSliceHeader->iSpsId, ppRefList[i]->iSpsId);
- pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.--
+ pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.--
return ERR_INFO_REFERENCE_PIC_LOST;
} else {
break;
@@ -230,7 +230,7 @@
&& (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) { //check;
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "WelsReorderRefList()::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d",
pSliceHeader->iSpsId, ppRefList[i]->iSpsId);
- pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.--
+ pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.--
return ERR_INFO_REFERENCE_PIC_LOST;
} else {
break;
--- a/codec/decoder/core/src/memmgr_nal_unit.cpp
+++ b/codec/decoder/core/src/memmgr_nal_unit.cpp
@@ -101,7 +101,7 @@
PAccessUnit pTmp = NULL;
int32_t iIdx = 0;
- if (MemInitNalList (&pTmp, kiExpSize)) // request new list with expanding
+ if (MemInitNalList (&pTmp, kiExpSize)) // request new list with expanding
return 1;
do {
@@ -115,7 +115,7 @@
pTmp->uiEndPos = (*ppAu)->uiEndPos;
pTmp->bCompletedAuFlag = (*ppAu)->bCompletedAuFlag;
- MemFreeNalList (ppAu); // free old list
+ MemFreeNalList (ppAu); // free old list
*ppAu = pTmp;
return 0;
}
@@ -130,16 +130,16 @@
PAccessUnit pAu = *ppAu;
PNalUnit pNu = NULL;
- if (pAu->uiAvailUnitsNum >= pAu->uiCountUnitsNum) { // need expand list
+ if (pAu->uiAvailUnitsNum >= pAu->uiCountUnitsNum) { // need expand list
const uint32_t kuiExpandingSize = pAu->uiCountUnitsNum + (MAX_NAL_UNIT_NUM_IN_AU >> 1);
if (ExpandNalUnitList (ppAu, pAu->uiCountUnitsNum, kuiExpandingSize))
- return NULL; // out of memory
+ return NULL; // out of memory
pAu = *ppAu;
}
- pNu = pAu->pNalUnitsList[pAu->uiAvailUnitsNum++]; // ready for next nal position
+ pNu = pAu->pNalUnitsList[pAu->uiAvailUnitsNum++]; // ready for next nal position
- memset (pNu, 0, sizeof (SNalUnit)); // Please do not remove this for cache intend!!
+ memset (pNu, 0, sizeof (SNalUnit)); // Please do not remove this for cache intend!!
return pNu;
}
--- a/codec/decoder/core/src/rec_mb.cpp
+++ b/codec/decoder/core/src/rec_mb.cpp
@@ -547,8 +547,8 @@
uint8_t uiCbpC = pDqLayer->pCbp[iMBXY] >> 4;
if (1 == uiCbpC || 2 == uiCbpC) {
- WelsChromaDcIdct (pScoeffLevel + 256); // 256 = 16*16
- WelsChromaDcIdct (pScoeffLevel + 320); // 256 = 16*16
+ WelsChromaDcIdct (pScoeffLevel + 256); // 256 = 16*16
+ WelsChromaDcIdct (pScoeffLevel + 320); // 256 = 16*16
for (i = 0; i < 2; i++) {
int16_t* pRS = pScoeffLevel + 256 + (i << 6);
uint8_t* pPred = pDqLayer->pPred[i + 1];
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -59,7 +59,7 @@
#include "manage_dec_ref.h"
}
#include "error_code.h"
-#include "crt_util_safe_x.h" // Safe CRT routines like util for cross platforms
+#include "crt_util_safe_x.h" // Safe CRT routines like util for cross platforms
#include <time.h>
#if defined(_WIN32) /*&& defined(_DEBUG)*/
@@ -471,7 +471,7 @@
m_pDecContext->bInstantDecFlag = false; //reset no-delay flag
if (m_pDecContext->iErrorCode) {
EWelsNalUnitType eNalType =
- NAL_UNIT_UNSPEC_0; //for NBR, IDR frames are expected to decode as followed if error decoding an IDR currently
+ NAL_UNIT_UNSPEC_0; //for NBR, IDR frames are expected to decode as followed if error decoding an IDR currently
eNalType = m_pDecContext->sCurNalHead.eNalUnitType;
--- a/codec/encoder/core/inc/as264_common.h
+++ b/codec/encoder/core/inc/as264_common.h
@@ -50,7 +50,7 @@
/****************************************************************************
* Options for algorithm, usually change bitrate
****************************************************************************/
-#define DISABLE_FMO_FEATURE //
+#define DISABLE_FMO_FEATURE //
/****************************************************************************
* Options for optimization, not change bitrate
@@ -59,7 +59,7 @@
#define SINGLE_REF_FRAME // need to disable it when use multi-reference
-#if defined(WELS_TESTBED) // for SGE testing
+#if defined(WELS_TESTBED) // for SGE testing
#define ENABLE_FRAME_DUMP
#ifdef FRAME_INFO_OUTPUT
@@ -68,7 +68,7 @@
#endif//WELS_TESTBED
-#if defined(__UNITTEST__) // for unittest
+#if defined(__UNITTEST__) // for unittest
#ifndef ENABLE_FRAME_DUMP
#define ENABLE_FRAME_DUMP
#endif//ENABLE_FRAME_DUMP
@@ -80,7 +80,7 @@
//
//#define FRAME_INFO_OUTPUT
//#define LAYER_INFO_OUTPUT
-//#define SLICE_INFO_OUTPUT // useful in multiple slice coding track
+//#define SLICE_INFO_OUTPUT // useful in multiple slice coding track
//#define MB_TYPES_INFO_OUTPUT
--- a/codec/encoder/core/inc/encoder.h
+++ b/codec/encoder/core/inc/encoder.h
@@ -116,7 +116,7 @@
/**********************************************************************************
* memzero Function
***********************************************************************************/
-void WelsSetMemZero_c (void* pDst, int32_t iSize); // confirmed_safe_unsafe_usage
+void WelsSetMemZero_c (void* pDst, int32_t iSize); // confirmed_safe_unsafe_usage
#if defined(__cplusplus)
extern "C" {
--- a/codec/encoder/core/inc/encoder_context.h
+++ b/codec/encoder/core/inc/encoder_context.h
@@ -55,7 +55,7 @@
#include "crt_util_safe_x.h"
#include "utils.h"
-#include "mt_defs.h" // for multiple threadin,
+#include "mt_defs.h" // for multiple threadin,
#include "WelsThreadLib.h"
namespace WelsEnc {
--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -336,7 +336,7 @@
uiIntraPeriod = pCodingParam.uiIntraPeriod;// intra period (multiple of GOP size as desired)
if (uiIntraPeriod == (uint32_t) (-1))
uiIntraPeriod = 0;
- else if (uiIntraPeriod & (uiGopSize - 1)) // none multiple of GOP size
+ else if (uiIntraPeriod & (uiGopSize - 1)) // none multiple of GOP size
uiIntraPeriod = ((uiIntraPeriod + uiGopSize - 1) / uiGopSize) * uiGopSize;
if (((pCodingParam.iNumRefFrame != AUTO_REF_PIC_COUNT)
@@ -400,7 +400,7 @@
= pCodingParam.sSpatialLayers[iIdxSpatial].sSliceCfg.sSliceArgument.uiSliceNum;
const int32_t kiLesserSliceNum = ((MAX_SLICES_NUM < MAX_SLICES_NUM_TMP) ? MAX_SLICES_NUM : MAX_SLICES_NUM_TMP);
memcpy (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum,
- pCodingParam.sSpatialLayers[iIdxSpatial].sSliceCfg.sSliceArgument.uiSliceMbNum, // confirmed_safe_unsafe_usage
+ pCodingParam.sSpatialLayers[iIdxSpatial].sSliceCfg.sSliceArgument.uiSliceMbNum, // confirmed_safe_unsafe_usage
kiLesserSliceNum * sizeof (uint32_t)) ;
pSpatialLayer->iDLayerQp = pCodingParam.sSpatialLayers[iIdxSpatial].iDLayerQp;
@@ -454,7 +454,7 @@
int8_t iMaxTemporalId = 0;
memset (pDlp->uiCodingIdx2TemporalId, INVALID_TEMPORAL_ID, sizeof (pDlp->uiCodingIdx2TemporalId));
- pSpatialLayer->uiProfileIdc = uiProfileIdc; // PRO_BASELINE, PRO_SCALABLE_BASELINE;
+ pSpatialLayer->uiProfileIdc = uiProfileIdc; // PRO_BASELINE, PRO_SCALABLE_BASELINE;
iNotCodedMask = (1 << (kuiLogFactorInOutRate + kuiLogFactorMaxInRate)) - 1;
for (uint32_t uiFrameIdx = 0; uiFrameIdx <= uiGopSize; ++ uiFrameIdx) {
--- a/codec/encoder/core/inc/svc_encode_slice.h
+++ b/codec/encoder/core/inc/svc_encode_slice.h
@@ -76,8 +76,8 @@
int32_t WelsPSliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice, const bool kbIsHighestDlayerFlag);
//encapsulation func: store base rec, highest Dependency Layer(only one quality) rec, single layer rec
-int32_t WelsISliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice); // for intra non-dynamic slice
-int32_t WelsISliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice); // for intra dynamic slice
+int32_t WelsISliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice); // for intra non-dynamic slice
+int32_t WelsISliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice); // for intra dynamic slice
int32_t WelsCodePSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice);
int32_t WelsCodePOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice);
@@ -94,9 +94,9 @@
void AddSliceBoundary (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
int32_t iNextSliceFirstMbIdx, const int32_t kiLastMbIdxInPartition);
int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pMd,
- const int32_t kiSliceFirstMbXY); // for inter non-dynamic slice
+ const int32_t kiSliceFirstMbXY); // for inter non-dynamic slice
int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pMd,
- const int32_t kiSliceFirstMbXY); // for inter dynamic slice
+ const int32_t kiSliceFirstMbXY); // for inter dynamic slice
bool DynSlcJudgeSliceBoundaryStepBack (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
--- a/codec/encoder/core/inc/wels_const.h
+++ b/codec/encoder/core/inc/wels_const.h
@@ -34,7 +34,7 @@
#ifndef WELS_CONST_H__
#define WELS_CONST_H__
-#include "as264_common.h" // to communicate with specific macros there, 3/18/2010
+#include "as264_common.h" // to communicate with specific macros there, 3/18/2010
#include "codec_app_def.h"
#include "wels_const_common.h"
--- a/codec/encoder/core/src/au_set.cpp
+++ b/codec/encoder/core/src/au_set.cpp
@@ -243,13 +243,13 @@
BsWriteBits (pLocalBitStringAux, 8, pSps->uiProfileIdc);
- BsWriteOneBit (pLocalBitStringAux, pSps->bConstraintSet0Flag); // bConstraintSet0Flag
- BsWriteOneBit (pLocalBitStringAux, pSps->bConstraintSet1Flag); // bConstraintSet1Flag
- BsWriteOneBit (pLocalBitStringAux, pSps->bConstraintSet2Flag); // bConstraintSet2Flag
- BsWriteOneBit (pLocalBitStringAux, pSps->bConstraintSet3Flag); // bConstraintSet3Flag
- BsWriteBits (pLocalBitStringAux, 4, 0); // reserved_zero_4bits, equal to 0
- BsWriteBits (pLocalBitStringAux, 8, pSps->iLevelIdc); // iLevelIdc
- BsWriteUE (pLocalBitStringAux, pSps->uiSpsId + pSpsIdDelta[pSps->uiSpsId]); // seq_parameter_set_id
+ BsWriteOneBit (pLocalBitStringAux, pSps->bConstraintSet0Flag); // bConstraintSet0Flag
+ BsWriteOneBit (pLocalBitStringAux, pSps->bConstraintSet1Flag); // bConstraintSet1Flag
+ BsWriteOneBit (pLocalBitStringAux, pSps->bConstraintSet2Flag); // bConstraintSet2Flag
+ BsWriteOneBit (pLocalBitStringAux, pSps->bConstraintSet3Flag); // bConstraintSet3Flag
+ BsWriteBits (pLocalBitStringAux, 4, 0); // reserved_zero_4bits, equal to 0
+ BsWriteBits (pLocalBitStringAux, 8, pSps->iLevelIdc); // iLevelIdc
+ BsWriteUE (pLocalBitStringAux, pSps->uiSpsId + pSpsIdDelta[pSps->uiSpsId]); // seq_parameter_set_id
if (PRO_SCALABLE_BASELINE == pSps->uiProfileIdc || PRO_SCALABLE_HIGH == pSps->uiProfileIdc ||
PRO_HIGH == pSps->uiProfileIdc || PRO_HIGH10 == pSps->uiProfileIdc ||
@@ -262,26 +262,26 @@
BsWriteOneBit (pLocalBitStringAux, 0); //seq_scaling_matrix_present_flag
}
- BsWriteUE (pLocalBitStringAux, pSps->uiLog2MaxFrameNum - 4); // log2_max_frame_num_minus4
- BsWriteUE (pLocalBitStringAux, 0/*pSps->uiPocType*/); // pic_order_cnt_type
- BsWriteUE (pLocalBitStringAux, pSps->iLog2MaxPocLsb - 4); // log2_max_pic_order_cnt_lsb_minus4
+ BsWriteUE (pLocalBitStringAux, pSps->uiLog2MaxFrameNum - 4); // log2_max_frame_num_minus4
+ BsWriteUE (pLocalBitStringAux, 0/*pSps->uiPocType*/); // pic_order_cnt_type
+ BsWriteUE (pLocalBitStringAux, pSps->iLog2MaxPocLsb - 4); // log2_max_pic_order_cnt_lsb_minus4
- BsWriteUE (pLocalBitStringAux, pSps->iNumRefFrames); // max_num_ref_frames
+ BsWriteUE (pLocalBitStringAux, pSps->iNumRefFrames); // max_num_ref_frames
BsWriteOneBit (pLocalBitStringAux, pSps->bGapsInFrameNumValueAllowedFlag); //gaps_in_frame_numvalue_allowed_flag
- BsWriteUE (pLocalBitStringAux, pSps->iMbWidth - 1); // pic_width_in_mbs_minus1
- BsWriteUE (pLocalBitStringAux, pSps->iMbHeight - 1); // pic_height_in_map_units_minus1
- BsWriteOneBit (pLocalBitStringAux, true/*pSps->bFrameMbsOnlyFlag*/); // bFrameMbsOnlyFlag
+ BsWriteUE (pLocalBitStringAux, pSps->iMbWidth - 1); // pic_width_in_mbs_minus1
+ BsWriteUE (pLocalBitStringAux, pSps->iMbHeight - 1); // pic_height_in_map_units_minus1
+ BsWriteOneBit (pLocalBitStringAux, true/*pSps->bFrameMbsOnlyFlag*/); // bFrameMbsOnlyFlag
- BsWriteOneBit (pLocalBitStringAux, 0/*pSps->bDirect8x8InferenceFlag*/); // direct_8x8_inference_flag
- BsWriteOneBit (pLocalBitStringAux, pSps->bFrameCroppingFlag); // bFrameCroppingFlag
+ BsWriteOneBit (pLocalBitStringAux, 0/*pSps->bDirect8x8InferenceFlag*/); // direct_8x8_inference_flag
+ BsWriteOneBit (pLocalBitStringAux, pSps->bFrameCroppingFlag); // bFrameCroppingFlag
if (pSps->bFrameCroppingFlag) {
- BsWriteUE (pLocalBitStringAux, pSps->sFrameCrop.iCropLeft); // frame_crop_left_offset
- BsWriteUE (pLocalBitStringAux, pSps->sFrameCrop.iCropRight); // frame_crop_right_offset
- BsWriteUE (pLocalBitStringAux, pSps->sFrameCrop.iCropTop); // frame_crop_top_offset
- BsWriteUE (pLocalBitStringAux, pSps->sFrameCrop.iCropBottom); // frame_crop_bottom_offset
+ BsWriteUE (pLocalBitStringAux, pSps->sFrameCrop.iCropLeft); // frame_crop_left_offset
+ BsWriteUE (pLocalBitStringAux, pSps->sFrameCrop.iCropRight); // frame_crop_right_offset
+ BsWriteUE (pLocalBitStringAux, pSps->sFrameCrop.iCropTop); // frame_crop_top_offset
+ BsWriteUE (pLocalBitStringAux, pSps->sFrameCrop.iCropBottom); // frame_crop_bottom_offset
}
if (bBaseLayer) {
- BsWriteOneBit (pLocalBitStringAux, true); // vui_parameters_present_flag
+ BsWriteOneBit (pLocalBitStringAux, true); // vui_parameters_present_flag
WelsWriteVUI (pSps, pBitStringAux);
} else {
BsWriteOneBit (pLocalBitStringAux, false);
--- a/codec/encoder/core/src/decode_mb_aux.cpp
+++ b/codec/encoder/core/src/decode_mb_aux.cpp
@@ -172,8 +172,8 @@
for (i = 0; i < 4; i ++) { //horizon
int32_t iIdx = i << 2;
- const int32_t kiHorSumU = pDct[iIdx] + pDct[iIdx + 2]; // add 0-2
- const int32_t kiHorDelU = pDct[iIdx] - pDct[iIdx + 2]; // sub 0-2
+ const int32_t kiHorSumU = pDct[iIdx] + pDct[iIdx + 2]; // add 0-2
+ const int32_t kiHorDelU = pDct[iIdx] - pDct[iIdx + 2]; // sub 0-2
const int32_t kiHorSumD = pDct[iIdx + 1] + (pDct[iIdx + 3] >> 1);
const int32_t kiHorDelD = (pDct[iIdx + 1] >> 1) - pDct[iIdx + 3];
--- a/codec/encoder/core/src/encoder.cpp
+++ b/codec/encoder/core/src/encoder.cpp
@@ -52,7 +52,7 @@
#include "svc_base_layer_md.h"
#include "svc_mode_decision.h"
#include "set_mb_syn_cavlc.h"
-#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross_platforms
+#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross_platforms
#include "slice_multi_threading.h"
// global function pointers definition
@@ -131,7 +131,7 @@
pSrcPic->iColorFormat = kiColorspace | videoFormatVFlip;
break;
default:
- return 2; // any else?
+ return 2; // any else?
}
return 0;
@@ -286,7 +286,7 @@
pEncCtx->eNalPriority = NRI_PRI_HIGHEST;
// rc_init_gop
- } else { // B pictures are not supported now, any else?
+ } else { // B pictures are not supported now, any else?
assert (0);
}
@@ -380,7 +380,7 @@
if (NULL == pCurPicture || NULL == kpFileName || kiDid >= MAX_DEPENDENCY_LAYER)
return;
- if (strlen (kpFileName) > 0) // confirmed_safe_unsafe_usage
+ if (strlen (kpFileName) > 0) // confirmed_safe_unsafe_usage
pDumpRecFile = WelsFopen (kpFileName, openMode);
else {
char sDependencyRecFileName[16] = {0};
@@ -407,7 +407,7 @@
iWrittenSize = WelsFwrite (pSrc + j * kiStrideY, 1, kiLumaWidth, pDumpRecFile);
assert (iWrittenSize == kiLumaWidth);
if (iWrittenSize < kiLumaWidth) {
- assert (0); // make no sense for us if writing failed
+ assert (0); // make no sense for us if writing failed
WelsFclose (pDumpRecFile);
return;
}
@@ -420,7 +420,7 @@
iWrittenSize = WelsFwrite (pSrc + j * kiStrideUV, 1, kiChromaWidth, pDumpRecFile);
assert (iWrittenSize == kiChromaWidth);
if (iWrittenSize < kiChromaWidth) {
- assert (0); // make no sense for us if writing failed
+ assert (0); // make no sense for us if writing failed
WelsFclose (pDumpRecFile);
return;
}
@@ -474,7 +474,7 @@
iWrittenSize = WelsFwrite (pSrc + j * kiStrideY, 1, kiLumaWidth, pDumpRecFile);
assert (iWrittenSize == kiLumaWidth);
if (iWrittenSize < kiLumaWidth) {
- assert (0); // make no sense for us if writing failed
+ assert (0); // make no sense for us if writing failed
WelsFclose (pDumpRecFile);
return;
}
@@ -487,7 +487,7 @@
iWrittenSize = WelsFwrite (pSrc + j * kiStrideUV, 1, kiChromaWidth, pDumpRecFile);
assert (iWrittenSize == kiChromaWidth);
if (iWrittenSize < kiChromaWidth) {
- assert (0); // make no sense for us if writing failed
+ assert (0); // make no sense for us if writing failed
WelsFclose (pDumpRecFile);
return;
}
@@ -501,7 +501,7 @@
/***********************************************************************************/
-void WelsSetMemZero_c (void* pDst, int32_t iSize) { // confirmed_safe_unsafe_usage
+void WelsSetMemZero_c (void* pDst, int32_t iSize) { // confirmed_safe_unsafe_usage
memset (pDst, 0, iSize);
}
}
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -51,7 +51,7 @@
#include "deblocking.h"
#include "ref_list_mgr_svc.h"
#include "ls_defines.h"
-#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms
+#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms
#include "slice_multi_threading.h"
#include "measure_time.h"
#include "svc_set_mb_syn.h"
@@ -64,8 +64,8 @@
SLayerBSInfo* pLayerBsInfo,
int32_t* pNalIdxInLayer,
int32_t* pLayerSize,
- int32_t iFirstMbInPartition, // first mb inclusive in partition
- int32_t iEndMbInPartition, // end mb exclusive in partition
+ int32_t iFirstMbInPartition, // first mb inclusive in partition
+ int32_t iEndMbInPartition, // end mb exclusive in partition
int32_t iStartSliceIdx
);
@@ -453,7 +453,7 @@
pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
break;
}
- if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom
+ if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom
//check uiSliceNum and set uiSliceMbNum with current uiSliceNum
if (!GomValidCheckSliceNum (iMbWidth, iMbHeight, &pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum)) {
WelsLog (pLogCtx, WELS_LOG_WARNING,
@@ -469,7 +469,7 @@
}
assert (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > 1);
} else if (!CheckFixedSliceNumMultiSliceSetting (iMbNumInFrame,
- &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
+ &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
//check uiSliceMbNum with current uiSliceNum
WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!",
pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);
@@ -501,13 +501,13 @@
}
if (!CheckRasterMultiSliceSetting (iMbNumInFrame,
- &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
+ &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!",
pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);
return ENC_RETURN_UNSUPPORTED_PARA;
}
if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0
- || pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) { // verify interleave mode settings
+ || pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) { // verify interleave mode settings
WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) in SM_RASTER_SLICE settings!",
pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);
return ENC_RETURN_UNSUPPORTED_PARA;
@@ -548,7 +548,7 @@
return ENC_RETURN_UNSUPPORTED_PARA;
}
if (!CheckRowMbMultiSliceSetting (iMbWidth,
- &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
+ &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!",
pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);
return ENC_RETURN_UNSUPPORTED_PARA;
@@ -1178,7 +1178,7 @@
}
}
// fix issue in case single pSlice coding might be inclusive exist in variant spatial layer setting, also introducing multi-pSlice modes
- else { // only one pSlice
+ else { // only one pSlice
SSlice* pSlice = &pDqLayer->sLayerInfo.pSliceInLayer[0];
pSlice->uiSliceIdx = 0;
pSlice->pSliceBsa = & (*ppCtx)->pOut->sBsWrite;
@@ -1410,8 +1410,8 @@
uint8_t* pBaseDec = NULL, *pBaseEnc = NULL, *pBaseMbX = NULL, *pBaseMbY = NULL;
struct {
int32_t iMbWidth;
- int32_t iCountMbNum; // count number of SMB in each spatial
- int32_t iSizeAllMbAlignCache; // cache line size aligned in each spatial
+ 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 }};
@@ -1607,7 +1607,7 @@
i = 0;
while (i < kiMbHeight) {
- memcpy (pMbIndexX, pRowX, kiLineSize); // confirmed_safe_unsafe_usage
+ memcpy (pMbIndexX, pRowX, kiLineSize); // confirmed_safe_unsafe_usage
pMbIndexX += kiMbWidth;
++ i;
@@ -1630,7 +1630,7 @@
int16_t* pMbIndexY = pPtr->pMbIndexY[iSpatialIdx] + i * kiMbWidth;
if (i < kiMbHeight) {
- memcpy (pMbIndexY, pRowY, kiLineSize); // confirmed_safe_unsafe_usage
+ memcpy (pMbIndexY, pRowY, kiLineSize); // confirmed_safe_unsafe_usage
}
}
++ i;
@@ -2205,7 +2205,7 @@
}
#if defined(MEMORY_MONITOR)
- assert (pMa->WelsGetMemoryUsage() == 0); // ensure all memory free well
+ assert (pMa->WelsGetMemoryUsage() == 0); // ensure all memory free well
#endif//MEMORY_MONITOR
if ((*ppCtx)->pMemAlign != NULL) {
@@ -2277,7 +2277,7 @@
pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
break;
}
- if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom
+ if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom
//check uiSliceNum and set uiSliceMbNum with current uiSliceNum
if (!GomValidCheckSliceNum (kiMbWidth, kiMbHeight, &pDlp->sSliceCfg.sSliceArgument.uiSliceNum)) {
WelsLog (pLogCtx, WELS_LOG_WARNING,
@@ -2292,7 +2292,7 @@
return ENC_RETURN_INVALIDINPUT;
}
} else if (!CheckFixedSliceNumMultiSliceSetting (kiMbNumInFrame,
- &pDlp->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
+ &pDlp->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
//check uiSliceMbNum with current uiSliceNum
WelsLog (pLogCtx, WELS_LOG_ERROR,
"InitSliceSettings(), invalid uiSliceMbNum (%d) settings!,now turn to SM_SINGLE_SLICE type",
@@ -2400,7 +2400,7 @@
uiCpuCores = pCodingParam->iMultipleThreadIdc;
else {
if (uiCpuCores ==
- 0) // cpuid not supported or doesn't expose the number of cores, use high level system API as followed to detect number of pysical/logic processor
+ 0) // cpuid not supported or doesn't expose the number of cores, use high level system API as followed to detect number of pysical/logic processor
uiCpuCores = DynamicDetectCpuCores();
// So far so many cpu cores up to MAX_THREADS_NUM mean for server platforms,
// for client application here it is constrained by maximal to MAX_THREADS_NUM
@@ -2475,7 +2475,7 @@
FreeMemorySvc (&pCtx);
return iRet;
}
- memcpy (pCtx->pSvcParam, pCodingParam, sizeof (SWelsSvcCodingParam)); // confirmed_safe_unsafe_usage
+ memcpy (pCtx->pSvcParam, pCodingParam, sizeof (SWelsSvcCodingParam)); // confirmed_safe_unsafe_usage
pCtx->pFuncList = (SWelsFuncPtrList*)pCtx->pMemAlign->WelsMalloc (sizeof (SWelsFuncPtrList), "SWelsFuncPtrList");
if (NULL == pCtx->pFuncList) {
@@ -2639,7 +2639,7 @@
if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) {
WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);
WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
- res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
+ res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..",
iThreadIdx,
res);
@@ -2844,7 +2844,7 @@
pCurDq->pDecPic = pDecPic;
- if (fDlp->sSliceCfg.uiSliceMode == SM_DYN_SLICE) // need get extra slices for update
+ if (fDlp->sSliceCfg.uiSliceMode == SM_DYN_SLICE) // need get extra slices for update
iSliceCount = GetInitialSliceNum (pCurDq->iMbWidth, pCurDq->iMbHeight, &fDlp->sSliceCfg);
else
iSliceCount = GetCurrentSliceNum (pCurDq->pSliceEncCtx);
@@ -3146,7 +3146,7 @@
sParaSetOffsetVariable->iParaSetIdDelta[kiEncId] = uiNextIdInBs -
kiEncId; //for current parameter set, change its id_delta
//write pso pData for next update:
- sParaSetOffsetVariable->bUsedParaSetIdInBs[uiNextIdInBs] = true; // update current used_id
+ sParaSetOffsetVariable->bUsedParaSetIdInBs[uiNextIdInBs] = true; // update current used_id
//prepare for next update:
// find the next avaibable iId
@@ -3716,7 +3716,7 @@
pCtx->pFuncList->pfRc.pfWelsUpdateMaxBrWindowStatus (pCtx, iSpatialNum, pSrcPic->uiTimeStamp);
}
- if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
+ if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
++ pCtx->iCodingIndex;
pFbi->eFrameType = videoFrameTypeSkip;
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
@@ -3879,16 +3879,16 @@
&& (pCtx->iNumRef0 > 0)) ? pCtx->pRefList0[0] : NULL,
iCurDid, (pCtx->eSliceType == P_SLICE) && pSvcParam->bEnableBackgroundDetection);
WelsUpdateRefSyntax (pCtx, pCtx->iPOC,
- eFrameType); //get reordering syntax used for writing slice header and transmit to encoder.
- PrefetchReferencePicture (pCtx, eFrameType); // update reference picture for current pDq layer
+ eFrameType); //get reordering syntax used for writing slice header and transmit to encoder.
+ PrefetchReferencePicture (pCtx, eFrameType); // update reference picture for current pDq layer
pCtx->pFuncList->pfRc.pfWelsRcPictureInit (pCtx, pSrcPic->uiTimeStamp);
- PreprocessSliceCoding (pCtx); // MUST be called after pfWelsRcPictureInit() and WelsInitCurrentLayer()
+ PreprocessSliceCoding (pCtx); // MUST be called after pfWelsRcPictureInit() and WelsInitCurrentLayer()
//TODO Complexity Calculation here for screen content
iLayerSize = 0;
- if (SM_SINGLE_SLICE == pParam->sSliceCfg.uiSliceMode) { // only one slice within a sQualityStat layer
+ if (SM_SINGLE_SLICE == pParam->sSliceCfg.uiSliceMode) { // only one slice within a sQualityStat layer
int32_t iSliceSize = 0;
int32_t iPayloadSize = 0;
@@ -3948,7 +3948,7 @@
return ENC_RETURN_UNEXPECTED;
}
- if (pSvcParam->iCountThreadsNum >= iSliceCount) { //THREAD_FULLY_FIRE_MODE
+ if (pSvcParam->iCountThreadsNum >= iSliceCount) { //THREAD_FULLY_FIRE_MODE
#if defined(MT_DEBUG)
int64_t t_bs_append = 0;
#endif
@@ -3986,7 +3986,7 @@
t_bs_append, pCtx->iCodingIndex, iCurDid, 0);
}
#endif//MT_DEBUG
- } else { //THREAD_PICK_UP_MODE
+ } else { //THREAD_PICK_UP_MODE
int32_t iNumThreadsRunning = 0;
int32_t iNumThreadsScheduled = 0;
int32_t iIndexOfSliceToBeCoded = 0;
@@ -4026,7 +4026,7 @@
WelsEventSignal (&pCtx->pSliceThreading->pThreadMasterEvent[iEventId]);
++ iIndexOfSliceToBeCoded;
- } else { // no other slices left for coding
+ } else { // no other slices left for coding
-- iNumThreadsRunning;
}
}
@@ -4320,7 +4320,7 @@
#ifdef ENABLE_FRAME_DUMP
DumpRecFrame (fsnr, &pSvcParam->sDependencyLayers[pSvcParam->iSpatialLayerNum - 1].sRecFileName[0],
- pSvcParam->iSpatialLayerNum - 1, pCtx->bRecFlag, pCtx->pCurDqLayer); // pDecPic: final reconstruction output
+ pSvcParam->iSpatialLayerNum - 1, pCtx->bRecFlag, pCtx->pCurDqLayer); // pDecPic: final reconstruction output
pCtx->bRecFlag = true;
#endif//ENABLE_FRAME_DUMP
@@ -4431,7 +4431,7 @@
bNeedReset = true;
}
- if (!bNeedReset) { // Check its picture resolutions/quality settings respectively in each dependency layer
+ if (!bNeedReset) { // Check its picture resolutions/quality settings respectively in each dependency layer
iIndexD = 0;
assert (pOldParam->iSpatialLayerNum == pNewParam->iSpatialLayerNum);
do {
@@ -4628,7 +4628,7 @@
pOldDlpInternal->iDecompositionStages = pNewDlpInternal->iDecompositionStages;
memcpy (pOldDlpInternal->uiCodingIdx2TemporalId, pNewDlpInternal->uiCodingIdx2TemporalId,
- sizeof (pOldDlpInternal->uiCodingIdx2TemporalId)); // confirmed_safe_unsafe_usage
+ sizeof (pOldDlpInternal->uiCodingIdx2TemporalId)); // confirmed_safe_unsafe_usage
++ iIndexD;
} while (iIndexD < pOldParam->iSpatialLayerNum);
@@ -4829,8 +4829,8 @@
SLayerBSInfo* pLayerBsInfo,
int32_t* pNalIdxInLayer,
int32_t* pLayerSize,
- int32_t iFirstMbInPartition, // first mb inclusive in partition
- int32_t iEndMbInPartition, // end mb exclusive in partition
+ int32_t iFirstMbInPartition, // first mb inclusive in partition
+ int32_t iEndMbInPartition, // end mb exclusive in partition
int32_t iStartSliceIdx
) {
@@ -4860,7 +4860,7 @@
int32_t iSliceSize = 0;
int32_t iPayloadSize = 0;
- if (iSliceIdx >= (pSliceCtx->iMaxSliceNumConstraint - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[]
+ if (iSliceIdx >= (pSliceCtx->iMaxSliceNumConstraint - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[]
if (pCtx->iActiveThreadsNum == 1) {
//only single thread support re-alloc now
if (DynSliceRealloc (pCtx, pFrameBSInfo, pLayerBsInfo)) {
@@ -4909,7 +4909,7 @@
#endif//SLICE_INFO_OUTPUT
++ iNalIdxInLayer;
- iSliceIdx += kiSliceStep; //if uiSliceIdx is not continuous
+ iSliceIdx += kiSliceStep; //if uiSliceIdx is not continuous
iAnyMbLeftInPartition = iEndMbInPartition - (1 + pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId]);
}
--- a/codec/encoder/core/src/get_intra_predictor.cpp
+++ b/codec/encoder/core/src/get_intra_predictor.cpp
@@ -95,7 +95,7 @@
const uint8_t kuiVec2[4] = {kuiHor2, kuiHor2, kuiHor2, kuiHor2};
const uint8_t kuiVec3[4] = {kuiHor3, kuiHor3, kuiHor3, kuiHor3};
const uint8_t kuiVec4[4] = {kuiHor4, kuiHor4, kuiHor4, kuiHor4};
- ENFORCE_STACK_ALIGN_1D (uint8_t, uiSrc, 16, 16) // TobeCont'd about assign opt as follows
+ ENFORCE_STACK_ALIGN_1D (uint8_t, uiSrc, 16, 16) // TobeCont'd about assign opt as follows
ST32 (&uiSrc[0], LD32 (kuiVec1));
ST32 (&uiSrc[4], LD32 (kuiVec2));
ST32 (&uiSrc[8], LD32 (kuiVec3));
@@ -419,7 +419,7 @@
uint8_t i = 7;
do {
- const uint8_t kuiLeft = pRef[iStridex7 - 1]; // pLeft value
+ const uint8_t kuiLeft = pRef[iStridex7 - 1]; // pLeft value
uint64_t kuiSrc64 = (uint64_t) (0x0101010101010101ULL * kuiLeft);
ST64 (pPred + iI8x8Stridex7, kuiSrc64);
--- a/codec/encoder/core/src/mv_pred.cpp
+++ b/codec/encoder/core/src/mv_pred.cpp
@@ -156,7 +156,7 @@
ST32 (pCurMb->pRefIndex, kuiRef32);
// update pMv range from 0~15
- memcpy (pCurMb->sMv, uiMvBuf, sizeof (uiMvBuf)); // confirmed_safe_unsafe_usage
+ memcpy (pCurMb->sMv, uiMvBuf, sizeof (uiMvBuf)); // confirmed_safe_unsafe_usage
/*
* blocks 0: 7~10, 1: 13~16, 2: 19~22, 3: 25~28
@@ -209,7 +209,7 @@
const uint16_t kuiRef16 = BUTTERFLY1x2 (kiRef);
ST16 (&pCurMb->pRefIndex[ (kiPartIdx >> 2)], kuiRef16);
- memcpy (&pCurMb->sMv[kiScan4Idx], uiMvBuf, sizeof (uiMvBuf)); // confirmed_safe_unsafe_usage
+ memcpy (&pCurMb->sMv[kiScan4Idx], uiMvBuf, sizeof (uiMvBuf)); // confirmed_safe_unsafe_usage
/*
* blocks 0: g_kuiCache30ScanIdx[iPartIdx]~g_kuiCache30ScanIdx[iPartIdx]+3, 1: g_kuiCache30ScanIdx[iPartIdx]+6~g_kuiCache30ScanIdx[iPartIdx]+9
--- a/codec/encoder/core/src/property.cpp
+++ b/codec/encoder/core/src/property.cpp
@@ -38,7 +38,7 @@
*************************************************************************************
*/
#include "property.h"
-#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross_platforms
+#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross_platforms
namespace WelsEnc {
#define WELS_CODE_NAME "Wels"
#define WELS_LIB_NAME "Encoder"
@@ -64,11 +64,11 @@
if (NULL == pBuf)
return 0;
- iLen = (int32_t)strlen (WELS_CODE_NAME); // confirmed_safe_unsafe_usage
+ iLen = (int32_t)strlen (WELS_CODE_NAME); // confirmed_safe_unsafe_usage
if (iSize <= iLen)
return 0;
- WelsStrncpy (pBuf, iSize, WELS_CODE_NAME); // confirmed_safe_unsafe_usage
+ WelsStrncpy (pBuf, iSize, WELS_CODE_NAME); // confirmed_safe_unsafe_usage
return iLen;
}
@@ -89,7 +89,7 @@
if (iSize <= iLen)
return 0;
- WelsStrncpy (pBuf, iSize, WELS_LIB_NAME); // confirmed_safe_unsafe_usage
+ WelsStrncpy (pBuf, iSize, WELS_LIB_NAME); // confirmed_safe_unsafe_usage
return iLen;
}
@@ -110,7 +110,7 @@
if (iSize <= iLen)
return 0;
- WelsStrncpy (pBuf, iSize, WELS_VERSION_STR); // confirmed_safe_unsafe_usage
+ WelsStrncpy (pBuf, iSize, WELS_VERSION_STR); // confirmed_safe_unsafe_usage
return iLen;
}
@@ -131,7 +131,7 @@
if (iSize <= iLen)
return 0;
- WelsStrncpy (pBuf, iSize, WELS_IDENT); // confirmed_safe_unsafe_usage
+ WelsStrncpy (pBuf, iSize, WELS_IDENT); // confirmed_safe_unsafe_usage
return iLen;
}
--- a/codec/encoder/core/src/ratectl.cpp
+++ b/codec/encoder/core/src/ratectl.cpp
@@ -121,7 +121,7 @@
pWelsSvcRc->iNumberMbFrame = iMbWidth * (pDLayerParam->iVideoHeight >> 4);
pWelsSvcRc->iSliceNum = pSliceCtx->iSliceNumInFrame;
- pWelsSvcRc->iRcVaryPercentage = pEncCtx->pSvcParam->iBitsVaryPercentage; // % -- for temp
+ pWelsSvcRc->iRcVaryPercentage = pEncCtx->pSvcParam->iBitsVaryPercentage; // % -- for temp
pWelsSvcRc->iRcVaryRatio = pWelsSvcRc->iRcVaryPercentage;
pWelsSvcRc->iSkipBufferRatio = SKIP_RATIO;
@@ -665,13 +665,13 @@
} else {
//globe decision
iBitsRatio = 10000 * iLeftBits / (iTargetLeftBits + 1);
- if (iBitsRatio < 8409) //2^(-1.5/6)*10000
+ if (iBitsRatio < 8409) //2^(-1.5/6)*10000
pSOverRc->iCalculatedQpSlice += 2;
- else if (iBitsRatio < 9439) //2^(-0.5/6)*10000
+ else if (iBitsRatio < 9439) //2^(-0.5/6)*10000
pSOverRc->iCalculatedQpSlice += 1;
- else if (iBitsRatio > 10600) //2^(0.5/6)*10000
+ else if (iBitsRatio > 10600) //2^(0.5/6)*10000
pSOverRc->iCalculatedQpSlice -= 1;
- else if (iBitsRatio > 11900) //2^(1.5/6)*10000
+ else if (iBitsRatio > 11900) //2^(1.5/6)*10000
pSOverRc->iCalculatedQpSlice -= 2;
}
@@ -884,7 +884,7 @@
if (pWelsSvcRc->iBufferFullnessPadding < kiBufferThreshold) {
pWelsSvcRc->iPaddingSize = -pWelsSvcRc->iBufferFullnessPadding;
- pWelsSvcRc->iPaddingSize >>= 3; // /8
+ pWelsSvcRc->iPaddingSize >>= 3; // /8
pWelsSvcRc->iBufferFullnessPadding = 0;
} else
pWelsSvcRc->iPaddingSize = 0;
@@ -996,7 +996,7 @@
SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
if (pEncCtx->eSliceType == I_SLICE) {
- if (0 == pWelsSvcRc->iIdrNum) { //iIdrNum == 0 means encoder has been initialed
+ if (0 == pWelsSvcRc->iIdrNum) { //iIdrNum == 0 means encoder has been initialed
RcInitRefreshParameter (pEncCtx);
}
}
@@ -1296,7 +1296,7 @@
int32_t iLumaQp = pWelsSvcRc->iLastCalculatedQScale;
//decide one frame bits allocated
if (pEncCtx->eSliceType == I_SLICE) {
- if (0 == pWelsSvcRc->iIdrNum) { //iIdrNum == 0 means encoder has been initialed
+ if (0 == pWelsSvcRc->iIdrNum) { //iIdrNum == 0 means encoder has been initialed
RcInitRefreshParameter (pEncCtx);
double dBpp = 0.05;
if ((pDLayerParam->fFrameRate > EPSN) && (pDLayerParam->iVideoWidth && pDLayerParam->iVideoHeight))
--- a/codec/encoder/core/src/ref_list_mgr_svc.cpp
+++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp
@@ -48,7 +48,7 @@
// LTR mark
pLtr->iLTRMarkMode = LTR_DIRECT_MARK;
pLtr->iLTRMarkSuccessNum = 0; //successful marked num
- pLtr->bLTRMarkingFlag = false; //decide whether current frame marked as LTR
+ pLtr->bLTRMarkingFlag = false; //decide whether current frame marked as LTR
pLtr->bLTRMarkEnable = false; //when LTR is confirmed and the interval is no smaller than the marking period
pLtr->iCurLtrIdx = 0;
memset (&pLtr->iLastLtrIdx , 0 , sizeof (pLtr->iLastLtrIdx)) ;
@@ -295,7 +295,7 @@
if (pRefList->uiLongRefCount > 0) {
memmove (&pRefList->pLongRefList[1], &pRefList->pLongRefList[0],
- pRefList->uiLongRefCount * sizeof (SPicture*)); // confirmed_safe_unsafe_usage
+ pRefList->uiLongRefCount * sizeof (SPicture*)); // confirmed_safe_unsafe_usage
}
pLongRefList[0] = pShortRefList[i];
pRefList->uiLongRefCount++;
@@ -364,7 +364,7 @@
return false;
if (NULL != pCtx->pDecPic) {
-#if !defined(ENABLE_FRAME_DUMP) // to save complexity, 1/6/2009
+#if !defined(ENABLE_FRAME_DUMP) // to save complexity, 1/6/2009
if ((pParamD->iHighestTemporalId == 0) || (kuiTid < pParamD->iHighestTemporalId))
#endif// !ENABLE_FRAME_DUMP
// Expanding picture for future reference
@@ -409,7 +409,7 @@
DeleteSTRFromShortList (pCtx, 0);
}
}
- } else { // in case IDR currently coding
+ } else { // in case IDR currently coding
if (pCtx->pSvcParam->bEnableLongTermReference) {
LTRMarkProcess (pCtx);
@@ -594,7 +594,7 @@
}
}
}
- } else { // safe for IDR
+ } else { // safe for IDR
WelsResetRefList (pCtx); //for IDR, SHOULD reset pRef list.
ResetLtrState (&pCtx->pLtr[pCtx->uiDependencyId]); //SHOULD update it when IDR.
for (int32_t k = 0; k < MAX_TEMPORAL_LEVEL; k++) {
@@ -725,7 +725,7 @@
return false;
if (NULL != pCtx->pDecPic) {
-#if !defined(ENABLE_FRAME_DUMP) // to save complexity, 1/6/2009
+#if !defined(ENABLE_FRAME_DUMP) // to save complexity, 1/6/2009
if ((pParamD->iHighestTemporalId == 0) || (kuiTid < pParamD->iHighestTemporalId))
#endif// !ENABLE_FRAME_DUMP
// Expanding picture for future reference
@@ -749,7 +749,7 @@
LTRMarkProcessScreen (pCtx);
pLtr->bLTRMarkingFlag = false;
++pLtr->uiLtrMarkInterval;
- } else { // in case IDR currently coding
+ } else { // in case IDR currently coding
LTRMarkProcessScreen (pCtx);
pLtr->iCurLtrIdx = 1;
pLtr->iSceneLtrIdx = 1;
--- a/codec/encoder/core/src/sample.cpp
+++ b/codec/encoder/core/src/sample.cpp
@@ -179,7 +179,7 @@
iBestCost = iCurCost;
}
- memcpy (pDst, uiLocalBuffer[iBestMode], 16 * sizeof (uint8_t)); // confirmed_safe_unsafe_usage
+ memcpy (pDst, uiLocalBuffer[iBestMode], 16 * sizeof (uint8_t)); // confirmed_safe_unsafe_usage
*pBestMode = iBestMode;
return iBestCost;
--- a/codec/encoder/core/src/slice_multi_threading.cpp
+++ b/codec/encoder/core/src/slice_multi_threading.cpp
@@ -56,7 +56,7 @@
#include "svc_encode_slice.h"
#include "deblocking.h"
#include "svc_enc_golomb.h"
-#include "crt_util_safe_x.h" // for safe crt like calls
+#include "crt_util_safe_x.h" // for safe crt like calls
#include "rc.h"
#include "cpu.h"
@@ -225,7 +225,7 @@
iMinimalMbNum = iNumMbInEachGom;
}
- if (kiCountSliceNum < 2 || (kiCountSliceNum & 0x01)) // we need suppose uiSliceNum is even for multiple threading
+ if (kiCountSliceNum < 2 || (kiCountSliceNum & 0x01)) // we need suppose uiSliceNum is even for multiple threading
return;
iMaximalMbNum = kiCountNumMb - (kiCountSliceNum - 1) * iMinimalMbNum;
@@ -252,7 +252,7 @@
assert (iNumMbAssigning > 0);
iMbNumLeft -= iNumMbAssigning;
- if (iMbNumLeft <= 0) { // error due to we can not support slice_skip now yet, do not adjust this time
+ if (iMbNumLeft <= 0) { // error due to we can not support slice_skip now yet, do not adjust this time
assert (0);
return;
}
@@ -543,7 +543,7 @@
assert (pSliceBs->bSliceCodedFlag);
#endif//MT_DEBUG_BS_WR
- memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
+ memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
pCtx->iPosBsBuffer += pSliceBs->uiBsPos;
iLayerSize += pSliceBs->uiBsPos;
@@ -575,7 +575,7 @@
int32_t iNalIdx = 0;
const int32_t iCountNal = pSliceBs->iNalIndex;
- memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
+ memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos); // confirmed_safe_unsafe_usage
pCtx->iPosBsBuffer += pSliceBs->uiBsPos;
iLayerSize += pSliceBs->uiBsPos;
@@ -714,7 +714,7 @@
iWaitRet = WelsMultipleEventsWaitSingleBlocking (iEventCount,
&pEventsList[0],
&pEncPEncCtx->pSliceThreading->pThreadMasterEvent[iEventIdx]); // blocking until at least one event is signalled
- if (WELS_THREAD_ERROR_WAIT_OBJECT_0 == iWaitRet) { // start pSlice coding signal waited
+ if (WELS_THREAD_ERROR_WAIT_OBJECT_0 == iWaitRet) { // start pSlice coding signal waited
SLayerBSInfo* pLbi = pPrivateData->pLayerBs;
const int32_t kiCurDid = pEncPEncCtx->uiDependencyId;
const int32_t kiCurTid = pEncPEncCtx->uiTemporalId;
@@ -822,7 +822,7 @@
#endif//MT_DEBUG_BS_WR
WelsEventSignal (
- &pEncPEncCtx->pSliceThreading->pSliceCodedEvent[iEventIdx]); // mean finished coding current pSlice
+ &pEncPEncCtx->pSliceThreading->pSliceCodedEvent[iEventIdx]); // mean finished coding current pSlice
WelsEventSignal (
&pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent);
} else { // for SM_DYN_SLICE parallelization
@@ -925,10 +925,10 @@
iSliceIdx += kiSliceIdxStep;
}
- if (uiThrdRet) // any exception??
+ if (uiThrdRet) // any exception??
break;
- WelsEventSignal (&pEncPEncCtx->pSliceThreading->pSliceCodedEvent[iEventIdx]); // mean finished coding current pSlice
+ WelsEventSignal (&pEncPEncCtx->pSliceThreading->pSliceCodedEvent[iEventIdx]); // mean finished coding current pSlice
WelsEventSignal (&pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent);
}
} else if (WELS_THREAD_ERROR_WAIT_OBJECT_0 + 1 == iWaitRet) { // exit thread signal
@@ -940,7 +940,7 @@
pCurDq = pEncPEncCtx->pCurDqLayer;
UpdateMbListNeighborParallel (pCurDq->pSliceEncCtx, pCurDq->sMbDataP, iSliceIdx);
WelsEventSignal (
- &pEncPEncCtx->pSliceThreading->pFinUpdateMbListEvent[iEventIdx]); // mean finished update pMb list for this pSlice
+ &pEncPEncCtx->pSliceThreading->pFinUpdateMbListEvent[iEventIdx]); // mean finished update pMb list for this pSlice
} else { // WELS_THREAD_ERROR_WAIT_TIMEOUT, or WELS_THREAD_ERROR_WAIT_FAILED
WelsLog (& (pEncPEncCtx->sLogCtx), WELS_LOG_WARNING,
"[MT] CodingSliceThreadProc(), waiting pReadySliceCodingEvent[%d] failed(%d) and thread%d terminated!", iEventIdx,
@@ -1061,7 +1061,7 @@
&& pCtx->pSvcParam->iMultipleThreadIdc >= pCtx->pSvcParam->sSpatialLayers[iCurDid -
1].sSliceCfg.sSliceArgument.uiSliceNum);
- if (kbModelingFromSpatial) { // using spatial base layer for complexity estimation
+ if (kbModelingFromSpatial) { // using spatial base layer for complexity estimation
// do not need adjust due to not different at both slices of consumed time
iNeedAdj = NeedDynamicAdjust (pCtx->pSliceThreading->pSliceConsumeTime[iCurDid - 1],
pCtx->pCurDqLayer->pSliceEncCtx->iSliceNumInFrame);
@@ -1071,7 +1071,7 @@
pCtx->pSliceThreading->pSliceComplexRatio[iCurDid - 1],
iCurDid
);
- } else { // use temporal layer for complexity estimation
+ } else { // use temporal layer for complexity estimation
// do not need adjust due to not different at both slices of consumed time
iNeedAdj = NeedDynamicAdjust (pCtx->pSliceThreading->pSliceConsumeTime[iCurDid],
pCtx->pCurDqLayer->pSliceEncCtx->iSliceNumInFrame);
--- a/codec/encoder/core/src/svc_base_layer_md.cpp
+++ b/codec/encoder/core/src/svc_base_layer_md.cpp
@@ -1779,7 +1779,7 @@
void WelsMdIntraSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache) {
SWelsFuncPtrList* pFunc = pEncCtx->pFuncList;
//initial prediction memory for I_4x4
- pFunc->pfIntraFineMd (pEncCtx, pWelsMd, pCurMb, pMbCache); //WelsMdIntraFinePartitionVaa
+ pFunc->pfIntraFineMd (pEncCtx, pWelsMd, pCurMb, pMbCache); //WelsMdIntraFinePartitionVaa
//add pEnc&rec to MD--2010.3.15
if (IS_INTRA16x16 (pCurMb->uiMbType)) {
--- a/codec/encoder/core/src/svc_enc_slice_segment.cpp
+++ b/codec/encoder/core/src/svc_enc_slice_segment.cpp
@@ -118,7 +118,7 @@
pSliceSeg->pCountMbNumInSlice[iSliceIdx] = kiCountNumMbInFrame;
iSliceIdx++;
} while (iSliceIdx < kiMaxSliceNum);
- } else { // any else uiSliceMode?
+ } else { // any else uiSliceMode?
assert (0);
}
@@ -239,8 +239,8 @@
while (true) {
if (kiCountNumMb < iGomSize * (int32_t) iSliceNum) {
-- iSliceNum;
- iSliceNum = iSliceNum - (iSliceNum & 0x01); // verfiy even num for multiple slices case
- if (iSliceNum < 2) // for safe
+ iSliceNum = iSliceNum - (iSliceNum & 0x01); // verfiy even num for multiple slices case
+ if (iSliceNum < 2) // for safe
break;
continue;
}
@@ -598,7 +598,7 @@
return iNextMbIdx;
return -1;
} else
- return -1; // reserved here for other multiple slice type
+ return -1; // reserved here for other multiple slice type
}
} else
return -1;
@@ -680,7 +680,7 @@
++ iSliceIdx;
}
if (iSameRunLenFlag) {
- return 1; // do not need adjust it due to same running length as before to save complexity
+ return 1; // do not need adjust it due to same running length as before to save complexity
}
iSliceIdx = 0;
--- a/codec/encoder/core/src/svc_encode_mb.cpp
+++ b/codec/encoder/core/src/svc_encode_mb.cpp
@@ -220,7 +220,7 @@
if (iSingleCtrMb < 6) { //from JVT-O079
iNoneZeroCountMbDcAc = 0;
- pfSetMemZeroSize64 (pRes, 768); // confirmed_safe_unsafe_usage
+ pfSetMemZeroSize64 (pRes, 768); // confirmed_safe_unsafe_usage
} else {
const uint8_t* kpNoneZeroCountIdx = g_kuiMbCountScan4Idx;
for (i = 0; i < 4; i++) {
@@ -233,8 +233,8 @@
}
pfDequantizationFour4x4 (pRes, g_kuiDequantCoeff[uiQp]);
pCurMb->uiCbp |= 1 << i;
- } else { // set zero for an 8x8 pBlock
- pfSetMemZeroSize64 (pRes, 128); // confirmed_safe_unsafe_usage
+ } else { // set zero for an 8x8 pBlock
+ pfSetMemZeroSize64 (pRes, 128); // confirmed_safe_unsafe_usage
kpNoneZeroCountIdx += 4;
pBlock += 64;
}
@@ -285,8 +285,8 @@
}
pRes -= 64;
- if (iSingleCtr8x8 < 7) { //from JVT-O079
- pfSetMemZeroSize64 (pRes, 128); // confirmed_safe_unsafe_usage
+ if (iSingleCtr8x8 < 7) { //from JVT-O079
+ pfSetMemZeroSize64 (pRes, 128); // confirmed_safe_unsafe_usage
ST16 (&pCurMb->pNonZeroCount[16 + uiNoneZeroCountOffset], 0);
ST16 (&pCurMb->pNonZeroCount[20 + uiNoneZeroCountOffset], 0);
} else {
@@ -339,7 +339,7 @@
pEncCtx->pFuncList->pfQuantizationFour4x4Max (pRes, pFF, pMF, (int16_t*)aMax);
for (j = 0; j < 4; j++) {
- if (aMax[j] > 1) return false; // iSingleCtrMb += 9, can't be P_SKIP
+ if (aMax[j] > 1) return false; // iSingleCtrMb += 9, can't be P_SKIP
else if (aMax[j] == 1) {
pEncCtx->pFuncList->pfScan4x4 (pBlock, pRes); //
iSingleCtrMb += pEncCtx->pFuncList->pfCalculateSingleCtr4x4 (pBlock);
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -182,7 +182,7 @@
uint8_t eSliceType = sSliceHeader->eSliceType % 5;
int16_t n = 0;
- if (I_SLICE != eSliceType && SI_SLICE != eSliceType) { // !I && !SI
+ if (I_SLICE != eSliceType && SI_SLICE != eSliceType) { // !I && !SI
BsWriteOneBit (pBs, true);
// {
uint16_t uiReorderingOfPicNumsIdc;
@@ -598,7 +598,7 @@
if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) { //islice
pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx -
- 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back
+ 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back
++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId];
break;
@@ -620,7 +620,7 @@
if (iNextMbIdx == -1 || iNextMbIdx >= kiTotalNumMb || iNumMbCoded >= kiTotalNumMb) {
pSliceCtx->pCountMbNumInSlice[kiSliceIdx] = iCurMbIdx - pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId];
pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] =
- iCurMbIdx; // update pLastCodedMbIdxOfPartition, finish coding, use iCurMbIdx directly
+ iCurMbIdx; // update pLastCodedMbIdxOfPartition, finish coding, use iCurMbIdx directly
break;
}
}
@@ -841,7 +841,7 @@
pNextSlice->bSliceHeaderExtFlag =
(NAL_UNIT_CODED_SLICE_EXT == pCurLayer->sLayerInfo.sNalHeaderExt.sNalUnitHeader.eNalUnitType);
memcpy (&pNextSlice->sSliceHeaderExt, &pCurSlice->sSliceHeaderExt,
- sizeof (SSliceHeaderExt)); // confirmed_safe_unsafe_usage
+ sizeof (SSliceHeaderExt)); // confirmed_safe_unsafe_usage
pSliceCtx->pFirstMbInSlice[iNextSliceIdc] = iFirstMbIdxOfNextSlice;
WelsSetMemMultiplebytes_c (pSliceCtx->pOverallMbMap + iFirstMbIdxOfNextSlice, iNextSliceIdc,
@@ -1111,7 +1111,7 @@
if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) {
pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx -
- 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back
+ 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back
++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId];
break;
@@ -1134,7 +1134,7 @@
//whether all of MB in current pSlice encoded or not
if (iNextMbIdx == -1 || iNextMbIdx >= kiTotalNumMb || iNumMbCoded >= kiTotalNumMb) {
pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] =
- iCurMbIdx; // update pLastCodedMbIdxOfPartition, finish coding, use pCurMb_idx directly
+ iCurMbIdx; // update pLastCodedMbIdxOfPartition, finish coding, use pCurMb_idx directly
break;
}
}
--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -575,7 +575,7 @@
iSrcWidth, iSrcHeight);
}
} else {
- memcpy (&sDstPicMap, &sSrcPixMap, sizeof (sDstPicMap)); // confirmed_safe_unsafe_usage
+ memcpy (&sDstPicMap, &sSrcPixMap, sizeof (sDstPicMap)); // confirmed_safe_unsafe_usage
}
// get rid of odd line
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -38,7 +38,7 @@
#include "utils.h"
#include "macros.h"
#include "version.h"
-#include "crt_util_safe_x.h" // Safe CRT routines like util for cross platforms
+#include "crt_util_safe_x.h" // Safe CRT routines like util for cross platforms
#include "ref_list_mgr_svc.h"
#include "codec_ver.h"
@@ -654,12 +654,12 @@
}
switch (eOptionId) {
- case ENCODER_OPTION_INTER_SPATIAL_PRED: { // Inter spatial layer prediction flag
+ case ENCODER_OPTION_INTER_SPATIAL_PRED: { // Inter spatial layer prediction flag
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
"ENCODER_OPTION_INTER_SPATIAL_PRED, this feature not supported at present.");
}
break;
- case ENCODER_OPTION_DATAFORMAT: { // Input color space
+ case ENCODER_OPTION_DATAFORMAT: { // Input color space
int32_t iValue = * ((int32_t*)pOption);
int32_t iColorspace = iValue;
if (iColorspace == 0) {
@@ -689,7 +689,7 @@
int32_t iTargetWidth = 0;
int32_t iTargetHeight = 0;
- memcpy (&sEncodingParam, pOption, sizeof (SEncParamBase)); // confirmed_safe_unsafe_usage
+ memcpy (&sEncodingParam, pOption, sizeof (SEncParamBase)); // confirmed_safe_unsafe_usage
if (sConfig.ParamBaseTranscode (sEncodingParam)) {
return cmInitParaError;
}
@@ -721,7 +721,7 @@
int32_t iTargetWidth = 0;
int32_t iTargetHeight = 0;
- memcpy (&sEncodingParam, pOption, sizeof (SEncParamExt)); // confirmed_safe_unsafe_usage
+ memcpy (&sEncodingParam, pOption, sizeof (SEncParamExt)); // confirmed_safe_unsafe_usage
TraceParamInfo (&sEncodingParam);
#ifdef OUTPUT_BIT_STREAM
if (sEncodingParam.sSpatialLayers[sEncodingParam.iSpatialLayerNum - 1].iVideoWidth !=
@@ -731,7 +731,7 @@
}
#endif//OUTPUT_BIT_STREAM
if (sEncodingParam.iSpatialLayerNum < 1
- || sEncodingParam.iSpatialLayerNum > MAX_SPATIAL_LAYER_NUM) { // verify number of spatial layer
+ || sEncodingParam.iSpatialLayerNum > MAX_SPATIAL_LAYER_NUM) { // verify number of spatial layer
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
"CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, iSpatialLayerNum(%d) failed!",
sEncodingParam.iSpatialLayerNum);
@@ -782,7 +782,7 @@
m_pEncContext->pSvcParam->fMaxFrameRate);
}
break;
- case ENCODER_OPTION_BITRATE: { // Target bit-rate
+ case ENCODER_OPTION_BITRATE: { // Target bit-rate
SBitrateInfo* pInfo = (static_cast<SBitrateInfo*> (pOption));
int32_t iBitrate = pInfo->iBitrate;
if (iBitrate <= 0) {
@@ -828,7 +828,7 @@
}
break;
- case ENCODER_OPTION_MAX_BITRATE: { // Target bit-rate
+ case ENCODER_OPTION_MAX_BITRATE: { // Target bit-rate
SBitrateInfo* pInfo = (static_cast<SBitrateInfo*> (pOption));
int32_t iBitrate = pInfo->iBitrate;
if (iBitrate <= 0) {
@@ -873,7 +873,7 @@
}
}
break;
- case ENCODER_OPTION_RC_MODE: { // 0:quality mode;1:bit-rate mode;2:bitrate limited mode
+ case ENCODER_OPTION_RC_MODE: { // 0:quality mode;1:bit-rate mode;2:bitrate limited mode
int32_t iValue = * ((int32_t*)pOption);
m_pEncContext->pSvcParam->iRCMode = (RC_MODES) iValue;
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
@@ -881,7 +881,7 @@
iValue);
}
break;
- case ENCODER_PADDING_PADDING: { // 0:disable padding;1:padding
+ case ENCODER_PADDING_PADDING: { // 0:disable padding;1:padding
int32_t iValue = * ((int32_t*)pOption);
m_pEncContext->pSvcParam->iPaddingFlag = iValue;
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
@@ -1106,18 +1106,18 @@
}
switch (eOptionId) {
- case ENCODER_OPTION_INTER_SPATIAL_PRED: { // Inter spatial layer prediction flag
+ case ENCODER_OPTION_INTER_SPATIAL_PRED: { // Inter spatial layer prediction flag
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
"ENCODER_OPTION_INTER_SPATIAL_PRED, this feature not supported at present.");
}
break;
- case ENCODER_OPTION_DATAFORMAT: { // Input color space
+ case ENCODER_OPTION_DATAFORMAT: { // Input color space
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
"CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_DATAFORMAT, m_iCspInternal= 0x%x", m_iCspInternal);
* ((int32_t*)pOption) = m_iCspInternal;
}
break;
- case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval
+ case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
"CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_IDR_INTERVAL, uiIntraPeriod= %d",
m_pEncContext->pSvcParam->uiIntraPeriod);
@@ -1124,13 +1124,13 @@
* ((int32_t*)pOption) = m_pEncContext->pSvcParam->uiIntraPeriod;
}
break;
- case ENCODER_OPTION_SVC_ENCODE_PARAM_EXT: { // SVC Encoding Parameter
+ case ENCODER_OPTION_SVC_ENCODE_PARAM_EXT: { // SVC Encoding Parameter
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
"CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_SVC_ENCODE_PARAM_EXT");
- memcpy (pOption, m_pEncContext->pSvcParam, sizeof (SEncParamExt)); // confirmed_safe_unsafe_usage
+ memcpy (pOption, m_pEncContext->pSvcParam, sizeof (SEncParamExt)); // confirmed_safe_unsafe_usage
}
break;
- case ENCODER_OPTION_SVC_ENCODE_PARAM_BASE: { // SVC Encoding Parameter
+ case ENCODER_OPTION_SVC_ENCODE_PARAM_BASE: { // SVC Encoding Parameter
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
"CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_SVC_ENCODE_PARAM_BASE");
m_pEncContext->pSvcParam->GetBaseParams ((SEncParamBase*) pOption);
@@ -1137,7 +1137,7 @@
}
break;
- case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate
+ case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
"CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_FRAME_RATE, fMaxFrameRate = %.6ff",
m_pEncContext->pSvcParam->fMaxFrameRate);
@@ -1144,7 +1144,7 @@
* ((float*)pOption) = m_pEncContext->pSvcParam->fMaxFrameRate;
}
break;
- case ENCODER_OPTION_BITRATE: { // Target bit-rate
+ case ENCODER_OPTION_BITRATE: { // Target bit-rate
SBitrateInfo* pInfo = (static_cast<SBitrateInfo*> (pOption));
if ((pInfo->iLayer != SPATIAL_LAYER_ALL) && (pInfo->iLayer != SPATIAL_LAYER_0) && (pInfo->iLayer != SPATIAL_LAYER_1)
@@ -1160,7 +1160,7 @@
pInfo->iLayer, pInfo->iBitrate);
}
break;
- case ENCODER_OPTION_MAX_BITRATE: { // Target bit-rate
+ case ENCODER_OPTION_MAX_BITRATE: { // Target bit-rate
SBitrateInfo* pInfo = (static_cast<SBitrateInfo*> (pOption));
if ((pInfo->iLayer != SPATIAL_LAYER_ALL) && (pInfo->iLayer != SPATIAL_LAYER_0) && (pInfo->iLayer != SPATIAL_LAYER_1)
&& (pInfo->iLayer != SPATIAL_LAYER_2) && (pInfo->iLayer != SPATIAL_LAYER_3))
@@ -1216,20 +1216,20 @@
char strFileName[256] = {0};
const int32_t iDataLength = m_iMaxPicWidth * m_iMaxPicHeight;
- WelsStrncpy (strFileName, 256, "pic_in_"); // confirmed_safe_unsafe_usage
+ WelsStrncpy (strFileName, 256, "pic_in_"); // confirmed_safe_unsafe_usage
if (m_iMaxPicWidth == 640) {
- WelsStrcat (strFileName, 256, "360p."); // confirmed_safe_unsafe_usage
+ WelsStrcat (strFileName, 256, "360p."); // confirmed_safe_unsafe_usage
} else if (m_iMaxPicWidth == 320) {
- WelsStrcat (strFileName, 256, "180p."); // confirmed_safe_unsafe_usage
+ WelsStrcat (strFileName, 256, "180p."); // confirmed_safe_unsafe_usage
} else if (m_iMaxPicWidth == 160) {
- WelsStrcat (strFileName, 256, "90p."); // confirmed_safe_unsafe_usage
+ WelsStrcat (strFileName, 256, "90p."); // confirmed_safe_unsafe_usage
}
switch (m_iCspInternal) {
case videoFormatI420:
case videoFormatYV12:
- WelsStrcat (strFileName, 256, "yuv"); // confirmed_safe_unsafe_usage
+ WelsStrcat (strFileName, 256, "yuv"); // confirmed_safe_unsafe_usage
pFile = WelsFopen (strFileName, "ab+");
// WelsLog( &m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "WELS_CSP_I420, m_iCspInternal= 0x%x", m_iCspInternal);
if (NULL != pFile) {
@@ -1239,7 +1239,7 @@
}
break;
case videoFormatRGB:
- WelsStrcat (strFileName, 256, "rgb"); // confirmed_safe_unsafe_usage
+ WelsStrcat (strFileName, 256, "rgb"); // confirmed_safe_unsafe_usage
pFile = WelsFopen (strFileName, "ab+");
if (NULL != pFile) {
fwrite (pSrc, sizeof (uint8_t), iDataLength * 3, pFile);
@@ -1247,7 +1247,7 @@
fclose (pFile);
}
case videoFormatBGR:
- WelsStrcat (strFileName, 256, "bgr"); // confirmed_safe_unsafe_usage
+ WelsStrcat (strFileName, 256, "bgr"); // confirmed_safe_unsafe_usage
pFile = WelsFopen (strFileName, "ab+");
// WelsLog( &m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "WELS_CSP_BGR, m_iCspInternal= 0x%x", m_iCspInternal);
if (NULL != pFile) {
@@ -1257,7 +1257,7 @@
}
break;
case videoFormatYUY2:
- WelsStrcat (strFileName, 256, "yuy2"); // confirmed_safe_unsafe_usage
+ WelsStrcat (strFileName, 256, "yuy2"); // confirmed_safe_unsafe_usage
pFile = WelsFopen (strFileName, "ab+");
if (NULL != pFile) {
fwrite (pSrc, sizeof (uint8_t), (CALC_BI_STRIDE (m_iMaxPicWidth, 16)) * m_iMaxPicHeight, pFile);
--- a/codec/processing/src/common/memory.cpp
+++ b/codec/processing/src/common/memory.cpp
@@ -95,7 +95,7 @@
const uint32_t kuiOldSize = *pRealSize;
uint32_t kuiNewSize = 0;
void* pLocalPointer = NULL;
- if (kuiOldSize >= kuiSize) // large enough of original block, so do nothing
+ if (kuiOldSize >= kuiSize) // large enough of original block, so do nothing
return (pPointer);
// new request
@@ -111,7 +111,7 @@
return NULL;
}
- return NULL; // something wrong
+ return NULL; // something wrong
}
WELSVP_NAMESPACE_END
--- a/codec/processing/src/complexityanalysis/ComplexityAnalysis.cpp
+++ b/codec/processing/src/complexityanalysis/ComplexityAnalysis.cpp
@@ -375,7 +375,7 @@
pTmpCur = pPtrY;
for (int32_t i = 0; i < iBlockWidth; i++) {
- iBlockSadH = iBlockSadV = 0x7fffffff; // INT_MAX
+ iBlockSadH = iBlockSadV = 0x7fffffff; // INT_MAX
if (j > 0) {
m_pIntraFunc[0] (iMemPredMb, pTmpCur, iStrideY);
iBlockSadH = m_pSadFunc (pTmpCur, iStrideY, iMemPredMb, 16);
@@ -457,7 +457,7 @@
}
- iBlockSadH = iBlockSadV = 0x7fffffff; // INT_MAX
+ iBlockSadH = iBlockSadV = 0x7fffffff; // INT_MAX
if (j > 0) {
m_pIntraFunc[0] (iMemPredMb, pTmpCur, iStrideY);
--- a/codec/processing/src/denoise/denoise_filter.cpp
+++ b/codec/processing/src/denoise/denoise_filter.cpp
@@ -55,7 +55,7 @@
pCurLine = pSample - iStride - DENOISE_GRAY_RADIUS;
for (y = 0; y < 3; y++) {
for (x = 0; x < 3; x++) {
- if (x == 1 && y == 1) continue; // except center point
+ if (x == 1 && y == 1) continue; // except center point
iCurSample = pCurLine[x];
iCurWeight = WELS_ABS (iCurSample - iCenterSample);
iGreyDiff = 32 - iCurWeight;
--- a/test/api/encode_decode_api_test.cpp
+++ b/test/api/encode_decode_api_test.cpp
@@ -819,7 +819,7 @@
} else {
iPrefix = 0;
}
- tmpSLostSim.eNalType = (EWelsNalUnitType) ((* (pSrcPtr + iPrefix)) & 0x1f); // eNalUnitType
+ tmpSLostSim.eNalType = (EWelsNalUnitType) ((* (pSrcPtr + iPrefix)) & 0x1f); // eNalUnitType
bLost = (ToRemainDidNal ((pSrcPtr + iPrefix + 2), tmpSLostSim.eNalType, iTarDid)) ? false : true;
tmpSLostSim.isLost = bLost;
p_SLostSim->push_back (tmpSLostSim);
@@ -852,7 +852,7 @@
for (i = 0; i < iSrcLen;) {
if (pSrc[i] == 0 && pSrc[i + 1] == 0 && pSrc[i + 2] == 0 && pSrc[i + 3] == 1) {
if (i - iBufPos) {
- tmpSLostSim.eNalType = (EWelsNalUnitType) ((* (pSrc + iBufPos + ilastprefixlen)) & 0x1f); // eNalUnitType
+ tmpSLostSim.eNalType = (EWelsNalUnitType) ((* (pSrc + iBufPos + ilastprefixlen)) & 0x1f); // eNalUnitType
bLost = iLossIdx < iLossCharLen ? (pLossChars[iLossIdx] == '1') : (rand() % 2 == 1);
bLost = (!bLossPara) && (IS_PARAM_SETS_NALS (tmpSLostSim.eNalType)) ? false : bLost;
iLossIdx++;
@@ -871,7 +871,7 @@
i = i + 4;
} else if (pSrc[i] == 0 && pSrc[i + 1] == 0 && pSrc[i + 2] == 1) {
if (i - iBufPos) {
- tmpSLostSim.eNalType = (EWelsNalUnitType) ((* (pSrc + iBufPos + ilastprefixlen)) & 0x1f); // eNalUnitType
+ tmpSLostSim.eNalType = (EWelsNalUnitType) ((* (pSrc + iBufPos + ilastprefixlen)) & 0x1f); // eNalUnitType
bLost = iLossIdx < iLossCharLen ? (pLossChars[iLossIdx] == '1') : (rand() % 2 == 1);
bLost = (!bLossPara) && (IS_PARAM_SETS_NALS (tmpSLostSim.eNalType)) ? false : bLost;
iLossIdx++;
@@ -893,7 +893,7 @@
}
}
if (i - iBufPos) {
- tmpSLostSim.eNalType = (EWelsNalUnitType) ((* (pSrc + iBufPos + ilastprefixlen)) & 0x1f); // eNalUnitType
+ tmpSLostSim.eNalType = (EWelsNalUnitType) ((* (pSrc + iBufPos + ilastprefixlen)) & 0x1f); // eNalUnitType
bLost = iLossIdx < iLossCharLen ? (pLossChars[iLossIdx] == '1') : (rand() % 2 == 1);
bLost = (!bLossPara) && (IS_PARAM_SETS_NALS (tmpSLostSim.eNalType)) ? false : bLost;
iLossIdx++;
--- a/test/encoder/EncUT_GetIntraPredictor.cpp
+++ b/test/encoder/EncUT_GetIntraPredictor.cpp
@@ -85,7 +85,7 @@
const uint8_t kuiDDL4 = (2 + kuiT4 + kuiT6 + (kuiT5 << 1)) >> 2;
const uint8_t kuiDDL5 = (2 + kuiT5 + kuiT7 + (kuiT6 << 1)) >> 2;
const uint8_t kuiDDL6 = (2 + kuiT6 + kuiT7 + (kuiT7 << 1)) >> 2;
- ENFORCE_STACK_ALIGN_1D (uint8_t, uiV, 16, 16) // TobeCont'd about assign opt as follows
+ ENFORCE_STACK_ALIGN_1D (uint8_t, uiV, 16, 16) // TobeCont'd about assign opt as follows
uiV[0] = kuiDDL0;
uiV[1] = uiV[4] = kuiDDL1;
uiV[2] = uiV[5] = uiV[8] = kuiDDL2;
@@ -248,7 +248,7 @@
pRef++;
- uint8_t* pTopLeft = &pRef[-kiStride - 1]; // top-left
+ uint8_t* pTopLeft = &pRef[-kiStride - 1]; // top-left
const uint8_t kuiT0 = * (pTopLeft + 1);
const uint8_t kuiT1 = * (pTopLeft + 2);
@@ -295,7 +295,7 @@
pRef += kiStride + 1;
- const uint8_t kuiLT = pRef[-kiStride - 1]; // top-left
+ const uint8_t kuiLT = pRef[-kiStride - 1]; // top-left
const uint8_t kuiL0 = pRef[-1];
const uint8_t kuiL1 = pRef[kiStride - 1];
const uint8_t kuiL2 = pRef[kiStride2 - 1];
@@ -313,7 +313,7 @@
const uint8_t kuiVR7 = (2 + kuiT1 + (kuiT2 << 1) + kuiT3) >> 2;
const uint8_t kuiVR8 = (2 + kuiLT + (kuiL0 << 1) + kuiL1) >> 2;
const uint8_t kuiVR9 = (2 + kuiL0 + (kuiL1 << 1) + kuiL2) >> 2;
- ENFORCE_STACK_ALIGN_1D (uint8_t, uiV, 16, 16) // TobeCont'd about assign opt as follows
+ ENFORCE_STACK_ALIGN_1D (uint8_t, uiV, 16, 16) // TobeCont'd about assign opt as follows
uiV[0] = uiV[9] = kuiVR0;
uiV[1] = uiV[10] = kuiVR1;
uiV[2] = uiV[11] = kuiVR2;
@@ -362,7 +362,7 @@
const uint8_t kuiHU3 = (kuiL12 + kuiL23) >> 2;
const uint8_t kuiHU4 = kuiL23 >> 1;
const uint8_t kuiHU5 = (1 + kuiL23 + (kuiL3 << 1)) >> 2;
- ENFORCE_STACK_ALIGN_1D (uint8_t, uiV, 16, 16) // TobeCont'd about assign opt as follows
+ ENFORCE_STACK_ALIGN_1D (uint8_t, uiV, 16, 16) // TobeCont'd about assign opt as follows
uiV[0] = kuiHU0;
uiV[1] = kuiHU1;
uiV[2] = uiV[4] = kuiHU2;
@@ -395,7 +395,7 @@
pRef += kiStride + 1;
- const uint8_t kuiLT = pRef[-kiStride - 1]; // top-left
+ const uint8_t kuiLT = pRef[-kiStride - 1]; // top-left
const uint8_t kuiL0 = pRef[-1];
const uint8_t kuiL1 = pRef[kiStride - 1];
const uint8_t kuiL2 = pRef[kiStride2 - 1];
@@ -413,7 +413,7 @@
const uint8_t kuiHD7 = (2 + kuiL0 + (kuiL1 << 1) + kuiL2) >> 2;
const uint8_t kuiHD8 = (1 + kuiL2 + kuiL3) >> 1;
const uint8_t kuiHD9 = (2 + kuiL1 + (kuiL2 << 1) + kuiL3) >> 2;
- ENFORCE_STACK_ALIGN_1D (uint8_t, uiV, 16, 16) // TobeCont'd about assign opt as follows
+ ENFORCE_STACK_ALIGN_1D (uint8_t, uiV, 16, 16) // TobeCont'd about assign opt as follows
uiV[0] = uiV[6] = kuiHD0;
uiV[1] = uiV[7] = kuiHD1;
uiV[2] = kuiHD2;
--- a/test/encoder/EncUT_MotionEstimate.cpp
+++ b/test/encoder/EncUT_MotionEstimate.cpp
@@ -338,7 +338,7 @@
const int32_t iCurMeBlockQpelPixX = ((iCurMeBlockPixX) << 2);
const int32_t iCurMeBlockPixY = sMe.iCurMeBlockPixY;
const int32_t iCurMeBlockQpelPixY = ((iCurMeBlockPixY) << 2);
- uint16_t* pMvdCostX = sMe.pMvdCost - iCurMeBlockQpelPixX - sMe.sMvp.iMvX; //do the offset here
+ uint16_t* pMvdCostX = sMe.pMvdCost - iCurMeBlockQpelPixX - sMe.sMvp.iMvX; //do the offset here
uint16_t* pMvdCostY = sMe.pMvdCost - iCurMeBlockQpelPixY - sMe.sMvp.iMvY;
uint16_t* pMvdCost = vertical ? pMvdCostY : pMvdCostX;
int iSize = vertical ? m_iHeight : m_iWidth;