![]() |
AJA NTV2 SDK
18.0.0.2717
NTV2 SDK 18.0.0.2717
|
Declares several fixed-point math routines. Assumes 16-bit fraction. More...
#include "ajatypes.h"Go to the source code of this file.
Macros | |
| #define | FIXED_ONE (1<<16) |
| #define | FixedTrunc(__x__) ((__x__)>>16) |
| #define | FixedRound(__x__) (((__x__) < 0) ? (-((-(__x__)+0x8000)>>16)) : (((__x__) + 0x8000)>>16)) |
| #define | FixedMix(__min__, __max__, __mixer__) (FixedRound(((__max__)-(__min__))*(__mixer__)+(__min__))) |
| #define | FloatToFixed(__x__) ((Fixed_)((__x__) * (float)FIXED_ONE)) |
| #define | FixedToFloat(__x__) (((float)(__x__) / (float) 65536.0)) |
| #define | FixedFrac(__x__) (((__x__) < 0) ? (-(__x__) & 0xFFFF)) : ((__x__) & 0xFFFF) |
Declares several fixed-point math routines. Assumes 16-bit fraction.
Definition in file ntv2fixed.h.
| #define FIXED_ONE (1<<16) |
Definition at line 13 of file ntv2fixed.h.
| #define FixedFrac | ( | __x__ | ) | (((__x__) < 0) ? (-(__x__) & 0xFFFF)) : ((__x__) & 0xFFFF) |
Definition at line 41 of file ntv2fixed.h.
| #define FixedMix | ( | __min__, | |
| __max__, | |||
| __mixer__ | |||
| ) | (FixedRound(((__max__)-(__min__))*(__mixer__)+(__min__))) |
Definition at line 38 of file ntv2fixed.h.
| #define FixedRound | ( | __x__ | ) | (((__x__) < 0) ? (-((-(__x__)+0x8000)>>16)) : (((__x__) + 0x8000)>>16)) |
Definition at line 37 of file ntv2fixed.h.
| #define FixedToFloat | ( | __x__ | ) | (((float)(__x__) / (float) 65536.0)) |
Definition at line 40 of file ntv2fixed.h.
| #define FixedTrunc | ( | __x__ | ) | ((__x__)>>16) |
Definition at line 35 of file ntv2fixed.h.
Definition at line 39 of file ntv2fixed.h.