mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Add parentheses around macro arguments in cabac.h.
This commit is contained in:
parent
a387b74e51
commit
e4b5840f56
22
src/cabac.h
22
src/cabac.h
|
@ -115,36 +115,36 @@ void kvz_cabac_write_unary_max_symbol_ep(cabac_data_t *data, unsigned int symbol
|
|||
|
||||
|
||||
// Macros
|
||||
#define CTX_STATE(ctx) (ctx->uc_state >> 1)
|
||||
#define CTX_MPS(ctx) (ctx->uc_state & 1)
|
||||
#define CTX_STATE(ctx) ((ctx)->uc_state >> 1)
|
||||
#define CTX_MPS(ctx) ((ctx)->uc_state & 1)
|
||||
#define CTX_UPDATE_LPS(ctx) { (ctx)->uc_state = kvz_g_auc_next_state_lps[ (ctx)->uc_state ]; }
|
||||
#define CTX_UPDATE_MPS(ctx) { (ctx)->uc_state = kvz_g_auc_next_state_mps[ (ctx)->uc_state ]; }
|
||||
|
||||
#ifdef VERBOSE
|
||||
#define CABAC_BIN(data, value, name) { \
|
||||
uint32_t prev_state = (data)->ctx->uc_state; \
|
||||
kvz_cabac_encode_bin(data, value); \
|
||||
kvz_cabac_encode_bin((data), (value)) \
|
||||
printf("%s = %u, state = %u -> %u\n", \
|
||||
name, (uint32_t)value, (uint32_t)prev_state, (data)->ctx->uc_state); }
|
||||
(name), (uint32_t)(value), prev_state, (data)->ctx->uc_state); }
|
||||
|
||||
#define CABAC_BINS_EP(data, value, bins, name) { \
|
||||
uint32_t prev_state = (data)->ctx->uc_state; \
|
||||
kvz_cabac_encode_bins_ep(data, value, bins); \
|
||||
kvz_cabac_encode_bins_ep((data), (value), (bins)); \
|
||||
printf("%s = %u(%u bins), state = %u -> %u\n", \
|
||||
name, (uint32_t)value, (uint32_t)bins, prev_state, (data)->ctx->uc_state); }
|
||||
(name), (uint32_t)(value), (bins), prev_state, (data)->ctx->uc_state); }
|
||||
|
||||
#define CABAC_BIN_EP(data, value, name) { \
|
||||
uint32_t prev_state = (data)->ctx->uc_state; \
|
||||
kvz_cabac_encode_bin_ep(data, value); \
|
||||
kvz_cabac_encode_bin_ep((data), (value)); \
|
||||
printf("%s = %u, state = %u -> %u\n", \
|
||||
name, (uint32_t)value, (uint32_t)prev_state, (data)->ctx->uc_state); }
|
||||
(name), (uint32_t)(value), prev_state, (data)->ctx->uc_state); }
|
||||
#else
|
||||
#define CABAC_BIN(data, value, name) \
|
||||
kvz_cabac_encode_bin(data, value);
|
||||
kvz_cabac_encode_bin((data), (value));
|
||||
#define CABAC_BINS_EP(data, value, bins, name) \
|
||||
kvz_cabac_encode_bins_ep(data, value, bins);
|
||||
kvz_cabac_encode_bins_ep((data), (value), (bins));
|
||||
#define CABAC_BIN_EP(data, value, name) \
|
||||
kvz_cabac_encode_bin_ep(data, value);
|
||||
kvz_cabac_encode_bin_ep((data), (value));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue