Showing the changes to codec/decoder (2 of 6 files). Show all
Unified · Split
| @@ -64,7 +64,7 @@ class CWelsDecoder : public ISVCDecoder { · 63 unmodified lines | |||
| 64 | 64 | ||
| 65 | /*************************************************************************** | 65 | /*************************************************************************** |
| 66 | * Description: | 66 | * Description: |
| 67 | * Decompress one frame, and output RGB24 or YV12 decoded stream and its length. | 67 | * Decompress one frame, and output I420 or RGB24(in the future) decoded stream and its length. |
| 68 | * Input parameters: | 68 | * Input parameters: |
| 69 | * Parameter TYPE Description | 69 | * Parameter TYPE Description |
| 70 | * pSrc unsigned char* the h264 stream to decode | 70 | * pSrc unsigned char* the h264 stream to decode |
| @@ -83,7 +83,7 @@ class CWelsDecoder : public ISVCDecoder { · 12 unmodified lines | |||
| 83 | 83 | ||
| 84 | virtual DECODING_STATE EXTAPI DecodeFrame2 (const unsigned char* kpSrc, | 84 | virtual DECODING_STATE EXTAPI DecodeFrame2 (const unsigned char* kpSrc, |
| 85 | const int kiSrcLen, | 85 | const int kiSrcLen, |
| 86 | void** ppDst, | 86 | unsigned char** ppDst, |
| 87 | SBufferInfo* pDstInfo); | 87 | SBufferInfo* pDstInfo); |
| 88 | virtual DECODING_STATE EXTAPI DecodeFrameEx (const unsigned char* kpSrc, | 88 | virtual DECODING_STATE EXTAPI DecodeFrameEx (const unsigned char* kpSrc, |
| 89 | const int kiSrcLen, | 89 | const int kiSrcLen, |
| @@ -320,7 +320,7 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) { · 319 unmodified lines | |||
| 320 | 320 | ||
| 321 | DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, | 321 | DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, |
| 322 | const int kiSrcLen, | 322 | const int kiSrcLen, |
| 323 | void** ppDst, | 323 | unsigned char** ppDst, |
| 324 | SBufferInfo* pDstInfo) { | 324 | SBufferInfo* pDstInfo) { |
| 325 | if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY - MAX_MACROBLOCK_CAPACITY) {//prevent from residual reading overflow | 325 | if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY - MAX_MACROBLOCK_CAPACITY) {//prevent from residual reading overflow |
| 326 | m_pDecContext->iErrorCode |= dsOutOfMemory; | 326 | m_pDecContext->iErrorCode |= dsOutOfMemory; |
| @@ -361,7 +361,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 34 unmodified lines | |||
| 361 | 361 | ||
| 362 | m_pDecContext->iFeedbackTidInAu = -1; //initialize | 362 | m_pDecContext->iFeedbackTidInAu = -1; //initialize |
| 363 | 363 | ||
| 364 | WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, (unsigned char**)ppDst, | 364 | WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, ppDst, |
| 365 | pDstInfo); //iErrorCode has been modified in this function | 365 | pDstInfo); //iErrorCode has been modified in this function |
| 366 | 366 | ||
| 367 | if (m_pDecContext->iErrorCode) { | 367 | if (m_pDecContext->iErrorCode) { |
| @@ -406,7 +406,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame (const unsigned char* kpSrc, · 38 unmodified lines | |||
| 406 | DstInfo.UsrData.sSystemBuffer.iWidth = iWidth; | 406 | DstInfo.UsrData.sSystemBuffer.iWidth = iWidth; |
| 407 | DstInfo.UsrData.sSystemBuffer.iHeight = iHeight; | 407 | DstInfo.UsrData.sSystemBuffer.iHeight = iHeight; |
| 408 | 408 | ||
| 409 | eDecState = DecodeFrame2 (kpSrc, kiSrcLen, (void**)ppDst, &DstInfo); | 409 | eDecState = DecodeFrame2 (kpSrc, kiSrcLen, ppDst, &DstInfo); |
| 410 | if (eDecState == dsErrorFree) { | 410 | if (eDecState == dsErrorFree) { |
| 411 | pStride[0] = DstInfo.UsrData.sSystemBuffer.iStride[0]; | 411 | pStride[0] = DstInfo.UsrData.sSystemBuffer.iStride[0]; |
| 412 | pStride[1] = DstInfo.UsrData.sSystemBuffer.iStride[1]; | 412 | pStride[1] = DstInfo.UsrData.sSystemBuffer.iStride[1]; |