Commit read-only stack security fix for 64bit processors.
[ardour.git] / libs / ardour / ardour / gdither_types_internal.h
1 /*
2  *  Copyright (C) 2002 Steve Harris <steve@plugin.org.uk>
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  *  $Id$
19  */
20
21 #ifndef GDITHER_TYPES_H
22 #define GDITHER_TYPES_H
23
24 #include <stdint.h>
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29  
30 #define GDITHER_SH_BUF_SIZE 8
31 #define GDITHER_SH_BUF_MASK 7
32
33 /* this must agree with whats in gdither_types.h */
34 typedef enum {
35     GDitherNone = 0,
36     GDitherRect,
37     GDitherTri,
38     GDitherShaped
39 } GDitherType;
40
41 typedef enum {
42     GDither8bit = 8,
43     GDither16bit = 16,
44     GDither32bit = 32,
45     GDitherFloat = 25,
46     GDitherDouble = 54
47 } GDitherSize;
48
49 typedef struct {
50     uint32_t phase;
51     float buffer[GDITHER_SH_BUF_SIZE];
52 } GDitherShapedState;
53
54 typedef struct GDither_s {
55     GDitherType type;
56     uint32_t channels;
57     uint32_t bit_depth;
58     uint32_t dither_depth;
59     float scale;
60     uint32_t post_scale;
61     float post_scale_fp;
62     float bias;
63
64     int   clamp_u;
65
66     int   clamp_l;
67     float *tri_state;
68     GDitherShapedState *shaped_state;
69 } *GDither;
70
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif