ov511.h 16 KB

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