TSDuck v3.40-3968
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsRotate.h File Reference

Low-level platform-dependent bit rotate functions. More...

Namespaces

namespace  ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Functions

uint32_t ts::ROL (uint32_t word, int i)
 Inlined function performing 32-bit left-rotate.
 
uint64_t ts::ROL64 (uint64_t word, int i)
 Inlined function performing 64-bit left-rotate.
 
uint64_t ts::ROL64c (uint64_t word, const int i)
 Inlined function performing 64-bit left-rotate with a constant value in the range 0..63 for index.
 
uint32_t ts::ROLc (uint32_t word, const int i)
 Inlined function performing 32-bit left-rotate with a constant value in the range 0..31 for index.
 
uint32_t ts::ROR (uint32_t word, int i)
 Inlined function performing 32-bit right-rotate.
 
uint64_t ts::ROR64 (uint64_t word, int i)
 Inlined function performing 64-bit right-rotate.
 
uint64_t ts::ROR64c (uint64_t word, const int i)
 Inlined function performing 64-bit right-rotate with a constant value in the range 0..63 for index.
 
uint32_t ts::RORc (uint32_t word, const int i)
 Inlined function performing 32-bit right-rotate with a constant value in the range 0..31 for index.
 

Detailed Description

Low-level platform-dependent bit rotate functions.

Rotate functions conventions:

  • ROL = rotate left
  • ROR = rotate right
  • ROLc/RORc = rotate with constant value for index (optimized when asm). Note that, in debug mode, ROLc/RORc revert to ROL/ROR since the routines are not inlined and, thus, constant constraint cannot be checked.