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));
|
||||
pCtx->eOutputColorFormat = pCtx->pParam->eOutputColorFormat;
|
||||
if (!pCtx->bParseOnly) {
|
||||
int32_t iRet = DecoderSetCsp (pCtx, pCtx->pParam->eOutputColorFormat);
|
||||
if (iRet)
|
||||
return iRet;
|
||||
}
|
||||
pCtx->eErrorConMethod = pCtx->pParam->eEcActiveIdc;
|
||||
|
||||
if (pCtx->bParseOnly) //parse only, disable EC method
|
||||
|
||||
@@ -258,6 +258,11 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) {
|
||||
return dsInitialOptExpected;
|
||||
|
||||
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)
|
||||
return cmInitParaError;
|
||||
|
||||
|
||||
@@ -2337,7 +2337,7 @@ class DecodeParseAPI : public EncodeDecodeTestBase {
|
||||
decoder_->Uninitialize();
|
||||
SDecodingParam decParam;
|
||||
memset (&decParam, 0, sizeof (SDecodingParam));
|
||||
decParam.eOutputColorFormat = videoFormatI420;
|
||||
decParam.eOutputColorFormat = videoFormatRGB;
|
||||
decParam.uiTargetDqLayer = UCHAR_MAX;
|
||||
decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
|
||||
decParam.bParseOnly = true;
|
||||
|
||||
Reference in New Issue
Block a user