OpenJPEG 2.5.2

mct.h File Reference

Implementation of a multi-component transforms (MCT) More...

Go to the source code of this file.

## Functions
Exported functions
void | opj_mct_encode (OPJ_INT32 *OPJ_RESTRICT c0, OPJ_INT32 *OPJ_RESTRICT c1, OPJ_INT32 *OPJ_RESTRICT c2, OPJ_SIZE_T n)
| Apply a reversible multi-component transform to an image.
void | opj_mct_decode (OPJ_INT32 *OPJ_RESTRICT c0, OPJ_INT32 *OPJ_RESTRICT c1, OPJ_INT32 *OPJ_RESTRICT c2, OPJ_SIZE_T n)
| Apply a reversible multi-component inverse transform to an image.
OPJ_FLOAT64 | opj_mct_getnorm (OPJ_UINT32 compno)
| Get norm of the basis function used for the reversible multi-component transform.
void | opj_mct_encode_real (OPJ_FLOAT32 *OPJ_RESTRICT c0, OPJ_FLOAT32 *OPJ_RESTRICT c1, OPJ_FLOAT32 *OPJ_RESTRICT c2, OPJ_SIZE_T n)
| Apply an irreversible multi-component transform to an image.
void | opj_mct_decode_real (OPJ_FLOAT32 *OPJ_RESTRICT c0, OPJ_FLOAT32 *OPJ_RESTRICT c1, OPJ_FLOAT32 *OPJ_RESTRICT c2, OPJ_SIZE_T n)
| Apply an irreversible multi-component inverse transform to an image.
OPJ_FLOAT64 | opj_mct_getnorm_real (OPJ_UINT32 compno)
| Get norm of the basis function used for the irreversible multi-component transform.
OPJ_BOOL | opj_mct_encode_custom (OPJ_BYTE *p_coding_data, OPJ_SIZE_T n, OPJ_BYTE **p_data, OPJ_UINT32 p_nb_comp, OPJ_UINT32 is_signed)
| FIXME DOC.
OPJ_BOOL | opj_mct_decode_custom (OPJ_BYTE *pDecodingData, OPJ_SIZE_T n, OPJ_BYTE **pData, OPJ_UINT32 pNbComp, OPJ_UINT32 isSigned)
| FIXME DOC.
void | opj_calculate_norms (OPJ_FLOAT64 *pNorms, OPJ_UINT32 p_nb_comps, OPJ_FLOAT32 *pMatrix)
| FIXME DOC.
const OPJ_FLOAT64 * | opj_mct_get_mct_norms (void)
| FIXME DOC.
const OPJ_FLOAT64 * | opj_mct_get_mct_norms_real (void)
| FIXME DOC.

## Detailed Description

Implementation of a multi-component transforms (MCT)

The functions in MCT.C have for goal to realize reversible and irreversible multicomponent transform. The functions in MCT.C are used by some function in TCD.C.

## Function Documentation

## ◆ opj_calculate_norms()

void opj_calculate_norms | ( | OPJ_FLOAT64 * | pNorms,
|  | OPJ_UINT32 | p_nb_comps,
|  | OPJ_FLOAT32 * | pMatrix )

FIXME DOC.

Parameters

  pNorms | MCT data
  p_nb_comps | size of components
  pMatrix | components

Returns

Referenced by opj_j2k_setup_encoder().

## ◆ opj_mct_decode()

void opj_mct_decode | ( | OPJ_INT32 *OPJ_RESTRICT | c0,
|  | OPJ_INT32 *OPJ_RESTRICT | c1,
|  | OPJ_INT32 *OPJ_RESTRICT | c2,
|  | OPJ_SIZE_T | n )

Apply a reversible multi-component inverse transform to an image.

Parameters

  c0 | Samples for luminance component
  c1 | Samples for red chrominance component
  c2 | Samples for blue chrominance component
  n | Number of samples for each component

Referenced by opj_tcd_mct_decode().

## ◆ opj_mct_decode_custom()

OPJ_BOOL opj_mct_decode_custom | ( | OPJ_BYTE * | pDecodingData,
|  | OPJ_SIZE_T | n,
|  | OPJ_BYTE ** | pData,
|  | OPJ_UINT32 | pNbComp,
|  | OPJ_UINT32 | isSigned )

