fastssim.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. /*
  2. * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. *
  10. * This code was originally written by: Nathan E. Egge, at the Daala
  11. * project.
  12. */
  13. #include <assert.h>
  14. #include <math.h>
  15. #include <stdlib.h>
  16. #include <string.h>
  17. #include "./vpx_config.h"
  18. #include "./vpx_dsp_rtcd.h"
  19. #include "vpx_dsp/ssim.h"
  20. #include "vpx_ports/system_state.h"
  21. typedef struct fs_level fs_level;
  22. typedef struct fs_ctx fs_ctx;
  23. #define SSIM_C1 (255 * 255 * 0.01 * 0.01)
  24. #define SSIM_C2 (255 * 255 * 0.03 * 0.03)
  25. #if CONFIG_VP9_HIGHBITDEPTH
  26. #define SSIM_C1_10 (1023 * 1023 * 0.01 * 0.01)
  27. #define SSIM_C1_12 (4095 * 4095 * 0.01 * 0.01)
  28. #define SSIM_C2_10 (1023 * 1023 * 0.03 * 0.03)
  29. #define SSIM_C2_12 (4095 * 4095 * 0.03 * 0.03)
  30. #endif
  31. #define FS_MINI(_a, _b) ((_a) < (_b) ? (_a) : (_b))
  32. #define FS_MAXI(_a, _b) ((_a) > (_b) ? (_a) : (_b))
  33. struct fs_level {
  34. uint32_t *im1;
  35. uint32_t *im2;
  36. double *ssim;
  37. int w;
  38. int h;
  39. };
  40. struct fs_ctx {
  41. fs_level *level;
  42. int nlevels;
  43. unsigned *col_buf;
  44. };
  45. static void fs_ctx_init(fs_ctx *_ctx, int _w, int _h, int _nlevels) {
  46. unsigned char *data;
  47. size_t data_size;
  48. int lw;
  49. int lh;
  50. int l;
  51. lw = (_w + 1) >> 1;
  52. lh = (_h + 1) >> 1;
  53. data_size =
  54. _nlevels * sizeof(fs_level) + 2 * (lw + 8) * 8 * sizeof(*_ctx->col_buf);
  55. for (l = 0; l < _nlevels; l++) {
  56. size_t im_size;
  57. size_t level_size;
  58. im_size = lw * (size_t)lh;
  59. level_size = 2 * im_size * sizeof(*_ctx->level[l].im1);
  60. level_size += sizeof(*_ctx->level[l].ssim) - 1;
  61. level_size /= sizeof(*_ctx->level[l].ssim);
  62. level_size += im_size;
  63. level_size *= sizeof(*_ctx->level[l].ssim);
  64. data_size += level_size;
  65. lw = (lw + 1) >> 1;
  66. lh = (lh + 1) >> 1;
  67. }
  68. data = (unsigned char *)malloc(data_size);
  69. _ctx->level = (fs_level *)data;
  70. _ctx->nlevels = _nlevels;
  71. data += _nlevels * sizeof(*_ctx->level);
  72. lw = (_w + 1) >> 1;
  73. lh = (_h + 1) >> 1;
  74. for (l = 0; l < _nlevels; l++) {
  75. size_t im_size;
  76. size_t level_size;
  77. _ctx->level[l].w = lw;
  78. _ctx->level[l].h = lh;
  79. im_size = lw * (size_t)lh;
  80. level_size = 2 * im_size * sizeof(*_ctx->level[l].im1);
  81. level_size += sizeof(*_ctx->level[l].ssim) - 1;
  82. level_size /= sizeof(*_ctx->level[l].ssim);
  83. level_size *= sizeof(*_ctx->level[l].ssim);
  84. _ctx->level[l].im1 = (uint32_t *)data;
  85. _ctx->level[l].im2 = _ctx->level[l].im1 + im_size;
  86. data += level_size;
  87. _ctx->level[l].ssim = (double *)data;
  88. data += im_size * sizeof(*_ctx->level[l].ssim);
  89. lw = (lw + 1) >> 1;
  90. lh = (lh + 1) >> 1;
  91. }
  92. _ctx->col_buf = (unsigned *)data;
  93. }
  94. static void fs_ctx_clear(fs_ctx *_ctx) { free(_ctx->level); }
  95. static void fs_downsample_level(fs_ctx *_ctx, int _l) {
  96. const uint32_t *src1;
  97. const uint32_t *src2;
  98. uint32_t *dst1;
  99. uint32_t *dst2;
  100. int w2;
  101. int h2;
  102. int w;
  103. int h;
  104. int i;
  105. int j;
  106. w = _ctx->level[_l].w;
  107. h = _ctx->level[_l].h;
  108. dst1 = _ctx->level[_l].im1;
  109. dst2 = _ctx->level[_l].im2;
  110. w2 = _ctx->level[_l - 1].w;
  111. h2 = _ctx->level[_l - 1].h;
  112. src1 = _ctx->level[_l - 1].im1;
  113. src2 = _ctx->level[_l - 1].im2;
  114. for (j = 0; j < h; j++) {
  115. int j0offs;
  116. int j1offs;
  117. j0offs = 2 * j * w2;
  118. j1offs = FS_MINI(2 * j + 1, h2) * w2;
  119. for (i = 0; i < w; i++) {
  120. int i0;
  121. int i1;
  122. i0 = 2 * i;
  123. i1 = FS_MINI(i0 + 1, w2);
  124. dst1[j * w + i] =
  125. (uint32_t)((int64_t)src1[j0offs + i0] + src1[j0offs + i1] +
  126. src1[j1offs + i0] + src1[j1offs + i1]);
  127. dst2[j * w + i] =
  128. (uint32_t)((int64_t)src2[j0offs + i0] + src2[j0offs + i1] +
  129. src2[j1offs + i0] + src2[j1offs + i1]);
  130. }
  131. }
  132. }
  133. static void fs_downsample_level0(fs_ctx *_ctx, const uint8_t *_src1,
  134. int _s1ystride, const uint8_t *_src2,
  135. int _s2ystride, int _w, int _h, uint32_t bd,
  136. uint32_t shift) {
  137. uint32_t *dst1;
  138. uint32_t *dst2;
  139. int w;
  140. int h;
  141. int i;
  142. int j;
  143. w = _ctx->level[0].w;
  144. h = _ctx->level[0].h;
  145. dst1 = _ctx->level[0].im1;
  146. dst2 = _ctx->level[0].im2;
  147. for (j = 0; j < h; j++) {
  148. int j0;
  149. int j1;
  150. j0 = 2 * j;
  151. j1 = FS_MINI(j0 + 1, _h);
  152. for (i = 0; i < w; i++) {
  153. int i0;
  154. int i1;
  155. i0 = 2 * i;
  156. i1 = FS_MINI(i0 + 1, _w);
  157. if (bd == 8 && shift == 0) {
  158. dst1[j * w + i] =
  159. _src1[j0 * _s1ystride + i0] + _src1[j0 * _s1ystride + i1] +
  160. _src1[j1 * _s1ystride + i0] + _src1[j1 * _s1ystride + i1];
  161. dst2[j * w + i] =
  162. _src2[j0 * _s2ystride + i0] + _src2[j0 * _s2ystride + i1] +
  163. _src2[j1 * _s2ystride + i0] + _src2[j1 * _s2ystride + i1];
  164. } else {
  165. uint16_t *src1s = CONVERT_TO_SHORTPTR(_src1);
  166. uint16_t *src2s = CONVERT_TO_SHORTPTR(_src2);
  167. dst1[j * w + i] = (src1s[j0 * _s1ystride + i0] >> shift) +
  168. (src1s[j0 * _s1ystride + i1] >> shift) +
  169. (src1s[j1 * _s1ystride + i0] >> shift) +
  170. (src1s[j1 * _s1ystride + i1] >> shift);
  171. dst2[j * w + i] = (src2s[j0 * _s2ystride + i0] >> shift) +
  172. (src2s[j0 * _s2ystride + i1] >> shift) +
  173. (src2s[j1 * _s2ystride + i0] >> shift) +
  174. (src2s[j1 * _s2ystride + i1] >> shift);
  175. }
  176. }
  177. }
  178. }
  179. static void fs_apply_luminance(fs_ctx *_ctx, int _l, int bit_depth) {
  180. unsigned *col_sums_x;
  181. unsigned *col_sums_y;
  182. uint32_t *im1;
  183. uint32_t *im2;
  184. double *ssim;
  185. double c1;
  186. int w;
  187. int h;
  188. int j0offs;
  189. int j1offs;
  190. int i;
  191. int j;
  192. double ssim_c1 = SSIM_C1;
  193. #if CONFIG_VP9_HIGHBITDEPTH
  194. if (bit_depth == 10) ssim_c1 = SSIM_C1_10;
  195. if (bit_depth == 12) ssim_c1 = SSIM_C1_12;
  196. #else
  197. assert(bit_depth == 8);
  198. (void)bit_depth;
  199. #endif
  200. w = _ctx->level[_l].w;
  201. h = _ctx->level[_l].h;
  202. col_sums_x = _ctx->col_buf;
  203. col_sums_y = col_sums_x + w;
  204. im1 = _ctx->level[_l].im1;
  205. im2 = _ctx->level[_l].im2;
  206. for (i = 0; i < w; i++) col_sums_x[i] = 5 * im1[i];
  207. for (i = 0; i < w; i++) col_sums_y[i] = 5 * im2[i];
  208. for (j = 1; j < 4; j++) {
  209. j1offs = FS_MINI(j, h - 1) * w;
  210. for (i = 0; i < w; i++) col_sums_x[i] += im1[j1offs + i];
  211. for (i = 0; i < w; i++) col_sums_y[i] += im2[j1offs + i];
  212. }
  213. ssim = _ctx->level[_l].ssim;
  214. c1 = (double)(ssim_c1 * 4096 * (1 << 4 * _l));
  215. for (j = 0; j < h; j++) {
  216. int64_t mux;
  217. int64_t muy;
  218. int i0;
  219. int i1;
  220. mux = (int64_t)5 * col_sums_x[0];
  221. muy = (int64_t)5 * col_sums_y[0];
  222. for (i = 1; i < 4; i++) {
  223. i1 = FS_MINI(i, w - 1);
  224. mux += col_sums_x[i1];
  225. muy += col_sums_y[i1];
  226. }
  227. for (i = 0; i < w; i++) {
  228. ssim[j * w + i] *= (2 * mux * (double)muy + c1) /
  229. (mux * (double)mux + muy * (double)muy + c1);
  230. if (i + 1 < w) {
  231. i0 = FS_MAXI(0, i - 4);
  232. i1 = FS_MINI(i + 4, w - 1);
  233. mux += (int)col_sums_x[i1] - (int)col_sums_x[i0];
  234. muy += (int)col_sums_x[i1] - (int)col_sums_x[i0];
  235. }
  236. }
  237. if (j + 1 < h) {
  238. j0offs = FS_MAXI(0, j - 4) * w;
  239. for (i = 0; i < w; i++) col_sums_x[i] -= im1[j0offs + i];
  240. for (i = 0; i < w; i++) col_sums_y[i] -= im2[j0offs + i];
  241. j1offs = FS_MINI(j + 4, h - 1) * w;
  242. for (i = 0; i < w; i++)
  243. col_sums_x[i] = (uint32_t)((int64_t)col_sums_x[i] + im1[j1offs + i]);
  244. for (i = 0; i < w; i++)
  245. col_sums_y[i] = (uint32_t)((int64_t)col_sums_y[i] + im2[j1offs + i]);
  246. }
  247. }
  248. }
  249. #define FS_COL_SET(_col, _joffs, _ioffs) \
  250. do { \
  251. unsigned gx; \
  252. unsigned gy; \
  253. gx = gx_buf[((j + (_joffs)) & 7) * stride + i + (_ioffs)]; \
  254. gy = gy_buf[((j + (_joffs)) & 7) * stride + i + (_ioffs)]; \
  255. col_sums_gx2[(_col)] = gx * (double)gx; \
  256. col_sums_gy2[(_col)] = gy * (double)gy; \
  257. col_sums_gxgy[(_col)] = gx * (double)gy; \
  258. } while (0)
  259. #define FS_COL_ADD(_col, _joffs, _ioffs) \
  260. do { \
  261. unsigned gx; \
  262. unsigned gy; \
  263. gx = gx_buf[((j + (_joffs)) & 7) * stride + i + (_ioffs)]; \
  264. gy = gy_buf[((j + (_joffs)) & 7) * stride + i + (_ioffs)]; \
  265. col_sums_gx2[(_col)] += gx * (double)gx; \
  266. col_sums_gy2[(_col)] += gy * (double)gy; \
  267. col_sums_gxgy[(_col)] += gx * (double)gy; \
  268. } while (0)
  269. #define FS_COL_SUB(_col, _joffs, _ioffs) \
  270. do { \
  271. unsigned gx; \
  272. unsigned gy; \
  273. gx = gx_buf[((j + (_joffs)) & 7) * stride + i + (_ioffs)]; \
  274. gy = gy_buf[((j + (_joffs)) & 7) * stride + i + (_ioffs)]; \
  275. col_sums_gx2[(_col)] -= gx * (double)gx; \
  276. col_sums_gy2[(_col)] -= gy * (double)gy; \
  277. col_sums_gxgy[(_col)] -= gx * (double)gy; \
  278. } while (0)
  279. #define FS_COL_COPY(_col1, _col2) \
  280. do { \
  281. col_sums_gx2[(_col1)] = col_sums_gx2[(_col2)]; \
  282. col_sums_gy2[(_col1)] = col_sums_gy2[(_col2)]; \
  283. col_sums_gxgy[(_col1)] = col_sums_gxgy[(_col2)]; \
  284. } while (0)
  285. #define FS_COL_HALVE(_col1, _col2) \
  286. do { \
  287. col_sums_gx2[(_col1)] = col_sums_gx2[(_col2)] * 0.5; \
  288. col_sums_gy2[(_col1)] = col_sums_gy2[(_col2)] * 0.5; \
  289. col_sums_gxgy[(_col1)] = col_sums_gxgy[(_col2)] * 0.5; \
  290. } while (0)
  291. #define FS_COL_DOUBLE(_col1, _col2) \
  292. do { \
  293. col_sums_gx2[(_col1)] = col_sums_gx2[(_col2)] * 2; \
  294. col_sums_gy2[(_col1)] = col_sums_gy2[(_col2)] * 2; \
  295. col_sums_gxgy[(_col1)] = col_sums_gxgy[(_col2)] * 2; \
  296. } while (0)
  297. static void fs_calc_structure(fs_ctx *_ctx, int _l, int bit_depth) {
  298. uint32_t *im1;
  299. uint32_t *im2;
  300. unsigned *gx_buf;
  301. unsigned *gy_buf;
  302. double *ssim;
  303. double col_sums_gx2[8];
  304. double col_sums_gy2[8];
  305. double col_sums_gxgy[8];
  306. double c2;
  307. int stride;
  308. int w;
  309. int h;
  310. int i;
  311. int j;
  312. double ssim_c2 = SSIM_C2;
  313. #if CONFIG_VP9_HIGHBITDEPTH
  314. if (bit_depth == 10) ssim_c2 = SSIM_C2_10;
  315. if (bit_depth == 12) ssim_c2 = SSIM_C2_12;
  316. #else
  317. assert(bit_depth == 8);
  318. (void)bit_depth;
  319. #endif
  320. w = _ctx->level[_l].w;
  321. h = _ctx->level[_l].h;
  322. im1 = _ctx->level[_l].im1;
  323. im2 = _ctx->level[_l].im2;
  324. ssim = _ctx->level[_l].ssim;
  325. gx_buf = _ctx->col_buf;
  326. stride = w + 8;
  327. gy_buf = gx_buf + 8 * stride;
  328. memset(gx_buf, 0, 2 * 8 * stride * sizeof(*gx_buf));
  329. c2 = ssim_c2 * (1 << 4 * _l) * 16 * 104;
  330. for (j = 0; j < h + 4; j++) {
  331. if (j < h - 1) {
  332. for (i = 0; i < w - 1; i++) {
  333. int64_t g1;
  334. int64_t g2;
  335. int64_t gx;
  336. int64_t gy;
  337. g1 = labs((int64_t)im1[(j + 1) * w + i + 1] - (int64_t)im1[j * w + i]);
  338. g2 = labs((int64_t)im1[(j + 1) * w + i] - (int64_t)im1[j * w + i + 1]);
  339. gx = 4 * FS_MAXI(g1, g2) + FS_MINI(g1, g2);
  340. g1 = labs((int64_t)im2[(j + 1) * w + i + 1] - (int64_t)im2[j * w + i]);
  341. g2 = labs((int64_t)im2[(j + 1) * w + i] - (int64_t)im2[j * w + i + 1]);
  342. gy = ((int64_t)4 * FS_MAXI(g1, g2) + FS_MINI(g1, g2));
  343. gx_buf[(j & 7) * stride + i + 4] = (uint32_t)gx;
  344. gy_buf[(j & 7) * stride + i + 4] = (uint32_t)gy;
  345. }
  346. } else {
  347. memset(gx_buf + (j & 7) * stride, 0, stride * sizeof(*gx_buf));
  348. memset(gy_buf + (j & 7) * stride, 0, stride * sizeof(*gy_buf));
  349. }
  350. if (j >= 4) {
  351. int k;
  352. col_sums_gx2[3] = col_sums_gx2[2] = col_sums_gx2[1] = col_sums_gx2[0] = 0;
  353. col_sums_gy2[3] = col_sums_gy2[2] = col_sums_gy2[1] = col_sums_gy2[0] = 0;
  354. col_sums_gxgy[3] = col_sums_gxgy[2] = col_sums_gxgy[1] =
  355. col_sums_gxgy[0] = 0;
  356. for (i = 4; i < 8; i++) {
  357. FS_COL_SET(i, -1, 0);
  358. FS_COL_ADD(i, 0, 0);
  359. for (k = 1; k < 8 - i; k++) {
  360. FS_COL_DOUBLE(i, i);
  361. FS_COL_ADD(i, -k - 1, 0);
  362. FS_COL_ADD(i, k, 0);
  363. }
  364. }
  365. for (i = 0; i < w; i++) {
  366. double mugx2;
  367. double mugy2;
  368. double mugxgy;
  369. mugx2 = col_sums_gx2[0];
  370. for (k = 1; k < 8; k++) mugx2 += col_sums_gx2[k];
  371. mugy2 = col_sums_gy2[0];
  372. for (k = 1; k < 8; k++) mugy2 += col_sums_gy2[k];
  373. mugxgy = col_sums_gxgy[0];
  374. for (k = 1; k < 8; k++) mugxgy += col_sums_gxgy[k];
  375. ssim[(j - 4) * w + i] = (2 * mugxgy + c2) / (mugx2 + mugy2 + c2);
  376. if (i + 1 < w) {
  377. FS_COL_SET(0, -1, 1);
  378. FS_COL_ADD(0, 0, 1);
  379. FS_COL_SUB(2, -3, 2);
  380. FS_COL_SUB(2, 2, 2);
  381. FS_COL_HALVE(1, 2);
  382. FS_COL_SUB(3, -4, 3);
  383. FS_COL_SUB(3, 3, 3);
  384. FS_COL_HALVE(2, 3);
  385. FS_COL_COPY(3, 4);
  386. FS_COL_DOUBLE(4, 5);
  387. FS_COL_ADD(4, -4, 5);
  388. FS_COL_ADD(4, 3, 5);
  389. FS_COL_DOUBLE(5, 6);
  390. FS_COL_ADD(5, -3, 6);
  391. FS_COL_ADD(5, 2, 6);
  392. FS_COL_DOUBLE(6, 7);
  393. FS_COL_ADD(6, -2, 7);
  394. FS_COL_ADD(6, 1, 7);
  395. FS_COL_SET(7, -1, 8);
  396. FS_COL_ADD(7, 0, 8);
  397. }
  398. }
  399. }
  400. }
  401. }
  402. #define FS_NLEVELS (4)
  403. /*These weights were derived from the default weights found in Wang's original
  404. Matlab implementation: {0.0448, 0.2856, 0.2363, 0.1333}.
  405. We drop the finest scale and renormalize the rest to sum to 1.*/
  406. static const double FS_WEIGHTS[FS_NLEVELS] = {
  407. 0.2989654541015625, 0.3141326904296875, 0.2473602294921875, 0.1395416259765625
  408. };
  409. static double fs_average(fs_ctx *_ctx, int _l) {
  410. double *ssim;
  411. double ret;
  412. int w;
  413. int h;
  414. int i;
  415. int j;
  416. w = _ctx->level[_l].w;
  417. h = _ctx->level[_l].h;
  418. ssim = _ctx->level[_l].ssim;
  419. ret = 0;
  420. for (j = 0; j < h; j++)
  421. for (i = 0; i < w; i++) ret += ssim[j * w + i];
  422. return pow(ret / (w * h), FS_WEIGHTS[_l]);
  423. }
  424. static double convert_ssim_db(double _ssim, double _weight) {
  425. assert(_weight >= _ssim);
  426. if ((_weight - _ssim) < 1e-10) return MAX_SSIM_DB;
  427. return 10 * (log10(_weight) - log10(_weight - _ssim));
  428. }
  429. static double calc_ssim(const uint8_t *_src, int _systride, const uint8_t *_dst,
  430. int _dystride, int _w, int _h, uint32_t _bd,
  431. uint32_t _shift) {
  432. fs_ctx ctx;
  433. double ret;
  434. int l;
  435. ret = 1;
  436. fs_ctx_init(&ctx, _w, _h, FS_NLEVELS);
  437. fs_downsample_level0(&ctx, _src, _systride, _dst, _dystride, _w, _h, _bd,
  438. _shift);
  439. for (l = 0; l < FS_NLEVELS - 1; l++) {
  440. fs_calc_structure(&ctx, l, _bd);
  441. ret *= fs_average(&ctx, l);
  442. fs_downsample_level(&ctx, l + 1);
  443. }
  444. fs_calc_structure(&ctx, l, _bd);
  445. fs_apply_luminance(&ctx, l, _bd);
  446. ret *= fs_average(&ctx, l);
  447. fs_ctx_clear(&ctx);
  448. return ret;
  449. }
  450. double vpx_calc_fastssim(const YV12_BUFFER_CONFIG *source,
  451. const YV12_BUFFER_CONFIG *dest, double *ssim_y,
  452. double *ssim_u, double *ssim_v, uint32_t bd,
  453. uint32_t in_bd) {
  454. double ssimv;
  455. uint32_t bd_shift = 0;
  456. vpx_clear_system_state();
  457. assert(bd >= in_bd);
  458. bd_shift = bd - in_bd;
  459. *ssim_y = calc_ssim(source->y_buffer, source->y_stride, dest->y_buffer,
  460. dest->y_stride, source->y_crop_width,
  461. source->y_crop_height, in_bd, bd_shift);
  462. *ssim_u = calc_ssim(source->u_buffer, source->uv_stride, dest->u_buffer,
  463. dest->uv_stride, source->uv_crop_width,
  464. source->uv_crop_height, in_bd, bd_shift);
  465. *ssim_v = calc_ssim(source->v_buffer, source->uv_stride, dest->v_buffer,
  466. dest->uv_stride, source->uv_crop_width,
  467. source->uv_crop_height, in_bd, bd_shift);
  468. ssimv = (*ssim_y) * .8 + .1 * ((*ssim_u) + (*ssim_v));
  469. return convert_ssim_db(ssimv, 1.0);
  470. }