Merge pull request #604 from ruil2/vp_trace
use WelsLog instead of fprintf to have a unified trace output
This commit is contained in:
commit
8ea23ac220
@ -90,19 +90,15 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) {
|
|||||||
if (fDlp->fOutputFrameRate > fDlp->fInputFrameRate || (fDlp->fInputFrameRate >= -fEpsn
|
if (fDlp->fOutputFrameRate > fDlp->fInputFrameRate || (fDlp->fInputFrameRate >= -fEpsn
|
||||||
&& fDlp->fInputFrameRate <= fEpsn)
|
&& fDlp->fInputFrameRate <= fEpsn)
|
||||||
|| (fDlp->fOutputFrameRate >= -fEpsn && fDlp->fOutputFrameRate <= fEpsn)) {
|
|| (fDlp->fOutputFrameRate >= -fEpsn && fDlp->fOutputFrameRate <= fEpsn)) {
|
||||||
#if defined (_DEBUG)
|
WelsLog (NULL, WELS_LOG_ERROR,"Invalid settings in input frame rate(%.6f) or output frame rate(%.6f) of layer #%d config file..\n",
|
||||||
fprintf (stderr, "Invalid settings in input frame rate(%.6f) or output frame rate(%.6f) of layer #%d config file..\n",
|
|
||||||
fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);
|
fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);
|
||||||
#endif
|
return ENC_RETURN_INVALIDINPUT;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
if (UINT_MAX == GetLogFactor (fDlp->fOutputFrameRate, fDlp->fInputFrameRate)) {
|
if (UINT_MAX == GetLogFactor (fDlp->fOutputFrameRate, fDlp->fInputFrameRate)) {
|
||||||
#if defined (_DEBUG)
|
WelsLog (NULL,WELS_LOG_ERROR,
|
||||||
fprintf (stderr,
|
|
||||||
"Invalid settings in input frame rate(%.6f) and output frame rate(%.6f) of layer #%d config file: iResult of output frame rate divided by input frame rate should be power of 2(i.e,in/pOut=2^n)..\n",
|
"Invalid settings in input frame rate(%.6f) and output frame rate(%.6f) of layer #%d config file: iResult of output frame rate divided by input frame rate should be power of 2(i.e,in/pOut=2^n)..\n",
|
||||||
fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);
|
fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);
|
||||||
#endif
|
return ENC_RETURN_INVALIDINPUT;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +113,7 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) {
|
|||||||
pCfg->fMaxFrameRate = fMaxFrameRate;
|
pCfg->fMaxFrameRate = fMaxFrameRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return ENC_RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user