Grok  7.6.2
Classes | Namespaces | Macros | Functions | Variables
WaveletReverse.cpp File Reference
#include "grk_includes.h"
#include "CPUArch.h"
#include <algorithm>
#include <limits>

Classes

struct  grk::decompress_job< T, S >
 
struct  grk::dwt_data< T >
 
struct  grk::Decompress97
 
class  grk::PartialInterleaver< T >
 
class  grk::Partial53< T >
 
class  grk::Partial97< T >
 

Namespaces

 grk
 Copyright (C) 2016-2020 Grok Image Compression Inc.
 

Macros

#define PLL_COLS_53   (2*VREG_INT_COUNT)
 Number of columns that we can process in parallel in the vertical pass. More...
 
#define OFF(i)   (i)
 
#define S(i)   buf[OFF(i)<<1]
 
#define D(i)   buf[(1+OFF((i)<<1))]
 
#define S_(i)   ((i)<0 ? S(0) : ((i)>=sn ? S(sn-1) : S(i)))
 
#define D_(i)   ((i)<0 ? D(0) : ((i)>=dn ? D(dn-1) : D(i)))
 
#define SS_(i)   ((i)<0 ? S(0) : ((i)>=dn ? S(dn-1) : S(i)))
 
#define DD_(i)   ((i)<0 ? D(0) : ((i)>=sn ? D(sn-1) : D(i)))
 
#define OFF(i)   (i)
 
#define S_off(i, off)   buf[OFF(i)*2 * VERT_PASS_WIDTH + off]
 
#define D_off(i, off)   buf[(1+OFF(i)*2)*VERT_PASS_WIDTH + off]
 
#define S_off_(i, off)   (((i)>=sn ? S_off(sn-1,off) : S_off(i,off)))
 
#define D_off_(i, off)   (((i)>=dn ? D_off(dn-1,off) : D_off(i,off)))
 
#define S_sgnd_off_(i, off)   (((i)<0 ? S_off(0,off) : S_off_(i,off)))
 
#define D_sgnd_off_(i, off)   (((i)<0 ? D_off(0,off) : D_off_(i,off)))
 
#define SS_sgnd_off_(i, off)   ((i)<0 ? S_off(0,off) : ((i)>=dn ? S_off(dn-1,off) : S_off(i,off)))
 
#define DD_sgnd_off_(i, off)   ((i)<0 ? D_off(0,off) : ((i)>=sn ? D_off(sn-1,off) : D_off(i,off)))
 
#define SS_off_(i, off)   (((i)>=dn ? S_off(dn-1,off) : S_off(i,off)))
 
#define DD_off_(i, off)   (((i)>=sn ? D_off(sn-1,off) : D_off(i,off)))
 

Functions

uint32_t grk::max_resolution (Resolution *GRK_RESTRICT r, uint32_t i)
 
static void grk::decompress_h_cas0_53 (int32_t *buf, int32_t *bandL, const uint32_t wL, int32_t *bandH, const uint32_t wH, int32_t *dest)
 
static void grk::decompress_h_cas1_53 (int32_t *buf, int32_t *bandL, const uint32_t wL, int32_t *bandH, const uint32_t wH, int32_t *dest)
 
static void grk::decompress_v_cas0_53 (int32_t *buf, int32_t *bandL, const uint32_t hL, const uint32_t strideL, int32_t *bandH, const uint32_t hH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest)
 Vertical inverse 5x3 wavelet transform for one column, when top-most pixel is on even coordinate. More...
 
static void grk::decompress_v_cas1_53 (int32_t *buf, int32_t *bandL, const uint32_t hL, const uint32_t strideL, int32_t *bandH, const uint32_t hH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest)
 Vertical inverse 5x3 wavelet transform for one column, when top-most pixel is on odd coordinate. More...
 
static void grk::decompress_h_53 (const dwt_data< int32_t > *dwt, int32_t *bandL, int32_t *bandH, int32_t *dest)
 
static void grk::decompress_v_53 (const dwt_data< int32_t > *dwt, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest, uint32_t nb_cols)
 
static void grk::decompress_h_strip_53 (const dwt_data< int32_t > *horiz, uint32_t hMin, uint32_t hMax, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest)
 
static bool grk::decompress_h_mt_53 (uint32_t num_threads, size_t data_size, dwt_data< int32_t > &horiz, dwt_data< int32_t > &vert, uint32_t rh, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest)
 
static void grk::decompress_v_strip_53 (const dwt_data< int32_t > *vert, uint32_t wMin, uint32_t wMax, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest)
 
static bool grk::decompress_v_mt_53 (uint32_t num_threads, size_t data_size, dwt_data< int32_t > &horiz, dwt_data< int32_t > &vert, uint32_t rw, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest)
 
static bool grk::decompress_tile_53 (TileComponent *tilec, uint32_t numres)
 
static Decompress97 grk::makeDecompress97 (dwt_data< vec4f > *dwt, bool low)
 
