OpenJPH
Open-source implementation of JPEG2000 Part-15
ojph_codestream.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_codestream.h
34 // Author: Aous Naman
35 // Date: 28 August 2019
36 //***************************************************************************/
37 
38 
39 #ifndef OJPH_CODESTREAM_H
40 #define OJPH_CODESTREAM_H
41 
42 #include <cstdlib>
43 
44 #include "ojph_defs.h"
45 
46 namespace ojph {
47 
49  //local prototyping
50  namespace local {
51  class codestream;
52  };
53 
55  //defined elsewhere
56  class param_siz;
57  class param_cod;
58  class param_qcd;
59  class mem_fixed_allocator;
60  struct point;
61  struct line_buf;
62  class outfile_base;
63  class infile_base;
64 
66  class codestream
67  {
68  public:
70  codestream();
72  ~codestream();
73 
75  void set_planar(bool planar);
77  void set_profile(const char* s);
78 
80  void write_headers(outfile_base *file);
82  line_buf* exchange(line_buf* line, ui32& next_component);
84  void flush();
85 
87  void enable_resilience(); // before read_headers
89  void read_headers(infile_base *file); // before resolution restrictions
91  void restrict_input_resolution(ui32 skipped_res_for_data,
92  ui32 skipped_res_for_recon); // before create
94  void create();
96  line_buf* pull(ui32 &comp_num);
97 
99  void close();
100 
108  bool is_planar() const;
109 
110  private:
112  };
113 
114 }
115 
116 #endif // !OJPH_CODESTREAM_H
OJPH_EXPORT param_siz access_siz()
OJPH_EXPORT param_cod access_cod()
OJPH_EXPORT void restrict_input_resolution(ui32 skipped_res_for_data, ui32 skipped_res_for_recon)
local::codestream * state
OJPH_EXPORT void close()
OJPH_EXPORT void set_planar(bool planar)
OJPH_EXPORT ~codestream()
OJPH_EXPORT void enable_resilience()
OJPH_EXPORT line_buf * exchange(line_buf *line, ui32 &next_component)
OJPH_EXPORT codestream()
OJPH_EXPORT void set_profile(const char *s)
OJPH_EXPORT void write_headers(outfile_base *file)
OJPH_EXPORT param_qcd access_qcd()
OJPH_EXPORT void read_headers(infile_base *file)
OJPH_EXPORT void create()
OJPH_EXPORT bool is_planar() const
OJPH_EXPORT void flush()
OJPH_EXPORT line_buf * pull(ui32 &comp_num)
uint32_t ui32
Definition: ojph_defs.h:54
#define OJPH_EXPORT
Definition: ojph_arch.h:221