48 #ifdef OJPH_ENABLE_TIFF_SUPPORT
109 void open(
const char* filename);
151 #ifdef OJPH_ENABLE_TIFF_SUPPORT
160 line_buffer_for_planar_support_uint8 = NULL;
161 line_buffer_for_planar_support_uint16 = NULL;
163 width = height = num_comps = 0;
164 bytes_per_sample = 0;
167 planar_configuration = 0;
171 bit_depth[3] = bit_depth[2] = bit_depth[1] = bit_depth[0] = 0;
172 is_signed[3] = is_signed[2] = is_signed[1] = is_signed[0] =
false;
173 subsampling[3] = subsampling[2] =
point(1, 1);
174 subsampling[1] = subsampling[0] =
point(1, 1);
181 if (line_buffer_for_planar_support_uint8)
182 free(line_buffer_for_planar_support_uint8);
183 if (line_buffer_for_planar_support_uint16)
184 free(line_buffer_for_planar_support_uint16);
187 void open(
const char* filename);
188 virtual ui32 read(
const line_buf* line,
ui32 comp_num);
191 TIFFClose(tiff_handle);
197 size get_size() { assert(tiff_handle);
return size(width, height); }
198 ui32 get_num_components() { assert(tiff_handle);
return num_comps; }
199 void set_bit_depth(
ui32 num_bit_depths,
ui32* bit_depth);
202 assert(tiff_handle && comp_num < num_comps);
return bit_depth[comp_num];
204 bool get_is_signed(
ui32 comp_num)
206 assert(tiff_handle && comp_num < num_comps);
return is_signed[comp_num];
208 point get_comp_subsampling(
ui32 comp_num)
210 assert(tiff_handle && comp_num < num_comps);
return subsampling[comp_num];
215 size_t bytes_per_line;
216 ui16 planar_configuration;
220 ui8* line_buffer_for_planar_support_uint8;
221 ui16* line_buffer_for_planar_support_uint16;
224 ui32 bytes_per_sample;
228 point subsampling[4];
247 for (
int i = 0; i < 3; ++i)
268 void open(
const char* filename);
274 ui32 num_downsampling,
const point *downsampling);
300 int bit_depth,
int count);
304 int bit_depth,
int count);
307 int bit_depth,
int count);
310 int bit_depth,
int count);
313 int bit_depth,
int count);
316 int bit_depth,
int count);
319 int bit_depth,
int count);
323 int bit_depth,
int count);
326 int bit_depth,
int count);
329 int bit_depth,
int count);
332 int bit_depth,
int count);
335 int bit_depth,
int count);
338 int bit_depth,
int count);
342 int bit_depth,
int count);
345 int bit_depth,
int count);
348 int bit_depth,
int count);
351 int bit_depth,
int count);
397 void open(
char* filename);
422 #ifdef OJPH_ENABLE_TIFF_SUPPORT
431 width = height = num_components = 0;
432 bytes_per_sample = 0;
433 bit_depth_of_data[0] = bit_depth_of_data[1] = 0;
434 bit_depth_of_data[2] = bit_depth_of_data[3] = 0;
436 cur_line = samples_per_line = 0;
439 planar_configuration = 0;
448 void open(
char* filename);
449 void configure(
ui32 width,
ui32 height,
ui32 num_components,
451 virtual ui32 write(
const line_buf* line,
ui32 comp_num);
452 virtual void close() {
454 TIFFClose(tiff_handle);
462 size_t bytes_per_line;
463 unsigned short planar_configuration;
466 ui32 width, height, num_components;
467 ui32 bit_depth_of_data[4];
468 ui32 bytes_per_sample;
471 ui32 cur_line, samples_per_line;
498 void open(
char* filename);
virtual ui32 read(const line_buf *line, ui32 comp_num)=0
virtual ui32 write(const line_buf *line, ui32 comp_num)=0
virtual ~image_out_base()
void open(const char *filename)
ui32 get_num_components()
void set_planar(bool planar)
ui32 get_bit_depth(ui32 comp_num)
ppm_in(mem_fixed_allocator *p=NULL)
point get_comp_subsampling(ui32 comp_num)
mem_fixed_allocator * alloc_p
bool get_is_signed(ui32 comp_num)
virtual ui32 read(const line_buf *line, ui32 comp_num)
void open(char *filename)
virtual ui32 write(const line_buf *line, ui32 comp_num)
void configure(ui32 width, ui32 height, ui32 num_components, ui32 bit_depth)
virtual ui32 read(const line_buf *line, ui32 comp_num)
void open(const char *filename)
void set_img_props(const size &s, ui32 num_components, ui32 num_downsampling, const point *downsampling)
void set_bit_depth(ui32 num_bit_depths, ui32 *bit_depth)
point * get_comp_subsampling()
ui32 get_num_components()
void open(char *filename)
void configure(ui32 bit_depth, ui32 num_components, ui32 *comp_width)
virtual ui32 write(const line_buf *line, ui32 comp_num)
void gen_cvrt_32b1c_to_16ub1c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void avx2_cvrt_32b1c_to_8ub1c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void sse41_cvrt_32b3c_to_16ub3c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void gen_cvrt_32b1c_to_8ub1c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void sse41_cvrt_32b1c_to_16ub1c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void avx2_cvrt_32b3c_to_8ub3c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void sse41_cvrt_32b1c_to_8ub1c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void gen_cvrt_32b3c_to_16ub3c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void gen_cvrt_32b3c_to_8ub3c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void sse41_cvrt_32b1c_to_16ub1c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void gen_cvrt_32b3c_to_16ub3c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void sse41_cvrt_32b3c_to_16ub3c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void(* conversion_fun)(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void avx2_cvrt_32b1c_to_16ub1c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void sse41_cvrt_32b3c_to_8ub3c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void avx2_cvrt_32b1c_to_16ub1c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)
void gen_cvrt_32b1c_to_16ub1c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, int bit_depth, int count)