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