OpenJPH
Open-source implementation of JPEG2000 Part-15
|
#include <ojph_codestream_local.h>
Private Attributes | |
ui32 | precinct_scratch_needed_bytes |
ui8 * | precinct_scratch |
ui32 | cur_line |
ui32 | cur_comp |
ui32 | cur_tile_row |
bool | resilient |
ui32 | skipped_res_for_read |
ui32 | skipped_res_for_recon |
size | num_tiles |
tile * | tiles |
line_buf * | lines |
ui32 | num_comps |
size * | comp_size |
size * | recon_comp_size |
bool | employ_color_transform |
int | planar |
int | profile |
ui32 | tilepart_div |
bool | need_tlm |
param_siz | siz |
param_cod | cod |
param_cap | cap |
param_qcd | qcd |
param_tlm | tlm |
int | used_qcc_fields |
param_qcc | qcc_store [4] |
param_qcc * | qcc |
mem_fixed_allocator * | allocator |
mem_elastic_allocator * | elastic_alloc |
outfile_base * | outfile |
infile_base * | infile |
Definition at line 68 of file ojph_codestream_local.h.
ojph::local::codestream::codestream | ( | ) |
Definition at line 56 of file ojph_codestream_local.cpp.
References allocator, comp_size, cur_comp, cur_line, cur_tile_row, elastic_alloc, employ_color_transform, infile, ojph::local::init_colour_transform_functions(), ojph::local::init_wavelet_transform_functions(), lines, need_tlm, num_comps, ojph::OJPH_PN_UNDEFINED, ojph::OJPH_TILEPART_NODIVSIONS, outfile, planar, precinct_scratch_needed_bytes, profile, qcc, qcc_store, recon_comp_size, resilient, skipped_res_for_read, skipped_res_for_recon, tilepart_div, tiles, and used_qcc_fields.
ojph::local::codestream::~codestream | ( | ) |
Definition at line 93 of file ojph_codestream_local.cpp.
References allocator, elastic_alloc, qcc, and qcc_store.
|
inline |
Definition at line 83 of file ojph_codestream_local.h.
References cod.
Referenced by ojph::local::tile::finalize_alloc(), ojph::local::codeblock::finalize_alloc(), and ojph::local::tile_comp::pre_alloc().
Definition at line 87 of file ojph_codestream_local.h.
References qcc, qcd, and used_qcc_fields.
Referenced by ojph::local::subband::finalize_alloc().
|
inline |
Definition at line 79 of file ojph_codestream_local.h.
References siz.
Referenced by finalize_alloc(), and pre_alloc().
void ojph::local::codestream::check_broadcast_validity | ( | ) |
Definition at line 452 of file ojph_codestream_local.cpp.
References cod, ojph::param_siz::get_bit_depth(), ojph::param_siz::get_downsampling(), ojph::param_siz::get_image_extent(), ojph::param_siz::get_image_offset(), ojph::param_cod::get_log_block_dims(), ojph::param_cod::get_log_precinct_size(), ojph::param_siz::get_num_components(), ojph::param_cod::get_num_decompositions(), ojph::param_cod::get_progression_order(), ojph::param_siz::get_tile_offset(), ojph::param_siz::get_tile_size(), ojph::size::h, ojph::param_siz::is_signed(), need_tlm, ojph_div_ceil, OJPH_ERROR, ojph::OJPH_PO_CPRL, ojph::OJPH_TILEPART_COMPONENTS, OJPH_WARN, siz, tilepart_div, ojph::size::w, ojph::point::x, and ojph::point::y.
Referenced by write_headers().
void ojph::local::codestream::check_imf_validity | ( | ) |
Definition at line 289 of file ojph_codestream_local.cpp.
References cod, ojph::param_siz::get_bit_depth(), ojph::param_siz::get_downsampling(), ojph::param_siz::get_image_extent(), ojph::param_siz::get_image_offset(), ojph::param_cod::get_log_block_dims(), ojph::param_cod::get_log_precinct_size(), ojph::param_siz::get_num_components(), ojph::param_cod::get_num_decompositions(), ojph::param_cod::get_progression_order(), ojph::param_siz::get_tile_offset(), ojph::param_siz::get_tile_size(), ojph::size::h, ojph::param_cod::is_reversible(), ojph::param_siz::is_signed(), need_tlm, ojph_div_ceil, OJPH_ERROR, ojph::OJPH_PO_CPRL, ojph::OJPH_TILEPART_COMPONENTS, OJPH_WARN, siz, tilepart_div, ojph::size::w, ojph::point::x, and ojph::point::y.
Referenced by write_headers().
void ojph::local::codestream::close | ( | ) |
Definition at line 1090 of file ojph_codestream_local.cpp.
References ojph::outfile_base::close(), ojph::infile_base::close(), infile, and outfile.
Referenced by ojph::codestream::close().
void ojph::local::codestream::enable_resilience | ( | ) |
Definition at line 841 of file ojph_codestream_local.cpp.
References infile, OJPH_ERROR, and resilient.
Referenced by ojph::codestream::enable_resilience().
Definition at line 1099 of file ojph_codestream_local.cpp.
References comp_size, cur_comp, cur_line, cur_tile_row, ojph::size::h, lines, num_comps, num_tiles, planar, tiles, and ojph::size::w.
Referenced by ojph::codestream::exchange().
void ojph::local::codestream::finalize_alloc | ( | ) |
Definition at line 202 of file ojph_codestream_local.cpp.
References access_siz(), ojph::mem_fixed_allocator::alloc(), allocator, ojph::size::area(), cod, comp_size, cur_comp, cur_line, employ_color_transform, ojph::local::tile::finalize_alloc(), ojph::local::param_siz::get_height(), ojph::param_siz::get_image_extent(), ojph::param_siz::get_image_offset(), ojph::param_siz::get_num_components(), ojph::local::param_siz::get_recon_height(), ojph::local::param_siz::get_recon_width(), ojph::param_siz::get_tile_offset(), ojph::param_siz::get_tile_size(), ojph::local::param_siz::get_width(), ojph::size::h, ojph::local::param_tlm::init(), ojph::local::param_cod::is_employing_color_transform(), lines, need_tlm, num_comps, num_tiles, ojph_div_ceil, ojph_max, ojph_min, ojph::rect::org, outfile, ojph::mem_fixed_allocator::post_alloc_data(), ojph::mem_fixed_allocator::post_alloc_obj(), precinct_scratch, precinct_scratch_needed_bytes, recon_comp_size, siz, ojph::rect::siz, skipped_res_for_recon, tiles, tlm, ojph::size::w, ojph::line_buf::wrap(), ojph::point::x, and ojph::point::y.
Referenced by read(), and write_headers().
void ojph::local::codestream::flush | ( | ) |
Definition at line 1071 of file ojph_codestream_local.cpp.
References ojph::size::area(), ojph::local::EOC, flush(), need_tlm, num_tiles, OJPH_ERROR, outfile, ojph::local::swap_byte(), tiles, tlm, ojph::outfile_base::write(), and ojph::local::param_tlm::write().
Referenced by flush(), and ojph::codestream::flush().
|
inline |
Definition at line 95 of file ojph_codestream_local.h.
References allocator.
Referenced by ojph::local::subband::finalize_alloc(), ojph::local::resolution::finalize_alloc(), ojph::local::tile::finalize_alloc(), ojph::local::codeblock::finalize_alloc(), ojph::local::tile_comp::finalize_alloc(), ojph::local::subband::pre_alloc(), ojph::local::tile_comp::pre_alloc(), ojph::local::resolution::pre_alloc(), ojph::local::tile::pre_alloc(), and ojph::local::codeblock::pre_alloc().
|
inline |
Definition at line 85 of file ojph_codestream_local.h.
References cod.
Referenced by ojph::local::subband::finalize_alloc(), ojph::local::resolution::finalize_alloc(), ojph::local::tile::finalize_alloc(), ojph::local::tile_comp::finalize_alloc(), ojph::local::subband::pre_alloc(), ojph::local::resolution::pre_alloc(), and ojph::local::tile::pre_alloc().
|
inline |
Definition at line 96 of file ojph_codestream_local.h.
References elastic_alloc.
Referenced by ojph::local::subband::finalize_alloc(), and ojph::local::resolution::finalize_alloc().
|
inline |
Definition at line 97 of file ojph_codestream_local.h.
References outfile.
|
inline |
Definition at line 124 of file ojph_codestream_local.h.
References precinct_scratch.
Referenced by ojph::local::resolution::finalize_alloc().
|
inline |
Definition at line 117 of file ojph_codestream_local.h.
References profile.
Referenced by ojph::local::tile::finalize_alloc().
|
inline |
Definition at line 81 of file ojph_codestream_local.h.
References siz.
Referenced by ojph::local::tile::finalize_alloc(), ojph::local::tile_comp::finalize_alloc(), and ojph::local::tile::pre_alloc().
|
inline |
Definition at line 127 of file ojph_codestream_local.h.
References skipped_res_for_read.
Referenced by ojph::local::resolution::finalize_alloc(), and ojph::local::tile::finalize_alloc().
|
inline |
Definition at line 125 of file ojph_codestream_local.h.
References skipped_res_for_recon.
Referenced by ojph::local::resolution::finalize_alloc(), and ojph::local::resolution::pre_alloc().
|
inline |
Definition at line 118 of file ojph_codestream_local.h.
References tilepart_div.
Referenced by ojph::local::tile::finalize_alloc(), and ojph::local::tile::pre_alloc().
|
inline |
Definition at line 116 of file ojph_codestream_local.h.
References planar.
Referenced by ojph::codestream::is_planar().
|
inline |
Definition at line 103 of file ojph_codestream_local.h.
References resilient.
Referenced by ojph::local::tile::finalize_alloc(), and ojph::local::codeblock::finalize_alloc().
|
inline |
Definition at line 119 of file ojph_codestream_local.h.
References need_tlm.
Referenced by ojph::local::tile::finalize_alloc().
void ojph::local::codestream::pre_alloc | ( | ) |
Definition at line 104 of file ojph_codestream_local.cpp.
References access_siz(), allocator, ojph::size::area(), cod, ojph::param_siz::get_image_extent(), ojph::param_siz::get_image_offset(), ojph::local::param_cod::get_log_block_dims(), ojph::local::param_cod::get_log_precinct_size(), ojph::param_siz::get_num_components(), ojph::local::param_cod::get_num_decompositions(), ojph::local::param_siz::get_recon_width(), ojph::param_siz::get_tile_offset(), ojph::param_siz::get_tile_size(), ojph::size::h, need_tlm, num_comps, num_tiles, ojph_div_ceil, OJPH_ERROR, ojph_max, ojph_min, ojph::rect::org, outfile, ojph::local::tile::pre_alloc(), ojph::mem_fixed_allocator::pre_alloc_data(), ojph::mem_fixed_allocator::pre_alloc_obj(), precinct_scratch_needed_bytes, siz, ojph::rect::siz, skipped_res_for_recon, ojph::size::w, ojph::point::x, and ojph::point::y.
Referenced by read(), and write_headers().
Definition at line 1150 of file ojph_codestream_local.cpp.
References cur_comp, cur_line, cur_tile_row, ojph::size::h, lines, num_comps, num_tiles, planar, pull(), recon_comp_size, tiles, and ojph::size::w.
Referenced by pull(), and ojph::codestream::pull().
void ojph::local::codestream::read | ( | ) |
Definition at line 850 of file ojph_codestream_local.cpp.
References ojph::size::area(), ojph::local::COC, ojph::local::COD, ojph::local::COM, ojph::local::EOC, finalize_alloc(), ojph::local::find_marker(), ojph::local::param_sot::get_num_tile_parts(), ojph::local::param_sot::get_tile_index(), ojph::local::param_sot::get_tile_part_index(), infile, ojph::NO_MSG, num_tiles, OJPH_ERROR, OJPH_INFO, ojph::local::tile::parse_tile_header(), ojph::local::PLT, ojph::local::POC, ojph::local::PPT, pre_alloc(), ojph::local::QCC, ojph::local::QCD, ojph::local::param_sot::read(), resilient, ojph::local::RGN, ojph::local::skip_marker(), ojph::local::SOD, ojph::local::SOT, ojph::infile_base::tell(), tiles, and ojph::WARN.
Referenced by ojph::codestream::create().
void ojph::local::codestream::read_headers | ( | infile_base * | file | ) |
Definition at line 737 of file ojph_codestream_local.cpp.
References cap, ojph::local::CAP, ojph::local::COC, cod, ojph::local::COD, ojph::local::COM, ojph::local::CPF, ojph::local::CRG, ojph::local::find_marker(), ojph::local::param_siz::get_num_components(), ojph::param_cod::get_num_layers(), infile, ojph::INFO, ojph::local::param_cod::is_employing_color_transform(), ojph::NO_MSG, num_comps, OJPH_ERROR, planar, ojph::local::PLM, ojph::local::POC, ojph::local::PPM, ojph::local::PRF, qcc, ojph::local::QCC, qcc_store, qcd, ojph::local::QCD, ojph::local::param_siz::read(), ojph::local::param_cod::read(), ojph::local::param_qcd::read(), ojph::local::param_cap::read(), ojph::local::param_qcc::read(), ojph::local::RGN, siz, ojph::local::SIZ, ojph::local::skip_marker(), ojph::local::SOC, ojph::local::SOT, ojph::local::TLM, used_qcc_fields, and ojph::WARN.
Referenced by ojph::codestream::read_headers().
void ojph::local::codestream::request_tlm_marker | ( | bool | needed | ) |
Definition at line 1065 of file ojph_codestream_local.cpp.
References need_tlm.
Referenced by ojph::codestream::request_tlm_marker().
void ojph::local::codestream::restrict_input_resolution | ( | ui32 | skipped_res_for_data, |
ui32 | skipped_res_for_recon | ||
) |
Definition at line 821 of file ojph_codestream_local.cpp.
References cod, ojph::local::param_cod::get_num_decompositions(), OJPH_ERROR, ojph::local::param_siz::set_skipped_resolutions(), siz, skipped_res_for_read, and skipped_res_for_recon.
Referenced by ojph::codestream::restrict_input_resolution().
void ojph::local::codestream::set_planar | ( | int | planar | ) |
Definition at line 1041 of file ojph_codestream_local.cpp.
References planar.
Referenced by ojph::codestream::set_planar().
void ojph::local::codestream::set_profile | ( | const char * | s | ) |
Definition at line 1047 of file ojph_codestream_local.cpp.
References OJPH_ERROR, ojph::OJPH_PN_BROADCAST, ojph::OJPH_PN_IMF, ojph::OJPH_PN_STRING_BROADCAST, ojph::OJPH_PN_STRING_IMF, and profile.
Referenced by ojph::codestream::set_profile().
void ojph::local::codestream::set_tilepart_divisions | ( | ui32 | value | ) |
Definition at line 1059 of file ojph_codestream_local.cpp.
References tilepart_div.
Referenced by ojph::codestream::set_tilepart_divisions().
void ojph::local::codestream::write_headers | ( | outfile_base * | file, |
const comment_exchange * | comments, | ||
ui32 | num_comments | ||
) |
Definition at line 552 of file ojph_codestream_local.cpp.
References cap, check_broadcast_validity(), check_imf_validity(), ojph::local::param_siz::check_validity(), ojph::local::param_cap::check_validity(), ojph::local::param_cod::check_validity(), ojph::local::param_qcd::check_validity(), cod, ojph::local::COM, ojph::comment_exchange::data, finalize_alloc(), ojph::param_cod::get_progression_order(), ojph::local::param_cod::is_employing_color_transform(), ojph::comment_exchange::len, OJPH_ERROR, OJPH_INFO, OJPH_INT_TO_STRING, ojph::OJPH_PN_BROADCAST, ojph::OJPH_PN_IMF, ojph::OJPH_PO_CPRL, ojph::OJPH_PO_LRCP, ojph::OJPH_PO_PCRL, ojph::OJPH_PO_RLCP, ojph::OJPH_PO_RPCL, ojph::OJPH_TILEPART_COMPONENTS, ojph::OJPH_TILEPART_RESOLUTIONS, OJPH_WARN, OPENJPH_VERSION_MAJOR, OPENJPH_VERSION_MINOR, OPENJPH_VERSION_PATCH, outfile, planar, pre_alloc(), profile, qcd, siz, ojph::local::SOC, ojph::local::swap_byte(), tilepart_div, ojph::outfile_base::write(), ojph::local::param_siz::write(), ojph::local::param_cod::write(), ojph::local::param_qcd::write(), and ojph::local::param_cap::write().
Referenced by ojph::codestream::write_headers().
|
private |
Definition at line 167 of file ojph_codestream_local.h.
Referenced by codestream(), finalize_alloc(), get_allocator(), pre_alloc(), and ~codestream().
|
private |
Definition at line 157 of file ojph_codestream_local.h.
Referenced by read_headers(), and write_headers().
|
private |
Definition at line 156 of file ojph_codestream_local.h.
Referenced by access_cod(), ojph::codestream::access_cod(), check_broadcast_validity(), check_imf_validity(), finalize_alloc(), get_cod(), pre_alloc(), read_headers(), restrict_input_resolution(), and write_headers().
|
private |
Definition at line 146 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), and finalize_alloc().
|
private |
Definition at line 136 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), and pull().
|
private |
Definition at line 135 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), and pull().
|
private |
Definition at line 137 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), and pull().
|
private |
Definition at line 168 of file ojph_codestream_local.h.
Referenced by codestream(), get_elastic_alloc(), and ~codestream().
|
private |
Definition at line 148 of file ojph_codestream_local.h.
Referenced by codestream(), and finalize_alloc().
|
private |
Definition at line 170 of file ojph_codestream_local.h.
Referenced by close(), codestream(), enable_resilience(), read(), and read_headers().
|
private |
Definition at line 144 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), and pull().
|
private |
Definition at line 152 of file ojph_codestream_local.h.
Referenced by check_broadcast_validity(), check_imf_validity(), codestream(), finalize_alloc(), flush(), is_tlm_needed(), pre_alloc(), and request_tlm_marker().
|
private |
Definition at line 145 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), pre_alloc(), pull(), and read_headers().
|
private |
Definition at line 142 of file ojph_codestream_local.h.
Referenced by exchange(), finalize_alloc(), flush(), pre_alloc(), pull(), and read().
|
private |
Definition at line 169 of file ojph_codestream_local.h.
Referenced by close(), codestream(), finalize_alloc(), flush(), get_file(), pre_alloc(), and write_headers().
|
private |
Definition at line 149 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), is_planar(), pull(), read_headers(), set_planar(), and write_headers().
|
private |
Definition at line 132 of file ojph_codestream_local.h.
Referenced by finalize_alloc(), and get_precinct_scratch().
|
private |
Definition at line 131 of file ojph_codestream_local.h.
Referenced by codestream(), finalize_alloc(), and pre_alloc().
|
private |
Definition at line 150 of file ojph_codestream_local.h.
Referenced by codestream(), get_profile(), set_profile(), and write_headers().
|
private |
Definition at line 163 of file ojph_codestream_local.h.
Referenced by access_qcd(), codestream(), read_headers(), and ~codestream().
|
private |
Definition at line 163 of file ojph_codestream_local.h.
Referenced by codestream(), read_headers(), and ~codestream().
|
private |
Definition at line 158 of file ojph_codestream_local.h.
Referenced by ojph::codestream::access_qcd(), access_qcd(), read_headers(), and write_headers().
|
private |
Definition at line 147 of file ojph_codestream_local.h.
Referenced by codestream(), finalize_alloc(), and pull().
|
private |
Definition at line 138 of file ojph_codestream_local.h.
Referenced by codestream(), enable_resilience(), is_resilient(), and read().
|
private |
Definition at line 155 of file ojph_codestream_local.h.
Referenced by access_siz(), ojph::codestream::access_siz(), check_broadcast_validity(), check_imf_validity(), finalize_alloc(), get_siz(), pre_alloc(), read_headers(), restrict_input_resolution(), and write_headers().
|
private |
Definition at line 139 of file ojph_codestream_local.h.
Referenced by codestream(), get_skipped_res_for_read(), and restrict_input_resolution().
|
private |
Definition at line 139 of file ojph_codestream_local.h.
Referenced by codestream(), finalize_alloc(), get_skipped_res_for_recon(), pre_alloc(), and restrict_input_resolution().
|
private |
Definition at line 151 of file ojph_codestream_local.h.
Referenced by check_broadcast_validity(), check_imf_validity(), codestream(), get_tilepart_div(), set_tilepart_divisions(), and write_headers().
|
private |
Definition at line 143 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), flush(), pull(), and read().
|
private |
Definition at line 159 of file ojph_codestream_local.h.
Referenced by finalize_alloc(), and flush().
|
private |
Definition at line 162 of file ojph_codestream_local.h.
Referenced by access_qcd(), codestream(), and read_headers().