ov511.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. #ifndef __LINUX_OV511_H
  2. #define __LINUX_OV511_H
  3. #include <asm/uaccess.h>
  4. #include <linux/videodev.h>
  5. #include <linux/smp_lock.h>
  6. #include <linux/usb.h>
  7. #include <linux/mutex.h>
  8. #define OV511_DEBUG /* Turn on debug messages */
  9. #ifdef OV511_DEBUG
  10. #define PDEBUG(level, fmt, args...) \
  11. if (debug >= (level)) info("[%s:%d] " fmt, \
  12. __FUNCTION__, __LINE__ , ## args)
  13. #else
  14. #define PDEBUG(level, fmt, args...) do {} while(0)
  15. #endif
  16. /* This macro restricts an int variable to an inclusive range */
  17. #define RESTRICT_TO_RANGE(v,mi,ma) { \
  18. if ((v) < (mi)) (v) = (mi); \
  19. else if ((v) > (ma)) (v) = (ma); \
  20. }
  21. /* --------------------------------- */
  22. /* DEFINES FOR OV511 AND OTHER CHIPS */
  23. /* --------------------------------- */
  24. /* USB IDs */
  25. #define VEND_OMNIVISION 0x05A9
  26. #define PROD_OV511 0x0511
  27. #define PROD_OV511PLUS 0xA511
  28. #define PROD_OV518 0x0518
  29. #define PROD_OV518PLUS 0xA518
  30. #define VEND_MATTEL 0x0813
  31. #define PROD_ME2CAM 0x0002
  32. /* --------------------------------- */
  33. /* OV51x REGISTER MNEMONICS */
  34. /* --------------------------------- */
  35. /* Camera interface register numbers */
  36. #define R511_CAM_DELAY 0x10
  37. #define R511_CAM_EDGE 0x11
  38. #define R511_CAM_PXCNT 0x12
  39. #define R511_CAM_LNCNT 0x13
  40. #define R511_CAM_PXDIV 0x14
  41. #define R511_CAM_LNDIV 0x15
  42. #define R511_CAM_UV_EN 0x16
  43. #define R511_CAM_LINE_MODE 0x17
  44. #define R511_CAM_OPTS 0x18
  45. /* Snapshot mode camera interface register numbers */
  46. #define R511_SNAP_FRAME 0x19
  47. #define R511_SNAP_PXCNT 0x1A
  48. #define R511_SNAP_LNCNT 0x1B
  49. #define R511_SNAP_PXDIV 0x1C
  50. #define R511_SNAP_LNDIV 0x1D
  51. #define R511_SNAP_UV_EN 0x1E
  52. #define R511_SNAP_OPTS 0x1F
  53. /* DRAM register numbers */
  54. #define R511_DRAM_FLOW_CTL 0x20
  55. #define R511_DRAM_ARCP 0x21
  56. #define R511_DRAM_MRC 0x22
  57. #define R511_DRAM_RFC 0x23
  58. /* ISO FIFO register numbers */
  59. #define R51x_FIFO_PSIZE 0x30 /* 2 bytes wide w/ OV518(+) */
  60. #define R511_FIFO_OPTS 0x31
  61. /* Parallel IO register numbers */
  62. #define R511_PIO_OPTS 0x38
  63. #define R511_PIO_DATA 0x39
  64. #define R511_PIO_BIST 0x3E
  65. #define R518_GPIO_IN 0x55 /* OV518(+) only */
  66. #define R518_GPIO_OUT 0x56 /* OV518(+) only */
  67. #define R518_GPIO_CTL 0x57 /* OV518(+) only */
  68. #define R518_GPIO_PULSE_IN 0x58 /* OV518(+) only */
  69. #define R518_GPIO_PULSE_CLEAR 0x59 /* OV518(+) only */
  70. #define R518_GPIO_PULSE_POL 0x5a /* OV518(+) only */
  71. #define R518_GPIO_PULSE_EN 0x5b /* OV518(+) only */
  72. #define R518_GPIO_RESET 0x5c /* OV518(+) only */
  73. /* I2C registers */
  74. #define R511_I2C_CTL 0x40
  75. #define R518_I2C_CTL 0x47 /* OV518(+) only */
  76. #define R51x_I2C_W_SID 0x41
  77. #define R51x_I2C_SADDR_3 0x42
  78. #define R51x_I2C_SADDR_2 0x43
  79. #define R51x_I2C_R_SID 0x44
  80. #define R51x_I2C_DATA 0x45
  81. #define R51x_I2C_CLOCK 0x46
  82. #define R51x_I2C_TIMEOUT 0x47
  83. /* I2C snapshot registers */
  84. #define R511_SI2C_SADDR_3 0x48
  85. #define R511_SI2C_DATA 0x49
  86. /* System control registers */
  87. #define R51x_SYS_RESET 0x50
  88. /* Reset type definitions */
  89. #define OV511_RESET_UDC 0x01
  90. #define OV511_RESET_I2C 0x02
  91. #define OV511_RESET_FIFO 0x04
  92. #define OV511_RESET_OMNICE 0x08
  93. #define OV511_RESET_DRAM 0x10
  94. #define OV511_RESET_CAM_INT 0x20
  95. #define OV511_RESET_OV511 0x40
  96. #define OV511_RESET_NOREGS 0x3F /* All but OV511 & regs */
  97. #define OV511_RESET_ALL 0x7F
  98. #define R511_SYS_CLOCK_DIV 0x51
  99. #define R51x_SYS_SNAP 0x52
  100. #define R51x_SYS_INIT 0x53
  101. #define R511_SYS_PWR_CLK 0x54 /* OV511+/OV518(+) only */
  102. #define R511_SYS_LED_CTL 0x55 /* OV511+ only */
  103. #define R511_SYS_USER 0x5E
  104. #define R511_SYS_CUST_ID 0x5F
  105. /* OmniCE (compression) registers */
  106. #define R511_COMP_PHY 0x70
  107. #define R511_COMP_PHUV 0x71
  108. #define R511_COMP_PVY 0x72
  109. #define R511_COMP_PVUV 0x73
  110. #define R511_COMP_QHY 0x74
  111. #define R511_COMP_QHUV 0x75
  112. #define R511_COMP_QVY 0x76
  113. #define R511_COMP_QVUV 0x77
  114. #define R511_COMP_EN 0x78
  115. #define R511_COMP_LUT_EN 0x79
  116. #define R511_COMP_LUT_BEGIN 0x80
  117. /* --------------------------------- */
  118. /* ALTERNATE NUMBERS */
  119. /* --------------------------------- */
  120. /* Alternate numbers for various max packet sizes (OV511 only) */
  121. #define OV511_ALT_SIZE_992 0
  122. #define OV511_ALT_SIZE_993 1
  123. #define OV511_ALT_SIZE_768 2
  124. #define OV511_ALT_SIZE_769 3
  125. #define OV511_ALT_SIZE_512 4
  126. #define OV511_ALT_SIZE_513 5
  127. #define OV511_ALT_SIZE_257 6
  128. #define OV511_ALT_SIZE_0 7
  129. /* Alternate numbers for various max packet sizes (OV511+ only) */
  130. #define OV511PLUS_ALT_SIZE_0 0
  131. #define OV511PLUS_ALT_SIZE_33 1
  132. #define OV511PLUS_ALT_SIZE_129 2
  133. #define OV511PLUS_ALT_SIZE_257 3
  134. #define OV511PLUS_ALT_SIZE_385 4
  135. #define OV511PLUS_ALT_SIZE_513 5
  136. #define OV511PLUS_ALT_SIZE_769 6
  137. #define OV511PLUS_ALT_SIZE_961 7
  138. /* Alternate numbers for various max packet sizes (OV518(+) only) */
  139. #define OV518_ALT_SIZE_0 0
  140. #define OV518_ALT_SIZE_128 1
  141. #define OV518_ALT_SIZE_256 2
  142. #define OV518_ALT_SIZE_384 3
  143. #define OV518_ALT_SIZE_512 4
  144. #define OV518_ALT_SIZE_640 5
  145. #define OV518_ALT_SIZE_768 6
  146. #define OV518_ALT_SIZE_896 7
  147. /* --------------------------------- */
  148. /* OV7610 REGISTER MNEMONICS */
  149. /* --------------------------------- */
  150. /* OV7610 registers */
  151. #define OV7610_REG_GAIN 0x00 /* gain setting (5:0) */
  152. #define OV7610_REG_BLUE 0x01 /* blue channel balance */
  153. #define OV7610_REG_RED 0x02 /* red channel balance */
  154. #define OV7610_REG_SAT 0x03 /* saturation */
  155. /* 04 reserved */
  156. #define OV7610_REG_CNT 0x05 /* Y contrast */
  157. #define OV7610_REG_BRT 0x06 /* Y brightness */
  158. /* 08-0b reserved */
  159. #define OV7610_REG_BLUE_BIAS 0x0C /* blue channel bias (5:0) */
  160. #define OV7610_REG_RED_BIAS 0x0D /* read channel bias (5:0) */
  161. #define OV7610_REG_GAMMA_COEFF 0x0E /* gamma settings */
  162. #define OV7610_REG_WB_RANGE 0x0F /* AEC/ALC/S-AWB settings */
  163. #define OV7610_REG_EXP 0x10 /* manual exposure setting */
  164. #define OV7610_REG_CLOCK 0x11 /* polarity/clock prescaler */
  165. #define OV7610_REG_COM_A 0x12 /* misc common regs */
  166. #define OV7610_REG_COM_B 0x13 /* misc common regs */
  167. #define OV7610_REG_COM_C 0x14 /* misc common regs */
  168. #define OV7610_REG_COM_D 0x15 /* misc common regs */
  169. #define OV7610_REG_FIELD_DIVIDE 0x16 /* field interval/mode settings */
  170. #define OV7610_REG_HWIN_START 0x17 /* horizontal window start */
  171. #define OV7610_REG_HWIN_END 0x18 /* horizontal window end */
  172. #define OV7610_REG_VWIN_START 0x19 /* vertical window start */
  173. #define OV7610_REG_VWIN_END 0x1A /* vertical window end */
  174. #define OV7610_REG_PIXEL_SHIFT 0x1B /* pixel shift */
  175. #define OV7610_REG_ID_HIGH 0x1C /* manufacturer ID MSB */
  176. #define OV7610_REG_ID_LOW 0x1D /* manufacturer ID LSB */
  177. /* 0e-0f reserved */
  178. #define OV7610_REG_COM_E 0x20 /* misc common regs */
  179. #define OV7610_REG_YOFFSET 0x21 /* Y channel offset */
  180. #define OV7610_REG_UOFFSET 0x22 /* U channel offset */
  181. /* 23 reserved */
  182. #define OV7610_REG_ECW 0x24 /* Exposure white level for AEC */
  183. #define OV7610_REG_ECB 0x25 /* Exposure black level for AEC */
  184. #define OV7610_REG_COM_F 0x26 /* misc settings */
  185. #define OV7610_REG_COM_G 0x27 /* misc settings */
  186. #define OV7610_REG_COM_H 0x28 /* misc settings */
  187. #define OV7610_REG_COM_I 0x29 /* misc settings */
  188. #define OV7610_REG_FRAMERATE_H 0x2A /* frame rate MSB + misc */
  189. #define OV7610_REG_FRAMERATE_L 0x2B /* frame rate LSB */
  190. #define OV7610_REG_ALC 0x2C /* Auto Level Control settings */
  191. #define OV7610_REG_COM_J 0x2D /* misc settings */
  192. #define OV7610_REG_VOFFSET 0x2E /* V channel offset adjustment */
  193. #define OV7610_REG_ARRAY_BIAS 0x2F /* Array bias -- don't change */
  194. /* 30-32 reserved */
  195. #define OV7610_REG_YGAMMA 0x33 /* misc gamma settings (7:6) */
  196. #define OV7610_REG_BIAS_ADJUST 0x34 /* misc bias settings */
  197. #define OV7610_REG_COM_L 0x35 /* misc settings */
  198. /* 36-37 reserved */
  199. #define OV7610_REG_COM_K 0x38 /* misc registers */
  200. /* --------------------------------- */
  201. /* I2C ADDRESSES */
  202. /* --------------------------------- */
  203. #define OV7xx0_SID 0x42
  204. #define OV6xx0_SID 0xC0
  205. #define OV8xx0_SID 0xA0
  206. #define KS0127_SID 0xD8
  207. #define SAA7111A_SID 0x48
  208. /* --------------------------------- */
  209. /* MISCELLANEOUS DEFINES */
  210. /* --------------------------------- */
  211. #define I2C_CLOCK_PRESCALER 0x03
  212. #define FRAMES_PER_DESC 10 /* FIXME - What should this be? */
  213. #define MAX_FRAME_SIZE_PER_DESC 993 /* For statically allocated stuff */
  214. #define PIXELS_PER_SEG 256 /* Pixels per segment */
  215. #define OV511_ENDPOINT_ADDRESS 1 /* Isoc endpoint number */
  216. #define OV511_NUMFRAMES 2
  217. #if OV511_NUMFRAMES > VIDEO_MAX_FRAME
  218. #error "OV511_NUMFRAMES is too high"
  219. #endif
  220. #define OV511_NUMSBUF 2
  221. /* Control transfers use up to 4 bytes */
  222. #define OV511_CBUF_SIZE 4
  223. /* Size of usb_make_path() buffer */
  224. #define OV511_USB_PATH_LEN 64
  225. /* Bridge types */
  226. enum {
  227. BRG_UNKNOWN,
  228. BRG_OV511,
  229. BRG_OV511PLUS,
  230. BRG_OV518,
  231. BRG_OV518PLUS,
  232. };
  233. /* Bridge classes */
  234. enum {
  235. BCL_UNKNOWN,
  236. BCL_OV511,
  237. BCL_OV518,
  238. };
  239. /* Sensor types */
  240. enum {
  241. SEN_UNKNOWN,
  242. SEN_OV76BE,
  243. SEN_OV7610,
  244. SEN_OV7620,
  245. SEN_OV7620AE,
  246. SEN_OV6620,
  247. SEN_OV6630,
  248. SEN_OV6630AE,
  249. SEN_OV6630AF,
  250. SEN_OV8600,
  251. SEN_KS0127,
  252. SEN_KS0127B,
  253. SEN_SAA7111A,
  254. };
  255. enum {
  256. STATE_SCANNING, /* Scanning for start */
  257. STATE_HEADER, /* Parsing header */
  258. STATE_LINES, /* Parsing lines */
  259. };
  260. /* Buffer states */
  261. enum {
  262. BUF_NOT_ALLOCATED,
  263. BUF_ALLOCATED,
  264. };
  265. /* --------- Definition of ioctl interface --------- */
  266. #define OV511_INTERFACE_VER 101
  267. /* LED options */
  268. enum {
  269. LED_OFF,
  270. LED_ON,
  271. LED_AUTO,
  272. };
  273. /* Raw frame formats */
  274. enum {
  275. RAWFMT_INVALID,
  276. RAWFMT_YUV400,
  277. RAWFMT_YUV420,
  278. RAWFMT_YUV422,
  279. RAWFMT_GBR422,
  280. };
  281. struct ov511_i2c_struct {
  282. unsigned char slave; /* Write slave ID (read ID - 1) */
  283. unsigned char reg; /* Index of register */
  284. unsigned char value; /* User sets this w/ write, driver does w/ read */
  285. unsigned char mask; /* Bits to be changed. Not used with read ops */
  286. };
  287. /* ioctls */
  288. #define OV511IOC_WI2C _IOW('v', BASE_VIDIOCPRIVATE + 5, \
  289. struct ov511_i2c_struct)
  290. #define OV511IOC_RI2C _IOWR('v', BASE_VIDIOCPRIVATE + 6, \
  291. struct ov511_i2c_struct)
  292. /* ------------- End IOCTL interface -------------- */
  293. struct usb_ov511; /* Forward declaration */
  294. struct ov511_sbuf {
  295. struct usb_ov511 *ov;
  296. unsigned char *data;
  297. struct urb *urb;
  298. spinlock_t lock;
  299. int n;
  300. };
  301. enum {
  302. FRAME_UNUSED, /* Unused (no MCAPTURE) */
  303. FRAME_READY, /* Ready to start grabbing */
  304. FRAME_GRABBING, /* In the process of being grabbed into */
  305. FRAME_DONE, /* Finished grabbing, but not been synced yet */
  306. FRAME_ERROR, /* Something bad happened while processing */
  307. };
  308. struct ov511_regvals {
  309. enum {
  310. OV511_DONE_BUS,
  311. OV511_REG_BUS,
  312. OV511_I2C_BUS,
  313. } bus;
  314. unsigned char reg;
  315. unsigned char val;
  316. };
  317. struct ov511_frame {
  318. int framenum; /* Index of this frame */
  319. unsigned char *data; /* Frame buffer */
  320. unsigned char *tempdata; /* Temp buffer for multi-stage conversions */
  321. unsigned char *rawdata; /* Raw camera data buffer */
  322. unsigned char *compbuf; /* Temp buffer for decompressor */
  323. int depth; /* Bytes per pixel */
  324. int width; /* Width application is expecting */
  325. int height; /* Height application is expecting */
  326. int rawwidth; /* Actual width of frame sent from camera */
  327. int rawheight; /* Actual height of frame sent from camera */
  328. int sub_flag; /* Sub-capture mode for this frame? */
  329. unsigned int format; /* Format for this frame */
  330. int compressed; /* Is frame compressed? */
  331. volatile int grabstate; /* State of grabbing */
  332. int scanstate; /* State of scanning */
  333. int bytes_recvd; /* Number of image bytes received from camera */
  334. long bytes_read; /* Amount that has been read() */
  335. wait_queue_head_t wq; /* Processes waiting */
  336. int snapshot; /* True if frame was a snapshot */
  337. };
  338. #define DECOMP_INTERFACE_VER 4
  339. /* Compression module operations */
  340. struct ov51x_decomp_ops {
  341. int (*decomp_400)(unsigned char *, unsigned char *, unsigned char *,
  342. int, int, int);
  343. int (*decomp_420)(unsigned char *, unsigned char *, unsigned char *,
  344. int, int, int);
  345. int (*decomp_422)(unsigned char *, unsigned char *, unsigned char *,
  346. int, int, int);
  347. struct module *owner;
  348. };
  349. struct usb_ov511 {
  350. struct video_device *vdev;
  351. struct usb_device *dev;
  352. int customid;
  353. char *desc;
  354. unsigned char iface;
  355. char usb_path[OV511_USB_PATH_LEN];
  356. /* Determined by sensor type */
  357. int maxwidth;
  358. int maxheight;
  359. int minwidth;
  360. int minheight;
  361. int brightness;
  362. int colour;
  363. int contrast;
  364. int hue;
  365. int whiteness;
  366. int exposure;
  367. int auto_brt; /* Auto brightness enabled flag */
  368. int auto_gain; /* Auto gain control enabled flag */
  369. int auto_exp; /* Auto exposure enabled flag */
  370. int backlight; /* Backlight exposure algorithm flag */
  371. int mirror; /* Image is reversed horizontally */
  372. int led_policy; /* LED: off|on|auto; OV511+ only */
  373. struct mutex lock; /* Serializes user-accessible operations */
  374. int user; /* user count for exclusive use */
  375. int streaming; /* Are we streaming Isochronous? */
  376. int grabbing; /* Are we grabbing? */
  377. int compress; /* Should the next frame be compressed? */
  378. int compress_inited; /* Are compression params uploaded? */
  379. int lightfreq; /* Power (lighting) frequency */
  380. int bandfilt; /* Banding filter enabled flag */
  381. unsigned char *fbuf; /* Videodev buffer area */
  382. unsigned char *tempfbuf; /* Temporary (intermediate) buffer area */
  383. unsigned char *rawfbuf; /* Raw camera data buffer area */
  384. int sub_flag; /* Pix Array subcapture on flag */
  385. int subx; /* Pix Array subcapture x offset */
  386. int suby; /* Pix Array subcapture y offset */
  387. int subw; /* Pix Array subcapture width */
  388. int subh; /* Pix Array subcapture height */
  389. int curframe; /* Current receiving sbuf */
  390. struct ov511_frame frame[OV511_NUMFRAMES];
  391. struct ov511_sbuf sbuf[OV511_NUMSBUF];
  392. wait_queue_head_t wq; /* Processes waiting */
  393. int snap_enabled; /* Snapshot mode enabled */
  394. int bridge; /* Type of bridge (BRG_*) */
  395. int bclass; /* Class of bridge (BCL_*) */
  396. int sensor; /* Type of image sensor chip (SEN_*) */
  397. int packet_size; /* Frame size per isoc desc */
  398. int packet_numbering; /* Is ISO frame numbering enabled? */
  399. /* Framebuffer/sbuf management */
  400. int buf_state;
  401. struct mutex buf_lock;
  402. struct ov51x_decomp_ops *decomp_ops;
  403. /* Stop streaming while changing picture settings */
  404. int stop_during_set;
  405. int stopped; /* Streaming is temporarily paused */
  406. /* Video decoder stuff */
  407. int input; /* Composite, S-VIDEO, etc... */
  408. int num_inputs; /* Number of inputs */
  409. int norm; /* NTSC / PAL / SECAM */
  410. int has_decoder; /* Device has a video decoder */
  411. int pal; /* Device is designed for PAL resolution */
  412. /* I2C interface */
  413. struct mutex i2c_lock; /* Protect I2C controller regs */
  414. unsigned char primary_i2c_slave; /* I2C write id of sensor */
  415. /* Control transaction stuff */
  416. unsigned char *cbuf; /* Buffer for payload */
  417. struct mutex cbuf_lock;
  418. };
  419. /* Used to represent a list of values and their respective symbolic names */
  420. struct symbolic_list {
  421. int num;
  422. char *name;
  423. };
  424. #define NOT_DEFINED_STR "Unknown"
  425. /* Returns the name of the matching element in the symbolic_list array. The
  426. * end of the list must be marked with an element that has a NULL name.
  427. */
  428. static inline char *
  429. symbolic(struct symbolic_list list[], int num)
  430. {
  431. int i;
  432. for (i = 0; list[i].name != NULL; i++)
  433. if (list[i].num == num)
  434. return (list[i].name);
  435. return (NOT_DEFINED_STR);
  436. }
  437. /* Compression stuff */
  438. #define OV511_QUANTABLESIZE 64
  439. #define OV518_QUANTABLESIZE 32
  440. #define OV511_YQUANTABLE { \
  441. 0, 1, 1, 2, 2, 3, 3, 4, \
  442. 1, 1, 1, 2, 2, 3, 4, 4, \
  443. 1, 1, 2, 2, 3, 4, 4, 4, \
  444. 2, 2, 2, 3, 4, 4, 4, 4, \
  445. 2, 2, 3, 4, 4, 5, 5, 5, \
  446. 3, 3, 4, 4, 5, 5, 5, 5, \
  447. 3, 4, 4, 4, 5, 5, 5, 5, \
  448. 4, 4, 4, 4, 5, 5, 5, 5 \
  449. }
  450. #define OV511_UVQUANTABLE { \
  451. 0, 2, 2, 3, 4, 4, 4, 4, \
  452. 2, 2, 2, 4, 4, 4, 4, 4, \
  453. 2, 2, 3, 4, 4, 4, 4, 4, \
  454. 3, 4, 4, 4, 4, 4, 4, 4, \
  455. 4, 4, 4, 4, 4, 4, 4, 4, \
  456. 4, 4, 4, 4, 4, 4, 4, 4, \
  457. 4, 4, 4, 4, 4, 4, 4, 4, \
  458. 4, 4, 4, 4, 4, 4, 4, 4 \
  459. }
  460. #define OV518_YQUANTABLE { \
  461. 5, 4, 5, 6, 6, 7, 7, 7, \
  462. 5, 5, 5, 5, 6, 7, 7, 7, \
  463. 6, 6, 6, 6, 7, 7, 7, 8, \
  464. 7, 7, 6, 7, 7, 7, 8, 8 \
  465. }
  466. #define OV518_UVQUANTABLE { \
  467. 6, 6, 6, 7, 7, 7, 7, 7, \
  468. 6, 6, 6, 7, 7, 7, 7, 7, \
  469. 6, 6, 6, 7, 7, 7, 7, 8, \
  470. 7, 7, 7, 7, 7, 7, 8, 8 \
  471. }
  472. #endif