ref: 649be94cf0d2c4c1e9a6a65708b6289799643462
parent: 097f2052896a57cbec5d267f05338e380b5f7072
author: Paul Wilkins <paulwilkins@google.com>
date: Mon Feb 11 07:35:28 EST 2013
Removal of Hybrid DWT/DCT experiment. Removal of experiment to simplify code base for other changes. Change-Id: If0a33952504558511926ad212bc311fc2bffb19a
--- a/configure
+++ b/configure
@@ -244,7 +244,6 @@
newbintramodes
comp_interintra_pred
tx64x64
- dwtdcthybrid
cnvcontext
newcoefcontext
enable_6tap
--- a/test/dct32x32_test.cc
+++ b/test/dct32x32_test.cc
@@ -36,7 +36,6 @@
}
#endif
-#if !CONFIG_DWTDCTHYBRID
static const double kPi = 3.141592653589793238462643383279502884;
static void reference2_32x32_idct_2d(double *input, double *output) {
double x;
@@ -127,9 +126,7 @@
}
}
}
-#else // CONFIG_DWTDCTHYBRID
- // TODO(rbultje/debargha): add DWT-specific tests
-#endif // CONFIG_DWTDCTHYBRID
+
TEST(VP9Fdct32x32Test, AccuracyCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
unsigned int max_error = 0;
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -47,18 +47,6 @@
#define MAX_MV_REFS 9
#define MAX_MV_REF_CANDIDATES 4
-#if CONFIG_DWTDCTHYBRID
-#define DWT_MAX_LENGTH 64
-#define DWT_TYPE 26 // 26/53/97
-#define DWT_PRECISION_BITS 2
-#define DWT_PRECISION_RND ((1 << DWT_PRECISION_BITS) / 2)
-
-#define DWTDCT16X16 0
-#define DWTDCT16X16_LEAN 1
-#define DWTDCT8X8 2
-#define DWTDCT_TYPE DWTDCT16X16_LEAN
-#endif
-
typedef struct {
int r, c;
} POS;
--- a/vp9/common/vp9_entropy.c
+++ b/vp9/common/vp9_entropy.c
@@ -143,9 +143,6 @@
237, 252, 253, 238, 223, 239, 254, 255,
};
-#if CONFIG_DWTDCTHYBRID
-
-#if DWTDCT_TYPE == DWTDCT16X16_LEAN
DECLARE_ALIGNED(16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 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
@@ -214,150 +194,7 @@
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-};
-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,
- 481, 450, 419, 388, 357, 326, 295, 264,
- 233, 202, 171, 140, 109, 78, 47, 79,
- 110, 141, 172, 203, 234, 265, 296, 327,
- 358, 389, 420, 451, 482, 483, 452, 421,
- 390, 359, 328, 297, 266, 235, 204, 173,
- 142, 111, 143, 174, 205, 236, 267, 298,
- 329, 360, 391, 422, 453, 484, 485, 454,
- 423, 392, 361, 330, 299, 268, 237, 206,
- 175, 207, 238, 269, 300, 331, 362, 393,
- 424, 455, 486, 487, 456, 425, 394, 363,
- 332, 301, 270, 239, 271, 302, 333, 364,
- 395, 426, 457, 488, 489, 458, 427, 396,
- 365, 334, 303, 335, 366, 397, 428, 459,
- 490, 491, 460, 429, 398, 367, 399, 430,
- 461, 492, 493, 462, 431, 463, 494, 495,
-
- 16, 512, 528, 17, 513, 529, 48, 544,
- 560, 80, 576, 592, 49, 545, 561, 18,
- 514, 530, 19, 515, 531, 50, 546, 562,
- 81, 577, 593, 112, 608, 624, 144, 640,
- 656, 113, 609, 625, 82, 578, 594, 51,
- 547, 563, 20, 516, 532, 21, 517, 533,
- 52, 548, 564, 83, 579, 595, 114, 610,
- 626, 145, 641, 657, 176, 672, 688, 208,
- 704, 720, 177, 673, 689, 146, 642, 658,
- 115, 611, 627, 84, 580, 596, 53, 549,
- 565, 22, 518, 534, 23, 519, 535, 54,
- 550, 566, 85, 581, 597, 116, 612, 628,
- 147, 643, 659, 178, 674, 690, 209, 705,
- 721, 240, 736, 752, 272, 768, 784, 241,
- 737, 753, 210, 706, 722, 179, 675, 691,
- 148, 644, 660, 117, 613, 629, 86, 582,
- 598, 55, 551, 567, 24, 520, 536, 25,
- 521, 537, 56, 552, 568, 87, 583, 599,
- 118, 614, 630, 149, 645, 661, 180, 676,
- 692, 211, 707, 723, 242, 738, 754, 273,
- 769, 785, 304, 800, 816, 336, 832, 848,
- 305, 801, 817, 274, 770, 786, 243, 739,
- 755, 212, 708, 724, 181, 677, 693, 150,
- 646, 662, 119, 615, 631, 88, 584, 600,
- 57, 553, 569, 26, 522, 538, 27, 523,
- 539, 58, 554, 570, 89, 585, 601, 120,
- 616, 632, 151, 647, 663, 182, 678, 694,
- 213, 709, 725, 244, 740, 756, 275, 771,
- 787, 306, 802, 818, 337, 833, 849, 368,
- 864, 880, 400, 896, 912, 369, 865, 881,
- 338, 834, 850, 307, 803, 819, 276, 772,
- 788, 245, 741, 757, 214, 710, 726, 183,
-
- 679, 695, 152, 648, 664, 121, 617, 633,
- 90, 586, 602, 59, 555, 571, 28, 524,
- 540, 29, 525, 541, 60, 556, 572, 91,
- 587, 603, 122, 618, 634, 153, 649, 665,
- 184, 680, 696, 215, 711, 727, 246, 742,
- 758, 277, 773, 789, 308, 804, 820, 339,
- 835, 851, 370, 866, 882, 401, 897, 913,
- 432, 928, 944, 464, 960, 976, 433, 929,
- 945, 402, 898, 914, 371, 867, 883, 340,
- 836, 852, 309, 805, 821, 278, 774, 790,
- 247, 743, 759, 216, 712, 728, 185, 681,
- 697, 154, 650, 666, 123, 619, 635, 92,
- 588, 604, 61, 557, 573, 30, 526, 542,
- 31, 527, 543, 62, 558, 574, 93, 589,
- 605, 124, 620, 636, 155, 651, 667, 186,
- 682, 698, 217, 713, 729, 248, 744, 760,
- 279, 775, 791, 310, 806, 822, 341, 837,
- 853, 372, 868, 884, 403, 899, 915, 434,
- 930, 946, 465, 961, 977, 496, 992, 1008,
- 497, 993, 1009, 466, 962, 978, 435, 931,
- 947, 404, 900, 916, 373, 869, 885, 342,
- 838, 854, 311, 807, 823, 280, 776, 792,
- 249, 745, 761, 218, 714, 730, 187, 683,
- 699, 156, 652, 668, 125, 621, 637, 94,
- 590, 606, 63, 559, 575, 95, 591, 607,
- 126, 622, 638, 157, 653, 669, 188, 684,
- 700, 219, 715, 731, 250, 746, 762, 281,
- 777, 793, 312, 808, 824, 343, 839, 855,
- 374, 870, 886, 405, 901, 917, 436, 932,
- 948, 467, 963, 979, 498, 994, 1010, 499,
- 995, 1011, 468, 964, 980, 437, 933, 949,
- 406, 902, 918, 375, 871, 887, 344, 840,
-
- 856, 313, 809, 825, 282, 778, 794, 251,
- 747, 763, 220, 716, 732, 189, 685, 701,
- 158, 654, 670, 127, 623, 639, 159, 655,
- 671, 190, 686, 702, 221, 717, 733, 252,
- 748, 764, 283, 779, 795, 314, 810, 826,
- 345, 841, 857, 376, 872, 888, 407, 903,
- 919, 438, 934, 950, 469, 965, 981, 500,
- 996, 1012, 501, 997, 1013, 470, 966, 982,
- 439, 935, 951, 408, 904, 920, 377, 873,
- 889, 346, 842, 858, 315, 811, 827, 284,
- 780, 796, 253, 749, 765, 222, 718, 734,
- 191, 687, 703, 223, 719, 735, 254, 750,
- 766, 285, 781, 797, 316, 812, 828, 347,
- 843, 859, 378, 874, 890, 409, 905, 921,
- 440, 936, 952, 471, 967, 983, 502, 998,
- 1014, 503, 999, 1015, 472, 968, 984, 441,
- 937, 953, 410, 906, 922, 379, 875, 891,
- 348, 844, 860, 317, 813, 829, 286, 782,
- 798, 255, 751, 767, 287, 783, 799, 318,
- 814, 830, 349, 845, 861, 380, 876, 892,
- 411, 907, 923, 442, 938, 954, 473, 969,
- 985, 504, 1000, 1016, 505, 1001, 1017, 474,
- 970, 986, 443, 939, 955, 412, 908, 924,
- 381, 877, 893, 350, 846, 862, 319, 815,
- 831, 351, 847, 863, 382, 878, 894, 413,
- 909, 925, 444, 940, 956, 475, 971, 987,
- 506, 1002, 1018, 507, 1003, 1019, 476, 972,
- 988, 445, 941, 957, 414, 910, 926, 383,
- 879, 895, 415, 911, 927, 446, 942, 958,
- 477, 973, 989, 508, 1004, 1020, 509, 1005,
- 1021, 478, 974, 990, 447, 943, 959, 479,
- 975, 991, 510, 1006, 1022, 511, 1007, 1023,
-};
-
-#elif DWTDCT_TYPE == DWTDCT16X16
-
-DECLARE_ALIGNED(16, const int, vp9_coef_bands_32x32[1024]) = {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
- 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,
- 481, 450, 419, 388, 357, 326, 295, 264,
- 233, 202, 171, 140, 109, 78, 47, 79,
- 110, 141, 172, 203, 234, 265, 296, 327,
- 358, 389, 420, 451, 482, 483, 452, 421,
- 390, 359, 328, 297, 266, 235, 204, 173,
- 142, 111, 143, 174, 205, 236, 267, 298,
- 329, 360, 391, 422, 453, 484, 485, 454,
- 423, 392, 361, 330, 299, 268, 237, 206,
- 175, 207, 238, 269, 300, 331, 362, 393,
- 424, 455, 486, 487, 456, 425, 394, 363,
- 332, 301, 270, 239, 271, 302, 333, 364,
- 395, 426, 457, 488, 489, 458, 427, 396,
- 365, 334, 303, 335, 366, 397, 428, 459,
- 490, 491, 460, 429, 398, 367, 399, 430,
- 461, 492, 493, 462, 431, 463, 494, 495,
-
- 17, 513, 529, 48, 544,
- 560, 80, 576, 592, 49, 545, 561, 18,
- 514, 530, 19, 515, 531, 50, 546, 562,
- 81, 577, 593, 112, 608, 624, 144, 640,
- 656, 113, 609, 625, 82, 578, 594, 51,
- 547, 563, 20, 516, 532, 21, 517, 533,
- 52, 548, 564, 83, 579, 595, 114, 610,
- 626, 145, 641, 657, 176, 672, 688, 208,
- 704, 720, 177, 673, 689, 146, 642, 658,
- 115, 611, 627, 84, 580, 596, 53, 549,
- 565, 22, 518, 534, 23, 519, 535, 54,
- 550, 566, 85, 581, 597, 116, 612, 628,
- 147, 643, 659, 178, 674, 690, 209, 705,
- 721, 240, 736, 752, 272, 768, 784, 241,
- 737, 753, 210, 706, 722, 179, 675, 691,
- 148, 644, 660, 117, 613, 629, 86, 582,
- 598, 55, 551, 567, 24, 520, 536, 25,
- 521, 537, 56, 552, 568, 87, 583, 599,
- 118, 614, 630, 149, 645, 661, 180, 676,
- 692, 211, 707, 723, 242, 738, 754, 273,
- 769, 785, 304, 800, 816, 336, 832, 848,
- 305, 801, 817, 274, 770, 786, 243, 739,
- 755, 212, 708, 724, 181, 677, 693, 150,
- 646, 662, 119, 615, 631, 88, 584, 600,
- 57, 553, 569, 26, 522, 538, 27, 523,
- 539, 58, 554, 570, 89, 585, 601, 120,
- 616, 632, 151, 647, 663, 182, 678, 694,
- 213, 709, 725, 244, 740, 756, 275, 771,
- 787, 306, 802, 818, 337, 833, 849, 368,
- 864, 880, 400, 896, 912, 369, 865, 881,
- 338, 834, 850, 307, 803, 819, 276, 772,
- 788, 245, 741, 757, 214, 710, 726, 183,
-
- 679, 695, 152, 648, 664, 121, 617, 633,
- 90, 586, 602, 59, 555, 571, 28, 524,
- 540, 29, 525, 541, 60, 556, 572, 91,
- 587, 603, 122, 618, 634, 153, 649, 665,
- 184, 680, 696, 215, 711, 727, 246, 742,
- 758, 277, 773, 789, 308, 804, 820, 339,
- 835, 851, 370, 866, 882, 401, 897, 913,
- 432, 928, 944, 464, 960, 976, 433, 929,
- 945, 402, 898, 914, 371, 867, 883, 340,
- 836, 852, 309, 805, 821, 278, 774, 790,
- 247, 743, 759, 216, 712, 728, 185, 681,
- 697, 154, 650, 666, 123, 619, 635, 92,
- 588, 604, 61, 557, 573, 30, 526, 542,
- 31, 527, 543, 62, 558, 574, 93, 589,
- 605, 124, 620, 636, 155, 651, 667, 186,
- 682, 698, 217, 713, 729, 248, 744, 760,
- 279, 775, 791, 310, 806, 822, 341, 837,
- 853, 372, 868, 884, 403, 899, 915, 434,
- 930, 946, 465, 961, 977, 496, 992, 1008,
- 497, 993, 1009, 466, 962, 978, 435, 931,
- 947, 404, 900, 916, 373, 869, 885, 342,
- 838, 854, 311, 807, 823, 280, 776, 792,
- 249, 745, 761, 218, 714, 730, 187, 683,
- 699, 156, 652, 668, 125, 621, 637, 94,
- 590, 606, 63, 559, 575, 95, 591, 607,
- 126, 622, 638, 157, 653, 669, 188, 684,
- 700, 219, 715, 731, 250, 746, 762, 281,
- 777, 793, 312, 808, 824, 343, 839, 855,
- 374, 870, 886, 405, 901, 917, 436, 932,
- 948, 467, 963, 979, 498, 994, 1010, 499,
- 995, 1011, 468, 964, 980, 437, 933, 949,
- 406, 902, 918, 375, 871, 887, 344, 840,
-
- 856, 313, 809, 825, 282, 778, 794, 251,
- 747, 763, 220, 716, 732, 189, 685, 701,
- 158, 654, 670, 127, 623, 639, 159, 655,
- 671, 190, 686, 702, 221, 717, 733, 252,
- 748, 764, 283, 779, 795, 314, 810, 826,
- 345, 841, 857, 376, 872, 888, 407, 903,
- 919, 438, 934, 950, 469, 965, 981, 500,
- 996, 1012, 501, 997, 1013, 470, 966, 982,
- 439, 935, 951, 408, 904, 920, 377, 873,
- 889, 346, 842, 858, 315, 811, 827, 284,
- 780, 796, 253, 749, 765, 222, 718, 734,
- 191, 687, 703, 223, 719, 735, 254, 750,
- 766, 285, 781, 797, 316, 812, 828, 347,
- 843, 859, 378, 874, 890, 409, 905, 921,
- 440, 936, 952, 471, 967, 983, 502, 998,
- 1014, 503, 999, 1015, 472, 968, 984, 441,
- 937, 953, 410, 906, 922, 379, 875, 891,
- 348, 844, 860, 317, 813, 829, 286, 782,
- 798, 255, 751, 767, 287, 783, 799, 318,
- 814, 830, 349, 845, 861, 380, 876, 892,
- 411, 907, 923, 442, 938, 954, 473, 969,
- 985, 504, 1000, 1016, 505, 1001, 1017, 474,
- 970, 986, 443, 939, 955, 412, 908, 924,
- 381, 877, 893, 350, 846, 862, 319, 815,
- 831, 351, 847, 863, 382, 878, 894, 413,
- 909, 925, 444, 940, 956, 475, 971, 987,
- 506, 1002, 1018, 507, 1003, 1019, 476, 972,
- 988, 445, 941, 957, 414,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 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-};
-
-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, 225, 194, 163, 132,
- 101, 70, 39, 71, 102, 133, 164, 195,
- 226, 227, 196, 165, 134, 103, 135, 166,
- 197, 228, 229, 198, 167, 199, 230, 231,
-
- 8, 256, 264, 9, 257, 265, 40, 288, 296, 72, 320, 328,
- 41, 289, 297, 10, 258, 266, 11, 259, 267, 42, 290, 298,
- 73, 321, 329, 104, 352, 360, 136, 384, 392, 105, 353, 361,
- 74, 322, 330, 43, 291, 299, 12, 260, 268, 13, 261, 269,
- 44, 292, 300, 75, 323, 331, 106, 354, 362, 137, 385, 393,
- 168, 416, 424, 200, 448, 456, 169, 417, 425, 138, 386, 394,
- 107, 355, 363, 76, 324, 332, 45, 293, 301, 14, 262, 270,
- 15, 263, 271, 46, 294, 302, 77, 325, 333, 108, 356, 364,
- 139, 387, 395, 170, 418, 426, 201, 449, 457, 232, 480, 488,
- 233, 481, 489, 202, 450, 458, 171, 419, 427, 140, 388, 396,
- 109, 357, 365, 78, 326, 334, 47, 295, 303, 79, 327, 335,
- 110, 358, 366, 141, 389, 397, 172, 420, 428, 203, 451, 459,
- 234, 482, 490, 235, 483, 491, 204, 452, 460, 173, 421, 429,
- 142, 390, 398, 111, 359, 367, 143, 391, 399, 174, 422, 430,
- 205, 453, 461, 236, 484, 492, 237, 485, 493, 206, 454, 462,
- 175, 423, 431, 207, 455, 463, 238, 486, 494, 239, 487, 495,
-
- 16, 512, 528, 17, 513, 529, 18, 514,
- 530, 19, 515, 531, 20, 516, 532, 21,
- 517, 533, 22, 518, 534, 23, 519, 535,
- 24, 520, 536, 25, 521, 537, 26, 522,
- 538, 27, 523, 539, 28, 524, 540, 29,
- 525, 541, 30, 526, 542, 31, 527, 543,
- 48, 544, 560, 49, 545, 561, 50, 546,
- 562, 51, 547, 563, 52, 548, 564, 53,
- 549, 565, 54, 550, 566, 55, 551, 567,
- 56, 552, 568, 57, 553, 569, 58, 554,
- 570, 59, 555, 571, 60, 556, 572, 61,
- 557, 573, 62, 558, 574, 63, 559, 575,
- 80, 576, 592, 81, 577, 593, 82, 578,
- 594, 83, 579, 595, 84, 580, 596, 85,
- 581, 597, 86, 582, 598, 87, 583, 599,
- 88, 584, 600, 89, 585, 601, 90, 586,
- 602, 91, 587, 603, 92, 588, 604, 93,
- 589, 605, 94, 590, 606, 95, 591, 607,
- 112, 608, 624, 113, 609, 625, 114, 610,
- 626, 115, 611, 627, 116, 612, 628, 117,
- 613, 629, 118, 614, 630, 119, 615, 631,
- 120, 616, 632, 121, 617, 633, 122, 618,
- 634, 123, 619, 635, 124, 620, 636, 125,
- 621, 637, 126, 622, 638, 127, 623, 639,
- 144, 640, 656, 145, 641, 657, 146, 642,
- 658, 147, 643, 659, 148, 644, 660, 149,
- 645, 661, 150, 646, 662, 151, 647, 663,
- 152, 648, 664, 153, 649, 665, 154, 650,
- 666, 155, 651, 667, 156, 652, 668, 157,
- 653, 669, 158, 654, 670, 159, 655, 671,
- 176, 672, 688, 177, 673, 689, 178, 674,
- 690, 179, 675, 691, 180, 676, 692, 181,
- 677, 693, 182, 678, 694, 183, 679, 695,
- 184, 680, 696, 185, 681, 697, 186, 682,
- 698, 187, 683, 699, 188, 684, 700, 189,
- 685, 701, 190, 686, 702, 191, 687, 703,
- 208, 704, 720, 209, 705, 721, 210, 706,
- 722, 211, 707, 723, 212, 708, 724, 213,
- 709, 725, 214, 710, 726, 215, 711, 727,
- 216, 712, 728, 217, 713, 729, 218, 714,
- 730, 219, 715, 731, 220, 716, 732, 221,
- 717, 733, 222, 718, 734, 223, 719, 735,
- 240, 736, 752, 241, 737, 753, 242, 738,
- 754, 243, 739, 755, 244, 740, 756, 245,
- 741, 757, 246, 742, 758, 247, 743, 759,
- 248, 744, 760, 249, 745, 761, 250, 746,
- 762, 251, 747, 763, 252, 748, 764, 253,
- 749, 765, 254, 750, 766, 255, 751, 767,
- 272, 768, 784, 273, 769, 785, 274, 770,
- 786, 275, 771, 787, 276, 772, 788, 277,
- 773, 789, 278, 774, 790, 279, 775, 791,
- 280, 776, 792, 281, 777, 793, 282, 778,
- 794, 283, 779, 795, 284, 780, 796, 285,
- 781, 797, 286, 782, 798, 287, 783, 799,
- 304, 800, 816, 305, 801, 817, 306, 802,
- 818, 307, 803, 819, 308, 804, 820, 309,
- 805, 821, 310, 806, 822, 311, 807, 823,
- 312, 808, 824, 313, 809, 825, 314, 810,
- 826, 315, 811, 827, 316, 812, 828, 317,
- 813, 829, 318, 814, 830, 319, 815, 831,
- 336, 832, 848, 337, 833, 849, 338, 834,
- 850, 339, 835, 851, 340, 836, 852, 341,
- 837, 853, 342, 838, 854, 343, 839, 855,
- 344, 840, 856, 345, 841, 857, 346, 842,
- 858, 347, 843, 859, 348, 844, 860, 349,
- 845, 861, 350, 846, 862, 351, 847, 863,
- 368, 864, 880, 369, 865, 881, 370, 866,
- 882, 371, 867, 883, 372, 868, 884, 373,
- 869, 885, 374, 870, 886, 375, 871, 887,
- 376, 872, 888, 377, 873, 889, 378, 874,
- 890, 379, 875, 891, 380, 876, 892, 381,
- 877, 893, 382, 878, 894, 383, 879, 895,
- 400, 896, 912, 401, 897, 913, 402, 898,
- 914, 403, 899, 915, 404, 900, 916, 405,
- 901, 917, 406, 902, 918, 407, 903, 919,
- 408, 904, 920, 409, 905, 921, 410, 906,
- 922, 411, 907, 923, 412, 908, 924, 413,
- 909, 925, 414, 910, 926, 415, 911, 927,
- 432, 928, 944, 433, 929, 945, 434, 930,
- 946, 435, 931, 947, 436, 932, 948, 437,
- 933, 949, 438, 934, 950, 439, 935, 951,
- 440, 936, 952, 441, 937, 953, 442, 938,
- 954, 443, 939, 955, 444, 940, 956, 445,
- 941, 957, 446, 942, 958, 447, 943, 959,
- 464, 960, 976, 465, 961, 977, 466, 962,
- 978, 467, 963, 979, 468, 964, 980, 469,
- 965, 981, 470, 966, 982, 471, 967, 983,
- 472, 968, 984, 473, 969, 985, 474, 970,
- 986, 475, 971, 987, 476, 972, 988, 477,
- 973, 989, 478, 974, 990, 479, 975, 991,
- 496, 992, 1008, 497, 993, 1009, 498, 994,
- 1010, 499, 995, 1011, 500, 996, 1012, 501,
- 997, 1013, 502, 998, 1014, 503, 999, 1015,
- 504, 1000, 1016, 505, 1001, 1017, 506, 1002,
- 1018, 507, 1003, 1019, 508, 1004, 1020, 509,
- 1005, 1021, 510, 1006, 1022, 511, 1007, 1023,
-};
-#endif
-
-#else
-
-DECLARE_ALIGNED(16, const int, vp9_coef_bands_32x32[1024]) = {
- 0, 1, 2, 3, 5, 4, 4, 5, 5, 3, 6, 3, 5, 4, 6, 6,
- 6, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 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 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,
@@ -865,7 +247,6 @@
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_DWTDCTHYBRID
/* Array indices are identical to previously-existing CONTEXT_NODE indices */
--- a/vp9/common/vp9_idctllm.c
+++ b/vp9/common/vp9_idctllm.c
@@ -1152,8 +1152,6 @@
*output = (out + 32) >> 6;
}
-
-#if !CONFIG_DWTDCTHYBRID
void idct32_1d(int16_t *input, int16_t *output) {
int16_t step1[32], step2[32];
int temp1, temp2;
@@ -1521,7 +1519,6 @@
output[31] = step1[0] - step1[31];
}
-
void vp9_short_idct32x32_c(int16_t *input, int16_t *output, int pitch) {
int16_t out[32 * 32];
int16_t *outptr = &out[0];
@@ -1554,792 +1551,3 @@
out = dct_const_round_shift(tmp);
*output = (out + 32) >> 6;
}
-
-#else // !CONFIG_DWTDCTHYBRID
-
-#if DWT_TYPE == 53
-
-// Note: block length must be even for this implementation
-static void synthesis_53_row(int length, int16_t *lowpass, int16_t *highpass,
- int16_t *x) {
- int16_t r, *a, *b;
- int n;
-
- n = length >> 1;
- b = highpass;
- a = lowpass;
- r = *highpass;
- while (n--) {
- *a++ -= (r + (*b) + 1) >> 1;
- r = *b++;
- }
-
- n = length >> 1;
- b = highpass;
- a = lowpass;
- while (--n) {
- *x++ = ((r = *a++) + 1) >> 1;
- *x++ = *b++ + ((r + (*a) + 2) >> 2);
- }
- *x++ = ((r = *a) + 1) >> 1;
- *x++ = *b + ((r + 1) >> 1);
-}
-
-static void synthesis_53_col(int length, int16_t *lowpass, int16_t *highpass,
- int16_t *x) {
- int16_t r, *a, *b;
- int n;
-
- n = length >> 1;
- b = highpass;
- a = lowpass;
- r = *highpass;
- while (n--) {
- *a++ -= (r + (*b) + 1) >> 1;
- r = *b++;
- }
-
- n = length >> 1;
- b = highpass;
- a = lowpass;
- while (--n) {
- r = *a++;
- *x++ = r;
- *x++ = ((*b++) << 1) + ((r + (*a) + 1) >> 1);
- }
- *x++ = *a;
- *x++ = ((*b) << 1) + *a;
-}
-
-static void dyadic_synthesize_53(int levels, int width, int height, int16_t *c,
- int pitch_c, int16_t *x, int pitch_x) {
- int th[16], tw[16], lv, i, j, nh, nw, hh = height, hw = width;
- short buffer[2 * DWT_MAX_LENGTH];
-
- th[0] = hh;
- tw[0] = hw;
- for (i = 1; i <= levels; i++) {
- th[i] = (th[i - 1] + 1) >> 1;
- tw[i] = (tw[i - 1] + 1) >> 1;
- }
- for (lv = levels - 1; lv >= 0; lv--) {
- nh = th[lv];
- nw = tw[lv];
- hh = th[lv + 1];
- hw = tw[lv + 1];
- if ((nh < 2) || (nw < 2)) continue;
- for (j = 0; j < nw; j++) {
- for (i = 0; i < nh; i++)
- buffer[i] = c[i * pitch_c + j];
- synthesis_53_col(nh, buffer, buffer + hh, buffer + nh);
- for (i = 0; i < nh; i++)
- c[i * pitch_c + j] = buffer[i + nh];
- }
- for (i = 0; i < nh; i++) {
- memcpy(buffer, &c[i * pitch_c], nw * sizeof(*buffer));
- synthesis_53_row(nw, buffer, buffer + hw, &c[i * pitch_c]);
- }
- }
- for (i = 0; i < height; i++) {
- for (j = 0; j < width; j++) {
- x[i * pitch_x + j] = c[i * pitch_c + j] >= 0 ?
- ((c[i * pitch_c + j] + DWT_PRECISION_RND) >> DWT_PRECISION_BITS) :
- -((-c[i * pitch_c + j] + DWT_PRECISION_RND) >> DWT_PRECISION_BITS);
- }
- }
-}
-
-#elif DWT_TYPE == 26
-
-// Note: block length must be even for this implementation
-static void synthesis_26_row(int length, int16_t *lowpass, int16_t *highpass,
- int16_t *x) {
- int16_t r, s, *a, *b;
- int i, n = length >> 1;
-
- if (n >= 4) {
- a = lowpass;
- b = highpass;
- r = *lowpass;
- while (--n) {
- *b++ += (r - a[1] + 4) >> 3;
- r = *a++;
- }
- *b += (r - *a + 4) >> 3;
- }
- a = lowpass;
- b = highpass;
- for (i = length >> 1; i; i--) {
- s = *b++;
- r = *a++;
- *x++ = (r + s + 1) >> 1;
- *x++ = (r - s + 1) >> 1;
- }
-}
-
-static void synthesis_26_col(int length, int16_t *lowpass, int16_t *highpass,
- int16_t *x) {
- int16_t r, s, *a, *b;
- int i, n = length >> 1;
-
- if (n >= 4) {
- a = lowpass;
- b = highpass;
- r = *lowpass;
- while (--n) {
- *b++ += (r - a[1] + 4) >> 3;
- r = *a++;
- }
- *b += (r - *a + 4) >> 3;
- }
- a = lowpass;
- b = highpass;
- for (i = length >> 1; i; i--) {
- s = *b++;
- r = *a++;
- *x++ = r + s;
- *x++ = r - s;
- }
-}
-
-static void dyadic_synthesize_26(int levels, int width, int height, int16_t *c,
- int pitch_c, int16_t *x, int pitch_x) {
- int th[16], tw[16], lv, i, j, nh, nw, hh = height, hw = width;
- int16_t buffer[2 * DWT_MAX_LENGTH];
-
- th[0] = hh;
- tw[0] = hw;
- for (i = 1; i <= levels; i++) {
- th[i] = (th[i - 1] + 1) >> 1;
- tw[i] = (tw[i - 1] + 1) >> 1;
- }
- for (lv = levels - 1; lv >= 0; lv--) {
- nh = th[lv];
- nw = tw[lv];
- hh = th[lv + 1];
- hw = tw[lv + 1];
- if ((nh < 2) || (nw < 2)) continue;
- for (j = 0; j < nw; j++) {
- for (i = 0; i < nh; i++)
- buffer[i] = c[i * pitch_c + j];
- synthesis_26_col(nh, buffer, buffer + hh, buffer + nh);
- for (i = 0; i < nh; i++)
- c[i * pitch_c + j] = buffer[i + nh];
- }
- for (i = 0; i < nh; i++) {
- memcpy(buffer, &c[i * pitch_c], nw * sizeof(*buffer));
- synthesis_26_row(nw, buffer, buffer + hw, &c[i * pitch_c]);
- }
- }
- for (i = 0; i < height; i++) {
- for (j = 0; j < width; j++) {
- x[i * pitch_x + j] = c[i * pitch_c + j] >= 0 ?
- ((c[i * pitch_c + j] + DWT_PRECISION_RND) >> DWT_PRECISION_BITS) :
- -((-c[i * pitch_c + j] + DWT_PRECISION_RND) >> DWT_PRECISION_BITS);
- }
- }
-}
-
-#elif DWT_TYPE == 97
-
-static void synthesis_97(int length, double *lowpass, double *highpass,
- double *x) {
- static const double a_predict1 = -1.586134342;
- static const double a_update1 = -0.05298011854;
- static const double a_predict2 = 0.8829110762;
- static const double a_update2 = 0.4435068522;
- static const double s_low = 1.149604398;
- static const double s_high = 1/1.149604398;
- static const double inv_s_low = 1 / s_low;
- static const double inv_s_high = 1 / s_high;
- int i;
- double y[DWT_MAX_LENGTH];
- // Undo pack and scale
- for (i = 0; i < length / 2; i++) {
- y[i * 2] = lowpass[i] * inv_s_low;
- y[i * 2 + 1] = highpass[i] * inv_s_high;
- }
- memcpy(x, y, sizeof(*y) * length);
- // Undo update 2
- for (i = 2; i < length; i += 2) {
- x[i] -= a_update2 * (x[i-1] + x[i+1]);
- }
- x[0] -= 2 * a_update2 * x[1];
- // Undo predict 2
- for (i = 1; i < length - 2; i += 2) {
- x[i] -= a_predict2 * (x[i - 1] + x[i + 1]);
- }
- x[length - 1] -= 2 * a_predict2 * x[length - 2];
- // Undo update 1
- for (i = 2; i < length; i += 2) {
- x[i] -= a_update1 * (x[i - 1] + x[i + 1]);
- }
- x[0] -= 2 * a_update1 * x[1];
- // Undo predict 1
- for (i = 1; i < length - 2; i += 2) {
- x[i] -= a_predict1 * (x[i - 1] + x[i + 1]);
- }
- x[length - 1] -= 2 * a_predict1 * x[length - 2];
-}
-
-static void dyadic_synthesize_97(int levels, int width, int height, int16_t *c,
- int pitch_c, int16_t *x, int pitch_x) {
- int th[16], tw[16], lv, i, j, nh, nw, hh = height, hw = width;
- double buffer[2 * DWT_MAX_LENGTH];
- double y[DWT_MAX_LENGTH * DWT_MAX_LENGTH];
-
- th[0] = hh;
- tw[0] = hw;
- for (i = 1; i <= levels; i++) {
- th[i] = (th[i - 1] + 1) >> 1;
- tw[i] = (tw[i - 1] + 1) >> 1;
- }
- for (lv = levels - 1; lv >= 0; lv--) {
- nh = th[lv];
- nw = tw[lv];
- hh = th[lv + 1];
- hw = tw[lv + 1];
- if ((nh < 2) || (nw < 2)) continue;
- for (j = 0; j < nw; j++) {
- for (i = 0; i < nh; i++)
- buffer[i] = c[i * pitch_c + j];
- synthesis_97(nh, buffer, buffer + hh, buffer + nh);
- for (i = 0; i < nh; i++)
- y[i * DWT_MAX_LENGTH + j] = buffer[i + nh];
- }
- for (i = 0; i < nh; i++) {
- memcpy(buffer, &y[i * DWT_MAX_LENGTH], nw * sizeof(*buffer));
- synthesis_97(nw, buffer, buffer + hw, &y[i * DWT_MAX_LENGTH]);
- }
- }
- for (i = 0; i < height; i++)
- for (j = 0; j < width; j++)
- x[i * pitch_x + j] = round(y[i * DWT_MAX_LENGTH + j] /
- (1 << DWT_PRECISION_BITS));
-}
-
-#endif // DWT_TYPE
-
-// TODO(debargha): Implement scaling differently so as not to have to use the
-// floating point 16x16 dct
-static void butterfly_16x16_idct_1d_f(double input[16], double output[16]) {
- static const double C1 = 0.995184726672197;
- static const double C2 = 0.98078528040323;
- static const double C3 = 0.956940335732209;
- static const double C4 = 0.923879532511287;
- static const double C5 = 0.881921264348355;
- static const double C6 = 0.831469612302545;
- static const double C7 = 0.773010453362737;
- static const double C8 = 0.707106781186548;
- static const double C9 = 0.634393284163646;
- static const double C10 = 0.555570233019602;
- static const double C11 = 0.471396736825998;
- static const double C12 = 0.38268343236509;
- static const double C13 = 0.290284677254462;
- static const double C14 = 0.195090322016128;
- static const double C15 = 0.098017140329561;
-
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
- {
- double step[16];
- double intermediate[16];
- double temp1, temp2;
-
-
- // step 1 and 2
- step[ 0] = input[0] + input[8];
- step[ 1] = input[0] - input[8];
-
- temp1 = input[4]*C12;
- temp2 = input[12]*C4;
-
- temp1 -= temp2;
- temp1 *= C8;
-
- step[ 2] = 2*(temp1);
-
- temp1 = input[4]*C4;
- temp2 = input[12]*C12;
- temp1 += temp2;
- temp1 = (temp1);
- temp1 *= C8;
- step[ 3] = 2*(temp1);
-
- temp1 = input[2]*C8;
- temp1 = 2*(temp1);
- temp2 = input[6] + input[10];
-
- step[ 4] = temp1 + temp2;
- step[ 5] = temp1 - temp2;
-
- temp1 = input[14]*C8;
- temp1 = 2*(temp1);
- temp2 = input[6] - input[10];
-
- step[ 6] = temp2 - temp1;
- step[ 7] = temp2 + temp1;
-
- // for odd input
- temp1 = input[3]*C12;
- temp2 = input[13]*C4;
- temp1 += temp2;
- temp1 = (temp1);
- temp1 *= C8;
- intermediate[ 8] = 2*(temp1);
-
- temp1 = input[3]*C4;
- temp2 = input[13]*C12;
- temp2 -= temp1;
- temp2 = (temp2);
- temp2 *= C8;
- intermediate[ 9] = 2*(temp2);
-
- intermediate[10] = 2*(input[9]*C8);
- intermediate[11] = input[15] - input[1];
- intermediate[12] = input[15] + input[1];
- intermediate[13] = 2*((input[7]*C8));
-
- temp1 = input[11]*C12;
- temp2 = input[5]*C4;
- temp2 -= temp1;
- temp2 = (temp2);
- temp2 *= C8;
- intermediate[14] = 2*(temp2);
-
- temp1 = input[11]*C4;
- temp2 = input[5]*C12;
- temp1 += temp2;
- temp1 = (temp1);
- temp1 *= C8;
- intermediate[15] = 2*(temp1);
-
- step[ 8] = intermediate[ 8] + intermediate[14];
- step[ 9] = intermediate[ 9] + intermediate[15];
- step[10] = intermediate[10] + intermediate[11];
- step[11] = intermediate[10] - intermediate[11];
- step[12] = intermediate[12] + intermediate[13];
- step[13] = intermediate[12] - intermediate[13];
- step[14] = intermediate[ 8] - intermediate[14];
- step[15] = intermediate[ 9] - intermediate[15];
-
- // step 3
- output[0] = step[ 0] + step[ 3];
- output[1] = step[ 1] + step[ 2];
- output[2] = step[ 1] - step[ 2];
- output[3] = step[ 0] - step[ 3];
-
- temp1 = step[ 4]*C14;
- temp2 = step[ 7]*C2;
- temp1 -= temp2;
- output[4] = (temp1);
-
- temp1 = step[ 4]*C2;
- temp2 = step[ 7]*C14;
- temp1 += temp2;
- output[7] = (temp1);
-
- temp1 = step[ 5]*C10;
- temp2 = step[ 6]*C6;
- temp1 -= temp2;
- output[5] = (temp1);
-
- temp1 = step[ 5]*C6;
- temp2 = step[ 6]*C10;
- temp1 += temp2;
- output[6] = (temp1);
-
- output[8] = step[ 8] + step[11];
- output[9] = step[ 9] + step[10];
- output[10] = step[ 9] - step[10];
- output[11] = step[ 8] - step[11];
- output[12] = step[12] + step[15];
- output[13] = step[13] + step[14];
- output[14] = step[13] - step[14];
- output[15] = step[12] - step[15];
-
- // output 4
- step[ 0] = output[0] + output[7];
- step[ 1] = output[1] + output[6];
- step[ 2] = output[2] + output[5];
- step[ 3] = output[3] + output[4];
- step[ 4] = output[3] - output[4];
- step[ 5] = output[2] - output[5];
- step[ 6] = output[1] - output[6];
- step[ 7] = output[0] - output[7];
-
- temp1 = output[8]*C7;
- temp2 = output[15]*C9;
- temp1 -= temp2;
- step[ 8] = (temp1);
-
- temp1 = output[9]*C11;
- temp2 = output[14]*C5;
- temp1 += temp2;
- step[ 9] = (temp1);
-
- temp1 = output[10]*C3;
- temp2 = output[13]*C13;
- temp1 -= temp2;
- step[10] = (temp1);
-
- temp1 = output[11]*C15;
- temp2 = output[12]*C1;
- temp1 += temp2;
- step[11] = (temp1);
-
- temp1 = output[11]*C1;
- temp2 = output[12]*C15;
- temp2 -= temp1;
- step[12] = (temp2);
-
- temp1 = output[10]*C13;
- temp2 = output[13]*C3;
- temp1 += temp2;
- step[13] = (temp1);
-
- temp1 = output[9]*C5;
- temp2 = output[14]*C11;
- temp2 -= temp1;
- step[14] = (temp2);
-
- temp1 = output[8]*C9;
- temp2 = output[15]*C7;
- temp1 += temp2;
- step[15] = (temp1);
-
- // step 5
- output[0] = (step[0] + step[15]);
- output[1] = (step[1] + step[14]);
- output[2] = (step[2] + step[13]);
- output[3] = (step[3] + step[12]);
- output[4] = (step[4] + step[11]);
- output[5] = (step[5] + step[10]);
- output[6] = (step[6] + step[ 9]);
- output[7] = (step[7] + step[ 8]);
-
- output[15] = (step[0] - step[15]);
- output[14] = (step[1] - step[14]);
- output[13] = (step[2] - step[13]);
- output[12] = (step[3] - step[12]);
- output[11] = (step[4] - step[11]);
- output[10] = (step[5] - step[10]);
- output[9] = (step[6] - step[ 9]);
- output[8] = (step[7] - step[ 8]);
- }
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
-}
-
-static void vp9_short_idct16x16_c_f(int16_t *input, int16_t *output, int pitch,
- int scale) {
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
- {
- double out[16*16], out2[16*16];
- const int short_pitch = pitch >> 1;
- int i, j;
- // First transform rows
- for (i = 0; i < 16; ++i) {
- double temp_in[16], temp_out[16];
- for (j = 0; j < 16; ++j)
- temp_in[j] = input[j + i*short_pitch];
- butterfly_16x16_idct_1d_f(temp_in, temp_out);
- for (j = 0; j < 16; ++j)
- out[j + i*16] = temp_out[j];
- }
- // Then transform columns
- for (i = 0; i < 16; ++i) {
- double temp_in[16], temp_out[16];
- for (j = 0; j < 16; ++j)
- temp_in[j] = out[j*16 + i];
- butterfly_16x16_idct_1d_f(temp_in, temp_out);
- for (j = 0; j < 16; ++j)
- out2[j*16 + i] = temp_out[j];
- }
- for (i = 0; i < 16*16; ++i)
- output[i] = round(out2[i] / (128 >> scale));
- }
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
-}
-
-static void idct8_1d_f(double *x) {
- int i, j;
- double t[8];
- static const double idctmat[64] = {
- 0.35355339059327, 0.49039264020162, 0.46193976625564, 0.41573480615127,
- 0.35355339059327, 0.2777851165098, 0.19134171618254, 0.097545161008064,
- 0.35355339059327, 0.41573480615127, 0.19134171618254, -0.097545161008064,
- -0.35355339059327, -0.49039264020161, -0.46193976625564, -0.2777851165098,
- 0.35355339059327, 0.2777851165098, -0.19134171618254, -0.49039264020162,
- -0.35355339059327, 0.097545161008064, 0.46193976625564, 0.41573480615127,
- 0.35355339059327, 0.097545161008063, -0.46193976625564, -0.2777851165098,
- 0.35355339059327, 0.41573480615127, -0.19134171618254, -0.49039264020162,
- 0.35355339059327, -0.097545161008063, -0.46193976625564, 0.2777851165098,
- 0.35355339059327, -0.41573480615127, -0.19134171618255, 0.49039264020162,
- 0.35355339059327, -0.2777851165098, -0.19134171618254, 0.49039264020161,
- -0.35355339059327, -0.097545161008064, 0.46193976625564, -0.41573480615127,
- 0.35355339059327, -0.41573480615127, 0.19134171618254, 0.097545161008065,
- -0.35355339059327, 0.49039264020162, -0.46193976625564, 0.2777851165098,
- 0.35355339059327, -0.49039264020162, 0.46193976625564, -0.41573480615127,
- 0.35355339059327, -0.2777851165098, 0.19134171618255, -0.097545161008064
- };
- for (i = 0; i < 8; ++i) {
- t[i] = 0;
- for (j = 0; j < 8; ++j)
- t[i] += idctmat[i * 8 + j] * x[j];
- }
- for (i = 0; i < 8; ++i) {
- x[i] = t[i];
- }
-}
-
-static void vp9_short_idct8x8_c_f(int16_t *coefs, int16_t *block, int pitch,
- int scale) {
- double X[8 * 8], Y[8];
- int i, j;
- int shortpitch = pitch >> 1;
-
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
- {
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 8; j++) {
- X[i * 8 + j] = (double)coefs[i * shortpitch + j];
- }
- }
- for (i = 0; i < 8; i++)
- idct8_1d_f(X + 8 * i);
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 8; ++j)
- Y[j] = X[i + 8 * j];
- idct8_1d_f(Y);
- for (j = 0; j < 8; ++j)
- X[i + 8 * j] = Y[j];
- }
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 8; j++) {
- block[i * 8 + j] = (int16_t)round(X[i * 8 + j] / (8 >> scale));
- }
- }
- }
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
-}
-
-#define multiply_bits(d, n) ((n) < 0 ? (d) >> (n) : (d) << (n))
-
-#if DWTDCT_TYPE == DWTDCT16X16_LEAN
-
-void vp9_short_idct32x32_c(int16_t *input, int16_t *output, int pitch) {
- // assume output is a 32x32 buffer
- // Temporary buffer to hold a 16x16 block for 16x16 inverse dct
- int16_t buffer[16 * 16];
- // Temporary buffer to hold a 32x32 block for inverse 32x32 dwt
- int16_t buffer2[32 * 32];
- // Note: pitch is in bytes, short_pitch is in short units
- const int short_pitch = pitch >> 1;
- int i, j;
-
- // TODO(debargha): Implement more efficiently by adding output pitch
- // argument to the idct16x16 function
- vp9_short_idct16x16_c_f(input, buffer, pitch,
- 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i) {
- vpx_memcpy(buffer2 + i * 32, buffer + i * 16, sizeof(*buffer2) * 16);
- }
- for (i = 0; i < 16; ++i) {
- for (j = 16; j < 32; ++j) {
- buffer2[i * 32 + j] =
- multiply_bits(input[i * short_pitch + j], DWT_PRECISION_BITS - 2);
- }
- }
- for (i = 16; i < 32; ++i) {
- for (j = 0; j < 32; ++j) {
- buffer2[i * 32 + j] =
- multiply_bits(input[i * short_pitch + j], DWT_PRECISION_BITS - 2);
- }
- }
-#if DWT_TYPE == 26
- dyadic_synthesize_26(1, 32, 32, buffer2, 32, output, 32);
-#elif DWT_TYPE == 97
- dyadic_synthesize_97(1, 32, 32, buffer2, 32, output, 32);
-#elif DWT_TYPE == 53
- dyadic_synthesize_53(1, 32, 32, buffer2, 32, output, 32);
-#endif
-}
-
-#elif DWTDCT_TYPE == DWTDCT16X16
-
-void vp9_short_idct32x32_c(int16_t *input, int16_t *output, int pitch) {
- // assume output is a 32x32 buffer
- // Temporary buffer to hold a 16x16 block for 16x16 inverse dct
- int16_t buffer[16 * 16];
- // Temporary buffer to hold a 32x32 block for inverse 32x32 dwt
- int16_t buffer2[32 * 32];
- // Note: pitch is in bytes, short_pitch is in short units
- const int short_pitch = pitch >> 1;
- int i, j;
-
- // TODO(debargha): Implement more efficiently by adding output pitch
- // argument to the idct16x16 function
- vp9_short_idct16x16_c_f(input, buffer, pitch,
- 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i) {
- vpx_memcpy(buffer2 + i * 32, buffer + i * 16, sizeof(*buffer2) * 16);
- }
- vp9_short_idct16x16_c_f(input + 16, buffer, pitch,
- 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i) {
- vpx_memcpy(buffer2 + i * 32 + 16, buffer + i * 16, sizeof(*buffer2) * 16);
- }
- vp9_short_idct16x16_c_f(input + 16 * short_pitch, buffer, pitch,
- 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i) {
- vpx_memcpy(buffer2 + i * 32 + 16 * 32, buffer + i * 16,
- sizeof(*buffer2) * 16);
- }
- vp9_short_idct16x16_c_f(input + 16 * short_pitch + 16, buffer, pitch,
- 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i) {
- vpx_memcpy(buffer2 + i * 32 + 16 * 33, buffer + i * 16,
- sizeof(*buffer2) * 16);
- }
-#if DWT_TYPE == 26
- dyadic_synthesize_26(1, 32, 32, buffer2, 32, output, 32);
-#elif DWT_TYPE == 97
- dyadic_synthesize_97(1, 32, 32, buffer2, 32, output, 32);
-#elif DWT_TYPE == 53
- dyadic_synthesize_53(1, 32, 32, buffer2, 32, output, 32);
-#endif
-}
-
-#elif DWTDCT_TYPE == DWTDCT8X8
-
-void vp9_short_idct32x32_c(int16_t *input, int16_t *output, int pitch) {
- // assume output is a 32x32 buffer
- // Temporary buffer to hold a 16x16 block for 16x16 inverse dct
- int16_t buffer[8 * 8];
- // Temporary buffer to hold a 32x32 block for inverse 32x32 dwt
- int16_t buffer2[32 * 32];
- // Note: pitch is in bytes, short_pitch is in short units
- const int short_pitch = pitch >> 1;
- int i, j;
-
- // TODO(debargha): Implement more efficiently by adding output pitch
- // argument to the idct16x16 function
- vp9_short_idct8x8_c_f(input, buffer, pitch,
- 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 8; ++i) {
- vpx_memcpy(buffer2 + i * 32, buffer + i * 8, sizeof(*buffer2) * 8);
- }
- vp9_short_idct8x8_c_f(input + 8, buffer, pitch,
- 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 8; ++i) {
- vpx_memcpy(buffer2 + i * 32 + 8, buffer + i * 8, sizeof(*buffer2) * 8);
- }
- vp9_short_idct8x8_c_f(input + 8 * short_pitch, buffer, pitch,
- 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 8; ++i) {
- vpx_memcpy(buffer2 + i * 32 + 8 * 32, buffer + i * 8,
- sizeof(*buffer2) * 8);
- }
- vp9_short_idct8x8_c_f(input + 8 * short_pitch + 8, buffer, pitch,
- 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 8; ++i) {
- vpx_memcpy(buffer2 + i * 32 + 8 * 33, buffer + i * 8,
- sizeof(*buffer2) * 8);
- }
- for (i = 0; i < 16; ++i) {
- for (j = 16; j < 32; ++j) {
- buffer2[i * 32 + j] =
- multiply_bits(input[i * short_pitch + j], DWT_PRECISION_BITS - 2);
- }
- }
- for (i = 16; i < 32; ++i) {
- for (j = 0; j < 32; ++j) {
- buffer2[i * 32 + j] =
- multiply_bits(input[i * short_pitch + j], DWT_PRECISION_BITS - 2);
- }
- }
-#if DWT_TYPE == 26
- dyadic_synthesize_26(2, 32, 32, buffer2, 32, output, 32);
-#elif DWT_TYPE == 97
- dyadic_synthesize_97(2, 32, 32, buffer2, 32, output, 32);
-#elif DWT_TYPE == 53
- dyadic_synthesize_53(2, 32, 32, buffer2, 32, output, 32);
-#endif
-}
-
-#endif
-
-#if CONFIG_TX64X64
-void vp9_short_idct64x64_c(int16_t *input, int16_t *output, int pitch) {
- // assume output is a 64x64 buffer
- // Temporary buffer to hold a 16x16 block for 16x16 inverse dct
- int16_t buffer[16 * 16];
- // Temporary buffer to hold a 32x32 block for inverse 32x32 dwt
- int16_t buffer2[64 * 64];
- // Note: pitch is in bytes, short_pitch is in short units
- const int short_pitch = pitch >> 1;
- int i, j;
-
- // TODO(debargha): Implement more efficiently by adding output pitch
- // argument to the idct16x16 function
- vp9_short_idct16x16_c_f(input, buffer, pitch,
- 2 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i) {
- vpx_memcpy(buffer2 + i * 64, buffer + i * 16, sizeof(*buffer2) * 16);
- }
-#if DWTDCT_TYPE == DWTDCT16X16_LEAN
- for (i = 0; i < 16; ++i) {
- for (j = 16; j < 64; ++j) {
- buffer2[i * 64 + j] =
- multiply_bits(input[i * short_pitch + j], DWT_PRECISION_BITS - 1);
- }
- }
- for (i = 16; i < 64; ++i) {
- for (j = 0; j < 64; ++j) {
- buffer2[i * 64 + j] =
- multiply_bits(input[i * short_pitch + j], DWT_PRECISION_BITS - 1);
- }
- }
-#elif DWTDCT_TYPE == DWTDCT16X16
- vp9_short_idct16x16_c_f(input + 16, buffer, pitch,
- 2 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i) {
- vpx_memcpy(buffer2 + i * 64 + 16, buffer + i * 16, sizeof(*buffer2) * 16);
- }
- vp9_short_idct16x16_c_f(input + 16 * short_pitch, buffer, pitch,
- 2 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i) {
- vpx_memcpy(buffer2 + i * 64 + 16 * 64, buffer + i * 16,
- sizeof(*buffer2) * 16);
- }
- vp9_short_idct16x16_c_f(input + 16 * short_pitch + 16, buffer, pitch,
- 2 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i) {
- vpx_memcpy(buffer2 + i * 64 + 16 * 65, buffer + i * 16,
- sizeof(*buffer2) * 16);
- }
-
- // Copying and scaling highest bands into buffer2
- for (i = 0; i < 32; ++i) {
- for (j = 32; j < 64; ++j) {
- buffer2[i * 64 + j] =
- multiply_bits(input[i * short_pitch + j], DWT_PRECISION_BITS - 1);
- }
- }
- for (i = 32; i < 64; ++i) {
- for (j = 0; j < 64; ++j) {
- buffer2[i * 64 + j] =
- multiply_bits(input[i * short_pitch + j], DWT_PRECISION_BITS - 1);
- }
- }
-#endif // DWTDCT_TYPE
-
-#if DWT_TYPE == 26
- dyadic_synthesize_26(2, 64, 64, buffer2, 64, output, 64);
-#elif DWT_TYPE == 97
- dyadic_synthesize_97(2, 64, 64, buffer2, 64, output, 64);
-#elif DWT_TYPE == 53
- dyadic_synthesize_53(2, 64, 64, buffer2, 64, output, 64);
-#endif
-}
-#endif // CONFIG_TX64X64
-#endif // !CONFIG_DWTDCTHYBRID
--- a/vp9/decoder/vp9_dequantize.c
+++ b/vp9/decoder/vp9_dequantize.c
@@ -357,21 +357,17 @@
if (eob) {
input[0] = input[0] * dq[0] / 2;
-#if !CONFIG_DWTDCTHYBRID
if (eob == 1) {
vp9_short_idct1_32x32_c(input, output);
add_constant_residual(output[0], pred, pitch, dest, stride, 32, 32);
input[0] = 0;
} else {
-#endif
for (i = 1; i < 1024; i++)
input[i] = input[i] * dq[1] / 2;
vp9_short_idct32x32_c(input, output, 64);
vpx_memset(input, 0, 2048);
add_residual(output, pred, pitch, dest, stride, 32, 32);
-#if !CONFIG_DWTDCTHYBRID
}
-#endif
}
}
--- a/vp9/encoder/vp9_dct.c
+++ b/vp9/encoder/vp9_dct.c
@@ -1471,8 +1471,6 @@
#undef ROUNDING
#endif
-#if !CONFIG_DWTDCTHYBRID
-
#define TEST_INT_32x32_DCT 1
#if !TEST_INT_32x32_DCT
@@ -2210,706 +2208,3 @@
}
#endif
-
-#else // CONFIG_DWTDCTHYBRID
-
-#if DWT_TYPE == 53
-
-// Note: block length must be even for this implementation
-static void analysis_53_row(int length, short *x,
- short *lowpass, short *highpass) {
- int n;
- short r, *a, *b;
-
- n = length >> 1;
- b = highpass;
- a = lowpass;
- while (--n) {
- *a++ = (r = *x++) << 1;
- *b++ = *x - ((r + x[1] + 1) >> 1);
- x++;
- }
- *a = (r = *x++) << 1;
- *b = *x - r;
-
- n = length >> 1;
- b = highpass;
- a = lowpass;
- r = *highpass;
- while (n--) {
- *a++ += (r + (*b) + 1) >> 1;
- r = *b++;
- }
-}
-
-static void analysis_53_col(int length, short *x,
- short *lowpass, short *highpass) {
- int n;
- short r, *a, *b;
-
- n = length >> 1;
- b = highpass;
- a = lowpass;
- while (--n) {
- *a++ = (r = *x++);
- *b++ = (((*x) << 1) - (r + x[1]) + 2) >> 2;
- x++;
- }
- *a = (r = *x++);
- *b = (*x - r + 1) >> 1;
-
- n = length >> 1;
- b = highpass;
- a = lowpass;
- r = *highpass;
- while (n--) {
- *a++ += (r + (*b) + 1) >> 1;
- r = *b++;
- }
-}
-
-static void dyadic_analyze_53(int levels, int width, int height,
- short *x, int pitch_x, short *c, int pitch_c) {
- int lv, i, j, nh, nw, hh = height, hw = width;
- short buffer[2 * DWT_MAX_LENGTH];
- for (i = 0; i < height; i++) {
- for (j = 0; j < width; j++) {
- c[i * pitch_c + j] = x[i * pitch_x + j] << DWT_PRECISION_BITS;
- }
- }
- for (lv = 0; lv < levels; lv++) {
- nh = hh;
- hh = (hh + 1) >> 1;
- nw = hw;
- hw = (hw + 1) >> 1;
- if ((nh < 2) || (nw < 2)) return;
- for (i = 0; i < nh; i++) {
- memcpy(buffer, &c[i * pitch_c], nw * sizeof(short));
- analysis_53_row(nw, buffer, &c[i * pitch_c], &c[i * pitch_c] + hw);
- }
- for (j = 0; j < nw; j++) {
- for (i = 0; i < nh; i++)
- buffer[i + nh] = c[i * pitch_c + j];
- analysis_53_col(nh, buffer + nh, buffer, buffer + hh);
- for (i = 0; i < nh; i++)
- c[i * pitch_c + j] = buffer[i];
- }
- }
-}
-
-#elif DWT_TYPE == 26
-
-static void analysis_26_row(int length, short *x,
- short *lowpass, short *highpass) {
- int i, n;
- short r, s, *a, *b;
- a = lowpass;
- b = highpass;
- for (i = length >> 1; i; i--) {
- r = *x++;
- s = *x++;
- *a++ = r + s;
- *b++ = r - s;
- }
- n = length >> 1;
- if (n >= 4) {
- a = lowpass;
- b = highpass;
- r = *lowpass;
- while (--n) {
- *b++ -= (r - a[1] + 4) >> 3;
- r = *a++;
- }
- *b -= (r - *a + 4) >> 3;
- }
-}
-
-static void analysis_26_col(int length, short *x,
- short *lowpass, short *highpass) {
- int i, n;
- short r, s, *a, *b;
- a = lowpass;
- b = highpass;
- for (i = length >> 1; i; i--) {
- r = *x++;
- s = *x++;
- *a++ = (r + s + 1) >> 1;
- *b++ = (r - s + 1) >> 1;
- }
- n = length >> 1;
- if (n >= 4) {
- a = lowpass;
- b = highpass;
- r = *lowpass;
- while (--n) {
- *b++ -= (r - a[1] + 4) >> 3;
- r = *a++;
- }
- *b -= (r - *a + 4) >> 3;
- }
-}
-
-static void dyadic_analyze_26(int levels, int width, int height,
- short *x, int pitch_x, short *c, int pitch_c) {
- int lv, i, j, nh, nw, hh = height, hw = width;
- short buffer[2 * DWT_MAX_LENGTH];
- for (i = 0; i < height; i++) {
- for (j = 0; j < width; j++) {
- c[i * pitch_c + j] = x[i * pitch_x + j] << DWT_PRECISION_BITS;
- }
- }
- for (lv = 0; lv < levels; lv++) {
- nh = hh;
- hh = (hh + 1) >> 1;
- nw = hw;
- hw = (hw + 1) >> 1;
- if ((nh < 2) || (nw < 2)) return;
- for (i = 0; i < nh; i++) {
- memcpy(buffer, &c[i * pitch_c], nw * sizeof(short));
- analysis_26_row(nw, buffer, &c[i * pitch_c], &c[i * pitch_c] + hw);
- }
- for (j = 0; j < nw; j++) {
- for (i = 0; i < nh; i++)
- buffer[i + nh] = c[i * pitch_c + j];
- analysis_26_col(nh, buffer + nh, buffer, buffer + hh);
- for (i = 0; i < nh; i++)
- c[i * pitch_c + j] = buffer[i];
- }
- }
-}
-
-#elif DWT_TYPE == 97
-
-static void analysis_97(int length, double *x,
- double *lowpass, double *highpass) {
- static const double a_predict1 = -1.586134342;
- static const double a_update1 = -0.05298011854;
- static const double a_predict2 = 0.8829110762;
- static const double a_update2 = 0.4435068522;
- static const double s_low = 1.149604398;
- static const double s_high = 1/1.149604398;
- int i;
- double y[DWT_MAX_LENGTH];
- // Predict 1
- for (i = 1; i < length - 2; i += 2) {
- x[i] += a_predict1 * (x[i - 1] + x[i + 1]);
- }
- x[length - 1] += 2 * a_predict1 * x[length - 2];
- // Update 1
- for (i = 2; i < length; i += 2) {
- x[i] += a_update1 * (x[i - 1] + x[i + 1]);
- }
- x[0] += 2 * a_update1 * x[1];
- // Predict 2
- for (i = 1; i < length - 2; i += 2) {
- x[i] += a_predict2 * (x[i - 1] + x[i + 1]);
- }
- x[length - 1] += 2 * a_predict2 * x[length - 2];
- // Update 2
- for (i = 2; i < length; i += 2) {
- x[i] += a_update2 * (x[i - 1] + x[i + 1]);
- }
- x[0] += 2 * a_update2 * x[1];
- memcpy(y, x, sizeof(*y) * length);
- // Scale and pack
- for (i = 0; i < length / 2; i++) {
- lowpass[i] = y[2 * i] * s_low;
- highpass[i] = y[2 * i + 1] * s_high;
- }
-}
-
-static void dyadic_analyze_97(int levels, int width, int height,
- short *x, int pitch_x, short *c, int pitch_c) {
- int lv, i, j, nh, nw, hh = height, hw = width;
- double buffer[2 * DWT_MAX_LENGTH];
- double y[DWT_MAX_LENGTH * DWT_MAX_LENGTH];
- for (i = 0; i < height; i++) {
- for (j = 0; j < width; j++) {
- y[i * DWT_MAX_LENGTH + j] = x[i * pitch_x + j] << DWT_PRECISION_BITS;
- }
- }
- for (lv = 0; lv < levels; lv++) {
- nh = hh;
- hh = (hh + 1) >> 1;
- nw = hw;
- hw = (hw + 1) >> 1;
- if ((nh < 2) || (nw < 2)) return;
- for (i = 0; i < nh; i++) {
- memcpy(buffer, &y[i * DWT_MAX_LENGTH], nw * sizeof(*buffer));
- analysis_97(nw, buffer, &y[i * DWT_MAX_LENGTH],
- &y[i * DWT_MAX_LENGTH] + hw);
- }
- for (j = 0; j < nw; j++) {
- for (i = 0; i < nh; i++)
- buffer[i + nh] = y[i * DWT_MAX_LENGTH + j];
- analysis_97(nh, buffer + nh, buffer, buffer + hh);
- for (i = 0; i < nh; i++)
- c[i * pitch_c + j] = round(buffer[i]);
- }
- }
-}
-
-#endif // DWT_TYPE
-
-// TODO(debargha): Implement the scaling differently so as not to have to
-// use the floating point dct
-static void dct16x16_1d_f(double input[16], double output[16]) {
- static const double C1 = 0.995184726672197;
- static const double C2 = 0.98078528040323;
- static const double C3 = 0.956940335732209;
- static const double C4 = 0.923879532511287;
- static const double C5 = 0.881921264348355;
- static const double C6 = 0.831469612302545;
- static const double C7 = 0.773010453362737;
- static const double C8 = 0.707106781186548;
- static const double C9 = 0.634393284163646;
- static const double C10 = 0.555570233019602;
- static const double C11 = 0.471396736825998;
- static const double C12 = 0.38268343236509;
- static const double C13 = 0.290284677254462;
- static const double C14 = 0.195090322016128;
- static const double C15 = 0.098017140329561;
-
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
- {
- double step[16];
- double intermediate[16];
- double temp1, temp2;
-
- // step 1
- step[ 0] = input[0] + input[15];
- step[ 1] = input[1] + input[14];
- step[ 2] = input[2] + input[13];
- step[ 3] = input[3] + input[12];
- step[ 4] = input[4] + input[11];
- step[ 5] = input[5] + input[10];
- step[ 6] = input[6] + input[ 9];
- step[ 7] = input[7] + input[ 8];
- step[ 8] = input[7] - input[ 8];
- step[ 9] = input[6] - input[ 9];
- step[10] = input[5] - input[10];
- step[11] = input[4] - input[11];
- step[12] = input[3] - input[12];
- step[13] = input[2] - input[13];
- step[14] = input[1] - input[14];
- step[15] = input[0] - input[15];
-
- // step 2
- output[0] = step[0] + step[7];
- output[1] = step[1] + step[6];
- output[2] = step[2] + step[5];
- output[3] = step[3] + step[4];
- output[4] = step[3] - step[4];
- output[5] = step[2] - step[5];
- output[6] = step[1] - step[6];
- output[7] = step[0] - step[7];
-
- temp1 = step[ 8]*C7;
- temp2 = step[15]*C9;
- output[ 8] = temp1 + temp2;
-
- temp1 = step[ 9]*C11;
- temp2 = step[14]*C5;
- output[ 9] = temp1 - temp2;
-
- temp1 = step[10]*C3;
- temp2 = step[13]*C13;
- output[10] = temp1 + temp2;
-
- temp1 = step[11]*C15;
- temp2 = step[12]*C1;
- output[11] = temp1 - temp2;
-
- temp1 = step[11]*C1;
- temp2 = step[12]*C15;
- output[12] = temp2 + temp1;
-
- temp1 = step[10]*C13;
- temp2 = step[13]*C3;
- output[13] = temp2 - temp1;
-
- temp1 = step[ 9]*C5;
- temp2 = step[14]*C11;
- output[14] = temp2 + temp1;
-
- temp1 = step[ 8]*C9;
- temp2 = step[15]*C7;
- output[15] = temp2 - temp1;
-
- // step 3
- step[ 0] = output[0] + output[3];
- step[ 1] = output[1] + output[2];
- step[ 2] = output[1] - output[2];
- step[ 3] = output[0] - output[3];
-
- temp1 = output[4]*C14;
- temp2 = output[7]*C2;
- step[ 4] = temp1 + temp2;
-
- temp1 = output[5]*C10;
- temp2 = output[6]*C6;
- step[ 5] = temp1 + temp2;
-
- temp1 = output[5]*C6;
- temp2 = output[6]*C10;
- step[ 6] = temp2 - temp1;
-
- temp1 = output[4]*C2;
- temp2 = output[7]*C14;
- step[ 7] = temp2 - temp1;
-
- step[ 8] = output[ 8] + output[11];
- step[ 9] = output[ 9] + output[10];
- step[10] = output[ 9] - output[10];
- step[11] = output[ 8] - output[11];
-
- step[12] = output[12] + output[15];
- step[13] = output[13] + output[14];
- step[14] = output[13] - output[14];
- step[15] = output[12] - output[15];
-
- // step 4
- output[ 0] = (step[ 0] + step[ 1]);
- output[ 8] = (step[ 0] - step[ 1]);
-
- temp1 = step[2]*C12;
- temp2 = step[3]*C4;
- temp1 = temp1 + temp2;
- output[ 4] = 2*(temp1*C8);
-
- temp1 = step[2]*C4;
- temp2 = step[3]*C12;
- temp1 = temp2 - temp1;
- output[12] = 2*(temp1*C8);
-
- output[ 2] = 2*((step[4] + step[ 5])*C8);
- output[14] = 2*((step[7] - step[ 6])*C8);
-
- temp1 = step[4] - step[5];
- temp2 = step[6] + step[7];
- output[ 6] = (temp1 + temp2);
- output[10] = (temp1 - temp2);
-
- intermediate[8] = step[8] + step[14];
- intermediate[9] = step[9] + step[15];
-
- temp1 = intermediate[8]*C12;
- temp2 = intermediate[9]*C4;
- temp1 = temp1 - temp2;
- output[3] = 2*(temp1*C8);
-
- temp1 = intermediate[8]*C4;
- temp2 = intermediate[9]*C12;
- temp1 = temp2 + temp1;
- output[13] = 2*(temp1*C8);
-
- output[ 9] = 2*((step[10] + step[11])*C8);
-
- intermediate[11] = step[10] - step[11];
- intermediate[12] = step[12] + step[13];
- intermediate[13] = step[12] - step[13];
- intermediate[14] = step[ 8] - step[14];
- intermediate[15] = step[ 9] - step[15];
-
- output[15] = (intermediate[11] + intermediate[12]);
- output[ 1] = -(intermediate[11] - intermediate[12]);
-
- output[ 7] = 2*(intermediate[13]*C8);
-
- temp1 = intermediate[14]*C12;
- temp2 = intermediate[15]*C4;
- temp1 = temp1 - temp2;
- output[11] = -2*(temp1*C8);
-
- temp1 = intermediate[14]*C4;
- temp2 = intermediate[15]*C12;
- temp1 = temp2 + temp1;
- output[ 5] = 2*(temp1*C8);
- }
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
-}
-
-static void vp9_short_fdct16x16_c_f(short *input, short *out, int pitch,
- int scale) {
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
- {
- int shortpitch = pitch >> 1;
- int i, j;
- double output[256];
- // First transform columns
- for (i = 0; i < 16; i++) {
- double temp_in[16], temp_out[16];
- for (j = 0; j < 16; j++)
- temp_in[j] = input[j*shortpitch + i];
- dct16x16_1d_f(temp_in, temp_out);
- for (j = 0; j < 16; j++)
- output[j*16 + i] = temp_out[j];
- }
- // Then transform rows
- for (i = 0; i < 16; ++i) {
- double temp_in[16], temp_out[16];
- for (j = 0; j < 16; ++j)
- temp_in[j] = output[j + i*16];
- dct16x16_1d_f(temp_in, temp_out);
- for (j = 0; j < 16; ++j)
- output[j + i*16] = temp_out[j];
- }
- // Scale by some magic number
- for (i = 0; i < 256; i++)
- out[i] = (short)round(output[i] / (2 << scale));
- }
- vp9_clear_system_state(); // Make it simd safe : __asm emms;
-}
-
-void vp9_short_fdct8x8_c_f(short *block, short *coefs, int pitch, int scale) {
- int j1, i, j, k;
- float b[8];
- float b1[8];
- float d[8][8];
- float f0 = (float) .7071068;
- float f1 = (float) .4903926;
- float f2 = (float) .4619398;
- float f3 = (float) .4157348;
- float f4 = (float) .3535534;
- float f5 = (float) .2777851;
- float f6 = (float) .1913417;
- float f7 = (float) .0975452;
- pitch = pitch / 2;
- for (i = 0, k = 0; i < 8; i++, k += pitch) {
- for (j = 0; j < 8; j++) {
- b[j] = (float)(block[k + j] << (3 - scale));
- }
- /* Horizontal transform */
- for (j = 0; j < 4; j++) {
- j1 = 7 - j;
- b1[j] = b[j] + b[j1];
- b1[j1] = b[j] - b[j1];
- }
- b[0] = b1[0] + b1[3];
- b[1] = b1[1] + b1[2];
- b[2] = b1[1] - b1[2];
- b[3] = b1[0] - b1[3];
- b[4] = b1[4];
- b[5] = (b1[6] - b1[5]) * f0;
- b[6] = (b1[6] + b1[5]) * f0;
- b[7] = b1[7];
- d[i][0] = (b[0] + b[1]) * f4;
- d[i][4] = (b[0] - b[1]) * f4;
- d[i][2] = b[2] * f6 + b[3] * f2;
- d[i][6] = b[3] * f6 - b[2] * f2;
- b1[4] = b[4] + b[5];
- b1[7] = b[7] + b[6];
- b1[5] = b[4] - b[5];
- b1[6] = b[7] - b[6];
- d[i][1] = b1[4] * f7 + b1[7] * f1;
- d[i][5] = b1[5] * f3 + b1[6] * f5;
- d[i][7] = b1[7] * f7 - b1[4] * f1;
- d[i][3] = b1[6] * f3 - b1[5] * f5;
- }
- /* Vertical transform */
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 4; j++) {
- j1 = 7 - j;
- b1[j] = d[j][i] + d[j1][i];
- b1[j1] = d[j][i] - d[j1][i];
- }
- b[0] = b1[0] + b1[3];
- b[1] = b1[1] + b1[2];
- b[2] = b1[1] - b1[2];
- b[3] = b1[0] - b1[3];
- b[4] = b1[4];
- b[5] = (b1[6] - b1[5]) * f0;
- b[6] = (b1[6] + b1[5]) * f0;
- b[7] = b1[7];
- d[0][i] = (b[0] + b[1]) * f4;
- d[4][i] = (b[0] - b[1]) * f4;
- d[2][i] = b[2] * f6 + b[3] * f2;
- d[6][i] = b[3] * f6 - b[2] * f2;
- b1[4] = b[4] + b[5];
- b1[7] = b[7] + b[6];
- b1[5] = b[4] - b[5];
- b1[6] = b[7] - b[6];
- d[1][i] = b1[4] * f7 + b1[7] * f1;
- d[5][i] = b1[5] * f3 + b1[6] * f5;
- d[7][i] = b1[7] * f7 - b1[4] * f1;
- d[3][i] = b1[6] * f3 - b1[5] * f5;
- }
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 8; j++) {
- *(coefs + j + i * 8) = (short) floor(d[i][j] + 0.5);
- }
- }
- return;
-}
-
-#define divide_bits(d, n) ((n) < 0 ? (d) << (n) : (d) >> (n))
-
-#if DWTDCT_TYPE == DWTDCT16X16_LEAN
-
-void vp9_short_fdct32x32_c(short *input, short *out, int pitch) {
- // assume out is a 32x32 buffer
- short buffer[16 * 16];
- int i, j;
- const int short_pitch = pitch >> 1;
-#if DWT_TYPE == 26
- dyadic_analyze_26(1, 32, 32, input, short_pitch, out, 32);
-#elif DWT_TYPE == 97
- dyadic_analyze_97(1, 32, 32, input, short_pitch, out, 32);
-#elif DWT_TYPE == 53
- dyadic_analyze_53(1, 32, 32, input, short_pitch, out, 32);
-#endif
- // TODO(debargha): Implement more efficiently by adding output pitch
- // argument to the dct16x16 function
- vp9_short_fdct16x16_c_f(out, buffer, 64, 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i)
- vpx_memcpy(out + i * 32, buffer + i * 16, sizeof(short) * 16);
- for (i = 0; i < 16; ++i) {
- for (j = 16; j < 32; ++j) {
- out[i * 32 + j] = divide_bits(out[i * 32 + j], DWT_PRECISION_BITS - 2);
- }
- }
- for (i = 16; i < 32; ++i) {
- for (j = 0; j < 32; ++j) {
- out[i * 32 + j] = divide_bits(out[i * 32 + j], DWT_PRECISION_BITS - 2);
- }
- }
-}
-
-#elif DWTDCT_TYPE == DWTDCT16X16
-
-void vp9_short_fdct32x32_c(short *input, short *out, int pitch) {
- // assume out is a 32x32 buffer
- short buffer[16 * 16];
- int i, j;
- const int short_pitch = pitch >> 1;
-#if DWT_TYPE == 26
- dyadic_analyze_26(1, 32, 32, input, short_pitch, out, 32);
-#elif DWT_TYPE == 97
- dyadic_analyze_97(1, 32, 32, input, short_pitch, out, 32);
-#elif DWT_TYPE == 53
- dyadic_analyze_53(1, 32, 32, input, short_pitch, out, 32);
-#endif
- // TODO(debargha): Implement more efficiently by adding output pitch
- // argument to the dct16x16 function
- vp9_short_fdct16x16_c_f(out, buffer, 64, 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i)
- vpx_memcpy(out + i * 32, buffer + i * 16, sizeof(short) * 16);
- vp9_short_fdct16x16_c_f(out + 16, buffer, 64, 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i)
- vpx_memcpy(out + i * 32 + 16, buffer + i * 16, sizeof(short) * 16);
-
- vp9_short_fdct16x16_c_f(out + 32 * 16, buffer, 64, 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i)
- vpx_memcpy(out + i * 32 + 32 * 16, buffer + i * 16, sizeof(short) * 16);
-
- vp9_short_fdct16x16_c_f(out + 33 * 16, buffer, 64, 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i)
- vpx_memcpy(out + i * 32 + 33 * 16, buffer + i * 16, sizeof(short) * 16);
-}
-
-#elif DWTDCT_TYPE == DWTDCT8X8
-
-void vp9_short_fdct32x32_c(short *input, short *out, int pitch) {
- // assume out is a 32x32 buffer
- short buffer[8 * 8];
- int i, j;
- const int short_pitch = pitch >> 1;
-#if DWT_TYPE == 26
- dyadic_analyze_26(2, 32, 32, input, short_pitch, out, 32);
-#elif DWT_TYPE == 97
- dyadic_analyze_97(2, 32, 32, input, short_pitch, out, 32);
-#elif DWT_TYPE == 53
- dyadic_analyze_53(2, 32, 32, input, short_pitch, out, 32);
-#endif
- // TODO(debargha): Implement more efficiently by adding output pitch
- // argument to the dct16x16 function
- vp9_short_fdct8x8_c_f(out, buffer, 64, 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 8; ++i)
- vpx_memcpy(out + i * 32, buffer + i * 8, sizeof(short) * 8);
-
- vp9_short_fdct8x8_c_f(out + 8, buffer, 64, 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 8; ++i)
- vpx_memcpy(out + i * 32 + 8, buffer + i * 8, sizeof(short) * 8);
-
- vp9_short_fdct8x8_c_f(out + 32 * 8, buffer, 64, 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 8; ++i)
- vpx_memcpy(out + i * 32 + 32 * 8, buffer + i * 8, sizeof(short) * 8);
-
- vp9_short_fdct8x8_c_f(out + 33 * 8, buffer, 64, 1 + DWT_PRECISION_BITS);
- for (i = 0; i < 8; ++i)
- vpx_memcpy(out + i * 32 + 33 * 8, buffer + i * 8, sizeof(short) * 8);
-
- for (i = 0; i < 16; ++i) {
- for (j = 16; j < 32; ++j) {
- out[i * 32 + j] = divide_bits(out[i * 32 + j], DWT_PRECISION_BITS - 2);
- }
- }
- for (i = 16; i < 32; ++i) {
- for (j = 0; j < 32; ++j) {
- out[i * 32 + j] = divide_bits(out[i * 32 + j], DWT_PRECISION_BITS - 2);
- }
- }
-}
-
-#endif
-
-#if CONFIG_TX64X64
-void vp9_short_fdct64x64_c(short *input, short *out, int pitch) {
- // assume out is a 64x64 buffer
- short buffer[16 * 16];
- int i, j;
- const int short_pitch = pitch >> 1;
-#if DWT_TYPE == 26
- dyadic_analyze_26(2, 64, 64, input, short_pitch, out, 64);
-#elif DWT_TYPE == 97
- dyadic_analyze_97(2, 64, 64, input, short_pitch, out, 64);
-#elif DWT_TYPE == 53
- dyadic_analyze_53(2, 64, 64, input, short_pitch, out, 64);
-#endif
- // TODO(debargha): Implement more efficiently by adding output pitch
- // argument to the dct16x16 function
- vp9_short_fdct16x16_c_f(out, buffer, 128, 2 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i)
- vpx_memcpy(out + i * 64, buffer + i * 16, sizeof(short) * 16);
-
-#if DWTDCT_TYPE == DWTDCT16X16_LEAN
- for (i = 0; i < 16; ++i) {
- for (j = 16; j < 48; ++j) {
- out[i * 64 + j] = divide_bits(out[i * 64 + j], DWT_PRECISION_BITS - 1);
- }
- }
- for (i = 16; i < 64; ++i) {
- for (j = 0; j < 64; ++j) {
- out[i * 64 + j] = divide_bits(out[i * 64 + j], DWT_PRECISION_BITS - 1);
- }
- }
-#elif DWTDCT_TYPE == DWTDCT16X16
- vp9_short_fdct16x16_c_f(out + 16, buffer, 128, 2 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i)
- vpx_memcpy(out + i * 64 + 16, buffer + i * 16, sizeof(short) * 16);
-
- vp9_short_fdct16x16_c_f(out + 64 * 16, buffer, 128, 2 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i)
- vpx_memcpy(out + i * 64 + 64 * 16, buffer + i * 16, sizeof(short) * 16);
-
- vp9_short_fdct16x16_c_f(out + 65 * 16, buffer, 128, 2 + DWT_PRECISION_BITS);
- for (i = 0; i < 16; ++i)
- vpx_memcpy(out + i * 64 + 65 * 16, buffer + i * 16, sizeof(short) * 16);
-
- // There is no dct used on the highest bands for now.
- // Need to scale these coeffs by a factor of 2/2^DWT_PRECISION_BITS
- // TODO(debargha): experiment with turning these coeffs to 0
- for (i = 0; i < 32; ++i) {
- for (j = 32; j < 64; ++j) {
- out[i * 64 + j] = divide_bits(out[i * 64 + j], DWT_PRECISION_BITS - 1);
- }
- }
- for (i = 32; i < 64; ++i) {
- for (j = 0; j < 64; ++j) {
- out[i * 64 + j] = divide_bits(out[i * 64 + j], DWT_PRECISION_BITS - 1);
- }
- }
-#endif // DWTDCT_TYPE
-}
-#endif // CONFIG_TX64X64
-#endif // CONFIG_DWTDCTHYBRID
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -859,21 +859,18 @@
SUPERBLOCK * const x_sb = &x->sb_coeff_data;
MACROBLOCKD * const xd = &x->e_mbd;
SUPERBLOCKD * const xd_sb = &xd->sb_coeff_data;
-#if DEBUG_ERROR || CONFIG_DWTDCTHYBRID
+#if DEBUG_ERROR
int16_t out[1024];
#endif
vp9_transform_sby_32x32(x);
vp9_quantize_sby_32x32(x);
-#if DEBUG_ERROR || CONFIG_DWTDCTHYBRID
+#if DEBUG_ERROR
vp9_short_idct32x32(xd_sb->dqcoeff, out, 64);
#endif
-#if !CONFIG_DWTDCTHYBRID
*distortion = vp9_sb_block_error_c(x_sb->coeff, xd_sb->dqcoeff, 1024);
-#else
- *distortion = vp9_block_error_c(x_sb->src_diff, out, 1024) << 4;
-#endif
+
#if DEBUG_ERROR
printf("IDCT/FDCT error 32x32: %d (d: %d)\n",
vp9_block_error_c(x_sb->src_diff, out, 1024), *distortion);
--
⑨