#ifndef WELS_DECODER_SYSTEM_ARCHITECTURE_H__
#define WELS_DECODER_SYSTEM_ARCHITECTURE_H__
#include "typedefs.h"
#include "decoder_context.h"
namespace WelsDec {
#ifdef __cplusplus
extern "C" {
#endif
int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpParam);
void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx);
void WelsDecoderLastDecPicInfoDefaults (SWelsLastDecPicInfo& sLastDecPicInfo);
void WelsDecoderSpsPpsDefaults (SWelsDecoderSpsPpsCTX& sSpsPpsCtx);
void CopySpsPps (PWelsDecoderContext pFromCtx, PWelsDecoderContext pToCtx);
int32_t WelsInitDecoder (PWelsDecoderContext pCtx, SLogContext* pLogCtx);
void WelsEndDecoder (PWelsDecoderContext pCtx);
int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const int32_t kiBsLen,
uint8_t** ppDst, SBufferInfo* pDstBufInfo, SParserBsInfo* pDstBsInfo);
int32_t WelsRequestMem (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const int32_t kiMbHeight,
bool& bReallocFlag);
void WelsFreeDynamicMemory (PWelsDecoderContext pCtx);
int32_t SyncPictureResolutionExt (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const int32_t kiMbHeight);
void InitPredFunc (PWelsDecoderContext pCtx, uint32_t uiCpuFlag);
void InitDecFuncs (PWelsDecoderContext pCtx, uint32_t uiCpuFlag);
void GetVclNalTemporalId (PWelsDecoderContext pCtx);
void ResetDecStatNums (SDecoderStatistics* pDecStat);
void UpdateDecStatFreezingInfo (const bool kbIdrFlag, SDecoderStatistics* pDecStat);
void UpdateDecStatNoFreezingInfo (PWelsDecoderContext pCtx);
void UpdateDecStat (PWelsDecoderContext pCtx, const bool kbOutput);
void DestroyPicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, CMemoryAlign* pMa);
void ResetReorderingPictureBuffers (PPictReoderingStatus pPictReoderingStatus, PPictInfo pPictInfo,
const bool& bFullReset);
#ifdef __cplusplus
}
#endif
}
#endif