OpenJPH: /build/openjph/src/OpenJPH/src/apps/common/ojph_img_io.h Source File

OpenJPH Open-source implementation of JPEG2000 Part-15

Loading...
Searching...
No Matches
ojph_img_io.h
Go to the documentation of this file.
1//***************************************************************************/
2// This software is released under the 2-Clause BSD license, included
3// below.
4//
5// Copyright (c) 2019, Aous Naman
6// Copyright (c) 2019, Kakadu Software Pty Ltd, Australia
7// Copyright (c) 2019, The University of New South Wales, Australia
8//
9// Redistribution and use in source and binary forms, with or without
10// modification, are permitted provided that the following conditions are
11// met:
12//
13// 1. Redistributions of source code must retain the above copyright
14// notice, this list of conditions and the following disclaimer.
15//
16// 2. Redistributions in binary form must reproduce the above copyright
17// notice, this list of conditions and the following disclaimer in the
18// documentation and/or other materials provided with the distribution.
19//
20// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
26// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31//***************************************************************************/
32// This file is part of the OpenJPH software implementation.
33// File: ojph_img_io.h
34// Author: Aous Naman
35// Date: 28 August 2019
36//***************************************************************************/
37
38
39#ifndef OJPH_IMG_IO_H
40#define OJPH_IMG_IO_H
41
42#include <cstdio>
43#include <cassert>
44
45#include "ojph_base.h"
46#include "ojph_defs.h"
47
48#ifdef OJPH_ENABLE_TIFF_SUPPORT
49 #include "tiffio.h"
50#endif /* OJPH_ENABLE_TIFF_SUPPORT */
51
52 namespace ojph {
53
55 // defined elsewhere
56 class mem_fixed_allocator;
57 class line_buf;
58
60 //
61 //
62 //
63 //
64 //
66 class image_in_base
67 {
68 public:
69 virtual ~image_in_base() {}
70 virtual ui32 read(const line_buf* line, ui32 comp_num) = 0;
71 virtual void close() {}
72 };
73
75 //
76 //
77 //
78 //
79 //
81 class ppm_in : public image_in_base
82 {
83 public:
84 ppm_in(mem_fixed_allocator *p = NULL)
85 {
86 fh = 0;
87 fname = NULL;
88 alloc_p = p;
89 temp_buf = NULL;
90 width = height = num_comps = max_val = max_val_num_bits = 0;
91 bytes_per_sample = num_ele_per_line = 0;
92 temp_buf_byte_size = 0;
93
94 cur_line = 0;
95 start_of_data = 0;
96 planar = false;
97
98 bit_depth[2] = bit_depth[1] = bit_depth[0] = 0;
99 is_signed[2] = is_signed[1] = is_signed[0] = false;
100 subsampling[2] = subsampling[1] = subsampling[0] = point(1,1);
101 }
102 virtual ~ppm_in()
103 {
104 close();
105 if (alloc_p == NULL && temp_buf)
106 free(temp_buf);
107 }
108
109 void open(const char* filename);
110 void finalize_alloc();
111 virtual ui32 read(const line_buf* line, ui32 comp_num);
112 void close() { if(fh) { fclose(fh); fh = NULL; } fname = NULL; }
113 void set_planar(bool planar) { this->planar = planar; }
114
115 size get_size() { assert(fh); return size(width, height); }
116 ui32 get_width() { assert(fh); return width; }
117 ui32 get_height() { assert(fh); return height; }
118 ui32 get_max_val() { assert(fh); return max_val; }
119 ui32 get_num_components() { assert(fh); return num_comps; }
120 ui32 get_bit_depth(ui32 comp_num)
121 { assert(fh && comp_num < num_comps); return bit_depth[comp_num]; }
122 bool get_is_signed(ui32 comp_num)
123 { assert(fh && comp_num < num_comps); return is_signed[comp_num]; }
124 point get_comp_subsampling(ui32 comp_num)
125 { assert(fh && comp_num < num_comps); return subsampling[comp_num]; }
126
127 private:
128 FILE *fh;
129 const char *fname;
130 mem_fixed_allocator *alloc_p;
131 void *temp_buf;
132 ui32 width, height, num_comps, max_val, max_val_num_bits;
133 ui32 bytes_per_sample, num_ele_per_line;
134 ui32 temp_buf_byte_size;
135
136 ui32 cur_line;
137 si64 start_of_data;
138 bool planar;
139 ui32 bit_depth[3];
140 bool is_signed[3];
141 point subsampling[3];
142 };
143
145 //
146 //
147 //
148 //
149 //
151#ifdef OJPH_ENABLE_TIFF_SUPPORT
152 class tif_in : public image_in_base
153 {
154 public:
155 tif_in()
156 {
157 tiff_handle = NULL;
158 fname = NULL;
159 line_buffer = NULL;
160 line_buffer_for_planar_support_uint8 = NULL;
161 line_buffer_for_planar_support_uint16 = NULL;
162
163 width = height = num_comps = 0;
164 bytes_per_sample = 0;
165
166 bytes_per_line = 0;
167 planar_configuration = 0;
168
169 cur_line = 0;
170
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);
175 }
176 virtual ~tif_in()
177 {
178 close();
179 if (line_buffer)
180 free(line_buffer);
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);
185 }
186
187 void open(const char* filename);
188 virtual ui32 read(const line_buf* line, ui32 comp_num);
189 void close() {
190 if (tiff_handle) {
191 TIFFClose(tiff_handle);
192 tiff_handle = NULL;
193 }
194 fname = NULL;
195 }
196
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);
200 ui32 get_bit_depth(ui32 comp_num) {
201 assert(tiff_handle && comp_num < num_comps);
202 return bit_depth[comp_num];
203 }
204 bool get_is_signed(ui32 comp_num) {
205 assert(tiff_handle && comp_num < num_comps);
206 return is_signed[comp_num];
207 }
208 point get_comp_subsampling(ui32 comp_num) {
209 assert(tiff_handle && comp_num < num_comps);
210 return subsampling[comp_num];
211 }
212
213 private:
214 TIFF* tiff_handle;
215 size_t bytes_per_line;
216 ui16 planar_configuration;
217
218 const char* fname;
219 void* line_buffer;
220 ui8* line_buffer_for_planar_support_uint8;
221 ui16* line_buffer_for_planar_support_uint16;
222 ui32 width, height;
223 ui32 num_comps;
224 ui32 bytes_per_sample;
225 ui32 cur_line;
226 ui32 bit_depth[4];
227 bool is_signed[4];
228 point subsampling[4];
229 };
230#endif /* OJPH_ENABLE_TIFF_SUPPORT */
231
233 // A simple DPX file reader supporting commonly used 10bit and 16bit formats
234 // DPX is an uncompressed file format used by the motion picture industry
235 // DPX is standardized by SMPTE ST 268-1:2014
236 //
237 //
239 class dpx_in : public image_in_base
240 {
241 public:
242 dpx_in()
243 {
244 file_handle = NULL;
245 fname = NULL;
246
247 line_buffer = NULL;
248 line_buffer_16bit_samples = NULL;
249
250 width = height = 0;
251 num_comps = 0;
252
253 number_of_samples_per_line = 0;
254
255 cur_line = 0;
256
257 bit_depth[3] = bit_depth[2] = bit_depth[1] = bit_depth[0] = 0;
258 is_signed[3] = is_signed[2] = is_signed[1] = is_signed[0] = false;
259 subsampling[3] = subsampling[2] = point(1, 1);
260 subsampling[1] = subsampling[0] = point(1, 1);
261
262 is_byte_swapping_necessary = false;
263 }
264 virtual ~dpx_in()
265 {
266 close();
267 if (line_buffer)
268 free(line_buffer);
269 if (line_buffer_16bit_samples)
270 free(line_buffer_16bit_samples);
271 }
272
273 void open(const char* filename);
274 virtual ui32 read(const line_buf* line, ui32 comp_num);
275 void close() {
276 if (file_handle) {
277 fclose(file_handle);
278 file_handle = NULL;
279 }
280 fname = NULL;
281 }
282
283 size get_size() { assert(file_handle); return size(width, height); }
284 ui32 get_num_components() { assert(file_handle); return num_comps; }
285 ui32 get_bit_depth(ui32 comp_num) {
286 assert(file_handle && comp_num < num_comps);
287 return bit_depth[comp_num];
288 }
289 bool get_is_signed(ui32 comp_num) {
290 assert(file_handle && comp_num < num_comps);
291 return is_signed[comp_num];
292 }
293 point get_comp_subsampling(ui32 comp_num) {
294 assert(file_handle && comp_num < num_comps);
295 return subsampling[comp_num];
296 }
297
298 private:
299 FILE* file_handle;
300
301 const char* fname;
302 void* line_buffer;
303 ui32 width, height;
304 ui32 num_comps;
305
306 ui32 cur_line;
307 ui32 bit_depth[4];
308 bool is_signed[4];
309 point subsampling[4];
310
311 ui32 number_of_samples_per_line;
312
313 ui16* line_buffer_16bit_samples;
314
315 // DPX specific members
316 bool is_byte_swapping_necessary;
317 // file info header
318 ui32 offset_to_image_data_in_bytes;
319 char version[8];
320 ui32 total_image_file_size_in_bytes;
321 // image information header
322 ui16 image_orientation;
323 ui16 number_of_image_elements;
324 ui32 pixels_per_line;
325 ui32 lines_per_image_element;
326 // image element 1
327 ui32 data_sign_for_image_element_1;
328 ui8 descriptor_for_image_element_1;
329 ui8 transfer_characteristic_for_image_element_1;
330 ui8 colormetric_specification_for_image_element_1;
331 ui8 bitdepth_for_image_element_1;
332 ui16 packing_for_image_element_1;
333 ui16 encoding_for_image_element_1;
334 ui32 offset_to_data_for_image_element_1;
335
336 size_t number_of_32_bit_words_per_line;
337
338 };
339
341 //
342 //
343 //
344 //
345 //
347 class yuv_in : public image_in_base
348 {
349 public:
350 yuv_in()
351 {
352 fh = NULL;
353 fname = NULL;
354 temp_buf = NULL;
355 for (int i = 0; i < 3; ++i)
356 {
357 width[i] = height[i] = bit_depth[i] = 0;
358 subsampling[i] = point(1,1);
359 comp_address[i] = 0;
360 bytes_per_sample[i] = 0;
361 }
362 num_com = 0;
363
364 cur_line = 0;
365 last_comp = 0;
366 planar = false;
367 }
368 virtual ~yuv_in()
369 {
370 close();
371 if (temp_buf)
372 free(temp_buf);
373 }
374
375 void open(const char* filename);
376 virtual ui32 read(const line_buf* line, ui32 comp_num);
377 void close() { if(fh) { fclose(fh); fh = NULL; } fname = NULL; }
378
379 void set_bit_depth(ui32 num_bit_depths, ui32* bit_depth);
380 void set_img_props(const size& s, ui32 num_components,
381 ui32 num_downsampling, const point *downsampling);
382
383 ui32 get_num_components() { assert(fh); return num_com; }
384 ui32 *get_bit_depth() { assert(fh); return bit_depth; }
385 point *get_comp_subsampling() { assert(fh); return subsampling; }
386
387 private:
388 FILE *fh;
389 const char *fname;
390 void *temp_buf;
391 ui32 width[3], height[3], num_com;
392 ui32 bytes_per_sample[3];
393 ui32 comp_address[3];
394
395 ui32 cur_line, last_comp;
396 bool planar;
397 ui32 bit_depth[3];
398 point subsampling[3];
399 };
400
402 //
403 //
404 //
405 //
406 //
408 class raw_in : public image_in_base
409 {
410 public:
411 raw_in()
412 {
413 fh = NULL;
414 fname = NULL;
415 width = height = bit_depth = 0;
416 bytes_per_sample = 0;
417 is_signed = false;
418 cur_line = 0;
419 buffer = NULL;
420 buffer_size = 0;
421 }
422 virtual ~raw_in()
423 {
424 close();
425 if (buffer)
426 free(buffer);
427 }
428
429 void open(const char* filename);
430 virtual ui32 read(const line_buf* line, ui32 comp_num = 0);
431 void close() { if(fh) { fclose(fh); fh = NULL; } fname = NULL; }
432
433 void set_img_props(const size& s, ui32 bit_depth, bool is_signed);
434
435 ui32 get_bit_depth() { assert(fh); return bit_depth; }
436 bool get_is_signed() { assert(fh); return is_signed; }
437
438 private:
439 FILE *fh;
440 const char *fname;
441 ui32 width, height, bit_depth;
442 ui32 bytes_per_sample;
443 bool is_signed;
444 ui32 cur_line;
445 void* buffer;
446 size_t buffer_size;
447 };
448
450 //
451 //
452 //
453 //
454 //
456 class pfm_in : public image_in_base
457 {
458 public:
459 pfm_in(mem_fixed_allocator *p = NULL)
460 {
461 fh = 0;
462 fname = NULL;
463 alloc_p = p;
464 temp_buf = NULL;
465 temp_buf_byte_size = 0;
466 bit_depth[0] = bit_depth[1] = bit_depth[2] = 32;
467 scale = 0.0f;
468 little_endian = true;
469 width = height = num_comps = 0;
470
471 cur_line = 0;
472 start_of_data = 0;
473 }
474 virtual ~pfm_in()
475 {
476 close();
477 if (alloc_p == NULL && temp_buf)
478 free(temp_buf);
479 }
480
481 void open(const char* filename);
482 void finalize_alloc();
483 void configure(ui32* bit_depth) {
484 assert(num_comps != 0);
485 for (ui32 c = 0; c < num_comps; ++c)
486 this->bit_depth[c] = bit_depth[c];
487 }
488 virtual ui32 read(const line_buf* line, ui32 comp_num);
489 void close() { if(fh) { fclose(fh); fh = NULL; } fname = NULL; }
490
491 size get_size() { assert(fh); return size(width, height); }
492 ui32 get_width() { assert(fh); return width; }
493 ui32 get_height() { assert(fh); return height; }
494 ui32 get_num_components() { assert(fh); return num_comps; }
495
496 private:
497 FILE *fh;
498 const char *fname;
499 mem_fixed_allocator *alloc_p;
500 float *temp_buf;
501 size_t temp_buf_byte_size;
502 ui32 bit_depth[3]; // this truncates data to bit_depth in the LSB
503 float scale;
504 bool little_endian;
505 ui32 width, height, num_comps;
506 ui32 cur_line;
507 si64 start_of_data;
508 };
509
510
512 // Accelerators (defined in ojph_img_io_*)
513 typedef void (*conversion_fun)(const line_buf *ln0, const line_buf *ln1,
514 const line_buf *ln2, void *dp,
515 ui32 bit_depth, ui32 count);
516
517 void gen_cvrt_32b1c_to_8ub1c(const line_buf *ln0, const line_buf *ln1,
518 const line_buf *ln2, void *dp,
519 ui32 bit_depth, ui32 count);
520 void gen_cvrt_32b3c_to_8ub3c(const line_buf *ln0, const line_buf *ln1,
521 const line_buf *ln2, void *dp,
522 ui32 bit_depth, ui32 count);
523 void gen_cvrt_32b1c_to_16ub1c_le(const line_buf *ln0, const line_buf *ln1,
524 const line_buf *ln2, void *dp,
525 ui32 bit_depth, ui32 count);
526 void gen_cvrt_32b3c_to_16ub3c_le(const line_buf *ln0, const line_buf *ln1,
527 const line_buf *ln2, void *dp,
528 ui32 bit_depth, ui32 count);
529 void gen_cvrt_32b1c_to_16ub1c_be(const line_buf *ln0, const line_buf *ln1,
530 const line_buf *ln2, void *dp,
531 ui32 bit_depth, ui32 count);
532 void gen_cvrt_32b3c_to_16ub3c_be(const line_buf *ln0, const line_buf *ln1,
533 const line_buf *ln2, void *dp,
534 ui32 bit_depth, ui32 count);
535
536 void sse41_cvrt_32b1c_to_8ub1c(const line_buf *ln0, const line_buf *ln1,
537 const line_buf *ln2, void *dp,
538 ui32 bit_depth, ui32 count);
539 void sse41_cvrt_32b3c_to_8ub3c(const line_buf *ln0, const line_buf *ln1,
540 const line_buf *ln2, void *dp,
541 ui32 bit_depth, ui32 count);
542 void sse41_cvrt_32b1c_to_16ub1c_le(const line_buf *ln0, const line_buf *ln1,
543 const line_buf *ln2, void *dp,
544 ui32 bit_depth, ui32 count);
545 void sse41_cvrt_32b3c_to_16ub3c_le(const line_buf *ln0, const line_buf *ln1,
546 const line_buf *ln2, void *dp,
547 ui32 bit_depth, ui32 count);
548 void sse41_cvrt_32b1c_to_16ub1c_be(const line_buf *ln0, const line_buf *ln1,
549 const line_buf *ln2, void *dp,
550 ui32 bit_depth, ui32 count);
551 void sse41_cvrt_32b3c_to_16ub3c_be(const line_buf *ln0, const line_buf *ln1,
552 const line_buf *ln2, void *dp,
553 ui32 bit_depth, ui32 count);
554
555 void avx2_cvrt_32b1c_to_8ub1c(const line_buf *ln0, const line_buf *ln1,
556 const line_buf *ln2, void *dp,
557 ui32 bit_depth, ui32 count);
558 void avx2_cvrt_32b3c_to_8ub3c(const line_buf *ln0, const line_buf *ln1,
559 const line_buf *ln2, void *dp,
560 ui32 bit_depth, ui32 count);
561 void avx2_cvrt_32b1c_to_16ub1c_le(const line_buf *ln0, const line_buf *ln1,
562 const line_buf *ln2, void *dp,
563 ui32 bit_depth, ui32 count);
564 void avx2_cvrt_32b1c_to_16ub1c_be(const line_buf *ln0, const line_buf *ln1,
565 const line_buf *ln2, void *dp,
566 ui32 bit_depth, ui32 count);
567
569 //
570 //
571 //
572 //
573 //
575 class image_out_base
576 {
577 public:
578 virtual ~image_out_base() {}
579 virtual ui32 write(const line_buf* line, ui32 comp_num) = 0;
580 virtual void close() {}
581 };
582
584 //
585 //
586 //
587 //
588 //
590 class ppm_out : public image_out_base
591 {
592 public:
593 ppm_out()
594 {
595 fh = NULL;
596 fname = NULL;
597 buffer = NULL;
598 width = height = num_components = 0;
599 bit_depth = bytes_per_sample = 0;
600 buffer_size = 0;
601 cur_line = samples_per_line = bytes_per_line = 0;
602 converter = NULL;
603 lptr[0] = lptr[1] = lptr[2] = 0;
604 }
605 virtual ~ppm_out()
606 {
607 close();
608 if (buffer)
609 free(buffer);
610 }
611
612 void open(char* filename);
613 void configure(ui32 width, ui32 height, ui32 num_components,
614 ui32 bit_depth);
615 virtual ui32 write(const line_buf* line, ui32 comp_num);
616 virtual void close() { if(fh) { fclose(fh); fh = NULL; } fname = NULL; }
617
618 private:
619 FILE *fh;
620 const char *fname;
621 ui32 width, height, num_components;
622 ui32 bit_depth, bytes_per_sample;
623 ui8* buffer;
624 size_t buffer_size;
625 ui32 cur_line, samples_per_line, bytes_per_line;
626 conversion_fun converter;
627 const line_buf *lptr[3];
628 };
629
630#ifdef OJPH_ENABLE_TIFF_SUPPORT
632 //
633 //
634 //
635 //
636 //
638
639 class tif_out : public image_out_base
640 {
641 public:
642 tif_out()
643 {
644 tiff_handle = NULL;
645 fname = NULL;
646 buffer = NULL;
647 width = height = num_components = 0;
648 bytes_per_sample = 0;
649 bit_depth_of_data[0] = bit_depth_of_data[1] = 0;
650 bit_depth_of_data[2] = bit_depth_of_data[3] = 0;
651 buffer_size = 0;
652 cur_line = samples_per_line = 0;
653 bytes_per_line = 0;
654
655 planar_configuration = 0;
656 }
657 virtual ~tif_out()
658 {
659 close();
660 if (buffer)
661 free(buffer);
662 }
663
664 void open(char* filename);
665 void configure(ui32 width, ui32 height, ui32 num_components,
666 ui32 *bit_depth);
667 virtual ui32 write(const line_buf* line, ui32 comp_num);
668 virtual void close() {
669 if (tiff_handle) {
670 TIFFClose(tiff_handle);
671 tiff_handle = NULL;
672 }
673 fname = NULL;
674 }
675
676 private:
677 TIFF* tiff_handle;
678 size_t bytes_per_line;
679 unsigned short planar_configuration;
680
681 const char* fname;
682 ui32 width, height, num_components;
683 ui32 bit_depth_of_data[4];
684 ui32 bytes_per_sample;
685 ui8* buffer;
686 size_t buffer_size;
687 ui32 cur_line, samples_per_line;
688 };
689#endif /* OJPH_ENABLE_TIFF_SUPPORT */
690
691
693 //
694 //
695 //
696 //
697 //
699 class yuv_out : public image_out_base
700 {
701 public:
702 yuv_out()
703 {
704 fh = NULL;
705 fname = NULL;
706 width = num_components = 0;
707 bit_depth = 0;
708 comp_width = NULL;
709 buffer = NULL;
710 buffer_size = 0;
711 }
712 virtual ~yuv_out();
713
714 void open(char* filename);
715 void configure(ui32 bit_depth, ui32 num_components, ui32 *comp_width);
716 virtual ui32 write(const line_buf* line, ui32 comp_num);
717 virtual void close() { if(fh) { fclose(fh); fh = NULL; } fname = NULL; }
718
719 private:
720 FILE *fh;
721 const char *fname;
722 ui32 width;
723 ui32 num_components;
724 ui32 bit_depth;
725 ui32 *comp_width;
726 ui8 *buffer;
727 ui32 buffer_size;
728 };
729
731 //
732 //
733 //
734 //
735 //
737 class raw_out : public image_out_base
738 {
739 public:
740 raw_out()
741 {
742 fh = NULL;
743 fname = NULL;
744 is_signed = false;
745 bit_depth = bytes_per_sample = 0;
746 lower_val = upper_val = 0;
747 width = 0;
748 buffer = NULL;
749 buffer_size = 0;
750 }
751 virtual ~raw_out();
752
753 void open(char* filename);
754 void configure(bool is_signed, ui32 bit_depth, ui32 width);
755 virtual ui32 write(const line_buf* line, ui32 comp_num = 0);
756 virtual void close() { if (fh) { fclose(fh); fh = NULL; } fname = NULL; }
757
758 private:
759 FILE* fh;
760 const char* fname;
761 bool is_signed;
762 ui32 bit_depth, bytes_per_sample;
763 si64 lower_val, upper_val;
764 ui32 width;
765 ui8* buffer;
766 ui32 buffer_size;
767 };
768
770 //
771 //
772 //
773 //
774 //
776 class pfm_out : public image_out_base
777 {
778 public:
779 pfm_out()
780 {
781 fh = NULL;
782 fname = NULL;
783 buffer = NULL;
784 buffer_size = 0;
785 width = height = num_components = 0;
786 scale = -1.0f;
787 bit_depth[0] = bit_depth[1] = bit_depth[2] = 32;
788 cur_line = 0;
789 start_of_data = 0;
790 }
791 virtual ~pfm_out()
792 {
793 close();
794 if (buffer)
795 free(buffer);
796 }
797
798 void open(char* filename);
799 void configure(ui32 width, ui32 height, ui32 num_components,
800 float scale, ui32* bit_depth);
801 virtual ui32 write(const line_buf* line, ui32 comp_num);
802 virtual void close() { if(fh) { fclose(fh); fh = NULL; } fname = NULL; }
803
804 private:
805 FILE *fh;
806 const char *fname;
807 float* buffer;
808 size_t buffer_size;
809 ui32 width, height, num_components;
810 float scale;
811 ui32 bit_depth[3];
812 ui32 cur_line;
813 si64 start_of_data;
814 };
815
816
817}
818
819#endif // !OJPH_IMG_IO_H
ojph::dpx_in::get_num_components
ui32 get_num_components()
Definition ojph_img_io.h:284
ojph::dpx_in::line_buffer
void * line_buffer
Definition ojph_img_io.h:302
ojph::dpx_in::get_is_signed
bool get_is_signed(ui32 comp_num)
Definition ojph_img_io.h:289
ojph::dpx_in::number_of_32_bit_words_per_line
size_t number_of_32_bit_words_per_line
Definition ojph_img_io.h:336
ojph::dpx_in::open
void open(const char *filename)
Definition ojph_img_io.cpp:1796
ojph::dpx_in::packing_for_image_element_1
ui16 packing_for_image_element_1
Definition ojph_img_io.h:332
ojph::dpx_in::descriptor_for_image_element_1
ui8 descriptor_for_image_element_1
Definition ojph_img_io.h:328
ojph::dpx_in::dpx_in
dpx_in()
Definition ojph_img_io.h:242
ojph::dpx_in::offset_to_data_for_image_element_1
ui32 offset_to_data_for_image_element_1
Definition ojph_img_io.h:334
ojph::dpx_in::height
ui32 height
Definition ojph_img_io.h:303
ojph::dpx_in::total_image_file_size_in_bytes
ui32 total_image_file_size_in_bytes
Definition ojph_img_io.h:320
ojph::dpx_in::file_handle
FILE * file_handle
Definition ojph_img_io.h:299
ojph::dpx_in::pixels_per_line
ui32 pixels_per_line
Definition ojph_img_io.h:324
ojph::dpx_in::subsampling
point subsampling[4]
Definition ojph_img_io.h:309
ojph::dpx_in::number_of_image_elements
ui16 number_of_image_elements
Definition ojph_img_io.h:323
ojph::dpx_in::bitdepth_for_image_element_1
ui8 bitdepth_for_image_element_1
Definition ojph_img_io.h:331
ojph::dpx_in::read
virtual ui32 read(const line_buf *line, ui32 comp_num)
Definition ojph_img_io.cpp:2038
ojph::dpx_in::line_buffer_16bit_samples
ui16 * line_buffer_16bit_samples
Definition ojph_img_io.h:313
ojph::dpx_in::version
char version[8]
Definition ojph_img_io.h:319
ojph::dpx_in::offset_to_image_data_in_bytes
ui32 offset_to_image_data_in_bytes
Definition ojph_img_io.h:318
ojph::dpx_in::num_comps
ui32 num_comps
Definition ojph_img_io.h:304
ojph::dpx_in::width
ui32 width
Definition ojph_img_io.h:303
ojph::dpx_in::get_bit_depth
ui32 get_bit_depth(ui32 comp_num)
Definition ojph_img_io.h:285
ojph::dpx_in::encoding_for_image_element_1
ui16 encoding_for_image_element_1
Definition ojph_img_io.h:333
ojph::dpx_in::get_size
size get_size()
Definition ojph_img_io.h:283
ojph::dpx_in::number_of_samples_per_line
ui32 number_of_samples_per_line
Definition ojph_img_io.h:311
ojph::dpx_in::~dpx_in
virtual ~dpx_in()
Definition ojph_img_io.h:264
ojph::dpx_in::transfer_characteristic_for_image_element_1
ui8 transfer_characteristic_for_image_element_1
Definition ojph_img_io.h:329
ojph::dpx_in::get_comp_subsampling
point get_comp_subsampling(ui32 comp_num)
Definition ojph_img_io.h:293
ojph::dpx_in::colormetric_specification_for_image_element_1
ui8 colormetric_specification_for_image_element_1
Definition ojph_img_io.h:330
ojph::dpx_in::cur_line
ui32 cur_line
Definition ojph_img_io.h:306
ojph::dpx_in::lines_per_image_element
ui32 lines_per_image_element
Definition ojph_img_io.h:325
ojph::dpx_in::image_orientation
ui16 image_orientation
Definition ojph_img_io.h:322
ojph::dpx_in::is_signed
bool is_signed[4]
Definition ojph_img_io.h:308
ojph::dpx_in::fname
const char * fname
Definition ojph_img_io.h:301
ojph::dpx_in::close
void close()
Definition ojph_img_io.h:275
ojph::dpx_in::bit_depth
ui32 bit_depth[4]
Definition ojph_img_io.h:307
ojph::dpx_in::is_byte_swapping_necessary
bool is_byte_swapping_necessary
Definition ojph_img_io.h:316
ojph::dpx_in::data_sign_for_image_element_1
ui32 data_sign_for_image_element_1
Definition ojph_img_io.h:327
ojph::image_in_base
Definition ojph_img_io.h:67
ojph::image_in_base::close
virtual void close()
Definition ojph_img_io.h:71
ojph::image_in_base::read
virtual ui32 read(const line_buf *line, ui32 comp_num)=0
ojph::image_in_base::~image_in_base
virtual ~image_in_base()
Definition ojph_img_io.h:69
ojph::image_out_base
Definition ojph_img_io.h:576
ojph::image_out_base::write
virtual ui32 write(const line_buf *line, ui32 comp_num)=0
ojph::image_out_base::close
virtual void close()
Definition ojph_img_io.h:580
ojph::image_out_base::~image_out_base
virtual ~image_out_base()
Definition ojph_img_io.h:578
ojph::line_buf
Definition ojph_mem.h:161
ojph::mem_fixed_allocator
Definition ojph_mem.h:59
ojph::pfm_in::pfm_in
pfm_in(mem_fixed_allocator *p=NULL)
Definition ojph_img_io.h:459
ojph::pfm_in::fh
FILE * fh
Definition ojph_img_io.h:497
ojph::pfm_in::little_endian
bool little_endian
Definition ojph_img_io.h:504
ojph::pfm_in::read
virtual ui32 read(const line_buf *line, ui32 comp_num)
Definition ojph_img_io.cpp:649
ojph::pfm_in::bit_depth
ui32 bit_depth[3]
Definition ojph_img_io.h:502
ojph::pfm_in::alloc_p
mem_fixed_allocator * alloc_p
Definition ojph_img_io.h:499
ojph::pfm_in::get_size
size get_size()
Definition ojph_img_io.h:491
ojph::pfm_in::start_of_data
si64 start_of_data
Definition ojph_img_io.h:507
ojph::pfm_in::finalize_alloc
void finalize_alloc()
Definition ojph_img_io.cpp:641
ojph::pfm_in::fname
const char * fname
Definition ojph_img_io.h:498
ojph::pfm_in::height
ui32 height
Definition ojph_img_io.h:505
ojph::pfm_in::get_width
ui32 get_width()
Definition ojph_img_io.h:492
ojph::pfm_in::num_comps
ui32 num_comps
Definition ojph_img_io.h:505
ojph::pfm_in::get_height
ui32 get_height()
Definition ojph_img_io.h:493
ojph::pfm_in::cur_line
ui32 cur_line
Definition ojph_img_io.h:506
ojph::pfm_in::open
void open(const char *filename)
Definition ojph_img_io.cpp:566
ojph::pfm_in::width
ui32 width
Definition ojph_img_io.h:505
ojph::pfm_in::close
void close()
Definition ojph_img_io.h:489
ojph::pfm_in::temp_buf_byte_size
size_t temp_buf_byte_size
Definition ojph_img_io.h:501
ojph::pfm_in::get_num_components
ui32 get_num_components()
Definition ojph_img_io.h:494
ojph::pfm_in::temp_buf
float * temp_buf
Definition ojph_img_io.h:500
ojph::pfm_in::scale
float scale
Definition ojph_img_io.h:503
ojph::pfm_in::configure
void configure(ui32 *bit_depth)
Definition ojph_img_io.h:483
ojph::pfm_in::~pfm_in
virtual ~pfm_in()
Definition ojph_img_io.h:474
ojph::pfm_out::~pfm_out
virtual ~pfm_out()
Definition ojph_img_io.h:791
ojph::pfm_out::fname
const char * fname
Definition ojph_img_io.h:806
ojph::pfm_out::cur_line
ui32 cur_line
Definition ojph_img_io.h:812
ojph::pfm_out::fh
FILE * fh
Definition ojph_img_io.h:805
ojph::pfm_out::num_components
ui32 num_components
Definition ojph_img_io.h:809
ojph::pfm_out::open
void open(char *filename)
Definition ojph_img_io.cpp:726
ojph::pfm_out::buffer_size
size_t buffer_size
Definition ojph_img_io.h:808
ojph::pfm_out::pfm_out
pfm_out()
Definition ojph_img_io.h:779
ojph::pfm_out::scale
float scale
Definition ojph_img_io.h:810
ojph::pfm_out::configure
void configure(ui32 width, ui32 height, ui32 num_components, float scale, ui32 *bit_depth)
Definition ojph_img_io.cpp:746
ojph::pfm_out::write
virtual ui32 write(const line_buf *line, ui32 comp_num)
Definition ojph_img_io.cpp:762
ojph::pfm_out::bit_depth
ui32 bit_depth[3]
Definition ojph_img_io.h:811
ojph::pfm_out::close
virtual void close()
Definition ojph_img_io.h:802
ojph::pfm_out::height
ui32 height
Definition ojph_img_io.h:809
ojph::pfm_out::start_of_data
si64 start_of_data
Definition ojph_img_io.h:813
ojph::pfm_out::buffer
float * buffer
Definition ojph_img_io.h:807
ojph::pfm_out::width
ui32 width
Definition ojph_img_io.h:809
ojph::ppm_in::subsampling
point subsampling[3]
Definition ojph_img_io.h:141
ojph::ppm_in::get_height
ui32 get_height()
Definition ojph_img_io.h:117
ojph::ppm_in::open
void open(const char *filename)
Definition ojph_img_io.cpp:245
ojph::ppm_in::get_num_components
ui32 get_num_components()
Definition ojph_img_io.h:119
ojph::ppm_in::width
ui32 width
Definition ojph_img_io.h:132
ojph::ppm_in::set_planar
void set_planar(bool planar)
Definition ojph_img_io.h:113
ojph::ppm_in::get_size
size get_size()
Definition ojph_img_io.h:115
ojph::ppm_in::num_ele_per_line
ui32 num_ele_per_line
Definition ojph_img_io.h:133
ojph::ppm_in::planar
bool planar
Definition ojph_img_io.h:138
ojph::ppm_in::bytes_per_sample
ui32 bytes_per_sample
Definition ojph_img_io.h:133
ojph::ppm_in::get_width
ui32 get_width()
Definition ojph_img_io.h:116
ojph::ppm_in::max_val_num_bits
ui32 max_val_num_bits
Definition ojph_img_io.h:132
ojph::ppm_in::get_bit_depth
ui32 get_bit_depth(ui32 comp_num)
Definition ojph_img_io.h:120
ojph::ppm_in::fname
const char * fname
Definition ojph_img_io.h:129
ojph::ppm_in::finalize_alloc
void finalize_alloc()
Definition ojph_img_io.cpp:326
ojph::ppm_in::height
ui32 height
Definition ojph_img_io.h:132
ojph::ppm_in::num_comps
ui32 num_comps
Definition ojph_img_io.h:132
ojph::ppm_in::temp_buf_byte_size
ui32 temp_buf_byte_size
Definition ojph_img_io.h:134
ojph::ppm_in::ppm_in
ppm_in(mem_fixed_allocator *p=NULL)
Definition ojph_img_io.h:84
ojph::ppm_in::get_max_val
ui32 get_max_val()
Definition ojph_img_io.h:118
ojph::ppm_in::temp_buf
void * temp_buf
Definition ojph_img_io.h:131
ojph::ppm_in::~ppm_in
virtual ~ppm_in()
Definition ojph_img_io.h:102
ojph::ppm_in::close
void close()
Definition ojph_img_io.h:112
ojph::ppm_in::fh
FILE * fh
Definition ojph_img_io.h:128
ojph::ppm_in::get_comp_subsampling
point get_comp_subsampling(ui32 comp_num)
Definition ojph_img_io.h:124
ojph::ppm_in::alloc_p
mem_fixed_allocator * alloc_p
Definition ojph_img_io.h:130
ojph::ppm_in::get_is_signed
bool get_is_signed(ui32 comp_num)
Definition ojph_img_io.h:122
ojph::ppm_in::cur_line
ui32 cur_line
Definition ojph_img_io.h:136
ojph::ppm_in::is_signed
bool is_signed[3]
Definition ojph_img_io.h:140
ojph::ppm_in::start_of_data
si64 start_of_data
Definition ojph_img_io.h:137
ojph::ppm_in::bit_depth
ui32 bit_depth[3]
Definition ojph_img_io.h:139
ojph::ppm_in::read
virtual ui32 read(const line_buf *line, ui32 comp_num)
Definition ojph_img_io.cpp:338
ojph::ppm_in::max_val
ui32 max_val
Definition ojph_img_io.h:132
ojph::ppm_out::ppm_out
ppm_out()
Definition ojph_img_io.h:593
ojph::ppm_out::num_components
ui32 num_components
Definition ojph_img_io.h:621
ojph::ppm_out::fname
const char * fname
Definition ojph_img_io.h:620
ojph::ppm_out::close
virtual void close()
Definition ojph_img_io.h:616
ojph::ppm_out::height
ui32 height
Definition ojph_img_io.h:621
ojph::ppm_out::width
ui32 width
Definition ojph_img_io.h:621
ojph::ppm_out::open
void open(char *filename)
Definition ojph_img_io.cpp:386
ojph::ppm_out::write
virtual ui32 write(const line_buf *line, ui32 comp_num)
Definition ojph_img_io.cpp:539
ojph::ppm_out::cur_line
ui32 cur_line
Definition ojph_img_io.h:625
ojph::ppm_out::fh
FILE * fh
Definition ojph_img_io.h:619
ojph::ppm_out::bit_depth
ui32 bit_depth
Definition ojph_img_io.h:622
ojph::ppm_out::bytes_per_line
ui32 bytes_per_line
Definition ojph_img_io.h:625
ojph::ppm_out::bytes_per_sample
ui32 bytes_per_sample
Definition ojph_img_io.h:622
ojph::ppm_out::lptr
const line_buf * lptr[3]
Definition ojph_img_io.h:627
ojph::ppm_out::~ppm_out
virtual ~ppm_out()
Definition ojph_img_io.h:605
ojph::ppm_out::converter
conversion_fun converter
Definition ojph_img_io.h:626
ojph::ppm_out::configure
void configure(ui32 width, ui32 height, ui32 num_components, ui32 bit_depth)
Definition ojph_img_io.cpp:446
ojph::ppm_out::samples_per_line
ui32 samples_per_line
Definition ojph_img_io.h:625
ojph::ppm_out::buffer_size
size_t buffer_size
Definition ojph_img_io.h:624
ojph::ppm_out::buffer
ui8 * buffer
Definition ojph_img_io.h:623
ojph::raw_in::close
void close()
Definition ojph_img_io.h:431
ojph::raw_in::bytes_per_sample
ui32 bytes_per_sample
Definition ojph_img_io.h:442
ojph::raw_in::is_signed
bool is_signed
Definition ojph_img_io.h:443
ojph::raw_in::height
ui32 height
Definition ojph_img_io.h:441
ojph::raw_in::bit_depth
ui32 bit_depth
Definition ojph_img_io.h:441
ojph::raw_in::~raw_in
virtual ~raw_in()
Definition ojph_img_io.h:422
ojph::raw_in::get_bit_depth
ui32 get_bit_depth()
Definition ojph_img_io.h:435
ojph::raw_in::width
ui32 width
Definition ojph_img_io.h:441
ojph::raw_in::buffer
void * buffer
Definition ojph_img_io.h:445
ojph::raw_in::cur_line
ui32 cur_line
Definition ojph_img_io.h:444
ojph::raw_in::set_img_props
void set_img_props(const size &s, ui32 bit_depth, bool is_signed)
Definition ojph_img_io.cpp:1591
ojph::raw_in::buffer_size
size_t buffer_size
Definition ojph_img_io.h:446
ojph::raw_in::fname
const char * fname
Definition ojph_img_io.h:440
ojph::raw_in::fh
FILE * fh
Definition ojph_img_io.h:439
ojph::raw_in::open
void open(const char *filename)
Definition ojph_img_io.cpp:1495
ojph::raw_in::raw_in
raw_in()
Definition ojph_img_io.h:411
ojph::raw_in::read
virtual ui32 read(const line_buf *line, ui32 comp_num=0)
Definition ojph_img_io.cpp:1510
ojph::raw_in::get_is_signed
bool get_is_signed()
Definition ojph_img_io.h:436
ojph::raw_out::open
void open(char *filename)
Definition ojph_img_io.cpp:1622
ojph::raw_out::raw_out
raw_out()
Definition ojph_img_io.h:740
ojph::raw_out::configure
void configure(bool is_signed, ui32 bit_depth, ui32 width)
Definition ojph_img_io.cpp:1632
ojph::raw_out::close
virtual void close()
Definition ojph_img_io.h:756
ojph::raw_out::lower_val
si64 lower_val
Definition ojph_img_io.h:763
ojph::raw_out::upper_val
si64 upper_val
Definition ojph_img_io.h:763
ojph::raw_out::fh
FILE * fh
Definition ojph_img_io.h:759
ojph::raw_out::width
ui32 width
Definition ojph_img_io.h:764
ojph::raw_out::~raw_out
virtual ~raw_out()
Definition ojph_img_io.cpp:1610
ojph::raw_out::bit_depth
ui32 bit_depth
Definition ojph_img_io.h:762
ojph::raw_out::buffer_size
ui32 buffer_size
Definition ojph_img_io.h:766
ojph::raw_out::is_signed
bool is_signed
Definition ojph_img_io.h:761
ojph::raw_out::fname
const char * fname
Definition ojph_img_io.h:760
ojph::raw_out::buffer
ui8 * buffer
Definition ojph_img_io.h:765
ojph::raw_out::write
virtual ui32 write(const line_buf *line, ui32 comp_num=0)
Definition ojph_img_io.cpp:1653
ojph::raw_out::bytes_per_sample
ui32 bytes_per_sample
Definition ojph_img_io.h:762
ojph::yuv_in::get_comp_subsampling
point * get_comp_subsampling()
Definition ojph_img_io.h:385
ojph::yuv_in::width
ui32 width[3]
Definition ojph_img_io.h:391
ojph::yuv_in::read
virtual ui32 read(const line_buf *line, ui32 comp_num)
Definition ojph_img_io.cpp:1321
ojph::yuv_in::height
ui32 height[3]
Definition ojph_img_io.h:391
ojph::yuv_in::open
void open(const char *filename)
Definition ojph_img_io.cpp:1296
ojph::yuv_in::temp_buf
void * temp_buf
Definition ojph_img_io.h:390
ojph::yuv_in::fname
const char * fname
Definition ojph_img_io.h:389
ojph::yuv_in::set_img_props
void set_img_props(const size &s, ui32 num_components, ui32 num_downsampling, const point *downsampling)
Definition ojph_img_io.cpp:1351
ojph::yuv_in::set_bit_depth
void set_bit_depth(ui32 num_bit_depths, ui32 *bit_depth)
Definition ojph_img_io.cpp:1378
ojph::yuv_in::yuv_in
yuv_in()
Definition ojph_img_io.h:350
ojph::yuv_in::~yuv_in
virtual ~yuv_in()
Definition ojph_img_io.h:368
ojph::yuv_in::bytes_per_sample
ui32 bytes_per_sample[3]
Definition ojph_img_io.h:392
ojph::yuv_in::get_bit_depth
ui32 * get_bit_depth()
Definition ojph_img_io.h:384
ojph::yuv_in::subsampling
point subsampling[3]
Definition ojph_img_io.h:398
ojph::yuv_in::close
void close()
Definition ojph_img_io.h:377
ojph::yuv_in::num_com
ui32 num_com
Definition ojph_img_io.h:391
ojph::yuv_in::planar
bool planar
Definition ojph_img_io.h:396
ojph::yuv_in::fh
FILE * fh
Definition ojph_img_io.h:388
ojph::yuv_in::get_num_components
ui32 get_num_components()
Definition ojph_img_io.h:383
ojph::yuv_in::bit_depth
ui32 bit_depth[3]
Definition ojph_img_io.h:397
ojph::yuv_in::comp_address
ui32 comp_address[3]
Definition ojph_img_io.h:393
ojph::yuv_in::last_comp
ui32 last_comp
Definition ojph_img_io.h:395
ojph::yuv_in::cur_line
ui32 cur_line
Definition ojph_img_io.h:395
ojph::yuv_out::buffer
ui8 * buffer
Definition ojph_img_io.h:726
ojph::yuv_out::fname
const char * fname
Definition ojph_img_io.h:721
ojph::yuv_out::open
void open(char *filename)
Definition ojph_img_io.cpp:1418
ojph::yuv_out::comp_width
ui32 * comp_width
Definition ojph_img_io.h:725
ojph::yuv_out::num_components
ui32 num_components
Definition ojph_img_io.h:723
ojph::yuv_out::configure
void configure(ui32 bit_depth, ui32 num_components, ui32 *comp_width)
Definition ojph_img_io.cpp:1428
ojph::yuv_out::buffer_size
ui32 buffer_size
Definition ojph_img_io.h:727
ojph::yuv_out::width
ui32 width
Definition ojph_img_io.h:722
ojph::yuv_out::close
virtual void close()
Definition ojph_img_io.h:717
ojph::yuv_out::~yuv_out
virtual ~yuv_out()
Definition ojph_img_io.cpp:1401
ojph::yuv_out::fh
FILE * fh
Definition ojph_img_io.h:720
ojph::yuv_out::write
virtual ui32 write(const line_buf *line, ui32 comp_num)
Definition ojph_img_io.cpp:1447
ojph::yuv_out::yuv_out
yuv_out()
Definition ojph_img_io.h:702
ojph::yuv_out::bit_depth
ui32 bit_depth
Definition ojph_img_io.h:724
ojph
Definition ojph_img_io.h:52
ojph::sse41_cvrt_32b3c_to_8ub3c
void sse41_cvrt_32b3c_to_8ub3c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::conversion_fun
void(* conversion_fun)(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
Definition ojph_img_io.h:513
ojph::sse41_cvrt_32b3c_to_16ub3c_le
void sse41_cvrt_32b3c_to_16ub3c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::si64
int64_t si64
Definition ojph_defs.h:57
ojph::gen_cvrt_32b3c_to_16ub3c_le
void gen_cvrt_32b3c_to_16ub3c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
Definition ojph_img_io.cpp:163
ojph::avx2_cvrt_32b3c_to_8ub3c
void avx2_cvrt_32b3c_to_8ub3c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::ui16
uint16_t ui16
Definition ojph_defs.h:52
ojph::gen_cvrt_32b1c_to_16ub1c_le
void gen_cvrt_32b1c_to_16ub1c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
Definition ojph_img_io.cpp:145
ojph::sse41_cvrt_32b1c_to_16ub1c_be
void sse41_cvrt_32b1c_to_16ub1c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::avx2_cvrt_32b1c_to_16ub1c_be
void avx2_cvrt_32b1c_to_16ub1c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::sse41_cvrt_32b1c_to_8ub1c
void sse41_cvrt_32b1c_to_8ub1c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::avx2_cvrt_32b1c_to_8ub1c
void avx2_cvrt_32b1c_to_8ub1c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::gen_cvrt_32b3c_to_16ub3c_be
void gen_cvrt_32b3c_to_16ub3c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
Definition ojph_img_io.cpp:208
ojph::sse41_cvrt_32b1c_to_16ub1c_le
void sse41_cvrt_32b1c_to_16ub1c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::avx2_cvrt_32b1c_to_16ub1c_le
void avx2_cvrt_32b1c_to_16ub1c_le(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::gen_cvrt_32b1c_to_8ub1c
void gen_cvrt_32b1c_to_8ub1c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
Definition ojph_img_io.cpp:99
ojph::sse41_cvrt_32b3c_to_16ub3c_be
void sse41_cvrt_32b3c_to_16ub3c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
ojph::ui32
uint32_t ui32
Definition ojph_defs.h:54
ojph::ui8
uint8_t ui8
Definition ojph_defs.h:50
ojph::gen_cvrt_32b1c_to_16ub1c_be
void gen_cvrt_32b1c_to_16ub1c_be(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
Definition ojph_img_io.cpp:190
ojph::gen_cvrt_32b3c_to_8ub3c
void gen_cvrt_32b3c_to_8ub3c(const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
Definition ojph_img_io.cpp:118
ojph_base.h
ojph_defs.h
ojph::point
Definition ojph_base.h:58
ojph::size
Definition ojph_base.h:48