PageRenderTime 13ms CodeModel.GetById 1ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/src/FreeImage/Source/LibRawLite/internal/demosaic_packs.cpp

https://bitbucket.org/cabalistic/ogredeps/
C++ | 97 lines | 56 code | 11 blank | 30 comment | 0 complexity | b180327f0176705a8800cfe5db7d5537 MD5 | raw file
 1/* 
 2  Copyright 2008-2010 LibRaw LLC (info@libraw.org)
 3
 4LibRaw is free software; you can redistribute it and/or modify
 5it under the terms of the one of three licenses as you choose:
 6
 71. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
 8   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
 9
102. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
11   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
12
133. LibRaw Software License 27032010
14   (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details).
15
16   This file is generated from Dave Coffin's dcraw.c
17   dcraw.c -- Dave Coffin's raw photo decoder
18   Copyright 1997-2010 by Dave Coffin, dcoffin a cybercom o net
19
20   Look into dcraw homepage (probably http://cybercom.net/~dcoffin/dcraw/)
21   for more information
22*/
23
24#include <math.h>
25
26#define CLASS LibRaw::
27
28#include "libraw/libraw_types.h"
29#define LIBRAW_LIBRARY_BUILD
30#define LIBRAW_IO_REDEFINED
31#include "libraw/libraw.h"
32#include "internal/defines.h"
33#define SRC_USES_SHRINK
34#define SRC_USES_BLACK
35#define SRC_USES_CURVE
36
37#include "internal/var_defines.h"
38
39
40#ifdef LIBRAW_DEMOSAIC_PACK_GPL2
41/*AHD-Mod*/
42#include <ahd_interpolate_mod.c>
43/*LMMSE*/
44#include <lmmse_interpolate.c>
45/*AFD*/
46#include <ahd_partial_interpolate.c>
47#include <afd_interpolate_pl.c>
48/* VCD*/
49#include <refinement.c>
50#include <vcd_interpolate.c>
51#include <es_median_filter.c>
52#include <median_filter_new.c>
53#else
54// fake implementations of all GPL2 demosaics
55
56void CLASS ahd_interpolate_mod() {ahd_interpolate();}
57void CLASS afd_interpolate_pl(int, int) {ahd_interpolate();}
58void CLASS vcd_interpolate(int) {ahd_interpolate();}
59void CLASS lmmse_interpolate(int) {ahd_interpolate();}
60void CLASS es_median_filter() {}
61void CLASS median_filter_new() {}
62void CLASS refinement() {}
63
64#endif
65
66/* DCB is BSD licensed, so include it */
67#include "./dcb_demosaicing.c"
68
69#ifdef LIBRAW_DEMOSAIC_PACK_GPL3
70/*AMaZE*/
71#include <amaze_demosaic_RT.cc>
72#include <CA_correct_RT.cc>
73#include <cfa_linedn_new.c>
74#include <cfa_impulse_gauss.c>
75#include <green_equi.c>
76#else
77// fallback to AHD and no correction
78void CLASS CA_correct_RT(float,float){}
79void CLASS amaze_demosaic_RT() { ahd_interpolate();}
80void CLASS green_equilibrate(float thresh) {} 
81void CLASS cfa_linedn(float linenoise){}
82void CLASS cfa_impulse_gauss(float lclean, float cclean){}
83#endif
84
85#define sget4(s) sget4((uchar *)s)
86#ifndef M_PI
87#define M_PI            3.14159265358979323846
88#endif
89#ifdef LIBRAW_DEMOSAIC_PACK_GPL2
90#include <dcraw_foveon.c>
91#else
92void CLASS foveon_interpolate(){}
93void CLASS foveon_load_raw(){}
94void CLASS parse_foveon(){}
95void CLASS foveon_thumb_loader(){}
96void CLASS foveon_thumb(){}
97#endif