static void grk::decompress_step1_97 (vec4f *data, uint32_t end, const float c)
 
static void grk::decompress_step2_97 (Decompress97 d, float c)
 
static void grk::decompress_step_97 (dwt_data< vec4f > *GRK_RESTRICT dwt)
 
static void grk::interleave_h_97 (dwt_data< vec4f > *GRK_RESTRICT dwt, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, uint32_t remaining_height)
 
static void grk::decompress_h_strip_97 (dwt_data< vec4f > *GRK_RESTRICT horiz, const uint32_t rh, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, float *dest, const size_t strideDest)
 
static bool grk::decompress_h_mt_97 (uint32_t num_threads, size_t data_size, dwt_data< vec4f > &GRK_RESTRICT horiz, const uint32_t rh, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, float *GRK_RESTRICT dest, const uint32_t strideDest)
 
static void grk::interleave_v_97 (dwt_data< vec4f > *GRK_RESTRICT dwt, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, uint32_t nb_elts_read)
 
static void grk::decompress_v_strip_97 (dwt_data< vec4f > *GRK_RESTRICT vert, const uint32_t rw, const uint32_t rh, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, float *GRK_RESTRICT dest, const uint32_t strideDest)
 
static bool grk::decompress_v_mt_97 (uint32_t num_threads, size_t data_size, dwt_data< vec4f > &GRK_RESTRICT vert, const uint32_t rw, const uint32_t rh, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, float *GRK_RESTRICT dest, const uint32_t strideDest)
 
static bool grk::decompress_tile_97 (TileComponent *GRK_RESTRICT tilec, uint32_t numres)
 
template<typename T , uint32_t FILTER_WIDTH, typename D >
bool grk::decompress_partial_tile (TileComponent *GRK_RESTRICT tilec, grk_rect_u32 bounds, uint32_t numres, ISparseBuffer *sa)
 

Variables

static const float grk::dwt_alpha = 1.586134342f
 
static const float grk::dwt_beta = 0.052980118f
 
static const float grk::dwt_gamma = -0.882911075f
 
static const float grk::dwt_delta = -0.443506852f
 
static const float grk::K = 1.230174105f
 
static const float grk::c13318 = 1.625732422f
 

Macro Definition Documentation

◆ D

#define D (   i)    buf[(1+OFF((i)<<1))]

◆ D_

#define D_ (   i)    ((i)<0 ? D(0) : ((i)>=dn ? D(dn-1) : D(i)))

◆ D_off

#define D_off (   i,
  off 
)    buf[(1+OFF(i)*2)*VERT_PASS_WIDTH + off]

◆ D_off_

#define D_off_ (   i,
  off 
)    (((i)>=dn ? D_off(dn-1,off) : D_off(i,off)))

◆ D_sgnd_off_

#define D_sgnd_off_ (   i,
  off 
)    (((i)<0 ? D_off(0,off) : D_off_(i,off)))

◆ DD_

#define DD_ (   i)    ((i)<0 ? D(0) : ((i)>=sn ? D(sn-1) : D(i)))

◆ DD_off_

#define DD_off_ (   i,
  off 
)    (((i)>=sn ? D_off(sn-1,off) : D_off(i,off)))

◆ DD_sgnd_off_

#define DD_sgnd_off_ (   i,
  off 
)    ((i)<0 ? D_off(0,off) : ((i)>=sn ? D_off(sn-1,off) : D_off(i,off)))

◆ OFF [1/2]

#define OFF (   i)    (i)

◆ OFF [2/2]

#define OFF (   i)    (i)

◆ PLL_COLS_53

#define PLL_COLS_53   (2*VREG_INT_COUNT)

Number of columns that we can process in parallel in the vertical pass.

◆ S

#define S (   i)    buf[OFF(i)<<1]

◆ S_

#define S_ (   i)    ((i)<0 ? S(0) : ((i)>=sn ? S(sn-1) : S(i)))

◆ S_off

#define S_off (   i,
  off 
)    buf[OFF(i)*2 * VERT_PASS_WIDTH + off]

◆ S_off_

#define S_off_ (   i,
  off 
)    (((i)>=sn ? S_off(sn-1,off) : S_off(i,off)))

◆ S_sgnd_off_

#define S_sgnd_off_ (   i,
  off 
)    (((i)<0 ? S_off(0,off) : S_off_(i,off)))

◆ SS_

#define SS_ (   i)    ((i)<0 ? S(0) : ((i)>=dn ? S(dn-1) : S(i)))

◆ SS_off_

#define SS_off_ (   i,
  off 
)    (((i)>=dn ? S_off(dn-1,off) : S_off(i,off)))

◆ SS_sgnd_off_

#define SS_sgnd_off_ (   i,
  off 
)    ((i)<0 ? S_off(0,off) : ((i)>=dn ? S_off(dn-1,off) : S_off(i,off)))