2180 |
} |
} |
2181 |
} |
} |
2182 |
|
|
2183 |
#define INTRA_THRESH 2050 |
#define INTRA_THRESH 1800 |
2184 |
#define INTER_THRESH 1200 |
#define INTER_THRESH 1200 |
2185 |
|
|
2186 |
int |
int |
2210 |
CheckCandidate = CheckCandidate32I; |
CheckCandidate = CheckCandidate32I; |
2211 |
|
|
2212 |
if (intraCount != 0 && intraCount < 10) // we're right after an I frame |
if (intraCount != 0 && intraCount < 10) // we're right after an I frame |
2213 |
IntraThresh += 8 * (intraCount - 10) * (intraCount - 10); |
IntraThresh += 15 * (intraCount - 10) * (intraCount - 10); |
2214 |
else |
else |
2215 |
if ( 5*(maxIntra - intraCount) < maxIntra) // we're close to maximum. 2 sec when max is 10 sec |
if ( 5*(maxIntra - intraCount) < maxIntra) // we're close to maximum. 2 sec when max is 10 sec |
2216 |
IntraThresh -= (IntraThresh * (maxIntra - 5*(maxIntra - intraCount)))/maxIntra; |
IntraThresh -= (IntraThresh * (maxIntra - 8*(maxIntra - intraCount)))/maxIntra; |
2217 |
|
|
2218 |
InterThresh -= (350 - 8*b_thresh) * bCount; |
InterThresh -= (350 - 8*b_thresh) * bCount; |
2219 |
if (InterThresh < 300 + 5*b_thresh) InterThresh = 300 + 5*b_thresh; |
if (InterThresh < 300 + 5*b_thresh) InterThresh = 300 + 5*b_thresh; |