shithub: openh264

Download patch

ref: 578060373ab56ded4b66865b6f1cb4d590f750a1
parent: eb7cdf2bda97f6b8cbadc5cb5bbffe4863de683d
author: Martin Storsjö <[email protected]>
date: Sun Jun 29 11:00:46 EDT 2014

Rename data types in the decoder to match the name used in the encoder

--- a/codec/decoder/core/inc/decoder_context.h
+++ b/codec/decoder/core/inc/decoder_context.h
@@ -111,7 +111,7 @@
 typedef struct tagDeblockingFilter {
 uint8_t*	pCsData[3];	// pointer to reconstructed picture data
 int32_t	iCsStride[2];	// Cs stride
-ESliceType  eSliceType;
+EWelsSliceType  eSliceType;
 int8_t	iSliceAlphaC0Offset;
 int8_t	iSliceBetaOffset;
 int8_t  iChromaQP;
@@ -184,7 +184,7 @@
 
 // Derived common elements
 SNalUnitHeader		sCurNalHead;
-ESliceType			eSliceType;			// Slice type
+EWelsSliceType			eSliceType;			// Slice type
 int32_t				iFrameNum;
 int32_t				iPrevFrameNum;		// frame number of previous frame well decoded for non-truncated mode yet
 bool              bLastHasMmco5;      //
--- a/codec/decoder/core/inc/nal_prefix.h
+++ b/codec/decoder/core/inc/nal_prefix.h
@@ -46,7 +46,7 @@
 typedef struct TagNalUnitHeader {
 uint8_t		    uiForbiddenZeroBit;
 uint8_t		    uiNalRefIdc;
-ENalUnitType    eNalUnitType;
+EWelsNalUnitType    eNalUnitType;
 uint8_t		    uiReservedOneByte;		// only padding usage
 } SNalUnitHeader, *PNalUnitHeader;
 
--- a/codec/decoder/core/inc/slice.h
+++ b/codec/decoder/core/inc/slice.h
@@ -130,7 +130,7 @@
 SRefPicMarking		sRefMarking;	// Decoded reference picture marking syntaxs
 
 uint16_t    uiIdrPicId;
-ESliceType	eSliceType;
+EWelsSliceType	eSliceType;
 bool		bNumRefIdxActiveOverrideFlag;
 bool		bFieldPicFlag;		//not supported in base profile
 bool		bBottomFiledFlag;		//not supported in base profile
--- a/codec/decoder/core/inc/wels_common_basis.h
+++ b/codec/decoder/core/inc/wels_common_basis.h
@@ -100,7 +100,7 @@
 NAL_UNIT_UNSPEC_29			= 29,
 NAL_UNIT_UNSPEC_30			= 30,
 NAL_UNIT_UNSPEC_31			= 31
-} ENalUnitType;
+} EWelsNalUnitType;
 
 
 /*
@@ -152,7 +152,7 @@
 SP_SLICE = 3,
 SI_SLICE = 4,
 UNKNOWN_SLICE = 5
-} ESliceType;
+} EWelsSliceType;
 
 /* List Index */
 typedef uint8_t		ListIndex;
--- a/codec/decoder/core/src/au_parser.cpp
+++ b/codec/decoder/core/src/au_parser.cpp
@@ -135,7 +135,7 @@
   }
 
   pNalUnitHeader->uiNalRefIdc		= (uint8_t) (pNal[0] >> 5);			// uiNalRefIdc
-  pNalUnitHeader->eNalUnitType		= (ENalUnitType) (pNal[0] & 0x1f);	// eNalUnitType
+  pNalUnitHeader->eNalUnitType		= (EWelsNalUnitType) (pNal[0] & 0x1f);	// eNalUnitType
 
   ++pNal;
   --iNalSize;
@@ -485,7 +485,7 @@
  */
 int32_t ParseNonVclNal (PWelsDecoderContext pCtx, uint8_t* pRbsp, const int32_t kiSrcLen) {
   PBitStringAux	pBs = NULL;
-  ENalUnitType eNalType	= NAL_UNIT_UNSPEC_0; // make initial value as unspecified
+  EWelsNalUnitType eNalType	= NAL_UNIT_UNSPEC_0; // make initial value as unspecified
   int32_t iPicWidth		= 0;
   int32_t iPicHeight		= 0;
   int32_t iBitSize		= 0;
--- a/codec/decoder/core/src/deblocking.cpp
+++ b/codec/decoder/core/src/deblocking.cpp
@@ -647,7 +647,7 @@
   pFilter.iCsStride[0] = pCtx->pDec->iLinesize[0];
   pFilter.iCsStride[1] = pCtx->pDec->iLinesize[1];
 
-  pFilter.eSliceType = (ESliceType) pCurDqLayer->sLayerInfo.sSliceInLayer.eSliceType;
+  pFilter.eSliceType = (EWelsSliceType) pCurDqLayer->sLayerInfo.sSliceInLayer.eSliceType;
 
   pFilter.iSliceAlphaC0Offset = pSliceHeaderExt->sSliceHeader.iSliceAlphaC0Offset;
   pFilter.iSliceBetaOffset     = pSliceHeaderExt->sSliceHeader.iSliceBetaOffset;
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -161,7 +161,7 @@
  */
 int32_t ParseRefPicListReordering (PBitStringAux pBs, PSliceHeader pSh) {
   int32_t iList = 0;
-  const ESliceType keSt = pSh->eSliceType;
+  const EWelsSliceType keSt = pSh->eSliceType;
   PRefPicListReorderSyn pRefPicListReordering = &pSh->pRefPicListReordering;
   PSps pSps = pSh->pSps;
   uint32_t uiCode;
@@ -446,7 +446,7 @@
   PSubsetSps pSubsetSps				= NULL;
   PSps pSps							= NULL;
   PPps pPps							= NULL;
-  ENalUnitType eNalType				= static_cast<ENalUnitType> (0);
+  EWelsNalUnitType eNalType				= static_cast<EWelsNalUnitType> (0);
   int32_t iPpsId						= 0;
   int32_t iRet						= ERR_NONE;
   uint8_t uiSliceType				= 0;
@@ -508,7 +508,7 @@
     }
   }
 
-  pSliceHead->eSliceType	= static_cast <ESliceType> (uiSliceType);
+  pSliceHead->eSliceType	= static_cast <EWelsSliceType> (uiSliceType);
 
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_parameter_set_id
   iPpsId = uiCode;
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -393,7 +393,7 @@
                 pDstInfo); //iErrorCode has been modified in this function
   m_pDecContext->bInstantDecFlag = false; //reset no-delay flag
   if (m_pDecContext->iErrorCode) {
-    ENalUnitType eNalType =
+    EWelsNalUnitType eNalType =
       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;