disable color format check for parse only
This commit is contained in:
@@ -516,9 +516,11 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpPa
|
|||||||
|
|
||||||
memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam));
|
memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam));
|
||||||
pCtx->eOutputColorFormat = pCtx->pParam->eOutputColorFormat;
|
pCtx->eOutputColorFormat = pCtx->pParam->eOutputColorFormat;
|
||||||
int32_t iRet = DecoderSetCsp (pCtx, pCtx->pParam->eOutputColorFormat);
|
if (!pCtx->bParseOnly) {
|
||||||
if (iRet)
|
int32_t iRet = DecoderSetCsp (pCtx, pCtx->pParam->eOutputColorFormat);
|
||||||
return iRet;
|
if (iRet)
|
||||||
|
return iRet;
|
||||||
|
}
|
||||||
pCtx->eErrorConMethod = pCtx->pParam->eEcActiveIdc;
|
pCtx->eErrorConMethod = pCtx->pParam->eEcActiveIdc;
|
||||||
|
|
||||||
if (pCtx->bParseOnly) //parse only, disable EC method
|
if (pCtx->bParseOnly) //parse only, disable EC method
|
||||||
|
|||||||
@@ -258,6 +258,11 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) {
|
|||||||
return dsInitialOptExpected;
|
return dsInitialOptExpected;
|
||||||
|
|
||||||
if (eOptID == DECODER_OPTION_DATAFORMAT) { // Set color space of decoding output frame
|
if (eOptID == DECODER_OPTION_DATAFORMAT) { // Set color space of decoding output frame
|
||||||
|
if (m_pDecContext->bParseOnly) {
|
||||||
|
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING,
|
||||||
|
"CWelsDecoder::SetOption for data format meaningless for parseonly.");
|
||||||
|
return cmResultSuccess;
|
||||||
|
}
|
||||||
if (pOption == NULL)
|
if (pOption == NULL)
|
||||||
return cmInitParaError;
|
return cmInitParaError;
|
||||||
|
|
||||||
|
|||||||
@@ -2337,7 +2337,7 @@ class DecodeParseAPI : public EncodeDecodeTestBase {
|
|||||||
decoder_->Uninitialize();
|
decoder_->Uninitialize();
|
||||||
SDecodingParam decParam;
|
SDecodingParam decParam;
|
||||||
memset (&decParam, 0, sizeof (SDecodingParam));
|
memset (&decParam, 0, sizeof (SDecodingParam));
|
||||||
decParam.eOutputColorFormat = videoFormatI420;
|
decParam.eOutputColorFormat = videoFormatRGB;
|
||||||
decParam.uiTargetDqLayer = UCHAR_MAX;
|
decParam.uiTargetDqLayer = UCHAR_MAX;
|
||||||
decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
|
decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
|
||||||
decParam.bParseOnly = true;
|
decParam.bParseOnly = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user