74 assert(
state != NULL);
105 state->set_planar(planar ? 1 : 0);
111 state->set_profile(s);
123 state->set_tilepart_divisions(value);
130 return res ? true :
false;
137 return comp ? true :
false;
143 state->request_tlm_marker(needed);
149 return state->is_tlm_needed();
155 return state->is_planar();
163 state->write_headers(file, comments, num_comments);
169 state->enable_resilience();
175 state->read_headers(file);
180 ui32 skipped_res_for_recon)
182 state->restrict_input_resolution(skipped_res_for_read,
183 skipped_res_for_recon);
195 return state->pull(comp_num);
214 return state->exchange(line, next_component);
param_siz access_siz()
Returns the underlying SIZ marker segment object.
param_cod access_cod()
Returns the underlying COD marker segment object.
void restrict_input_resolution(ui32 skipped_res_for_data, ui32 skipped_res_for_recon)
This function restricts resolution decoding for a codestream. It is for a reading (decoding) codestre...
bool is_tilepart_division_at_resolutions()
Query if the tile will be partitioned at resolution boundary.
local::codestream * state
void close()
Call this function to close the underlying file; works for both encoding and decoding codestreams.
void set_planar(bool planar)
Sets the sequence of pushing or pull rows from the machinery.
~codestream()
default destructor
void enable_resilience()
This enables codestream resilience; that is, the library tries its best to decode the codestream,...
line_buf * exchange(line_buf *line, ui32 &next_component)
This call is used to send image data rows to the library. We expect to send one row from a single com...
void request_tlm_marker(bool needed)
Request the addition of the optional TLM marker segment. This request should occur before writing cod...
codestream()
default constructor
void set_profile(const char *s)
Sets the codestream profile.
param_qcd access_qcd()
Returns the underlying QCD marker segment object.
bool is_tilepart_division_at_components()
Query if the tile will be partitioned at component boundary.
void read_headers(infile_base *file)
This call reads the headers of a codestream. It is for a reading (or decoding) codestream,...
void set_tilepart_divisions(bool at_resolutions, bool at_components)
Sets the locations where a tile is partitioned into tile parts.
bool is_tlm_requested()
Query if the optional TLM marker segment is to be added.
void write_headers(outfile_base *file, const comment_exchange *comments=NULL, ui32 num_comments=0)
Writes codestream headers when the codestream is used for writing. This function should be called aft...
void create()
This call is for a decoding (or reading) codestream. Call this function after calling restrict_input_...
param_nlt access_nlt()
Returns the underlying NLT marker segment object.
bool is_planar() const
Query if the codestream extraction is planar or not. See the documentation for ojph::codestream::set_...
void flush()
This is the last call to a writing (encoding) codestream. This will write encoded bitstream data to t...
void restart()
Restarts the codestream.
line_buf * pull(ui32 &comp_num)
This call is to pull one row from the codestream, being decoded. The returned line_buf object holds o...
non-linearity point transformation object (implements NLT marker segment)
Quantization parameters object.
@ OJPH_TILEPART_RESOLUTIONS
@ OJPH_TILEPART_COMPONENTS