FIXME DOC.

Parameters

  pDecodingData | MCT data
  n | size of components
  pData | components
  pNbComp | nb of components (i.e. size of p_data)
  isSigned | tells if the data is signed

Returns
  OPJ_FALSE if function encounter a problem, OPJ_TRUE otherwise

References OPJ_ARG_NOT_USED, OPJ_FALSE, opj_free(), opj_malloc(), and OPJ_TRUE.

Referenced by opj_tcd_mct_decode().

## ◆ opj_mct_decode_real()

void opj_mct_decode_real | ( | OPJ_FLOAT32 *OPJ_RESTRICT | c0,
|  | OPJ_FLOAT32 *OPJ_RESTRICT | c1,
|  | OPJ_FLOAT32 *OPJ_RESTRICT | c2,
|  | OPJ_SIZE_T | n )

Apply an irreversible multi-component inverse transform to an image.

Parameters

  c0 | Samples for luminance component
  c1 | Samples for red chrominance component
  c2 | Samples for blue chrominance component
  n | Number of samples for each component

Referenced by opj_tcd_mct_decode().

## ◆ opj_mct_encode()

void opj_mct_encode | ( | OPJ_INT32 *OPJ_RESTRICT | c0,
|  | OPJ_INT32 *OPJ_RESTRICT | c1,
|  | OPJ_INT32 *OPJ_RESTRICT | c2,
|  | OPJ_SIZE_T | n )

Apply a reversible multi-component transform to an image.

Parameters

  c0 | Samples for red component
  c1 | Samples for green component
  c2 | Samples blue component
  n | Number of samples for each component

Referenced by opj_tcd_mct_encode().

## ◆ opj_mct_encode_custom()

OPJ_BOOL opj_mct_encode_custom | ( | OPJ_BYTE * | p_coding_data,
|  | OPJ_SIZE_T | n,
|  | OPJ_BYTE ** | p_data,
|  | OPJ_UINT32 | p_nb_comp,
|  | OPJ_UINT32 | is_signed )

FIXME DOC.

Parameters

  p_coding_data | MCT data
  n | size of components
  p_data | components
  p_nb_comp | nb of components (i.e. size of p_data)
  is_signed | tells if the data is signed

Returns
  OPJ_FALSE if function encounter a problem, OPJ_TRUE otherwise

References OPJ_ARG_NOT_USED, OPJ_FALSE, opj_free(), opj_int_fix_mul(), opj_malloc(), and OPJ_TRUE.

Referenced by opj_tcd_mct_encode().

## ◆ opj_mct_encode_real()

void opj_mct_encode_real | ( | OPJ_FLOAT32 *OPJ_RESTRICT | c0,
|  | OPJ_FLOAT32 *OPJ_RESTRICT | c1,
|  | OPJ_FLOAT32 *OPJ_RESTRICT | c2,
|  | OPJ_SIZE_T | n )

Apply an irreversible multi-component transform to an image.

Parameters

  c0 | Samples for red component
  c1 | Samples for green component
  c2 | Samples blue component
  n | Number of samples for each component

Referenced by opj_tcd_mct_encode().

## ◆ opj_mct_get_mct_norms()

const OPJ_FLOAT64 * opj_mct_get_mct_norms | ( | void |  | ) |

FIXME DOC.

References opj_mct_norms.

Referenced by opj_tcd_t1_encode().

## ◆ opj_mct_get_mct_norms_real()

const OPJ_FLOAT64 * opj_mct_get_mct_norms_real | ( | void |  | ) |

FIXME DOC.

References opj_mct_norms_real.

Referenced by opj_tcd_t1_encode().

## ◆ opj_mct_getnorm()

OPJ_FLOAT64 opj_mct_getnorm | ( | OPJ_UINT32 | compno | ) |

Get norm of the basis function used for the reversible multi-component transform.

Parameters

  compno | Number of the component (0->Y, 1->U, 2->V)

Returns

References opj_mct_norms.

## ◆ opj_mct_getnorm_real()

OPJ_FLOAT64 opj_mct_getnorm_real | ( | OPJ_UINT32 | compno | ) |

Get norm of the basis function used for the irreversible multi-component transform.

Parameters

  compno | Number of the component (0->Y, 1->U, 2->V)

Returns

References opj_mct_norms_real.