You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

547 lines
19KB

  1. /*
  2. * This file is part of FFmpeg.
  3. *
  4. * FFmpeg is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * FFmpeg is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with FFmpeg; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #include "libavutil/avutil.h"
  19. #include "libavutil/colorspace.h"
  20. #include "libavutil/pixdesc.h"
  21. #include "drawutils.h"
  22. enum { RED = 0, GREEN, BLUE, ALPHA };
  23. int ff_fill_rgba_map(uint8_t *rgba_map, enum PixelFormat pix_fmt)
  24. {
  25. switch (pix_fmt) {
  26. case PIX_FMT_0RGB:
  27. case PIX_FMT_ARGB: rgba_map[ALPHA] = 0; rgba_map[RED ] = 1; rgba_map[GREEN] = 2; rgba_map[BLUE ] = 3; break;
  28. case PIX_FMT_0BGR:
  29. case PIX_FMT_ABGR: rgba_map[ALPHA] = 0; rgba_map[BLUE ] = 1; rgba_map[GREEN] = 2; rgba_map[RED ] = 3; break;
  30. case PIX_FMT_RGB0:
  31. case PIX_FMT_RGBA:
  32. case PIX_FMT_RGB24: rgba_map[RED ] = 0; rgba_map[GREEN] = 1; rgba_map[BLUE ] = 2; rgba_map[ALPHA] = 3; break;
  33. case PIX_FMT_BGRA:
  34. case PIX_FMT_BGR0:
  35. case PIX_FMT_BGR24: rgba_map[BLUE ] = 0; rgba_map[GREEN] = 1; rgba_map[RED ] = 2; rgba_map[ALPHA] = 3; break;
  36. default: /* unsupported */
  37. return AVERROR(EINVAL);
  38. }
  39. return 0;
  40. }
  41. int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, uint8_t dst_color[4],
  42. enum PixelFormat pix_fmt, uint8_t rgba_color[4],
  43. int *is_packed_rgba, uint8_t rgba_map_ptr[4])
  44. {
  45. uint8_t rgba_map[4] = {0};
  46. int i;
  47. const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[pix_fmt];
  48. int hsub = pix_desc->log2_chroma_w;
  49. *is_packed_rgba = ff_fill_rgba_map(rgba_map, pix_fmt) >= 0;
  50. if (*is_packed_rgba) {
  51. pixel_step[0] = (av_get_bits_per_pixel(pix_desc))>>3;
  52. for (i = 0; i < 4; i++)
  53. dst_color[rgba_map[i]] = rgba_color[i];
  54. line[0] = av_malloc(w * pixel_step[0]);
  55. for (i = 0; i < w; i++)
  56. memcpy(line[0] + i * pixel_step[0], dst_color, pixel_step[0]);
  57. if (rgba_map_ptr)
  58. memcpy(rgba_map_ptr, rgba_map, sizeof(rgba_map[0]) * 4);
  59. } else {
  60. int plane;
  61. dst_color[0] = RGB_TO_Y_CCIR(rgba_color[0], rgba_color[1], rgba_color[2]);
  62. dst_color[1] = RGB_TO_U_CCIR(rgba_color[0], rgba_color[1], rgba_color[2], 0);
  63. dst_color[2] = RGB_TO_V_CCIR(rgba_color[0], rgba_color[1], rgba_color[2], 0);
  64. dst_color[3] = rgba_color[3];
  65. for (plane = 0; plane < 4; plane++) {
  66. int line_size;
  67. int hsub1 = (plane == 1 || plane == 2) ? hsub : 0;
  68. pixel_step[plane] = 1;
  69. line_size = (w >> hsub1) * pixel_step[plane];
  70. line[plane] = av_malloc(line_size);
  71. memset(line[plane], dst_color[plane], line_size);
  72. }
  73. }
  74. return 0;
  75. }
  76. void ff_draw_rectangle(uint8_t *dst[4], int dst_linesize[4],
  77. uint8_t *src[4], int pixelstep[4],
  78. int hsub, int vsub, int x, int y, int w, int h)
  79. {
  80. int i, plane;
  81. uint8_t *p;
  82. for (plane = 0; plane < 4 && dst[plane]; plane++) {
  83. int hsub1 = plane == 1 || plane == 2 ? hsub : 0;
  84. int vsub1 = plane == 1 || plane == 2 ? vsub : 0;
  85. p = dst[plane] + (y >> vsub1) * dst_linesize[plane];
  86. for (i = 0; i < (h >> vsub1); i++) {
  87. memcpy(p + (x >> hsub1) * pixelstep[plane],
  88. src[plane], (w >> hsub1) * pixelstep[plane]);
  89. p += dst_linesize[plane];
  90. }
  91. }
  92. }
  93. void ff_copy_rectangle(uint8_t *dst[4], int dst_linesize[4],
  94. uint8_t *src[4], int src_linesize[4], int pixelstep[4],
  95. int hsub, int vsub, int x, int y, int y2, int w, int h)
  96. {
  97. int i, plane;
  98. uint8_t *p;
  99. for (plane = 0; plane < 4 && dst[plane]; plane++) {
  100. int hsub1 = plane == 1 || plane == 2 ? hsub : 0;
  101. int vsub1 = plane == 1 || plane == 2 ? vsub : 0;
  102. p = dst[plane] + (y >> vsub1) * dst_linesize[plane];
  103. for (i = 0; i < (h >> vsub1); i++) {
  104. memcpy(p + (x >> hsub1) * pixelstep[plane],
  105. src[plane] + src_linesize[plane]*(i+(y2>>vsub1)), (w >> hsub1) * pixelstep[plane]);
  106. p += dst_linesize[plane];
  107. }
  108. }
  109. }
  110. int ff_draw_init(FFDrawContext *draw, enum PixelFormat format, unsigned flags)
  111. {
  112. const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[format];
  113. const AVComponentDescriptor *c;
  114. unsigned i, nb_planes = 0;
  115. int pixelstep[MAX_PLANES] = { 0 };
  116. if (!desc->name)
  117. return AVERROR(EINVAL);
  118. if (desc->flags & ~(PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_PSEUDOPAL))
  119. return AVERROR(ENOSYS);
  120. for (i = 0; i < desc->nb_components; i++) {
  121. c = &desc->comp[i];
  122. /* for now, only 8-bits formats */
  123. if (c->depth_minus1 != 8 - 1)
  124. return AVERROR(ENOSYS);
  125. if (c->plane >= MAX_PLANES)
  126. return AVERROR(ENOSYS);
  127. /* strange interleaving */
  128. if (pixelstep[c->plane] != 0 &&
  129. pixelstep[c->plane] != c->step_minus1 + 1)
  130. return AVERROR(ENOSYS);
  131. pixelstep[c->plane] = c->step_minus1 + 1;
  132. if (pixelstep[c->plane] >= 8)
  133. return AVERROR(ENOSYS);
  134. nb_planes = FFMAX(nb_planes, c->plane + 1);
  135. }
  136. if ((desc->log2_chroma_w || desc->log2_chroma_h) && nb_planes < 3)
  137. return AVERROR(ENOSYS); /* exclude NV12 and NV21 */
  138. memset(draw, 0, sizeof(*draw));
  139. draw->desc = desc;
  140. draw->format = format;
  141. draw->nb_planes = nb_planes;
  142. memcpy(draw->pixelstep, pixelstep, sizeof(draw->pixelstep));
  143. if (nb_planes >= 3 && !(desc->flags & PIX_FMT_RGB)) {
  144. draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w;
  145. draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h;
  146. }
  147. for (i = 0; i < ((desc->nb_components - 1) | 1); i++)
  148. draw->comp_mask[desc->comp[i].plane] |=
  149. 1 << (desc->comp[i].offset_plus1 - 1);
  150. return 0;
  151. }
  152. void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, uint8_t rgba[4])
  153. {
  154. unsigned i;
  155. uint8_t rgba_map[4];
  156. if (rgba != color->rgba)
  157. memcpy(color->rgba, rgba, sizeof(color->rgba));
  158. if ((draw->desc->flags & PIX_FMT_RGB) && draw->nb_planes == 1 &&
  159. ff_fill_rgba_map(rgba_map, draw->format) >= 0) {
  160. for (i = 0; i < 4; i++)
  161. color->comp[0].u8[rgba_map[i]] = rgba[i];
  162. } else if (draw->nb_planes == 3 || draw->nb_planes == 4) {
  163. /* assume YUV */
  164. color->comp[0].u8[0] = RGB_TO_Y_CCIR(rgba[0], rgba[1], rgba[2]);
  165. color->comp[1].u8[0] = RGB_TO_U_CCIR(rgba[0], rgba[1], rgba[2], 0);
  166. color->comp[2].u8[0] = RGB_TO_V_CCIR(rgba[0], rgba[1], rgba[2], 0);
  167. color->comp[3].u8[0] = rgba[3];
  168. } else if (draw->format == PIX_FMT_GRAY8 || draw->format == PIX_FMT_GRAY8A) {
  169. color->comp[0].u8[0] = RGB_TO_Y_CCIR(rgba[0], rgba[1], rgba[2]);
  170. color->comp[1].u8[0] = rgba[3];
  171. } else {
  172. av_log(NULL, AV_LOG_WARNING,
  173. "Color conversion not implemented for %s\n", draw->desc->name);
  174. memset(color, 128, sizeof(*color));
  175. }
  176. }
  177. static uint8_t *pointer_at(FFDrawContext *draw, uint8_t *data[], int linesize[],
  178. int plane, int x, int y)
  179. {
  180. return data[plane] +
  181. (y >> draw->vsub[plane]) * linesize[plane] +
  182. (x >> draw->hsub[plane]) * draw->pixelstep[plane];
  183. }
  184. void ff_copy_rectangle2(FFDrawContext *draw,
  185. uint8_t *dst[], int dst_linesize[],
  186. uint8_t *src[], int src_linesize[],
  187. int dst_x, int dst_y, int src_x, int src_y,
  188. int w, int h)
  189. {
  190. int plane, y, wp, hp;
  191. uint8_t *p, *q;
  192. for (plane = 0; plane < draw->nb_planes; plane++) {
  193. p = pointer_at(draw, src, src_linesize, plane, src_x, src_y);
  194. q = pointer_at(draw, dst, dst_linesize, plane, dst_x, dst_y);
  195. wp = (w >> draw->hsub[plane]) * draw->pixelstep[plane];
  196. hp = (h >> draw->vsub[plane]);
  197. for (y = 0; y < hp; y++) {
  198. memcpy(q, p, wp);
  199. p += src_linesize[plane];
  200. q += dst_linesize[plane];
  201. }
  202. }
  203. }
  204. void ff_fill_rectangle(FFDrawContext *draw, FFDrawColor *color,
  205. uint8_t *dst[], int dst_linesize[],
  206. int dst_x, int dst_y, int w, int h)
  207. {
  208. int plane, x, y, wp, hp;
  209. uint8_t *p0, *p;
  210. for (plane = 0; plane < draw->nb_planes; plane++) {
  211. p0 = pointer_at(draw, dst, dst_linesize, plane, dst_x, dst_y);
  212. wp = (w >> draw->hsub[plane]);
  213. hp = (h >> draw->vsub[plane]);
  214. if (!hp)
  215. return;
  216. p = p0;
  217. /* copy first line from color */
  218. for (x = 0; x < wp; x++) {
  219. memcpy(p, color->comp[plane].u8, draw->pixelstep[plane]);
  220. p += draw->pixelstep[plane];
  221. }
  222. wp *= draw->pixelstep[plane];
  223. /* copy next lines from first line */
  224. p = p0 + dst_linesize[plane];
  225. for (y = 1; y < hp; y++) {
  226. memcpy(p, p0, wp);
  227. p += dst_linesize[plane];
  228. }
  229. }
  230. }
  231. /**
  232. * Clip interval [x; x+w[ within [0; wmax[.
  233. * The resulting w may be negative if the final interval is empty.
  234. * dx, if not null, return the difference between in and out value of x.
  235. */
  236. static void clip_interval(int wmax, int *x, int *w, int *dx)
  237. {
  238. if (dx)
  239. *dx = 0;
  240. if (*x < 0) {
  241. if (dx)
  242. *dx = -*x;
  243. *w += *x;
  244. *x = 0;
  245. }
  246. if (*x + *w > wmax)
  247. *w = wmax - *x;
  248. }
  249. /**
  250. * Decompose w pixels starting at x
  251. * into start + (w starting at x) + end
  252. * with x and w aligned on multiples of 1<<sub.
  253. */
  254. static void subsampling_bounds(int sub, int *x, int *w, int *start, int *end)
  255. {
  256. int mask = (1 << sub) - 1;
  257. *start = (-*x) & mask;
  258. *x += *start;
  259. *start = FFMIN(*start, *w);
  260. *w -= *start;
  261. *end = *w & mask;
  262. *w >>= sub;
  263. }
  264. static int component_used(FFDrawContext *draw, int plane, int comp)
  265. {
  266. return (draw->comp_mask[plane] >> comp) & 1;
  267. }
  268. /* If alpha is in the [ 0 ; 0x1010101 ] range,
  269. then alpha * value is in the [ 0 ; 0xFFFFFFFF ] range,
  270. and >> 24 gives a correct rounding. */
  271. static void blend_line(uint8_t *dst, unsigned src, unsigned alpha,
  272. int dx, int w, unsigned hsub, int left, int right)
  273. {
  274. unsigned asrc = alpha * src;
  275. unsigned tau = 0x1010101 - alpha;
  276. int x;
  277. src *= alpha;
  278. if (left) {
  279. unsigned suba = (left * alpha) >> hsub;
  280. *dst = (*dst * (0x1010101 - suba) + src * suba) >> 24;
  281. dst += dx;
  282. }
  283. for (x = 0; x < w; x++) {
  284. *dst = (*dst * tau + asrc) >> 24;
  285. dst += dx;
  286. }
  287. if (right) {
  288. unsigned suba = (right * alpha) >> hsub;
  289. *dst = (*dst * (0x1010101 - suba) + src * suba) >> 24;
  290. }
  291. }
  292. void ff_blend_rectangle(FFDrawContext *draw, FFDrawColor *color,
  293. uint8_t *dst[], int dst_linesize[],
  294. int dst_w, int dst_h,
  295. int x0, int y0, int w, int h)
  296. {
  297. unsigned alpha, nb_planes, nb_comp, plane, comp;
  298. int w_sub, h_sub, x_sub, y_sub, left, right, top, bottom, y;
  299. uint8_t *p0, *p;
  300. /* TODO optimize if alpha = 0xFF */
  301. clip_interval(dst_w, &x0, &w, NULL);
  302. clip_interval(dst_h, &y0, &h, NULL);
  303. if (w <= 0 || h <= 0 || !color->rgba[3])
  304. return;
  305. /* 0x10203 * alpha + 2 is in the [ 2 ; 0x1010101 - 2 ] range */
  306. alpha = 0x10203 * color->rgba[3] + 0x2;
  307. nb_planes = (draw->nb_planes - 1) | 1; /* eliminate alpha */
  308. for (plane = 0; plane < nb_planes; plane++) {
  309. nb_comp = draw->pixelstep[plane];
  310. p0 = pointer_at(draw, dst, dst_linesize, plane, x0, y0);
  311. w_sub = w;
  312. h_sub = h;
  313. x_sub = x0;
  314. y_sub = y0;
  315. subsampling_bounds(draw->hsub[plane], &x_sub, &w_sub, &left, &right);
  316. subsampling_bounds(draw->vsub[plane], &y_sub, &h_sub, &top, &bottom);
  317. for (comp = 0; comp < nb_comp; comp++) {
  318. if (!component_used(draw, plane, comp))
  319. continue;
  320. p = p0 + comp;
  321. if (top) {
  322. blend_line(p, color->comp[plane].u8[comp], alpha >> 1,
  323. draw->pixelstep[plane], w_sub,
  324. draw->hsub[plane], left, right);
  325. p += dst_linesize[plane];
  326. }
  327. for (y = 0; y < h_sub; y++) {
  328. blend_line(p, color->comp[plane].u8[comp], alpha,
  329. draw->pixelstep[plane], w_sub,
  330. draw->hsub[plane], left, right);
  331. p += dst_linesize[plane];
  332. }
  333. if (bottom)
  334. blend_line(p, color->comp[plane].u8[comp], alpha >> 1,
  335. draw->pixelstep[plane], w_sub,
  336. draw->hsub[plane], left, right);
  337. }
  338. }
  339. }
  340. static void blend_pixel(uint8_t *dst, unsigned src, unsigned alpha,
  341. uint8_t *mask, int mask_linesize, int l2depth,
  342. unsigned w, unsigned h, unsigned shift, unsigned xm0)
  343. {
  344. unsigned xm, x, y, t = 0;
  345. unsigned xmshf = 3 - l2depth;
  346. unsigned xmmod = 7 >> l2depth;
  347. unsigned mbits = (1 << (1 << l2depth)) - 1;
  348. unsigned mmult = 255 / mbits;
  349. for (y = 0; y < h; y++) {
  350. xm = xm0;
  351. for (x = 0; x < w; x++) {
  352. t += ((mask[xm >> xmshf] >> ((~xm & xmmod) << l2depth)) & mbits)
  353. * mmult;
  354. xm++;
  355. }
  356. mask += mask_linesize;
  357. }
  358. alpha = (t >> shift) * alpha;
  359. *dst = ((0x1010101 - alpha) * *dst + alpha * src) >> 24;
  360. }
  361. static void blend_line_hv(uint8_t *dst, int dst_delta,
  362. unsigned src, unsigned alpha,
  363. uint8_t *mask, int mask_linesize, int l2depth, int w,
  364. unsigned hsub, unsigned vsub,
  365. int xm, int left, int right, int hband)
  366. {
  367. int x;
  368. if (left) {
  369. blend_pixel(dst, src, alpha, mask, mask_linesize, l2depth,
  370. left, hband, hsub + vsub, xm);
  371. dst += dst_delta;
  372. xm += left;
  373. }
  374. for (x = 0; x < w; x++) {
  375. blend_pixel(dst, src, alpha, mask, mask_linesize, l2depth,
  376. 1 << hsub, hband, hsub + vsub, xm);
  377. dst += dst_delta;
  378. xm += 1 << hsub;
  379. }
  380. if (right)
  381. blend_pixel(dst, src, alpha, mask, mask_linesize, l2depth,
  382. right, hband, hsub + vsub, xm);
  383. }
  384. void ff_blend_mask(FFDrawContext *draw, FFDrawColor *color,
  385. uint8_t *dst[], int dst_linesize[], int dst_w, int dst_h,
  386. uint8_t *mask, int mask_linesize, int mask_w, int mask_h,
  387. int l2depth, unsigned endianness, int x0, int y0)
  388. {
  389. unsigned alpha, nb_planes, nb_comp, plane, comp;
  390. int xm0, ym0, w_sub, h_sub, x_sub, y_sub, left, right, top, bottom, y;
  391. uint8_t *p0, *p, *m;
  392. clip_interval(dst_w, &x0, &mask_w, &xm0);
  393. clip_interval(dst_h, &y0, &mask_h, &ym0);
  394. mask += ym0 * mask_linesize;
  395. if (mask_w <= 0 || mask_h <= 0 || !color->rgba[3])
  396. return;
  397. /* alpha is in the [ 0 ; 0x10203 ] range,
  398. alpha * mask is in the [ 0 ; 0x1010101 - 4 ] range */
  399. alpha = (0x10307 * color->rgba[3] + 0x3) >> 8;
  400. nb_planes = (draw->nb_planes - 1) | 1; /* eliminate alpha */
  401. for (plane = 0; plane < nb_planes; plane++) {
  402. nb_comp = draw->pixelstep[plane];
  403. p0 = pointer_at(draw, dst, dst_linesize, plane, x0, y0);
  404. w_sub = mask_w;
  405. h_sub = mask_h;
  406. x_sub = x0;
  407. y_sub = y0;
  408. subsampling_bounds(draw->hsub[plane], &x_sub, &w_sub, &left, &right);
  409. subsampling_bounds(draw->vsub[plane], &y_sub, &h_sub, &top, &bottom);
  410. for (comp = 0; comp < nb_comp; comp++) {
  411. if (!component_used(draw, plane, comp))
  412. continue;
  413. p = p0 + comp;
  414. m = mask;
  415. if (top) {
  416. blend_line_hv(p, draw->pixelstep[plane],
  417. color->comp[plane].u8[comp], alpha,
  418. m, mask_linesize, l2depth, w_sub,
  419. draw->hsub[plane], draw->vsub[plane],
  420. xm0, left, right, top);
  421. p += dst_linesize[plane];
  422. m += top * mask_linesize;
  423. }
  424. for (y = 0; y < h_sub; y++) {
  425. blend_line_hv(p, draw->pixelstep[plane],
  426. color->comp[plane].u8[comp], alpha,
  427. m, mask_linesize, l2depth, w_sub,
  428. draw->hsub[plane], draw->vsub[plane],
  429. xm0, left, right, 1 << draw->vsub[plane]);
  430. p += dst_linesize[plane];
  431. m += mask_linesize << draw->vsub[plane];
  432. }
  433. if (bottom)
  434. blend_line_hv(p, draw->pixelstep[plane],
  435. color->comp[plane].u8[comp], alpha,
  436. m, mask_linesize, l2depth, w_sub,
  437. draw->hsub[plane], draw->vsub[plane],
  438. xm0, left, right, bottom);
  439. }
  440. }
  441. }
  442. int ff_draw_round_to_sub(FFDrawContext *draw, int sub_dir, int round_dir,
  443. int value)
  444. {
  445. unsigned shift = sub_dir ? draw->vsub_max : draw->hsub_max;
  446. if (!shift)
  447. return value;
  448. if (round_dir >= 0)
  449. value += round_dir ? (1 << shift) - 1 : 1 << (shift - 1);
  450. return (value >> shift) << shift;
  451. }
  452. AVFilterFormats *ff_draw_supported_pixel_formats(unsigned flags)
  453. {
  454. enum PixelFormat i, pix_fmts[PIX_FMT_NB + 1];
  455. unsigned n = 0;
  456. FFDrawContext draw;
  457. for (i = 0; i < PIX_FMT_NB; i++)
  458. if (ff_draw_init(&draw, i, flags) >= 0)
  459. pix_fmts[n++] = i;
  460. pix_fmts[n++] = PIX_FMT_NONE;
  461. return avfilter_make_format_list(pix_fmts);
  462. }
  463. #ifdef TEST
  464. #undef printf
  465. int main(void)
  466. {
  467. enum PixelFormat f;
  468. const AVPixFmtDescriptor *desc;
  469. FFDrawContext draw;
  470. FFDrawColor color;
  471. int r, i;
  472. for (f = 0; f < PIX_FMT_NB; f++) {
  473. desc = &av_pix_fmt_descriptors[f];
  474. if (!desc->name)
  475. continue;
  476. printf("Testing %s...%*s", desc->name,
  477. (int)(16 - strlen(desc->name)), "");
  478. r = ff_draw_init(&draw, f, 0);
  479. if (r < 0) {
  480. char buf[128];
  481. av_strerror(r, buf, sizeof(buf));
  482. printf("no: %s\n", buf);
  483. continue;
  484. }
  485. ff_draw_color(&draw, &color, (uint8_t[]) { 1, 0, 0, 1 });
  486. for (i = 0; i < sizeof(color); i++)
  487. if (((uint8_t *)&color)[i] != 128)
  488. break;
  489. if (i == sizeof(color)) {
  490. printf("fallback color\n");
  491. continue;
  492. }
  493. printf("ok\n");
  494. }
  495. return 0;
  496. }
  497. #endif