#include "RuntimeError.h"
#include <vector>
#include <map>
#include <list>
#include <set>
#include <limits>
Go to the source code of this file.
|
double | polateLambdaModifier (double targetBitrate, const Point &point1, const Point &point2) |
|
double | guessLambdaModifier (double initialAdjustmentParameter, double targetBitrate, const std::list< Point > &pointList, double interDampeningFactor) |
|
std::vector< double > | guessLambdaModifiers (double initialAdjustmentParameter, const std::vector< double > &targetBitrateVector, const std::list< MetaLogEntry< std::vector< double > > > &metaLogEntryList) |
|
void | guessLambdaModifiers (std::ostream &o, std::istream &initialAdjustmentParameterIstream, std::istream &targetsIstream, std::istream &metaLogIstream) |
|
double guessLambdaModifier |
( |
double |
initialAdjustmentParameter, |
|
|
double |
targetBitrate, |
|
|
const std::list< Point > & |
pointList, |
|
|
double |
interDampeningFactor |
|
) |
| |
Guesses a single Lambda-modifier
- Parameters
-
initialAdjustmentParameter | If interpolation/extrapolation cannot be performed, then this parameter is used in the "increment" process. |
targetBitrate | The target bitrate value that this Lambda-modifier is trying to reach |
pointList | The list of points that correspond with this index |
interDampeningFactor | This factor is obtained based on guessed Lambda-modifiers for previous temporal layers. In some cases, this factor will scale down the change of this Lambda-modifier so that we are not making too many severe Lambda-modifier changes for a single encoder run. |
- Returns
- The Lambda-modifier guess
- Precondition
- pointList cannot be empty
-
interDampeningFactor must be greater than zero and less than or equal to 1 (0 < interDampeningFactor <= 1)
Definition at line 118 of file GuessLambdaModifiers.cpp.
std::vector< double > guessLambdaModifiers |
( |
double |
initialAdjustmentParameter, |
|
|
const std::vector< double > & |
targetBitrateVector, |
|
|
const std::list< MetaLogEntry< std::vector< double > > > & |
metaLogEntryList |
|
) |
| |
Guesses all of the Lambda-modifiers
- Parameters
-
initialAdjustmentParameter | If interpolation/extrapolation cannot be performed, then this parameter is used in the "increment" process. |
targetBitrateVector | The target bitrate values that we are trying to reach |
metaLogEntryList | All of the previously run Lambda-modifiers and their corresponding bitrates from the meta-log |
- Returns
- Vector containing all of the guessed Lambda-modifiers
- Precondition
- targetBitrateVector cannot be empty
-
metaLogEntryList cannot be empty
-
The size of targetBitrateVector must be the same as the size of bitrateVector in every item in metaLogEntryList
-
The size of targetBitrateVector must be the same as the size of lambdaModifiers in every item in metaLogEntryList
Definition at line 203 of file GuessLambdaModifiers.cpp.
void guessLambdaModifiers |
( |
std::ostream & |
o, |
|
|
std::istream & |
initialAdjustmentParameterIstream, |
|
|
std::istream & |
targetsIstream, |
|
|
std::istream & |
metaLogIstream |
|
) |
| |
Guesses all of the Lambda-modifiers This function performs all of the necessary input parsing. It ends up calling the other guessLambdaModifiers overload to perform the actual calculations.
- Parameters
-
o | The output stream to write the guessed Lambda-modifiers to |
initialAdjustmentParameterIstream | The input stream that contains the initial adjustment parameter |
targetsIstream | The input stream that contains the target bitrates |
metaLogIstream | The input stream that contains the meta-log |
- Exceptions
-
Definition at line 362 of file GuessLambdaModifiers.cpp.
double polateLambdaModifier |
( |
double |
targetBitrate, |
|
|
const Point & |
point1, |
|
|
const Point & |
point2 |
|
) |
| |
Performs interpolation/extrapolation to guess a single Lambda-modifier
- Parameters
-
targetBitrate | The target bitrate value that this Lambda-modifier is trying to reach |
point1 | One of the two previously tried points where first is the Lambda-modifier and second is the obtained bitrate |
point2 | One of the two previously tried points where first is the Lambda-modifier and second is the obtained bitrate |
- Returns
- The interpolated Lambda-modifier guess
- Precondition
- Both given points must contain only positive non-zero values for first and second
-
The given points must have different first values and different second values. If either the first values are the same or the second values are the same, then we have either a vertical or horizontal slope, and thus, interpolation cannot be performed.
Definition at line 102 of file GuessLambdaModifiers.cpp.