d2::align: Change allocation and deallocation of LOD structures so that 0-level certa...
[Ale.git] / device / xvp610_320x240.h
blob0cd0e1fb61c1ce6b34fd9e2ef8ff60347071c4ec
1 // Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
2 // <dhilvert@ugcs.caltech.edu>
4 /* This file is part of the Anti-Lamenessing Engine.
6 The Anti-Lamenessing Engine is free software; you can redistribute it
7 and/or modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 3 of the License,
9 or (at your option) any later version.
11 The Anti-Lamenessing Engine is distributed in the hope that it will be
12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14 Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with the Anti-Lamenessing Engine; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __xvp610_320x240_h__
22 #define __xvp610_320x240_h__
24 #include "../d2.h"
27 * Device module for the IBM PC Camera Pro (IBM VGA Camera Model XVP610; FCC ID
28 * KSX-X9902).
30 * This module is designed for use with the Linux 2.6.x driver patched with
31 * code available at:
33 * http://auricle.dyndns.org/xvp610/
38 * PSF Data
41 #define LPSF_ROWS 3
42 #define LPSF_COLS 3
44 static const ale_real lpsf_calibrated_response[LPSF_ROWS][LPSF_COLS][3] = {
46 { 1.6, 4.8, 3.2 },
47 { 6.4, 6.4, 8 },
48 { 0, 0, 0 }
49 }, {
50 { 1.6, -6.4, -1.6 },
51 { 58.4, 61.6, 80.8 },
52 { 0, 0, 0 }
53 }, {
54 { -1.6, -1.6, -1.6 },
55 { 0, 0, 0 },
56 { 0, 0, 0 }
60 #define NLPSF_ROWS 1
61 #define NLPSF_COLS 5
63 static const ale_real nlpsf_calibrated_response[NLPSF_ROWS][NLPSF_COLS][3] = {
65 #if 0
66 /* Filter 12 */
67 { -2.9, -4.9, -2.7 },
68 { -11.4, -5.4, -9.1 },
69 { 40.9, 39.4, 34.2 },
70 { -3.8, -3, -3.6 },
71 { -4.1, -4.5, -3.2 }
72 #endif
73 /* Filter 11 */
74 { -6.1, -4.9, -5.9 },
75 { -8.2, -5.4, -5.9 },
76 { 36.1, 34.6, 31 },
77 { -3.8, -3, -3.6 },
78 { -4.1, -4.5, -3.2 }
82 class xvp610_320x240 {
83 public:
86 * Linear colorspace PSF
89 #if 0
90 class lpsf : public d2::psf_template<LPSF_ROWS, LPSF_COLS> {
91 public:
92 lpsf() : d2::psf_template<LPSF_ROWS, LPSF_COLS> (3, 3, lpsf_calibrated_response) {
95 #else
97 * This filter seems to produce nicer results.
99 class lpsf : public d2::box {
100 public:
101 lpsf() : d2::box (0.5) {
104 #endif
107 * Non-linear colorspace PSF
110 class nlpsf : public d2::psf_template<NLPSF_ROWS, NLPSF_COLS> {
111 public:
112 nlpsf() : d2::psf_template<NLPSF_ROWS, NLPSF_COLS> (1, 5, nlpsf_calibrated_response) {
117 * Exposure
120 class exposure : public d2::exposure_default {
123 * Uses defaults for now. (If this is changed, then update
124 * the usage message for --device accordingly.)
130 * View Angle
133 static ale_pos view_angle() {
134 return 30;
138 #undef LPSF_ROWS
139 #undef LPSF_COLS
140 #undef NLPSF_ROWS
141 #undef NLPSF_COLS
143 #endif