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

Classes

struct  grk::decompress_job< T, S >
 
struct  grk::dwt_data< T >
 
struct  grk::Params97
 
class  grk::PartialInterleaver< T, FILTER_WIDTH, VERT_PASS_WIDTH >
 
class  grk::Partial53< T, FILTER_WIDTH, VERT_PASS_WIDTH >
 
class  grk::Partial97< T, FILTER_WIDTH, VERT_PASS_WIDTH >
 

Namespaces

 grk
 Copyright (C) 2016-2021 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 get_S(buf, i)   buf[(i)<<1]
 
#define get_D(buf, i)   buf[(1+((i)<<1))]
 
#define S(buf, i)   buf[(i)<<1]
 
#define D(buf, i)   buf[(1+((i)<<1))]
 
#define S_(buf, i)   ((i)<-win_l_x0 ? get_S(buf,-win_l_x0) : ((i)>=sn ? get_S(buf,sn-1) : get_S(buf,i)))
 
#define D_(buf, i)   ((i)<-win_h_x0 ? get_D(buf,-win_h_x0) : ((i)>=dn ? get_D(buf,dn-1) : get_D(buf,i)))
 
#define SS_(buf, i)   ((i)<-win_h_x0 ? get_S(buf,-win_h_x0) : ((i)>=dn ? get_S(buf,dn-1) : get_S(buf,i)))
 
#define DD_(buf, i)   ((i)<-win_l_x0 ? get_D(buf,-win_l_x0) : ((i)>=sn ? get_D(buf,sn-1) : get_D(buf,i)))
 
#define get_S_off(buf, i, off)   buf[(i)*2 * VERT_PASS_WIDTH + off]
 
#define get_D_off(buf, i, off)   buf[(1+(i)*2)*VERT_PASS_WIDTH + off]
 
#define S_off(buf, i, off)   buf[(i)*2 * VERT_PASS_WIDTH + off]
 
#define D_off(buf, i, off)   buf[(1+(i)*2)*VERT_PASS_WIDTH + off]
 
#define S_off_(buf, i, off)   (((i)>=sn ? get_S_off(buf,sn-1,off) : get_S_off(buf,i,off)))
 
#define D_off_(buf, i, off)   (((i)>=dn ? get_D_off(buf,dn-1,off) : get_D_off(buf,i,off)))
 
#define S_sgnd_off_(buf, i, off)   (((i)<(-win_l_x0) ? get_S_off(buf,-win_l_x0,off) : S_off_(buf,i,off)))
 
#define D_sgnd_off_(buf, i, off)   (((i)<(-win_h_x0) ? get_D_off(buf,-win_h_x0,off) : D_off_(buf,i,off)))
 
#define SS_sgnd_off_(buf, i, off)   ((i)<(-win_h_x0) ? get_S_off(buf,-win_l_x0,off) : ((i)>=dn ? get_S_off(buf,dn-1,off) : get_S_off(buf,i,off)))
 
#define DD_sgnd_off_(buf, i, off)   ((i)<(-win_l_x0) ? get_D_off(buf,-win_l_x0,off) : ((i)>=sn ? get_D_off(buf,sn-1,off) : get_D_off(buf,i,off)))
 
#define SS_off_(buf, i, off)   (((i)>=dn ? get_S_off(buf,dn-1,off) : get_S_off(buf,i,off)))
 
#define DD_off_(buf, i, off)   (((i)>=sn ? get_D_off(buf,sn-1,off) : get_D_off(buf,i,off)))
 

Functions

uint32_t grk::max_resolution (Resolution *GRK_RESTRICT r, uint32_t i)
 
static Params97 grk::makeParams97 (dwt_data< vec4f > *dwt, bool isBandL, bool step1)
 
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 void grk::decompress_step1_97 (const Params97 &d, const float c)
 
static void grk::decompress_step2_97 (const Params97 &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, uint32_t VERT_PASS_WIDTH, typename D >
bool grk::decompress_partial_tile (TileComponent *GRK_RESTRICT tilec, uint16_t compno, 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::twice_invK = 1.625732422f
 

Macro Definition Documentation

◆ D

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

◆ D_

#define D_ (   buf,
 
)    ((i)<-win_h_x0 ? get_D(buf,-win_h_x0) : ((i)>=dn ? get_D(buf,dn-1) : get_D(buf,i)))

◆ D_off

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

◆ D_off_

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

◆ D_sgnd_off_

#define D_sgnd_off_ (   buf,
  i,
  off 
)    (((i)<(-win_h_x0) ? get_D_off(buf,-win_h_x0,off) : D_off_(buf,i,off)))

◆ DD_

#define DD_ (   buf,
 
)    ((i)<-win_l_x0 ? get_D(buf,-win_l_x0) : ((i)>=sn ? get_D(buf,sn-1) : get_D(buf,i)))

◆ DD_off_

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

◆ DD_sgnd_off_

#define DD_sgnd_off_ (   buf,
  i,
  off 
)    ((i)<(-win_l_x0) ? get_D_off(buf,-win_l_x0,off) : ((i)>=sn ? get_D_off(buf,sn-1,off) : get_D_off(buf,i,off)))

◆ get_D

#define get_D (   buf,
 
)    buf[(1+((i)<<1))]

◆ get_D_off

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

◆ get_S

#define get_S (   buf,
 
)    buf[(i)<<1]

◆ get_S_off

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

◆ 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 (   buf,
 
)    buf[(i)<<1]

◆ S_

#define S_ (   buf,
 
)    ((i)<-win_l_x0 ? get_S(buf,-win_l_x0) : ((i)>=sn ? get_S(buf,sn-1) : get_S(buf,i)))

◆ S_off

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

◆ S_off_

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

◆ S_sgnd_off_

#define S_sgnd_off_ (   buf,
  i,
  off 
)    (((i)<(-win_l_x0) ? get_S_off(buf,-win_l_x0,off) : S_off_(buf,i,off)))

◆ SS_

#define SS_ (   buf,
 
)    ((i)<-win_h_x0 ? get_S(buf,-win_h_x0) : ((i)>=dn ? get_S(buf,dn-1) : get_S(buf,i)))

◆ SS_off_

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

◆ SS_sgnd_off_

#define SS_sgnd_off_ (   buf,
  i,
  off 
)    ((i)<(-win_h_x0) ? get_S_off(buf,-win_l_x0,off) : ((i)>=dn ? get_S_off(buf,dn-1,off) : get_S_off(buf,i,off)))