VLC 4.0.0-dev
Loading...
Searching...
No Matches
Collaboration diagram for Bit operations:

Macros

#define VLC_INT_FUNC(basename)
#define VLC_INT_FUNC_TYPE(basename, type, suffix)
#define VLC_INT_GENERIC(func, x)
#define ctz(x)
 Count trailing zeroes.
#define parity(x)
 Parity.
#define vlc_popcount(x)
 Bit weight / population count.

Functions

static int vlc_ctz_generic (unsigned long long x)
static int vlc_parity_generic (unsigned long long x)
static int vlc_popcount_generic (unsigned long long x)
static int vlc_ctz (unsigned x)
static int vlc_ctzl (unsigned long x)
static int vlc_ctzll (unsigned long long x)
static int vlc_parity (unsigned x)
static int vlc_parityl (unsigned long x)
static int vlc_parityll (unsigned long long x)
static int vlc_popcount (unsigned x)
static int vlc_popcountl (unsigned long x)
static int vlc_popcountll (unsigned long long x)
static uint16_t vlc_bswap16 (uint16_t x)
 Byte swap (16 bits).
static uint32_t vlc_bswap32 (uint32_t x)
 Byte swap (32 bits).
static uint64_t vlc_bswap64 (uint64_t x)
 Byte swap (64 bits).

Detailed Description

Macro Definition Documentation

◆ ctz

#define ctz ( x)
Value:
#define VLC_INT_GENERIC(func, x)
Definition vlc_common.h:635
static int vlc_ctz(unsigned x)
Definition vlc_common.h:630

Count trailing zeroes.

This function counts the number of consecutive zero bits up from the lowest order bit in an unsigned integer.

Parameters
xa non-zero integer
Note
This function assumes that CHAR_BIT equals 8.
Returns
The number of trailing zero bits in x.

Referenced by vlc_ctz().

◆ parity

#define parity ( x)
Value:
static int vlc_parity(unsigned x)
Definition vlc_common.h:631

Parity.

This function determines the parity of an integer.

Return values
0if x has an even number of set bits.
1if x has an odd number of set bits.

Referenced by vlc_parity().

◆ VLC_INT_FUNC

#define VLC_INT_FUNC ( basename)
Value:
VLC_INT_FUNC_TYPE(basename, unsigned, ) \
VLC_INT_FUNC_TYPE(basename, unsigned long, l) \
VLC_INT_FUNC_TYPE(basename, unsigned long long, ll)
#define VLC_INT_FUNC_TYPE(basename, type, suffix)
Definition vlc_common.h:623

Referenced by vlc_parity(), and vlc_popcount().

◆ VLC_INT_FUNC_TYPE

#define VLC_INT_FUNC_TYPE ( basename,
type,
suffix )
Value:
VLC_USED static inline int vlc_##basename##suffix(type x) \
{ \
return vlc_##basename##_generic(x); \
}
#define VLC_USED
Definition fourcc_gen.c:32

◆ VLC_INT_GENERIC

#define VLC_INT_GENERIC ( func,
x )
Value:
_Generic((x), \
unsigned char: func(x), \
signed char: func(x), \
unsigned short: func(x), \
signed short: func(x), \
unsigned int: func(x), \
signed int: func(x), \
unsigned long: func##l(x), \
signed long: func##l(x), \
unsigned long long: func##ll(x), \
signed long long: func##ll(x))

◆ vlc_popcount

#define vlc_popcount ( x)
Value:
_Generic((x), \
signed char: vlc_popcount((unsigned char)(x)), \
signed short: vlc_popcount((unsigned short)(x)), \
#define vlc_popcount(x)
Bit weight / population count.
Definition vlc_common.h:676

Bit weight / population count.

This function counts the number of non-zero bits in an integer.

Returns
The count of non-zero bits.

Referenced by aout_FormatNbChannels(), EsOutUpdateInfo(), and GetCCDescLocked().

Function Documentation

◆ vlc_bswap16()

uint16_t vlc_bswap16 ( uint16_t x)
inlinestatic

Byte swap (16 bits).

Referenced by GetWLE(), and SetWLE().

◆ vlc_bswap32()

uint32_t vlc_bswap32 ( uint32_t x)
inlinestatic

Byte swap (32 bits).

Referenced by GetDWLE(), and SetDWLE().

◆ vlc_bswap64()

uint64_t vlc_bswap64 ( uint64_t x)
inlinestatic

Byte swap (64 bits).

Referenced by GetQWLE(), and SetQWLE().

◆ vlc_ctz()

int vlc_ctz ( unsigned x)
inlinestatic

References ctz.

◆ vlc_ctz_generic()

int vlc_ctz_generic ( unsigned long long x)
inlinestatic

References VLC_USED.

◆ vlc_ctzl()

int vlc_ctzl ( unsigned long x)
inlinestatic

◆ vlc_ctzll()

int vlc_ctzll ( unsigned long long x)
inlinestatic

◆ vlc_parity()

int vlc_parity ( unsigned x)
inlinestatic

References parity, and VLC_INT_FUNC.

◆ vlc_parity_generic()

int vlc_parity_generic ( unsigned long long x)
inlinestatic

References VLC_USED.

◆ vlc_parityl()

int vlc_parityl ( unsigned long x)
inlinestatic

◆ vlc_parityll()

int vlc_parityll ( unsigned long long x)
inlinestatic

◆ vlc_popcount()

int vlc_popcount ( unsigned x)
inlinestatic

References VLC_INT_FUNC.

◆ vlc_popcount_generic()

int vlc_popcount_generic ( unsigned long long x)
inlinestatic

References count, and VLC_USED.

◆ vlc_popcountl()

int vlc_popcountl ( unsigned long x)
inlinestatic

◆ vlc_popcountll()

int vlc_popcountll ( unsigned long long x)
inlinestatic