OpenJPH
Open-source implementation of JPEG2000 Part-15
|
#include <ojph_codestream_local.h>
Public Member Functions | |
codestream () | |
~codestream () | |
void | pre_alloc () |
void | finalize_alloc () |
ojph::param_siz | access_siz () |
const param_siz * | get_siz () |
ojph::param_cod | access_cod () |
const param_cod * | get_cod () |
param_qcd * | access_qcd (ui32 comp_num) |
mem_fixed_allocator * | get_allocator () |
mem_elastic_allocator * | get_elastic_alloc () |
outfile_base * | get_file () |
line_buf * | exchange (line_buf *line, ui32 &next_component) |
void | write_headers (outfile_base *file) |
void | enable_resilience () |
bool | is_resilient () |
void | read_headers (infile_base *file) |
void | restrict_input_resolution (ui32 skipped_res_for_data, ui32 skipped_res_for_recon) |
void | read () |
void | set_planar (int planar) |
void | set_profile (const char *s) |
line_buf * | pull (ui32 &comp_num) |
void | flush () |
void | close () |
bool | is_planar () const |
si32 | get_profile () const |
void | check_imf_validity () |
void | check_broadcast_validity () |
ui8 * | get_precinct_scratch () |
ui32 | get_skipped_res_for_recon () |
ui32 | get_skipped_res_for_read () |
Definition at line 69 of file ojph_codestream_local.h.
ojph::local::codestream::codestream | ( | ) |
Definition at line 197 of file ojph_codestream.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, num_comps, ojph::OJPH_PN_UNDEFINED, outfile, planar, precinct_scratch_needed_bytes, profile, qcc, qcc_store, recon_comp_size, resilient, skipped_res_for_read, skipped_res_for_recon, tiles, and used_qcc_fields.
ojph::local::codestream::~codestream | ( | ) |
Definition at line 232 of file ojph_codestream.cpp.
References allocator, elastic_alloc, qcc, and qcc_store.
|
inline |
Definition at line 84 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 88 of file ojph_codestream_local.h.
References qcc, qcd, and used_qcc_fields.
Referenced by ojph::local::subband::finalize_alloc().
|
inline |
Definition at line 80 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 598 of file ojph_codestream.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(), ojph_div_ceil, OJPH_ERROR, ojph::OJPH_PO_CPRL, siz, ojph::size::w, ojph::point::x, and ojph::point::y.
Referenced by write_headers().
void ojph::local::codestream::check_imf_validity | ( | ) |
Definition at line 445 of file ojph_codestream.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(), ojph_div_ceil, OJPH_ERROR, ojph::OJPH_PO_CPRL, siz, ojph::size::w, ojph::point::x, and ojph::point::y.
Referenced by write_headers().
void ojph::local::codestream::close | ( | ) |
Definition at line 1144 of file ojph_codestream.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 907 of file ojph_codestream.cpp.
References infile, OJPH_ERROR, and resilient.
Referenced by ojph::codestream::enable_resilience().
Definition at line 1153 of file ojph_codestream.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 349 of file ojph_codestream.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, num_comps, num_tiles, ojph_div_ceil, ojph_max, ojph_min, ojph::OJPH_PN_BROADCAST, ojph::OJPH_PN_IMF, ojph::rect::org, outfile, ojph::mem_fixed_allocator::post_alloc_data(), ojph::mem_fixed_allocator::post_alloc_obj(), precinct_scratch, precinct_scratch_needed_bytes, profile, 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 1125 of file ojph_codestream.cpp.
References ojph::size::area(), ojph::local::EOC, flush(), num_tiles, OJPH_ERROR, ojph::OJPH_PN_BROADCAST, ojph::OJPH_PN_IMF, outfile, profile, 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 96 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().
Definition at line 86 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 97 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 98 of file ojph_codestream_local.h.
References outfile.
|
inline |
Definition at line 120 of file ojph_codestream_local.h.
References precinct_scratch.
Referenced by ojph::local::resolution::finalize_alloc().
|
inline |
Definition at line 115 of file ojph_codestream_local.h.
References profile.
Referenced by ojph::local::tile::finalize_alloc(), and ojph::local::tile::pre_alloc().
Definition at line 82 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 123 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 121 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 114 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().
void ojph::local::codestream::pre_alloc | ( | ) |
Definition at line 243 of file ojph_codestream.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, num_comps, num_tiles, ojph_div_ceil, OJPH_ERROR, ojph_max, ojph_min, ojph::OJPH_PN_BROADCAST, ojph::OJPH_PN_IMF, 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, profile, 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 1204 of file ojph_codestream.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 916 of file ojph_codestream.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 811 of file ojph_codestream.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(), 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::restrict_input_resolution | ( | ui32 | skipped_res_for_data, |
ui32 | skipped_res_for_recon | ||
) |
Definition at line 887 of file ojph_codestream.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().
Definition at line 1107 of file ojph_codestream.cpp.
References planar.
Referenced by ojph::codestream::set_planar().
Definition at line 1113 of file ojph_codestream.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::write_headers | ( | outfile_base * | file | ) |
Definition at line 687 of file ojph_codestream.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, finalize_alloc(), ojph::local::param_cod::is_employing_color_transform(), OJPH_ERROR, OJPH_INT_TO_STRING, ojph::OJPH_PN_BROADCAST, ojph::OJPH_PN_IMF, OPENJPH_VERSION_MAJOR, OPENJPH_VERSION_MINOR, OPENJPH_VERSION_PATCH, outfile, planar, pre_alloc(), profile, qcd, siz, ojph::local::SOC, ojph::local::swap_byte(), 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 161 of file ojph_codestream_local.h.
Referenced by codestream(), finalize_alloc(), get_allocator(), pre_alloc(), and ~codestream().
|
private |
Definition at line 151 of file ojph_codestream_local.h.
Referenced by read_headers(), and write_headers().
|
private |
Definition at line 150 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 142 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), and finalize_alloc().
|
private |
Definition at line 132 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), and pull().
|
private |
Definition at line 131 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), and pull().
|
private |
Definition at line 133 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), and pull().
|
private |
Definition at line 162 of file ojph_codestream_local.h.
Referenced by codestream(), get_elastic_alloc(), and ~codestream().
|
private |
Definition at line 144 of file ojph_codestream_local.h.
Referenced by codestream(), and finalize_alloc().
|
private |
Definition at line 164 of file ojph_codestream_local.h.
Referenced by close(), codestream(), enable_resilience(), read(), and read_headers().
|
private |
Definition at line 140 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), and pull().
|
private |
Definition at line 141 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), pre_alloc(), pull(), and read_headers().
|
private |
Definition at line 138 of file ojph_codestream_local.h.
Referenced by exchange(), finalize_alloc(), flush(), pre_alloc(), pull(), and read().
|
private |
Definition at line 163 of file ojph_codestream_local.h.
Referenced by close(), codestream(), finalize_alloc(), flush(), get_file(), pre_alloc(), and write_headers().
|
private |
Definition at line 145 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), is_planar(), pull(), read_headers(), set_planar(), and write_headers().
|
private |
Definition at line 128 of file ojph_codestream_local.h.
Referenced by finalize_alloc(), and get_precinct_scratch().
|
private |
Definition at line 127 of file ojph_codestream_local.h.
Referenced by codestream(), finalize_alloc(), and pre_alloc().
|
private |
Definition at line 146 of file ojph_codestream_local.h.
Referenced by codestream(), finalize_alloc(), flush(), get_profile(), pre_alloc(), set_profile(), and write_headers().
|
private |
Definition at line 157 of file ojph_codestream_local.h.
Referenced by access_qcd(), codestream(), read_headers(), and ~codestream().
|
private |
Definition at line 157 of file ojph_codestream_local.h.
Referenced by codestream(), read_headers(), and ~codestream().
|
private |
Definition at line 152 of file ojph_codestream_local.h.
Referenced by ojph::codestream::access_qcd(), access_qcd(), read_headers(), and write_headers().
|
private |
Definition at line 143 of file ojph_codestream_local.h.
Referenced by codestream(), finalize_alloc(), and pull().
|
private |
Definition at line 134 of file ojph_codestream_local.h.
Referenced by codestream(), enable_resilience(), is_resilient(), and read().
|
private |
Definition at line 149 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 135 of file ojph_codestream_local.h.
Referenced by codestream(), get_skipped_res_for_read(), and restrict_input_resolution().
|
private |
Definition at line 135 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 139 of file ojph_codestream_local.h.
Referenced by codestream(), exchange(), finalize_alloc(), flush(), pull(), and read().
|
private |
Definition at line 153 of file ojph_codestream_local.h.
Referenced by finalize_alloc(), and flush().
|
private |
Definition at line 156 of file ojph_codestream_local.h.
Referenced by access_qcd(), codestream(), and read_headers().