OpenJPEG  1.5.1
t1.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
3  * Copyright (c) 2002-2007, Professor Benoit Macq
4  * Copyright (c) 2001-2003, David Janssens
5  * Copyright (c) 2002-2003, Yannick Verschueren
6  * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
7  * Copyright (c) 2005, Herve Drolon, FreeImage Team
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 #ifndef __T1_H
32 #define __T1_H
33 
43 
44 /* ----------------------------------------------------------------------- */
45 #define T1_NMSEDEC_BITS 7
46 
47 #define T1_SIG_NE 0x0001
48 #define T1_SIG_SE 0x0002
49 #define T1_SIG_SW 0x0004
50 #define T1_SIG_NW 0x0008
51 #define T1_SIG_N 0x0010
52 #define T1_SIG_E 0x0020
53 #define T1_SIG_S 0x0040
54 #define T1_SIG_W 0x0080
55 #define T1_SIG_OTH (T1_SIG_N|T1_SIG_NE|T1_SIG_E|T1_SIG_SE|T1_SIG_S|T1_SIG_SW|T1_SIG_W|T1_SIG_NW)
56 #define T1_SIG_PRIM (T1_SIG_N|T1_SIG_E|T1_SIG_S|T1_SIG_W)
57 
58 #define T1_SGN_N 0x0100
59 #define T1_SGN_E 0x0200
60 #define T1_SGN_S 0x0400
61 #define T1_SGN_W 0x0800
62 #define T1_SGN (T1_SGN_N|T1_SGN_E|T1_SGN_S|T1_SGN_W)
63 
64 #define T1_SIG 0x1000
65 #define T1_REFINE 0x2000
66 #define T1_VISIT 0x4000
67 
68 #define T1_NUMCTXS_ZC 9
69 #define T1_NUMCTXS_SC 5
70 #define T1_NUMCTXS_MAG 3
71 #define T1_NUMCTXS_AGG 1
72 #define T1_NUMCTXS_UNI 1
73 
74 #define T1_CTXNO_ZC 0
75 #define T1_CTXNO_SC (T1_CTXNO_ZC+T1_NUMCTXS_ZC)
76 #define T1_CTXNO_MAG (T1_CTXNO_SC+T1_NUMCTXS_SC)
77 #define T1_CTXNO_AGG (T1_CTXNO_MAG+T1_NUMCTXS_MAG)
78 #define T1_CTXNO_UNI (T1_CTXNO_AGG+T1_NUMCTXS_AGG)
79 #define T1_NUMCTXS (T1_CTXNO_UNI+T1_NUMCTXS_UNI)
80 
81 #define T1_NMSEDEC_FRACBITS (T1_NMSEDEC_BITS-1)
82 
83 #define T1_TYPE_MQ 0
84 #define T1_TYPE_RAW 1
86 /* ----------------------------------------------------------------------- */
87 
88 typedef short flag_t;
89 
93 typedef struct opj_t1 {
96 
101 
102  int *data;
104  int w;
105  int h;
106  int datasize;
110 
111 #define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)]
112 
115 /* ----------------------------------------------------------------------- */
127 void t1_destroy(opj_t1_t *t1);
134 void t1_encode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp);
141 void t1_decode_cblks(opj_t1_t* t1, opj_tcd_tilecomp_t* tilec, opj_tccp_t* tccp);
142 /* ----------------------------------------------------------------------- */
146 
147 #endif /* __T1_H */
t1_encode_cblks
void t1_encode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp)
Encode the code-blocks of a tile.
Definition: t1.c:1399
opj_tcd_tile::distotile
double distotile
Definition: tcd.h:156
J2K_CCP_CBLKSTY_PTERM
#define J2K_CCP_CBLKSTY_PTERM
Predictable termination.
Definition: j2k.h:52
opj_tcd_resolution::y1
int y1
Definition: tcd.h:131
opj_tcd_cblk_dec::y0
int y0
Definition: tcd.h:94
opj_mqc
MQ coder.
Definition: mqc.h:64
opj_t1::flagssize
int flagssize
Definition: t1.h:107
t1_updateflags
static void t1_updateflags(flag_t *flagsp, int s, int stride)
Definition: t1.c:313
int_abs
static INLINE int int_abs(int a)
Definition: int.h:79
opj_free
#define opj_free(m)
Deallocates or frees a memory block.
Definition: opj_malloc.h:152
lut_nmsedec_ref
static short lut_nmsedec_ref[1<< T1_NMSEDEC_BITS]
Definition: t1_luts.h:106
J2K_CCP_CBLKSTY_SEGSYM
#define J2K_CCP_CBLKSTY_SEGSYM
Segmentation symbols are used.
Definition: j2k.h:53
opj_tcd_cblk_enc
FIXME: documentation.
Definition: tcd.h:79
opj_malloc
#define opj_malloc(size)
Allocate an uninitialized memory block.
Definition: opj_malloc.h:51
opj_tcd_cblk_enc::totalpasses
int totalpasses
Definition: tcd.h:88
int_max
static INLINE int int_max(int a, int b)
Get the maximum of two integers.
Definition: int.h:57
T1_CTXNO_UNI
#define T1_CTXNO_UNI
Definition: t1.h:78
opj_raw
RAW encoding operations.
Definition: raw.h:46
mqc_init_dec
void mqc_init_dec(opj_mqc_t *mqc, unsigned char *bp, int len)
Initialize the decoder.
Definition: mqc.c:511
opj_tcd_seg
FIXME: documentation.
Definition: tcd.h:47
T1_SIG_W
#define T1_SIG_W
Context orientation : West direction.
Definition: t1.h:54
t1_luts.h
mqc_bypass_init_enc
void mqc_bypass_init_enc(opj_mqc_t *mqc)
BYPASS mode switch, initialization operation.
Definition: mqc.c:410
opj_tcd_pass::len
int len
Definition: tcd.h:63
opj_tcd_seg::len
int len
Definition: tcd.h:51
opj_tcd_resolution::pw
int pw
Definition: tcd.h:132
opj_tcd_cblk_dec::numbps
int numbps
Definition: tcd.h:95
T1_CTXNO_AGG
#define T1_CTXNO_AGG
Definition: t1.h:77
opj_tcd_cblk_enc::passes
opj_tcd_pass_t * passes
Definition: tcd.h:82
t1_dec_sigpass_raw
static void t1_dec_sigpass_raw(opj_t1_t *t1, int bpno, int orient, int cblksty)
Decode significant pass.
Definition: t1.c:479
t1_decode_cblk
static void t1_decode_cblk(opj_t1_t *t1, opj_tcd_cblk_dec_t *cblk, int orient, int roishift, int cblksty)
Decode 1 code-block.
Definition: t1.c:1280
opj_tccp::qmfbid
int qmfbid
discrete wavelet transform identifier
Definition: j2k.h:146
T1_CTXNO_ZC
#define T1_CTXNO_ZC
Definition: t1.h:74
opj_tcd_resolution::numbands
int numbands
Definition: tcd.h:133
t1_create
opj_t1_t * t1_create(opj_common_ptr cinfo)
Create a new T1 handle and initialize the look-up tables of the Tier-1 coder/decoder.
Definition: t1.c:1370
opj_tcd_resolution::bands
opj_tcd_band_t bands[3]
Definition: tcd.h:134
J2K_CCP_CBLKSTY_LAZY
#define J2K_CCP_CBLKSTY_LAZY
Selective arithmetic coding bypass.
Definition: j2k.h:48
T1_SGN_N
#define T1_SGN_N
Definition: t1.h:58
mqc_destroy
void mqc_destroy(opj_mqc_t *mqc)
Destroy a previously created MQC handle.
Definition: mqc.c:363
OPJ_ARG_NOT_USED
#define OPJ_ARG_NOT_USED(x)
Definition: openjpeg.h:68
opj_tccp::roishift
int roishift
Region Of Interest shift.
Definition: j2k.h:154
mqc_erterm_enc
void mqc_erterm_enc(opj_mqc_t *mqc)
ERTERM mode switch (PTERM)
Definition: mqc.c:487
t1_enc_sigpass_step
static void t1_enc_sigpass_step(opj_t1_t *t1, flag_t *flagsp, int *datap, int orient, int bpno, int one, int *nmsedec, char type, int vsc)
Encode significant pass.
Definition: t1.c:337
t1_dec_clnpass_step_partial
static void t1_dec_clnpass_step_partial(opj_t1_t *t1, flag_t *flagsp, int *datap, int orient, int oneplushalf)
Decode clean-up pass.
Definition: t1.c:819
opj_t1::mqc
opj_mqc_t * mqc
MQC component.
Definition: t1.h:98
t1_encode_cblks
void t1_encode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp)
Encode the code-blocks of a tile.
Definition: t1.c:1399
t1_dec_refpass_step_mqc
static INLINE void t1_dec_refpass_step_mqc(opj_t1_t *t1, flag_t *flagsp, int *datap, int poshalf, int neghalf)
Definition: t1.c:621
lut_spb
static char lut_spb[256]
Definition: t1_luts.h:57
opj_tcd_pass::rate
int rate
Definition: tcd.h:61
t1_getnmsedec_ref
static short t1_getnmsedec_ref(int x, int bitpos)
Definition: t1.c:305
t1_dec_clnpass_step_vsc
static void t1_dec_clnpass_step_vsc(opj_t1_t *t1, flag_t *flagsp, int *datap, int orient, int oneplushalf, int partial, int vsc)
Definition: t1.c:863
lut_nmsedec_sig0
static short lut_nmsedec_sig0[1<< T1_NMSEDEC_BITS]
Definition: t1_luts.h:87
opj_t1::h
int h
Definition: t1.h:105
opj_t1::data
int * data
Definition: t1.h:102
opj_t1_t
struct opj_t1 opj_t1_t
Tier-1 coding (coding of code-block coefficients)
T1_SIG_E
#define T1_SIG_E
Context orientation : East direction.
Definition: t1.h:52
t1_dec_refpass_mqc_vsc
static void t1_dec_refpass_mqc_vsc(opj_t1_t *t1, int bpno)
Definition: t1.c:759
raw_decode
int raw_decode(opj_raw_t *raw)
Decode a symbol using raw-decoder.
Definition: raw.c:68
opj_tcd_seg::numpasses
int numpasses
Definition: tcd.h:50
opj_tcd_tilecomp::resolutions
opj_tcd_resolution_t * resolutions
Definition: tcd.h:143
opj_tcd_tilecomp::x0
int x0
Definition: tcd.h:141
t1_enc_sigpass
static void t1_enc_sigpass(opj_t1_t *t1, int bpno, int orient, int *nmsedec, char type, int cblksty)
Encode significant pass.
Definition: t1.c:449
opj_tcd_tilecomp::x1
int x1
Definition: tcd.h:141
raw_destroy
void raw_destroy(opj_raw_t *raw)
Destroy a previously created RAW handle.
Definition: raw.c:50
lut_nmsedec_sig
static short lut_nmsedec_sig[1<< T1_NMSEDEC_BITS]
Definition: t1_luts.h:68
dwt_getnorm_real
double dwt_getnorm_real(int level, int orient)
Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT.
Definition: dwt.c:473
mqc_restart_init_enc
void mqc_restart_init_enc(opj_mqc_t *mqc)
RESTART mode switch (TERMALL) reinitialisation.
Definition: mqc.c:475
opj_t1::w
int w
Definition: t1.h:104
opj_aligned_free
#define opj_aligned_free(m)
Definition: opj_malloc.h:110
t1_dec_sigpass_mqc_vsc
static void t1_dec_sigpass_mqc_vsc(opj_t1_t *t1, int bpno, int orient)
Definition: t1.c:547
opj_aligned_malloc
#define opj_aligned_malloc(size)
Definition: opj_malloc.h:108
opj_t1
Tier-1 coding (coding of code-block coefficients)
Definition: t1.h:93
opj_t1::cinfo
opj_common_ptr cinfo
codec context
Definition: t1.h:95
t1_enc_refpass
static void t1_enc_refpass(opj_t1_t *t1, int bpno, int *nmsedec, char type, int cblksty)
Encode refinement pass.
Definition: t1.c:664
t1_create
opj_t1_t * t1_create(opj_common_ptr cinfo)
Create a new T1 handle and initialize the look-up tables of the Tier-1 coder/decoder.
Definition: t1.c:1370
opj_t1::datasize
int datasize
Definition: t1.h:106
t1_dec_sigpass_step_mqc
static INLINE void t1_dec_sigpass_step_mqc(opj_t1_t *t1, flag_t *flagsp, int *datap, int orient, int oneplushalf)
Definition: t1.c:400
opj_tcd_precinct::enc
opj_tcd_cblk_enc_t * enc
Definition: tcd.h:109
opj_tcd_precinct::cw
int cw
Definition: tcd.h:107
opj_tcd_precinct
FIXME: documentation.
Definition: tcd.h:105
t1_getspb
static char t1_getspb(int f)
Definition: t1.c:293
opj_includes.h
opj_tcd_resolution::y0
int y0
Definition: tcd.h:131
mqc_create
opj_mqc_t * mqc_create(void)
Create a new MQC handle.
Definition: mqc.c:355
lut_ctxno_sc
static char lut_ctxno_sc[256]
Definition: t1_luts.h:38
t1_dec_refpass_raw
static void t1_dec_refpass_raw(opj_t1_t *t1, int bpno, int cblksty)
Decode refinement pass.
Definition: t1.c:692
opj_tcd_pass
FIXME: documentation.
Definition: tcd.h:60
t1_encode_cblk
static void t1_encode_cblk(opj_t1_t *t1, opj_tcd_cblk_enc_t *cblk, int orient, int compno, int level, int qmfbid, double stepsize, int cblksty, int numcomps, int mct, opj_tcd_tile_t *tile)
Encode 1 code-block.
Definition: t1.c:1146
opj_tcd_resolution
FIXME: documentation.
Definition: tcd.h:130
t1_getctxno_sc
static char t1_getctxno_sc(int f)
Definition: t1.c:283
t1_destroy
void t1_destroy(opj_t1_t *t1)
Destroy a previously created T1 handle.
Definition: t1.c:1388
opj_tcd_tilecomp
FIXME: documentation.
Definition: tcd.h:140
opj_tcd_cblk_dec::numsegs
int numsegs
Definition: tcd.h:99
t1_decode_cblks
void t1_decode_cblks(opj_t1_t *t1, opj_tcd_tilecomp_t *tilec, opj_tccp_t *tccp)
Decode the code-blocks of a tile.
Definition: t1.c:1494
opj_tcd_band
FIXME: documentation.
Definition: tcd.h:119
t1_dec_clnpass
static void t1_dec_clnpass(opj_t1_t *t1, int bpno, int orient, int cblksty)
Decode clean-up pass.
Definition: t1.c:957
mqc_reset_enc
void mqc_reset_enc(opj_mqc_t *mqc)
RESET mode switch.
Definition: mqc.c:452
t1_dec_sigpass_step_mqc_vsc
static INLINE void t1_dec_sigpass_step_mqc_vsc(opj_t1_t *t1, flag_t *flagsp, int *datap, int orient, int oneplushalf, int vsc)
Definition: t1.c:424
dwt_getnorm
double dwt_getnorm(int level, int orient)
Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT.
Definition: dwt.c:401
fix_mul
static INLINE int fix_mul(int a, int b)
Multiply two fixed-precision rational numbers.
Definition: fix.h:56
opj_tcd_precinct::cblks
union opj_tcd_precinct::@0 cblks
int_floorlog2
static INLINE int int_floorlog2(int a)
Get logarithm of an integer and round downwards.
Definition: int.h:107
t1_dec_clnpass_step
static void t1_dec_clnpass_step(opj_t1_t *t1, flag_t *flagsp, int *datap, int orient, int oneplushalf)
Definition: t1.c:839
T1_TYPE_MQ
#define T1_TYPE_MQ
Normal coding using entropy coder.
Definition: t1.h:83
opj_tcd_tilecomp::numresolutions
int numresolutions
Definition: tcd.h:142
opj_tcp::mct
int mct
multi-component transform identifier
Definition: j2k.h:176
opj_tcd_cblk_enc::x0
int x0
Definition: tcd.h:83
T1_SIG_N
#define T1_SIG_N
Context orientation : North direction.
Definition: t1.h:51
OPJ_TRUE
#define OPJ_TRUE
Definition: openjpeg.h:64
t1_dec_refpass_step_mqc_vsc
static INLINE void t1_dec_refpass_step_mqc_vsc(opj_t1_t *t1, flag_t *flagsp, int *datap, int poshalf, int neghalf, int vsc)
Definition: t1.c:642
mqc_segmark_enc
void mqc_segmark_enc(opj_mqc_t *mqc)
SEGMARK mode switch (SEGSYM)
Definition: mqc.c:502
lut_nmsedec_ref0
static short lut_nmsedec_ref0[1<< T1_NMSEDEC_BITS]
Definition: t1_luts.h:125
t1_dec_refpass_mqc
static void t1_dec_refpass_mqc(opj_t1_t *t1, int bpno)
Definition: t1.c:718
opj_tcd_resolution::x1
int x1
Definition: tcd.h:131
opj_tcd_cblk_dec::data
unsigned char * data
Definition: tcd.h:92
mqc_decode
int mqc_decode(opj_mqc_t *const mqc)
Decode a symbol.
Definition: mqc.c:562
opj_t1::raw
opj_raw_t * raw
RAW component.
Definition: t1.h:100
opj_tcd_cblk_enc::x1
int x1
Definition: tcd.h:83
mqc_setstate
void mqc_setstate(opj_mqc_t *mqc, int ctxno, int msb, int prob)
Set the state of a particular context.
Definition: mqc.c:588
opj_common_struct
Definition: openjpeg.h:430
allocate_buffers
static opj_bool allocate_buffers(opj_t1_t *t1, int w, int h)
Definition: t1.c:1108
opj_tcd_cblk_dec::y1
int y1
Definition: tcd.h:94
mct_getnorm
double mct_getnorm(int compno)
Get norm of the basis function used for the reversible multi-component transform.
Definition: mct.c:97
flag_t
short flag_t
Definition: t1.h:88
opj_tcd_cblk_dec::x0
int x0
Definition: tcd.h:94
T1_SGN_S
#define T1_SGN_S
Definition: t1.h:60
opj_tcd_cblk_enc::numbps
int numbps
Definition: tcd.h:84
T1_SIG_S
#define T1_SIG_S
Context orientation : South direction.
Definition: t1.h:53
t1_dec_sigpass_step_raw
static INLINE void t1_dec_sigpass_step_raw(opj_t1_t *t1, flag_t *flagsp, int *datap, int orient, int oneplushalf, int vsc)
Decode significant pass.
Definition: t1.c:376
lut_ctxno_zc
static char lut_ctxno_zc[1024]
Definition: t1_luts.h:3
t1_dec_refpass_step_raw
static INLINE void t1_dec_refpass_step_raw(opj_t1_t *t1, flag_t *flagsp, int *datap, int poshalf, int neghalf, int vsc)
Decode refinement pass.
Definition: t1.c:600
T1_SIG_PRIM
#define T1_SIG_PRIM
Definition: t1.h:56
mqc_encode
void mqc_encode(opj_mqc_t *mqc, int d)
Encode a symbol using the MQ-coder.
Definition: mqc.c:390
MACRO_t1_flags
#define MACRO_t1_flags(x, y)
Definition: t1.h:111
opj_tcp
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: j2k.h:166
opj_tcp::tccps
opj_tccp_t * tccps
tile-component coding parameters
Definition: j2k.h:198
t1_enc_clnpass_step
static void t1_enc_clnpass_step(opj_t1_t *t1, flag_t *flagsp, int *datap, int orient, int bpno, int one, int *nmsedec, int partial, int vsc)
Encode clean-up pass.
Definition: t1.c:784
T1_NMSEDEC_FRACBITS
#define T1_NMSEDEC_FRACBITS
Definition: t1.h:81
T1_SIG_OTH
#define T1_SIG_OTH
Definition: t1.h:55
mct_getnorm_real
double mct_getnorm_real(int compno)
Get norm of the basis function used for the irreversible multi-component transform.
Definition: mct.c:188
opj_tcd_cblk_dec
Definition: tcd.h:91
T1_VISIT
#define T1_VISIT
Definition: t1.h:66
opj_bool
int opj_bool
Definition: openjpeg.h:63
opj_tcd_seg::data
unsigned char ** data
Definition: tcd.h:48
opj_tcd_tile::numcomps
int numcomps
Definition: tcd.h:153
T1_CTXNO_MAG
#define T1_CTXNO_MAG
Definition: t1.h:76
restrict
#define restrict
Definition: opj_includes.h:85
opj_tccp
Tile-component coding parameters.
Definition: j2k.h:134
t1_enc_clnpass
static void t1_enc_clnpass(opj_t1_t *t1, int bpno, int orient, int *nmsedec, int cblksty)
Encode clean-up pass.
Definition: t1.c:893
opj_tcd_cblk_enc::data
unsigned char * data
Definition: tcd.h:80
T1_SGN_W
#define T1_SGN_W
Definition: t1.h:61
opj_tcd_tile
FIXME: documentation.
Definition: tcd.h:151
T1_SIG_SE
#define T1_SIG_SE
Context orientation : South-East direction.
Definition: t1.h:48
opj_tcd_cblk_enc::y0
int y0
Definition: tcd.h:83
opj_tcd_seg::dataindex
int dataindex
Definition: tcd.h:49
mqc_numbytes
int mqc_numbytes(opj_mqc_t *mqc)
Return the number of bytes written/read since initialisation.
Definition: mqc.c:374
J2K_CCP_CBLKSTY_RESET
#define J2K_CCP_CBLKSTY_RESET
Reset context probabilities on coding pass boundaries.
Definition: j2k.h:49
opj_tccp::cblksty
int cblksty
code-block coding style
Definition: j2k.h:144
T1_SIG
#define T1_SIG
Definition: t1.h:64
t1_getctxno_mag
static INLINE int t1_getctxno_mag(int f)
Definition: t1.c:287
T1_SIG_NE
#define T1_SIG_NE
Context orientation : North-East direction.
Definition: t1.h:47
opj_tcd_resolution::x0
int x0
Definition: tcd.h:131
INLINE
#define INLINE
Definition: opj_includes.h:75
opj_tcd_pass::term
int term
Definition: tcd.h:63
T1_SIG_SW
#define T1_SIG_SW
Context orientation : South-West direction.
Definition: t1.h:49
T1_SGN
#define T1_SGN
Definition: t1.h:62
opj_t1::flags
flag_t * flags
Definition: t1.h:103
opj_tcd_tilecomp::data
int * data
Definition: tcd.h:144
t1_getctxno_zc
static INLINE char t1_getctxno_zc(int f, int orient)
Definition: t1.c:279
raw_create
opj_raw_t * raw_create(void)
Create a new RAW handle.
Definition: raw.c:45
opj_tcd_cblk_dec::segs
opj_tcd_seg_t * segs
Definition: tcd.h:93
raw_init_dec
void raw_init_dec(opj_raw_t *raw, unsigned char *bp, int len)
Initialize the decoder.
Definition: raw.c:60
OPJ_FALSE
#define OPJ_FALSE
Definition: openjpeg.h:65
t1_dec_sigpass_mqc
static void t1_dec_sigpass_mqc(opj_t1_t *t1, int bpno, int orient)
Definition: t1.c:505
opj_tcd_pass::distortiondec
double distortiondec
Definition: tcd.h:62
t1_destroy
void t1_destroy(opj_t1_t *t1)
Destroy a previously created T1 handle.
Definition: t1.c:1388
mqc_bypass_enc
void mqc_bypass_enc(opj_mqc_t *mqc, int d)
BYPASS mode switch, coding operation.
Definition: mqc.c:418
t1_decode_cblks
void t1_decode_cblks(opj_t1_t *t1, opj_tcd_tilecomp_t *tilec, opj_tccp_t *tccp)
Decode the code-blocks of a tile.
Definition: t1.c:1494
T1_SGN_E
#define T1_SGN_E
Definition: t1.h:59
J2K_CCP_CBLKSTY_TERMALL
#define J2K_CCP_CBLKSTY_TERMALL
Termination on each coding pass.
Definition: j2k.h:50
T1_SIG_NW
#define T1_SIG_NW
Context orientation : North-West direction.
Definition: t1.h:50
opj_tcd_precinct::dec
opj_tcd_cblk_dec_t * dec
Definition: tcd.h:110
opj_tcd_cblk_enc::y1
int y1
Definition: tcd.h:83
mqc_resetstates
void mqc_resetstates(opj_mqc_t *mqc)
Reset the states of all the context of the coder/decoder (each context is set to a state where 0 and ...
Definition: mqc.c:581
t1_getnmsedec_sig
static short t1_getnmsedec_sig(int x, int bitpos)
Definition: t1.c:297
opj_t1::flags_stride
int flags_stride
Definition: t1.h:108
t1_enc_refpass_step
static void t1_enc_refpass_step(opj_t1_t *t1, flag_t *flagsp, int *datap, int bpno, int one, int *nmsedec, char type, int vsc)
Encode refinement pass.
Definition: t1.c:572
opj_tcd_precinct::ch
int ch
Definition: tcd.h:107
opj_tcd_tile::comps
opj_tcd_tilecomp_t * comps
Definition: tcd.h:154
T1_REFINE
#define T1_REFINE
Definition: t1.h:65
mqc_setcurctx
#define mqc_setcurctx(mqc, ctxno)
Set the current context used for coding/decoding.
Definition: mqc.h:122
t1_getwmsedec
static double t1_getwmsedec(int nmsedec, int compno, int level, int orient, int bpno, int qmfbid, double stepsize, int numcomps, int mct)
mod fixed_quality
Definition: t1.c:1083
T1_TYPE_RAW
#define T1_TYPE_RAW
No encoding the information is store under raw format in codestream (mode switch RAW)
Definition: t1.h:84
opj_tcd_cblk_dec::x1
int x1
Definition: tcd.h:94
J2K_CCP_CBLKSTY_VSC
#define J2K_CCP_CBLKSTY_VSC
Vertically stripe causal context.
Definition: j2k.h:51
mqc_init_enc
void mqc_init_enc(opj_mqc_t *mqc, unsigned char *bp)
Initialize the encoder.
Definition: mqc.c:378
mqc_flush
void mqc_flush(opj_mqc_t *mqc)
Flush the encoder, so that all remaining data is written.
Definition: mqc.c:398
opj_tcd_resolution::ph
int ph
Definition: tcd.h:132
T1_NMSEDEC_BITS
#define T1_NMSEDEC_BITS
Definition: t1.h:45