Merge pull request #274 from mstorsjo/typedef-cleanup
Remove typedefs for standard C++ types
This commit is contained in:
commit
8b8e0d4b3e
@ -211,7 +211,7 @@ typedef struct {
|
||||
bool bEnableAdaptiveQuant; // adaptive quantization control
|
||||
bool bEnableFrameSkip; // allow skipping frames to keep the bitrate within limits
|
||||
bool bEnableCropPic; // enable cropping source picture. 8/25/2010
|
||||
// FALSE: Streaming Video Sharing; TRUE: Video Conferencing Meeting;
|
||||
// false: Streaming Video Sharing; true: Video Conferencing Meeting;
|
||||
bool bEnableLongTermReference; // 0: on, 1: off
|
||||
int iLtrMarkPeriod;
|
||||
|
||||
|
@ -268,7 +268,7 @@ WELS_THREAD_ERROR_CODE WelsEventDestroy (WELS_EVENT* event) {
|
||||
return sem_destroy (event); // match with sem_init
|
||||
}
|
||||
|
||||
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, str_t* event_name) {
|
||||
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, char* event_name) {
|
||||
if (p_event == NULL || event_name == NULL)
|
||||
return WELS_THREAD_ERROR_GENERAL;
|
||||
*p_event = sem_open (event_name, O_CREAT, (S_IRUSR | S_IWUSR)/*0600*/, 0);
|
||||
@ -280,7 +280,7 @@ WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, str_t* event_name
|
||||
return WELS_THREAD_ERROR_OK;
|
||||
}
|
||||
}
|
||||
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, str_t* event_name) {
|
||||
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, char* event_name) {
|
||||
WELS_THREAD_ERROR_CODE err = sem_close (event); // match with sem_open
|
||||
if (event_name)
|
||||
sem_unlink (event_name);
|
||||
|
@ -110,8 +110,8 @@ WELS_THREAD_ERROR_CODE WelsMutexUnlock (WELS_MUTEX* mutex);
|
||||
WELS_THREAD_ERROR_CODE WelsMutexDestroy (WELS_MUTEX* mutex);
|
||||
|
||||
#ifdef __GNUC__
|
||||
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, str_t* event_name);
|
||||
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, str_t* event_name);
|
||||
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, char* event_name);
|
||||
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, char* event_name);
|
||||
#endif//__GNUC__
|
||||
WELS_THREAD_ERROR_CODE WelsEventInit (WELS_EVENT* event);
|
||||
WELS_THREAD_ERROR_CODE WelsEventDestroy (WELS_EVENT* event);
|
||||
|
@ -92,8 +92,8 @@ uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
|
||||
/* CMOV instruction checking */
|
||||
uiCPU |= WELS_CPU_CMOV;
|
||||
}
|
||||
if ((!strcmp ((const str_t*)chVendorName, CPU_Vendor_INTEL)) ||
|
||||
(!strcmp((const str_t*)chVendorName, CPU_Vendor_AMD)) ) { // confirmed_safe_unsafe_usage
|
||||
if ((!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL)) ||
|
||||
(!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;
|
||||
@ -139,7 +139,7 @@ uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
|
||||
} else {
|
||||
*pNumberOfLogicProcessors = 1;
|
||||
}
|
||||
if( !strcmp((const str_t*)chVendorName, CPU_Vendor_INTEL) ){
|
||||
if( !strcmp((const char*)chVendorName, CPU_Vendor_INTEL) ){
|
||||
if( uiMaxCpuidLevel >= 4 ){
|
||||
uiFeatureC = 0;
|
||||
WelsCPUId(0x4, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
|
||||
@ -152,7 +152,7 @@ uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
|
||||
|
||||
WelsCPUId (0x80000000, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
|
||||
|
||||
if ((!strcmp ((const str_t*)chVendorName, CPU_Vendor_AMD))
|
||||
if ((!strcmp ((const char*)chVendorName, CPU_Vendor_AMD))
|
||||
&& (uiFeatureA >= 0x80000001)) { // confirmed_safe_unsafe_usage
|
||||
WelsCPUId (0x80000001, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
|
||||
if (uiFeatureD & 0x00400000) {
|
||||
@ -163,7 +163,7 @@ uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp ((const str_t*)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);
|
||||
@ -176,8 +176,8 @@ uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
|
||||
}
|
||||
|
||||
// get cache line size
|
||||
if ((!strcmp ((const str_t*)chVendorName, CPU_Vendor_INTEL))
|
||||
|| ! (strcmp ((const str_t*)chVendorName, CPU_Vendor_CYRIX))) { // confirmed_safe_unsafe_usage
|
||||
if ((!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL))
|
||||
|| ! (strcmp ((const char*)chVendorName, CPU_Vendor_CYRIX))) { // confirmed_safe_unsafe_usage
|
||||
WelsCPUId (1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
|
||||
|
||||
CacheLineSize = (uiFeatureB & 0xff00) >>
|
||||
|
@ -55,12 +55,12 @@ extern "C" {
|
||||
*/
|
||||
int32_t WelsCPUIdVerify();
|
||||
|
||||
void_t WelsCPUId (uint32_t uiIndex, uint32_t* pFeatureA, uint32_t* pFeatureB, uint32_t* pFeatureC, uint32_t* pFeatureD);
|
||||
void WelsCPUId (uint32_t uiIndex, uint32_t* pFeatureA, uint32_t* pFeatureB, uint32_t* pFeatureC, uint32_t* pFeatureD);
|
||||
|
||||
int32_t WelsCPUSupportAVX (uint32_t eax, uint32_t ecx);
|
||||
int32_t WelsCPUSupportFMA (uint32_t eax, uint32_t ecx);
|
||||
|
||||
void_t WelsEmms();
|
||||
void WelsEmms();
|
||||
|
||||
uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors);
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER>=1500)
|
||||
|
||||
int32_t WelsSnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFormat, ...) {
|
||||
int32_t WelsSnprintf (char* pBuffer, int32_t iSizeOfBuffer, const char* kpFormat, ...) {
|
||||
va_list pArgPtr;
|
||||
int32_t iRc;
|
||||
|
||||
@ -74,17 +74,17 @@ int32_t WelsSnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFor
|
||||
return iRc;
|
||||
}
|
||||
|
||||
str_t* WelsStrncpy (str_t* pDest, int32_t iSizeInBytes, const str_t* kpSrc) {
|
||||
char* WelsStrncpy (char* pDest, int32_t iSizeInBytes, const char* kpSrc) {
|
||||
strncpy_s (pDest, iSizeInBytes, kpSrc, _TRUNCATE);
|
||||
|
||||
return pDest;
|
||||
}
|
||||
|
||||
int32_t WelsVsnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFormat, va_list pArgPtr) {
|
||||
int32_t WelsVsnprintf (char* pBuffer, int32_t iSizeOfBuffer, const char* kpFormat, va_list pArgPtr) {
|
||||
return vsnprintf_s (pBuffer, iSizeOfBuffer, _TRUNCATE, kpFormat, pArgPtr);
|
||||
}
|
||||
|
||||
WelsFileHandle* WelsFopen (const str_t* kpFilename, const str_t* kpMode) {
|
||||
WelsFileHandle* WelsFopen (const char* kpFilename, const char* kpMode) {
|
||||
WelsFileHandle* pFp = NULL;
|
||||
if (fopen_s (&pFp, kpFilename, kpMode) != 0) {
|
||||
return NULL;
|
||||
@ -101,7 +101,7 @@ int32_t WelsGetTimeOfDay (SWelsTime* pTp) {
|
||||
return _ftime_s (pTp);
|
||||
}
|
||||
|
||||
int32_t WelsStrftime (str_t* pBuffer, int32_t iSize, const str_t* kpFormat, const SWelsTime* kpTp) {
|
||||
int32_t WelsStrftime (char* pBuffer, int32_t iSize, const char* kpFormat, const SWelsTime* kpTp) {
|
||||
struct tm sTimeNow;
|
||||
int32_t iRc;
|
||||
|
||||
@ -115,7 +115,7 @@ int32_t WelsStrftime (str_t* pBuffer, int32_t iSize, const str_t* kpFormat, cons
|
||||
|
||||
#else
|
||||
|
||||
int32_t WelsSnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFormat, ...) {
|
||||
int32_t WelsSnprintf (char* pBuffer, int32_t iSizeOfBuffer, const char* kpFormat, ...) {
|
||||
va_list pArgPtr;
|
||||
int32_t iRc;
|
||||
|
||||
@ -130,14 +130,14 @@ int32_t WelsSnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFor
|
||||
return iRc;
|
||||
}
|
||||
|
||||
str_t* WelsStrncpy (str_t* pDest, int32_t iSizeInBytes, const str_t* kpSrc) {
|
||||
char* WelsStrncpy (char* pDest, int32_t iSizeInBytes, const char* kpSrc) {
|
||||
strncpy (pDest, kpSrc, iSizeInBytes); //confirmed_safe_unsafe_usage
|
||||
pDest[iSizeInBytes - 1] = '\0';
|
||||
|
||||
return pDest;
|
||||
}
|
||||
|
||||
int32_t WelsVsnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFormat, va_list pArgPtr) {
|
||||
int32_t WelsVsnprintf (char* pBuffer, int32_t iSizeOfBuffer, const char* kpFormat, va_list pArgPtr) {
|
||||
int32_t iRc = vsnprintf (pBuffer, iSizeOfBuffer, kpFormat, pArgPtr); //confirmed_safe_unsafe_usage
|
||||
if (iRc < 0)
|
||||
pBuffer[iSizeOfBuffer - 1] = '\0';
|
||||
@ -145,7 +145,7 @@ int32_t WelsVsnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFor
|
||||
}
|
||||
|
||||
|
||||
WelsFileHandle* WelsFopen (const str_t* kpFilename, const str_t* kpMode) {
|
||||
WelsFileHandle* WelsFopen (const char* kpFilename, const char* kpMode) {
|
||||
return fopen (kpFilename, kpMode);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ int32_t WelsGetTimeOfDay (SWelsTime* pTp) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t WelsStrftime (str_t* pBuffer, int32_t iSize, const str_t* kpFormat, const SWelsTime* kpTp) {
|
||||
int32_t WelsStrftime (char* pBuffer, int32_t iSize, const char* kpFormat, const SWelsTime* kpTp) {
|
||||
struct tm* pTnow;
|
||||
int32_t iRc;
|
||||
|
||||
@ -175,7 +175,7 @@ int32_t WelsStrftime (str_t* pBuffer, int32_t iSize, const str_t* kpFormat, cons
|
||||
|
||||
#else //GCC
|
||||
|
||||
int32_t WelsSnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFormat, ...) {
|
||||
int32_t WelsSnprintf (char* pBuffer, int32_t iSizeOfBuffer, const char* kpFormat, ...) {
|
||||
va_list pArgPtr;
|
||||
int32_t iRc;
|
||||
|
||||
@ -188,17 +188,17 @@ int32_t WelsSnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFor
|
||||
return iRc;
|
||||
}
|
||||
|
||||
str_t* WelsStrncpy (str_t* pDest, int32_t iSizeInBytes, const str_t* kpSrc) {
|
||||
char* WelsStrncpy (char* pDest, int32_t iSizeInBytes, const char* kpSrc) {
|
||||
strncpy (pDest, kpSrc, iSizeInBytes); //confirmed_safe_unsafe_usage
|
||||
pDest[iSizeInBytes - 1] = '\0';
|
||||
return pDest;
|
||||
}
|
||||
|
||||
int32_t WelsVsnprintf (str_t* pBuffer, int32_t iSizeOfBuffer, const str_t* kpFormat, va_list pArgPtr) {
|
||||
int32_t WelsVsnprintf (char* pBuffer, int32_t iSizeOfBuffer, const char* kpFormat, va_list pArgPtr) {
|
||||
return vsnprintf (pBuffer, iSizeOfBuffer, kpFormat, pArgPtr); //confirmed_safe_unsafe_usage
|
||||
}
|
||||
|
||||
WelsFileHandle* WelsFopen (const str_t* kpFilename, const str_t* kpMode) {
|
||||
WelsFileHandle* WelsFopen (const char* kpFilename, const char* kpMode) {
|
||||
return fopen (kpFilename, kpMode);
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ int32_t WelsGetTimeOfDay (SWelsTime* pTp) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t WelsStrftime (str_t* pBuffer, int32_t iSize, const str_t* kpFormat, const SWelsTime* kpTp) {
|
||||
int32_t WelsStrftime (char* pBuffer, int32_t iSize, const char* kpFormat, const SWelsTime* kpTp) {
|
||||
struct tm* pTnow;
|
||||
int32_t iRc;
|
||||
|
||||
@ -234,12 +234,12 @@ int32_t WelsStrftime (str_t* pBuffer, int32_t iSize, const str_t* kpFormat, cons
|
||||
#endif
|
||||
|
||||
|
||||
str_t* WelsStrcat (str_t* pDest, int32_t iSizeInBytes, const str_t* kpSrc) {
|
||||
char* WelsStrcat (char* pDest, int32_t iSizeInBytes, const char* kpSrc) {
|
||||
int32_t iCurLen = strlen(pDest);
|
||||
return WelsStrncpy(pDest + iCurLen, iSizeInBytes - iCurLen, kpSrc);
|
||||
}
|
||||
|
||||
int32_t WelsFwrite (const void_t* kpBuffer, int32_t iSize, int32_t iCount, WelsFileHandle* pFp) {
|
||||
int32_t WelsFwrite (const void* kpBuffer, int32_t iSize, int32_t iCount, WelsFileHandle* pFp) {
|
||||
return fwrite (kpBuffer, iSize, iCount, pFp);
|
||||
}
|
||||
|
||||
|
@ -75,12 +75,12 @@ typedef struct _timeb SWelsTime;
|
||||
typedef struct timeb SWelsTime;
|
||||
#endif
|
||||
|
||||
int32_t WelsSnprintf (str_t* buffer, int32_t sizeOfBuffer, const str_t* format, ...);
|
||||
str_t* WelsStrncpy (str_t* dest, int32_t sizeInBytes, const str_t* src);
|
||||
str_t* WelsStrcat (str_t* dest, int32_t sizeInBytes, const str_t* src);
|
||||
int32_t WelsVsnprintf (str_t* buffer, int32_t sizeOfBuffer, const str_t* format, va_list argptr);
|
||||
int32_t WelsSnprintf (char* buffer, int32_t sizeOfBuffer, const char* format, ...);
|
||||
char* WelsStrncpy (char* dest, int32_t sizeInBytes, const char* src);
|
||||
char* WelsStrcat (char* dest, int32_t sizeInBytes, const char* src);
|
||||
int32_t WelsVsnprintf (char* buffer, int32_t sizeOfBuffer, const char* format, va_list argptr);
|
||||
|
||||
WelsFileHandle* WelsFopen (const str_t* filename, const str_t* mode);
|
||||
WelsFileHandle* WelsFopen (const char* filename, const char* mode);
|
||||
int32_t WelsFclose (WelsFileHandle* fp);
|
||||
int32_t WelsFread (void* buffer, int32_t size, int32_t count, WelsFileHandle* fp);
|
||||
int32_t WelsFwrite (const void* buffer, int32_t size, int32_t count, WelsFileHandle* fp);
|
||||
@ -88,7 +88,7 @@ int32_t WelsFseek (WelsFileHandle* fp, int32_t offset, int32_t or
|
||||
int32_t WelsFflush (WelsFileHandle* fp);
|
||||
|
||||
int32_t WelsGetTimeOfDay (SWelsTime* tp);
|
||||
int32_t WelsStrftime (str_t* buffer, int32_t size, const str_t* format, const SWelsTime* tp);
|
||||
int32_t WelsStrftime (char* buffer, int32_t size, const char* format, const SWelsTime* tp);
|
||||
uint16_t WelsGetMillisecond (const SWelsTime* tp);
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "deblocking_common.h"
|
||||
#include "macros.h"
|
||||
// C code only
|
||||
void_t DeblockLumaLt4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int32_t iAlpha, int32_t iBeta,
|
||||
void DeblockLumaLt4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int32_t iAlpha, int32_t iBeta,
|
||||
int8_t* pTc) {
|
||||
for (int32_t i = 0; i < 16; i++) {
|
||||
int32_t iTc0 = pTc[i >> 2];
|
||||
@ -12,13 +12,13 @@ void_t DeblockLumaLt4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int3
|
||||
int32_t q0 = pPix[0];
|
||||
int32_t q1 = pPix[iStrideX];
|
||||
int32_t q2 = pPix[2 * iStrideX];
|
||||
bool_t bDetaP0Q0 = WELS_ABS (p0 - q0) < iAlpha;
|
||||
bool_t bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||
bool_t bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||
bool bDetaP0Q0 = WELS_ABS (p0 - q0) < iAlpha;
|
||||
bool bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||
bool bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||
int32_t iTc = iTc0;
|
||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||
bool_t bDetaP2P0 = WELS_ABS (p2 - p0) < iBeta;
|
||||
bool_t bDetaQ2Q0 = WELS_ABS (q2 - q0) < iBeta;
|
||||
bool bDetaP2P0 = WELS_ABS (p2 - p0) < iBeta;
|
||||
bool bDetaQ2Q0 = WELS_ABS (q2 - q0) < iBeta;
|
||||
if (bDetaP2P0) {
|
||||
pPix[-2 * iStrideX] = p1 + WELS_CLIP3 ((p2 + ((p0 + q0 + 1) >> 1) - (p1 << 1)) >> 1, -iTc0, iTc0);
|
||||
iTc++;
|
||||
@ -35,10 +35,10 @@ void_t DeblockLumaLt4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int3
|
||||
pPix += iStrideY;
|
||||
}
|
||||
}
|
||||
void_t DeblockLumaEq4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int32_t iAlpha, int32_t iBeta) {
|
||||
void DeblockLumaEq4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int32_t iAlpha, int32_t iBeta) {
|
||||
int32_t p0, p1, p2, q0, q1, q2;
|
||||
int32_t iDetaP0Q0;
|
||||
bool_t bDetaP1P0, bDetaQ1Q0;
|
||||
bool bDetaP1P0, bDetaQ1Q0;
|
||||
for (int32_t i = 0; i < 16; i++) {
|
||||
p0 = pPix[-iStrideX];
|
||||
p1 = pPix[-2 * iStrideX];
|
||||
@ -51,8 +51,8 @@ void_t DeblockLumaEq4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int3
|
||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||
if ((iDetaP0Q0 < iAlpha) && bDetaP1P0 && bDetaQ1Q0) {
|
||||
if (iDetaP0Q0 < ((iAlpha >> 2) + 2)) {
|
||||
bool_t bDetaP2P0 = WELS_ABS (p2 - p0) < iBeta;
|
||||
bool_t bDetaQ2Q0 = WELS_ABS (q2 - q0) < iBeta;
|
||||
bool bDetaP2P0 = WELS_ABS (p2 - p0) < iBeta;
|
||||
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
|
||||
@ -77,22 +77,22 @@ void_t DeblockLumaEq4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int3
|
||||
pPix += iStrideY;
|
||||
}
|
||||
}
|
||||
void_t DeblockLumaLt4V_c (uint8_t* pPix, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* tc) {
|
||||
void DeblockLumaLt4V_c (uint8_t* pPix, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* tc) {
|
||||
DeblockLumaLt4_c (pPix, iStride, 1, iAlpha, iBeta, tc);
|
||||
}
|
||||
void_t DeblockLumaLt4H_c (uint8_t* pPix, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* tc) {
|
||||
void DeblockLumaLt4H_c (uint8_t* pPix, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* tc) {
|
||||
DeblockLumaLt4_c (pPix, 1, iStride, iAlpha, iBeta, tc);
|
||||
}
|
||||
void_t DeblockLumaEq4V_c (uint8_t* pPix, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
|
||||
void DeblockLumaEq4V_c (uint8_t* pPix, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
|
||||
DeblockLumaEq4_c (pPix, iStride, 1, iAlpha, iBeta);
|
||||
}
|
||||
void_t DeblockLumaEq4H_c (uint8_t* pPix, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
|
||||
void DeblockLumaEq4H_c (uint8_t* pPix, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
|
||||
DeblockLumaEq4_c (pPix, 1, iStride, iAlpha, iBeta);
|
||||
}
|
||||
void_t DeblockChromaLt4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int32_t iStrideY, int32_t iAlpha,
|
||||
void DeblockChromaLt4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int32_t iStrideY, int32_t iAlpha,
|
||||
int32_t iBeta, int8_t* pTc) {
|
||||
int32_t p0, p1, q0, q1, iDeta;
|
||||
bool_t bDetaP0Q0, bDetaP1P0, bDetaQ1Q0;
|
||||
bool bDetaP0Q0, bDetaP1P0, bDetaQ1Q0;
|
||||
|
||||
for (int32_t i = 0; i < 8; i++) {
|
||||
int32_t iTc0 = pTc[i >> 1];
|
||||
@ -131,10 +131,10 @@ void_t DeblockChromaLt4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, i
|
||||
pPixCr += iStrideY;
|
||||
}
|
||||
}
|
||||
void_t DeblockChromaEq4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int32_t iStrideY, int32_t iAlpha,
|
||||
void DeblockChromaEq4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int32_t iStrideY, int32_t iAlpha,
|
||||
int32_t iBeta) {
|
||||
int32_t p0, p1, q0, q1;
|
||||
bool_t bDetaP0Q0, bDetaP1P0, bDetaQ1Q0;
|
||||
bool bDetaP0Q0, bDetaP1P0, bDetaQ1Q0;
|
||||
for (int32_t i = 0; i < 8; i++) {
|
||||
//cb
|
||||
p0 = pPixCb[-iStrideX];
|
||||
@ -165,18 +165,18 @@ void_t DeblockChromaEq4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, i
|
||||
pPixCb += iStrideY;
|
||||
}
|
||||
}
|
||||
void_t DeblockChromaLt4V_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
void DeblockChromaLt4V_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
int8_t* tc) {
|
||||
DeblockChromaLt4_c (pPixCb, pPixCr, iStride, 1, iAlpha, iBeta, tc);
|
||||
}
|
||||
void_t DeblockChromaLt4H_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
void DeblockChromaLt4H_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
int8_t* tc) {
|
||||
DeblockChromaLt4_c (pPixCb, pPixCr, 1, iStride, iAlpha, iBeta, tc);
|
||||
}
|
||||
void_t DeblockChromaEq4V_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
|
||||
void DeblockChromaEq4V_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
|
||||
DeblockChromaEq4_c (pPixCb, pPixCr, iStride, 1, iAlpha, iBeta);
|
||||
}
|
||||
void_t DeblockChromaEq4H_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
|
||||
void DeblockChromaEq4H_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
|
||||
DeblockChromaEq4_c (pPixCb, pPixCr, 1, iStride, iAlpha, iBeta);
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
#ifndef WELS_DEBLOCKING_COMMON_H__
|
||||
#define WELS_DEBLOCKING_COMMON_H__
|
||||
#include "typedefs.h"
|
||||
void_t DeblockLumaLt4V_c (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* pTc);
|
||||
void_t DeblockLumaEq4V_c (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
void DeblockLumaLt4V_c (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* pTc);
|
||||
void DeblockLumaEq4V_c (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
|
||||
void_t DeblockLumaLt4H_c (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* pTc);
|
||||
void_t DeblockLumaEq4H_c (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
void DeblockLumaLt4H_c (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* pTc);
|
||||
void DeblockLumaEq4H_c (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
|
||||
void_t DeblockChromaLt4V_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
void DeblockChromaLt4V_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
int8_t* pTc);
|
||||
void_t DeblockChromaEq4V_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
void DeblockChromaEq4V_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
|
||||
void_t DeblockChromaLt4H_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
void DeblockChromaLt4H_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
int8_t* pTc);
|
||||
void_t DeblockChromaEq4H_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
void DeblockChromaEq4H_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -41,7 +41,7 @@ void WelsStderrSetTraceLevel (int32_t level) {
|
||||
g_TraceLevel = level;
|
||||
}
|
||||
|
||||
int32_t welsStderrLevelTrace (int32_t level, const str_t* format, va_list ap) {
|
||||
int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap) {
|
||||
if (level < g_TraceLevel) {
|
||||
vfprintf (stderr, format, ap);
|
||||
}
|
||||
|
@ -40,10 +40,10 @@ void WelsStderrSetTraceLevel (int32_t level);
|
||||
|
||||
|
||||
// Internal details.
|
||||
int32_t welsStderrLevelTrace (int32_t level, const str_t* format, va_list ap);
|
||||
int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap);
|
||||
|
||||
template<int level> int32_t welsStderrTrace (
|
||||
const str_t* format, ...) {
|
||||
const char* format, ...) {
|
||||
va_list ap;
|
||||
va_start (ap, format);
|
||||
welsStderrLevelTrace (level, format, ap);
|
||||
|
@ -57,9 +57,9 @@ struct tagUnaligned_16 {
|
||||
#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
|
||||
#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
|
||||
// #else
|
||||
// inline void_t __ST16(void_t *dst, uint16_t v) { memcpy(dst, &v, 2); }
|
||||
// inline void_t __ST32(void_t *dst, uint32_t v) { memcpy(dst, &v, 4); }
|
||||
//inline void_t __ST64(void_t *dst, uint64_t v) { memcpy(dst, &v, 8); }
|
||||
// inline void __ST16(void *dst, uint16_t v) { memcpy(dst, &v, 2); }
|
||||
// inline void __ST32(void *dst, uint32_t v) { memcpy(dst, &v, 4); }
|
||||
//inline void __ST64(void *dst, uint64_t v) { memcpy(dst, &v, 8); }
|
||||
// #endif
|
||||
|
||||
#else
|
||||
|
@ -248,7 +248,7 @@ return r;
|
||||
#define BUTTERFLY4x8(dw) (((uint64_t)(dw)<<32) | (dw))
|
||||
#endif//BUTTERFLY4x8
|
||||
|
||||
static inline BOOL_T WELS_POWER2_IF (uint32_t v) {
|
||||
static inline bool WELS_POWER2_IF (uint32_t v) {
|
||||
return (v && ! (v & (v - 1)));
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ WELS_EXTERN McCopyWidthEq16_sse2
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t PixelAvgWidthEq4_mmx( uint8_t *pDst, int iDstStride,
|
||||
; void PixelAvgWidthEq4_mmx( uint8_t *pDst, int iDstStride,
|
||||
; uint8_t *pSrcA, int iSrcAStride,
|
||||
; uint8_t *pSrcB, int iSrcBStride,
|
||||
; int iHeight );
|
||||
@ -468,7 +468,7 @@ ALIGN 4
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t PixelAvgWidthEq8_mmx( uint8_t *pDst, int iDstStride,
|
||||
; void PixelAvgWidthEq8_mmx( uint8_t *pDst, int iDstStride,
|
||||
; uint8_t *pSrcA, int iSrcAStride,
|
||||
; uint8_t *pSrcB, int iSrcBStride,
|
||||
; int iHeight );
|
||||
@ -522,7 +522,7 @@ ALIGN 4
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t PixelAvgWidthEq16_sse2( uint8_t *pDst, int iDstStride,
|
||||
; void PixelAvgWidthEq16_sse2( uint8_t *pDst, int iDstStride,
|
||||
; uint8_t *pSrcA, int iSrcAStride,
|
||||
; uint8_t *pSrcB, int iSrcBStride,
|
||||
; int iHeight );
|
||||
@ -577,7 +577,7 @@ ALIGN 4
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t McCopyWidthEq4_mmx( uint8_t *pSrc, int iSrcStride,
|
||||
; void McCopyWidthEq4_mmx( uint8_t *pSrc, int iSrcStride,
|
||||
; uint8_t *pDst, int iDstStride, int iHeight )
|
||||
;*******************************************************************************
|
||||
McCopyWidthEq4_mmx:
|
||||
@ -618,7 +618,7 @@ ALIGN 4
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t McCopyWidthEq8_mmx( uint8_t *pSrc, int iSrcStride,
|
||||
; void McCopyWidthEq8_mmx( uint8_t *pSrc, int iSrcStride,
|
||||
; uint8_t *pDst, int iDstStride, int iHeight )
|
||||
;*******************************************************************************
|
||||
McCopyWidthEq8_mmx:
|
||||
@ -655,7 +655,7 @@ ALIGN 4
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t McCopyWidthEq16_sse2( uint8_t *pSrc, int iSrcStride, uint8_t *pDst, int iDstStride, int iHeight )
|
||||
; void McCopyWidthEq16_sse2( uint8_t *pSrc, int iSrcStride, uint8_t *pDst, int iDstStride, int iHeight )
|
||||
;*******************************************************************************
|
||||
;read unaligned memory
|
||||
%macro SSE_READ_UNA 2
|
||||
|
@ -76,7 +76,7 @@ WELS_EXTERN McHorVer20WidthEq4_mmx
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t McHorVer20WidthEq4_mmx( uint8_t *pSrc,
|
||||
; void McHorVer20WidthEq4_mmx( uint8_t *pSrc,
|
||||
; int iSrcStride,
|
||||
; uint8_t *pDst,
|
||||
; int iDstStride,
|
||||
@ -179,7 +179,7 @@ WELS_EXTERN McHorVer20WidthEq16_sse2
|
||||
|
||||
ALIGN 16
|
||||
;***********************************************************************
|
||||
; void_t McHorVer22Width8HorFirst_sse2(int16_t *pSrc,
|
||||
; void McHorVer22Width8HorFirst_sse2(int16_t *pSrc,
|
||||
; int16_t iSrcStride,
|
||||
; uint8_t *pDst,
|
||||
; int32_t iDstStride
|
||||
@ -241,7 +241,7 @@ McHorVer22Width8HorFirst_sse2:
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t McHorVer20WidthEq8_sse2( uint8_t *pSrc,
|
||||
; void McHorVer20WidthEq8_sse2( uint8_t *pSrc,
|
||||
; int iSrcStride,
|
||||
; uint8_t *pDst,
|
||||
; int iDstStride,
|
||||
@ -307,7 +307,7 @@ McHorVer20WidthEq8_sse2:
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t McHorVer20WidthEq16_sse2( uint8_t *pSrc,
|
||||
; void McHorVer20WidthEq16_sse2( uint8_t *pSrc,
|
||||
; int iSrcStride,
|
||||
; uint8_t *pDst,
|
||||
; int iDstStride,
|
||||
@ -398,7 +398,7 @@ McHorVer20WidthEq16_sse2:
|
||||
|
||||
|
||||
;*******************************************************************************
|
||||
; void_t McHorVer02WidthEq8_sse2( uint8_t *pSrc,
|
||||
; void McHorVer02WidthEq8_sse2( uint8_t *pSrc,
|
||||
; int iSrcStride,
|
||||
; uint8_t *pDst,
|
||||
; int iDstStride,
|
||||
@ -1290,4 +1290,4 @@ McHorVer22HorFirst_sse2:
|
||||
pop r12
|
||||
%endif
|
||||
LOAD_6_PARA_POP
|
||||
ret
|
||||
ret
|
||||
|
@ -57,11 +57,11 @@ extern "C" {
|
||||
|
||||
/*!
|
||||
* \brief time cost measure utilization
|
||||
* \param void_t
|
||||
* \param void
|
||||
* \return time elapsed since run (unit: microsecond)
|
||||
*/
|
||||
|
||||
static inline int64_t WelsTime (void_t) {
|
||||
static inline int64_t WelsTime (void) {
|
||||
#ifndef _WIN32
|
||||
struct timeval tv_date;
|
||||
|
||||
|
@ -60,8 +60,6 @@ typedef unsigned __int64 uint64_t;
|
||||
|
||||
#endif // _MSC_VER defined
|
||||
|
||||
// FIXME: all string type should be declared explicit as char.
|
||||
typedef char str_t;
|
||||
// The 'float' type is portable and usable without any need for any extra typedefs.
|
||||
|
||||
#ifdef EPSN
|
||||
@ -69,20 +67,5 @@ typedef char str_t;
|
||||
#endif//EPSN
|
||||
#define EPSN (0.000001f) // (1e-6) // desired float precision
|
||||
|
||||
typedef bool bool_t;
|
||||
typedef int32_t BOOL_T;
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE ((int32_t)0)
|
||||
#endif//FALSE
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE ((int32_t)1)
|
||||
#endif//TRUE
|
||||
|
||||
#ifndef void_t
|
||||
#define void_t void
|
||||
#endif
|
||||
|
||||
#endif //WELS_TYPE_DEFINES_H__
|
||||
|
||||
|
@ -57,8 +57,8 @@ using namespace std;
|
||||
|
||||
//#define STICK_STREAM_SIZE // For Demo interfaces test with track file of integrated frames
|
||||
|
||||
void_t H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, const char* kpOuputFileName,
|
||||
int32_t& iWidth, int32_t& iHeight, void_t* pOptionFileName) {
|
||||
void H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, const char* kpOuputFileName,
|
||||
int32_t& iWidth, int32_t& iHeight, void* pOptionFileName) {
|
||||
FILE* pH264File = NULL;
|
||||
FILE* pYuvFile = NULL;
|
||||
FILE* pOptionFile = NULL;
|
||||
@ -68,7 +68,7 @@ void_t H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, co
|
||||
uint8_t* pBuf = NULL;
|
||||
uint8_t uiStartCode[4] = {0, 0, 0, 1};
|
||||
|
||||
void_t* pData[3] = {NULL};
|
||||
void* pData[3] = {NULL};
|
||||
uint8_t* pDst[3] = {NULL};
|
||||
SBufferInfo sDstBufInfo;
|
||||
|
||||
@ -171,7 +171,7 @@ void_t H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, co
|
||||
if (iBufPos >= iFileSize) {
|
||||
iEndOfStreamFlag = true;
|
||||
if (iEndOfStreamFlag)
|
||||
pDecoder->SetOption (DECODER_OPTION_END_OF_STREAM, (void_t*)&iEndOfStreamFlag);
|
||||
pDecoder->SetOption (DECODER_OPTION_END_OF_STREAM, (void*)&iEndOfStreamFlag);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ void_t H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, co
|
||||
iTotal += iEnd - iStart;
|
||||
if (sDstBufInfo.iBufferStatus == 1) {
|
||||
iFrameNum++;
|
||||
cOutputModule.Process ((void_t**)pDst, &sDstBufInfo, pYuvFile);
|
||||
cOutputModule.Process ((void**)pDst, &sDstBufInfo, pYuvFile);
|
||||
if (sDstBufInfo.eBufferProperty == BUFFER_HOST) {
|
||||
iWidth = sDstBufInfo.UsrData.sSystemBuffer.iWidth;
|
||||
iHeight = sDstBufInfo.UsrData.sSystemBuffer.iHeight;
|
||||
@ -267,7 +267,7 @@ void_t H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, co
|
||||
}
|
||||
|
||||
if (sDstBufInfo.iBufferStatus == 1) {
|
||||
cOutputModule.Process ((void_t**)pDst, &sDstBufInfo, pYuvFile);
|
||||
cOutputModule.Process ((void**)pDst, &sDstBufInfo, pYuvFile);
|
||||
if (sDstBufInfo.eBufferProperty == BUFFER_HOST) {
|
||||
iWidth = sDstBufInfo.UsrData.sSystemBuffer.iWidth;
|
||||
iHeight = sDstBufInfo.UsrData.sSystemBuffer.iHeight;
|
||||
@ -446,7 +446,7 @@ int32_t main (int32_t iArgC, char* pArgV[]) {
|
||||
|
||||
|
||||
H264DecodeInstance (pDecoder, strInputFile.c_str(), strOutputFile.c_str(), iWidth, iHeight,
|
||||
(!strOptionFile.empty() ? (void_t*) (const_cast<char*> (strOptionFile.c_str())) : NULL));
|
||||
(!strOptionFile.empty() ? (void*) (const_cast<char*> (strOptionFile.c_str())) : NULL));
|
||||
|
||||
if (sDecParam.pFileNameRestructed != NULL) {
|
||||
delete []sDecParam.pFileNameRestructed;
|
||||
|
@ -255,7 +255,7 @@ int ParseConfig (CReadConfig& cRdCfg, SWelsSvcCodingParam& pSvcParam, SFilesSet&
|
||||
|
||||
while (!cRdLayerCfg.EndOfFile()) {
|
||||
long iLayerRd = cRdLayerCfg.ReadLine (&strTag[0]);
|
||||
bool_t bFound = false;
|
||||
bool bFound = false;
|
||||
if (iLayerRd > 0) {
|
||||
if (strTag[0].empty())
|
||||
continue;
|
||||
@ -283,7 +283,7 @@ int ParseConfig (CReadConfig& cRdCfg, SWelsSvcCodingParam& pSvcParam, SFilesSet&
|
||||
} else if (strTag[0].compare ("ProfileIdc") == 0) {
|
||||
pDLayer->uiProfileIdc = atoi (strTag[1].c_str());
|
||||
} else if (strTag[0].compare ("FRExt") == 0) {
|
||||
// pDLayer->frext_mode = (bool_t)atoi(strTag[1].c_str());
|
||||
// pDLayer->frext_mode = (bool)atoi(strTag[1].c_str());
|
||||
} else if (strTag[0].compare ("SpatialBitrate") == 0) {
|
||||
pDLayer->iSpatialBitrate = 1000 * atoi (strTag[1].c_str());
|
||||
if (pSvcParam.bEnableRc && pDLayer->iSpatialBitrate <= 0) {
|
||||
@ -523,7 +523,7 @@ int ParseCommandLine (int argc, char** argv, SWelsSvcCodingParam& pSvcParam, SFi
|
||||
} else if (strTag[0].compare ("ProfileIdc") == 0) {
|
||||
pDLayer->uiProfileIdc = atoi (strTag[1].c_str());
|
||||
} else if (strTag[0].compare ("FRExt") == 0) {
|
||||
// pDLayer->frext_mode = (bool_t)atoi(strTag[1].c_str());
|
||||
// pDLayer->frext_mode = (bool)atoi(strTag[1].c_str());
|
||||
} else if (strTag[0].compare ("SpatialBitrate") == 0) {
|
||||
pDLayer->iSpatialBitrate = 1000 * atoi (strTag[1].c_str());
|
||||
} else if (strTag[0].compare ("InitialQP") == 0) {
|
||||
@ -1040,8 +1040,8 @@ int ProcessEncodingSvcWithConfig (ISVCEncoder* pPtrEnc, int argc, char** argv) {
|
||||
iFrameIdx = 0;
|
||||
while (iFrameIdx < iTotalFrameMax && (((int32_t)sSvcParam.uiFrameToBeCoded <= 0)
|
||||
|| (iFrameIdx < (int32_t)sSvcParam.uiFrameToBeCoded))) {
|
||||
bool_t bOnePicAvailableAtLeast = false;
|
||||
bool_t bSomeSpatialUnavailable = false;
|
||||
bool bOnePicAvailableAtLeast = false;
|
||||
bool bSomeSpatialUnavailable = false;
|
||||
|
||||
#ifdef ONLY_ENC_FRAMES_NUM
|
||||
// Only encoded some limited frames here
|
||||
@ -1057,7 +1057,7 @@ int ProcessEncodingSvcWithConfig (ISVCEncoder* pPtrEnc, int argc, char** argv) {
|
||||
const int kiPicResSize = ((pDLayer->iActualWidth * pDLayer->iActualHeight) * 3) >> 1;
|
||||
uint32_t uiSkipIdx = (1 << pDLayer->iTemporalResolution);
|
||||
|
||||
bool_t bCanBeRead = false;
|
||||
bool bCanBeRead = false;
|
||||
|
||||
if (iFrameIdx % uiSkipIdx == 0) { // such layer is enabled to encode indeed
|
||||
bCanBeRead = (fread (pYUV[iDlayerIdx], 1, kiPicResSize, pFileYUV[iDlayerIdx]) == kiPicResSize);
|
||||
|
@ -53,7 +53,7 @@ WELS_EXTERN WelsResBlockZero16x16_sse2
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t WelsResBlockZero16x16_sse2(int16_t* pBlock,int32_t iStride)
|
||||
; void WelsResBlockZero16x16_sse2(int16_t* pBlock,int32_t iStride)
|
||||
;*******************************************************************************
|
||||
WelsResBlockZero16x16_sse2:
|
||||
;push r0
|
||||
@ -134,7 +134,7 @@ WELS_EXTERN WelsResBlockZero8x8_sse2
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t WelsResBlockZero8x8_sse2(int16_t * pBlock, int32_t iStride)
|
||||
; void WelsResBlockZero8x8_sse2(int16_t * pBlock, int32_t iStride)
|
||||
;*******************************************************************************
|
||||
WelsResBlockZero8x8_sse2:
|
||||
;push r0
|
||||
|
@ -87,7 +87,7 @@ WELS_EXTERN IdctResAddPred_mmx
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t __cdecl IdctResAddPred_mmx( uint8_t *pPred, const int32_t kiStride, int16_t *pRs )
|
||||
; void __cdecl IdctResAddPred_mmx( uint8_t *pPred, const int32_t kiStride, int16_t *pRs )
|
||||
;*******************************************************************************
|
||||
|
||||
IdctResAddPred_mmx:
|
||||
|
@ -184,7 +184,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredPlane_sse2
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t __cdecl WelsDecoderI4x4LumaPredH_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
; void __cdecl WelsDecoderI4x4LumaPredH_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
;
|
||||
; pPred must align to 16
|
||||
;*******************************************************************************
|
||||
@ -224,7 +224,7 @@ WelsDecoderI4x4LumaPredH_sse2:
|
||||
ret
|
||||
|
||||
;*******************************************************************************
|
||||
; void_t WelsDecoderI16x16LumaPredPlane_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
; void WelsDecoderI16x16LumaPredPlane_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
;*******************************************************************************
|
||||
WelsDecoderI16x16LumaPredPlane_sse2:
|
||||
;%define pushsize 4
|
||||
@ -325,7 +325,7 @@ get_i16x16_luma_pred_plane_sse2_1:
|
||||
|
||||
|
||||
;*******************************************************************************
|
||||
; void_t WelsDecoderI16x16LumaPredH_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
; void WelsDecoderI16x16LumaPredH_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
;*******************************************************************************
|
||||
|
||||
%macro SSE2_PRED_H_16X16_TWO_LINE_DEC 2
|
||||
@ -363,7 +363,7 @@ WelsDecoderI16x16LumaPredH_sse2:
|
||||
ret
|
||||
|
||||
;*******************************************************************************
|
||||
; void_t WelsDecoderI16x16LumaPredV_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
; void WelsDecoderI16x16LumaPredV_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderI16x16LumaPredV_sse2
|
||||
WelsDecoderI16x16LumaPredV_sse2:
|
||||
@ -406,7 +406,7 @@ WelsDecoderI16x16LumaPredV_sse2:
|
||||
ret
|
||||
|
||||
;*******************************************************************************
|
||||
; void_t WelsDecoderIChromaPredPlane_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
; void WelsDecoderIChromaPredPlane_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderIChromaPredPlane_sse2
|
||||
WelsDecoderIChromaPredPlane_sse2:
|
||||
@ -515,7 +515,7 @@ ALIGN 16
|
||||
; 7 is the start pixel of current 4x4 block
|
||||
; pPred[7] = ([6]+[0]*2+[1]+2)/4
|
||||
;
|
||||
; void_t __cdecl WelsDecoderI4x4LumaPredDDR_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void __cdecl WelsDecoderI4x4LumaPredDDR_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
;
|
||||
;*******************************************************************************
|
||||
WelsDecoderI4x4LumaPredDDR_mmx:
|
||||
@ -571,7 +571,7 @@ WelsDecoderI4x4LumaPredDDR_mmx:
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t __cdecl WelsDecoderIChromaPredH_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void __cdecl WelsDecoderIChromaPredH_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; copy 8 pixel of 8 line from left
|
||||
;*******************************************************************************
|
||||
%macro MMX_PRED_H_8X8_ONE_LINE 4
|
||||
@ -637,7 +637,7 @@ WelsDecoderIChromaPredH_mmx:
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t __cdecl WelsDecoderIChromaPredV_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void __cdecl WelsDecoderIChromaPredV_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; copy 8 pixels from top 8 pixels
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderIChromaPredV_mmx
|
||||
@ -697,7 +697,7 @@ WelsDecoderIChromaPredV_mmx:
|
||||
; j = (2 + l3 + (l2<<1) + l1)>>2
|
||||
; [b a f e h g j i] + [d c b a] --> mov to memory
|
||||
;
|
||||
; void_t WelsDecoderI4x4LumaPredHD_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderI4x4LumaPredHD_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx
|
||||
WelsDecoderI4x4LumaPredHD_mmx:
|
||||
@ -786,7 +786,7 @@ ALIGN 16
|
||||
|
||||
; [g g f e d c b a] + [g g g g] --> mov to memory
|
||||
;
|
||||
; void_t WelsDecoderI4x4LumaPredHU_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderI4x4LumaPredHU_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx
|
||||
WelsDecoderI4x4LumaPredHU_mmx:
|
||||
@ -878,7 +878,7 @@ ALIGN 16
|
||||
; i = (2 + lt + (l0<<1) + l1)>>2
|
||||
; j = (2 + l0 + (l1<<1) + l2)>>2
|
||||
;
|
||||
; void_t WelsDecoderI4x4LumaPredVR_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderI4x4LumaPredVR_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx
|
||||
WelsDecoderI4x4LumaPredVR_mmx:
|
||||
@ -971,7 +971,7 @@ ALIGN 16
|
||||
|
||||
; [g f e d c b a] --> mov to memory
|
||||
;
|
||||
; void_t WelsDecoderI4x4LumaPredDDL_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderI4x4LumaPredDDL_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx
|
||||
WelsDecoderI4x4LumaPredDDL_mmx:
|
||||
@ -1046,7 +1046,7 @@ ALIGN 16
|
||||
|
||||
; [i d c b a] + [j h g f e] --> mov to memory
|
||||
;
|
||||
; void_t WelsDecoderI4x4LumaPredVL_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderI4x4LumaPredVL_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderI4x4LumaPredVL_mmx
|
||||
WelsDecoderI4x4LumaPredVL_mmx:
|
||||
@ -1093,7 +1093,7 @@ WelsDecoderI4x4LumaPredVL_mmx:
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
;
|
||||
; void_t WelsDecoderIChromaPredDc_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderIChromaPredDc_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderIChromaPredDc_sse2
|
||||
WelsDecoderIChromaPredDc_sse2:
|
||||
@ -1198,7 +1198,7 @@ WelsDecoderIChromaPredDc_sse2:
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
;
|
||||
; void_t WelsDecoderI16x16LumaPredDc_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderI16x16LumaPredDc_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderI16x16LumaPredDc_sse2
|
||||
WelsDecoderI16x16LumaPredDc_sse2:
|
||||
@ -1286,7 +1286,7 @@ WelsDecoderI16x16LumaPredDc_sse2:
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t WelsDecoderI16x16LumaPredDcTop_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderI16x16LumaPredDcTop_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderI16x16LumaPredDcTop_sse2
|
||||
WelsDecoderI16x16LumaPredDcTop_sse2:
|
||||
@ -1366,7 +1366,7 @@ WelsDecoderI16x16LumaPredDcTop_sse2:
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t WelsDecoderI16x16LumaPredDcNA_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderI16x16LumaPredDcNA_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderI16x16LumaPredDcNA_sse2
|
||||
WelsDecoderI16x16LumaPredDcNA_sse2:
|
||||
@ -1412,7 +1412,7 @@ WelsDecoderI16x16LumaPredDcNA_sse2:
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t WelsDecoderIChromaPredDcLeft_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderIChromaPredDcLeft_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderIChromaPredDcLeft_mmx
|
||||
WelsDecoderIChromaPredDcLeft_mmx:
|
||||
@ -1495,7 +1495,7 @@ WelsDecoderIChromaPredDcLeft_mmx:
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t WelsDecoderIChromaPredDcTop_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderIChromaPredDcTop_sse2(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderIChromaPredDcTop_sse2
|
||||
WelsDecoderIChromaPredDcTop_sse2:
|
||||
@ -1544,7 +1544,7 @@ WelsDecoderIChromaPredDcTop_sse2:
|
||||
|
||||
ALIGN 16
|
||||
;*******************************************************************************
|
||||
; void_t WelsDecoderIChromaPredDcNA_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
; void WelsDecoderIChromaPredDcNA_mmx(uint8_t *pPred, const int32_t kiStride)
|
||||
;*******************************************************************************
|
||||
WELS_EXTERN WelsDecoderIChromaPredDcNA_mmx
|
||||
WelsDecoderIChromaPredDcNA_mmx:
|
||||
|
@ -88,12 +88,12 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade
|
||||
|
||||
int32_t ParseNonVclNal (PWelsDecoderContext pCtx, uint8_t* pRbsp, const int32_t kiSrcLen);
|
||||
|
||||
void_t ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePicMarking);
|
||||
void ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePicMarking);
|
||||
|
||||
void_t ParsePrefixNalUnit (PWelsDecoderContext pCtx, PBitStringAux pBs);
|
||||
void ParsePrefixNalUnit (PWelsDecoderContext pCtx, PBitStringAux pBs);
|
||||
|
||||
bool_t CheckAccessUnitBoundary (const PNalUnit kpCurNal, const PNalUnit kpLastNal, const PSps kpSps);
|
||||
bool_t CheckAccessUnitBoundaryExt (PNalUnitHeaderExt pLastNalHdrExt, PNalUnitHeaderExt pCurNalHeaderExt,
|
||||
bool CheckAccessUnitBoundary (const PNalUnit kpCurNal, const PNalUnit kpLastNal, const PSps kpSps);
|
||||
bool CheckAccessUnitBoundaryExt (PNalUnitHeaderExt pLastNalHdrExt, PNalUnitHeaderExt pCurNalHeaderExt,
|
||||
PSliceHeader pLastSliceHeader, PSliceHeader pCurSliceHeader);
|
||||
/*!
|
||||
*************************************************************************************
|
||||
@ -141,7 +141,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux)
|
||||
* \note Call it in case eNalUnitType is NAL_UNIT_SEI.
|
||||
*************************************************************************************
|
||||
*/
|
||||
int32_t ParseSei (void_t* pSei, PBitStringAux pBsAux); // reserved Sei_Msg type
|
||||
int32_t ParseSei (void* pSei, PBitStringAux pBsAux); // reserved Sei_Msg type
|
||||
|
||||
/*!
|
||||
*************************************************************************************
|
||||
|
@ -64,7 +64,7 @@ int32_t iLeftBits; // count number of available bits left ([1, 8]),
|
||||
*/
|
||||
int32_t InitBits (PBitStringAux pBitString, const uint8_t* kpBuf, const int32_t kiSize);
|
||||
|
||||
void_t InitReadBits (PBitStringAux pBitString);
|
||||
void InitReadBits (PBitStringAux pBitString);
|
||||
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace WelsDec {
|
||||
* \return NONE
|
||||
*/
|
||||
|
||||
void_t DeblockingInit (PDeblockingFunc pDeblockingFunc, int32_t iCpu);
|
||||
void DeblockingInit (PDeblockingFunc pDeblockingFunc, int32_t iCpu);
|
||||
|
||||
|
||||
/*!
|
||||
@ -64,7 +64,7 @@ void_t DeblockingInit (PDeblockingFunc pDeblockingFunc, int32_t iCpu);
|
||||
*
|
||||
* \return NONE
|
||||
*/
|
||||
void_t WelsDeblockingFilterSlice (PWelsDecoderContext pCtx, PDeblockingFilterMbFunc pDeblockMb);
|
||||
void WelsDeblockingFilterSlice (PWelsDecoderContext pCtx, PDeblockingFilterMbFunc pDeblockMb);
|
||||
|
||||
/*!
|
||||
* \brief pixel deblocking filtering
|
||||
@ -81,10 +81,10 @@ uint32_t DeblockingBsMarginalMBAvcbase (PDqLayer pCurDqLayer, int32_t iEdge, int
|
||||
|
||||
int32_t DeblockingAvailableNoInterlayer (PDqLayer pCurDqLayer, int32_t iFilterIdc);
|
||||
|
||||
void_t DeblockingIntraMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag);
|
||||
void_t DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_t nBS[2][4][4], int32_t iBoundryFlag);
|
||||
void DeblockingIntraMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag);
|
||||
void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_t nBS[2][4][4], int32_t iBoundryFlag);
|
||||
|
||||
void_t WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag);
|
||||
void WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag);
|
||||
|
||||
} // namespace WelsDec
|
||||
|
||||
|
@ -107,14 +107,14 @@ struct TagDqLayer {
|
||||
PPicture pRef; // reference picture pointer
|
||||
PPicture pDec; // reconstruction picture pointer for layer
|
||||
|
||||
bool_t bStoreRefBasePicFlag; // iCurTid == 0 && iCurQid = 0 && bEncodeKeyPic = 1
|
||||
bool_t bTCoeffLevelPredFlag;
|
||||
bool_t bConstrainedIntraResamplingFlag;
|
||||
bool bStoreRefBasePicFlag; // iCurTid == 0 && iCurQid = 0 && bEncodeKeyPic = 1
|
||||
bool bTCoeffLevelPredFlag;
|
||||
bool bConstrainedIntraResamplingFlag;
|
||||
uint8_t uiRefLayerDqId;
|
||||
uint8_t uiRefLayerChromaPhaseXPlus1Flag;
|
||||
uint8_t uiRefLayerChromaPhaseYPlus1;
|
||||
uint8_t uiLayerDqId; // dq_id of current layer
|
||||
bool_t bUseRefBasePicFlag; // whether reference pic or reference base pic is referred?
|
||||
bool bUseRefBasePicFlag; // whether reference pic or reference base pic is referred?
|
||||
};
|
||||
|
||||
typedef struct TagGpuAvcLayer {
|
||||
|
@ -68,7 +68,7 @@ namespace WelsDec {
|
||||
static inline int32_t ShowBits (PBitStringAux pBs, int32_t iNumBits) {
|
||||
return UBITS (pBs->uiCurBits, iNumBits);
|
||||
}
|
||||
static inline void_t FlushBits (PBitStringAux pBs, int32_t iNumBits) {
|
||||
static inline void FlushBits (PBitStringAux pBs, int32_t iNumBits) {
|
||||
DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iNumBits);
|
||||
}
|
||||
static inline int32_t BsGetBits (PBitStringAux pBs, int32_t iNumBits) {
|
||||
@ -133,7 +133,7 @@ if (iValue) {
|
||||
return (g_kuiLeadingZeroTable[iValue] + 8);
|
||||
}
|
||||
|
||||
//ASSERT(FALSE); // should not go here
|
||||
//ASSERT(false); // should not go here
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -38,23 +38,23 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
void_t InitDctClipTable (void_t);
|
||||
void InitDctClipTable (void);
|
||||
|
||||
void_t IdctResAddPred_c (uint8_t* pPred, const int32_t kiStride, int16_t* pRs);
|
||||
void IdctResAddPred_c (uint8_t* pPred, const int32_t kiStride, int16_t* pRs);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif//__cplusplus
|
||||
|
||||
#if defined(X86_ASM)
|
||||
void_t IdctResAddPred_mmx (uint8_t* pPred, const int32_t kiStride, int16_t* pRs);
|
||||
void IdctResAddPred_mmx (uint8_t* pPred, const int32_t kiStride, int16_t* pRs);
|
||||
#endif//X86_ASM
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif//__cplusplus
|
||||
|
||||
void_t GetI4LumaIChromaAddrTable (int32_t* pBlockOffset, const int32_t kiYStride, const int32_t kiUVStride);
|
||||
void GetI4LumaIChromaAddrTable (int32_t* pBlockOffset, const int32_t kiYStride, const int32_t kiUVStride);
|
||||
|
||||
} // namespace WelsDec
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
void_t WelsBlockInit (int16_t* pBlock, int32_t iWidth, int32_t iHeight, int32_t iStride, uint8_t uiVal);
|
||||
void WelsBlockInit (int16_t* pBlock, int32_t iWidth, int32_t iHeight, int32_t iStride, uint8_t uiVal);
|
||||
|
||||
int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx);
|
||||
int32_t WelsDecodeMbCavlcISlice (PWelsDecoderContext pCtx, PNalUnit pNalCur);
|
||||
@ -48,40 +48,40 @@ typedef int32_t (*PWelsDecMbCavlcFunc) (PWelsDecoderContext pCtx, PNalUnit pNalC
|
||||
|
||||
int32_t WelsTargetSliceConstruction (PWelsDecoderContext pCtx); //construction based on slice
|
||||
|
||||
int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool_t bFirstSliceInLayer, PNalUnit pNalCur);
|
||||
int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool bFirstSliceInLayer, PNalUnit pNalCur);
|
||||
|
||||
|
||||
int32_t WelsTargetMbConstruction (PWelsDecoderContext pCtx);
|
||||
|
||||
int32_t WelsMbIntraPredictionConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLayer, bool_t bOutput);
|
||||
int32_t WelsMbIntraPredictionConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLayer, bool bOutput);
|
||||
int32_t WelsMbInterSampleConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLayer,
|
||||
uint8_t* pDstY, uint8_t* pDstU, uint8_t* pDstV, int32_t iStrideL, int32_t iStrideC);
|
||||
int32_t WelsMbInterConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLayer);
|
||||
void_t WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp);
|
||||
void WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp);
|
||||
int32_t WelsMbInterPrediction (PWelsDecoderContext pCtx, PDqLayer pCurLayer);
|
||||
void_t WelsMbCopy (uint8_t* pDst, int32_t iStrideDst, uint8_t* pSrc, int32_t iStrideSrc,
|
||||
void WelsMbCopy (uint8_t* pDst, int32_t iStrideDst, uint8_t* pSrc, int32_t iStrideSrc,
|
||||
int32_t iHeight, int32_t iWidth);
|
||||
|
||||
void_t WelsChromaDcIdct (int16_t* pBlock);
|
||||
void WelsChromaDcIdct (int16_t* pBlock);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif//__cplusplus
|
||||
|
||||
#ifdef X86_ASM
|
||||
void_t WelsResBlockZero16x16_sse2 (int16_t* pBlock, int32_t iStride);
|
||||
void_t WelsResBlockZero8x8_sse2 (int16_t* pBlock, int32_t iStride);
|
||||
void WelsResBlockZero16x16_sse2 (int16_t* pBlock, int32_t iStride);
|
||||
void WelsResBlockZero8x8_sse2 (int16_t* pBlock, int32_t iStride);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif//__cplusplus
|
||||
|
||||
void_t WelsBlockZero16x16_c (int16_t* pBlock, int32_t iStride);
|
||||
void_t WelsBlockZero8x8_c (int16_t* pBlock, int32_t iStride);
|
||||
void_t SetNonZeroCount_c (int16_t* pBlock, int8_t* pNonZeroCount);
|
||||
void WelsBlockZero16x16_c (int16_t* pBlock, int32_t iStride);
|
||||
void WelsBlockZero8x8_c (int16_t* pBlock, int32_t iStride);
|
||||
void SetNonZeroCount_c (int16_t* pBlock, int8_t* pNonZeroCount);
|
||||
|
||||
void_t WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu);
|
||||
void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu);
|
||||
|
||||
} // namespace WelsDec
|
||||
|
||||
|
@ -52,7 +52,7 @@ extern "C" {
|
||||
/*!
|
||||
* \brief configure decoder parameters
|
||||
*/
|
||||
int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const void_t* kpParam);
|
||||
int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const void* kpParam);
|
||||
|
||||
/*!
|
||||
*************************************************************************************
|
||||
@ -68,7 +68,7 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const void_t* kpParam);
|
||||
* \note N/A
|
||||
*************************************************************************************
|
||||
*/
|
||||
int32_t WelsInitDecoder (PWelsDecoderContext pCtx, void_t* pTraceHandle, PWelsLogCallbackFunc pLog);
|
||||
int32_t WelsInitDecoder (PWelsDecoderContext pCtx, void* pTraceHandle, PWelsLogCallbackFunc pLog);
|
||||
|
||||
/*!
|
||||
*************************************************************************************
|
||||
@ -81,7 +81,7 @@ int32_t WelsInitDecoder (PWelsDecoderContext pCtx, void_t* pTraceHandle, PWelsL
|
||||
* \note N/A
|
||||
*************************************************************************************
|
||||
*/
|
||||
void_t WelsEndDecoder (PWelsDecoderContext pCtx);
|
||||
void WelsEndDecoder (PWelsDecoderContext pCtx);
|
||||
|
||||
/*!
|
||||
*************************************************************************************
|
||||
@ -112,7 +112,7 @@ int32_t WelsRequestMem (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const
|
||||
/*
|
||||
* free memory blocks in avc
|
||||
*/
|
||||
void_t WelsFreeMem (PWelsDecoderContext pCtx);
|
||||
void WelsFreeMem (PWelsDecoderContext pCtx);
|
||||
|
||||
/*
|
||||
* set colorspace format in decoder
|
||||
@ -130,11 +130,11 @@ int32_t DecoderSetCsp (PWelsDecoderContext pCtx, const int32_t kiColorFormat);
|
||||
*/
|
||||
int32_t SyncPictureResolutionExt (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const int32_t kiMbHeight);
|
||||
|
||||
void_t AssignFuncPointerForRec (PWelsDecoderContext pCtx);
|
||||
void AssignFuncPointerForRec (PWelsDecoderContext pCtx);
|
||||
|
||||
void_t ResetParameterSetsState (PWelsDecoderContext pCtx);
|
||||
void ResetParameterSetsState (PWelsDecoderContext pCtx);
|
||||
|
||||
void_t GetVclNalTemporalId (PWelsDecoderContext pCtx); //get the info that whether or not have VCL NAL in current AU,
|
||||
void GetVclNalTemporalId (PWelsDecoderContext pCtx); //get the info that whether or not have VCL NAL in current AU,
|
||||
//and if YES, get the temporal ID
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -79,9 +79,9 @@ typedef struct TagDataBuffer {
|
||||
//typedef int32_t (*rec_mb) (Mb *cur_mb, PWelsDecoderContext pCtx);
|
||||
|
||||
/*typedef for get intra predictor func pointer*/
|
||||
typedef void_t (*PGetIntraPredFunc) (uint8_t* pPred, const int32_t kiLumaStride);
|
||||
typedef void_t (*PIdctResAddPredFunc) (uint8_t* pPred, const int32_t kiStride, int16_t* pRs);
|
||||
typedef void_t (*PExpandPictureFunc) (uint8_t* pDst, const int32_t kiStride, const int32_t kiPicWidth,
|
||||
typedef void (*PGetIntraPredFunc) (uint8_t* pPred, const int32_t kiLumaStride);
|
||||
typedef void (*PIdctResAddPredFunc) (uint8_t* pPred, const int32_t kiStride, int16_t* pRs);
|
||||
typedef void (*PExpandPictureFunc) (uint8_t* pDst, const int32_t kiStride, const int32_t kiPicWidth,
|
||||
const int32_t kiPicHeight);
|
||||
|
||||
/**/
|
||||
@ -95,7 +95,7 @@ typedef struct TagRefPic {
|
||||
int32_t iMaxLongTermFrameIdx;
|
||||
} SRefPic, *PRefPic;
|
||||
|
||||
typedef void_t (*PWelsMcFunc) (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
typedef void (*PWelsMcFunc) (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight);
|
||||
typedef struct TagMcFunc {
|
||||
PWelsMcFunc pMcLumaFunc;
|
||||
@ -116,13 +116,13 @@ typedef struct tagDeblockingFilter {
|
||||
struct TagDeblockingFunc* pLoopf;
|
||||
} SDeblockingFilter, *PDeblockingFilter;
|
||||
|
||||
typedef void_t (*PDeblockingFilterMbFunc) (PDqLayer pCurDqLayer, PDeblockingFilter filter, int32_t boundry_flag);
|
||||
typedef void_t (*PLumaDeblockingLT4Func) (uint8_t* iSampleY, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
typedef void (*PDeblockingFilterMbFunc) (PDqLayer pCurDqLayer, PDeblockingFilter filter, int32_t boundry_flag);
|
||||
typedef void (*PLumaDeblockingLT4Func) (uint8_t* iSampleY, int32_t iStride, int32_t iAlpha, int32_t iBeta,
|
||||
int8_t* iTc);
|
||||
typedef void_t (*PLumaDeblockingEQ4Func) (uint8_t* iSampleY, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
typedef void_t (*PChromaDeblockingLT4Func) (uint8_t* iSampleCb, uint8_t* iSampleCr, int32_t iStride, int32_t iAlpha,
|
||||
typedef void (*PLumaDeblockingEQ4Func) (uint8_t* iSampleY, int32_t iStride, int32_t iAlpha, int32_t iBeta);
|
||||
typedef void (*PChromaDeblockingLT4Func) (uint8_t* iSampleCb, uint8_t* iSampleCr, int32_t iStride, int32_t iAlpha,
|
||||
int32_t iBeta, int8_t* iTc);
|
||||
typedef void_t (*PChromaDeblockingEQ4Func) (uint8_t* iSampleCb, uint8_t* iSampleCr, int32_t iStride, int32_t iAlpha,
|
||||
typedef void (*PChromaDeblockingEQ4Func) (uint8_t* iSampleCb, uint8_t* iSampleCr, int32_t iStride, int32_t iAlpha,
|
||||
int32_t iBeta);
|
||||
|
||||
typedef struct TagDeblockingFunc {
|
||||
@ -137,11 +137,11 @@ typedef struct TagDeblockingFunc {
|
||||
PChromaDeblockingEQ4Func pfChromaDeblockinEQ4Hor;
|
||||
} SDeblockingFunc, *PDeblockingFunc;
|
||||
|
||||
typedef void_t (*PWelsBlockAddStrideFunc) (uint8_t* pDest, uint8_t* pPred, int16_t* pRes, int32_t iPredStride,
|
||||
typedef void (*PWelsBlockAddStrideFunc) (uint8_t* pDest, uint8_t* pPred, int16_t* pRes, int32_t iPredStride,
|
||||
int32_t iResStride);
|
||||
typedef void_t (*PWelsBlockZeroFunc) (int16_t* pBlock, int32_t iStride);
|
||||
typedef void_t (*PWelsNonZeroCountFunc) (int16_t* pBlock, int8_t* pNonZeroCount);
|
||||
typedef void_t (*PWelsSimpleIdct4x4AddFunc) (int16_t* pDest, int16_t* pSrc, int32_t iStride);
|
||||
typedef void (*PWelsBlockZeroFunc) (int16_t* pBlock, int32_t iStride);
|
||||
typedef void (*PWelsNonZeroCountFunc) (int16_t* pBlock, int8_t* pNonZeroCount);
|
||||
typedef void (*PWelsSimpleIdct4x4AddFunc) (int16_t* pDest, int16_t* pSrc, int32_t iStride);
|
||||
|
||||
typedef struct TagBlockFunc {
|
||||
PWelsBlockZeroFunc pWelsBlockZero16x16Func;
|
||||
@ -149,7 +149,7 @@ typedef struct TagBlockFunc {
|
||||
PWelsNonZeroCountFunc pWelsSetNonZeroCountFunc;
|
||||
} SBlockFunc;
|
||||
|
||||
typedef void_t (*PWelsFillNeighborMbInfoIntra4x4Func) (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
|
||||
typedef void (*PWelsFillNeighborMbInfoIntra4x4Func) (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
|
||||
int8_t* pIntraPredMode, PDqLayer pCurLayer);
|
||||
typedef int32_t (*PWelsParseIntra4x4ModeFunc) (PNeighAvail pNeighAvail, int8_t* pIntraPredMode, PBitStringAux pBs,
|
||||
PDqLayer pCurDqLayer);
|
||||
@ -166,7 +166,7 @@ typedef struct TagExpandPicFunc {
|
||||
|
||||
typedef struct TagWelsDecoderContext {
|
||||
// Input
|
||||
void_t* pArgDec; // structured arguments for decoder, reserved here for extension in the future
|
||||
void* pArgDec; // structured arguments for decoder, reserved here for extension in the future
|
||||
|
||||
SDataBuffer sRawData;
|
||||
|
||||
@ -180,8 +180,8 @@ typedef struct TagWelsDecoderContext {
|
||||
|
||||
int32_t iOutputColorFormat; // color space format to be outputed
|
||||
VIDEO_BITSTREAM_TYPE eVideoType; //indicate the type of video to decide whether or not to do qp_delta error detection.
|
||||
bool_t bErrorResilienceFlag; // error resilience flag
|
||||
bool_t bHaveGotMemory; // global memory for decoder context related ever requested?
|
||||
bool bErrorResilienceFlag; // error resilience flag
|
||||
bool bHaveGotMemory; // global memory for decoder context related ever requested?
|
||||
|
||||
int32_t iImgWidthInPixel; // width of image in pixel reconstruction picture to be output
|
||||
int32_t iImgHeightInPixel;// height of image in pixel reconstruction picture to be output
|
||||
@ -191,7 +191,7 @@ typedef struct TagWelsDecoderContext {
|
||||
ESliceType eSliceType; // Slice type
|
||||
int32_t iFrameNum;
|
||||
int32_t iPrevFrameNum; // frame number of previous frame well decoded for non-truncated mode yet
|
||||
bool_t bLastHasMmco5; //
|
||||
bool bLastHasMmco5; //
|
||||
int32_t iErrorCode; // error code return while decoding in case packets lost
|
||||
SFmo sFmoList[MAX_PPS_COUNT]; // list for FMO storage
|
||||
PFmo pFmo; // current fmo context after parsed slice_header
|
||||
@ -270,25 +270,25 @@ typedef struct TagWelsDecoderContext {
|
||||
int32_t iPicHeightReq; // picture height have requested the memory
|
||||
|
||||
uint8_t uiTargetDqId; // maximal DQ ID in current access unit, meaning target layer ID
|
||||
bool_t bAvcBasedFlag; // For decoding bitstream:
|
||||
bool_t bEndOfStreamFlag; // Flag on end of stream requested by external application layer
|
||||
bool_t bInitialDqLayersMem; // dq layers related memory is available?
|
||||
bool bAvcBasedFlag; // For decoding bitstream:
|
||||
bool bEndOfStreamFlag; // Flag on end of stream requested by external application layer
|
||||
bool bInitialDqLayersMem; // dq layers related memory is available?
|
||||
|
||||
bool_t bOnlyOneLayerInCurAuFlag; //only one layer in current AU: 1
|
||||
bool bOnlyOneLayerInCurAuFlag; //only one layer in current AU: 1
|
||||
|
||||
// for EC parameter sets
|
||||
bool_t bSpsExistAheadFlag; // whether does SPS NAL exist ahead of sequence?
|
||||
bool_t bSubspsExistAheadFlag;// whether does Subset SPS NAL exist ahead of sequence?
|
||||
bool_t bPpsExistAheadFlag; // whether does PPS NAL exist ahead of sequence?
|
||||
bool bSpsExistAheadFlag; // whether does SPS NAL exist ahead of sequence?
|
||||
bool bSubspsExistAheadFlag;// whether does Subset SPS NAL exist ahead of sequence?
|
||||
bool bPpsExistAheadFlag; // whether does PPS NAL exist ahead of sequence?
|
||||
|
||||
bool_t bSpsAvailFlags[MAX_SPS_COUNT];
|
||||
bool_t bSubspsAvailFlags[MAX_SPS_COUNT];
|
||||
bool_t bPpsAvailFlags[MAX_PPS_COUNT];
|
||||
bool_t bReferenceLostAtT0Flag;
|
||||
bool bSpsAvailFlags[MAX_SPS_COUNT];
|
||||
bool bSubspsAvailFlags[MAX_SPS_COUNT];
|
||||
bool bPpsAvailFlags[MAX_PPS_COUNT];
|
||||
bool bReferenceLostAtT0Flag;
|
||||
#ifdef LONG_TERM_REF
|
||||
bool_t bParamSetsLostFlag; //sps or pps do not exist or not correct
|
||||
bool bParamSetsLostFlag; //sps or pps do not exist or not correct
|
||||
|
||||
bool_t
|
||||
bool
|
||||
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
|
||||
|
||||
@ -319,10 +319,10 @@ typedef struct TagWelsDecoderContext {
|
||||
int32_t iFeedbackVclNalInAu;
|
||||
int32_t iFeedbackTidInAu;
|
||||
|
||||
bool_t bAuReadyFlag; // TRUE: one au is ready for decoding; FALSE: default value
|
||||
bool bAuReadyFlag; // true: one au is ready for decoding; false: default value
|
||||
|
||||
//trace handle
|
||||
void_t* pTraceHandle;
|
||||
void* pTraceHandle;
|
||||
|
||||
#ifdef NO_WAITING_AU
|
||||
//Save the last nal header info
|
||||
|
@ -64,7 +64,7 @@ int32_t WelsInitMemory (PWelsDecoderContext pCtx);
|
||||
* Free memory introduced in WelsInitMemory at destruction of decoder.
|
||||
*
|
||||
*/
|
||||
void_t WelsFreeMemory (PWelsDecoderContext pCtx);
|
||||
void WelsFreeMemory (PWelsDecoderContext pCtx);
|
||||
|
||||
/*!
|
||||
* \brief request memory when maximal picture width and height are available
|
||||
@ -74,7 +74,7 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid
|
||||
/*!
|
||||
* \brief free dq layer context memory related
|
||||
*/
|
||||
void_t UninitialDqLayersContext (PWelsDecoderContext pCtx);
|
||||
void UninitialDqLayersContext (PWelsDecoderContext pCtx);
|
||||
|
||||
/*
|
||||
* DecodeNalHeaderExt
|
||||
@ -83,19 +83,19 @@ void_t UninitialDqLayersContext (PWelsDecoderContext pCtx);
|
||||
* pNal: target NALUnit ptr
|
||||
* pSrc: NAL Unit bitstream
|
||||
*/
|
||||
void_t DecodeNalHeaderExt (PNalUnit pNal, uint8_t* pSrc);
|
||||
void DecodeNalHeaderExt (PNalUnit pNal, uint8_t* pSrc);
|
||||
|
||||
/*
|
||||
* ParseSliceHeaderSyntaxs
|
||||
* Parse slice header of bitstream
|
||||
*/
|
||||
int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, const bool_t kbExtensionFlag);
|
||||
int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, const bool kbExtensionFlag);
|
||||
/*
|
||||
* Copy relative syntax elements of NALUnitHeaderExt, sRefPicBaseMarking and bStoreRefBasePicFlag in prefix nal unit.
|
||||
* pSrc: mark as decoded prefix NAL
|
||||
* pDst: succeeded VCL NAL based AVC (I/P Slice)
|
||||
*/
|
||||
bool_t PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kpDst, PNalUnit const kpSrc);
|
||||
bool PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kpDst, PNalUnit const kpSrc);
|
||||
|
||||
|
||||
/*
|
||||
@ -123,14 +123,14 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3
|
||||
/*
|
||||
* Prepare current dq layer context initialization.
|
||||
*/
|
||||
void_t WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pSps, PPps pPps);
|
||||
void WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pSps, PPps pPps);
|
||||
|
||||
|
||||
int32_t WelsDecodeAccessUnitStart (PWelsDecoderContext pCtx);
|
||||
void_t WelsDecodeAccessUnitEnd (PWelsDecoderContext pCtx);
|
||||
void WelsDecodeAccessUnitEnd (PWelsDecoderContext pCtx);
|
||||
|
||||
void_t ForceResetCurrentAccessUnit (PAccessUnit pAu);
|
||||
void_t ForceClearCurrentNal (PAccessUnit pAu);
|
||||
void ForceResetCurrentAccessUnit (PAccessUnit pAu);
|
||||
void ForceClearCurrentNal (PAccessUnit pAu);
|
||||
|
||||
} // namespace WelsDec
|
||||
|
||||
|
@ -47,10 +47,10 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
void_t ExpandReferencingPicture (PPicture pPic, PExpandPictureFunc pExpandPictureLuma,
|
||||
void ExpandReferencingPicture (PPicture pPic, PExpandPictureFunc pExpandPictureLuma,
|
||||
PExpandPictureFunc pExpandPictureChroma[2]);
|
||||
|
||||
void_t InitExpandPictureFunc (SExpandPicFunc* pExpandPicFunc, const uint32_t kuiCpuFlags);
|
||||
void InitExpandPictureFunc (SExpandPicFunc* pExpandPicFunc, const uint32_t kuiCpuFlags);
|
||||
|
||||
} // namespace WelsDec
|
||||
|
||||
|
@ -58,7 +58,7 @@ uint8_t* pMbAllocMap;
|
||||
int32_t iCountMbNum;
|
||||
int32_t iSliceGroupCount;
|
||||
int32_t iSliceGroupType;
|
||||
bool_t bActiveFlag;
|
||||
bool bActiveFlag;
|
||||
uint8_t uiReserved[3]; // reserved padding bytes
|
||||
} SFmo, *PFmo;
|
||||
|
||||
@ -84,7 +84,7 @@ int32_t InitFmo (PFmo pFmo, PPps pPps, const int32_t kiMbWidth, const int32_t ki
|
||||
*
|
||||
* \return NONE
|
||||
*/
|
||||
void_t UninitFmoList (PFmo pFmo, const int32_t kiCnt, const int32_t kiAvail);
|
||||
void UninitFmoList (PFmo pFmo, const int32_t kiCnt, const int32_t kiAvail);
|
||||
|
||||
/*!
|
||||
* \brief update/insert FMO parameter unit
|
||||
@ -96,7 +96,7 @@ void_t UninitFmoList (PFmo pFmo, const int32_t kiCnt, const int32_t kiAvail);
|
||||
*
|
||||
* \return true - update/insert successfully; false - failed;
|
||||
*/
|
||||
bool_t FmoParamUpdate (PFmo pFmo, PSps pSps, PPps pPps, int32_t* pActiveFmoNum);
|
||||
bool FmoParamUpdate (PFmo pFmo, PSps pSps, PPps pPps, int32_t* pActiveFmoNum);
|
||||
|
||||
/*!
|
||||
* \brief Get successive mb to be processed with given current mb_xy
|
||||
|
@ -45,66 +45,66 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
void_t WelsI4x4LumaPredV_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredH_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredDc_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredDDL_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredDDLTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredDDR_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredVL_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredVLTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredVR_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredHU_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI4x4LumaPredHD_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredV_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredH_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredDc_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredDDL_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredDDLTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredDDR_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredVL_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredVLTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredVR_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredHU_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI4x4LumaPredHD_c (uint8_t* pPred, const int32_t kiStride);
|
||||
|
||||
void_t WelsIChromaPredV_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsIChromaPredH_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsIChromaPredPlane_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsIChromaPredDc_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsIChromaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsIChromaPredDcTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsIChromaPredDcNA_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsIChromaPredV_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsIChromaPredH_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsIChromaPredPlane_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsIChromaPredDc_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsIChromaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsIChromaPredDcTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsIChromaPredDcNA_c (uint8_t* pPred, const int32_t kiStride);
|
||||
|
||||
void_t WelsI16x16LumaPredV_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI16x16LumaPredH_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI16x16LumaPredPlane_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI16x16LumaPredDc_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI16x16LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI16x16LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsI16x16LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI16x16LumaPredV_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI16x16LumaPredH_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI16x16LumaPredPlane_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI16x16LumaPredDc_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI16x16LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI16x16LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsI16x16LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif//__cplusplus
|
||||
|
||||
#if defined(X86_ASM)
|
||||
void_t WelsDecoderI16x16LumaPredPlane_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI16x16LumaPredH_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI16x16LumaPredV_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI16x16LumaPredDc_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI16x16LumaPredDcTop_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI16x16LumaPredDcNA_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI16x16LumaPredPlane_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI16x16LumaPredH_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI16x16LumaPredV_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI16x16LumaPredDc_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI16x16LumaPredDcTop_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI16x16LumaPredDcNA_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
|
||||
void_t WelsDecoderIChromaPredDcTop_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderIChromaPredPlane_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderIChromaPredDc_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderIChromaPredH_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderIChromaPredV_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderIChromaPredDcLeft_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderIChromaPredDcNA_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderIChromaPredDcTop_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderIChromaPredPlane_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderIChromaPredDc_sse2 (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderIChromaPredH_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderIChromaPredV_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderIChromaPredDcLeft_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderIChromaPredDcNA_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
|
||||
|
||||
|
||||
void_t WelsDecoderI4x4LumaPredH_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI4x4LumaPredDDR_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI4x4LumaPredHD_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI4x4LumaPredHU_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI4x4LumaPredVR_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI4x4LumaPredDDL_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void_t WelsDecoderI4x4LumaPredVL_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI4x4LumaPredH_sse2(uint8_t *pPred, const int32_t kiStride);
|
||||
void WelsDecoderI4x4LumaPredDDR_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI4x4LumaPredHD_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI4x4LumaPredHU_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI4x4LumaPredVR_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI4x4LumaPredDDL_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
void WelsDecoderI4x4LumaPredVL_mmx (uint8_t* pPred, const int32_t kiStride);
|
||||
#endif//X86_ASM
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
@ -53,10 +53,10 @@ REMOVE_BASE = 1,
|
||||
REMOVE_BASE_FIRST = 2
|
||||
} ERemoveFlag;
|
||||
|
||||
void_t WelsResetRefPic (PWelsDecoderContext pCtx);
|
||||
void WelsResetRefPic (PWelsDecoderContext pCtx);
|
||||
int32_t WelsInitRefList (PWelsDecoderContext pCtx, int32_t iPoc);
|
||||
int32_t WelsReorderRefList (PWelsDecoderContext pCtx);
|
||||
int32_t WelsMarkAsRef (PWelsDecoderContext pCtx, const bool_t kbRefBaseMarkingFlag);
|
||||
int32_t WelsMarkAsRef (PWelsDecoderContext pCtx, const bool kbRefBaseMarkingFlag);
|
||||
|
||||
static PPicture WelsDelShortFromList (PRefPic pRefPic, int32_t iFrameNum, ERemoveFlag eRemoveFlag);
|
||||
static PPicture WelsDelLongFromList (PRefPic pRefPic, uint32_t uiLongTermFrameIdx, ERemoveFlag eRemoveFlag);
|
||||
@ -65,7 +65,7 @@ static PPicture WelsDelLongFromListSetUnref (PRefPic pRefPic, uint32_t uiLongTer
|
||||
|
||||
static int32_t MMCOBase (PWelsDecoderContext pCtx, PRefBasePicMarking pRefPicBaseMarking);
|
||||
static int32_t MMCO (PWelsDecoderContext pCtx, PRefPicMarking pRefPicMarking);
|
||||
static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, bool_t bRefBasePic,
|
||||
static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, bool bRefBasePic,
|
||||
int32_t iShortFrameNum, uint32_t uiLongTermPicNum, int32_t iLongTermFrameIdx, int32_t iMaxLongTermFrameIdx);
|
||||
static int32_t SlidingWindow (PWelsDecoderContext pCtx);
|
||||
|
||||
|
@ -40,10 +40,10 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
typedef void_t (*PMcChromaWidthExtFunc) (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
typedef void (*PMcChromaWidthExtFunc) (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
const uint8_t* kpABCD, int32_t iHeight);
|
||||
|
||||
void_t InitMcFunc (SMcFunc* pMcFunc, int32_t iCpu);
|
||||
void InitMcFunc (SMcFunc* pMcFunc, int32_t iCpu);
|
||||
|
||||
} // namespace WelsDec
|
||||
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
||||
* \note N/A
|
||||
*************************************************************************************
|
||||
*/
|
||||
void_t* WelsMalloc (const uint32_t kuiSize, const str_t* kpTag);
|
||||
void* WelsMalloc (const uint32_t kuiSize, const char* kpTag);
|
||||
|
||||
/*!
|
||||
*************************************************************************************
|
||||
@ -73,7 +73,7 @@ void_t* WelsMalloc (const uint32_t kuiSize, const str_t* kpTag);
|
||||
* \note N/A
|
||||
*************************************************************************************
|
||||
*/
|
||||
void_t WelsFree (void_t* pPtr, const str_t* kpTag);
|
||||
void WelsFree (void* pPtr, const char* kpTag);
|
||||
|
||||
#define WELS_SAFE_FREE(pPtr, pTag) if (pPtr) { WelsFree(pPtr, pTag); pPtr = NULL; }
|
||||
|
||||
|
@ -50,14 +50,14 @@ namespace WelsDec {
|
||||
* \param
|
||||
* \param
|
||||
*/
|
||||
void_t UpdateP16x16MotionInfo (PDqLayer pCurDqLayer, int8_t iRef, int16_t iMVs[2]);
|
||||
void UpdateP16x16MotionInfo (PDqLayer pCurDqLayer, int8_t iRef, int16_t iMVs[2]);
|
||||
|
||||
/*!
|
||||
* \brief update mv and ref_index cache for current MB, only for P_16x8
|
||||
* \param
|
||||
* \param
|
||||
*/
|
||||
void_t UpdateP16x8MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A],
|
||||
void UpdateP16x8MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A],
|
||||
int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int8_t iRef, int16_t iMVs[2]);
|
||||
|
||||
@ -67,7 +67,7 @@ void_t UpdateP16x8MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A
|
||||
* \param
|
||||
* \param
|
||||
*/
|
||||
void_t UpdateP8x16MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A],
|
||||
void UpdateP8x16MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A],
|
||||
int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int8_t iRef, int16_t iMVs[2]);
|
||||
|
||||
@ -76,14 +76,14 @@ void_t UpdateP8x16MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A
|
||||
* \param
|
||||
* \param output iMvp[]
|
||||
*/
|
||||
void_t PredPSkipMvFromNeighbor (PDqLayer pCurLayer, int16_t iMvp[2]);
|
||||
void PredPSkipMvFromNeighbor (PDqLayer pCurLayer, int16_t iMvp[2]);
|
||||
|
||||
/*!
|
||||
* \brief get the motion predictor for 4*4 or 8*8 or 16*16 block
|
||||
* \param
|
||||
* \param output iMvp[]
|
||||
*/
|
||||
void_t PredMv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
void PredMv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int32_t iPartWidth, int8_t iRef, int16_t iMVP[2]);
|
||||
|
||||
/*!
|
||||
@ -91,7 +91,7 @@ void_t PredMv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A]
|
||||
* \param
|
||||
* \param output mvp_x and mvp_y
|
||||
*/
|
||||
void_t PredInter16x8Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
void PredInter16x8Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int8_t iRef, int16_t iMVP[2]);
|
||||
|
||||
/*!
|
||||
@ -99,7 +99,7 @@ void_t PredInter16x8Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefInde
|
||||
* \param
|
||||
* \param output mvp_x and mvp_y
|
||||
*/
|
||||
void_t PredInter8x16Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
void PredInter8x16Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int8_t iRef, int16_t iMVP[2]);
|
||||
|
||||
} // namespace WelsDec
|
||||
|
@ -55,29 +55,29 @@ typedef struct TagNalUnitHeaderExt {
|
||||
SNalUnitHeader sNalUnitHeader;
|
||||
|
||||
// uint8_t reserved_one_bit;
|
||||
bool_t bIdrFlag;
|
||||
bool bIdrFlag;
|
||||
uint8_t uiPriorityId;
|
||||
int8_t iNoInterLayerPredFlag; // change as int8_t to support 3 values probably in encoder
|
||||
uint8_t uiDependencyId;
|
||||
|
||||
uint8_t uiQualityId;
|
||||
uint8_t uiTemporalId;
|
||||
bool_t bUseRefBasePicFlag;
|
||||
bool_t bDiscardableFlag;
|
||||
bool bUseRefBasePicFlag;
|
||||
bool bDiscardableFlag;
|
||||
|
||||
bool_t bOutputFlag;
|
||||
bool bOutputFlag;
|
||||
uint8_t uiReservedThree2Bits;
|
||||
// Derived variable(s)
|
||||
uint8_t uiLayerDqId;
|
||||
bool_t bNalExtFlag;
|
||||
bool bNalExtFlag;
|
||||
} SNalUnitHeaderExt, *PNalUnitHeaderExt;
|
||||
|
||||
/* Prefix NAL Unix syntax, refer to Page 392 in JVT X201wcm */
|
||||
typedef struct TagPrefixNalUnit {
|
||||
SRefBasePicMarking sRefPicBaseMarking;
|
||||
bool_t bStoreRefBasePicFlag;
|
||||
bool_t bPrefixNalUnitAdditionalExtFlag;
|
||||
bool_t bPrefixNalUnitExtFlag;
|
||||
bool bStoreRefBasePicFlag;
|
||||
bool bPrefixNalUnitAdditionalExtFlag;
|
||||
bool bPrefixNalUnitExtFlag;
|
||||
} SPrefixNalUnit, *PPrefixNalUnit;
|
||||
|
||||
} // namespace WelsDec
|
||||
|
@ -53,7 +53,7 @@ union {
|
||||
SBitStringAux sSliceBitsRead;
|
||||
uint8_t* pNalPos; // save the address of slice nal for GPU function
|
||||
int32_t iNalLength; // save the nal length for GPU function
|
||||
bool_t bSliceHeaderExtFlag;
|
||||
bool bSliceHeaderExtFlag;
|
||||
} sVclNal;
|
||||
SPrefixNalUnit sPrefixNal;
|
||||
} sNalData;
|
||||
@ -71,7 +71,7 @@ uint32_t uiActualUnitsNum; // actual number of NAL units belong to current au
|
||||
uint32_t uiCountUnitsNum; // Count size number of malloced NAL Units in each AU list
|
||||
uint32_t uiStartPos;
|
||||
uint32_t uiEndPos;
|
||||
bool_t bCompletedAuFlag; // Indicate whether it is a completed AU
|
||||
bool bCompletedAuFlag; // Indicate whether it is a completed AU
|
||||
} SAccessUnit, *PAccessUnit;
|
||||
|
||||
} // namespace WelsDec
|
||||
|
@ -80,25 +80,25 @@ uint8_t uiChromaArrayType;
|
||||
uint8_t uiBitDepthLuma;
|
||||
uint8_t uiBitDepthChroma;
|
||||
/* TO BE CONTINUE: POC type 1 */
|
||||
bool_t bDeltaPicOrderAlwaysZeroFlag;
|
||||
bool_t bGapsInFrameNumValueAllowedFlag;
|
||||
bool bDeltaPicOrderAlwaysZeroFlag;
|
||||
bool bGapsInFrameNumValueAllowedFlag;
|
||||
|
||||
bool_t bFrameMbsOnlyFlag;
|
||||
bool_t bMbaffFlag; // MB Adapative Frame Field
|
||||
bool_t bDirect8x8InferenceFlag;
|
||||
bool_t bFrameCroppingFlag;
|
||||
bool bFrameMbsOnlyFlag;
|
||||
bool bMbaffFlag; // MB Adapative Frame Field
|
||||
bool bDirect8x8InferenceFlag;
|
||||
bool bFrameCroppingFlag;
|
||||
|
||||
bool_t bVuiParamPresentFlag;
|
||||
// bool_t bTimingInfoPresentFlag;
|
||||
// bool_t bFixedFrameRateFlag;
|
||||
bool_t bConstraintSet0Flag;
|
||||
bool_t bConstraintSet1Flag;
|
||||
bool_t bConstraintSet2Flag;
|
||||
bool_t bConstraintSet3Flag;
|
||||
bool_t bSeparateColorPlaneFlag;
|
||||
bool_t bQpPrimeYZeroTransfBypassFlag;
|
||||
bool_t bSeqScalingMatrixPresentFlag;
|
||||
bool_t bSeqScalingListPresentFlag[12];
|
||||
bool bVuiParamPresentFlag;
|
||||
// bool bTimingInfoPresentFlag;
|
||||
// bool bFixedFrameRateFlag;
|
||||
bool bConstraintSet0Flag;
|
||||
bool bConstraintSet1Flag;
|
||||
bool bConstraintSet2Flag;
|
||||
bool bConstraintSet3Flag;
|
||||
bool bSeparateColorPlaneFlag;
|
||||
bool bQpPrimeYZeroTransfBypassFlag;
|
||||
bool bSeqScalingMatrixPresentFlag;
|
||||
bool bSeqScalingListPresentFlag[12];
|
||||
const SLevelLimits *pSLevelLimits;
|
||||
} SSps, *PSps;
|
||||
|
||||
@ -111,8 +111,8 @@ const SLevelLimits *pSLevelLimits;
|
||||
// int32_t iAlphaTransparentValue;
|
||||
|
||||
// uint8_t uiBitDepthAux;
|
||||
// bool_t bAlphaIncrFlag;
|
||||
// bool_t bAdditionalExtFlag;
|
||||
// bool bAlphaIncrFlag;
|
||||
// bool bAdditionalExtFlag;
|
||||
//}SSpsExt, *PSpsExt;
|
||||
|
||||
/* Sequence Parameter Set extension syntax, refer to Page 391 in JVT X201wcm */
|
||||
@ -124,19 +124,19 @@ uint8_t uiChromaPhaseXPlus1Flag;
|
||||
uint8_t uiChromaPhaseYPlus1;
|
||||
uint8_t uiSeqRefLayerChromaPhaseXPlus1Flag;
|
||||
uint8_t uiSeqRefLayerChromaPhaseYPlus1;
|
||||
bool_t bInterLayerDeblockingFilterCtrlPresentFlag;
|
||||
bool_t bSeqTCoeffLevelPredFlag;
|
||||
bool_t bAdaptiveTCoeffLevelPredFlag;
|
||||
bool_t bSliceHeaderRestrictionFlag;
|
||||
bool bInterLayerDeblockingFilterCtrlPresentFlag;
|
||||
bool bSeqTCoeffLevelPredFlag;
|
||||
bool bAdaptiveTCoeffLevelPredFlag;
|
||||
bool bSliceHeaderRestrictionFlag;
|
||||
} SSpsSvcExt, *PSpsSvcExt;
|
||||
|
||||
/* Subset sequence parameter set syntax, refer to Page 391 in JVT X201wcm */
|
||||
typedef struct TagSubsetSps {
|
||||
SSps sSps;
|
||||
SSpsSvcExt sSpsSvcExt;
|
||||
bool_t bSvcVuiParamPresentFlag;
|
||||
bool_t bAdditionalExtension2Flag;
|
||||
bool_t bAdditionalExtension2DataFlag;
|
||||
bool bSvcVuiParamPresentFlag;
|
||||
bool bAdditionalExtension2Flag;
|
||||
bool bAdditionalExtension2DataFlag;
|
||||
} SSubsetSps, *PSubsetSps;
|
||||
|
||||
/* Picture parameter set syntax, refer to Page 59 in JVT X201wcm */
|
||||
@ -164,15 +164,15 @@ int32_t iPicInitQp;
|
||||
int32_t iPicInitQs;
|
||||
int32_t iChromaQpIndexOffset;
|
||||
|
||||
bool_t bEntropyCodingModeFlag;
|
||||
bool_t bPicOrderPresentFlag;
|
||||
bool bEntropyCodingModeFlag;
|
||||
bool bPicOrderPresentFlag;
|
||||
/* slice_group_map_type = 3, 4 or 5 */
|
||||
bool_t bSliceGroupChangeDirectionFlag;
|
||||
bool_t bDeblockingFilterControlPresentFlag;
|
||||
bool bSliceGroupChangeDirectionFlag;
|
||||
bool bDeblockingFilterControlPresentFlag;
|
||||
|
||||
bool_t bConstainedIntraPredFlag;
|
||||
bool_t bRedundantPicCntPresentFlag;
|
||||
bool_t bWeightedPredFlag;
|
||||
bool bConstainedIntraPredFlag;
|
||||
bool bRedundantPicCntPresentFlag;
|
||||
bool bWeightedPredFlag;
|
||||
uint8_t uiWeightedBipredIdc;
|
||||
|
||||
} SPps, *PPps;
|
||||
|
@ -134,13 +134,13 @@ static const SPartMbInfo g_ksInterSubMbTypeInfo[4] = {
|
||||
{SUB_MB_TYPE_4x4, 4, 1},
|
||||
};
|
||||
|
||||
void_t GetNeighborAvailMbType (PNeighAvail pNeighAvail, PDqLayer pCurLayer);
|
||||
void_t WelsFillCacheNonZeroCount (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, PDqLayer pCurLayer);
|
||||
void_t WelsFillCacheConstrain0Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode,
|
||||
void GetNeighborAvailMbType (PNeighAvail pNeighAvail, PDqLayer pCurLayer);
|
||||
void WelsFillCacheNonZeroCount (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, PDqLayer pCurLayer);
|
||||
void WelsFillCacheConstrain0Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode,
|
||||
PDqLayer pCurLayer);
|
||||
void_t WelsFillCacheConstrain1Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode,
|
||||
void WelsFillCacheConstrain1Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode,
|
||||
PDqLayer pCurLayer);
|
||||
void_t WelsFillCacheInter (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
|
||||
void WelsFillCacheInter (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
|
||||
int16_t iMvArray[LIST_A][30][MV_A], int8_t iRefIdxArray[LIST_A][30], PDqLayer pCurLayer);
|
||||
|
||||
|
||||
@ -173,8 +173,8 @@ int32_t CheckIntraChromaPredMode (uint8_t uiSampleAvail, int8_t* pMode);
|
||||
int32_t PredIntra4x4Mode (int8_t* pIntraPredMode, int32_t iIdx4);
|
||||
|
||||
|
||||
void_t BsStartCavlc (PBitStringAux pBs);
|
||||
void_t BsEndCavlc (PBitStringAux pBs);
|
||||
void BsStartCavlc (PBitStringAux pBs);
|
||||
void BsEndCavlc (PBitStringAux pBs);
|
||||
|
||||
int32_t WelsResidualBlockCavlc (SVlcTable* pVlcTable,
|
||||
uint8_t* pNonZeroCountCache,
|
||||
|
@ -58,16 +58,16 @@ int32_t iHeightInPixel;// picture height in pixel
|
||||
int32_t iFramePoc; // frame POC
|
||||
|
||||
/*******************************sef_definition for misc use****************************/
|
||||
bool_t bUsedAsRef; //for ref pic management
|
||||
bool_t bIsLongRef; // long term reference frame flag //for ref pic management
|
||||
bool bUsedAsRef; //for ref pic management
|
||||
bool bIsLongRef; // long term reference frame flag //for ref pic management
|
||||
uint8_t uiRefCount;
|
||||
bool_t bAvailableFlag; // indicate whether it is available in this picture memory block.
|
||||
bool bAvailableFlag; // indicate whether it is available in this picture memory block.
|
||||
|
||||
/*******************************for future use****************************/
|
||||
uint8_t uiTemporalId;
|
||||
uint8_t uiSpatialId;
|
||||
uint8_t uiQualityId;
|
||||
bool_t bRefBaseFlag;
|
||||
bool bRefBaseFlag;
|
||||
|
||||
int32_t iFrameNum; // frame number //for ref pic management
|
||||
int32_t iLongTermFrameIdx; //id for long term ref pic
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
void_t WelsFillRecNeededMbInfo (PWelsDecoderContext pCtx, bool_t bOutput, PDqLayer pCurLayer);
|
||||
void WelsFillRecNeededMbInfo (PWelsDecoderContext pCtx, bool bOutput, PDqLayer pCurLayer);
|
||||
|
||||
int32_t RecI4x4Mb (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer);
|
||||
|
||||
@ -61,9 +61,9 @@ int32_t RecI16x16Mb (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLe
|
||||
|
||||
int32_t RecChroma (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer);
|
||||
|
||||
void_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWelsDecoderContext pCtx);
|
||||
void GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWelsDecoderContext pCtx);
|
||||
|
||||
void_t FillBufForMc (uint8_t* pBuf, int32_t iBufStride, uint8_t* pSrc, int32_t iSrcStride, int32_t iSrcOffset,
|
||||
void FillBufForMc (uint8_t* pBuf, int32_t iBufStride, uint8_t* pSrc, int32_t iSrcStride, int32_t iSrcOffset,
|
||||
int32_t iBlockWidth, int32_t iBlockHeight, int32_t iSrcX, int32_t iSrcY, int32_t iPicWidth, int32_t iPicHeight);
|
||||
|
||||
} // namespace WelsDec
|
||||
|
@ -51,7 +51,7 @@ typedef struct TagRefPicListReorderSyntax {
|
||||
uint16_t uiLongTermPicNum;
|
||||
uint16_t uiReorderingOfPicNumsIdc;
|
||||
} sReorderingSyn[LIST_A][MAX_REF_PIC_COUNT];
|
||||
bool_t bRefPicListReorderingFlag[LIST_A];
|
||||
bool bRefPicListReorderingFlag[LIST_A];
|
||||
} SRefPicListReorderSyn, *PRefPicListReorderSyn;
|
||||
|
||||
/*
|
||||
@ -65,8 +65,8 @@ typedef struct TagPredWeightTabSyntax {
|
||||
int32_t iLumaOffset[MAX_REF_PIC_COUNT];
|
||||
int32_t iChromaWeight[MAX_REF_PIC_COUNT][2];
|
||||
int32_t iChromaOffset[MAX_REF_PIC_COUNT][2];
|
||||
bool_t bLumaWeightFlag;
|
||||
bool_t bChromaWeightFlag;
|
||||
bool bLumaWeightFlag;
|
||||
bool bChromaWeightFlag;
|
||||
} sPredList[LIST_A];
|
||||
} SPredWeightTabSyn;
|
||||
|
||||
@ -81,9 +81,9 @@ typedef struct TagRefPicMarking {
|
||||
int32_t iMaxLongTermFrameIdx;
|
||||
} sMmcoRef[MAX_MMCO_COUNT];
|
||||
|
||||
bool_t bNoOutputOfPriorPicsFlag;
|
||||
bool_t bLongTermRefFlag;
|
||||
bool_t bAdaptiveRefPicMarkingModeFlag;
|
||||
bool bNoOutputOfPriorPicsFlag;
|
||||
bool bLongTermRefFlag;
|
||||
bool bAdaptiveRefPicMarkingModeFlag;
|
||||
} SRefPicMarking, *PRefPicMarking;
|
||||
|
||||
/* Decode reference base picture marking syntax in Page 396 of JVT X201wcm */
|
||||
@ -95,7 +95,7 @@ typedef struct TagRefBasePicMarkingSyn {
|
||||
uint32_t uiLongTermPicNum; //should uint32_t, cover larger range of iFrameNum.
|
||||
} mmco_base[MAX_MMCO_COUNT]; // MAX_REF_PIC for reference picture based on frame
|
||||
|
||||
bool_t bAdaptiveRefBasePicMarkingModeFlag;
|
||||
bool bAdaptiveRefBasePicMarkingModeFlag;
|
||||
} SRefBasePicMarking, *PRefBasePicMarking;
|
||||
|
||||
/* Header of slice syntax elements, refer to Page 63 in JVT X201wcm */
|
||||
@ -131,11 +131,11 @@ typedef struct TagSliceHeaders {
|
||||
|
||||
uint16_t uiIdrPicId;
|
||||
ESliceType eSliceType;
|
||||
bool_t bNumRefIdxActiveOverrideFlag;
|
||||
bool_t bFieldPicFlag; //not supported in base profile
|
||||
bool_t bBottomFiledFlag; //not supported in base profile
|
||||
bool bNumRefIdxActiveOverrideFlag;
|
||||
bool bFieldPicFlag; //not supported in base profile
|
||||
bool bBottomFiledFlag; //not supported in base profile
|
||||
uint8_t uiPadding1Byte;
|
||||
bool_t bSpForSwitchFlag; // For SP/SI slices
|
||||
bool bSpForSwitchFlag; // For SP/SI slices
|
||||
int16_t iPadding2Bytes;
|
||||
} SSliceHeader, *PSliceHeader;
|
||||
|
||||
@ -155,18 +155,18 @@ typedef struct TagSliceHeaderExt {
|
||||
int32_t iScaledRefLayerPicHeightInSampleLuma;
|
||||
|
||||
SRefBasePicMarking sRefBasePicMarking;
|
||||
bool_t bBasePredWeightTableFlag;
|
||||
bool_t bStoreRefBasePicFlag;
|
||||
bool_t bConstrainedIntraResamplingFlag;
|
||||
bool_t bSliceSkipFlag;
|
||||
bool bBasePredWeightTableFlag;
|
||||
bool bStoreRefBasePicFlag;
|
||||
bool bConstrainedIntraResamplingFlag;
|
||||
bool bSliceSkipFlag;
|
||||
|
||||
bool_t bAdaptiveBaseModeFlag;
|
||||
bool_t bDefaultBaseModeFlag;
|
||||
bool_t bAdaptiveMotionPredFlag;
|
||||
bool_t bDefaultMotionPredFlag;
|
||||
bool_t bAdaptiveResidualPredFlag;
|
||||
bool_t bDefaultResidualPredFlag;
|
||||
bool_t bTCoeffLevelPredFlag;
|
||||
bool bAdaptiveBaseModeFlag;
|
||||
bool bDefaultBaseModeFlag;
|
||||
bool bAdaptiveMotionPredFlag;
|
||||
bool bDefaultMotionPredFlag;
|
||||
bool bAdaptiveResidualPredFlag;
|
||||
bool bDefaultResidualPredFlag;
|
||||
bool bTCoeffLevelPredFlag;
|
||||
uint8_t uiRefLayerChromaPhaseXPlus1Flag;
|
||||
|
||||
uint8_t uiRefLayerChromaPhaseYPlus1;
|
||||
@ -192,7 +192,7 @@ typedef struct TagSlice {
|
||||
/*slice_data_ext() generate*/
|
||||
|
||||
/*******************************misc use****************************/
|
||||
bool_t bSliceHeaderExtFlag; // Indicate which slice header is used, avc or ext?
|
||||
bool bSliceHeaderExtFlag; // Indicate which slice header is used, avc or ext?
|
||||
/*************got from other layer for effiency if possible***************/
|
||||
/*from lower layer: slice header*/
|
||||
uint8_t eSliceType;
|
||||
|
@ -53,15 +53,15 @@ namespace WelsDec {
|
||||
* Function pointer declaration for various tool sets
|
||||
*/
|
||||
// wels log output
|
||||
typedef void_t (*PWelsLogCallbackFunc) (void_t* pPtr, const int32_t kiLevel, const char* kpFmt, va_list pArgv);
|
||||
typedef void (*PWelsLogCallbackFunc) (void* pPtr, const int32_t kiLevel, const char* kpFmt, va_list pArgv);
|
||||
|
||||
extern PWelsLogCallbackFunc g_pLog;
|
||||
|
||||
#ifdef __GNUC__
|
||||
extern void_t WelsLog (void_t* pPtr, int32_t iLevel, const char* kpFmt, ...) __attribute__ ((__format__ (__printf__, 3,
|
||||
extern void WelsLog (void* pPtr, int32_t iLevel, const char* kpFmt, ...) __attribute__ ((__format__ (__printf__, 3,
|
||||
4)));
|
||||
#else
|
||||
extern void_t WelsLog (void_t* pPtr, int32_t iLevel, const char* kpFmt, ...);
|
||||
extern void WelsLog (void* pPtr, int32_t iLevel, const char* kpFmt, ...);
|
||||
#endif
|
||||
|
||||
#define DECODER_MODE_NAME(a) ((a == SW_MODE)?"SW_MODE":((a == GPU_MODE)?"GPU_MODE":((a == AUTO_MODE)?"AUTO_MODE":"SWITCH_MODE")))
|
||||
|
@ -116,7 +116,7 @@ extern const uint8_t g_kuiZeroLeftBitNumMap[16];
|
||||
#define WELS_GET_PREFIX_BITS(inval, outval) outval = GetPrefixBits(inval)
|
||||
#endif
|
||||
|
||||
static inline void_t InitVlcTable (SVlcTable* pVlcTable) {
|
||||
static inline void InitVlcTable (SVlcTable* pVlcTable) {
|
||||
pVlcTable->kpChromaCoeffTokenVlcTable = g_kuiVlcChromaTable;
|
||||
|
||||
pVlcTable->kpCoeffTokenVlcTable[0][0] = g_kuiVlcTable_0;
|
||||
|
@ -108,7 +108,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade
|
||||
uint8_t* pNal = pSrcRbsp;
|
||||
int32_t iNalSize = iSrcRbspLen;
|
||||
PBitStringAux pBs = NULL;
|
||||
bool_t bExtensionFlag = false;
|
||||
bool bExtensionFlag = false;
|
||||
int32_t iErr = ERR_NONE;
|
||||
int32_t iBitSize = 0;
|
||||
|
||||
@ -362,66 +362,66 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade
|
||||
}
|
||||
|
||||
|
||||
bool_t CheckAccessUnitBoundaryExt (PNalUnitHeaderExt pLastNalHdrExt, PNalUnitHeaderExt pCurNalHeaderExt,
|
||||
bool CheckAccessUnitBoundaryExt (PNalUnitHeaderExt pLastNalHdrExt, PNalUnitHeaderExt pCurNalHeaderExt,
|
||||
PSliceHeader pLastSliceHeader, PSliceHeader pCurSliceHeader) {
|
||||
const PSps kpSps = pCurSliceHeader->pSps;
|
||||
|
||||
//Sub-clause 7.1.4.1.1 temporal_id
|
||||
if (pLastNalHdrExt->uiTemporalId != pCurNalHeaderExt->uiTemporalId) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Subclause 7.4.1.2.5
|
||||
if (pLastSliceHeader->iRedundantPicCnt < pCurSliceHeader->iRedundantPicCnt)
|
||||
return FALSE;
|
||||
return false;
|
||||
else if (pLastSliceHeader->iRedundantPicCnt > pCurSliceHeader->iRedundantPicCnt)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// Subclause G7.4.1.2.4
|
||||
if (pLastNalHdrExt->uiDependencyId < pCurNalHeaderExt->uiDependencyId)
|
||||
return FALSE;
|
||||
return false;
|
||||
else if (pLastNalHdrExt->uiDependencyId > pCurNalHeaderExt->uiDependencyId)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (pLastNalHdrExt->uiQualityId < pCurNalHeaderExt->uiQualityId)
|
||||
return FALSE;
|
||||
return false;
|
||||
else if (pLastNalHdrExt->uiQualityId > pCurNalHeaderExt->uiQualityId)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// Subclause 7.4.1.2.4
|
||||
if (pLastSliceHeader->iFrameNum != pCurSliceHeader->iFrameNum)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (pLastSliceHeader->iPpsId != pCurSliceHeader->iPpsId)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (pLastSliceHeader->bFieldPicFlag != pCurSliceHeader->bFieldPicFlag)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (pLastSliceHeader->bBottomFiledFlag != pCurSliceHeader->bBottomFiledFlag)
|
||||
return TRUE;
|
||||
return true;
|
||||
if ((pLastNalHdrExt->sNalUnitHeader.uiNalRefIdc != NRI_PRI_LOWEST) != (pCurNalHeaderExt->sNalUnitHeader.uiNalRefIdc !=
|
||||
NRI_PRI_LOWEST))
|
||||
return TRUE;
|
||||
return true;
|
||||
if (pLastNalHdrExt->bIdrFlag != pCurNalHeaderExt->bIdrFlag)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (pCurNalHeaderExt->bIdrFlag) {
|
||||
if (pLastSliceHeader->uiIdrPicId != pCurSliceHeader->uiIdrPicId)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (kpSps->uiPocType == 0) {
|
||||
if (pLastSliceHeader->iPicOrderCntLsb != pCurSliceHeader->iPicOrderCntLsb)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (pLastSliceHeader->iDeltaPicOrderCntBottom != pCurSliceHeader->iDeltaPicOrderCntBottom)
|
||||
return TRUE;
|
||||
return true;
|
||||
} else if (kpSps->uiPocType == 1) {
|
||||
if (pLastSliceHeader->iDeltaPicOrderCnt[0] != pCurSliceHeader->iDeltaPicOrderCnt[0])
|
||||
return TRUE;
|
||||
return true;
|
||||
if (pLastSliceHeader->iDeltaPicOrderCnt[1] != pCurSliceHeader->iDeltaPicOrderCnt[1])
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool_t CheckAccessUnitBoundary (const PNalUnit kpCurNal, const PNalUnit kpLastNal, const PSps kpSps) {
|
||||
bool CheckAccessUnitBoundary (const PNalUnit kpCurNal, const PNalUnit kpLastNal, const PSps kpSps) {
|
||||
const PNalUnitHeaderExt kpLastNalHeaderExt = &kpLastNal->sNalHeaderExt;
|
||||
const PNalUnitHeaderExt kpCurNalHeaderExt = &kpCurNal->sNalHeaderExt;
|
||||
const SSliceHeader* kpLastSliceHeader = &kpLastNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
|
||||
@ -429,56 +429,56 @@ bool_t CheckAccessUnitBoundary (const PNalUnit kpCurNal, const PNalUnit kpLastNa
|
||||
|
||||
//Sub-clause 7.1.4.1.1 temporal_id
|
||||
if (kpLastNalHeaderExt->uiTemporalId != kpCurNalHeaderExt->uiTemporalId) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Subclause 7.4.1.2.5
|
||||
if (kpLastSliceHeader->iRedundantPicCnt < kpCurSliceHeader->iRedundantPicCnt)
|
||||
return FALSE;
|
||||
return false;
|
||||
else if (kpLastSliceHeader->iRedundantPicCnt > kpCurSliceHeader->iRedundantPicCnt)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// Subclause G7.4.1.2.4
|
||||
if (kpLastNalHeaderExt->uiDependencyId < kpCurNalHeaderExt->uiDependencyId)
|
||||
return FALSE;
|
||||
return false;
|
||||
else if (kpLastNalHeaderExt->uiDependencyId > kpCurNalHeaderExt->uiDependencyId)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (kpLastNalHeaderExt->uiQualityId < kpCurNalHeaderExt->uiQualityId)
|
||||
return FALSE;
|
||||
return false;
|
||||
else if (kpLastNalHeaderExt->uiQualityId > kpCurNalHeaderExt->uiQualityId)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// Subclause 7.4.1.2.4
|
||||
if (kpLastSliceHeader->iFrameNum != kpCurSliceHeader->iFrameNum)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (kpLastSliceHeader->iPpsId != kpCurSliceHeader->iPpsId)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (kpLastSliceHeader->bFieldPicFlag != kpCurSliceHeader->bFieldPicFlag)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (kpLastSliceHeader->bBottomFiledFlag != kpCurSliceHeader->bBottomFiledFlag)
|
||||
return TRUE;
|
||||
return true;
|
||||
if ((kpLastNalHeaderExt->sNalUnitHeader.uiNalRefIdc != NRI_PRI_LOWEST) != (kpCurNalHeaderExt->sNalUnitHeader.uiNalRefIdc
|
||||
!= NRI_PRI_LOWEST))
|
||||
return TRUE;
|
||||
return true;
|
||||
if (kpLastNalHeaderExt->bIdrFlag != kpCurNalHeaderExt->bIdrFlag)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (kpCurNalHeaderExt->bIdrFlag) {
|
||||
if (kpLastSliceHeader->uiIdrPicId != kpCurSliceHeader->uiIdrPicId)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (kpSps->uiPocType == 0) {
|
||||
if (kpLastSliceHeader->iPicOrderCntLsb != kpCurSliceHeader->iPicOrderCntLsb)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (kpLastSliceHeader->iDeltaPicOrderCntBottom != kpCurSliceHeader->iDeltaPicOrderCntBottom)
|
||||
return TRUE;
|
||||
return true;
|
||||
} else if (kpSps->uiPocType == 1) {
|
||||
if (kpLastSliceHeader->iDeltaPicOrderCnt[0] != kpCurSliceHeader->iDeltaPicOrderCnt[0])
|
||||
return TRUE;
|
||||
return true;
|
||||
if (kpLastSliceHeader->iDeltaPicOrderCnt[1] != kpCurSliceHeader->iDeltaPicOrderCnt[1])
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -559,8 +559,8 @@ int32_t ParseNonVclNal (PWelsDecoderContext pCtx, uint8_t* pRbsp, const int32_t
|
||||
return iErr;
|
||||
}
|
||||
|
||||
void_t ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePicMarking) {
|
||||
const bool_t kbAdaptiveMarkingModeFlag = !!BsGetOneBit (pBs);
|
||||
void ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePicMarking) {
|
||||
const bool kbAdaptiveMarkingModeFlag = !!BsGetOneBit (pBs);
|
||||
pRefBasePicMarking->bAdaptiveRefBasePicMarkingModeFlag = kbAdaptiveMarkingModeFlag;
|
||||
if (kbAdaptiveMarkingModeFlag) {
|
||||
int32_t iIdx = 0;
|
||||
@ -583,7 +583,7 @@ void_t ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePic
|
||||
}
|
||||
}
|
||||
|
||||
void_t ParsePrefixNalUnit (PWelsDecoderContext pCtx, PBitStringAux pBs) {
|
||||
void ParsePrefixNalUnit (PWelsDecoderContext pCtx, PBitStringAux pBs) {
|
||||
PNalUnit pCurNal = &pCtx->sPrefixNal;
|
||||
|
||||
if (pCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc != 0) {
|
||||
@ -670,7 +670,7 @@ static const SLevelLimits g_kSLevelLimits[17] = {
|
||||
{2073600, 36864, 184320, 240000, 240000, -2048, 2047, 2, 16} /* level 5.2 */
|
||||
};
|
||||
|
||||
const SLevelLimits *GetLevelLimits(int32_t iLevelIdx, bool_t bConstraint3) {
|
||||
const SLevelLimits *GetLevelLimits(int32_t iLevelIdx, bool bConstraint3) {
|
||||
switch (iLevelIdx) {
|
||||
case 10:
|
||||
return &g_kSLevelLimits[0];
|
||||
@ -737,8 +737,8 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW
|
||||
ProfileIdc uiProfileIdc;
|
||||
uint8_t uiLevelIdc;
|
||||
int32_t iSpsId;
|
||||
bool_t bConstraintSetFlags[6] = { false };
|
||||
const bool_t kbUseSubsetFlag = IS_SUBSET_SPS_NAL (pNalHead->eNalUnitType);
|
||||
bool bConstraintSetFlags[6] = { false };
|
||||
const bool kbUseSubsetFlag = IS_SUBSET_SPS_NAL (pNalHead->eNalUnitType);
|
||||
|
||||
|
||||
if (kbUseSubsetFlag) { // SubsetSps
|
||||
@ -1030,7 +1030,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux)
|
||||
* \note Call it in case eNalUnitType is NAL_UNIT_SEI.
|
||||
*************************************************************************************
|
||||
*/
|
||||
int32_t ParseSei (void_t* pSei, PBitStringAux pBsAux) { // reserved Sei_Msg type
|
||||
int32_t ParseSei (void* pSei, PBitStringAux pBsAux) { // reserved Sei_Msg type
|
||||
|
||||
|
||||
return ERR_NONE;
|
||||
|
@ -47,7 +47,7 @@ inline uint32_t GetValue4Bytes (uint8_t* pDstNal) {
|
||||
return uiValue;
|
||||
}
|
||||
|
||||
void_t InitReadBits (PBitStringAux pBitString) {
|
||||
void InitReadBits (PBitStringAux pBitString) {
|
||||
pBitString->uiCurBits = GetValue4Bytes (pBitString->pCurBuf);
|
||||
pBitString->pCurBuf += 4;
|
||||
pBitString->iLeftBits = -16;
|
||||
|
@ -143,7 +143,7 @@ static const uint8_t g_kuiTableBIdx[2][8] = {
|
||||
tc[3] = g_kiTc0Table(iIndexA)[pBS[3]] + bChroma;\
|
||||
}
|
||||
|
||||
void_t inline DeblockingBSInsideMBAvsbase (int8_t* pNnzTab, uint8_t nBS[2][4][4], int32_t iLShiftFactor) {
|
||||
void inline DeblockingBSInsideMBAvsbase (int8_t* pNnzTab, uint8_t nBS[2][4][4], int32_t iLShiftFactor) {
|
||||
uint32_t uiNnz32b0, uiNnz32b1, uiNnz32b2, uiNnz32b3;
|
||||
|
||||
uiNnz32b0 = * (uint32_t*) (pNnzTab + 0);
|
||||
@ -172,7 +172,7 @@ void_t inline DeblockingBSInsideMBAvsbase (int8_t* pNnzTab, uint8_t nBS[2][4][4]
|
||||
|
||||
}
|
||||
|
||||
void_t static inline DeblockingBSInsideMBNormal (PDqLayer pCurDqLayer, uint8_t nBS[2][4][4], int8_t* pNnzTab,
|
||||
void static inline DeblockingBSInsideMBNormal (PDqLayer pCurDqLayer, uint8_t nBS[2][4][4], int8_t* pNnzTab,
|
||||
int32_t iMbXy) {
|
||||
uint32_t uiNnz32b0, uiNnz32b1, uiNnz32b2, uiNnz32b3;
|
||||
int8_t* iRefIndex = pCurDqLayer->pRefIndex[LIST_0][iMbXy];
|
||||
@ -251,8 +251,8 @@ int32_t DeblockingAvailableNoInterlayer (PDqLayer pCurDqLayer, int32_t iFilterId
|
||||
int32_t iMbY = pCurDqLayer->iMbY;
|
||||
int32_t iMbX = pCurDqLayer->iMbX;
|
||||
int32_t iMbXy = pCurDqLayer->iMbXyIndex;
|
||||
BOOL_T bLeftFlag = FALSE;
|
||||
BOOL_T bTopFlag = FALSE;
|
||||
bool bLeftFlag = false;
|
||||
bool bTopFlag = false;
|
||||
|
||||
if (2 == iFilterIdc) {
|
||||
bLeftFlag = (iMbX > 0) && (pCurDqLayer->pSliceIdc[iMbXy] == pCurDqLayer->pSliceIdc[iMbXy - 1]);
|
||||
@ -264,7 +264,7 @@ int32_t DeblockingAvailableNoInterlayer (PDqLayer pCurDqLayer, int32_t iFilterId
|
||||
return (bLeftFlag << LEFT_FLAG_BIT) | (bTopFlag << TOP_FLAG_BIT);
|
||||
}
|
||||
|
||||
void_t FilteringEdgeLumaH (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
|
||||
void FilteringEdgeLumaH (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
|
||||
int32_t iIndexA;
|
||||
int32_t iAlpha;
|
||||
int32_t iBeta;
|
||||
@ -281,7 +281,7 @@ void_t FilteringEdgeLumaH (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iS
|
||||
}
|
||||
|
||||
|
||||
void_t FilteringEdgeLumaV (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
|
||||
void FilteringEdgeLumaV (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
|
||||
int32_t iIndexA;
|
||||
int32_t iAlpha;
|
||||
int32_t iBeta;
|
||||
@ -298,7 +298,7 @@ void_t FilteringEdgeLumaV (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iS
|
||||
}
|
||||
|
||||
|
||||
void_t FilteringEdgeLumaIntraH (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
|
||||
void FilteringEdgeLumaIntraH (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
|
||||
int32_t iIndexA;
|
||||
int32_t iAlpha;
|
||||
int32_t iBeta;
|
||||
@ -312,7 +312,7 @@ void_t FilteringEdgeLumaIntraH (SDeblockingFilter* pFilter, uint8_t* pPix, int32
|
||||
return;
|
||||
}
|
||||
|
||||
void_t FilteringEdgeLumaIntraV (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
|
||||
void FilteringEdgeLumaIntraV (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
|
||||
int32_t iIndexA;
|
||||
int32_t iAlpha;
|
||||
int32_t iBeta;
|
||||
@ -325,7 +325,7 @@ void_t FilteringEdgeLumaIntraV (SDeblockingFilter* pFilter, uint8_t* pPix, int32
|
||||
}
|
||||
return;
|
||||
}
|
||||
void_t FilteringEdgeChromaH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride,
|
||||
void FilteringEdgeChromaH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride,
|
||||
uint8_t* pBS) {
|
||||
int32_t iIndexA;
|
||||
int32_t iAlpha;
|
||||
@ -341,7 +341,7 @@ void_t FilteringEdgeChromaH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_
|
||||
}
|
||||
return;
|
||||
}
|
||||
void_t FilteringEdgeChromaV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride,
|
||||
void FilteringEdgeChromaV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride,
|
||||
uint8_t* pBS) {
|
||||
int32_t iIndexA;
|
||||
int32_t iAlpha;
|
||||
@ -358,7 +358,7 @@ void_t FilteringEdgeChromaV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_
|
||||
return;
|
||||
}
|
||||
|
||||
void_t FilteringEdgeChromaIntraH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride,
|
||||
void FilteringEdgeChromaIntraH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride,
|
||||
uint8_t* pBS) {
|
||||
int32_t iIndexA;
|
||||
int32_t iAlpha;
|
||||
@ -373,7 +373,7 @@ void_t FilteringEdgeChromaIntraH (SDeblockingFilter* pFilter, uint8_t* pPixCb, u
|
||||
return;
|
||||
}
|
||||
|
||||
void_t FilteringEdgeChromaIntraV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride,
|
||||
void FilteringEdgeChromaIntraV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride,
|
||||
uint8_t* pBS) {
|
||||
int32_t iIndexA;
|
||||
int32_t iAlpha;
|
||||
@ -389,7 +389,7 @@ void_t FilteringEdgeChromaIntraV (SDeblockingFilter* pFilter, uint8_t* pPixCb, u
|
||||
}
|
||||
|
||||
|
||||
void_t DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_t nBS[2][4][4],
|
||||
void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_t nBS[2][4][4],
|
||||
int32_t iBoundryFlag) {
|
||||
int32_t iMbXyIndex = pCurDqLayer->iMbXyIndex;
|
||||
int32_t iMbX = pCurDqLayer->iMbX;
|
||||
@ -471,7 +471,7 @@ void_t DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint
|
||||
}
|
||||
}
|
||||
|
||||
void_t FilteringEdgeLumaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
|
||||
void FilteringEdgeLumaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
|
||||
int32_t iMbXyIndex = pCurDqLayer->iMbXyIndex;
|
||||
int32_t iMbX = pCurDqLayer->iMbX;
|
||||
int32_t iMbY = pCurDqLayer->iMbY;
|
||||
@ -519,7 +519,7 @@ void_t FilteringEdgeLumaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, in
|
||||
pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (3 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);
|
||||
}
|
||||
}
|
||||
void_t FilteringEdgeChromaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
|
||||
void FilteringEdgeChromaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
|
||||
int32_t iMbXyIndex = pCurDqLayer->iMbXyIndex;
|
||||
int32_t iMbX = pCurDqLayer->iMbX;
|
||||
int32_t iMbY = pCurDqLayer->iMbY;
|
||||
@ -566,12 +566,12 @@ void_t FilteringEdgeChromaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter,
|
||||
}
|
||||
|
||||
// merge h&v lookup table operation to save performance
|
||||
void_t DeblockingIntraMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
|
||||
void DeblockingIntraMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
|
||||
FilteringEdgeLumaHV (pCurDqLayer, pFilter, iBoundryFlag);
|
||||
FilteringEdgeChromaHV (pCurDqLayer, pFilter, iBoundryFlag);
|
||||
}
|
||||
|
||||
void_t WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
|
||||
void WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
|
||||
uint8_t nBS[2][4][4] = { 0 };
|
||||
|
||||
int32_t iMbXyIndex = pCurDqLayer->iMbXyIndex;
|
||||
@ -623,7 +623,7 @@ void_t WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32
|
||||
*
|
||||
* \return NONE
|
||||
*/
|
||||
void_t WelsDeblockingFilterSlice (PWelsDecoderContext pCtx, PDeblockingFilterMbFunc pDeblockMb) {
|
||||
void WelsDeblockingFilterSlice (PWelsDecoderContext pCtx, PDeblockingFilterMbFunc pDeblockMb) {
|
||||
PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
|
||||
PSliceHeaderExt pSliceHeaderExt = &pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt;
|
||||
int32_t iMbWidth = pCurDqLayer->iMbWidth;
|
||||
@ -694,7 +694,7 @@ void_t WelsDeblockingFilterSlice (PWelsDecoderContext pCtx, PDeblockingFilterMbF
|
||||
* \return NONE
|
||||
*/
|
||||
|
||||
void_t DeblockingInit (SDeblockingFunc* pFunc, int32_t iCpu) {
|
||||
void DeblockingInit (SDeblockingFunc* pFunc, int32_t iCpu) {
|
||||
pFunc->pfLumaDeblockingLT4Ver = DeblockLumaLt4V_c;
|
||||
pFunc->pfLumaDeblockingEQ4Ver = DeblockLumaEq4V_c;
|
||||
pFunc->pfLumaDeblockingLT4Hor = DeblockLumaLt4H_c;
|
||||
|
@ -43,7 +43,7 @@ uint8_t g_ClipTable[256 + 2 *
|
||||
|
||||
|
||||
/* init pClip table to pClip the final dct data */
|
||||
void_t InitDctClipTable (void_t) {
|
||||
void InitDctClipTable (void) {
|
||||
uint8_t* p = &g_ClipTable[0];
|
||||
const int32_t kiLength = MAX_NEG_CROP * sizeof (uint8_t);
|
||||
int32_t i = 0;
|
||||
@ -65,7 +65,7 @@ void_t InitDctClipTable (void_t) {
|
||||
|
||||
//NOTE::: p_RS should NOT be modified and it will lead to mismatch with JSVM.
|
||||
// so should allocate kA array to store the temporary value (idct).
|
||||
void_t IdctResAddPred_c (uint8_t* pPred, const int32_t kiStride, int16_t* pRs) {
|
||||
void IdctResAddPred_c (uint8_t* pPred, const int32_t kiStride, int16_t* pRs) {
|
||||
int16_t iSrc[16];
|
||||
|
||||
uint8_t* pDst = pPred;
|
||||
@ -103,7 +103,7 @@ void_t IdctResAddPred_c (uint8_t* pPred, const int32_t kiStride, int16_t* pRs) {
|
||||
}
|
||||
}
|
||||
|
||||
void_t GetI4LumaIChromaAddrTable (int32_t* pBlockOffset, const int32_t kiYStride, const int32_t kiUVStride) {
|
||||
void GetI4LumaIChromaAddrTable (int32_t* pBlockOffset, const int32_t kiYStride, const int32_t kiUVStride) {
|
||||
int32_t* pOffset = pBlockOffset;
|
||||
int32_t i;
|
||||
const uint8_t kuiScan0 = g_kuiScan8[0];
|
||||
|
@ -192,7 +192,7 @@ int32_t WelsMbInterConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLayer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void_t WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp) {
|
||||
void WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp) {
|
||||
const int32_t kiQMul = g_kuiDequantCoeff[iQp][0];
|
||||
#define STRIDE 16
|
||||
int32_t i;
|
||||
@ -234,7 +234,7 @@ void_t WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp) {
|
||||
#undef STRIDE
|
||||
}
|
||||
|
||||
int32_t WelsMbIntraPredictionConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLayer, bool_t bOutput) {
|
||||
int32_t WelsMbIntraPredictionConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLayer, bool bOutput) {
|
||||
//seems IPCM should not enter this path
|
||||
int32_t iMbXy = pCurLayer->iMbXyIndex;
|
||||
|
||||
@ -270,7 +270,7 @@ int32_t WelsMbInterPrediction (PWelsDecoderContext pCtx, PDqLayer pCurLayer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void_t WelsMbCopy (uint8_t* pDst, int32_t iStrideDst, uint8_t* pSrc, int32_t iStrideSrc,
|
||||
void WelsMbCopy (uint8_t* pDst, int32_t iStrideDst, uint8_t* pSrc, int32_t iStrideSrc,
|
||||
int32_t iHeight, int32_t iWidth) {
|
||||
int32_t i;
|
||||
int32_t iOffsetDst = 0, iOffsetSrc = 0;
|
||||
@ -328,7 +328,7 @@ int32_t WelsTargetMbConstruction (PWelsDecoderContext pCtx) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void_t WelsChromaDcIdct (int16_t* pBlock) {
|
||||
void WelsChromaDcIdct (int16_t* pBlock) {
|
||||
int32_t iStride = 32;
|
||||
int32_t iXStride = 16;
|
||||
int32_t iStride1 = iXStride + iStride;
|
||||
@ -351,7 +351,7 @@ void_t WelsChromaDcIdct (int16_t* pBlock) {
|
||||
pBlk[iStride1] = (iE - iB) >> 1;
|
||||
}
|
||||
|
||||
int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool_t bFirstSliceInLayer, PNalUnit pNalCur) {
|
||||
int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool bFirstSliceInLayer, PNalUnit pNalCur) {
|
||||
PDqLayer pCurLayer = pCtx->pCurDqLayer;
|
||||
PFmo pFmo = pCtx->pFmo;
|
||||
int32_t i, iRet;
|
||||
@ -1111,7 +1111,7 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void_t WelsBlockInit (int16_t* pBlock, int32_t iWidth, int32_t iHeight, int32_t iStride, uint8_t uiVal) {
|
||||
void WelsBlockInit (int16_t* pBlock, int32_t iWidth, int32_t iHeight, int32_t iStride, uint8_t uiVal) {
|
||||
int32_t i;
|
||||
int16_t* pDst = pBlock;
|
||||
|
||||
@ -1121,7 +1121,7 @@ void_t WelsBlockInit (int16_t* pBlock, int32_t iWidth, int32_t iHeight, int32_t
|
||||
}
|
||||
}
|
||||
|
||||
void_t WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) {
|
||||
void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) {
|
||||
pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_c;
|
||||
pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_c;
|
||||
pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_c;
|
||||
@ -1133,15 +1133,15 @@ void_t WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
void_t WelsBlockZero16x16_c (int16_t* pBlock, int32_t iStride) {
|
||||
void WelsBlockZero16x16_c (int16_t* pBlock, int32_t iStride) {
|
||||
WelsBlockInit (pBlock, 16, 16, iStride, 0);
|
||||
}
|
||||
|
||||
void_t WelsBlockZero8x8_c (int16_t* pBlock, int32_t iStride) {
|
||||
void WelsBlockZero8x8_c (int16_t* pBlock, int32_t iStride) {
|
||||
WelsBlockInit (pBlock, 8, 8, iStride, 0);
|
||||
}
|
||||
|
||||
void_t SetNonZeroCount_c (int16_t* pBlock, int8_t* pNonZeroCount) {
|
||||
void SetNonZeroCount_c (int16_t* pBlock, int8_t* pNonZeroCount) {
|
||||
int32_t i;
|
||||
int32_t iIndex;
|
||||
|
||||
|
@ -57,9 +57,9 @@ namespace WelsDec {
|
||||
|
||||
extern PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const int32_t kiPicHeight);
|
||||
|
||||
extern void_t FreePicture (PPicture pPic);
|
||||
extern void FreePicture (PPicture pPic);
|
||||
|
||||
inline void_t GetValueOf4Bytes (uint8_t* pDstNal, int32_t iDdstIdx) {
|
||||
inline void GetValueOf4Bytes (uint8_t* pDstNal, int32_t iDdstIdx) {
|
||||
ST32(pDstNal, iDdstIdx);
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ static int32_t CreatePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, cons
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void_t DestroyPicBuff (PPicBuff* ppPicBuf) {
|
||||
static void DestroyPicBuff (PPicBuff* ppPicBuf) {
|
||||
PPicBuff pPicBuf = NULL;
|
||||
|
||||
if (NULL == ppPicBuf || NULL == *ppPicBuf)
|
||||
@ -131,7 +131,7 @@ static void_t DestroyPicBuff (PPicBuff* ppPicBuf) {
|
||||
/*
|
||||
* fill data fields in default for decoder context
|
||||
*/
|
||||
void_t WelsDecoderDefaults (PWelsDecoderContext pCtx) {
|
||||
void WelsDecoderDefaults (PWelsDecoderContext pCtx) {
|
||||
int32_t iCpuCores = 1;
|
||||
memset (pCtx, 0, sizeof (SWelsDecoderContext)); // fill zero first
|
||||
|
||||
@ -177,11 +177,11 @@ void_t WelsDecoderDefaults (PWelsDecoderContext pCtx) {
|
||||
* get size of reference picture list in target layer incoming, = (iNumRefFrames x 2)
|
||||
*/
|
||||
static inline int32_t GetTargetRefListSize (PWelsDecoderContext pCtx) {
|
||||
bool_t* pSubsetSpsAvail = &pCtx->bSubspsAvailFlags[0];
|
||||
bool_t* pSpsAvail = &pCtx->bSpsAvailFlags[0];
|
||||
bool* pSubsetSpsAvail = &pCtx->bSubspsAvailFlags[0];
|
||||
bool* pSpsAvail = &pCtx->bSpsAvailFlags[0];
|
||||
int32_t iSubsetIdx = -1;
|
||||
int32_t iSpsIdx = -1;
|
||||
bool_t bExistSubsetSps = false;
|
||||
bool bExistSubsetSps = false;
|
||||
int32_t bExistSps = false;
|
||||
int32_t iPos = MAX_SPS_COUNT - 1;
|
||||
int32_t iNumRefFrames = 0;
|
||||
@ -238,7 +238,7 @@ int32_t WelsRequestMem (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const
|
||||
|
||||
int32_t iListIdx = 0; //, mb_blocks = 0;
|
||||
int32_t iPicQueueSize = 0; // adaptive size of picture queue, = (pSps->iNumRefFrames x 2)
|
||||
bool_t bNeedChangePicQueue = true;
|
||||
bool bNeedChangePicQueue = true;
|
||||
|
||||
WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pCtx || kiPicWidth <= 0 || kiPicHeight <= 0))
|
||||
|
||||
@ -282,7 +282,7 @@ int32_t WelsRequestMem (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const
|
||||
/*
|
||||
* free memory blocks in avc
|
||||
*/
|
||||
void_t WelsFreeMem (PWelsDecoderContext pCtx) {
|
||||
void WelsFreeMem (PWelsDecoderContext pCtx) {
|
||||
int32_t iListIdx = 0;
|
||||
|
||||
/* TODO: free memory blocks introduced in avc */
|
||||
@ -308,7 +308,7 @@ void_t WelsFreeMem (PWelsDecoderContext pCtx) {
|
||||
/*!
|
||||
* \brief Open decoder
|
||||
*/
|
||||
void_t WelsOpenDecoder (PWelsDecoderContext pCtx) {
|
||||
void WelsOpenDecoder (PWelsDecoderContext pCtx) {
|
||||
// function pointers
|
||||
//initial MC function pointer--
|
||||
InitMcFunc (& (pCtx->sMcFunc), pCtx->uiCpuFlag);
|
||||
@ -333,7 +333,7 @@ void_t WelsOpenDecoder (PWelsDecoderContext pCtx) {
|
||||
/*!
|
||||
* \brief Close decoder
|
||||
*/
|
||||
void_t WelsCloseDecoder (PWelsDecoderContext pCtx) {
|
||||
void WelsCloseDecoder (PWelsDecoderContext pCtx) {
|
||||
WelsFreeMem (pCtx);
|
||||
|
||||
WelsFreeMemory (pCtx);
|
||||
@ -350,7 +350,7 @@ void_t WelsCloseDecoder (PWelsDecoderContext pCtx) {
|
||||
/*!
|
||||
* \brief configure decoder parameters
|
||||
*/
|
||||
int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const void_t* kpParam) {
|
||||
int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const void* kpParam) {
|
||||
if (NULL == pCtx || NULL == kpParam)
|
||||
return 1;
|
||||
|
||||
@ -387,7 +387,7 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const void_t* kpParam) {
|
||||
* \note N/A
|
||||
*************************************************************************************
|
||||
*/
|
||||
int32_t WelsInitDecoder (PWelsDecoderContext pCtx, void_t* pTraceHandle, PWelsLogCallbackFunc pLog) {
|
||||
int32_t WelsInitDecoder (PWelsDecoderContext pCtx, void* pTraceHandle, PWelsLogCallbackFunc pLog) {
|
||||
if (pCtx == NULL) {
|
||||
return ERR_INFO_INVALID_PTR;
|
||||
}
|
||||
@ -423,12 +423,12 @@ int32_t WelsInitDecoder (PWelsDecoderContext pCtx, void_t* pTraceHandle, PWelsLo
|
||||
* \note N/A
|
||||
*************************************************************************************
|
||||
*/
|
||||
void_t WelsEndDecoder (PWelsDecoderContext pCtx) {
|
||||
void WelsEndDecoder (PWelsDecoderContext pCtx) {
|
||||
// close decoder
|
||||
WelsCloseDecoder (pCtx);
|
||||
}
|
||||
|
||||
void_t GetVclNalTemporalId (PWelsDecoderContext pCtx) {
|
||||
void GetVclNalTemporalId (PWelsDecoderContext pCtx) {
|
||||
PAccessUnit pAccessUnit = pCtx->pAccessUnitList;
|
||||
int32_t idx = pAccessUnit->uiStartPos;
|
||||
|
||||
@ -661,7 +661,7 @@ int32_t SyncPictureResolutionExt (PWelsDecoderContext pCtx, const int32_t kiMbWi
|
||||
return iErr;
|
||||
}
|
||||
|
||||
void_t AssignFuncPointerForRec (PWelsDecoderContext pCtx) {
|
||||
void AssignFuncPointerForRec (PWelsDecoderContext pCtx) {
|
||||
pCtx->pGetI16x16LumaPredFunc[I16_PRED_V ] = WelsI16x16LumaPredV_c;
|
||||
pCtx->pGetI16x16LumaPredFunc[I16_PRED_H ] = WelsI16x16LumaPredH_c;
|
||||
pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC ] = WelsI16x16LumaPredDc_c;
|
||||
|
@ -105,7 +105,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline BOOL_T CheckSliceNeedReconstruct (int16_t iCurDid, int16_t iCurQid, bool_t bStoreRefBasePicFlag,
|
||||
inline bool CheckSliceNeedReconstruct (int16_t iCurDid, int16_t iCurQid, bool bStoreRefBasePicFlag,
|
||||
uint8_t uiDidMax, uint8_t uiLayerDqId, uint8_t uiTargetDqId) {
|
||||
return ((iCurDid == uiDidMax) && (iCurQid == BASE_QUALITY_ID) && (bStoreRefBasePicFlag)) // store base
|
||||
|| (uiLayerDqId == uiTargetDqId); // target layer
|
||||
@ -118,7 +118,7 @@ inline uint8_t GetTargetDqId (uint8_t uiTargetDqId, SDecodingParam* psParam) {
|
||||
}
|
||||
|
||||
|
||||
inline void_t HandleReferenceLostL0 (PWelsDecoderContext pCtx, PNalUnit pCurNal) {
|
||||
inline void HandleReferenceLostL0 (PWelsDecoderContext pCtx, PNalUnit pCurNal) {
|
||||
if (0 == pCurNal->sNalHeaderExt.uiTemporalId) {
|
||||
pCtx->bReferenceLostAtT0Flag = true;
|
||||
}
|
||||
@ -130,7 +130,7 @@ inline void_t HandleReferenceLostL0 (PWelsDecoderContext pCtx, PNalUnit pCurN
|
||||
pCtx->iErrorCode |= dsBitstreamError;
|
||||
}
|
||||
|
||||
inline void_t HandleReferenceLost (PWelsDecoderContext pCtx, PNalUnit pCurNal) {
|
||||
inline void HandleReferenceLost (PWelsDecoderContext pCtx, PNalUnit pCurNal) {
|
||||
if ((0 == pCurNal->sNalHeaderExt.uiTemporalId) || (1 == pCurNal->sNalHeaderExt.uiTemporalId)) {
|
||||
pCtx->bReferenceLostAtT0Flag = true;
|
||||
}
|
||||
@ -201,7 +201,7 @@ int32_t ParseRefPicListReordering (PBitStringAux pBs, PSliceHeader pSh) {
|
||||
}
|
||||
|
||||
int32_t ParseDecRefPicMarking (PWelsDecoderContext pCtx, PBitStringAux pBs, PSliceHeader pSh, PSps pSps,
|
||||
const bool_t kbIdrFlag) {
|
||||
const bool kbIdrFlag) {
|
||||
PRefPicMarking const kpRefMarking = &pSh->sRefMarking;
|
||||
|
||||
if (kbIdrFlag) {
|
||||
@ -238,7 +238,7 @@ int32_t ParseDecRefPicMarking (PWelsDecoderContext pCtx, PBitStringAux pBs, PSli
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
bool_t FillDefaultSliceHeaderExt (PSliceHeaderExt pShExt, PNalUnitHeaderExt pNalExt) {
|
||||
bool FillDefaultSliceHeaderExt (PSliceHeaderExt pShExt, PNalUnitHeaderExt pNalExt) {
|
||||
if (pShExt == NULL || pNalExt == NULL)
|
||||
return false;
|
||||
|
||||
@ -309,7 +309,7 @@ int32_t WelsInitMemory (PWelsDecoderContext pCtx) {
|
||||
* Free memory introduced in WelsInitMemory at destruction of decoder.
|
||||
*
|
||||
*/
|
||||
void_t WelsFreeMemory (PWelsDecoderContext pCtx) {
|
||||
void WelsFreeMemory (PWelsDecoderContext pCtx) {
|
||||
if (pCtx == NULL)
|
||||
return;
|
||||
|
||||
@ -337,7 +337,7 @@ void_t WelsFreeMemory (PWelsDecoderContext pCtx) {
|
||||
* pNal: target NALUnit ptr
|
||||
* pSrc: NAL Unit bitstream
|
||||
*/
|
||||
void_t DecodeNalHeaderExt (PNalUnit pNal, uint8_t* pSrc) {
|
||||
void DecodeNalHeaderExt (PNalUnit pNal, uint8_t* pSrc) {
|
||||
PNalUnitHeaderExt pHeaderExt = &pNal->sNalHeaderExt;
|
||||
|
||||
uint8_t uiCurByte = *pSrc;
|
||||
@ -392,7 +392,7 @@ int32_t CheckPpsId (PWelsDecoderContext pCtx, PPps* ppPps, uint32_t uiPpsId) {
|
||||
}
|
||||
|
||||
int32_t CheckSpsId (PWelsDecoderContext pCtx, PSubsetSps* ppSubsetSps, PSps* ppSps, int32_t iSpsId,
|
||||
bool_t bExtensionFlag) {
|
||||
bool bExtensionFlag) {
|
||||
PSps pSpsList = pCtx->sSpsBuffer;
|
||||
PSubsetSps pSubspsList = pCtx->sSubsetSpsBuffer;
|
||||
|
||||
@ -455,7 +455,7 @@ int32_t CheckSpsId (PWelsDecoderContext pCtx, PSubsetSps* ppSubsetSps, PSps* ppS
|
||||
* decode_slice_header_avc
|
||||
* Parse slice header of bitstream in avc for storing data structure
|
||||
*/
|
||||
int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, const bool_t kbExtensionFlag) {
|
||||
int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, const bool kbExtensionFlag) {
|
||||
PNalUnit const kpCurNal = pCtx->pAccessUnitList->pNalUnitsList[pCtx->pAccessUnitList->uiAvailUnitsNum - 1];
|
||||
|
||||
PNalUnitHeaderExt pNalHeaderExt = NULL;
|
||||
@ -469,8 +469,8 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co
|
||||
int32_t iRet = ERR_NONE;
|
||||
uint8_t uiSliceType = 0;
|
||||
uint8_t uiQualityId = BASE_QUALITY_ID;
|
||||
bool_t bIdrFlag = false;
|
||||
bool_t bSgChangeCycleInvolved = false; // involved slice group change cycle ?
|
||||
bool bIdrFlag = false;
|
||||
bool bSgChangeCycleInvolved = false; // involved slice group change cycle ?
|
||||
|
||||
if (kpCurNal == NULL) {
|
||||
return ERR_INFO_OUT_OF_MEMORY;
|
||||
@ -484,7 +484,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co
|
||||
|
||||
if (pSliceHeadExt) {
|
||||
SRefBasePicMarking sBaseMarking;
|
||||
const bool_t kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag;
|
||||
const bool kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag;
|
||||
memcpy (&sBaseMarking, &pSliceHeadExt->sRefBasePicMarking, sizeof (SRefBasePicMarking)); //confirmed_safe_unsafe_usage
|
||||
memset (pSliceHeadExt, 0, sizeof (SSliceHeaderExt));
|
||||
pSliceHeadExt->bStoreRefBasePicFlag = kbStoreRefBaseFlag;
|
||||
@ -619,7 +619,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co
|
||||
if (kbExtensionFlag) {
|
||||
uiQualityId = pNalHeaderExt->uiQualityId;
|
||||
} else if (uiSliceType == P_SLICE || uiSliceType == SP_SLICE || uiSliceType == B_SLICE) {
|
||||
const bool_t kbBipredFlag = (B_SLICE == uiSliceType);
|
||||
const bool kbBipredFlag = (B_SLICE == uiSliceType);
|
||||
if (kbBipredFlag) {
|
||||
WelsLog (pCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): kbBipredFlag = 1 not supported.\n");
|
||||
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_BIPRED);
|
||||
@ -820,7 +820,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co
|
||||
* pSrc: mark as decoded prefix NAL
|
||||
* ppDst: succeeded VCL NAL based AVC (I/P Slice)
|
||||
*/
|
||||
bool_t PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kppDst, PNalUnit const kpSrc) {
|
||||
bool PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kppDst, PNalUnit const kpSrc) {
|
||||
PNalUnitHeaderExt pNalHdrExtD = NULL, pNalHdrExtS = NULL;
|
||||
PSliceHeaderExt pShExtD = NULL;
|
||||
PPrefixNalUnit pPrefixS = NULL;
|
||||
@ -1029,7 +1029,7 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
void_t UninitialDqLayersContext (PWelsDecoderContext pCtx) {
|
||||
void UninitialDqLayersContext (PWelsDecoderContext pCtx) {
|
||||
int32_t i = 0;
|
||||
int32_t j = 0;
|
||||
|
||||
@ -1183,7 +1183,7 @@ void_t UninitialDqLayersContext (PWelsDecoderContext pCtx) {
|
||||
pCtx->bInitialDqLayersMem = false;
|
||||
}
|
||||
|
||||
void_t ResetCurrentAccessUnit (PWelsDecoderContext pCtx) {
|
||||
void ResetCurrentAccessUnit (PWelsDecoderContext pCtx) {
|
||||
PAccessUnit pCurAu = pCtx->pAccessUnitList;
|
||||
|
||||
pCurAu->uiEndPos = 0;
|
||||
@ -1211,7 +1211,7 @@ void_t ResetCurrentAccessUnit (PWelsDecoderContext pCtx) {
|
||||
* \author
|
||||
* \history 11/16/2009
|
||||
*/
|
||||
void_t ForceResetCurrentAccessUnit (PAccessUnit pAu) {
|
||||
void ForceResetCurrentAccessUnit (PAccessUnit pAu) {
|
||||
uint32_t uiSucAuIdx = pAu->uiEndPos + 1;
|
||||
uint32_t uiCurAuIdx = 0;
|
||||
|
||||
@ -1235,13 +1235,13 @@ void_t ForceResetCurrentAccessUnit (PAccessUnit pAu) {
|
||||
}
|
||||
|
||||
//clear current corrupted NAL from pNalUnitsList
|
||||
void_t ForceClearCurrentNal (PAccessUnit pAu) {
|
||||
void ForceClearCurrentNal (PAccessUnit pAu) {
|
||||
if (pAu->uiAvailUnitsNum > 0)
|
||||
-- pAu->uiAvailUnitsNum;
|
||||
}
|
||||
|
||||
|
||||
void_t CheckAvailNalUnitsListContinuity (PWelsDecoderContext pCtx, int32_t iStartIdx, int32_t iEndIdx) {
|
||||
void CheckAvailNalUnitsListContinuity (PWelsDecoderContext pCtx, int32_t iStartIdx, int32_t iEndIdx) {
|
||||
PAccessUnit pCurAu = pCtx->pAccessUnitList;
|
||||
|
||||
uint8_t uiLastNuDependencyId, uiLastNuLayerDqId;
|
||||
@ -1284,7 +1284,7 @@ void_t CheckAvailNalUnitsListContinuity (PWelsDecoderContext pCtx, int32_t iStar
|
||||
|
||||
//main purpose: to support multi-slice and to include all slice which have the same uiDependencyId, uiQualityId and frame_num
|
||||
//for single slice, pIdxNoInterLayerPred SHOULD NOT be modified
|
||||
void_t RefineIdxNoInterLayerPred (PAccessUnit pCurAu, int32_t* pIdxNoInterLayerPred) {
|
||||
void RefineIdxNoInterLayerPred (PAccessUnit pCurAu, int32_t* pIdxNoInterLayerPred) {
|
||||
int32_t iLastNalDependId = pCurAu->pNalUnitsList[*pIdxNoInterLayerPred]->sNalHeaderExt.uiDependencyId;
|
||||
int32_t iLastNalQualityId = pCurAu->pNalUnitsList[*pIdxNoInterLayerPred]->sNalHeaderExt.uiQualityId;
|
||||
uint8_t uiLastNalTId = pCurAu->pNalUnitsList[*pIdxNoInterLayerPred]->sNalHeaderExt.uiTemporalId;
|
||||
@ -1297,7 +1297,7 @@ void_t RefineIdxNoInterLayerPred (PAccessUnit pCurAu, int32_t* pIdxNoInterLayerP
|
||||
int32_t iCurNalDependId, iCurNalQualityId, iCurNalTId, iCurNalFrameNum, iCurNalPoc, iCurNalFirstMb, iCurIdx,
|
||||
iFinalIdxNoInterLayerPred;
|
||||
|
||||
bool_t bMultiSliceFind = false;
|
||||
bool bMultiSliceFind = false;
|
||||
|
||||
iFinalIdxNoInterLayerPred = 0;
|
||||
iCurIdx = *pIdxNoInterLayerPred - 1;
|
||||
@ -1332,7 +1332,7 @@ void_t RefineIdxNoInterLayerPred (PAccessUnit pCurAu, int32_t* pIdxNoInterLayerP
|
||||
}
|
||||
}
|
||||
|
||||
bool_t CheckPocOfCurValidNalUnits (PAccessUnit pCurAu, int32_t pIdxNoInterLayerPred) {
|
||||
bool CheckPocOfCurValidNalUnits (PAccessUnit pCurAu, int32_t pIdxNoInterLayerPred) {
|
||||
int32_t iEndIdx = pCurAu->uiEndPos;
|
||||
int32_t iCurAuPoc =
|
||||
pCurAu->pNalUnitsList[pIdxNoInterLayerPred]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iPicOrderCntLsb;
|
||||
@ -1347,7 +1347,7 @@ bool_t CheckPocOfCurValidNalUnits (PAccessUnit pCurAu, int32_t pIdxNoInterLayerP
|
||||
return true;
|
||||
}
|
||||
|
||||
bool_t CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) {
|
||||
bool CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) {
|
||||
PAccessUnit pCurAu = pCtx->pAccessUnitList;
|
||||
const int32_t kiEndPos = pCurAu->uiEndPos;
|
||||
int32_t iIdxNoInterLayerPred = 0;
|
||||
@ -1391,7 +1391,7 @@ bool_t CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) {
|
||||
pCurAu->pNalUnitsList[pCurAu->uiEndPos]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iMbHeight << 4;
|
||||
} else { //P_SLICE
|
||||
//step 1: search uiDependencyId equal to pCtx->cur_seq_interval_target_dependency_id
|
||||
bool_t bGetDependId = false;
|
||||
bool bGetDependId = false;
|
||||
int32_t iIdxDependId = 0;
|
||||
|
||||
iIdxDependId = kiEndPos;
|
||||
@ -1406,7 +1406,7 @@ bool_t CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) {
|
||||
|
||||
//step 2: switch according to whether or not find the index of pNalUnit whose uiDependencyId equal to iCurSeqIntervalTargetDependId
|
||||
if (bGetDependId) { //get the index of pNalUnit whose uiDependencyId equal to iCurSeqIntervalTargetDependId
|
||||
bool_t bGetNoInterPredFront = false;
|
||||
bool bGetNoInterPredFront = false;
|
||||
//step 2a: search iNoInterLayerPredFlag [0....iIdxDependId]
|
||||
iIdxNoInterLayerPred = iIdxDependId;
|
||||
while (iIdxNoInterLayerPred >= 0) {
|
||||
@ -1471,7 +1471,7 @@ bool_t CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void_t CheckOnlyOneLayerInAu (PWelsDecoderContext pCtx) {
|
||||
void CheckOnlyOneLayerInAu (PWelsDecoderContext pCtx) {
|
||||
PAccessUnit pCurAu = pCtx->pAccessUnitList;
|
||||
|
||||
int32_t iEndIdx = pCurAu->uiEndPos;
|
||||
@ -1524,7 +1524,7 @@ int32_t WelsDecodeAccessUnitStart (PWelsDecoderContext pCtx) {
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
void_t WelsDecodeAccessUnitEnd (PWelsDecoderContext pCtx) {
|
||||
void WelsDecodeAccessUnitEnd (PWelsDecoderContext pCtx) {
|
||||
// uninitialize context of current access unit and rbsp buffer clean
|
||||
ResetCurrentAccessUnit (pCtx);
|
||||
}
|
||||
@ -1596,7 +1596,7 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void_t InitDqLayerInfo (PDqLayer pDqLayer, PLayerInfo pLayerInfo, PNalUnit pNalUnit, PPicture pPicDec) {
|
||||
static inline void InitDqLayerInfo (PDqLayer pDqLayer, PLayerInfo pLayerInfo, PNalUnit pNalUnit, PPicture pPicDec) {
|
||||
PNalUnitHeaderExt pNalHdrExt = &pNalUnit->sNalHeaderExt;
|
||||
PSliceHeaderExt pShExt = &pNalUnit->sNalData.sVclNal.sSliceHeaderExt;
|
||||
PSliceHeader pSh = &pShExt->sSliceHeader;
|
||||
@ -1634,7 +1634,7 @@ static inline void_t InitDqLayerInfo (PDqLayer pDqLayer, PLayerInfo pLayerInfo,
|
||||
pDqLayer->bUseRefBasePicFlag = pNalHdrExt->bUseRefBasePicFlag;
|
||||
}
|
||||
|
||||
void_t WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pSps, PPps pPps) {
|
||||
void WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pSps, PPps pPps) {
|
||||
SNalUnitHeader* pNalHdr = &pCurNal->sNalHeaderExt.sNalUnitHeader;
|
||||
PSliceHeader pSh = &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
|
||||
|
||||
@ -1650,7 +1650,7 @@ void_t WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps
|
||||
}
|
||||
}
|
||||
|
||||
int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, const bool_t kbFirstSlice, int32_t iPoc) {
|
||||
int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, const bool kbFirstSlice, int32_t iPoc) {
|
||||
int32_t iRet = ERR_NONE;
|
||||
if (kbFirstSlice)
|
||||
iRet = WelsInitRefList (pCtx, iPoc);
|
||||
@ -1661,7 +1661,7 @@ int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, const bo
|
||||
return iRet;
|
||||
}
|
||||
|
||||
void_t InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) {
|
||||
void InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) {
|
||||
if (NULL != pCtx && NULL != pCurDq) {
|
||||
pCurDq->pCsData[0] = pCtx->pCsListXchg[0][0];
|
||||
pCurDq->pCsData[1] = pCtx->pCsListXchg[0][1];
|
||||
@ -1691,7 +1691,7 @@ void_t InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) {
|
||||
|
||||
// added to reset state of parameter sets to waiting successive incoming IDR, 6/4/2010
|
||||
// It will be called in case packets lost/ broken and decoded failed at temporal level 0
|
||||
void_t ResetParameterSetsState (PWelsDecoderContext pCtx) {
|
||||
void ResetParameterSetsState (PWelsDecoderContext pCtx) {
|
||||
pCtx->bSpsExistAheadFlag = false;
|
||||
pCtx->bSubspsExistAheadFlag = false;
|
||||
pCtx->bPpsExistAheadFlag = false;
|
||||
@ -1718,7 +1718,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3
|
||||
int16_t iLastIdD = -1, iLastIdQ = -1;
|
||||
int16_t iCurrIdD = 0, iCurrIdQ = 0;
|
||||
uint8_t uiNalRefIdc = 0;
|
||||
bool_t bFreshSliceAvailable =
|
||||
bool bFreshSliceAvailable =
|
||||
true; // Another fresh slice comingup for given dq layer, for multiple slices in case of header parts of slices sometimes loss over error-prone channels, 8/14/2008
|
||||
PPicture pStoreBasePic = NULL;
|
||||
|
||||
@ -1774,7 +1774,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3
|
||||
* Loop decoding for slices (even FMO and/ multiple slices) within a dq layer
|
||||
*/
|
||||
while (iIdx <= iEndIdx) {
|
||||
BOOL_T bReconstructSlice;
|
||||
bool bReconstructSlice;
|
||||
iCurrIdQ = pNalCur->sNalHeaderExt.uiQualityId;
|
||||
iCurrIdD = pNalCur->sNalHeaderExt.uiDependencyId;
|
||||
pSh = &pNalCur->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
|
||||
@ -1823,7 +1823,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3
|
||||
InitDqLayerInfo (dq_cur, &pLayerInfo, pNalCur, pCtx->pDec);
|
||||
|
||||
if (!dq_cur->sLayerInfo.pSps->bGapsInFrameNumValueAllowedFlag) {
|
||||
const bool_t kbIdrFlag = dq_cur->sLayerInfo.sNalHeaderExt.bIdrFlag
|
||||
const bool kbIdrFlag = dq_cur->sLayerInfo.sNalHeaderExt.bIdrFlag
|
||||
|| (dq_cur->sLayerInfo.sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR);
|
||||
// Subclause 8.2.5.2 Decoding process for gaps in frame_num
|
||||
if (!kbIdrFlag &&
|
||||
|
@ -37,7 +37,7 @@
|
||||
namespace WelsDec {
|
||||
|
||||
// rewrite it (split into luma & chroma) that is helpful for mmx/sse2 optimization perform, 9/27/2009
|
||||
static inline void_t ExpandPictureLuma_c (uint8_t* pDst, const int32_t kiStride, const int32_t kiPicWidth,
|
||||
static inline void ExpandPictureLuma_c (uint8_t* pDst, const int32_t kiStride, const int32_t kiPicWidth,
|
||||
const int32_t kiPicHeight) {
|
||||
uint8_t* pTmp = pDst;
|
||||
uint8_t* pDstLastLine = pTmp + (kiPicHeight - 1) * kiStride;
|
||||
@ -77,7 +77,7 @@ static inline void_t ExpandPictureLuma_c (uint8_t* pDst, const int32_t kiStride,
|
||||
} while (i < kiPicHeight);
|
||||
}
|
||||
|
||||
static inline void_t ExpandPictureChroma_c (uint8_t* pDst, const int32_t kiStride, const int32_t kiPicWidth,
|
||||
static inline void ExpandPictureChroma_c (uint8_t* pDst, const int32_t kiStride, const int32_t kiPicWidth,
|
||||
const int32_t kiPicHeight) {
|
||||
uint8_t* pTmp = pDst;
|
||||
uint8_t* pDstLastLine = pTmp + (kiPicHeight - 1) * kiStride;
|
||||
@ -117,7 +117,7 @@ static inline void_t ExpandPictureChroma_c (uint8_t* pDst, const int32_t kiStrid
|
||||
} while (i < kiPicHeight);
|
||||
}
|
||||
|
||||
void_t InitExpandPictureFunc (SExpandPicFunc* pExpandPicFunc, const uint32_t kuiCpuFlags) {
|
||||
void InitExpandPictureFunc (SExpandPicFunc* pExpandPicFunc, const uint32_t kuiCpuFlags) {
|
||||
pExpandPicFunc->pExpandLumaPicture = ExpandPictureLuma_c;
|
||||
pExpandPicFunc->pExpandChromaPicture[0] = ExpandPictureChroma_c;
|
||||
pExpandPicFunc->pExpandChromaPicture[1] = ExpandPictureChroma_c;
|
||||
@ -131,7 +131,7 @@ void_t InitExpandPictureFunc (SExpandPicFunc* pExpandPicFunc, const uint32_t kui
|
||||
#endif//X86_ASM
|
||||
}
|
||||
|
||||
void_t ExpandReferencingPicture (PPicture pPic, PExpandPictureFunc pExpLuma, PExpandPictureFunc pExpChroma[2]) {
|
||||
void ExpandReferencingPicture (PPicture pPic, PExpandPictureFunc pExpLuma, PExpandPictureFunc pExpChroma[2]) {
|
||||
/*local variable*/
|
||||
uint8_t* pPicY = pPic->pData[0];
|
||||
uint8_t* pPicCb = pPic->pData[1];
|
||||
@ -144,7 +144,7 @@ void_t ExpandReferencingPicture (PPicture pPic, PExpandPictureFunc pExpLuma, PEx
|
||||
pExpLuma (pPicY, pPic->iLinesize[0], kiWidthY, kiHeightY);
|
||||
if (kiWidthUV >= 16) {
|
||||
// fix coding picture size as 16x16 issues 7/27/2010
|
||||
const bool_t kbChrAligned = /*(kiWidthUV >= 16) && */ ((kiWidthUV & 0x0F) == 0); // chroma planes: (16+kiWidthUV) & 15
|
||||
const bool kbChrAligned = /*(kiWidthUV >= 16) && */ ((kiWidthUV & 0x0F) == 0); // chroma planes: (16+kiWidthUV) & 15
|
||||
pExpChroma[kbChrAligned] (pPicCb, pPic->iLinesize[1], kiWidthUV, kiHeightUV);
|
||||
pExpChroma[kbChrAligned] (pPicCr, pPic->iLinesize[2], kiWidthUV, kiHeightUV);
|
||||
} else {
|
||||
|
@ -119,7 +119,7 @@ static inline int32_t FmoGenerateSliceGroup (PFmo pFmo, const PPps kpPps, const
|
||||
const int32_t kiMbHeight) {
|
||||
int32_t iNumMb = 0;
|
||||
int32_t iErr = 0;
|
||||
bool_t bResolutionChanged = false;
|
||||
bool bResolutionChanged = false;
|
||||
|
||||
// the cases we would not like
|
||||
WELS_VERIFY_RETURN_IF (1, (NULL == pFmo || NULL == kpPps))
|
||||
@ -200,7 +200,7 @@ int32_t InitFmo (PFmo pFmo, PPps pPps, const int32_t kiMbWidth, const int32_t ki
|
||||
*
|
||||
* \return NONE
|
||||
*/
|
||||
void_t UninitFmoList (PFmo pFmo, const int32_t kiCnt, const int32_t kiAvail) {
|
||||
void UninitFmoList (PFmo pFmo, const int32_t kiCnt, const int32_t kiAvail) {
|
||||
PFmo pIter = pFmo;
|
||||
int32_t i = 0;
|
||||
int32_t iFreeNodes = 0;
|
||||
@ -238,7 +238,7 @@ void_t UninitFmoList (PFmo pFmo, const int32_t kiCnt, const int32_t kiAvail) {
|
||||
*
|
||||
* \return true - changed or not initialized yet; false - not change at all
|
||||
*/
|
||||
bool_t FmoParamSetsChanged (PFmo pFmo, const int32_t kiCountNumMb, const int32_t kiSliceGroupType,
|
||||
bool FmoParamSetsChanged (PFmo pFmo, const int32_t kiCountNumMb, const int32_t kiSliceGroupType,
|
||||
const int32_t kiSliceGroupCount) {
|
||||
WELS_VERIFY_RETURN_IF (false, (NULL == pFmo))
|
||||
|
||||
@ -258,7 +258,7 @@ bool_t FmoParamSetsChanged (PFmo pFmo, const int32_t kiCountNumMb, const int32_t
|
||||
*
|
||||
* \return true - update/insert successfully; false - failed;
|
||||
*/
|
||||
bool_t FmoParamUpdate (PFmo pFmo, PSps pSps, PPps pPps, int32_t* pActiveFmoNum) {
|
||||
bool FmoParamUpdate (PFmo pFmo, PSps pSps, PPps pPps, int32_t* pActiveFmoNum) {
|
||||
const uint32_t kuiMbWidth = pSps->iMbWidth;
|
||||
const uint32_t kuiMbHeight = pSps->iMbHeight;
|
||||
|
||||
@ -330,4 +330,4 @@ MB_XY_T FmoNextMb (PFmo pFmo, const MB_XY_T kiMbXy) {
|
||||
return iNextMb;
|
||||
}
|
||||
|
||||
} // namespace WelsDec
|
||||
} // namespace WelsDec
|
||||
|
@ -51,7 +51,7 @@ namespace WelsDec {
|
||||
#define I8x8_COUNT 8
|
||||
#define I16x16_COUNT 16
|
||||
|
||||
void_t WelsI4x4LumaPredV_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredV_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const uint32_t kuiVal = LD32 (pPred - kiStride);
|
||||
|
||||
ST32 (pPred , kuiVal);
|
||||
@ -60,7 +60,7 @@ void_t WelsI4x4LumaPredV_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
ST32 (pPred + (kiStride << 1) + kiStride , kuiVal);
|
||||
}
|
||||
|
||||
void_t WelsI4x4LumaPredH_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredH_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride2 + kiStride;
|
||||
const uint32_t kuiL0 = 0x01010101U * pPred[-1 ];
|
||||
@ -74,7 +74,7 @@ void_t WelsI4x4LumaPredH_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
ST32 (pPred + kiStride3, kuiL3);
|
||||
}
|
||||
|
||||
void_t WelsI4x4LumaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride2 + kiStride;
|
||||
const uint8_t kuiMean = (pPred[-1] + pPred[-1 + kiStride] + pPred[-1 + kiStride2] + pPred[-1 + kiStride3] +
|
||||
@ -87,7 +87,7 @@ void_t WelsI4x4LumaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
ST32 (pPred + kiStride3, kuiMean32);
|
||||
}
|
||||
|
||||
void_t WelsI4x4LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride2 + kiStride;
|
||||
const uint8_t kuiMean = (pPred[-1] + pPred[-1 + kiStride] + pPred[-1 + kiStride2] + pPred[-1 + kiStride3] + 2) >> 2;
|
||||
@ -99,7 +99,7 @@ void_t WelsI4x4LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
ST32 (pPred + kiStride3, kuiMean32);
|
||||
}
|
||||
|
||||
void_t 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 kiStride3 = kiStride2 + kiStride;
|
||||
const uint8_t kuiMean = (pPred[-kiStride] + pPred[-kiStride + 1] + pPred[-kiStride + 2] + pPred[-kiStride + 3] + 2) >>
|
||||
@ -112,7 +112,7 @@ void_t WelsI4x4LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
ST32 (pPred + kiStride3, kuiMean32);
|
||||
}
|
||||
|
||||
void_t WelsI4x4LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const uint32_t kuiDC32 = 0x80808080U;
|
||||
|
||||
ST32 (pPred , kuiDC32);
|
||||
@ -122,7 +122,7 @@ void_t WelsI4x4LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
}
|
||||
|
||||
/*down pLeft*/
|
||||
void_t WelsI4x4LumaPredDDL_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredDDL_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride + kiStride2;
|
||||
/*get pTop*/
|
||||
@ -151,7 +151,7 @@ void_t WelsI4x4LumaPredDDL_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
}
|
||||
|
||||
/*down pLeft*/
|
||||
void_t WelsI4x4LumaPredDDLTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredDDLTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride + kiStride2;
|
||||
/*get pTop*/
|
||||
@ -178,7 +178,7 @@ void_t WelsI4x4LumaPredDDLTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
|
||||
|
||||
/*down right*/
|
||||
void_t WelsI4x4LumaPredDDR_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredDDR_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride + kiStride2;
|
||||
uint8_t* ptopleft = &pPred[- (kiStride + 1)];
|
||||
@ -218,7 +218,7 @@ void_t WelsI4x4LumaPredDDR_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
|
||||
|
||||
/*vertical pLeft*/
|
||||
void_t WelsI4x4LumaPredVL_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredVL_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride + kiStride2;
|
||||
uint8_t* ptopleft = &pPred[- (kiStride + 1)];
|
||||
@ -255,7 +255,7 @@ void_t WelsI4x4LumaPredVL_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
}
|
||||
|
||||
/*vertical pLeft*/
|
||||
void_t WelsI4x4LumaPredVLTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredVLTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride + kiStride2;
|
||||
uint8_t* ptopleft = &pPred[- (kiStride + 1)];
|
||||
@ -286,7 +286,7 @@ void_t WelsI4x4LumaPredVLTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
|
||||
|
||||
/*vertical right*/
|
||||
void_t WelsI4x4LumaPredVR_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredVR_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride + kiStride2;
|
||||
const uint8_t kuiLT = pPred[-kiStride - 1];
|
||||
@ -317,7 +317,7 @@ void_t WelsI4x4LumaPredVR_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
}
|
||||
|
||||
/*horizontal up*/
|
||||
void_t WelsI4x4LumaPredHU_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredHU_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride + kiStride2;
|
||||
/*get pLeft*/
|
||||
@ -343,7 +343,7 @@ void_t WelsI4x4LumaPredHU_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
}
|
||||
|
||||
/*horizontal down*/
|
||||
void_t WelsI4x4LumaPredHD_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI4x4LumaPredHD_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride3 = kiStride + kiStride2;
|
||||
const uint8_t kuiLT = pPred[- (kiStride + 1)];
|
||||
@ -380,7 +380,7 @@ void_t WelsI4x4LumaPredHD_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
ST32 (pPred + kiStride3, LD32 (kuiList));
|
||||
}
|
||||
|
||||
void_t WelsIChromaPredV_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsIChromaPredV_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const uint64_t kuiVal64 = LD64 (&pPred[-kiStride]);
|
||||
const int32_t kiStride2 = kiStride << 1;
|
||||
const int32_t kiStride4 = kiStride2 << 1;
|
||||
@ -395,7 +395,7 @@ void_t WelsIChromaPredV_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
ST64 (pPred + (kiStride << 3) - kiStride , kuiVal64);
|
||||
}
|
||||
|
||||
void_t WelsIChromaPredH_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsIChromaPredH_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t iTmp = (kiStride << 3) - kiStride;
|
||||
uint8_t i = 7;
|
||||
|
||||
@ -410,7 +410,7 @@ void_t WelsIChromaPredH_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
}
|
||||
|
||||
|
||||
void_t WelsIChromaPredPlane_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsIChromaPredPlane_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t a = 0, b = 0, c = 0, H = 0, V = 0;
|
||||
int32_t i, j;
|
||||
uint8_t* pTop = &pPred[-kiStride];
|
||||
@ -436,7 +436,7 @@ void_t WelsIChromaPredPlane_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
}
|
||||
|
||||
|
||||
void_t WelsIChromaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsIChromaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiL1 = kiStride - 1;
|
||||
const int32_t kiL2 = kiL1 + kiStride;
|
||||
const int32_t kiL3 = kiL2 + kiStride;
|
||||
@ -467,7 +467,7 @@ void_t WelsIChromaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
ST64 (pPred + kiL7 + 1, kuiDN64);
|
||||
}
|
||||
|
||||
void_t WelsIChromaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsIChromaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const int32_t kiL1 = -1 + kiStride;
|
||||
const int32_t kiL2 = kiL1 + kiStride;
|
||||
const int32_t kiL3 = kiL2 + kiStride;
|
||||
@ -491,7 +491,7 @@ void_t WelsIChromaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
ST64 (pPred + kiL7 + 1, kuiDN64);
|
||||
}
|
||||
|
||||
void_t WelsIChromaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsIChromaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t iTmp = (kiStride << 3) - kiStride;
|
||||
/*caculate the kMean value*/
|
||||
const uint8_t kuiM1 = (pPred[-kiStride] + pPred[1 - kiStride] + pPred[2 - kiStride] + pPred[3 - kiStride] + 2) >> 2;
|
||||
@ -508,7 +508,7 @@ void_t WelsIChromaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
} while (i-- > 0);
|
||||
}
|
||||
|
||||
void_t WelsIChromaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsIChromaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t iTmp = (kiStride << 3) - kiStride;
|
||||
const uint64_t kuiDC64 = 0x8080808080808080ULL;
|
||||
uint8_t i = 7;
|
||||
@ -520,7 +520,7 @@ void_t WelsIChromaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
} while (i-- > 0);
|
||||
}
|
||||
|
||||
void_t WelsI16x16LumaPredV_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI16x16LumaPredV_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t iTmp = (kiStride << 4) - kiStride;
|
||||
const uint64_t kuiTop1 = LD64 (pPred - kiStride);
|
||||
const uint64_t kuiTop2 = LD64 (pPred - kiStride + 8);
|
||||
@ -534,7 +534,7 @@ void_t WelsI16x16LumaPredV_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
} while (i-- > 0);
|
||||
}
|
||||
|
||||
void_t WelsI16x16LumaPredH_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI16x16LumaPredH_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t iTmp = (kiStride << 4) - kiStride;
|
||||
uint8_t i = 15;
|
||||
|
||||
@ -549,7 +549,7 @@ void_t WelsI16x16LumaPredH_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
} while (i-- > 0);
|
||||
}
|
||||
|
||||
void_t WelsI16x16LumaPredPlane_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI16x16LumaPredPlane_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t a = 0, b = 0, c = 0, H = 0, V = 0;
|
||||
int32_t i, j;
|
||||
uint8_t* pTop = &pPred[-kiStride];
|
||||
@ -574,7 +574,7 @@ void_t WelsI16x16LumaPredPlane_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
}
|
||||
}
|
||||
|
||||
void_t WelsI16x16LumaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI16x16LumaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t iTmp = (kiStride << 4) - kiStride;
|
||||
int32_t iSum = 0;
|
||||
uint8_t i = 15;
|
||||
@ -596,7 +596,7 @@ void_t WelsI16x16LumaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
}
|
||||
|
||||
|
||||
void_t WelsI16x16LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI16x16LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t iTmp = (kiStride << 4) - kiStride;
|
||||
int32_t iSum = 0;
|
||||
uint8_t i = 15;
|
||||
@ -615,7 +615,7 @@ void_t WelsI16x16LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
} while (i-- > 0);
|
||||
}
|
||||
|
||||
void_t WelsI16x16LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI16x16LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
int32_t iTmp = (kiStride << 4) - kiStride;
|
||||
int32_t iSum = 0;
|
||||
uint64_t uiMean64 = 0;
|
||||
@ -640,7 +640,7 @@ void_t WelsI16x16LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
} while (i-- > 0);
|
||||
}
|
||||
|
||||
void_t WelsI16x16LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
void WelsI16x16LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
const uint64_t kuiDC64 = 0x8080808080808080ULL;
|
||||
int32_t iTmp = (kiStride << 4) - kiStride;
|
||||
uint8_t i = 15;
|
||||
@ -653,4 +653,4 @@ void_t WelsI16x16LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
|
||||
} while (i-- > 0);
|
||||
}
|
||||
|
||||
} // namespace WelsDec
|
||||
} // namespace WelsDec
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
static void_t SetUnRef (PPicture pRef) {
|
||||
static void SetUnRef (PPicture pRef) {
|
||||
if (NULL != pRef) {
|
||||
pRef->bUsedAsRef = false;
|
||||
pRef->bIsLongRef = false;
|
||||
@ -63,7 +63,7 @@ static void_t SetUnRef (PPicture pRef) {
|
||||
// 1.sps arrived that is new sequence starting
|
||||
// 2.IDR NAL i.e. 1st layer in IDR AU
|
||||
|
||||
void_t WelsResetRefPic (PWelsDecoderContext pCtx) {
|
||||
void WelsResetRefPic (PWelsDecoderContext pCtx) {
|
||||
int32_t i = 0;
|
||||
PRefPic pRefPic = &pCtx->sRefPic;
|
||||
pCtx->sRefPic.uiLongRefCount[0] = pCtx->sRefPic.uiShortRefCount[0] = 0;
|
||||
@ -92,7 +92,7 @@ void_t WelsResetRefPic (PWelsDecoderContext pCtx) {
|
||||
*/
|
||||
int32_t WelsInitRefList (PWelsDecoderContext pCtx, int32_t iPoc) {
|
||||
int32_t i, j, iCount = 0;
|
||||
const bool_t kbUseRefBasePicFlag = pCtx->pCurDqLayer->bUseRefBasePicFlag;
|
||||
const bool kbUseRefBasePicFlag = pCtx->pCurDqLayer->bUseRefBasePicFlag;
|
||||
PPicture* ppShoreRefList = pCtx->sRefPic.pShortRefList[LIST_0];
|
||||
PPicture* ppLongRefList = pCtx->sRefPic.pLongRefList[LIST_0];
|
||||
memset (pCtx->sRefPic.pRefList[LIST_0], 0, MAX_REF_PIC_COUNT * sizeof (PPicture));
|
||||
@ -215,12 +215,12 @@ int32_t WelsReorderRefList (PWelsDecoderContext pCtx) {
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
int32_t WelsMarkAsRef (PWelsDecoderContext pCtx, const bool_t kbRefBaseMarkingFlag) {
|
||||
int32_t WelsMarkAsRef (PWelsDecoderContext pCtx, const bool kbRefBaseMarkingFlag) {
|
||||
PRefPic pRefPic = &pCtx->sRefPic;
|
||||
PRefPicMarking pRefPicMarking = pCtx->pCurDqLayer->pRefPicMarking;
|
||||
PRefBasePicMarking pRefPicBaseMarking = pCtx->pCurDqLayer->pRefPicBaseMarking;
|
||||
PAccessUnit pCurAU = pCtx->pAccessUnitList;
|
||||
bool_t bIsIDRAU = FALSE;
|
||||
bool bIsIDRAU = false;
|
||||
uint32_t j;
|
||||
|
||||
int32_t iRet = ERR_NONE;
|
||||
@ -228,7 +228,7 @@ int32_t WelsMarkAsRef (PWelsDecoderContext pCtx, const bool_t kbRefBaseMarkingFl
|
||||
return ERR_INFO_INVALID_MMCO_REF_NUM_NOT_ENOUGH;
|
||||
}
|
||||
|
||||
pCtx->pDec->bUsedAsRef = TRUE;
|
||||
pCtx->pDec->bUsedAsRef = true;
|
||||
pCtx->pDec->uiQualityId = pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.uiQualityId;
|
||||
pCtx->pDec->uiTemporalId = pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.uiTemporalId;
|
||||
pCtx->pDec->bRefBaseFlag = kbRefBaseMarkingFlag;
|
||||
@ -236,7 +236,7 @@ int32_t WelsMarkAsRef (PWelsDecoderContext pCtx, const bool_t kbRefBaseMarkingFl
|
||||
for (j = pCurAU->uiStartPos; j <= pCurAU->uiEndPos; j++) {
|
||||
if (pCurAU->pNalUnitsList[j]->sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR
|
||||
|| pCurAU->pNalUnitsList[j]->sNalHeaderExt.bIdrFlag) {
|
||||
bIsIDRAU = TRUE;
|
||||
bIsIDRAU = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -290,7 +290,7 @@ static int32_t MMCOBase (PWelsDecoderContext pCtx, PRefBasePicMarking pRefPicBas
|
||||
if (uiMmcoType > MMCO_LONG2UNUSED) {
|
||||
return ERR_INFO_INVALID_MMCO_OPCODE_BASE;
|
||||
}
|
||||
iRet = MMCOProcess (pCtx, uiMmcoType, TRUE, iShortFrameNum, uiLongTermPicNum, 0, 0);
|
||||
iRet = MMCOProcess (pCtx, uiMmcoType, true, iShortFrameNum, uiLongTermPicNum, 0, 0);
|
||||
|
||||
if (iRet != ERR_NONE) {
|
||||
return iRet;
|
||||
@ -314,7 +314,7 @@ static int32_t MMCO (PWelsDecoderContext pCtx, PRefPicMarking pRefPicMarking) {
|
||||
if (uiMmcoType > MMCO_LONG) {
|
||||
return ERR_INFO_INVALID_MMCO_OPCODE_BASE;
|
||||
}
|
||||
iRet = MMCOProcess (pCtx, uiMmcoType, FALSE, iShortFrameNum, uiLongTermPicNum, iLongTermFrameIdx, iMaxLongTermFrameIdx);
|
||||
iRet = MMCOProcess (pCtx, uiMmcoType, false, iShortFrameNum, uiLongTermPicNum, iLongTermFrameIdx, iMaxLongTermFrameIdx);
|
||||
if (iRet != ERR_NONE) {
|
||||
return iRet;
|
||||
}
|
||||
@ -322,7 +322,7 @@ static int32_t MMCO (PWelsDecoderContext pCtx, PRefPicMarking pRefPicMarking) {
|
||||
|
||||
return ERR_NONE;
|
||||
}
|
||||
static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, bool_t bRefBasePic,
|
||||
static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, bool bRefBasePic,
|
||||
int32_t iShortFrameNum, uint32_t uiLongTermPicNum , int32_t iLongTermFrameIdx, int32_t iMaxLongTermFrameIdx) {
|
||||
PRefPic pRefPic = &pCtx->sRefPic;
|
||||
PPicture pPic = NULL;
|
||||
@ -450,8 +450,8 @@ static PPicture WelsDelLongFromList (PRefPic pRefPic, uint32_t uiLongTermFrameId
|
||||
if (((eRemoveFlag == REMOVE_TARGET) && ! (pPic->bRefBaseFlag)) || ((eRemoveFlag == REMOVE_BASE)
|
||||
&& pPic->bRefBaseFlag)) {
|
||||
int32_t iMoveSize = pRefPic->uiLongRefCount[LIST_0] - i - 1;
|
||||
pPic->bUsedAsRef = FALSE;
|
||||
pPic->bIsLongRef = FALSE;
|
||||
pPic->bUsedAsRef = false;
|
||||
pPic->bIsLongRef = false;
|
||||
if (iMoveSize > 0) {
|
||||
memmove (&pRefPic->pLongRefList[LIST_0][i], &pRefPic->pLongRefList[LIST_0][i + 1],
|
||||
iMoveSize * sizeof (PPicture)); //confirmed_safe_unsafe_usage
|
||||
@ -474,8 +474,8 @@ static PPicture WelsDelLongFromListSetUnref (PRefPic pRefPic, uint32_t uiLongTer
|
||||
}
|
||||
|
||||
static int32_t AddShortTermToList (PRefPic pRefPic, PPicture pPic) {
|
||||
pPic->bUsedAsRef = TRUE;
|
||||
pPic->bIsLongRef = FALSE;
|
||||
pPic->bUsedAsRef = true;
|
||||
pPic->bIsLongRef = false;
|
||||
pPic->iLongTermFrameIdx = -1;
|
||||
if (pRefPic->uiShortRefCount[LIST_0] > 0) {
|
||||
memmove (&pRefPic->pShortRefList[LIST_0][1], &pRefPic->pShortRefList[LIST_0][0],
|
||||
@ -489,8 +489,8 @@ static int32_t AddShortTermToList (PRefPic pRefPic, PPicture pPic) {
|
||||
static int32_t AddLongTermToList (PRefPic pRefPic, PPicture pPic, int32_t iLongTermFrameIdx) {
|
||||
int32_t i = 0;
|
||||
|
||||
pPic->bUsedAsRef = TRUE;
|
||||
pPic->bIsLongRef = TRUE;
|
||||
pPic->bUsedAsRef = true;
|
||||
pPic->bIsLongRef = true;
|
||||
pPic->iLongTermFrameIdx = iLongTermFrameIdx;
|
||||
if (pRefPic->uiLongRefCount[LIST_0] == 0) {
|
||||
pRefPic->pLongRefList[LIST_0][pRefPic->uiLongRefCount[LIST_0]] = pPic;
|
||||
@ -551,4 +551,4 @@ static int32_t MarkAsLongTerm (PRefPic pRefPic, int32_t iFrameNum, int32_t iLong
|
||||
return iRet;
|
||||
}
|
||||
|
||||
} // namespace WelsDec
|
||||
} // namespace WelsDec
|
||||
|
@ -84,13 +84,13 @@ static const uint8_t g_kuiABCD[8][8][4] = { //g_kA[dy][dx], g_kB[dy][dx], g_kC[d
|
||||
}
|
||||
};
|
||||
|
||||
typedef void_t (*PWelsMcWidthHeightFunc) (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
typedef void (*PWelsMcWidthHeightFunc) (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight);
|
||||
|
||||
//***************************************************************************//
|
||||
// C code implementation //
|
||||
//***************************************************************************//
|
||||
static inline void_t McCopyWidthEq2_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McCopyWidthEq2_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iHeight) {
|
||||
int32_t i;
|
||||
for (i = 0; i < iHeight; i++) { // iWidth == 2 only for chroma
|
||||
@ -100,7 +100,7 @@ static inline void_t McCopyWidthEq2_c (uint8_t* pSrc, int32_t iSrcStride, uint8_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void_t McCopyWidthEq4_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McCopyWidthEq4_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iHeight) {
|
||||
int32_t i;
|
||||
for (i = 0; i < iHeight; i++) {
|
||||
@ -110,7 +110,7 @@ static inline void_t McCopyWidthEq4_c (uint8_t* pSrc, int32_t iSrcStride, uint8_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void_t McCopyWidthEq8_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McCopyWidthEq8_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iHeight) {
|
||||
int32_t i;
|
||||
for (i = 0; i < iHeight; i++) {
|
||||
@ -120,7 +120,7 @@ static inline void_t McCopyWidthEq8_c (uint8_t* pSrc, int32_t iSrcStride, uint8_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void_t McCopyWidthEq16_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McCopyWidthEq16_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iHeight) {
|
||||
int32_t i;
|
||||
for (i = 0; i < iHeight; i++) {
|
||||
@ -152,7 +152,7 @@ static inline int32_t FilterInput8bitWithStride_c (uint8_t* pSrc, const int32_t
|
||||
return (kuiPix05 - ((kuiPix14 << 2) + kuiPix14) + (kuiPix23 << 4) + (kuiPix23 << 2));
|
||||
}
|
||||
|
||||
static inline void_t PixelAvg_c (uint8_t* pDst, int32_t iDstStride, uint8_t* pSrcA, int32_t iSrcAStride,
|
||||
static inline void PixelAvg_c (uint8_t* pDst, int32_t iDstStride, uint8_t* pSrcA, int32_t iSrcAStride,
|
||||
uint8_t* pSrcB, int32_t iSrcBStride, int32_t iWidth, int32_t iHeight) {
|
||||
int32_t i, j;
|
||||
for (i = 0; i < iHeight; i++) {
|
||||
@ -164,7 +164,7 @@ static inline void_t PixelAvg_c (uint8_t* pDst, int32_t iDstStride, uint8_t* pSr
|
||||
pSrcB += iSrcBStride;
|
||||
}
|
||||
}
|
||||
static inline void_t McCopy_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McCopy_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
if (iWidth == 16)
|
||||
McCopyWidthEq16_c (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
@ -176,7 +176,7 @@ static inline void_t McCopy_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst,
|
||||
McCopyWidthEq2_c (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
}
|
||||
|
||||
static inline void_t McHorVer20_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer20_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
int32_t i, j;
|
||||
for (i = 0; i < iHeight; i++) {
|
||||
@ -188,7 +188,7 @@ static inline void_t McHorVer20_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
}
|
||||
}
|
||||
|
||||
static inline void_t McHorVer02_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer02_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
int32_t i, j;
|
||||
for (i = 0; i < iHeight; i++) {
|
||||
@ -200,7 +200,7 @@ static inline void_t McHorVer02_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
}
|
||||
}
|
||||
|
||||
static inline void_t McHorVer22_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer22_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
int16_t iTmp[16 + 5] = {0}; //16
|
||||
int32_t i, j, k;
|
||||
@ -218,25 +218,25 @@ static inline void_t McHorVer22_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
}
|
||||
|
||||
/////////////////////luma MC//////////////////////////
|
||||
static inline void_t McHorVer01_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer01_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiTmp[256] = { 0 };
|
||||
McHorVer02_c (pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer03_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer03_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiTmp[256] = { 0 };
|
||||
McHorVer02_c (pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, pSrc + iSrcStride, iSrcStride, uiTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer10_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer10_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiTmp[256] = { 0 };
|
||||
McHorVer20_c (pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer11_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer11_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiHorTmp[256] = { 0 };
|
||||
uint8_t uiVerTmp[256] = { 0 };
|
||||
@ -244,7 +244,7 @@ static inline void_t McHorVer11_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
McHorVer02_c (pSrc, iSrcStride, uiVerTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer12_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer12_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiVerTmp[256] = { 0 };
|
||||
uint8_t uiCtrTmp[256] = { 0 };
|
||||
@ -252,7 +252,7 @@ static inline void_t McHorVer12_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, uiVerTmp, 16, uiCtrTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer13_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer13_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiHorTmp[256] = { 0 };
|
||||
uint8_t uiVerTmp[256] = { 0 };
|
||||
@ -260,7 +260,7 @@ static inline void_t McHorVer13_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
McHorVer02_c (pSrc, iSrcStride, uiVerTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer21_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer21_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiHorTmp[256] = { 0 };
|
||||
uint8_t uiCtrTmp[256] = { 0 };
|
||||
@ -268,7 +268,7 @@ static inline void_t McHorVer21_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiCtrTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer23_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer23_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiHorTmp[256] = { 0 };
|
||||
uint8_t uiCtrTmp[256] = { 0 };
|
||||
@ -276,13 +276,13 @@ static inline void_t McHorVer23_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiCtrTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer30_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer30_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiHorTmp[256] = { 0 };
|
||||
McHorVer20_c (pSrc, iSrcStride, uiHorTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, pSrc + 1, iSrcStride, uiHorTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer31_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer31_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiHorTmp[256] = { 0 };
|
||||
uint8_t uiVerTmp[256] = { 0 };
|
||||
@ -290,7 +290,7 @@ static inline void_t McHorVer31_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
McHorVer02_c (pSrc + 1, iSrcStride, uiVerTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer32_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer32_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiVerTmp[256] = { 0 };
|
||||
uint8_t uiCtrTmp[256] = { 0 };
|
||||
@ -298,7 +298,7 @@ static inline void_t McHorVer32_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight);
|
||||
PixelAvg_c (pDst, iDstStride, uiVerTmp, 16, uiCtrTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
static inline void_t McHorVer33_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McHorVer33_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
uint8_t uiHorTmp[256] = { 0 };
|
||||
uint8_t uiVerTmp[256] = { 0 };
|
||||
@ -307,7 +307,7 @@ static inline void_t McHorVer33_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
||||
PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight);
|
||||
}
|
||||
|
||||
void_t McLuma_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
void McLuma_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight)
|
||||
//pSrc has been added the offset of mv
|
||||
{
|
||||
@ -321,7 +321,7 @@ void_t McLuma_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstS
|
||||
pWelsMcFunc[iMvX & 0x03][iMvY & 0x03] (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
|
||||
}
|
||||
|
||||
static inline void_t McChromaWithFragMv_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McChromaWithFragMv_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) {
|
||||
int32_t i, j;
|
||||
int32_t iA, iB, iC, iD;
|
||||
@ -341,7 +341,7 @@ static inline void_t McChromaWithFragMv_c (uint8_t* pSrc, int32_t iSrcStride, ui
|
||||
}
|
||||
}
|
||||
|
||||
void_t McChroma_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
void McChroma_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight)
|
||||
//pSrc has been added the offset of mv
|
||||
{
|
||||
@ -357,26 +357,26 @@ void_t McChroma_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDs
|
||||
//***************************************************************************//
|
||||
// SSE2 implement //
|
||||
//***************************************************************************//
|
||||
static inline void_t McHorVer22WidthEq8_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer22WidthEq8_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_2D (int16_t, iTap, 21, 8, 16)
|
||||
McHorVer22Width8HorFirst_sse2 (pSrc - 2, iSrcStride, (uint8_t*)iTap, 16, iHeight + 5);
|
||||
McHorVer22Width8VerLastAlign_sse2 ((uint8_t*)iTap, 16, pDst, iDstStride, 8, iHeight);
|
||||
}
|
||||
|
||||
static inline void_t McHorVer02WidthEq16_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer02WidthEq16_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iHeight) {
|
||||
McHorVer02WidthEq8_sse2 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
McHorVer02WidthEq8_sse2 (&pSrc[8], iSrcStride, &pDst[8], iDstStride, iHeight);
|
||||
}
|
||||
|
||||
static inline void_t McHorVer22WidthEq16_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer22WidthEq16_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iHeight) {
|
||||
McHorVer22WidthEq8_sse2 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
McHorVer22WidthEq8_sse2 (&pSrc[8], iSrcStride, &pDst[8], iDstStride, iHeight);
|
||||
}
|
||||
|
||||
static inline void_t McCopy_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
static inline void McCopy_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth,
|
||||
int32_t iHeight) {
|
||||
if (iWidth == 16)
|
||||
McCopyWidthEq16_sse2 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
@ -388,7 +388,7 @@ static inline void_t McCopy_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pD
|
||||
McCopyWidthEq2_c (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
}
|
||||
|
||||
static inline void_t McHorVer20_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer20_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
if (iWidth == 16)
|
||||
McHorVer20WidthEq16_sse2 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
@ -398,7 +398,7 @@ static inline void_t McHorVer20_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
McHorVer20WidthEq4_mmx (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
}
|
||||
|
||||
static inline void_t McHorVer02_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer02_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
if (iWidth == 16)
|
||||
McHorVer02WidthEq16_sse2 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
@ -408,7 +408,7 @@ static inline void_t McHorVer02_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
McHorVer02_c (pSrc, iSrcStride, pDst, iDstStride, 4, iHeight);
|
||||
}
|
||||
|
||||
static inline void_t McHorVer22_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer22_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
if (iWidth == 16)
|
||||
McHorVer22WidthEq16_sse2 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||
@ -418,7 +418,7 @@ static inline void_t McHorVer22_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
McHorVer22_c (pSrc, iSrcStride, pDst, iDstStride, 4, iHeight);
|
||||
}
|
||||
|
||||
static inline void_t McHorVer01_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer01_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pTmp, 256, 16);
|
||||
if (iWidth == 16) {
|
||||
@ -432,7 +432,7 @@ static inline void_t McHorVer01_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pSrc, iSrcStride, pTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer03_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer03_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pTmp, 256, 16);
|
||||
if (iWidth == 16) {
|
||||
@ -446,7 +446,7 @@ static inline void_t McHorVer03_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pSrc + iSrcStride, iSrcStride, pTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer10_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer10_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pTmp, 256, 16);
|
||||
if (iWidth == 16) {
|
||||
@ -460,7 +460,7 @@ static inline void_t McHorVer10_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pSrc, iSrcStride, pTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer11_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer11_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pHorTmp, 256, 16);
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pVerTmp, 256, 16);
|
||||
@ -478,7 +478,7 @@ static inline void_t McHorVer11_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pHorTmp, 16, pVerTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer12_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer12_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pVerTmp, 256, 16);
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pCtrTmp, 256, 16);
|
||||
@ -496,7 +496,7 @@ static inline void_t McHorVer12_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pVerTmp, 16, pCtrTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer13_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer13_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pHorTmp, 256, 16);
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pVerTmp, 256, 16);
|
||||
@ -514,7 +514,7 @@ static inline void_t McHorVer13_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pHorTmp, 16, pVerTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer21_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer21_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pHorTmp, 256, 16);
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pCtrTmp, 256, 16);
|
||||
@ -532,7 +532,7 @@ static inline void_t McHorVer21_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pHorTmp, 16, pCtrTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer23_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer23_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pHorTmp, 256, 16);
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pCtrTmp, 256, 16);
|
||||
@ -550,7 +550,7 @@ static inline void_t McHorVer23_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pHorTmp, 16, pCtrTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer30_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer30_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pHorTmp, 256, 16);
|
||||
if (iWidth == 16) {
|
||||
@ -564,7 +564,7 @@ static inline void_t McHorVer30_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pSrc + 1, iSrcStride, pHorTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer31_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer31_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pHorTmp, 256, 16);
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pVerTmp, 256, 16);
|
||||
@ -582,7 +582,7 @@ static inline void_t McHorVer31_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pHorTmp, 16, pVerTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer32_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer32_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pVerTmp, 256, 16);
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pCtrTmp, 256, 16);
|
||||
@ -600,7 +600,7 @@ static inline void_t McHorVer32_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
PixelAvgWidthEq4_mmx (pDst, iDstStride, pVerTmp, 16, pCtrTmp, 16, iHeight);
|
||||
}
|
||||
}
|
||||
static inline void_t McHorVer33_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
static inline void McHorVer33_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int32_t iWidth, int32_t iHeight) {
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pHorTmp, 256, 16);
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, pVerTmp, 256, 16);
|
||||
@ -619,7 +619,7 @@ static inline void_t McHorVer33_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t
|
||||
}
|
||||
}
|
||||
|
||||
void_t McLuma_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
void McLuma_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight)
|
||||
//pSrc has been added the offset of mv
|
||||
{
|
||||
@ -633,7 +633,7 @@ void_t McLuma_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iD
|
||||
pWelsMcFunc[iMvX & 0x03][iMvY & 0x03] (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
|
||||
}
|
||||
|
||||
void_t McChroma_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
void McChroma_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||
int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) {
|
||||
static const PMcChromaWidthExtFunc kpMcChromaWidthFuncs[2] = {
|
||||
McChromaWidthEq4_mmx,
|
||||
@ -654,7 +654,7 @@ void_t McChroma_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t
|
||||
|
||||
#endif //X86_ASM
|
||||
|
||||
void_t InitMcFunc (SMcFunc* pMcFunc, int32_t iCpu) {
|
||||
void InitMcFunc (SMcFunc* pMcFunc, int32_t iCpu) {
|
||||
pMcFunc->pMcLumaFunc = McLuma_c;
|
||||
pMcFunc->pMcChromaFunc = McChroma_c;
|
||||
|
||||
|
@ -44,8 +44,8 @@ int32_t iCountMalloc = 0;
|
||||
#endif
|
||||
//
|
||||
|
||||
void_t* WelsMalloc (const uint32_t kuiSize, const str_t* kpTag) {
|
||||
const int32_t kiSizeVoidPtr = sizeof (void_t**);
|
||||
void* WelsMalloc (const uint32_t kuiSize, const char* kpTag) {
|
||||
const int32_t kiSizeVoidPtr = sizeof (void**);
|
||||
const int32_t kiSizeInt = sizeof (int32_t);
|
||||
const int32_t kiAlignBytes = 15;
|
||||
uint8_t* pBuf = (uint8_t*) malloc (kuiSize + kiAlignBytes + kiSizeVoidPtr + kiSizeInt);
|
||||
@ -59,7 +59,7 @@ void_t* WelsMalloc (const uint32_t kuiSize, const str_t* kpTag) {
|
||||
|
||||
if (kpTag != NULL) {
|
||||
if (pMemCheckMalloc != NULL) {
|
||||
fprintf (pMemCheckMalloc, "0x%x, size: %d , malloc %s\n", (void_t*)pBuf,
|
||||
fprintf (pMemCheckMalloc, "0x%x, size: %d , malloc %s\n", (void*)pBuf,
|
||||
(kuiSize + kiAlignBytes + kiSizeVoidPtr + kiSizeInt), kpTag);
|
||||
}
|
||||
if (pMemCheckMalloc != NULL) {
|
||||
@ -76,7 +76,7 @@ void_t* WelsMalloc (const uint32_t kuiSize, const str_t* kpTag) {
|
||||
|
||||
pAlignBuf = pBuf + kiAlignBytes + kiSizeVoidPtr + kiSizeInt;
|
||||
pAlignBuf -= (uintptr_t) pAlignBuf & kiAlignBytes;
|
||||
* ((void_t**) (pAlignBuf - kiSizeVoidPtr)) = pBuf;
|
||||
* ((void**) (pAlignBuf - kiSizeVoidPtr)) = pBuf;
|
||||
* ((int32_t*) (pAlignBuf - (kiSizeVoidPtr + kiSizeInt))) = kuiSize;
|
||||
|
||||
return (pAlignBuf);
|
||||
@ -84,15 +84,15 @@ void_t* WelsMalloc (const uint32_t kuiSize, const str_t* kpTag) {
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void_t WelsFree (void_t* pPtr, const str_t* kpTag) {
|
||||
void WelsFree (void* pPtr, const char* kpTag) {
|
||||
if (pPtr) {
|
||||
#ifdef MEMORY_CHECK
|
||||
if (NULL != pMemCheckFree && kpTag != NULL) {
|
||||
fprintf (pMemCheckFree, "0x%x, free %s\n", (void_t*) (* (((void_t**) pPtr) - 1)), kpTag);
|
||||
fprintf (pMemCheckFree, "0x%x, free %s\n", (void*) (* (((void**) pPtr) - 1)), kpTag);
|
||||
fflush (pMemCheckFree);
|
||||
}
|
||||
#endif
|
||||
free (* (((void_t**) pPtr) - 1));
|
||||
free (* (((void**) pPtr) - 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,4 +143,4 @@ PNalUnit MemGetNextNal (PAccessUnit* ppAu) {
|
||||
return pNu;
|
||||
}
|
||||
|
||||
} // namespace WelsDec
|
||||
} // namespace WelsDec
|
||||
|
@ -43,8 +43,8 @@
|
||||
#include "mb_cache.h"
|
||||
|
||||
namespace WelsDec {
|
||||
void_t PredPSkipMvFromNeighbor (PDqLayer pCurLayer, int16_t iMvp[2]) {
|
||||
bool_t bTopAvail, bLeftTopAvail, bRightTopAvail, bLeftAvail;
|
||||
void PredPSkipMvFromNeighbor (PDqLayer pCurLayer, int16_t iMvp[2]) {
|
||||
bool bTopAvail, bLeftTopAvail, bRightTopAvail, bLeftAvail;
|
||||
|
||||
int32_t iCurSliceIdc, iTopSliceIdc, iLeftTopSliceIdc, iRightTopSliceIdc, iLeftSliceIdc;
|
||||
int32_t iLeftTopType, iRightTopType, iTopType, iLeftType;
|
||||
@ -194,7 +194,7 @@ void_t PredPSkipMvFromNeighbor (PDqLayer pCurLayer, int16_t iMvp[2]) {
|
||||
|
||||
|
||||
//basic iMVs prediction unit for iMVs partition width (4, 2, 1)
|
||||
void_t PredMv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
void PredMv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int32_t iPartWidth, int8_t iRef, int16_t iMVP[2]) {
|
||||
const uint8_t kuiLeftIdx = g_kuiCache30ScanIdx[iPartIdx] - 1;
|
||||
const uint8_t kuiTopIdx = g_kuiCache30ScanIdx[iPartIdx] - 6;
|
||||
@ -241,7 +241,7 @@ void_t PredMv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A]
|
||||
iMVP[1] = WelsMedian (iAMV[1], iBMV[1], iCMV[1]);
|
||||
}
|
||||
}
|
||||
void_t PredInter8x16Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
void PredInter8x16Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int8_t iRef, int16_t iMVP[2]) {
|
||||
if (0 == iPartIdx) {
|
||||
const int8_t kiLeftRef = iRefIndex[0][6];
|
||||
@ -264,7 +264,7 @@ void_t PredInter8x16Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefInde
|
||||
|
||||
PredMv (iMotionVector, iRefIndex, iPartIdx, 2, iRef, iMVP);
|
||||
}
|
||||
void_t PredInter16x8Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
void PredInter16x8Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int8_t iRef, int16_t iMVP[2]) {
|
||||
if (0 == iPartIdx) {
|
||||
const int8_t kiTopRef = iRefIndex[0][1];
|
||||
@ -285,7 +285,7 @@ void_t PredInter16x8Mv (int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefInde
|
||||
|
||||
//update iMVs and iRefIndex cache for current MB, only for P_16*16 (SKIP inclusive)
|
||||
/* can be further optimized */
|
||||
void_t UpdateP16x16MotionInfo (PDqLayer pCurDqLayer, int8_t iRef, int16_t iMVs[2]) {
|
||||
void UpdateP16x16MotionInfo (PDqLayer pCurDqLayer, int8_t iRef, int16_t iMVs[2]) {
|
||||
const int16_t kiRef2 = (iRef << 8) | iRef;
|
||||
const int32_t kiMV32 = LD32 (iMVs);
|
||||
int32_t i;
|
||||
@ -308,7 +308,7 @@ void_t UpdateP16x16MotionInfo (PDqLayer pCurDqLayer, int8_t iRef, int16_t iMVs[2
|
||||
|
||||
//update iRefIndex and iMVs of Mb, only for P16x8
|
||||
/*need further optimization, mb_cache not work */
|
||||
void_t UpdateP16x8MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A],
|
||||
void UpdateP16x8MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A],
|
||||
int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int8_t iRef, int16_t iMVs[2]) {
|
||||
const int16_t kiRef2 = (iRef << 8) | iRef;
|
||||
@ -338,7 +338,7 @@ void_t UpdateP16x8MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A
|
||||
}
|
||||
}
|
||||
//update iRefIndex and iMVs of both Mb and Mb_cache, only for P8x16
|
||||
void_t UpdateP8x16MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A],
|
||||
void UpdateP8x16MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A],
|
||||
int8_t iRefIndex[LIST_A][30],
|
||||
int32_t iPartIdx, int8_t iRef, int16_t iMVs[2]) {
|
||||
const int16_t kiRef2 = (iRef << 8) | iRef;
|
||||
@ -369,4 +369,4 @@ void_t UpdateP8x16MotionInfo (PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace WelsDec
|
||||
} // namespace WelsDec
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
void_t GetNeighborAvailMbType (PNeighAvail pNeighAvail, PDqLayer pCurLayer) {
|
||||
void GetNeighborAvailMbType (PNeighAvail pNeighAvail, PDqLayer pCurLayer) {
|
||||
int32_t iCurSliceIdc, iTopSliceIdc, iLeftTopSliceIdc, iRightTopSliceIdc, iLeftSliceIdc;
|
||||
int32_t iCurXy, iTopXy, iLeftXy, iLeftTopXy, iRightTopXy;
|
||||
int32_t iCurX, iCurY;
|
||||
@ -92,7 +92,7 @@ void_t GetNeighborAvailMbType (PNeighAvail pNeighAvail, PDqLayer pCurLayer) {
|
||||
pNeighAvail->iLeftTopType = (pNeighAvail->iLeftTopAvail ? pCurLayer->pMbType[iLeftTopXy] : 0);
|
||||
pNeighAvail->iRightTopType = (pNeighAvail->iRightTopAvail ? pCurLayer->pMbType[iRightTopXy] : 0);
|
||||
}
|
||||
void_t WelsFillCacheNonZeroCount (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
|
||||
void WelsFillCacheNonZeroCount (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
|
||||
PDqLayer pCurLayer) { //no matter slice type, intra_pred_constrained_flag
|
||||
int32_t iCurXy = pCurLayer->iMbXyIndex;
|
||||
int32_t iTopXy = 0;
|
||||
@ -143,7 +143,7 @@ void_t WelsFillCacheNonZeroCount (PNeighAvail pNeighAvail, uint8_t* pNonZeroCoun
|
||||
pNonZeroCount[5 + 8 * 5] = -1;//unavailable
|
||||
}
|
||||
}
|
||||
void_t WelsFillCacheConstrain1Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode,
|
||||
void WelsFillCacheConstrain1Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode,
|
||||
PDqLayer pCurLayer) { //no matter slice type
|
||||
int32_t iCurXy = pCurLayer->iMbXyIndex;
|
||||
int32_t iTopXy = 0;
|
||||
@ -189,7 +189,7 @@ void_t WelsFillCacheConstrain1Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZe
|
||||
}
|
||||
}
|
||||
|
||||
void_t WelsFillCacheConstrain0Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode,
|
||||
void WelsFillCacheConstrain0Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode,
|
||||
PDqLayer pCurLayer) { //no matter slice type
|
||||
int32_t iCurXy = pCurLayer->iMbXyIndex;
|
||||
int32_t iTopXy = 0;
|
||||
@ -235,7 +235,7 @@ void_t WelsFillCacheConstrain0Intra4x4 (PNeighAvail pNeighAvail, uint8_t* pNonZe
|
||||
}
|
||||
}
|
||||
|
||||
void_t WelsFillCacheInter (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
|
||||
void WelsFillCacheInter (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
|
||||
int16_t iMvArray[LIST_A][30][MV_A], int8_t iRefIdxArray[LIST_A][30], PDqLayer pCurLayer) {
|
||||
int32_t iCurXy = pCurLayer->iMbXyIndex;
|
||||
int32_t iTopXy = 0;
|
||||
@ -398,7 +398,7 @@ int32_t CheckIntra16x16PredMode (uint8_t uiSampleAvail, int8_t* pMode) {
|
||||
*pMode = I16_PRED_DC_128;
|
||||
}
|
||||
} else {
|
||||
bool_t bModeAvail = CHECK_I16_MODE (*pMode, iLeftAvail, iTopAvail, bLeftTopAvail);
|
||||
bool bModeAvail = CHECK_I16_MODE (*pMode, iLeftAvail, iTopAvail, bLeftTopAvail);
|
||||
if (0 == bModeAvail) {
|
||||
return ERR_INFO_INVALID_I16x16_PRED_MODE;
|
||||
}
|
||||
@ -423,7 +423,7 @@ int32_t CheckIntraChromaPredMode (uint8_t uiSampleAvail, int8_t* pMode) {
|
||||
*pMode = C_PRED_DC_128;
|
||||
}
|
||||
} else {
|
||||
bool_t bModeAvail = CHECK_CHROMA_MODE (*pMode, iLeftAvail, iTopAvail, bLeftTopAvail);
|
||||
bool bModeAvail = CHECK_CHROMA_MODE (*pMode, iLeftAvail, iTopAvail, bLeftTopAvail);
|
||||
if (0 == bModeAvail) {
|
||||
return ERR_INFO_INVALID_I_CHROMA_PRED_MODE;
|
||||
}
|
||||
@ -455,7 +455,7 @@ int32_t CheckIntra4x4PredMode (int32_t* pSampleAvail, int8_t* pMode, int32_t iIn
|
||||
iFinalMode = I4_PRED_DC_128;
|
||||
}
|
||||
} else {
|
||||
bool_t bModeAvail = CHECK_I4_MODE (*pMode, iLeftAvail, iTopAvail, bLeftTopAvail);
|
||||
bool bModeAvail = CHECK_I4_MODE (*pMode, iLeftAvail, iTopAvail, bLeftTopAvail);
|
||||
if (0 == bModeAvail) {
|
||||
return ERR_INVALID_INTRA4X4_MODE;
|
||||
}
|
||||
@ -472,10 +472,10 @@ int32_t CheckIntra4x4PredMode (int32_t* pSampleAvail, int8_t* pMode, int32_t iIn
|
||||
return iFinalMode;
|
||||
}
|
||||
|
||||
void_t BsStartCavlc (PBitStringAux pBs) {
|
||||
void BsStartCavlc (PBitStringAux pBs) {
|
||||
pBs->iIndex = ((pBs->pCurBuf - pBs->pStartBuf) << 3) - (16 - pBs->iLeftBits);
|
||||
}
|
||||
void_t BsEndCavlc (PBitStringAux pBs) {
|
||||
void BsEndCavlc (PBitStringAux pBs) {
|
||||
pBs->pCurBuf = pBs->pStartBuf + (pBs->iIndex >> 3);
|
||||
pBs->uiCurBits = ((((pBs->pCurBuf[0] << 8) | pBs->pCurBuf[1]) << 16) | (pBs->pCurBuf[2] << 8) | pBs->pCurBuf[3]) <<
|
||||
(pBs->iIndex & 0x07);
|
||||
@ -486,7 +486,7 @@ void_t BsEndCavlc (PBitStringAux pBs) {
|
||||
|
||||
// return: used bits
|
||||
static int32_t CavlcGetTrailingOnesAndTotalCoeff (uint8_t& uiTotalCoeff, uint8_t& uiTrailingOnes,
|
||||
SReadBitsCache* pBitsCache, SVlcTable* pVlcTable, bool_t bChromaDc, int8_t nC) {
|
||||
SReadBitsCache* pBitsCache, SVlcTable* pVlcTable, bool bChromaDc, int8_t nC) {
|
||||
const uint8_t* kpVlcTableMoreBitsCountList[3] = {g_kuiVlcTableMoreBitsCount0, g_kuiVlcTableMoreBitsCount1, g_kuiVlcTableMoreBitsCount2};
|
||||
int32_t iUsedBits = 0;
|
||||
int32_t iIndexVlc, iIndexValue, iNcMapIdx;
|
||||
@ -587,7 +587,7 @@ static int32_t CavlcGetLevelVal (int32_t iLevel[16], SReadBitsCache* pBitsCache,
|
||||
}
|
||||
|
||||
static int32_t CavlcGetTotalZeros (int32_t& iZerosLeft, SReadBitsCache* pBitsCache, uint8_t uiTotalCoeff,
|
||||
SVlcTable* pVlcTable, bool_t bChromaDc) {
|
||||
SVlcTable* pVlcTable, bool bChromaDc) {
|
||||
int32_t iCount, iUsedBits = 0;
|
||||
const uint8_t* kpBitNumMap;
|
||||
uint32_t uiValue;
|
||||
@ -673,7 +673,7 @@ int32_t WelsResidualBlockCavlc (SVlcTable* pVlcTable, uint8_t* pNonZeroCountCach
|
||||
int32_t iUsedBits = 0;
|
||||
int32_t iCurIdx = pBs->iIndex;
|
||||
uint8_t* pBuf = ((uint8_t*)pBs->pStartBuf) + (iCurIdx >> 3);
|
||||
bool_t bChromaDc = (CHROMA_DC == iResidualProperty);
|
||||
bool bChromaDc = (CHROMA_DC == iResidualProperty);
|
||||
uint8_t bChroma = (bChromaDc || CHROMA_AC == iResidualProperty);
|
||||
SReadBitsCache sReadBitsCache;
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
void_t FreePicture (PPicture pPic);
|
||||
void FreePicture (PPicture pPic);
|
||||
|
||||
|
||||
///////////////////////////////////Recycled queue management for pictures///////////////////////////////////
|
||||
@ -106,7 +106,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const
|
||||
return pPic;
|
||||
}
|
||||
|
||||
void_t FreePicture (PPicture pPic) {
|
||||
void FreePicture (PPicture pPic) {
|
||||
if (NULL != pPic) {
|
||||
|
||||
if (pPic->pBuffer[0]) {
|
||||
@ -149,4 +149,4 @@ PPicture PrefetchPic (PPicBuff pPicBuf) {
|
||||
return pPic;
|
||||
}
|
||||
|
||||
} // namespace WelsDec
|
||||
} // namespace WelsDec
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
namespace WelsDec {
|
||||
|
||||
void_t WelsFillRecNeededMbInfo (PWelsDecoderContext pCtx, bool_t bOutput, PDqLayer pCurLayer) {
|
||||
void WelsFillRecNeededMbInfo (PWelsDecoderContext pCtx, bool bOutput, PDqLayer pCurLayer) {
|
||||
PPicture pCurPic = pCtx->pDec;
|
||||
int32_t iLumaStride = pCurPic->iLinesize[0];
|
||||
int32_t iChromaStride = pCurPic->iLinesize[1];
|
||||
@ -183,7 +183,7 @@ typedef struct TagMCRefMember {
|
||||
int32_t iPicHeight;
|
||||
} sMCRefMember;
|
||||
//according to current 8*8 block ref_index to gain reference picture
|
||||
static inline void_t GetRefPic (sMCRefMember* pMCRefMem, PWelsDecoderContext pCtx, int8_t* pRefIdxList,
|
||||
static inline void GetRefPic (sMCRefMember* pMCRefMem, PWelsDecoderContext pCtx, int8_t* pRefIdxList,
|
||||
int32_t iIndex) {
|
||||
PPicture pRefPic;
|
||||
|
||||
@ -202,7 +202,7 @@ static inline void_t GetRefPic (sMCRefMember* pMCRefMem, PWelsDecoderContext pCt
|
||||
#ifndef MC_FLOW_SIMPLE_JUDGE
|
||||
#define MC_FLOW_SIMPLE_JUDGE 1
|
||||
#endif //MC_FLOW_SIMPLE_JUDGE
|
||||
static inline void_t BaseMC (sMCRefMember* pMCRefMem, int32_t iXOffset, int32_t iYOffset, SMcFunc* pMCFunc,
|
||||
static inline void BaseMC (sMCRefMember* pMCRefMem, int32_t iXOffset, int32_t iYOffset, SMcFunc* pMCFunc,
|
||||
int32_t iBlkWidth, int32_t iBlkHeight, int16_t iMVs[2]) {
|
||||
int32_t iExpandWidth = PADDING_LENGTH;
|
||||
int32_t iExpandHeight = PADDING_LENGTH;
|
||||
@ -235,7 +235,7 @@ static inline void_t BaseMC (sMCRefMember* pMCRefMem, int32_t iXOffset, int32_t
|
||||
uint8_t* pDstY = pMCRefMem->pDstY;
|
||||
uint8_t* pDstU = pMCRefMem->pDstU;
|
||||
uint8_t* pDstV = pMCRefMem->pDstV;
|
||||
bool_t bExpand = false;
|
||||
bool bExpand = false;
|
||||
|
||||
ENFORCE_STACK_ALIGN_1D (uint8_t, uiExpandBuf, (PADDING_LENGTH + 6) * (PADDING_LENGTH + 6), 16);
|
||||
|
||||
@ -289,7 +289,7 @@ static inline void_t BaseMC (sMCRefMember* pMCRefMem, int32_t iXOffset, int32_t
|
||||
}
|
||||
}
|
||||
|
||||
void_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWelsDecoderContext pCtx) {
|
||||
void GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWelsDecoderContext pCtx) {
|
||||
sMCRefMember pMCRefMem;
|
||||
PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
|
||||
SMcFunc* pMCFunc = &pCtx->sMcFunc;
|
||||
@ -464,7 +464,7 @@ int32_t RecChroma (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLeve
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
void_t FillBufForMc (uint8_t* pBuf, int32_t iBufStride, uint8_t* pSrc, int32_t iSrcStride, int32_t iSrcOffset,
|
||||
void FillBufForMc (uint8_t* pBuf, int32_t iBufStride, uint8_t* pSrc, int32_t iSrcStride, int32_t iSrcOffset,
|
||||
int32_t iBlockWidth, int32_t iBlockHeight, int32_t iSrcX, int32_t iSrcY, int32_t iPicWidth, int32_t iPicHeight) {
|
||||
int32_t iY;
|
||||
int32_t iStartY, iStartX, iEndY, iEndX;
|
||||
|
@ -48,7 +48,7 @@ PWelsLogCallbackFunc g_pLog = NULL;
|
||||
|
||||
|
||||
|
||||
void_t WelsLog (void_t* pPtr, int32_t iLevel, const char* kpFmt, ...) {
|
||||
void WelsLog (void* pPtr, int32_t iLevel, const char* kpFmt, ...) {
|
||||
va_list pVl;
|
||||
|
||||
PWelsDecoderContext pCtx = (PWelsDecoderContext)pPtr;
|
||||
|
@ -66,9 +66,9 @@ enum {
|
||||
virtual ~IWelsTrace() {};
|
||||
|
||||
virtual int32_t SetTraceLevel (int32_t iLevel) = 0;
|
||||
virtual int32_t Trace (const int32_t kLevel, const str_t* kpFormat, va_list pVl) = 0;
|
||||
virtual int32_t Trace (const int32_t kLevel, const char* kpFormat, va_list pVl) = 0;
|
||||
|
||||
static void_t WelsTrace (void_t* pObject, const int32_t kLevel, const str_t* kpFormat, va_list pVl) {
|
||||
static void WelsTrace (void* pObject, const int32_t kLevel, const char* kpFormat, va_list pVl) {
|
||||
IWelsTrace* pThis = (IWelsTrace*) (pObject);
|
||||
|
||||
if (pThis) {
|
||||
@ -76,7 +76,7 @@ static void_t WelsTrace (void_t* pObject, const int32_t kLevel, const str_t* kp
|
||||
}
|
||||
}
|
||||
|
||||
static void_t WelsVTrace (void_t* pObject, const int32_t kLevel, const str_t* kpFormat, ...) {
|
||||
static void WelsVTrace (void* pObject, const int32_t kLevel, const char* kpFormat, ...) {
|
||||
IWelsTrace* pThis = (IWelsTrace*) (pObject);
|
||||
|
||||
va_list argptr;
|
||||
@ -96,9 +96,9 @@ static void_t WelsVTrace (void_t* pObject, const int32_t kLevel, const str_t* kp
|
||||
class CWelsTraceBase : public IWelsTrace {
|
||||
public:
|
||||
virtual int32_t SetTraceLevel (int32_t iLevel);
|
||||
virtual int32_t Trace (const int32_t kLevel, const str_t* kpFormat, va_list pVl);
|
||||
virtual int32_t Trace (const int32_t kLevel, const char* kpFormat, va_list pVl);
|
||||
|
||||
virtual int32_t WriteString (int32_t iLevel, const str_t* pStr) = 0;
|
||||
virtual int32_t WriteString (int32_t iLevel, const char* pStr) = 0;
|
||||
protected:
|
||||
CWelsTraceBase() {
|
||||
m_iLevel = WELS_LOG_DEFAULT;
|
||||
@ -110,11 +110,11 @@ int32_t m_iLevel;
|
||||
|
||||
class CWelsTraceFile : public CWelsTraceBase {
|
||||
public:
|
||||
CWelsTraceFile (const str_t* filename = (const str_t*)"wels_decoder_trace.txt");
|
||||
CWelsTraceFile (const char* filename = (const char*)"wels_decoder_trace.txt");
|
||||
virtual ~CWelsTraceFile();
|
||||
|
||||
public:
|
||||
virtual int32_t WriteString (int32_t iLevel, const str_t* pStr);
|
||||
virtual int32_t WriteString (int32_t iLevel, const char* pStr);
|
||||
|
||||
private:
|
||||
WelsFileHandle* m_pTraceFile;
|
||||
@ -127,7 +127,7 @@ CWelsTraceWinDgb() {};
|
||||
virtual ~CWelsTraceWinDgb() {};
|
||||
|
||||
public:
|
||||
virtual int32_t WriteString (int32_t iLevel, const str_t* pStr);
|
||||
virtual int32_t WriteString (int32_t iLevel, const char* pStr);
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -137,7 +137,7 @@ CWelsCodecTrace() ;
|
||||
virtual ~CWelsCodecTrace();
|
||||
|
||||
public:
|
||||
virtual int32_t WriteString (int32_t iLevel, const str_t* pStr);
|
||||
virtual int32_t WriteString (int32_t iLevel, const char* pStr);
|
||||
|
||||
protected:
|
||||
int32_t LoadWelsTraceModule();
|
||||
@ -152,7 +152,7 @@ CM_WELS_TRACE m_fpErrorTrace;
|
||||
};
|
||||
|
||||
|
||||
IWelsTrace* CreateWelsTrace (EWelsTraceType eType, void_t* pParam = NULL);
|
||||
IWelsTrace* CreateWelsTrace (EWelsTraceType eType, void* pParam = NULL);
|
||||
|
||||
} // namespace WelsDec
|
||||
|
||||
|
@ -56,10 +56,10 @@ namespace WelsDec {
|
||||
|
||||
class CWelsDecoder : public ISVCDecoder {
|
||||
public:
|
||||
CWelsDecoder (void_t);
|
||||
CWelsDecoder (void);
|
||||
virtual ~CWelsDecoder();
|
||||
|
||||
virtual long EXTAPI Initialize (void_t* pParam, const INIT_TYPE keInitType);
|
||||
virtual long EXTAPI Initialize (void* pParam, const INIT_TYPE keInitType);
|
||||
virtual long EXTAPI Uninitialize();
|
||||
|
||||
/***************************************************************************
|
||||
@ -83,7 +83,7 @@ virtual DECODING_STATE EXTAPI DecodeFrame (const unsigned char* kpSrc,
|
||||
|
||||
virtual DECODING_STATE EXTAPI DecodeFrame2 (const unsigned char* kpSrc,
|
||||
const int kiSrcLen,
|
||||
void_t** ppDst,
|
||||
void** ppDst,
|
||||
SBufferInfo* pDstInfo);
|
||||
virtual DECODING_STATE EXTAPI DecodeFrameEx (const unsigned char* kpSrc,
|
||||
const int kiSrcLen,
|
||||
@ -94,15 +94,15 @@ virtual DECODING_STATE EXTAPI DecodeFrameEx (const unsigned char* kpSrc,
|
||||
int& iHeight,
|
||||
int& color_format);
|
||||
|
||||
virtual long EXTAPI SetOption (DECODER_OPTION eOptID, void_t* pOption);
|
||||
virtual long EXTAPI GetOption (DECODER_OPTION eOptID, void_t* pOption);
|
||||
virtual long EXTAPI SetOption (DECODER_OPTION eOptID, void* pOption);
|
||||
virtual long EXTAPI GetOption (DECODER_OPTION eOptID, void* pOption);
|
||||
|
||||
private:
|
||||
PWelsDecoderContext m_pDecContext;
|
||||
IWelsTrace* m_pTrace;
|
||||
|
||||
void_t InitDecoder (void_t);
|
||||
void_t UninitDecoder (void_t);
|
||||
void InitDecoder (void);
|
||||
void UninitDecoder (void);
|
||||
|
||||
XMMREG_PROTECT_DECLARE(CWelsH264Decoder);
|
||||
|
||||
|
@ -57,14 +57,14 @@ int32_t CWelsTraceBase::SetTraceLevel (int iLevel) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CWelsTraceBase::Trace (const int kLevel, const str_t* kpFormat, va_list pVl) {
|
||||
int32_t CWelsTraceBase::Trace (const int kLevel, const char* kpFormat, va_list pVl) {
|
||||
if (kLevel & m_iLevel) {
|
||||
str_t chBuf[MAX_LOG_SIZE] = {0};
|
||||
char chBuf[MAX_LOG_SIZE] = {0};
|
||||
const int32_t kLen = strlen ("[DECODER]: ");
|
||||
|
||||
WelsStrncpy (chBuf, MAX_LOG_SIZE, (const str_t*)"[DECODER]: ");
|
||||
WelsStrncpy (chBuf, MAX_LOG_SIZE, (const char*)"[DECODER]: ");
|
||||
|
||||
WelsVsnprintf ((chBuf + kLen), MAX_LOG_SIZE - kLen, (const str_t*)kpFormat, pVl);
|
||||
WelsVsnprintf ((chBuf + kLen), MAX_LOG_SIZE - kLen, (const char*)kpFormat, pVl);
|
||||
|
||||
WriteString (kLevel, chBuf);
|
||||
}
|
||||
@ -72,8 +72,8 @@ int32_t CWelsTraceBase::Trace (const int kLevel, const str_t* kpFormat, va_list
|
||||
return 0;
|
||||
}
|
||||
|
||||
CWelsTraceFile::CWelsTraceFile (const str_t* pFileName) {
|
||||
m_pTraceFile = WelsFopen (pFileName, (const str_t*)"wt");
|
||||
CWelsTraceFile::CWelsTraceFile (const char* pFileName) {
|
||||
m_pTraceFile = WelsFopen (pFileName, (const char*)"wt");
|
||||
}
|
||||
|
||||
CWelsTraceFile::~CWelsTraceFile() {
|
||||
@ -83,9 +83,9 @@ CWelsTraceFile::~CWelsTraceFile() {
|
||||
}
|
||||
}
|
||||
|
||||
int32_t CWelsTraceFile::WriteString (int32_t iLevel, const str_t* pStr) {
|
||||
int32_t CWelsTraceFile::WriteString (int32_t iLevel, const char* pStr) {
|
||||
int iRC = 0;
|
||||
const static str_t chEnter[16] = "\n";
|
||||
const static char chEnter[16] = "\n";
|
||||
if (m_pTraceFile) {
|
||||
iRC += WelsFwrite (pStr, 1, strlen (pStr), m_pTraceFile);
|
||||
iRC += WelsFwrite (chEnter, 1, strlen (chEnter), m_pTraceFile);
|
||||
@ -97,7 +97,7 @@ int32_t CWelsTraceFile::WriteString (int32_t iLevel, const str_t* pStr) {
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
int32_t CWelsTraceWinDgb::WriteString (int32_t iLevel, const str_t* pStr) {
|
||||
int32_t CWelsTraceWinDgb::WriteString (int32_t iLevel, const char* pStr) {
|
||||
OutputDebugStringA (pStr);
|
||||
|
||||
return strlen (pStr);
|
||||
@ -134,7 +134,7 @@ int32_t CWelsCodecTrace::UnloadWelsTraceModule() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CWelsCodecTrace::WriteString (int32_t iLevel, const str_t* pStr) {
|
||||
int32_t CWelsCodecTrace::WriteString (int32_t iLevel, const char* pStr) {
|
||||
{
|
||||
switch (iLevel) {
|
||||
case WELS_LOG_ERROR:
|
||||
@ -164,7 +164,7 @@ int32_t CWelsCodecTrace::WriteString (int32_t iLevel, const str_t* pStr) {
|
||||
}
|
||||
|
||||
|
||||
IWelsTrace* CreateWelsTrace (EWelsTraceType eType, void_t* pParam) {
|
||||
IWelsTrace* CreateWelsTrace (EWelsTraceType eType, void* pParam) {
|
||||
IWelsTrace* pTrace = NULL;
|
||||
switch (eType) {
|
||||
case Wels_Trace_Type:
|
||||
|
@ -83,16 +83,16 @@ namespace WelsDec {
|
||||
*
|
||||
* return: none
|
||||
***************************************************************************/
|
||||
CWelsDecoder::CWelsDecoder (void_t)
|
||||
CWelsDecoder::CWelsDecoder (void)
|
||||
: m_pDecContext (NULL),
|
||||
m_pTrace (NULL) {
|
||||
#ifdef OUTPUT_BIT_STREAM
|
||||
str_t chFileName[1024] = { 0 }; //for .264
|
||||
char chFileName[1024] = { 0 }; //for .264
|
||||
int iBufUsed = 0;
|
||||
int iBufLeft = 1023;
|
||||
int iCurUsed;
|
||||
|
||||
str_t chFileNameSize[1024] = { 0 }; //for .len
|
||||
char chFileNameSize[1024] = { 0 }; //for .len
|
||||
int iBufUsedSize = 0;
|
||||
int iBufLeftSize = 1023;
|
||||
int iCurUsedSize;
|
||||
@ -108,8 +108,8 @@ CWelsDecoder::CWelsDecoder (void_t)
|
||||
|
||||
WelsGetTimeOfDay (&sCurTime);
|
||||
|
||||
iCurUsed = WelsSnprintf (chFileName, iBufLeft, "bs_0x%p_", (void_t*)this);
|
||||
iCurUsedSize = WelsSnprintf (chFileNameSize, iBufLeftSize, "size_0x%p_", (void_t*)this);
|
||||
iCurUsed = WelsSnprintf (chFileName, iBufLeft, "bs_0x%p_", (void*)this);
|
||||
iCurUsedSize = WelsSnprintf (chFileNameSize, iBufLeftSize, "size_0x%p_", (void*)this);
|
||||
|
||||
if (iCurUsed > 0) {
|
||||
iBufUsed += iCurUsed;
|
||||
@ -186,7 +186,7 @@ CWelsDecoder::~CWelsDecoder() {
|
||||
}
|
||||
}
|
||||
|
||||
long CWelsDecoder::Initialize (void_t* pParam, const INIT_TYPE keInitType) {
|
||||
long CWelsDecoder::Initialize (void* pParam, const INIT_TYPE keInitType) {
|
||||
if (pParam == NULL || keInitType != INIT_TYPE_PARAMETER_BASED) {
|
||||
IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, "CWelsDecoder::Initialize(), invalid input argument.");
|
||||
return cmInitParaError;
|
||||
@ -206,7 +206,7 @@ long CWelsDecoder::Uninitialize() {
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
void_t CWelsDecoder::UninitDecoder (void_t) {
|
||||
void CWelsDecoder::UninitDecoder (void) {
|
||||
if (NULL == m_pDecContext)
|
||||
return;
|
||||
|
||||
@ -224,7 +224,7 @@ void_t CWelsDecoder::UninitDecoder (void_t) {
|
||||
}
|
||||
|
||||
// the return value of this function is not suitable, it need report failure info to upper layer.
|
||||
void_t CWelsDecoder::InitDecoder (void_t) {
|
||||
void CWelsDecoder::InitDecoder (void) {
|
||||
IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, "CWelsDecoder::init_decoder()..");
|
||||
|
||||
m_pDecContext = (PWelsDecoderContext)WelsMalloc (sizeof (SWelsDecoderContext), "m_pDecContext");
|
||||
@ -237,7 +237,7 @@ void_t CWelsDecoder::InitDecoder (void_t) {
|
||||
/*
|
||||
* Set Option
|
||||
*/
|
||||
long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void_t* pOption) {
|
||||
long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) {
|
||||
int iVal = 0;
|
||||
|
||||
if (m_pDecContext == NULL)
|
||||
@ -294,7 +294,7 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void_t* pOption) {
|
||||
/*
|
||||
* Get Option
|
||||
*/
|
||||
long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void_t* pOption) {
|
||||
long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) {
|
||||
int iVal = 0;
|
||||
|
||||
if (m_pDecContext == NULL)
|
||||
@ -359,7 +359,7 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void_t* pOption) {
|
||||
|
||||
DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc,
|
||||
const int kiSrcLen,
|
||||
void_t** ppDst,
|
||||
void** ppDst,
|
||||
SBufferInfo* pDstInfo) {
|
||||
if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY) {
|
||||
m_pDecContext->iErrorCode |= dsOutOfMemory;
|
||||
@ -449,7 +449,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame (const unsigned char* kpSrc,
|
||||
DstInfo.UsrData.sSystemBuffer.iHeight = iHeight;
|
||||
DstInfo.eBufferProperty = BUFFER_HOST;
|
||||
|
||||
eDecState = DecodeFrame2 (kpSrc, kiSrcLen, (void_t**)ppDst, &DstInfo);
|
||||
eDecState = DecodeFrame2 (kpSrc, kiSrcLen, (void**)ppDst, &DstInfo);
|
||||
if (eDecState == dsErrorFree) {
|
||||
pStride[0] = DstInfo.UsrData.sSystemBuffer.iStride[0];
|
||||
pStride[1] = DstInfo.UsrData.sSystemBuffer.iStride[1];
|
||||
@ -503,7 +503,7 @@ long CreateDecoder (ISVCDecoder** ppDecoder) {
|
||||
/*
|
||||
* DestroyDecoder
|
||||
*/
|
||||
void_t DestroyDecoder (ISVCDecoder* pDecoder) {
|
||||
void DestroyDecoder (ISVCDecoder* pDecoder) {
|
||||
if (NULL != pDecoder) {
|
||||
delete (CWelsDecoder*)pDecoder;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ int32_t WelsWritePpsSyntax (SWelsPPS* pPps, SBitStringAux* pBitStringAux, SParaS
|
||||
*/
|
||||
int32_t WelsInitSps (SWelsSPS* pSps, SDLayerParam* pLayerParam, const uint32_t kuiIntraPeriod,
|
||||
const int32_t kiNumRefFrame,
|
||||
const uint32_t kiSpsId, const bool_t kbEnableFrameCropping, bool_t bEnableRc);
|
||||
const uint32_t kiSpsId, const bool kbEnableFrameCropping, bool bEnableRc);
|
||||
|
||||
/*!
|
||||
* \brief initialize subset pSps based on configurable parameters in svc
|
||||
@ -117,16 +117,16 @@ int32_t WelsInitSps (SWelsSPS* pSps, SDLayerParam* pLayerParam, const uint32_t k
|
||||
*/
|
||||
int32_t WelsInitSubsetSps (SSubsetSps* pSubsetSps, SDLayerParam* pLayerParam, const uint32_t kuiIntraPeriod,
|
||||
const int32_t kiNumRefFrame,
|
||||
const uint32_t kiSpsId, const bool_t kbEnableFrameCropping, bool_t bEnableRc);
|
||||
const uint32_t kiSpsId, const bool kbEnableFrameCropping, bool bEnableRc);
|
||||
|
||||
/*!
|
||||
* \brief initialize pPps based on configurable parameters and pSps(subset pSps) in svc
|
||||
* \param pPps SWelsPPS*
|
||||
* \param pSps SWelsSPS*
|
||||
* \param pSubsetSps SSubsetSps*
|
||||
* \param kbDeblockingFilterPresentFlag bool_t
|
||||
* \param kbDeblockingFilterPresentFlag bool
|
||||
* \param kiPpsId PPS Id
|
||||
* \param kbUsingSubsetSps bool_t
|
||||
* \param kbUsingSubsetSps bool
|
||||
* \return 0 - successful
|
||||
* 1 - failed
|
||||
*/
|
||||
@ -134,8 +134,8 @@ int32_t WelsInitPps (SWelsPPS* pPps,
|
||||
SWelsSPS* pSps,
|
||||
SSubsetSps* pSubsetSps,
|
||||
const uint32_t kuiPpsId,
|
||||
const bool_t kbDeblockingFilterPresentFlag,
|
||||
const bool_t kbUsingSubsetSps);
|
||||
const bool kbDeblockingFilterPresentFlag,
|
||||
const bool kbUsingSubsetSps);
|
||||
|
||||
}
|
||||
#endif//WELS_ACCESS_UNIT_PARSER_H__
|
||||
|
@ -134,4 +134,4 @@ void* GetProcessAddress (CFBundleRef bundleRef, const char* lpProcName) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -81,12 +81,12 @@ EFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum);
|
||||
* \brief Dump reconstruction for dependency layer
|
||||
*/
|
||||
|
||||
extern "C" void DumpDependencyRec (SPicture* pSrcPic, const str_t* kpFileName, const int8_t kiDid);
|
||||
extern "C" void DumpDependencyRec (SPicture* pSrcPic, const char* kpFileName, const int8_t kiDid);
|
||||
|
||||
/*!
|
||||
* \brief Dump the reconstruction pictures
|
||||
*/
|
||||
void DumpRecFrame (SPicture* pSrcPic, const str_t* kpFileName);
|
||||
void DumpRecFrame (SPicture* pSrcPic, const char* kpFileName);
|
||||
|
||||
|
||||
/*!
|
||||
|
@ -92,9 +92,9 @@ typedef struct TagLTRState {
|
||||
int32_t iLastLtrIdx;
|
||||
uint32_t uiLtrMarkInterval;// the interval from the last int32_t term pRef mark
|
||||
|
||||
bool_t bLTRMarkingFlag; //decide whether current frame marked as LTR
|
||||
bool_t bLTRMarkEnable; //when LTR is confirmed and the interval is no smaller than the marking period
|
||||
bool_t bReceivedT0LostFlag; // indicate whether a t0 lost feedback is recieved, for LTR recovery
|
||||
bool bLTRMarkingFlag; //decide whether current frame marked as LTR
|
||||
bool bLTRMarkEnable; //when LTR is confirmed and the interval is no smaller than the marking period
|
||||
bool bReceivedT0LostFlag; // indicate whether a t0 lost feedback is recieved, for LTR recovery
|
||||
} SLTRState;
|
||||
|
||||
typedef struct TagSpatialPicIndex {
|
||||
@ -162,8 +162,8 @@ typedef struct TagWelsEncCtx {
|
||||
|
||||
uint8_t uiDependencyId; // Idc of dependecy layer to be coded
|
||||
uint8_t uiTemporalId; // Idc of temporal layer to be coded
|
||||
bool_t bNeedPrefixNalFlag; // whether add prefix nal
|
||||
bool_t bEncCurFrmAsIdrFlag;
|
||||
bool bNeedPrefixNalFlag; // whether add prefix nal
|
||||
bool bEncCurFrmAsIdrFlag;
|
||||
|
||||
// Rate control routine
|
||||
SWelsSvcRc* pWelsSvcRc;
|
||||
@ -198,7 +198,7 @@ typedef struct TagWelsEncCtx {
|
||||
uint8_t uiSpatialLayersInTemporal[MAX_DEPENDENCY_LAYER];
|
||||
|
||||
uint8_t uiSpatialPicNum[MAX_DEPENDENCY_LAYER];
|
||||
bool_t bLongTermRefFlag[MAX_DEPENDENCY_LAYER][MAX_TEMPORAL_LEVEL + 1/*+LONG_TERM_REF_NUM*/];
|
||||
bool bLongTermRefFlag[MAX_DEPENDENCY_LAYER][MAX_TEMPORAL_LEVEL + 1/*+LONG_TERM_REF_NUM*/];
|
||||
|
||||
int16_t iMaxSliceCount;// maximal count number of slices for all layers observation
|
||||
int16_t iActiveThreadsNum; // number of threads active so far
|
||||
|
@ -106,14 +106,14 @@ uint8_t* pBestPredI4x4Blk4;//I_4x4
|
||||
uint8_t* pBufferInterPredMe; // [4][400] is enough because only h&v or v&hv or h&hv. but if both h&v&hv is needed when 8 quart pixel, future we have to use [5][400].
|
||||
|
||||
//no scan4[] order, just as memory order to store
|
||||
//ALIGNED_DECLARE(bool_t, pPrevIntra4x4PredModeFlag[16], 16);//if 1, means no rem_intra4x4_pred_mode; if 0, means rem_intra4x4_pred_mode != 0
|
||||
bool_t* pPrevIntra4x4PredModeFlag;
|
||||
//ALIGNED_DECLARE(bool, pPrevIntra4x4PredModeFlag[16], 16);//if 1, means no rem_intra4x4_pred_mode; if 0, means rem_intra4x4_pred_mode != 0
|
||||
bool* pPrevIntra4x4PredModeFlag;
|
||||
//ALIGNED_DECLARE(int8_t, pRemIntra4x4PredModeFlag[16], 16);//-1 as default; if pPrevIntra4x4PredModeFlag==0,
|
||||
//pRemIntra4x4PredModeFlag or added by 1 is the best pred_mode
|
||||
int8_t* pRemIntra4x4PredModeFlag;
|
||||
|
||||
int32_t iSadCostSkip[4]; //avail 1; unavail 0
|
||||
bool_t bMbTypeSkip[4]; //1: skip; 0: non-skip
|
||||
bool bMbTypeSkip[4]; //1: skip; 0: non-skip
|
||||
int32_t* pEncSad;
|
||||
|
||||
//for residual encoding at the side of Encoder
|
||||
@ -123,7 +123,7 @@ uint8_t uiNeighborIntra; // LEFT_MB_POS:0x01, TOP_MB_POS:0x02, TOPLEFT_MB_P
|
||||
uint8_t uiLumaI16x16Mode;
|
||||
uint8_t uiChmaI8x8Mode;
|
||||
|
||||
bool_t bCollocatedPredFlag;//denote if current MB is collocated predicted (MV==0).
|
||||
bool bCollocatedPredFlag;//denote if current MB is collocated predicted (MV==0).
|
||||
uint32_t uiRefMbType;
|
||||
|
||||
struct {
|
||||
|
@ -83,7 +83,7 @@ int32_t iCostChroma;//satd+lambda(best_pred_mode) //i_sad_chroma;
|
||||
int32_t iSadPredMb;
|
||||
|
||||
uint8_t uiRef; //uiRefIndex appointed by Encoder, used for MC
|
||||
bool_t bMdUsingSad;
|
||||
bool bMdUsingSad;
|
||||
uint16_t uiReserved;
|
||||
|
||||
int32_t iCostSkipMb;
|
||||
@ -114,7 +114,7 @@ uint8_t* pQuarPixTmp;
|
||||
static void md_intra_init (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb);
|
||||
static void md_inter_init (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb);
|
||||
|
||||
void FillNeighborCacheIntra (SMbCache* pMbCache, SMB* pCurMb, int32_t iMbWidth/*, bool_t constrained_intra_pred_flag*/);
|
||||
void FillNeighborCacheIntra (SMbCache* pMbCache, SMB* pCurMb, int32_t iMbWidth/*, bool constrained_intra_pred_flag*/);
|
||||
void FillNeighborCacheInterWithoutBGD (SMbCache* pMbCache, SMB* pCurMb, int32_t iMbWidth,
|
||||
int8_t* pVaaBgMbFlag); //BGD spatial func
|
||||
void FillNeighborCacheInterWithBGD (SMbCache* pMbCache, SMB* pCurMb, int32_t iMbWidth, int8_t* pVaaBgMbFlag);
|
||||
@ -125,12 +125,12 @@ void MvdCostInit (uint16_t* pMvdCostInter, const int32_t kiMvdSz);
|
||||
void PredictSad (int8_t* pRefIndexCache, int32_t* pSadCostCache, int32_t uiRef, int32_t* pSadPred);
|
||||
|
||||
|
||||
void PredictSadSkip (int8_t* pRefIndexCache, bool_t* pMbSkipCache, int32_t* pSadCostCache, int32_t uiRef,
|
||||
void PredictSadSkip (int8_t* pRefIndexCache, bool* pMbSkipCache, int32_t* pSadCostCache, int32_t uiRef,
|
||||
int32_t* iSadPredSkip);
|
||||
|
||||
// for pfGetVarianceFromIntraVaa function ptr adaptive by CPU features, 6/7/2010
|
||||
void InitIntraAnalysisVaaInfo (SWelsFuncPtrList* pFuncList, const uint32_t kuiCpuFlag);
|
||||
BOOL_T MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb);
|
||||
bool MdIntraAnalysisVaaInfo (sWelsEncCtx* pEncCtx, uint8_t* pEncMb);
|
||||
|
||||
uint8_t MdInterAnalysisVaaInfo_c (int32_t* pSad8x8);
|
||||
|
||||
|
@ -46,9 +46,9 @@ class CMemoryAlign {
|
||||
CMemoryAlign (const uint32_t kuiCacheLineSize);
|
||||
virtual ~CMemoryAlign();
|
||||
|
||||
void* WelsMallocz (const uint32_t kuiSize, const str_t* kpTag);
|
||||
void* WelsMalloc (const uint32_t kuiSize, const str_t* kpTag);
|
||||
void WelsFree (void* pPointer, const str_t* kpTag);
|
||||
void* WelsMallocz (const uint32_t kuiSize, const char* kpTag);
|
||||
void* WelsMalloc (const uint32_t kuiSize, const char* kpTag);
|
||||
void WelsFree (void* pPointer, const char* kpTag);
|
||||
const uint32_t WelsGetCacheLineSize() const;
|
||||
#if defined(MEMORY_MONITOR)
|
||||
const uint32_t WelsGetMemoryUsage() const;
|
||||
|
@ -73,7 +73,7 @@ int32_t iCountNals; // count number of NAL in list
|
||||
// SVC: num_sps (MAX_D) + num_pps (MAX_D) + num_vcl (MAX_D * MAX_Q)
|
||||
int32_t iNalIndex; // coding NAL currently, 0 based
|
||||
|
||||
// BOOL_T bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
|
||||
// bool bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
|
||||
} SWelsEncoderOutput;
|
||||
|
||||
//#define MT_DEBUG_BS_WR 0 // for MT debugging if needed
|
||||
@ -91,9 +91,9 @@ SWelsNalRaw sNalList[2]; // nal list, PREFIX NAL(if applicable) + SLICE NAL
|
||||
int32_t iNalLen[2];
|
||||
int32_t iNalIndex; // coding NAL currently, 0 based
|
||||
|
||||
// BOOL_T bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
|
||||
// bool bAnnexBFlag; // annexeb flag, to figure it pOut the packetization mode whether need 4 bytes (0 0 0 1) of start code prefix
|
||||
#if MT_DEBUG_BS_WR
|
||||
BOOL_T bSliceCodedFlag;
|
||||
bool bSliceCodedFlag;
|
||||
#endif//MT_DEBUG_BS_WR
|
||||
} SWelsSliceBs;
|
||||
|
||||
@ -145,6 +145,6 @@ int32_t WelsEncodeNalExt (SWelsNalRaw* pRawNal, void* pNalHeaderExt, void* pDst,
|
||||
/*!
|
||||
* \brief write prefix nal
|
||||
*/
|
||||
int32_t WelsWriteSVCPrefixNal (SBitStringAux* pBitStringAux, const int32_t keNalRefIdc, const bool_t kbIdrFlag);
|
||||
int32_t WelsWriteSVCPrefixNal (SBitStringAux* pBitStringAux, const int32_t keNalRefIdc, const bool kbIdrFlag);
|
||||
}
|
||||
#endif//WELS_NAL_UNIT_ENCAPSULATION_H__
|
||||
|
@ -53,10 +53,10 @@ typedef struct TagNalUnitHeader {
|
||||
typedef struct TagNalUnitHeaderExt {
|
||||
SNalUnitHeader sNalHeader;
|
||||
|
||||
bool_t bIdrFlag;
|
||||
bool bIdrFlag;
|
||||
uint8_t uiDependencyId;
|
||||
uint8_t uiTemporalId;
|
||||
bool_t bDiscardableFlag;
|
||||
bool bDiscardableFlag;
|
||||
|
||||
|
||||
} SNalUnitHeaderExt, *PNalUnitHeaderExt;
|
||||
|
@ -102,7 +102,7 @@ float fInputFrameRate; // input frame rate
|
||||
float fOutputFrameRate; // output frame rate
|
||||
|
||||
#ifdef ENABLE_FRAME_DUMP
|
||||
str_t sRecFileName[MAX_FNAME_LEN]; // file to be constructed
|
||||
char sRecFileName[MAX_FNAME_LEN]; // file to be constructed
|
||||
#endif//ENABLE_FRAME_DUMP
|
||||
} SDLayerParam;
|
||||
|
||||
@ -127,7 +127,7 @@ struct {
|
||||
int32_t iHeight;
|
||||
} SUsedPicRect; // the rect in input picture that encoder actually used
|
||||
|
||||
str_t* pCurPath; // record current lib path such as:/pData/pData/com.wels.enc/lib/
|
||||
char* pCurPath; // record current lib path such as:/pData/pData/com.wels.enc/lib/
|
||||
|
||||
float fMaxFrameRate; // maximal frame rate [Hz / fps]
|
||||
int32_t iInputCsp; // color space of input sequence
|
||||
@ -140,13 +140,13 @@ int16_t iCountThreadsNum; // # derived from disable_multiple_slice_idc (=0 o
|
||||
int32_t iLTRRefNum;
|
||||
uint32_t uiLtrMarkPeriod; //the min distance of two int32_t references
|
||||
|
||||
bool_t bDeblockingParallelFlag; // deblocking filter parallelization control flag
|
||||
bool_t bMgsT0OnlyStrategy; //MGS_T0_only_strategy
|
||||
bool_t bEnableSSEI;
|
||||
bool_t bEnableFrameCroppingFlag; // enable frame cropping flag: TRUE alwayse in application
|
||||
bool bDeblockingParallelFlag; // deblocking filter parallelization control flag
|
||||
bool bMgsT0OnlyStrategy; //MGS_T0_only_strategy
|
||||
bool bEnableSSEI;
|
||||
bool bEnableFrameCroppingFlag; // enable frame cropping flag: true alwayse in application
|
||||
|
||||
bool_t bEnableCropPic; // enable cropping source picture. , 8/25/2010
|
||||
// FALSE: Streaming Video Sharing; TRUE: Video Conferencing Meeting;
|
||||
bool bEnableCropPic; // enable cropping source picture. , 8/25/2010
|
||||
// false: Streaming Video Sharing; true: Video Conferencing Meeting;
|
||||
int8_t iDecompStages; // GOP size dependency
|
||||
|
||||
/* Deblocking loop filter */
|
||||
@ -159,39 +159,39 @@ int8_t iInterLayerLoopFilterAlphaC0Offset; // InterLayerLoopFilterAlphaC0Offset
|
||||
int8_t iInterLayerLoopFilterBetaOffset; // InterLayerLoopFilterBetaOffset
|
||||
|
||||
/* Rate Control */
|
||||
bool_t bEnableRc;
|
||||
bool bEnableRc;
|
||||
int8_t iRCMode;
|
||||
int8_t iPaddingFlag;
|
||||
/* denoise control */
|
||||
bool_t bEnableDenoise;
|
||||
bool bEnableDenoise;
|
||||
|
||||
/* scene change detection control */
|
||||
bool_t bEnableSceneChangeDetect;
|
||||
bool bEnableSceneChangeDetect;
|
||||
// background detection control
|
||||
bool_t bEnableBackgroundDetection;
|
||||
bool bEnableBackgroundDetection;
|
||||
/* adaptive quantization control */
|
||||
bool_t bEnableAdaptiveQuant;
|
||||
bool bEnableAdaptiveQuant;
|
||||
/* frame skipping */
|
||||
bool_t bEnableFrameSkip;
|
||||
bool bEnableFrameSkip;
|
||||
/* long term reference control */
|
||||
bool_t bEnableLongTermReference;
|
||||
bool bEnableLongTermReference;
|
||||
|
||||
/* pSps pPps id addition control */
|
||||
bool_t bEnableSpsPpsIdAddition;
|
||||
bool bEnableSpsPpsIdAddition;
|
||||
/* Layer definition */
|
||||
bool_t bPrefixNalAddingCtrl;
|
||||
bool bPrefixNalAddingCtrl;
|
||||
int8_t iNumDependencyLayer; // number of dependency(Spatial/CGS) layers used to be encoded
|
||||
int8_t iNumTemporalLayer; // number of temporal layer specified
|
||||
|
||||
|
||||
|
||||
public:
|
||||
TagWelsSvcCodingParam (const bool_t kbEnableRc = true) {
|
||||
TagWelsSvcCodingParam (const bool kbEnableRc = true) {
|
||||
FillDefault (kbEnableRc);
|
||||
}
|
||||
~TagWelsSvcCodingParam() {}
|
||||
|
||||
void FillDefault (const bool_t kbEnableRc) {
|
||||
void FillDefault (const bool kbEnableRc) {
|
||||
uiGopSize = 1; // GOP size (at maximal frame rate: 16)
|
||||
uiIntraPeriod = 0; // intra period (multiple of GOP size as desired)
|
||||
iNumRefFrame = MIN_REF_PIC_COUNT; // number of reference frame used
|
||||
@ -225,9 +225,9 @@ void FillDefault (const bool_t kbEnableRc) {
|
||||
bMgsT0OnlyStrategy =
|
||||
true; // Strategy of have MGS only at T0 frames (0: do not use this strategy; 1: use this strategy)
|
||||
bEnableSSEI = true;
|
||||
bEnableFrameCroppingFlag = true; // enable frame cropping flag: TRUE alwayse in application
|
||||
bEnableFrameCroppingFlag = true; // enable frame cropping flag: true alwayse in application
|
||||
bEnableCropPic = true; // enable cropping source picture. , 8/25/2010
|
||||
// FALSE: Streaming Video Sharing; TRUE: Video Conferencing Meeting;
|
||||
// false: Streaming Video Sharing; true: Video Conferencing Meeting;
|
||||
iDecompStages = 0; // GOP size dependency, unknown here and be revised later
|
||||
|
||||
/* Deblocking loop filter */
|
||||
@ -257,7 +257,7 @@ void FillDefault (const bool_t kbEnableRc) {
|
||||
memset(sDependencyLayers,0,sizeof(SDLayerParam)*MAX_DEPENDENCY_LAYER);
|
||||
}
|
||||
|
||||
int32_t ParamTranscode (SVCEncodingParam& pCodingParam, const bool_t kbEnableRc = true) {
|
||||
int32_t ParamTranscode (SVCEncodingParam& pCodingParam, const bool kbEnableRc = true) {
|
||||
pCodingParam.fFrameRate = WELS_CLIP3 (pCodingParam.fFrameRate, MIN_FRAME_RATE, MAX_FRAME_RATE);
|
||||
iInputCsp = pCodingParam.iInputCsp; // color space of input sequence
|
||||
uiFrameToBeCoded = (uint32_t) -
|
||||
|
@ -67,24 +67,24 @@ uint8_t iLevelIdc;
|
||||
// uint8_t uiBitDepthLuma; //=8, only used in decoder, encoder in general_***; it can be removed when removed general up_sample
|
||||
// uint8_t uiBitDepthChroma; //=8
|
||||
/* TO BE CONTINUE: POC type 1 */
|
||||
// bool_t bDeltaPicOrderAlwaysZeroFlag;
|
||||
// bool_t bGapsInFrameNumValueAllowedFlag; //=true
|
||||
// bool bDeltaPicOrderAlwaysZeroFlag;
|
||||
// bool bGapsInFrameNumValueAllowedFlag; //=true
|
||||
|
||||
// bool_t bFrameMbsOnlyFlag;
|
||||
// bool_t bMbaffFlag; // MB Adapative Frame Field
|
||||
// bool_t bDirect8x8InferenceFlag;
|
||||
bool_t bFrameCroppingFlag;
|
||||
// bool bFrameMbsOnlyFlag;
|
||||
// bool bMbaffFlag; // MB Adapative Frame Field
|
||||
// bool bDirect8x8InferenceFlag;
|
||||
bool bFrameCroppingFlag;
|
||||
|
||||
// bool_t bVuiParamPresentFlag;
|
||||
// bool_t bTimingInfoPresentFlag;
|
||||
// bool_t bFixedFrameRateFlag;
|
||||
// bool bVuiParamPresentFlag;
|
||||
// bool bTimingInfoPresentFlag;
|
||||
// bool bFixedFrameRateFlag;
|
||||
|
||||
bool_t bConstraintSet0Flag;
|
||||
bool_t bConstraintSet1Flag;
|
||||
bool_t bConstraintSet2Flag;
|
||||
bool bConstraintSet0Flag;
|
||||
bool bConstraintSet1Flag;
|
||||
bool bConstraintSet2Flag;
|
||||
|
||||
// bool_t bConstraintSet3Flag; // reintroduce constrain_set3_flag instead of reserved filling bytes here
|
||||
// bool_t bSeparateColorPlaneFlag; // =false,: only used in decoder, encoder in general_***; it can be removed when removed general up_sample
|
||||
// bool bConstraintSet3Flag; // reintroduce constrain_set3_flag instead of reserved filling bytes here
|
||||
// bool bSeparateColorPlaneFlag; // =false,: only used in decoder, encoder in general_***; it can be removed when removed general up_sample
|
||||
|
||||
} SWelsSPS, *PWelsSPS;
|
||||
|
||||
@ -98,10 +98,10 @@ uint8_t iExtendedSpatialScalability; // ESS
|
||||
// uint8_t uiChromaPhaseYPlus1;
|
||||
// uint8_t uiSeqRefLayerChromaPhaseXPlus1Flag;
|
||||
// uint8_t uiSeqRefLayerChromaPhaseYPlus1;
|
||||
// bool_t bInterLayerDeblockingFilterCtrlPresentFlag;
|
||||
bool_t bSeqTcoeffLevelPredFlag;
|
||||
bool_t bAdaptiveTcoeffLevelPredFlag;
|
||||
bool_t bSliceHeaderRestrictionFlag;
|
||||
// bool bInterLayerDeblockingFilterCtrlPresentFlag;
|
||||
bool bSeqTcoeffLevelPredFlag;
|
||||
bool bAdaptiveTcoeffLevelPredFlag;
|
||||
bool bSliceHeaderRestrictionFlag;
|
||||
} SSpsSvcExt, *PSpsSvcExt;
|
||||
|
||||
/* Subset sequence parameter set syntax, refer to Page 391 in JVT X201wcm */
|
||||
@ -109,9 +109,9 @@ typedef struct TagSubsetSps {
|
||||
SWelsSPS pSps;
|
||||
SSpsSvcExt sSpsSvcExt;
|
||||
|
||||
// bool_t bSvcVuiParamPresentFlag;
|
||||
// bool_t bAdditionalExtension2Flag;
|
||||
// bool_t bAdditionalExtension2DataFlag;
|
||||
// bool bSvcVuiParamPresentFlag;
|
||||
// bool bAdditionalExtension2Flag;
|
||||
// bool bAdditionalExtension2DataFlag;
|
||||
} SSubsetSps, *PSubsetSps;
|
||||
|
||||
/* Picture parameter set syntax, refer to Page 59 in JVT X201wcm */
|
||||
@ -129,7 +129,7 @@ uint32_t uiTopLeft[MAX_SLICEGROUP_IDS];
|
||||
uint32_t uiBottomRight[MAX_SLICEGROUP_IDS];
|
||||
/* uiSliceGroupMapType = 3, 4 or 5 */
|
||||
/* uiSliceGroupMapType = 3, 4 or 5 */
|
||||
bool_t bSliceGroupChangeDirectionFlag;
|
||||
bool bSliceGroupChangeDirectionFlag;
|
||||
uint32_t uiSliceGroupChangeRate;
|
||||
/* uiSliceGroupMapType = 6 */
|
||||
uint32_t uiPicSizeInMapUnits;
|
||||
@ -147,13 +147,13 @@ uint8_t uiChromaQpIndexOffset;
|
||||
// int32_t iSecondChromaQpIndexOffset;
|
||||
// /* potential application for High profile */
|
||||
|
||||
// bool_t bPicOrderPresentFlag;
|
||||
// bool bPicOrderPresentFlag;
|
||||
|
||||
bool_t bDeblockingFilterControlPresentFlag;
|
||||
bool bDeblockingFilterControlPresentFlag;
|
||||
|
||||
// bool_t bConstainedIntraPredFlag;
|
||||
// bool_t bRedundantPicCntPresentFlag;
|
||||
// bool_t bWeightedPredFlag;
|
||||
// bool bConstainedIntraPredFlag;
|
||||
// bool bRedundantPicCntPresentFlag;
|
||||
// bool bWeightedPredFlag;
|
||||
// uint8_t uiWeightedBiPredIdc;
|
||||
|
||||
} SWelsPPS, *PWelsPPPS;
|
||||
|
@ -72,8 +72,8 @@ typedef struct TagPicture {
|
||||
int32_t iMarkFrameNum;
|
||||
int32_t iLongTermPicNum;
|
||||
|
||||
bool_t bUsedAsRef; //for pRef pic management
|
||||
bool_t bIsLongRef; // long term reference frame flag //for pRef pic management
|
||||
bool bUsedAsRef; //for pRef pic management
|
||||
bool bIsLongRef; // long term reference frame flag //for pRef pic management
|
||||
uint8_t uiRecieveConfirmed;
|
||||
uint8_t uiTemporalId;
|
||||
uint8_t uiSpatialId;
|
||||
|
@ -52,7 +52,7 @@ namespace WelsSVCEnc {
|
||||
* \pram need_expand need borders expanding
|
||||
* \return successful if effective picture pointer returned, otherwise failed with NULL
|
||||
*/
|
||||
SPicture* AllocPicture (CMemoryAlign* pMa, const int32_t kiWidth, const int32_t kiHeight, bool_t bNeedMbInfo);
|
||||
SPicture* AllocPicture (CMemoryAlign* pMa, const int32_t kiWidth, const int32_t kiHeight, bool bNeedMbInfo);
|
||||
|
||||
/*!
|
||||
* \brief free picture pData planes
|
||||
|
@ -51,7 +51,7 @@ namespace WelsSVCEnc {
|
||||
* \param iSize size of pBuffer overall
|
||||
* \return actual size of pBuffer used; 0 returned in failure
|
||||
*/
|
||||
int32_t GetCodeName (str_t* pBuf, int32_t iSize);
|
||||
int32_t GetCodeName (char* pBuf, int32_t iSize);
|
||||
|
||||
/*!
|
||||
* \brief get library/module name
|
||||
@ -59,7 +59,7 @@ int32_t GetCodeName (str_t* pBuf, int32_t iSize);
|
||||
* \param iSize size of pBuffer overall
|
||||
* \return actual size of pBuffer used; 0 returned in failure
|
||||
*/
|
||||
int32_t GetLibName (str_t* pBuf, int32_t iSize);
|
||||
int32_t GetLibName (char* pBuf, int32_t iSize);
|
||||
|
||||
/*!
|
||||
* \brief get version number
|
||||
@ -67,7 +67,7 @@ int32_t GetLibName (str_t* pBuf, int32_t iSize);
|
||||
* \param iSize size of pBuffer overall
|
||||
* \return actual size of pBuffer used; 0 returned in failure
|
||||
*/
|
||||
int32_t GetVerNum (str_t* pBuf, int32_t iSize);
|
||||
int32_t GetVerNum (char* pBuf, int32_t iSize);
|
||||
|
||||
/*!
|
||||
* \brief get identify information
|
||||
@ -75,6 +75,6 @@ int32_t GetVerNum (str_t* pBuf, int32_t iSize);
|
||||
* \param iSize size of pBuffer overall
|
||||
* \return actual size of pBuffer used; 0 returned in failure
|
||||
*/
|
||||
int32_t GetIdentInfo (str_t* pBuf, int32_t iSize);
|
||||
int32_t GetIdentInfo (char* pBuf, int32_t iSize);
|
||||
}
|
||||
#endif//WELS_DECODER_PROPERTY_H__
|
||||
|
@ -77,11 +77,11 @@ void WelsResetRefList (sWelsEncCtx* pCtx);
|
||||
/*
|
||||
* update reference picture list
|
||||
*/
|
||||
BOOL_T WelsUpdateRefList (sWelsEncCtx* pCtx);
|
||||
bool WelsUpdateRefList (sWelsEncCtx* pCtx);
|
||||
/*
|
||||
* build reference picture list
|
||||
*/
|
||||
BOOL_T WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t kiPOC);
|
||||
bool WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t kiPOC);
|
||||
|
||||
/*
|
||||
* update syntax for reference base related
|
||||
@ -92,7 +92,7 @@ void WelsUpdateRefSyntax (sWelsEncCtx* pCtx, const int32_t kiPOC, const int32_t
|
||||
/*
|
||||
* check current mark iFrameNum used in LTR list or not
|
||||
*/
|
||||
bool_t CheckCurMarkFrameNumUsed (sWelsEncCtx* pCtx);
|
||||
bool CheckCurMarkFrameNumUsed (sWelsEncCtx* pCtx);
|
||||
/*
|
||||
* decide whether current frame include long term reference mark and update long term reference mark syntax
|
||||
*/
|
||||
|
@ -75,9 +75,9 @@ typedef struct TagRefPicMarking {
|
||||
|
||||
// int32_t mmco_index;
|
||||
uint8_t uiMmcoCount;
|
||||
bool_t bNoOutputOfPriorPicsFlag;
|
||||
bool_t bLongTermRefFlag;
|
||||
bool_t bAdaptiveRefPicMarkingModeFlag;
|
||||
bool bNoOutputOfPriorPicsFlag;
|
||||
bool bLongTermRefFlag;
|
||||
bool bAdaptiveRefPicMarkingModeFlag;
|
||||
} SRefPicMarking;
|
||||
|
||||
|
||||
@ -118,9 +118,9 @@ typedef struct TagSliceHeader {
|
||||
uint16_t uiIdrPicId;
|
||||
// uint8_t color_plane_id;//from?
|
||||
|
||||
bool_t bNumRefIdxActiveOverrideFlag;
|
||||
// bool_t field_pic_flag; //not supported in base profile
|
||||
// bool_t bottom_field_flag; //not supported in base profile
|
||||
bool bNumRefIdxActiveOverrideFlag;
|
||||
// bool field_pic_flag; //not supported in base profile
|
||||
// bool bottom_field_flag; //not supported in base profile
|
||||
uint8_t uiPadding1Bytes;
|
||||
|
||||
SRefPicMarking sRefMarking; // Decoded reference picture marking syntaxs
|
||||
@ -137,18 +137,18 @@ typedef struct TagSliceHeaderExt {
|
||||
|
||||
uint32_t uiNumMbsInSlice;
|
||||
|
||||
bool_t bStoreRefBasePicFlag;
|
||||
bool_t bConstrainedIntraResamplingFlag;
|
||||
bool_t bSliceSkipFlag;
|
||||
bool bStoreRefBasePicFlag;
|
||||
bool bConstrainedIntraResamplingFlag;
|
||||
bool bSliceSkipFlag;
|
||||
|
||||
bool_t bAdaptiveBaseModeFlag;
|
||||
bool_t bDefaultBaseModeFlag;
|
||||
bool_t bAdaptiveMotionPredFlag;
|
||||
bool_t bDefaultMotionPredFlag;
|
||||
bool bAdaptiveBaseModeFlag;
|
||||
bool bDefaultBaseModeFlag;
|
||||
bool bAdaptiveMotionPredFlag;
|
||||
bool bDefaultMotionPredFlag;
|
||||
|
||||
bool_t bAdaptiveResidualPredFlag;
|
||||
bool_t bDefaultResidualPredFlag;
|
||||
bool_t bTcoeffLevelPredFlag;
|
||||
bool bAdaptiveResidualPredFlag;
|
||||
bool bDefaultResidualPredFlag;
|
||||
bool bTcoeffLevelPredFlag;
|
||||
uint8_t uiDisableInterLayerDeblockingFilterIdc;
|
||||
|
||||
} SSliceHeaderExt, *PSliceHeaderExt;
|
||||
@ -170,10 +170,10 @@ typedef struct TagSlice {
|
||||
uint8_t sScaleShift;
|
||||
|
||||
uint8_t uiSliceIdx;
|
||||
bool_t bSliceHeaderExtFlag; // Indicate which slice header is used, avc or ext?
|
||||
bool bSliceHeaderExtFlag; // Indicate which slice header is used, avc or ext?
|
||||
uint8_t uiLastMbQp; // stored qp for last mb coded, maybe more efficient for mb skip detection etc.
|
||||
|
||||
bool_t bDynamicSlicingSliceSizeCtrlFlag;
|
||||
bool bDynamicSlicingSliceSizeCtrlFlag;
|
||||
uint8_t uiAssumeLog2BytePerMb;
|
||||
uint8_t uiReservedFillByte; // reserved to meet 4 bytes alignment
|
||||
} SSlice, *PSlice;
|
||||
|
@ -98,10 +98,10 @@ void ResetCountBsSizeInPartitions (uint32_t* pCountBsSizeList, const int32_t kiP
|
||||
|
||||
#ifdef _WIN32
|
||||
int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT* pEventsList, SLayerBSInfo* pLayerBsInfo,
|
||||
const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const BOOL_T kbIsDynamicSlicingMode);
|
||||
const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const bool kbIsDynamicSlicingMode);
|
||||
#else
|
||||
int32_t FiredSliceThreads (SSliceThreadPrivateData* pPriData, WELS_EVENT** ppEventsList, SLayerBSInfo* pLayerBsInfo,
|
||||
const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const BOOL_T kbIsDynamicSlicingMode);
|
||||
const uint32_t kuiNumThreads/*, int32_t *iLayerNum*/, SSliceCtx* pSliceCtx, const bool kbIsDynamicSlicingMode);
|
||||
#endif//_WIN32
|
||||
|
||||
int32_t DynamicDetectCpuCores();
|
||||
|
@ -56,8 +56,8 @@ int32_t WelsMdIntraFinePartitionVaa (void* pEncCtx, void* pWelsMd, SMB* pCurMb,
|
||||
|
||||
void WelsMdIntraMb (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
|
||||
void WelsMdBackgroundMbEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache, SSlice* pSlice, bool_t bSkipMbFlag);
|
||||
BOOL_T WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
void WelsMdBackgroundMbEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache, SSlice* pSlice, bool bSkipMbFlag);
|
||||
bool WelsMdPSkipEnc (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
int32_t WelsMdP16x16 (SWelsFuncPtrList* pFunc, SDqLayer* pCurDqLayer, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb);
|
||||
|
||||
int32_t WelsMdP16x8 (SWelsFuncPtrList* pFunc, SDqLayer* pCurDqLayer, SWelsMD* pWelsMd, SSlice* pSlice);
|
||||
@ -67,25 +67,25 @@ int32_t WelsMdP8x8 (SWelsFuncPtrList* pFunc, SDqLayer* pCurDqLayer, SWelsMD* pWe
|
||||
/*static*/ void WelsMdInterFinePartition (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, int32_t bestCost);
|
||||
/*static*/ void WelsMdInterFinePartitionVaa (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, int32_t bestCost);
|
||||
void WelsMdInterMbRefinement (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
BOOL_T WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
//BOOL_T svc_md_first_intra_mode_constrained(void* pEnc, void* pMd, SMB* pCurMb, SMbCache *pMbCache);
|
||||
bool WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
//bool svc_md_first_intra_mode_constrained(void* pEnc, void* pMd, SMB* pCurMb, SMbCache *pMbCache);
|
||||
void WelsMdInterMb (void* pEncCtx, void* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pUnused);
|
||||
|
||||
//both used in BL and EL
|
||||
//void wels_md_inter_init ( SWelsMD* pMd, const uint8_t ref_idx, const bool_t is_highest_dlayer_flag );
|
||||
//void wels_md_inter_init ( SWelsMD* pMd, const uint8_t ref_idx, const bool is_highest_dlayer_flag );
|
||||
|
||||
bool_t WelsMdInterJudgeBGDPskip (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
|
||||
BOOL_T* bKeepSkip);
|
||||
bool_t WelsMdInterJudgeBGDPskipFalse (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
|
||||
BOOL_T* bKeepSkip);
|
||||
bool WelsMdInterJudgeBGDPskip (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
|
||||
bool* bKeepSkip);
|
||||
bool WelsMdInterJudgeBGDPskipFalse (void* pEnc, void* pMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
|
||||
bool* bKeepSkip);
|
||||
|
||||
void WelsMdInterUpdateBGDInfo (SDqLayer* pCurLayer, SMB* pCurMb, const bool_t kbCollocatedPredFlag,
|
||||
void WelsMdInterUpdateBGDInfo (SDqLayer* pCurLayer, SMB* pCurMb, const bool kbCollocatedPredFlag,
|
||||
const int32_t kiRefPictureType);
|
||||
void WelsMdInterUpdateBGDInfoNULL (SDqLayer* pCurLayer, SMB* pCurMb, const bool_t kbCollocatedPredFlag,
|
||||
void WelsMdInterUpdateBGDInfoNULL (SDqLayer* pCurLayer, SMB* pCurMb, const bool kbCollocatedPredFlag,
|
||||
const int32_t kiRefPictureType);
|
||||
|
||||
bool_t WelsMdInterJudgePskip (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
|
||||
BOOL_T bTrySkip);
|
||||
bool WelsMdInterJudgePskip (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache,
|
||||
bool bTrySkip);
|
||||
void WelsMdInterUpdatePskip (SDqLayer* pCurDqLayer, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache);
|
||||
void WelsMdInterDecidedPskip (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache);
|
||||
|
||||
@ -96,7 +96,7 @@ void WelsMdInterSaveSadAndRefMbType (Mb_Type* pRefMbTypeList, SMbCache* pMbCache
|
||||
const SWelsMD* kpMd);
|
||||
|
||||
void WelsMdInterSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb,
|
||||
SMbCache* pMbCache, const BOOL_T kbSkip);
|
||||
SMbCache* pMbCache, const bool kbSkip);
|
||||
void WelsMdIntraSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
//end of: both used in BL and EL
|
||||
|
||||
|
@ -84,14 +84,14 @@ struct TagDqLayer {
|
||||
int16_t iMbWidth; // MB width of this picture, equal to pSps.iMbWidth
|
||||
int16_t iMbHeight; // MB height of this picture, equal to pSps.iMbHeight;
|
||||
|
||||
bool_t bBaseLayerAvailableFlag; // whether base layer is available for prediction?
|
||||
bool bBaseLayerAvailableFlag; // whether base layer is available for prediction?
|
||||
uint8_t iLoopFilterDisableIdc; // 0: on, 1: off, 2: on except for slice boundaries
|
||||
int8_t iLoopFilterAlphaC0Offset;// AlphaOffset: valid range [-6, 6], default 0
|
||||
int8_t iLoopFilterBetaOffset; // BetaOffset: valid range [-6, 6], default 0
|
||||
uint8_t uiDisableInterLayerDeblockingFilterIdc;
|
||||
int8_t iInterLayerSliceAlphaC0Offset;
|
||||
int8_t iInterLayerSliceBetaOffset;
|
||||
bool_t bDeblockingParallelFlag; //parallel_deblocking_flag
|
||||
bool bDeblockingParallelFlag; //parallel_deblocking_flag
|
||||
|
||||
SPicture* pRefPic; // reference picture pointer
|
||||
SPicture* pDecPic; // reconstruction picture pointer for layer
|
||||
|
@ -237,7 +237,7 @@ BsFlush (pBs);
|
||||
}
|
||||
|
||||
|
||||
static inline BOOL_T BsCheckByteAlign (SBitStringAux* pBs) {
|
||||
static inline bool BsCheckByteAlign (SBitStringAux* pBs) {
|
||||
return ! (pBs->iLeftBits & 0x7);
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ int32_t iMbSkipRunStack;
|
||||
*/
|
||||
int32_t InitSlicePEncCtx (SSliceCtx* pSliceCtx,
|
||||
CMemoryAlign* pMa,
|
||||
bool_t bFmoUseFlag,
|
||||
bool bFmoUseFlag,
|
||||
int32_t iMbWidth,
|
||||
int32_t iMbHeight,
|
||||
SMulSliceOption* pMulSliceOption,
|
||||
@ -212,9 +212,9 @@ int32_t GetCurrentSliceNum (const SSliceCtx* kpSliceCtx);
|
||||
//checking valid para
|
||||
int32_t DynamicMaxSliceNumConstraint (uint32_t uiMaximumNum, int32_t uiConsumedNum, uint32_t uiDulplicateTimes);
|
||||
|
||||
bool_t CheckFixedSliceNumMultiSliceSetting (const int32_t kiMbNumInFrame, SSliceArgument* pSliceArg);
|
||||
bool_t CheckRasterMultiSliceSetting (const int32_t kiMbNumInFrame, SSliceArgument* pSliceArg);
|
||||
bool_t CheckRowMbMultiSliceSetting (const int32_t kiMbWidth, SSliceArgument* pSliceArg);
|
||||
bool CheckFixedSliceNumMultiSliceSetting (const int32_t kiMbNumInFrame, SSliceArgument* pSliceArg);
|
||||
bool CheckRasterMultiSliceSetting (const int32_t kiMbNumInFrame, SSliceArgument* pSliceArg);
|
||||
bool CheckRowMbMultiSliceSetting (const int32_t kiMbWidth, SSliceArgument* pSliceArg);
|
||||
|
||||
void GomValidCheckSliceNum (const int32_t kiMbWidth, const int32_t kiMbHeight, int32_t* pSliceNum);
|
||||
void GomValidCheckSliceMbNum (const int32_t kiMbWidth, const int32_t kiMbHeight, SSliceArgument* pSliceArg);
|
||||
|
@ -57,8 +57,8 @@ void WelsEncInterY (SWelsFuncPtrList* func, SMB* pCurMb, SMbCache* pMbCache);
|
||||
void WelsEncRecUV (SWelsFuncPtrList* func, SMB* pCurMb, SMbCache* pMbCache, int16_t* pRs, int32_t iUV);
|
||||
void WelsRecPskip (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, SMB* pCurMb, SMbCache* pMbCache);
|
||||
|
||||
BOOL_T WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache);
|
||||
BOOL_T WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV);
|
||||
bool WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache);
|
||||
bool WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iUV);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -72,8 +72,8 @@ void WelsPMbChromaEncode (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb);
|
||||
|
||||
//===================MB-level encode====================//
|
||||
//encapsulation func: store base rec, highest Dependency Layer(only one quality) rec, single layer rec
|
||||
void WelsPSliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice, const bool_t kbIsHighestDlayerFlag);
|
||||
void WelsPSliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice, const bool_t kbIsHighestDlayerFlag);
|
||||
void WelsPSliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice, const bool kbIsHighestDlayerFlag);
|
||||
void WelsPSliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice, const bool kbIsHighestDlayerFlag);
|
||||
|
||||
//encapsulation func: store base rec, highest Dependency Layer(only one quality) rec, single layer rec
|
||||
void WelsISliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice); // for intra non-dynamic slice
|
||||
@ -83,7 +83,7 @@ void WelsCodePSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice);
|
||||
void WelsCodePOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice);
|
||||
|
||||
void WelsCodeOneSlice (sWelsEncCtx* pEncCtx, const int32_t kiSliceIdx,
|
||||
const int32_t/*EWelsNalUnitType*/ keNalType/*, bool_t bNewLayer*/);
|
||||
const int32_t/*EWelsNalUnitType*/ keNalType/*, bool bNewLayer*/);
|
||||
|
||||
void WelsInitSliceEncodingFuncs (uint32_t uiCpuFlag);
|
||||
|
||||
@ -99,7 +99,7 @@ void WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, vo
|
||||
const int32_t kiSliceFirstMbXY); // for inter dynamic slice
|
||||
|
||||
|
||||
BOOL_T DynSlcJudgeSliceBoundaryStepBack (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
|
||||
bool DynSlcJudgeSliceBoundaryStepBack (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
|
||||
SDynamicSlicingStack* pDss);
|
||||
}
|
||||
#endif //SVC_ENCODE_SLICE_H__
|
||||
|
@ -127,7 +127,7 @@ void WelsMotionEstimateInitialPoint (SWelsFuncPtrList* pFuncList, SWelsME* pMe,
|
||||
void WelsMotionEstimateIterativeSearch (SWelsFuncPtrList* pFuncList, SWelsME* pMe, const int32_t kiStrideEnc,
|
||||
const int32_t kiStrideRef, uint8_t* pRef);
|
||||
|
||||
bool_t WelsMeSadCostSelect (int32_t* pSadCost, const uint16_t* kpMvdCost, int32_t* pBestCost, const int32_t kiDx,
|
||||
bool WelsMeSadCostSelect (int32_t* pSadCost, const uint16_t* kpMvdCost, int32_t* pBestCost, const int32_t kiDx,
|
||||
const int32_t kiDy, int32_t* pIx, int32_t* pIy);
|
||||
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ WELS_LOG_DEFAULT = WELS_LOG_ERROR | WELS_LOG_WARNING | WELS_LOG_INFO | WELS_LOG_
|
||||
* Function pointer declaration for various tool sets
|
||||
*/
|
||||
// wels log output
|
||||
typedef void (*PWelsLogCallbackFunc) (void* pCtx, const int32_t iLevel, const str_t* kpFmt, va_list argv);
|
||||
typedef void (*PWelsLogCallbackFunc) (void* pCtx, const int32_t iLevel, const char* kpFmt, va_list argv);
|
||||
|
||||
// wels psnr calc
|
||||
typedef float (*PWelsPsnrFunc) (const void* kpTarPic,
|
||||
@ -78,13 +78,13 @@ typedef float (*PWelsPsnrFunc) (const void* kpTarPic,
|
||||
extern PWelsLogCallbackFunc wlog;
|
||||
|
||||
#ifdef __GNUC__
|
||||
extern void WelsLog (void* pCtx, int32_t iLevel, const str_t* kpFmt, ...) __attribute__ ((__format__ (__printf__, 3,
|
||||
extern void WelsLog (void* pCtx, int32_t iLevel, const char* kpFmt, ...) __attribute__ ((__format__ (__printf__, 3,
|
||||
4)));
|
||||
#else
|
||||
extern void WelsLog (void* pCtx, int32_t iLevel, const str_t* kpFmt, ...);
|
||||
extern void WelsLog (void* pCtx, int32_t iLevel, const char* kpFmt, ...);
|
||||
#endif
|
||||
|
||||
extern const str_t* g_sWelsLogTags[];
|
||||
extern const char* g_sWelsLogTags[];
|
||||
|
||||
/*!
|
||||
*************************************************************************************
|
||||
@ -100,8 +100,8 @@ extern const str_t* g_sWelsLogTags[];
|
||||
* \note N/A
|
||||
*************************************************************************************
|
||||
*/
|
||||
void WelsLogDefault (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, va_list argv);
|
||||
void WelsLogNil (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, va_list argv);
|
||||
void WelsLogDefault (void* pCtx, const int32_t kiLevel, const char* kpFmtStr, va_list argv);
|
||||
void WelsLogNil (void* pCtx, const int32_t kiLevel, const char* kpFmtStr, va_list argv);
|
||||
|
||||
|
||||
/*!
|
||||
@ -155,7 +155,7 @@ void WelsSetLogCallback (PWelsLogCallbackFunc _log);
|
||||
* \note N/A
|
||||
*************************************************************************************
|
||||
*/
|
||||
void WelsReopenTraceFile (void* pCtx, str_t* pCurPath);
|
||||
void WelsReopenTraceFile (void* pCtx, char* pCurPath);
|
||||
|
||||
/*
|
||||
* PSNR calculation routines
|
||||
|
@ -199,7 +199,7 @@ int8_t iRefIndexCache[5 * 6]; // Luma only: 5 x 6 = 30 bytes
|
||||
typedef struct TagParaSetOffsetVariable {
|
||||
int32_t iParaSetIdDelta[MAX_DQ_LAYER_NUM/*+1*/]; //mark delta between SPS_ID_in_bs and sps_id_in_encoder, can be minus, for each dq-layer
|
||||
//need not extra +1 due no MGS and FMO case so far
|
||||
bool_t bUsedParaSetIdInBs[MAX_PPS_COUNT]; //mark the used SPS_ID with 1
|
||||
bool bUsedParaSetIdInBs[MAX_PPS_COUNT]; //mark the used SPS_ID with 1
|
||||
uint32_t uiNextParaSetIdToUseInBs; //mark the next SPS_ID_in_bs, for all layers
|
||||
} SParaSetOffsetVariable;
|
||||
|
||||
@ -208,12 +208,12 @@ typedef struct TagParaSetOffset {
|
||||
SParaSetOffsetVariable
|
||||
sParaSetOffsetVariable[PARA_SET_TYPE]; //PARA_SET_TYPE=3; paraset_type = 0: AVC_SPS; =1: Subset_SPS; =2: PPS
|
||||
//in PSO design, "bPpsIdMappingIntoSubsetsps" uses the current para of current IDR period
|
||||
bool_t
|
||||
bool
|
||||
bPpsIdMappingIntoSubsetsps[MAX_DQ_LAYER_NUM/*+1*/]; // need not extra +1 due no MGS and FMO case so far
|
||||
uint16_t
|
||||
uiIdrPicId; // IDR picture id: [0, 65535], this one is used for LTR!! Can we just NOT put this into the SParaSetOffset structure?!!
|
||||
#if _DEBUG
|
||||
bool_t bEnableSpsPpsIdAddition;
|
||||
bool bEnableSpsPpsIdAddition;
|
||||
#endif
|
||||
} SParaSetOffset;
|
||||
|
||||
@ -311,7 +311,7 @@ typedef uint32_t Mb_Type;
|
||||
#define MB_TYPE_UNAVAILABLE 0xFF000000
|
||||
#define REF_NOT_AVAIL -2
|
||||
#define REF_NOT_IN_LIST -1 //intra
|
||||
#define REF_PIC_REORDER_DEFAULT TRUE
|
||||
#define REF_PIC_REORDER_DEFAULT true
|
||||
|
||||
#define IS_INTRA4x4(type) ( MB_TYPE_INTRA4x4 == (type) )
|
||||
#define IS_INTRA16x16(type) ( MB_TYPE_INTRA16x16 == (type) )
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
// Miscellaneous sizing infos
|
||||
#ifndef MAX_FNAME_LEN
|
||||
#define MAX_FNAME_LEN 256 // maximal length of file name in str_t size
|
||||
#define MAX_FNAME_LEN 256 // maximal length of file name in char size
|
||||
#endif//MAX_FNAME_LEN
|
||||
|
||||
#ifndef WELS_LOG_BUF_SIZE
|
||||
|
@ -110,19 +110,19 @@ typedef void (*PSetNoneZeroCountZeroFunc) (int8_t* pNonZeroCount);
|
||||
|
||||
typedef int32_t (*PIntraFineMdFunc) (void* pEncCtx, void* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
typedef void (*PInterFineMdFunc) (void* pEncCtx, void* pWelsMd, SSlice* slice, SMB* pCurMb, int32_t bestCost);
|
||||
typedef BOOL_T (*PInterMdFirstIntraModeFunc) (void* pEncCtx, void* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
typedef bool (*PInterMdFirstIntraModeFunc) (void* pEncCtx, void* pWelsMd, SMB* pCurMb, SMbCache* pMbCache);
|
||||
|
||||
typedef void (*PMotionSearchFunc) (SWelsFuncPtrList* pFuncList, void* pCurDqLayer, void* pMe,
|
||||
void* pSlice); // here after reset all function pointers, will set as right parameter type
|
||||
typedef void (*PFillInterNeighborCacheFunc) (SMbCache* pMbCache, SMB* pCurMb, int32_t iMbWidth, int8_t* pVaaBgMbFlag);
|
||||
typedef void (*PAccumulateSadFunc) (uint32_t* pSumDiff, int32_t* pGomForegroundBlockNum, int32_t* iSad8x8,
|
||||
int8_t* pVaaBgMbFlag);//for RC
|
||||
typedef BOOL_T (*PDynamicSlicingStepBackFunc) (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
|
||||
typedef bool (*PDynamicSlicingStepBackFunc) (void* pEncCtx, void* pSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
|
||||
SDynamicSlicingStack* pDynamicSlicingStack); // 2010.8.17
|
||||
|
||||
typedef bool_t (*PInterMdBackgroundDecisionFunc) (void* pEncCtx, void* pWelsMd, SSlice* slice, SMB* pCurMb,
|
||||
SMbCache* pMbCache, BOOL_T* pKeepPskip);
|
||||
typedef void (*PInterMdBackgroundInfoUpdateFunc) (SDqLayer* pCurLayer, SMB* pCurMb, const bool_t bFlag,
|
||||
typedef bool (*PInterMdBackgroundDecisionFunc) (void* pEncCtx, void* pWelsMd, SSlice* slice, SMB* pCurMb,
|
||||
SMbCache* pMbCache, bool* pKeepPskip);
|
||||
typedef void (*PInterMdBackgroundInfoUpdateFunc) (SDqLayer* pCurLayer, SMB* pCurMb, const bool bFlag,
|
||||
const int32_t kiRefPictureType);
|
||||
|
||||
typedef void (*PInterMdFunc) (void* pEncCtx, void* pWelsMd, SSlice* slice, SMB* pCurMb, SMbCache* pMbCache);
|
||||
|
@ -79,8 +79,8 @@ typedef struct {
|
||||
uint8_t uiValidLongTermPicIdx;
|
||||
uint8_t uiMarkLongTermPicIdx;
|
||||
|
||||
bool_t bSceneChangeFlag;
|
||||
bool_t bIdrPeriodFlag;
|
||||
bool bSceneChangeFlag;
|
||||
bool bIdrPeriodFlag;
|
||||
} SVAAFrameInfo;
|
||||
|
||||
class CWelsLib {
|
||||
@ -92,7 +92,7 @@ class CWelsLib {
|
||||
int32_t DestroyIface (void* pEncCtx);
|
||||
|
||||
protected:
|
||||
void* QueryFunction (const str_t* pName);
|
||||
void* QueryFunction (const char* pName);
|
||||
|
||||
private:
|
||||
void* m_pVpLib;
|
||||
@ -119,16 +119,16 @@ class CWelsPreProcess {
|
||||
int32_t MultiLayerPreprocess (void* pEncCtx, const SSourcePicture** kppSrcPicList, const int32_t kiSpatialNum);
|
||||
|
||||
void BilateralDenoising (SPicture* pSrc, const int32_t iWidth, const int32_t iHeight);
|
||||
bool_t DetectSceneChange (SPicture* pCurPicture, SPicture* pRefPicture);
|
||||
bool DetectSceneChange (SPicture* pCurPicture, SPicture* pRefPicture);
|
||||
int32_t DownsamplePadding (SPicture* pSrc, SPicture* pDstPic, int32_t iSrcWidth, int32_t iSrcHeight,
|
||||
int32_t iShrinkWidth, int32_t iShrinkHeight, int32_t iTargetWidth, int32_t iTargetHeight);
|
||||
|
||||
void VaaCalculation (SVAAFrameInfo* pVaaInfo, SPicture* pCurPicture, SPicture* pRefPicture, bool_t bCalculateSQDiff,
|
||||
bool_t bCalculateVar, bool_t bCalculateBGD);
|
||||
void BackgroundDetection (SVAAFrameInfo* pVaaInfo, SPicture* pCurPicture, SPicture* pRefPicture, bool_t bDetectFlag);
|
||||
void VaaCalculation (SVAAFrameInfo* pVaaInfo, SPicture* pCurPicture, SPicture* pRefPicture, bool bCalculateSQDiff,
|
||||
bool bCalculateVar, bool bCalculateBGD);
|
||||
void BackgroundDetection (SVAAFrameInfo* pVaaInfo, SPicture* pCurPicture, SPicture* pRefPicture, bool bDetectFlag);
|
||||
void AdaptiveQuantCalculation (SVAAFrameInfo* pVaaInfo, SPicture* pCurPicture, SPicture* pRefPicture);
|
||||
void AnalyzePictureComplexity (void* pCtx, SPicture* pCurPicture, SPicture* pRefPicture,
|
||||
const int32_t kiDependencyId, const bool_t kbCalculateBGD);
|
||||
const int32_t kiDependencyId, const bool kbCalculateBGD);
|
||||
void Padding (uint8_t* pSrcY, uint8_t* pSrcU, uint8_t* pSrcV, int32_t iStrideY, int32_t iStrideUV,
|
||||
int32_t iActualWidth, int32_t iPaddingWidth, int32_t iActualHeight, int32_t iPaddingHeight);
|
||||
void SetRefMbType (void* pCtx, uint32_t** pRefMbTypeArray, int32_t iRefPicType);
|
||||
@ -144,8 +144,8 @@ class CWelsPreProcess {
|
||||
IWelsVP* m_pInterfaceVp;
|
||||
CWelsLib* m_pEncLib;
|
||||
void* m_pEncCtx;
|
||||
bool_t m_bInitDone;
|
||||
bool_t m_bOfficialBranch;
|
||||
bool m_bInitDone;
|
||||
bool m_bOfficialBranch;
|
||||
};
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user