FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
bool StateMachineRateControl::Step
(
int
idx
,
float
step
)
inline
private
Definition at line
140
of file
ratecontrol.cc
.
141
{
142
uint32_t diff =
fThresholds
[idx]+int16_t(truncf(step));
143
if
(diff<
fThresholdMin
)
144
diff=
fThresholdMin
;
145
if
(diff>0xffff)
146
diff = 0xffff;
147
148
if
(diff==
fThresholds
[idx])
149
return
false
;
150
151
if
(
fVerbose
)
152
{
153
Out
() <<
"Apply: Patch "
<< setw(3) << idx <<
" ["
<< idx/40 <<
"|"
<< (idx/4)%10 <<
"|"
<< idx%4 <<
"]"
;
154
Out
() << (step>0 ?
" += "
:
" -= "
);
155
Out
() << fabs(step) <<
" (old="
<<
fThresholds
[idx] <<
", new="
<< diff <<
")"
<< endl;
156
}
157
158
fThresholds
[idx] = diff;
159
fBlock
[idx/4] =
true
;
160
161
return
true
;
162
}
StateMachineRateControl::fThresholdMin
uint16_t fThresholdMin
Definition:
ratecontrol.cc:67
StateMachineRateControl::fVerbose
bool fVerbose
Definition:
ratecontrol.cc:77
StateMachineRateControl::fBlock
vector< bool > fBlock
Definition:
ratecontrol.cc:54
MessageImp::Out
std::ostream & Out() const
Definition:
MessageImp.h:73
StateMachineRateControl::fThresholds
vector< uint32_t > fThresholds
Definition:
ratecontrol.cc:98
StateMachineRateControl
Generated on Sun Sep 18 2016 20:51:02 for FACT++ by
1.8.11