vp9_partition_models.h 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975
  1. /*
  2. * Copyright (c) 2018 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. #ifndef VPX_VP9_ENCODER_VP9_PARTITION_MODELS_H_
  11. #define VPX_VP9_ENCODER_VP9_PARTITION_MODELS_H_
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #define NN_MAX_HIDDEN_LAYERS 10
  16. #define NN_MAX_NODES_PER_LAYER 128
  17. // Neural net model config. It defines the layout of a neural net model, such as
  18. // the number of inputs/outputs, number of layers, the number of nodes in each
  19. // layer, as well as the weights and bias of each node.
  20. typedef struct {
  21. int num_inputs; // Number of input nodes, i.e. features.
  22. int num_outputs; // Number of output nodes.
  23. int num_hidden_layers; // Number of hidden layers, maximum 10.
  24. // Number of nodes for each hidden layer.
  25. int num_hidden_nodes[NN_MAX_HIDDEN_LAYERS];
  26. // Weight parameters, indexed by layer.
  27. const float *weights[NN_MAX_HIDDEN_LAYERS + 1];
  28. // Bias parameters, indexed by layer.
  29. const float *bias[NN_MAX_HIDDEN_LAYERS + 1];
  30. } NN_CONFIG;
  31. // Partition search breakout model.
  32. #define FEATURES 4
  33. #define Q_CTX 3
  34. #define RESOLUTION_CTX 2
  35. static const float
  36. vp9_partition_breakout_weights_64[RESOLUTION_CTX][Q_CTX][FEATURES + 1] = {
  37. {
  38. {
  39. -0.016673f,
  40. -0.001025f,
  41. -0.000032f,
  42. 0.000833f,
  43. 1.94261885f - 2.1f,
  44. },
  45. {
  46. -0.160867f,
  47. -0.002101f,
  48. 0.000011f,
  49. 0.002448f,
  50. 1.65738142f - 2.5f,
  51. },
  52. {
  53. -0.628934f,
  54. -0.011459f,
  55. -0.000009f,
  56. 0.013833f,
  57. 1.47982645f - 1.6f,
  58. },
  59. },
  60. {
  61. {
  62. -0.064309f,
  63. -0.006121f,
  64. 0.000232f,
  65. 0.005778f,
  66. 0.7989465f - 5.0f,
  67. },
  68. {
  69. -0.314957f,
  70. -0.009346f,
  71. -0.000225f,
  72. 0.010072f,
  73. 2.80695581f - 5.5f,
  74. },
  75. {
  76. -0.635535f,
  77. -0.015135f,
  78. 0.000091f,
  79. 0.015247f,
  80. 2.90381241f - 5.0f,
  81. },
  82. },
  83. };
  84. static const float
  85. vp9_partition_breakout_weights_32[RESOLUTION_CTX][Q_CTX][FEATURES + 1] = {
  86. {
  87. {
  88. -0.010554f,
  89. -0.003081f,
  90. -0.000134f,
  91. 0.004491f,
  92. 1.68445992f - 3.5f,
  93. },
  94. {
  95. -0.051489f,
  96. -0.007609f,
  97. 0.000016f,
  98. 0.009792f,
  99. 1.28089404f - 2.5f,
  100. },
  101. {
  102. -0.163097f,
  103. -0.013081f,
  104. 0.000022f,
  105. 0.019006f,
  106. 1.36129403f - 3.2f,
  107. },
  108. },
  109. {
  110. {
  111. -0.024629f,
  112. -0.006492f,
  113. -0.000254f,
  114. 0.004895f,
  115. 1.27919173f - 4.5f,
  116. },
  117. {
  118. -0.083936f,
  119. -0.009827f,
  120. -0.000200f,
  121. 0.010399f,
  122. 2.73731065f - 4.5f,
  123. },
  124. {
  125. -0.279052f,
  126. -0.013334f,
  127. 0.000289f,
  128. 0.023203f,
  129. 2.43595719f - 3.5f,
  130. },
  131. },
  132. };
  133. static const float
  134. vp9_partition_breakout_weights_16[RESOLUTION_CTX][Q_CTX][FEATURES + 1] = {
  135. {
  136. {
  137. -0.013154f,
  138. -0.002404f,
  139. -0.000977f,
  140. 0.008450f,
  141. 2.57404566f - 5.5f,
  142. },
  143. {
  144. -0.019146f,
  145. -0.004018f,
  146. 0.000064f,
  147. 0.008187f,
  148. 2.15043926f - 2.5f,
  149. },
  150. {
  151. -0.075755f,
  152. -0.010858f,
  153. 0.000030f,
  154. 0.024505f,
  155. 2.06848121f - 2.5f,
  156. },
  157. },
  158. {
  159. {
  160. -0.007636f,
  161. -0.002751f,
  162. -0.000682f,
  163. 0.005968f,
  164. 0.19225763f - 4.5f,
  165. },
  166. {
  167. -0.047306f,
  168. -0.009113f,
  169. -0.000518f,
  170. 0.016007f,
  171. 2.61068869f - 4.0f,
  172. },
  173. {
  174. -0.069336f,
  175. -0.010448f,
  176. -0.001120f,
  177. 0.023083f,
  178. 1.47591054f - 5.5f,
  179. },
  180. },
  181. };
  182. static const float vp9_partition_breakout_weights_8[RESOLUTION_CTX][Q_CTX]
  183. [FEATURES + 1] = {
  184. {
  185. {
  186. -0.011807f,
  187. -0.009873f,
  188. -0.000931f,
  189. 0.034768f,
  190. 1.32254851f - 2.0f,
  191. },
  192. {
  193. -0.003861f,
  194. -0.002701f,
  195. 0.000100f,
  196. 0.013876f,
  197. 1.96755111f - 1.5f,
  198. },
  199. {
  200. -0.013522f,
  201. -0.008677f,
  202. -0.000562f,
  203. 0.034468f,
  204. 1.53440356f - 1.5f,
  205. },
  206. },
  207. {
  208. {
  209. -0.003221f,
  210. -0.002125f,
  211. 0.000993f,
  212. 0.012768f,
  213. 0.03541421f - 2.0f,
  214. },
  215. {
  216. -0.006069f,
  217. -0.007335f,
  218. 0.000229f,
  219. 0.026104f,
  220. 0.17135315f - 1.5f,
  221. },
  222. {
  223. -0.039894f,
  224. -0.011419f,
  225. 0.000070f,
  226. 0.061817f,
  227. 0.6739977f - 1.5f,
  228. },
  229. },
  230. };
  231. #undef FEATURES
  232. #undef Q_CTX
  233. #undef RESOLUTION_CTX
  234. // Rectangular partition search pruning model.
  235. #define FEATURES 8
  236. #define LABELS 4
  237. #define NODES 16
  238. static const float vp9_rect_part_nn_weights_16_layer0[FEATURES * NODES] = {
  239. -0.432522f, 0.133070f, -0.169187f, 0.768340f, 0.891228f, 0.554458f,
  240. 0.356000f, 0.403621f, 0.809165f, 0.778214f, -0.520357f, 0.301451f,
  241. -0.386972f, -0.314402f, 0.021878f, 1.148746f, -0.462258f, -0.175524f,
  242. -0.344589f, -0.475159f, -0.232322f, 0.471147f, -0.489948f, 0.467740f,
  243. -0.391550f, 0.208601f, 0.054138f, 0.076859f, -0.309497f, -0.095927f,
  244. 0.225917f, 0.011582f, -0.520730f, -0.585497f, 0.174036f, 0.072521f,
  245. 0.120771f, -0.517234f, -0.581908f, -0.034003f, -0.694722f, -0.364368f,
  246. 0.290584f, 0.038373f, 0.685654f, 0.394019f, 0.759667f, 1.257502f,
  247. -0.610516f, -0.185434f, 0.211997f, -0.172458f, 0.044605f, 0.145316f,
  248. -0.182525f, -0.147376f, 0.578742f, 0.312412f, -0.446135f, -0.389112f,
  249. 0.454033f, 0.260490f, 0.664285f, 0.395856f, -0.231827f, 0.215228f,
  250. 0.014856f, -0.395462f, 0.479646f, -0.391445f, -0.357788f, 0.166238f,
  251. -0.056818f, -0.027783f, 0.060880f, -1.604710f, 0.531268f, 0.282184f,
  252. 0.714944f, 0.093523f, -0.218312f, -0.095546f, -0.285621f, -0.190871f,
  253. -0.448340f, -0.016611f, 0.413913f, -0.286720f, -0.158828f, -0.092635f,
  254. -0.279551f, 0.166509f, -0.088162f, 0.446543f, -0.276830f, -0.065642f,
  255. -0.176346f, -0.984754f, 0.338738f, 0.403809f, 0.738065f, 1.154439f,
  256. 0.750764f, 0.770959f, -0.269403f, 0.295651f, -0.331858f, 0.367144f,
  257. 0.279279f, 0.157419f, -0.348227f, -0.168608f, -0.956000f, -0.647136f,
  258. 0.250516f, 0.858084f, 0.809802f, 0.492408f, 0.804841f, 0.282802f,
  259. 0.079395f, -0.291771f, -0.024382f, -1.615880f, -0.445166f, -0.407335f,
  260. -0.483044f, 0.141126f,
  261. };
  262. static const float vp9_rect_part_nn_bias_16_layer0[NODES] = {
  263. 0.275384f, -0.053745f, 0.000000f, 0.000000f, -0.178103f, 0.513965f,
  264. -0.161352f, 0.228551f, 0.000000f, 1.013712f, 0.000000f, 0.000000f,
  265. -1.144009f, -0.000006f, -0.241727f, 2.048764f,
  266. };
  267. static const float vp9_rect_part_nn_weights_16_layer1[NODES * LABELS] = {
  268. -1.435278f, 2.204691f, -0.410718f, 0.202708f, 0.109208f, 1.059142f,
  269. -0.306360f, 0.845906f, 0.489654f, -1.121915f, -0.169133f, -0.003385f,
  270. 0.660590f, -0.018711f, 1.227158f, -2.967504f, 1.407345f, -1.293243f,
  271. -0.386921f, 0.300492f, 0.338824f, -0.083250f, -0.069454f, -1.001827f,
  272. -0.327891f, 0.899353f, 0.367397f, -0.118601f, -0.171936f, -0.420646f,
  273. -0.803319f, 2.029634f, 0.940268f, -0.664484f, 0.339916f, 0.315944f,
  274. 0.157374f, -0.402482f, -0.491695f, 0.595827f, 0.015031f, 0.255887f,
  275. -0.466327f, -0.212598f, 0.136485f, 0.033363f, -0.796921f, 1.414304f,
  276. -0.282185f, -2.673571f, -0.280994f, 0.382658f, -0.350902f, 0.227926f,
  277. 0.062602f, -1.000199f, 0.433731f, 1.176439f, -0.163216f, -0.229015f,
  278. -0.640098f, -0.438852f, -0.947700f, 2.203434f,
  279. };
  280. static const float vp9_rect_part_nn_bias_16_layer1[LABELS] = {
  281. -0.875510f,
  282. 0.982408f,
  283. 0.560854f,
  284. -0.415209f,
  285. };
  286. static const NN_CONFIG vp9_rect_part_nnconfig_16 = {
  287. FEATURES, // num_inputs
  288. LABELS, // num_outputs
  289. 1, // num_hidden_layers
  290. {
  291. NODES,
  292. }, // num_hidden_nodes
  293. {
  294. vp9_rect_part_nn_weights_16_layer0,
  295. vp9_rect_part_nn_weights_16_layer1,
  296. },
  297. {
  298. vp9_rect_part_nn_bias_16_layer0,
  299. vp9_rect_part_nn_bias_16_layer1,
  300. },
  301. };
  302. static const float vp9_rect_part_nn_weights_32_layer0[FEATURES * NODES] = {
  303. -0.147312f, -0.753248f, 0.540206f, 0.661415f, 0.484117f, -0.341609f,
  304. 0.016183f, 0.064177f, 0.781580f, 0.902232f, -0.505342f, 0.325183f,
  305. -0.231072f, -0.120107f, -0.076216f, 0.120038f, 0.403695f, -0.463301f,
  306. -0.192158f, 0.407442f, 0.106633f, 1.072371f, -0.446779f, 0.467353f,
  307. 0.318812f, -0.505996f, -0.008768f, -0.239598f, 0.085480f, 0.284640f,
  308. -0.365045f, -0.048083f, -0.112090f, -0.067089f, 0.304138f, -0.228809f,
  309. 0.383651f, -0.196882f, 0.477039f, -0.217978f, -0.506931f, -0.125675f,
  310. 0.050456f, 1.086598f, 0.732128f, 0.326941f, 0.103952f, 0.121769f,
  311. -0.154487f, -0.255514f, 0.030591f, -0.382797f, -0.019981f, -0.326570f,
  312. 0.149691f, -0.435633f, -0.070795f, 0.167691f, 0.251413f, -0.153405f,
  313. 0.160347f, 0.455107f, -0.968580f, -0.575879f, 0.623115f, -0.069793f,
  314. -0.379768f, -0.965807f, -0.062057f, 0.071312f, 0.457098f, 0.350372f,
  315. -0.460659f, -0.985393f, 0.359963f, -0.093677f, 0.404272f, -0.326896f,
  316. -0.277752f, 0.609322f, -0.114193f, -0.230701f, 0.089208f, 0.645381f,
  317. 0.494485f, 0.467876f, -0.166187f, 0.251044f, -0.394661f, 0.192895f,
  318. -0.344777f, -0.041893f, -0.111163f, 0.066347f, 0.378158f, -0.455465f,
  319. 0.339839f, -0.418207f, -0.356515f, -0.227536f, -0.211091f, -0.122945f,
  320. 0.361772f, -0.338095f, 0.004564f, -0.398510f, 0.060876f, -2.132504f,
  321. -0.086776f, -0.029166f, 0.039241f, 0.222534f, -0.188565f, -0.288792f,
  322. -0.160789f, -0.123905f, 0.397916f, -0.063779f, 0.167210f, -0.445004f,
  323. 0.056889f, 0.207280f, 0.000101f, 0.384507f, -1.721239f, -2.036402f,
  324. -2.084403f, -2.060483f,
  325. };
  326. static const float vp9_rect_part_nn_bias_32_layer0[NODES] = {
  327. -0.859251f, -0.109938f, 0.091838f, 0.187817f, -0.728265f, 0.253080f,
  328. 0.000000f, -0.357195f, -0.031290f, -1.373237f, -0.761086f, 0.000000f,
  329. -0.024504f, 1.765711f, 0.000000f, 1.505390f,
  330. };
  331. static const float vp9_rect_part_nn_weights_32_layer1[NODES * LABELS] = {
  332. 0.680940f, 1.367178f, 0.403075f, 0.029957f, 0.500917f, 1.407776f,
  333. -0.354002f, 0.011667f, 1.663767f, 0.959155f, 0.428323f, -0.205345f,
  334. -0.081850f, -3.920103f, -0.243802f, -4.253933f, -0.034020f, -1.361057f,
  335. 0.128236f, -0.138422f, -0.025790f, -0.563518f, -0.148715f, -0.344381f,
  336. -1.677389f, -0.868332f, -0.063792f, 0.052052f, 0.359591f, 2.739808f,
  337. -0.414304f, 3.036597f, -0.075368f, -1.019680f, 0.642501f, 0.209779f,
  338. -0.374539f, -0.718294f, -0.116616f, -0.043212f, -1.787809f, -0.773262f,
  339. 0.068734f, 0.508309f, 0.099334f, 1.802239f, -0.333538f, 2.708645f,
  340. -0.447682f, -2.355555f, -0.506674f, -0.061028f, -0.310305f, -0.375475f,
  341. 0.194572f, 0.431788f, -0.789624f, -0.031962f, 0.358353f, 0.382937f,
  342. 0.232002f, 2.321813f, -0.037523f, 2.104652f,
  343. };
  344. static const float vp9_rect_part_nn_bias_32_layer1[LABELS] = {
  345. -0.693383f,
  346. 0.773661f,
  347. 0.426878f,
  348. -0.070619f,
  349. };
  350. static const NN_CONFIG vp9_rect_part_nnconfig_32 = {
  351. FEATURES, // num_inputs
  352. LABELS, // num_outputs
  353. 1, // num_hidden_layers
  354. {
  355. NODES,
  356. }, // num_hidden_nodes
  357. {
  358. vp9_rect_part_nn_weights_32_layer0,
  359. vp9_rect_part_nn_weights_32_layer1,
  360. },
  361. {
  362. vp9_rect_part_nn_bias_32_layer0,
  363. vp9_rect_part_nn_bias_32_layer1,
  364. },
  365. };
  366. #undef NODES
  367. #define NODES 24
  368. static const float vp9_rect_part_nn_weights_64_layer0[FEATURES * NODES] = {
  369. 0.024671f, -0.220610f, -0.284362f, -0.069556f, -0.315700f, 0.187861f,
  370. 0.139782f, 0.063110f, 0.796561f, 0.172868f, -0.662194f, -1.393074f,
  371. 0.085003f, 0.393381f, 0.358477f, -0.187268f, -0.370745f, 0.218287f,
  372. 0.027271f, -0.254089f, -0.048236f, -0.459137f, 0.253171f, 0.122598f,
  373. -0.550107f, -0.568456f, 0.159866f, -0.246534f, 0.096384f, -0.255460f,
  374. 0.077864f, -0.334837f, 0.026921f, -0.697252f, 0.345262f, 1.343578f,
  375. 0.815984f, 1.118211f, 1.574016f, 0.578476f, -0.285967f, -0.508672f,
  376. 0.118137f, 0.037695f, 1.540510f, 1.256648f, 1.163819f, 1.172027f,
  377. 0.661551f, -0.111980f, -0.434204f, -0.894217f, 0.570524f, 0.050292f,
  378. -0.113680f, 0.000784f, -0.211554f, -0.369394f, 0.158306f, -0.512505f,
  379. -0.238696f, 0.091498f, -0.448490f, -0.491268f, -0.353112f, -0.303315f,
  380. -0.428438f, 0.127998f, -0.406790f, -0.401786f, -0.279888f, -0.384223f,
  381. 0.026100f, 0.041621f, -0.315818f, -0.087888f, 0.353497f, 0.163123f,
  382. -0.380128f, -0.090334f, -0.216647f, -0.117849f, -0.173502f, 0.301871f,
  383. 0.070854f, 0.114627f, -0.050545f, -0.160381f, 0.595294f, 0.492696f,
  384. -0.453858f, -1.154139f, 0.126000f, 0.034550f, 0.456665f, -0.236618f,
  385. -0.112640f, 0.050759f, -0.449162f, 0.110059f, 0.147116f, 0.249358f,
  386. -0.049894f, 0.063351f, -0.004467f, 0.057242f, -0.482015f, -0.174335f,
  387. -0.085617f, -0.333808f, -0.358440f, -0.069006f, 0.099260f, -1.243430f,
  388. -0.052963f, 0.112088f, -2.661115f, -2.445893f, -2.688174f, -2.624232f,
  389. 0.030494f, 0.161311f, 0.012136f, 0.207564f, -2.776856f, -2.791940f,
  390. -2.623962f, -2.918820f, 1.231619f, -0.376692f, -0.698078f, 0.110336f,
  391. -0.285378f, 0.258367f, -0.180159f, -0.376608f, -0.034348f, -0.130206f,
  392. 0.160020f, 0.852977f, 0.580573f, 1.450782f, 1.357596f, 0.787382f,
  393. -0.544004f, -0.014795f, 0.032121f, -0.557696f, 0.159994f, -0.540908f,
  394. 0.180380f, -0.398045f, 0.705095f, 0.515103f, -0.511521f, -1.271374f,
  395. -0.231019f, 0.423647f, 0.064907f, -0.255338f, -0.877748f, -0.667205f,
  396. 0.267847f, 0.135229f, 0.617844f, 1.349849f, 1.012623f, 0.730506f,
  397. -0.078571f, 0.058401f, 0.053221f, -2.426146f, -0.098808f, -0.138508f,
  398. -0.153299f, 0.149116f, -0.444243f, 0.301807f, 0.065066f, 0.092929f,
  399. -0.372784f, -0.095540f, 0.192269f, 0.237894f, 0.080228f, -0.214074f,
  400. -0.011426f, -2.352367f, -0.085394f, -0.190361f, -0.001177f, 0.089197f,
  401. };
  402. static const float vp9_rect_part_nn_bias_64_layer0[NODES] = {
  403. 0.000000f, -0.057652f, -0.175413f, -0.175389f, -1.084097f, -1.423801f,
  404. -0.076307f, -0.193803f, 0.000000f, -0.066474f, -0.050318f, -0.019832f,
  405. -0.038814f, -0.144184f, 2.652451f, 2.415006f, 0.197464f, -0.729842f,
  406. -0.173774f, 0.239171f, 0.486425f, 2.463304f, -0.175279f, 2.352637f,
  407. };
  408. static const float vp9_rect_part_nn_weights_64_layer1[NODES * LABELS] = {
  409. -0.063237f, 1.925696f, -0.182145f, -0.226687f, 0.602941f, -0.941140f,
  410. 0.814598f, -0.117063f, 0.282988f, 0.066369f, 0.096951f, 1.049735f,
  411. -0.188188f, -0.281227f, -4.836746f, -5.047797f, 0.892358f, 0.417145f,
  412. -0.279849f, 1.335945f, 0.660338f, -2.757938f, -0.115714f, -1.862183f,
  413. -0.045980f, -1.597624f, -0.586822f, -0.615589f, -0.330537f, 1.068496f,
  414. -0.167290f, 0.141290f, -0.112100f, 0.232761f, 0.252307f, -0.399653f,
  415. 0.353118f, 0.241583f, 2.635241f, 4.026119f, -1.137327f, -0.052446f,
  416. -0.139814f, -1.104256f, -0.759391f, 2.508457f, -0.526297f, 2.095348f,
  417. -0.444473f, -1.090452f, 0.584122f, 0.468729f, -0.368865f, 1.041425f,
  418. -1.079504f, 0.348837f, 0.390091f, 0.416191f, 0.212906f, -0.660255f,
  419. 0.053630f, 0.209476f, 3.595525f, 2.257293f, -0.514030f, 0.074203f,
  420. -0.375862f, -1.998307f, -0.930310f, 1.866686f, -0.247137f, 1.087789f,
  421. 0.100186f, 0.298150f, 0.165265f, 0.050478f, 0.249167f, 0.371789f,
  422. -0.294497f, 0.202954f, 0.037310f, 0.193159f, 0.161551f, 0.301597f,
  423. 0.299286f, 0.185946f, 0.822976f, 2.066130f, -1.724588f, 0.055977f,
  424. -0.330747f, -0.067747f, -0.475801f, 1.555958f, -0.025808f, -0.081516f,
  425. };
  426. static const float vp9_rect_part_nn_bias_64_layer1[LABELS] = {
  427. -0.090723f,
  428. 0.894968f,
  429. 0.844754f,
  430. -3.496194f,
  431. };
  432. static const NN_CONFIG vp9_rect_part_nnconfig_64 = {
  433. FEATURES, // num_inputs
  434. LABELS, // num_outputs
  435. 1, // num_hidden_layers
  436. {
  437. NODES,
  438. }, // num_hidden_nodes
  439. {
  440. vp9_rect_part_nn_weights_64_layer0,
  441. vp9_rect_part_nn_weights_64_layer1,
  442. },
  443. {
  444. vp9_rect_part_nn_bias_64_layer0,
  445. vp9_rect_part_nn_bias_64_layer1,
  446. },
  447. };
  448. #undef FEATURES
  449. #undef LABELS
  450. #undef NODES
  451. #define FEATURES 7
  452. // Partition pruning model(neural nets).
  453. static const float vp9_partition_nn_weights_64x64_layer0[FEATURES * 8] = {
  454. -3.571348f, 0.014835f, -3.255393f, -0.098090f, -0.013120f, 0.000221f,
  455. 0.056273f, 0.190179f, -0.268130f, -1.828242f, -0.010655f, 0.937244f,
  456. -0.435120f, 0.512125f, 1.610679f, 0.190816f, -0.799075f, -0.377348f,
  457. -0.144232f, 0.614383f, -0.980388f, 1.754150f, -0.185603f, -0.061854f,
  458. -0.807172f, 1.240177f, 1.419531f, -0.438544f, -5.980774f, 0.139045f,
  459. -0.032359f, -0.068887f, -1.237918f, 0.115706f, 0.003164f, 2.924212f,
  460. 1.246838f, -0.035833f, 0.810011f, -0.805894f, 0.010966f, 0.076463f,
  461. -4.226380f, -2.437764f, -0.010619f, -0.020935f, -0.451494f, 0.300079f,
  462. -0.168961f, -3.326450f, -2.731094f, 0.002518f, 0.018840f, -1.656815f,
  463. 0.068039f, 0.010586f,
  464. };
  465. static const float vp9_partition_nn_bias_64x64_layer0[8] = {
  466. -3.469882f, 0.683989f, 0.194010f, 0.313782f,
  467. -3.153335f, 2.245849f, -1.946190f, -3.740020f,
  468. };
  469. static const float vp9_partition_nn_weights_64x64_layer1[8] = {
  470. -8.058566f, 0.108306f, -0.280620f, -0.818823f,
  471. -6.445117f, 0.865364f, -1.127127f, -8.808660f,
  472. };
  473. static const float vp9_partition_nn_bias_64x64_layer1[1] = {
  474. 6.46909416f,
  475. };
  476. static const NN_CONFIG vp9_partition_nnconfig_64x64 = {
  477. FEATURES, // num_inputs
  478. 1, // num_outputs
  479. 1, // num_hidden_layers
  480. {
  481. 8,
  482. }, // num_hidden_nodes
  483. {
  484. vp9_partition_nn_weights_64x64_layer0,
  485. vp9_partition_nn_weights_64x64_layer1,
  486. },
  487. {
  488. vp9_partition_nn_bias_64x64_layer0,
  489. vp9_partition_nn_bias_64x64_layer1,
  490. },
  491. };
  492. static const float vp9_partition_nn_weights_32x32_layer0[FEATURES * 8] = {
  493. -0.295437f, -4.002648f, -0.205399f, -0.060919f, 0.708037f, 0.027221f,
  494. -0.039137f, -0.907724f, -3.151662f, 0.007106f, 0.018726f, -0.534928f,
  495. 0.022744f, 0.000159f, -1.717189f, -3.229031f, -0.027311f, 0.269863f,
  496. -0.400747f, -0.394366f, -0.108878f, 0.603027f, 0.455369f, -0.197170f,
  497. 1.241746f, -1.347820f, -0.575636f, -0.462879f, -2.296426f, 0.196696f,
  498. -0.138347f, -0.030754f, -0.200774f, 0.453795f, 0.055625f, -3.163116f,
  499. -0.091003f, -0.027028f, -0.042984f, -0.605185f, 0.143240f, -0.036439f,
  500. -0.801228f, 0.313409f, -0.159942f, 0.031267f, 0.886454f, -1.531644f,
  501. -0.089655f, 0.037683f, -0.163441f, -0.130454f, -0.058344f, 0.060011f,
  502. 0.275387f, 1.552226f,
  503. };
  504. static const float vp9_partition_nn_bias_32x32_layer0[8] = {
  505. -0.838372f, -2.609089f, -0.055763f, 1.329485f,
  506. -1.297638f, -2.636622f, -0.826909f, 1.012644f,
  507. };
  508. static const float vp9_partition_nn_weights_32x32_layer1[8] = {
  509. -1.792632f, -7.322353f, -0.683386f, 0.676564f,
  510. -1.488118f, -7.527719f, 1.240163f, 0.614309f,
  511. };
  512. static const float vp9_partition_nn_bias_32x32_layer1[1] = {
  513. 4.97422546f,
  514. };
  515. static const NN_CONFIG vp9_partition_nnconfig_32x32 = {
  516. FEATURES, // num_inputs
  517. 1, // num_outputs
  518. 1, // num_hidden_layers
  519. {
  520. 8,
  521. }, // num_hidden_nodes
  522. {
  523. vp9_partition_nn_weights_32x32_layer0,
  524. vp9_partition_nn_weights_32x32_layer1,
  525. },
  526. {
  527. vp9_partition_nn_bias_32x32_layer0,
  528. vp9_partition_nn_bias_32x32_layer1,
  529. },
  530. };
  531. static const float vp9_partition_nn_weights_16x16_layer0[FEATURES * 8] = {
  532. -1.717673f, -4.718130f, -0.125725f, -0.183427f, -0.511764f, 0.035328f,
  533. 0.130891f, -3.096753f, 0.174968f, -0.188769f, -0.640796f, 1.305661f,
  534. 1.700638f, -0.073806f, -4.006781f, -1.630999f, -0.064863f, -0.086410f,
  535. -0.148617f, 0.172733f, -0.018619f, 2.152595f, 0.778405f, -0.156455f,
  536. 0.612995f, -0.467878f, 0.152022f, -0.236183f, 0.339635f, -0.087119f,
  537. -3.196610f, -1.080401f, -0.637704f, -0.059974f, 1.706298f, -0.793705f,
  538. -6.399260f, 0.010624f, -0.064199f, -0.650621f, 0.338087f, -0.001531f,
  539. 1.023655f, -3.700272f, -0.055281f, -0.386884f, 0.375504f, -0.898678f,
  540. 0.281156f, -0.314611f, 0.863354f, -0.040582f, -0.145019f, 0.029329f,
  541. -2.197880f, -0.108733f,
  542. };
  543. static const float vp9_partition_nn_bias_16x16_layer0[8] = {
  544. 0.411516f, -2.143737f, -3.693192f, 2.123142f,
  545. -1.356910f, -3.561016f, -0.765045f, -2.417082f,
  546. };
  547. static const float vp9_partition_nn_weights_16x16_layer1[8] = {
  548. -0.619755f, -2.202391f, -4.337171f, 0.611319f,
  549. 0.377677f, -4.998723f, -1.052235f, 1.949922f,
  550. };
  551. static const float vp9_partition_nn_bias_16x16_layer1[1] = {
  552. 3.20981717f,
  553. };
  554. static const NN_CONFIG vp9_partition_nnconfig_16x16 = {
  555. FEATURES, // num_inputs
  556. 1, // num_outputs
  557. 1, // num_hidden_layers
  558. {
  559. 8,
  560. }, // num_hidden_nodes
  561. {
  562. vp9_partition_nn_weights_16x16_layer0,
  563. vp9_partition_nn_weights_16x16_layer1,
  564. },
  565. {
  566. vp9_partition_nn_bias_16x16_layer0,
  567. vp9_partition_nn_bias_16x16_layer1,
  568. },
  569. };
  570. #undef FEATURES
  571. #define FEATURES 6
  572. static const float vp9_var_part_nn_weights_64_layer0[FEATURES * 8] = {
  573. -0.249572f, 0.205532f, -2.175608f, 1.094836f, -2.986370f, 0.193160f,
  574. -0.143823f, 0.378511f, -1.997788f, -2.166866f, -1.930158f, -1.202127f,
  575. -0.611875f, -0.506422f, -0.432487f, 0.071205f, 0.578172f, -0.154285f,
  576. -0.051830f, 0.331681f, -1.457177f, -2.443546f, -2.000302f, -1.389283f,
  577. 0.372084f, -0.464917f, 2.265235f, 2.385787f, 2.312722f, 2.127868f,
  578. -0.403963f, -0.177860f, -0.436751f, -0.560539f, 0.254903f, 0.193976f,
  579. -0.305611f, 0.256632f, 0.309388f, -0.437439f, 1.702640f, -5.007069f,
  580. -0.323450f, 0.294227f, 1.267193f, 1.056601f, 0.387181f, -0.191215f,
  581. };
  582. static const float vp9_var_part_nn_bias_64_layer0[8] = {
  583. -0.044396f, -0.938166f, 0.000000f, -0.916375f,
  584. 1.242299f, 0.000000f, -0.405734f, 0.014206f,
  585. };
  586. static const float vp9_var_part_nn_weights_64_layer1[8] = {
  587. 1.635945f, 0.979557f, 0.455315f, 1.197199f,
  588. -2.251024f, -0.464953f, 1.378676f, -0.111927f,
  589. };
  590. static const float vp9_var_part_nn_bias_64_layer1[1] = {
  591. -0.37972447f,
  592. };
  593. static const NN_CONFIG vp9_var_part_nnconfig_64 = {
  594. FEATURES, // num_inputs
  595. 1, // num_outputs
  596. 1, // num_hidden_layers
  597. {
  598. 8,
  599. }, // num_hidden_nodes
  600. {
  601. vp9_var_part_nn_weights_64_layer0,
  602. vp9_var_part_nn_weights_64_layer1,
  603. },
  604. {
  605. vp9_var_part_nn_bias_64_layer0,
  606. vp9_var_part_nn_bias_64_layer1,
  607. },
  608. };
  609. static const float vp9_var_part_nn_weights_32_layer0[FEATURES * 8] = {
  610. 0.067243f, -0.083598f, -2.191159f, 2.726434f, -3.324013f, 3.477977f,
  611. 0.323736f, -0.510199f, 2.960693f, 2.937661f, 2.888476f, 2.938315f,
  612. -0.307602f, -0.503353f, -0.080725f, -0.473909f, -0.417162f, 0.457089f,
  613. 0.665153f, -0.273210f, 0.028279f, 0.972220f, -0.445596f, 1.756611f,
  614. -0.177892f, -0.091758f, 0.436661f, -0.521506f, 0.133786f, 0.266743f,
  615. 0.637367f, -0.160084f, -1.396269f, 1.020841f, -1.112971f, 0.919496f,
  616. -0.235883f, 0.651954f, 0.109061f, -0.429463f, 0.740839f, -0.962060f,
  617. 0.299519f, -0.386298f, 1.550231f, 2.464915f, 1.311969f, 2.561612f,
  618. };
  619. static const float vp9_var_part_nn_bias_32_layer0[8] = {
  620. 0.368242f, 0.736617f, 0.000000f, 0.757287f,
  621. 0.000000f, 0.613248f, -0.776390f, 0.928497f,
  622. };
  623. static const float vp9_var_part_nn_weights_32_layer1[8] = {
  624. 0.939884f, -2.420850f, -0.410489f, -0.186690f,
  625. 0.063287f, -0.522011f, 0.484527f, -0.639625f,
  626. };
  627. static const float vp9_var_part_nn_bias_32_layer1[1] = {
  628. -0.6455006f,
  629. };
  630. static const NN_CONFIG vp9_var_part_nnconfig_32 = {
  631. FEATURES, // num_inputs
  632. 1, // num_outputs
  633. 1, // num_hidden_layers
  634. {
  635. 8,
  636. }, // num_hidden_nodes
  637. {
  638. vp9_var_part_nn_weights_32_layer0,
  639. vp9_var_part_nn_weights_32_layer1,
  640. },
  641. {
  642. vp9_var_part_nn_bias_32_layer0,
  643. vp9_var_part_nn_bias_32_layer1,
  644. },
  645. };
  646. static const float vp9_var_part_nn_weights_16_layer0[FEATURES * 8] = {
  647. 0.742567f, -0.580624f, -0.244528f, 0.331661f, -0.113949f, -0.559295f,
  648. -0.386061f, 0.438653f, 1.467463f, 0.211589f, 0.513972f, 1.067855f,
  649. -0.876679f, 0.088560f, -0.687483f, -0.380304f, -0.016412f, 0.146380f,
  650. 0.015318f, 0.000351f, -2.764887f, 3.269717f, 2.752428f, -2.236754f,
  651. 0.561539f, -0.852050f, -0.084667f, 0.202057f, 0.197049f, 0.364922f,
  652. -0.463801f, 0.431790f, 1.872096f, -0.091887f, -0.055034f, 2.443492f,
  653. -0.156958f, -0.189571f, -0.542424f, -0.589804f, -0.354422f, 0.401605f,
  654. 0.642021f, -0.875117f, 2.040794f, 1.921070f, 1.792413f, 1.839727f,
  655. };
  656. static const float vp9_var_part_nn_bias_16_layer0[8] = {
  657. 2.901234f, -1.940932f, -0.198970f, -0.406524f,
  658. 0.059422f, -1.879207f, -0.232340f, 2.979821f,
  659. };
  660. static const float vp9_var_part_nn_weights_16_layer1[8] = {
  661. -0.528731f, 0.375234f, -0.088422f, 0.668629f,
  662. 0.870449f, 0.578735f, 0.546103f, -1.957207f,
  663. };
  664. static const float vp9_var_part_nn_bias_16_layer1[1] = {
  665. -1.95769405f,
  666. };
  667. static const NN_CONFIG vp9_var_part_nnconfig_16 = {
  668. FEATURES, // num_inputs
  669. 1, // num_outputs
  670. 1, // num_hidden_layers
  671. {
  672. 8,
  673. }, // num_hidden_nodes
  674. {
  675. vp9_var_part_nn_weights_16_layer0,
  676. vp9_var_part_nn_weights_16_layer1,
  677. },
  678. {
  679. vp9_var_part_nn_bias_16_layer0,
  680. vp9_var_part_nn_bias_16_layer1,
  681. },
  682. };
  683. #undef FEATURES
  684. #define FEATURES 12
  685. #define LABELS 1
  686. #define NODES 8
  687. static const float vp9_part_split_nn_weights_64_layer0[FEATURES * NODES] = {
  688. -0.609728f, -0.409099f, -0.472449f, 0.183769f, -0.457740f, 0.081089f,
  689. 0.171003f, 0.578696f, -0.019043f, -0.856142f, 0.557369f, -1.779424f,
  690. -0.274044f, -0.320632f, -0.392531f, -0.359462f, -0.404106f, -0.288357f,
  691. 0.200620f, 0.038013f, -0.430093f, 0.235083f, -0.487442f, 0.424814f,
  692. -0.232758f, -0.442943f, 0.229397f, -0.540301f, -0.648421f, -0.649747f,
  693. -0.171638f, 0.603824f, 0.468497f, -0.421580f, 0.178840f, -0.533838f,
  694. -0.029471f, -0.076296f, 0.197426f, -0.187908f, -0.003950f, -0.065740f,
  695. 0.085165f, -0.039674f, -5.640702f, 1.909538f, -1.434604f, 3.294606f,
  696. -0.788812f, 0.196864f, 0.057012f, -0.019757f, 0.336233f, 0.075378f,
  697. 0.081503f, 0.491864f, -1.899470f, -1.764173f, -1.888137f, -1.762343f,
  698. 0.845542f, 0.202285f, 0.381948f, -0.150996f, 0.556893f, -0.305354f,
  699. 0.561482f, -0.021974f, -0.703117f, 0.268638f, -0.665736f, 1.191005f,
  700. -0.081568f, -0.115653f, 0.272029f, -0.140074f, 0.072683f, 0.092651f,
  701. -0.472287f, -0.055790f, -0.434425f, 0.352055f, 0.048246f, 0.372865f,
  702. 0.111499f, -0.338304f, 0.739133f, 0.156519f, -0.594644f, 0.137295f,
  703. 0.613350f, -0.165102f, -1.003731f, 0.043070f, -0.887896f, -0.174202f,
  704. };
  705. static const float vp9_part_split_nn_bias_64_layer0[NODES] = {
  706. 1.182714f, 0.000000f, 0.902019f, 0.953115f,
  707. -1.372486f, -1.288740f, -0.155144f, -3.041362f,
  708. };
  709. static const float vp9_part_split_nn_weights_64_layer1[NODES * LABELS] = {
  710. 0.841214f, 0.456016f, 0.869270f, 1.692999f,
  711. -1.700494f, -0.911761f, 0.030111f, -1.447548f,
  712. };
  713. static const float vp9_part_split_nn_bias_64_layer1[LABELS] = {
  714. 1.17782545f,
  715. };
  716. static const NN_CONFIG vp9_part_split_nnconfig_64 = {
  717. FEATURES, // num_inputs
  718. LABELS, // num_outputs
  719. 1, // num_hidden_layers
  720. {
  721. NODES,
  722. }, // num_hidden_nodes
  723. {
  724. vp9_part_split_nn_weights_64_layer0,
  725. vp9_part_split_nn_weights_64_layer1,
  726. },
  727. {
  728. vp9_part_split_nn_bias_64_layer0,
  729. vp9_part_split_nn_bias_64_layer1,
  730. },
  731. };
  732. static const float vp9_part_split_nn_weights_32_layer0[FEATURES * NODES] = {
  733. -0.105488f, -0.218662f, 0.010980f, -0.226979f, 0.028076f, 0.743430f,
  734. 0.789266f, 0.031907f, -1.464200f, 0.222336f, -1.068493f, -0.052712f,
  735. -0.176181f, -0.102654f, -0.973932f, -0.182637f, -0.198000f, 0.335977f,
  736. 0.271346f, 0.133005f, 1.674203f, 0.689567f, 0.657133f, 0.283524f,
  737. 0.115529f, 0.738327f, 0.317184f, -0.179736f, 0.403691f, 0.679350f,
  738. 0.048925f, 0.271338f, -1.538921f, -0.900737f, -1.377845f, 0.084245f,
  739. 0.803122f, -0.107806f, 0.103045f, -0.023335f, -0.098116f, -0.127809f,
  740. 0.037665f, -0.523225f, 1.622185f, 1.903999f, 1.358889f, 1.680785f,
  741. 0.027743f, 0.117906f, -0.158810f, 0.057775f, 0.168257f, 0.062414f,
  742. 0.086228f, -0.087381f, -3.066082f, 3.021855f, -4.092155f, 2.550104f,
  743. -0.230022f, -0.207445f, -0.000347f, 0.034042f, 0.097057f, 0.220088f,
  744. -0.228841f, -0.029405f, -1.507174f, -1.455184f, 2.624904f, 2.643355f,
  745. 0.319912f, 0.585531f, -1.018225f, -0.699606f, 1.026490f, 0.169952f,
  746. -0.093579f, -0.142352f, -0.107256f, 0.059598f, 0.043190f, 0.507543f,
  747. -0.138617f, 0.030197f, 0.059574f, -0.634051f, -0.586724f, -0.148020f,
  748. -0.334380f, 0.459547f, 1.620600f, 0.496850f, 0.639480f, -0.465715f,
  749. };
  750. static const float vp9_part_split_nn_bias_32_layer0[NODES] = {
  751. -1.125885f, 0.753197f, -0.825808f, 0.004839f,
  752. 0.583920f, 0.718062f, 0.976741f, 0.796188f,
  753. };
  754. static const float vp9_part_split_nn_weights_32_layer1[NODES * LABELS] = {
  755. -0.458745f, 0.724624f, -0.479720f, -2.199872f,
  756. 1.162661f, 1.194153f, -0.716896f, 0.824080f,
  757. };
  758. static const float vp9_part_split_nn_bias_32_layer1[LABELS] = {
  759. 0.71644074f,
  760. };
  761. static const NN_CONFIG vp9_part_split_nnconfig_32 = {
  762. FEATURES, // num_inputs
  763. LABELS, // num_outputs
  764. 1, // num_hidden_layers
  765. {
  766. NODES,
  767. }, // num_hidden_nodes
  768. {
  769. vp9_part_split_nn_weights_32_layer0,
  770. vp9_part_split_nn_weights_32_layer1,
  771. },
  772. {
  773. vp9_part_split_nn_bias_32_layer0,
  774. vp9_part_split_nn_bias_32_layer1,
  775. },
  776. };
  777. static const float vp9_part_split_nn_weights_16_layer0[FEATURES * NODES] = {
  778. -0.003629f, -0.046852f, 0.220428f, -0.033042f, 0.049365f, 0.112818f,
  779. -0.306149f, -0.005872f, 1.066947f, -2.290226f, 2.159505f, -0.618714f,
  780. -0.213294f, 0.451372f, -0.199459f, 0.223730f, -0.321709f, 0.063364f,
  781. 0.148704f, -0.293371f, 0.077225f, -0.421947f, -0.515543f, -0.240975f,
  782. -0.418516f, 1.036523f, -0.009165f, 0.032484f, 1.086549f, 0.220322f,
  783. -0.247585f, -0.221232f, -0.225050f, 0.993051f, 0.285907f, 1.308846f,
  784. 0.707456f, 0.335152f, 0.234556f, 0.264590f, -0.078033f, 0.542226f,
  785. 0.057777f, 0.163471f, 0.039245f, -0.725960f, 0.963780f, -0.972001f,
  786. 0.252237f, -0.192745f, -0.836571f, -0.460539f, -0.528713f, -0.160198f,
  787. -0.621108f, 0.486405f, -0.221923f, 1.519426f, -0.857871f, 0.411595f,
  788. 0.947188f, 0.203339f, 0.174526f, 0.016382f, 0.256879f, 0.049818f,
  789. 0.057836f, -0.659096f, 0.459894f, 0.174695f, 0.379359f, 0.062530f,
  790. -0.210201f, -0.355788f, -0.208432f, -0.401723f, -0.115373f, 0.191336f,
  791. -0.109342f, 0.002455f, -0.078746f, -0.391871f, 0.149892f, -0.239615f,
  792. -0.520709f, 0.118568f, -0.437975f, 0.118116f, -0.565426f, -0.206446f,
  793. 0.113407f, 0.558894f, 0.534627f, 1.154350f, -0.116833f, 1.723311f,
  794. };
  795. static const float vp9_part_split_nn_bias_16_layer0[NODES] = {
  796. 0.013109f, -0.034341f, 0.679845f, -0.035781f,
  797. -0.104183f, 0.098055f, -0.041130f, 0.160107f,
  798. };
  799. static const float vp9_part_split_nn_weights_16_layer1[NODES * LABELS] = {
  800. 1.499564f, -0.403259f, 1.366532f, -0.469868f,
  801. 0.482227f, -2.076697f, 0.527691f, 0.540495f,
  802. };
  803. static const float vp9_part_split_nn_bias_16_layer1[LABELS] = {
  804. 0.01134653f,
  805. };
  806. static const NN_CONFIG vp9_part_split_nnconfig_16 = {
  807. FEATURES, // num_inputs
  808. LABELS, // num_outputs
  809. 1, // num_hidden_layers
  810. {
  811. NODES,
  812. }, // num_hidden_nodes
  813. {
  814. vp9_part_split_nn_weights_16_layer0,
  815. vp9_part_split_nn_weights_16_layer1,
  816. },
  817. {
  818. vp9_part_split_nn_bias_16_layer0,
  819. vp9_part_split_nn_bias_16_layer1,
  820. },
  821. };
  822. static const float vp9_part_split_nn_weights_8_layer0[FEATURES * NODES] = {
  823. -0.668875f, -0.159078f, -0.062663f, -0.483785f, -0.146814f, -0.608975f,
  824. -0.589145f, 0.203704f, -0.051007f, -0.113769f, -0.477511f, -0.122603f,
  825. -1.329890f, 1.403386f, 0.199636f, -0.161139f, 2.182090f, -0.014307f,
  826. 0.015755f, -0.208468f, 0.884353f, 0.815920f, 0.632464f, 0.838225f,
  827. 1.369483f, -0.029068f, 0.570213f, -0.573546f, 0.029617f, 0.562054f,
  828. -0.653093f, -0.211910f, -0.661013f, -0.384418f, -0.574038f, -0.510069f,
  829. 0.173047f, -0.274231f, -1.044008f, -0.422040f, -0.810296f, 0.144069f,
  830. -0.406704f, 0.411230f, -0.144023f, 0.745651f, -0.595091f, 0.111787f,
  831. 0.840651f, 0.030123f, -0.242155f, 0.101486f, -0.017889f, -0.254467f,
  832. -0.285407f, -0.076675f, -0.549542f, -0.013544f, -0.686566f, -0.755150f,
  833. 1.623949f, -0.286369f, 0.170976f, 0.016442f, -0.598353f, -0.038540f,
  834. 0.202597f, -0.933582f, 0.599510f, 0.362273f, 0.577722f, 0.477603f,
  835. 0.767097f, 0.431532f, 0.457034f, 0.223279f, 0.381349f, 0.033777f,
  836. 0.423923f, -0.664762f, 0.385662f, 0.075744f, 0.182681f, 0.024118f,
  837. 0.319408f, -0.528864f, 0.976537f, -0.305971f, -0.189380f, -0.241689f,
  838. -1.318092f, 0.088647f, -0.109030f, -0.945654f, 1.082797f, 0.184564f,
  839. };
  840. static const float vp9_part_split_nn_bias_8_layer0[NODES] = {
  841. -0.237472f, 2.051396f, 0.297062f, -0.730194f,
  842. 0.060472f, -0.565959f, 0.560869f, -0.395448f,
  843. };
  844. static const float vp9_part_split_nn_weights_8_layer1[NODES * LABELS] = {
  845. 0.568121f, 1.575915f, -0.544309f, 0.751595f,
  846. -0.117911f, -1.340730f, -0.739671f, 0.661216f,
  847. };
  848. static const float vp9_part_split_nn_bias_8_layer1[LABELS] = {
  849. -0.63375306f,
  850. };
  851. static const NN_CONFIG vp9_part_split_nnconfig_8 = {
  852. FEATURES, // num_inputs
  853. LABELS, // num_outputs
  854. 1, // num_hidden_layers
  855. {
  856. NODES,
  857. }, // num_hidden_nodes
  858. {
  859. vp9_part_split_nn_weights_8_layer0,
  860. vp9_part_split_nn_weights_8_layer1,
  861. },
  862. {
  863. vp9_part_split_nn_bias_8_layer0,
  864. vp9_part_split_nn_bias_8_layer1,
  865. },
  866. };
  867. #undef NODES
  868. #undef FEATURES
  869. #undef LABELS
  870. // Partition pruning model(linear).
  871. static const float vp9_partition_feature_mean[24] = {
  872. 303501.697372f, 3042630.372158f, 24.694696f, 1.392182f,
  873. 689.413511f, 162.027012f, 1.478213f, 0.0,
  874. 135382.260230f, 912738.513263f, 28.845217f, 1.515230f,
  875. 544.158492f, 131.807995f, 1.436863f, 0.0f,
  876. 43682.377587f, 208131.711766f, 28.084737f, 1.356677f,
  877. 138.254122f, 119.522553f, 1.252322f, 0.0f,
  878. };
  879. static const float vp9_partition_feature_std[24] = {
  880. 673689.212982f, 5996652.516628f, 0.024449f, 1.989792f,
  881. 985.880847f, 0.014638f, 2.001898f, 0.0f,
  882. 208798.775332f, 1812548.443284f, 0.018693f, 1.838009f,
  883. 396.986910f, 0.015657f, 1.332541f, 0.0f,
  884. 55888.847031f, 448587.962714f, 0.017900f, 1.904776f,
  885. 98.652832f, 0.016598f, 1.320992f, 0.0f,
  886. };
  887. // Error tolerance: 0.01%-0.0.05%-0.1%
  888. static const float vp9_partition_linear_weights[24] = {
  889. 0.111736f, 0.289977f, 0.042219f, 0.204765f, 0.120410f, -0.143863f,
  890. 0.282376f, 0.847811f, 0.637161f, 0.131570f, 0.018636f, 0.202134f,
  891. 0.112797f, 0.028162f, 0.182450f, 1.124367f, 0.386133f, 0.083700f,
  892. 0.050028f, 0.150873f, 0.061119f, 0.109318f, 0.127255f, 0.625211f,
  893. };
  894. #ifdef __cplusplus
  895. } // extern "C"
  896. #endif
  897. #endif // VPX_VP9_ENCODER_VP9_PARTITION_MODELS_H_