History

use WelsLog instead of fprintf to have a unified trace output

ruil2 committed 12 years ago

Commit 6bb23f51 parent cad753d1 file · +5 −9Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+5−9
@@ -90,19 +90,15 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 89 unmodified lines
90 if (fDlp->fOutputFrameRate > fDlp->fInputFrameRate || (fDlp->fInputFrameRate >= -fEpsn90 if (fDlp->fOutputFrameRate > fDlp->fInputFrameRate || (fDlp->fInputFrameRate >= -fEpsn
91 && fDlp->fInputFrameRate <= fEpsn)91 && fDlp->fInputFrameRate <= fEpsn)
92 || (fDlp->fOutputFrameRate >= -fEpsn && fDlp->fOutputFrameRate <= fEpsn)) {92 || (fDlp->fOutputFrameRate >= -fEpsn && fDlp->fOutputFrameRate <= fEpsn)) {
93#if defined (_DEBUG)93 WelsLog (NULL, WELS_LOG_ERROR,"Invalid settings in input frame rate(%.6f) or output frame rate(%.6f) of layer #%d config file..\n",
94 fprintf (stderr, "Invalid settings in input frame rate(%.6f) or output frame rate(%.6f) of layer #%d config file..\n",
95 fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);94 fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);
96#endif95 return ENC_RETURN_INVALIDINPUT;
97 return 1;
98 }96 }
99 if (UINT_MAX == GetLogFactor (fDlp->fOutputFrameRate, fDlp->fInputFrameRate)) {97 if (UINT_MAX == GetLogFactor (fDlp->fOutputFrameRate, fDlp->fInputFrameRate)) {
100#if defined (_DEBUG)98 WelsLog (NULL,WELS_LOG_ERROR,
101 fprintf (stderr,
102 "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",99 "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",
103 fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);100 fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);
104#endif101 return ENC_RETURN_INVALIDINPUT;
105 return 1;
106 }102 }
107 }103 }
108 104
@@ -117,7 +113,7 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 8 unmodified lines
117 pCfg->fMaxFrameRate = fMaxFrameRate;113 pCfg->fMaxFrameRate = fMaxFrameRate;
118 }114 }
119 115
120 return 0;116 return ENC_RETURN_SUCCESS;
121}117}
122 118
123 119

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