TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
Implementation of bitrates in bits/second. More...
Namespaces | |
namespace | ts |
TSDuck namespace, containing all TSDuck classes and functions. | |
Macros | |
#define | TS_BITRATE_DECIMALS 1 |
Define the precision (number of decimal digits) of fixed-point bitrate values. | |
#define | TS_BITRATE_DISPLAY_DECIMALS 2 |
Define the displayed precision (number of decimal digits) of floating-point bitrate values. | |
#define | TS_BITRATE_FIXED 1 |
If this symbol is defined, bitrate values are represented as fixed-point. | |
#define | TS_BITRATE_FLOAT 1 |
If this symbol is defined, bitrate values are represented as double floating-point. | |
#define | TS_BITRATE_FRACTION 1 |
If this symbol is defined, bitrate values are represented as fractions of 64-bit integers. | |
#define | TS_BITRATE_INTEGER 1 |
If this symbol is defined, bitrate values are represented as unsigned 64-bit integers. | |
Typedefs | |
using | ts::BitRate = user_defined |
Bitrate in bits/second. | |
Implementation of bitrates in bits/second.
#define TS_BITRATE_INTEGER 1 |
If this symbol is defined, bitrate values are represented as unsigned 64-bit integers.
#define TS_BITRATE_FRACTION 1 |
If this symbol is defined, bitrate values are represented as fractions of 64-bit integers.
Using fractions instead of fixed-point numbers gives a better precision but seriously impacts the overall performance of computations involving bitrates. The experience also demonstractes that using fractions for bitrates introduces intermediate overflows, making long computations on bitrates unusable in practice. Using fractions for bitrates is therefore currenly discouraged, until a new implementation of fractions absorbs intermediate overflows using approximated fraction reduction, at the expense of a loss of precision.
#define TS_BITRATE_FLOAT 1 |
If this symbol is defined, bitrate values are represented as double floating-point.
Using floating-point instead of fixed-point numbers may give a better precision in some cases.
This is currently the default.
#define TS_BITRATE_FIXED 1 |
If this symbol is defined, bitrate values are represented as fixed-point.
The number of decimal digits is set by the macro TS_BITRATE_DECIMALS.
#define TS_BITRATE_DECIMALS 1 |
Define the precision (number of decimal digits) of fixed-point bitrate values.
This is used when bitrates are represented as fixed-point numbers instead of fractions or floating-point.
#define TS_BITRATE_DISPLAY_DECIMALS 2 |
Define the displayed precision (number of decimal digits) of floating-point bitrate values.
This is used when bitrates are represented as floating-point numbers instead of fractions or fixed-point.