summaryrefslogtreecommitdiff
path: root/camlibs
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2021-10-07 00:04:30 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2021-10-07 00:04:30 +0200
commit9cb01c264169b1ced86b1748c9bd467fb65b7dbc (patch)
treef0498707464224551689329634bf725320db7e9a /camlibs
parenteb0430ab3168e4567c76b143765dbb6ac8947225 (diff)
downloadlibgphoto2-9cb01c264169b1ced86b1748c9bd467fb65b7dbc.tar.gz
Use a single definition of BayerTile enum
Use a single definition of BayerTile enum inside a new include file bayer-types.h instead of (conditionally!) duplicating the definition from libgphoto2/bayer.h to camlibs/stv680-demosaic-sharpen.h.
Diffstat (limited to 'camlibs')
-rw-r--r--camlibs/stv0680/bayer.h1
-rw-r--r--camlibs/stv0680/demosaic_sharpen.h15
2 files changed, 3 insertions, 13 deletions
diff --git a/camlibs/stv0680/bayer.h b/camlibs/stv0680/bayer.h
index fb7dd5601..8265281c1 100644
--- a/camlibs/stv0680/bayer.h
+++ b/camlibs/stv0680/bayer.h
@@ -27,4 +27,3 @@ void light_enhance(unsigned int vw, unsigned int vh, unsigned int coarse, unsign
unsigned char avg_pix_val, unsigned char *output);
#endif /* !defined(CAMLIBS_STV0680_BAYER_H) */
-
diff --git a/camlibs/stv0680/demosaic_sharpen.h b/camlibs/stv0680/demosaic_sharpen.h
index 44f27c881..586a9aedf 100644
--- a/camlibs/stv0680/demosaic_sharpen.h
+++ b/camlibs/stv0680/demosaic_sharpen.h
@@ -3,18 +3,9 @@
#ifndef CAMLIBS_STV0680_DEMOSAIC_SHARPEN_H
#define CAMLIBS_STV0680_DEMOSAIC_SHARPEN_H
-#ifndef LIBGPHOTO2_BAYER_H
-typedef enum _BayerTile{
- BAYER_TILE_RGGB = 0,
- BAYER_TILE_GRBG = 1,
- BAYER_TILE_BGGR = 2,
- BAYER_TILE_GBRG = 3,
- BAYER_TILE_RGGB_INTERLACED = 4, /* scanline order: R1,G1,R2,G2,...,G1,B1,G2,B2,... */
- BAYER_TILE_GRBG_INTERLACED = 5,
- BAYER_TILE_BGGR_INTERLACED = 6,
- BAYER_TILE_GBRG_INTERLACED = 7
-} BayerTile;
-#endif
+
+#include "bayer-types.h"
+
void demosaic_sharpen (const int width, const int height,
const unsigned char * const src_region,