t1_common.h File Reference
`#include "grok.h"`
`#include <cstdint>`
`#include <math.h>`
`#include <cassert>`
`#include <cstring>`
`#include "mqc.h"`
`#include "T1.h"`

Go to the source code of this file.

## Classes

struct | grk::pass_enc
struct | grk::cblk_enc

## Namespaces

namespace | grk
| Copyright (C) 2016-2023 Grok Image Compression Inc.

## Macros

#define | INLINE
#define | T1_NUMCTXS_ZC 9
#define | T1_NUMCTXS_SC 5
#define | T1_NUMCTXS_MAG 3
#define | T1_NUMCTXS_AGG 1
#define | T1_NUMCTXS_UNI 1
#define | T1_CTXNO_ZC 0
#define | T1_CTXNO_SC (T1_CTXNO_ZC + T1_NUMCTXS_ZC)
#define | T1_CTXNO_MAG (T1_CTXNO_SC + T1_NUMCTXS_SC)
#define | T1_CTXNO_AGG (T1_CTXNO_MAG + T1_NUMCTXS_MAG)
#define | T1_CTXNO_UNI (T1_CTXNO_AGG + T1_NUMCTXS_AGG)
#define | T1_NUMCTXS (T1_CTXNO_UNI + T1_NUMCTXS_UNI)
#define | smr_abs(x) (((uint32_t)(x)) & 0x7FFFFFFFU)
#define | smr_sign(x) (((uint32_t)(x)) >> 31)
#define | to_smr(x) ((x) >= 0 ? (uint32_t)(x) : ((uint32_t)(-x) | 0x80000000U))

## Variables

const uint8_t | grk_cblk_dec_compressed_data_pad_right = 2
| < Space for a fake FFFF marker
const uint8_t | grk_cblk_enc_compressed_data_pad_left = 2

## Macro Definition Documentation

## INLINE

#define INLINE

## smr_abs

#define smr_abs | ( |  | x | ) | (((uint32_t)(x)) & 0x7FFFFFFFU)

## smr_sign

#define smr_sign | ( |  | x | ) | (((uint32_t)(x)) >> 31)

## T1_CTXNO_AGG

#define T1_CTXNO_AGG (T1_CTXNO_MAG + T1_NUMCTXS_MAG)

## T1_CTXNO_MAG

#define T1_CTXNO_MAG (T1_CTXNO_SC + T1_NUMCTXS_SC)

## T1_CTXNO_SC

#define T1_CTXNO_SC (T1_CTXNO_ZC + T1_NUMCTXS_ZC)

## T1_CTXNO_UNI

#define T1_CTXNO_UNI (T1_CTXNO_AGG + T1_NUMCTXS_AGG)

## T1_CTXNO_ZC

#define T1_CTXNO_ZC 0

## T1_NUMCTXS

#define T1_NUMCTXS (T1_CTXNO_UNI + T1_NUMCTXS_UNI)

## T1_NUMCTXS_AGG

#define T1_NUMCTXS_AGG 1

## T1_NUMCTXS_MAG

#define T1_NUMCTXS_MAG 3

## T1_NUMCTXS_SC

#define T1_NUMCTXS_SC 5

## T1_NUMCTXS_UNI

#define T1_NUMCTXS_UNI 1

## T1_NUMCTXS_ZC

#define T1_NUMCTXS_ZC 9

## to_smr

#define to_smr | ( |  | x | ) | ((x) >= 0 ? (uint32_t)(x) : ((uint32_t)(-x) | 0x80000000U))

## Variable Documentation

## grk_cblk_dec_compressed_data_pad_right

const uint8_t grk_cblk_dec_compressed_data_pad_right = 2

< Space for a fake FFFF marker

Referenced by grk::t1_part1::T1Part1::decompress(), grk::mqc_finish_dec(), and grk::mqc_init_dec_common().

## grk_cblk_enc_compressed_data_pad_left

const uint8_t grk_cblk_enc_compressed_data_pad_left = 2

Referenced by grk::CompressCodeblock::allocData().