#if !defined(WELS_CORE_ENCODER_H__)
#define WELS_CORE_ENCODER_H__
#include "encoder_context.h"
namespace WelsEnc {
int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingParasetList);
void FreeMemorySvc (sWelsEncCtx** ppCtx);
int32_t AllocateBsOutputBuffer (CMemoryAlign* pMa, const int32_t iNeededLen, int32_t iOrigLen, const char* kpTag,
uint8_t*& pOutputBuffer);
int32_t InitFunctionPointers (sWelsEncCtx* pEncCtx, SWelsSvcCodingParam* _param, uint32_t uiCpuFlag);
void InitFrameCoding (sWelsEncCtx* pEncCtx, const EVideoFrameType keFrameType, const int32_t kiDidx);
void LoadBackFrameNum (sWelsEncCtx* pEncCtx, const int32_t kiDidx);
EVideoFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum, const int32_t kiDidx,
bool bSkipFrameFlag);
void InitBitStream (sWelsEncCtx* pEncCtx);
int32_t GetTemporalLevel (SSpatialLayerInternal* fDlp, const int32_t kiFrameNum, const int32_t kiGopSize);
extern "C" void DumpDependencyRec (SPicture* pSrcPic, const char* kpFileName, const int8_t kiDid, bool bAppend,
SDqLayer* pDqLayer, bool bSimulCastAVC);
void DumpRecFrame (SPicture* pSrcPic, const char* kpFileName, const int8_t kiDid, bool bAppend, SDqLayer* pDqLayer);
int32_t EncodeFrame (sWelsEncCtx* pEncCtx,
const int32_t kiSliceNumCount,
const EWelsNalUnitType keNalType,
const EWelsNalRefIdc keNalIdc);
void WelsSetMemZero_c (void* pDst, int32_t iSize);
#if defined(__cplusplus)
extern "C" {
#endif
#ifdef X86_ASM
void WelsSetMemZeroAligned64_sse2 (void* pDst, int32_t iSize);
void WelsSetMemZeroSize64_mmx (void* pDst, int32_t iSize);
void WelsSetMemZeroSize8_mmx (void* pDst, int32_t iSize);
void WelsPrefetchZero_mmx (int8_t const* kpDst);
#elif defined(HAVE_NEON)
void WelsSetMemZero_neon (void* pDst, int32_t iSize);
#elif defined(HAVE_NEON_AARCH64) && defined(__aarch64__)
void WelsSetMemZero_AArch64_neon (void* pDst, int32_t iSize);
#endif
#if defined(__cplusplus)
}
#endif
}
#endif