/*
- * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
- * Copyright (c) 2002-2007, Professor Benoit Macq
+ * The copyright in this software is being made available under the 2-clauses
+ * BSD License, included below. This software may be subject to other third
+ * party and contributor rights, including patent rights, and no such rights
+ * are granted under this license.
+ *
+ * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
+ * Copyright (c) 2002-2014, Professor Benoit Macq
* Copyright (c) 2001-2003, David Janssens
* Copyright (c) 2002-2003, Yannick Verschueren
- * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
+ * Copyright (c) 2003-2007, Francois-Olivier Devaux
+ * Copyright (c) 2003-2014, Antonin Descampe
* Copyright (c) 2005, Herve Drolon, FreeImage Team
* All rights reserved.
*
Tier-1 coding (coding of code-block coefficients)
*/
typedef struct opj_t1 {
- /** codec context */
- opj_common_ptr cinfo; /* TODO MSD : TO BE REMOVED */
/** MQC component */
opj_mqc_t *mqc;
/** RAW component */
opj_raw_t *raw;
- OPJ_INT32 *data;
+ OPJ_INT32 *data;
opj_flag_t *flags;
OPJ_UINT32 w;
OPJ_UINT32 h;
OPJ_UINT32 datasize;
OPJ_UINT32 flagssize;
OPJ_UINT32 flags_stride;
+ OPJ_UINT32 data_stride;
+ OPJ_BOOL encoder;
} opj_t1_t;
#define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)]
@param tile The tile to encode
@param tcp Tile coding parameters
@param mct_norms FIXME DOC
+@param mct_numcomps Number of components used for MCT
*/
-opj_bool opj_t1_encode_cblks( opj_t1_t *t1,
+OPJ_BOOL opj_t1_encode_cblks( opj_t1_t *t1,
opj_tcd_tile_t *tile,
- opj_tcp_v2_t *tcp,
- const OPJ_FLOAT64 * mct_norms);
+ opj_tcp_t *tcp,
+ const OPJ_FLOAT64 * mct_norms,
+ OPJ_UINT32 mct_numcomps);
/**
Decode the code-blocks of a tile
@param tilec The tile to decode
@param tccp Tile coding parameters
*/
-opj_bool opj_t1_decode_cblks( opj_t1_t* t1,
+OPJ_BOOL opj_t1_decode_cblks( opj_t1_t* t1,
opj_tcd_tilecomp_t* tilec,
opj_tccp_t* tccp);
* and initializes the look-up tables of the Tier-1 coder/decoder
* @return a new T1 handle if successful, returns NULL otherwise
*/
-opj_t1_t* opj_t1_create(void);
+opj_t1_t* opj_t1_create(OPJ_BOOL isEncoder);
/**
* Destroys a previously created T1 handle