Merge pull request #1983 from mstorsjo/remove-tabs
Remove tabs from the source code
This commit is contained in:
@@ -364,8 +364,7 @@ typedef struct TagWelsDecoderContext {
|
|||||||
#ifdef LONG_TERM_REF
|
#ifdef LONG_TERM_REF
|
||||||
bool bParamSetsLostFlag; //sps or pps do not exist or not correct
|
bool bParamSetsLostFlag; //sps or pps do not exist or not correct
|
||||||
|
|
||||||
bool
|
bool bCurAuContainLtrMarkSeFlag; //current AU has the LTR marking syntax element, mark the previous frame or self
|
||||||
bCurAuContainLtrMarkSeFlag; //current AU has the LTR marking syntax element, mark the previous frame or self
|
|
||||||
int32_t iFrameNumOfAuMarkedLtr; //if bCurAuContainLtrMarkSeFlag==true, SHOULD set this variable
|
int32_t iFrameNumOfAuMarkedLtr; //if bCurAuContainLtrMarkSeFlag==true, SHOULD set this variable
|
||||||
|
|
||||||
uint16_t uiCurIdrPicId;
|
uint16_t uiCurIdrPicId;
|
||||||
|
|||||||
@@ -129,10 +129,8 @@ static const uint8_t g_kuiIdx2CtxLastSignificantCoeffFlag8x8[64] = { // Table 9-
|
|||||||
7, 7, 7, 7, 8, 8, 8, 8,
|
7, 7, 7, 7, 8, 8, 8, 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void GetMbResProperty(int32_t * pMBproperty,int32_t* pResidualProperty,bool bCavlc)
|
static inline void GetMbResProperty (int32_t* pMBproperty, int32_t* pResidualProperty, bool bCavlc) {
|
||||||
{
|
switch (*pResidualProperty) {
|
||||||
switch(*pResidualProperty)
|
|
||||||
{
|
|
||||||
case CHROMA_AC_U:
|
case CHROMA_AC_U:
|
||||||
*pMBproperty = 1;
|
*pMBproperty = 1;
|
||||||
*pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_U;
|
*pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_U;
|
||||||
|
|||||||
@@ -102,8 +102,7 @@ void WelsI4x4LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
|||||||
void WelsI4x4LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
void WelsI4x4LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||||
const int32_t kiStride2 = kiStride << 1;
|
const int32_t kiStride2 = kiStride << 1;
|
||||||
const int32_t kiStride3 = kiStride2 + kiStride;
|
const int32_t kiStride3 = kiStride2 + kiStride;
|
||||||
const uint8_t kuiMean = (pPred[-kiStride] + pPred[-kiStride + 1] + pPred[-kiStride + 2] + pPred[-kiStride + 3] + 2) >>
|
const uint8_t kuiMean = (pPred[-kiStride] + pPred[-kiStride + 1] + pPred[-kiStride + 2] + pPred[-kiStride + 3] + 2) >> 2;
|
||||||
2;
|
|
||||||
const uint32_t kuiMean32 = 0x01010101U * kuiMean;
|
const uint32_t kuiMean32 = 0x01010101U * kuiMean;
|
||||||
|
|
||||||
ST32A4 (pPred , kuiMean32);
|
ST32A4 (pPred , kuiMean32);
|
||||||
@@ -996,8 +995,7 @@ void WelsIChromaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
|||||||
int32_t iTmp = (kiStride << 3) - kiStride;
|
int32_t iTmp = (kiStride << 3) - kiStride;
|
||||||
/*caculate the kMean value*/
|
/*caculate the kMean value*/
|
||||||
const uint8_t kuiM1 = (pPred[-kiStride] + pPred[1 - kiStride] + pPred[2 - kiStride] + pPred[3 - kiStride] + 2) >> 2;
|
const uint8_t kuiM1 = (pPred[-kiStride] + pPred[1 - kiStride] + pPred[2 - kiStride] + pPred[3 - kiStride] + 2) >> 2;
|
||||||
const uint8_t kuiM2 = (pPred[4 - kiStride] + pPred[5 - kiStride] + pPred[6 - kiStride] + pPred[7 - kiStride] + 2) >>
|
const uint8_t kuiM2 = (pPred[4 - kiStride] + pPred[5 - kiStride] + pPred[6 - kiStride] + pPred[7 - kiStride] + 2) >> 2;
|
||||||
2;
|
|
||||||
const uint8_t kuiM[8] = {kuiM1, kuiM1, kuiM1, kuiM1, kuiM2, kuiM2, kuiM2, kuiM2};
|
const uint8_t kuiM[8] = {kuiM1, kuiM1, kuiM1, kuiM1, kuiM2, kuiM2, kuiM2, kuiM2};
|
||||||
|
|
||||||
uint8_t i = 7;
|
uint8_t i = 7;
|
||||||
|
|||||||
@@ -79,10 +79,8 @@ typedef struct TagLTRState {
|
|||||||
|
|
||||||
// LTR used as recovery reference
|
// LTR used as recovery reference
|
||||||
int32_t iLastRecoverFrameNum; // reserve the last LTR or IDR recover iFrameNum
|
int32_t iLastRecoverFrameNum; // reserve the last LTR or IDR recover iFrameNum
|
||||||
int32_t
|
int32_t iLastCorFrameNumDec; // reserved the last correct position in decoder side, use to select valid LTR to recover or to decide the LTR mark validation
|
||||||
iLastCorFrameNumDec; // reserved the last correct position in decoder side, use to select valid LTR to recover or to decide the LTR mark validation
|
int32_t iCurFrameNumInDec; // current iFrameNum in decoder side, use to select valid LTR to recover or to decide the LTR mark validation
|
||||||
int32_t
|
|
||||||
iCurFrameNumInDec; // current iFrameNum in decoder side, use to select valid LTR to recover or to decide the LTR mark validation
|
|
||||||
|
|
||||||
// LTR mark
|
// LTR mark
|
||||||
int32_t iLTRMarkMode; // direct mark or delay mark
|
int32_t iLTRMarkMode; // direct mark or delay mark
|
||||||
@@ -143,8 +141,7 @@ typedef struct TagWelsEncCtx {
|
|||||||
SPicture* pDecPic; // pointer to current picture being reconstructed
|
SPicture* pDecPic; // pointer to current picture being reconstructed
|
||||||
SPicture* pRefPic; // pointer to current reference picture
|
SPicture* pRefPic; // pointer to current reference picture
|
||||||
|
|
||||||
SDqLayer*
|
SDqLayer* pCurDqLayer; // DQ layer context used to being encoded currently, for reference base layer to refer: pCurDqLayer->pRefLayer if applicable
|
||||||
pCurDqLayer; // DQ layer context used to being encoded currently, for reference base layer to refer: pCurDqLayer->pRefLayer if applicable
|
|
||||||
SDqLayer** ppDqLayerList; // overall DQ layers encoded for storage
|
SDqLayer** ppDqLayerList; // overall DQ layers encoded for storage
|
||||||
|
|
||||||
SRefList** ppRefPicListExt; // reference picture list for SVC
|
SRefList** ppRefPicListExt; // reference picture list for SVC
|
||||||
@@ -213,8 +210,7 @@ typedef struct TagWelsEncCtx {
|
|||||||
* can aware idc of referencing layer and that idc of successive layer to be coded
|
* can aware idc of referencing layer and that idc of successive layer to be coded
|
||||||
*/
|
*/
|
||||||
/* SVC only */
|
/* SVC only */
|
||||||
SDqIdc*
|
SDqIdc* pDqIdcMap; // overall DQ map of full scalability in specific frame (All full D/T/Q layers involved) // pDqIdcMap[dq_index] for each SDqIdc pData
|
||||||
pDqIdcMap; // overall DQ map of full scalability in specific frame (All full D/T/Q layers involved) // pDqIdcMap[dq_index] for each SDqIdc pData
|
|
||||||
|
|
||||||
SParaSetOffset sPSOVector;
|
SParaSetOffset sPSOVector;
|
||||||
SParaSetOffset* pPSOVector;
|
SParaSetOffset* pPSOVector;
|
||||||
|
|||||||
@@ -79,8 +79,7 @@ WELS_EVENT pReadySliceCodingEvent[MAX_THREADS_NUM]; // events for slice codi
|
|||||||
WELS_EVENT pUpdateMbListEvent[MAX_THREADS_NUM]; // signal to update mb list neighbor for various slices
|
WELS_EVENT pUpdateMbListEvent[MAX_THREADS_NUM]; // signal to update mb list neighbor for various slices
|
||||||
WELS_EVENT pFinUpdateMbListEvent[MAX_THREADS_NUM]; // signal to indicate finish updating mb list
|
WELS_EVENT pFinUpdateMbListEvent[MAX_THREADS_NUM]; // signal to indicate finish updating mb list
|
||||||
WELS_EVENT pExitEncodeEvent[MAX_THREADS_NUM]; // event for exit encoding event
|
WELS_EVENT pExitEncodeEvent[MAX_THREADS_NUM]; // event for exit encoding event
|
||||||
WELS_EVENT
|
WELS_EVENT pThreadMasterEvent[MAX_THREADS_NUM]; // event for indicating that some event has been signalled to the thread
|
||||||
pThreadMasterEvent[MAX_THREADS_NUM]; // event for indicating that some event has been signalled to the thread
|
|
||||||
|
|
||||||
WELS_MUTEX mutexSliceNumUpdate; // for dynamic slicing mode MT
|
WELS_MUTEX mutexSliceNumUpdate; // for dynamic slicing mode MT
|
||||||
|
|
||||||
|
|||||||
@@ -437,8 +437,7 @@ typedef struct TagWelsSvcCodingParam: SEncParamExt {
|
|||||||
* \return NONE (should ensure valid parameter before this procedure)
|
* \return NONE (should ensure valid parameter before this procedure)
|
||||||
*/
|
*/
|
||||||
int32_t DetermineTemporalSettings() {
|
int32_t DetermineTemporalSettings() {
|
||||||
const int32_t iDecStages = WELS_LOG2 (
|
const int32_t iDecStages = WELS_LOG2 (uiGopSize); // (int8_t)GetLogFactor(1.0f, 1.0f * pcfg->uiGopSize); //log2(uiGopSize)
|
||||||
uiGopSize); // (int8_t)GetLogFactor(1.0f, 1.0f * pcfg->uiGopSize); //log2(uiGopSize)
|
|
||||||
const uint8_t* pTemporalIdList = &g_kuiTemporalIdListTable[iDecStages][0];
|
const uint8_t* pTemporalIdList = &g_kuiTemporalIdListTable[iDecStages][0];
|
||||||
SSpatialLayerInternal* pDlp = &sDependencyLayers[0];
|
SSpatialLayerInternal* pDlp = &sDependencyLayers[0];
|
||||||
SSpatialLayerConfig* pSpatialLayer = &sSpatialLayers[0];
|
SSpatialLayerConfig* pSpatialLayer = &sSpatialLayers[0];
|
||||||
|
|||||||
@@ -1105,8 +1105,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p
|
|||||||
int32_t iPicWidth = WELS_ALIGN (kiWidth, MB_WIDTH_LUMA) + (PADDING_LENGTH << 1); // with iWidth of horizon
|
int32_t iPicWidth = WELS_ALIGN (kiWidth, MB_WIDTH_LUMA) + (PADDING_LENGTH << 1); // with iWidth of horizon
|
||||||
int32_t iPicChromaWidth = iPicWidth >> 1;
|
int32_t iPicChromaWidth = iPicWidth >> 1;
|
||||||
|
|
||||||
iPicWidth = WELS_ALIGN (iPicWidth,
|
iPicWidth = WELS_ALIGN (iPicWidth, 32); // 32(or 16 for chroma below) to match original imp. here instead of iCacheLineSize
|
||||||
32); // 32(or 16 for chroma below) to match original imp. here instead of iCacheLineSize
|
|
||||||
iPicChromaWidth = WELS_ALIGN (iPicChromaWidth, 16);
|
iPicChromaWidth = WELS_ALIGN (iPicChromaWidth, 16);
|
||||||
|
|
||||||
WelsGetEncBlockStrideOffset ((*ppCtx)->pStrideTab->pStrideEncBlockOffset[iDlayerIndex], iPicWidth, iPicChromaWidth);
|
WelsGetEncBlockStrideOffset ((*ppCtx)->pStrideTab->pStrideEncBlockOffset[iDlayerIndex], iPicWidth, iPicChromaWidth);
|
||||||
@@ -2379,8 +2378,7 @@ void OutputCpuFeaturesLog (SLogContext* pLogCtx, uint32_t uiCpuFeatureFlags, uin
|
|||||||
int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingParam, int16_t& iSliceNum,
|
int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingParam, int16_t& iSliceNum,
|
||||||
int32_t& iCacheLineSize, uint32_t& uiCpuFeatureFlags) {
|
int32_t& iCacheLineSize, uint32_t& uiCpuFeatureFlags) {
|
||||||
// for cpu features detection, Only detect once??
|
// for cpu features detection, Only detect once??
|
||||||
int32_t uiCpuCores =
|
int32_t uiCpuCores = 0; // number of logic processors on physical processor package, zero logic processors means HTT not supported
|
||||||
0; // number of logic processors on physical processor package, zero logic processors means HTT not supported
|
|
||||||
uiCpuFeatureFlags = WelsCPUFeatureDetect (&uiCpuCores); // detect cpu capacity features
|
uiCpuFeatureFlags = WelsCPUFeatureDetect (&uiCpuCores); // detect cpu capacity features
|
||||||
|
|
||||||
#ifdef X86_ASM
|
#ifdef X86_ASM
|
||||||
|
|||||||
@@ -104,8 +104,7 @@ void WelsI4x4LumaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride)
|
|||||||
WelsFillingPred8x2to16 (pPred, uiSrc);
|
WelsFillingPred8x2to16 (pPred, uiSrc);
|
||||||
}
|
}
|
||||||
void WelsI4x4LumaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
|
void WelsI4x4LumaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
|
||||||
const uint8_t kuiDcValue = (pRef[-1] + pRef[kiStride - 1] + pRef[ (kiStride << 1) - 1] + pRef[ (kiStride << 1) +
|
const uint8_t kuiDcValue = (pRef[-1] + pRef[kiStride - 1] + pRef[ (kiStride << 1) - 1] + pRef[ (kiStride << 1) + kiStride - 1] +
|
||||||
kiStride - 1] +
|
|
||||||
pRef[-kiStride] + pRef[1 - kiStride] + pRef[2 - kiStride] + pRef[3 - kiStride] + 4) >> 3;
|
pRef[-kiStride] + pRef[1 - kiStride] + pRef[2 - kiStride] + pRef[3 - kiStride] + 4) >> 3;
|
||||||
|
|
||||||
WelsFillingPred1to16 (pPred, kuiDcValue);
|
WelsFillingPred1to16 (pPred, kuiDcValue);
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ void WelsMdSpatialelInterMbIlfmdNoilp (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, S
|
|||||||
const bool kbMbLeftAvailPskip = ((kuiNeighborAvail & LEFT_MB_POS) ? IS_SKIP ((pCurMb - 1)->uiMbType) : false);
|
const bool kbMbLeftAvailPskip = ((kuiNeighborAvail & LEFT_MB_POS) ? IS_SKIP ((pCurMb - 1)->uiMbType) : false);
|
||||||
const bool kbMbTopAvailPskip = ((kuiNeighborAvail & TOP_MB_POS) ? IS_SKIP (kpTopMb->uiMbType) : false);
|
const bool kbMbTopAvailPskip = ((kuiNeighborAvail & TOP_MB_POS) ? IS_SKIP (kpTopMb->uiMbType) : false);
|
||||||
const bool kbMbTopLeftAvailPskip = ((kuiNeighborAvail & TOPLEFT_MB_POS) ? IS_SKIP ((kpTopMb - 1)->uiMbType) : false);
|
const bool kbMbTopLeftAvailPskip = ((kuiNeighborAvail & TOPLEFT_MB_POS) ? IS_SKIP ((kpTopMb - 1)->uiMbType) : false);
|
||||||
const bool kbMbTopRightAvailPskip = ((kuiNeighborAvail & TOPRIGHT_MB_POS) ? IS_SKIP ((
|
const bool kbMbTopRightAvailPskip = ((kuiNeighborAvail & TOPRIGHT_MB_POS) ? IS_SKIP ((kpTopMb + 1)->uiMbType) : false);
|
||||||
kpTopMb + 1)->uiMbType) : false);
|
|
||||||
|
|
||||||
bool bTrySkip = kbMbLeftAvailPskip | kbMbTopAvailPskip | kbMbTopLeftAvailPskip | kbMbTopRightAvailPskip;
|
bool bTrySkip = kbMbLeftAvailPskip | kbMbTopAvailPskip | kbMbTopLeftAvailPskip | kbMbTopRightAvailPskip;
|
||||||
bool bKeepSkip = kbMbLeftAvailPskip & kbMbTopAvailPskip & kbMbTopRightAvailPskip;
|
bool bKeepSkip = kbMbLeftAvailPskip & kbMbTopAvailPskip & kbMbTopRightAvailPskip;
|
||||||
|
|||||||
@@ -491,8 +491,7 @@ void WelsIChromaPredDcTop_ref (uint8_t* pPred, const int32_t kiStride) {
|
|||||||
int32_t iTmp = (kiStride << 3) - kiStride;
|
int32_t iTmp = (kiStride << 3) - kiStride;
|
||||||
/*caculate the kMean value*/
|
/*caculate the kMean value*/
|
||||||
const uint8_t kuiM1 = (pPred[-kiStride] + pPred[1 - kiStride] + pPred[2 - kiStride] + pPred[3 - kiStride] + 2) >> 2;
|
const uint8_t kuiM1 = (pPred[-kiStride] + pPred[1 - kiStride] + pPred[2 - kiStride] + pPred[3 - kiStride] + 2) >> 2;
|
||||||
const uint8_t kuiM2 = (pPred[4 - kiStride] + pPred[5 - kiStride] + pPred[6 - kiStride] + pPred[7 - kiStride] + 2) >>
|
const uint8_t kuiM2 = (pPred[4 - kiStride] + pPred[5 - kiStride] + pPred[6 - kiStride] + pPred[7 - kiStride] + 2) >> 2;
|
||||||
2;
|
|
||||||
const uint8_t kuiM[8] = {kuiM1, kuiM1, kuiM1, kuiM1, kuiM2, kuiM2, kuiM2, kuiM2};
|
const uint8_t kuiM[8] = {kuiM1, kuiM1, kuiM1, kuiM1, kuiM2, kuiM2, kuiM2, kuiM2};
|
||||||
|
|
||||||
uint8_t i = 7;
|
uint8_t i = 7;
|
||||||
|
|||||||
Reference in New Issue
Block a user