[trunk] [trunk] remove old opj_cp and rename opj_cp_v2 to opj_cp

This commit is contained in:
Mickael Savinaud 2012-10-25 15:09:31 +00:00
parent a41790ce8a
commit 7f7ef068fc
10 changed files with 75 additions and 186 deletions

View File

@ -99,7 +99,7 @@ void OPJ_CALLCONV opj_image_destroy(opj_image_t *image) {
* @param p_image_header the image header to update.
* @param p_cp the coding parameters from which to update the image.
*/
void opj_image_comp_header_update(opj_image_t * p_image_header, const struct opj_cp_v2 * p_cp)
void opj_image_comp_header_update(opj_image_t * p_image_header, const struct opj_cp * p_cp)
{
OPJ_UINT32 i, l_width, l_height;
OPJ_INT32 l_x0, l_y0, l_x1, l_y1;

View File

@ -53,7 +53,7 @@ opj_image_t* opj_image_create0(void);
* @param p_image_header the image header to update.
* @param p_cp the coding parameters from which to update the image.
*/
void opj_image_comp_header_update(opj_image_t * p_image, const struct opj_cp_v2* p_cp);
void opj_image_comp_header_update(opj_image_t * p_image, const struct opj_cp* p_cp);
void opj_copy_image_header(const opj_image_t* p_image_src, opj_image_t* p_image_dest);

View File

@ -203,7 +203,7 @@ static void opj_j2k_tcp_data_destroy (opj_tcp_v2_t *p_tcp);
*
* @param p_cp the coding parameter to destroy.
*/
static void opj_j2k_cp_destroy (opj_cp_v2_t *p_cp);
static void opj_j2k_cp_destroy (opj_cp_t *p_cp);
/**
* Writes a SPCod or SPCoc element, i.e. the coding style of a given component of a tile.
@ -1098,7 +1098,7 @@ static opj_bool opj_j2k_check_poc_val( const opj_poc_t *p_pocs,
*
* @return the number of tile parts.
*/
static OPJ_UINT32 opj_j2k_get_num_tp( opj_cp_v2_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno);
static OPJ_UINT32 opj_j2k_get_num_tp( opj_cp_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno);
/**
* Calculates the total number of tile parts needed by the encoder to
@ -1113,7 +1113,7 @@ static OPJ_UINT32 opj_j2k_get_num_tp( opj_cp_v2_t *cp, OPJ_UINT32 pino, OPJ_UINT
* @return true if the function was successful, false else.
*/
static opj_bool opj_j2k_calculate_tp( opj_j2k_t *p_j2k,
opj_cp_v2_t *cp,
opj_cp_t *cp,
OPJ_UINT32 * p_nb_tiles,
opj_image_t *image,
opj_event_mgr_t * p_manager);
@ -1541,7 +1541,7 @@ opj_bool opj_j2k_check_poc_val( const opj_poc_t *p_pocs,
/* ----------------------------------------------------------------------- */
OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_v2_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno)
OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno)
{
const OPJ_CHAR *prog = 00;
OPJ_UINT32 i;
@ -1600,7 +1600,7 @@ OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_v2_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tilen
}
opj_bool opj_j2k_calculate_tp( opj_j2k_t *p_j2k,
opj_cp_v2_t *cp,
opj_cp_t *cp,
OPJ_UINT32 * p_nb_tiles,
opj_image_t *image,
opj_event_mgr_t * p_manager
@ -1763,7 +1763,7 @@ opj_bool opj_j2k_write_siz( opj_j2k_t *p_j2k,
OPJ_UINT32 l_size_len;
OPJ_BYTE * l_current_ptr;
opj_image_t * l_image = 00;
opj_cp_v2_t *cp = 00;
opj_cp_t *cp = 00;
opj_image_comp_t * l_img_comp = 00;
/* preconditions */
@ -1870,7 +1870,7 @@ static opj_bool opj_j2k_read_siz(opj_j2k_t *p_j2k,
OPJ_UINT32 l_nb_tiles;
OPJ_UINT32 l_tmp;
opj_image_t *l_image = 00;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_image_comp_t * l_img_comp = 00;
opj_tcp_v2_t * l_current_tile_param = 00;
@ -2242,7 +2242,7 @@ opj_bool opj_j2k_write_cod( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
OPJ_UINT32 l_code_size,l_remaining_size;
OPJ_BYTE * l_current_data = 00;
@ -2325,7 +2325,7 @@ static opj_bool opj_j2k_read_cod ( opj_j2k_t *p_j2k,
/* loop */
OPJ_UINT32 i;
OPJ_UINT32 l_tmp;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
opj_image_t *l_image = 00;
@ -2453,7 +2453,7 @@ void opj_j2k_write_coc_in_memory( opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager
)
{
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
OPJ_UINT32 l_coc_size,l_remaining_size;
OPJ_BYTE * l_current_data = 00;
@ -2525,7 +2525,7 @@ static opj_bool opj_j2k_read_coc ( opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager
)
{
opj_cp_v2_t *l_cp = NULL;
opj_cp_t *l_cp = NULL;
opj_tcp_v2_t *l_tcp = NULL;
opj_image_t *l_image = NULL;
OPJ_UINT32 l_comp_room;
@ -2578,7 +2578,7 @@ opj_bool opj_j2k_write_qcd( opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager
)
{
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
OPJ_UINT32 l_qcd_size,l_remaining_size;
OPJ_BYTE * l_current_data = 00;
@ -3049,7 +3049,7 @@ static opj_bool opj_j2k_read_poc ( opj_j2k_t *p_j2k,
OPJ_UINT32 l_old_poc_nb, l_current_poc_nb, l_current_poc_remaining;
OPJ_UINT32 l_chunk_size, l_comp_room;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
opj_poc_t *l_current_poc = 00;
@ -3339,7 +3339,7 @@ opj_bool j2k_read_ppm_v2 (
)
{
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
OPJ_UINT32 l_remaining_data, l_Z_ppm, l_N_ppm;
/* preconditions */
@ -3440,7 +3440,7 @@ opj_bool j2k_read_ppm_v3 (
struct opj_event_mgr * p_manager
)
{
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
OPJ_UINT32 l_remaining_data, l_Z_ppm, l_N_ppm;
/* preconditions */
@ -3666,7 +3666,7 @@ static opj_bool opj_j2k_read_ppt ( opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager
)
{
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
OPJ_UINT32 l_Z_ppt;
@ -3838,7 +3838,7 @@ opj_bool opj_j2k_read_sot ( opj_j2k_t *p_j2k,
OPJ_UINT32 p_header_size,
opj_event_mgr_t * p_manager )
{
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
OPJ_UINT32 l_tot_len, l_num_parts = 0;
OPJ_UINT32 l_current_part;
@ -4083,7 +4083,7 @@ opj_bool opj_j2k_write_sod( opj_j2k_t *p_j2k,
{
opj_tcp_v2_t *l_tcp = 00;
opj_codestream_info_t *l_cstr_info = 00;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
OPJ_UINT32 l_size_tile;
OPJ_UINT32 l_remaining_data;
@ -4261,7 +4261,7 @@ opj_bool opj_j2k_read_sod (opj_j2k_t *p_j2k,
OPJ_UINT32 l_nb_comp;
OPJ_UINT32 l_rgn_size;
opj_image_t *l_image = 00;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00;
OPJ_UINT32 l_comp_room;
@ -4358,7 +4358,7 @@ static opj_bool opj_j2k_read_rgn (opj_j2k_t *p_j2k,
OPJ_UINT32 l_nb_comp;
opj_image_t * l_image = 00;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
OPJ_UINT32 l_comp_room, l_comp_no, l_roi_sty;
@ -4427,7 +4427,7 @@ opj_bool opj_j2k_update_rates( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
opj_cp_v2_t * l_cp = 00;
opj_cp_t * l_cp = 00;
opj_image_t * l_image = 00;
opj_tcp_v2_t * l_tcp = 00;
opj_image_comp_t * l_img_comp = 00;
@ -5726,7 +5726,7 @@ void opj_j2k_setup_encoder( opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager)
{
OPJ_UINT32 i, j, tileno, numpocs_tile;
opj_cp_v2_t *cp = 00;
opj_cp_t *cp = 00;
opj_bool l_res;
if(!p_j2k || !parameters || ! image) {
@ -6804,7 +6804,7 @@ void opj_j2k_destroy (opj_j2k_t *p_j2k)
opj_tcd_destroy(p_j2k->m_tcd);
opj_j2k_cp_destroy(&(p_j2k->m_cp));
memset(&(p_j2k->m_cp),0,sizeof(opj_cp_v2_t));
memset(&(p_j2k->m_cp),0,sizeof(opj_cp_t));
opj_procedure_list_destroy(p_j2k->m_procedure_list);
p_j2k->m_procedure_list = 00;
@ -6931,7 +6931,7 @@ void opj_j2k_tcp_data_destroy (opj_tcp_v2_t *p_tcp)
}
}
void opj_j2k_cp_destroy (opj_cp_v2_t *p_cp)
void opj_j2k_cp_destroy (opj_cp_t *p_cp)
{
OPJ_UINT32 l_nb_tiles;
opj_tcp_v2_t * l_current_tile = 00;
@ -7514,7 +7514,7 @@ opj_bool opj_j2k_set_decode_area( opj_j2k_t *p_j2k,
OPJ_INT32 p_end_x, OPJ_INT32 p_end_y,
opj_event_mgr_t * p_manager )
{
opj_cp_v2_t * l_cp = &(p_j2k->m_cp);
opj_cp_t * l_cp = &(p_j2k->m_cp);
opj_image_t * l_image = p_j2k->m_private_image;
OPJ_UINT32 it_comp;
@ -7746,7 +7746,7 @@ OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size ( opj_j2k_t *p_j2k,
OPJ_UINT32 p_tile_no,
OPJ_UINT32 p_comp_no )
{
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00;
@ -7777,7 +7777,7 @@ opj_bool opj_j2k_write_SPCod_SPCoc( opj_j2k_t *p_j2k,
struct opj_event_mgr * p_manager )
{
OPJ_UINT32 i;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00;
@ -7842,7 +7842,7 @@ opj_bool opj_j2k_read_SPCod_SPCoc( opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager)
{
OPJ_UINT32 i, l_tmp;
opj_cp_v2_t *l_cp = NULL;
opj_cp_t *l_cp = NULL;
opj_tcp_v2_t *l_tcp = NULL;
opj_tccp_t *l_tccp = NULL;
OPJ_BYTE * l_current_ptr = NULL;
@ -7945,7 +7945,7 @@ void opj_j2k_copy_tile_component_parameters( opj_j2k_t *p_j2k )
{
/* loop */
OPJ_UINT32 i;
opj_cp_v2_t *l_cp = NULL;
opj_cp_t *l_cp = NULL;
opj_tcp_v2_t *l_tcp = NULL;
opj_tccp_t *l_ref_tccp = NULL, *l_copied_tccp = NULL;
OPJ_UINT32 l_prc_size;
@ -7980,7 +7980,7 @@ OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size ( opj_j2k_t *p_j2k,
{
OPJ_UINT32 l_num_bands;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00;
@ -8016,7 +8016,7 @@ opj_bool opj_j2k_write_SQcd_SQcc( opj_j2k_t *p_j2k,
OPJ_UINT32 l_band_no, l_num_bands;
OPJ_UINT32 l_expn,l_mant;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00;
@ -8087,7 +8087,7 @@ opj_bool opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
{
/* loop*/
OPJ_UINT32 l_band_no;
opj_cp_v2_t *l_cp = 00;
opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00;
OPJ_BYTE * l_current_ptr = 00;
@ -8198,7 +8198,7 @@ opj_bool opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
void opj_j2k_copy_tile_quantization_parameters( opj_j2k_t *p_j2k )
{
OPJ_UINT32 i;
opj_cp_v2_t *l_cp = NULL;
opj_cp_t *l_cp = NULL;
opj_tcp_v2_t *l_tcp = NULL;
opj_tccp_t *l_ref_tccp = NULL;
opj_tccp_t *l_copied_tccp = NULL;
@ -9250,7 +9250,7 @@ opj_bool opj_j2k_post_write_tile ( opj_j2k_t * p_j2k,
opj_event_mgr_t * p_manager )
{
opj_tcd_t * l_tcd = 00;
opj_cp_v2_t * l_cp = 00;
opj_cp_t * l_cp = 00;
opj_tcp_v2_t * l_tcp = 00;
OPJ_UINT32 l_nb_bytes_written;
OPJ_BYTE * l_current_data = 00;
@ -9382,7 +9382,7 @@ opj_bool opj_j2k_write_first_tile_part (opj_j2k_t *p_j2k,
opj_tcp_v2_t *l_tcp = 00;
opj_tcd_t * l_tcd = 00;
opj_cp_v2_t * l_cp = 00;
opj_cp_t * l_cp = 00;
l_tcd = p_j2k->m_tcd;
l_cp = &(p_j2k->m_cp);
@ -9467,7 +9467,7 @@ opj_bool opj_j2k_write_all_tile_parts( opj_j2k_t *p_j2k,
OPJ_BYTE * l_begin_data;
opj_tcp_v2_t *l_tcp = 00;
opj_tcd_t * l_tcd = 00;
opj_cp_v2_t * l_cp = 00;
opj_cp_t * l_cp = 00;
l_tcd = p_j2k->m_tcd;
l_cp = &(p_j2k->m_cp);

View File

@ -332,117 +332,6 @@ typedef struct opj_tcp_v2
/** V1 STYLE
Coding parameters
*/
typedef struct opj_cp {
/** Digital cinema profile*/
OPJ_CINEMA_MODE cinema;
/** Maximum rate for each component. If == 0, component size limitation is not considered */
int max_comp_size;
/** Size of the image in bits*/
int img_size;
/** Rsiz*/
OPJ_RSIZ_CAPABILITIES rsiz;
/** Enabling Tile part generation*/
char tp_on;
/** Flag determining tile part generation*/
char tp_flag;
/** Position of tile part flag in progression order*/
int tp_pos;
/** allocation by rate/distortion */
int disto_alloc;
/** allocation by fixed layer */
int fixed_alloc;
/** add fixed_quality */
int fixed_quality;
/** if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decoded to the full resolution */
int reduce;
/** if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers are decoded */
int layer;
/** if == NO_LIMITATION, decode entire codestream; if == LIMIT_TO_MAIN_HEADER then only decode the main header */
OPJ_LIMIT_DECODING limit_decoding;
/** XTOsiz */
int tx0;
/** YTOsiz */
int ty0;
/** XTsiz */
int tdx;
/** YTsiz */
int tdy;
/** comment for coding */
char *comment;
/** number of tiles in width */
int tw;
/** number of tiles in heigth */
int th;
/** ID number of the tiles present in the codestream */
int *tileno;
/** size of the vector tileno */
int tileno_size;
/** packet header store there for futur use in t2_decode_packet */
unsigned char *ppm_data;
/** pointer remaining on the first byte of the first header if ppm is used */
unsigned char *ppm_data_first;
/** if ppm == 1 --> there was a PPM marker for the present tile */
int ppm;
/** use in case of multiple marker PPM (number of info already store) */
int ppm_store;
/** use in case of multiple marker PPM (case on non-finished previous info) */
int ppm_previous;
/** ppmbug1 */
int ppm_len;
/** tile coding parameters */
opj_tcp_t *tcps;
/** fixed layer */
int *matrice;
/* UniPG>> */
#ifdef USE_JPWL
/** enables writing of EPC in MH, thus activating JPWL */
opj_bool epc_on;
/** enables writing of EPB, in case of activated JPWL */
opj_bool epb_on;
/** enables writing of ESD, in case of activated JPWL */
opj_bool esd_on;
/** enables writing of informative techniques of ESD, in case of activated JPWL */
opj_bool info_on;
/** enables writing of RED, in case of activated JPWL */
opj_bool red_on;
/** error protection method for MH (0,1,16,32,37-128) */
int hprot_MH;
/** tile number of header protection specification (>=0) */
int hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS];
/** error protection methods for TPHs (0,1,16,32,37-128) */
int hprot_TPH[JPWL_MAX_NO_TILESPECS];
/** tile number of packet protection specification (>=0) */
int pprot_tileno[JPWL_MAX_NO_PACKSPECS];
/** packet number of packet protection specification (>=0) */
int pprot_packno[JPWL_MAX_NO_PACKSPECS];
/** error protection methods for packets (0,1,16,32,37-128) */
int pprot[JPWL_MAX_NO_PACKSPECS];
/** enables writing of ESD, (0/2/4 bytes) */
int sens_size;
/** sensitivity addressing size (0=auto/2/4 bytes) */
int sens_addr;
/** sensitivity range (0-3) */
int sens_range;
/** sensitivity method for MH (-1,0-7) */
int sens_MH;
/** tile number of sensitivity specification (>=0) */
int sens_TPH_tileno[JPWL_MAX_NO_TILESPECS];
/** sensitivity methods for TPHs (-1,0-7) */
int sens_TPH[JPWL_MAX_NO_TILESPECS];
/** enables JPWL correction at the decoder */
opj_bool correct;
/** expected number of components at the decoder */
int exp_comps;
/** maximum number of tiles at the decoder */
int max_tiles;
#endif /* USE_JPWL */
/* <<UniPG */
} opj_cp_t;
typedef struct opj_encoding_param
{
/** Digital cinema profile*/
@ -479,7 +368,7 @@ opj_decoding_param_t;
/**
* Coding parameters
*/
typedef struct opj_cp_v2
typedef struct opj_cp
{
/** Size of the image in bits*/
/*int img_size;*/
@ -581,7 +470,7 @@ typedef struct opj_cp_v2
/** tells if the parameter is a coding or decoding one */
OPJ_UINT32 m_is_decoder : 1;
/* <<UniPG */
} opj_cp_v2_t;
} opj_cp_t;
typedef struct opj_j2k_dec
@ -694,7 +583,7 @@ typedef struct opj_j2k
opj_image_t* m_output_image;
/** Coding parameters */
opj_cp_v2_t m_cp;
opj_cp_t m_cp;
/** the list of procedures to exec **/
opj_procedure_list_t * m_procedure_list;

View File

@ -83,7 +83,7 @@ static opj_bool opj_pi_next_cprl(opj_pi_iterator_t * pi);
* @param p_dx_min the minimum dx of all the components of all the resolutions for the tile.
* @param p_dy_min the minimum dy of all the components of all the resolutions for the tile.
*/
static void opj_pi_update_encode_poc_and_final ( opj_cp_v2_t *p_cp,
static void opj_pi_update_encode_poc_and_final ( opj_cp_t *p_cp,
OPJ_UINT32 p_tileno,
OPJ_INT32 p_tx0,
OPJ_INT32 p_tx1,
@ -108,7 +108,7 @@ static void opj_pi_update_encode_poc_and_final ( opj_cp_v2_t *p_cp,
* @param dx_min the minimum dx of all the components of all the resolutions for the tile.
* @param dy_min the minimum dy of all the components of all the resolutions for the tile.
*/
static void opj_pi_update_encode_not_poc ( opj_cp_v2_t *p_cp,
static void opj_pi_update_encode_not_poc ( opj_cp_t *p_cp,
OPJ_UINT32 p_num_comps,
OPJ_UINT32 p_tileno,
OPJ_INT32 p_tx0,
@ -135,7 +135,7 @@ static void opj_pi_update_encode_not_poc ( opj_cp_v2_t *p_cp,
* @param dy_min pointer that will hold the the minimum dy of all the components of all the resolutions for the tile.
*/
static void opj_get_encoding_parameters(const opj_image_t *p_image,
const opj_cp_v2_t *p_cp,
const opj_cp_t *p_cp,
OPJ_UINT32 tileno,
OPJ_INT32 * p_tx0,
OPJ_INT32 * p_tx1,
@ -167,7 +167,7 @@ static void opj_get_encoding_parameters(const opj_image_t *p_image,
* @param p_resolutions pointer to an area corresponding to the one described above.
*/
static void opj_get_all_encoding_parameters(const opj_image_t *p_image,
const opj_cp_v2_t *p_cp,
const opj_cp_t *p_cp,
OPJ_UINT32 tileno,
OPJ_INT32 * p_tx0,
OPJ_INT32 * p_tx1,
@ -187,7 +187,7 @@ static void opj_get_all_encoding_parameters(const opj_image_t *p_image,
* @param p_tile_no the index of the tile from which creating the packet iterator.
*/
static opj_pi_iterator_t * opj_pi_create( const opj_image_t *image,
const opj_cp_v2_t *cp,
const opj_cp_t *cp,
OPJ_UINT32 tileno );
/**
* FIXME DOC
@ -208,7 +208,7 @@ static void opj_pi_update_decode_poc ( opj_pi_iterator_t * p_pi,
* FIXME DOC
*/
opj_bool opj_pi_check_next_level( OPJ_INT32 pos,
opj_cp_v2_t *cp,
opj_cp_t *cp,
OPJ_UINT32 tileno,
OPJ_UINT32 pino,
const OPJ_CHAR *prog);
@ -546,7 +546,7 @@ LABEL_SKIP:;
}
void opj_get_encoding_parameters( const opj_image_t *p_image,
const opj_cp_v2_t *p_cp,
const opj_cp_t *p_cp,
OPJ_UINT32 p_tileno,
OPJ_INT32 * p_tx0,
OPJ_INT32 * p_tx1,
@ -660,7 +660,7 @@ void opj_get_encoding_parameters( const opj_image_t *p_image,
void opj_get_all_encoding_parameters( const opj_image_t *p_image,
const opj_cp_v2_t *p_cp,
const opj_cp_t *p_cp,
OPJ_UINT32 tileno,
OPJ_INT32 * p_tx0,
OPJ_INT32 * p_tx1,
@ -778,7 +778,7 @@ void opj_get_all_encoding_parameters( const opj_image_t *p_image,
}
opj_pi_iterator_t * opj_pi_create( const opj_image_t *image,
const opj_cp_v2_t *cp,
const opj_cp_t *cp,
OPJ_UINT32 tileno )
{
/* loop*/
@ -841,7 +841,7 @@ opj_pi_iterator_t * opj_pi_create( const opj_image_t *image,
return l_pi;
}
void opj_pi_update_encode_poc_and_final ( opj_cp_v2_t *p_cp,
void opj_pi_update_encode_poc_and_final ( opj_cp_t *p_cp,
OPJ_UINT32 p_tileno,
OPJ_INT32 p_tx0,
OPJ_INT32 p_tx1,
@ -917,7 +917,7 @@ void opj_pi_update_encode_poc_and_final ( opj_cp_v2_t *p_cp,
}
}
void opj_pi_update_encode_not_poc ( opj_cp_v2_t *p_cp,
void opj_pi_update_encode_not_poc ( opj_cp_t *p_cp,
OPJ_UINT32 p_num_comps,
OPJ_UINT32 p_tileno,
OPJ_INT32 p_tx0,
@ -1050,7 +1050,7 @@ void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi,
opj_bool opj_pi_check_next_level( OPJ_INT32 pos,
opj_cp_v2_t *cp,
opj_cp_t *cp,
OPJ_UINT32 tileno,
OPJ_UINT32 pino,
const OPJ_CHAR *prog)
@ -1138,7 +1138,7 @@ opj_bool opj_pi_check_next_level( OPJ_INT32 pos,
==========================================================
*/
opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image,
opj_cp_v2_t *p_cp,
opj_cp_t *p_cp,
OPJ_UINT32 p_tile_no)
{
/* loop */
@ -1340,7 +1340,7 @@ opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image,
opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *p_image,
opj_cp_v2_t *p_cp,
opj_cp_t *p_cp,
OPJ_UINT32 p_tile_no,
J2K_T2_MODE p_t2_mode )
{
@ -1526,7 +1526,7 @@ opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *p_image,
}
void opj_pi_create_encode( opj_pi_iterator_t *pi,
opj_cp_v2_t *cp,
opj_cp_t *cp,
OPJ_UINT32 tileno,
OPJ_UINT32 pino,
OPJ_UINT32 tpnum,
@ -1816,7 +1816,7 @@ void opj_pi_destroy(opj_pi_iterator_t *p_pi,
void opj_pi_update_encoding_parameters( const opj_image_t *p_image,
opj_cp_v2_t *p_cp,
opj_cp_t *p_cp,
OPJ_UINT32 p_tile_no )
{
/* encoding parameters to set */

View File

@ -115,7 +115,7 @@ typedef struct opj_pi_iterator {
* @return a list of packet iterator that points to the first packet of the tile (not true).
*/
opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *image,
opj_cp_v2_t *cp,
opj_cp_t *cp,
OPJ_UINT32 tileno,
J2K_T2_MODE t2_mode);
@ -127,7 +127,7 @@ opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *image,
* @param p_tile_no index of the tile being encoded.
*/
void opj_pi_update_encoding_parameters( const opj_image_t *p_image,
opj_cp_v2_t *p_cp,
opj_cp_t *p_cp,
OPJ_UINT32 p_tile_no );
/**
@ -141,7 +141,7 @@ Modify the packet iterator for enabling tile part generation
@param t2_mode FIXME DOC
*/
void opj_pi_create_encode( opj_pi_iterator_t *pi,
opj_cp_v2_t *cp,
opj_cp_t *cp,
OPJ_UINT32 tileno,
OPJ_UINT32 pino,
OPJ_UINT32 tpnum,
@ -157,7 +157,7 @@ Create a packet iterator for Decoder
@see opj_pi_destroy
*/
opj_pi_iterator_t *opj_pi_create_decode(opj_image_t * image,
opj_cp_v2_t * cp,
opj_cp_t * cp,
OPJ_UINT32 tileno);
/**
* Destroys a packet iterator array.

View File

@ -209,7 +209,7 @@ opj_bool opj_t2_encode_packets( opj_t2_t* p_t2,
opj_pi_iterator_t *l_pi = 00;
opj_pi_iterator_t *l_current_pi = 00;
opj_image_t *l_image = p_t2->image;
opj_cp_v2_t *l_cp = p_t2->cp;
opj_cp_t *l_cp = p_t2->cp;
opj_tcp_v2_t *l_tcp = &l_cp->tcps[p_tile_no];
OPJ_UINT32 pocno = l_cp->m_specific_param.m_enc.m_cinema == CINEMA4K_24? 2: 1;
OPJ_UINT32 l_max_comp = l_cp->m_specific_param.m_enc.m_max_comp_size > 0 ? l_image->numcomps : 1;
@ -322,8 +322,8 @@ opj_bool opj_t2_decode_packets( opj_t2_t *p_t2,
opj_pi_iterator_t *l_pi = 00;
OPJ_UINT32 pino;
opj_image_t *l_image = p_t2->image;
opj_cp_v2_t *l_cp = p_t2->cp;
opj_cp_v2_t *cp = p_t2->cp;
opj_cp_t *l_cp = p_t2->cp;
opj_cp_t *cp = p_t2->cp;
opj_tcp_v2_t *l_tcp = &(p_t2->cp->tcps[p_tile_no]);
OPJ_UINT32 l_nb_bytes_read;
OPJ_UINT32 l_nb_pocs = l_tcp->numpocs + 1;
@ -442,7 +442,7 @@ opj_bool opj_t2_decode_packets( opj_t2_t *p_t2,
* @param p_cp Image coding parameters.
* @return a new T2 handle if successful, NULL otherwise.
*/
opj_t2_t* opj_t2_create(opj_image_t *p_image, opj_cp_v2_t *p_cp)
opj_t2_t* opj_t2_create(opj_image_t *p_image, opj_cp_t *p_cp)
{
/* create the t2 structure */
opj_t2_t *l_t2 = (opj_t2_t*)opj_malloc(sizeof(opj_t2_t));
@ -785,7 +785,7 @@ opj_bool opj_t2_read_packet_header( opj_t2_t* p_t2,
OPJ_UINT32 l_header_length;
OPJ_UINT32 * l_modified_length_ptr = 00;
OPJ_BYTE *l_current_data = p_src_data;
opj_cp_v2_t *l_cp = p_t2->cp;
opj_cp_t *l_cp = p_t2->cp;
opj_bio_t *l_bio = 00; /* BIO component */
opj_tcd_band_t *l_band = 00;
opj_tcd_cblk_dec_t* l_cblk = 00;

View File

@ -49,7 +49,7 @@ typedef struct opj_t2 {
/** Encoding: pointer to the src image. Decoding: pointer to the dst image. */
opj_image_t *image;
/** pointer to the image coding parameters */
opj_cp_v2_t *cp;
opj_cp_t *cp;
} opj_t2_t;
/** @name Exported functions */
@ -111,7 +111,7 @@ opj_bool opj_t2_decode_packets( opj_t2_t *t2,
* @param p_cp Image coding parameters.
* @return a new T2 handle if successful, NULL otherwise.
*/
opj_t2_t* opj_t2_create(opj_image_t *p_image, opj_cp_v2_t *p_cp);
opj_t2_t* opj_t2_create(opj_image_t *p_image, opj_cp_t *p_cp);
/**
Destroy a T2 handle

View File

@ -288,7 +288,7 @@ void opj_tcd_makelayer_fixed(opj_tcd_t *tcd, OPJ_UINT32 layno, OPJ_UINT32 final)
OPJ_INT32 matrice[10][10][3];
OPJ_UINT32 i, j, k;
opj_cp_v2_t *cp = tcd->cp;
opj_cp_t *cp = tcd->cp;
opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles;
opj_tcp_v2_t *tcd_tcp = tcd->tcp;
@ -388,7 +388,7 @@ opj_bool opj_tcd_rateallocate( opj_tcd_t *tcd,
const OPJ_FLOAT64 K = 1; /* 1.1; fixed_quality */
OPJ_FLOAT64 maxSE = 0;
opj_cp_v2_t *cp = tcd->cp;
opj_cp_t *cp = tcd->cp;
opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles;
opj_tcp_v2_t *tcd_tcp = tcd->tcp;
@ -565,7 +565,7 @@ opj_bool opj_tcd_rateallocate( opj_tcd_t *tcd,
opj_bool opj_tcd_init( opj_tcd_t *p_tcd,
opj_image_t * p_image,
opj_cp_v2_t * p_cp )
opj_cp_t * p_cp )
{
OPJ_UINT32 l_tile_comp_size;
@ -615,7 +615,7 @@ opj_bool FUNCTION ( opj_tcd_t *p_tcd, \
OPJ_UINT32 (*l_gain_ptr)(OPJ_UINT32) = 00; \
OPJ_UINT32 compno, resno, bandno, precno, cblkno; \
opj_tcp_v2_t * l_tcp = 00; \
opj_cp_v2_t * l_cp = 00; \
opj_cp_t * l_cp = 00; \
opj_tcd_tile_t * l_tile = 00; \
opj_tccp_t *l_tccp = 00; \
opj_tcd_tilecomp_t *l_tilec = 00; \
@ -1997,7 +1997,7 @@ opj_bool opj_tcd_rate_allocate_encode( opj_tcd_t *p_tcd,
OPJ_UINT32 p_max_dest_size,
opj_codestream_info_t *p_cstr_info )
{
opj_cp_v2_t * l_cp = p_tcd->cp;
opj_cp_t * l_cp = p_tcd->cp;
OPJ_UINT32 l_nb_written = 0;
if (p_cstr_info) {

View File

@ -200,7 +200,7 @@ typedef struct opj_tcd
/** image header */
opj_image_t *image;
/** coding parameters */
opj_cp_v2_t *cp;
opj_cp_t *cp;
/** coding/decoding parameters common to all tiles */
opj_tcp_v2_t *tcp;
/** current encoded/decoded tile */
@ -241,7 +241,7 @@ void opj_tcd_destroy(opj_tcd_t *tcd);
*/
opj_bool opj_tcd_init( opj_tcd_t *p_tcd,
opj_image_t * p_image,
opj_cp_v2_t * p_cp );
opj_cp_t * p_cp );
/**
* Allocates memory for decoding a specific tile.