summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_entropy.c208
-rw-r--r--vp9/common/vp9_entropy.h14
-rw-r--r--vp9/decoder/vp9_detokenize.c2
-rw-r--r--vp9/decoder/vp9_idct_blk.c25
-rw-r--r--vp9/encoder/vp9_encodemb.c2
-rw-r--r--vp9/encoder/vp9_quantize.c4
-rw-r--r--vp9/encoder/vp9_rdopt.c2
-rw-r--r--vp9/encoder/vp9_tokenize.c2
8 files changed, 37 insertions, 222 deletions
diff --git a/vp9/common/vp9_entropy.c b/vp9/common/vp9_entropy.c
index b7860e026..d4d64b428 100644
--- a/vp9/common/vp9_entropy.c
+++ b/vp9/common/vp9_entropy.c
@@ -70,8 +70,7 @@ DECLARE_ALIGNED(16, const uint8_t, vp9_pt_energy_class[MAX_ENTROPY_TOKENS]) = {
0, 1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5
};
-#if CONFIG_SCATTERSCAN
-DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_4x4[16]) = {
+DECLARE_ALIGNED(16, const int, vp9_default_scan_4x4[16]) = {
0, 4, 1, 5,
8, 2, 12, 9,
3, 6, 13, 10,
@@ -92,7 +91,7 @@ DECLARE_ALIGNED(16, const int, vp9_row_scan_4x4[16]) = {
13, 11, 14, 15,
};
-DECLARE_ALIGNED(64, const int, vp9_default_zig_zag1d_8x8[64]) = {
+DECLARE_ALIGNED(64, const int, vp9_default_scan_8x8[64]) = {
0, 8, 1, 16, 9, 2, 17, 24,
10, 3, 18, 25, 32, 11, 4, 26,
33, 19, 40, 12, 34, 27, 5, 41,
@@ -125,7 +124,7 @@ DECLARE_ALIGNED(16, const int, vp9_row_scan_8x8[64]) = {
60, 39, 61, 47, 54, 55, 62, 63,
};
-DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]) = {
+DECLARE_ALIGNED(16, const int, vp9_default_scan_16x16[256]) = {
0, 16, 1, 32, 17, 2, 48, 33, 18, 3, 64, 34, 49, 19, 65, 80,
50, 4, 35, 66, 20, 81, 96, 51, 5, 36, 82, 97, 67, 112, 21, 52,
98, 37, 83, 113, 6, 68, 128, 53, 22, 99, 114, 84, 7, 129, 38, 69,
@@ -182,7 +181,7 @@ DECLARE_ALIGNED(16, const int, vp9_row_scan_16x16[256]) = {
190, 251, 221, 191, 206, 236, 207, 237, 252, 222, 253, 223, 238, 239, 254, 255,
};
-DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_32x32[1024]) = {
+DECLARE_ALIGNED(16, const int, vp9_default_scan_32x32[1024]) = {
0, 32, 1, 64, 33, 2, 96, 65, 34, 128, 3, 97, 66, 160, 129, 35, 98, 4, 67, 130, 161, 192, 36, 99, 224, 5, 162, 193, 68, 131, 37, 100,
225, 194, 256, 163, 69, 132, 6, 226, 257, 288, 195, 101, 164, 38, 258, 7, 227, 289, 133, 320, 70, 196, 165, 290, 259, 228, 39, 321, 102, 352, 8, 197,
71, 134, 322, 291, 260, 353, 384, 229, 166, 103, 40, 354, 323, 292, 135, 385, 198, 261, 72, 9, 416, 167, 386, 355, 230, 324, 104, 293, 41, 417, 199, 136,
@@ -216,165 +215,6 @@ DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_32x32[1024]) = {
827, 985, 922, 1016, 764, 606, 543, 701, 859, 638, 1017, 575, 796, 954, 733, 891, 670, 607, 828, 986, 765, 923, 639, 1018, 702, 860, 955, 671, 892, 734, 797, 703,
987, 829, 1019, 766, 924, 735, 861, 956, 988, 893, 767, 798, 830, 1020, 925, 957, 799, 862, 831, 989, 894, 1021, 863, 926, 895, 958, 990, 1022, 927, 959, 991, 1023,
};
-#else // CONFIG_SCATTERSCAN
-DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_4x4[16]) = {
- 0, 1, 4, 8,
- 5, 2, 3, 6,
- 9, 12, 13, 10,
- 7, 11, 14, 15,
-};
-
-DECLARE_ALIGNED(16, const int, vp9_col_scan_4x4[16]) = {
- 0, 4, 8, 12,
- 1, 5, 9, 13,
- 2, 6, 10, 14,
- 3, 7, 11, 15
-};
-
-DECLARE_ALIGNED(16, const int, vp9_row_scan_4x4[16]) = {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15
-};
-
-DECLARE_ALIGNED(64, const int, vp9_default_zig_zag1d_8x8[64]) = {
- 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5,
- 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28,
- 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51,
- 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63,
-};
-
-DECLARE_ALIGNED(16, const int, vp9_col_scan_8x8[64]) = {
- 0, 8, 16, 24, 32, 40, 48, 56,
- 1, 9, 17, 25, 33, 41, 49, 57,
- 2, 10, 18, 26, 34, 42, 50, 58,
- 3, 11, 19, 27, 35, 43, 51, 59,
- 4, 12, 20, 28, 36, 44, 52, 60,
- 5, 13, 21, 29, 37, 45, 53, 61,
- 6, 14, 22, 30, 38, 46, 54, 62,
- 7, 15, 23, 31, 39, 47, 55, 63,
-};
-
-DECLARE_ALIGNED(16, const int, vp9_row_scan_8x8[64]) = {
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63,
-};
-
-DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]) = {
- 0, 1, 16, 32, 17, 2, 3, 18,
- 33, 48, 64, 49, 34, 19, 4, 5,
- 20, 35, 50, 65, 80, 96, 81, 66,
- 51, 36, 21, 6, 7, 22, 37, 52,
- 67, 82, 97, 112, 128, 113, 98, 83,
- 68, 53, 38, 23, 8, 9, 24, 39,
- 54, 69, 84, 99, 114, 129, 144, 160,
- 145, 130, 115, 100, 85, 70, 55, 40,
- 25, 10, 11, 26, 41, 56, 71, 86,
- 101, 116, 131, 146, 161, 176, 192, 177,
- 162, 147, 132, 117, 102, 87, 72, 57,
- 42, 27, 12, 13, 28, 43, 58, 73,
- 88, 103, 118, 133, 148, 163, 178, 193,
- 208, 224, 209, 194, 179, 164, 149, 134,
- 119, 104, 89, 74, 59, 44, 29, 14,
- 15, 30, 45, 60, 75, 90, 105, 120,
- 135, 150, 165, 180, 195, 210, 225, 240,
- 241, 226, 211, 196, 181, 166, 151, 136,
- 121, 106, 91, 76, 61, 46, 31, 47,
- 62, 77, 92, 107, 122, 137, 152, 167,
- 182, 197, 212, 227, 242, 243, 228, 213,
- 198, 183, 168, 153, 138, 123, 108, 93,
- 78, 63, 79, 94, 109, 124, 139, 154,
- 169, 184, 199, 214, 229, 244, 245, 230,
- 215, 200, 185, 170, 155, 140, 125, 110,
- 95, 111, 126, 141, 156, 171, 186, 201,
- 216, 231, 246, 247, 232, 217, 202, 187,
- 172, 157, 142, 127, 143, 158, 173, 188,
- 203, 218, 233, 248, 249, 234, 219, 204,
- 189, 174, 159, 175, 190, 205, 220, 235,
- 250, 251, 236, 221, 206, 191, 207, 222,
- 237, 252, 253, 238, 223, 239, 254, 255,
-};
-
-DECLARE_ALIGNED(16, const int, vp9_col_scan_16x16[256]) = {
- 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240,
- 1, 17, 33, 49, 65, 81, 97, 113, 129, 145, 161, 177, 193, 209, 225, 241,
- 2, 18, 34, 50, 66, 82, 98, 114, 130, 146, 162, 178, 194, 210, 226, 242,
- 3, 19, 35, 51, 67, 83, 99, 115, 131, 147, 163, 179, 195, 211, 227, 243,
- 4, 20, 36, 52, 68, 84, 100, 116, 132, 148, 164, 180, 196, 212, 228, 244,
- 5, 21, 37, 53, 69, 85, 101, 117, 133, 149, 165, 181, 197, 213, 229, 245,
- 6, 22, 38, 54, 70, 86, 102, 118, 134, 150, 166, 182, 198, 214, 230, 246,
- 7, 23, 39, 55, 71, 87, 103, 119, 135, 151, 167, 183, 199, 215, 231, 247,
- 8, 24, 40, 56, 72, 88, 104, 120, 136, 152, 168, 184, 200, 216, 232, 248,
- 9, 25, 41, 57, 73, 89, 105, 121, 137, 153, 169, 185, 201, 217, 233, 249,
- 10, 26, 42, 58, 74, 90, 106, 122, 138, 154, 170, 186, 202, 218, 234, 250,
- 11, 27, 43, 59, 75, 91, 107, 123, 139, 155, 171, 187, 203, 219, 235, 251,
- 12, 28, 44, 60, 76, 92, 108, 124, 140, 156, 172, 188, 204, 220, 236, 252,
- 13, 29, 45, 61, 77, 93, 109, 125, 141, 157, 173, 189, 205, 221, 237, 253,
- 14, 30, 46, 62, 78, 94, 110, 126, 142, 158, 174, 190, 206, 222, 238, 254,
- 15, 31, 47, 63, 79, 95, 111, 127, 143, 159, 175, 191, 207, 223, 239, 255,
-};
-
-DECLARE_ALIGNED(16, const int, vp9_row_scan_16x16[256]) = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
- 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
- 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
- 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
-};
-
-DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_32x32[1024]) = {
- 0, 1, 32, 64, 33, 2, 3, 34, 65, 96, 128, 97, 66, 35, 4, 5, 36, 67, 98, 129, 160, 192, 161, 130, 99, 68, 37, 6, 7, 38, 69, 100,
- 131, 162, 193, 224, 256, 225, 194, 163, 132, 101, 70, 39, 8, 9, 40, 71, 102, 133, 164, 195, 226, 257, 288, 320, 289, 258, 227, 196, 165, 134, 103, 72,
- 41, 10, 11, 42, 73, 104, 135, 166, 197, 228, 259, 290, 321, 352, 384, 353, 322, 291, 260, 229, 198, 167, 136, 105, 74, 43, 12, 13, 44, 75, 106, 137,
- 168, 199, 230, 261, 292, 323, 354, 385, 416, 448, 417, 386, 355, 324, 293, 262, 231, 200, 169, 138, 107, 76, 45, 14, 15, 46, 77, 108, 139, 170, 201, 232,
- 263, 294, 325, 356, 387, 418, 449, 480, 512, 481, 450, 419, 388, 357, 326, 295, 264, 233, 202, 171, 140, 109, 78, 47, 16, 17, 48, 79, 110, 141, 172, 203,
- 234, 265, 296, 327, 358, 389, 420, 451, 482, 513, 544, 576, 545, 514, 483, 452, 421, 390, 359, 328, 297, 266, 235, 204, 173, 142, 111, 80, 49, 18, 19, 50,
- 81, 112, 143, 174, 205, 236, 267, 298, 329, 360, 391, 422, 453, 484, 515, 546, 577, 608, 640, 609, 578, 547, 516, 485, 454, 423, 392, 361, 330, 299, 268, 237,
- 206, 175, 144, 113, 82, 51, 20, 21, 52, 83, 114, 145, 176, 207, 238, 269, 300, 331, 362, 393, 424, 455, 486, 517, 548, 579, 610, 641, 672, 704, 673, 642,
- 611, 580, 549, 518, 487, 456, 425, 394, 363, 332, 301, 270, 239, 208, 177, 146, 115, 84, 53, 22, 23, 54, 85, 116, 147, 178, 209, 240, 271, 302, 333, 364,
- 395, 426, 457, 488, 519, 550, 581, 612, 643, 674, 705, 736, 768, 737, 706, 675, 644, 613, 582, 551, 520, 489, 458, 427, 396, 365, 334, 303, 272, 241, 210, 179,
- 148, 117, 86, 55, 24, 25, 56, 87, 118, 149, 180, 211, 242, 273, 304, 335, 366, 397, 428, 459, 490, 521, 552, 583, 614, 645, 676, 707, 738, 769, 800, 832,
- 801, 770, 739, 708, 677, 646, 615, 584, 553, 522, 491, 460, 429, 398, 367, 336, 305, 274, 243, 212, 181, 150, 119, 88, 57, 26, 27, 58, 89, 120, 151, 182,
- 213, 244, 275, 306, 337, 368, 399, 430, 461, 492, 523, 554, 585, 616, 647, 678, 709, 740, 771, 802, 833, 864, 896, 865, 834, 803, 772, 741, 710, 679, 648, 617,
- 586, 555, 524, 493, 462, 431, 400, 369, 338, 307, 276, 245, 214, 183, 152, 121, 90, 59, 28, 29, 60, 91, 122, 153, 184, 215, 246, 277, 308, 339, 370, 401,
- 432, 463, 494, 525, 556, 587, 618, 649, 680, 711, 742, 773, 804, 835, 866, 897, 928, 960, 929, 898, 867, 836, 805, 774, 743, 712, 681, 650, 619, 588, 557, 526,
- 495, 464, 433, 402, 371, 340, 309, 278, 247, 216, 185, 154, 123, 92, 61, 30, 31, 62, 93, 124, 155, 186, 217, 248, 279, 310, 341, 372, 403, 434, 465, 496,
- 527, 558, 589, 620, 651, 682, 713, 744, 775, 806, 837, 868, 899, 930, 961, 992, 993, 962, 931, 900, 869, 838, 807, 776, 745, 714, 683, 652, 621, 590, 559, 528,
- 497, 466, 435, 404, 373, 342, 311, 280, 249, 218, 187, 156, 125, 94, 63, 95, 126, 157, 188, 219, 250, 281, 312, 343, 374, 405, 436, 467, 498, 529, 560, 591,
- 622, 653, 684, 715, 746, 777, 808, 839, 870, 901, 932, 963, 994, 995, 964, 933, 902, 871, 840, 809, 778, 747, 716, 685, 654, 623, 592, 561, 530, 499, 468, 437,
- 406, 375, 344, 313, 282, 251, 220, 189, 158, 127, 159, 190, 221, 252, 283, 314, 345, 376, 407, 438, 469, 500, 531, 562, 593, 624, 655, 686, 717, 748, 779, 810,
- 841, 872, 903, 934, 965, 996, 997, 966, 935, 904, 873, 842, 811, 780, 749, 718, 687, 656, 625, 594, 563, 532, 501, 470, 439, 408, 377, 346, 315, 284, 253, 222,
- 191, 223, 254, 285, 316, 347, 378, 409, 440, 471, 502, 533, 564, 595, 626, 657, 688, 719, 750, 781, 812, 843, 874, 905, 936, 967, 998, 999, 968, 937, 906, 875,
- 844, 813, 782, 751, 720, 689, 658, 627, 596, 565, 534, 503, 472, 441, 410, 379, 348, 317, 286, 255, 287, 318, 349, 380, 411, 442, 473, 504, 535, 566, 597, 628,
- 659, 690, 721, 752, 783, 814, 845, 876, 907, 938, 969, 1000, 1001, 970, 939, 908, 877, 846, 815, 784, 753, 722, 691, 660, 629, 598, 567, 536, 505, 474, 443, 412,
- 381, 350, 319, 351, 382, 413, 444, 475, 506, 537, 568, 599, 630, 661, 692, 723, 754, 785, 816, 847, 878, 909, 940, 971, 1002, 1003, 972, 941, 910, 879, 848, 817,
- 786, 755, 724, 693, 662, 631, 600, 569, 538, 507, 476, 445, 414, 383, 415, 446, 477, 508, 539, 570, 601, 632, 663, 694, 725, 756, 787, 818, 849, 880, 911, 942,
- 973, 1004, 1005, 974, 943, 912, 881, 850, 819, 788, 757, 726, 695, 664, 633, 602, 571, 540, 509, 478, 447, 479, 510, 541, 572, 603, 634, 665, 696, 727, 758, 789,
- 820, 851, 882, 913, 944, 975, 1006, 1007, 976, 945, 914, 883, 852, 821, 790, 759, 728, 697, 666, 635, 604, 573, 542, 511, 543, 574, 605, 636, 667, 698, 729, 760,
- 791, 822, 853, 884, 915, 946, 977, 1008, 1009, 978, 947, 916, 885, 854, 823, 792, 761, 730, 699, 668, 637, 606, 575, 607, 638, 669, 700, 731, 762, 793, 824, 855,
- 886, 917, 948, 979, 1010, 1011, 980, 949, 918, 887, 856, 825, 794, 763, 732, 701, 670, 639, 671, 702, 733, 764, 795, 826, 857, 888, 919, 950, 981, 1012, 1013, 982,
- 951, 920, 889, 858, 827, 796, 765, 734, 703, 735, 766, 797, 828, 859, 890, 921, 952, 983, 1014, 1015, 984, 953, 922, 891, 860, 829, 798, 767, 799, 830, 861, 892,
- 923, 954, 985, 1016, 1017, 986, 955, 924, 893, 862, 831, 863, 894, 925, 956, 987, 1018, 1019, 988, 957, 926, 895, 927, 958, 989, 1020, 1021, 990, 959, 991, 1022, 1023,
-};
-#endif // CONFIG_SCATTERSCAN
/* Array indices are identical to previously-existing CONTEXT_NODE indices */
@@ -667,7 +507,7 @@ void vp9_default_coef_probs(VP9_COMMON *pc) {
// for each position in raster scan order.
// -1 indicates the neighbor does not exist.
DECLARE_ALIGNED(16, int,
- vp9_default_zig_zag1d_4x4_neighbors[16 * MAX_NEIGHBORS]);
+ vp9_default_scan_4x4_neighbors[16 * MAX_NEIGHBORS]);
DECLARE_ALIGNED(16, int,
vp9_col_scan_4x4_neighbors[16 * MAX_NEIGHBORS]);
DECLARE_ALIGNED(16, int,
@@ -677,15 +517,15 @@ DECLARE_ALIGNED(16, int,
DECLARE_ALIGNED(16, int,
vp9_row_scan_8x8_neighbors[64 * MAX_NEIGHBORS]);
DECLARE_ALIGNED(16, int,
- vp9_default_zig_zag1d_8x8_neighbors[64 * MAX_NEIGHBORS]);
+ vp9_default_scan_8x8_neighbors[64 * MAX_NEIGHBORS]);
DECLARE_ALIGNED(16, int,
vp9_col_scan_16x16_neighbors[256 * MAX_NEIGHBORS]);
DECLARE_ALIGNED(16, int,
vp9_row_scan_16x16_neighbors[256 * MAX_NEIGHBORS]);
DECLARE_ALIGNED(16, int,
- vp9_default_zig_zag1d_16x16_neighbors[256 * MAX_NEIGHBORS]);
+ vp9_default_scan_16x16_neighbors[256 * MAX_NEIGHBORS]);
DECLARE_ALIGNED(16, int,
- vp9_default_zig_zag1d_32x32_neighbors[1024 * MAX_NEIGHBORS]);
+ vp9_default_scan_32x32_neighbors[1024 * MAX_NEIGHBORS]);
static int find_in_scan(const int *scan, int l, int idx) {
int n, l2 = l * l;
@@ -747,59 +587,59 @@ static void init_scan_neighbors(const int *scan, int l, int *neighbors,
}
void vp9_init_neighbors() {
- init_scan_neighbors(vp9_default_zig_zag1d_4x4, 4,
- vp9_default_zig_zag1d_4x4_neighbors, MAX_NEIGHBORS);
+ init_scan_neighbors(vp9_default_scan_4x4, 4,
+ vp9_default_scan_4x4_neighbors, MAX_NEIGHBORS);
init_scan_neighbors(vp9_row_scan_4x4, 4,
vp9_row_scan_4x4_neighbors, MAX_NEIGHBORS);
init_scan_neighbors(vp9_col_scan_4x4, 4,
vp9_col_scan_4x4_neighbors, MAX_NEIGHBORS);
- init_scan_neighbors(vp9_default_zig_zag1d_8x8, 8,
- vp9_default_zig_zag1d_8x8_neighbors, MAX_NEIGHBORS);
+ init_scan_neighbors(vp9_default_scan_8x8, 8,
+ vp9_default_scan_8x8_neighbors, MAX_NEIGHBORS);
init_scan_neighbors(vp9_row_scan_8x8, 8,
vp9_row_scan_8x8_neighbors, MAX_NEIGHBORS);
init_scan_neighbors(vp9_col_scan_8x8, 8,
vp9_col_scan_8x8_neighbors, MAX_NEIGHBORS);
- init_scan_neighbors(vp9_default_zig_zag1d_16x16, 16,
- vp9_default_zig_zag1d_16x16_neighbors, MAX_NEIGHBORS);
+ init_scan_neighbors(vp9_default_scan_16x16, 16,
+ vp9_default_scan_16x16_neighbors, MAX_NEIGHBORS);
init_scan_neighbors(vp9_row_scan_16x16, 16,
vp9_row_scan_16x16_neighbors, MAX_NEIGHBORS);
init_scan_neighbors(vp9_col_scan_16x16, 16,
vp9_col_scan_16x16_neighbors, MAX_NEIGHBORS);
- init_scan_neighbors(vp9_default_zig_zag1d_32x32, 32,
- vp9_default_zig_zag1d_32x32_neighbors, MAX_NEIGHBORS);
+ init_scan_neighbors(vp9_default_scan_32x32, 32,
+ vp9_default_scan_32x32_neighbors, MAX_NEIGHBORS);
}
const int *vp9_get_coef_neighbors_handle(const int *scan, int *pad) {
- if (scan == vp9_default_zig_zag1d_4x4) {
+ if (scan == vp9_default_scan_4x4) {
*pad = MAX_NEIGHBORS;
- return vp9_default_zig_zag1d_4x4_neighbors;
+ return vp9_default_scan_4x4_neighbors;
} else if (scan == vp9_row_scan_4x4) {
*pad = MAX_NEIGHBORS;
return vp9_row_scan_4x4_neighbors;
} else if (scan == vp9_col_scan_4x4) {
*pad = MAX_NEIGHBORS;
return vp9_col_scan_4x4_neighbors;
- } else if (scan == vp9_default_zig_zag1d_8x8) {
+ } else if (scan == vp9_default_scan_8x8) {
*pad = MAX_NEIGHBORS;
- return vp9_default_zig_zag1d_8x8_neighbors;
+ return vp9_default_scan_8x8_neighbors;
} else if (scan == vp9_row_scan_8x8) {
*pad = 2;
return vp9_row_scan_8x8_neighbors;
} else if (scan == vp9_col_scan_8x8) {
*pad = 2;
return vp9_col_scan_8x8_neighbors;
- } else if (scan == vp9_default_zig_zag1d_16x16) {
+ } else if (scan == vp9_default_scan_16x16) {
*pad = MAX_NEIGHBORS;
- return vp9_default_zig_zag1d_16x16_neighbors;
+ return vp9_default_scan_16x16_neighbors;
} else if (scan == vp9_row_scan_16x16) {
*pad = 2;
return vp9_row_scan_16x16_neighbors;
} else if (scan == vp9_col_scan_16x16) {
*pad = 2;
return vp9_col_scan_16x16_neighbors;
- } else if (scan == vp9_default_zig_zag1d_32x32) {
+ } else if (scan == vp9_default_scan_32x32) {
*pad = MAX_NEIGHBORS;
- return vp9_default_zig_zag1d_32x32_neighbors;
+ return vp9_default_scan_32x32_neighbors;
} else {
assert(0);
return NULL;
diff --git a/vp9/common/vp9_entropy.h b/vp9/common/vp9_entropy.h
index 8794b8581..2d8071c69 100644
--- a/vp9/common/vp9_entropy.h
+++ b/vp9/common/vp9_entropy.h
@@ -100,22 +100,22 @@ typedef vp9_prob vp9_coeff_probs[REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS]
struct VP9Common;
void vp9_default_coef_probs(struct VP9Common *);
-extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_4x4[16]);
+extern DECLARE_ALIGNED(16, const int, vp9_default_scan_4x4[16]);
extern DECLARE_ALIGNED(16, const int, vp9_col_scan_4x4[16]);
extern DECLARE_ALIGNED(16, const int, vp9_row_scan_4x4[16]);
-extern DECLARE_ALIGNED(64, const int, vp9_default_zig_zag1d_8x8[64]);
+extern DECLARE_ALIGNED(64, const int, vp9_default_scan_8x8[64]);
extern DECLARE_ALIGNED(16, const int, vp9_col_scan_8x8[64]);
extern DECLARE_ALIGNED(16, const int, vp9_row_scan_8x8[64]);
-extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]);
+extern DECLARE_ALIGNED(16, const int, vp9_default_scan_16x16[256]);
extern DECLARE_ALIGNED(16, const int, vp9_col_scan_16x16[256]);
extern DECLARE_ALIGNED(16, const int, vp9_row_scan_16x16[256]);
-extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_32x32[1024]);
+extern DECLARE_ALIGNED(16, const int, vp9_default_scan_32x32[1024]);
void vp9_coef_tree_initialize(void);
void vp9_adapt_coef_probs(struct VP9Common *);
@@ -193,7 +193,7 @@ static INLINE const int* get_scan_4x4(TX_TYPE tx_type) {
case DCT_ADST:
return vp9_col_scan_4x4;
default:
- return vp9_default_zig_zag1d_4x4;
+ return vp9_default_scan_4x4;
}
}
@@ -204,7 +204,7 @@ static INLINE const int* get_scan_8x8(TX_TYPE tx_type) {
case DCT_ADST:
return vp9_col_scan_8x8;
default:
- return vp9_default_zig_zag1d_8x8;
+ return vp9_default_scan_8x8;
}
}
@@ -215,7 +215,7 @@ static INLINE const int* get_scan_16x16(TX_TYPE tx_type) {
case DCT_ADST:
return vp9_col_scan_16x16;
default:
- return vp9_default_zig_zag1d_16x16;
+ return vp9_default_scan_16x16;
}
}
diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c
index 546de5f85..a0263e699 100644
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -159,7 +159,7 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
break;
}
case TX_32X32:
- scan = vp9_default_zig_zag1d_32x32;
+ scan = vp9_default_scan_32x32;
coef_probs = fc->coef_probs_32x32[type][ref];
coef_counts = fc->coef_counts_32x32;
above_ec = (A[0] + A[1] + A[2] + A[3] + A[4] + A[5] + A[6] + A[7]) != 0;
diff --git a/vp9/decoder/vp9_idct_blk.c b/vp9/decoder/vp9_idct_blk.c
index f26f87c64..417f89177 100644
--- a/vp9/decoder/vp9_idct_blk.c
+++ b/vp9/decoder/vp9_idct_blk.c
@@ -174,14 +174,6 @@ void vp9_idct_add_8x8_c(int16_t *input, uint8_t *dest, int stride, int eob) {
input[0] = 0;
vp9_add_constant_residual_8x8(out, dest, stride);
-#if !CONFIG_SCATTERSCAN
- } else if (eob <= 10) {
- vp9_short_idct10_8x8_add(input, dest, stride);
- input[0] = input[1] = input[2] = input[3] = 0;
- input[8] = input[9] = input[10] = 0;
- input[16] = input[17] = 0;
- input[24] = 0;
-#endif
} else {
vp9_short_idct8x8_add(input, dest, stride);
vpx_memset(input, 0, 128);
@@ -215,14 +207,6 @@ void vp9_idct_add_16x16_c(int16_t *input, uint8_t *dest, int stride, int eob) {
input[0] = 0;
vp9_add_constant_residual_16x16(out, dest, stride);
-#if !CONFIG_SCATTERSCAN
- } else if (eob <= 10) {
- vp9_short_idct10_16x16_add(input, dest, stride);
- input[0] = input[1] = input[2] = input[3] = 0;
- input[16] = input[17] = input[18] = 0;
- input[32] = input[33] = 0;
- input[48] = 0;
-#endif
} else {
vp9_short_idct16x16_add(input, dest, stride);
vpx_memset(input, 0, 512);
@@ -238,15 +222,6 @@ void vp9_idct_add_32x32_c(int16_t *input, uint8_t *dest, int stride, int eob) {
vp9_short_idct1_32x32(input, output);
vp9_add_constant_residual_32x32(output[0], dest, stride);
input[0] = 0;
-#if !CONFIG_SCATTERSCAN
- } else if (eob <= 10) {
- vp9_short_idct10_32x32_add_c(input, dest, stride);
- input[0] = input[1] = input[2] = input[3] = 0;
- input[32] = input[33] = input[34] = 0;
- input[64] = input[65] = 0;
- input[96] = 0;
-
-#endif
} else {
vp9_short_idct32x32_add(input, dest, stride);
vpx_memset(input, 0, 2048);
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index a4991f21a..3f2061c64 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -167,7 +167,7 @@ static void optimize_b(VP9_COMMON *const cm, MACROBLOCK *mb,
break;
}
case TX_32X32:
- scan = vp9_default_zig_zag1d_32x32;
+ scan = vp9_default_scan_32x32;
default_eob = 1024;
band_translate = vp9_coefband_trans_8x8plus;
break;
diff --git a/vp9/encoder/vp9_quantize.c b/vp9/encoder/vp9_quantize.c
index 9beda3466..53d8be775 100644
--- a/vp9/encoder/vp9_quantize.c
+++ b/vp9/encoder/vp9_quantize.c
@@ -93,7 +93,7 @@ void vp9_quantize(MACROBLOCK *mb, int plane, int block, int n_coeffs,
scan = get_scan_16x16(tx_type);
break;
default:
- scan = vp9_default_zig_zag1d_32x32;
+ scan = vp9_default_scan_32x32;
break;
}
@@ -197,7 +197,7 @@ void vp9_init_quantizer(VP9_COMP *cpi) {
#endif
// all the 4x4 ac values =;
for (i = 1; i < 16; i++) {
- int rc = vp9_default_zig_zag1d_4x4[i];
+ int rc = vp9_default_scan_4x4[i];
invert_quant(cpi->y_quant[q] + rc, cpi->y_quant_shift[q] + rc, quant_val);
cpi->y_zbin[q][rc] = ROUND_POWER_OF_TWO(qzbin_factor * quant_val, 7);
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 51f2e47b5..815fa05d7 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -329,7 +329,7 @@ static INLINE int cost_coeffs(VP9_COMMON *const cm, MACROBLOCK *mb,
break;
}
case TX_32X32:
- scan = vp9_default_zig_zag1d_32x32;
+ scan = vp9_default_scan_32x32;
vp9_model_to_full_probs_sb(cm->fc.coef_probs_32x32[type][ref],
coef_probs);
seg_eob = 1024;
diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c
index 759d4bb64..08efc84d4 100644
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -186,7 +186,7 @@ static void tokenize_b(int plane, int block, BLOCK_SIZE_TYPE bsize,
above_ec = (A[0] + A[1] + A[2] + A[3] + A[4] + A[5] + A[6] + A[7]) != 0;
left_ec = (L[0] + L[1] + L[2] + L[3] + L[4] + L[5] + L[6] + L[7]) != 0;
seg_eob = 1024;
- scan = vp9_default_zig_zag1d_32x32;
+ scan = vp9_default_scan_32x32;
counts = cpi->coef_counts_32x32;
coef_probs = cpi->common.fc.coef_probs_32x32;
band_translate = vp9_coefband_trans_8x8plus;