Various build fixes.
[dcpomatic.git] / src / lib / poznan_encoder.h
1 /*
2     Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #include "jpeg2000_encoder.h"
21 #include <poznan-jpeg2k-cth/config/parameters.h>
22 #include <poznan-jpeg2k-cth/types/image_types.h>
23 #include <string>
24
25 class PoznanEncoder : public JPEG2000Encoder
26 {
27 public:
28         PoznanEncoder ();
29
30         std::string name () const;
31
32         std::string id () const {
33                 return "poznan";
34         }
35
36 protected:
37
38         dcp::Data do_encode (
39                 boost::shared_ptr<const dcp::OpenJPEGImage> input
40                 );
41
42         void parameters_changed ();
43
44 private:
45         void* open_library (std::string name);
46
47         type_parameters _param;
48
49         void (*_init_device) (type_parameters *);
50         void (*_color_coder_lossy) (type_image *);
51         void (*_fwt) (type_tile *);
52         void (*_quantize_tile) (type_tile *);
53         void (*_encode_tile) (type_tile *);
54         void (*_set_coding_parameters) (type_image *, type_parameters *);
55         void (*_init_tiles) (type_image **, type_parameters *);
56         void (*_init_buffer) (type_buffer *);
57         void (*_encode_codestream) (type_buffer *, type_image *);
58         void (*_cuda_h_allocate_mem) (void **, uint64_t);
59         void (*_cuda_memcpy_htd) (void *, void *, uint64_t);
60         void (*_cuda_h_free) (void *);
61         void (*_check_cuda_error) (char const *);
62 };