opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager );
-void opj_j2k_update_tlm (opj_j2k_t * p_j2k, OPJ_UINT32 p_tile_part_size )
+static void opj_j2k_update_tlm (opj_j2k_t * p_j2k, OPJ_UINT32 p_tile_part_size )
{
opj_write_bytes(p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_current,p_j2k->m_current_tile_number,1); /* PSOT */
++p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_current;
char str_prog[5];
}j2k_prog_order_t;
-j2k_prog_order_t j2k_prog_order_list[] = {
+static j2k_prog_order_t j2k_prog_order_list[] = {
{OPJ_CPRL, "CPRL"},
{OPJ_LRCP, "LRCP"},
{OPJ_PCRL, "PCRL"},
typedef void (* opj_j2k_mct_function) (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem);
-const opj_j2k_mct_function j2k_mct_read_functions_to_float [] =
+static const opj_j2k_mct_function j2k_mct_read_functions_to_float [] =
{
opj_j2k_read_int16_to_float,
opj_j2k_read_int32_to_float,
opj_j2k_read_float64_to_float
};
-const opj_j2k_mct_function j2k_mct_read_functions_to_int32 [] =
+static const opj_j2k_mct_function j2k_mct_read_functions_to_int32 [] =
{
opj_j2k_read_int16_to_int32,
opj_j2k_read_int32_to_int32,
opj_j2k_read_float64_to_int32
};
-const opj_j2k_mct_function j2k_mct_write_functions_from_float [] =
+static const opj_j2k_mct_function j2k_mct_write_functions_from_float [] =
{
opj_j2k_write_float_to_int16,
opj_j2k_write_float_to_int32,
}
opj_dec_memory_marker_handler_t;
-const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab [] =
+static const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab [] =
{
{J2K_MS_SOT, J2K_STATE_MH | J2K_STATE_TPHSOT, opj_j2k_read_sot},
{J2K_MS_COD, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_cod},
{J2K_MS_UNK, J2K_STATE_MH | J2K_STATE_TPH, 0}/*opj_j2k_read_unk is directly used*/
};
-void opj_j2k_read_int16_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_read_int16_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_FLOAT32 * l_dest_data = (OPJ_FLOAT32 *) p_dest_data;
}
}
-void opj_j2k_read_int32_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_read_int32_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_FLOAT32 * l_dest_data = (OPJ_FLOAT32 *) p_dest_data;
}
}
-void opj_j2k_read_float32_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_read_float32_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_FLOAT32 * l_dest_data = (OPJ_FLOAT32 *) p_dest_data;
}
}
-void opj_j2k_read_float64_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_read_float64_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_FLOAT32 * l_dest_data = (OPJ_FLOAT32 *) p_dest_data;
}
}
-void opj_j2k_read_int16_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_read_int16_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_INT32 * l_dest_data = (OPJ_INT32 *) p_dest_data;
}
}
-void opj_j2k_read_int32_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_read_int32_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_INT32 * l_dest_data = (OPJ_INT32 *) p_dest_data;
}
}
-void opj_j2k_read_float32_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_read_float32_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_INT32 * l_dest_data = (OPJ_INT32 *) p_dest_data;
}
}
-void opj_j2k_read_float64_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_read_float64_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_INT32 * l_dest_data = (OPJ_INT32 *) p_dest_data;
}
}
-void opj_j2k_write_float_to_int16 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_write_float_to_int16 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_dest_data = (OPJ_BYTE *) p_dest_data;
OPJ_FLOAT32 * l_src_data = (OPJ_FLOAT32 *) p_src_data;
}
}
-void opj_j2k_write_float_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_write_float_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_dest_data = (OPJ_BYTE *) p_dest_data;
OPJ_FLOAT32 * l_src_data = (OPJ_FLOAT32 *) p_src_data;
}
}
-void opj_j2k_write_float_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_write_float_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_dest_data = (OPJ_BYTE *) p_dest_data;
OPJ_FLOAT32 * l_src_data = (OPJ_FLOAT32 *) p_src_data;
}
}
-void opj_j2k_write_float_to_float64 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
+static void opj_j2k_write_float_to_float64 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_dest_data = (OPJ_BYTE *) p_dest_data;
OPJ_FLOAT32 * l_src_data = (OPJ_FLOAT32 *) p_src_data;
return po->str_prog;
}
-OPJ_BOOL opj_j2k_check_poc_val( const opj_poc_t *p_pocs,
+static OPJ_BOOL opj_j2k_check_poc_val( const opj_poc_t *p_pocs,
OPJ_UINT32 p_nb_pocs,
OPJ_UINT32 p_nb_resolutions,
OPJ_UINT32 p_num_comps,
/* ----------------------------------------------------------------------- */
-OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_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)
{
const OPJ_CHAR *prog = 00;
OPJ_INT32 i;
return tpnum;
}
-OPJ_BOOL opj_j2k_calculate_tp( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_calculate_tp( opj_j2k_t *p_j2k,
opj_cp_t *cp,
OPJ_UINT32 * p_nb_tiles,
opj_image_t *image,
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_soc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_soc( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_siz( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_siz( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_com( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_com( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_cod( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_cod( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
}
#if 0
-OPJ_BOOL opj_j2k_write_coc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_coc( opj_j2k_t *p_j2k,
OPJ_UINT32 p_comp_no,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
#endif
#if 0
-void opj_j2k_write_coc_in_memory( opj_j2k_t *p_j2k,
+static void opj_j2k_write_coc_in_memory( opj_j2k_t *p_j2k,
OPJ_UINT32 p_comp_no,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
}
#endif
-OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k)
+static OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k)
{
OPJ_UINT32 i,j;
OPJ_UINT32 l_nb_comp;
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_qcd( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_qcd( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
}
#if 0
-OPJ_BOOL opj_j2k_write_qcc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_qcc( opj_j2k_t *p_j2k,
OPJ_UINT32 p_comp_no,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
#endif
#if 0
-void opj_j2k_write_qcc_in_memory( opj_j2k_t *p_j2k,
+static void opj_j2k_write_qcc_in_memory( opj_j2k_t *p_j2k,
OPJ_UINT32 p_comp_no,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
}
#endif
-OPJ_UINT32 opj_j2k_get_max_qcc_size (opj_j2k_t *p_j2k)
+static OPJ_UINT32 opj_j2k_get_max_qcc_size (opj_j2k_t *p_j2k)
{
return opj_j2k_get_max_coc_size(p_j2k);
}
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_poc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_poc( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
return OPJ_TRUE;
}
-void opj_j2k_write_poc_in_memory( opj_j2k_t *p_j2k,
+static void opj_j2k_write_poc_in_memory( opj_j2k_t *p_j2k,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
opj_event_mgr_t * p_manager
*p_data_written = l_poc_size;
}
-OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k)
+static OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k)
{
opj_tcp_t * l_tcp = 00;
OPJ_UINT32 l_nb_tiles = 0;
return 4 + 9 * l_max_poc;
}
-OPJ_UINT32 opj_j2k_get_max_toc_size (opj_j2k_t *p_j2k)
+static OPJ_UINT32 opj_j2k_get_max_toc_size (opj_j2k_t *p_j2k)
{
OPJ_UINT32 i;
OPJ_UINT32 l_nb_tiles;
return 12 * l_max;
}
-OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k)
+static OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k)
{
OPJ_UINT32 l_nb_bytes = 0;
OPJ_UINT32 l_nb_comps;
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_tlm( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_tlm( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_sot( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_sot( opj_j2k_t *p_j2k,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
const opj_stream_private_t *p_stream,
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_read_sot ( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_sot ( opj_j2k_t *p_j2k,
OPJ_BYTE * p_header_data,
OPJ_UINT32 p_header_size,
opj_event_mgr_t * p_manager )
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_sod( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_sod( opj_j2k_t *p_j2k,
opj_tcd_t * p_tile_coder,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_read_sod (opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_sod (opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
return OPJ_TRUE;
}
- OPJ_BOOL opj_j2k_write_rgn(opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_rgn(opj_j2k_t *p_j2k,
OPJ_UINT32 p_tile_no,
OPJ_UINT32 p_comp_no,
OPJ_UINT32 nb_comps,
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_eoc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_eoc( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
}
-OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_t * p_tcp)
+static OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_t * p_tcp)
{
return (OPJ_FLOAT32) ((p_tcp->m_nb_tile_parts - 1) * 14);
}
-OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_t * p_tcp)
+static OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_t * p_tcp)
{
(void)p_tcp;
return 0;
}
-OPJ_BOOL opj_j2k_update_rates( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_update_rates( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
}
#if 0
-OPJ_BOOL opj_j2k_read_eoc ( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_eoc ( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
}
#endif
-OPJ_BOOL opj_j2k_get_end_header(opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_get_end_header(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_mct_data_group( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_mct_data_group( opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
}
#if 0
-OPJ_BOOL opj_j2k_write_all_coc(opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_all_coc(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
#endif
#if 0
-OPJ_BOOL opj_j2k_write_all_qcc(opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_all_qcc(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
#endif
-OPJ_BOOL opj_j2k_write_regions( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_regions( opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_epc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_epc( opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_read_unk ( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_unk ( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
OPJ_UINT32 *output_marker,
opj_event_mgr_t * p_manager
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_mct_record( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_mct_record( opj_j2k_t *p_j2k,
opj_mct_data_t * p_mct_record,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_mcc_record( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_mcc_record( opj_j2k_t *p_j2k,
struct opj_simple_mcc_decorrelation_data * p_mcc_record,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_read_mcc ( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_mcc ( opj_j2k_t *p_j2k,
OPJ_BYTE * p_header_data,
OPJ_UINT32 p_header_size,
opj_event_mgr_t * p_manager )
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager
)
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index)
+static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index)
{
OPJ_UINT32 i;
opj_simple_mcc_decorrelation_data_t * l_mcc_record;
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_cbd( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_cbd( opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
return l_j2k;
}
-int opj_j2k_initialise_4K_poc(opj_poc_t *POC, int numres){
+static int opj_j2k_initialise_4K_poc(opj_poc_t *POC, int numres){
POC[0].tile = 1;
POC[0].resno0 = 0;
POC[0].compno0 = 0;
return 2;
}
-void opj_j2k_set_cinema_parameters(opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
+static void opj_j2k_set_cinema_parameters(opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
{
/* Configure cinema parameters */
int i;
}
-OPJ_BOOL opj_j2k_is_cinema_compliant(opj_image_t *image, OPJ_UINT16 rsiz, opj_event_mgr_t *p_manager)
+static OPJ_BOOL opj_j2k_is_cinema_compliant(opj_image_t *image, OPJ_UINT16 rsiz, opj_event_mgr_t *p_manager)
{
OPJ_UINT32 i;
return OPJ_TRUE;
}
-void opj_j2k_setup_header_reading (opj_j2k_t *p_j2k)
+static void opj_j2k_setup_header_reading (opj_j2k_t *p_j2k)
{
/* preconditions*/
assert(p_j2k != 00);
}
-void opj_j2k_setup_decoding_validation (opj_j2k_t *p_j2k)
+static void opj_j2k_setup_decoding_validation (opj_j2k_t *p_j2k)
{
/* preconditions*/
assert(p_j2k != 00);
}
-OPJ_BOOL opj_j2k_mct_validation ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_mct_validation ( opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_build_decoder (opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_build_decoder (opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_build_encoder (opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_build_encoder (opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_encoding_validation ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_encoding_validation ( opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
return l_is_valid;
}
-OPJ_BOOL opj_j2k_decoding_validation ( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_decoding_validation ( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
return l_is_valid;
}
-OPJ_BOOL opj_j2k_read_header_procedure( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_header_procedure( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_exec ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_exec ( opj_j2k_t * p_j2k,
opj_procedure_list_t * p_procedure_list,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
return OPJ_TRUE;
}
-const opj_dec_memory_marker_handler_t * opj_j2k_get_marker_handler (OPJ_UINT32 p_id)
+static const opj_dec_memory_marker_handler_t * opj_j2k_get_marker_handler (OPJ_UINT32 p_id)
{
const opj_dec_memory_marker_handler_t *e;
for (e = j2k_memory_marker_handler_tab; e->id != 0; ++e) {
}
}
-void opj_j2k_tcp_destroy (opj_tcp_t *p_tcp)
+static void opj_j2k_tcp_destroy (opj_tcp_t *p_tcp)
{
if (p_tcp == 00) {
return;
}
-void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp)
+static void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp)
{
if (p_tcp->m_data) {
opj_free(p_tcp->m_data);
}
}
-void opj_j2k_cp_destroy (opj_cp_t *p_cp)
+static void opj_j2k_cp_destroy (opj_cp_t *p_cp)
{
OPJ_UINT32 l_nb_tiles;
opj_tcp_t * l_current_tile = 00;
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_image_t* p_output_image)
+static OPJ_BOOL opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_image_t* p_output_image)
{
OPJ_UINT32 i,j,k = 0;
OPJ_UINT32 l_width_src,l_height_src;
return l_j2k;
}
-opj_codestream_index_t* opj_j2k_create_cstr_index(void)
+static opj_codestream_index_t* opj_j2k_create_cstr_index(void)
{
opj_codestream_index_t* cstr_index = (opj_codestream_index_t*)
opj_calloc(1,sizeof(opj_codestream_index_t));
return cstr_index;
}
-OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size ( opj_j2k_t *p_j2k,
+static OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size ( opj_j2k_t *p_j2k,
OPJ_UINT32 p_tile_no,
OPJ_UINT32 p_comp_no )
{
}
}
-OPJ_BOOL opj_j2k_write_SPCod_SPCoc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_SPCod_SPCoc( opj_j2k_t *p_j2k,
OPJ_UINT32 p_tile_no,
OPJ_UINT32 p_comp_no,
OPJ_BYTE * p_data,
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_read_SPCod_SPCoc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_SPCod_SPCoc( opj_j2k_t *p_j2k,
OPJ_UINT32 compno,
OPJ_BYTE * p_header_data,
OPJ_UINT32 * p_header_size,
return OPJ_TRUE;
}
-void opj_j2k_copy_tile_component_parameters( opj_j2k_t *p_j2k )
+static void opj_j2k_copy_tile_component_parameters( opj_j2k_t *p_j2k )
{
/* loop */
OPJ_UINT32 i;
}
}
-OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size ( opj_j2k_t *p_j2k,
+static OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size ( opj_j2k_t *p_j2k,
OPJ_UINT32 p_tile_no,
OPJ_UINT32 p_comp_no )
{
}
}
-OPJ_BOOL opj_j2k_write_SQcd_SQcc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_SQcd_SQcc( opj_j2k_t *p_j2k,
OPJ_UINT32 p_tile_no,
OPJ_UINT32 p_comp_no,
OPJ_BYTE * p_data,
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
OPJ_UINT32 p_comp_no,
OPJ_BYTE* p_header_data,
OPJ_UINT32 * p_header_size,
return OPJ_TRUE;
}
-void opj_j2k_copy_tile_quantization_parameters( opj_j2k_t *p_j2k )
+static void opj_j2k_copy_tile_quantization_parameters( opj_j2k_t *p_j2k )
{
OPJ_UINT32 i;
opj_cp_t *l_cp = NULL;
}
-void opj_j2k_dump_MH_index(opj_j2k_t* p_j2k, FILE* out_stream)
+static void opj_j2k_dump_MH_index(opj_j2k_t* p_j2k, FILE* out_stream)
{
opj_codestream_index_t* cstr_index = p_j2k->cstr_index;
OPJ_UINT32 it_marker, it_tile, it_tile_part;
}
-void opj_j2k_dump_MH_info(opj_j2k_t* p_j2k, FILE* out_stream)
+static void opj_j2k_dump_MH_info(opj_j2k_t* p_j2k, FILE* out_stream)
{
fprintf(out_stream, "Codestream info from main header: {\n");
return l_cstr_index;
}
-OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k)
+static OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k)
{
OPJ_UINT32 it_tile=0;
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_decode_tiles ( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_decode_tiles ( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_pre_write_tile ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_pre_write_tile ( opj_j2k_t * p_j2k,
OPJ_UINT32 p_tile_index,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
return OPJ_TRUE;
}
-void opj_get_tile_dimensions(opj_image_t * l_image,
+static void opj_get_tile_dimensions(opj_image_t * l_image,
opj_tcd_tilecomp_t * l_tilec,
opj_image_comp_t * l_img_comp,
OPJ_UINT32* l_size_comp,
*l_tile_offset = ((OPJ_UINT32)l_tilec->x0 - *l_offset_x) + ((OPJ_UINT32)l_tilec->y0 - *l_offset_y) * *l_image_width;
}
-void opj_j2k_get_tile_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data)
+static void opj_j2k_get_tile_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data)
{
OPJ_UINT32 i,j,k = 0;
}
}
-OPJ_BOOL opj_j2k_post_write_tile ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_post_write_tile ( opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
return OPJ_TRUE;
}
-void opj_j2k_setup_end_compress (opj_j2k_t *p_j2k)
+static void opj_j2k_setup_end_compress (opj_j2k_t *p_j2k)
{
/* preconditions */
assert(p_j2k != 00);
opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_destroy_header_memory);
}
-void opj_j2k_setup_encoding_validation (opj_j2k_t *p_j2k)
+static void opj_j2k_setup_encoding_validation (opj_j2k_t *p_j2k)
{
/* preconditions */
assert(p_j2k != 00);
opj_procedure_list_add_procedure(p_j2k->m_validation_list, (opj_procedure)opj_j2k_mct_validation);
}
-void opj_j2k_setup_header_writing (opj_j2k_t *p_j2k)
+static void opj_j2k_setup_header_writing (opj_j2k_t *p_j2k)
{
/* preconditions */
assert(p_j2k != 00);
opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_update_rates);
}
-OPJ_BOOL opj_j2k_write_first_tile_part (opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_first_tile_part (opj_j2k_t *p_j2k,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
OPJ_UINT32 p_total_data_size,
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_all_tile_parts( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_all_tile_parts( opj_j2k_t *p_j2k,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
OPJ_UINT32 p_total_data_size,
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_write_updated_tlm( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_updated_tlm( opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_end_encoding( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_end_encoding( opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_j2k_init_info( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_init_info( opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
OPJ_UINT32 p_header_size,
opj_event_mgr_t * p_manager );
-OPJ_BOOL opj_jp2_skip_jp2c( opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_skip_jp2c( opj_jp2_t *jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
OPJ_UINT32 p_header_size,
opj_event_mgr_t * p_manager );
+/**
+ * Writes the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box).
+ *
+ * @param jp2 the jpeg2000 file codec.
+ * @param stream the stream to write data to.
+ * @param p_manager user event manager.
+ *
+ * @return true if writing was successful.
+ */
+static OPJ_BOOL opj_jp2_write_jp2h(opj_jp2_t *jp2,
+ opj_stream_private_t *stream,
+ opj_event_mgr_t * p_manager );
+
/**
* Writes the Jpeg2000 codestream Header box - JP2C Header box. This function must be called AFTER the coding has been done.
*
*/
static void opj_jp2_setup_header_writing (opj_jp2_t *jp2);
-OPJ_BOOL opj_jp2_default_validation ( opj_jp2_t * jp2,
+static OPJ_BOOL opj_jp2_default_validation ( opj_jp2_t * jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
*/
static const opj_jp2_header_handler_t * opj_jp2_find_handler (OPJ_UINT32 p_id );
-const opj_jp2_header_handler_t jp2_header [] =
+static const opj_jp2_header_handler_t jp2_header [] =
{
{JP2_JP,opj_jp2_read_jp},
{JP2_FTYP,opj_jp2_read_ftyp},
{JP2_JP2H,opj_jp2_read_jp2h}
};
-const opj_jp2_header_handler_t jp2_img_header [] =
+static const opj_jp2_header_handler_t jp2_img_header [] =
{
{JP2_IHDR,opj_jp2_read_ihdr},
{JP2_COLR,opj_jp2_read_colr},
static void opj_jp2_setup_header_reading (opj_jp2_t *jp2);
/* ----------------------------------------------------------------------- */
- OPJ_BOOL opj_jp2_read_boxhdr(opj_jp2_box_t *box,
+static OPJ_BOOL opj_jp2_read_boxhdr(opj_jp2_box_t *box,
OPJ_UINT32 * p_number_bytes_read,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
}
#endif
-OPJ_BOOL opj_jp2_read_ihdr( opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_ihdr( opj_jp2_t *jp2,
OPJ_BYTE *p_image_header_data,
OPJ_UINT32 p_image_header_size,
opj_event_mgr_t * p_manager )
return OPJ_TRUE;
}
-OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_t *jp2,
+static OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_t *jp2,
OPJ_UINT32 * p_nb_bytes_written
)
{
return l_ihdr_data;
}
-OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_t *jp2,
+static OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_t *jp2,
OPJ_UINT32 * p_nb_bytes_written
)
{
return l_bpcc_data;
}
-OPJ_BOOL opj_jp2_read_bpcc( opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_bpcc( opj_jp2_t *jp2,
OPJ_BYTE * p_bpc_header_data,
OPJ_UINT32 p_bpc_header_size,
opj_event_mgr_t * p_manager
return l_cdef_data;
}
-OPJ_BYTE * opj_jp2_write_colr( opj_jp2_t *jp2,
+static OPJ_BYTE * opj_jp2_write_colr( opj_jp2_t *jp2,
OPJ_UINT32 * p_nb_bytes_written
)
{
return l_colr_data;
}
-void opj_jp2_free_pclr(opj_jp2_color_t *color)
+static void opj_jp2_free_pclr(opj_jp2_color_t *color)
{
opj_free(color->jp2_pclr->channel_sign);
opj_free(color->jp2_pclr->channel_size);
}
/* file9.jp2 */
-void opj_jp2_apply_pclr(opj_image_t *image, opj_jp2_color_t *color)
+static void opj_jp2_apply_pclr(opj_image_t *image, opj_jp2_color_t *color)
{
opj_image_comp_t *old_comps, *new_comps;
OPJ_BYTE *channel_size, *channel_sign;
}/* apply_pclr() */
-OPJ_BOOL opj_jp2_read_pclr( opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_pclr( opj_jp2_t *jp2,
OPJ_BYTE * p_pclr_header_data,
OPJ_UINT32 p_pclr_header_size,
opj_event_mgr_t * p_manager
return OPJ_TRUE;
}
-OPJ_BOOL opj_jp2_read_cmap( opj_jp2_t * jp2,
+static OPJ_BOOL opj_jp2_read_cmap( opj_jp2_t * jp2,
OPJ_BYTE * p_cmap_header_data,
OPJ_UINT32 p_cmap_header_size,
opj_event_mgr_t * p_manager
return OPJ_TRUE;
}
-void opj_jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color)
+static void opj_jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color)
{
opj_jp2_cdef_info_t *info;
OPJ_UINT16 i, n, cn, asoc, acn;
}/* jp2_apply_cdef() */
-OPJ_BOOL opj_jp2_read_cdef( opj_jp2_t * jp2,
+static OPJ_BOOL opj_jp2_read_cdef( opj_jp2_t * jp2,
OPJ_BYTE * p_cdef_header_data,
OPJ_UINT32 p_cdef_header_size,
opj_event_mgr_t * p_manager
return OPJ_TRUE;
}
-OPJ_BOOL opj_jp2_read_colr( opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_colr( opj_jp2_t *jp2,
OPJ_BYTE * p_colr_header_data,
OPJ_UINT32 p_colr_header_size,
opj_event_mgr_t * p_manager
return OPJ_TRUE;
}
-OPJ_BOOL opj_jp2_write_jp2h(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_write_jp2h(opj_jp2_t *jp2,
opj_stream_private_t *stream,
opj_event_mgr_t * p_manager
)
return l_result;
}
-OPJ_BOOL opj_jp2_write_ftyp(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_write_ftyp(opj_jp2_t *jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
return l_result;
}
-OPJ_BOOL opj_jp2_write_jp2c(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_write_jp2c(opj_jp2_t *jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_jp2_write_jp( opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_write_jp( opj_jp2_t *jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
return opj_jp2_exec(jp2,jp2->m_procedure_list,cio,p_manager);
}
-void opj_jp2_setup_end_header_writing (opj_jp2_t *jp2)
+static void opj_jp2_setup_end_header_writing (opj_jp2_t *jp2)
{
/* preconditions */
assert(jp2 != 00);
#endif
}
-void opj_jp2_setup_end_header_reading (opj_jp2_t *jp2)
+static void opj_jp2_setup_end_header_reading (opj_jp2_t *jp2)
{
/* preconditions */
assert(jp2 != 00);
/* DEVELOPER CORNER, add your custom procedures */
}
-OPJ_BOOL opj_jp2_default_validation ( opj_jp2_t * jp2,
+static OPJ_BOOL opj_jp2_default_validation ( opj_jp2_t * jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager
)
return l_is_valid;
}
-OPJ_BOOL opj_jp2_read_header_procedure( opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_header_procedure( opj_jp2_t *jp2,
opj_stream_private_t *stream,
opj_event_mgr_t * p_manager
)
return opj_j2k_start_compress(jp2->j2k,stream,p_image,p_manager);
}
-const opj_jp2_header_handler_t * opj_jp2_find_handler (OPJ_UINT32 p_id)
+static const opj_jp2_header_handler_t * opj_jp2_find_handler (OPJ_UINT32 p_id)
{
OPJ_UINT32 i, l_handler_size = sizeof(jp2_header) / sizeof(opj_jp2_header_handler_t);
return OPJ_TRUE;
}
-OPJ_BOOL opj_jp2_skip_jp2c( opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_skip_jp2c( opj_jp2_t *jp2,
opj_stream_private_t *stream,
opj_event_mgr_t * p_manager )
{
return OPJ_TRUE;
}
-OPJ_BOOL opj_jp2_read_boxhdr_char( opj_jp2_box_t *box,
+static OPJ_BOOL opj_jp2_read_boxhdr_char( opj_jp2_box_t *box,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_number_bytes_read,
OPJ_UINT32 p_box_max_size,
p_manager);
}
-void opj_jp2_setup_encoding_validation (opj_jp2_t *jp2)
+static void opj_jp2_setup_encoding_validation (opj_jp2_t *jp2)
{
/* preconditions */
assert(jp2 != 00);
/* DEVELOPER CORNER, add your custom validation procedure */
}
-void opj_jp2_setup_decoding_validation (opj_jp2_t *jp2)
+static void opj_jp2_setup_decoding_validation (opj_jp2_t *jp2)
{
/* preconditions */
assert(jp2 != 00);
/* DEVELOPER CORNER, add your custom validation procedure */
}
-void opj_jp2_setup_header_writing (opj_jp2_t *jp2)
+static void opj_jp2_setup_header_writing (opj_jp2_t *jp2)
{
/* preconditions */
assert(jp2 != 00);
}
-void opj_jp2_setup_header_reading (opj_jp2_t *jp2)
+static void opj_jp2_setup_header_reading (opj_jp2_t *jp2)
{
/* preconditions */
assert(jp2 != 00);