History

setget_dataformat_ut

huili2 committed 12 years ago

Commit e8fdd4c1 parent d0d68428 files · +57 −20Browse files

Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 8 files). Show all

Unified · Split

codec/decoder/core/src/decoder.cpp+10−4
@@ -134,7 +134,7 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx) { · 133 unmodified lines
134134
135135 pCtx->pArgDec = NULL;
136136
137− pCtx->iOutputColorFormat = videoFormatI420; // yuv in default
137+ pCtx->eOutputColorFormat = videoFormatI420; // yuv in default
138138 pCtx->bHaveGotMemory = false; // not ever request memory blocks for decoder context related
139139 pCtx->uiCpuFlag = 0;
140140
@@ -331,7 +331,7 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpPa · 190 unmodified lines
331331 return 1;
332332
333333 memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam));
334− pCtx->iOutputColorFormat = pCtx->pParam->iOutputColorFormat;
334+ pCtx->eOutputColorFormat = pCtx->pParam->eOutputColorFormat;
335335 pCtx->eErrorConMethod = pCtx->pParam->eEcActiveIdc;
336336
337337 if (VIDEO_BITSTREAM_SVC == pCtx->pParam->sVideoProperty.eVideoBsType ||
@@ -589,9 +589,15 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 251 unmodified lines
589589 int32_t DecoderSetCsp (PWelsDecoderContext pCtx, const int32_t kiColorFormat) {
590590 WELS_VERIFY_RETURN_IF (1, (NULL == pCtx));
591591
592− pCtx->iOutputColorFormat = kiColorFormat;
592+ pCtx->eOutputColorFormat = (EVideoFormatType) kiColorFormat;
593593 if (pCtx->pParam != NULL) {
594− pCtx->pParam->iOutputColorFormat = kiColorFormat;
594+ pCtx->pParam->eOutputColorFormat = (EVideoFormatType) kiColorFormat;
595+ }
596+
597+ //For now, support only videoFormatI420!
598+ if (kiColorFormat != (int32_t) videoFormatI420) {
599+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "Support I420 output only for now! Change to I420...\n");
600+ pCtx->pParam->eOutputColorFormat = pCtx->eOutputColorFormat = videoFormatI420;
595601 }
596602
597603 return 0;

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