597 lines · 19.4 KB · C++
RawDownload
    const int kiSrcLen,    SParserBsInfo* pDstInfo) {//TODO, add function here  return (DECODING_STATE) m_pDecContext->iErrorCode;} DECODING_STATE CWelsDecoder::DecodeFrame (const unsigned char* kpSrc,    const int kiSrcLen,    unsigned char** ppDst,    int* pStride,    int& iWidth,    int& iHeight) {  DECODING_STATE eDecState = dsErrorFree;  SBufferInfo    DstInfo;   memset (&DstInfo, 0, sizeof (SBufferInfo));  DstInfo.UsrData.sSystemBuffer.iStride[0] = pStride[0];  DstInfo.UsrData.sSystemBuffer.iStride[1] = pStride[1];  DstInfo.UsrData.sSystemBuffer.iWidth = iWidth;  DstInfo.UsrData.sSystemBuffer.iHeight = iHeight;   eDecState = DecodeFrame2 (kpSrc, kiSrcLen, ppDst, &DstInfo);  if (eDecState == dsErrorFree) {    pStride[0] = DstInfo.UsrData.sSystemBuffer.iStride[0];    pStride[1] = DstInfo.UsrData.sSystemBuffer.iStride[1];    iWidth     = DstInfo.UsrData.sSystemBuffer.iWidth;    iHeight    = DstInfo.UsrData.sSystemBuffer.iHeight;  }   return eDecState;} DECODING_STATE CWelsDecoder::DecodeFrameEx (const unsigned char* kpSrc,    const int kiSrcLen,    unsigned char* pDst,    int iDstStride,    int& iDstLen,    int& iWidth,    int& iHeight,    int& iColorFormat) {  DECODING_STATE	 state = dsErrorFree;   return state;}  } // namespace WelsDec  using namespace WelsDec;/**       WelsGetDecoderCapability*       @return: DecCapability information*/int WelsGetDecoderCapability (SDecoderCapability* pDecCapability) {  memset (pDecCapability, 0, sizeof (SDecoderCapability));  pDecCapability->iProfileIdc = 66; //Baseline  pDecCapability->iProfileIop = 0xE0; //11100000b  pDecCapability->iLevelIdc = 32; //level_idc = 3.2  pDecCapability->iMaxMbps = 216000; //from level_idc = 3.2  pDecCapability->iMaxFs = 5120; //from level_idc = 3.2  pDecCapability->iMaxCpb = 20000; //from level_idc = 3.2  pDecCapability->iMaxDpb = 20480; //from level_idc = 3.2  pDecCapability->iMaxBr = 20000; //from level_idc = 3.2  pDecCapability->bRedPicCap = 0; //not support redundant pic   return ERR_NONE;}/* WINAPI is indeed in prefix due to sync to application layer callings!! */ /**	WelsCreateDecoder*	@return:	success in return 0, otherwise failed.*/long WelsCreateDecoder (ISVCDecoder** ppDecoder) {   if (NULL == ppDecoder) {    return ERR_INVALID_PARAMETERS;  }   *ppDecoder	= new CWelsDecoder();   if (NULL == *ppDecoder) {    return ERR_MALLOC_FAILED;  }   return ERR_NONE;} /**	WelsDestroyDecoder*/void WelsDestroyDecoder (ISVCDecoder* pDecoder) {  if (NULL != pDecoder) {    delete (CWelsDecoder*)pDecoder;  }}

Lines 501–597 of 597. Previous lines

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t