+// should the intra and inter lambdas be different?
+// I'm just matching the behaviour of deadzone quant.
+static const int x264_trellis_lambda2_tab[2][52] = {
+ // inter lambda = .85 * .85 * 2**(qp/3. + 10 - LAMBDA_BITS)
+ { 46, 58, 73, 92, 117, 147,
+ 185, 233, 294, 370, 466, 587,
+ 740, 932, 1174, 1480, 1864, 2349,
+ 2959, 3728, 4697, 5918, 7457, 9395,
+ 11837, 14914, 18790, 23674, 29828, 37581,
+ 47349, 59656, 75163, 94699, 119313, 150326,
+ 189399, 238627, 300652, 378798, 477255, 601304,
+ 757596, 954511, 1202608, 1515192, 1909022, 2405217,
+ 3030384, 3818045, 4810435, 6060769 },
+ // intra lambda = .65 * .65 * 2**(qp/3. + 10 - LAMBDA_BITS)
+ { 27, 34, 43, 54, 68, 86,
+ 108, 136, 172, 216, 273, 343,
+ 433, 545, 687, 865, 1090, 1374,
+ 1731, 2180, 2747, 3461, 4361, 5494,
+ 6922, 8721, 10988, 13844, 17442, 21976,
+ 27688, 34885, 43953, 55377, 69771, 87906,
+ 110755, 139543, 175813, 221511, 279087, 351627,
+ 443023, 558174, 703255, 886046, 1116348, 1406511,
+ 1772093, 2232697, 2813022, 3544186 }
+};
+
+static const uint16_t x264_chroma_lambda2_offset_tab[] = {
+ 16, 20, 25, 32, 40, 50,
+ 64, 80, 101, 128, 161, 203,
+ 256, 322, 406, 512, 645, 812,
+ 1024, 1290, 1625, 2048, 2580, 3250,
+ 4096, 5160, 6501, 8192, 10321, 13003,
+ 16384, 20642, 26007, 32768, 41285, 52015,
+ 65535
+};
+