vivid-core.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. /*
  2. * vivid-core.h - core datastructures
  3. *
  4. * Copyright 2014 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
  5. *
  6. * This program is free software; you may redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; version 2 of the License.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  11. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  12. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  13. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  14. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  15. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  16. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  17. * SOFTWARE.
  18. */
  19. #ifndef _VIVID_CORE_H_
  20. #define _VIVID_CORE_H_
  21. #include <linux/fb.h>
  22. #include <linux/workqueue.h>
  23. #include <media/cec.h>
  24. #include <media/videobuf2-v4l2.h>
  25. #include <media/v4l2-device.h>
  26. #include <media/v4l2-dev.h>
  27. #include <media/v4l2-ctrls.h>
  28. #include <media/v4l2-tpg.h>
  29. #include "vivid-rds-gen.h"
  30. #include "vivid-vbi-gen.h"
  31. #define dprintk(dev, level, fmt, arg...) \
  32. v4l2_dbg(level, vivid_debug, &dev->v4l2_dev, fmt, ## arg)
  33. /* Maximum allowed frame rate
  34. *
  35. * vivid will allow setting timeperframe in [1/FPS_MAX - FPS_MAX/1] range.
  36. *
  37. * Ideally FPS_MAX should be infinity, i.e. practically UINT_MAX, but that
  38. * might hit application errors when they manipulate these values.
  39. *
  40. * Besides, for tpf < 10ms image-generation logic should be changed, to avoid
  41. * producing frames with equal content.
  42. */
  43. #define FPS_MAX 100
  44. /* The maximum number of clip rectangles */
  45. #define MAX_CLIPS 16
  46. /* The maximum number of inputs */
  47. #define MAX_INPUTS 16
  48. /* The maximum number of outputs */
  49. #define MAX_OUTPUTS 16
  50. /* The maximum up or down scaling factor is 4 */
  51. #define MAX_ZOOM 4
  52. /* The maximum image width/height are set to 4K DMT */
  53. #define MAX_WIDTH 4096
  54. #define MAX_HEIGHT 2160
  55. /* The minimum image width/height */
  56. #define MIN_WIDTH 16
  57. #define MIN_HEIGHT 16
  58. /* The data_offset of plane 0 for the multiplanar formats */
  59. #define PLANE0_DATA_OFFSET 128
  60. /* The supported TV frequency range in MHz */
  61. #define MIN_TV_FREQ (44U * 16U)
  62. #define MAX_TV_FREQ (958U * 16U)
  63. /* The number of samples returned in every SDR buffer */
  64. #define SDR_CAP_SAMPLES_PER_BUF 0x4000
  65. /* used by the threads to know when to resync internal counters */
  66. #define JIFFIES_PER_DAY (3600U * 24U * HZ)
  67. #define JIFFIES_RESYNC (JIFFIES_PER_DAY * (0xf0000000U / JIFFIES_PER_DAY))
  68. extern const struct v4l2_rect vivid_min_rect;
  69. extern const struct v4l2_rect vivid_max_rect;
  70. extern unsigned vivid_debug;
  71. struct vivid_fmt {
  72. u32 fourcc; /* v4l2 format id */
  73. bool is_yuv;
  74. bool can_do_overlay;
  75. u8 vdownsampling[TPG_MAX_PLANES];
  76. u32 alpha_mask;
  77. u8 planes;
  78. u8 buffers;
  79. u32 data_offset[TPG_MAX_PLANES];
  80. u32 bit_depth[TPG_MAX_PLANES];
  81. };
  82. extern struct vivid_fmt vivid_formats[];
  83. /* buffer for one video frame */
  84. struct vivid_buffer {
  85. /* common v4l buffer stuff -- must be first */
  86. struct vb2_v4l2_buffer vb;
  87. struct list_head list;
  88. };
  89. enum vivid_input {
  90. WEBCAM,
  91. TV,
  92. SVID,
  93. HDMI,
  94. };
  95. enum vivid_signal_mode {
  96. CURRENT_DV_TIMINGS,
  97. CURRENT_STD = CURRENT_DV_TIMINGS,
  98. NO_SIGNAL,
  99. NO_LOCK,
  100. OUT_OF_RANGE,
  101. SELECTED_DV_TIMINGS,
  102. SELECTED_STD = SELECTED_DV_TIMINGS,
  103. CYCLE_DV_TIMINGS,
  104. CYCLE_STD = CYCLE_DV_TIMINGS,
  105. CUSTOM_DV_TIMINGS,
  106. };
  107. enum vivid_colorspace {
  108. VIVID_CS_170M,
  109. VIVID_CS_709,
  110. VIVID_CS_SRGB,
  111. VIVID_CS_ADOBERGB,
  112. VIVID_CS_2020,
  113. VIVID_CS_DCI_P3,
  114. VIVID_CS_240M,
  115. VIVID_CS_SYS_M,
  116. VIVID_CS_SYS_BG,
  117. };
  118. #define VIVID_INVALID_SIGNAL(mode) \
  119. ((mode) == NO_SIGNAL || (mode) == NO_LOCK || (mode) == OUT_OF_RANGE)
  120. struct vivid_cec_work {
  121. struct list_head list;
  122. struct delayed_work work;
  123. struct cec_adapter *adap;
  124. struct vivid_dev *dev;
  125. unsigned int usecs;
  126. unsigned int timeout_ms;
  127. u8 tx_status;
  128. struct cec_msg msg;
  129. };
  130. struct vivid_dev {
  131. unsigned inst;
  132. struct v4l2_device v4l2_dev;
  133. struct v4l2_ctrl_handler ctrl_hdl_user_gen;
  134. struct v4l2_ctrl_handler ctrl_hdl_user_vid;
  135. struct v4l2_ctrl_handler ctrl_hdl_user_aud;
  136. struct v4l2_ctrl_handler ctrl_hdl_streaming;
  137. struct v4l2_ctrl_handler ctrl_hdl_sdtv_cap;
  138. struct v4l2_ctrl_handler ctrl_hdl_loop_cap;
  139. struct video_device vid_cap_dev;
  140. struct v4l2_ctrl_handler ctrl_hdl_vid_cap;
  141. struct video_device vid_out_dev;
  142. struct v4l2_ctrl_handler ctrl_hdl_vid_out;
  143. struct video_device vbi_cap_dev;
  144. struct v4l2_ctrl_handler ctrl_hdl_vbi_cap;
  145. struct video_device vbi_out_dev;
  146. struct v4l2_ctrl_handler ctrl_hdl_vbi_out;
  147. struct video_device radio_rx_dev;
  148. struct v4l2_ctrl_handler ctrl_hdl_radio_rx;
  149. struct video_device radio_tx_dev;
  150. struct v4l2_ctrl_handler ctrl_hdl_radio_tx;
  151. struct video_device sdr_cap_dev;
  152. struct v4l2_ctrl_handler ctrl_hdl_sdr_cap;
  153. spinlock_t slock;
  154. struct mutex mutex;
  155. /* capabilities */
  156. u32 vid_cap_caps;
  157. u32 vid_out_caps;
  158. u32 vbi_cap_caps;
  159. u32 vbi_out_caps;
  160. u32 sdr_cap_caps;
  161. u32 radio_rx_caps;
  162. u32 radio_tx_caps;
  163. /* supported features */
  164. bool multiplanar;
  165. unsigned num_inputs;
  166. u8 input_type[MAX_INPUTS];
  167. u8 input_name_counter[MAX_INPUTS];
  168. unsigned num_outputs;
  169. u8 output_type[MAX_OUTPUTS];
  170. u8 output_name_counter[MAX_OUTPUTS];
  171. bool has_audio_inputs;
  172. bool has_audio_outputs;
  173. bool has_vid_cap;
  174. bool has_vid_out;
  175. bool has_vbi_cap;
  176. bool has_raw_vbi_cap;
  177. bool has_sliced_vbi_cap;
  178. bool has_vbi_out;
  179. bool has_raw_vbi_out;
  180. bool has_sliced_vbi_out;
  181. bool has_radio_rx;
  182. bool has_radio_tx;
  183. bool has_sdr_cap;
  184. bool has_fb;
  185. bool can_loop_video;
  186. /* controls */
  187. struct v4l2_ctrl *brightness;
  188. struct v4l2_ctrl *contrast;
  189. struct v4l2_ctrl *saturation;
  190. struct v4l2_ctrl *hue;
  191. struct {
  192. /* autogain/gain cluster */
  193. struct v4l2_ctrl *autogain;
  194. struct v4l2_ctrl *gain;
  195. };
  196. struct v4l2_ctrl *volume;
  197. struct v4l2_ctrl *mute;
  198. struct v4l2_ctrl *alpha;
  199. struct v4l2_ctrl *button;
  200. struct v4l2_ctrl *boolean;
  201. struct v4l2_ctrl *int32;
  202. struct v4l2_ctrl *int64;
  203. struct v4l2_ctrl *menu;
  204. struct v4l2_ctrl *string;
  205. struct v4l2_ctrl *bitmask;
  206. struct v4l2_ctrl *int_menu;
  207. struct v4l2_ctrl *test_pattern;
  208. struct v4l2_ctrl *colorspace;
  209. struct v4l2_ctrl *rgb_range_cap;
  210. struct v4l2_ctrl *real_rgb_range_cap;
  211. struct {
  212. /* std_signal_mode/standard cluster */
  213. struct v4l2_ctrl *ctrl_std_signal_mode;
  214. struct v4l2_ctrl *ctrl_standard;
  215. };
  216. struct {
  217. /* dv_timings_signal_mode/timings cluster */
  218. struct v4l2_ctrl *ctrl_dv_timings_signal_mode;
  219. struct v4l2_ctrl *ctrl_dv_timings;
  220. };
  221. struct v4l2_ctrl *ctrl_has_crop_cap;
  222. struct v4l2_ctrl *ctrl_has_compose_cap;
  223. struct v4l2_ctrl *ctrl_has_scaler_cap;
  224. struct v4l2_ctrl *ctrl_has_crop_out;
  225. struct v4l2_ctrl *ctrl_has_compose_out;
  226. struct v4l2_ctrl *ctrl_has_scaler_out;
  227. struct v4l2_ctrl *ctrl_tx_mode;
  228. struct v4l2_ctrl *ctrl_tx_rgb_range;
  229. struct v4l2_ctrl *radio_tx_rds_pi;
  230. struct v4l2_ctrl *radio_tx_rds_pty;
  231. struct v4l2_ctrl *radio_tx_rds_mono_stereo;
  232. struct v4l2_ctrl *radio_tx_rds_art_head;
  233. struct v4l2_ctrl *radio_tx_rds_compressed;
  234. struct v4l2_ctrl *radio_tx_rds_dyn_pty;
  235. struct v4l2_ctrl *radio_tx_rds_ta;
  236. struct v4l2_ctrl *radio_tx_rds_tp;
  237. struct v4l2_ctrl *radio_tx_rds_ms;
  238. struct v4l2_ctrl *radio_tx_rds_psname;
  239. struct v4l2_ctrl *radio_tx_rds_radiotext;
  240. struct v4l2_ctrl *radio_rx_rds_pty;
  241. struct v4l2_ctrl *radio_rx_rds_ta;
  242. struct v4l2_ctrl *radio_rx_rds_tp;
  243. struct v4l2_ctrl *radio_rx_rds_ms;
  244. struct v4l2_ctrl *radio_rx_rds_psname;
  245. struct v4l2_ctrl *radio_rx_rds_radiotext;
  246. unsigned input_brightness[MAX_INPUTS];
  247. unsigned osd_mode;
  248. unsigned button_pressed;
  249. bool sensor_hflip;
  250. bool sensor_vflip;
  251. bool hflip;
  252. bool vflip;
  253. bool vbi_cap_interlaced;
  254. bool loop_video;
  255. bool reduced_fps;
  256. /* Framebuffer */
  257. unsigned long video_pbase;
  258. void *video_vbase;
  259. u32 video_buffer_size;
  260. int display_width;
  261. int display_height;
  262. int display_byte_stride;
  263. int bits_per_pixel;
  264. int bytes_per_pixel;
  265. struct fb_info fb_info;
  266. struct fb_var_screeninfo fb_defined;
  267. struct fb_fix_screeninfo fb_fix;
  268. /* Error injection */
  269. bool queue_setup_error;
  270. bool buf_prepare_error;
  271. bool start_streaming_error;
  272. bool dqbuf_error;
  273. bool seq_wrap;
  274. bool time_wrap;
  275. u64 time_wrap_offset;
  276. unsigned perc_dropped_buffers;
  277. enum vivid_signal_mode std_signal_mode;
  278. unsigned query_std_last;
  279. v4l2_std_id query_std;
  280. enum tpg_video_aspect std_aspect_ratio;
  281. enum vivid_signal_mode dv_timings_signal_mode;
  282. char **query_dv_timings_qmenu;
  283. unsigned query_dv_timings_size;
  284. unsigned query_dv_timings_last;
  285. unsigned query_dv_timings;
  286. enum tpg_video_aspect dv_timings_aspect_ratio;
  287. /* Input */
  288. unsigned input;
  289. v4l2_std_id std_cap;
  290. struct v4l2_dv_timings dv_timings_cap;
  291. u32 service_set_cap;
  292. struct vivid_vbi_gen_data vbi_gen;
  293. u8 *edid;
  294. unsigned edid_blocks;
  295. unsigned edid_max_blocks;
  296. unsigned webcam_size_idx;
  297. unsigned webcam_ival_idx;
  298. unsigned tv_freq;
  299. unsigned tv_audmode;
  300. unsigned tv_field_cap;
  301. unsigned tv_audio_input;
  302. /* Capture Overlay */
  303. struct v4l2_framebuffer fb_cap;
  304. struct v4l2_fh *overlay_cap_owner;
  305. void *fb_vbase_cap;
  306. int overlay_cap_top, overlay_cap_left;
  307. enum v4l2_field overlay_cap_field;
  308. void *bitmap_cap;
  309. struct v4l2_clip clips_cap[MAX_CLIPS];
  310. struct v4l2_clip try_clips_cap[MAX_CLIPS];
  311. unsigned clipcount_cap;
  312. /* Output */
  313. unsigned output;
  314. v4l2_std_id std_out;
  315. struct v4l2_dv_timings dv_timings_out;
  316. u32 colorspace_out;
  317. u32 ycbcr_enc_out;
  318. u32 quantization_out;
  319. u32 xfer_func_out;
  320. u32 service_set_out;
  321. unsigned bytesperline_out[TPG_MAX_PLANES];
  322. unsigned tv_field_out;
  323. unsigned tv_audio_output;
  324. bool vbi_out_have_wss;
  325. u8 vbi_out_wss[2];
  326. bool vbi_out_have_cc[2];
  327. u8 vbi_out_cc[2][2];
  328. bool dvi_d_out;
  329. u8 *scaled_line;
  330. u8 *blended_line;
  331. unsigned cur_scaled_line;
  332. /* Output Overlay */
  333. void *fb_vbase_out;
  334. bool overlay_out_enabled;
  335. int overlay_out_top, overlay_out_left;
  336. void *bitmap_out;
  337. struct v4l2_clip clips_out[MAX_CLIPS];
  338. struct v4l2_clip try_clips_out[MAX_CLIPS];
  339. unsigned clipcount_out;
  340. unsigned fbuf_out_flags;
  341. u32 chromakey_out;
  342. u8 global_alpha_out;
  343. /* video capture */
  344. struct tpg_data tpg;
  345. unsigned ms_vid_cap;
  346. bool must_blank[VIDEO_MAX_FRAME];
  347. const struct vivid_fmt *fmt_cap;
  348. struct v4l2_fract timeperframe_vid_cap;
  349. enum v4l2_field field_cap;
  350. struct v4l2_rect src_rect;
  351. struct v4l2_rect fmt_cap_rect;
  352. struct v4l2_rect crop_cap;
  353. struct v4l2_rect compose_cap;
  354. struct v4l2_rect crop_bounds_cap;
  355. struct vb2_queue vb_vid_cap_q;
  356. struct list_head vid_cap_active;
  357. struct vb2_queue vb_vbi_cap_q;
  358. struct list_head vbi_cap_active;
  359. /* thread for generating video capture stream */
  360. struct task_struct *kthread_vid_cap;
  361. unsigned long jiffies_vid_cap;
  362. u32 cap_seq_offset;
  363. u32 cap_seq_count;
  364. bool cap_seq_resync;
  365. u32 vid_cap_seq_start;
  366. u32 vid_cap_seq_count;
  367. bool vid_cap_streaming;
  368. u32 vbi_cap_seq_start;
  369. u32 vbi_cap_seq_count;
  370. bool vbi_cap_streaming;
  371. bool stream_sliced_vbi_cap;
  372. /* video output */
  373. const struct vivid_fmt *fmt_out;
  374. struct v4l2_fract timeperframe_vid_out;
  375. enum v4l2_field field_out;
  376. struct v4l2_rect sink_rect;
  377. struct v4l2_rect fmt_out_rect;
  378. struct v4l2_rect crop_out;
  379. struct v4l2_rect compose_out;
  380. struct v4l2_rect compose_bounds_out;
  381. struct vb2_queue vb_vid_out_q;
  382. struct list_head vid_out_active;
  383. struct vb2_queue vb_vbi_out_q;
  384. struct list_head vbi_out_active;
  385. /* video loop precalculated rectangles */
  386. /*
  387. * Intersection between what the output side composes and the capture side
  388. * crops. I.e., what actually needs to be copied from the output buffer to
  389. * the capture buffer.
  390. */
  391. struct v4l2_rect loop_vid_copy;
  392. /* The part of the output buffer that (after scaling) corresponds to loop_vid_copy. */
  393. struct v4l2_rect loop_vid_out;
  394. /* The part of the capture buffer that (after scaling) corresponds to loop_vid_copy. */
  395. struct v4l2_rect loop_vid_cap;
  396. /*
  397. * The intersection of the framebuffer, the overlay output window and
  398. * loop_vid_copy. I.e., the part of the framebuffer that actually should be
  399. * blended with the compose_out rectangle. This uses the framebuffer origin.
  400. */
  401. struct v4l2_rect loop_fb_copy;
  402. /* The same as loop_fb_copy but with compose_out origin. */
  403. struct v4l2_rect loop_vid_overlay;
  404. /*
  405. * The part of the capture buffer that (after scaling) corresponds
  406. * to loop_vid_overlay.
  407. */
  408. struct v4l2_rect loop_vid_overlay_cap;
  409. /* thread for generating video output stream */
  410. struct task_struct *kthread_vid_out;
  411. unsigned long jiffies_vid_out;
  412. u32 out_seq_offset;
  413. u32 out_seq_count;
  414. bool out_seq_resync;
  415. u32 vid_out_seq_start;
  416. u32 vid_out_seq_count;
  417. bool vid_out_streaming;
  418. u32 vbi_out_seq_start;
  419. u32 vbi_out_seq_count;
  420. bool vbi_out_streaming;
  421. bool stream_sliced_vbi_out;
  422. /* SDR capture */
  423. struct vb2_queue vb_sdr_cap_q;
  424. struct list_head sdr_cap_active;
  425. u32 sdr_pixelformat; /* v4l2 format id */
  426. unsigned sdr_buffersize;
  427. unsigned sdr_adc_freq;
  428. unsigned sdr_fm_freq;
  429. unsigned sdr_fm_deviation;
  430. int sdr_fixp_src_phase;
  431. int sdr_fixp_mod_phase;
  432. bool tstamp_src_is_soe;
  433. bool has_crop_cap;
  434. bool has_compose_cap;
  435. bool has_scaler_cap;
  436. bool has_crop_out;
  437. bool has_compose_out;
  438. bool has_scaler_out;
  439. /* thread for generating SDR stream */
  440. struct task_struct *kthread_sdr_cap;
  441. unsigned long jiffies_sdr_cap;
  442. u32 sdr_cap_seq_offset;
  443. u32 sdr_cap_seq_count;
  444. bool sdr_cap_seq_resync;
  445. /* RDS generator */
  446. struct vivid_rds_gen rds_gen;
  447. /* Radio receiver */
  448. unsigned radio_rx_freq;
  449. unsigned radio_rx_audmode;
  450. int radio_rx_sig_qual;
  451. unsigned radio_rx_hw_seek_mode;
  452. bool radio_rx_hw_seek_prog_lim;
  453. bool radio_rx_rds_controls;
  454. bool radio_rx_rds_enabled;
  455. unsigned radio_rx_rds_use_alternates;
  456. unsigned radio_rx_rds_last_block;
  457. struct v4l2_fh *radio_rx_rds_owner;
  458. /* Radio transmitter */
  459. unsigned radio_tx_freq;
  460. unsigned radio_tx_subchans;
  461. bool radio_tx_rds_controls;
  462. unsigned radio_tx_rds_last_block;
  463. struct v4l2_fh *radio_tx_rds_owner;
  464. /* Shared between radio receiver and transmitter */
  465. bool radio_rds_loop;
  466. struct timespec radio_rds_init_ts;
  467. /* CEC */
  468. struct cec_adapter *cec_rx_adap;
  469. struct cec_adapter *cec_tx_adap[MAX_OUTPUTS];
  470. struct workqueue_struct *cec_workqueue;
  471. spinlock_t cec_slock;
  472. struct list_head cec_work_list;
  473. unsigned int cec_xfer_time_jiffies;
  474. unsigned long cec_xfer_start_jiffies;
  475. u8 cec_output2bus_map[MAX_OUTPUTS];
  476. /* CEC OSD String */
  477. char osd[14];
  478. unsigned long osd_jiffies;
  479. };
  480. static inline bool vivid_is_webcam(const struct vivid_dev *dev)
  481. {
  482. return dev->input_type[dev->input] == WEBCAM;
  483. }
  484. static inline bool vivid_is_tv_cap(const struct vivid_dev *dev)
  485. {
  486. return dev->input_type[dev->input] == TV;
  487. }
  488. static inline bool vivid_is_svid_cap(const struct vivid_dev *dev)
  489. {
  490. return dev->input_type[dev->input] == SVID;
  491. }
  492. static inline bool vivid_is_hdmi_cap(const struct vivid_dev *dev)
  493. {
  494. return dev->input_type[dev->input] == HDMI;
  495. }
  496. static inline bool vivid_is_sdtv_cap(const struct vivid_dev *dev)
  497. {
  498. return vivid_is_tv_cap(dev) || vivid_is_svid_cap(dev);
  499. }
  500. static inline bool vivid_is_svid_out(const struct vivid_dev *dev)
  501. {
  502. return dev->output_type[dev->output] == SVID;
  503. }
  504. static inline bool vivid_is_hdmi_out(const struct vivid_dev *dev)
  505. {
  506. return dev->output_type[dev->output] == HDMI;
  507. }
  508. #endif