Compare commits
	
		
			1192 Commits
		
	
	
		
			sandbox/Ji
			...
			sandbox/ac
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					2898c6728d | ||
| 
						 | 
					c62859fe76 | ||
| 
						 | 
					365e37193c | ||
| 
						 | 
					f2b5185d76 | ||
| 
						 | 
					5720143261 | ||
| 
						 | 
					911f6b036e | ||
| 
						 | 
					4858f93633 | ||
| 
						 | 
					e4e605623b | ||
| 
						 | 
					9245a0661d | ||
| 
						 | 
					64677c7e99 | ||
| 
						 | 
					465eaceb68 | ||
| 
						 | 
					50461166b7 | ||
| 
						 | 
					0278ae16f6 | ||
| 
						 | 
					e6ec22cb8c | ||
| 
						 | 
					bda690d446 | ||
| 
						 | 
					42b0560319 | ||
| 
						 | 
					1c8567ff09 | ||
| 
						 | 
					536a90970b | ||
| 
						 | 
					9511b948ef | ||
| 
						 | 
					195883023b | ||
| 
						 | 
					d88cee3712 | ||
| 
						 | 
					4679af1ce9 | ||
| 
						 | 
					be3489eaf4 | ||
| 
						 | 
					ecd34e6494 | ||
| 
						 | 
					e5732bcf05 | ||
| 
						 | 
					b5c50ae91f | ||
| 
						 | 
					43a4900ea3 | ||
| 
						 | 
					3080691e92 | ||
| 
						 | 
					f78d6aa772 | ||
| 
						 | 
					bdb8afbbc0 | ||
| 
						 | 
					9af8c39694 | ||
| 
						 | 
					e909da888c | ||
| 
						 | 
					8a6f0551f1 | ||
| 
						 | 
					fb2dd7366b | ||
| 
						 | 
					6b56405f5e | ||
| 
						 | 
					356c944782 | ||
| 
						 | 
					c7f58bcc70 | ||
| 
						 | 
					bd89a34c3a | ||
| 
						 | 
					f642ee891b | ||
| 
						 | 
					e5357230e2 | ||
| 
						 | 
					7e14baa1da | ||
| 
						 | 
					906ec30c10 | ||
| 
						 | 
					95633d0e80 | ||
| 
						 | 
					9a5e0d4038 | ||
| 
						 | 
					e5b76ba26e | ||
| 
						 | 
					2474bea46e | ||
| 
						 | 
					eb1566b632 | ||
| 
						 | 
					c5f11912ae | ||
| 
						 | 
					9a9b1cf772 | ||
| 
						 | 
					6a467ee711 | ||
| 
						 | 
					08507eb82a | ||
| 
						 | 
					36c51c7afe | ||
| 
						 | 
					d5657905b6 | ||
| 
						 | 
					cc29cebde6 | ||
| 
						 | 
					6d585393a2 | ||
| 
						 | 
					ff03d5448a | ||
| 
						 | 
					4e21830987 | ||
| 
						 | 
					d743a55adb | ||
| 
						 | 
					c6eadc3309 | ||
| 
						 | 
					5e35c3c9a0 | ||
| 
						 | 
					0231e27bf0 | ||
| 
						 | 
					180b1804e5 | ||
| 
						 | 
					4dcbf0a809 | ||
| 
						 | 
					b6d874d73b | ||
| 
						 | 
					c147c4d65c | ||
| 
						 | 
					45db71d0ac | ||
| 
						 | 
					bc0a974310 | ||
| 
						 | 
					6201a256f4 | ||
| 
						 | 
					d1ff1e9ffb | ||
| 
						 | 
					820302a394 | ||
| 
						 | 
					5c245a46d8 | ||
| 
						 | 
					0ae1c83277 | ||
| 
						 | 
					18ea2a7e0c | ||
| 
						 | 
					a28b2c6ff0 | ||
| 
						 | 
					43a34557f1 | ||
| 
						 | 
					5e16d397bd | ||
| 
						 | 
					205532f3a7 | ||
| 
						 | 
					9a733b399c | ||
| 
						 | 
					1b556e1f9a | ||
| 
						 | 
					42ef854f97 | ||
| 
						 | 
					1c0769107b | ||
| 
						 | 
					413a0392c0 | ||
| 
						 | 
					4ebded6840 | ||
| 
						 | 
					c50f6739f8 | ||
| 
						 | 
					28bd7673ad | ||
| 
						 | 
					f5507b514c | ||
| 
						 | 
					06ba5254ee | ||
| 
						 | 
					821f02947e | ||
| 
						 | 
					5c055cc4cf | ||
| 
						 | 
					51b654e8f0 | ||
| 
						 | 
					690971898b | ||
| 
						 | 
					c0523090be | ||
| 
						 | 
					a390b90f01 | ||
| 
						 | 
					467c66e842 | ||
| 
						 | 
					7105df53d7 | ||
| 
						 | 
					a1ec3eb326 | ||
| 
						 | 
					e8032a5fae | ||
| 
						 | 
					071b781e37 | ||
| 
						 | 
					aa006d7149 | ||
| 
						 | 
					ee380cc5c4 | ||
| 
						 | 
					d88ca3c335 | ||
| 
						 | 
					f1d090e2f5 | ||
| 
						 | 
					697a8e6fe6 | ||
| 
						 | 
					d76e5b3652 | ||
| 
						 | 
					653832ea06 | ||
| 
						 | 
					41be09afee | ||
| 
						 | 
					71412d82a3 | ||
| 
						 | 
					cd14e03196 | ||
| 
						 | 
					bb55193448 | ||
| 
						 | 
					5eed74e1d3 | ||
| 
						 | 
					e0425bc0ef | ||
| 
						 | 
					82cb1c5e7a | ||
| 
						 | 
					6c0f6dd817 | ||
| 
						 | 
					93ffe9d6dc | ||
| 
						 | 
					acf24cc1b8 | ||
| 
						 | 
					f3fa7cfbfa | ||
| 
						 | 
					c455919f03 | ||
| 
						 | 
					83bd16aaf3 | ||
| 
						 | 
					7fa5223444 | ||
| 
						 | 
					6a21ca20cc | ||
| 
						 | 
					b1339751b9 | ||
| 
						 | 
					49f6ff1103 | ||
| 
						 | 
					1fefc39e94 | ||
| 
						 | 
					b1e3e8348d | ||
| 
						 | 
					5942839d2d | ||
| 
						 | 
					950b68288a | ||
| 
						 | 
					798b54a006 | ||
| 
						 | 
					42b6791774 | ||
| 
						 | 
					2030c49cf8 | ||
| 
						 | 
					e7aa2d9b21 | ||
| 
						 | 
					0092960d27 | ||
| 
						 | 
					4e5e5fc52b | ||
| 
						 | 
					79a00d71bd | ||
| 
						 | 
					2fdb63fd72 | ||
| 
						 | 
					72190cb5e3 | ||
| 
						 | 
					dca95791d0 | ||
| 
						 | 
					5de049b067 | ||
| 
						 | 
					e18800443c | ||
| 
						 | 
					82331e000a | ||
| 
						 | 
					f1fc47becf | ||
| 
						 | 
					81cb6bd496 | ||
| 
						 | 
					db14911ccb | ||
| 
						 | 
					407968cb88 | ||
| 
						 | 
					a4c7e92b81 | ||
| 
						 | 
					5dccce558c | ||
| 
						 | 
					bbb9ca4535 | ||
| 
						 | 
					89af744ba6 | ||
| 
						 | 
					d0307158cd | ||
| 
						 | 
					519b526de8 | ||
| 
						 | 
					aab9218741 | ||
| 
						 | 
					d692f26dd5 | ||
| 
						 | 
					3d1bb97b1b | ||
| 
						 | 
					1794624c18 | ||
| 
						 | 
					78629508f2 | ||
| 
						 | 
					72889a2a60 | ||
| 
						 | 
					94ba3939cd | ||
| 
						 | 
					d04a0d77fb | ||
| 
						 | 
					92946472a1 | ||
| 
						 | 
					6f0cc9f53c | ||
| 
						 | 
					0ea70f77a5 | ||
| 
						 | 
					afb6b4b852 | ||
| 
						 | 
					706b0ad629 | ||
| 
						 | 
					cf9366e504 | ||
| 
						 | 
					89dcc13939 | ||
| 
						 | 
					62bfc97d05 | ||
| 
						 | 
					26a9afc32c | ||
| 
						 | 
					aeea00cc4f | ||
| 
						 | 
					7da965daa9 | ||
| 
						 | 
					7bca5619eb | ||
| 
						 | 
					fc7cbd1f60 | ||
| 
						 | 
					534ac8a617 | ||
| 
						 | 
					2dcefd9c7f | ||
| 
						 | 
					4622af69e6 | ||
| 
						 | 
					fa47212933 | ||
| 
						 | 
					1aa84e03fd | ||
| 
						 | 
					13c3c8309a | ||
| 
						 | 
					9cc8995f46 | ||
| 
						 | 
					6cf95bd1e7 | ||
| 
						 | 
					17cf545edb | ||
| 
						 | 
					54fb24aac3 | ||
| 
						 | 
					2b18c9a09b | ||
| 
						 | 
					cb79ea1c16 | ||
| 
						 | 
					088b05fd99 | ||
| 
						 | 
					3acfe46e8d | ||
| 
						 | 
					0a81d36ab4 | ||
| 
						 | 
					54d66ef165 | ||
| 
						 | 
					b522d1cdff | ||
| 
						 | 
					3fc0f5ed12 | ||
| 
						 | 
					470cbfcb0b | ||
| 
						 | 
					c927e94fd1 | ||
| 
						 | 
					472e14e725 | ||
| 
						 | 
					345b11cd73 | ||
| 
						 | 
					c4e354b4bd | ||
| 
						 | 
					8af092dbd7 | ||
| 
						 | 
					be6c031fb3 | ||
| 
						 | 
					70deaf00eb | ||
| 
						 | 
					3ee6db6c81 | ||
| 
						 | 
					23532eb7b6 | ||
| 
						 | 
					b04dad328c | ||
| 
						 | 
					762641bacc | ||
| 
						 | 
					3d181a4516 | ||
| 
						 | 
					fe4a14af72 | ||
| 
						 | 
					4ef08dcec8 | ||
| 
						 | 
					b152472ba7 | ||
| 
						 | 
					8465c938f1 | ||
| 
						 | 
					1d723572b9 | ||
| 
						 | 
					a8a08ce57e | ||
| 
						 | 
					9265bad906 | ||
| 
						 | 
					7e28ca0157 | ||
| 
						 | 
					a229dbc1f0 | ||
| 
						 | 
					0d8cb09058 | ||
| 
						 | 
					768aad88d9 | ||
| 
						 | 
					8634eaf87a | ||
| 
						 | 
					29d0cc2431 | ||
| 
						 | 
					20d902a376 | ||
| 
						 | 
					1767067068 | ||
| 
						 | 
					3715a914b8 | ||
| 
						 | 
					c9426aaa1b | ||
| 
						 | 
					4ea7f2be43 | ||
| 
						 | 
					2808dd12c2 | ||
| 
						 | 
					244912d506 | ||
| 
						 | 
					d705e17f5e | ||
| 
						 | 
					d65ea85ce6 | ||
| 
						 | 
					6032239e2f | ||
| 
						 | 
					f2e44aa664 | ||
| 
						 | 
					610e258cc5 | ||
| 
						 | 
					6ad714fa52 | ||
| 
						 | 
					41a0a0cb35 | ||
| 
						 | 
					c7e9e486b8 | ||
| 
						 | 
					e15b535791 | ||
| 
						 | 
					e0ab364701 | ||
| 
						 | 
					bfbba9c6b0 | ||
| 
						 | 
					5d8f9f53d1 | ||
| 
						 | 
					89ba55ed1c | ||
| 
						 | 
					25a2434752 | ||
| 
						 | 
					dfa42cf8b7 | ||
| 
						 | 
					35747296b0 | ||
| 
						 | 
					a95f4d961e | ||
| 
						 | 
					8a64f516cb | ||
| 
						 | 
					a9aa29d901 | ||
| 
						 | 
					9f7fdcbe60 | ||
| 
						 | 
					5c4a037c86 | ||
| 
						 | 
					26f4f2dc8e | ||
| 
						 | 
					c1f911a2ea | ||
| 
						 | 
					c65e79d2e5 | ||
| 
						 | 
					f87fdebefc | ||
| 
						 | 
					17cfee3cb5 | ||
| 
						 | 
					d816fa7bfd | ||
| 
						 | 
					9b769e47f4 | ||
| 
						 | 
					dc36e5aff0 | ||
| 
						 | 
					1057ee4847 | ||
| 
						 | 
					eaa8043a31 | ||
| 
						 | 
					4bc6ae4342 | ||
| 
						 | 
					c7b7011b9b | ||
| 
						 | 
					c21cab39c8 | ||
| 
						 | 
					d74ceb03de | ||
| 
						 | 
					7418b176ce | ||
| 
						 | 
					b4f2c567c8 | ||
| 
						 | 
					294550c881 | ||
| 
						 | 
					7914f7a028 | ||
| 
						 | 
					7ac505c726 | ||
| 
						 | 
					fb1a8ba35a | ||
| 
						 | 
					15de7bd334 | ||
| 
						 | 
					2abfd8f92a | ||
| 
						 | 
					463c94854f | ||
| 
						 | 
					c54d165014 | ||
| 
						 | 
					6b9f046791 | ||
| 
						 | 
					f1ecf63f68 | ||
| 
						 | 
					3067c34c5a | ||
| 
						 | 
					f6255dbb53 | ||
| 
						 | 
					23591322cf | ||
| 
						 | 
					0572052725 | ||
| 
						 | 
					4e6b5079c6 | ||
| 
						 | 
					afd2f68dae | ||
| 
						 | 
					16c0ec711c | ||
| 
						 | 
					c93dc38ca3 | ||
| 
						 | 
					d621de7e8d | ||
| 
						 | 
					3ad75fc623 | ||
| 
						 | 
					df14d9f4e7 | ||
| 
						 | 
					f4656961ca | ||
| 
						 | 
					08a453b9de | ||
| 
						 | 
					726d1b841b | ||
| 
						 | 
					a3d22aa2a4 | ||
| 
						 | 
					5f138986fc | ||
| 
						 | 
					ac29aa135c | ||
| 
						 | 
					805a12c75b | ||
| 
						 | 
					814e1346a6 | ||
| 
						 | 
					cc4c5de22f | ||
| 
						 | 
					5a9f36d391 | ||
| 
						 | 
					457a87d986 | ||
| 
						 | 
					c353da68aa | ||
| 
						 | 
					18427983ab | ||
| 
						 | 
					a2746d7096 | ||
| 
						 | 
					a0fd7a9831 | ||
| 
						 | 
					d011808777 | ||
| 
						 | 
					749c393c8d | ||
| 
						 | 
					bfad9d2fe6 | ||
| 
						 | 
					7723b8df6a | ||
| 
						 | 
					9d9273726b | ||
| 
						 | 
					92b08f516a | ||
| 
						 | 
					8f089cbd2e | ||
| 
						 | 
					a68356202d | ||
| 
						 | 
					8f6b943100 | ||
| 
						 | 
					d10fc5af8f | ||
| 
						 | 
					b096db5ad4 | ||
| 
						 | 
					1579bb88c5 | ||
| 
						 | 
					9b375871db | ||
| 
						 | 
					4bfe3bdf27 | ||
| 
						 | 
					0b0eba728d | ||
| 
						 | 
					da7dc59837 | ||
| 
						 | 
					0fcfc613c6 | ||
| 
						 | 
					6eabf229e2 | ||
| 
						 | 
					4f7a7d29fa | ||
| 
						 | 
					80ae856c8b | ||
| 
						 | 
					22a8474fe7 | ||
| 
						 | 
					44849516d4 | ||
| 
						 | 
					b37494cfb5 | ||
| 
						 | 
					b4c7d0523a | ||
| 
						 | 
					d35f992599 | ||
| 
						 | 
					c1b233dd43 | ||
| 
						 | 
					fcb4253c9c | ||
| 
						 | 
					4dc390b15d | ||
| 
						 | 
					7dc5a689b4 | ||
| 
						 | 
					fd22c492f7 | ||
| 
						 | 
					36a9a33b90 | ||
| 
						 | 
					56c2cb7553 | ||
| 
						 | 
					d8642d831f | ||
| 
						 | 
					e8b133c79c | ||
| 
						 | 
					af6d2c7d42 | ||
| 
						 | 
					e184b613b9 | ||
| 
						 | 
					a5e97d874b | ||
| 
						 | 
					6025c6d65b | ||
| 
						 | 
					dd4b416412 | ||
| 
						 | 
					135b43ccf3 | ||
| 
						 | 
					90e563d91f | ||
| 
						 | 
					ab20c98e84 | ||
| 
						 | 
					7f8dd35329 | ||
| 
						 | 
					873a158f14 | ||
| 
						 | 
					c62228f273 | ||
| 
						 | 
					da9c73c293 | ||
| 
						 | 
					8abd0c2a12 | ||
| 
						 | 
					7cfdc00337 | ||
| 
						 | 
					7186a2dd86 | ||
| 
						 | 
					4ac5058afc | ||
| 
						 | 
					73422d3b2d | ||
| 
						 | 
					8fbc641540 | ||
| 
						 | 
					0e3f494b21 | ||
| 
						 | 
					e3ee8c292b | ||
| 
						 | 
					3b2e73b9a4 | ||
| 
						 | 
					eb6b443bd2 | ||
| 
						 | 
					a71c5c0ee9 | ||
| 
						 | 
					c827c59eaf | ||
| 
						 | 
					5fddefbced | ||
| 
						 | 
					21da45e570 | ||
| 
						 | 
					56aa0da405 | ||
| 
						 | 
					b7f441a0bc | ||
| 
						 | 
					c0f0245e8a | ||
| 
						 | 
					91feec1452 | ||
| 
						 | 
					097d59c28c | ||
| 
						 | 
					0c2a14f9e2 | ||
| 
						 | 
					7c6ae373ac | ||
| 
						 | 
					583c205270 | ||
| 
						 | 
					dfe7fdae7d | ||
| 
						 | 
					f23241087a | ||
| 
						 | 
					47c55acdad | ||
| 
						 | 
					e3365c894a | ||
| 
						 | 
					49e0673659 | ||
| 
						 | 
					a5d9416fd7 | ||
| 
						 | 
					ce4c4b96e4 | ||
| 
						 | 
					f42012e526 | ||
| 
						 | 
					4cbf36b105 | ||
| 
						 | 
					d12a4a825c | ||
| 
						 | 
					39e3937c24 | ||
| 
						 | 
					fc18cf7a11 | ||
| 
						 | 
					4b5109cd73 | ||
| 
						 | 
					a7e9178d80 | ||
| 
						 | 
					08d5cf226e | ||
| 
						 | 
					8191ed8b63 | ||
| 
						 | 
					d19033fa4e | ||
| 
						 | 
					bd863314d0 | ||
| 
						 | 
					124ada514b | ||
| 
						 | 
					fe7cabe8b6 | ||
| 
						 | 
					a73f0f4170 | ||
| 
						 | 
					a6a4659bea | ||
| 
						 | 
					b1fb6e0365 | ||
| 
						 | 
					ea990af7f5 | ||
| 
						 | 
					5deb983744 | ||
| 
						 | 
					f8b869f573 | ||
| 
						 | 
					4f08d3d6c5 | ||
| 
						 | 
					8eefb36ca9 | ||
| 
						 | 
					4013645353 | ||
| 
						 | 
					7971846a5e | ||
| 
						 | 
					5f214d6bca | ||
| 
						 | 
					b2446fb6be | ||
| 
						 | 
					a9a1d4e8e5 | ||
| 
						 | 
					5ebc8febdc | ||
| 
						 | 
					af6733aec6 | ||
| 
						 | 
					5da87e84d5 | ||
| 
						 | 
					55c6a74bd4 | ||
| 
						 | 
					48de07d882 | ||
| 
						 | 
					252ec59821 | ||
| 
						 | 
					c376fbc62e | ||
| 
						 | 
					9aaf523ace | ||
| 
						 | 
					16dcf013d3 | ||
| 
						 | 
					742021f026 | ||
| 
						 | 
					d3b6062a13 | ||
| 
						 | 
					964058129f | ||
| 
						 | 
					a15edeb76d | ||
| 
						 | 
					a60e0c15bc | ||
| 
						 | 
					b4297bb122 | ||
| 
						 | 
					fb73ceae85 | ||
| 
						 | 
					fd660f0164 | ||
| 
						 | 
					f01c769dc6 | ||
| 
						 | 
					e905da6f9c | ||
| 
						 | 
					fa84acb441 | ||
| 
						 | 
					d4657a7efb | ||
| 
						 | 
					e8c6c00d80 | ||
| 
						 | 
					598b083342 | ||
| 
						 | 
					5ddfa101c9 | ||
| 
						 | 
					d341f843e2 | ||
| 
						 | 
					509fb0bc9d | ||
| 
						 | 
					33a9d53c10 | ||
| 
						 | 
					2b4f49cb1a | ||
| 
						 | 
					00a35fdeda | ||
| 
						 | 
					963b9b8818 | ||
| 
						 | 
					97ec51233d | ||
| 
						 | 
					f0f00251ea | ||
| 
						 | 
					130c0ec71a | ||
| 
						 | 
					b67821f37b | ||
| 
						 | 
					9a0a2193e4 | ||
| 
						 | 
					34c4e1d6f9 | ||
| 
						 | 
					e298d650cb | ||
| 
						 | 
					1ec0853d17 | ||
| 
						 | 
					0fe589f21e | ||
| 
						 | 
					2726023fc1 | ||
| 
						 | 
					2cdd3beac9 | ||
| 
						 | 
					aeee70f9dd | ||
| 
						 | 
					fe39f6cc9f | ||
| 
						 | 
					4110a27d66 | ||
| 
						 | 
					987451d864 | ||
| 
						 | 
					41c13ddbc9 | ||
| 
						 | 
					0fc4d4e1ef | ||
| 
						 | 
					ac1e1b698f | ||
| 
						 | 
					d41781560e | ||
| 
						 | 
					5f5091636e | ||
| 
						 | 
					817be1d214 | ||
| 
						 | 
					70ad668056 | ||
| 
						 | 
					cbce003712 | ||
| 
						 | 
					bf82514b54 | ||
| 
						 | 
					07d5d538c2 | ||
| 
						 | 
					bcbd3c8fa2 | ||
| 
						 | 
					1279d3bac7 | ||
| 
						 | 
					b8c47a98b8 | ||
| 
						 | 
					149822e399 | ||
| 
						 | 
					f62805fae0 | ||
| 
						 | 
					add779e425 | ||
| 
						 | 
					7a63e6446b | ||
| 
						 | 
					f987e64476 | ||
| 
						 | 
					9e23c6d534 | ||
| 
						 | 
					1fcef81cb0 | ||
| 
						 | 
					c5ad31e518 | ||
| 
						 | 
					e253eaa036 | ||
| 
						 | 
					f744613be9 | ||
| 
						 | 
					389ed6da10 | ||
| 
						 | 
					345ff1a2f2 | ||
| 
						 | 
					f65473c036 | ||
| 
						 | 
					87d2c3c063 | ||
| 
						 | 
					b0e6811ace | ||
| 
						 | 
					a2b623d467 | ||
| 
						 | 
					44925b4c17 | ||
| 
						 | 
					fd15cd5ad9 | ||
| 
						 | 
					38f1fbbb75 | ||
| 
						 | 
					2992739b5d | ||
| 
						 | 
					97279ed2e2 | ||
| 
						 | 
					479c669a61 | ||
| 
						 | 
					4735edd00f | ||
| 
						 | 
					7501de267c | ||
| 
						 | 
					7c0c62df1d | ||
| 
						 | 
					d0750d287f | ||
| 
						 | 
					55e80a3cc6 | ||
| 
						 | 
					b8ff84b7f8 | ||
| 
						 | 
					3590a4b437 | ||
| 
						 | 
					be72944166 | ||
| 
						 | 
					0a01e4401b | ||
| 
						 | 
					845aad42b8 | ||
| 
						 | 
					d190ad228f | ||
| 
						 | 
					6e5ab70a93 | ||
| 
						 | 
					b76fd48a99 | ||
| 
						 | 
					50adfdf5ba | ||
| 
						 | 
					f83f9dbb3a | ||
| 
						 | 
					7ae1aa6b37 | ||
| 
						 | 
					7d15444d07 | ||
| 
						 | 
					8be1dcb4cb | ||
| 
						 | 
					b946e5ce0f | ||
| 
						 | 
					de740b258b | ||
| 
						 | 
					eaf1ffd837 | ||
| 
						 | 
					db8e731b8d | ||
| 
						 | 
					3fe83cdf81 | ||
| 
						 | 
					2f66fdd375 | ||
| 
						 | 
					1c39998e39 | ||
| 
						 | 
					7b756183aa | ||
| 
						 | 
					dc7da005d7 | ||
| 
						 | 
					fa94dbda81 | ||
| 
						 | 
					d8426d6f12 | ||
| 
						 | 
					e11878c8e3 | ||
| 
						 | 
					3c5244886a | ||
| 
						 | 
					cda17e12ed | ||
| 
						 | 
					d5975b733b | ||
| 
						 | 
					cb1e817c77 | ||
| 
						 | 
					81452cf0b7 | ||
| 
						 | 
					e03b8b78b2 | ||
| 
						 | 
					0cdc85d8cf | ||
| 
						 | 
					ae5394b9e2 | ||
| 
						 | 
					c243835303 | ||
| 
						 | 
					da9db83270 | ||
| 
						 | 
					55c0df5ef1 | ||
| 
						 | 
					e4fb53ea6e | ||
| 
						 | 
					4bbd95512a | ||
| 
						 | 
					db50037ece | ||
| 
						 | 
					9b4f9f45ee | ||
| 
						 | 
					4b44e46de0 | ||
| 
						 | 
					49fa5276fe | ||
| 
						 | 
					f70c80289c | ||
| 
						 | 
					e8103f3676 | ||
| 
						 | 
					74f869b962 | ||
| 
						 | 
					2d637ca36d | ||
| 
						 | 
					13a4f14710 | ||
| 
						 | 
					b58c99eb71 | ||
| 
						 | 
					535cc6d87f | ||
| 
						 | 
					8783a8a97c | ||
| 
						 | 
					c369daf3ea | ||
| 
						 | 
					f8d3501640 | ||
| 
						 | 
					8bf791e7ef | ||
| 
						 | 
					89090d8046 | ||
| 
						 | 
					66da771040 | ||
| 
						 | 
					0497d3a827 | ||
| 
						 | 
					b770def572 | ||
| 
						 | 
					340d82efb9 | ||
| 
						 | 
					a6f2a9619b | ||
| 
						 | 
					8dd466edc8 | ||
| 
						 | 
					a126b6ce7d | ||
| 
						 | 
					7e0d0de211 | ||
| 
						 | 
					0ea2684c2c | ||
| 
						 | 
					1d7f1ca7da | ||
| 
						 | 
					892128f6ca | ||
| 
						 | 
					0f96939ceb | ||
| 
						 | 
					5327fcf857 | ||
| 
						 | 
					ac7f403cbe | ||
| 
						 | 
					55c2646666 | ||
| 
						 | 
					6a82f0d7fb | ||
| 
						 | 
					155b9416b3 | ||
| 
						 | 
					c2d0f9ddeb | ||
| 
						 | 
					6e6c57da9a | ||
| 
						 | 
					76ccba9ec8 | ||
| 
						 | 
					97d1f1aaae | ||
| 
						 | 
					1acdd04d2d | ||
| 
						 | 
					9d251f9510 | ||
| 
						 | 
					ea5450b280 | ||
| 
						 | 
					3caf2bb606 | ||
| 
						 | 
					a652048efd | ||
| 
						 | 
					478fbc8f23 | ||
| 
						 | 
					cccad1c5de | ||
| 
						 | 
					45b7e160d8 | ||
| 
						 | 
					83f8ab5001 | ||
| 
						 | 
					a8f8b83cef | ||
| 
						 | 
					0ede9f52b7 | ||
| 
						 | 
					9cb3a13426 | ||
| 
						 | 
					02b3b05278 | ||
| 
						 | 
					8051b6d256 | ||
| 
						 | 
					00c0cbb445 | ||
| 
						 | 
					3d938d71b0 | ||
| 
						 | 
					c6d90f0535 | ||
| 
						 | 
					33a0deb928 | ||
| 
						 | 
					8c6d5a874d | ||
| 
						 | 
					efb05d0d1c | ||
| 
						 | 
					e8a3abe41e | ||
| 
						 | 
					4ec8f9c5ae | ||
| 
						 | 
					1696114587 | ||
| 
						 | 
					fcb5a8692a | ||
| 
						 | 
					cb4310fc58 | ||
| 
						 | 
					fbe67d307a | ||
| 
						 | 
					5256a4034b | ||
| 
						 | 
					91c412b6db | ||
| 
						 | 
					017253b7a3 | ||
| 
						 | 
					9852643373 | ||
| 
						 | 
					432cd4bfb7 | ||
| 
						 | 
					39f03bf9c6 | ||
| 
						 | 
					823a126d4c | ||
| 
						 | 
					52e358f13e | ||
| 
						 | 
					3d4526322b | ||
| 
						 | 
					4c5ac477cb | ||
| 
						 | 
					97946622c0 | ||
| 
						 | 
					ced982640b | ||
| 
						 | 
					3c5256d572 | ||
| 
						 | 
					d1b30ceaa3 | ||
| 
						 | 
					99f8bd72cb | ||
| 
						 | 
					dc19f352af | ||
| 
						 | 
					e4702deeec | ||
| 
						 | 
					8565a1c99a | ||
| 
						 | 
					66cf8098e6 | ||
| 
						 | 
					6abf1aea63 | ||
| 
						 | 
					1e0aa9497f | ||
| 
						 | 
					e757808429 | ||
| 
						 | 
					0ea304620c | ||
| 
						 | 
					95dc082168 | ||
| 
						 | 
					b49de21d74 | ||
| 
						 | 
					f0b3b08fb4 | ||
| 
						 | 
					04d2e57425 | ||
| 
						 | 
					3a3b0be09a | ||
| 
						 | 
					79fcc56781 | ||
| 
						 | 
					8d5389171f | ||
| 
						 | 
					1c967f17bd | ||
| 
						 | 
					ff8505a54d | ||
| 
						 | 
					4f7e7c4d49 | ||
| 
						 | 
					dc6d954bd2 | ||
| 
						 | 
					29a17db913 | ||
| 
						 | 
					440995cabb | ||
| 
						 | 
					d157742788 | ||
| 
						 | 
					61774ad1c4 | ||
| 
						 | 
					dcf5b7cfdd | ||
| 
						 | 
					bc3ec8ef07 | ||
| 
						 | 
					bd7162269f | ||
| 
						 | 
					5609858785 | ||
| 
						 | 
					a42df86c03 | ||
| 
						 | 
					c96bb8004e | ||
| 
						 | 
					8aaf5ec4c7 | ||
| 
						 | 
					fc5f3b8f4f | ||
| 
						 | 
					e943db045a | ||
| 
						 | 
					2d730a289a | ||
| 
						 | 
					fc3c456053 | ||
| 
						 | 
					1e77058b7b | ||
| 
						 | 
					c06d56cc7d | ||
| 
						 | 
					437d033dbb | ||
| 
						 | 
					3c353e58c0 | ||
| 
						 | 
					f3a1295cff | ||
| 
						 | 
					9f14bbfd80 | ||
| 
						 | 
					8fdfeb3f40 | ||
| 
						 | 
					b92cc27b76 | ||
| 
						 | 
					c040f96e4b | ||
| 
						 | 
					d017f5ba38 | ||
| 
						 | 
					69c153c4e6 | ||
| 
						 | 
					1543f2b60e | ||
| 
						 | 
					f4d746a3c1 | ||
| 
						 | 
					28a8226350 | ||
| 
						 | 
					92f7d79030 | ||
| 
						 | 
					1c7b1f9aec | ||
| 
						 | 
					3393243d5e | ||
| 
						 | 
					3dd9cde2a5 | ||
| 
						 | 
					d219f2b9d2 | ||
| 
						 | 
					0bd61519c0 | ||
| 
						 | 
					4bd87a9b9e | ||
| 
						 | 
					9f0383c66f | ||
| 
						 | 
					8281a19465 | ||
| 
						 | 
					4774d38970 | ||
| 
						 | 
					517a662005 | ||
| 
						 | 
					46df71396d | ||
| 
						 | 
					944ad6cac9 | ||
| 
						 | 
					9db1f24c47 | ||
| 
						 | 
					7555e2b822 | ||
| 
						 | 
					7b71cdb0b4 | ||
| 
						 | 
					fb2a89b1fb | ||
| 
						 | 
					c8b9658ecc | ||
| 
						 | 
					78637b6136 | ||
| 
						 | 
					8e029fcfa9 | ||
| 
						 | 
					86f4a3d8af | ||
| 
						 | 
					bc94999148 | ||
| 
						 | 
					1395b56a1d | ||
| 
						 | 
					b6131a733d | ||
| 
						 | 
					12c6688e31 | ||
| 
						 | 
					7ca84888c2 | ||
| 
						 | 
					7b480ee90c | ||
| 
						 | 
					922af194bc | ||
| 
						 | 
					c539ec022f | ||
| 
						 | 
					557ae511cb | ||
| 
						 | 
					debe4e920f | ||
| 
						 | 
					90c9ede8e6 | ||
| 
						 | 
					e5d4062962 | ||
| 
						 | 
					8e8bc5f28b | ||
| 
						 | 
					001baa5dd8 | ||
| 
						 | 
					d8428ae35d | ||
| 
						 | 
					714a46a63c | ||
| 
						 | 
					c5d779d266 | ||
| 
						 | 
					a2c69af50e | ||
| 
						 | 
					5d1d72df16 | ||
| 
						 | 
					4b45088fc9 | ||
| 
						 | 
					d77f51ba9e | ||
| 
						 | 
					907b33cdc4 | ||
| 
						 | 
					ce88d74d34 | ||
| 
						 | 
					337b221e00 | ||
| 
						 | 
					e8e3583fc7 | ||
| 
						 | 
					41d8545ab6 | ||
| 
						 | 
					6e44bf20f7 | ||
| 
						 | 
					e77f859d72 | ||
| 
						 | 
					d1398e9f13 | ||
| 
						 | 
					4f1f510f16 | ||
| 
						 | 
					b6ea0c4c57 | ||
| 
						 | 
					7f6cddb58f | ||
| 
						 | 
					0d51a97ae9 | ||
| 
						 | 
					bc7074508a | ||
| 
						 | 
					d9fedf7832 | ||
| 
						 | 
					fa53008fb7 | ||
| 
						 | 
					97b3913dcc | ||
| 
						 | 
					ce6a6c5411 | ||
| 
						 | 
					8914ab696d | ||
| 
						 | 
					5fe0e55ca4 | ||
| 
						 | 
					b2658ec321 | ||
| 
						 | 
					a41fe749a8 | ||
| 
						 | 
					89b4b315aa | ||
| 
						 | 
					79fb3a013e | ||
| 
						 | 
					3edd293dae | ||
| 
						 | 
					e6add6499f | ||
| 
						 | 
					e820ca6973 | ||
| 
						 | 
					a6d126709a | ||
| 
						 | 
					17c9678a3c | ||
| 
						 | 
					e8d3491ec2 | ||
| 
						 | 
					43d49e4710 | ||
| 
						 | 
					c98273c9e7 | ||
| 
						 | 
					24b3ede251 | ||
| 
						 | 
					98f0178611 | ||
| 
						 | 
					5214bd52c8 | ||
| 
						 | 
					5168baea10 | ||
| 
						 | 
					ef75416ab7 | ||
| 
						 | 
					53b7f33f2d | ||
| 
						 | 
					aaa49f0485 | ||
| 
						 | 
					31509af247 | ||
| 
						 | 
					7ea431df98 | ||
| 
						 | 
					471302a07b | ||
| 
						 | 
					a4bb5f2a29 | ||
| 
						 | 
					dc0f0f1cf2 | ||
| 
						 | 
					e21c1eab9d | ||
| 
						 | 
					44317a511b | ||
| 
						 | 
					d8985f5360 | ||
| 
						 | 
					bea691b5c9 | ||
| 
						 | 
					ecbbef6b67 | ||
| 
						 | 
					176c291d9c | ||
| 
						 | 
					4f52d49f1e | ||
| 
						 | 
					254a4c033c | ||
| 
						 | 
					fbac961b47 | ||
| 
						 | 
					07799ef28a | ||
| 
						 | 
					e0e4045db8 | ||
| 
						 | 
					e2b52f6f01 | ||
| 
						 | 
					33b3953c54 | ||
| 
						 | 
					0fbc277746 | ||
| 
						 | 
					2c838ede68 | ||
| 
						 | 
					cca866f578 | ||
| 
						 | 
					2aa67ce20f | ||
| 
						 | 
					a49c701529 | ||
| 
						 | 
					42c0b1b1f1 | ||
| 
						 | 
					c7489f4815 | ||
| 
						 | 
					15c839f563 | ||
| 
						 | 
					b105414118 | ||
| 
						 | 
					92146eb8ac | ||
| 
						 | 
					dca319040c | ||
| 
						 | 
					b0bafd0439 | ||
| 
						 | 
					38dd0448cd | ||
| 
						 | 
					587bd3669e | ||
| 
						 | 
					1898d1336d | ||
| 
						 | 
					44afbbb72d | ||
| 
						 | 
					c620c632c1 | ||
| 
						 | 
					4ded624ff3 | ||
| 
						 | 
					59114915bc | ||
| 
						 | 
					97880c3324 | ||
| 
						 | 
					39d93f3891 | ||
| 
						 | 
					6a422e4452 | ||
| 
						 | 
					0f8ee6eb4b | ||
| 
						 | 
					61c5c96ae1 | ||
| 
						 | 
					997ac14c6a | ||
| 
						 | 
					2fd31bbba7 | ||
| 
						 | 
					faf8c63b0f | ||
| 
						 | 
					4a28da5843 | ||
| 
						 | 
					c23a9e218c | ||
| 
						 | 
					b19b16cfa1 | ||
| 
						 | 
					c9976b32b4 | ||
| 
						 | 
					a2288d274c | ||
| 
						 | 
					e67d45d4ce | ||
| 
						 | 
					913ddbf747 | ||
| 
						 | 
					ad8e6f2ed6 | ||
| 
						 | 
					a3938266f5 | ||
| 
						 | 
					47fe535422 | ||
| 
						 | 
					3a070ba502 | ||
| 
						 | 
					f82cfc2ee8 | ||
| 
						 | 
					87c21a95ae | ||
| 
						 | 
					5908e0b664 | ||
| 
						 | 
					9c6eea35b6 | ||
| 
						 | 
					5831a7127e | ||
| 
						 | 
					63819c033c | ||
| 
						 | 
					8c854769fc | ||
| 
						 | 
					44138d7d9e | ||
| 
						 | 
					bfb6d48812 | ||
| 
						 | 
					09acd267bc | ||
| 
						 | 
					a4dad3e961 | ||
| 
						 | 
					8710cceb45 | ||
| 
						 | 
					78b434e8b1 | ||
| 
						 | 
					d43fd99822 | ||
| 
						 | 
					0d0db3e8c3 | ||
| 
						 | 
					60d0b3364c | ||
| 
						 | 
					7012ba6395 | ||
| 
						 | 
					dc07cc6fed | ||
| 
						 | 
					c2cf347fe2 | ||
| 
						 | 
					2b6d62140e | ||
| 
						 | 
					6c3b691c49 | ||
| 
						 | 
					7ccd7fc325 | ||
| 
						 | 
					faea038f4f | ||
| 
						 | 
					8f7e7663ad | ||
| 
						 | 
					f990b35fa4 | ||
| 
						 | 
					baaaa57533 | ||
| 
						 | 
					8bb37dd069 | ||
| 
						 | 
					877fac122b | ||
| 
						 | 
					914f8f9ee0 | ||
| 
						 | 
					c005792951 | ||
| 
						 | 
					fd891a9655 | ||
| 
						 | 
					eb88b172fe | ||
| 
						 | 
					ce5e17072d | ||
| 
						 | 
					4fcabf5169 | ||
| 
						 | 
					bdfbc3e876 | ||
| 
						 | 
					2da8d24e8f | ||
| 
						 | 
					a9f55e8324 | ||
| 
						 | 
					2561b4dd4c | ||
| 
						 | 
					65d9599807 | ||
| 
						 | 
					f1b09c0433 | ||
| 
						 | 
					a8c5ab2ca6 | ||
| 
						 | 
					98e88e6ad8 | ||
| 
						 | 
					668e804504 | ||
| 
						 | 
					5df6c04585 | ||
| 
						 | 
					ce2ca9f777 | ||
| 
						 | 
					516c087c51 | ||
| 
						 | 
					b8c1cdcd12 | ||
| 
						 | 
					179bceffdb | ||
| 
						 | 
					0601f92a88 | ||
| 
						 | 
					88fadafa9e | ||
| 
						 | 
					19dbc0f066 | ||
| 
						 | 
					6d52fe2e71 | ||
| 
						 | 
					c543d38ac7 | ||
| 
						 | 
					622beaba67 | ||
| 
						 | 
					01853d7ce9 | ||
| 
						 | 
					d90536c1a2 | ||
| 
						 | 
					e2a5fd2cf4 | ||
| 
						 | 
					f779dba405 | ||
| 
						 | 
					c139b81a13 | ||
| 
						 | 
					54a6f73958 | ||
| 
						 | 
					ebf7466cd8 | ||
| 
						 | 
					cf1c0ebc3a | ||
| 
						 | 
					86d0cb8325 | ||
| 
						 | 
					cbebbff025 | ||
| 
						 | 
					71d923232c | ||
| 
						 | 
					b601202905 | ||
| 
						 | 
					275c102787 | ||
| 
						 | 
					dbd3760712 | ||
| 
						 | 
					fdc549994a | ||
| 
						 | 
					d02aa04422 | ||
| 
						 | 
					6af9d7f2e2 | ||
| 
						 | 
					acc481eaae | ||
| 
						 | 
					6e068e51b5 | ||
| 
						 | 
					b6782686f4 | ||
| 
						 | 
					c022dbc4d3 | ||
| 
						 | 
					2276eb16f3 | ||
| 
						 | 
					102123821d | ||
| 
						 | 
					6051bcc3dc | ||
| 
						 | 
					71e88f903d | ||
| 
						 | 
					7621b48a1c | ||
| 
						 | 
					f2d621e383 | ||
| 
						 | 
					b337c54cc4 | ||
| 
						 | 
					7544e766e4 | ||
| 
						 | 
					a2a13cbe5f | ||
| 
						 | 
					e97b849219 | ||
| 
						 | 
					f9f078ebb6 | ||
| 
						 | 
					be380f2005 | ||
| 
						 | 
					26ab314176 | ||
| 
						 | 
					45db29784d | ||
| 
						 | 
					7c16dcc79b | ||
| 
						 | 
					bbea7c95d8 | ||
| 
						 | 
					a927aec5f8 | ||
| 
						 | 
					89ab1dca50 | ||
| 
						 | 
					3f2a06674a | ||
| 
						 | 
					efc2e9844e | ||
| 
						 | 
					5317185eb0 | ||
| 
						 | 
					cad0eca25c | ||
| 
						 | 
					c855ed72a6 | ||
| 
						 | 
					1e4473b216 | ||
| 
						 | 
					131cab7c27 | ||
| 
						 | 
					ed93470a69 | ||
| 
						 | 
					cbdfdb947c | ||
| 
						 | 
					a49fff632c | ||
| 
						 | 
					7e272e8c43 | ||
| 
						 | 
					109a2edf90 | ||
| 
						 | 
					bbefdce7eb | ||
| 
						 | 
					c5a7c89e89 | ||
| 
						 | 
					30181c46d8 | ||
| 
						 | 
					f76d42a98a | ||
| 
						 | 
					15353216c5 | ||
| 
						 | 
					dee70d355f | ||
| 
						 | 
					c3bdffb0a5 | ||
| 
						 | 
					9ae5fb706e | ||
| 
						 | 
					55ef1ae9e7 | ||
| 
						 | 
					89ca85dacd | ||
| 
						 | 
					02fda6582c | ||
| 
						 | 
					4e11f3ca6e | ||
| 
						 | 
					ff683ab1da | ||
| 
						 | 
					8c15ced172 | ||
| 
						 | 
					2161e44025 | ||
| 
						 | 
					ef2b3cce50 | ||
| 
						 | 
					9e420c01da | ||
| 
						 | 
					96dba4902c | ||
| 
						 | 
					48d8291df4 | ||
| 
						 | 
					7875e1d8ad | ||
| 
						 | 
					b962646fc5 | ||
| 
						 | 
					7ca17435d5 | ||
| 
						 | 
					da8c3bf218 | ||
| 
						 | 
					a492bcef87 | ||
| 
						 | 
					9843e7c635 | ||
| 
						 | 
					6f41e29064 | ||
| 
						 | 
					48bfee8797 | ||
| 
						 | 
					e2c6a633fb | ||
| 
						 | 
					883fdd45cf | ||
| 
						 | 
					ade9693a30 | ||
| 
						 | 
					976f7f42c1 | ||
| 
						 | 
					37d03809bf | ||
| 
						 | 
					1bcf7a35e9 | ||
| 
						 | 
					0f854e9ab5 | ||
| 
						 | 
					3373f0e93b | ||
| 
						 | 
					8089f1cf13 | ||
| 
						 | 
					129a25c76d | ||
| 
						 | 
					85076fc5ab | ||
| 
						 | 
					a989c66b84 | ||
| 
						 | 
					587a71f1d6 | ||
| 
						 | 
					4ec47249bc | ||
| 
						 | 
					cdf16c22ba | ||
| 
						 | 
					985f19bc6b | ||
| 
						 | 
					beec69cfe2 | ||
| 
						 | 
					e88de49faa | ||
| 
						 | 
					ca5a54113f | ||
| 
						 | 
					97db651ce0 | ||
| 
						 | 
					330fba41e2 | ||
| 
						 | 
					18b60af27c | ||
| 
						 | 
					43d5cc7fe1 | ||
| 
						 | 
					700b7fd0a9 | ||
| 
						 | 
					8515e62e6b | ||
| 
						 | 
					f3bf5f2029 | ||
| 
						 | 
					8371c897dc | ||
| 
						 | 
					8dfeece878 | ||
| 
						 | 
					0e5d0f7485 | ||
| 
						 | 
					1fb9a8eed2 | ||
| 
						 | 
					d610ead258 | ||
| 
						 | 
					4f569e8485 | ||
| 
						 | 
					60b9f685cb | ||
| 
						 | 
					62ad8baa40 | ||
| 
						 | 
					632177fa7f | ||
| 
						 | 
					f80bbc0efb | ||
| 
						 | 
					6eb1016301 | ||
| 
						 | 
					4be50c5289 | ||
| 
						 | 
					ad8bae3c2d | ||
| 
						 | 
					c47d868d99 | ||
| 
						 | 
					26453e7b67 | ||
| 
						 | 
					db4afa6bd2 | ||
| 
						 | 
					0a80164c94 | ||
| 
						 | 
					0d2f348392 | ||
| 
						 | 
					f480c1256d | ||
| 
						 | 
					0de534b725 | ||
| 
						 | 
					f9a5b96fd2 | ||
| 
						 | 
					556ff27e2e | ||
| 
						 | 
					d104b16b56 | ||
| 
						 | 
					eb8faf1c89 | ||
| 
						 | 
					cafae5b544 | ||
| 
						 | 
					1d7ccd5325 | ||
| 
						 | 
					3007db0b45 | ||
| 
						 | 
					ae14b37431 | ||
| 
						 | 
					686616a989 | ||
| 
						 | 
					3d7063d4b0 | ||
| 
						 | 
					f72af26305 | ||
| 
						 | 
					a8015e217e | ||
| 
						 | 
					3f42d10805 | ||
| 
						 | 
					8ba2d2d5a0 | ||
| 
						 | 
					5c02f88a81 | ||
| 
						 | 
					f237849862 | ||
| 
						 | 
					73de6ad522 | ||
| 
						 | 
					17fc3e94c9 | ||
| 
						 | 
					4aaf4661c3 | ||
| 
						 | 
					5c337fd08a | ||
| 
						 | 
					6a2e0f029a | ||
| 
						 | 
					d1999cb234 | ||
| 
						 | 
					5a73bbdb83 | ||
| 
						 | 
					59e7a47c41 | ||
| 
						 | 
					b0789cd299 | ||
| 
						 | 
					465ce0e420 | ||
| 
						 | 
					5f0dc57653 | ||
| 
						 | 
					65b768fdf9 | ||
| 
						 | 
					2dcfd16fbd | ||
| 
						 | 
					2b2b461d39 | ||
| 
						 | 
					913862be8c | ||
| 
						 | 
					aa5c1b4c5d | ||
| 
						 | 
					a5e4ca8390 | ||
| 
						 | 
					6d22713722 | ||
| 
						 | 
					d53fb0fda5 | ||
| 
						 | 
					f003f77b8c | ||
| 
						 | 
					f5574fb44c | ||
| 
						 | 
					e5112b3ae3 | ||
| 
						 | 
					7c5f00f868 | ||
| 
						 | 
					a8a9c2bb45 | ||
| 
						 | 
					a4bcc8c318 | ||
| 
						 | 
					11a4a3c065 | ||
| 
						 | 
					7e55ff1593 | ||
| 
						 | 
					802e1d84cc | ||
| 
						 | 
					fd3658b0e4 | ||
| 
						 | 
					76a08210b6 | ||
| 
						 | 
					086934136b | ||
| 
						 | 
					97307af21a | ||
| 
						 | 
					aecb1770d5 | ||
| 
						 | 
					1601c1385a | ||
| 
						 | 
					7153b822ed | ||
| 
						 | 
					76fe5dfc67 | ||
| 
						 | 
					d5d9289800 | ||
| 
						 | 
					0af5ff49bd | ||
| 
						 | 
					240767b29d | ||
| 
						 | 
					92b199061a | ||
| 
						 | 
					623e6eed5e | ||
| 
						 | 
					7dbdada49f | ||
| 
						 | 
					d1cdda88bd | ||
| 
						 | 
					36eabb1c3c | ||
| 
						 | 
					4c1a8be29d | ||
| 
						 | 
					ccae5d99d2 | ||
| 
						 | 
					e47811ef8f | ||
| 
						 | 
					af76953448 | ||
| 
						 | 
					4cd65e4f19 | ||
| 
						 | 
					60052b618f | ||
| 
						 | 
					b9a72d3c4d | ||
| 
						 | 
					670b2c09ce | ||
| 
						 | 
					d31256cd38 | ||
| 
						 | 
					57fefd5f9a | ||
| 
						 | 
					7b0f24fc21 | ||
| 
						 | 
					4a7dcf8eb2 | ||
| 
						 | 
					287b0c6da9 | ||
| 
						 | 
					e0786c280e | ||
| 
						 | 
					c77b1f5acd | ||
| 
						 | 
					778845da05 | ||
| 
						 | 
					2061359fcf | ||
| 
						 | 
					0ae1e4a95a | ||
| 
						 | 
					493a8579f1 | ||
| 
						 | 
					4907c29904 | ||
| 
						 | 
					47767609fe | ||
| 
						 | 
					fd90ce2711 | ||
| 
						 | 
					a257e469e1 | ||
| 
						 | 
					95cb130f32 | ||
| 
						 | 
					d45870be8d | ||
| 
						 | 
					9e81112df2 | ||
| 
						 | 
					486a73a9ce | ||
| 
						 | 
					d31698b0e0 | ||
| 
						 | 
					3a7bc16156 | ||
| 
						 | 
					ee3d42bf3f | ||
| 
						 | 
					4aec440682 | ||
| 
						 | 
					0810a2d8bc | ||
| 
						 | 
					03f12e142b | ||
| 
						 | 
					2301d10f73 | ||
| 
						 | 
					f58011ada5 | ||
| 
						 | 
					f274c2199b | ||
| 
						 | 
					fbd3b89488 | ||
| 
						 | 
					ccc9e1da8d | ||
| 
						 | 
					4902606bb6 | ||
| 
						 | 
					2be50a1c9c | ||
| 
						 | 
					bfce02971e | ||
| 
						 | 
					afcb62b414 | ||
| 
						 | 
					297b2b99de | ||
| 
						 | 
					6686e4411d | ||
| 
						 | 
					8d98aef055 | ||
| 
						 | 
					abff8b24b9 | ||
| 
						 | 
					b3e411e481 | ||
| 
						 | 
					3e9263e1ca | ||
| 
						 | 
					4feae6791c | ||
| 
						 | 
					4659e3644f | ||
| 
						 | 
					4a29474c83 | ||
| 
						 | 
					9ed0e071fe | ||
| 
						 | 
					a6e9ae9066 | ||
| 
						 | 
					e07b141da0 | ||
| 
						 | 
					5d8877a944 | ||
| 
						 | 
					1c9af9833d | ||
| 
						 | 
					3b35e962e2 | ||
| 
						 | 
					931c0a954f | ||
| 
						 | 
					66b9933b8d | ||
| 
						 | 
					8b17f7f4eb | ||
| 
						 | 
					ee87e20d53 | ||
| 
						 | 
					924d06a075 | ||
| 
						 | 
					3606b78108 | ||
| 
						 | 
					ca90d4fd96 | ||
| 
						 | 
					391ecffed9 | ||
| 
						 | 
					02804821cc | ||
| 
						 | 
					e5eda53e3d | ||
| 
						 | 
					ef51c1ab5b | ||
| 
						 | 
					b423a6b212 | ||
| 
						 | 
					305492c375 | ||
| 
						 | 
					2e36149ccd | ||
| 
						 | 
					27d083c1b9 | ||
| 
						 | 
					03829f2fea | ||
| 
						 | 
					3d2f037a44 | ||
| 
						 | 
					f2cbee9a04 | ||
| 
						 | 
					1777413a2a | ||
| 
						 | 
					3a7ebf9c36 | ||
| 
						 | 
					9757c1aded | ||
| 
						 | 
					3f7f194304 | ||
| 
						 | 
					73bce9ec7e | ||
| 
						 | 
					f76ccce5bc | ||
| 
						 | 
					645c70f852 | ||
| 
						 | 
					c0b23ac20d | ||
| 
						 | 
					45f9ee263f | ||
| 
						 | 
					29b5cf6a9d | ||
| 
						 | 
					a53c495b3e | ||
| 
						 | 
					4aa9255efa | ||
| 
						 | 
					e8645ce9f9 | ||
| 
						 | 
					278593c9a9 | ||
| 
						 | 
					effd974b16 | ||
| 
						 | 
					3701dcc5c1 | ||
| 
						 | 
					e3bf76f9ec | ||
| 
						 | 
					1551d7c00b | ||
| 
						 | 
					14e7203e7b | ||
| 
						 | 
					63c5bf2b9c | ||
| 
						 | 
					3cba8dc304 | ||
| 
						 | 
					d61c1ea69b | ||
| 
						 | 
					14ef4aeafb | ||
| 
						 | 
					b09ac154af | ||
| 
						 | 
					d011a8a45c | ||
| 
						 | 
					4009b63c42 | ||
| 
						 | 
					004b9d83e3 | ||
| 
						 | 
					af7484a332 | ||
| 
						 | 
					2baa3debd5 | ||
| 
						 | 
					3b2510374a | ||
| 
						 | 
					eb8c667570 | ||
| 
						 | 
					2f693be8f8 | ||
| 
						 | 
					2404332c1b | ||
| 
						 | 
					4565812032 | ||
| 
						 | 
					93d9c50419 | ||
| 
						 | 
					9244ac8592 | ||
| 
						 | 
					481fb7640c | ||
| 
						 | 
					b815f3a977 | ||
| 
						 | 
					8a75847497 | ||
| 
						 | 
					7e8e507bfb | ||
| 
						 | 
					5668dcc7b9 | ||
| 
						 | 
					aac3adb3c5 | ||
| 
						 | 
					59681be0a0 | ||
| 
						 | 
					2ed0cf06f9 | ||
| 
						 | 
					c88ce84bb5 | ||
| 
						 | 
					90517b5e85 | ||
| 
						 | 
					60bd744c88 | ||
| 
						 | 
					5eee2a88f8 | ||
| 
						 | 
					e1ff83f4b0 | ||
| 
						 | 
					927693a991 | ||
| 
						 | 
					6de407b638 | ||
| 
						 | 
					8de26efa66 | ||
| 
						 | 
					866447a008 | ||
| 
						 | 
					0bb897211d | ||
| 
						 | 
					5e300cac2c | ||
| 
						 | 
					7f629dfca4 | ||
| 
						 | 
					b2baaa215b | ||
| 
						 | 
					5afa7d1f87 | ||
| 
						 | 
					30205e14b7 | ||
| 
						 | 
					acb219be25 | ||
| 
						 | 
					0c5a140a02 | ||
| 
						 | 
					04c53d2393 | ||
| 
						 | 
					970acffa8f | ||
| 
						 | 
					7b4f727959 | ||
| 
						 | 
					1a1114d21c | ||
| 
						 | 
					4e73e4bf93 | ||
| 
						 | 
					44e3640923 | ||
| 
						 | 
					0080aca235 | ||
| 
						 | 
					c5f7842234 | ||
| 
						 | 
					79bd071373 | ||
| 
						 | 
					c74bf6d889 | ||
| 
						 | 
					30e9c091c0 | ||
| 
						 | 
					73fe337647 | ||
| 
						 | 
					d72ed35374 | ||
| 
						 | 
					12cb30d4bd | ||
| 
						 | 
					718feb0f69 | ||
| 
						 | 
					73c8fe5deb | ||
| 
						 | 
					f85f79f630 | ||
| 
						 | 
					327b138b2c | ||
| 
						 | 
					cae03a7ef5 | ||
| 
						 | 
					d181a627f0 | ||
| 
						 | 
					5ef2d1ddae | ||
| 
						 | 
					77ea408983 | ||
| 
						 | 
					6eb05c9ed0 | ||
| 
						 | 
					bc98e93b53 | ||
| 
						 | 
					b8a1de86fd | ||
| 
						 | 
					b644384bb5 | ||
| 
						 | 
					54210f706c | ||
| 
						 | 
					f3bea3de5b | ||
| 
						 | 
					4cf68be17a | ||
| 
						 | 
					2149f214d5 | ||
| 
						 | 
					f26b8c84f8 | ||
| 
						 | 
					f2cf3c06a0 | ||
| 
						 | 
					1582ac851f | ||
| 
						 | 
					14e24a1297 | ||
| 
						 | 
					a98f6c0254 | ||
| 
						 | 
					8845334097 | ||
| 
						 | 
					bb5a39c1a7 | ||
| 
						 | 
					19b4dead25 | 
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -30,14 +30,17 @@
 | 
			
		||||
/examples/decode_with_partial_drops
 | 
			
		||||
/examples/example_xma
 | 
			
		||||
/examples/postproc
 | 
			
		||||
/examples/resize_util
 | 
			
		||||
/examples/set_maps
 | 
			
		||||
/examples/simple_decoder
 | 
			
		||||
/examples/simple_encoder
 | 
			
		||||
/examples/twopass_encoder
 | 
			
		||||
/examples/vp8_multi_resolution_encoder
 | 
			
		||||
/examples/vp8cx_set_ref
 | 
			
		||||
/examples/vp9_lossless_encoder
 | 
			
		||||
/examples/vp9_spatial_scalable_encoder
 | 
			
		||||
/examples/vpx_temporal_scalable_patterns
 | 
			
		||||
/examples/vpx_temporal_svc_encoder
 | 
			
		||||
/ivfdec
 | 
			
		||||
/ivfdec.dox
 | 
			
		||||
/ivfenc
 | 
			
		||||
@@ -45,12 +48,14 @@
 | 
			
		||||
/libvpx.so*
 | 
			
		||||
/libvpx.ver
 | 
			
		||||
/samples.dox
 | 
			
		||||
/test_intra_pred_speed
 | 
			
		||||
/test_libvpx
 | 
			
		||||
/vp8_api1_migration.dox
 | 
			
		||||
/vp[89x]_rtcd.h
 | 
			
		||||
/vpx.pc
 | 
			
		||||
/vpx_config.c
 | 
			
		||||
/vpx_config.h
 | 
			
		||||
/vpx_dsp_rtcd.h
 | 
			
		||||
/vpx_scale_rtcd.h
 | 
			
		||||
/vpx_version.h
 | 
			
		||||
/vpxdec
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								.mailmap
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								.mailmap
									
									
									
									
									
								
							@@ -1,18 +1,26 @@
 | 
			
		||||
Adrian Grange <agrange@google.com>
 | 
			
		||||
Alex Converse <aconverse@google.com> <alex.converse@gmail.com>
 | 
			
		||||
Alexis Ballier <aballier@gentoo.org> <alexis.ballier@gmail.com>
 | 
			
		||||
Alpha Lam <hclam@google.com> <hclam@chromium.org>
 | 
			
		||||
Deb Mukherjee <debargha@google.com>
 | 
			
		||||
Erik Niemeyer <erik.a.niemeyer@intel.com> <erik.a.niemeyer@gmail.com>
 | 
			
		||||
Guillaume Martres <gmartres@google.com> <smarter3@gmail.com>
 | 
			
		||||
Hangyu Kuang <hkuang@google.com>
 | 
			
		||||
Jim Bankoski <jimbankoski@google.com>
 | 
			
		||||
John Koleszar <jkoleszar@google.com>
 | 
			
		||||
Johann Koenig <johannkoenig@google.com>
 | 
			
		||||
Johann Koenig <johannkoenig@google.com> <johann.koenig@duck.com>
 | 
			
		||||
Johann Koenig <johannkoenig@google.com> <johannkoenig@dhcp-172-19-7-52.mtv.corp.google.com>
 | 
			
		||||
John Koleszar <jkoleszar@google.com>
 | 
			
		||||
Joshua Litt <joshualitt@google.com> <joshualitt@chromium.org>
 | 
			
		||||
Marco Paniconi <marpan@google.com>
 | 
			
		||||
Marco Paniconi <marpan@google.com> <marpan@chromium.org>
 | 
			
		||||
Pascal Massimino <pascal.massimino@gmail.com>
 | 
			
		||||
Paul Wilkins <paulwilkins@google.com>
 | 
			
		||||
Ralph Giles <giles@xiph.org> <giles@entropywave.com>
 | 
			
		||||
Ralph Giles <giles@xiph.org> <giles@mozilla.com>
 | 
			
		||||
Sami Pietilä <samipietila@google.com>
 | 
			
		||||
Tamar Levy <tamar.levy@intel.com>
 | 
			
		||||
Tamar Levy <tamar.levy@intel.com> <levytamar82@gmail.com>
 | 
			
		||||
Tero Rintaluoma <teror@google.com> <tero.rintaluoma@on2.com>
 | 
			
		||||
Timothy B. Terriberry <tterribe@xiph.org> Tim Terriberry <tterriberry@mozilla.com>
 | 
			
		||||
Tom Finegan <tomfinegan@google.com>
 | 
			
		||||
Ralph Giles <giles@xiph.org> <giles@entropywave.com>
 | 
			
		||||
Ralph Giles <giles@xiph.org> <giles@mozilla.com>
 | 
			
		||||
Alpha Lam <hclam@google.com> <hclam@chromium.org>
 | 
			
		||||
Deb Mukherjee <debargha@google.com>
 | 
			
		||||
Yaowu Xu <yaowu@google.com> <yaowu@xuyaowu.com>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								AUTHORS
									
									
									
									
									
								
							@@ -3,10 +3,11 @@
 | 
			
		||||
 | 
			
		||||
Aaron Watry <awatry@gmail.com>
 | 
			
		||||
Abo Talib Mahfoodh <ab.mahfoodh@gmail.com>
 | 
			
		||||
Adam Xu <adam@xuyaowu.com>
 | 
			
		||||
Adrian Grange <agrange@google.com>
 | 
			
		||||
Ahmad Sharif <asharif@google.com>
 | 
			
		||||
Alexander Voronov <avoronov@graphics.cs.msu.ru>
 | 
			
		||||
Alex Converse <alex.converse@gmail.com>
 | 
			
		||||
Alex Converse <aconverse@google.com>
 | 
			
		||||
Alexis Ballier <aballier@gentoo.org>
 | 
			
		||||
Alok Ahuja <waveletcoeff@gmail.com>
 | 
			
		||||
Alpha Lam <hclam@google.com>
 | 
			
		||||
@@ -14,44 +15,58 @@ A.Mahfoodh <ab.mahfoodh@gmail.com>
 | 
			
		||||
Ami Fischman <fischman@chromium.org>
 | 
			
		||||
Andoni Morales Alastruey <ylatuya@gmail.com>
 | 
			
		||||
Andres Mejia <mcitadel@gmail.com>
 | 
			
		||||
Andrew Russell <anrussell@google.com>
 | 
			
		||||
Aron Rosenberg <arosenberg@logitech.com>
 | 
			
		||||
Attila Nagy <attilanagy@google.com>
 | 
			
		||||
changjun.yang <changjun.yang@intel.com>
 | 
			
		||||
Charles 'Buck' Krasic <ckrasic@google.com>
 | 
			
		||||
chm <chm@rock-chips.com>
 | 
			
		||||
Christian Duvivier <cduvivier@google.com>
 | 
			
		||||
Daniel Kang <ddkang@google.com>
 | 
			
		||||
Deb Mukherjee <debargha@google.com>
 | 
			
		||||
Dim Temp <dimtemp0@gmail.com>
 | 
			
		||||
Dmitry Kovalev <dkovalev@google.com>
 | 
			
		||||
Dragan Mrdjan <dmrdjan@mips.com>
 | 
			
		||||
Erik Niemeyer <erik.a.niemeyer@gmail.com>
 | 
			
		||||
Ehsan Akhgari <ehsan.akhgari@gmail.com>
 | 
			
		||||
Erik Niemeyer <erik.a.niemeyer@intel.com>
 | 
			
		||||
Fabio Pedretti <fabio.ped@libero.it>
 | 
			
		||||
Frank Galligan <fgalligan@google.com>
 | 
			
		||||
Fredrik Söderquist <fs@opera.com>
 | 
			
		||||
Fritz Koenig <frkoenig@google.com>
 | 
			
		||||
Gaute Strokkenes <gaute.strokkenes@broadcom.com>
 | 
			
		||||
Giuseppe Scrivano <gscrivano@gnu.org>
 | 
			
		||||
Gordana Cmiljanovic <gordana.cmiljanovic@imgtec.com>
 | 
			
		||||
Guillaume Martres <gmartres@google.com>
 | 
			
		||||
Guillermo Ballester Valor <gbvalor@gmail.com>
 | 
			
		||||
Hangyu Kuang <hkuang@google.com>
 | 
			
		||||
Hanno Böck <hanno@hboeck.de>
 | 
			
		||||
Henrik Lundin <hlundin@google.com>
 | 
			
		||||
Hui Su <huisu@google.com>
 | 
			
		||||
Ivan Maltz <ivanmaltz@google.com>
 | 
			
		||||
Jacek Caban <cjacek@gmail.com>
 | 
			
		||||
JackyChen <jackychen@google.com>
 | 
			
		||||
James Berry <jamesberry@google.com>
 | 
			
		||||
James Yu <james.yu@linaro.org>
 | 
			
		||||
James Zern <jzern@google.com>
 | 
			
		||||
Jan Gerber <j@mailb.org>
 | 
			
		||||
Jan Kratochvil <jan.kratochvil@redhat.com>
 | 
			
		||||
Janne Salonen <jsalonen@google.com>
 | 
			
		||||
Jeff Faust <jfaust@google.com>
 | 
			
		||||
Jeff Muizelaar <jmuizelaar@mozilla.com>
 | 
			
		||||
Jeff Petkau <jpet@chromium.org>
 | 
			
		||||
Jia Jia <jia.jia@linaro.org>
 | 
			
		||||
Jim Bankoski <jimbankoski@google.com>
 | 
			
		||||
Jingning Han <jingning@google.com>
 | 
			
		||||
Joey Parrish <joeyparrish@google.com>
 | 
			
		||||
Johann Koenig <johannkoenig@google.com>
 | 
			
		||||
John Koleszar <jkoleszar@google.com>
 | 
			
		||||
John Stark <jhnstrk@gmail.com>
 | 
			
		||||
Joshua Bleecher Snyder <josh@treelinelabs.com>
 | 
			
		||||
Joshua Litt <joshualitt@google.com>
 | 
			
		||||
Justin Clift <justin@salasaga.org>
 | 
			
		||||
Justin Lebar <justin.lebar@gmail.com>
 | 
			
		||||
KO Myung-Hun <komh@chollian.net>
 | 
			
		||||
Lawrence Velázquez <larryv@macports.org>
 | 
			
		||||
Lou Quillio <louquillio@google.com>
 | 
			
		||||
Luca Barbato <lu_zero@gentoo.org>
 | 
			
		||||
Makoto Kato <makoto.kt@gmail.com>
 | 
			
		||||
@@ -65,6 +80,7 @@ Michael Kohler <michaelkohler@live.com>
 | 
			
		||||
Mike Frysinger <vapier@chromium.org>
 | 
			
		||||
Mike Hommey <mhommey@mozilla.com>
 | 
			
		||||
Mikhal Shemer <mikhal@google.com>
 | 
			
		||||
Minghai Shang <minghai@google.com>
 | 
			
		||||
Morton Jonuschat <yabawock@gmail.com>
 | 
			
		||||
Parag Salasakar <img.mips1@gmail.com>
 | 
			
		||||
Pascal Massimino <pascal.massimino@gmail.com>
 | 
			
		||||
@@ -72,6 +88,8 @@ Patrik Westin <patrik.westin@gmail.com>
 | 
			
		||||
Paul Wilkins <paulwilkins@google.com>
 | 
			
		||||
Pavol Rusnak <stick@gk2.sk>
 | 
			
		||||
Paweł Hajdan <phajdan@google.com>
 | 
			
		||||
Pengchong Jin <pengchong@google.com>
 | 
			
		||||
Peter de Rivaz <peter.derivaz@gmail.com>
 | 
			
		||||
Philip Jägenstedt <philipj@opera.com>
 | 
			
		||||
Priit Laes <plaes@plaes.org>
 | 
			
		||||
Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
 | 
			
		||||
@@ -79,22 +97,29 @@ Rafaël Carré <funman@videolan.org>
 | 
			
		||||
Ralph Giles <giles@xiph.org>
 | 
			
		||||
Rob Bradford <rob@linux.intel.com>
 | 
			
		||||
Ronald S. Bultje <rbultje@google.com>
 | 
			
		||||
Rui Ueyama <ruiu@google.com>
 | 
			
		||||
Sami Pietilä <samipietila@google.com>
 | 
			
		||||
Scott Graham <scottmg@chromium.org>
 | 
			
		||||
Scott LaVarnway <slavarnway@google.com>
 | 
			
		||||
Sean McGovern <gseanmcg@gmail.com>
 | 
			
		||||
Sergey Ulanov <sergeyu@chromium.org>
 | 
			
		||||
Shimon Doodkin <helpmepro1@gmail.com>
 | 
			
		||||
Stefan Holmer <holmer@google.com>
 | 
			
		||||
Suman Sunkara <sunkaras@google.com>
 | 
			
		||||
Taekhyun Kim <takim@nvidia.com>
 | 
			
		||||
Takanori MATSUURA <t.matsuu@gmail.com>
 | 
			
		||||
Tamar Levy <tamar.levy@intel.com>
 | 
			
		||||
Tao Bai <michaelbai@chromium.org>
 | 
			
		||||
Tero Rintaluoma <teror@google.com>
 | 
			
		||||
Thijs Vermeir <thijsvermeir@gmail.com>
 | 
			
		||||
Tim Kopp <tkopp@google.com>
 | 
			
		||||
Timothy B. Terriberry <tterribe@xiph.org>
 | 
			
		||||
Tom Finegan <tomfinegan@google.com>
 | 
			
		||||
Vignesh Venkatasubramanian <vigneshv@google.com>
 | 
			
		||||
Yaowu Xu <yaowu@google.com>
 | 
			
		||||
Yongzhe Wang <yongzhe@google.com>
 | 
			
		||||
Yunqing Wang <yunqingwang@google.com>
 | 
			
		||||
Zoe Liu <zoeliu@google.com>
 | 
			
		||||
Google Inc.
 | 
			
		||||
The Mozilla Foundation
 | 
			
		||||
The Xiph.Org Foundation
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										28
									
								
								CHANGELOG
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								CHANGELOG
									
									
									
									
									
								
							@@ -1,3 +1,31 @@
 | 
			
		||||
xxxx-yy-zz v1.4.0 "Changes for next release"
 | 
			
		||||
  vpxenc is changed to use VP9 by default.
 | 
			
		||||
  Encoder controls added for 1 pass SVC.
 | 
			
		||||
  Decoder control to toggle on/off loopfilter.
 | 
			
		||||
 | 
			
		||||
2015-04-03 v1.4.0 "Indian Runner Duck"
 | 
			
		||||
  This release includes significant improvements to the VP9 codec.
 | 
			
		||||
 | 
			
		||||
  - Upgrading:
 | 
			
		||||
    This release is ABI incompatible with 1.3.0. It drops the compatibility
 | 
			
		||||
    layer, requiring VPX_IMG_FMT_* instead of IMG_FMT_*, and adds several codec
 | 
			
		||||
    controls for VP9.
 | 
			
		||||
 | 
			
		||||
  - Enhancements:
 | 
			
		||||
    Faster VP9 encoding and decoding
 | 
			
		||||
    Multithreaded VP9 decoding (tile and frame-based)
 | 
			
		||||
    Multithreaded VP9 encoding - on by default
 | 
			
		||||
    YUV 4:2:2 and 4:4:4 support in VP9
 | 
			
		||||
    10 and 12bit support in VP9
 | 
			
		||||
    64bit ARM support by replacing ARM assembly with intrinsics
 | 
			
		||||
 | 
			
		||||
  - Bug Fixes:
 | 
			
		||||
    Fixes a VP9 bitstream issue in Profile 1. This only affected non-YUV 4:2:0
 | 
			
		||||
    files.
 | 
			
		||||
 | 
			
		||||
  - Known Issues:
 | 
			
		||||
    Frame Parallel decoding fails for segmented and non-420 files.
 | 
			
		||||
 | 
			
		||||
2013-11-15 v1.3.0 "Forest"
 | 
			
		||||
  This release introduces the VP9 codec in a backward-compatible way.
 | 
			
		||||
  All existing users of VP8 can continue to use the library without
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								PATENTS
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								PATENTS
									
									
									
									
									
								
							@@ -17,7 +17,7 @@ or agree to the institution of patent litigation or any other patent
 | 
			
		||||
enforcement activity against any entity (including a cross-claim or
 | 
			
		||||
counterclaim in a lawsuit) alleging that any of these implementations of WebM
 | 
			
		||||
or any code incorporated within any of these implementations of WebM
 | 
			
		||||
constitutes direct or contributory patent infringement, or inducement of
 | 
			
		||||
constitute direct or contributory patent infringement, or inducement of
 | 
			
		||||
patent infringement, then any patent rights granted to you under this License
 | 
			
		||||
for these implementations of WebM shall terminate as of the date such
 | 
			
		||||
litigation is filed.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								README
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
README - 30 May 2014
 | 
			
		||||
README - 23 March 2015
 | 
			
		||||
 | 
			
		||||
Welcome to the WebM VP8/VP9 Codec SDK!
 | 
			
		||||
 | 
			
		||||
@@ -59,15 +59,10 @@ COMPILING THE APPLICATIONS/LIBRARIES:
 | 
			
		||||
    armv7-none-rvct
 | 
			
		||||
    armv7-win32-vs11
 | 
			
		||||
    armv7-win32-vs12
 | 
			
		||||
    armv7-win32-vs14
 | 
			
		||||
    armv7s-darwin-gcc
 | 
			
		||||
    mips32-linux-gcc
 | 
			
		||||
    mips64-linux-gcc
 | 
			
		||||
    ppc32-darwin8-gcc
 | 
			
		||||
    ppc32-darwin9-gcc
 | 
			
		||||
    ppc32-linux-gcc
 | 
			
		||||
    ppc64-darwin8-gcc
 | 
			
		||||
    ppc64-darwin9-gcc
 | 
			
		||||
    ppc64-linux-gcc
 | 
			
		||||
    sparc-solaris-gcc
 | 
			
		||||
    x86-android-gcc
 | 
			
		||||
    x86-darwin8-gcc
 | 
			
		||||
@@ -78,6 +73,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
 | 
			
		||||
    x86-darwin11-gcc
 | 
			
		||||
    x86-darwin12-gcc
 | 
			
		||||
    x86-darwin13-gcc
 | 
			
		||||
    x86-darwin14-gcc
 | 
			
		||||
    x86-iphonesimulator-gcc
 | 
			
		||||
    x86-linux-gcc
 | 
			
		||||
    x86-linux-icc
 | 
			
		||||
@@ -90,11 +86,14 @@ COMPILING THE APPLICATIONS/LIBRARIES:
 | 
			
		||||
    x86-win32-vs10
 | 
			
		||||
    x86-win32-vs11
 | 
			
		||||
    x86-win32-vs12
 | 
			
		||||
    x86-win32-vs14
 | 
			
		||||
    x86_64-android-gcc
 | 
			
		||||
    x86_64-darwin9-gcc
 | 
			
		||||
    x86_64-darwin10-gcc
 | 
			
		||||
    x86_64-darwin11-gcc
 | 
			
		||||
    x86_64-darwin12-gcc
 | 
			
		||||
    x86_64-darwin13-gcc
 | 
			
		||||
    x86_64-darwin14-gcc
 | 
			
		||||
    x86_64-iphonesimulator-gcc
 | 
			
		||||
    x86_64-linux-gcc
 | 
			
		||||
    x86_64-linux-icc
 | 
			
		||||
@@ -105,12 +104,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
 | 
			
		||||
    x86_64-win64-vs10
 | 
			
		||||
    x86_64-win64-vs11
 | 
			
		||||
    x86_64-win64-vs12
 | 
			
		||||
    universal-darwin8-gcc
 | 
			
		||||
    universal-darwin9-gcc
 | 
			
		||||
    universal-darwin10-gcc
 | 
			
		||||
    universal-darwin11-gcc
 | 
			
		||||
    universal-darwin12-gcc
 | 
			
		||||
    universal-darwin13-gcc
 | 
			
		||||
    x86_64-win64-vs14
 | 
			
		||||
    generic-gnu
 | 
			
		||||
 | 
			
		||||
  The generic-gnu target, in conjunction with the CROSS environment variable,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								args.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								args.c
									
									
									
									
									
								
							@@ -14,9 +14,7 @@
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
#include "args.h"
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#define snprintf _snprintf
 | 
			
		||||
#endif
 | 
			
		||||
#include "vpx_ports/msvc.h"
 | 
			
		||||
 | 
			
		||||
#if defined(__GNUC__) && __GNUC__
 | 
			
		||||
extern void die(const char *fmt, ...) __attribute__((noreturn));
 | 
			
		||||
 
 | 
			
		||||
@@ -67,6 +67,8 @@ else ifeq  ($(TARGET_ARCH_ABI),arm64-v8a)
 | 
			
		||||
  LOCAL_ARM_MODE := arm
 | 
			
		||||
else ifeq ($(TARGET_ARCH_ABI),x86)
 | 
			
		||||
  include $(CONFIG_DIR)libs-x86-android-gcc.mk
 | 
			
		||||
else ifeq ($(TARGET_ARCH_ABI),x86_64)
 | 
			
		||||
  include $(CONFIG_DIR)libs-x86_64-android-gcc.mk
 | 
			
		||||
else ifeq ($(TARGET_ARCH_ABI),mips)
 | 
			
		||||
  include $(CONFIG_DIR)libs-mips-android-gcc.mk
 | 
			
		||||
else
 | 
			
		||||
@@ -158,24 +160,32 @@ LOCAL_CFLAGS += \
 | 
			
		||||
 | 
			
		||||
LOCAL_MODULE := libvpx
 | 
			
		||||
 | 
			
		||||
LOCAL_LDLIBS := -llog
 | 
			
		||||
 | 
			
		||||
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
 | 
			
		||||
  LOCAL_STATIC_LIBRARIES := cpufeatures
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# Add a dependency to force generation of the RTCD files.
 | 
			
		||||
define rtcd_dep_template
 | 
			
		||||
rtcd_dep_template_SRCS := $(addprefix $(LOCAL_PATH)/, $(LOCAL_SRC_FILES))
 | 
			
		||||
rtcd_dep_template_SRCS := $$(rtcd_dep_template_SRCS:.neon=)
 | 
			
		||||
ifeq ($(CONFIG_VP8), yes)
 | 
			
		||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vp8_rtcd.h
 | 
			
		||||
$$(rtcd_dep_template_SRCS): vp8_rtcd.h
 | 
			
		||||
endif
 | 
			
		||||
ifeq ($(CONFIG_VP9), yes)
 | 
			
		||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vp9_rtcd.h
 | 
			
		||||
$$(rtcd_dep_template_SRCS): vp9_rtcd.h
 | 
			
		||||
endif
 | 
			
		||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_scale_rtcd.h
 | 
			
		||||
ifeq ($(CONFIG_VP10), yes)
 | 
			
		||||
$$(rtcd_dep_template_SRCS): vp10_rtcd.h
 | 
			
		||||
endif
 | 
			
		||||
$$(rtcd_dep_template_SRCS): vpx_scale_rtcd.h
 | 
			
		||||
$$(rtcd_dep_template_SRCS): vpx_dsp_rtcd.h
 | 
			
		||||
 | 
			
		||||
ifeq ($(TARGET_ARCH_ABI),x86)
 | 
			
		||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_config.asm
 | 
			
		||||
ifneq ($(findstring $(TARGET_ARCH_ABI),x86 x86_64),)
 | 
			
		||||
$$(rtcd_dep_template_SRCS): vpx_config.asm
 | 
			
		||||
endif
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
$(eval $(call rtcd_dep_template))
 | 
			
		||||
 | 
			
		||||
.PHONY: clean
 | 
			
		||||
clean:
 | 
			
		||||
@@ -184,7 +194,11 @@ clean:
 | 
			
		||||
	@$(RM) -r $(ASM_CNV_PATH)
 | 
			
		||||
	@$(RM) $(CLEAN-OBJS)
 | 
			
		||||
 | 
			
		||||
include $(BUILD_SHARED_LIBRARY)
 | 
			
		||||
ifeq ($(ENABLE_SHARED),1)
 | 
			
		||||
  include $(BUILD_SHARED_LIBRARY)
 | 
			
		||||
else
 | 
			
		||||
  include $(BUILD_STATIC_LIBRARY)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
 | 
			
		||||
$(call import-module,cpufeatures)
 | 
			
		||||
 
 | 
			
		||||
@@ -22,8 +22,10 @@ clean:: .DEFAULT
 | 
			
		||||
exampletest: .DEFAULT
 | 
			
		||||
install:: .DEFAULT
 | 
			
		||||
test:: .DEFAULT
 | 
			
		||||
test-no-data-check:: .DEFAULT
 | 
			
		||||
testdata:: .DEFAULT
 | 
			
		||||
utiltest: .DEFAULT
 | 
			
		||||
exampletest-no-data-check utiltest-no-data-check: .DEFAULT
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Note: md5sum is not installed on OS X, but openssl is. Openssl may not be
 | 
			
		||||
@@ -56,13 +58,10 @@ dist:
 | 
			
		||||
        fi
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# Since we invoke make recursively for multiple targets we need to include the
 | 
			
		||||
# .mk file for the correct target, but only when $(target) is non-empty.
 | 
			
		||||
ifneq ($(target),)
 | 
			
		||||
# Normally, we want to build the filename from the target and the toolchain.
 | 
			
		||||
# This disambiguates from the $(target).mk file that exists in the source tree.
 | 
			
		||||
# However, the toolchain is part of the target in universal builds, so we
 | 
			
		||||
# don't want to include TOOLCHAIN in that case. FAT_ARCHS is used to test
 | 
			
		||||
# if we're in the universal case.
 | 
			
		||||
include $(target)$(if $(FAT_ARCHS),,-$(TOOLCHAIN)).mk
 | 
			
		||||
include $(target)-$(TOOLCHAIN).mk
 | 
			
		||||
endif
 | 
			
		||||
BUILD_ROOT?=.
 | 
			
		||||
VPATH=$(SRC_PATH_BARE)
 | 
			
		||||
@@ -116,6 +115,9 @@ test::
 | 
			
		||||
testdata::
 | 
			
		||||
.PHONY: utiltest
 | 
			
		||||
utiltest:
 | 
			
		||||
.PHONY: test-no-data-check exampletest-no-data-check utiltest-no-data-check
 | 
			
		||||
test-no-data-check::
 | 
			
		||||
exampletest-no-data-check utiltest-no-data-check:
 | 
			
		||||
 | 
			
		||||
# Add compiler flags for intrinsic files
 | 
			
		||||
ifeq ($(TOOLCHAIN), x86-os2-gcc)
 | 
			
		||||
@@ -138,6 +140,8 @@ $(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx $(STACKREALIGN)
 | 
			
		||||
$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx $(STACKREALIGN)
 | 
			
		||||
$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 $(STACKREALIGN)
 | 
			
		||||
$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 $(STACKREALIGN)
 | 
			
		||||
$(BUILD_PFX)%vp9_reconintra.c.d: CFLAGS += $(STACKREALIGN)
 | 
			
		||||
$(BUILD_PFX)%vp9_reconintra.c.o: CFLAGS += $(STACKREALIGN)
 | 
			
		||||
 | 
			
		||||
$(BUILD_PFX)%.c.d: %.c
 | 
			
		||||
	$(if $(quiet),@echo "    [DEP] $@")
 | 
			
		||||
@@ -313,18 +317,15 @@ $(1):
 | 
			
		||||
        $$(filter %.o,$$^) $$(extralibs)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
define lipo_lib_template
 | 
			
		||||
$(1): $(addsuffix /$(1),$(FAT_ARCHS))
 | 
			
		||||
	$(if $(quiet),@echo "    [LIPO] $$@")
 | 
			
		||||
	$(qexec)libtool -static -o $$@ $$?
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define lipo_bin_template
 | 
			
		||||
$(1): $(addsuffix /$(1),$(FAT_ARCHS))
 | 
			
		||||
	$(if $(quiet),@echo "    [LIPO] $$@")
 | 
			
		||||
	$(qexec)lipo -output $$@ -create $$?
 | 
			
		||||
define dll_template
 | 
			
		||||
# Not using a pattern rule here because we don't want to generate empty
 | 
			
		||||
# archives when they are listed as a dependency in files not responsible
 | 
			
		||||
# for creating them.
 | 
			
		||||
$(1):
 | 
			
		||||
	$(if $(quiet),@echo "    [LD] $$@")
 | 
			
		||||
	$(qexec)$$(LD) -Zdll $$(LDFLAGS) \
 | 
			
		||||
        -o $$@ \
 | 
			
		||||
        $$(filter %.o,$$^) $$(extralibs) $$(EXPORTS_FILE)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -383,8 +384,9 @@ LIBS=$(call enabled,LIBS)
 | 
			
		||||
.libs: $(LIBS)
 | 
			
		||||
	@touch $@
 | 
			
		||||
$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
 | 
			
		||||
$(foreach lib,$(filter %so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
 | 
			
		||||
$(foreach lib,$(filter %$(VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
 | 
			
		||||
$(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
 | 
			
		||||
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
 | 
			
		||||
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib))))
 | 
			
		||||
 | 
			
		||||
INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS)
 | 
			
		||||
ifeq ($(MAKECMDGOALS),dist)
 | 
			
		||||
 
 | 
			
		||||
@@ -390,7 +390,7 @@ write_common_config_banner() {
 | 
			
		||||
write_common_config_targets() {
 | 
			
		||||
  for t in ${all_targets}; do
 | 
			
		||||
    if enabled ${t}; then
 | 
			
		||||
      if enabled universal || enabled child; then
 | 
			
		||||
      if enabled child; then
 | 
			
		||||
        fwrite config.mk "ALL_TARGETS += ${t}-${toolchain}"
 | 
			
		||||
      else
 | 
			
		||||
        fwrite config.mk "ALL_TARGETS += ${t}"
 | 
			
		||||
@@ -640,12 +640,6 @@ process_common_toolchain() {
 | 
			
		||||
      *i[3456]86*)
 | 
			
		||||
        tgt_isa=x86
 | 
			
		||||
        ;;
 | 
			
		||||
      *powerpc64*)
 | 
			
		||||
        tgt_isa=ppc64
 | 
			
		||||
        ;;
 | 
			
		||||
      *powerpc*)
 | 
			
		||||
        tgt_isa=ppc32
 | 
			
		||||
        ;;
 | 
			
		||||
      *sparc*)
 | 
			
		||||
        tgt_isa=sparc
 | 
			
		||||
        ;;
 | 
			
		||||
@@ -653,14 +647,6 @@ process_common_toolchain() {
 | 
			
		||||
 | 
			
		||||
    # detect tgt_os
 | 
			
		||||
    case "$gcctarget" in
 | 
			
		||||
      *darwin8*)
 | 
			
		||||
        tgt_isa=universal
 | 
			
		||||
        tgt_os=darwin8
 | 
			
		||||
        ;;
 | 
			
		||||
      *darwin9*)
 | 
			
		||||
        tgt_isa=universal
 | 
			
		||||
        tgt_os=darwin9
 | 
			
		||||
        ;;
 | 
			
		||||
      *darwin10*)
 | 
			
		||||
        tgt_isa=x86_64
 | 
			
		||||
        tgt_os=darwin10
 | 
			
		||||
@@ -742,6 +728,13 @@ process_common_toolchain() {
 | 
			
		||||
  # Handle darwin variants. Newer SDKs allow targeting older
 | 
			
		||||
  # platforms, so use the newest one available.
 | 
			
		||||
  case ${toolchain} in
 | 
			
		||||
    arm*-darwin*)
 | 
			
		||||
      ios_sdk_dir="$(show_darwin_sdk_path iphoneos)"
 | 
			
		||||
      if [ -d "${ios_sdk_dir}" ]; then
 | 
			
		||||
        add_cflags  "-isysroot ${ios_sdk_dir}"
 | 
			
		||||
        add_ldflags "-isysroot ${ios_sdk_dir}"
 | 
			
		||||
      fi
 | 
			
		||||
      ;;
 | 
			
		||||
    *-darwin*)
 | 
			
		||||
      osx_sdk_dir="$(show_darwin_sdk_path macosx)"
 | 
			
		||||
      if [ -d "${osx_sdk_dir}" ]; then
 | 
			
		||||
@@ -795,7 +788,6 @@ process_common_toolchain() {
 | 
			
		||||
  case ${toolchain} in
 | 
			
		||||
    sparc-solaris-*)
 | 
			
		||||
      add_extralibs -lposix4
 | 
			
		||||
      disable_feature fast_unaligned
 | 
			
		||||
      ;;
 | 
			
		||||
    *-solaris-*)
 | 
			
		||||
      add_extralibs -lposix4
 | 
			
		||||
@@ -818,12 +810,17 @@ process_common_toolchain() {
 | 
			
		||||
          if disabled neon && enabled neon_asm; then
 | 
			
		||||
            die "Disabling neon while keeping neon-asm is not supported"
 | 
			
		||||
          fi
 | 
			
		||||
          soft_enable media
 | 
			
		||||
          soft_enable fast_unaligned
 | 
			
		||||
          case ${toolchain} in
 | 
			
		||||
            *-darwin*)
 | 
			
		||||
              # Neon is guaranteed on iOS 6+ devices, while old media extensions
 | 
			
		||||
              # no longer assemble with iOS 9 SDK
 | 
			
		||||
              ;;
 | 
			
		||||
            *)
 | 
			
		||||
              soft_enable media
 | 
			
		||||
          esac
 | 
			
		||||
          ;;
 | 
			
		||||
        armv6)
 | 
			
		||||
          soft_enable media
 | 
			
		||||
          soft_enable fast_unaligned
 | 
			
		||||
          ;;
 | 
			
		||||
      esac
 | 
			
		||||
 | 
			
		||||
@@ -1039,30 +1036,32 @@ EOF
 | 
			
		||||
      tune_cflags="-mtune="
 | 
			
		||||
      if enabled dspr2; then
 | 
			
		||||
        check_add_cflags -mips32r2 -mdspr2
 | 
			
		||||
        disable_feature fast_unaligned
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      if enabled runtime_cpu_detect; then
 | 
			
		||||
        disable_feature runtime_cpu_detect
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      if [ -n "${tune_cpu}" ]; then
 | 
			
		||||
        case ${tune_cpu} in
 | 
			
		||||
          p5600)
 | 
			
		||||
            add_cflags -mips32r5 -funroll-loops -mload-store-pairs
 | 
			
		||||
            add_cflags -msched-weight -mhard-float
 | 
			
		||||
            add_asflags -mips32r5 -mhard-float
 | 
			
		||||
            check_add_cflags -mips32r5 -funroll-loops -mload-store-pairs
 | 
			
		||||
            check_add_cflags -msched-weight -mhard-float -mfp64
 | 
			
		||||
            check_add_asflags -mips32r5 -mhard-float -mfp64
 | 
			
		||||
            check_add_ldflags -mfp64
 | 
			
		||||
            ;;
 | 
			
		||||
          i6400)
 | 
			
		||||
            add_cflags -mips64r6 -mabi=64 -funroll-loops -mload-store-pairs
 | 
			
		||||
            add_cflags -msched-weight -mhard-float
 | 
			
		||||
            add_asflags -mips64r6 -mabi=64 -mhard-float
 | 
			
		||||
            add_ldflags -mips64r6 -mabi=64
 | 
			
		||||
            check_add_cflags -mips64r6 -mabi=64 -funroll-loops -msched-weight 
 | 
			
		||||
            check_add_cflags  -mload-store-pairs -mhard-float -mfp64
 | 
			
		||||
            check_add_asflags -mips64r6 -mabi=64 -mhard-float -mfp64
 | 
			
		||||
            check_add_ldflags -mips64r6 -mabi=64 -mfp64
 | 
			
		||||
            ;;
 | 
			
		||||
        esac
 | 
			
		||||
 | 
			
		||||
        if enabled msa; then
 | 
			
		||||
          add_cflags -mmsa -mfp64 -flax-vector-conversions
 | 
			
		||||
          add_asflags -mmsa -mfp64 -flax-vector-conversions
 | 
			
		||||
          add_ldflags -mmsa -mfp64 -flax-vector-conversions
 | 
			
		||||
 | 
			
		||||
          disable_feature fast_unaligned
 | 
			
		||||
          add_cflags -mmsa
 | 
			
		||||
          add_asflags -mmsa
 | 
			
		||||
          add_ldflags -mmsa
 | 
			
		||||
        fi
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
@@ -1070,29 +1069,6 @@ EOF
 | 
			
		||||
      check_add_asflags -march=${tgt_isa}
 | 
			
		||||
      check_add_asflags -KPIC
 | 
			
		||||
      ;;
 | 
			
		||||
    ppc*)
 | 
			
		||||
      enable_feature ppc
 | 
			
		||||
      bits=${tgt_isa##ppc}
 | 
			
		||||
      link_with_cc=gcc
 | 
			
		||||
      setup_gnu_toolchain
 | 
			
		||||
      add_asflags -force_cpusubtype_ALL -I"\$(dir \$<)darwin"
 | 
			
		||||
      soft_enable altivec
 | 
			
		||||
      enabled altivec && add_cflags -maltivec
 | 
			
		||||
 | 
			
		||||
      case "$tgt_os" in
 | 
			
		||||
        linux*)
 | 
			
		||||
          add_asflags -maltivec -mregnames -I"\$(dir \$<)linux"
 | 
			
		||||
          ;;
 | 
			
		||||
        darwin*)
 | 
			
		||||
          darwin_arch="-arch ppc"
 | 
			
		||||
          enabled ppc64 && darwin_arch="${darwin_arch}64"
 | 
			
		||||
          add_cflags  ${darwin_arch} -m${bits} -fasm-blocks
 | 
			
		||||
          add_asflags ${darwin_arch} -force_cpusubtype_ALL -I"\$(dir \$<)darwin"
 | 
			
		||||
          add_ldflags ${darwin_arch} -m${bits}
 | 
			
		||||
          enabled altivec && add_cflags -faltivec
 | 
			
		||||
          ;;
 | 
			
		||||
      esac
 | 
			
		||||
      ;;
 | 
			
		||||
    x86*)
 | 
			
		||||
      case  ${tgt_os} in
 | 
			
		||||
        win*)
 | 
			
		||||
@@ -1105,7 +1081,9 @@ EOF
 | 
			
		||||
          CROSS=${CROSS:-g}
 | 
			
		||||
          ;;
 | 
			
		||||
        os2)
 | 
			
		||||
          disable_feature pic
 | 
			
		||||
          AS=${AS:-nasm}
 | 
			
		||||
          add_ldflags -Zhigh-mem
 | 
			
		||||
          ;;
 | 
			
		||||
      esac
 | 
			
		||||
 | 
			
		||||
@@ -1245,7 +1223,7 @@ EOF
 | 
			
		||||
          ;;
 | 
			
		||||
      esac
 | 
			
		||||
      ;;
 | 
			
		||||
    universal*|*-gcc|generic-gnu)
 | 
			
		||||
    *-gcc|generic-gnu)
 | 
			
		||||
      link_with_cc=gcc
 | 
			
		||||
      enable_feature gcc
 | 
			
		||||
      setup_gnu_toolchain
 | 
			
		||||
@@ -1329,11 +1307,15 @@ EOF
 | 
			
		||||
  # only for MIPS platforms
 | 
			
		||||
  case ${toolchain} in
 | 
			
		||||
    mips*)
 | 
			
		||||
      if enabled dspr2; then
 | 
			
		||||
        if enabled big_endian; then
 | 
			
		||||
      if enabled big_endian; then
 | 
			
		||||
        if enabled dspr2; then
 | 
			
		||||
          echo "dspr2 optimizations are available only for little endian platforms"
 | 
			
		||||
          disable_feature dspr2
 | 
			
		||||
        fi
 | 
			
		||||
        if enabled msa; then
 | 
			
		||||
          echo "msa optimizations are available only for little endian platforms"
 | 
			
		||||
          disable_feature msa
 | 
			
		||||
        fi
 | 
			
		||||
      fi
 | 
			
		||||
      ;;
 | 
			
		||||
  esac
 | 
			
		||||
@@ -1343,12 +1325,6 @@ EOF
 | 
			
		||||
    add_cflags -D_LARGEFILE_SOURCE
 | 
			
		||||
    add_cflags -D_FILE_OFFSET_BITS=64
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # append any user defined extra cflags
 | 
			
		||||
  if [ -n "${extra_cflags}" ] ; then
 | 
			
		||||
    check_add_cflags ${extra_cflags} || \
 | 
			
		||||
    die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler"
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
process_toolchain() {
 | 
			
		||||
 
 | 
			
		||||
@@ -73,6 +73,10 @@ generate_filter() {
 | 
			
		||||
                open_tag File RelativePath="$f"
 | 
			
		||||
 | 
			
		||||
                if [ "$pat" == "asm" ] && $asm_use_custom_step; then
 | 
			
		||||
                    # Avoid object file name collisions, i.e. vpx_config.c and
 | 
			
		||||
                    # vpx_config.asm produce the same object file without
 | 
			
		||||
                    # this additional suffix.
 | 
			
		||||
                    objf=${objf%.obj}_asm.obj
 | 
			
		||||
                    for plat in "${platforms[@]}"; do
 | 
			
		||||
                        for cfg in Debug Release; do
 | 
			
		||||
                            open_tag FileConfiguration \
 | 
			
		||||
 
 | 
			
		||||
@@ -19,13 +19,13 @@ show_help() {
 | 
			
		||||
    cat <<EOF
 | 
			
		||||
Usage: ${self_basename} [options] file1 [file2 ...]
 | 
			
		||||
 | 
			
		||||
This script generates a Visual Studio 2005 solution file from a list of project
 | 
			
		||||
This script generates a Visual Studio solution file from a list of project
 | 
			
		||||
files.
 | 
			
		||||
 | 
			
		||||
Options:
 | 
			
		||||
    --help                      Print this message
 | 
			
		||||
    --out=outfile               Redirect output to a file
 | 
			
		||||
    --ver=version               Version (7,8,9,10,11) of visual studio to generate for
 | 
			
		||||
    --ver=version               Version (7,8,9,10,11,12,14) of visual studio to generate for
 | 
			
		||||
    --target=isa-os-cc          Target specifier
 | 
			
		||||
EOF
 | 
			
		||||
    exit 1
 | 
			
		||||
@@ -255,7 +255,7 @@ for opt in "$@"; do
 | 
			
		||||
    ;;
 | 
			
		||||
    --ver=*) vs_ver="$optval"
 | 
			
		||||
             case $optval in
 | 
			
		||||
             [789]|10|11|12)
 | 
			
		||||
             [789]|10|11|12|14)
 | 
			
		||||
             ;;
 | 
			
		||||
             *) die Unrecognized Visual Studio Version in $opt
 | 
			
		||||
             ;;
 | 
			
		||||
@@ -300,12 +300,15 @@ case "${vs_ver:-8}" in
 | 
			
		||||
    12) sln_vers="12.00"
 | 
			
		||||
       sln_vers_str="Visual Studio 2013"
 | 
			
		||||
    ;;
 | 
			
		||||
    14) sln_vers="14.00"
 | 
			
		||||
       sln_vers_str="Visual Studio 2015"
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
case "${vs_ver:-8}" in
 | 
			
		||||
    [789])
 | 
			
		||||
    sfx=vcproj
 | 
			
		||||
    ;;
 | 
			
		||||
    10|11|12)
 | 
			
		||||
    10|11|12|14)
 | 
			
		||||
    sfx=vcxproj
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ Options:
 | 
			
		||||
    --name=project_name         Name of the project (required)
 | 
			
		||||
    --proj-guid=GUID            GUID to use for the project
 | 
			
		||||
    --module-def=filename       File containing export definitions (for DLLs)
 | 
			
		||||
    --ver=version               Version (10,11,12) of visual studio to generate for
 | 
			
		||||
    --ver=version               Version (10,11,12,14) of visual studio to generate for
 | 
			
		||||
    --src-path-bare=dir         Path to root of source tree
 | 
			
		||||
    -Ipath/to/include           Additional include directories
 | 
			
		||||
    -DFLAG[=value]              Preprocessor macros to define
 | 
			
		||||
@@ -168,7 +168,7 @@ for opt in "$@"; do
 | 
			
		||||
        --ver=*)
 | 
			
		||||
            vs_ver="$optval"
 | 
			
		||||
            case "$optval" in
 | 
			
		||||
                10|11|12)
 | 
			
		||||
                10|11|12|14)
 | 
			
		||||
                ;;
 | 
			
		||||
                *) die Unrecognized Visual Studio Version in $opt
 | 
			
		||||
                ;;
 | 
			
		||||
@@ -218,7 +218,7 @@ guid=${guid:-`generate_uuid`}
 | 
			
		||||
asm_use_custom_step=false
 | 
			
		||||
uses_asm=${uses_asm:-false}
 | 
			
		||||
case "${vs_ver:-11}" in
 | 
			
		||||
    10|11|12)
 | 
			
		||||
    10|11|12|14)
 | 
			
		||||
       asm_use_custom_step=$uses_asm
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
@@ -263,8 +263,8 @@ case "$target" in
 | 
			
		||||
    ;;
 | 
			
		||||
    arm*)
 | 
			
		||||
        platforms[0]="ARM"
 | 
			
		||||
        asm_Debug_cmdline="armasm -nologo "%(FullPath)""
 | 
			
		||||
        asm_Release_cmdline="armasm -nologo "%(FullPath)""
 | 
			
		||||
        asm_Debug_cmdline="armasm -nologo -oldit "%(FullPath)""
 | 
			
		||||
        asm_Release_cmdline="armasm -nologo -oldit "%(FullPath)""
 | 
			
		||||
    ;;
 | 
			
		||||
    *) die "Unsupported target $target!"
 | 
			
		||||
    ;;
 | 
			
		||||
@@ -344,6 +344,9 @@ generate_vcxproj() {
 | 
			
		||||
                # has to enable AppContainerApplication as well.
 | 
			
		||||
                tag_content PlatformToolset v120
 | 
			
		||||
            fi
 | 
			
		||||
            if [ "$vs_ver" = "14" ]; then
 | 
			
		||||
                tag_content PlatformToolset v140
 | 
			
		||||
            fi
 | 
			
		||||
            tag_content CharacterSet Unicode
 | 
			
		||||
            if [ "$config" = "Release" ]; then
 | 
			
		||||
                tag_content WholeProgramOptimization true
 | 
			
		||||
 
 | 
			
		||||
@@ -319,13 +319,14 @@ EOF
 | 
			
		||||
 | 
			
		||||
  print <<EOF;
 | 
			
		||||
#if HAVE_DSPR2
 | 
			
		||||
void vpx_dsputil_static_init();
 | 
			
		||||
#if CONFIG_VP8
 | 
			
		||||
void dsputil_static_init();
 | 
			
		||||
dsputil_static_init();
 | 
			
		||||
#endif
 | 
			
		||||
#if CONFIG_VP9
 | 
			
		||||
void vp9_dsputil_static_init();
 | 
			
		||||
vp9_dsputil_static_init();
 | 
			
		||||
 | 
			
		||||
vpx_dsputil_static_init();
 | 
			
		||||
#if CONFIG_VP8
 | 
			
		||||
dsputil_static_init();
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								codereview.settings
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								codereview.settings
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
# This file is used by gcl to get repository specific information.
 | 
			
		||||
GERRIT_HOST: chromium-review.googlesource.com
 | 
			
		||||
GERRIT_PORT: 29418
 | 
			
		||||
CODE_REVIEW_SERVER: chromium-review.googlesource.com
 | 
			
		||||
							
								
								
									
										134
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										134
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@@ -31,16 +31,14 @@ Advanced options:
 | 
			
		||||
  --size-limit=WxH                max size to allow in the decoder
 | 
			
		||||
  --as={yasm|nasm|auto}           use specified assembler [auto, yasm preferred]
 | 
			
		||||
  --sdk-path=PATH                 path to root of sdk (android builds only)
 | 
			
		||||
  ${toggle_fast_unaligned}        don't use unaligned accesses, even when
 | 
			
		||||
                                  supported by hardware [auto]
 | 
			
		||||
  ${toggle_codec_srcs}            in/exclude codec library source code
 | 
			
		||||
  ${toggle_debug_libs}            in/exclude debug version of libraries
 | 
			
		||||
  ${toggle_static_msvcrt}         use static MSVCRT (VS builds only)
 | 
			
		||||
  ${toggle_vp9_highbitdepth}      use VP9 high bit depth (10/12) profiles
 | 
			
		||||
  ${toggle_vp8}                   VP8 codec support
 | 
			
		||||
  ${toggle_vp9}                   VP9 codec support
 | 
			
		||||
  ${toggle_vp10}                  VP10 codec support
 | 
			
		||||
  ${toggle_internal_stats}        output of encoder internal stats for debug, if supported (encoders)
 | 
			
		||||
  ${toggle_mem_tracker}           track memory usage
 | 
			
		||||
  ${toggle_postproc}              postprocessing
 | 
			
		||||
  ${toggle_vp9_postproc}          vp9 specific postprocessing
 | 
			
		||||
  ${toggle_multithread}           multithreaded encoding and decoding
 | 
			
		||||
@@ -109,15 +107,10 @@ all_platforms="${all_platforms} armv7-linux-gcc"     #neon Cortex-A8
 | 
			
		||||
all_platforms="${all_platforms} armv7-none-rvct"     #neon Cortex-A8
 | 
			
		||||
all_platforms="${all_platforms} armv7-win32-vs11"
 | 
			
		||||
all_platforms="${all_platforms} armv7-win32-vs12"
 | 
			
		||||
all_platforms="${all_platforms} armv7-win32-vs14"
 | 
			
		||||
all_platforms="${all_platforms} armv7s-darwin-gcc"
 | 
			
		||||
all_platforms="${all_platforms} mips32-linux-gcc"
 | 
			
		||||
all_platforms="${all_platforms} mips64-linux-gcc"
 | 
			
		||||
all_platforms="${all_platforms} ppc32-darwin8-gcc"
 | 
			
		||||
all_platforms="${all_platforms} ppc32-darwin9-gcc"
 | 
			
		||||
all_platforms="${all_platforms} ppc32-linux-gcc"
 | 
			
		||||
all_platforms="${all_platforms} ppc64-darwin8-gcc"
 | 
			
		||||
all_platforms="${all_platforms} ppc64-darwin9-gcc"
 | 
			
		||||
all_platforms="${all_platforms} ppc64-linux-gcc"
 | 
			
		||||
all_platforms="${all_platforms} sparc-solaris-gcc"
 | 
			
		||||
all_platforms="${all_platforms} x86-android-gcc"
 | 
			
		||||
all_platforms="${all_platforms} x86-darwin8-gcc"
 | 
			
		||||
@@ -141,6 +134,8 @@ all_platforms="${all_platforms} x86-win32-vs9"
 | 
			
		||||
all_platforms="${all_platforms} x86-win32-vs10"
 | 
			
		||||
all_platforms="${all_platforms} x86-win32-vs11"
 | 
			
		||||
all_platforms="${all_platforms} x86-win32-vs12"
 | 
			
		||||
all_platforms="${all_platforms} x86-win32-vs14"
 | 
			
		||||
all_platforms="${all_platforms} x86_64-android-gcc"
 | 
			
		||||
all_platforms="${all_platforms} x86_64-darwin9-gcc"
 | 
			
		||||
all_platforms="${all_platforms} x86_64-darwin10-gcc"
 | 
			
		||||
all_platforms="${all_platforms} x86_64-darwin11-gcc"
 | 
			
		||||
@@ -157,13 +152,7 @@ all_platforms="${all_platforms} x86_64-win64-vs9"
 | 
			
		||||
all_platforms="${all_platforms} x86_64-win64-vs10"
 | 
			
		||||
all_platforms="${all_platforms} x86_64-win64-vs11"
 | 
			
		||||
all_platforms="${all_platforms} x86_64-win64-vs12"
 | 
			
		||||
all_platforms="${all_platforms} universal-darwin8-gcc"
 | 
			
		||||
all_platforms="${all_platforms} universal-darwin9-gcc"
 | 
			
		||||
all_platforms="${all_platforms} universal-darwin10-gcc"
 | 
			
		||||
all_platforms="${all_platforms} universal-darwin11-gcc"
 | 
			
		||||
all_platforms="${all_platforms} universal-darwin12-gcc"
 | 
			
		||||
all_platforms="${all_platforms} universal-darwin13-gcc"
 | 
			
		||||
all_platforms="${all_platforms} universal-darwin14-gcc"
 | 
			
		||||
all_platforms="${all_platforms} x86_64-win64-vs14"
 | 
			
		||||
all_platforms="${all_platforms} generic-gnu"
 | 
			
		||||
 | 
			
		||||
# all_targets is a list of all targets that can be configured
 | 
			
		||||
@@ -200,6 +189,14 @@ if [ ${doxy_major:-0} -ge 1 ]; then
 | 
			
		||||
    [ $doxy_minor -eq 5 ] && [ $doxy_patch -ge 3 ] && enable_feature doxygen
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# disable codecs when their source directory does not exist
 | 
			
		||||
[ -d "${source_path}/vp8" ] || disable_feature vp8
 | 
			
		||||
[ -d "${source_path}/vp9" ] || disable_feature vp9
 | 
			
		||||
[ -d "${source_path}/vp10" ] || disable_feature vp10
 | 
			
		||||
 | 
			
		||||
# disable vp10 codec by default
 | 
			
		||||
disable_feature vp10
 | 
			
		||||
 | 
			
		||||
# install everything except the sources, by default. sources will have
 | 
			
		||||
# to be enabled when doing dist builds, since that's no longer a common
 | 
			
		||||
# case.
 | 
			
		||||
@@ -210,45 +207,30 @@ enable_feature install_libs
 | 
			
		||||
enable_feature static
 | 
			
		||||
enable_feature optimizations
 | 
			
		||||
enable_feature dependency_tracking
 | 
			
		||||
enable_feature fast_unaligned #allow unaligned accesses, if supported by hw
 | 
			
		||||
enable_feature spatial_resampling
 | 
			
		||||
enable_feature multithread
 | 
			
		||||
enable_feature os_support
 | 
			
		||||
enable_feature temporal_denoising
 | 
			
		||||
 | 
			
		||||
[ -d "${source_path}/../include" ] && enable_feature alt_tree_layout
 | 
			
		||||
for d in vp8 vp9; do
 | 
			
		||||
    [ -d "${source_path}/${d}" ] && disable_feature alt_tree_layout;
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
if ! enabled alt_tree_layout; then
 | 
			
		||||
# development environment
 | 
			
		||||
[ -d "${source_path}/vp8" ] && CODECS="${CODECS} vp8_encoder vp8_decoder"
 | 
			
		||||
[ -d "${source_path}/vp9" ] && CODECS="${CODECS} vp9_encoder vp9_decoder"
 | 
			
		||||
else
 | 
			
		||||
# customer environment
 | 
			
		||||
[ -f "${source_path}/../include/vpx/vp8cx.h" ] && CODECS="${CODECS} vp8_encoder"
 | 
			
		||||
[ -f "${source_path}/../include/vpx/vp8dx.h" ] && CODECS="${CODECS} vp8_decoder"
 | 
			
		||||
[ -f "${source_path}/../include/vpx/vp9cx.h" ] && CODECS="${CODECS} vp9_encoder"
 | 
			
		||||
[ -f "${source_path}/../include/vpx/vp9dx.h" ] && CODECS="${CODECS} vp9_decoder"
 | 
			
		||||
[ -f "${source_path}/../include/vpx/vp8cx.h" ] || disable_feature vp8_encoder
 | 
			
		||||
[ -f "${source_path}/../include/vpx/vp8dx.h" ] || disable_feature vp8_decoder
 | 
			
		||||
[ -f "${source_path}/../include/vpx/vp9cx.h" ] || disable_feature vp9_encoder
 | 
			
		||||
[ -f "${source_path}/../include/vpx/vp9dx.h" ] || disable_feature vp9_decoder
 | 
			
		||||
 | 
			
		||||
[ -f "${source_path}/../lib/*/*mt.lib" ] && soft_enable static_msvcrt
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
CODECS="$(echo ${CODECS} | tr ' ' '\n')"
 | 
			
		||||
CODEC_FAMILIES="$(for c in ${CODECS}; do echo ${c%_*}; done | sort | uniq)"
 | 
			
		||||
CODECS="
 | 
			
		||||
    vp8_encoder
 | 
			
		||||
    vp8_decoder
 | 
			
		||||
    vp9_encoder
 | 
			
		||||
    vp9_decoder
 | 
			
		||||
    vp10_encoder
 | 
			
		||||
    vp10_decoder
 | 
			
		||||
"
 | 
			
		||||
CODEC_FAMILIES="
 | 
			
		||||
    vp8
 | 
			
		||||
    vp9
 | 
			
		||||
    vp10
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
ARCH_LIST="
 | 
			
		||||
    arm
 | 
			
		||||
    mips
 | 
			
		||||
    x86
 | 
			
		||||
    x86_64
 | 
			
		||||
    ppc32
 | 
			
		||||
    ppc64
 | 
			
		||||
"
 | 
			
		||||
ARCH_EXT_LIST="
 | 
			
		||||
    edsp
 | 
			
		||||
@@ -269,14 +251,11 @@ ARCH_EXT_LIST="
 | 
			
		||||
    sse4_1
 | 
			
		||||
    avx
 | 
			
		||||
    avx2
 | 
			
		||||
 | 
			
		||||
    altivec
 | 
			
		||||
"
 | 
			
		||||
HAVE_LIST="
 | 
			
		||||
    ${ARCH_EXT_LIST}
 | 
			
		||||
    vpx_ports
 | 
			
		||||
    stdint_h
 | 
			
		||||
    alt_tree_layout
 | 
			
		||||
    pthread_h
 | 
			
		||||
    sys_mman_h
 | 
			
		||||
    unistd_h
 | 
			
		||||
@@ -305,10 +284,6 @@ CONFIG_LIST="
 | 
			
		||||
 | 
			
		||||
    codec_srcs
 | 
			
		||||
    debug_libs
 | 
			
		||||
    fast_unaligned
 | 
			
		||||
    mem_manager
 | 
			
		||||
    mem_tracker
 | 
			
		||||
    mem_checks
 | 
			
		||||
 | 
			
		||||
    dequant_tokens
 | 
			
		||||
    dc_recon
 | 
			
		||||
@@ -370,7 +345,6 @@ CMDLINE_SELECT="
 | 
			
		||||
    libc
 | 
			
		||||
    as
 | 
			
		||||
    size_limit
 | 
			
		||||
    fast_unaligned
 | 
			
		||||
    codec_srcs
 | 
			
		||||
    debug_libs
 | 
			
		||||
 | 
			
		||||
@@ -383,7 +357,6 @@ CMDLINE_SELECT="
 | 
			
		||||
    ${CODECS}
 | 
			
		||||
    ${CODEC_FAMILIES}
 | 
			
		||||
    static_msvcrt
 | 
			
		||||
    mem_tracker
 | 
			
		||||
    spatial_resampling
 | 
			
		||||
    realtime_only
 | 
			
		||||
    onthefly_bitpacking
 | 
			
		||||
@@ -456,22 +429,8 @@ post_process_cmdline() {
 | 
			
		||||
 | 
			
		||||
process_targets() {
 | 
			
		||||
    enabled child || write_common_config_banner
 | 
			
		||||
    enabled universal || write_common_target_config_h  ${BUILD_PFX}vpx_config.h
 | 
			
		||||
 | 
			
		||||
    # For fat binaries, call configure recursively to configure for each
 | 
			
		||||
    # binary architecture to be included.
 | 
			
		||||
    if enabled universal; then
 | 
			
		||||
        # Call configure (ourselves) for each subarchitecture
 | 
			
		||||
        for arch in $fat_bin_archs; do
 | 
			
		||||
            BUILD_PFX=${arch}/ toolchain=${arch} $self --child $cmdline_args || exit $?
 | 
			
		||||
        done
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # The write_common_config (config.mk) logic is deferred until after the
 | 
			
		||||
    # recursive calls to configure complete, because we want our universal
 | 
			
		||||
    # targets to be executed last.
 | 
			
		||||
    write_common_target_config_h ${BUILD_PFX}vpx_config.h
 | 
			
		||||
    write_common_config_targets
 | 
			
		||||
    enabled universal && echo "FAT_ARCHS=${fat_bin_archs}" >> config.mk
 | 
			
		||||
 | 
			
		||||
    # Calculate the default distribution name, based on the enabled features
 | 
			
		||||
    cf=""
 | 
			
		||||
@@ -547,11 +506,11 @@ process_detect() {
 | 
			
		||||
        # Can only build shared libs on a subset of platforms. Doing this check
 | 
			
		||||
        # here rather than at option parse time because the target auto-detect
 | 
			
		||||
        # magic happens after the command line has been parsed.
 | 
			
		||||
        if ! enabled linux; then
 | 
			
		||||
        if ! enabled linux && ! enabled os2; then
 | 
			
		||||
            if enabled gnu; then
 | 
			
		||||
                echo "--enable-shared is only supported on ELF; assuming this is OK"
 | 
			
		||||
            else
 | 
			
		||||
                die "--enable-shared only supported on ELF for now"
 | 
			
		||||
                die "--enable-shared only supported on ELF and OS/2 for now"
 | 
			
		||||
            fi
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
@@ -616,30 +575,6 @@ EOF
 | 
			
		||||
process_toolchain() {
 | 
			
		||||
    process_common_toolchain
 | 
			
		||||
 | 
			
		||||
    # Handle universal binaries for this architecture
 | 
			
		||||
    case $toolchain in
 | 
			
		||||
        universal-darwin*)
 | 
			
		||||
            darwin_ver=${tgt_os##darwin}
 | 
			
		||||
 | 
			
		||||
            # Snow Leopard (10.6/darwin10) dropped support for PPC
 | 
			
		||||
            # Include PPC support for all prior versions
 | 
			
		||||
            if [ $darwin_ver -lt 10 ]; then
 | 
			
		||||
                fat_bin_archs="$fat_bin_archs ppc32-${tgt_os}-gcc"
 | 
			
		||||
            fi
 | 
			
		||||
 | 
			
		||||
            # Tiger (10.4/darwin8) brought support for x86
 | 
			
		||||
            if [ $darwin_ver -ge 8 ]; then
 | 
			
		||||
                fat_bin_archs="$fat_bin_archs x86-${tgt_os}-${tgt_cc}"
 | 
			
		||||
            fi
 | 
			
		||||
 | 
			
		||||
            # Leopard (10.5/darwin9) brought 64 bit support
 | 
			
		||||
            if [ $darwin_ver -ge 9 ]; then
 | 
			
		||||
                fat_bin_archs="$fat_bin_archs x86_64-${tgt_os}-${tgt_cc}"
 | 
			
		||||
            fi
 | 
			
		||||
            ;;
 | 
			
		||||
    esac
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    # Enable some useful compiler flags
 | 
			
		||||
    if enabled gcc; then
 | 
			
		||||
        enabled werror && check_add_cflags -Werror
 | 
			
		||||
@@ -715,7 +650,7 @@ process_toolchain() {
 | 
			
		||||
                 VCPROJ_SFX=vcproj
 | 
			
		||||
                 gen_vcproj_cmd=${source_path}/build/make/gen_msvs_proj.sh
 | 
			
		||||
                 ;;
 | 
			
		||||
             10|11|12)
 | 
			
		||||
             10|11|12|14)
 | 
			
		||||
                 VCPROJ_SFX=vcxproj
 | 
			
		||||
                 gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh
 | 
			
		||||
                 enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-werror"
 | 
			
		||||
@@ -727,7 +662,7 @@ process_toolchain() {
 | 
			
		||||
    esac
 | 
			
		||||
 | 
			
		||||
    # Other toolchain specific defaults
 | 
			
		||||
    case $toolchain in x86*|ppc*|universal*) soft_enable postproc;; esac
 | 
			
		||||
    case $toolchain in x86*) soft_enable postproc;; esac
 | 
			
		||||
 | 
			
		||||
    if enabled postproc_visualizer; then
 | 
			
		||||
        enabled postproc || die "postproc_visualizer requires postproc to be enabled"
 | 
			
		||||
@@ -781,6 +716,12 @@ EOF
 | 
			
		||||
    esac
 | 
			
		||||
    # libwebm needs to be linked with C++ standard library
 | 
			
		||||
    enabled webm_io && LD=${CXX}
 | 
			
		||||
 | 
			
		||||
    # append any user defined extra cflags
 | 
			
		||||
    if [ -n "${extra_cflags}" ] ; then
 | 
			
		||||
        check_add_cflags ${extra_cflags} || \
 | 
			
		||||
        die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler"
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -791,6 +732,7 @@ CONFIGURE_ARGS="$@"
 | 
			
		||||
process "$@"
 | 
			
		||||
print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */"
 | 
			
		||||
cat <<EOF >> ${BUILD_PFX}vpx_config.c
 | 
			
		||||
#include "vpx/vpx_codec.h"
 | 
			
		||||
static const char* const cfg = "$CONFIGURE_ARGS";
 | 
			
		||||
const char *vpx_codec_build_config(void) {return cfg;}
 | 
			
		||||
EOF
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										53
									
								
								examples.mk
									
									
									
									
									
								
							
							
						
						
									
										53
									
								
								examples.mk
									
									
									
									
									
								
							@@ -22,17 +22,18 @@ LIBYUV_SRCS +=  third_party/libyuv/include/libyuv/basic_types.h  \
 | 
			
		||||
                third_party/libyuv/source/planar_functions.cc \
 | 
			
		||||
                third_party/libyuv/source/row_any.cc \
 | 
			
		||||
                third_party/libyuv/source/row_common.cc \
 | 
			
		||||
                third_party/libyuv/source/row_gcc.cc \
 | 
			
		||||
                third_party/libyuv/source/row_mips.cc \
 | 
			
		||||
                third_party/libyuv/source/row_neon.cc \
 | 
			
		||||
                third_party/libyuv/source/row_neon64.cc \
 | 
			
		||||
                third_party/libyuv/source/row_posix.cc \
 | 
			
		||||
                third_party/libyuv/source/row_win.cc \
 | 
			
		||||
                third_party/libyuv/source/scale.cc \
 | 
			
		||||
                third_party/libyuv/source/scale_any.cc \
 | 
			
		||||
                third_party/libyuv/source/scale_common.cc \
 | 
			
		||||
                third_party/libyuv/source/scale_gcc.cc \
 | 
			
		||||
                third_party/libyuv/source/scale_mips.cc \
 | 
			
		||||
                third_party/libyuv/source/scale_neon.cc \
 | 
			
		||||
                third_party/libyuv/source/scale_neon64.cc \
 | 
			
		||||
                third_party/libyuv/source/scale_posix.cc \
 | 
			
		||||
                third_party/libyuv/source/scale_win.cc \
 | 
			
		||||
 | 
			
		||||
LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer.cpp \
 | 
			
		||||
@@ -56,6 +57,7 @@ UTILS-$(CONFIG_DECODERS)    += vpxdec.c
 | 
			
		||||
vpxdec.SRCS                 += md5_utils.c md5_utils.h
 | 
			
		||||
vpxdec.SRCS                 += vpx_ports/mem_ops.h
 | 
			
		||||
vpxdec.SRCS                 += vpx_ports/mem_ops_aligned.h
 | 
			
		||||
vpxdec.SRCS                 += vpx_ports/msvc.h
 | 
			
		||||
vpxdec.SRCS                 += vpx_ports/vpx_timer.h
 | 
			
		||||
vpxdec.SRCS                 += vpx/vpx_integer.h
 | 
			
		||||
vpxdec.SRCS                 += args.c args.h
 | 
			
		||||
@@ -80,6 +82,7 @@ vpxenc.SRCS                 += tools_common.c tools_common.h
 | 
			
		||||
vpxenc.SRCS                 += warnings.c warnings.h
 | 
			
		||||
vpxenc.SRCS                 += vpx_ports/mem_ops.h
 | 
			
		||||
vpxenc.SRCS                 += vpx_ports/mem_ops_aligned.h
 | 
			
		||||
vpxenc.SRCS                 += vpx_ports/msvc.h
 | 
			
		||||
vpxenc.SRCS                 += vpx_ports/vpx_timer.h
 | 
			
		||||
vpxenc.SRCS                 += vpxstats.c vpxstats.h
 | 
			
		||||
ifeq ($(CONFIG_LIBYUV),yes)
 | 
			
		||||
@@ -98,6 +101,7 @@ ifeq ($(CONFIG_SPATIAL_SVC),yes)
 | 
			
		||||
  vp9_spatial_svc_encoder.SRCS        += tools_common.c tools_common.h
 | 
			
		||||
  vp9_spatial_svc_encoder.SRCS        += video_common.h
 | 
			
		||||
  vp9_spatial_svc_encoder.SRCS        += video_writer.h video_writer.c
 | 
			
		||||
  vp9_spatial_svc_encoder.SRCS        += vpx_ports/msvc.h
 | 
			
		||||
  vp9_spatial_svc_encoder.SRCS        += vpxstats.c vpxstats.h
 | 
			
		||||
  vp9_spatial_svc_encoder.GUID        = 4A38598D-627D-4505-9C7B-D4020C84100D
 | 
			
		||||
  vp9_spatial_svc_encoder.DESCRIPTION = VP9 Spatial SVC Encoder
 | 
			
		||||
@@ -112,6 +116,7 @@ vpx_temporal_svc_encoder.SRCS        += ivfenc.c ivfenc.h
 | 
			
		||||
vpx_temporal_svc_encoder.SRCS        += tools_common.c tools_common.h
 | 
			
		||||
vpx_temporal_svc_encoder.SRCS        += video_common.h
 | 
			
		||||
vpx_temporal_svc_encoder.SRCS        += video_writer.h video_writer.c
 | 
			
		||||
vpx_temporal_svc_encoder.SRCS        += vpx_ports/msvc.h
 | 
			
		||||
vpx_temporal_svc_encoder.GUID        = B18C08F2-A439-4502-A78E-849BE3D60947
 | 
			
		||||
vpx_temporal_svc_encoder.DESCRIPTION = Temporal SVC Encoder
 | 
			
		||||
EXAMPLES-$(CONFIG_DECODERS)        += simple_decoder.c
 | 
			
		||||
@@ -122,6 +127,7 @@ simple_decoder.SRCS                += video_common.h
 | 
			
		||||
simple_decoder.SRCS                += video_reader.h video_reader.c
 | 
			
		||||
simple_decoder.SRCS                += vpx_ports/mem_ops.h
 | 
			
		||||
simple_decoder.SRCS                += vpx_ports/mem_ops_aligned.h
 | 
			
		||||
simple_decoder.SRCS                += vpx_ports/msvc.h
 | 
			
		||||
simple_decoder.DESCRIPTION          = Simplified decoder loop
 | 
			
		||||
EXAMPLES-$(CONFIG_DECODERS)        += postproc.c
 | 
			
		||||
postproc.SRCS                      += ivfdec.h ivfdec.c
 | 
			
		||||
@@ -130,6 +136,7 @@ postproc.SRCS                      += video_common.h
 | 
			
		||||
postproc.SRCS                      += video_reader.h video_reader.c
 | 
			
		||||
postproc.SRCS                      += vpx_ports/mem_ops.h
 | 
			
		||||
postproc.SRCS                      += vpx_ports/mem_ops_aligned.h
 | 
			
		||||
postproc.SRCS                      += vpx_ports/msvc.h
 | 
			
		||||
postproc.GUID                       = 65E33355-F35E-4088-884D-3FD4905881D7
 | 
			
		||||
postproc.DESCRIPTION                = Decoder postprocessor control
 | 
			
		||||
EXAMPLES-$(CONFIG_DECODERS)        += decode_to_md5.c
 | 
			
		||||
@@ -140,6 +147,7 @@ decode_to_md5.SRCS                 += video_common.h
 | 
			
		||||
decode_to_md5.SRCS                 += video_reader.h video_reader.c
 | 
			
		||||
decode_to_md5.SRCS                 += vpx_ports/mem_ops.h
 | 
			
		||||
decode_to_md5.SRCS                 += vpx_ports/mem_ops_aligned.h
 | 
			
		||||
decode_to_md5.SRCS                 += vpx_ports/msvc.h
 | 
			
		||||
decode_to_md5.GUID                  = 59120B9B-2735-4BFE-B022-146CA340FE42
 | 
			
		||||
decode_to_md5.DESCRIPTION           = Frame by frame MD5 checksum
 | 
			
		||||
EXAMPLES-$(CONFIG_ENCODERS)     += simple_encoder.c
 | 
			
		||||
@@ -147,6 +155,7 @@ simple_encoder.SRCS             += ivfenc.h ivfenc.c
 | 
			
		||||
simple_encoder.SRCS             += tools_common.h tools_common.c
 | 
			
		||||
simple_encoder.SRCS             += video_common.h
 | 
			
		||||
simple_encoder.SRCS             += video_writer.h video_writer.c
 | 
			
		||||
simple_encoder.SRCS             += vpx_ports/msvc.h
 | 
			
		||||
simple_encoder.GUID              = 4607D299-8A71-4D2C-9B1D-071899B6FBFD
 | 
			
		||||
simple_encoder.DESCRIPTION       = Simplified encoder loop
 | 
			
		||||
EXAMPLES-$(CONFIG_VP9_ENCODER)  += vp9_lossless_encoder.c
 | 
			
		||||
@@ -154,6 +163,7 @@ vp9_lossless_encoder.SRCS       += ivfenc.h ivfenc.c
 | 
			
		||||
vp9_lossless_encoder.SRCS       += tools_common.h tools_common.c
 | 
			
		||||
vp9_lossless_encoder.SRCS       += video_common.h
 | 
			
		||||
vp9_lossless_encoder.SRCS       += video_writer.h video_writer.c
 | 
			
		||||
vp9_lossless_encoder.SRCS       += vpx_ports/msvc.h
 | 
			
		||||
vp9_lossless_encoder.GUID        = B63C7C88-5348-46DC-A5A6-CC151EF93366
 | 
			
		||||
vp9_lossless_encoder.DESCRIPTION = Simplified lossless VP9 encoder
 | 
			
		||||
EXAMPLES-$(CONFIG_ENCODERS)     += twopass_encoder.c
 | 
			
		||||
@@ -161,6 +171,7 @@ twopass_encoder.SRCS            += ivfenc.h ivfenc.c
 | 
			
		||||
twopass_encoder.SRCS            += tools_common.h tools_common.c
 | 
			
		||||
twopass_encoder.SRCS            += video_common.h
 | 
			
		||||
twopass_encoder.SRCS            += video_writer.h video_writer.c
 | 
			
		||||
twopass_encoder.SRCS            += vpx_ports/msvc.h
 | 
			
		||||
twopass_encoder.GUID             = 73494FA6-4AF9-4763-8FBB-265C92402FD8
 | 
			
		||||
twopass_encoder.DESCRIPTION      = Two-pass encoder loop
 | 
			
		||||
EXAMPLES-$(CONFIG_DECODERS)     += decode_with_drops.c
 | 
			
		||||
@@ -170,6 +181,7 @@ decode_with_drops.SRCS          += video_common.h
 | 
			
		||||
decode_with_drops.SRCS          += video_reader.h video_reader.c
 | 
			
		||||
decode_with_drops.SRCS          += vpx_ports/mem_ops.h
 | 
			
		||||
decode_with_drops.SRCS          += vpx_ports/mem_ops_aligned.h
 | 
			
		||||
decode_with_drops.SRCS          += vpx_ports/msvc.h
 | 
			
		||||
decode_with_drops.GUID           = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26
 | 
			
		||||
decode_with_drops.DESCRIPTION    = Drops frames while decoding
 | 
			
		||||
EXAMPLES-$(CONFIG_ENCODERS)        += set_maps.c
 | 
			
		||||
@@ -177,6 +189,7 @@ set_maps.SRCS                      += ivfenc.h ivfenc.c
 | 
			
		||||
set_maps.SRCS                      += tools_common.h tools_common.c
 | 
			
		||||
set_maps.SRCS                      += video_common.h
 | 
			
		||||
set_maps.SRCS                      += video_writer.h video_writer.c
 | 
			
		||||
set_maps.SRCS                      += vpx_ports/msvc.h
 | 
			
		||||
set_maps.GUID                       = ECB2D24D-98B8-4015-A465-A4AF3DCC145F
 | 
			
		||||
set_maps.DESCRIPTION                = Set active and ROI maps
 | 
			
		||||
EXAMPLES-$(CONFIG_VP8_ENCODER)     += vp8cx_set_ref.c
 | 
			
		||||
@@ -184,6 +197,7 @@ vp8cx_set_ref.SRCS                 += ivfenc.h ivfenc.c
 | 
			
		||||
vp8cx_set_ref.SRCS                 += tools_common.h tools_common.c
 | 
			
		||||
vp8cx_set_ref.SRCS                 += video_common.h
 | 
			
		||||
vp8cx_set_ref.SRCS                 += video_writer.h video_writer.c
 | 
			
		||||
vp8cx_set_ref.SRCS                 += vpx_ports/msvc.h
 | 
			
		||||
vp8cx_set_ref.GUID                  = C5E31F7F-96F6-48BD-BD3E-10EBF6E8057A
 | 
			
		||||
vp8cx_set_ref.DESCRIPTION           = VP8 set encoder reference frame
 | 
			
		||||
 | 
			
		||||
@@ -194,6 +208,7 @@ EXAMPLES-$(CONFIG_VP8_ENCODER)          += vp8_multi_resolution_encoder.c
 | 
			
		||||
vp8_multi_resolution_encoder.SRCS       += ivfenc.h ivfenc.c
 | 
			
		||||
vp8_multi_resolution_encoder.SRCS       += tools_common.h tools_common.c
 | 
			
		||||
vp8_multi_resolution_encoder.SRCS       += video_writer.h video_writer.c
 | 
			
		||||
vp8_multi_resolution_encoder.SRCS       += vpx_ports/msvc.h
 | 
			
		||||
vp8_multi_resolution_encoder.SRCS       += $(LIBYUV_SRCS)
 | 
			
		||||
vp8_multi_resolution_encoder.GUID        = 04f8738e-63c8-423b-90fa-7c2703a374de
 | 
			
		||||
vp8_multi_resolution_encoder.DESCRIPTION = VP8 Multiple-resolution Encoding
 | 
			
		||||
@@ -254,14 +269,6 @@ CODEC_EXTRA_LIBS=$(sort $(call enabled,CODEC_EXTRA_LIBS))
 | 
			
		||||
$(foreach ex,$(ALL_EXAMPLES),$(eval $(notdir $(ex:.c=)).SRCS += $(ex) examples.mk))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# If this is a universal (fat) binary, then all the subarchitectures have
 | 
			
		||||
# already been built and our job is to stitch them together. The
 | 
			
		||||
# BUILD_OBJS variable indicates whether we should be building
 | 
			
		||||
# (compiling, linking) the library. The LIPO_OBJS variable indicates
 | 
			
		||||
# that we're stitching.
 | 
			
		||||
$(eval $(if $(filter universal%,$(TOOLCHAIN)),LIPO_OBJS,BUILD_OBJS):=yes)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Create build/install dependencies for all examples. The common case
 | 
			
		||||
# is handled here. The MSVS case is handled below.
 | 
			
		||||
NOT_MSVS = $(if $(CONFIG_MSVS),,yes)
 | 
			
		||||
@@ -269,24 +276,28 @@ DIST-BINS-$(NOT_MSVS)      += $(addprefix bin/,$(ALL_EXAMPLES:.c=$(EXE_SFX)))
 | 
			
		||||
INSTALL-BINS-$(NOT_MSVS)   += $(addprefix bin/,$(UTILS:.c=$(EXE_SFX)))
 | 
			
		||||
DIST-SRCS-yes              += $(ALL_SRCS)
 | 
			
		||||
INSTALL-SRCS-yes           += $(UTIL_SRCS)
 | 
			
		||||
OBJS-$(NOT_MSVS)           += $(if $(BUILD_OBJS),$(call objs,$(ALL_SRCS)))
 | 
			
		||||
OBJS-$(NOT_MSVS)           += $(call objs,$(ALL_SRCS))
 | 
			
		||||
BINS-$(NOT_MSVS)           += $(addprefix $(BUILD_PFX),$(ALL_EXAMPLES:.c=$(EXE_SFX)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Instantiate linker template for all examples.
 | 
			
		||||
CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
 | 
			
		||||
SHARED_LIB_SUF=$(if $(filter darwin%,$(TGT_OS)),.dylib,.so)
 | 
			
		||||
ifneq ($(filter darwin%,$(TGT_OS)),)
 | 
			
		||||
SHARED_LIB_SUF=.dylib
 | 
			
		||||
else
 | 
			
		||||
ifneq ($(filter os2%,$(TGT_OS)),)
 | 
			
		||||
SHARED_LIB_SUF=_dll.a
 | 
			
		||||
else
 | 
			
		||||
SHARED_LIB_SUF=.so
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
 | 
			
		||||
$(foreach bin,$(BINS-yes),\
 | 
			
		||||
    $(if $(BUILD_OBJS),$(eval $(bin):\
 | 
			
		||||
        $(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF)))\
 | 
			
		||||
    $(if $(BUILD_OBJS),$(eval $(call linker_template,$(bin),\
 | 
			
		||||
    $(eval $(bin):$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF))\
 | 
			
		||||
    $(eval $(call linker_template,$(bin),\
 | 
			
		||||
        $(call objs,$($(notdir $(bin:$(EXE_SFX)=)).SRCS)) \
 | 
			
		||||
        -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\
 | 
			
		||||
        )))\
 | 
			
		||||
    $(if $(LIPO_OBJS),$(eval $(call lipo_bin_template,$(bin))))\
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
        )))
 | 
			
		||||
 | 
			
		||||
# The following pairs define a mapping of locations in the distribution
 | 
			
		||||
# tree to locations in the source/build trees.
 | 
			
		||||
@@ -314,8 +325,8 @@ endif
 | 
			
		||||
# the makefiles). We may want to revisit this.
 | 
			
		||||
define vcproj_template
 | 
			
		||||
$(1): $($(1:.$(VCPROJ_SFX)=).SRCS) vpx.$(VCPROJ_SFX)
 | 
			
		||||
	@echo "    [vcproj] $$@"
 | 
			
		||||
	$$(GEN_VCPROJ)\
 | 
			
		||||
	$(if $(quiet),@echo "    [vcproj] $$@")
 | 
			
		||||
	$(qexec)$$(GEN_VCPROJ)\
 | 
			
		||||
            --exe\
 | 
			
		||||
            --target=$$(TOOLCHAIN)\
 | 
			
		||||
            --name=$$(@:.$(VCPROJ_SFX)=)\
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,7 @@ static void print_md5(FILE *stream, unsigned char digest[16]) {
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr, "Usage: %s <infile> <outfile> <N-M|N/M>\n", exec_name);
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -52,7 +52,7 @@
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -15,6 +15,7 @@
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "../tools_common.h"
 | 
			
		||||
#include "../vp9/encoder/vp9_resize.h"
 | 
			
		||||
 | 
			
		||||
static const char *exec_name = NULL;
 | 
			
		||||
@@ -26,7 +27,7 @@ static void usage() {
 | 
			
		||||
  printf("<output_yuv> [<frames>]\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  usage();
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n",
 | 
			
		||||
          exec_name);
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
 
 | 
			
		||||
@@ -88,7 +88,7 @@
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -106,7 +106,7 @@
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr,
 | 
			
		||||
          "Usage: %s <codec> <width> <height> <infile> <outfile> "
 | 
			
		||||
              "<keyframe-interval> [<error-resilient>]\nSee comments in "
 | 
			
		||||
 
 | 
			
		||||
@@ -58,7 +58,7 @@
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n",
 | 
			
		||||
          exec_name);
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
 
 | 
			
		||||
@@ -37,15 +37,14 @@
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include "vpx_ports/vpx_timer.h"
 | 
			
		||||
#define VPX_CODEC_DISABLE_COMPAT 1
 | 
			
		||||
#include "vpx/vpx_encoder.h"
 | 
			
		||||
#include "vpx/vp8cx.h"
 | 
			
		||||
#include "vpx_ports/mem_ops.h"
 | 
			
		||||
#include "./tools_common.h"
 | 
			
		||||
#include "../tools_common.h"
 | 
			
		||||
#define interface (vpx_codec_vp8_cx())
 | 
			
		||||
#define fourcc    0x30385056
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -58,7 +58,7 @@
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile> <frame>\n",
 | 
			
		||||
          exec_name);
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr, "vp9_lossless_encoder: Example demonstrating VP9 lossless "
 | 
			
		||||
                  "encoding feature. Supports raw input only.\n");
 | 
			
		||||
  fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile>\n", exec_name);
 | 
			
		||||
 
 | 
			
		||||
@@ -14,24 +14,34 @@
 | 
			
		||||
 * that benefit from a scalable bitstream.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include "../args.h"
 | 
			
		||||
#include "../tools_common.h"
 | 
			
		||||
#include "../video_writer.h"
 | 
			
		||||
 | 
			
		||||
#include "../vpx_ports/vpx_timer.h"
 | 
			
		||||
#include "vpx/svc_context.h"
 | 
			
		||||
#include "vpx/vp8cx.h"
 | 
			
		||||
#include "vpx/vpx_encoder.h"
 | 
			
		||||
#include "../vpxstats.h"
 | 
			
		||||
#define OUTPUT_RC_STATS 1
 | 
			
		||||
 | 
			
		||||
static const arg_def_t skip_frames_arg =
 | 
			
		||||
    ARG_DEF("s", "skip-frames", 1, "input frames to skip");
 | 
			
		||||
static const arg_def_t frames_arg =
 | 
			
		||||
    ARG_DEF("f", "frames", 1, "number of frames to encode");
 | 
			
		||||
static const arg_def_t threads_arg =
 | 
			
		||||
    ARG_DEF("th", "threads", 1, "number of threads to use");
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
static const arg_def_t output_rc_stats_arg =
 | 
			
		||||
    ARG_DEF("rcstat", "output_rc_stats", 1, "output rc stats");
 | 
			
		||||
#endif
 | 
			
		||||
static const arg_def_t width_arg = ARG_DEF("w", "width", 1, "source width");
 | 
			
		||||
static const arg_def_t height_arg = ARG_DEF("h", "height", 1, "source height");
 | 
			
		||||
static const arg_def_t timebase_arg =
 | 
			
		||||
@@ -42,6 +52,9 @@ static const arg_def_t spatial_layers_arg =
 | 
			
		||||
    ARG_DEF("sl", "spatial-layers", 1, "number of spatial SVC layers");
 | 
			
		||||
static const arg_def_t temporal_layers_arg =
 | 
			
		||||
    ARG_DEF("tl", "temporal-layers", 1, "number of temporal SVC layers");
 | 
			
		||||
static const arg_def_t temporal_layering_mode_arg =
 | 
			
		||||
    ARG_DEF("tlm", "temporal-layering-mode", 1, "temporal layering scheme."
 | 
			
		||||
        "VP9E_TEMPORAL_LAYERING_MODE");
 | 
			
		||||
static const arg_def_t kf_dist_arg =
 | 
			
		||||
    ARG_DEF("k", "kf-dist", 1, "number of frames between keyframes");
 | 
			
		||||
static const arg_def_t scale_factors_arg =
 | 
			
		||||
@@ -65,6 +78,8 @@ static const arg_def_t lag_in_frame_arg =
 | 
			
		||||
        "generating any outputs");
 | 
			
		||||
static const arg_def_t rc_end_usage_arg =
 | 
			
		||||
    ARG_DEF(NULL, "rc-end-usage", 1, "0 - 3: VBR, CBR, CQ, Q");
 | 
			
		||||
static const arg_def_t speed_arg =
 | 
			
		||||
    ARG_DEF("sp", "speed", 1, "speed configuration");
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
static const struct arg_enum_list bitdepth_enum[] = {
 | 
			
		||||
@@ -85,10 +100,16 @@ static const arg_def_t *svc_args[] = {
 | 
			
		||||
  &timebase_arg,      &bitrate_arg,       &skip_frames_arg, &spatial_layers_arg,
 | 
			
		||||
  &kf_dist_arg,       &scale_factors_arg, &passes_arg,      &pass_arg,
 | 
			
		||||
  &fpf_name_arg,      &min_q_arg,         &max_q_arg,       &min_bitrate_arg,
 | 
			
		||||
  &max_bitrate_arg,   &temporal_layers_arg,                 &lag_in_frame_arg,
 | 
			
		||||
  &max_bitrate_arg,   &temporal_layers_arg, &temporal_layering_mode_arg,
 | 
			
		||||
  &lag_in_frame_arg,  &threads_arg,
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
  &output_rc_stats_arg,
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  &bitdepth_arg,
 | 
			
		||||
#endif
 | 
			
		||||
  &speed_arg,
 | 
			
		||||
  &rc_end_usage_arg,  NULL
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -102,6 +123,10 @@ static const uint32_t default_bitrate = 1000;
 | 
			
		||||
static const uint32_t default_spatial_layers = 5;
 | 
			
		||||
static const uint32_t default_temporal_layers = 1;
 | 
			
		||||
static const uint32_t default_kf_dist = 100;
 | 
			
		||||
static const uint32_t default_temporal_layering_mode = 0;
 | 
			
		||||
static const uint32_t default_output_rc_stats = 0;
 | 
			
		||||
static const int32_t default_speed = -1;  // -1 means use library default.
 | 
			
		||||
static const uint32_t default_threads = 0;  // zero means use library default.
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  const char *input_filename;
 | 
			
		||||
@@ -116,7 +141,7 @@ typedef struct {
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  fprintf(stderr, "Usage: %s <options> input_filename output_filename\n",
 | 
			
		||||
          exec_name);
 | 
			
		||||
  fprintf(stderr, "Options:\n");
 | 
			
		||||
@@ -143,6 +168,12 @@ static void parse_command_line(int argc, const char **argv_,
 | 
			
		||||
  svc_ctx->log_level = SVC_LOG_DEBUG;
 | 
			
		||||
  svc_ctx->spatial_layers = default_spatial_layers;
 | 
			
		||||
  svc_ctx->temporal_layers = default_temporal_layers;
 | 
			
		||||
  svc_ctx->temporal_layering_mode = default_temporal_layering_mode;
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
  svc_ctx->output_rc_stat = default_output_rc_stats;
 | 
			
		||||
#endif
 | 
			
		||||
  svc_ctx->speed = default_speed;
 | 
			
		||||
  svc_ctx->threads = default_threads;
 | 
			
		||||
 | 
			
		||||
  // start with default encoder configuration
 | 
			
		||||
  res = vpx_codec_enc_config_default(vpx_codec_vp9_cx(), enc_cfg, 0);
 | 
			
		||||
@@ -184,6 +215,20 @@ static void parse_command_line(int argc, const char **argv_,
 | 
			
		||||
      svc_ctx->spatial_layers = arg_parse_uint(&arg);
 | 
			
		||||
    } else if (arg_match(&arg, &temporal_layers_arg, argi)) {
 | 
			
		||||
      svc_ctx->temporal_layers = arg_parse_uint(&arg);
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
    } else if (arg_match(&arg, &output_rc_stats_arg, argi)) {
 | 
			
		||||
      svc_ctx->output_rc_stat = arg_parse_uint(&arg);
 | 
			
		||||
#endif
 | 
			
		||||
    } else if (arg_match(&arg, &speed_arg, argi)) {
 | 
			
		||||
      svc_ctx->speed = arg_parse_uint(&arg);
 | 
			
		||||
    } else if (arg_match(&arg, &threads_arg, argi)) {
 | 
			
		||||
      svc_ctx->threads = arg_parse_uint(&arg);
 | 
			
		||||
    } else if (arg_match(&arg, &temporal_layering_mode_arg, argi)) {
 | 
			
		||||
      svc_ctx->temporal_layering_mode =
 | 
			
		||||
          enc_cfg->temporal_layering_mode = arg_parse_int(&arg);
 | 
			
		||||
      if (svc_ctx->temporal_layering_mode) {
 | 
			
		||||
        enc_cfg->g_error_resilient = 1;
 | 
			
		||||
      }
 | 
			
		||||
    } else if (arg_match(&arg, &kf_dist_arg, argi)) {
 | 
			
		||||
      enc_cfg->kf_min_dist = arg_parse_uint(&arg);
 | 
			
		||||
      enc_cfg->kf_max_dist = enc_cfg->kf_min_dist;
 | 
			
		||||
@@ -316,6 +361,185 @@ static void parse_command_line(int argc, const char **argv_,
 | 
			
		||||
      enc_cfg->rc_target_bitrate, enc_cfg->kf_max_dist);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
// For rate control encoding stats.
 | 
			
		||||
struct RateControlStats {
 | 
			
		||||
  // Number of input frames per layer.
 | 
			
		||||
  int layer_input_frames[VPX_MAX_LAYERS];
 | 
			
		||||
  // Total (cumulative) number of encoded frames per layer.
 | 
			
		||||
  int layer_tot_enc_frames[VPX_MAX_LAYERS];
 | 
			
		||||
  // Number of encoded non-key frames per layer.
 | 
			
		||||
  int layer_enc_frames[VPX_MAX_LAYERS];
 | 
			
		||||
  // Framerate per layer (cumulative).
 | 
			
		||||
  double layer_framerate[VPX_MAX_LAYERS];
 | 
			
		||||
  // Target average frame size per layer (per-frame-bandwidth per layer).
 | 
			
		||||
  double layer_pfb[VPX_MAX_LAYERS];
 | 
			
		||||
  // Actual average frame size per layer.
 | 
			
		||||
  double layer_avg_frame_size[VPX_MAX_LAYERS];
 | 
			
		||||
  // Average rate mismatch per layer (|target - actual| / target).
 | 
			
		||||
  double layer_avg_rate_mismatch[VPX_MAX_LAYERS];
 | 
			
		||||
  // Actual encoding bitrate per layer (cumulative).
 | 
			
		||||
  double layer_encoding_bitrate[VPX_MAX_LAYERS];
 | 
			
		||||
  // Average of the short-time encoder actual bitrate.
 | 
			
		||||
  // TODO(marpan): Should we add these short-time stats for each layer?
 | 
			
		||||
  double avg_st_encoding_bitrate;
 | 
			
		||||
  // Variance of the short-time encoder actual bitrate.
 | 
			
		||||
  double variance_st_encoding_bitrate;
 | 
			
		||||
  // Window (number of frames) for computing short-time encoding bitrate.
 | 
			
		||||
  int window_size;
 | 
			
		||||
  // Number of window measurements.
 | 
			
		||||
  int window_count;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Note: these rate control stats assume only 1 key frame in the
 | 
			
		||||
// sequence (i.e., first frame only).
 | 
			
		||||
static void set_rate_control_stats(struct RateControlStats *rc,
 | 
			
		||||
                                     vpx_codec_enc_cfg_t *cfg) {
 | 
			
		||||
  unsigned int sl, tl;
 | 
			
		||||
  // Set the layer (cumulative) framerate and the target layer (non-cumulative)
 | 
			
		||||
  // per-frame-bandwidth, for the rate control encoding stats below.
 | 
			
		||||
  const double framerate = cfg->g_timebase.den / cfg->g_timebase.num;
 | 
			
		||||
 | 
			
		||||
  for (sl = 0; sl < cfg->ss_number_layers; ++sl) {
 | 
			
		||||
    for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
 | 
			
		||||
      const int layer = sl * cfg->ts_number_layers + tl;
 | 
			
		||||
      const int tlayer0 = sl * cfg->ts_number_layers;
 | 
			
		||||
      rc->layer_framerate[layer] =
 | 
			
		||||
          framerate / cfg->ts_rate_decimator[tl];
 | 
			
		||||
      if (tl > 0) {
 | 
			
		||||
        rc->layer_pfb[layer] = 1000.0 *
 | 
			
		||||
            (cfg->layer_target_bitrate[layer] -
 | 
			
		||||
                cfg->layer_target_bitrate[layer - 1]) /
 | 
			
		||||
            (rc->layer_framerate[layer] -
 | 
			
		||||
                rc->layer_framerate[layer - 1]);
 | 
			
		||||
      } else {
 | 
			
		||||
        rc->layer_pfb[tlayer0] = 1000.0 *
 | 
			
		||||
            cfg->layer_target_bitrate[tlayer0] /
 | 
			
		||||
            rc->layer_framerate[tlayer0];
 | 
			
		||||
      }
 | 
			
		||||
      rc->layer_input_frames[layer] = 0;
 | 
			
		||||
      rc->layer_enc_frames[layer] = 0;
 | 
			
		||||
      rc->layer_tot_enc_frames[layer] = 0;
 | 
			
		||||
      rc->layer_encoding_bitrate[layer] = 0.0;
 | 
			
		||||
      rc->layer_avg_frame_size[layer] = 0.0;
 | 
			
		||||
      rc->layer_avg_rate_mismatch[layer] = 0.0;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  rc->window_count = 0;
 | 
			
		||||
  rc->window_size = 15;
 | 
			
		||||
  rc->avg_st_encoding_bitrate = 0.0;
 | 
			
		||||
  rc->variance_st_encoding_bitrate = 0.0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void printout_rate_control_summary(struct RateControlStats *rc,
 | 
			
		||||
                                          vpx_codec_enc_cfg_t *cfg,
 | 
			
		||||
                                          int frame_cnt) {
 | 
			
		||||
  unsigned int sl, tl;
 | 
			
		||||
  int tot_num_frames = 0;
 | 
			
		||||
  double perc_fluctuation = 0.0;
 | 
			
		||||
  printf("Total number of processed frames: %d\n\n", frame_cnt - 1);
 | 
			
		||||
  printf("Rate control layer stats for sl%d tl%d layer(s):\n\n",
 | 
			
		||||
      cfg->ss_number_layers, cfg->ts_number_layers);
 | 
			
		||||
  for (sl = 0; sl < cfg->ss_number_layers; ++sl) {
 | 
			
		||||
    for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
 | 
			
		||||
      const int layer = sl * cfg->ts_number_layers + tl;
 | 
			
		||||
      const int num_dropped = (tl > 0) ?
 | 
			
		||||
          (rc->layer_input_frames[layer] - rc->layer_enc_frames[layer]) :
 | 
			
		||||
          (rc->layer_input_frames[layer] - rc->layer_enc_frames[layer] - 1);
 | 
			
		||||
      if (!sl)
 | 
			
		||||
        tot_num_frames += rc->layer_input_frames[layer];
 | 
			
		||||
      rc->layer_encoding_bitrate[layer] = 0.001 * rc->layer_framerate[layer] *
 | 
			
		||||
          rc->layer_encoding_bitrate[layer] / tot_num_frames;
 | 
			
		||||
      rc->layer_avg_frame_size[layer] = rc->layer_avg_frame_size[layer] /
 | 
			
		||||
          rc->layer_enc_frames[layer];
 | 
			
		||||
      rc->layer_avg_rate_mismatch[layer] =
 | 
			
		||||
          100.0 * rc->layer_avg_rate_mismatch[layer] /
 | 
			
		||||
          rc->layer_enc_frames[layer];
 | 
			
		||||
      printf("For layer#: sl%d tl%d \n", sl, tl);
 | 
			
		||||
      printf("Bitrate (target vs actual): %d %f.0 kbps\n",
 | 
			
		||||
             cfg->layer_target_bitrate[layer],
 | 
			
		||||
             rc->layer_encoding_bitrate[layer]);
 | 
			
		||||
      printf("Average frame size (target vs actual): %f %f bits\n",
 | 
			
		||||
             rc->layer_pfb[layer], rc->layer_avg_frame_size[layer]);
 | 
			
		||||
      printf("Average rate_mismatch: %f\n",
 | 
			
		||||
             rc->layer_avg_rate_mismatch[layer]);
 | 
			
		||||
      printf("Number of input frames, encoded (non-key) frames, "
 | 
			
		||||
          "and percent dropped frames: %d %d %f.0 \n",
 | 
			
		||||
          rc->layer_input_frames[layer], rc->layer_enc_frames[layer],
 | 
			
		||||
          100.0 * num_dropped / rc->layer_input_frames[layer]);
 | 
			
		||||
      printf("\n");
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  rc->avg_st_encoding_bitrate = rc->avg_st_encoding_bitrate / rc->window_count;
 | 
			
		||||
  rc->variance_st_encoding_bitrate =
 | 
			
		||||
      rc->variance_st_encoding_bitrate / rc->window_count -
 | 
			
		||||
      (rc->avg_st_encoding_bitrate * rc->avg_st_encoding_bitrate);
 | 
			
		||||
  perc_fluctuation = 100.0 * sqrt(rc->variance_st_encoding_bitrate) /
 | 
			
		||||
      rc->avg_st_encoding_bitrate;
 | 
			
		||||
  printf("Short-time stats, for window of %d frames: \n", rc->window_size);
 | 
			
		||||
  printf("Average, rms-variance, and percent-fluct: %f %f %f \n",
 | 
			
		||||
         rc->avg_st_encoding_bitrate,
 | 
			
		||||
         sqrt(rc->variance_st_encoding_bitrate),
 | 
			
		||||
         perc_fluctuation);
 | 
			
		||||
  if (frame_cnt != tot_num_frames)
 | 
			
		||||
    die("Error: Number of input frames not equal to output encoded frames != "
 | 
			
		||||
        "%d tot_num_frames = %d\n", frame_cnt, tot_num_frames);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vpx_codec_err_t parse_superframe_index(const uint8_t *data,
 | 
			
		||||
                                       size_t data_sz,
 | 
			
		||||
                                       uint32_t sizes[8], int *count) {
 | 
			
		||||
  // A chunk ending with a byte matching 0xc0 is an invalid chunk unless
 | 
			
		||||
  // it is a super frame index. If the last byte of real video compression
 | 
			
		||||
  // data is 0xc0 the encoder must add a 0 byte. If we have the marker but
 | 
			
		||||
  // not the associated matching marker byte at the front of the index we have
 | 
			
		||||
  // an invalid bitstream and need to return an error.
 | 
			
		||||
 | 
			
		||||
  uint8_t marker;
 | 
			
		||||
 | 
			
		||||
  marker = *(data + data_sz - 1);
 | 
			
		||||
  *count = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  if ((marker & 0xe0) == 0xc0) {
 | 
			
		||||
    const uint32_t frames = (marker & 0x7) + 1;
 | 
			
		||||
    const uint32_t mag = ((marker >> 3) & 0x3) + 1;
 | 
			
		||||
    const size_t index_sz = 2 + mag * frames;
 | 
			
		||||
 | 
			
		||||
    // This chunk is marked as having a superframe index but doesn't have
 | 
			
		||||
    // enough data for it, thus it's an invalid superframe index.
 | 
			
		||||
    if (data_sz < index_sz)
 | 
			
		||||
      return VPX_CODEC_CORRUPT_FRAME;
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
      const uint8_t marker2 = *(data + data_sz - index_sz);
 | 
			
		||||
 | 
			
		||||
      // This chunk is marked as having a superframe index but doesn't have
 | 
			
		||||
      // the matching marker byte at the front of the index therefore it's an
 | 
			
		||||
      // invalid chunk.
 | 
			
		||||
      if (marker != marker2)
 | 
			
		||||
        return VPX_CODEC_CORRUPT_FRAME;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
      // Found a valid superframe index.
 | 
			
		||||
      uint32_t i, j;
 | 
			
		||||
      const uint8_t *x = &data[data_sz - index_sz + 1];
 | 
			
		||||
 | 
			
		||||
      for (i = 0; i < frames; ++i) {
 | 
			
		||||
        uint32_t this_sz = 0;
 | 
			
		||||
 | 
			
		||||
        for (j = 0; j < mag; ++j)
 | 
			
		||||
          this_sz |= (*x++) << (j * 8);
 | 
			
		||||
        sizes[i] = this_sz;
 | 
			
		||||
      }
 | 
			
		||||
      *count = frames;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return VPX_CODEC_OK;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int main(int argc, const char **argv) {
 | 
			
		||||
  AppInput app_input = {0};
 | 
			
		||||
  VpxVideoWriter *writer = NULL;
 | 
			
		||||
@@ -332,7 +556,17 @@ int main(int argc, const char **argv) {
 | 
			
		||||
  FILE *infile = NULL;
 | 
			
		||||
  int end_of_stream = 0;
 | 
			
		||||
  int frames_received = 0;
 | 
			
		||||
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
  VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = {NULL};
 | 
			
		||||
  struct RateControlStats rc;
 | 
			
		||||
  vpx_svc_layer_id_t layer_id;
 | 
			
		||||
  int sl, tl;
 | 
			
		||||
  double sum_bitrate = 0.0;
 | 
			
		||||
  double sum_bitrate2 = 0.0;
 | 
			
		||||
  double framerate  = 30.0;
 | 
			
		||||
#endif
 | 
			
		||||
  struct vpx_usec_timer timer;
 | 
			
		||||
  int64_t cx_time = 0;
 | 
			
		||||
  memset(&svc_ctx, 0, sizeof(svc_ctx));
 | 
			
		||||
  svc_ctx.log_print = 1;
 | 
			
		||||
  exec_name = argv[0];
 | 
			
		||||
@@ -359,6 +593,13 @@ int main(int argc, const char **argv) {
 | 
			
		||||
      VPX_CODEC_OK)
 | 
			
		||||
    die("Failed to initialize encoder\n");
 | 
			
		||||
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
  if (svc_ctx.output_rc_stat) {
 | 
			
		||||
    set_rate_control_stats(&rc, &enc_cfg);
 | 
			
		||||
    framerate = enc_cfg.g_timebase.den / enc_cfg.g_timebase.num;
 | 
			
		||||
  }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  info.codec_fourcc = VP9_FOURCC;
 | 
			
		||||
  info.time_base.numerator = enc_cfg.g_timebase.num;
 | 
			
		||||
  info.time_base.denominator = enc_cfg.g_timebase.den;
 | 
			
		||||
@@ -370,11 +611,34 @@ int main(int argc, const char **argv) {
 | 
			
		||||
    if (!writer)
 | 
			
		||||
      die("Failed to open %s for writing\n", app_input.output_filename);
 | 
			
		||||
  }
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
  // For now, just write temporal layer streams.
 | 
			
		||||
  // TODO(wonkap): do spatial by re-writing superframe.
 | 
			
		||||
  if (svc_ctx.output_rc_stat) {
 | 
			
		||||
    for (tl = 0; tl < enc_cfg.ts_number_layers; ++tl) {
 | 
			
		||||
      char file_name[PATH_MAX];
 | 
			
		||||
 | 
			
		||||
      snprintf(file_name, sizeof(file_name), "%s_t%d.ivf",
 | 
			
		||||
               app_input.output_filename, tl);
 | 
			
		||||
      outfile[tl] = vpx_video_writer_open(file_name, kContainerIVF, &info);
 | 
			
		||||
      if (!outfile[tl])
 | 
			
		||||
        die("Failed to open %s for writing", file_name);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  // skip initial frames
 | 
			
		||||
  for (i = 0; i < app_input.frames_to_skip; ++i)
 | 
			
		||||
    vpx_img_read(&raw, infile);
 | 
			
		||||
 | 
			
		||||
  if (svc_ctx.speed != -1)
 | 
			
		||||
    vpx_codec_control(&codec, VP8E_SET_CPUUSED, svc_ctx.speed);
 | 
			
		||||
  if (svc_ctx.threads)
 | 
			
		||||
    vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (svc_ctx.threads >> 1));
 | 
			
		||||
  if (svc_ctx.speed >= 5)
 | 
			
		||||
    vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  // Encode frames
 | 
			
		||||
  while (!end_of_stream) {
 | 
			
		||||
    vpx_codec_iter_t iter = NULL;
 | 
			
		||||
@@ -385,8 +649,13 @@ int main(int argc, const char **argv) {
 | 
			
		||||
      end_of_stream = 1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    vpx_usec_timer_start(&timer);
 | 
			
		||||
    res = vpx_svc_encode(&svc_ctx, &codec, (end_of_stream ? NULL : &raw),
 | 
			
		||||
                         pts, frame_duration, VPX_DL_GOOD_QUALITY);
 | 
			
		||||
                         pts, frame_duration, svc_ctx.speed >= 5 ?
 | 
			
		||||
                         VPX_DL_REALTIME : VPX_DL_GOOD_QUALITY);
 | 
			
		||||
    vpx_usec_timer_mark(&timer);
 | 
			
		||||
    cx_time += vpx_usec_timer_elapsed(&timer);
 | 
			
		||||
 | 
			
		||||
    printf("%s", vpx_svc_get_message(&svc_ctx));
 | 
			
		||||
    if (res != VPX_CODEC_OK) {
 | 
			
		||||
      die_codec(&codec, "Failed to encode frame");
 | 
			
		||||
@@ -395,11 +664,90 @@ int main(int argc, const char **argv) {
 | 
			
		||||
    while ((cx_pkt = vpx_codec_get_cx_data(&codec, &iter)) != NULL) {
 | 
			
		||||
      switch (cx_pkt->kind) {
 | 
			
		||||
        case VPX_CODEC_CX_FRAME_PKT: {
 | 
			
		||||
          if (cx_pkt->data.frame.sz > 0)
 | 
			
		||||
          if (cx_pkt->data.frame.sz > 0) {
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
            uint32_t sizes[8];
 | 
			
		||||
            int count = 0;
 | 
			
		||||
#endif
 | 
			
		||||
            vpx_video_writer_write_frame(writer,
 | 
			
		||||
                                         cx_pkt->data.frame.buf,
 | 
			
		||||
                                         cx_pkt->data.frame.sz,
 | 
			
		||||
                                         cx_pkt->data.frame.pts);
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
            // TODO(marpan/wonkap): Put this (to line728) in separate function.
 | 
			
		||||
            if (svc_ctx.output_rc_stat) {
 | 
			
		||||
              vpx_codec_control(&codec, VP9E_GET_SVC_LAYER_ID, &layer_id);
 | 
			
		||||
              parse_superframe_index(cx_pkt->data.frame.buf,
 | 
			
		||||
                                     cx_pkt->data.frame.sz, sizes, &count);
 | 
			
		||||
              for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
 | 
			
		||||
                ++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
 | 
			
		||||
                                        layer_id.temporal_layer_id];
 | 
			
		||||
              }
 | 
			
		||||
              for (tl = layer_id.temporal_layer_id;
 | 
			
		||||
                  tl < enc_cfg.ts_number_layers; ++tl) {
 | 
			
		||||
                vpx_video_writer_write_frame(outfile[tl],
 | 
			
		||||
                                             cx_pkt->data.frame.buf,
 | 
			
		||||
                                             cx_pkt->data.frame.sz,
 | 
			
		||||
                                             cx_pkt->data.frame.pts);
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
              for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
 | 
			
		||||
                for (tl = layer_id.temporal_layer_id;
 | 
			
		||||
                    tl < enc_cfg.ts_number_layers; ++tl) {
 | 
			
		||||
                  const int layer = sl * enc_cfg.ts_number_layers + tl;
 | 
			
		||||
                  ++rc.layer_tot_enc_frames[layer];
 | 
			
		||||
                  rc.layer_encoding_bitrate[layer] += 8.0 * sizes[sl];
 | 
			
		||||
                  // Keep count of rate control stats per layer, for non-key
 | 
			
		||||
                  // frames.
 | 
			
		||||
                  if (tl == layer_id.temporal_layer_id &&
 | 
			
		||||
                      !(cx_pkt->data.frame.flags & VPX_FRAME_IS_KEY)) {
 | 
			
		||||
                    rc.layer_avg_frame_size[layer] += 8.0 * sizes[sl];
 | 
			
		||||
                    rc.layer_avg_rate_mismatch[layer] +=
 | 
			
		||||
                        fabs(8.0 * sizes[sl] - rc.layer_pfb[layer]) /
 | 
			
		||||
                        rc.layer_pfb[layer];
 | 
			
		||||
                    ++rc.layer_enc_frames[layer];
 | 
			
		||||
                  }
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
              // Update for short-time encoding bitrate states, for moving
 | 
			
		||||
              // window of size rc->window, shifted by rc->window / 2.
 | 
			
		||||
              // Ignore first window segment, due to key frame.
 | 
			
		||||
              if (frame_cnt > rc.window_size) {
 | 
			
		||||
                tl = layer_id.temporal_layer_id;
 | 
			
		||||
                for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
 | 
			
		||||
                  sum_bitrate += 0.001 * 8.0 * sizes[sl] * framerate;
 | 
			
		||||
                }
 | 
			
		||||
                if (frame_cnt % rc.window_size == 0) {
 | 
			
		||||
                  rc.window_count += 1;
 | 
			
		||||
                  rc.avg_st_encoding_bitrate += sum_bitrate / rc.window_size;
 | 
			
		||||
                  rc.variance_st_encoding_bitrate +=
 | 
			
		||||
                      (sum_bitrate / rc.window_size) *
 | 
			
		||||
                      (sum_bitrate / rc.window_size);
 | 
			
		||||
                  sum_bitrate = 0.0;
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
              // Second shifted window.
 | 
			
		||||
              if (frame_cnt > rc.window_size + rc.window_size / 2) {
 | 
			
		||||
               tl = layer_id.temporal_layer_id;
 | 
			
		||||
               for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
 | 
			
		||||
                 sum_bitrate2 += 0.001 * 8.0 * sizes[sl] * framerate;
 | 
			
		||||
               }
 | 
			
		||||
 | 
			
		||||
               if (frame_cnt > 2 * rc.window_size &&
 | 
			
		||||
                  frame_cnt % rc.window_size == 0) {
 | 
			
		||||
                 rc.window_count += 1;
 | 
			
		||||
                 rc.avg_st_encoding_bitrate += sum_bitrate2 / rc.window_size;
 | 
			
		||||
                 rc.variance_st_encoding_bitrate +=
 | 
			
		||||
                    (sum_bitrate2 / rc.window_size) *
 | 
			
		||||
                    (sum_bitrate2 / rc.window_size);
 | 
			
		||||
                 sum_bitrate2 = 0.0;
 | 
			
		||||
               }
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
#endif
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          printf("SVC frame: %d, kf: %d, size: %d, pts: %d\n", frames_received,
 | 
			
		||||
                 !!(cx_pkt->data.frame.flags & VPX_FRAME_IS_KEY),
 | 
			
		||||
@@ -424,25 +772,34 @@ int main(int argc, const char **argv) {
 | 
			
		||||
      pts += frame_duration;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  printf("Processed %d frames\n", frame_cnt);
 | 
			
		||||
 | 
			
		||||
  fclose(infile);
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
  if (svc_ctx.output_rc_stat) {
 | 
			
		||||
    printout_rate_control_summary(&rc, &enc_cfg, frame_cnt);
 | 
			
		||||
    printf("\n");
 | 
			
		||||
  }
 | 
			
		||||
#endif
 | 
			
		||||
  if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec");
 | 
			
		||||
 | 
			
		||||
  if (app_input.passes == 2)
 | 
			
		||||
    stats_close(&app_input.rc_stats, 1);
 | 
			
		||||
 | 
			
		||||
  if (writer) {
 | 
			
		||||
    vpx_video_writer_close(writer);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#if OUTPUT_RC_STATS
 | 
			
		||||
  if (svc_ctx.output_rc_stat) {
 | 
			
		||||
    for (tl = 0; tl < enc_cfg.ts_number_layers; ++tl) {
 | 
			
		||||
      vpx_video_writer_close(outfile[tl]);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
#endif
 | 
			
		||||
  printf("Frame cnt and encoding time/FPS stats for encoding: %d %f %f \n",
 | 
			
		||||
         frame_cnt,
 | 
			
		||||
         1000 * (float)cx_time / (double)(frame_cnt * 1000000),
 | 
			
		||||
         1000000 * (double)frame_cnt / (double)cx_time);
 | 
			
		||||
  vpx_img_free(&raw);
 | 
			
		||||
 | 
			
		||||
  // display average size, psnr
 | 
			
		||||
  printf("%s", vpx_svc_dump_statistics(&svc_ctx));
 | 
			
		||||
 | 
			
		||||
  vpx_svc_release(&svc_ctx);
 | 
			
		||||
 | 
			
		||||
  return EXIT_SUCCESS;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 | 
			
		||||
static const char *exec_name;
 | 
			
		||||
 | 
			
		||||
void usage_exit() {
 | 
			
		||||
void usage_exit(void) {
 | 
			
		||||
  exit(EXIT_FAILURE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -70,6 +70,7 @@ struct RateControlMetrics {
 | 
			
		||||
  int window_size;
 | 
			
		||||
  // Number of window measurements.
 | 
			
		||||
  int window_count;
 | 
			
		||||
  int layer_target_bitrate[VPX_MAX_LAYERS];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Note: these rate control metrics assume only 1 key frame in the
 | 
			
		||||
@@ -85,13 +86,13 @@ static void set_rate_control_metrics(struct RateControlMetrics *rc,
 | 
			
		||||
  // per-frame-bandwidth, for the rate control encoding stats below.
 | 
			
		||||
  const double framerate = cfg->g_timebase.den / cfg->g_timebase.num;
 | 
			
		||||
  rc->layer_framerate[0] = framerate / cfg->ts_rate_decimator[0];
 | 
			
		||||
  rc->layer_pfb[0] = 1000.0 * cfg->ts_target_bitrate[0] /
 | 
			
		||||
  rc->layer_pfb[0] = 1000.0 * rc->layer_target_bitrate[0] /
 | 
			
		||||
      rc->layer_framerate[0];
 | 
			
		||||
  for (i = 0; i < cfg->ts_number_layers; ++i) {
 | 
			
		||||
    if (i > 0) {
 | 
			
		||||
      rc->layer_framerate[i] = framerate / cfg->ts_rate_decimator[i];
 | 
			
		||||
      rc->layer_pfb[i] = 1000.0 *
 | 
			
		||||
          (cfg->ts_target_bitrate[i] - cfg->ts_target_bitrate[i - 1]) /
 | 
			
		||||
          (rc->layer_target_bitrate[i] - rc->layer_target_bitrate[i - 1]) /
 | 
			
		||||
          (rc->layer_framerate[i] - rc->layer_framerate[i - 1]);
 | 
			
		||||
    }
 | 
			
		||||
    rc->layer_input_frames[i] = 0;
 | 
			
		||||
@@ -128,7 +129,7 @@ static void printout_rate_control_summary(struct RateControlMetrics *rc,
 | 
			
		||||
    rc->layer_avg_rate_mismatch[i] = 100.0 * rc->layer_avg_rate_mismatch[i] /
 | 
			
		||||
        rc->layer_enc_frames[i];
 | 
			
		||||
    printf("For layer#: %d \n", i);
 | 
			
		||||
    printf("Bitrate (target vs actual): %d %f \n", cfg->ts_target_bitrate[i],
 | 
			
		||||
    printf("Bitrate (target vs actual): %d %f \n", rc->layer_target_bitrate[i],
 | 
			
		||||
           rc->layer_encoding_bitrate[i]);
 | 
			
		||||
    printf("Average frame size (target vs actual): %f %f \n", rc->layer_pfb[i],
 | 
			
		||||
           rc->layer_avg_frame_size[i]);
 | 
			
		||||
@@ -597,13 +598,16 @@ int main(int argc, char **argv) {
 | 
			
		||||
  for (i = min_args_base;
 | 
			
		||||
       (int)i < min_args_base + mode_to_num_layers[layering_mode];
 | 
			
		||||
       ++i) {
 | 
			
		||||
    cfg.ts_target_bitrate[i - 11] = strtol(argv[i], NULL, 0);
 | 
			
		||||
    rc.layer_target_bitrate[i - 11] = strtol(argv[i], NULL, 0);
 | 
			
		||||
    if (strncmp(encoder->name, "vp8", 3) == 0)
 | 
			
		||||
      cfg.ts_target_bitrate[i - 11] = rc.layer_target_bitrate[i - 11];
 | 
			
		||||
    else if (strncmp(encoder->name, "vp9", 3) == 0)
 | 
			
		||||
      cfg.layer_target_bitrate[i - 11] = rc.layer_target_bitrate[i - 11];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Real time parameters.
 | 
			
		||||
  cfg.rc_dropframe_thresh = strtol(argv[9], NULL, 0);
 | 
			
		||||
  cfg.rc_end_usage = VPX_CBR;
 | 
			
		||||
  cfg.rc_resize_allowed = 0;
 | 
			
		||||
  cfg.rc_min_quantizer = 2;
 | 
			
		||||
  cfg.rc_max_quantizer = 56;
 | 
			
		||||
  if (strncmp(encoder->name, "vp9", 3) == 0)
 | 
			
		||||
@@ -614,6 +618,9 @@ int main(int argc, char **argv) {
 | 
			
		||||
  cfg.rc_buf_optimal_sz = 600;
 | 
			
		||||
  cfg.rc_buf_sz = 1000;
 | 
			
		||||
 | 
			
		||||
  // Disable dynamic resizing by default.
 | 
			
		||||
  cfg.rc_resize_allowed = 0;
 | 
			
		||||
 | 
			
		||||
  // Use 1 thread as default.
 | 
			
		||||
  cfg.g_threads = 1;
 | 
			
		||||
 | 
			
		||||
@@ -625,6 +632,8 @@ int main(int argc, char **argv) {
 | 
			
		||||
  // Disable automatic keyframe placement.
 | 
			
		||||
  cfg.kf_min_dist = cfg.kf_max_dist = 3000;
 | 
			
		||||
 | 
			
		||||
  cfg.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
 | 
			
		||||
 | 
			
		||||
  set_temporal_layer_pattern(layering_mode,
 | 
			
		||||
                             &cfg,
 | 
			
		||||
                             layer_flags,
 | 
			
		||||
@@ -633,8 +642,8 @@ int main(int argc, char **argv) {
 | 
			
		||||
  set_rate_control_metrics(&rc, &cfg);
 | 
			
		||||
 | 
			
		||||
  // Target bandwidth for the whole stream.
 | 
			
		||||
  // Set to ts_target_bitrate for highest layer (total bitrate).
 | 
			
		||||
  cfg.rc_target_bitrate = cfg.ts_target_bitrate[cfg.ts_number_layers - 1];
 | 
			
		||||
  // Set to layer_target_bitrate for highest layer (total bitrate).
 | 
			
		||||
  cfg.rc_target_bitrate = rc.layer_target_bitrate[cfg.ts_number_layers - 1];
 | 
			
		||||
 | 
			
		||||
  // Open input file.
 | 
			
		||||
  if (!(infile = fopen(argv[1], "rb"))) {
 | 
			
		||||
@@ -674,18 +683,26 @@ int main(int argc, char **argv) {
 | 
			
		||||
 | 
			
		||||
  if (strncmp(encoder->name, "vp8", 3) == 0) {
 | 
			
		||||
    vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
 | 
			
		||||
    vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOnYOnly);
 | 
			
		||||
    vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
 | 
			
		||||
    vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff);
 | 
			
		||||
    vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 0);
 | 
			
		||||
  } else if (strncmp(encoder->name, "vp9", 3) == 0) {
 | 
			
		||||
      vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
 | 
			
		||||
      vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
 | 
			
		||||
      vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
 | 
			
		||||
      vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, 0);
 | 
			
		||||
      vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
 | 
			
		||||
      vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));
 | 
			
		||||
      if (vpx_codec_control(&codec, VP9E_SET_SVC, layering_mode > 0 ? 1: 0)) {
 | 
			
		||||
        die_codec(&codec, "Failed to set SVC");
 | 
			
		||||
    vpx_svc_extra_cfg_t svc_params;
 | 
			
		||||
    vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
 | 
			
		||||
    vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
 | 
			
		||||
    vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
 | 
			
		||||
    vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, 0);
 | 
			
		||||
    vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 0);
 | 
			
		||||
    vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
 | 
			
		||||
    vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));
 | 
			
		||||
    if (vpx_codec_control(&codec, VP9E_SET_SVC, layering_mode > 0 ? 1: 0))
 | 
			
		||||
      die_codec(&codec, "Failed to set SVC");
 | 
			
		||||
    for (i = 0; i < cfg.ts_number_layers; ++i) {
 | 
			
		||||
      svc_params.max_quantizers[i] = cfg.rc_max_quantizer;
 | 
			
		||||
      svc_params.min_quantizers[i] = cfg.rc_min_quantizer;
 | 
			
		||||
    }
 | 
			
		||||
    svc_params.scaling_factor_num[0] = cfg.g_h;
 | 
			
		||||
    svc_params.scaling_factor_den[0] = cfg.g_h;
 | 
			
		||||
    vpx_codec_control(&codec, VP9E_SET_SVC_PARAMETERS, &svc_params);
 | 
			
		||||
  }
 | 
			
		||||
  if (strncmp(encoder->name, "vp8", 3) == 0) {
 | 
			
		||||
    vpx_codec_control(&codec, VP8E_SET_SCREEN_CONTENT_MODE, 0);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										223
									
								
								libs.mk
									
									
									
									
									
								
							
							
						
						
									
										223
									
								
								libs.mk
									
									
									
									
									
								
							@@ -25,7 +25,7 @@ $$(BUILD_PFX)$(1).h: $$(SRC_PATH_BARE)/$(2)
 | 
			
		||||
	@echo "    [CREATE] $$@"
 | 
			
		||||
	$$(qexec)$$(SRC_PATH_BARE)/build/make/rtcd.pl --arch=$$(TGT_ISA) \
 | 
			
		||||
          --sym=$(1) \
 | 
			
		||||
          --config=$$(CONFIG_DIR)$$(target)$$(if $$(FAT_ARCHS),,-$$(TOOLCHAIN)).mk \
 | 
			
		||||
          --config=$$(CONFIG_DIR)$$(target)-$$(TOOLCHAIN).mk \
 | 
			
		||||
          $$(RTCD_OPTIONS) $$^ > $$@
 | 
			
		||||
CLEAN-OBJS += $$(BUILD_PFX)$(1).h
 | 
			
		||||
RTCD += $$(BUILD_PFX)$(1).h
 | 
			
		||||
@@ -34,13 +34,6 @@ endef
 | 
			
		||||
CODEC_SRCS-yes += CHANGELOG
 | 
			
		||||
CODEC_SRCS-yes += libs.mk
 | 
			
		||||
 | 
			
		||||
# If this is a universal (fat) binary, then all the subarchitectures have
 | 
			
		||||
# already been built and our job is to stitch them together. The
 | 
			
		||||
# BUILD_LIBVPX variable indicates whether we should be building
 | 
			
		||||
# (compiling, linking) the library. The LIPO_LIBVPX variable indicates
 | 
			
		||||
# that we're stitching.
 | 
			
		||||
$(eval $(if $(filter universal%,$(TOOLCHAIN)),LIPO_LIBVPX,BUILD_LIBVPX):=yes)
 | 
			
		||||
 | 
			
		||||
include $(SRC_PATH_BARE)/vpx/vpx_codec.mk
 | 
			
		||||
CODEC_SRCS-yes += $(addprefix vpx/,$(call enabled,API_SRCS))
 | 
			
		||||
CODEC_DOC_SRCS += $(addprefix vpx/,$(call enabled,API_DOC_SRCS))
 | 
			
		||||
@@ -54,7 +47,13 @@ CODEC_SRCS-yes += $(addprefix vpx_scale/,$(call enabled,SCALE_SRCS))
 | 
			
		||||
include $(SRC_PATH_BARE)/vpx_ports/vpx_ports.mk
 | 
			
		||||
CODEC_SRCS-yes += $(addprefix vpx_ports/,$(call enabled,PORTS_SRCS))
 | 
			
		||||
 | 
			
		||||
ifneq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),)
 | 
			
		||||
include $(SRC_PATH_BARE)/vpx_dsp/vpx_dsp.mk
 | 
			
		||||
CODEC_SRCS-yes += $(addprefix vpx_dsp/,$(call enabled,DSP_SRCS))
 | 
			
		||||
 | 
			
		||||
include $(SRC_PATH_BARE)/vpx_util/vpx_util.mk
 | 
			
		||||
CODEC_SRCS-yes += $(addprefix vpx_util/,$(call enabled,UTIL_SRCS))
 | 
			
		||||
 | 
			
		||||
ifeq ($(CONFIG_VP8),yes)
 | 
			
		||||
  VP8_PREFIX=vp8/
 | 
			
		||||
  include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8_common.mk
 | 
			
		||||
endif
 | 
			
		||||
@@ -77,7 +76,7 @@ ifeq ($(CONFIG_VP8_DECODER),yes)
 | 
			
		||||
  CODEC_DOC_SECTIONS += vp8 vp8_decoder
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifneq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),)
 | 
			
		||||
ifeq ($(CONFIG_VP9),yes)
 | 
			
		||||
  VP9_PREFIX=vp9/
 | 
			
		||||
  include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9_common.mk
 | 
			
		||||
endif
 | 
			
		||||
@@ -110,6 +109,40 @@ endif
 | 
			
		||||
VP9_PREFIX=vp9/
 | 
			
		||||
$(BUILD_PFX)$(VP9_PREFIX)%.c.o: CFLAGS += -Wextra
 | 
			
		||||
 | 
			
		||||
#  VP10 make file
 | 
			
		||||
ifeq ($(CONFIG_VP10),yes)
 | 
			
		||||
  VP10_PREFIX=vp10/
 | 
			
		||||
  include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10_common.mk
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(CONFIG_VP10_ENCODER),yes)
 | 
			
		||||
  VP10_PREFIX=vp10/
 | 
			
		||||
  include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10cx.mk
 | 
			
		||||
  CODEC_SRCS-yes += $(addprefix $(VP10_PREFIX),$(call enabled,VP10_CX_SRCS))
 | 
			
		||||
  CODEC_EXPORTS-yes += $(addprefix $(VP10_PREFIX),$(VP10_CX_EXPORTS))
 | 
			
		||||
  CODEC_SRCS-yes += $(VP10_PREFIX)vp10cx.mk vpx/vp8.h vpx/vp8cx.h
 | 
			
		||||
  INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
 | 
			
		||||
  INSTALL-LIBS-$(CONFIG_SPATIAL_SVC) += include/vpx/svc_context.h
 | 
			
		||||
  INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
 | 
			
		||||
  CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8cx.h
 | 
			
		||||
  CODEC_DOC_SECTIONS += vp9 vp9_encoder
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(CONFIG_VP10_DECODER),yes)
 | 
			
		||||
  VP10_PREFIX=vp10/
 | 
			
		||||
  include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10dx.mk
 | 
			
		||||
  CODEC_SRCS-yes += $(addprefix $(VP10_PREFIX),$(call enabled,VP10_DX_SRCS))
 | 
			
		||||
  CODEC_EXPORTS-yes += $(addprefix $(VP10_PREFIX),$(VP10_DX_EXPORTS))
 | 
			
		||||
  CODEC_SRCS-yes += $(VP10_PREFIX)vp10dx.mk vpx/vp8.h vpx/vp8dx.h
 | 
			
		||||
  INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8dx.h
 | 
			
		||||
  INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
 | 
			
		||||
  CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8dx.h
 | 
			
		||||
  CODEC_DOC_SECTIONS += vp9 vp9_decoder
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
VP10_PREFIX=vp10/
 | 
			
		||||
$(BUILD_PFX)$(VP10_PREFIX)%.c.o: CFLAGS += -Wextra
 | 
			
		||||
 | 
			
		||||
ifeq ($(CONFIG_ENCODERS),yes)
 | 
			
		||||
  CODEC_DOC_SECTIONS += encoder
 | 
			
		||||
endif
 | 
			
		||||
@@ -137,18 +170,18 @@ INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/%  $(p)/Release/%)
 | 
			
		||||
INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/%  $(p)/Debug/%)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
CODEC_SRCS-$(BUILD_LIBVPX) += build/make/version.sh
 | 
			
		||||
CODEC_SRCS-$(BUILD_LIBVPX) += build/make/rtcd.pl
 | 
			
		||||
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/emmintrin_compat.h
 | 
			
		||||
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/mem_ops.h
 | 
			
		||||
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/mem_ops_aligned.h
 | 
			
		||||
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/vpx_once.h
 | 
			
		||||
CODEC_SRCS-$(BUILD_LIBVPX) += $(BUILD_PFX)vpx_config.c
 | 
			
		||||
CODEC_SRCS-yes += build/make/version.sh
 | 
			
		||||
CODEC_SRCS-yes += build/make/rtcd.pl
 | 
			
		||||
CODEC_SRCS-yes += vpx_ports/emmintrin_compat.h
 | 
			
		||||
CODEC_SRCS-yes += vpx_ports/mem_ops.h
 | 
			
		||||
CODEC_SRCS-yes += vpx_ports/mem_ops_aligned.h
 | 
			
		||||
CODEC_SRCS-yes += vpx_ports/vpx_once.h
 | 
			
		||||
CODEC_SRCS-yes += $(BUILD_PFX)vpx_config.c
 | 
			
		||||
INSTALL-SRCS-no += $(BUILD_PFX)vpx_config.c
 | 
			
		||||
ifeq ($(ARCH_X86)$(ARCH_X86_64),yes)
 | 
			
		||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm
 | 
			
		||||
endif
 | 
			
		||||
CODEC_EXPORTS-$(BUILD_LIBVPX) += vpx/exports_com
 | 
			
		||||
CODEC_EXPORTS-yes += vpx/exports_com
 | 
			
		||||
CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
 | 
			
		||||
CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
 | 
			
		||||
 | 
			
		||||
@@ -215,7 +248,7 @@ vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def
 | 
			
		||||
            $(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) \
 | 
			
		||||
            --src-path-bare="$(SRC_PATH_BARE)" \
 | 
			
		||||
 | 
			
		||||
PROJECTS-$(BUILD_LIBVPX) += vpx.$(VCPROJ_SFX)
 | 
			
		||||
PROJECTS-yes += vpx.$(VCPROJ_SFX)
 | 
			
		||||
 | 
			
		||||
vpx.$(VCPROJ_SFX): vpx_config.asm
 | 
			
		||||
vpx.$(VCPROJ_SFX): $(RTCD)
 | 
			
		||||
@@ -223,32 +256,42 @@ vpx.$(VCPROJ_SFX): $(RTCD)
 | 
			
		||||
endif
 | 
			
		||||
else
 | 
			
		||||
LIBVPX_OBJS=$(call objs,$(CODEC_SRCS))
 | 
			
		||||
OBJS-$(BUILD_LIBVPX) += $(LIBVPX_OBJS)
 | 
			
		||||
LIBS-$(if $(BUILD_LIBVPX),$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
 | 
			
		||||
OBJS-yes += $(LIBVPX_OBJS)
 | 
			
		||||
LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
 | 
			
		||||
$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
BUILD_LIBVPX_SO         := $(if $(BUILD_LIBVPX),$(CONFIG_SHARED))
 | 
			
		||||
 | 
			
		||||
SO_VERSION_MAJOR := 2
 | 
			
		||||
SO_VERSION_MINOR := 0
 | 
			
		||||
SO_VERSION_PATCH := 0
 | 
			
		||||
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
 | 
			
		||||
LIBVPX_SO               := libvpx.$(VERSION_MAJOR).dylib
 | 
			
		||||
LIBVPX_SO               := libvpx.$(SO_VERSION_MAJOR).dylib
 | 
			
		||||
SHARED_LIB_SUF          := .dylib
 | 
			
		||||
EXPORT_FILE             := libvpx.syms
 | 
			
		||||
LIBVPX_SO_SYMLINKS      := $(addprefix $(LIBSUBDIR)/, \
 | 
			
		||||
                             libvpx.dylib  )
 | 
			
		||||
else
 | 
			
		||||
LIBVPX_SO               := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
 | 
			
		||||
ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS))
 | 
			
		||||
LIBVPX_SO               := libvpx$(SO_VERSION_MAJOR).dll
 | 
			
		||||
SHARED_LIB_SUF          := _dll.a
 | 
			
		||||
EXPORT_FILE             := libvpx.def
 | 
			
		||||
LIBVPX_SO_SYMLINKS      :=
 | 
			
		||||
LIBVPX_SO_IMPLIB        := libvpx_dll.a
 | 
			
		||||
else
 | 
			
		||||
LIBVPX_SO               := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH)
 | 
			
		||||
SHARED_LIB_SUF          := .so
 | 
			
		||||
EXPORT_FILE             := libvpx.ver
 | 
			
		||||
SYM_LINK                := libvpx.so
 | 
			
		||||
LIBVPX_SO_SYMLINKS      := $(addprefix $(LIBSUBDIR)/, \
 | 
			
		||||
                             libvpx.so libvpx.so.$(VERSION_MAJOR) \
 | 
			
		||||
                             libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR))
 | 
			
		||||
                             libvpx.so libvpx.so.$(SO_VERSION_MAJOR) \
 | 
			
		||||
                             libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR))
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)\
 | 
			
		||||
                           $(notdir $(LIBVPX_SO_SYMLINKS))
 | 
			
		||||
LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\
 | 
			
		||||
                           $(notdir $(LIBVPX_SO_SYMLINKS)) \
 | 
			
		||||
                           $(if $(LIBVPX_SO_IMPLIB), $(BUILD_PFX)$(LIBVPX_SO_IMPLIB))
 | 
			
		||||
$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE)
 | 
			
		||||
$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
 | 
			
		||||
$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR)
 | 
			
		||||
$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR)
 | 
			
		||||
$(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE)
 | 
			
		||||
 | 
			
		||||
libvpx.ver: $(call enabled,CODEC_EXPORTS)
 | 
			
		||||
@@ -263,6 +306,19 @@ libvpx.syms: $(call enabled,CODEC_EXPORTS)
 | 
			
		||||
	$(qexec)awk '{print "_"$$2}' $^ >$@
 | 
			
		||||
CLEAN-OBJS += libvpx.syms
 | 
			
		||||
 | 
			
		||||
libvpx.def: $(call enabled,CODEC_EXPORTS)
 | 
			
		||||
	@echo "    [CREATE] $@"
 | 
			
		||||
	$(qexec)echo LIBRARY $(LIBVPX_SO:.dll=) INITINSTANCE TERMINSTANCE > $@
 | 
			
		||||
	$(qexec)echo "DATA MULTIPLE NONSHARED" >> $@
 | 
			
		||||
	$(qexec)echo "EXPORTS" >> $@
 | 
			
		||||
	$(qexec)awk '!/vpx_svc_*/ {print "_"$$2}' $^ >>$@
 | 
			
		||||
CLEAN-OBJS += libvpx.def
 | 
			
		||||
 | 
			
		||||
libvpx_dll.a: $(LIBVPX_SO)
 | 
			
		||||
	@echo "    [IMPLIB] $@"
 | 
			
		||||
	$(qexec)emximp -o $@ $<
 | 
			
		||||
CLEAN-OBJS += libvpx_dll.a
 | 
			
		||||
 | 
			
		||||
define libvpx_symlink_template
 | 
			
		||||
$(1): $(2)
 | 
			
		||||
	@echo "    [LN]     $(2) $$@"
 | 
			
		||||
@@ -278,11 +334,12 @@ $(eval $(call libvpx_symlink_template,\
 | 
			
		||||
    $(LIBVPX_SO)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
INSTALL-LIBS-$(BUILD_LIBVPX_SO) += $(LIBVPX_SO_SYMLINKS)
 | 
			
		||||
INSTALL-LIBS-$(BUILD_LIBVPX_SO) += $(LIBSUBDIR)/$(LIBVPX_SO)
 | 
			
		||||
INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)
 | 
			
		||||
INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO)
 | 
			
		||||
INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBVPX_SO_IMPLIB),$(LIBSUBDIR)/$(LIBVPX_SO_IMPLIB))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
LIBS-$(BUILD_LIBVPX) += vpx.pc
 | 
			
		||||
LIBS-yes += vpx.pc
 | 
			
		||||
vpx.pc: config.mk libs.mk
 | 
			
		||||
	@echo "    [CREATE] $@"
 | 
			
		||||
	$(qexec)echo '# pkg-config file from libvpx $(VERSION_STRING)' > $@
 | 
			
		||||
@@ -308,9 +365,6 @@ INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc
 | 
			
		||||
CLEAN-OBJS += vpx.pc
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
LIBS-$(LIPO_LIBVPX) += libvpx.a
 | 
			
		||||
$(eval $(if $(LIPO_LIBVPX),$(call lipo_lib_template,libvpx.a)))
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Rule to make assembler configuration file from C configuration file
 | 
			
		||||
#
 | 
			
		||||
@@ -349,11 +403,15 @@ LIBVPX_TEST_DATA_PATH ?= .
 | 
			
		||||
 | 
			
		||||
include $(SRC_PATH_BARE)/test/test.mk
 | 
			
		||||
LIBVPX_TEST_SRCS=$(addprefix test/,$(call enabled,LIBVPX_TEST_SRCS))
 | 
			
		||||
LIBVPX_TEST_BINS=./test_libvpx$(EXE_SFX)
 | 
			
		||||
LIBVPX_TEST_BIN=./test_libvpx$(EXE_SFX)
 | 
			
		||||
LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\
 | 
			
		||||
                     $(call enabled,LIBVPX_TEST_DATA))
 | 
			
		||||
libvpx_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1)
 | 
			
		||||
 | 
			
		||||
TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX)
 | 
			
		||||
TEST_INTRA_PRED_SPEED_SRCS=$(addprefix test/,$(call enabled,TEST_INTRA_PRED_SPEED_SRCS))
 | 
			
		||||
TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS)))
 | 
			
		||||
 | 
			
		||||
libvpx_test_srcs.txt:
 | 
			
		||||
	@echo "    [CREATE] $@"
 | 
			
		||||
	@echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
 | 
			
		||||
@@ -417,7 +475,25 @@ test_libvpx.$(VCPROJ_SFX): $(LIBVPX_TEST_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_
 | 
			
		||||
 | 
			
		||||
PROJECTS-$(CONFIG_MSVS) += test_libvpx.$(VCPROJ_SFX)
 | 
			
		||||
 | 
			
		||||
LIBVPX_TEST_BINS := $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBVPX_TEST_BINS)))
 | 
			
		||||
LIBVPX_TEST_BIN := $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBVPX_TEST_BIN)))
 | 
			
		||||
 | 
			
		||||
ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),)
 | 
			
		||||
PROJECTS-$(CONFIG_MSVS) += test_intra_pred_speed.$(VCPROJ_SFX)
 | 
			
		||||
test_intra_pred_speed.$(VCPROJ_SFX): $(TEST_INTRA_PRED_SPEED_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX)
 | 
			
		||||
	@echo "    [CREATE] $@"
 | 
			
		||||
	$(qexec)$(GEN_VCPROJ) \
 | 
			
		||||
            --exe \
 | 
			
		||||
            --target=$(TOOLCHAIN) \
 | 
			
		||||
            --name=test_intra_pred_speed \
 | 
			
		||||
            -D_VARIADIC_MAX=10 \
 | 
			
		||||
            --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \
 | 
			
		||||
            --ver=$(CONFIG_VS_VERSION) \
 | 
			
		||||
            --src-path-bare="$(SRC_PATH_BARE)" \
 | 
			
		||||
            $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
 | 
			
		||||
            --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
 | 
			
		||||
            -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
 | 
			
		||||
            -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^
 | 
			
		||||
endif  # TEST_INTRA_PRED_SPEED
 | 
			
		||||
endif
 | 
			
		||||
else
 | 
			
		||||
 | 
			
		||||
@@ -428,45 +504,54 @@ ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS))
 | 
			
		||||
# Disabling pthreads globally will cause issues on darwin and possibly elsewhere
 | 
			
		||||
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0
 | 
			
		||||
endif
 | 
			
		||||
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src
 | 
			
		||||
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src/include
 | 
			
		||||
OBJS-$(BUILD_LIBVPX) += $(GTEST_OBJS)
 | 
			
		||||
LIBS-$(BUILD_LIBVPX) += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a
 | 
			
		||||
GTEST_INCLUDES := -I$(SRC_PATH_BARE)/third_party/googletest/src
 | 
			
		||||
GTEST_INCLUDES += -I$(SRC_PATH_BARE)/third_party/googletest/src/include
 | 
			
		||||
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
 | 
			
		||||
OBJS-yes += $(GTEST_OBJS)
 | 
			
		||||
LIBS-yes += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a
 | 
			
		||||
$(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS)
 | 
			
		||||
 | 
			
		||||
LIBVPX_TEST_OBJS=$(sort $(call objs,$(LIBVPX_TEST_SRCS)))
 | 
			
		||||
$(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src
 | 
			
		||||
$(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src/include
 | 
			
		||||
OBJS-$(BUILD_LIBVPX) += $(LIBVPX_TEST_OBJS)
 | 
			
		||||
BINS-$(BUILD_LIBVPX) += $(LIBVPX_TEST_BINS)
 | 
			
		||||
$(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
 | 
			
		||||
OBJS-yes += $(LIBVPX_TEST_OBJS)
 | 
			
		||||
BINS-yes += $(LIBVPX_TEST_BIN)
 | 
			
		||||
 | 
			
		||||
CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
 | 
			
		||||
CODEC_LIB_SUF=$(if $(CONFIG_SHARED),.so,.a)
 | 
			
		||||
$(foreach bin,$(LIBVPX_TEST_BINS),\
 | 
			
		||||
    $(if $(BUILD_LIBVPX),$(eval $(bin): \
 | 
			
		||||
        lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a ))\
 | 
			
		||||
    $(if $(BUILD_LIBVPX),$(eval $(call linkerxx_template,$(bin),\
 | 
			
		||||
        $(LIBVPX_TEST_OBJS) \
 | 
			
		||||
        -L. -lvpx -lgtest $(extralibs) -lm)\
 | 
			
		||||
        )))\
 | 
			
		||||
    $(if $(LIPO_LIBS),$(eval $(call lipo_bin_template,$(bin))))\
 | 
			
		||||
CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
 | 
			
		||||
TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a
 | 
			
		||||
$(LIBVPX_TEST_BIN): $(TEST_LIBS)
 | 
			
		||||
$(eval $(call linkerxx_template,$(LIBVPX_TEST_BIN), \
 | 
			
		||||
              $(LIBVPX_TEST_OBJS) \
 | 
			
		||||
              -L. -lvpx -lgtest $(extralibs) -lm))
 | 
			
		||||
 | 
			
		||||
endif
 | 
			
		||||
ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),)
 | 
			
		||||
$(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
 | 
			
		||||
OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS)
 | 
			
		||||
BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN)
 | 
			
		||||
 | 
			
		||||
$(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS)
 | 
			
		||||
$(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \
 | 
			
		||||
              $(TEST_INTRA_PRED_SPEED_OBJS) \
 | 
			
		||||
              -L. -lvpx -lgtest $(extralibs) -lm))
 | 
			
		||||
endif  # TEST_INTRA_PRED_SPEED
 | 
			
		||||
 | 
			
		||||
endif  # CONFIG_UNIT_TESTS
 | 
			
		||||
 | 
			
		||||
# Install test sources only if codec source is included
 | 
			
		||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\
 | 
			
		||||
    $(shell find $(SRC_PATH_BARE)/third_party/googletest -type f))
 | 
			
		||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBVPX_TEST_SRCS)
 | 
			
		||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS)
 | 
			
		||||
 | 
			
		||||
define test_shard_template
 | 
			
		||||
test:: test_shard.$(1)
 | 
			
		||||
test_shard.$(1): $(LIBVPX_TEST_BINS) testdata
 | 
			
		||||
test-no-data-check:: test_shard_ndc.$(1)
 | 
			
		||||
test_shard.$(1) test_shard_ndc.$(1): $(LIBVPX_TEST_BIN)
 | 
			
		||||
	@set -e; \
 | 
			
		||||
	 for t in $(LIBVPX_TEST_BINS); do \
 | 
			
		||||
	   export GTEST_SHARD_INDEX=$(1); \
 | 
			
		||||
	   export GTEST_TOTAL_SHARDS=$(2); \
 | 
			
		||||
	   $$$$t; \
 | 
			
		||||
	 done
 | 
			
		||||
	 export GTEST_SHARD_INDEX=$(1); \
 | 
			
		||||
	 export GTEST_TOTAL_SHARDS=$(2); \
 | 
			
		||||
	 $(LIBVPX_TEST_BIN)
 | 
			
		||||
test_shard.$(1): testdata
 | 
			
		||||
.PHONY: test_shard.$(1)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
@@ -511,15 +596,16 @@ ifeq ($(CONFIG_MSVS),yes)
 | 
			
		||||
# TODO(tomfinegan): Support running the debug versions of tools?
 | 
			
		||||
TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH))
 | 
			
		||||
endif
 | 
			
		||||
utiltest: testdata
 | 
			
		||||
utiltest utiltest-no-data-check:
 | 
			
		||||
	$(qexec)$(SRC_PATH_BARE)/test/vpxdec.sh \
 | 
			
		||||
		--test-data-path $(LIBVPX_TEST_DATA_PATH) \
 | 
			
		||||
		--bin-path $(TEST_BIN_PATH)
 | 
			
		||||
	$(qexec)$(SRC_PATH_BARE)/test/vpxenc.sh \
 | 
			
		||||
		--test-data-path $(LIBVPX_TEST_DATA_PATH) \
 | 
			
		||||
		--bin-path $(TEST_BIN_PATH)
 | 
			
		||||
utiltest: testdata
 | 
			
		||||
else
 | 
			
		||||
utiltest:
 | 
			
		||||
utiltest utiltest-no-data-check:
 | 
			
		||||
	@echo Unit tests must be enabled to make the utiltest target.
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
@@ -537,11 +623,12 @@ ifeq ($(CONFIG_MSVS),yes)
 | 
			
		||||
# TODO(tomfinegan): Support running the debug versions of tools?
 | 
			
		||||
EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
 | 
			
		||||
endif
 | 
			
		||||
exampletest: examples testdata
 | 
			
		||||
exampletest exampletest-no-data-check: examples
 | 
			
		||||
	$(qexec)$(SRC_PATH_BARE)/test/examples.sh \
 | 
			
		||||
		--test-data-path $(LIBVPX_TEST_DATA_PATH) \
 | 
			
		||||
		--bin-path $(EXAMPLES_BIN_PATH)
 | 
			
		||||
exampletest: testdata
 | 
			
		||||
else
 | 
			
		||||
exampletest:
 | 
			
		||||
exampletest exampletest-no-data-check:
 | 
			
		||||
	@echo Unit tests must be enabled to make the exampletest target.
 | 
			
		||||
endif
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
 | 
			
		||||
#include "md5_utils.h"
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
byteSwap(UWORD32 *buf, unsigned words) {
 | 
			
		||||
  md5byte *p;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -88,6 +88,9 @@ void update_rate_histogram(struct rate_hist *hist,
 | 
			
		||||
  if (now < cfg->rc_buf_initial_sz)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  if (!cfg->rc_target_bitrate)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  then = now;
 | 
			
		||||
 | 
			
		||||
  /* Sum the size over the past rc_buf_sz ms */
 | 
			
		||||
 
 | 
			
		||||
@@ -40,9 +40,17 @@ include $(CLEAR_VARS)
 | 
			
		||||
LOCAL_ARM_MODE := arm
 | 
			
		||||
LOCAL_MODULE := libvpx_test
 | 
			
		||||
LOCAL_STATIC_LIBRARIES := gtest libwebm
 | 
			
		||||
LOCAL_SHARED_LIBRARIES := vpx
 | 
			
		||||
 | 
			
		||||
ifeq ($(ENABLE_SHARED),1)
 | 
			
		||||
  LOCAL_SHARED_LIBRARIES := vpx
 | 
			
		||||
else
 | 
			
		||||
  LOCAL_STATIC_LIBRARIES += vpx
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
include $(LOCAL_PATH)/test/test.mk
 | 
			
		||||
LOCAL_C_INCLUDES := $(BINDINGS_DIR)
 | 
			
		||||
FILTERED_SRC := $(sort $(filter %.cc %.c, $(LIBVPX_TEST_SRCS-yes)))
 | 
			
		||||
LOCAL_SRC_FILES := $(addprefix ./test/, $(FILTERED_SRC))
 | 
			
		||||
# some test files depend on *_rtcd.h, ensure they're generated first.
 | 
			
		||||
$(eval $(call rtcd_dep_template))
 | 
			
		||||
include $(BUILD_EXECUTABLE)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										229
									
								
								test/blockiness_test.cc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										229
									
								
								test/blockiness_test.cc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,229 @@
 | 
			
		||||
/*
 | 
			
		||||
 *  Copyright (c) 2012 The WebM project authors. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 *  Use of this source code is governed by a BSD-style license
 | 
			
		||||
 *  that can be found in the LICENSE file in the root of the source
 | 
			
		||||
 *  tree. An additional intellectual property rights grant can be found
 | 
			
		||||
 *  in the file PATENTS.  All contributing project authors may
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern "C"
 | 
			
		||||
double vp9_get_blockiness(const unsigned char *img1, int img1_pitch,
 | 
			
		||||
                          const unsigned char *img2, int img2_pitch,
 | 
			
		||||
                          int width, int height);
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
class BlockinessTestBase : public ::testing::Test {
 | 
			
		||||
 public:
 | 
			
		||||
  BlockinessTestBase(int width, int height) : width_(width), height_(height) {}
 | 
			
		||||
 | 
			
		||||
  static void SetUpTestCase() {
 | 
			
		||||
    source_data_ = reinterpret_cast<uint8_t*>(
 | 
			
		||||
        vpx_memalign(kDataAlignment, kDataBufferSize));
 | 
			
		||||
    reference_data_ = reinterpret_cast<uint8_t*>(
 | 
			
		||||
        vpx_memalign(kDataAlignment, kDataBufferSize));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  static void TearDownTestCase() {
 | 
			
		||||
    vpx_free(source_data_);
 | 
			
		||||
    source_data_ = NULL;
 | 
			
		||||
    vpx_free(reference_data_);
 | 
			
		||||
    reference_data_ = NULL;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual void TearDown() {
 | 
			
		||||
    libvpx_test::ClearSystemState();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  // Handle frames up to 640x480
 | 
			
		||||
  static const int kDataAlignment = 16;
 | 
			
		||||
  static const int kDataBufferSize = 640*480;
 | 
			
		||||
 | 
			
		||||
  virtual void SetUp() {
 | 
			
		||||
    source_stride_ = (width_ + 31) & ~31;
 | 
			
		||||
    reference_stride_ = width_ * 2;
 | 
			
		||||
    rnd_.Reset(ACMRandom::DeterministicSeed());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void FillConstant(uint8_t *data, int stride, uint8_t fill_constant,
 | 
			
		||||
                    int width, int height) {
 | 
			
		||||
    for (int h = 0; h < height; ++h) {
 | 
			
		||||
      for (int w = 0; w < width; ++w) {
 | 
			
		||||
        data[h * stride + w] = fill_constant;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void FillConstant(uint8_t *data, int stride, uint8_t fill_constant) {
 | 
			
		||||
    FillConstant(data, stride, fill_constant, width_, height_);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void FillRandom(uint8_t *data, int stride, int width, int height) {
 | 
			
		||||
    for (int h = 0; h < height; ++h) {
 | 
			
		||||
      for (int w = 0; w < width; ++w) {
 | 
			
		||||
        data[h * stride + w] = rnd_.Rand8();
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void FillRandom(uint8_t *data, int stride) {
 | 
			
		||||
    FillRandom(data, stride, width_, height_);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void FillRandomBlocky(uint8_t *data, int stride) {
 | 
			
		||||
    for (int h = 0; h < height_; h += 4) {
 | 
			
		||||
      for (int w = 0; w < width_; w += 4) {
 | 
			
		||||
        FillRandom(data + h * stride + w, stride, 4, 4);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void FillCheckerboard(uint8_t *data, int stride) {
 | 
			
		||||
    for (int h = 0; h < height_; h += 4) {
 | 
			
		||||
      for (int w = 0; w < width_; w += 4) {
 | 
			
		||||
        if (((h/4) ^ (w/4)) & 1)
 | 
			
		||||
          FillConstant(data + h * stride + w, stride, 255, 4, 4);
 | 
			
		||||
        else
 | 
			
		||||
          FillConstant(data + h * stride + w, stride, 0, 4, 4);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void Blur(uint8_t *data, int stride, int taps) {
 | 
			
		||||
    int sum = 0;
 | 
			
		||||
    int half_taps = taps / 2;
 | 
			
		||||
    for (int h = 0; h < height_; ++h) {
 | 
			
		||||
      for (int w = 0; w < taps; ++w) {
 | 
			
		||||
        sum += data[w + h * stride];
 | 
			
		||||
      }
 | 
			
		||||
      for (int w = taps; w < width_; ++w) {
 | 
			
		||||
        sum += data[w + h * stride] - data[w - taps + h * stride];
 | 
			
		||||
        data[w - half_taps + h * stride] = (sum + half_taps) / taps;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    for (int w = 0; w < width_; ++w) {
 | 
			
		||||
      for (int h = 0; h < taps; ++h) {
 | 
			
		||||
        sum += data[h + w * stride];
 | 
			
		||||
      }
 | 
			
		||||
      for (int h = taps; h < height_; ++h) {
 | 
			
		||||
        sum += data[w + h * stride] - data[(h - taps) * stride + w];
 | 
			
		||||
        data[(h - half_taps) * stride + w] = (sum + half_taps) / taps;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  int width_, height_;
 | 
			
		||||
  static uint8_t* source_data_;
 | 
			
		||||
  int source_stride_;
 | 
			
		||||
  static uint8_t* reference_data_;
 | 
			
		||||
  int reference_stride_;
 | 
			
		||||
 | 
			
		||||
  ACMRandom rnd_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
typedef std::tr1::tuple<int, int> BlockinessParam;
 | 
			
		||||
class BlockinessVP9Test
 | 
			
		||||
    : public BlockinessTestBase,
 | 
			
		||||
      public ::testing::WithParamInterface<BlockinessParam> {
 | 
			
		||||
 public:
 | 
			
		||||
  BlockinessVP9Test() : BlockinessTestBase(GET_PARAM(0), GET_PARAM(1)) {}
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  int CheckBlockiness() {
 | 
			
		||||
    return vp9_get_blockiness(source_data_, source_stride_,
 | 
			
		||||
                              reference_data_, reference_stride_,
 | 
			
		||||
                              width_, height_);
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
#endif  // CONFIG_VP9_ENCODER
 | 
			
		||||
 | 
			
		||||
uint8_t* BlockinessTestBase::source_data_ = NULL;
 | 
			
		||||
uint8_t* BlockinessTestBase::reference_data_ = NULL;
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
TEST_P(BlockinessVP9Test, SourceBlockierThanReference) {
 | 
			
		||||
  // Source is blockier than reference.
 | 
			
		||||
  FillRandomBlocky(source_data_, source_stride_);
 | 
			
		||||
  FillConstant(reference_data_, reference_stride_, 128);
 | 
			
		||||
  int super_blocky = CheckBlockiness();
 | 
			
		||||
 | 
			
		||||
  EXPECT_EQ(0, super_blocky) << "Blocky source should produce 0 blockiness.";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(BlockinessVP9Test, ReferenceBlockierThanSource) {
 | 
			
		||||
  // Source is blockier than reference.
 | 
			
		||||
  FillConstant(source_data_, source_stride_, 128);
 | 
			
		||||
  FillRandomBlocky(reference_data_, reference_stride_);
 | 
			
		||||
  int super_blocky = CheckBlockiness();
 | 
			
		||||
 | 
			
		||||
  EXPECT_GT(super_blocky, 0.0)
 | 
			
		||||
      << "Blocky reference should score high for blockiness.";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(BlockinessVP9Test, BlurringDecreasesBlockiness) {
 | 
			
		||||
  // Source is blockier than reference.
 | 
			
		||||
  FillConstant(source_data_, source_stride_, 128);
 | 
			
		||||
  FillRandomBlocky(reference_data_, reference_stride_);
 | 
			
		||||
  int super_blocky = CheckBlockiness();
 | 
			
		||||
 | 
			
		||||
  Blur(reference_data_, reference_stride_, 4);
 | 
			
		||||
  int less_blocky = CheckBlockiness();
 | 
			
		||||
 | 
			
		||||
  EXPECT_GT(super_blocky, less_blocky)
 | 
			
		||||
      << "A straight blur should decrease blockiness.";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(BlockinessVP9Test, WorstCaseBlockiness) {
 | 
			
		||||
  // Source is blockier than reference.
 | 
			
		||||
  FillConstant(source_data_, source_stride_, 128);
 | 
			
		||||
  FillCheckerboard(reference_data_, reference_stride_);
 | 
			
		||||
 | 
			
		||||
  int super_blocky = CheckBlockiness();
 | 
			
		||||
 | 
			
		||||
  Blur(reference_data_, reference_stride_, 4);
 | 
			
		||||
  int less_blocky = CheckBlockiness();
 | 
			
		||||
 | 
			
		||||
  EXPECT_GT(super_blocky, less_blocky)
 | 
			
		||||
      << "A straight blur should decrease blockiness.";
 | 
			
		||||
}
 | 
			
		||||
#endif  // CONFIG_VP9_ENCODER
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using std::tr1::make_tuple;
 | 
			
		||||
 | 
			
		||||
//------------------------------------------------------------------------------
 | 
			
		||||
// C functions
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
const BlockinessParam c_vp9_tests[] = {
 | 
			
		||||
  make_tuple(320, 240),
 | 
			
		||||
  make_tuple(318, 242),
 | 
			
		||||
  make_tuple(318, 238),
 | 
			
		||||
};
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(C, BlockinessVP9Test, ::testing::ValuesIn(c_vp9_tests));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
@@ -80,4 +80,7 @@ TEST_P(BordersTest, TestLowBitrate) {
 | 
			
		||||
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
 | 
			
		||||
    ::libvpx_test::kTwoPassGood));
 | 
			
		||||
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
 | 
			
		||||
    ::libvpx_test::kTwoPassGood));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -13,10 +13,10 @@
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "vpx/vpx_decoder.h"
 | 
			
		||||
#include "vpx/vpx_encoder.h"
 | 
			
		||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
 | 
			
		||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
 | 
			
		||||
#include "vpx/vp8cx.h"
 | 
			
		||||
#endif
 | 
			
		||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
 | 
			
		||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER || CONFIG_VP10_DECODER
 | 
			
		||||
#include "vpx/vp8dx.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -233,6 +233,8 @@ class VP9CodecFactory : public CodecFactory {
 | 
			
		||||
                                               int usage) const {
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
    return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage);
 | 
			
		||||
#elif CONFIG_VP10_ENCODER
 | 
			
		||||
    return vpx_codec_enc_config_default(&vpx_codec_vp10_cx_algo, cfg, usage);
 | 
			
		||||
#else
 | 
			
		||||
    return VPX_CODEC_INCAPABLE;
 | 
			
		||||
#endif
 | 
			
		||||
@@ -251,7 +253,96 @@ const libvpx_test::VP9CodecFactory kVP9;
 | 
			
		||||
#define VP9_INSTANTIATE_TEST_CASE(test, ...)
 | 
			
		||||
#endif  // CONFIG_VP9
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * VP10 Codec Definitions
 | 
			
		||||
 */
 | 
			
		||||
#if CONFIG_VP10
 | 
			
		||||
class VP10Decoder : public Decoder {
 | 
			
		||||
 public:
 | 
			
		||||
  VP10Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
 | 
			
		||||
      : Decoder(cfg, deadline) {}
 | 
			
		||||
 | 
			
		||||
  VP10Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
 | 
			
		||||
              unsigned long deadline)  // NOLINT
 | 
			
		||||
      : Decoder(cfg, flag, deadline) {}
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  virtual vpx_codec_iface_t* CodecInterface() const {
 | 
			
		||||
#if CONFIG_VP10_DECODER
 | 
			
		||||
    return &vpx_codec_vp10_dx_algo;
 | 
			
		||||
#else
 | 
			
		||||
    return NULL;
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class VP10Encoder : public Encoder {
 | 
			
		||||
 public:
 | 
			
		||||
  VP10Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
 | 
			
		||||
              const unsigned long init_flags, TwopassStatsStore *stats)
 | 
			
		||||
      : Encoder(cfg, deadline, init_flags, stats) {}
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  virtual vpx_codec_iface_t* CodecInterface() const {
 | 
			
		||||
#if CONFIG_VP10_ENCODER
 | 
			
		||||
    return &vpx_codec_vp10_cx_algo;
 | 
			
		||||
#else
 | 
			
		||||
    return NULL;
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class VP10CodecFactory : public CodecFactory {
 | 
			
		||||
 public:
 | 
			
		||||
  VP10CodecFactory() : CodecFactory() {}
 | 
			
		||||
 | 
			
		||||
  virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
 | 
			
		||||
                                 unsigned long deadline) const {
 | 
			
		||||
    return CreateDecoder(cfg, 0, deadline);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
 | 
			
		||||
                                 const vpx_codec_flags_t flags,
 | 
			
		||||
                                 unsigned long deadline) const {  // NOLINT
 | 
			
		||||
#if CONFIG_VP10_DECODER
 | 
			
		||||
    return new VP10Decoder(cfg, flags, deadline);
 | 
			
		||||
#else
 | 
			
		||||
    return NULL;
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
 | 
			
		||||
                                 unsigned long deadline,
 | 
			
		||||
                                 const unsigned long init_flags,
 | 
			
		||||
                                 TwopassStatsStore *stats) const {
 | 
			
		||||
#if CONFIG_VP10_ENCODER
 | 
			
		||||
    return new VP10Encoder(cfg, deadline, init_flags, stats);
 | 
			
		||||
#else
 | 
			
		||||
    return NULL;
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
 | 
			
		||||
                                               int usage) const {
 | 
			
		||||
#if CONFIG_VP10_ENCODER
 | 
			
		||||
    return vpx_codec_enc_config_default(&vpx_codec_vp10_cx_algo, cfg, usage);
 | 
			
		||||
#else
 | 
			
		||||
    return VPX_CODEC_INCAPABLE;
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const libvpx_test::VP10CodecFactory kVP10;
 | 
			
		||||
 | 
			
		||||
#define VP10_INSTANTIATE_TEST_CASE(test, ...)\
 | 
			
		||||
  INSTANTIATE_TEST_CASE_P(VP10, test, \
 | 
			
		||||
      ::testing::Combine( \
 | 
			
		||||
          ::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
 | 
			
		||||
               &libvpx_test::kVP10)), \
 | 
			
		||||
          __VA_ARGS__))
 | 
			
		||||
#else
 | 
			
		||||
#define VP10_INSTANTIATE_TEST_CASE(test, ...)
 | 
			
		||||
#endif  // CONFIG_VP10
 | 
			
		||||
 | 
			
		||||
}  // namespace libvpx_test
 | 
			
		||||
 | 
			
		||||
#endif  // TEST_CODEC_FACTORY_H_
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										224
									
								
								test/consistency_test.cc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										224
									
								
								test/consistency_test.cc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,224 @@
 | 
			
		||||
/*
 | 
			
		||||
 *  Copyright (c) 2012 The WebM project authors. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 *  Use of this source code is governed by a BSD-style license
 | 
			
		||||
 *  that can be found in the LICENSE file in the root of the source
 | 
			
		||||
 *  tree. An additional intellectual property rights grant can be found
 | 
			
		||||
 *  in the file PATENTS.  All contributing project authors may
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "vpx_dsp/ssim.h"
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
 | 
			
		||||
extern "C"
 | 
			
		||||
double vpx_get_ssim_metrics(uint8_t *img1, int img1_pitch,
 | 
			
		||||
                            uint8_t *img2, int img2_pitch,
 | 
			
		||||
                            int width, int height,
 | 
			
		||||
                            Ssimv *sv2, Metrics *m,
 | 
			
		||||
                            int do_inconsistency);
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
class ConsistencyTestBase : public ::testing::Test {
 | 
			
		||||
 public:
 | 
			
		||||
  ConsistencyTestBase(int width, int height) : width_(width), height_(height) {}
 | 
			
		||||
 | 
			
		||||
  static void SetUpTestCase() {
 | 
			
		||||
    source_data_[0] = reinterpret_cast<uint8_t*>(
 | 
			
		||||
        vpx_memalign(kDataAlignment, kDataBufferSize));
 | 
			
		||||
    reference_data_[0] = reinterpret_cast<uint8_t*>(
 | 
			
		||||
        vpx_memalign(kDataAlignment, kDataBufferSize));
 | 
			
		||||
    source_data_[1] = reinterpret_cast<uint8_t*>(
 | 
			
		||||
        vpx_memalign(kDataAlignment, kDataBufferSize));
 | 
			
		||||
    reference_data_[1] = reinterpret_cast<uint8_t*>(
 | 
			
		||||
        vpx_memalign(kDataAlignment, kDataBufferSize));
 | 
			
		||||
    ssim_array_ = new Ssimv[kDataBufferSize / 16];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  static void ClearSsim() {
 | 
			
		||||
    memset(ssim_array_, 0, kDataBufferSize / 16);
 | 
			
		||||
  }
 | 
			
		||||
  static void TearDownTestCase() {
 | 
			
		||||
    vpx_free(source_data_[0]);
 | 
			
		||||
    source_data_[0] = NULL;
 | 
			
		||||
    vpx_free(reference_data_[0]);
 | 
			
		||||
    reference_data_[0] = NULL;
 | 
			
		||||
    vpx_free(source_data_[1]);
 | 
			
		||||
    source_data_[1] = NULL;
 | 
			
		||||
    vpx_free(reference_data_[1]);
 | 
			
		||||
    reference_data_[1] = NULL;
 | 
			
		||||
 | 
			
		||||
    delete[] ssim_array_;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual void TearDown() {
 | 
			
		||||
    libvpx_test::ClearSystemState();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  // Handle frames up to 640x480
 | 
			
		||||
  static const int kDataAlignment = 16;
 | 
			
		||||
  static const int kDataBufferSize = 640*480;
 | 
			
		||||
 | 
			
		||||
  virtual void SetUp() {
 | 
			
		||||
    source_stride_ = (width_ + 31) & ~31;
 | 
			
		||||
    reference_stride_ = width_ * 2;
 | 
			
		||||
    rnd_.Reset(ACMRandom::DeterministicSeed());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void FillRandom(uint8_t *data, int stride, int width, int height) {
 | 
			
		||||
    for (int h = 0; h < height; ++h) {
 | 
			
		||||
      for (int w = 0; w < width; ++w) {
 | 
			
		||||
        data[h * stride + w] = rnd_.Rand8();
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void FillRandom(uint8_t *data, int stride) {
 | 
			
		||||
    FillRandom(data, stride, width_, height_);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void Copy(uint8_t *reference, uint8_t *source) {
 | 
			
		||||
    memcpy(reference, source, kDataBufferSize);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void Blur(uint8_t *data, int stride, int taps) {
 | 
			
		||||
    int sum = 0;
 | 
			
		||||
    int half_taps = taps / 2;
 | 
			
		||||
    for (int h = 0; h < height_; ++h) {
 | 
			
		||||
      for (int w = 0; w < taps; ++w) {
 | 
			
		||||
        sum += data[w + h * stride];
 | 
			
		||||
      }
 | 
			
		||||
      for (int w = taps; w < width_; ++w) {
 | 
			
		||||
        sum += data[w + h * stride] - data[w - taps + h * stride];
 | 
			
		||||
        data[w - half_taps + h * stride] = (sum + half_taps) / taps;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    for (int w = 0; w < width_; ++w) {
 | 
			
		||||
      for (int h = 0; h < taps; ++h) {
 | 
			
		||||
        sum += data[h + w * stride];
 | 
			
		||||
      }
 | 
			
		||||
      for (int h = taps; h < height_; ++h) {
 | 
			
		||||
        sum += data[w + h * stride] - data[(h - taps) * stride + w];
 | 
			
		||||
        data[(h - half_taps) * stride + w] = (sum + half_taps) / taps;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  int width_, height_;
 | 
			
		||||
  static uint8_t* source_data_[2];
 | 
			
		||||
  int source_stride_;
 | 
			
		||||
  static uint8_t* reference_data_[2];
 | 
			
		||||
  int reference_stride_;
 | 
			
		||||
  static Ssimv *ssim_array_;
 | 
			
		||||
  Metrics metrics_;
 | 
			
		||||
 | 
			
		||||
  ACMRandom rnd_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
typedef std::tr1::tuple<int, int> ConsistencyParam;
 | 
			
		||||
class ConsistencyVP9Test
 | 
			
		||||
    : public ConsistencyTestBase,
 | 
			
		||||
      public ::testing::WithParamInterface<ConsistencyParam> {
 | 
			
		||||
 public:
 | 
			
		||||
  ConsistencyVP9Test() : ConsistencyTestBase(GET_PARAM(0), GET_PARAM(1)) {}
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  double CheckConsistency(int frame) {
 | 
			
		||||
    EXPECT_LT(frame, 2)<< "Frame to check has to be less than 2.";
 | 
			
		||||
    return
 | 
			
		||||
        vpx_get_ssim_metrics(source_data_[frame], source_stride_,
 | 
			
		||||
                             reference_data_[frame], reference_stride_,
 | 
			
		||||
                             width_, height_, ssim_array_, &metrics_, 1);
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
#endif  // CONFIG_VP9_ENCODER
 | 
			
		||||
 | 
			
		||||
uint8_t* ConsistencyTestBase::source_data_[2] = {NULL, NULL};
 | 
			
		||||
uint8_t* ConsistencyTestBase::reference_data_[2] = {NULL, NULL};
 | 
			
		||||
Ssimv* ConsistencyTestBase::ssim_array_ = NULL;
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
TEST_P(ConsistencyVP9Test, ConsistencyIsZero) {
 | 
			
		||||
  FillRandom(source_data_[0], source_stride_);
 | 
			
		||||
  Copy(source_data_[1], source_data_[0]);
 | 
			
		||||
  Copy(reference_data_[0], source_data_[0]);
 | 
			
		||||
  Blur(reference_data_[0], reference_stride_, 3);
 | 
			
		||||
  Copy(reference_data_[1], source_data_[0]);
 | 
			
		||||
  Blur(reference_data_[1], reference_stride_, 3);
 | 
			
		||||
 | 
			
		||||
  double inconsistency = CheckConsistency(1);
 | 
			
		||||
  inconsistency = CheckConsistency(0);
 | 
			
		||||
  EXPECT_EQ(inconsistency, 0.0)
 | 
			
		||||
      << "Should have 0 inconsistency if they are exactly the same.";
 | 
			
		||||
 | 
			
		||||
  // If sources are not consistent reference frames inconsistency should
 | 
			
		||||
  // be less than if the source is consistent.
 | 
			
		||||
  FillRandom(source_data_[0], source_stride_);
 | 
			
		||||
  FillRandom(source_data_[1], source_stride_);
 | 
			
		||||
  FillRandom(reference_data_[0], reference_stride_);
 | 
			
		||||
  FillRandom(reference_data_[1], reference_stride_);
 | 
			
		||||
  CheckConsistency(0);
 | 
			
		||||
  inconsistency = CheckConsistency(1);
 | 
			
		||||
 | 
			
		||||
  Copy(source_data_[1], source_data_[0]);
 | 
			
		||||
  CheckConsistency(0);
 | 
			
		||||
  double inconsistency2 = CheckConsistency(1);
 | 
			
		||||
  EXPECT_LT(inconsistency, inconsistency2)
 | 
			
		||||
      << "Should have less inconsistency if source itself is inconsistent.";
 | 
			
		||||
 | 
			
		||||
  // Less of a blur should be less inconsistent than more blur coming off a
 | 
			
		||||
  // a frame with no blur.
 | 
			
		||||
  ClearSsim();
 | 
			
		||||
  FillRandom(source_data_[0], source_stride_);
 | 
			
		||||
  Copy(source_data_[1], source_data_[0]);
 | 
			
		||||
  Copy(reference_data_[0], source_data_[0]);
 | 
			
		||||
  Copy(reference_data_[1], source_data_[0]);
 | 
			
		||||
  Blur(reference_data_[1], reference_stride_, 4);
 | 
			
		||||
  CheckConsistency(0);
 | 
			
		||||
  inconsistency = CheckConsistency(1);
 | 
			
		||||
  ClearSsim();
 | 
			
		||||
  Copy(reference_data_[1], source_data_[0]);
 | 
			
		||||
  Blur(reference_data_[1], reference_stride_, 8);
 | 
			
		||||
  CheckConsistency(0);
 | 
			
		||||
  inconsistency2 = CheckConsistency(1);
 | 
			
		||||
 | 
			
		||||
  EXPECT_LT(inconsistency, inconsistency2)
 | 
			
		||||
      << "Stronger Blur should produce more inconsistency.";
 | 
			
		||||
}
 | 
			
		||||
#endif  // CONFIG_VP9_ENCODER
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using std::tr1::make_tuple;
 | 
			
		||||
 | 
			
		||||
//------------------------------------------------------------------------------
 | 
			
		||||
// C functions
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
const ConsistencyParam c_vp9_tests[] = {
 | 
			
		||||
  make_tuple(320, 240),
 | 
			
		||||
  make_tuple(318, 242),
 | 
			
		||||
  make_tuple(318, 238),
 | 
			
		||||
};
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(C, ConsistencyVP9Test,
 | 
			
		||||
                        ::testing::ValuesIn(c_vp9_tests));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
@@ -9,16 +9,20 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "vp9/common/vp9_common.h"
 | 
			
		||||
#include "vp9/common/vp9_filter.h"
 | 
			
		||||
#include "vpx_dsp/vpx_dsp_common.h"
 | 
			
		||||
#include "vpx_dsp/vpx_filter.h"
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
#include "vpx_ports/mem.h"
 | 
			
		||||
 | 
			
		||||
@@ -37,9 +41,14 @@ struct ConvolveFunctions {
 | 
			
		||||
                    ConvolveFunc h8, ConvolveFunc h8_avg,
 | 
			
		||||
                    ConvolveFunc v8, ConvolveFunc v8_avg,
 | 
			
		||||
                    ConvolveFunc hv8, ConvolveFunc hv8_avg,
 | 
			
		||||
                    ConvolveFunc sh8, ConvolveFunc sh8_avg,
 | 
			
		||||
                    ConvolveFunc sv8, ConvolveFunc sv8_avg,
 | 
			
		||||
                    ConvolveFunc shv8, ConvolveFunc shv8_avg,
 | 
			
		||||
                    int bd)
 | 
			
		||||
      : copy_(copy), avg_(avg), h8_(h8), v8_(v8), hv8_(hv8), h8_avg_(h8_avg),
 | 
			
		||||
        v8_avg_(v8_avg), hv8_avg_(hv8_avg), use_highbd_(bd) {}
 | 
			
		||||
        v8_avg_(v8_avg), hv8_avg_(hv8_avg), sh8_(sh8), sv8_(sv8), shv8_(shv8),
 | 
			
		||||
        sh8_avg_(sh8_avg), sv8_avg_(sv8_avg), shv8_avg_(shv8_avg),
 | 
			
		||||
        use_highbd_(bd) {}
 | 
			
		||||
 | 
			
		||||
  ConvolveFunc copy_;
 | 
			
		||||
  ConvolveFunc avg_;
 | 
			
		||||
@@ -49,6 +58,12 @@ struct ConvolveFunctions {
 | 
			
		||||
  ConvolveFunc h8_avg_;
 | 
			
		||||
  ConvolveFunc v8_avg_;
 | 
			
		||||
  ConvolveFunc hv8_avg_;
 | 
			
		||||
  ConvolveFunc sh8_;        // scaled horiz
 | 
			
		||||
  ConvolveFunc sv8_;        // scaled vert
 | 
			
		||||
  ConvolveFunc shv8_;       // scaled horiz/vert
 | 
			
		||||
  ConvolveFunc sh8_avg_;    // scaled avg horiz
 | 
			
		||||
  ConvolveFunc sv8_avg_;    // scaled avg vert
 | 
			
		||||
  ConvolveFunc shv8_avg_;   // scaled avg horiz/vert
 | 
			
		||||
  int use_highbd_;  // 0 if high bitdepth not used, else the actual bit depth.
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -398,9 +413,9 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void CopyOutputToRef() {
 | 
			
		||||
    vpx_memcpy(output_ref_, output_, kOutputBufferSize);
 | 
			
		||||
    memcpy(output_ref_, output_, kOutputBufferSize);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    vpx_memcpy(output16_ref_, output16_, kOutputBufferSize);
 | 
			
		||||
    memcpy(output16_ref_, output16_, kOutputBufferSize);
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -593,8 +608,8 @@ TEST_P(ConvolveTest, CopyHoriz) {
 | 
			
		||||
  DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0};
 | 
			
		||||
 | 
			
		||||
  ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
      UUT_->h8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16,
 | 
			
		||||
                Width(), Height()));
 | 
			
		||||
      UUT_->sh8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16,
 | 
			
		||||
                 Width(), Height()));
 | 
			
		||||
 | 
			
		||||
  CheckGuardBlocks();
 | 
			
		||||
 | 
			
		||||
@@ -611,8 +626,8 @@ TEST_P(ConvolveTest, CopyVert) {
 | 
			
		||||
  DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0};
 | 
			
		||||
 | 
			
		||||
  ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
      UUT_->v8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16,
 | 
			
		||||
                Width(), Height()));
 | 
			
		||||
      UUT_->sv8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16,
 | 
			
		||||
                 Width(), Height()));
 | 
			
		||||
 | 
			
		||||
  CheckGuardBlocks();
 | 
			
		||||
 | 
			
		||||
@@ -629,8 +644,8 @@ TEST_P(ConvolveTest, Copy2D) {
 | 
			
		||||
  DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0};
 | 
			
		||||
 | 
			
		||||
  ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
      UUT_->hv8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16,
 | 
			
		||||
                 Width(), Height()));
 | 
			
		||||
      UUT_->shv8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8,
 | 
			
		||||
                  16, Width(), Height()));
 | 
			
		||||
 | 
			
		||||
  CheckGuardBlocks();
 | 
			
		||||
 | 
			
		||||
@@ -647,7 +662,7 @@ const int kNumFilters = 16;
 | 
			
		||||
TEST(ConvolveTest, FiltersWontSaturateWhenAddedPairwise) {
 | 
			
		||||
  for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) {
 | 
			
		||||
    const InterpKernel *filters =
 | 
			
		||||
        vp9_get_interp_kernel(static_cast<INTERP_FILTER>(filter_bank));
 | 
			
		||||
        vp9_filter_kernels[static_cast<INTERP_FILTER>(filter_bank)];
 | 
			
		||||
    for (int i = 0; i < kNumFilters; i++) {
 | 
			
		||||
      const int p0 = filters[i][0] + filters[i][1];
 | 
			
		||||
      const int p1 = filters[i][2] + filters[i][3];
 | 
			
		||||
@@ -685,9 +700,7 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
 | 
			
		||||
 | 
			
		||||
  for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) {
 | 
			
		||||
    const InterpKernel *filters =
 | 
			
		||||
        vp9_get_interp_kernel(static_cast<INTERP_FILTER>(filter_bank));
 | 
			
		||||
    const InterpKernel *const eighttap_smooth =
 | 
			
		||||
        vp9_get_interp_kernel(EIGHTTAP_SMOOTH);
 | 
			
		||||
        vp9_filter_kernels[static_cast<INTERP_FILTER>(filter_bank)];
 | 
			
		||||
 | 
			
		||||
    for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) {
 | 
			
		||||
      for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) {
 | 
			
		||||
@@ -696,7 +709,7 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
 | 
			
		||||
                                   ref, kOutputStride,
 | 
			
		||||
                                   Width(), Height());
 | 
			
		||||
 | 
			
		||||
        if (filters == eighttap_smooth || (filter_x && filter_y))
 | 
			
		||||
        if (filter_x && filter_y)
 | 
			
		||||
          ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
              UUT_->hv8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                         filters[filter_x], 16, filters[filter_y], 16,
 | 
			
		||||
@@ -706,11 +719,16 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
 | 
			
		||||
              UUT_->v8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                        kInvalidFilter, 16, filters[filter_y], 16,
 | 
			
		||||
                        Width(), Height()));
 | 
			
		||||
        else
 | 
			
		||||
        else if (filter_x)
 | 
			
		||||
          ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
              UUT_->h8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                        filters[filter_x], 16, kInvalidFilter, 16,
 | 
			
		||||
                        Width(), Height()));
 | 
			
		||||
        else
 | 
			
		||||
          ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
              UUT_->copy_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                          kInvalidFilter, 0, kInvalidFilter, 0,
 | 
			
		||||
                          Width(), Height()));
 | 
			
		||||
 | 
			
		||||
        CheckGuardBlocks();
 | 
			
		||||
 | 
			
		||||
@@ -764,9 +782,7 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
 | 
			
		||||
 | 
			
		||||
  for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) {
 | 
			
		||||
    const InterpKernel *filters =
 | 
			
		||||
        vp9_get_interp_kernel(static_cast<INTERP_FILTER>(filter_bank));
 | 
			
		||||
    const InterpKernel *const eighttap_smooth =
 | 
			
		||||
        vp9_get_interp_kernel(EIGHTTAP_SMOOTH);
 | 
			
		||||
        vp9_filter_kernels[static_cast<INTERP_FILTER>(filter_bank)];
 | 
			
		||||
 | 
			
		||||
    for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) {
 | 
			
		||||
      for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) {
 | 
			
		||||
@@ -775,7 +791,7 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
 | 
			
		||||
                                           ref, kOutputStride,
 | 
			
		||||
                                           Width(), Height());
 | 
			
		||||
 | 
			
		||||
        if (filters == eighttap_smooth || (filter_x && filter_y))
 | 
			
		||||
        if (filter_x && filter_y)
 | 
			
		||||
          ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
              UUT_->hv8_avg_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                             filters[filter_x], 16, filters[filter_y], 16,
 | 
			
		||||
@@ -783,13 +799,18 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
 | 
			
		||||
        else if (filter_y)
 | 
			
		||||
          ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
              UUT_->v8_avg_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                            filters[filter_x], 16, filters[filter_y], 16,
 | 
			
		||||
                            kInvalidFilter, 16, filters[filter_y], 16,
 | 
			
		||||
                            Width(), Height()));
 | 
			
		||||
        else if (filter_x)
 | 
			
		||||
          ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
              UUT_->h8_avg_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                            filters[filter_x], 16, kInvalidFilter, 16,
 | 
			
		||||
                            Width(), Height()));
 | 
			
		||||
        else
 | 
			
		||||
          ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
              UUT_->h8_avg_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                            filters[filter_x], 16, filters[filter_y], 16,
 | 
			
		||||
                            Width(), Height()));
 | 
			
		||||
              UUT_->avg_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                          kInvalidFilter, 0, kInvalidFilter, 0,
 | 
			
		||||
                          Width(), Height()));
 | 
			
		||||
 | 
			
		||||
        CheckGuardBlocks();
 | 
			
		||||
 | 
			
		||||
@@ -863,16 +884,14 @@ TEST_P(ConvolveTest, FilterExtremes) {
 | 
			
		||||
 | 
			
		||||
      for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) {
 | 
			
		||||
        const InterpKernel *filters =
 | 
			
		||||
            vp9_get_interp_kernel(static_cast<INTERP_FILTER>(filter_bank));
 | 
			
		||||
        const InterpKernel *const eighttap_smooth =
 | 
			
		||||
            vp9_get_interp_kernel(EIGHTTAP_SMOOTH);
 | 
			
		||||
            vp9_filter_kernels[static_cast<INTERP_FILTER>(filter_bank)];
 | 
			
		||||
        for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) {
 | 
			
		||||
          for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) {
 | 
			
		||||
            wrapper_filter_block2d_8_c(in, kInputStride,
 | 
			
		||||
                                       filters[filter_x], filters[filter_y],
 | 
			
		||||
                                       ref, kOutputStride,
 | 
			
		||||
                                       Width(), Height());
 | 
			
		||||
            if (filters == eighttap_smooth || (filter_x && filter_y))
 | 
			
		||||
            if (filter_x && filter_y)
 | 
			
		||||
              ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
                  UUT_->hv8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                             filters[filter_x], 16, filters[filter_y], 16,
 | 
			
		||||
@@ -882,11 +901,16 @@ TEST_P(ConvolveTest, FilterExtremes) {
 | 
			
		||||
                  UUT_->v8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                            kInvalidFilter, 16, filters[filter_y], 16,
 | 
			
		||||
                            Width(), Height()));
 | 
			
		||||
            else
 | 
			
		||||
            else if (filter_x)
 | 
			
		||||
              ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
                  UUT_->h8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                            filters[filter_x], 16, kInvalidFilter, 16,
 | 
			
		||||
                            Width(), Height()));
 | 
			
		||||
            else
 | 
			
		||||
              ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
                  UUT_->copy_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                              kInvalidFilter, 0, kInvalidFilter, 0,
 | 
			
		||||
                              Width(), Height()));
 | 
			
		||||
 | 
			
		||||
            for (int y = 0; y < Height(); ++y)
 | 
			
		||||
              for (int x = 0; x < Width(); ++x)
 | 
			
		||||
@@ -902,132 +926,22 @@ TEST_P(ConvolveTest, FilterExtremes) {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
DECLARE_ALIGNED(256, const int16_t, kChangeFilters[16][8]) = {
 | 
			
		||||
    { 0,   0,   0,   0,   0,   0,   0, 128},
 | 
			
		||||
    { 0,   0,   0,   0,   0,   0, 128},
 | 
			
		||||
    { 0,   0,   0,   0,   0, 128},
 | 
			
		||||
    { 0,   0,   0,   0, 128},
 | 
			
		||||
    { 0,   0,   0, 128},
 | 
			
		||||
    { 0,   0, 128},
 | 
			
		||||
    { 0, 128},
 | 
			
		||||
    { 128},
 | 
			
		||||
    { 0,   0,   0,   0,   0,   0,   0, 128},
 | 
			
		||||
    { 0,   0,   0,   0,   0,   0, 128},
 | 
			
		||||
    { 0,   0,   0,   0,   0, 128},
 | 
			
		||||
    { 0,   0,   0,   0, 128},
 | 
			
		||||
    { 0,   0,   0, 128},
 | 
			
		||||
    { 0,   0, 128},
 | 
			
		||||
    { 0, 128},
 | 
			
		||||
    { 128}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* This test exercises the horizontal and vertical filter functions. */
 | 
			
		||||
TEST_P(ConvolveTest, ChangeFilterWorks) {
 | 
			
		||||
  uint8_t* const in = input();
 | 
			
		||||
  uint8_t* const out = output();
 | 
			
		||||
 | 
			
		||||
  /* Assume that the first input sample is at the 8/16th position. */
 | 
			
		||||
  const int kInitialSubPelOffset = 8;
 | 
			
		||||
 | 
			
		||||
  /* Filters are 8-tap, so the first filter tap will be applied to the pixel
 | 
			
		||||
   * at position -3 with respect to the current filtering position. Since
 | 
			
		||||
   * kInitialSubPelOffset is set to 8, we first select sub-pixel filter 8,
 | 
			
		||||
   * which is non-zero only in the last tap. So, applying the filter at the
 | 
			
		||||
   * current input position will result in an output equal to the pixel at
 | 
			
		||||
   * offset +4 (-3 + 7) with respect to the current filtering position.
 | 
			
		||||
   */
 | 
			
		||||
  const int kPixelSelected = 4;
 | 
			
		||||
 | 
			
		||||
  /* Assume that each output pixel requires us to step on by 17/16th pixels in
 | 
			
		||||
   * the input.
 | 
			
		||||
   */
 | 
			
		||||
  const int kInputPixelStep = 17;
 | 
			
		||||
 | 
			
		||||
  /* The filters are setup in such a way that the expected output produces
 | 
			
		||||
   * sets of 8 identical output samples. As the filter position moves to the
 | 
			
		||||
   * next 1/16th pixel position the only active (=128) filter tap moves one
 | 
			
		||||
   * position to the left, resulting in the same input pixel being replicated
 | 
			
		||||
   * in to the output for 8 consecutive samples. After each set of 8 positions
 | 
			
		||||
   * the filters select a different input pixel. kFilterPeriodAdjust below
 | 
			
		||||
   * computes which input pixel is written to the output for a specified
 | 
			
		||||
   * x or y position.
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
  /* Test the horizontal filter. */
 | 
			
		||||
  ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
      UUT_->h8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                kChangeFilters[kInitialSubPelOffset],
 | 
			
		||||
                kInputPixelStep, NULL, 0, Width(), Height()));
 | 
			
		||||
 | 
			
		||||
  for (int x = 0; x < Width(); ++x) {
 | 
			
		||||
    const int kFilterPeriodAdjust = (x >> 3) << 3;
 | 
			
		||||
    const int ref_x =
 | 
			
		||||
        kPixelSelected + ((kInitialSubPelOffset
 | 
			
		||||
            + kFilterPeriodAdjust * kInputPixelStep)
 | 
			
		||||
                          >> SUBPEL_BITS);
 | 
			
		||||
    ASSERT_EQ(lookup(in, ref_x), lookup(out, x))
 | 
			
		||||
        << "x == " << x << "width = " << Width();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* Test the vertical filter. */
 | 
			
		||||
  ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
      UUT_->v8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                NULL, 0, kChangeFilters[kInitialSubPelOffset],
 | 
			
		||||
                kInputPixelStep, Width(), Height()));
 | 
			
		||||
 | 
			
		||||
  for (int y = 0; y < Height(); ++y) {
 | 
			
		||||
    const int kFilterPeriodAdjust = (y >> 3) << 3;
 | 
			
		||||
    const int ref_y =
 | 
			
		||||
        kPixelSelected + ((kInitialSubPelOffset
 | 
			
		||||
            + kFilterPeriodAdjust * kInputPixelStep)
 | 
			
		||||
                          >> SUBPEL_BITS);
 | 
			
		||||
    ASSERT_EQ(lookup(in, ref_y * kInputStride), lookup(out, y * kInputStride))
 | 
			
		||||
        << "y == " << y;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* Test the horizontal and vertical filters in combination. */
 | 
			
		||||
  ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
      UUT_->hv8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                 kChangeFilters[kInitialSubPelOffset], kInputPixelStep,
 | 
			
		||||
                 kChangeFilters[kInitialSubPelOffset], kInputPixelStep,
 | 
			
		||||
                 Width(), Height()));
 | 
			
		||||
 | 
			
		||||
  for (int y = 0; y < Height(); ++y) {
 | 
			
		||||
    const int kFilterPeriodAdjustY = (y >> 3) << 3;
 | 
			
		||||
    const int ref_y =
 | 
			
		||||
        kPixelSelected + ((kInitialSubPelOffset
 | 
			
		||||
            + kFilterPeriodAdjustY * kInputPixelStep)
 | 
			
		||||
                          >> SUBPEL_BITS);
 | 
			
		||||
    for (int x = 0; x < Width(); ++x) {
 | 
			
		||||
      const int kFilterPeriodAdjustX = (x >> 3) << 3;
 | 
			
		||||
      const int ref_x =
 | 
			
		||||
          kPixelSelected + ((kInitialSubPelOffset
 | 
			
		||||
              + kFilterPeriodAdjustX * kInputPixelStep)
 | 
			
		||||
                            >> SUBPEL_BITS);
 | 
			
		||||
 | 
			
		||||
      ASSERT_EQ(lookup(in, ref_y * kInputStride + ref_x),
 | 
			
		||||
                lookup(out, y * kOutputStride + x))
 | 
			
		||||
          << "x == " << x << ", y == " << y;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* This test exercises that enough rows and columns are filtered with every
 | 
			
		||||
   possible initial fractional positions and scaling steps. */
 | 
			
		||||
TEST_P(ConvolveTest, CheckScalingFiltering) {
 | 
			
		||||
  uint8_t* const in = input();
 | 
			
		||||
  uint8_t* const out = output();
 | 
			
		||||
  const InterpKernel *const eighttap = vp9_get_interp_kernel(EIGHTTAP);
 | 
			
		||||
  const InterpKernel *const eighttap = vp9_filter_kernels[EIGHTTAP];
 | 
			
		||||
 | 
			
		||||
  SetConstantInput(127);
 | 
			
		||||
 | 
			
		||||
  for (int frac = 0; frac < 16; ++frac) {
 | 
			
		||||
    for (int step = 1; step <= 32; ++step) {
 | 
			
		||||
      /* Test the horizontal and vertical filters in combination. */
 | 
			
		||||
      ASM_REGISTER_STATE_CHECK(UUT_->hv8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                                          eighttap[frac], step,
 | 
			
		||||
                                          eighttap[frac], step,
 | 
			
		||||
                                          Width(), Height()));
 | 
			
		||||
      ASM_REGISTER_STATE_CHECK(UUT_->shv8_(in, kInputStride, out, kOutputStride,
 | 
			
		||||
                                           eighttap[frac], step,
 | 
			
		||||
                                           eighttap[frac], step,
 | 
			
		||||
                                           Width(), Height()));
 | 
			
		||||
 | 
			
		||||
      CheckGuardBlocks();
 | 
			
		||||
 | 
			
		||||
@@ -1054,7 +968,7 @@ void wrap_convolve8_horiz_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                 const int16_t *filter_y,
 | 
			
		||||
                                 int filter_y_stride,
 | 
			
		||||
                                 int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride, filter_x,
 | 
			
		||||
  vpx_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride, filter_x,
 | 
			
		||||
                                  filter_x_stride, filter_y, filter_y_stride,
 | 
			
		||||
                                  w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1066,7 +980,7 @@ void wrap_convolve8_avg_horiz_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                     const int16_t *filter_y,
 | 
			
		||||
                                     int filter_y_stride,
 | 
			
		||||
                                     int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                      filter_x, filter_x_stride,
 | 
			
		||||
                                      filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1078,7 +992,7 @@ void wrap_convolve8_vert_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                const int16_t *filter_y,
 | 
			
		||||
                                int filter_y_stride,
 | 
			
		||||
                                int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                 filter_x, filter_x_stride,
 | 
			
		||||
                                 filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1090,7 +1004,7 @@ void wrap_convolve8_avg_vert_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                    const int16_t *filter_y,
 | 
			
		||||
                                    int filter_y_stride,
 | 
			
		||||
                                    int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                     filter_x, filter_x_stride,
 | 
			
		||||
                                     filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1102,7 +1016,7 @@ void wrap_convolve8_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                           const int16_t *filter_y,
 | 
			
		||||
                           int filter_y_stride,
 | 
			
		||||
                           int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                            filter_x, filter_x_stride,
 | 
			
		||||
                            filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1114,7 +1028,7 @@ void wrap_convolve8_avg_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                               const int16_t *filter_y,
 | 
			
		||||
                               int filter_y_stride,
 | 
			
		||||
                               int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                filter_x, filter_x_stride,
 | 
			
		||||
                                filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1126,7 +1040,7 @@ void wrap_convolve8_horiz_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                  const int16_t *filter_y,
 | 
			
		||||
                                  int filter_y_stride,
 | 
			
		||||
                                  int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                  filter_x, filter_x_stride,
 | 
			
		||||
                                  filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1138,7 +1052,7 @@ void wrap_convolve8_avg_horiz_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                      const int16_t *filter_y,
 | 
			
		||||
                                      int filter_y_stride,
 | 
			
		||||
                                      int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                      filter_x, filter_x_stride,
 | 
			
		||||
                                      filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1150,7 +1064,7 @@ void wrap_convolve8_vert_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                 const int16_t *filter_y,
 | 
			
		||||
                                 int filter_y_stride,
 | 
			
		||||
                                 int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                 filter_x, filter_x_stride,
 | 
			
		||||
                                 filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1162,7 +1076,7 @@ void wrap_convolve8_avg_vert_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                     const int16_t *filter_y,
 | 
			
		||||
                                     int filter_y_stride,
 | 
			
		||||
                                     int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                     filter_x, filter_x_stride,
 | 
			
		||||
                                     filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1174,7 +1088,7 @@ void wrap_convolve8_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                            const int16_t *filter_y,
 | 
			
		||||
                            int filter_y_stride,
 | 
			
		||||
                            int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                            filter_x, filter_x_stride,
 | 
			
		||||
                            filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1186,7 +1100,7 @@ void wrap_convolve8_avg_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                const int16_t *filter_y,
 | 
			
		||||
                                int filter_y_stride,
 | 
			
		||||
                                int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                filter_x, filter_x_stride,
 | 
			
		||||
                                filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1198,7 +1112,7 @@ void wrap_convolve8_horiz_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                  const int16_t *filter_y,
 | 
			
		||||
                                  int filter_y_stride,
 | 
			
		||||
                                  int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                  filter_x, filter_x_stride,
 | 
			
		||||
                                  filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1210,7 +1124,7 @@ void wrap_convolve8_avg_horiz_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                      const int16_t *filter_y,
 | 
			
		||||
                                      int filter_y_stride,
 | 
			
		||||
                                      int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                      filter_x, filter_x_stride,
 | 
			
		||||
                                      filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1222,7 +1136,7 @@ void wrap_convolve8_vert_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                 const int16_t *filter_y,
 | 
			
		||||
                                 int filter_y_stride,
 | 
			
		||||
                                 int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                 filter_x, filter_x_stride,
 | 
			
		||||
                                 filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1234,7 +1148,7 @@ void wrap_convolve8_avg_vert_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                     const int16_t *filter_y,
 | 
			
		||||
                                     int filter_y_stride,
 | 
			
		||||
                                     int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                     filter_x, filter_x_stride,
 | 
			
		||||
                                     filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1246,7 +1160,7 @@ void wrap_convolve8_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                            const int16_t *filter_y,
 | 
			
		||||
                            int filter_y_stride,
 | 
			
		||||
                            int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                            filter_x, filter_x_stride,
 | 
			
		||||
                            filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1258,7 +1172,7 @@ void wrap_convolve8_avg_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                const int16_t *filter_y,
 | 
			
		||||
                                int filter_y_stride,
 | 
			
		||||
                                int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                filter_x, filter_x_stride,
 | 
			
		||||
                                filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1271,7 +1185,7 @@ void wrap_convolve_copy_c_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                            const int16_t *filter_y,
 | 
			
		||||
                            int filter_y_stride,
 | 
			
		||||
                            int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve_copy_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve_copy_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                             filter_x, filter_x_stride,
 | 
			
		||||
                             filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1283,7 +1197,7 @@ void wrap_convolve_avg_c_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                           const int16_t *filter_y,
 | 
			
		||||
                           int filter_y_stride,
 | 
			
		||||
                           int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                            filter_x, filter_x_stride,
 | 
			
		||||
                            filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1295,7 +1209,7 @@ void wrap_convolve8_horiz_c_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                              const int16_t *filter_y,
 | 
			
		||||
                              int filter_y_stride,
 | 
			
		||||
                              int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                               filter_x, filter_x_stride,
 | 
			
		||||
                               filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1307,7 +1221,7 @@ void wrap_convolve8_avg_horiz_c_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                  const int16_t *filter_y,
 | 
			
		||||
                                  int filter_y_stride,
 | 
			
		||||
                                  int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                   filter_x, filter_x_stride,
 | 
			
		||||
                                   filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1319,7 +1233,7 @@ void wrap_convolve8_vert_c_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                             const int16_t *filter_y,
 | 
			
		||||
                             int filter_y_stride,
 | 
			
		||||
                             int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                              filter_x, filter_x_stride,
 | 
			
		||||
                              filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1331,7 +1245,7 @@ void wrap_convolve8_avg_vert_c_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                 const int16_t *filter_y,
 | 
			
		||||
                                 int filter_y_stride,
 | 
			
		||||
                                 int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                  filter_x, filter_x_stride,
 | 
			
		||||
                                  filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1343,7 +1257,7 @@ void wrap_convolve8_c_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                        const int16_t *filter_y,
 | 
			
		||||
                        int filter_y_stride,
 | 
			
		||||
                        int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                         filter_x, filter_x_stride,
 | 
			
		||||
                         filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1355,7 +1269,7 @@ void wrap_convolve8_avg_c_8(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                            const int16_t *filter_y,
 | 
			
		||||
                            int filter_y_stride,
 | 
			
		||||
                            int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                             filter_x, filter_x_stride,
 | 
			
		||||
                             filter_y, filter_y_stride, w, h, 8);
 | 
			
		||||
}
 | 
			
		||||
@@ -1367,7 +1281,7 @@ void wrap_convolve_copy_c_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                             const int16_t *filter_y,
 | 
			
		||||
                             int filter_y_stride,
 | 
			
		||||
                             int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve_copy_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve_copy_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                             filter_x, filter_x_stride,
 | 
			
		||||
                             filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1379,7 +1293,7 @@ void wrap_convolve_avg_c_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                            const int16_t *filter_y,
 | 
			
		||||
                            int filter_y_stride,
 | 
			
		||||
                            int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                            filter_x, filter_x_stride,
 | 
			
		||||
                            filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1391,7 +1305,7 @@ void wrap_convolve8_horiz_c_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                               const int16_t *filter_y,
 | 
			
		||||
                               int filter_y_stride,
 | 
			
		||||
                               int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                               filter_x, filter_x_stride,
 | 
			
		||||
                               filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1403,7 +1317,7 @@ void wrap_convolve8_avg_horiz_c_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                   const int16_t *filter_y,
 | 
			
		||||
                                   int filter_y_stride,
 | 
			
		||||
                                   int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                   filter_x, filter_x_stride,
 | 
			
		||||
                                   filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1415,7 +1329,7 @@ void wrap_convolve8_vert_c_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                              const int16_t *filter_y,
 | 
			
		||||
                              int filter_y_stride,
 | 
			
		||||
                              int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                              filter_x, filter_x_stride,
 | 
			
		||||
                              filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1427,7 +1341,7 @@ void wrap_convolve8_avg_vert_c_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                  const int16_t *filter_y,
 | 
			
		||||
                                  int filter_y_stride,
 | 
			
		||||
                                  int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                  filter_x, filter_x_stride,
 | 
			
		||||
                                  filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1439,7 +1353,7 @@ void wrap_convolve8_c_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                         const int16_t *filter_y,
 | 
			
		||||
                         int filter_y_stride,
 | 
			
		||||
                         int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                         filter_x, filter_x_stride,
 | 
			
		||||
                         filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1451,7 +1365,7 @@ void wrap_convolve8_avg_c_10(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                             const int16_t *filter_y,
 | 
			
		||||
                             int filter_y_stride,
 | 
			
		||||
                             int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                             filter_x, filter_x_stride,
 | 
			
		||||
                             filter_y, filter_y_stride, w, h, 10);
 | 
			
		||||
}
 | 
			
		||||
@@ -1463,7 +1377,7 @@ void wrap_convolve_copy_c_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                             const int16_t *filter_y,
 | 
			
		||||
                             int filter_y_stride,
 | 
			
		||||
                             int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve_copy_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve_copy_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                             filter_x, filter_x_stride,
 | 
			
		||||
                             filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1475,7 +1389,7 @@ void wrap_convolve_avg_c_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                            const int16_t *filter_y,
 | 
			
		||||
                            int filter_y_stride,
 | 
			
		||||
                            int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                            filter_x, filter_x_stride,
 | 
			
		||||
                            filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1487,7 +1401,7 @@ void wrap_convolve8_horiz_c_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                               const int16_t *filter_y,
 | 
			
		||||
                               int filter_y_stride,
 | 
			
		||||
                               int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                               filter_x, filter_x_stride,
 | 
			
		||||
                               filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1499,7 +1413,7 @@ void wrap_convolve8_avg_horiz_c_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                   const int16_t *filter_y,
 | 
			
		||||
                                   int filter_y_stride,
 | 
			
		||||
                                   int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                   filter_x, filter_x_stride,
 | 
			
		||||
                                   filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1511,7 +1425,7 @@ void wrap_convolve8_vert_c_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                              const int16_t *filter_y,
 | 
			
		||||
                              int filter_y_stride,
 | 
			
		||||
                              int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                              filter_x, filter_x_stride,
 | 
			
		||||
                              filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1523,7 +1437,7 @@ void wrap_convolve8_avg_vert_c_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                                  const int16_t *filter_y,
 | 
			
		||||
                                  int filter_y_stride,
 | 
			
		||||
                                  int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                                  filter_x, filter_x_stride,
 | 
			
		||||
                                  filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1535,7 +1449,7 @@ void wrap_convolve8_c_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                         const int16_t *filter_y,
 | 
			
		||||
                         int filter_y_stride,
 | 
			
		||||
                         int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                         filter_x, filter_x_stride,
 | 
			
		||||
                         filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1547,7 +1461,7 @@ void wrap_convolve8_avg_c_12(const uint8_t *src, ptrdiff_t src_stride,
 | 
			
		||||
                             const int16_t *filter_y,
 | 
			
		||||
                             int filter_y_stride,
 | 
			
		||||
                             int w, int h) {
 | 
			
		||||
  vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
  vpx_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride,
 | 
			
		||||
                             filter_x, filter_x_stride,
 | 
			
		||||
                             filter_y, filter_y_stride, w, h, 12);
 | 
			
		||||
}
 | 
			
		||||
@@ -1556,6 +1470,9 @@ const ConvolveFunctions convolve8_c(
 | 
			
		||||
    wrap_convolve_copy_c_8, wrap_convolve_avg_c_8,
 | 
			
		||||
    wrap_convolve8_horiz_c_8, wrap_convolve8_avg_horiz_c_8,
 | 
			
		||||
    wrap_convolve8_vert_c_8, wrap_convolve8_avg_vert_c_8,
 | 
			
		||||
    wrap_convolve8_c_8, wrap_convolve8_avg_c_8,
 | 
			
		||||
    wrap_convolve8_horiz_c_8, wrap_convolve8_avg_horiz_c_8,
 | 
			
		||||
    wrap_convolve8_vert_c_8, wrap_convolve8_avg_vert_c_8,
 | 
			
		||||
    wrap_convolve8_c_8, wrap_convolve8_avg_c_8, 8);
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(C_8, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve8_c),
 | 
			
		||||
@@ -1575,6 +1492,9 @@ const ConvolveFunctions convolve10_c(
 | 
			
		||||
    wrap_convolve_copy_c_10, wrap_convolve_avg_c_10,
 | 
			
		||||
    wrap_convolve8_horiz_c_10, wrap_convolve8_avg_horiz_c_10,
 | 
			
		||||
    wrap_convolve8_vert_c_10, wrap_convolve8_avg_vert_c_10,
 | 
			
		||||
    wrap_convolve8_c_10, wrap_convolve8_avg_c_10,
 | 
			
		||||
    wrap_convolve8_horiz_c_10, wrap_convolve8_avg_horiz_c_10,
 | 
			
		||||
    wrap_convolve8_vert_c_10, wrap_convolve8_avg_vert_c_10,
 | 
			
		||||
    wrap_convolve8_c_10, wrap_convolve8_avg_c_10, 10);
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(C_10, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve10_c),
 | 
			
		||||
@@ -1594,6 +1514,9 @@ const ConvolveFunctions convolve12_c(
 | 
			
		||||
    wrap_convolve_copy_c_12, wrap_convolve_avg_c_12,
 | 
			
		||||
    wrap_convolve8_horiz_c_12, wrap_convolve8_avg_horiz_c_12,
 | 
			
		||||
    wrap_convolve8_vert_c_12, wrap_convolve8_avg_vert_c_12,
 | 
			
		||||
    wrap_convolve8_c_12, wrap_convolve8_avg_c_12,
 | 
			
		||||
    wrap_convolve8_horiz_c_12, wrap_convolve8_avg_horiz_c_12,
 | 
			
		||||
    wrap_convolve8_vert_c_12, wrap_convolve8_avg_vert_c_12,
 | 
			
		||||
    wrap_convolve8_c_12, wrap_convolve8_avg_c_12, 12);
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(C_12, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve12_c),
 | 
			
		||||
@@ -1613,10 +1536,13 @@ INSTANTIATE_TEST_CASE_P(C_12, ConvolveTest, ::testing::Values(
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
const ConvolveFunctions convolve8_c(
 | 
			
		||||
    vp9_convolve_copy_c, vp9_convolve_avg_c,
 | 
			
		||||
    vp9_convolve8_horiz_c, vp9_convolve8_avg_horiz_c,
 | 
			
		||||
    vp9_convolve8_vert_c, vp9_convolve8_avg_vert_c,
 | 
			
		||||
    vp9_convolve8_c, vp9_convolve8_avg_c, 0);
 | 
			
		||||
    vpx_convolve_copy_c, vpx_convolve_avg_c,
 | 
			
		||||
    vpx_convolve8_horiz_c, vpx_convolve8_avg_horiz_c,
 | 
			
		||||
    vpx_convolve8_vert_c, vpx_convolve8_avg_vert_c,
 | 
			
		||||
    vpx_convolve8_c, vpx_convolve8_avg_c,
 | 
			
		||||
    vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
 | 
			
		||||
    vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
 | 
			
		||||
    vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(C, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve8_c),
 | 
			
		||||
@@ -1640,16 +1566,25 @@ const ConvolveFunctions convolve8_sse2(
 | 
			
		||||
    wrap_convolve_copy_c_8, wrap_convolve_avg_c_8,
 | 
			
		||||
    wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8,
 | 
			
		||||
    wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8,
 | 
			
		||||
    wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8,
 | 
			
		||||
    wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8,
 | 
			
		||||
    wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8,
 | 
			
		||||
    wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8, 8);
 | 
			
		||||
const ConvolveFunctions convolve10_sse2(
 | 
			
		||||
    wrap_convolve_copy_c_10, wrap_convolve_avg_c_10,
 | 
			
		||||
    wrap_convolve8_horiz_sse2_10, wrap_convolve8_avg_horiz_sse2_10,
 | 
			
		||||
    wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10,
 | 
			
		||||
    wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10,
 | 
			
		||||
    wrap_convolve8_horiz_sse2_10, wrap_convolve8_avg_horiz_sse2_10,
 | 
			
		||||
    wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10,
 | 
			
		||||
    wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10, 10);
 | 
			
		||||
const ConvolveFunctions convolve12_sse2(
 | 
			
		||||
    wrap_convolve_copy_c_12, wrap_convolve_avg_c_12,
 | 
			
		||||
    wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12,
 | 
			
		||||
    wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12,
 | 
			
		||||
    wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12,
 | 
			
		||||
    wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12,
 | 
			
		||||
    wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12,
 | 
			
		||||
    wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12, 12);
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve8_sse2),
 | 
			
		||||
@@ -1693,10 +1628,17 @@ INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(64, 64, &convolve12_sse2)));
 | 
			
		||||
#else
 | 
			
		||||
const ConvolveFunctions convolve8_sse2(
 | 
			
		||||
    vp9_convolve_copy_sse2, vp9_convolve_avg_sse2,
 | 
			
		||||
    vp9_convolve8_horiz_sse2, vp9_convolve8_avg_horiz_sse2,
 | 
			
		||||
    vp9_convolve8_vert_sse2, vp9_convolve8_avg_vert_sse2,
 | 
			
		||||
    vp9_convolve8_sse2, vp9_convolve8_avg_sse2, 0);
 | 
			
		||||
#if CONFIG_USE_X86INC
 | 
			
		||||
    vpx_convolve_copy_sse2, vpx_convolve_avg_sse2,
 | 
			
		||||
#else
 | 
			
		||||
    vpx_convolve_copy_c, vpx_convolve_avg_c,
 | 
			
		||||
#endif  // CONFIG_USE_X86INC
 | 
			
		||||
    vpx_convolve8_horiz_sse2, vpx_convolve8_avg_horiz_sse2,
 | 
			
		||||
    vpx_convolve8_vert_sse2, vpx_convolve8_avg_vert_sse2,
 | 
			
		||||
    vpx_convolve8_sse2, vpx_convolve8_avg_sse2,
 | 
			
		||||
    vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
 | 
			
		||||
    vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
 | 
			
		||||
    vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve8_sse2),
 | 
			
		||||
@@ -1717,10 +1659,13 @@ INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values(
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSSE3
 | 
			
		||||
const ConvolveFunctions convolve8_ssse3(
 | 
			
		||||
    vp9_convolve_copy_c, vp9_convolve_avg_c,
 | 
			
		||||
    vp9_convolve8_horiz_ssse3, vp9_convolve8_avg_horiz_ssse3,
 | 
			
		||||
    vp9_convolve8_vert_ssse3, vp9_convolve8_avg_vert_ssse3,
 | 
			
		||||
    vp9_convolve8_ssse3, vp9_convolve8_avg_ssse3, 0);
 | 
			
		||||
    vpx_convolve_copy_c, vpx_convolve_avg_c,
 | 
			
		||||
    vpx_convolve8_horiz_ssse3, vpx_convolve8_avg_horiz_ssse3,
 | 
			
		||||
    vpx_convolve8_vert_ssse3, vpx_convolve8_avg_vert_ssse3,
 | 
			
		||||
    vpx_convolve8_ssse3, vpx_convolve8_avg_ssse3,
 | 
			
		||||
    vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
 | 
			
		||||
    vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
 | 
			
		||||
    vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve8_ssse3),
 | 
			
		||||
@@ -1740,10 +1685,13 @@ INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest, ::testing::Values(
 | 
			
		||||
 | 
			
		||||
#if HAVE_AVX2 && HAVE_SSSE3
 | 
			
		||||
const ConvolveFunctions convolve8_avx2(
 | 
			
		||||
    vp9_convolve_copy_c, vp9_convolve_avg_c,
 | 
			
		||||
    vp9_convolve8_horiz_avx2, vp9_convolve8_avg_horiz_ssse3,
 | 
			
		||||
    vp9_convolve8_vert_avx2, vp9_convolve8_avg_vert_ssse3,
 | 
			
		||||
    vp9_convolve8_avx2, vp9_convolve8_avg_ssse3, 0);
 | 
			
		||||
    vpx_convolve_copy_c, vpx_convolve_avg_c,
 | 
			
		||||
    vpx_convolve8_horiz_avx2, vpx_convolve8_avg_horiz_ssse3,
 | 
			
		||||
    vpx_convolve8_vert_avx2, vpx_convolve8_avg_vert_ssse3,
 | 
			
		||||
    vpx_convolve8_avx2, vpx_convolve8_avg_ssse3,
 | 
			
		||||
    vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
 | 
			
		||||
    vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
 | 
			
		||||
    vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve8_avx2),
 | 
			
		||||
@@ -1764,16 +1712,22 @@ INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest, ::testing::Values(
 | 
			
		||||
#if HAVE_NEON
 | 
			
		||||
#if HAVE_NEON_ASM
 | 
			
		||||
const ConvolveFunctions convolve8_neon(
 | 
			
		||||
    vp9_convolve_copy_neon, vp9_convolve_avg_neon,
 | 
			
		||||
    vp9_convolve8_horiz_neon, vp9_convolve8_avg_horiz_neon,
 | 
			
		||||
    vp9_convolve8_vert_neon, vp9_convolve8_avg_vert_neon,
 | 
			
		||||
    vp9_convolve8_neon, vp9_convolve8_avg_neon, 0);
 | 
			
		||||
    vpx_convolve_copy_neon, vpx_convolve_avg_neon,
 | 
			
		||||
    vpx_convolve8_horiz_neon, vpx_convolve8_avg_horiz_neon,
 | 
			
		||||
    vpx_convolve8_vert_neon, vpx_convolve8_avg_vert_neon,
 | 
			
		||||
    vpx_convolve8_neon, vpx_convolve8_avg_neon,
 | 
			
		||||
    vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
 | 
			
		||||
    vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
 | 
			
		||||
    vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
 | 
			
		||||
#else  // HAVE_NEON
 | 
			
		||||
const ConvolveFunctions convolve8_neon(
 | 
			
		||||
    vp9_convolve_copy_neon, vp9_convolve_avg_neon,
 | 
			
		||||
    vp9_convolve8_horiz_neon, vp9_convolve8_avg_horiz_neon,
 | 
			
		||||
    vp9_convolve8_vert_neon, vp9_convolve8_avg_vert_neon,
 | 
			
		||||
    vp9_convolve8_neon, vp9_convolve8_avg_neon, 0);
 | 
			
		||||
    vpx_convolve_copy_neon, vpx_convolve_avg_neon,
 | 
			
		||||
    vpx_convolve8_horiz_neon, vpx_convolve8_avg_horiz_neon,
 | 
			
		||||
    vpx_convolve8_vert_neon, vpx_convolve8_avg_vert_neon,
 | 
			
		||||
    vpx_convolve8_neon, vpx_convolve8_avg_neon,
 | 
			
		||||
    vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
 | 
			
		||||
    vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
 | 
			
		||||
    vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
 | 
			
		||||
#endif  // HAVE_NEON_ASM
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest, ::testing::Values(
 | 
			
		||||
@@ -1794,10 +1748,13 @@ INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest, ::testing::Values(
 | 
			
		||||
 | 
			
		||||
#if HAVE_DSPR2
 | 
			
		||||
const ConvolveFunctions convolve8_dspr2(
 | 
			
		||||
    vp9_convolve_copy_dspr2, vp9_convolve_avg_dspr2,
 | 
			
		||||
    vp9_convolve8_horiz_dspr2, vp9_convolve8_avg_horiz_dspr2,
 | 
			
		||||
    vp9_convolve8_vert_dspr2, vp9_convolve8_avg_vert_dspr2,
 | 
			
		||||
    vp9_convolve8_dspr2, vp9_convolve8_avg_dspr2, 0);
 | 
			
		||||
    vpx_convolve_copy_dspr2, vpx_convolve_avg_dspr2,
 | 
			
		||||
    vpx_convolve8_horiz_dspr2, vpx_convolve8_avg_horiz_dspr2,
 | 
			
		||||
    vpx_convolve8_vert_dspr2, vpx_convolve8_avg_vert_dspr2,
 | 
			
		||||
    vpx_convolve8_dspr2, vpx_convolve8_avg_dspr2,
 | 
			
		||||
    vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
 | 
			
		||||
    vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
 | 
			
		||||
    vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve8_dspr2),
 | 
			
		||||
@@ -1814,4 +1771,30 @@ INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(32, 64, &convolve8_dspr2),
 | 
			
		||||
    make_tuple(64, 64, &convolve8_dspr2)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
const ConvolveFunctions convolve8_msa(
 | 
			
		||||
    vpx_convolve_copy_msa, vpx_convolve_avg_msa,
 | 
			
		||||
    vpx_convolve8_horiz_msa, vpx_convolve8_avg_horiz_msa,
 | 
			
		||||
    vpx_convolve8_vert_msa, vpx_convolve8_avg_vert_msa,
 | 
			
		||||
    vpx_convolve8_msa, vpx_convolve8_avg_msa,
 | 
			
		||||
    vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
 | 
			
		||||
    vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
 | 
			
		||||
    vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(MSA, ConvolveTest, ::testing::Values(
 | 
			
		||||
    make_tuple(4, 4, &convolve8_msa),
 | 
			
		||||
    make_tuple(8, 4, &convolve8_msa),
 | 
			
		||||
    make_tuple(4, 8, &convolve8_msa),
 | 
			
		||||
    make_tuple(8, 8, &convolve8_msa),
 | 
			
		||||
    make_tuple(16, 8, &convolve8_msa),
 | 
			
		||||
    make_tuple(8, 16, &convolve8_msa),
 | 
			
		||||
    make_tuple(16, 16, &convolve8_msa),
 | 
			
		||||
    make_tuple(32, 16, &convolve8_msa),
 | 
			
		||||
    make_tuple(16, 32, &convolve8_msa),
 | 
			
		||||
    make_tuple(32, 32, &convolve8_msa),
 | 
			
		||||
    make_tuple(64, 32, &convolve8_msa),
 | 
			
		||||
    make_tuple(32, 64, &convolve8_msa),
 | 
			
		||||
    make_tuple(64, 64, &convolve8_msa)));
 | 
			
		||||
#endif  // HAVE_MSA
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -140,4 +140,9 @@ VP9_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    ::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
 | 
			
		||||
                      ::libvpx_test::kRealTime),
 | 
			
		||||
    ::testing::Range(0, 9));
 | 
			
		||||
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    CpuSpeedTest,
 | 
			
		||||
    ::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
 | 
			
		||||
    ::testing::Range(0, 3));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -14,6 +14,7 @@
 | 
			
		||||
#include "test/i420_video_source.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "test/y4m_video_source.h"
 | 
			
		||||
#include "vpx/vpx_codec.h"
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
@@ -371,9 +372,7 @@ class DatarateTestVP9Large : public ::libvpx_test::EncoderTest,
 | 
			
		||||
        encoder->Control(VP9E_SET_SVC, 1);
 | 
			
		||||
      }
 | 
			
		||||
      vpx_svc_layer_id_t layer_id;
 | 
			
		||||
#if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
 | 
			
		||||
      layer_id.spatial_layer_id = 0;
 | 
			
		||||
#endif
 | 
			
		||||
      frame_flags_ = SetFrameFlags(video->frame(), cfg_.ts_number_layers);
 | 
			
		||||
      layer_id.temporal_layer_id = SetLayerId(video->frame(),
 | 
			
		||||
                                              cfg_.ts_number_layers);
 | 
			
		||||
@@ -565,6 +564,8 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting2TemporalLayers) {
 | 
			
		||||
  cfg_.ts_rate_decimator[0] = 2;
 | 
			
		||||
  cfg_.ts_rate_decimator[1] = 1;
 | 
			
		||||
 | 
			
		||||
  cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
 | 
			
		||||
 | 
			
		||||
  if (deadline_ == VPX_DL_REALTIME)
 | 
			
		||||
    cfg_.g_error_resilient = 1;
 | 
			
		||||
 | 
			
		||||
@@ -574,14 +575,14 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting2TemporalLayers) {
 | 
			
		||||
    cfg_.rc_target_bitrate = i;
 | 
			
		||||
    ResetModel();
 | 
			
		||||
    // 60-40 bitrate allocation for 2 temporal layers.
 | 
			
		||||
    cfg_.ts_target_bitrate[0] = 60 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
    cfg_.ts_target_bitrate[1] = cfg_.rc_target_bitrate;
 | 
			
		||||
    cfg_.layer_target_bitrate[0] = 60 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
    cfg_.layer_target_bitrate[1] = cfg_.rc_target_bitrate;
 | 
			
		||||
    ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 | 
			
		||||
    for (int j = 0; j < static_cast<int>(cfg_.ts_number_layers); ++j) {
 | 
			
		||||
      ASSERT_GE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 0.85)
 | 
			
		||||
      ASSERT_GE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 0.85)
 | 
			
		||||
          << " The datarate for the file is lower than target by too much, "
 | 
			
		||||
              "for layer: " << j;
 | 
			
		||||
      ASSERT_LE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 1.15)
 | 
			
		||||
      ASSERT_LE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 1.15)
 | 
			
		||||
          << " The datarate for the file is greater than target by too much, "
 | 
			
		||||
              "for layer: " << j;
 | 
			
		||||
    }
 | 
			
		||||
@@ -606,25 +607,27 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayers) {
 | 
			
		||||
  cfg_.ts_rate_decimator[1] = 2;
 | 
			
		||||
  cfg_.ts_rate_decimator[2] = 1;
 | 
			
		||||
 | 
			
		||||
  cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
 | 
			
		||||
 | 
			
		||||
  ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
 | 
			
		||||
                                       30, 1, 0, 200);
 | 
			
		||||
  for (int i = 200; i <= 800; i += 200) {
 | 
			
		||||
    cfg_.rc_target_bitrate = i;
 | 
			
		||||
    ResetModel();
 | 
			
		||||
    // 40-20-40 bitrate allocation for 3 temporal layers.
 | 
			
		||||
    cfg_.ts_target_bitrate[0] = 40 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
    cfg_.ts_target_bitrate[1] = 60 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
    cfg_.ts_target_bitrate[2] = cfg_.rc_target_bitrate;
 | 
			
		||||
    cfg_.layer_target_bitrate[0] = 40 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
    cfg_.layer_target_bitrate[1] = 60 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
    cfg_.layer_target_bitrate[2] = cfg_.rc_target_bitrate;
 | 
			
		||||
    ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 | 
			
		||||
    for (int j = 0; j < static_cast<int>(cfg_.ts_number_layers); ++j) {
 | 
			
		||||
      // TODO(yaowu): Work out more stable rc control strategy and
 | 
			
		||||
      //              Adjust the thresholds to be tighter than .75.
 | 
			
		||||
      ASSERT_GE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 0.75)
 | 
			
		||||
      ASSERT_GE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 0.75)
 | 
			
		||||
          << " The datarate for the file is lower than target by too much, "
 | 
			
		||||
              "for layer: " << j;
 | 
			
		||||
      // TODO(yaowu): Work out more stable rc control strategy and
 | 
			
		||||
      //              Adjust the thresholds to be tighter than 1.25.
 | 
			
		||||
      ASSERT_LE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 1.25)
 | 
			
		||||
      ASSERT_LE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 1.25)
 | 
			
		||||
          << " The datarate for the file is greater than target by too much, "
 | 
			
		||||
              "for layer: " << j;
 | 
			
		||||
    }
 | 
			
		||||
@@ -652,20 +655,22 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayersFrameDropping) {
 | 
			
		||||
  cfg_.ts_rate_decimator[1] = 2;
 | 
			
		||||
  cfg_.ts_rate_decimator[2] = 1;
 | 
			
		||||
 | 
			
		||||
  cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
 | 
			
		||||
 | 
			
		||||
  ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
 | 
			
		||||
                                       30, 1, 0, 200);
 | 
			
		||||
  cfg_.rc_target_bitrate = 200;
 | 
			
		||||
  ResetModel();
 | 
			
		||||
  // 40-20-40 bitrate allocation for 3 temporal layers.
 | 
			
		||||
  cfg_.ts_target_bitrate[0] = 40 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
  cfg_.ts_target_bitrate[1] = 60 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
  cfg_.ts_target_bitrate[2] = cfg_.rc_target_bitrate;
 | 
			
		||||
  cfg_.layer_target_bitrate[0] = 40 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
  cfg_.layer_target_bitrate[1] = 60 * cfg_.rc_target_bitrate / 100;
 | 
			
		||||
  cfg_.layer_target_bitrate[2] = cfg_.rc_target_bitrate;
 | 
			
		||||
  ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 | 
			
		||||
  for (int j = 0; j < static_cast<int>(cfg_.ts_number_layers); ++j) {
 | 
			
		||||
    ASSERT_GE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 0.85)
 | 
			
		||||
    ASSERT_GE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 0.85)
 | 
			
		||||
        << " The datarate for the file is lower than target by too much, "
 | 
			
		||||
            "for layer: " << j;
 | 
			
		||||
    ASSERT_LE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 1.15)
 | 
			
		||||
    ASSERT_LE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 1.15)
 | 
			
		||||
        << " The datarate for the file is greater than target by too much, "
 | 
			
		||||
            "for layer: " << j;
 | 
			
		||||
    // Expect some frame drops in this test: for this 200 frames test,
 | 
			
		||||
@@ -737,9 +742,237 @@ TEST_P(DatarateTestVP9Large, DenoiserOffOn) {
 | 
			
		||||
}
 | 
			
		||||
#endif  // CONFIG_VP9_TEMPORAL_DENOISING
 | 
			
		||||
 | 
			
		||||
class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
 | 
			
		||||
    public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
 | 
			
		||||
 public:
 | 
			
		||||
  DatarateOnePassCbrSvc() : EncoderTest(GET_PARAM(0)) {}
 | 
			
		||||
  virtual ~DatarateOnePassCbrSvc() {}
 | 
			
		||||
 protected:
 | 
			
		||||
  virtual void SetUp() {
 | 
			
		||||
    InitializeConfig();
 | 
			
		||||
    SetMode(GET_PARAM(1));
 | 
			
		||||
    speed_setting_ = GET_PARAM(2);
 | 
			
		||||
    ResetModel();
 | 
			
		||||
  }
 | 
			
		||||
  virtual void ResetModel() {
 | 
			
		||||
    last_pts_ = 0;
 | 
			
		||||
    bits_in_buffer_model_ = cfg_.rc_target_bitrate * cfg_.rc_buf_initial_sz;
 | 
			
		||||
    frame_number_ = 0;
 | 
			
		||||
    first_drop_ = 0;
 | 
			
		||||
    bits_total_ = 0;
 | 
			
		||||
    duration_ = 0.0;
 | 
			
		||||
    mismatch_psnr_ = 0.0;
 | 
			
		||||
    mismatch_nframes_ = 0;
 | 
			
		||||
  }
 | 
			
		||||
  virtual void BeginPassHook(unsigned int /*pass*/) {
 | 
			
		||||
  }
 | 
			
		||||
  virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
 | 
			
		||||
                                  ::libvpx_test::Encoder *encoder) {
 | 
			
		||||
    if (video->frame() == 0) {
 | 
			
		||||
      int i;
 | 
			
		||||
      for (i = 0; i < 2; ++i) {
 | 
			
		||||
        svc_params_.max_quantizers[i] = 63;
 | 
			
		||||
        svc_params_.min_quantizers[i] = 0;
 | 
			
		||||
      }
 | 
			
		||||
      svc_params_.scaling_factor_num[0] = 144;
 | 
			
		||||
      svc_params_.scaling_factor_den[0] = 288;
 | 
			
		||||
      svc_params_.scaling_factor_num[1] = 288;
 | 
			
		||||
      svc_params_.scaling_factor_den[1] = 288;
 | 
			
		||||
      encoder->Control(VP9E_SET_SVC, 1);
 | 
			
		||||
      encoder->Control(VP9E_SET_SVC_PARAMETERS, &svc_params_);
 | 
			
		||||
      encoder->Control(VP8E_SET_CPUUSED, speed_setting_);
 | 
			
		||||
      encoder->Control(VP9E_SET_TILE_COLUMNS, 0);
 | 
			
		||||
      encoder->Control(VP8E_SET_MAX_INTRA_BITRATE_PCT, 300);
 | 
			
		||||
      encoder->Control(VP9E_SET_TILE_COLUMNS, (cfg_.g_threads >> 1));
 | 
			
		||||
    }
 | 
			
		||||
    const vpx_rational_t tb = video->timebase();
 | 
			
		||||
    timebase_ = static_cast<double>(tb.num) / tb.den;
 | 
			
		||||
    duration_ = 0;
 | 
			
		||||
  }
 | 
			
		||||
  virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
 | 
			
		||||
    vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_;
 | 
			
		||||
    if (last_pts_ == 0)
 | 
			
		||||
      duration = 1;
 | 
			
		||||
    bits_in_buffer_model_ += static_cast<int64_t>(
 | 
			
		||||
        duration * timebase_ * cfg_.rc_target_bitrate * 1000);
 | 
			
		||||
    const bool key_frame = (pkt->data.frame.flags & VPX_FRAME_IS_KEY)
 | 
			
		||||
                         ? true: false;
 | 
			
		||||
    if (!key_frame) {
 | 
			
		||||
      ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame "
 | 
			
		||||
          << pkt->data.frame.pts;
 | 
			
		||||
    }
 | 
			
		||||
    const size_t frame_size_in_bits = pkt->data.frame.sz * 8;
 | 
			
		||||
    bits_in_buffer_model_ -= frame_size_in_bits;
 | 
			
		||||
    bits_total_ += frame_size_in_bits;
 | 
			
		||||
    if (!first_drop_ && duration > 1)
 | 
			
		||||
      first_drop_ = last_pts_ + 1;
 | 
			
		||||
    last_pts_ = pkt->data.frame.pts;
 | 
			
		||||
    bits_in_last_frame_ = frame_size_in_bits;
 | 
			
		||||
    ++frame_number_;
 | 
			
		||||
  }
 | 
			
		||||
  virtual void EndPassHook(void) {
 | 
			
		||||
    if (bits_total_) {
 | 
			
		||||
      const double file_size_in_kb = bits_total_ / 1000.;  // bits per kilobit
 | 
			
		||||
      duration_ = (last_pts_ + 1) * timebase_;
 | 
			
		||||
      effective_datarate_ = (bits_total_ - bits_in_last_frame_) / 1000.0
 | 
			
		||||
          / (cfg_.rc_buf_initial_sz / 1000.0 + duration_);
 | 
			
		||||
      file_datarate_ = file_size_in_kb / duration_;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual void MismatchHook(const vpx_image_t *img1,
 | 
			
		||||
                            const vpx_image_t *img2) {
 | 
			
		||||
    double mismatch_psnr = compute_psnr(img1, img2);
 | 
			
		||||
    mismatch_psnr_ += mismatch_psnr;
 | 
			
		||||
    ++mismatch_nframes_;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  unsigned int GetMismatchFrames() {
 | 
			
		||||
    return mismatch_nframes_;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  vpx_codec_pts_t last_pts_;
 | 
			
		||||
  int64_t bits_in_buffer_model_;
 | 
			
		||||
  double timebase_;
 | 
			
		||||
  int frame_number_;
 | 
			
		||||
  vpx_codec_pts_t first_drop_;
 | 
			
		||||
  int64_t bits_total_;
 | 
			
		||||
  double duration_;
 | 
			
		||||
  double file_datarate_;
 | 
			
		||||
  double effective_datarate_;
 | 
			
		||||
  size_t bits_in_last_frame_;
 | 
			
		||||
  vpx_svc_extra_cfg_t svc_params_;
 | 
			
		||||
  int speed_setting_;
 | 
			
		||||
  double mismatch_psnr_;
 | 
			
		||||
  int mismatch_nframes_;
 | 
			
		||||
};
 | 
			
		||||
static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg,
 | 
			
		||||
    const vpx_svc_extra_cfg_t *svc_params,
 | 
			
		||||
    int spatial_layers,
 | 
			
		||||
    int temporal_layers,
 | 
			
		||||
    int temporal_layering_mode,
 | 
			
		||||
    unsigned int total_rate) {
 | 
			
		||||
  int sl, spatial_layer_target;
 | 
			
		||||
  float total = 0;
 | 
			
		||||
  float alloc_ratio[VPX_MAX_LAYERS] = {0};
 | 
			
		||||
  for (sl = 0; sl < spatial_layers; ++sl) {
 | 
			
		||||
    if (svc_params->scaling_factor_den[sl] > 0) {
 | 
			
		||||
      alloc_ratio[sl] = (float)(svc_params->scaling_factor_num[sl] *
 | 
			
		||||
          1.0 / svc_params->scaling_factor_den[sl]);
 | 
			
		||||
      total += alloc_ratio[sl];
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  for (sl = 0; sl < spatial_layers; ++sl) {
 | 
			
		||||
    enc_cfg->ss_target_bitrate[sl] = spatial_layer_target =
 | 
			
		||||
        (unsigned int)(enc_cfg->rc_target_bitrate *
 | 
			
		||||
            alloc_ratio[sl] / total);
 | 
			
		||||
    const int index = sl * temporal_layers;
 | 
			
		||||
    if (temporal_layering_mode == 3) {
 | 
			
		||||
      enc_cfg->layer_target_bitrate[index] =
 | 
			
		||||
          spatial_layer_target >> 1;
 | 
			
		||||
      enc_cfg->layer_target_bitrate[index + 1] =
 | 
			
		||||
          (spatial_layer_target >> 1) + (spatial_layer_target >> 2);
 | 
			
		||||
      enc_cfg->layer_target_bitrate[index + 2] =
 | 
			
		||||
          spatial_layer_target;
 | 
			
		||||
    } else if (temporal_layering_mode == 2) {
 | 
			
		||||
      enc_cfg->layer_target_bitrate[index] =
 | 
			
		||||
          spatial_layer_target * 2 / 3;
 | 
			
		||||
      enc_cfg->layer_target_bitrate[index + 1] =
 | 
			
		||||
          spatial_layer_target;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
 | 
			
		||||
// 3 temporal layers. Run CIF clip with 1 thread.
 | 
			
		||||
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
 | 
			
		||||
  cfg_.rc_buf_initial_sz = 500;
 | 
			
		||||
  cfg_.rc_buf_optimal_sz = 500;
 | 
			
		||||
  cfg_.rc_buf_sz = 1000;
 | 
			
		||||
  cfg_.rc_min_quantizer = 0;
 | 
			
		||||
  cfg_.rc_max_quantizer = 63;
 | 
			
		||||
  cfg_.rc_end_usage = VPX_CBR;
 | 
			
		||||
  cfg_.g_lag_in_frames = 0;
 | 
			
		||||
  cfg_.ss_number_layers = 2;
 | 
			
		||||
  cfg_.ts_number_layers = 3;
 | 
			
		||||
  cfg_.ts_rate_decimator[0] = 4;
 | 
			
		||||
  cfg_.ts_rate_decimator[1] = 2;
 | 
			
		||||
  cfg_.ts_rate_decimator[2] = 1;
 | 
			
		||||
  cfg_.g_error_resilient = 1;
 | 
			
		||||
  cfg_.g_threads = 1;
 | 
			
		||||
  cfg_.temporal_layering_mode = 3;
 | 
			
		||||
  svc_params_.scaling_factor_num[0] = 144;
 | 
			
		||||
  svc_params_.scaling_factor_den[0] = 288;
 | 
			
		||||
  svc_params_.scaling_factor_num[1] = 288;
 | 
			
		||||
  svc_params_.scaling_factor_den[1] = 288;
 | 
			
		||||
  // TODO(wonkap/marpan): No frame drop for now, we need to implement correct
 | 
			
		||||
  // frame dropping for SVC.
 | 
			
		||||
  cfg_.rc_dropframe_thresh = 0;
 | 
			
		||||
  ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
 | 
			
		||||
                                       30, 1, 0, 200);
 | 
			
		||||
  // TODO(wonkap/marpan): Check that effective_datarate for each layer hits the
 | 
			
		||||
  // layer target_bitrate. Also check if test can pass at lower bitrate (~200k).
 | 
			
		||||
  for (int i = 400; i <= 800; i += 200) {
 | 
			
		||||
    cfg_.rc_target_bitrate = i;
 | 
			
		||||
    ResetModel();
 | 
			
		||||
    assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
 | 
			
		||||
        cfg_.ts_number_layers, cfg_.temporal_layering_mode,
 | 
			
		||||
        cfg_.rc_target_bitrate);
 | 
			
		||||
    ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 | 
			
		||||
    ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.85)
 | 
			
		||||
            << " The datarate for the file exceeds the target by too much!";
 | 
			
		||||
    ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
 | 
			
		||||
        << " The datarate for the file is lower than the target by too much!";
 | 
			
		||||
    EXPECT_EQ(GetMismatchFrames(), (unsigned int) 0);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
 | 
			
		||||
// 3 temporal layers. Run HD clip with 4 threads.
 | 
			
		||||
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc4threads) {
 | 
			
		||||
  cfg_.rc_buf_initial_sz = 500;
 | 
			
		||||
  cfg_.rc_buf_optimal_sz = 500;
 | 
			
		||||
  cfg_.rc_buf_sz = 1000;
 | 
			
		||||
  cfg_.rc_min_quantizer = 0;
 | 
			
		||||
  cfg_.rc_max_quantizer = 63;
 | 
			
		||||
  cfg_.rc_end_usage = VPX_CBR;
 | 
			
		||||
  cfg_.g_lag_in_frames = 0;
 | 
			
		||||
  cfg_.ss_number_layers = 2;
 | 
			
		||||
  cfg_.ts_number_layers = 3;
 | 
			
		||||
  cfg_.ts_rate_decimator[0] = 4;
 | 
			
		||||
  cfg_.ts_rate_decimator[1] = 2;
 | 
			
		||||
  cfg_.ts_rate_decimator[2] = 1;
 | 
			
		||||
  cfg_.g_error_resilient = 1;
 | 
			
		||||
  cfg_.g_threads = 4;
 | 
			
		||||
  cfg_.temporal_layering_mode = 3;
 | 
			
		||||
  svc_params_.scaling_factor_num[0] = 144;
 | 
			
		||||
  svc_params_.scaling_factor_den[0] = 288;
 | 
			
		||||
  svc_params_.scaling_factor_num[1] = 288;
 | 
			
		||||
  svc_params_.scaling_factor_den[1] = 288;
 | 
			
		||||
  // TODO(wonkap/marpan): No frame drop for now, we need to implement correct
 | 
			
		||||
  // frame dropping for SVC.
 | 
			
		||||
  cfg_.rc_dropframe_thresh = 0;
 | 
			
		||||
  ::libvpx_test::I420VideoSource video("niklas_1280_720_30.y4m", 1280, 720,
 | 
			
		||||
                                       30, 1, 0, 300);
 | 
			
		||||
  cfg_.rc_target_bitrate = 800;
 | 
			
		||||
  ResetModel();
 | 
			
		||||
  assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
 | 
			
		||||
      cfg_.ts_number_layers, cfg_.temporal_layering_mode,
 | 
			
		||||
      cfg_.rc_target_bitrate);
 | 
			
		||||
  ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 | 
			
		||||
  ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.85)
 | 
			
		||||
          << " The datarate for the file exceeds the target by too much!";
 | 
			
		||||
  ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
 | 
			
		||||
      << " The datarate for the file is lower than the target by too much!";
 | 
			
		||||
  EXPECT_EQ(GetMismatchFrames(), (unsigned int) 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES);
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large,
 | 
			
		||||
                          ::testing::Values(::libvpx_test::kOnePassGood,
 | 
			
		||||
                                            ::libvpx_test::kRealTime),
 | 
			
		||||
                          ::testing::Range(2, 7));
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(DatarateOnePassCbrSvc,
 | 
			
		||||
                          ::testing::Values(::libvpx_test::kRealTime),
 | 
			
		||||
                          ::testing::Range(5, 8));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -13,15 +13,18 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "vp9/common/vp9_entropy.h"
 | 
			
		||||
#include "vp9/common/vp9_scan.h"
 | 
			
		||||
#include "vpx/vpx_codec.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
#include "vpx_ports/mem.h"
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
@@ -37,30 +40,6 @@ static int round(double x) {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
const int kNumCoeffs = 256;
 | 
			
		||||
const double PI = 3.1415926535898;
 | 
			
		||||
void reference2_16x16_idct_2d(double *input, double *output) {
 | 
			
		||||
  double x;
 | 
			
		||||
  for (int l = 0; l < 16; ++l) {
 | 
			
		||||
    for (int k = 0; k < 16; ++k) {
 | 
			
		||||
      double s = 0;
 | 
			
		||||
      for (int i = 0; i < 16; ++i) {
 | 
			
		||||
        for (int j = 0; j < 16; ++j) {
 | 
			
		||||
          x = cos(PI * j * (l + 0.5) / 16.0) *
 | 
			
		||||
              cos(PI * i * (k + 0.5) / 16.0) *
 | 
			
		||||
              input[i * 16 + j] / 256;
 | 
			
		||||
          if (i != 0)
 | 
			
		||||
            x *= sqrt(2.0);
 | 
			
		||||
          if (j != 0)
 | 
			
		||||
            x *= sqrt(2.0);
 | 
			
		||||
          s += x;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      output[k*16+l] = s;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const double C1 = 0.995184726672197;
 | 
			
		||||
const double C2 = 0.98078528040323;
 | 
			
		||||
const double C3 = 0.956940335732209;
 | 
			
		||||
@@ -269,12 +248,12 @@ typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t>
 | 
			
		||||
 | 
			
		||||
void fdct16x16_ref(const int16_t *in, tran_low_t *out, int stride,
 | 
			
		||||
                   int /*tx_type*/) {
 | 
			
		||||
  vp9_fdct16x16_c(in, out, stride);
 | 
			
		||||
  vpx_fdct16x16_c(in, out, stride);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
 | 
			
		||||
                   int /*tx_type*/) {
 | 
			
		||||
  vp9_idct16x16_256_add_c(in, dest, stride);
 | 
			
		||||
  vpx_idct16x16_256_add_c(in, dest, stride);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void fht16x16_ref(const int16_t *in, tran_low_t *out, int stride,
 | 
			
		||||
@@ -289,11 +268,11 @@ void iht16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
void idct16x16_10(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct16x16_256_add_c(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct16x16_256_add_c(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct16x16_12(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct16x16_256_add_c(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct16x16_256_add_c(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct16x16_10_ref(const tran_low_t *in, uint8_t *out, int stride,
 | 
			
		||||
@@ -315,28 +294,28 @@ void iht16x16_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct16x16_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct16x16_10_add_c(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct16x16_10_add_c(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct16x16_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct16x16_10_add_c(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct16x16_10_add_c(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2
 | 
			
		||||
void idct16x16_256_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct16x16_256_add_sse2(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct16x16_256_add_sse2(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct16x16_256_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct16x16_256_add_sse2(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct16x16_256_add_sse2(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct16x16_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct16x16_10_add_sse2(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct16x16_10_add_sse2(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct16x16_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct16x16_10_add_sse2(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct16x16_10_add_sse2(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
#endif  // HAVE_SSE2
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
@@ -356,13 +335,13 @@ class Trans16x16TestBase {
 | 
			
		||||
    int64_t total_error = 0;
 | 
			
		||||
    const int count_test_block = 10000;
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED(16, int16_t, test_input_block[kNumCoeffs]);
 | 
			
		||||
      DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
 | 
			
		||||
      DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
      DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
      DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
      // Initialize a test block with input range [-mask_, mask_].
 | 
			
		||||
@@ -416,9 +395,9 @@ class Trans16x16TestBase {
 | 
			
		||||
  void RunCoeffCheck() {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 1000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, input_block[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
      // Initialize a test block with input range [-mask_, mask_].
 | 
			
		||||
@@ -437,15 +416,13 @@ class Trans16x16TestBase {
 | 
			
		||||
  void RunMemCheck() {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 1000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
      // Initialize a test block with input range [-mask_, mask_].
 | 
			
		||||
      for (int j = 0; j < kNumCoeffs; ++j) {
 | 
			
		||||
        input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
 | 
			
		||||
        input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
 | 
			
		||||
      }
 | 
			
		||||
      if (i == 0) {
 | 
			
		||||
@@ -472,24 +449,19 @@ class Trans16x16TestBase {
 | 
			
		||||
  void RunQuantCheck(int dc_thred, int ac_thred) {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 100000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, ref, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, ref16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
      // Initialize a test block with input range [-mask_, mask_].
 | 
			
		||||
      for (int j = 0; j < kNumCoeffs; ++j) {
 | 
			
		||||
        if (bit_depth_ == VPX_BITS_8)
 | 
			
		||||
          input_block[j] = rnd.Rand8() - rnd.Rand8();
 | 
			
		||||
        else
 | 
			
		||||
          input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
 | 
			
		||||
        input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
 | 
			
		||||
      }
 | 
			
		||||
      if (i == 0)
 | 
			
		||||
@@ -502,11 +474,11 @@ class Trans16x16TestBase {
 | 
			
		||||
      fwd_txfm_ref(input_extreme_block, output_ref_block, pitch_, tx_type_);
 | 
			
		||||
 | 
			
		||||
      // clear reconstructed pixel buffers
 | 
			
		||||
      vpx_memset(dst, 0, kNumCoeffs * sizeof(uint8_t));
 | 
			
		||||
      vpx_memset(ref, 0, kNumCoeffs * sizeof(uint8_t));
 | 
			
		||||
      memset(dst, 0, kNumCoeffs * sizeof(uint8_t));
 | 
			
		||||
      memset(ref, 0, kNumCoeffs * sizeof(uint8_t));
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
      vpx_memset(dst16, 0, kNumCoeffs * sizeof(uint16_t));
 | 
			
		||||
      vpx_memset(ref16, 0, kNumCoeffs * sizeof(uint16_t));
 | 
			
		||||
      memset(dst16, 0, kNumCoeffs * sizeof(uint16_t));
 | 
			
		||||
      memset(ref16, 0, kNumCoeffs * sizeof(uint16_t));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
      // quantization with maximum allowed step sizes
 | 
			
		||||
@@ -539,13 +511,13 @@ class Trans16x16TestBase {
 | 
			
		||||
  void RunInvAccuracyCheck() {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 1000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
@@ -599,12 +571,12 @@ class Trans16x16TestBase {
 | 
			
		||||
    const int count_test_block = 10000;
 | 
			
		||||
    const int eob = 10;
 | 
			
		||||
    const int16_t *scan = vp9_default_scan_orders[TX_16X16].scan;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, ref, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, ref16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
@@ -826,14 +798,14 @@ using std::tr1::make_tuple;
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, Trans16x16DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct16x16_c, &idct16x16_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct16x16_c, &idct16x16_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c, &vp9_idct16x16_256_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, Trans16x16DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c, &vp9_idct16x16_256_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
@@ -866,16 +838,16 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    NEON, Trans16x16DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c,
 | 
			
		||||
                   &vp9_idct16x16_256_add_neon, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c,
 | 
			
		||||
                   &vpx_idct16x16_256_add_neon, 0, VPX_BITS_8)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans16x16DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_sse2,
 | 
			
		||||
                   &vp9_idct16x16_256_add_sse2, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_sse2,
 | 
			
		||||
                   &vpx_idct16x16_256_add_sse2, 0, VPX_BITS_8)));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans16x16HT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
@@ -893,27 +865,19 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans16x16DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct16x16_sse2,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct16x16_sse2,
 | 
			
		||||
                   &idct16x16_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct16x16_c,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct16x16_c,
 | 
			
		||||
                   &idct16x16_256_add_10_sse2, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct16x16_sse2,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct16x16_sse2,
 | 
			
		||||
                   &idct16x16_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct16x16_c,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct16x16_c,
 | 
			
		||||
                   &idct16x16_256_add_12_sse2, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_sse2,
 | 
			
		||||
                   &vp9_idct16x16_256_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_sse2,
 | 
			
		||||
                   &vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans16x16HT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 1, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 2, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 3, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 1, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 2, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 3, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
 | 
			
		||||
@@ -934,11 +898,19 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
                   &idct16x16_256_add_12_sse2, 3167, VPX_BITS_12)));
 | 
			
		||||
#endif  // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSSE3, Trans16x16DCT,
 | 
			
		||||
    MSA, Trans16x16DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c, &vp9_idct16x16_256_add_ssse3, 0,
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_msa,
 | 
			
		||||
                   &vpx_idct16x16_256_add_msa, 0, VPX_BITS_8)));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, Trans16x16HT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 1, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 2, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 3,
 | 
			
		||||
                   VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
#endif  // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -13,16 +13,18 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "vp9/common/vp9_entropy.h"
 | 
			
		||||
#include "vpx/vpx_codec.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
#include "vpx_ports/mem.h"
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
@@ -80,15 +82,15 @@ typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t>
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
void idct32x32_8(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct32x32_1024_add_c(in, out, stride, 8);
 | 
			
		||||
  vpx_highbd_idct32x32_1024_add_c(in, out, stride, 8);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct32x32_1024_add_c(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct32x32_1024_add_c(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct32x32_1024_add_c(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct32x32_1024_add_c(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
@@ -119,13 +121,13 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
 | 
			
		||||
  uint32_t max_error = 0;
 | 
			
		||||
  int64_t total_error = 0;
 | 
			
		||||
  const int count_test_block = 10000;
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, test_input_block[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
@@ -184,16 +186,16 @@ TEST_P(Trans32x32Test, CoeffCheck) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  const int count_test_block = 1000;
 | 
			
		||||
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, input_block[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
    for (int j = 0; j < kNumCoeffs; ++j)
 | 
			
		||||
      input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
 | 
			
		||||
 | 
			
		||||
    const int stride = 32;
 | 
			
		||||
    vp9_fdct32x32_c(input_block, output_ref_block, stride);
 | 
			
		||||
    vpx_fdct32x32_c(input_block, output_ref_block, stride);
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(fwd_txfm_(input_block, output_block, stride));
 | 
			
		||||
 | 
			
		||||
    if (version_ == 0) {
 | 
			
		||||
@@ -212,15 +214,13 @@ TEST_P(Trans32x32Test, MemCheck) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  const int count_test_block = 2000;
 | 
			
		||||
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
    // Initialize a test block with input range [-mask_, mask_].
 | 
			
		||||
    for (int j = 0; j < kNumCoeffs; ++j) {
 | 
			
		||||
      input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
 | 
			
		||||
      input_extreme_block[j] = rnd.Rand8() & 1 ? mask_ : -mask_;
 | 
			
		||||
    }
 | 
			
		||||
    if (i == 0) {
 | 
			
		||||
@@ -232,7 +232,7 @@ TEST_P(Trans32x32Test, MemCheck) {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const int stride = 32;
 | 
			
		||||
    vp9_fdct32x32_c(input_extreme_block, output_ref_block, stride);
 | 
			
		||||
    vpx_fdct32x32_c(input_extreme_block, output_ref_block, stride);
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
        fwd_txfm_(input_extreme_block, output_block, stride));
 | 
			
		||||
 | 
			
		||||
@@ -257,13 +257,13 @@ TEST_P(Trans32x32Test, MemCheck) {
 | 
			
		||||
TEST_P(Trans32x32Test, InverseAccuracy) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  const int count_test_block = 1000;
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
@@ -315,61 +315,61 @@ using std::tr1::make_tuple;
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, Trans32x32Test,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct32x32_c,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct32x32_c,
 | 
			
		||||
                   &idct32x32_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct32x32_rd_c,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct32x32_rd_c,
 | 
			
		||||
                   &idct32x32_10, 1, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct32x32_c,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct32x32_c,
 | 
			
		||||
                   &idct32x32_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct32x32_rd_c,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct32x32_rd_c,
 | 
			
		||||
                   &idct32x32_12, 1, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_rd_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_rd_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, Trans32x32Test,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_rd_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_rd_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    NEON, Trans32x32Test,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_neon, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_rd_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_neon, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_rd_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans32x32Test,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_sse2,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_rd_sse2,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_sse2,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_rd_sse2,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans32x32Test,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1,
 | 
			
		||||
                   VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1,
 | 
			
		||||
                   VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_sse2, &vp9_idct32x32_1024_add_c, 0,
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_sse2, &vpx_idct32x32_1024_add_c, 0,
 | 
			
		||||
                   VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_rd_sse2, &vp9_idct32x32_1024_add_c, 1,
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_rd_sse2, &vpx_idct32x32_1024_add_c, 1,
 | 
			
		||||
                   VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
@@ -377,9 +377,19 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    AVX2, Trans32x32Test,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_avx2,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_rd_avx2,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_avx2,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_rd_avx2,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, Trans32x32Test,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_msa,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_rd_msa,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -7,10 +7,11 @@
 | 
			
		||||
 *  in the file PATENTS.  All contributing project authors may
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "test/ivf_video_source.h"
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "test/ivf_video_source.h"
 | 
			
		||||
#include "vpx/vp8dx.h"
 | 
			
		||||
#include "vpx/vpx_decoder.h"
 | 
			
		||||
 | 
			
		||||
@@ -25,6 +26,9 @@ TEST(DecodeAPI, InvalidParams) {
 | 
			
		||||
#endif
 | 
			
		||||
#if CONFIG_VP9_DECODER
 | 
			
		||||
    &vpx_codec_vp9_dx_algo,
 | 
			
		||||
#endif
 | 
			
		||||
#if CONFIG_VP10_DECODER
 | 
			
		||||
    &vpx_codec_vp10_dx_algo,
 | 
			
		||||
#endif
 | 
			
		||||
  };
 | 
			
		||||
  uint8_t buf[1] = {0};
 | 
			
		||||
@@ -129,8 +133,13 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
 | 
			
		||||
  vpx_codec_ctx_t dec;
 | 
			
		||||
  EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
 | 
			
		||||
  const uint32_t frame_size = static_cast<uint32_t>(video.frame_size());
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  EXPECT_EQ(VPX_CODEC_MEM_ERROR,
 | 
			
		||||
            vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
 | 
			
		||||
#else
 | 
			
		||||
  EXPECT_EQ(VPX_CODEC_UNSUP_BITSTREAM,
 | 
			
		||||
            vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
 | 
			
		||||
#endif
 | 
			
		||||
  vpx_codec_iter_t iter = NULL;
 | 
			
		||||
  EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,9 +7,11 @@
 | 
			
		||||
 *  in the file PATENTS.  All contributing project authors may
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "test/codec_factory.h"
 | 
			
		||||
#include "test/decode_test_driver.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/video_source.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -10,13 +10,14 @@
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "test/codec_factory.h"
 | 
			
		||||
#include "test/encode_test_driver.h"
 | 
			
		||||
#include "test/decode_test_driver.h"
 | 
			
		||||
#include "test/encode_test_driver.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/video_source.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
namespace libvpx_test {
 | 
			
		||||
void Encoder::InitEncoder(VideoSource *video) {
 | 
			
		||||
@@ -29,8 +30,6 @@ void Encoder::InitEncoder(VideoSource *video) {
 | 
			
		||||
    cfg_.g_timebase = video->timebase();
 | 
			
		||||
    cfg_.rc_twopass_stats_in = stats_->buf();
 | 
			
		||||
 | 
			
		||||
    // Default to 1 thread.
 | 
			
		||||
    cfg_.g_threads = 1;
 | 
			
		||||
    res = vpx_codec_enc_init(&encoder_, CodecInterface(), &cfg_,
 | 
			
		||||
                             init_flags_);
 | 
			
		||||
    ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
			
		||||
@@ -43,6 +42,15 @@ void Encoder::InitEncoder(VideoSource *video) {
 | 
			
		||||
                               log2_tile_columns);
 | 
			
		||||
      ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
			
		||||
    } else
 | 
			
		||||
#endif
 | 
			
		||||
#if CONFIG_VP10_ENCODER
 | 
			
		||||
    if (CodecInterface() == &vpx_codec_vp10_cx_algo) {
 | 
			
		||||
      // Default to 1 tile column for VP10.
 | 
			
		||||
      const int log2_tile_columns = 0;
 | 
			
		||||
      res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
 | 
			
		||||
                               log2_tile_columns);
 | 
			
		||||
      ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
			
		||||
    } else
 | 
			
		||||
#endif
 | 
			
		||||
    {
 | 
			
		||||
#if CONFIG_VP8_ENCODER
 | 
			
		||||
@@ -187,6 +195,7 @@ void EncoderTest::RunLoop(VideoSource *video) {
 | 
			
		||||
 | 
			
		||||
    video->Begin();
 | 
			
		||||
    encoder->InitEncoder(video);
 | 
			
		||||
    ASSERT_FALSE(::testing::Test::HasFatalFailure());
 | 
			
		||||
 | 
			
		||||
    unsigned long dec_init_flags = 0;  // NOLINT
 | 
			
		||||
    // Use fragment decoder if encoder outputs partitions.
 | 
			
		||||
 
 | 
			
		||||
@@ -13,12 +13,13 @@
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <vector>
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
#include "vpx/vpx_encoder.h"
 | 
			
		||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
 | 
			
		||||
#include "vpx/vp8cx.h"
 | 
			
		||||
#endif
 | 
			
		||||
#include "vpx/vpx_encoder.h"
 | 
			
		||||
 | 
			
		||||
namespace libvpx_test {
 | 
			
		||||
 | 
			
		||||
@@ -133,7 +134,11 @@ class Encoder {
 | 
			
		||||
    ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
 | 
			
		||||
  void Control(int ctrl_id, struct vpx_svc_parameters *arg) {
 | 
			
		||||
    const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
 | 
			
		||||
    ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
			
		||||
  }
 | 
			
		||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
 | 
			
		||||
  void Control(int ctrl_id, vpx_active_map_t *arg) {
 | 
			
		||||
    const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
 | 
			
		||||
    ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
 | 
			
		||||
@@ -183,7 +188,10 @@ class EncoderTest {
 | 
			
		||||
 protected:
 | 
			
		||||
  explicit EncoderTest(const CodecFactory *codec)
 | 
			
		||||
      : codec_(codec), abort_(false), init_flags_(0), frame_flags_(0),
 | 
			
		||||
        last_pts_(0) {}
 | 
			
		||||
        last_pts_(0) {
 | 
			
		||||
    // Default to 1 thread.
 | 
			
		||||
    cfg_.g_threads = 1;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual ~EncoderTest() {}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -20,10 +20,11 @@ const int kMaxErrorFrames = 12;
 | 
			
		||||
const int kMaxDroppableFrames = 12;
 | 
			
		||||
 | 
			
		||||
class ErrorResilienceTestLarge : public ::libvpx_test::EncoderTest,
 | 
			
		||||
    public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
 | 
			
		||||
    public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, bool> {
 | 
			
		||||
 protected:
 | 
			
		||||
  ErrorResilienceTestLarge()
 | 
			
		||||
      : EncoderTest(GET_PARAM(0)),
 | 
			
		||||
        svc_support_(GET_PARAM(2)),
 | 
			
		||||
        psnr_(0.0),
 | 
			
		||||
        nframes_(0),
 | 
			
		||||
        mismatch_psnr_(0.0),
 | 
			
		||||
@@ -193,6 +194,8 @@ class ErrorResilienceTestLarge : public ::libvpx_test::EncoderTest,
 | 
			
		||||
     pattern_switch_ = frame_switch;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
  bool svc_support_;
 | 
			
		||||
 | 
			
		||||
 private:
 | 
			
		||||
  double psnr_;
 | 
			
		||||
  unsigned int nframes_;
 | 
			
		||||
@@ -302,6 +305,10 @@ TEST_P(ErrorResilienceTestLarge, DropFramesWithoutRecovery) {
 | 
			
		||||
// two layer temporal pattern. The base layer does not predict from the top
 | 
			
		||||
// layer, so successful decoding is expected.
 | 
			
		||||
TEST_P(ErrorResilienceTestLarge, 2LayersDropEnhancement) {
 | 
			
		||||
  // This test doesn't run if SVC is not supported.
 | 
			
		||||
  if (!svc_support_)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  const vpx_rational timebase = { 33333333, 1000000000 };
 | 
			
		||||
  cfg_.g_timebase = timebase;
 | 
			
		||||
  cfg_.rc_target_bitrate = 500;
 | 
			
		||||
@@ -347,6 +354,10 @@ TEST_P(ErrorResilienceTestLarge, 2LayersDropEnhancement) {
 | 
			
		||||
// for a two layer temporal pattern, where at some point in the
 | 
			
		||||
// sequence, the LAST ref is not used anymore.
 | 
			
		||||
TEST_P(ErrorResilienceTestLarge, 2LayersNoRefLast) {
 | 
			
		||||
  // This test doesn't run if SVC is not supported.
 | 
			
		||||
  if (!svc_support_)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  const vpx_rational timebase = { 33333333, 1000000000 };
 | 
			
		||||
  cfg_.g_timebase = timebase;
 | 
			
		||||
  cfg_.rc_target_bitrate = 500;
 | 
			
		||||
@@ -579,8 +590,13 @@ TEST_P(ErrorResilienceTestLargeCodecControls, CodecControl3TemporalLayers) {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES);
 | 
			
		||||
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
 | 
			
		||||
                          ::testing::Values(true));
 | 
			
		||||
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLargeCodecControls,
 | 
			
		||||
                          ONE_PASS_TEST_MODES);
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES);
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
 | 
			
		||||
                          ::testing::Values(true));
 | 
			
		||||
// SVC-related tests don't run for VP10 since SVC is not supported.
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
 | 
			
		||||
                           ::testing::Values(false));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -13,15 +13,17 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "vp9/common/vp9_entropy.h"
 | 
			
		||||
#include "vpx/vpx_codec.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
#include "vpx_ports/mem.h"
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
@@ -39,7 +41,7 @@ typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht4x4Param;
 | 
			
		||||
 | 
			
		||||
void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride,
 | 
			
		||||
                 int tx_type) {
 | 
			
		||||
  vp9_fdct4x4_c(in, out, stride);
 | 
			
		||||
  vpx_fdct4x4_c(in, out, stride);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
 | 
			
		||||
@@ -53,11 +55,11 @@ void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
void idct4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct4x4_16_add_c(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct4x4_16_add_c(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct4x4_12(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct4x4_16_add_c(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct4x4_16_add_c(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void iht4x4_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
 | 
			
		||||
@@ -69,20 +71,20 @@ void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void iwht4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_iwht4x4_16_add_c(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_iwht4x4_16_add_c(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void iwht4x4_12(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_iwht4x4_16_add_c(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_iwht4x4_16_add_c(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2
 | 
			
		||||
void idct4x4_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct4x4_16_add_sse2(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct4x4_16_add_sse2(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct4x4_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct4x4_16_add_sse2(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct4x4_16_add_sse2(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
#endif  // HAVE_SSE2
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
@@ -102,13 +104,13 @@ class Trans4x4TestBase {
 | 
			
		||||
    int64_t total_error = 0;
 | 
			
		||||
    const int count_test_block = 10000;
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED(16, int16_t, test_input_block[kNumCoeffs]);
 | 
			
		||||
      DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
 | 
			
		||||
      DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
      DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
 | 
			
		||||
      DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
      DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
      // Initialize a test block with input range [-255, 255].
 | 
			
		||||
@@ -142,6 +144,7 @@ class Trans4x4TestBase {
 | 
			
		||||
        const uint32_t diff =
 | 
			
		||||
            bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
 | 
			
		||||
#else
 | 
			
		||||
        ASSERT_EQ(VPX_BITS_8, bit_depth_);
 | 
			
		||||
        const uint32_t diff = dst[j] - src[j];
 | 
			
		||||
#endif
 | 
			
		||||
        const uint32_t error = diff * diff;
 | 
			
		||||
@@ -163,9 +166,9 @@ class Trans4x4TestBase {
 | 
			
		||||
  void RunCoeffCheck() {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 5000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, input_block[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
      // Initialize a test block with input range [-mask_, mask_].
 | 
			
		||||
@@ -184,15 +187,13 @@ class Trans4x4TestBase {
 | 
			
		||||
  void RunMemCheck() {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 5000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
      // Initialize a test block with input range [-mask_, mask_].
 | 
			
		||||
      for (int j = 0; j < kNumCoeffs; ++j) {
 | 
			
		||||
        input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
 | 
			
		||||
        input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
 | 
			
		||||
      }
 | 
			
		||||
      if (i == 0) {
 | 
			
		||||
@@ -219,13 +220,13 @@ class Trans4x4TestBase {
 | 
			
		||||
  void RunInvAccuracyCheck(int limit) {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 1000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
@@ -418,14 +419,14 @@ using std::tr1::make_tuple;
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, Trans4x4DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_fdct4x4_c, &vp9_idct4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, Trans4x4DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct4x4_c, &vp9_idct4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
@@ -460,20 +461,20 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, Trans4x4WHT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    NEON, Trans4x4DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct4x4_c,
 | 
			
		||||
                   &vp9_idct4x4_16_add_neon, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_c,
 | 
			
		||||
                   &vpx_idct4x4_16_add_neon, 0, VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
@@ -491,15 +492,23 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MMX, Trans4x4WHT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fwht4x4_mmx, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vp9_fwht4x4_mmx, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if CONFIG_USE_X86INC && HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && \
 | 
			
		||||
    !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans4x4WHT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_sse2, 0, VPX_BITS_8)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans4x4DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct4x4_sse2,
 | 
			
		||||
                   &vp9_idct4x4_16_add_sse2, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_sse2,
 | 
			
		||||
                   &vpx_idct4x4_16_add_sse2, 0, VPX_BITS_8)));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans4x4HT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
@@ -513,27 +522,33 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans4x4DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct4x4_c,    &idct4x4_10_sse2, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct4x4_c,    &idct4x4_12_sse2, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_fdct4x4_sse2,      &vp9_idct4x4_16_add_c, 0,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct4x4_c,    &idct4x4_10_sse2, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct4x4_c,    &idct4x4_12_sse2, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_sse2,      &vpx_idct4x4_16_add_c, 0,
 | 
			
		||||
                   VPX_BITS_8)));
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Trans4x4HT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 1, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 2, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 3, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 0, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 1, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 2, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 3, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, Trans4x4DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_msa, &vpx_idct4x4_16_add_msa, 0, VPX_BITS_8)));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, Trans4x4HT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fht4x4_msa, &vp9_iht4x4_16_add_msa, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht4x4_msa, &vp9_iht4x4_16_add_msa, 1, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht4x4_msa, &vp9_iht4x4_16_add_msa, 2, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht4x4_msa, &vp9_iht4x4_16_add_msa, 3, VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -13,18 +13,40 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "vp9/common/vp9_entropy.h"
 | 
			
		||||
#include "vp9/common/vp9_scan.h"
 | 
			
		||||
#include "vpx/vpx_codec.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
#include "vpx_ports/mem.h"
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
const int kNumCoeffs = 64;
 | 
			
		||||
const double kPi = 3.141592653589793238462643383279502884;
 | 
			
		||||
 | 
			
		||||
const int kSignBiasMaxDiff255 = 1500;
 | 
			
		||||
const int kSignBiasMaxDiff15 = 10000;
 | 
			
		||||
 | 
			
		||||
typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride);
 | 
			
		||||
typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride);
 | 
			
		||||
typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride,
 | 
			
		||||
                        int tx_type);
 | 
			
		||||
typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride,
 | 
			
		||||
                        int tx_type);
 | 
			
		||||
 | 
			
		||||
typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct8x8Param;
 | 
			
		||||
typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht8x8Param;
 | 
			
		||||
typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param;
 | 
			
		||||
 | 
			
		||||
void reference_8x8_dct_1d(const double in[8], double out[8], int stride) {
 | 
			
		||||
  const double kInvSqrt2 = 0.707106781186547524400844362104;
 | 
			
		||||
  for (int k = 0; k < 8; k++) {
 | 
			
		||||
@@ -59,26 +81,9 @@ void reference_8x8_dct_2d(const int16_t input[kNumCoeffs],
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
const int kSignBiasMaxDiff255 = 1500;
 | 
			
		||||
const int kSignBiasMaxDiff15 = 10000;
 | 
			
		||||
 | 
			
		||||
typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride);
 | 
			
		||||
typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride);
 | 
			
		||||
typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride,
 | 
			
		||||
                        int tx_type);
 | 
			
		||||
typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride,
 | 
			
		||||
                        int tx_type);
 | 
			
		||||
 | 
			
		||||
typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct8x8Param;
 | 
			
		||||
typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht8x8Param;
 | 
			
		||||
typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param;
 | 
			
		||||
 | 
			
		||||
void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
 | 
			
		||||
  vp9_fdct8x8_c(in, out, stride);
 | 
			
		||||
  vpx_fdct8x8_c(in, out, stride);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
 | 
			
		||||
@@ -87,11 +92,11 @@ void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
void idct8x8_10(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct8x8_64_add_c(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct8x8_64_add_c(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct8x8_12(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct8x8_64_add_c(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct8x8_64_add_c(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void iht8x8_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
 | 
			
		||||
@@ -103,28 +108,28 @@ void iht8x8_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct8x8_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct8x8_10_add_c(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct8x8_10_add_c(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct8x8_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct8x8_10_add_c(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct8x8_10_add_c(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2
 | 
			
		||||
void idct8x8_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct8x8_10_add_sse2(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct8x8_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct8x8_10_add_sse2(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct8x8_64_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct8x8_64_add_sse2(in, out, stride, 10);
 | 
			
		||||
  vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void idct8x8_64_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
 | 
			
		||||
  vp9_highbd_idct8x8_64_add_sse2(in, out, stride, 12);
 | 
			
		||||
  vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 12);
 | 
			
		||||
}
 | 
			
		||||
#endif  // HAVE_SSE2
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
@@ -139,8 +144,8 @@ class FwdTrans8x8TestBase {
 | 
			
		||||
 | 
			
		||||
  void RunSignBiasCheck() {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_output_block, 64);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, test_input_block[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, test_output_block[64]);
 | 
			
		||||
    int count_sign_block[64][2];
 | 
			
		||||
    const int count_test_block = 100000;
 | 
			
		||||
 | 
			
		||||
@@ -210,13 +215,13 @@ class FwdTrans8x8TestBase {
 | 
			
		||||
    int max_error = 0;
 | 
			
		||||
    int total_error = 0;
 | 
			
		||||
    const int count_test_block = 100000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, src, 64);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, test_input_block[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, dst[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, src[64]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, 64);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, dst16[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, src16[64]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
@@ -287,14 +292,14 @@ class FwdTrans8x8TestBase {
 | 
			
		||||
    int total_error = 0;
 | 
			
		||||
    int total_coeff_error = 0;
 | 
			
		||||
    const int count_test_block = 100000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_temp_block, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, src, 64);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, test_input_block[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, ref_temp_block[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, dst[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, src[64]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, 64);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, 64);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, dst16[64]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, src16[64]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
@@ -376,13 +381,13 @@ class FwdTrans8x8TestBase {
 | 
			
		||||
  void RunInvAccuracyCheck() {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 1000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
@@ -434,9 +439,9 @@ class FwdTrans8x8TestBase {
 | 
			
		||||
  void RunFwdAccuracyCheck() {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 1000;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_r, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, coeff_r[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
      double out_r[kNumCoeffs];
 | 
			
		||||
@@ -464,12 +469,12 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
 | 
			
		||||
    ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
    const int count_test_block = 10000;
 | 
			
		||||
    const int eob = 12;
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint8_t, ref, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED_ARRAY(16, uint16_t, ref16, kNumCoeffs);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
 | 
			
		||||
    DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
 | 
			
		||||
#endif
 | 
			
		||||
    const int16_t *scan = vp9_default_scan_orders[TX_8X8].scan;
 | 
			
		||||
 | 
			
		||||
@@ -653,14 +658,14 @@ using std::tr1::make_tuple;
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, FwdTrans8x8DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12)));
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, FwdTrans8x8DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8)));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
@@ -680,8 +685,6 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
        make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8)));
 | 
			
		||||
#else
 | 
			
		||||
// TODO(jingning): re-enable after this handles the expanded range [0, 65535]
 | 
			
		||||
// returned from Rand16().
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, FwdTrans8x8HT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
@@ -692,12 +695,10 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
// TODO(jingning): re-enable after this handles the expanded range [0, 65535]
 | 
			
		||||
// returned from Rand16().
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    NEON, FwdTrans8x8DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_neon, &vp9_idct8x8_64_add_neon, 0,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_neon, &vpx_idct8x8_64_add_neon, 0,
 | 
			
		||||
                   VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
@@ -712,12 +713,10 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
#endif  // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
// TODO(jingning): re-enable after these handle the expanded range [0, 65535]
 | 
			
		||||
// returned from Rand16().
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, FwdTrans8x8DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_sse2, &vp9_idct8x8_64_add_sse2, 0,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_sse2, &vpx_idct8x8_64_add_sse2, 0,
 | 
			
		||||
                   VPX_BITS_8)));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, FwdTrans8x8HT,
 | 
			
		||||
@@ -732,18 +731,16 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, FwdTrans8x8DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_sse2, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct8x8_c,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_sse2, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct8x8_c,
 | 
			
		||||
                   &idct8x8_64_add_10_sse2, 12, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct8x8_sse2,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct8x8_sse2,
 | 
			
		||||
                   &idct8x8_64_add_10_sse2, 12, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct8x8_c,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct8x8_c,
 | 
			
		||||
                   &idct8x8_64_add_12_sse2, 12, VPX_BITS_12),
 | 
			
		||||
        make_tuple(&vp9_highbd_fdct8x8_sse2,
 | 
			
		||||
        make_tuple(&vpx_highbd_fdct8x8_sse2,
 | 
			
		||||
                   &idct8x8_64_add_12_sse2, 12, VPX_BITS_12)));
 | 
			
		||||
 | 
			
		||||
// TODO(jingning): re-enable after these handle the expanded range [0, 65535]
 | 
			
		||||
// returned from Rand16().
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, FwdTrans8x8HT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
@@ -767,14 +764,26 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
                   &idct8x8_64_add_12_sse2, 6225, VPX_BITS_12)));
 | 
			
		||||
#endif  // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH && \
 | 
			
		||||
    !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
// TODO(jingning): re-enable after this handles the expanded range [0, 65535]
 | 
			
		||||
// returned from Rand16().
 | 
			
		||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
 | 
			
		||||
    !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSSE3, FwdTrans8x8DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_ssse3, &vp9_idct8x8_64_add_ssse3, 0,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_ssse3, &vpx_idct8x8_64_add_ssse3, 0,
 | 
			
		||||
                   VPX_BITS_8)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, FwdTrans8x8DCT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_msa, &vpx_idct8x8_64_add_msa, 0, VPX_BITS_8)));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, FwdTrans8x8HT,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 0, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 1, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 2, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 3, VPX_BITS_8)));
 | 
			
		||||
#endif  // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -74,7 +74,7 @@ TEST_F(VP9FrameSizeTestsLarge, ValidSizes) {
 | 
			
		||||
  // size or almost 1 gig of memory.
 | 
			
		||||
  // In total the allocations will exceed 2GiB which may cause a failure with
 | 
			
		||||
  // mingw + wine, use a smaller size in that case.
 | 
			
		||||
#if defined(_WIN32) && !defined(_WIN64)
 | 
			
		||||
#if defined(_WIN32) && !defined(_WIN64) || defined(__OS2__)
 | 
			
		||||
  video.SetSize(4096, 3072);
 | 
			
		||||
#else
 | 
			
		||||
  video.SetSize(4096, 4096);
 | 
			
		||||
 
 | 
			
		||||
@@ -14,8 +14,7 @@
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
 | 
			
		||||
@@ -68,43 +67,6 @@ void reference_dct_2d(int16_t input[64], double output[64]) {
 | 
			
		||||
    output[i] *= 2;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void reference_idct_1d(double input[8], double output[8]) {
 | 
			
		||||
  const double kPi = 3.141592653589793238462643383279502884;
 | 
			
		||||
  const double kSqrt2 = 1.414213562373095048801688724209698;
 | 
			
		||||
  for (int k = 0; k < 8; k++) {
 | 
			
		||||
    output[k] = 0.0;
 | 
			
		||||
    for (int n = 0; n < 8; n++) {
 | 
			
		||||
      output[k] += input[n]*cos(kPi*(2*k+1)*n/16.0);
 | 
			
		||||
      if (n == 0)
 | 
			
		||||
        output[k] = output[k]/kSqrt2;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void reference_idct_2d(double input[64], int16_t output[64]) {
 | 
			
		||||
  double out[64], out2[64];
 | 
			
		||||
  // First transform rows
 | 
			
		||||
  for (int i = 0; i < 8; ++i) {
 | 
			
		||||
    double temp_in[8], temp_out[8];
 | 
			
		||||
    for (int j = 0; j < 8; ++j)
 | 
			
		||||
      temp_in[j] = input[j + i*8];
 | 
			
		||||
    reference_idct_1d(temp_in, temp_out);
 | 
			
		||||
    for (int j = 0; j < 8; ++j)
 | 
			
		||||
      out[j + i*8] = temp_out[j];
 | 
			
		||||
  }
 | 
			
		||||
  // Then transform columns
 | 
			
		||||
  for (int i = 0; i < 8; ++i) {
 | 
			
		||||
    double temp_in[8], temp_out[8];
 | 
			
		||||
    for (int j = 0; j < 8; ++j)
 | 
			
		||||
      temp_in[j] = out[j*8 + i];
 | 
			
		||||
    reference_idct_1d(temp_in, temp_out);
 | 
			
		||||
    for (int j = 0; j < 8; ++j)
 | 
			
		||||
      out2[j*8 + i] = temp_out[j];
 | 
			
		||||
  }
 | 
			
		||||
  for (int i = 0; i < 64; ++i)
 | 
			
		||||
    output[i] = round(out2[i]/32);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST(VP9Idct8x8Test, AccuracyCheck) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  const int count_test_block = 10000;
 | 
			
		||||
@@ -125,7 +87,7 @@ TEST(VP9Idct8x8Test, AccuracyCheck) {
 | 
			
		||||
    reference_dct_2d(input, output_r);
 | 
			
		||||
    for (int j = 0; j < 64; ++j)
 | 
			
		||||
      coeff[j] = round(output_r[j]);
 | 
			
		||||
    vp9_idct8x8_64_add_c(coeff, dst, 8);
 | 
			
		||||
    vpx_idct8x8_64_add_c(coeff, dst, 8);
 | 
			
		||||
    for (int j = 0; j < 64; ++j) {
 | 
			
		||||
      const int diff = dst[j] - src[j];
 | 
			
		||||
      const int error = diff * diff;
 | 
			
		||||
 
 | 
			
		||||
@@ -10,10 +10,11 @@
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp8_rtcd.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
 | 
			
		||||
typedef void (*IdctFunc)(int16_t *input, unsigned char *pred_ptr,
 | 
			
		||||
@@ -113,4 +114,8 @@ INSTANTIATE_TEST_CASE_P(C, IDCTTest, ::testing::Values(vp8_short_idct4x4llm_c));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(MMX, IDCTTest,
 | 
			
		||||
                        ::testing::Values(vp8_short_idct4x4llm_mmx));
 | 
			
		||||
#endif
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(MSA, IDCTTest,
 | 
			
		||||
                        ::testing::Values(vp8_short_idct4x4llm_msa));
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -8,15 +8,15 @@
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp8_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "vp8/common/blockd.h"
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
 | 
			
		||||
@@ -299,6 +299,11 @@ INSTANTIATE_TEST_CASE_P(NEON, IntraPredYTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            vp8_build_intra_predictors_mby_s_neon));
 | 
			
		||||
#endif
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(MSA, IntraPredYTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            vp8_build_intra_predictors_mby_s_msa));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef void (*IntraPredUvFunc)(MACROBLOCKD *x,
 | 
			
		||||
                                uint8_t *uabove_row,
 | 
			
		||||
@@ -392,5 +397,10 @@ INSTANTIATE_TEST_CASE_P(NEON, IntraPredUVTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            vp8_build_intra_predictors_mbuv_s_neon));
 | 
			
		||||
#endif
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(MSA, IntraPredUVTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            vp8_build_intra_predictors_mbuv_s_msa));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -112,7 +112,9 @@ TEST_P(InvalidFileTest, ReturnCode) {
 | 
			
		||||
 | 
			
		||||
const DecodeParam kVP9InvalidFileTests[] = {
 | 
			
		||||
  {1, "invalid-vp90-02-v2.webm"},
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  {1, "invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf"},
 | 
			
		||||
#endif
 | 
			
		||||
  {1, "invalid-vp90-03-v3.webm"},
 | 
			
		||||
  {1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf"},
 | 
			
		||||
  {1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf"},
 | 
			
		||||
@@ -143,7 +145,7 @@ TEST_P(InvalidFileInvalidPeekTest, ReturnCode) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const DecodeParam kVP9InvalidFileInvalidPeekTests[] = {
 | 
			
		||||
  {1, "invalid-vp90-01-v2.webm"},
 | 
			
		||||
  {1, "invalid-vp90-01-v3.webm"},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(InvalidFileInvalidPeekTest,
 | 
			
		||||
 
 | 
			
		||||
@@ -13,13 +13,13 @@
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "vp9/common/vp9_entropy.h"
 | 
			
		||||
#include "vp9/common/vp9_loopfilter.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
@@ -52,7 +52,7 @@ typedef void (*dual_loop_op_t)(uint8_t *s, int p, const uint8_t *blimit0,
 | 
			
		||||
                               const uint8_t *thresh1);
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
typedef std::tr1::tuple<loop_op_t, loop_op_t, int> loop8_param_t;
 | 
			
		||||
typedef std::tr1::tuple<loop_op_t, loop_op_t, int, int> loop8_param_t;
 | 
			
		||||
typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t;
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2
 | 
			
		||||
@@ -60,49 +60,49 @@ typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t;
 | 
			
		||||
void wrapper_vertical_16_sse2(uint16_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                              const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                              int count, int bd) {
 | 
			
		||||
  vp9_highbd_lpf_vertical_16_sse2(s, p, blimit, limit, thresh, bd);
 | 
			
		||||
  vpx_highbd_lpf_vertical_16_sse2(s, p, blimit, limit, thresh, bd);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_c(uint16_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                           const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                           int count, int bd) {
 | 
			
		||||
  vp9_highbd_lpf_vertical_16_c(s, p, blimit, limit, thresh, bd);
 | 
			
		||||
  vpx_highbd_lpf_vertical_16_c(s, p, blimit, limit, thresh, bd);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_dual_sse2(uint16_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                                   const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                                   int count, int bd) {
 | 
			
		||||
  vp9_highbd_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh, bd);
 | 
			
		||||
  vpx_highbd_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh, bd);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_dual_c(uint16_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                                const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                                int count, int bd) {
 | 
			
		||||
  vp9_highbd_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh, bd);
 | 
			
		||||
  vpx_highbd_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh, bd);
 | 
			
		||||
}
 | 
			
		||||
#else
 | 
			
		||||
void wrapper_vertical_16_sse2(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                              const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                              int count) {
 | 
			
		||||
  vp9_lpf_vertical_16_sse2(s, p, blimit, limit, thresh);
 | 
			
		||||
  vpx_lpf_vertical_16_sse2(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                           const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                           int count) {
 | 
			
		||||
  vp9_lpf_vertical_16_c(s, p, blimit, limit, thresh);
 | 
			
		||||
  vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_dual_sse2(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                                   const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                                   int count) {
 | 
			
		||||
  vp9_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh);
 | 
			
		||||
  vpx_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                                const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                                int count) {
 | 
			
		||||
  vp9_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
 | 
			
		||||
  vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
#endif  // HAVE_SSE2
 | 
			
		||||
@@ -114,29 +114,43 @@ void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
void wrapper_vertical_16_neon(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                              const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                              int count) {
 | 
			
		||||
  vp9_lpf_vertical_16_neon(s, p, blimit, limit, thresh);
 | 
			
		||||
  vpx_lpf_vertical_16_neon(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                           const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                           int count) {
 | 
			
		||||
  vp9_lpf_vertical_16_c(s, p, blimit, limit, thresh);
 | 
			
		||||
  vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_dual_neon(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                                   const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                                   int count) {
 | 
			
		||||
  vp9_lpf_vertical_16_dual_neon(s, p, blimit, limit, thresh);
 | 
			
		||||
  vpx_lpf_vertical_16_dual_neon(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                                const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                                int count) {
 | 
			
		||||
  vp9_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
 | 
			
		||||
  vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
#endif  // HAVE_NEON_ASM
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
 | 
			
		||||
void wrapper_vertical_16_msa(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                             const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                             int count) {
 | 
			
		||||
  vpx_lpf_vertical_16_msa(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
 | 
			
		||||
                           const uint8_t *limit, const uint8_t *thresh,
 | 
			
		||||
                           int count) {
 | 
			
		||||
  vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh);
 | 
			
		||||
}
 | 
			
		||||
#endif  // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
 | 
			
		||||
 | 
			
		||||
class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
 | 
			
		||||
 public:
 | 
			
		||||
  virtual ~Loop8Test6Param() {}
 | 
			
		||||
@@ -144,6 +158,7 @@ class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
 | 
			
		||||
    loopfilter_op_ = GET_PARAM(0);
 | 
			
		||||
    ref_loopfilter_op_ = GET_PARAM(1);
 | 
			
		||||
    bit_depth_ = GET_PARAM(2);
 | 
			
		||||
    count_ = GET_PARAM(3);
 | 
			
		||||
    mask_ = (1 << bit_depth_) - 1;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -151,6 +166,7 @@ class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  int bit_depth_;
 | 
			
		||||
  int count_;
 | 
			
		||||
  int mask_;
 | 
			
		||||
  loop_op_t loopfilter_op_;
 | 
			
		||||
  loop_op_t ref_loopfilter_op_;
 | 
			
		||||
@@ -180,11 +196,11 @@ TEST_P(Loop8Test6Param, OperationCheck) {
 | 
			
		||||
  const int count_test_block = number_of_iterations;
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  int32_t bd = bit_depth_;
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
 | 
			
		||||
#else
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
@@ -206,7 +222,6 @@ TEST_P(Loop8Test6Param, OperationCheck) {
 | 
			
		||||
        tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
 | 
			
		||||
    };
 | 
			
		||||
    int32_t p = kNumCoeffs/32;
 | 
			
		||||
    int count = 1;
 | 
			
		||||
 | 
			
		||||
    uint16_t tmp_s[kNumCoeffs];
 | 
			
		||||
    int j = 0;
 | 
			
		||||
@@ -238,13 +253,13 @@ TEST_P(Loop8Test6Param, OperationCheck) {
 | 
			
		||||
      ref_s[j] = s[j];
 | 
			
		||||
    }
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, count, bd);
 | 
			
		||||
    ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, count_, bd);
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
        loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count, bd));
 | 
			
		||||
        loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count_, bd));
 | 
			
		||||
#else
 | 
			
		||||
    ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh, count);
 | 
			
		||||
    ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh, count_);
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
        loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count));
 | 
			
		||||
        loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count_));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
    for (int j = 0; j < kNumCoeffs; ++j) {
 | 
			
		||||
@@ -266,11 +281,11 @@ TEST_P(Loop8Test6Param, ValueCheck) {
 | 
			
		||||
  const int count_test_block = number_of_iterations;
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  const int32_t bd = bit_depth_;
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
 | 
			
		||||
#else
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
@@ -279,8 +294,8 @@ TEST_P(Loop8Test6Param, ValueCheck) {
 | 
			
		||||
  // function of sharpness_lvl and the loopfilter lvl as:
 | 
			
		||||
  // block_inside_limit = lvl >> ((sharpness_lvl > 0) + (sharpness_lvl > 4));
 | 
			
		||||
  // ...
 | 
			
		||||
  // vpx_memset(lfi->lfthr[lvl].mblim, (2 * (lvl + 2) + block_inside_limit),
 | 
			
		||||
  //            SIMD_WIDTH);
 | 
			
		||||
  // memset(lfi->lfthr[lvl].mblim, (2 * (lvl + 2) + block_inside_limit),
 | 
			
		||||
  //        SIMD_WIDTH);
 | 
			
		||||
  // This means that the largest value for mblim will occur when sharpness_lvl
 | 
			
		||||
  // is equal to 0, and lvl is equal to its greatest value (MAX_LOOP_FILTER).
 | 
			
		||||
  // In this case block_inside_limit will be equal to MAX_LOOP_FILTER and
 | 
			
		||||
@@ -305,19 +320,18 @@ TEST_P(Loop8Test6Param, ValueCheck) {
 | 
			
		||||
        tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
 | 
			
		||||
    };
 | 
			
		||||
    int32_t p = kNumCoeffs / 32;
 | 
			
		||||
    int count = 1;
 | 
			
		||||
    for (int j = 0; j < kNumCoeffs; ++j) {
 | 
			
		||||
      s[j] = rnd.Rand16() & mask_;
 | 
			
		||||
      ref_s[j] = s[j];
 | 
			
		||||
    }
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, count, bd);
 | 
			
		||||
    ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, count_, bd);
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
        loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count, bd));
 | 
			
		||||
        loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count_, bd));
 | 
			
		||||
#else
 | 
			
		||||
    ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh, count);
 | 
			
		||||
    ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh, count_);
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
        loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count));
 | 
			
		||||
        loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count_));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    for (int j = 0; j < kNumCoeffs; ++j) {
 | 
			
		||||
      err_count += ref_s[j] != s[j];
 | 
			
		||||
@@ -338,11 +352,11 @@ TEST_P(Loop8Test9Param, OperationCheck) {
 | 
			
		||||
  const int count_test_block = number_of_iterations;
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  const int32_t bd = bit_depth_;
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
 | 
			
		||||
#else
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(8,  uint8_t,  s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(8,  uint8_t,  ref_s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(8,  uint8_t,  s[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(8,  uint8_t,  ref_s[kNumCoeffs]);
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
@@ -440,11 +454,11 @@ TEST_P(Loop8Test9Param, ValueCheck) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  const int count_test_block = number_of_iterations;
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
 | 
			
		||||
#else
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(8,  uint8_t, s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(8,  uint8_t, ref_s, kNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(8,  uint8_t, s[kNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(8,  uint8_t, ref_s[kNumCoeffs]);
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
@@ -520,56 +534,65 @@ using std::tr1::make_tuple;
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Loop8Test6Param,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_4_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_4_c, 8),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_4_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_4_c, 8),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_8_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_8_c, 8),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_16_c, 8),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_8_c, 8),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_4_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_4_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_8_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_16_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_16_c, 8, 2),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_8_c, 8, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_sse2,
 | 
			
		||||
                   &wrapper_vertical_16_c, 8),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_4_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_4_c, 10),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_4_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_4_c, 10),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_8_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_8_c, 10),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_16_c, 10),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_8_c, 10),
 | 
			
		||||
                   &wrapper_vertical_16_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_4_c, 10, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_4_c, 10, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_8_c, 10, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_16_c, 10, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_16_c, 10, 2),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_8_c, 10, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_sse2,
 | 
			
		||||
                   &wrapper_vertical_16_c, 10),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_4_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_4_c, 12),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_4_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_4_c, 12),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_8_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_8_c, 12),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_16_c, 12),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_8_c, 12),
 | 
			
		||||
                   &wrapper_vertical_16_c, 10, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_4_c, 12, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_4_c, 12, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_8_c, 12, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_16_c, 12, 1),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_16_c, 12, 2),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_8_c, 12, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_sse2,
 | 
			
		||||
                   &wrapper_vertical_16_c, 12),
 | 
			
		||||
                   &wrapper_vertical_16_c, 12, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_dual_sse2,
 | 
			
		||||
                   &wrapper_vertical_16_dual_c, 8),
 | 
			
		||||
                   &wrapper_vertical_16_dual_c, 8, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_dual_sse2,
 | 
			
		||||
                   &wrapper_vertical_16_dual_c, 10),
 | 
			
		||||
                   &wrapper_vertical_16_dual_c, 10, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_dual_sse2,
 | 
			
		||||
                   &wrapper_vertical_16_dual_c, 12)));
 | 
			
		||||
                   &wrapper_vertical_16_dual_c, 12, 1)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Loop8Test6Param,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_8_sse2, &vp9_lpf_horizontal_8_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_16_sse2, &vp9_lpf_horizontal_16_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_vertical_8_sse2, &vp9_lpf_vertical_8_c, 8),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8)));
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_8_sse2, &vpx_lpf_horizontal_8_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 2),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_8_sse2, &vpx_lpf_vertical_8_c, 8, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_dual_sse2,
 | 
			
		||||
                   &wrapper_vertical_16_dual_c, 8, 1)));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -577,7 +600,9 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    AVX2, Loop8Test6Param,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_16_avx2, &vp9_lpf_horizontal_16_c, 8)));
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_16_avx2, &vpx_lpf_horizontal_16_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_16_avx2, &vpx_lpf_horizontal_16_c, 8,
 | 
			
		||||
                   2)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2
 | 
			
		||||
@@ -585,42 +610,42 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Loop8Test9Param,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_4_dual_c, 10),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_8_dual_c, 10),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_4_dual_c, 10),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_8_dual_c, 10),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_4_dual_c, 12),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_horizontal_8_dual_c, 12),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_4_dual_c, 12),
 | 
			
		||||
        make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
 | 
			
		||||
                   &vp9_highbd_lpf_vertical_8_dual_c, 12)));
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_4_dual_c, 10),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_8_dual_c, 10),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_4_dual_c, 10),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_8_dual_c, 10),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_4_dual_c, 12),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_horizontal_8_dual_c, 12),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_4_dual_c, 12),
 | 
			
		||||
        make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2,
 | 
			
		||||
                   &vpx_highbd_lpf_vertical_8_dual_c, 12)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, Loop8Test9Param,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_4_dual_sse2,
 | 
			
		||||
                   &vp9_lpf_horizontal_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_8_dual_sse2,
 | 
			
		||||
                   &vp9_lpf_horizontal_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_vertical_4_dual_sse2,
 | 
			
		||||
                   &vp9_lpf_vertical_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_vertical_8_dual_sse2,
 | 
			
		||||
                   &vp9_lpf_vertical_8_dual_c, 8)));
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_4_dual_sse2,
 | 
			
		||||
                   &vpx_lpf_horizontal_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_8_dual_sse2,
 | 
			
		||||
                   &vpx_lpf_horizontal_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_4_dual_sse2,
 | 
			
		||||
                   &vpx_lpf_vertical_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_8_dual_sse2,
 | 
			
		||||
                   &vpx_lpf_vertical_8_dual_c, 8)));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -634,35 +659,60 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
#if HAVE_NEON_ASM
 | 
			
		||||
// Using #if inside the macro is unsupported on MSVS but the tests are not
 | 
			
		||||
// currently built for MSVS with ARM and NEON.
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_16_neon,
 | 
			
		||||
                   &vp9_lpf_horizontal_16_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_16_neon,
 | 
			
		||||
                   &vpx_lpf_horizontal_16_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_16_neon,
 | 
			
		||||
                   &vpx_lpf_horizontal_16_c, 8, 2),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_neon,
 | 
			
		||||
                   &wrapper_vertical_16_c, 8),
 | 
			
		||||
                   &wrapper_vertical_16_c, 8, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_dual_neon,
 | 
			
		||||
                   &wrapper_vertical_16_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_8_neon,
 | 
			
		||||
                   &vp9_lpf_horizontal_8_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_vertical_8_neon,
 | 
			
		||||
                   &vp9_lpf_vertical_8_c, 8),
 | 
			
		||||
                   &wrapper_vertical_16_dual_c, 8, 1),
 | 
			
		||||
#endif  // HAVE_NEON_ASM
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_4_neon,
 | 
			
		||||
                   &vp9_lpf_horizontal_4_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_vertical_4_neon,
 | 
			
		||||
                   &vp9_lpf_vertical_4_c, 8)));
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_8_neon,
 | 
			
		||||
                   &vpx_lpf_horizontal_8_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_8_neon,
 | 
			
		||||
                   &vpx_lpf_vertical_8_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_4_neon,
 | 
			
		||||
                   &vpx_lpf_horizontal_4_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_4_neon,
 | 
			
		||||
                   &vpx_lpf_vertical_4_c, 8, 1)));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    NEON, Loop8Test9Param,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
#if HAVE_NEON_ASM
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_8_dual_neon,
 | 
			
		||||
                   &vp9_lpf_horizontal_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_vertical_8_dual_neon,
 | 
			
		||||
                   &vp9_lpf_vertical_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_8_dual_neon,
 | 
			
		||||
                   &vpx_lpf_horizontal_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_8_dual_neon,
 | 
			
		||||
                   &vpx_lpf_vertical_8_dual_c, 8),
 | 
			
		||||
#endif  // HAVE_NEON_ASM
 | 
			
		||||
        make_tuple(&vp9_lpf_horizontal_4_dual_neon,
 | 
			
		||||
                   &vp9_lpf_horizontal_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vp9_lpf_vertical_4_dual_neon,
 | 
			
		||||
                   &vp9_lpf_vertical_4_dual_c, 8)));
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_4_dual_neon,
 | 
			
		||||
                   &vpx_lpf_horizontal_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_4_dual_neon,
 | 
			
		||||
                   &vpx_lpf_vertical_4_dual_c, 8)));
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
#endif  // HAVE_NEON
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, Loop8Test6Param,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_8_msa, &vpx_lpf_horizontal_8_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 1),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 2),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_8_msa, &vpx_lpf_vertical_8_c, 8, 1),
 | 
			
		||||
        make_tuple(&wrapper_vertical_16_msa, &wrapper_vertical_16_c, 8, 1)));
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, Loop8Test9Param,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_4_dual_msa,
 | 
			
		||||
                   &vpx_lpf_horizontal_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_horizontal_8_dual_msa,
 | 
			
		||||
                   &vpx_lpf_horizontal_8_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_4_dual_msa,
 | 
			
		||||
                   &vpx_lpf_vertical_4_dual_c, 8),
 | 
			
		||||
        make_tuple(&vpx_lpf_vertical_8_dual_msa,
 | 
			
		||||
                   &vpx_lpf_vertical_8_dual_c, 8)));
 | 
			
		||||
#endif  // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -42,6 +42,10 @@ class MD5 {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void Add(const uint8_t *data, size_t size) {
 | 
			
		||||
    MD5Update(&md5_, data, static_cast<uint32_t>(size));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const char *Get(void) {
 | 
			
		||||
    static const char hex[16] = {
 | 
			
		||||
      '0', '1', '2', '3', '4', '5', '6', '7',
 | 
			
		||||
 
 | 
			
		||||
@@ -13,12 +13,13 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "vp9/common/vp9_blockd.h"
 | 
			
		||||
#include "vp9/common/vp9_scan.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
@@ -74,16 +75,16 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
 | 
			
		||||
      FAIL() << "Wrong Size!";
 | 
			
		||||
      break;
 | 
			
		||||
  }
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block1, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block2, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, dst1, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, dst2, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
  const int count_test_block = 1000;
 | 
			
		||||
  const int block_size = size * size;
 | 
			
		||||
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, input_extreme_block[kMaxNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);
 | 
			
		||||
 | 
			
		||||
  int max_error = 0;
 | 
			
		||||
  for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
@@ -153,10 +154,10 @@ TEST_P(PartialIDctTest, ResultsMatch) {
 | 
			
		||||
      FAIL() << "Wrong Size!";
 | 
			
		||||
      break;
 | 
			
		||||
  }
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block1, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block2, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, dst1, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, dst2, kMaxNumCoeffs);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]);
 | 
			
		||||
  const int count_test_block = 1000;
 | 
			
		||||
  const int max_coeff = 32766 / 4;
 | 
			
		||||
  const int block_size = size * size;
 | 
			
		||||
@@ -201,117 +202,142 @@ using std::tr1::make_tuple;
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    C, PartialIDctTest,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_c,
 | 
			
		||||
                   &vp9_idct32x32_34_add_c,
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c,
 | 
			
		||||
                   &vpx_idct32x32_34_add_c,
 | 
			
		||||
                   TX_32X32, 34),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_c,
 | 
			
		||||
                   &vp9_idct32x32_1_add_c,
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c,
 | 
			
		||||
                   &vpx_idct32x32_1_add_c,
 | 
			
		||||
                   TX_32X32, 1),
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c,
 | 
			
		||||
                   &vp9_idct16x16_256_add_c,
 | 
			
		||||
                   &vp9_idct16x16_10_add_c,
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c,
 | 
			
		||||
                   &vpx_idct16x16_256_add_c,
 | 
			
		||||
                   &vpx_idct16x16_10_add_c,
 | 
			
		||||
                   TX_16X16, 10),
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c,
 | 
			
		||||
                   &vp9_idct16x16_256_add_c,
 | 
			
		||||
                   &vp9_idct16x16_1_add_c,
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c,
 | 
			
		||||
                   &vpx_idct16x16_256_add_c,
 | 
			
		||||
                   &vpx_idct16x16_1_add_c,
 | 
			
		||||
                   TX_16X16, 1),
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_c,
 | 
			
		||||
                   &vp9_idct8x8_64_add_c,
 | 
			
		||||
                   &vp9_idct8x8_12_add_c,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c,
 | 
			
		||||
                   &vpx_idct8x8_64_add_c,
 | 
			
		||||
                   &vpx_idct8x8_12_add_c,
 | 
			
		||||
                   TX_8X8, 12),
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_c,
 | 
			
		||||
                   &vp9_idct8x8_64_add_c,
 | 
			
		||||
                   &vp9_idct8x8_1_add_c,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c,
 | 
			
		||||
                   &vpx_idct8x8_64_add_c,
 | 
			
		||||
                   &vpx_idct8x8_1_add_c,
 | 
			
		||||
                   TX_8X8, 1),
 | 
			
		||||
        make_tuple(&vp9_fdct4x4_c,
 | 
			
		||||
                   &vp9_idct4x4_16_add_c,
 | 
			
		||||
                   &vp9_idct4x4_1_add_c,
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_c,
 | 
			
		||||
                   &vpx_idct4x4_16_add_c,
 | 
			
		||||
                   &vpx_idct4x4_1_add_c,
 | 
			
		||||
                   TX_4X4, 1)));
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON
 | 
			
		||||
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    NEON, PartialIDctTest,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_c,
 | 
			
		||||
                   &vp9_idct32x32_1_add_neon,
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c,
 | 
			
		||||
                   &vpx_idct32x32_1_add_neon,
 | 
			
		||||
                   TX_32X32, 1),
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c,
 | 
			
		||||
                   &vp9_idct16x16_256_add_c,
 | 
			
		||||
                   &vp9_idct16x16_10_add_neon,
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c,
 | 
			
		||||
                   &vpx_idct16x16_256_add_c,
 | 
			
		||||
                   &vpx_idct16x16_10_add_neon,
 | 
			
		||||
                   TX_16X16, 10),
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c,
 | 
			
		||||
                   &vp9_idct16x16_256_add_c,
 | 
			
		||||
                   &vp9_idct16x16_1_add_neon,
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c,
 | 
			
		||||
                   &vpx_idct16x16_256_add_c,
 | 
			
		||||
                   &vpx_idct16x16_1_add_neon,
 | 
			
		||||
                   TX_16X16, 1),
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_c,
 | 
			
		||||
                   &vp9_idct8x8_64_add_c,
 | 
			
		||||
                   &vp9_idct8x8_12_add_neon,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c,
 | 
			
		||||
                   &vpx_idct8x8_64_add_c,
 | 
			
		||||
                   &vpx_idct8x8_12_add_neon,
 | 
			
		||||
                   TX_8X8, 12),
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_c,
 | 
			
		||||
                   &vp9_idct8x8_64_add_c,
 | 
			
		||||
                   &vp9_idct8x8_1_add_neon,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c,
 | 
			
		||||
                   &vpx_idct8x8_64_add_c,
 | 
			
		||||
                   &vpx_idct8x8_1_add_neon,
 | 
			
		||||
                   TX_8X8, 1),
 | 
			
		||||
        make_tuple(&vp9_fdct4x4_c,
 | 
			
		||||
                   &vp9_idct4x4_16_add_c,
 | 
			
		||||
                   &vp9_idct4x4_1_add_neon,
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_c,
 | 
			
		||||
                   &vpx_idct4x4_16_add_c,
 | 
			
		||||
                   &vpx_idct4x4_1_add_neon,
 | 
			
		||||
                   TX_4X4, 1)));
 | 
			
		||||
#endif  // HAVE_NEON
 | 
			
		||||
#endif  // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, PartialIDctTest,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_c,
 | 
			
		||||
                   &vp9_idct32x32_34_add_sse2,
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c,
 | 
			
		||||
                   &vpx_idct32x32_34_add_sse2,
 | 
			
		||||
                   TX_32X32, 34),
 | 
			
		||||
        make_tuple(&vp9_fdct32x32_c,
 | 
			
		||||
                   &vp9_idct32x32_1024_add_c,
 | 
			
		||||
                   &vp9_idct32x32_1_add_sse2,
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c,
 | 
			
		||||
                   &vpx_idct32x32_1_add_sse2,
 | 
			
		||||
                   TX_32X32, 1),
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c,
 | 
			
		||||
                   &vp9_idct16x16_256_add_c,
 | 
			
		||||
                   &vp9_idct16x16_10_add_sse2,
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c,
 | 
			
		||||
                   &vpx_idct16x16_256_add_c,
 | 
			
		||||
                   &vpx_idct16x16_10_add_sse2,
 | 
			
		||||
                   TX_16X16, 10),
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c,
 | 
			
		||||
                   &vp9_idct16x16_256_add_c,
 | 
			
		||||
                   &vp9_idct16x16_1_add_sse2,
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c,
 | 
			
		||||
                   &vpx_idct16x16_256_add_c,
 | 
			
		||||
                   &vpx_idct16x16_1_add_sse2,
 | 
			
		||||
                   TX_16X16, 1),
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_c,
 | 
			
		||||
                   &vp9_idct8x8_64_add_c,
 | 
			
		||||
                   &vp9_idct8x8_12_add_sse2,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c,
 | 
			
		||||
                   &vpx_idct8x8_64_add_c,
 | 
			
		||||
                   &vpx_idct8x8_12_add_sse2,
 | 
			
		||||
                   TX_8X8, 12),
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_c,
 | 
			
		||||
                   &vp9_idct8x8_64_add_c,
 | 
			
		||||
                   &vp9_idct8x8_1_add_sse2,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c,
 | 
			
		||||
                   &vpx_idct8x8_64_add_c,
 | 
			
		||||
                   &vpx_idct8x8_1_add_sse2,
 | 
			
		||||
                   TX_8X8, 1),
 | 
			
		||||
        make_tuple(&vp9_fdct4x4_c,
 | 
			
		||||
                   &vp9_idct4x4_16_add_c,
 | 
			
		||||
                   &vp9_idct4x4_1_add_sse2,
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_c,
 | 
			
		||||
                   &vpx_idct4x4_16_add_c,
 | 
			
		||||
                   &vpx_idct4x4_1_add_sse2,
 | 
			
		||||
                   TX_4X4, 1)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH && \
 | 
			
		||||
    !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
 | 
			
		||||
    !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSSE3_64, PartialIDctTest,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct8x8_c,
 | 
			
		||||
                   &vp9_idct8x8_64_add_c,
 | 
			
		||||
                   &vp9_idct8x8_12_add_ssse3,
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c,
 | 
			
		||||
                   &vpx_idct8x8_64_add_c,
 | 
			
		||||
                   &vpx_idct8x8_12_add_ssse3,
 | 
			
		||||
                   TX_8X8, 12)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSSE3, PartialIDctTest,
 | 
			
		||||
    MSA, PartialIDctTest,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_fdct16x16_c,
 | 
			
		||||
                   &vp9_idct16x16_256_add_c,
 | 
			
		||||
                   &vp9_idct16x16_10_add_ssse3,
 | 
			
		||||
                   TX_16X16, 10)));
 | 
			
		||||
#endif
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c,
 | 
			
		||||
                   &vpx_idct32x32_34_add_msa,
 | 
			
		||||
                   TX_32X32, 34),
 | 
			
		||||
        make_tuple(&vpx_fdct32x32_c,
 | 
			
		||||
                   &vpx_idct32x32_1024_add_c,
 | 
			
		||||
                   &vpx_idct32x32_1_add_msa,
 | 
			
		||||
                   TX_32X32, 1),
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c,
 | 
			
		||||
                   &vpx_idct16x16_256_add_c,
 | 
			
		||||
                   &vpx_idct16x16_10_add_msa,
 | 
			
		||||
                   TX_16X16, 10),
 | 
			
		||||
        make_tuple(&vpx_fdct16x16_c,
 | 
			
		||||
                   &vpx_idct16x16_256_add_c,
 | 
			
		||||
                   &vpx_idct16x16_1_add_msa,
 | 
			
		||||
                   TX_16X16, 1),
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c,
 | 
			
		||||
                   &vpx_idct8x8_64_add_c,
 | 
			
		||||
                   &vpx_idct8x8_12_add_msa,
 | 
			
		||||
                   TX_8X8, 10),
 | 
			
		||||
        make_tuple(&vpx_fdct8x8_c,
 | 
			
		||||
                   &vpx_idct8x8_64_add_c,
 | 
			
		||||
                   &vpx_idct8x8_1_add_msa,
 | 
			
		||||
                   TX_8X8, 1),
 | 
			
		||||
        make_tuple(&vpx_fdct4x4_c,
 | 
			
		||||
                   &vpx_idct4x4_16_add_c,
 | 
			
		||||
                   &vpx_idct4x4_1_add_msa,
 | 
			
		||||
                   TX_4X4, 1)));
 | 
			
		||||
#endif  // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -63,12 +63,12 @@ TEST_P(VP8PostProcessingFilterTest, FilterOutputCheck) {
 | 
			
		||||
  uint8_t *const dst_image_ptr = dst_image + 8;
 | 
			
		||||
  uint8_t *const flimits =
 | 
			
		||||
      reinterpret_cast<uint8_t *>(vpx_memalign(16, block_width));
 | 
			
		||||
  (void)vpx_memset(flimits, 255, block_width);
 | 
			
		||||
  (void)memset(flimits, 255, block_width);
 | 
			
		||||
 | 
			
		||||
  // Initialize pixels in the input:
 | 
			
		||||
  //   block pixels to value 1,
 | 
			
		||||
  //   border pixels to value 10.
 | 
			
		||||
  (void)vpx_memset(src_image, 10, input_size);
 | 
			
		||||
  (void)memset(src_image, 10, input_size);
 | 
			
		||||
  uint8_t *pixel_ptr = src_image_ptr;
 | 
			
		||||
  for (int i = 0; i < block_height; ++i) {
 | 
			
		||||
    for (int j = 0; j < block_width; ++j) {
 | 
			
		||||
@@ -78,7 +78,7 @@ TEST_P(VP8PostProcessingFilterTest, FilterOutputCheck) {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Initialize pixels in the output to 99.
 | 
			
		||||
  (void)vpx_memset(dst_image, 99, output_size);
 | 
			
		||||
  (void)memset(dst_image, 99, output_size);
 | 
			
		||||
 | 
			
		||||
  ASM_REGISTER_STATE_CHECK(
 | 
			
		||||
      GetParam()(src_image_ptr, dst_image_ptr, input_stride,
 | 
			
		||||
@@ -110,4 +110,9 @@ INSTANTIATE_TEST_CASE_P(SSE2, VP8PostProcessingFilterTest,
 | 
			
		||||
    ::testing::Values(vp8_post_proc_down_and_across_mb_row_sse2));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(MSA, VP8PostProcessingFilterTest,
 | 
			
		||||
    ::testing::Values(vp8_post_proc_down_and_across_mb_row_msa));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -11,13 +11,13 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp8_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp8_rtcd.h"
 | 
			
		||||
#include "vp8/common/blockd.h"
 | 
			
		||||
#include "vp8/common/onyx.h"
 | 
			
		||||
#include "vp8/encoder/block.h"
 | 
			
		||||
@@ -56,7 +56,7 @@ class QuantizeTestBase {
 | 
			
		||||
 | 
			
		||||
    // The full configuration is necessary to generate the quantization tables.
 | 
			
		||||
    VP8_CONFIG vp8_config;
 | 
			
		||||
    vpx_memset(&vp8_config, 0, sizeof(vp8_config));
 | 
			
		||||
    memset(&vp8_config, 0, sizeof(vp8_config));
 | 
			
		||||
 | 
			
		||||
    vp8_comp_ = vp8_create_compressor(&vp8_config);
 | 
			
		||||
 | 
			
		||||
@@ -69,8 +69,7 @@ class QuantizeTestBase {
 | 
			
		||||
    // Copy macroblockd from the reference to get pre-set-up dequant values.
 | 
			
		||||
    macroblockd_dst_ = reinterpret_cast<MACROBLOCKD *>(
 | 
			
		||||
        vpx_memalign(32, sizeof(*macroblockd_dst_)));
 | 
			
		||||
    vpx_memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd,
 | 
			
		||||
               sizeof(*macroblockd_dst_));
 | 
			
		||||
    memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd, sizeof(*macroblockd_dst_));
 | 
			
		||||
    // Fix block pointers - currently they point to the blocks in the reference
 | 
			
		||||
    // structure.
 | 
			
		||||
    vp8_setup_block_dptrs(macroblockd_dst_);
 | 
			
		||||
@@ -79,8 +78,7 @@ class QuantizeTestBase {
 | 
			
		||||
  void UpdateQuantizer(int q) {
 | 
			
		||||
    vp8_set_quantizer(vp8_comp_, q);
 | 
			
		||||
 | 
			
		||||
    vpx_memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd,
 | 
			
		||||
               sizeof(*macroblockd_dst_));
 | 
			
		||||
    memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd, sizeof(*macroblockd_dst_));
 | 
			
		||||
    vp8_setup_block_dptrs(macroblockd_dst_);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -194,4 +192,12 @@ INSTANTIATE_TEST_CASE_P(NEON, QuantizeTest,
 | 
			
		||||
                        ::testing::Values(make_tuple(&vp8_fast_quantize_b_neon,
 | 
			
		||||
                                                     &vp8_fast_quantize_b_c)));
 | 
			
		||||
#endif  // HAVE_NEON
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, QuantizeTest,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp8_fast_quantize_b_msa, &vp8_fast_quantize_b_c),
 | 
			
		||||
        make_tuple(&vp8_regular_quantize_b_msa, &vp8_regular_quantize_b_c)));
 | 
			
		||||
#endif  // HAVE_MSA
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -96,7 +96,7 @@ class RegisterStateCheck {
 | 
			
		||||
 | 
			
		||||
extern "C" {
 | 
			
		||||
// Save the d8-d15 registers into store.
 | 
			
		||||
void vp9_push_neon(int64_t *store);
 | 
			
		||||
void vpx_push_neon(int64_t *store);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
namespace libvpx_test {
 | 
			
		||||
@@ -111,7 +111,7 @@ class RegisterStateCheck {
 | 
			
		||||
 | 
			
		||||
 private:
 | 
			
		||||
  static bool StoreRegisters(int64_t store[8]) {
 | 
			
		||||
    vp9_push_neon(store);
 | 
			
		||||
    vpx_push_neon(store);
 | 
			
		||||
    return true;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -119,7 +119,7 @@ class RegisterStateCheck {
 | 
			
		||||
  bool Check() const {
 | 
			
		||||
    if (!initialized_) return false;
 | 
			
		||||
    int64_t post_store[8];
 | 
			
		||||
    vp9_push_neon(post_store);
 | 
			
		||||
    vpx_push_neon(post_store);
 | 
			
		||||
    for (int i = 0; i < 8; ++i) {
 | 
			
		||||
      EXPECT_EQ(pre_store_[i], post_store[i]) << "d"
 | 
			
		||||
          << i + 8 << " has been modified";
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1527
									
								
								test/sad_test.cc
									
									
									
									
									
								
							
							
						
						
									
										1527
									
								
								test/sad_test.cc
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -53,7 +53,7 @@ TEST(VP8RoiMapTest, ParameterCheck) {
 | 
			
		||||
  cpi.common.mb_rows = 240 >> 4;
 | 
			
		||||
  cpi.common.mb_cols = 320 >> 4;
 | 
			
		||||
  const int mbs = (cpi.common.mb_rows * cpi.common.mb_cols);
 | 
			
		||||
  vpx_memset(cpi.segment_feature_data, 0, sizeof(cpi.segment_feature_data));
 | 
			
		||||
  memset(cpi.segment_feature_data, 0, sizeof(cpi.segment_feature_data));
 | 
			
		||||
 | 
			
		||||
  // Segment map
 | 
			
		||||
  cpi.segmentation_map = reinterpret_cast<unsigned char *>(vpx_calloc(mbs, 1));
 | 
			
		||||
@@ -61,9 +61,9 @@ TEST(VP8RoiMapTest, ParameterCheck) {
 | 
			
		||||
  // Allocate memory for the source memory map.
 | 
			
		||||
  unsigned char *roi_map =
 | 
			
		||||
    reinterpret_cast<unsigned char *>(vpx_calloc(mbs, 1));
 | 
			
		||||
  vpx_memset(&roi_map[mbs >> 2], 1, (mbs >> 2));
 | 
			
		||||
  vpx_memset(&roi_map[mbs >> 1], 2, (mbs >> 2));
 | 
			
		||||
  vpx_memset(&roi_map[mbs -(mbs >> 2)], 3, (mbs >> 2));
 | 
			
		||||
  memset(&roi_map[mbs >> 2], 1, (mbs >> 2));
 | 
			
		||||
  memset(&roi_map[mbs >> 1], 2, (mbs >> 2));
 | 
			
		||||
  memset(&roi_map[mbs -(mbs >> 2)], 3, (mbs >> 2));
 | 
			
		||||
 | 
			
		||||
  // Do a test call with valid parameters.
 | 
			
		||||
  int roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
 | 
			
		||||
 
 | 
			
		||||
@@ -11,13 +11,15 @@
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp8_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp8_rtcd.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
 | 
			
		||||
@@ -238,4 +240,16 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
        make_tuple(8, 4, sixtap_8x4_ssse3),
 | 
			
		||||
        make_tuple(4, 4, sixtap_4x4_ssse3)));
 | 
			
		||||
#endif
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
const SixtapPredictFunc sixtap_16x16_msa = vp8_sixtap_predict16x16_msa;
 | 
			
		||||
const SixtapPredictFunc sixtap_8x8_msa = vp8_sixtap_predict8x8_msa;
 | 
			
		||||
const SixtapPredictFunc sixtap_8x4_msa = vp8_sixtap_predict8x4_msa;
 | 
			
		||||
const SixtapPredictFunc sixtap_4x4_msa = vp8_sixtap_predict4x4_msa;
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, SixtapPredictTest, ::testing::Values(
 | 
			
		||||
        make_tuple(16, 16, sixtap_16x16_msa),
 | 
			
		||||
        make_tuple(8, 8, sixtap_8x8_msa),
 | 
			
		||||
        make_tuple(8, 4, sixtap_8x4_msa),
 | 
			
		||||
        make_tuple(4, 4, sixtap_4x4_msa)));
 | 
			
		||||
#endif
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -1,123 +0,0 @@
 | 
			
		||||
/*
 | 
			
		||||
 *  Copyright (c) 2012 The WebM project authors. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 *  Use of this source code is governed by a BSD-style license
 | 
			
		||||
 *  that can be found in the LICENSE file in the root of the source
 | 
			
		||||
 *  tree. An additional intellectual property rights grant can be found
 | 
			
		||||
 *  in the file PATENTS.  All contributing project authors may
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp8_rtcd.h"
 | 
			
		||||
#include "vp8/common/blockd.h"
 | 
			
		||||
#include "vp8/encoder/block.h"
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
 | 
			
		||||
typedef void (*SubtractBlockFunc)(BLOCK *be, BLOCKD *bd, int pitch);
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
class SubtractBlockTest : public ::testing::TestWithParam<SubtractBlockFunc> {
 | 
			
		||||
 public:
 | 
			
		||||
  virtual void TearDown() {
 | 
			
		||||
    libvpx_test::ClearSystemState();
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
TEST_P(SubtractBlockTest, SimpleSubtract) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  BLOCK be;
 | 
			
		||||
  BLOCKD bd;
 | 
			
		||||
  // in libvpx, this stride is always 16
 | 
			
		||||
  const int kDiffPredStride = 16;
 | 
			
		||||
  const int kSrcStride[] = {32, 16, 8, 4, 0};
 | 
			
		||||
  const int kBlockWidth = 4;
 | 
			
		||||
  const int kBlockHeight = 4;
 | 
			
		||||
 | 
			
		||||
  // Allocate... align to 16 for mmx/sse tests
 | 
			
		||||
  uint8_t *source = reinterpret_cast<uint8_t*>(
 | 
			
		||||
      vpx_memalign(16, kBlockHeight * kSrcStride[0] * sizeof(*source)));
 | 
			
		||||
  be.src_diff = reinterpret_cast<int16_t*>(
 | 
			
		||||
      vpx_memalign(16, kBlockHeight * kDiffPredStride * sizeof(*be.src_diff)));
 | 
			
		||||
  bd.predictor = reinterpret_cast<unsigned char*>(
 | 
			
		||||
      vpx_memalign(16, kBlockHeight * kDiffPredStride * sizeof(*bd.predictor)));
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; kSrcStride[i] > 0; ++i) {
 | 
			
		||||
    // start at block0
 | 
			
		||||
    be.src = 0;
 | 
			
		||||
    be.base_src = &source;
 | 
			
		||||
    be.src_stride = kSrcStride[i];
 | 
			
		||||
 | 
			
		||||
    // set difference
 | 
			
		||||
    int16_t *src_diff = be.src_diff;
 | 
			
		||||
    for (int r = 0; r < kBlockHeight; ++r) {
 | 
			
		||||
      for (int c = 0; c < kBlockWidth; ++c) {
 | 
			
		||||
        src_diff[c] = static_cast<int16_t>(0xa5a5u);
 | 
			
		||||
      }
 | 
			
		||||
      src_diff += kDiffPredStride;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // set destination
 | 
			
		||||
    uint8_t *base_src = *be.base_src;
 | 
			
		||||
    for (int r = 0; r < kBlockHeight; ++r) {
 | 
			
		||||
      for (int c = 0; c < kBlockWidth; ++c) {
 | 
			
		||||
        base_src[c] = rnd.Rand8();
 | 
			
		||||
      }
 | 
			
		||||
      base_src += be.src_stride;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // set predictor
 | 
			
		||||
    uint8_t *predictor = bd.predictor;
 | 
			
		||||
    for (int r = 0; r < kBlockHeight; ++r) {
 | 
			
		||||
      for (int c = 0; c < kBlockWidth; ++c) {
 | 
			
		||||
        predictor[c] = rnd.Rand8();
 | 
			
		||||
      }
 | 
			
		||||
      predictor += kDiffPredStride;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(GetParam()(&be, &bd, kDiffPredStride));
 | 
			
		||||
 | 
			
		||||
    base_src = *be.base_src;
 | 
			
		||||
    src_diff = be.src_diff;
 | 
			
		||||
    predictor = bd.predictor;
 | 
			
		||||
    for (int r = 0; r < kBlockHeight; ++r) {
 | 
			
		||||
      for (int c = 0; c < kBlockWidth; ++c) {
 | 
			
		||||
        EXPECT_EQ(base_src[c], (src_diff[c] + predictor[c])) << "r = " << r
 | 
			
		||||
                                                             << ", c = " << c;
 | 
			
		||||
      }
 | 
			
		||||
      src_diff += kDiffPredStride;
 | 
			
		||||
      predictor += kDiffPredStride;
 | 
			
		||||
      base_src += be.src_stride;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  vpx_free(be.src_diff);
 | 
			
		||||
  vpx_free(source);
 | 
			
		||||
  vpx_free(bd.predictor);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(C, SubtractBlockTest,
 | 
			
		||||
                        ::testing::Values(vp8_subtract_b_c));
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(NEON, SubtractBlockTest,
 | 
			
		||||
                        ::testing::Values(vp8_subtract_b_neon));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_MMX
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(MMX, SubtractBlockTest,
 | 
			
		||||
                        ::testing::Values(vp8_subtract_b_mmx));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2, SubtractBlockTest,
 | 
			
		||||
                        ::testing::Values(vp8_subtract_b_sse2));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
@@ -94,4 +94,7 @@ TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) {
 | 
			
		||||
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
 | 
			
		||||
    ::libvpx_test::kTwoPassGood));
 | 
			
		||||
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
 | 
			
		||||
    ::libvpx_test::kTwoPassGood));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -63,6 +63,9 @@ class SvcTest : public ::testing::Test {
 | 
			
		||||
    vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
 | 
			
		||||
    VP9CodecFactory codec_factory;
 | 
			
		||||
    decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
 | 
			
		||||
 | 
			
		||||
    tile_columns_ = 0;
 | 
			
		||||
    tile_rows_ = 0;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual void TearDown() {
 | 
			
		||||
@@ -75,6 +78,8 @@ class SvcTest : public ::testing::Test {
 | 
			
		||||
        vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
 | 
			
		||||
    EXPECT_EQ(VPX_CODEC_OK, res);
 | 
			
		||||
    vpx_codec_control(&codec_, VP8E_SET_CPUUSED, 4);  // Make the test faster
 | 
			
		||||
    vpx_codec_control(&codec_, VP9E_SET_TILE_COLUMNS, tile_columns_);
 | 
			
		||||
    vpx_codec_control(&codec_, VP9E_SET_TILE_ROWS, tile_rows_);
 | 
			
		||||
    codec_initialized_ = true;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -108,7 +113,8 @@ class SvcTest : public ::testing::Test {
 | 
			
		||||
    codec_enc_.g_pass = VPX_RC_FIRST_PASS;
 | 
			
		||||
    InitializeEncoder();
 | 
			
		||||
 | 
			
		||||
    libvpx_test::I420VideoSource video(test_file_name_, kWidth, kHeight,
 | 
			
		||||
    libvpx_test::I420VideoSource video(test_file_name_,
 | 
			
		||||
                                       codec_enc_.g_w, codec_enc_.g_h,
 | 
			
		||||
                                       codec_enc_.g_timebase.den,
 | 
			
		||||
                                       codec_enc_.g_timebase.num, 0, 30);
 | 
			
		||||
    video.Begin();
 | 
			
		||||
@@ -176,7 +182,8 @@ class SvcTest : public ::testing::Test {
 | 
			
		||||
    }
 | 
			
		||||
    InitializeEncoder();
 | 
			
		||||
 | 
			
		||||
    libvpx_test::I420VideoSource video(test_file_name_, kWidth, kHeight,
 | 
			
		||||
    libvpx_test::I420VideoSource video(test_file_name_,
 | 
			
		||||
                                       codec_enc_.g_w, codec_enc_.g_h,
 | 
			
		||||
                                       codec_enc_.g_timebase.den,
 | 
			
		||||
                                       codec_enc_.g_timebase.num, 0, 30);
 | 
			
		||||
    video.Begin();
 | 
			
		||||
@@ -310,6 +317,8 @@ class SvcTest : public ::testing::Test {
 | 
			
		||||
  std::string test_file_name_;
 | 
			
		||||
  bool codec_initialized_;
 | 
			
		||||
  Decoder *decoder_;
 | 
			
		||||
  int tile_columns_;
 | 
			
		||||
  int tile_rows_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
TEST_F(SvcTest, SvcInit) {
 | 
			
		||||
@@ -444,6 +453,7 @@ TEST_F(SvcTest, OnePassEncodeOneFrame) {
 | 
			
		||||
 | 
			
		||||
TEST_F(SvcTest, OnePassEncodeThreeFrames) {
 | 
			
		||||
  codec_enc_.g_pass = VPX_RC_ONE_PASS;
 | 
			
		||||
  codec_enc_.g_lag_in_frames = 0;
 | 
			
		||||
  vpx_fixed_buf outputs[3];
 | 
			
		||||
  memset(&outputs[0], 0, sizeof(outputs));
 | 
			
		||||
  Pass2EncodeNFrames(NULL, 3, 2, &outputs[0]);
 | 
			
		||||
@@ -737,4 +747,51 @@ TEST_F(SvcTest,
 | 
			
		||||
  FreeBitstreamBuffers(&outputs[0], 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithTiles) {
 | 
			
		||||
  // First pass encode
 | 
			
		||||
  std::string stats_buf;
 | 
			
		||||
  vpx_svc_set_options(&svc_, "scale-factors=1/1");
 | 
			
		||||
  svc_.temporal_layers = 2;
 | 
			
		||||
  Pass1EncodeNFrames(10, 1, &stats_buf);
 | 
			
		||||
 | 
			
		||||
  // Second pass encode
 | 
			
		||||
  codec_enc_.g_pass = VPX_RC_LAST_PASS;
 | 
			
		||||
  svc_.temporal_layers = 2;
 | 
			
		||||
  vpx_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1");
 | 
			
		||||
  codec_enc_.g_w = 704;
 | 
			
		||||
  codec_enc_.g_h = 144;
 | 
			
		||||
  tile_columns_ = 1;
 | 
			
		||||
  tile_rows_ = 1;
 | 
			
		||||
  vpx_fixed_buf outputs[10];
 | 
			
		||||
  memset(&outputs[0], 0, sizeof(outputs));
 | 
			
		||||
  Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]);
 | 
			
		||||
  DecodeNFrames(&outputs[0], 10);
 | 
			
		||||
  FreeBitstreamBuffers(&outputs[0], 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_F(SvcTest,
 | 
			
		||||
       TwoPassEncode2TemporalLayersWithMultipleFrameContextsAndTiles) {
 | 
			
		||||
  // First pass encode
 | 
			
		||||
  std::string stats_buf;
 | 
			
		||||
  vpx_svc_set_options(&svc_, "scale-factors=1/1");
 | 
			
		||||
  svc_.temporal_layers = 2;
 | 
			
		||||
  Pass1EncodeNFrames(10, 1, &stats_buf);
 | 
			
		||||
 | 
			
		||||
  // Second pass encode
 | 
			
		||||
  codec_enc_.g_pass = VPX_RC_LAST_PASS;
 | 
			
		||||
  svc_.temporal_layers = 2;
 | 
			
		||||
  codec_enc_.g_error_resilient = 0;
 | 
			
		||||
  codec_enc_.g_w = 704;
 | 
			
		||||
  codec_enc_.g_h = 144;
 | 
			
		||||
  tile_columns_ = 1;
 | 
			
		||||
  tile_rows_ = 1;
 | 
			
		||||
  vpx_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1 "
 | 
			
		||||
                      "multi-frame-contexts=1");
 | 
			
		||||
  vpx_fixed_buf outputs[10];
 | 
			
		||||
  memset(&outputs[0], 0, sizeof(outputs));
 | 
			
		||||
  Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]);
 | 
			
		||||
  DecodeNFrames(&outputs[0], 10);
 | 
			
		||||
  FreeBitstreamBuffers(&outputs[0], 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -12,6 +12,7 @@ LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_420.y4m
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_422.y4m
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_444.y4m
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_440.yuv
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_420_a10-1.y4m
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_420.y4m
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_422.y4m
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_444.y4m
 | 
			
		||||
@@ -686,8 +687,8 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv444.webm.md5
 | 
			
		||||
endif  # CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
 | 
			
		||||
# Invalid files for testing libvpx error checking.
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v2.webm
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v2.webm.res
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v3.webm
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v3.webm.res
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-02-v2.webm
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-02-v2.webm.res
 | 
			
		||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-03-v3.webm
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1489
									
								
								test/test-data.sha1
									
									
									
									
									
								
							
							
						
						
									
										1489
									
								
								test/test-data.sha1
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										11
									
								
								test/test.mk
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								test/test.mk
									
									
									
									
									
								
							@@ -66,6 +66,7 @@ LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)    += ../tools_common.h
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)    += ../webmdec.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)    += ../webmdec.h
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)    += webm_video_source.h
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_skip_loopfilter_test.cc
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)    += decode_api_test.cc
 | 
			
		||||
@@ -90,6 +91,7 @@ endif
 | 
			
		||||
## shared library builds don't make these functions accessible.
 | 
			
		||||
##
 | 
			
		||||
ifeq ($(CONFIG_SHARED),)
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9)         += lpf_8_test.cc
 | 
			
		||||
 | 
			
		||||
## VP8
 | 
			
		||||
ifneq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),)
 | 
			
		||||
@@ -103,7 +105,6 @@ endif
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC)    += pp_filter_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += subtract_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += quantize_test.cc
 | 
			
		||||
@@ -142,7 +143,6 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct8x8_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_subtract_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += lpf_8_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_avg_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_error_block_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_quantize_test.cc
 | 
			
		||||
@@ -150,16 +150,23 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9)         += vp9_intrapred_test.cc
 | 
			
		||||
 | 
			
		||||
ifeq ($(CONFIG_VP9_ENCODER),yes)
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_SPATIAL_SVC) += svc_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += blockiness_test.cc
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += consistency_test.cc
 | 
			
		||||
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes)
 | 
			
		||||
LIBVPX_TEST_SRCS-$(HAVE_SSE2) += vp9_denoiser_sse2_test.cc
 | 
			
		||||
endif
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_arf_freq_test.cc
 | 
			
		||||
 | 
			
		||||
endif # VP9
 | 
			
		||||
 | 
			
		||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS)    += sad_test.cc
 | 
			
		||||
 | 
			
		||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9) := test_intra_pred_speed.cc
 | 
			
		||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9) += ../md5_utils.h ../md5_utils.c
 | 
			
		||||
 | 
			
		||||
endif # CONFIG_SHARED
 | 
			
		||||
 | 
			
		||||
include $(SRC_PATH_BARE)/test/test-data.mk
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										384
									
								
								test/test_intra_pred_speed.cc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										384
									
								
								test/test_intra_pred_speed.cc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,384 @@
 | 
			
		||||
/*
 | 
			
		||||
 *  Copyright (c) 2015 The WebM project authors. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 *  Use of this source code is governed by a BSD-style license
 | 
			
		||||
 *  that can be found in the LICENSE file in the root of the source
 | 
			
		||||
 *  tree. An additional intellectual property rights grant can be found
 | 
			
		||||
 *  in the file PATENTS.  All contributing project authors may
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
//  Test and time VPX intra-predictor functions
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/md5_helper.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
#include "vpx_ports/mem.h"
 | 
			
		||||
#include "vpx_ports/vpx_timer.h"
 | 
			
		||||
 | 
			
		||||
// -----------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
typedef void (*VpxPredFunc)(uint8_t *dst, ptrdiff_t y_stride,
 | 
			
		||||
                            const uint8_t *above, const uint8_t *left);
 | 
			
		||||
 | 
			
		||||
const int kNumVp9IntraPredFuncs = 13;
 | 
			
		||||
const char *kVp9IntraPredNames[kNumVp9IntraPredFuncs] = {
 | 
			
		||||
  "DC_PRED", "DC_LEFT_PRED", "DC_TOP_PRED", "DC_128_PRED", "V_PRED", "H_PRED",
 | 
			
		||||
  "D45_PRED", "D135_PRED", "D117_PRED", "D153_PRED", "D207_PRED", "D63_PRED",
 | 
			
		||||
  "TM_PRED"
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
void TestIntraPred(const char name[], VpxPredFunc const *pred_funcs,
 | 
			
		||||
                   const char *const pred_func_names[], int num_funcs,
 | 
			
		||||
                   const char *const signatures[], int block_size,
 | 
			
		||||
                   int num_pixels_per_test) {
 | 
			
		||||
  libvpx_test::ACMRandom rnd(libvpx_test::ACMRandom::DeterministicSeed());
 | 
			
		||||
  const int kBPS = 32;
 | 
			
		||||
  const int kTotalPixels = 32 * kBPS;
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, src[kTotalPixels]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, ref_src[kTotalPixels]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, left[kBPS]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, above_mem[2 * kBPS + 16]);
 | 
			
		||||
  uint8_t *const above = above_mem + 16;
 | 
			
		||||
  for (int i = 0; i < kTotalPixels; ++i) ref_src[i] = rnd.Rand8();
 | 
			
		||||
  for (int i = 0; i < kBPS; ++i) left[i] = rnd.Rand8();
 | 
			
		||||
  for (int i = -1; i < kBPS; ++i) above[i] = rnd.Rand8();
 | 
			
		||||
  const int kNumTests = static_cast<int>(2.e10 / num_pixels_per_test);
 | 
			
		||||
 | 
			
		||||
  // some code assumes the top row has been extended:
 | 
			
		||||
  // d45/d63 C-code, for instance, but not the assembly.
 | 
			
		||||
  // TODO(jzern): this style of extension isn't strictly necessary.
 | 
			
		||||
  ASSERT_LE(block_size, kBPS);
 | 
			
		||||
  memset(above + block_size, above[block_size - 1], 2 * kBPS - block_size);
 | 
			
		||||
 | 
			
		||||
  for (int k = 0; k < num_funcs; ++k) {
 | 
			
		||||
    if (pred_funcs[k] == NULL) continue;
 | 
			
		||||
    memcpy(src, ref_src, sizeof(src));
 | 
			
		||||
    vpx_usec_timer timer;
 | 
			
		||||
    vpx_usec_timer_start(&timer);
 | 
			
		||||
    for (int num_tests = 0; num_tests < kNumTests; ++num_tests) {
 | 
			
		||||
      pred_funcs[k](src, kBPS, above, left);
 | 
			
		||||
    }
 | 
			
		||||
    libvpx_test::ClearSystemState();
 | 
			
		||||
    vpx_usec_timer_mark(&timer);
 | 
			
		||||
    const int elapsed_time =
 | 
			
		||||
        static_cast<int>(vpx_usec_timer_elapsed(&timer) / 1000);
 | 
			
		||||
    libvpx_test::MD5 md5;
 | 
			
		||||
    md5.Add(src, sizeof(src));
 | 
			
		||||
    printf("Mode %s[%12s]: %5d ms     MD5: %s\n", name, pred_func_names[k],
 | 
			
		||||
           elapsed_time, md5.Get());
 | 
			
		||||
    EXPECT_STREQ(signatures[k], md5.Get());
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TestIntraPred4(VpxPredFunc const *pred_funcs) {
 | 
			
		||||
  static const int kNumVp9IntraFuncs = 13;
 | 
			
		||||
  static const char *const kSignatures[kNumVp9IntraFuncs] = {
 | 
			
		||||
    "4334156168b34ab599d9b5b30f522fe9",
 | 
			
		||||
    "bc4649d5ba47c7ff178d92e475960fb0",
 | 
			
		||||
    "8d316e5933326dcac24e1064794b5d12",
 | 
			
		||||
    "a27270fed024eafd762c95de85f4da51",
 | 
			
		||||
    "c33dff000d4256c2b8f3bf9e9bab14d2",
 | 
			
		||||
    "44d8cddc2ad8f79b8ed3306051722b4f",
 | 
			
		||||
    "eb54839b2bad6699d8946f01ec041cd0",
 | 
			
		||||
    "ecb0d56ae5f677ea45127ce9d5c058e4",
 | 
			
		||||
    "0b7936841f6813da818275944895b574",
 | 
			
		||||
    "9117972ef64f91a58ff73e1731c81db2",
 | 
			
		||||
    "c56d5e8c729e46825f46dd5d3b5d508a",
 | 
			
		||||
    "c0889e2039bcf7bcb5d2f33cdca69adc",
 | 
			
		||||
    "309a618577b27c648f9c5ee45252bc8f",
 | 
			
		||||
  };
 | 
			
		||||
  TestIntraPred("Intra4", pred_funcs, kVp9IntraPredNames, kNumVp9IntraFuncs,
 | 
			
		||||
                kSignatures, 4, 4 * 4 * kNumVp9IntraFuncs);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TestIntraPred8(VpxPredFunc const *pred_funcs) {
 | 
			
		||||
  static const int kNumVp9IntraFuncs = 13;
 | 
			
		||||
  static const char *const kSignatures[kNumVp9IntraFuncs] = {
 | 
			
		||||
    "7694ddeeefed887faf9d339d18850928",
 | 
			
		||||
    "7d726b1213591b99f736be6dec65065b",
 | 
			
		||||
    "19c5711281357a485591aaf9c96c0a67",
 | 
			
		||||
    "ba6b66877a089e71cd938e3b8c40caac",
 | 
			
		||||
    "802440c93317e0f8ba93fab02ef74265",
 | 
			
		||||
    "9e09a47a15deb0b9d8372824f9805080",
 | 
			
		||||
    "b7c2d8c662268c0c427da412d7b0311d",
 | 
			
		||||
    "78339c1c60bb1d67d248ab8c4da08b7f",
 | 
			
		||||
    "5c97d70f7d47de1882a6cd86c165c8a9",
 | 
			
		||||
    "8182bf60688b42205acd95e59e967157",
 | 
			
		||||
    "08323400005a297f16d7e57e7fe1eaac",
 | 
			
		||||
    "95f7bfc262329a5849eda66d8f7c68ce",
 | 
			
		||||
    "815b75c8e0d91cc1ae766dc5d3e445a3",
 | 
			
		||||
  };
 | 
			
		||||
  TestIntraPred("Intra8", pred_funcs, kVp9IntraPredNames, kNumVp9IntraFuncs,
 | 
			
		||||
                kSignatures, 8, 8 * 8 * kNumVp9IntraFuncs);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TestIntraPred16(VpxPredFunc const *pred_funcs) {
 | 
			
		||||
  static const int kNumVp9IntraFuncs = 13;
 | 
			
		||||
  static const char *const kSignatures[kNumVp9IntraFuncs] = {
 | 
			
		||||
    "b40dbb555d5d16a043dc361e6694fe53",
 | 
			
		||||
    "fb08118cee3b6405d64c1fd68be878c6",
 | 
			
		||||
    "6c190f341475c837cc38c2e566b64875",
 | 
			
		||||
    "db5c34ccbe2c7f595d9b08b0dc2c698c",
 | 
			
		||||
    "a62cbfd153a1f0b9fed13e62b8408a7a",
 | 
			
		||||
    "143df5b4c89335e281103f610f5052e4",
 | 
			
		||||
    "d87feb124107cdf2cfb147655aa0bb3c",
 | 
			
		||||
    "7841fae7d4d47b519322e6a03eeed9dc",
 | 
			
		||||
    "f6ebed3f71cbcf8d6d0516ce87e11093",
 | 
			
		||||
    "3cc480297dbfeed01a1c2d78dd03d0c5",
 | 
			
		||||
    "b9f69fa6532b372c545397dcb78ef311",
 | 
			
		||||
    "a8fe1c70432f09d0c20c67bdb6432c4d",
 | 
			
		||||
    "b8a41aa968ec108af447af4217cba91b",
 | 
			
		||||
  };
 | 
			
		||||
  TestIntraPred("Intra16", pred_funcs, kVp9IntraPredNames, kNumVp9IntraFuncs,
 | 
			
		||||
                kSignatures, 16, 16 * 16 * kNumVp9IntraFuncs);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TestIntraPred32(VpxPredFunc const *pred_funcs) {
 | 
			
		||||
  static const int kNumVp9IntraFuncs = 13;
 | 
			
		||||
  static const char *const kSignatures[kNumVp9IntraFuncs] = {
 | 
			
		||||
    "558541656d84f9ae7896db655826febe",
 | 
			
		||||
    "b3587a1f9a01495fa38c8cd3c8e2a1bf",
 | 
			
		||||
    "4c6501e64f25aacc55a2a16c7e8f0255",
 | 
			
		||||
    "b3b01379ba08916ef6b1b35f7d9ad51c",
 | 
			
		||||
    "0f1eb38b6cbddb3d496199ef9f329071",
 | 
			
		||||
    "911c06efb9ed1c3b4c104b232b55812f",
 | 
			
		||||
    "9225beb0ddfa7a1d24eaa1be430a6654",
 | 
			
		||||
    "0a6d584a44f8db9aa7ade2e2fdb9fc9e",
 | 
			
		||||
    "b01c9076525216925f3456f034fb6eee",
 | 
			
		||||
    "d267e20ad9e5cd2915d1a47254d3d149",
 | 
			
		||||
    "ed012a4a5da71f36c2393023184a0e59",
 | 
			
		||||
    "f162b51ed618d28b936974cff4391da5",
 | 
			
		||||
    "9e1370c6d42e08d357d9612c93a71cfc",
 | 
			
		||||
  };
 | 
			
		||||
  TestIntraPred("Intra32", pred_funcs, kVp9IntraPredNames, kNumVp9IntraFuncs,
 | 
			
		||||
                kSignatures, 32, 32 * 32 * kNumVp9IntraFuncs);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
 | 
			
		||||
// Defines a test case for |arch| (e.g., C, SSE2, ...) passing the predictors
 | 
			
		||||
// to |test_func|. The test name is 'arch.test_func', e.g., C.TestIntraPred4.
 | 
			
		||||
#define INTRA_PRED_TEST(arch, test_func, dc, dc_left, dc_top, dc_128, v, h, \
 | 
			
		||||
                        d45, d135, d117, d153, d207, d63, tm)               \
 | 
			
		||||
  TEST(arch, test_func) {                                                   \
 | 
			
		||||
    static const VpxPredFunc vpx_intra_pred[] = {                           \
 | 
			
		||||
        dc,   dc_left, dc_top, dc_128, v,   h, d45,                         \
 | 
			
		||||
        d135, d117,    d153,   d207,   d63, tm};                            \
 | 
			
		||||
    test_func(vpx_intra_pred);                                              \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
// -----------------------------------------------------------------------------
 | 
			
		||||
// 4x4
 | 
			
		||||
 | 
			
		||||
INTRA_PRED_TEST(C, TestIntraPred4, vpx_dc_predictor_4x4_c,
 | 
			
		||||
                vpx_dc_left_predictor_4x4_c, vpx_dc_top_predictor_4x4_c,
 | 
			
		||||
                vpx_dc_128_predictor_4x4_c, vpx_v_predictor_4x4_c,
 | 
			
		||||
                vpx_h_predictor_4x4_c, vpx_d45_predictor_4x4_c,
 | 
			
		||||
                vpx_d135_predictor_4x4_c, vpx_d117_predictor_4x4_c,
 | 
			
		||||
                vpx_d153_predictor_4x4_c, vpx_d207_predictor_4x4_c,
 | 
			
		||||
                vpx_d63_predictor_4x4_c, vpx_tm_predictor_4x4_c)
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE && CONFIG_USE_X86INC
 | 
			
		||||
INTRA_PRED_TEST(SSE, TestIntraPred4, vpx_dc_predictor_4x4_sse,
 | 
			
		||||
                vpx_dc_left_predictor_4x4_sse, vpx_dc_top_predictor_4x4_sse,
 | 
			
		||||
                vpx_dc_128_predictor_4x4_sse, vpx_v_predictor_4x4_sse, NULL,
 | 
			
		||||
                NULL, NULL, NULL, NULL, NULL, NULL, vpx_tm_predictor_4x4_sse)
 | 
			
		||||
#endif  // HAVE_SSE && CONFIG_USE_X86INC
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
 | 
			
		||||
INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                vpx_h_predictor_4x4_ssse3, vpx_d45_predictor_4x4_ssse3, NULL,
 | 
			
		||||
                NULL, vpx_d153_predictor_4x4_ssse3,
 | 
			
		||||
                vpx_d207_predictor_4x4_ssse3, vpx_d63_predictor_4x4_ssse3, NULL)
 | 
			
		||||
#endif  // HAVE_SSSE3 && CONFIG_USE_X86INC
 | 
			
		||||
 | 
			
		||||
#if HAVE_DSPR2
 | 
			
		||||
INTRA_PRED_TEST(DSPR2, TestIntraPred4, vpx_dc_predictor_4x4_dspr2, NULL, NULL,
 | 
			
		||||
                NULL, NULL, vpx_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL,
 | 
			
		||||
                NULL, NULL, vpx_tm_predictor_4x4_dspr2)
 | 
			
		||||
#endif  // HAVE_DSPR2
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON
 | 
			
		||||
INTRA_PRED_TEST(NEON, TestIntraPred4, vpx_dc_predictor_4x4_neon,
 | 
			
		||||
                vpx_dc_left_predictor_4x4_neon, vpx_dc_top_predictor_4x4_neon,
 | 
			
		||||
                vpx_dc_128_predictor_4x4_neon, vpx_v_predictor_4x4_neon,
 | 
			
		||||
                vpx_h_predictor_4x4_neon, vpx_d45_predictor_4x4_neon,
 | 
			
		||||
                vpx_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL,
 | 
			
		||||
                vpx_tm_predictor_4x4_neon)
 | 
			
		||||
#endif  // HAVE_NEON
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INTRA_PRED_TEST(MSA, TestIntraPred4, vpx_dc_predictor_4x4_msa,
 | 
			
		||||
                vpx_dc_left_predictor_4x4_msa, vpx_dc_top_predictor_4x4_msa,
 | 
			
		||||
                vpx_dc_128_predictor_4x4_msa, vpx_v_predictor_4x4_msa,
 | 
			
		||||
                vpx_h_predictor_4x4_msa, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                NULL, vpx_tm_predictor_4x4_msa)
 | 
			
		||||
#endif  // HAVE_MSA
 | 
			
		||||
 | 
			
		||||
// -----------------------------------------------------------------------------
 | 
			
		||||
// 8x8
 | 
			
		||||
 | 
			
		||||
INTRA_PRED_TEST(C, TestIntraPred8, vpx_dc_predictor_8x8_c,
 | 
			
		||||
                vpx_dc_left_predictor_8x8_c, vpx_dc_top_predictor_8x8_c,
 | 
			
		||||
                vpx_dc_128_predictor_8x8_c, vpx_v_predictor_8x8_c,
 | 
			
		||||
                vpx_h_predictor_8x8_c, vpx_d45_predictor_8x8_c,
 | 
			
		||||
                vpx_d135_predictor_8x8_c, vpx_d117_predictor_8x8_c,
 | 
			
		||||
                vpx_d153_predictor_8x8_c, vpx_d207_predictor_8x8_c,
 | 
			
		||||
                vpx_d63_predictor_8x8_c, vpx_tm_predictor_8x8_c)
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE && CONFIG_USE_X86INC
 | 
			
		||||
INTRA_PRED_TEST(SSE, TestIntraPred8, vpx_dc_predictor_8x8_sse,
 | 
			
		||||
                vpx_dc_left_predictor_8x8_sse, vpx_dc_top_predictor_8x8_sse,
 | 
			
		||||
                vpx_dc_128_predictor_8x8_sse, vpx_v_predictor_8x8_sse, NULL,
 | 
			
		||||
                NULL, NULL, NULL, NULL, NULL, NULL, NULL)
 | 
			
		||||
#endif  // HAVE_SSE && CONFIG_USE_X86INC
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
 | 
			
		||||
INTRA_PRED_TEST(SSE2, TestIntraPred8, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                NULL, NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_sse2)
 | 
			
		||||
#endif  // HAVE_SSE2 && CONFIG_USE_X86INC
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
 | 
			
		||||
INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                vpx_h_predictor_8x8_ssse3, vpx_d45_predictor_8x8_ssse3, NULL,
 | 
			
		||||
                NULL, vpx_d153_predictor_8x8_ssse3,
 | 
			
		||||
                vpx_d207_predictor_8x8_ssse3, vpx_d63_predictor_8x8_ssse3, NULL)
 | 
			
		||||
#endif  // HAVE_SSSE3 && CONFIG_USE_X86INC
 | 
			
		||||
 | 
			
		||||
#if HAVE_DSPR2
 | 
			
		||||
INTRA_PRED_TEST(DSPR2, TestIntraPred8, vpx_dc_predictor_8x8_dspr2, NULL, NULL,
 | 
			
		||||
                NULL, NULL, vpx_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL,
 | 
			
		||||
                NULL, NULL, vpx_tm_predictor_8x8_c)
 | 
			
		||||
#endif  // HAVE_DSPR2
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON
 | 
			
		||||
INTRA_PRED_TEST(NEON, TestIntraPred8, vpx_dc_predictor_8x8_neon,
 | 
			
		||||
                vpx_dc_left_predictor_8x8_neon, vpx_dc_top_predictor_8x8_neon,
 | 
			
		||||
                vpx_dc_128_predictor_8x8_neon, vpx_v_predictor_8x8_neon,
 | 
			
		||||
                vpx_h_predictor_8x8_neon, vpx_d45_predictor_8x8_neon, NULL,
 | 
			
		||||
                NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_neon)
 | 
			
		||||
 | 
			
		||||
#endif  // HAVE_NEON
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INTRA_PRED_TEST(MSA, TestIntraPred8, vpx_dc_predictor_8x8_msa,
 | 
			
		||||
                vpx_dc_left_predictor_8x8_msa, vpx_dc_top_predictor_8x8_msa,
 | 
			
		||||
                vpx_dc_128_predictor_8x8_msa, vpx_v_predictor_8x8_msa,
 | 
			
		||||
                vpx_h_predictor_8x8_msa, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                NULL, vpx_tm_predictor_8x8_msa)
 | 
			
		||||
#endif  // HAVE_MSA
 | 
			
		||||
 | 
			
		||||
// -----------------------------------------------------------------------------
 | 
			
		||||
// 16x16
 | 
			
		||||
 | 
			
		||||
INTRA_PRED_TEST(C, TestIntraPred16, vpx_dc_predictor_16x16_c,
 | 
			
		||||
                vpx_dc_left_predictor_16x16_c, vpx_dc_top_predictor_16x16_c,
 | 
			
		||||
                vpx_dc_128_predictor_16x16_c, vpx_v_predictor_16x16_c,
 | 
			
		||||
                vpx_h_predictor_16x16_c, vpx_d45_predictor_16x16_c,
 | 
			
		||||
                vpx_d135_predictor_16x16_c, vpx_d117_predictor_16x16_c,
 | 
			
		||||
                vpx_d153_predictor_16x16_c, vpx_d207_predictor_16x16_c,
 | 
			
		||||
                vpx_d63_predictor_16x16_c, vpx_tm_predictor_16x16_c)
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
 | 
			
		||||
INTRA_PRED_TEST(SSE2, TestIntraPred16, vpx_dc_predictor_16x16_sse2,
 | 
			
		||||
                vpx_dc_left_predictor_16x16_sse2,
 | 
			
		||||
                vpx_dc_top_predictor_16x16_sse2,
 | 
			
		||||
                vpx_dc_128_predictor_16x16_sse2, vpx_v_predictor_16x16_sse2,
 | 
			
		||||
                NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                vpx_tm_predictor_16x16_sse2)
 | 
			
		||||
#endif  // HAVE_SSE2 && CONFIG_USE_X86INC
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
 | 
			
		||||
INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                vpx_h_predictor_16x16_ssse3, vpx_d45_predictor_16x16_ssse3,
 | 
			
		||||
                NULL, NULL, vpx_d153_predictor_16x16_ssse3,
 | 
			
		||||
                vpx_d207_predictor_16x16_ssse3, vpx_d63_predictor_16x16_ssse3,
 | 
			
		||||
                NULL)
 | 
			
		||||
#endif  // HAVE_SSSE3 && CONFIG_USE_X86INC
 | 
			
		||||
 | 
			
		||||
#if HAVE_DSPR2
 | 
			
		||||
INTRA_PRED_TEST(DSPR2, TestIntraPred16, vpx_dc_predictor_16x16_dspr2, NULL,
 | 
			
		||||
                NULL, NULL, NULL, vpx_h_predictor_16x16_dspr2, NULL, NULL, NULL,
 | 
			
		||||
                NULL, NULL, NULL, NULL)
 | 
			
		||||
#endif  // HAVE_DSPR2
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON
 | 
			
		||||
INTRA_PRED_TEST(NEON, TestIntraPred16, vpx_dc_predictor_16x16_neon,
 | 
			
		||||
                vpx_dc_left_predictor_16x16_neon,
 | 
			
		||||
                vpx_dc_top_predictor_16x16_neon,
 | 
			
		||||
                vpx_dc_128_predictor_16x16_neon, vpx_v_predictor_16x16_neon,
 | 
			
		||||
                vpx_h_predictor_16x16_neon, vpx_d45_predictor_16x16_neon, NULL,
 | 
			
		||||
                NULL, NULL, NULL, NULL, vpx_tm_predictor_16x16_neon)
 | 
			
		||||
#endif  // HAVE_NEON
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INTRA_PRED_TEST(MSA, TestIntraPred16, vpx_dc_predictor_16x16_msa,
 | 
			
		||||
                vpx_dc_left_predictor_16x16_msa, vpx_dc_top_predictor_16x16_msa,
 | 
			
		||||
                vpx_dc_128_predictor_16x16_msa, vpx_v_predictor_16x16_msa,
 | 
			
		||||
                vpx_h_predictor_16x16_msa, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                NULL, vpx_tm_predictor_16x16_msa)
 | 
			
		||||
#endif  // HAVE_MSA
 | 
			
		||||
 | 
			
		||||
// -----------------------------------------------------------------------------
 | 
			
		||||
// 32x32
 | 
			
		||||
 | 
			
		||||
INTRA_PRED_TEST(C, TestIntraPred32, vpx_dc_predictor_32x32_c,
 | 
			
		||||
                vpx_dc_left_predictor_32x32_c, vpx_dc_top_predictor_32x32_c,
 | 
			
		||||
                vpx_dc_128_predictor_32x32_c, vpx_v_predictor_32x32_c,
 | 
			
		||||
                vpx_h_predictor_32x32_c, vpx_d45_predictor_32x32_c,
 | 
			
		||||
                vpx_d135_predictor_32x32_c, vpx_d117_predictor_32x32_c,
 | 
			
		||||
                vpx_d153_predictor_32x32_c, vpx_d207_predictor_32x32_c,
 | 
			
		||||
                vpx_d63_predictor_32x32_c, vpx_tm_predictor_32x32_c)
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
 | 
			
		||||
#if ARCH_X86_64
 | 
			
		||||
INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2,
 | 
			
		||||
                vpx_dc_left_predictor_32x32_sse2,
 | 
			
		||||
                vpx_dc_top_predictor_32x32_sse2,
 | 
			
		||||
                vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2,
 | 
			
		||||
                NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                vpx_tm_predictor_32x32_sse2)
 | 
			
		||||
#else
 | 
			
		||||
INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2,
 | 
			
		||||
                vpx_dc_left_predictor_32x32_sse2,
 | 
			
		||||
                vpx_dc_top_predictor_32x32_sse2,
 | 
			
		||||
                vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2,
 | 
			
		||||
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
 | 
			
		||||
#endif  // ARCH_X86_64
 | 
			
		||||
#endif  // HAVE_SSE2 && CONFIG_USE_X86INC
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
 | 
			
		||||
INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                vpx_h_predictor_32x32_ssse3, vpx_d45_predictor_32x32_ssse3,
 | 
			
		||||
                NULL, NULL, vpx_d153_predictor_32x32_ssse3,
 | 
			
		||||
                vpx_d207_predictor_32x32_ssse3, vpx_d63_predictor_32x32_ssse3,
 | 
			
		||||
                NULL)
 | 
			
		||||
#endif  // HAVE_SSSE3 && CONFIG_USE_X86INC
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON
 | 
			
		||||
INTRA_PRED_TEST(NEON, TestIntraPred32, vpx_dc_predictor_32x32_neon,
 | 
			
		||||
                vpx_dc_left_predictor_32x32_neon,
 | 
			
		||||
                vpx_dc_top_predictor_32x32_neon,
 | 
			
		||||
                vpx_dc_128_predictor_32x32_neon, vpx_v_predictor_32x32_neon,
 | 
			
		||||
                vpx_h_predictor_32x32_neon, NULL, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                vpx_tm_predictor_32x32_neon)
 | 
			
		||||
#endif  // HAVE_NEON
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INTRA_PRED_TEST(MSA, TestIntraPred32, vpx_dc_predictor_32x32_msa,
 | 
			
		||||
                vpx_dc_left_predictor_32x32_msa, vpx_dc_top_predictor_32x32_msa,
 | 
			
		||||
                vpx_dc_128_predictor_32x32_msa, vpx_v_predictor_32x32_msa,
 | 
			
		||||
                vpx_h_predictor_32x32_msa, NULL, NULL, NULL, NULL, NULL,
 | 
			
		||||
                NULL, vpx_tm_predictor_32x32_msa)
 | 
			
		||||
#endif  // HAVE_MSA
 | 
			
		||||
 | 
			
		||||
#include "test/test_libvpx.cc"
 | 
			
		||||
@@ -8,6 +8,9 @@
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#if ARCH_X86 || ARCH_X86_64
 | 
			
		||||
#include "vpx_ports/x86.h"
 | 
			
		||||
@@ -15,13 +18,15 @@
 | 
			
		||||
extern "C" {
 | 
			
		||||
#if CONFIG_VP8
 | 
			
		||||
extern void vp8_rtcd();
 | 
			
		||||
#endif
 | 
			
		||||
#endif  // CONFIG_VP8
 | 
			
		||||
#if CONFIG_VP9
 | 
			
		||||
extern void vp9_rtcd();
 | 
			
		||||
#endif
 | 
			
		||||
#endif  // CONFIG_VP9
 | 
			
		||||
extern void vpx_dsp_rtcd();
 | 
			
		||||
extern void vpx_scale_rtcd();
 | 
			
		||||
}
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#if ARCH_X86 || ARCH_X86_64
 | 
			
		||||
static void append_negative_gtest_filter(const char *str) {
 | 
			
		||||
  std::string filter = ::testing::FLAGS_gtest_filter;
 | 
			
		||||
  // Negative patterns begin with one '-' followed by a ':' separated list.
 | 
			
		||||
@@ -29,6 +34,7 @@ static void append_negative_gtest_filter(const char *str) {
 | 
			
		||||
  filter += str;
 | 
			
		||||
  ::testing::FLAGS_gtest_filter = filter;
 | 
			
		||||
}
 | 
			
		||||
#endif  // ARCH_X86 || ARCH_X86_64
 | 
			
		||||
 | 
			
		||||
int main(int argc, char **argv) {
 | 
			
		||||
  ::testing::InitGoogleTest(&argc, argv);
 | 
			
		||||
@@ -36,22 +42,22 @@ int main(int argc, char **argv) {
 | 
			
		||||
#if ARCH_X86 || ARCH_X86_64
 | 
			
		||||
  const int simd_caps = x86_simd_caps();
 | 
			
		||||
  if (!(simd_caps & HAS_MMX))
 | 
			
		||||
    append_negative_gtest_filter(":MMX/*");
 | 
			
		||||
    append_negative_gtest_filter(":MMX.*:MMX/*");
 | 
			
		||||
  if (!(simd_caps & HAS_SSE))
 | 
			
		||||
    append_negative_gtest_filter(":SSE/*");
 | 
			
		||||
    append_negative_gtest_filter(":SSE.*:SSE/*");
 | 
			
		||||
  if (!(simd_caps & HAS_SSE2))
 | 
			
		||||
    append_negative_gtest_filter(":SSE2/*");
 | 
			
		||||
    append_negative_gtest_filter(":SSE2.*:SSE2/*");
 | 
			
		||||
  if (!(simd_caps & HAS_SSE3))
 | 
			
		||||
    append_negative_gtest_filter(":SSE3/*");
 | 
			
		||||
    append_negative_gtest_filter(":SSE3.*:SSE3/*");
 | 
			
		||||
  if (!(simd_caps & HAS_SSSE3))
 | 
			
		||||
    append_negative_gtest_filter(":SSSE3/*");
 | 
			
		||||
    append_negative_gtest_filter(":SSSE3.*:SSSE3/*");
 | 
			
		||||
  if (!(simd_caps & HAS_SSE4_1))
 | 
			
		||||
    append_negative_gtest_filter(":SSE4_1/*");
 | 
			
		||||
    append_negative_gtest_filter(":SSE4_1.*:SSE4_1/*");
 | 
			
		||||
  if (!(simd_caps & HAS_AVX))
 | 
			
		||||
    append_negative_gtest_filter(":AVX/*");
 | 
			
		||||
    append_negative_gtest_filter(":AVX.*:AVX/*");
 | 
			
		||||
  if (!(simd_caps & HAS_AVX2))
 | 
			
		||||
    append_negative_gtest_filter(":AVX2/*");
 | 
			
		||||
#endif
 | 
			
		||||
    append_negative_gtest_filter(":AVX2.*:AVX2/*");
 | 
			
		||||
#endif  // ARCH_X86 || ARCH_X86_64
 | 
			
		||||
 | 
			
		||||
#if !CONFIG_SHARED
 | 
			
		||||
// Shared library builds don't support whitebox tests
 | 
			
		||||
@@ -59,11 +65,13 @@ int main(int argc, char **argv) {
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP8
 | 
			
		||||
  vp8_rtcd();
 | 
			
		||||
#endif
 | 
			
		||||
#endif  // CONFIG_VP8
 | 
			
		||||
#if CONFIG_VP9
 | 
			
		||||
  vp9_rtcd();
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
#endif  // CONFIG_VP9
 | 
			
		||||
  vpx_dsp_rtcd();
 | 
			
		||||
  vpx_scale_rtcd();
 | 
			
		||||
#endif  // !CONFIG_SHARED
 | 
			
		||||
 | 
			
		||||
  return RUN_ALL_TESTS();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -135,6 +135,7 @@ TEST_P(TestVectorTest, MD5Match) {
 | 
			
		||||
 | 
			
		||||
// Test VP8 decode in serial mode with single thread.
 | 
			
		||||
// NOTE: VP8 only support serial mode.
 | 
			
		||||
#if CONFIG_VP8_DECODER
 | 
			
		||||
VP8_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    TestVectorTest,
 | 
			
		||||
    ::testing::Combine(
 | 
			
		||||
@@ -143,8 +144,10 @@ VP8_INSTANTIATE_TEST_CASE(
 | 
			
		||||
        ::testing::ValuesIn(libvpx_test::kVP8TestVectors,
 | 
			
		||||
                            libvpx_test::kVP8TestVectors +
 | 
			
		||||
                                libvpx_test::kNumVP8TestVectors)));
 | 
			
		||||
#endif  // CONFIG_VP8_DECODER
 | 
			
		||||
 | 
			
		||||
// Test VP9 decode in serial mode with single thread.
 | 
			
		||||
#if CONFIG_VP9_DECODER
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    TestVectorTest,
 | 
			
		||||
    ::testing::Combine(
 | 
			
		||||
@@ -154,8 +157,6 @@ VP9_INSTANTIATE_TEST_CASE(
 | 
			
		||||
                            libvpx_test::kVP9TestVectors +
 | 
			
		||||
                                libvpx_test::kNumVP9TestVectors)));
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if CONFIG_VP9_DECODER
 | 
			
		||||
// Test VP9 decode in frame parallel mode with different number of threads.
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    VP9MultiThreadedFrameParallel, TestVectorTest,
 | 
			
		||||
 
 | 
			
		||||
@@ -165,7 +165,10 @@ const char *const kVP9TestVectors[] = {
 | 
			
		||||
  "vp90-2-11-size-351x287.webm", "vp90-2-11-size-351x288.webm",
 | 
			
		||||
  "vp90-2-11-size-352x287.webm", "vp90-2-12-droppable_1.ivf",
 | 
			
		||||
  "vp90-2-12-droppable_2.ivf", "vp90-2-12-droppable_3.ivf",
 | 
			
		||||
#if !CONFIG_SIZE_LIMIT || \
 | 
			
		||||
    (DECODE_WIDTH_LIMIT >= 20400 && DECODE_HEIGHT_LIMIT >= 120)
 | 
			
		||||
  "vp90-2-13-largescaling.webm",
 | 
			
		||||
#endif
 | 
			
		||||
  "vp90-2-14-resize-fp-tiles-1-16.webm",
 | 
			
		||||
  "vp90-2-14-resize-fp-tiles-1-2-4-8-16.webm",
 | 
			
		||||
  "vp90-2-14-resize-fp-tiles-1-2.webm", "vp90-2-14-resize-fp-tiles-1-4.webm",
 | 
			
		||||
 
 | 
			
		||||
@@ -104,4 +104,5 @@ TEST_P(TileIndependenceTest, MD5Match) {
 | 
			
		||||
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
 | 
			
		||||
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -402,11 +402,15 @@ VP9_IVF_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-09-subpixel-00.ivf"
 | 
			
		||||
 | 
			
		||||
VP9_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-00-quantizer-00.webm"
 | 
			
		||||
VP9_FPM_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-07-frame_parallel-1.webm"
 | 
			
		||||
VP9_LT_50_FRAMES_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-02-size-32x08.webm"
 | 
			
		||||
 | 
			
		||||
YUV_RAW_INPUT="${LIBVPX_TEST_DATA_PATH}/hantro_collage_w352h288.yuv"
 | 
			
		||||
YUV_RAW_INPUT_WIDTH=352
 | 
			
		||||
YUV_RAW_INPUT_HEIGHT=288
 | 
			
		||||
 | 
			
		||||
Y4M_NOSQ_PAR_INPUT="${LIBVPX_TEST_DATA_PATH}/park_joy_90p_8_420_a10-1.y4m"
 | 
			
		||||
Y4M_720P_INPUT="${LIBVPX_TEST_DATA_PATH}/niklas_1280_720_30.y4m"
 | 
			
		||||
 | 
			
		||||
# Setup a trap function to clean up after tests complete.
 | 
			
		||||
trap cleanup EXIT
 | 
			
		||||
 | 
			
		||||
@@ -428,6 +432,7 @@ vlog "$(basename "${0%.*}") test configuration:
 | 
			
		||||
  VPX_TEST_VERBOSE_OUTPUT=${VPX_TEST_VERBOSE_OUTPUT}
 | 
			
		||||
  YUV_RAW_INPUT=${YUV_RAW_INPUT}
 | 
			
		||||
  YUV_RAW_INPUT_WIDTH=${YUV_RAW_INPUT_WIDTH}
 | 
			
		||||
  YUV_RAW_INPUT_HEIGHT=${YUV_RAW_INPUT_HEIGHT}"
 | 
			
		||||
  YUV_RAW_INPUT_HEIGHT=${YUV_RAW_INPUT_HEIGHT}
 | 
			
		||||
  Y4M_NOSQ_PAR_INPUT=${Y4M_NOSQ_PAR_INPUT}"
 | 
			
		||||
 | 
			
		||||
fi  # End $VPX_TEST_TOOLS_COMMON_SH pseudo include guard.
 | 
			
		||||
 
 | 
			
		||||
@@ -19,8 +19,7 @@
 | 
			
		||||
// Macros
 | 
			
		||||
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
 | 
			
		||||
 | 
			
		||||
static double compute_psnr(const vpx_image_t *img1,
 | 
			
		||||
                           const vpx_image_t *img2) {
 | 
			
		||||
inline double compute_psnr(const vpx_image_t *img1, const vpx_image_t *img2) {
 | 
			
		||||
  assert((img1->fmt == img2->fmt) &&
 | 
			
		||||
         (img1->d_w == img2->d_w) &&
 | 
			
		||||
         (img1->d_h == img2->d_h));
 | 
			
		||||
 
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -48,7 +48,7 @@ static std::string GetDataPath() {
 | 
			
		||||
#undef TO_STRING
 | 
			
		||||
#undef STRINGIFY
 | 
			
		||||
 | 
			
		||||
static FILE *OpenTestDataFile(const std::string& file_name) {
 | 
			
		||||
inline FILE *OpenTestDataFile(const std::string& file_name) {
 | 
			
		||||
  const std::string path_to_source = GetDataPath() + "/" + file_name;
 | 
			
		||||
  return fopen(path_to_source.c_str(), "rb");
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -16,12 +16,12 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
 | 
			
		||||
#include "vp8/encoder/boolhuff.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "vp8/decoder/dboolhuff.h"
 | 
			
		||||
#include "vp8/encoder/boolhuff.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
const int num_tests = 10;
 | 
			
		||||
 
 | 
			
		||||
@@ -52,13 +52,13 @@ TEST_P(VP8DenoiserTest, BitexactCheck) {
 | 
			
		||||
  // mc_avg_block is the denoised reference block,
 | 
			
		||||
  // avg_block_c is the denoised result from C code,
 | 
			
		||||
  // avg_block_sse2 is the denoised result from SSE2 code.
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, sig_block_c, kNumPixels);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, sig_block_c[kNumPixels]);
 | 
			
		||||
  // Since in VP8 denoiser, the source signal will be changed,
 | 
			
		||||
  // we need another copy of the source signal as the input of sse2 code.
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, sig_block_sse2, kNumPixels);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, mc_avg_block, kNumPixels);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, avg_block_c, kNumPixels);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, avg_block_sse2, kNumPixels);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, sig_block_sse2[kNumPixels]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, mc_avg_block[kNumPixels]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, avg_block_c[kNumPixels]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, avg_block_sse2[kNumPixels]);
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
    // Generate random motion magnitude, 20% of which exceed the threshold.
 | 
			
		||||
 
 | 
			
		||||
@@ -15,10 +15,10 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
 | 
			
		||||
#include "./vp8_rtcd.h"
 | 
			
		||||
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp8_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										238
									
								
								test/vp9_arf_freq_test.cc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										238
									
								
								test/vp9_arf_freq_test.cc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,238 @@
 | 
			
		||||
/*
 | 
			
		||||
 *  Copyright (c) 2015 The WebM project authors. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 *  Use of this source code is governed by a BSD-style license
 | 
			
		||||
 *  that can be found in the LICENSE file in the root of the source
 | 
			
		||||
 *  tree. An additional intellectual property rights grant can be found
 | 
			
		||||
 *  in the file PATENTS.  All contributing project authors may
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "test/codec_factory.h"
 | 
			
		||||
#include "test/encode_test_driver.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "test/y4m_video_source.h"
 | 
			
		||||
#include "test/yuv_video_source.h"
 | 
			
		||||
#include "vp9/encoder/vp9_ratectrl.h"
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
const unsigned int kFrames = 100;
 | 
			
		||||
const int kBitrate = 500;
 | 
			
		||||
 | 
			
		||||
#define ARF_NOT_SEEN               1000001
 | 
			
		||||
#define ARF_SEEN_ONCE              1000000
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  const char *filename;
 | 
			
		||||
  unsigned int width;
 | 
			
		||||
  unsigned int height;
 | 
			
		||||
  unsigned int framerate_num;
 | 
			
		||||
  unsigned int framerate_den;
 | 
			
		||||
  unsigned int input_bit_depth;
 | 
			
		||||
  vpx_img_fmt fmt;
 | 
			
		||||
  vpx_bit_depth_t bit_depth;
 | 
			
		||||
  unsigned int profile;
 | 
			
		||||
} TestVideoParam;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  libvpx_test::TestMode mode;
 | 
			
		||||
  int cpu_used;
 | 
			
		||||
} TestEncodeParam;
 | 
			
		||||
 | 
			
		||||
const TestVideoParam kTestVectors[] = {
 | 
			
		||||
  // artificially increase framerate to trigger default check
 | 
			
		||||
  {"hantro_collage_w352h288.yuv", 352, 288, 5000, 1,
 | 
			
		||||
    8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
 | 
			
		||||
  {"hantro_collage_w352h288.yuv", 352, 288, 30, 1,
 | 
			
		||||
    8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
 | 
			
		||||
  {"rush_hour_444.y4m", 352, 288, 30, 1,
 | 
			
		||||
    8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
  // Add list of profile 2/3 test videos here ...
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const TestEncodeParam kEncodeVectors[] = {
 | 
			
		||||
  {::libvpx_test::kOnePassGood, 2},
 | 
			
		||||
  {::libvpx_test::kOnePassGood, 5},
 | 
			
		||||
  {::libvpx_test::kTwoPassGood, 1},
 | 
			
		||||
  {::libvpx_test::kTwoPassGood, 2},
 | 
			
		||||
  {::libvpx_test::kTwoPassGood, 5},
 | 
			
		||||
  {::libvpx_test::kRealTime, 5},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const int kMinArfVectors[] = {
 | 
			
		||||
  // NOTE: 0 refers to the default built-in logic in:
 | 
			
		||||
  //       vp9_rc_get_default_min_gf_interval(...)
 | 
			
		||||
  0, 4, 8, 12, 15
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
int is_extension_y4m(const char *filename) {
 | 
			
		||||
  const char *dot = strrchr(filename, '.');
 | 
			
		||||
  if (!dot || dot == filename)
 | 
			
		||||
    return 0;
 | 
			
		||||
  else
 | 
			
		||||
    return !strcmp(dot, ".y4m");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class ArfFreqTest
 | 
			
		||||
    : public ::libvpx_test::EncoderTest,
 | 
			
		||||
      public ::libvpx_test::CodecTestWith3Params<TestVideoParam, \
 | 
			
		||||
                                                 TestEncodeParam, int> {
 | 
			
		||||
 protected:
 | 
			
		||||
  ArfFreqTest()
 | 
			
		||||
      : EncoderTest(GET_PARAM(0)),
 | 
			
		||||
        test_video_param_(GET_PARAM(1)),
 | 
			
		||||
        test_encode_param_(GET_PARAM(2)),
 | 
			
		||||
        min_arf_requested_(GET_PARAM(3)) {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual ~ArfFreqTest() {}
 | 
			
		||||
 | 
			
		||||
  virtual void SetUp() {
 | 
			
		||||
    InitializeConfig();
 | 
			
		||||
    SetMode(test_encode_param_.mode);
 | 
			
		||||
    if (test_encode_param_.mode != ::libvpx_test::kRealTime) {
 | 
			
		||||
      cfg_.g_lag_in_frames = 25;
 | 
			
		||||
      cfg_.rc_end_usage = VPX_VBR;
 | 
			
		||||
    } else {
 | 
			
		||||
      cfg_.g_lag_in_frames = 0;
 | 
			
		||||
      cfg_.rc_end_usage = VPX_CBR;
 | 
			
		||||
      cfg_.rc_buf_sz = 1000;
 | 
			
		||||
      cfg_.rc_buf_initial_sz = 500;
 | 
			
		||||
      cfg_.rc_buf_optimal_sz = 600;
 | 
			
		||||
    }
 | 
			
		||||
    dec_cfg_.threads = 4;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual void BeginPassHook(unsigned int) {
 | 
			
		||||
    min_run_ = ARF_NOT_SEEN;
 | 
			
		||||
    run_of_visible_frames_ = 0;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  int GetNumFramesInPkt(const vpx_codec_cx_pkt_t *pkt) {
 | 
			
		||||
    const uint8_t *buffer = reinterpret_cast<uint8_t*>(pkt->data.frame.buf);
 | 
			
		||||
    const uint8_t marker = buffer[pkt->data.frame.sz - 1];
 | 
			
		||||
    const int mag = ((marker >> 3) & 3) + 1;
 | 
			
		||||
    int frames = (marker & 0x7) + 1;
 | 
			
		||||
    const unsigned int index_sz = 2 + mag  * frames;
 | 
			
		||||
    // Check for superframe or not.
 | 
			
		||||
    // Assume superframe has only one visible frame, the rest being
 | 
			
		||||
    // invisible. If superframe index is not found, then there is only
 | 
			
		||||
    // one frame.
 | 
			
		||||
    if (!((marker & 0xe0) == 0xc0 &&
 | 
			
		||||
          pkt->data.frame.sz >= index_sz &&
 | 
			
		||||
          buffer[pkt->data.frame.sz - index_sz] == marker)) {
 | 
			
		||||
      frames = 1;
 | 
			
		||||
    }
 | 
			
		||||
    return frames;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
 | 
			
		||||
    if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
 | 
			
		||||
      return;
 | 
			
		||||
    const int frames = GetNumFramesInPkt(pkt);
 | 
			
		||||
    if (frames == 1) {
 | 
			
		||||
      run_of_visible_frames_++;
 | 
			
		||||
    } else if (frames == 2) {
 | 
			
		||||
      if (min_run_ == ARF_NOT_SEEN) {
 | 
			
		||||
        min_run_ = ARF_SEEN_ONCE;
 | 
			
		||||
      } else if (min_run_ == ARF_SEEN_ONCE ||
 | 
			
		||||
                 run_of_visible_frames_ < min_run_) {
 | 
			
		||||
        min_run_ = run_of_visible_frames_;
 | 
			
		||||
      }
 | 
			
		||||
      run_of_visible_frames_ = 1;
 | 
			
		||||
    } else {
 | 
			
		||||
      min_run_ = 0;
 | 
			
		||||
      run_of_visible_frames_ = 1;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
 | 
			
		||||
                                  ::libvpx_test::Encoder *encoder) {
 | 
			
		||||
    if (video->frame() == 0) {
 | 
			
		||||
      encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
 | 
			
		||||
      encoder->Control(VP9E_SET_TILE_COLUMNS, 4);
 | 
			
		||||
      encoder->Control(VP8E_SET_CPUUSED, test_encode_param_.cpu_used);
 | 
			
		||||
      encoder->Control(VP9E_SET_MIN_GF_INTERVAL, min_arf_requested_);
 | 
			
		||||
      if (test_encode_param_.mode != ::libvpx_test::kRealTime) {
 | 
			
		||||
        encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
 | 
			
		||||
        encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
 | 
			
		||||
        encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
 | 
			
		||||
        encoder->Control(VP8E_SET_ARNR_TYPE, 3);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  int GetMinVisibleRun() const {
 | 
			
		||||
    return min_run_;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  int GetMinArfDistanceRequested() const {
 | 
			
		||||
    if (min_arf_requested_)
 | 
			
		||||
      return min_arf_requested_;
 | 
			
		||||
    else
 | 
			
		||||
      return vp9_rc_get_default_min_gf_interval(
 | 
			
		||||
          test_video_param_.width, test_video_param_.height,
 | 
			
		||||
          (double)test_video_param_.framerate_num /
 | 
			
		||||
          test_video_param_.framerate_den);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  TestVideoParam test_video_param_;
 | 
			
		||||
  TestEncodeParam test_encode_param_;
 | 
			
		||||
 | 
			
		||||
 private:
 | 
			
		||||
  int min_arf_requested_;
 | 
			
		||||
  int min_run_;
 | 
			
		||||
  int run_of_visible_frames_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
TEST_P(ArfFreqTest, MinArfFreqTest) {
 | 
			
		||||
  cfg_.rc_target_bitrate = kBitrate;
 | 
			
		||||
  cfg_.g_error_resilient = 0;
 | 
			
		||||
  cfg_.g_profile = test_video_param_.profile;
 | 
			
		||||
  cfg_.g_input_bit_depth = test_video_param_.input_bit_depth;
 | 
			
		||||
  cfg_.g_bit_depth = test_video_param_.bit_depth;
 | 
			
		||||
  init_flags_ = VPX_CODEC_USE_PSNR;
 | 
			
		||||
  if (cfg_.g_bit_depth > 8)
 | 
			
		||||
    init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH;
 | 
			
		||||
 | 
			
		||||
  libvpx_test::VideoSource *video;
 | 
			
		||||
  if (is_extension_y4m(test_video_param_.filename)) {
 | 
			
		||||
    video = new libvpx_test::Y4mVideoSource(test_video_param_.filename,
 | 
			
		||||
                                            0, kFrames);
 | 
			
		||||
  } else {
 | 
			
		||||
    video = new libvpx_test::YUVVideoSource(test_video_param_.filename,
 | 
			
		||||
                                            test_video_param_.fmt,
 | 
			
		||||
                                            test_video_param_.width,
 | 
			
		||||
                                            test_video_param_.height,
 | 
			
		||||
                                            test_video_param_.framerate_num,
 | 
			
		||||
                                            test_video_param_.framerate_den,
 | 
			
		||||
                                            0, kFrames);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  ASSERT_NO_FATAL_FAILURE(RunLoop(video));
 | 
			
		||||
  const int min_run = GetMinVisibleRun();
 | 
			
		||||
  const int min_arf_dist_requested = GetMinArfDistanceRequested();
 | 
			
		||||
  if (min_run != ARF_NOT_SEEN && min_run != ARF_SEEN_ONCE) {
 | 
			
		||||
    const int min_arf_dist = min_run + 1;
 | 
			
		||||
    EXPECT_GE(min_arf_dist, min_arf_dist_requested);
 | 
			
		||||
  }
 | 
			
		||||
  delete(video);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    ArfFreqTest,
 | 
			
		||||
    ::testing::ValuesIn(kTestVectors),
 | 
			
		||||
    ::testing::ValuesIn(kEncodeVectors),
 | 
			
		||||
    ::testing::ValuesIn(kMinArfVectors));
 | 
			
		||||
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    ArfFreqTest,
 | 
			
		||||
    ::testing::ValuesIn(kTestVectors),
 | 
			
		||||
    ::testing::ValuesIn(kEncodeVectors),
 | 
			
		||||
    ::testing::ValuesIn(kMinArfVectors));
 | 
			
		||||
}  // namespace
 | 
			
		||||
@@ -8,22 +8,22 @@
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#if CONFIG_VP9_ENCODER
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#endif
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
@@ -121,6 +121,79 @@ class AverageTest
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
typedef void (*IntProRowFunc)(int16_t hbuf[16], uint8_t const *ref,
 | 
			
		||||
                              const int ref_stride, const int height);
 | 
			
		||||
 | 
			
		||||
typedef std::tr1::tuple<int, IntProRowFunc, IntProRowFunc> IntProRowParam;
 | 
			
		||||
 | 
			
		||||
class IntProRowTest
 | 
			
		||||
    : public AverageTestBase,
 | 
			
		||||
      public ::testing::WithParamInterface<IntProRowParam> {
 | 
			
		||||
 public:
 | 
			
		||||
  IntProRowTest()
 | 
			
		||||
    : AverageTestBase(16, GET_PARAM(0)),
 | 
			
		||||
      hbuf_asm_(NULL),
 | 
			
		||||
      hbuf_c_(NULL) {
 | 
			
		||||
    asm_func_ = GET_PARAM(1);
 | 
			
		||||
    c_func_ = GET_PARAM(2);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  virtual void SetUp() {
 | 
			
		||||
    hbuf_asm_ = reinterpret_cast<int16_t*>(
 | 
			
		||||
        vpx_memalign(kDataAlignment, sizeof(*hbuf_asm_) * 16));
 | 
			
		||||
    hbuf_c_ = reinterpret_cast<int16_t*>(
 | 
			
		||||
        vpx_memalign(kDataAlignment, sizeof(*hbuf_c_) * 16));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual void TearDown() {
 | 
			
		||||
    vpx_free(hbuf_c_);
 | 
			
		||||
    hbuf_c_ = NULL;
 | 
			
		||||
    vpx_free(hbuf_asm_);
 | 
			
		||||
    hbuf_asm_ = NULL;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void RunComparison() {
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(c_func_(hbuf_c_, source_data_, 0, height_));
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(asm_func_(hbuf_asm_, source_data_, 0, height_));
 | 
			
		||||
    EXPECT_EQ(0, memcmp(hbuf_c_, hbuf_asm_, sizeof(*hbuf_c_) * 16))
 | 
			
		||||
        << "Output mismatch";
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 private:
 | 
			
		||||
  IntProRowFunc asm_func_;
 | 
			
		||||
  IntProRowFunc c_func_;
 | 
			
		||||
  int16_t *hbuf_asm_;
 | 
			
		||||
  int16_t *hbuf_c_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
typedef int16_t (*IntProColFunc)(uint8_t const *ref, const int width);
 | 
			
		||||
 | 
			
		||||
typedef std::tr1::tuple<int, IntProColFunc, IntProColFunc> IntProColParam;
 | 
			
		||||
 | 
			
		||||
class IntProColTest
 | 
			
		||||
    : public AverageTestBase,
 | 
			
		||||
      public ::testing::WithParamInterface<IntProColParam> {
 | 
			
		||||
 public:
 | 
			
		||||
  IntProColTest() : AverageTestBase(GET_PARAM(0), 1), sum_asm_(0), sum_c_(0) {
 | 
			
		||||
    asm_func_ = GET_PARAM(1);
 | 
			
		||||
    c_func_ = GET_PARAM(2);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  void RunComparison() {
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(sum_c_ = c_func_(source_data_, width_));
 | 
			
		||||
    ASM_REGISTER_STATE_CHECK(sum_asm_ = asm_func_(source_data_, width_));
 | 
			
		||||
    EXPECT_EQ(sum_c_, sum_asm_) << "Output mismatch";
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 private:
 | 
			
		||||
  IntProColFunc asm_func_;
 | 
			
		||||
  IntProColFunc c_func_;
 | 
			
		||||
  int16_t sum_asm_;
 | 
			
		||||
  int16_t sum_c_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
uint8_t* AverageTestBase::source_data_ = NULL;
 | 
			
		||||
 | 
			
		||||
@@ -143,6 +216,36 @@ TEST_P(AverageTest, Random) {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(IntProRowTest, MinValue) {
 | 
			
		||||
  FillConstant(0);
 | 
			
		||||
  RunComparison();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(IntProRowTest, MaxValue) {
 | 
			
		||||
  FillConstant(255);
 | 
			
		||||
  RunComparison();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(IntProRowTest, Random) {
 | 
			
		||||
  FillRandom();
 | 
			
		||||
  RunComparison();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(IntProColTest, MinValue) {
 | 
			
		||||
  FillConstant(0);
 | 
			
		||||
  RunComparison();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(IntProColTest, MaxValue) {
 | 
			
		||||
  FillConstant(255);
 | 
			
		||||
  RunComparison();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(IntProColTest, Random) {
 | 
			
		||||
  FillRandom();
 | 
			
		||||
  RunComparison();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
using std::tr1::make_tuple;
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
@@ -151,7 +254,6 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
        make_tuple(16, 16, 1, 8, &vp9_avg_8x8_c),
 | 
			
		||||
        make_tuple(16, 16, 1, 4, &vp9_avg_4x4_c)));
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, AverageTest,
 | 
			
		||||
@@ -163,6 +265,17 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
        make_tuple(16, 16, 5, 4, &vp9_avg_4x4_sse2),
 | 
			
		||||
        make_tuple(32, 32, 15, 4, &vp9_avg_4x4_sse2)));
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, IntProRowTest, ::testing::Values(
 | 
			
		||||
        make_tuple(16, &vp9_int_pro_row_sse2, &vp9_int_pro_row_c),
 | 
			
		||||
        make_tuple(32, &vp9_int_pro_row_sse2, &vp9_int_pro_row_c),
 | 
			
		||||
        make_tuple(64, &vp9_int_pro_row_sse2, &vp9_int_pro_row_c)));
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, IntProColTest, ::testing::Values(
 | 
			
		||||
        make_tuple(16, &vp9_int_pro_col_sse2, &vp9_int_pro_col_c),
 | 
			
		||||
        make_tuple(32, &vp9_int_pro_col_sse2, &vp9_int_pro_col_c),
 | 
			
		||||
        make_tuple(64, &vp9_int_pro_col_sse2, &vp9_int_pro_col_c)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_NEON
 | 
			
		||||
@@ -173,6 +286,29 @@ INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
        make_tuple(16, 16, 5, 8, &vp9_avg_8x8_neon),
 | 
			
		||||
        make_tuple(32, 32, 15, 8, &vp9_avg_8x8_neon)));
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    NEON, IntProRowTest, ::testing::Values(
 | 
			
		||||
        make_tuple(16, &vp9_int_pro_row_neon, &vp9_int_pro_row_c),
 | 
			
		||||
        make_tuple(32, &vp9_int_pro_row_neon, &vp9_int_pro_row_c),
 | 
			
		||||
        make_tuple(64, &vp9_int_pro_row_neon, &vp9_int_pro_row_c)));
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    NEON, IntProColTest, ::testing::Values(
 | 
			
		||||
        make_tuple(16, &vp9_int_pro_col_neon, &vp9_int_pro_col_c),
 | 
			
		||||
        make_tuple(32, &vp9_int_pro_col_neon, &vp9_int_pro_col_c),
 | 
			
		||||
        make_tuple(64, &vp9_int_pro_col_neon, &vp9_int_pro_col_c)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    MSA, AverageTest,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(16, 16, 0, 8, &vp9_avg_8x8_msa),
 | 
			
		||||
        make_tuple(16, 16, 5, 8, &vp9_avg_8x8_msa),
 | 
			
		||||
        make_tuple(32, 32, 15, 8, &vp9_avg_8x8_msa),
 | 
			
		||||
        make_tuple(16, 16, 0, 4, &vp9_avg_4x4_msa),
 | 
			
		||||
        make_tuple(16, 16, 5, 4, &vp9_avg_4x4_msa),
 | 
			
		||||
        make_tuple(32, 32, 15, 4, &vp9_avg_4x4_msa)));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -14,11 +14,10 @@
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "vp9/decoder/vp9_reader.h"
 | 
			
		||||
#include "vp9/encoder/vp9_writer.h"
 | 
			
		||||
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
#include "vpx_dsp/bitreader.h"
 | 
			
		||||
#include "vpx_dsp/bitwriter.h"
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
 | 
			
		||||
@@ -50,9 +49,9 @@ TEST(VP9, TestBitIO) {
 | 
			
		||||
        const int random_seed = 6432;
 | 
			
		||||
        const int kBufferSize = 10000;
 | 
			
		||||
        ACMRandom bit_rnd(random_seed);
 | 
			
		||||
        vp9_writer bw;
 | 
			
		||||
        vpx_writer bw;
 | 
			
		||||
        uint8_t bw_buffer[kBufferSize];
 | 
			
		||||
        vp9_start_encode(&bw, bw_buffer);
 | 
			
		||||
        vpx_start_encode(&bw, bw_buffer);
 | 
			
		||||
 | 
			
		||||
        int bit = (bit_method == 0) ? 0 : (bit_method == 1) ? 1 : 0;
 | 
			
		||||
        for (int i = 0; i < kBitsToTest; ++i) {
 | 
			
		||||
@@ -61,16 +60,16 @@ TEST(VP9, TestBitIO) {
 | 
			
		||||
          } else if (bit_method == 3) {
 | 
			
		||||
            bit = bit_rnd(2);
 | 
			
		||||
          }
 | 
			
		||||
          vp9_write(&bw, bit, static_cast<int>(probas[i]));
 | 
			
		||||
          vpx_write(&bw, bit, static_cast<int>(probas[i]));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        vp9_stop_encode(&bw);
 | 
			
		||||
        vpx_stop_encode(&bw);
 | 
			
		||||
 | 
			
		||||
        // First bit should be zero
 | 
			
		||||
        GTEST_ASSERT_EQ(bw_buffer[0] & 0x80, 0);
 | 
			
		||||
 | 
			
		||||
        vp9_reader br;
 | 
			
		||||
        vp9_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL);
 | 
			
		||||
        vpx_reader br;
 | 
			
		||||
        vpx_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL);
 | 
			
		||||
        bit_rnd.Reset(random_seed);
 | 
			
		||||
        for (int i = 0; i < kBitsToTest; ++i) {
 | 
			
		||||
          if (bit_method == 2) {
 | 
			
		||||
@@ -78,7 +77,7 @@ TEST(VP9, TestBitIO) {
 | 
			
		||||
          } else if (bit_method == 3) {
 | 
			
		||||
            bit = bit_rnd(2);
 | 
			
		||||
          }
 | 
			
		||||
          GTEST_ASSERT_EQ(vp9_read(&br, probas[i]), bit)
 | 
			
		||||
          GTEST_ASSERT_EQ(vpx_read(&br, probas[i]), bit)
 | 
			
		||||
              << "pos: " << i << " / " << kBitsToTest
 | 
			
		||||
              << " bit_method: " << bit_method
 | 
			
		||||
              << " method: " << method;
 | 
			
		||||
 
 | 
			
		||||
@@ -52,10 +52,10 @@ TEST_P(VP9DenoiserTest, BitexactCheck) {
 | 
			
		||||
  // mc_avg_block is the denoised reference block,
 | 
			
		||||
  // avg_block_c is the denoised result from C code,
 | 
			
		||||
  // avg_block_sse2 is the denoised result from SSE2 code.
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, sig_block, kNumPixels);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, mc_avg_block, kNumPixels);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, avg_block_c, kNumPixels);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint8_t, avg_block_sse2, kNumPixels);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, sig_block[kNumPixels]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, mc_avg_block[kNumPixels]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, avg_block_c[kNumPixels]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint8_t, avg_block_sse2[kNumPixels]);
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; i < count_test_block; ++i) {
 | 
			
		||||
    // Generate random motion magnitude, 20% of which exceed the threshold.
 | 
			
		||||
 
 | 
			
		||||
@@ -8,12 +8,13 @@
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "test/codec_factory.h"
 | 
			
		||||
#include "test/encode_test_driver.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "test/y4m_video_source.h"
 | 
			
		||||
#include "test/yuv_video_source.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
#include "vp9/decoder/vp9_decoder.h"
 | 
			
		||||
 | 
			
		||||
typedef vpx_codec_stream_info_t vp9_stream_info_t;
 | 
			
		||||
@@ -85,17 +86,17 @@ int is_extension_y4m(const char *filename) {
 | 
			
		||||
    return !strcmp(dot, ".y4m");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class Vp9EncoderParmsGetToDecoder
 | 
			
		||||
class VpxEncoderParmsGetToDecoder
 | 
			
		||||
    : public ::libvpx_test::EncoderTest,
 | 
			
		||||
      public ::libvpx_test::CodecTestWith2Params<EncodeParameters, \
 | 
			
		||||
                                                 EncodePerfTestVideo> {
 | 
			
		||||
 protected:
 | 
			
		||||
  Vp9EncoderParmsGetToDecoder()
 | 
			
		||||
  VpxEncoderParmsGetToDecoder()
 | 
			
		||||
      : EncoderTest(GET_PARAM(0)),
 | 
			
		||||
        encode_parms(GET_PARAM(1)) {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual ~Vp9EncoderParmsGetToDecoder() {}
 | 
			
		||||
  virtual ~VpxEncoderParmsGetToDecoder() {}
 | 
			
		||||
 | 
			
		||||
  virtual void SetUp() {
 | 
			
		||||
    InitializeConfig();
 | 
			
		||||
@@ -165,7 +166,7 @@ class Vp9EncoderParmsGetToDecoder
 | 
			
		||||
 | 
			
		||||
// TODO(hkuang): This test conflicts with frame parallel decode. So disable it
 | 
			
		||||
// for now until fix.
 | 
			
		||||
TEST_P(Vp9EncoderParmsGetToDecoder, DISABLED_BitstreamParms) {
 | 
			
		||||
TEST_P(VpxEncoderParmsGetToDecoder, DISABLED_BitstreamParms) {
 | 
			
		||||
  init_flags_ = VPX_CODEC_USE_PSNR;
 | 
			
		||||
 | 
			
		||||
  libvpx_test::VideoSource *video;
 | 
			
		||||
@@ -186,8 +187,12 @@ TEST_P(Vp9EncoderParmsGetToDecoder, DISABLED_BitstreamParms) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    Vp9EncoderParmsGetToDecoder,
 | 
			
		||||
    VpxEncoderParmsGetToDecoder,
 | 
			
		||||
    ::testing::ValuesIn(kVP9EncodeParameterSet),
 | 
			
		||||
    ::testing::ValuesIn(kVP9EncodePerfTestVectors));
 | 
			
		||||
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    VpxEncoderParmsGetToDecoder,
 | 
			
		||||
    ::testing::ValuesIn(kVP9EncodeParameterSet),
 | 
			
		||||
    ::testing::ValuesIn(kVP9EncodePerfTestVectors));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -8,12 +8,13 @@
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "test/codec_factory.h"
 | 
			
		||||
#include "test/encode_test_driver.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "test/y4m_video_source.h"
 | 
			
		||||
#include "test/yuv_video_source.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
@@ -186,4 +187,9 @@ VP9_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    ::testing::ValuesIn(kTestVectors),
 | 
			
		||||
    ::testing::ValuesIn(kCpuUsedVectors));
 | 
			
		||||
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    EndToEndTestLarge,
 | 
			
		||||
    ::testing::ValuesIn(kEncodingModeVectors),
 | 
			
		||||
    ::testing::ValuesIn(kTestVectors),
 | 
			
		||||
    ::testing::ValuesIn(kCpuUsedVectors));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -14,13 +14,14 @@
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "vp9/common/vp9_entropy.h"
 | 
			
		||||
#include "vpx/vpx_codec.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
@@ -57,8 +58,8 @@ class ErrorBlockTest
 | 
			
		||||
 | 
			
		||||
TEST_P(ErrorBlockTest, OperationCheck) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff,   4096);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff, 4096);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, coeff[4096]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, dqcoeff[4096]);
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
  intptr_t block_size;
 | 
			
		||||
@@ -90,8 +91,8 @@ TEST_P(ErrorBlockTest, OperationCheck) {
 | 
			
		||||
 | 
			
		||||
TEST_P(ErrorBlockTest, ExtremeValues) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff,   4096);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff, 4096);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, coeff[4096]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, dqcoeff[4096]);
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
  intptr_t block_size;
 | 
			
		||||
 
 | 
			
		||||
@@ -18,11 +18,11 @@
 | 
			
		||||
#include "test/y4m_video_source.h"
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
class VP9EncoderThreadTest
 | 
			
		||||
class VPxEncoderThreadTest
 | 
			
		||||
    : public ::libvpx_test::EncoderTest,
 | 
			
		||||
      public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
 | 
			
		||||
 protected:
 | 
			
		||||
  VP9EncoderThreadTest()
 | 
			
		||||
  VPxEncoderThreadTest()
 | 
			
		||||
      : EncoderTest(GET_PARAM(0)),
 | 
			
		||||
        encoder_initialized_(false),
 | 
			
		||||
        tiles_(2),
 | 
			
		||||
@@ -36,7 +36,7 @@ class VP9EncoderThreadTest
 | 
			
		||||
 | 
			
		||||
    md5_.clear();
 | 
			
		||||
  }
 | 
			
		||||
  virtual ~VP9EncoderThreadTest() {
 | 
			
		||||
  virtual ~VPxEncoderThreadTest() {
 | 
			
		||||
    delete decoder_;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -105,7 +105,7 @@ class VP9EncoderThreadTest
 | 
			
		||||
  std::vector<std::string> md5_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
TEST_P(VP9EncoderThreadTest, EncoderResultTest) {
 | 
			
		||||
TEST_P(VPxEncoderThreadTest, EncoderResultTest) {
 | 
			
		||||
  std::vector<std::string> single_thr_md5, multi_thr_md5;
 | 
			
		||||
 | 
			
		||||
  ::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 15, 20);
 | 
			
		||||
@@ -130,8 +130,13 @@ TEST_P(VP9EncoderThreadTest, EncoderResultTest) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
VP9_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    VP9EncoderThreadTest,
 | 
			
		||||
    VPxEncoderThreadTest,
 | 
			
		||||
    ::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
 | 
			
		||||
                      ::libvpx_test::kRealTime),
 | 
			
		||||
    ::testing::Range(1, 9));
 | 
			
		||||
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(
 | 
			
		||||
    VPxEncoderThreadTest,
 | 
			
		||||
    ::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
 | 
			
		||||
    ::testing::Range(1, 3));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@ using std::string;
 | 
			
		||||
 | 
			
		||||
#if CONFIG_WEBM_IO
 | 
			
		||||
 | 
			
		||||
struct FileList {
 | 
			
		||||
struct PauseFileList {
 | 
			
		||||
  const char *name;
 | 
			
		||||
  // md5 sum for decoded frames which does not include skipped frames.
 | 
			
		||||
  const char *expected_md5;
 | 
			
		||||
@@ -39,7 +39,8 @@ struct FileList {
 | 
			
		||||
// Decodes |filename| with |num_threads|. Pause at the specified frame_num,
 | 
			
		||||
// seek to next key frame and then continue decoding until the end. Return
 | 
			
		||||
// the md5 of the decoded frames which does not include skipped frames.
 | 
			
		||||
string DecodeFile(const string &filename, int num_threads, int pause_num) {
 | 
			
		||||
string DecodeFileWithPause(const string &filename, int num_threads,
 | 
			
		||||
                           int pause_num) {
 | 
			
		||||
  libvpx_test::WebMVideoSource video(filename);
 | 
			
		||||
  video.Init();
 | 
			
		||||
  int in_frames = 0;
 | 
			
		||||
@@ -92,12 +93,12 @@ string DecodeFile(const string &filename, int num_threads, int pause_num) {
 | 
			
		||||
  return string(md5.Get());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void DecodeFiles(const FileList files[]) {
 | 
			
		||||
  for (const FileList *iter = files; iter->name != NULL; ++iter) {
 | 
			
		||||
void DecodeFilesWithPause(const PauseFileList files[]) {
 | 
			
		||||
  for (const PauseFileList *iter = files; iter->name != NULL; ++iter) {
 | 
			
		||||
    SCOPED_TRACE(iter->name);
 | 
			
		||||
    for (int t = 2; t <= 8; ++t) {
 | 
			
		||||
      EXPECT_EQ(iter->expected_md5,
 | 
			
		||||
                DecodeFile(iter->name, t, iter->pause_frame_num))
 | 
			
		||||
                DecodeFileWithPause(iter->name, t, iter->pause_frame_num))
 | 
			
		||||
          << "threads = " << t;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
@@ -106,19 +107,19 @@ void DecodeFiles(const FileList files[]) {
 | 
			
		||||
TEST(VP9MultiThreadedFrameParallel, PauseSeekResume) {
 | 
			
		||||
  // vp90-2-07-frame_parallel-1.webm is a 40 frame video file with
 | 
			
		||||
  // one key frame for every ten frames.
 | 
			
		||||
  static const FileList files[] = {
 | 
			
		||||
  static const PauseFileList files[] = {
 | 
			
		||||
    { "vp90-2-07-frame_parallel-1.webm",
 | 
			
		||||
      "6ea7c3875d67252e7caf2bc6e75b36b1", 6},
 | 
			
		||||
      "6ea7c3875d67252e7caf2bc6e75b36b1", 6 },
 | 
			
		||||
    { "vp90-2-07-frame_parallel-1.webm",
 | 
			
		||||
      "4bb634160c7356a8d7d4299b6dc83a45", 12},
 | 
			
		||||
      "4bb634160c7356a8d7d4299b6dc83a45", 12 },
 | 
			
		||||
    { "vp90-2-07-frame_parallel-1.webm",
 | 
			
		||||
      "89772591e6ef461f9fa754f916c78ed8", 26},
 | 
			
		||||
    { NULL, NULL, 0},
 | 
			
		||||
      "89772591e6ef461f9fa754f916c78ed8", 26 },
 | 
			
		||||
    { NULL, NULL, 0 },
 | 
			
		||||
  };
 | 
			
		||||
  DecodeFiles(files);
 | 
			
		||||
  DecodeFilesWithPause(files);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct InvalidFileList {
 | 
			
		||||
struct FileList {
 | 
			
		||||
  const char *name;
 | 
			
		||||
  // md5 sum for decoded frames which does not include corrupted frames.
 | 
			
		||||
  const char *expected_md5;
 | 
			
		||||
@@ -128,8 +129,8 @@ struct InvalidFileList {
 | 
			
		||||
 | 
			
		||||
// Decodes |filename| with |num_threads|. Return the md5 of the decoded
 | 
			
		||||
// frames which does not include corrupted frames.
 | 
			
		||||
string DecodeInvalidFile(const string &filename, int num_threads,
 | 
			
		||||
                         int expected_frame_count) {
 | 
			
		||||
string DecodeFile(const string &filename, int num_threads,
 | 
			
		||||
                  int expected_frame_count) {
 | 
			
		||||
  libvpx_test::WebMVideoSource video(filename);
 | 
			
		||||
  video.Init();
 | 
			
		||||
 | 
			
		||||
@@ -173,37 +174,47 @@ string DecodeInvalidFile(const string &filename, int num_threads,
 | 
			
		||||
  return string(md5.Get());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void DecodeInvalidFiles(const InvalidFileList files[]) {
 | 
			
		||||
  for (const InvalidFileList *iter = files; iter->name != NULL; ++iter) {
 | 
			
		||||
void DecodeFiles(const FileList files[]) {
 | 
			
		||||
  for (const FileList *iter = files; iter->name != NULL; ++iter) {
 | 
			
		||||
    SCOPED_TRACE(iter->name);
 | 
			
		||||
    for (int t = 2; t <= 8; ++t) {
 | 
			
		||||
      EXPECT_EQ(iter->expected_md5,
 | 
			
		||||
                DecodeInvalidFile(iter->name, t, iter->expected_frame_count))
 | 
			
		||||
                DecodeFile(iter->name, t, iter->expected_frame_count))
 | 
			
		||||
          << "threads = " << t;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST(VP9MultiThreadedFrameParallel, InvalidFileTest) {
 | 
			
		||||
  static const InvalidFileList files[] = {
 | 
			
		||||
  static const FileList files[] = {
 | 
			
		||||
    // invalid-vp90-2-07-frame_parallel-1.webm is a 40 frame video file with
 | 
			
		||||
    // one key frame for every ten frames. The 11th frame has corrupted data.
 | 
			
		||||
    { "invalid-vp90-2-07-frame_parallel-1.webm",
 | 
			
		||||
      "0549d0f45f60deaef8eb708e6c0eb6cb", 30},
 | 
			
		||||
      "0549d0f45f60deaef8eb708e6c0eb6cb", 30 },
 | 
			
		||||
    // invalid-vp90-2-07-frame_parallel-2.webm is a 40 frame video file with
 | 
			
		||||
    // one key frame for every ten frames. The 1st and 31st frames have
 | 
			
		||||
    // corrupted data.
 | 
			
		||||
    { "invalid-vp90-2-07-frame_parallel-2.webm",
 | 
			
		||||
      "6a1f3cf6f9e7a364212fadb9580d525e", 20},
 | 
			
		||||
      "6a1f3cf6f9e7a364212fadb9580d525e", 20 },
 | 
			
		||||
    // invalid-vp90-2-07-frame_parallel-3.webm is a 40 frame video file with
 | 
			
		||||
    // one key frame for every ten frames. The 5th and 13th frames have
 | 
			
		||||
    // corrupted data.
 | 
			
		||||
    { "invalid-vp90-2-07-frame_parallel-3.webm",
 | 
			
		||||
      "8256544308de926b0681e04685b98677", 27},
 | 
			
		||||
    { NULL, NULL, 0},
 | 
			
		||||
      "8256544308de926b0681e04685b98677", 27 },
 | 
			
		||||
    { NULL, NULL, 0 },
 | 
			
		||||
  };
 | 
			
		||||
  DecodeInvalidFiles(files);
 | 
			
		||||
  DecodeFiles(files);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST(VP9MultiThreadedFrameParallel, ValidFileTest) {
 | 
			
		||||
  static const FileList files[] = {
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
    { "vp92-2-20-10bit-yuv420.webm",
 | 
			
		||||
      "a16b99df180c584e8db2ffeda987d293", 10 },
 | 
			
		||||
#endif
 | 
			
		||||
    { NULL, NULL, 0 },
 | 
			
		||||
  };
 | 
			
		||||
  DecodeFiles(files);
 | 
			
		||||
}
 | 
			
		||||
#endif  // CONFIG_WEBM_IO
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -10,17 +10,17 @@
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "vp9/common/vp9_blockd.h"
 | 
			
		||||
#include "vp9/common/vp9_pred_common.h"
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
@@ -120,10 +120,10 @@ class VP9IntraPredTest
 | 
			
		||||
 | 
			
		||||
TEST_P(VP9IntraPredTest, IntraPredTests) {
 | 
			
		||||
  // max block size is 32
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, left_col, 2*32);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, above_data, 2*32+32);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, dst, 3 * 32 * 32);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_dst, 3 * 32 * 32);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, left_col[2*32]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, above_data[2*32+32]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, dst[3 * 32 * 32]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 32 * 32]);
 | 
			
		||||
  RunTest(left_col, above_data, dst, ref_dst);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -131,168 +131,171 @@ using std::tr1::make_tuple;
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2
 | 
			
		||||
#if CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
#if CONFIG_USE_X86INC
 | 
			
		||||
#if ARCH_X86_64
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_32x32_c, 32, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_32x32_c, 32, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_8x8_c, 8, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_8x8_c, 8, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_32x32_c, 32, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_8x8_c, 8, 8)));
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_32x32_c, 32, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_32x32_c, 32, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_8x8_c, 8, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_8x8_c, 8, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_32x32_c, 32, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_8x8_c, 8, 8)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_8x8_c, 8, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_8x8_c, 8, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_32x32_c, 32, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_8x8_c, 8, 8)));
 | 
			
		||||
#endif
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_8x8_c, 8, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_8x8_c, 8, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_16x16_c, 16, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_32x32_c, 32, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_4x4_c, 4, 8),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_8x8_c, 8, 8)));
 | 
			
		||||
#endif  // !ARCH_X86_64
 | 
			
		||||
 | 
			
		||||
#if ARCH_X86_64
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_32x32_c, 32,
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_32x32_c, 32,
 | 
			
		||||
                                       10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_16x16_c, 16,
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_16x16_c, 16,
 | 
			
		||||
                                       10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_32x32_c, 32,
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_32x32_c, 32,
 | 
			
		||||
                                       10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_8x8_c, 8, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_16x16_c, 16,
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_8x8_c, 8, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_16x16_c, 16,
 | 
			
		||||
                                       10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_8x8_c, 8, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_16x16_c, 16,
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_8x8_c, 8, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_16x16_c, 16,
 | 
			
		||||
                                       10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_32x32_c, 32,
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_32x32_c, 32,
 | 
			
		||||
                                       10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_8x8_c, 8, 10)));
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_8x8_c, 8, 10)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_8x8_c, 8, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_16x16_c, 16,
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_8x8_c, 8, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_16x16_c, 16,
 | 
			
		||||
                                       10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_8x8_c, 8, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_16x16_c, 16, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_32x32_c, 32, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_8x8_c, 8, 10)));
 | 
			
		||||
#endif
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_8x8_c, 8, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_16x16_c, 16, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_32x32_c, 32, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_4x4_c, 4, 10),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_8x8_c, 8, 10)));
 | 
			
		||||
#endif  // !ARCH_X86_64
 | 
			
		||||
 | 
			
		||||
#if ARCH_X86_64
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_32x32_c, 32,
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_32x32_c, 32,
 | 
			
		||||
                                       12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_16x16_c, 16,
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_16x16_c, 16,
 | 
			
		||||
                                       12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_32x32_c, 32,
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_32x32_c, 32,
 | 
			
		||||
                                       12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_8x8_c, 8, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_16x16_c, 16,
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_8x8_c, 8, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_16x16_c, 16,
 | 
			
		||||
                                       12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_8x8_c, 8, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_16x16_c, 16,
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_8x8_c, 8, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_16x16_c, 16,
 | 
			
		||||
                                       12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_32x32_c, 32,
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_32x32_c, 32,
 | 
			
		||||
                                       12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_8x8_c, 8, 12)));
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_8x8_c, 8, 12)));
 | 
			
		||||
#else
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
 | 
			
		||||
                        ::testing::Values(
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_8x8_c, 8, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_dc_predictor_16x16_c, 16,
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_8x8_c, 8, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_dc_predictor_16x16_c, 16,
 | 
			
		||||
                                       12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_8x8_c, 8, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_16x16_c, 16, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vp9_highbd_v_predictor_32x32_c, 32, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vp9_highbd_tm_predictor_8x8_c, 8, 12)));
 | 
			
		||||
#endif
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_8x8_c, 8, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_16x16_c, 16, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
 | 
			
		||||
                                       &vpx_highbd_v_predictor_32x32_c, 32, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_4x4_c, 4, 12),
 | 
			
		||||
                            make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
 | 
			
		||||
                                       &vpx_highbd_tm_predictor_8x8_c, 8, 12)));
 | 
			
		||||
#endif  // !ARCH_X86_64
 | 
			
		||||
#endif  // CONFIG_USE_X86INC
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
#endif  // HAVE_SSE2
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -7,8 +7,10 @@
 | 
			
		||||
 *  in the file PATENTS.  All contributing project authors may
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "test/codec_factory.h"
 | 
			
		||||
#include "test/encode_test_driver.h"
 | 
			
		||||
#include "test/i420_video_source.h"
 | 
			
		||||
@@ -125,4 +127,8 @@ VP9_INSTANTIATE_TEST_CASE(LosslessTest,
 | 
			
		||||
                          ::testing::Values(::libvpx_test::kRealTime,
 | 
			
		||||
                                            ::libvpx_test::kOnePassGood,
 | 
			
		||||
                                            ::libvpx_test::kTwoPassGood));
 | 
			
		||||
 | 
			
		||||
VP10_INSTANTIATE_TEST_CASE(LosslessTest,
 | 
			
		||||
                           ::testing::Values(::libvpx_test::kOnePassGood,
 | 
			
		||||
                                             ::libvpx_test::kTwoPassGood));
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -14,13 +14,15 @@
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "vp9/common/vp9_entropy.h"
 | 
			
		||||
#include "vp9/common/vp9_scan.h"
 | 
			
		||||
#include "vpx/vpx_codec.h"
 | 
			
		||||
#include "vpx/vpx_integer.h"
 | 
			
		||||
 | 
			
		||||
using libvpx_test::ACMRandom;
 | 
			
		||||
@@ -80,18 +82,18 @@ class VP9Quantize32Test : public ::testing::TestWithParam<QuantizeParam> {
 | 
			
		||||
 | 
			
		||||
TEST_P(VP9QuantizeTest, OperationCheck) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, eob_ptr, 1);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_eob_ptr, 1);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, round_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, quant_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, quant_shift_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, qcoeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, dqcoeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, ref_qcoeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, ref_dqcoeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, dequant_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, eob_ptr[1]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, ref_eob_ptr[1]);
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
  for (int i = 0; i < number_of_iterations; ++i) {
 | 
			
		||||
@@ -139,18 +141,18 @@ TEST_P(VP9QuantizeTest, OperationCheck) {
 | 
			
		||||
 | 
			
		||||
TEST_P(VP9Quantize32Test, OperationCheck) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, eob_ptr, 1);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_eob_ptr, 1);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, round_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, quant_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, quant_shift_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, qcoeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, dqcoeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, ref_qcoeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, ref_dqcoeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, dequant_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, eob_ptr[1]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, ref_eob_ptr[1]);
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
  for (int i = 0; i < number_of_iterations; ++i) {
 | 
			
		||||
@@ -198,18 +200,18 @@ TEST_P(VP9Quantize32Test, OperationCheck) {
 | 
			
		||||
 | 
			
		||||
TEST_P(VP9QuantizeTest, EOBCheck) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 256);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, eob_ptr, 1);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_eob_ptr, 1);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, round_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, quant_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, quant_shift_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, qcoeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, dqcoeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, ref_qcoeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, ref_dqcoeff_ptr[256]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, dequant_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, eob_ptr[1]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, ref_eob_ptr[1]);
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
  for (int i = 0; i < number_of_iterations; ++i) {
 | 
			
		||||
@@ -262,18 +264,18 @@ TEST_P(VP9QuantizeTest, EOBCheck) {
 | 
			
		||||
 | 
			
		||||
TEST_P(VP9Quantize32Test, EOBCheck) {
 | 
			
		||||
  ACMRandom rnd(ACMRandom::DeterministicSeed());
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 1024);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, eob_ptr, 1);
 | 
			
		||||
  DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_eob_ptr, 1);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, round_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, quant_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, quant_shift_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, qcoeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, dqcoeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, ref_qcoeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, tran_low_t, ref_dqcoeff_ptr[1024]);
 | 
			
		||||
  DECLARE_ALIGNED(16, int16_t, dequant_ptr[2]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, eob_ptr[1]);
 | 
			
		||||
  DECLARE_ALIGNED(16, uint16_t, ref_eob_ptr[1]);
 | 
			
		||||
  int err_count_total = 0;
 | 
			
		||||
  int first_failure = -1;
 | 
			
		||||
  for (int i = 0; i < number_of_iterations; ++i) {
 | 
			
		||||
@@ -329,21 +331,21 @@ using std::tr1::make_tuple;
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, VP9QuantizeTest,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_quantize_b_sse2,
 | 
			
		||||
                   &vp9_highbd_quantize_b_c, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_highbd_quantize_b_sse2,
 | 
			
		||||
                   &vp9_highbd_quantize_b_c, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_quantize_b_sse2,
 | 
			
		||||
                   &vp9_highbd_quantize_b_c, VPX_BITS_12)));
 | 
			
		||||
        make_tuple(&vpx_highbd_quantize_b_sse2,
 | 
			
		||||
                   &vpx_highbd_quantize_b_c, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_highbd_quantize_b_sse2,
 | 
			
		||||
                   &vpx_highbd_quantize_b_c, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vpx_highbd_quantize_b_sse2,
 | 
			
		||||
                   &vpx_highbd_quantize_b_c, VPX_BITS_12)));
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(
 | 
			
		||||
    SSE2, VP9Quantize32Test,
 | 
			
		||||
    ::testing::Values(
 | 
			
		||||
        make_tuple(&vp9_highbd_quantize_b_32x32_sse2,
 | 
			
		||||
                   &vp9_highbd_quantize_b_32x32_c, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vp9_highbd_quantize_b_32x32_sse2,
 | 
			
		||||
                   &vp9_highbd_quantize_b_32x32_c, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vp9_highbd_quantize_b_32x32_sse2,
 | 
			
		||||
                   &vp9_highbd_quantize_b_32x32_c, VPX_BITS_12)));
 | 
			
		||||
        make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
 | 
			
		||||
                   &vpx_highbd_quantize_b_32x32_c, VPX_BITS_8),
 | 
			
		||||
        make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
 | 
			
		||||
                   &vpx_highbd_quantize_b_32x32_c, VPX_BITS_10),
 | 
			
		||||
        make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
 | 
			
		||||
                   &vpx_highbd_quantize_b_32x32_c, VPX_BITS_12)));
 | 
			
		||||
#endif  // HAVE_SSE2
 | 
			
		||||
#endif  // CONFIG_VP9_HIGHBITDEPTH
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										180
									
								
								test/vp9_skip_loopfilter_test.cc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										180
									
								
								test/vp9_skip_loopfilter_test.cc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,180 @@
 | 
			
		||||
/*
 | 
			
		||||
 *  Copyright (c) 2015 The WebM project authors. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 *  Use of this source code is governed by a BSD-style license
 | 
			
		||||
 *  that can be found in the LICENSE file in the root of the source
 | 
			
		||||
 *  tree. An additional intellectual property rights grant can be found
 | 
			
		||||
 *  in the file PATENTS.  All contributing project authors may
 | 
			
		||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
#include "test/codec_factory.h"
 | 
			
		||||
#include "test/decode_test_driver.h"
 | 
			
		||||
#include "test/md5_helper.h"
 | 
			
		||||
#include "test/util.h"
 | 
			
		||||
#include "test/webm_video_source.h"
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
const char kVp9TestFile[] = "vp90-2-08-tile_1x8_frame_parallel.webm";
 | 
			
		||||
const char kVp9Md5File[] = "vp90-2-08-tile_1x8_frame_parallel.webm.md5";
 | 
			
		||||
 | 
			
		||||
// Class for testing shutting off the loop filter.
 | 
			
		||||
class SkipLoopFilterTest {
 | 
			
		||||
 public:
 | 
			
		||||
  SkipLoopFilterTest()
 | 
			
		||||
      : video_(NULL),
 | 
			
		||||
        decoder_(NULL),
 | 
			
		||||
        md5_file_(NULL) {}
 | 
			
		||||
 | 
			
		||||
  ~SkipLoopFilterTest() {
 | 
			
		||||
    if (md5_file_ != NULL)
 | 
			
		||||
      fclose(md5_file_);
 | 
			
		||||
    delete decoder_;
 | 
			
		||||
    delete video_;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // If |threads| > 0 then set the decoder with that number of threads.
 | 
			
		||||
  void Init(int num_threads) {
 | 
			
		||||
    expected_md5_[0] = '\0';
 | 
			
		||||
    junk_[0] = '\0';
 | 
			
		||||
    video_ = new libvpx_test::WebMVideoSource(kVp9TestFile);
 | 
			
		||||
    ASSERT_TRUE(video_ != NULL);
 | 
			
		||||
    video_->Init();
 | 
			
		||||
    video_->Begin();
 | 
			
		||||
 | 
			
		||||
    vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
 | 
			
		||||
    if (num_threads > 0)
 | 
			
		||||
      cfg.threads = num_threads;
 | 
			
		||||
    decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
 | 
			
		||||
    ASSERT_TRUE(decoder_ != NULL);
 | 
			
		||||
 | 
			
		||||
    OpenMd5File(kVp9Md5File);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Set the VP9 skipLoopFilter control value.
 | 
			
		||||
  void SetSkipLoopFilter(int value, vpx_codec_err_t expected_value) {
 | 
			
		||||
    decoder_->Control(VP9_SET_SKIP_LOOP_FILTER, value, expected_value);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  vpx_codec_err_t DecodeOneFrame() {
 | 
			
		||||
    const vpx_codec_err_t res =
 | 
			
		||||
        decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
 | 
			
		||||
    if (res == VPX_CODEC_OK) {
 | 
			
		||||
      ReadMd5();
 | 
			
		||||
      video_->Next();
 | 
			
		||||
    }
 | 
			
		||||
    return res;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  vpx_codec_err_t DecodeRemainingFrames() {
 | 
			
		||||
    for (; video_->cxdata() != NULL; video_->Next()) {
 | 
			
		||||
      const vpx_codec_err_t res =
 | 
			
		||||
          decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
 | 
			
		||||
      if (res != VPX_CODEC_OK)
 | 
			
		||||
        return res;
 | 
			
		||||
      ReadMd5();
 | 
			
		||||
    }
 | 
			
		||||
    return VPX_CODEC_OK;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Checks if MD5 matches or doesn't.
 | 
			
		||||
  void CheckMd5(bool matches) {
 | 
			
		||||
    libvpx_test::DxDataIterator dec_iter = decoder_->GetDxData();
 | 
			
		||||
    const vpx_image_t *img = dec_iter.Next();
 | 
			
		||||
    CheckMd5Vpx(*img, matches);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 private:
 | 
			
		||||
  // TODO(fgalligan): Move the MD5 testing code into another class.
 | 
			
		||||
  void OpenMd5File(const std::string &md5_file_name) {
 | 
			
		||||
    md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name);
 | 
			
		||||
    ASSERT_TRUE(md5_file_ != NULL) << "MD5 file open failed. Filename: "
 | 
			
		||||
        << md5_file_name;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Reads the next line of the MD5 file.
 | 
			
		||||
  void ReadMd5() {
 | 
			
		||||
    ASSERT_TRUE(md5_file_ != NULL);
 | 
			
		||||
    const int res = fscanf(md5_file_, "%s  %s", expected_md5_, junk_);
 | 
			
		||||
    ASSERT_NE(EOF, res) << "Read md5 data failed";
 | 
			
		||||
    expected_md5_[32] = '\0';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Checks if the last read MD5 matches |img| or doesn't.
 | 
			
		||||
  void CheckMd5Vpx(const vpx_image_t &img, bool matches) {
 | 
			
		||||
    ::libvpx_test::MD5 md5_res;
 | 
			
		||||
    md5_res.Add(&img);
 | 
			
		||||
    const char *const actual_md5 = md5_res.Get();
 | 
			
		||||
 | 
			
		||||
    // Check MD5.
 | 
			
		||||
    if (matches)
 | 
			
		||||
      ASSERT_STREQ(expected_md5_, actual_md5) << "MD5 checksums don't match";
 | 
			
		||||
    else
 | 
			
		||||
      ASSERT_STRNE(expected_md5_, actual_md5) << "MD5 checksums match";
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  libvpx_test::WebMVideoSource *video_;
 | 
			
		||||
  libvpx_test::VP9Decoder *decoder_;
 | 
			
		||||
  FILE *md5_file_;
 | 
			
		||||
  char expected_md5_[33];
 | 
			
		||||
  char junk_[128];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
TEST(SkipLoopFilterTest, ShutOffLoopFilter) {
 | 
			
		||||
  const int non_zero_value = 1;
 | 
			
		||||
  const int num_threads = 0;
 | 
			
		||||
  SkipLoopFilterTest skip_loop_filter;
 | 
			
		||||
  skip_loop_filter.Init(num_threads);
 | 
			
		||||
  skip_loop_filter.SetSkipLoopFilter(non_zero_value, VPX_CODEC_OK);
 | 
			
		||||
  ASSERT_EQ(VPX_CODEC_OK, skip_loop_filter.DecodeRemainingFrames());
 | 
			
		||||
  skip_loop_filter.CheckMd5(false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST(SkipLoopFilterTest, ShutOffLoopFilterSingleThread) {
 | 
			
		||||
  const int non_zero_value = 1;
 | 
			
		||||
  const int num_threads = 1;
 | 
			
		||||
  SkipLoopFilterTest skip_loop_filter;
 | 
			
		||||
  skip_loop_filter.Init(num_threads);
 | 
			
		||||
  skip_loop_filter.SetSkipLoopFilter(non_zero_value, VPX_CODEC_OK);
 | 
			
		||||
  ASSERT_EQ(VPX_CODEC_OK, skip_loop_filter.DecodeRemainingFrames());
 | 
			
		||||
  skip_loop_filter.CheckMd5(false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST(SkipLoopFilterTest, ShutOffLoopFilter8Threads) {
 | 
			
		||||
  const int non_zero_value = 1;
 | 
			
		||||
  const int num_threads = 8;
 | 
			
		||||
  SkipLoopFilterTest skip_loop_filter;
 | 
			
		||||
  skip_loop_filter.Init(num_threads);
 | 
			
		||||
  skip_loop_filter.SetSkipLoopFilter(non_zero_value, VPX_CODEC_OK);
 | 
			
		||||
  ASSERT_EQ(VPX_CODEC_OK, skip_loop_filter.DecodeRemainingFrames());
 | 
			
		||||
  skip_loop_filter.CheckMd5(false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST(SkipLoopFilterTest, WithLoopFilter) {
 | 
			
		||||
  const int non_zero_value = 1;
 | 
			
		||||
  const int num_threads = 0;
 | 
			
		||||
  SkipLoopFilterTest skip_loop_filter;
 | 
			
		||||
  skip_loop_filter.Init(num_threads);
 | 
			
		||||
  skip_loop_filter.SetSkipLoopFilter(non_zero_value, VPX_CODEC_OK);
 | 
			
		||||
  skip_loop_filter.SetSkipLoopFilter(0, VPX_CODEC_OK);
 | 
			
		||||
  ASSERT_EQ(VPX_CODEC_OK, skip_loop_filter.DecodeRemainingFrames());
 | 
			
		||||
  skip_loop_filter.CheckMd5(true);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST(SkipLoopFilterTest, ToggleLoopFilter) {
 | 
			
		||||
  const int num_threads = 0;
 | 
			
		||||
  SkipLoopFilterTest skip_loop_filter;
 | 
			
		||||
  skip_loop_filter.Init(num_threads);
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; i < 10; ++i) {
 | 
			
		||||
    skip_loop_filter.SetSkipLoopFilter(i % 2, VPX_CODEC_OK);
 | 
			
		||||
    ASSERT_EQ(VPX_CODEC_OK, skip_loop_filter.DecodeOneFrame());
 | 
			
		||||
  }
 | 
			
		||||
  ASSERT_EQ(VPX_CODEC_OK, skip_loop_filter.DecodeRemainingFrames());
 | 
			
		||||
  skip_loop_filter.CheckMd5(false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
@@ -9,11 +9,13 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vpx_dsp_rtcd.h"
 | 
			
		||||
#include "test/acm_random.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vp9_rtcd.h"
 | 
			
		||||
#include "vp9/common/vp9_blockd.h"
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
 | 
			
		||||
@@ -89,15 +91,19 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest,
 | 
			
		||||
                        ::testing::Values(vp9_subtract_block_c));
 | 
			
		||||
                        ::testing::Values(vpx_subtract_block_c));
 | 
			
		||||
 | 
			
		||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest,
 | 
			
		||||
                        ::testing::Values(vp9_subtract_block_sse2));
 | 
			
		||||
                        ::testing::Values(vpx_subtract_block_sse2));
 | 
			
		||||
#endif
 | 
			
		||||
#if HAVE_NEON
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(NEON, VP9SubtractBlockTest,
 | 
			
		||||
                        ::testing::Values(vp9_subtract_block_neon));
 | 
			
		||||
                        ::testing::Values(vpx_subtract_block_neon));
 | 
			
		||||
#endif
 | 
			
		||||
#if HAVE_MSA
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(MSA, VP9SubtractBlockTest,
 | 
			
		||||
                        ::testing::Values(vpx_subtract_block_msa));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
}  // namespace vp9
 | 
			
		||||
 
 | 
			
		||||
@@ -18,33 +18,33 @@
 | 
			
		||||
#if CONFIG_WEBM_IO
 | 
			
		||||
#include "test/webm_video_source.h"
 | 
			
		||||
#endif
 | 
			
		||||
#include "vp9/common/vp9_thread.h"
 | 
			
		||||
#include "vpx_util/vpx_thread.h"
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
 | 
			
		||||
using std::string;
 | 
			
		||||
 | 
			
		||||
class VP9WorkerThreadTest : public ::testing::TestWithParam<bool> {
 | 
			
		||||
class VPxWorkerThreadTest : public ::testing::TestWithParam<bool> {
 | 
			
		||||
 protected:
 | 
			
		||||
  virtual ~VP9WorkerThreadTest() {}
 | 
			
		||||
  virtual ~VPxWorkerThreadTest() {}
 | 
			
		||||
  virtual void SetUp() {
 | 
			
		||||
    vp9_get_worker_interface()->init(&worker_);
 | 
			
		||||
    vpx_get_worker_interface()->init(&worker_);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  virtual void TearDown() {
 | 
			
		||||
    vp9_get_worker_interface()->end(&worker_);
 | 
			
		||||
    vpx_get_worker_interface()->end(&worker_);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void Run(VP9Worker* worker) {
 | 
			
		||||
  void Run(VPxWorker* worker) {
 | 
			
		||||
    const bool synchronous = GetParam();
 | 
			
		||||
    if (synchronous) {
 | 
			
		||||
      vp9_get_worker_interface()->execute(worker);
 | 
			
		||||
      vpx_get_worker_interface()->execute(worker);
 | 
			
		||||
    } else {
 | 
			
		||||
      vp9_get_worker_interface()->launch(worker);
 | 
			
		||||
      vpx_get_worker_interface()->launch(worker);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  VP9Worker worker_;
 | 
			
		||||
  VPxWorker worker_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
int ThreadHook(void* data, void* return_value) {
 | 
			
		||||
@@ -53,12 +53,12 @@ int ThreadHook(void* data, void* return_value) {
 | 
			
		||||
  return *reinterpret_cast<int*>(return_value);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(VP9WorkerThreadTest, HookSuccess) {
 | 
			
		||||
TEST_P(VPxWorkerThreadTest, HookSuccess) {
 | 
			
		||||
  // should be a no-op.
 | 
			
		||||
  EXPECT_NE(vp9_get_worker_interface()->sync(&worker_), 0);
 | 
			
		||||
  EXPECT_NE(vpx_get_worker_interface()->sync(&worker_), 0);
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; i < 2; ++i) {
 | 
			
		||||
    EXPECT_NE(vp9_get_worker_interface()->reset(&worker_), 0);
 | 
			
		||||
    EXPECT_NE(vpx_get_worker_interface()->reset(&worker_), 0);
 | 
			
		||||
 | 
			
		||||
    int hook_data = 0;
 | 
			
		||||
    int return_value = 1;  // return successfully from the hook
 | 
			
		||||
@@ -67,17 +67,17 @@ TEST_P(VP9WorkerThreadTest, HookSuccess) {
 | 
			
		||||
    worker_.data2 = &return_value;
 | 
			
		||||
 | 
			
		||||
    Run(&worker_);
 | 
			
		||||
    EXPECT_NE(vp9_get_worker_interface()->sync(&worker_), 0);
 | 
			
		||||
    EXPECT_NE(vpx_get_worker_interface()->sync(&worker_), 0);
 | 
			
		||||
    EXPECT_FALSE(worker_.had_error);
 | 
			
		||||
    EXPECT_EQ(5, hook_data);
 | 
			
		||||
 | 
			
		||||
    // should be a no-op.
 | 
			
		||||
    EXPECT_NE(vp9_get_worker_interface()->sync(&worker_), 0);
 | 
			
		||||
    EXPECT_NE(vpx_get_worker_interface()->sync(&worker_), 0);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(VP9WorkerThreadTest, HookFailure) {
 | 
			
		||||
  EXPECT_NE(vp9_get_worker_interface()->reset(&worker_), 0);
 | 
			
		||||
TEST_P(VPxWorkerThreadTest, HookFailure) {
 | 
			
		||||
  EXPECT_NE(vpx_get_worker_interface()->reset(&worker_), 0);
 | 
			
		||||
 | 
			
		||||
  int hook_data = 0;
 | 
			
		||||
  int return_value = 0;  // return failure from the hook
 | 
			
		||||
@@ -86,29 +86,29 @@ TEST_P(VP9WorkerThreadTest, HookFailure) {
 | 
			
		||||
  worker_.data2 = &return_value;
 | 
			
		||||
 | 
			
		||||
  Run(&worker_);
 | 
			
		||||
  EXPECT_FALSE(vp9_get_worker_interface()->sync(&worker_));
 | 
			
		||||
  EXPECT_FALSE(vpx_get_worker_interface()->sync(&worker_));
 | 
			
		||||
  EXPECT_EQ(1, worker_.had_error);
 | 
			
		||||
 | 
			
		||||
  // Ensure _reset() clears the error and _launch() can be called again.
 | 
			
		||||
  return_value = 1;
 | 
			
		||||
  EXPECT_NE(vp9_get_worker_interface()->reset(&worker_), 0);
 | 
			
		||||
  EXPECT_NE(vpx_get_worker_interface()->reset(&worker_), 0);
 | 
			
		||||
  EXPECT_FALSE(worker_.had_error);
 | 
			
		||||
  vp9_get_worker_interface()->launch(&worker_);
 | 
			
		||||
  EXPECT_NE(vp9_get_worker_interface()->sync(&worker_), 0);
 | 
			
		||||
  vpx_get_worker_interface()->launch(&worker_);
 | 
			
		||||
  EXPECT_NE(vpx_get_worker_interface()->sync(&worker_), 0);
 | 
			
		||||
  EXPECT_FALSE(worker_.had_error);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_P(VP9WorkerThreadTest, EndWithoutSync) {
 | 
			
		||||
TEST_P(VPxWorkerThreadTest, EndWithoutSync) {
 | 
			
		||||
  // Create a large number of threads to increase the chances of detecting a
 | 
			
		||||
  // race. Doing more work in the hook is no guarantee as any race would occur
 | 
			
		||||
  // post hook execution in the main thread loop driver.
 | 
			
		||||
  static const int kNumWorkers = 64;
 | 
			
		||||
  VP9Worker workers[kNumWorkers];
 | 
			
		||||
  VPxWorker workers[kNumWorkers];
 | 
			
		||||
  int hook_data[kNumWorkers];
 | 
			
		||||
  int return_value[kNumWorkers];
 | 
			
		||||
 | 
			
		||||
  for (int n = 0; n < kNumWorkers; ++n) {
 | 
			
		||||
    vp9_get_worker_interface()->init(&workers[n]);
 | 
			
		||||
    vpx_get_worker_interface()->init(&workers[n]);
 | 
			
		||||
    return_value[n] = 1;  // return successfully from the hook
 | 
			
		||||
    workers[n].hook = ThreadHook;
 | 
			
		||||
    workers[n].data1 = &hook_data[n];
 | 
			
		||||
@@ -117,7 +117,7 @@ TEST_P(VP9WorkerThreadTest, EndWithoutSync) {
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; i < 2; ++i) {
 | 
			
		||||
    for (int n = 0; n < kNumWorkers; ++n) {
 | 
			
		||||
      EXPECT_NE(vp9_get_worker_interface()->reset(&workers[n]), 0);
 | 
			
		||||
      EXPECT_NE(vpx_get_worker_interface()->reset(&workers[n]), 0);
 | 
			
		||||
      hook_data[n] = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -126,16 +126,16 @@ TEST_P(VP9WorkerThreadTest, EndWithoutSync) {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for (int n = kNumWorkers - 1; n >= 0; --n) {
 | 
			
		||||
      vp9_get_worker_interface()->end(&workers[n]);
 | 
			
		||||
      vpx_get_worker_interface()->end(&workers[n]);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST(VP9WorkerThreadTest, TestInterfaceAPI) {
 | 
			
		||||
  EXPECT_EQ(0, vp9_set_worker_interface(NULL));
 | 
			
		||||
  EXPECT_TRUE(vp9_get_worker_interface() != NULL);
 | 
			
		||||
TEST(VPxWorkerThreadTest, TestInterfaceAPI) {
 | 
			
		||||
  EXPECT_EQ(0, vpx_set_worker_interface(NULL));
 | 
			
		||||
  EXPECT_TRUE(vpx_get_worker_interface() != NULL);
 | 
			
		||||
  for (int i = 0; i < 6; ++i) {
 | 
			
		||||
    VP9WorkerInterface winterface = *vp9_get_worker_interface();
 | 
			
		||||
    VPxWorkerInterface winterface = *vpx_get_worker_interface();
 | 
			
		||||
    switch (i) {
 | 
			
		||||
      default:
 | 
			
		||||
      case 0: winterface.init = NULL; break;
 | 
			
		||||
@@ -145,7 +145,7 @@ TEST(VP9WorkerThreadTest, TestInterfaceAPI) {
 | 
			
		||||
      case 4: winterface.execute = NULL; break;
 | 
			
		||||
      case 5: winterface.end = NULL; break;
 | 
			
		||||
    }
 | 
			
		||||
    EXPECT_EQ(0, vp9_set_worker_interface(&winterface));
 | 
			
		||||
    EXPECT_EQ(0, vpx_set_worker_interface(&winterface));
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -202,21 +202,21 @@ void DecodeFiles(const FileList files[]) {
 | 
			
		||||
// hang.
 | 
			
		||||
namespace impl {
 | 
			
		||||
 | 
			
		||||
void Init(VP9Worker *const worker) { memset(worker, 0, sizeof(*worker)); }
 | 
			
		||||
int Reset(VP9Worker *const /*worker*/) { return 1; }
 | 
			
		||||
int Sync(VP9Worker *const worker) { return !worker->had_error; }
 | 
			
		||||
void Init(VPxWorker *const worker) { memset(worker, 0, sizeof(*worker)); }
 | 
			
		||||
int Reset(VPxWorker *const /*worker*/) { return 1; }
 | 
			
		||||
int Sync(VPxWorker *const worker) { return !worker->had_error; }
 | 
			
		||||
 | 
			
		||||
void Execute(VP9Worker *const worker) {
 | 
			
		||||
void Execute(VPxWorker *const worker) {
 | 
			
		||||
  worker->had_error |= !worker->hook(worker->data1, worker->data2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Launch(VP9Worker *const worker) { Execute(worker); }
 | 
			
		||||
void End(VP9Worker *const /*worker*/) {}
 | 
			
		||||
void Launch(VPxWorker *const worker) { Execute(worker); }
 | 
			
		||||
void End(VPxWorker *const /*worker*/) {}
 | 
			
		||||
 | 
			
		||||
}  // namespace impl
 | 
			
		||||
 | 
			
		||||
TEST(VP9WorkerThreadTest, TestSerialInterface) {
 | 
			
		||||
  static const VP9WorkerInterface serial_interface = {
 | 
			
		||||
TEST(VPxWorkerThreadTest, TestSerialInterface) {
 | 
			
		||||
  static const VPxWorkerInterface serial_interface = {
 | 
			
		||||
    impl::Init, impl::Reset, impl::Sync, impl::Launch, impl::Execute, impl::End
 | 
			
		||||
  };
 | 
			
		||||
  // TODO(jzern): Avoid using a file that will use the row-based thread
 | 
			
		||||
@@ -225,13 +225,13 @@ TEST(VP9WorkerThreadTest, TestSerialInterface) {
 | 
			
		||||
  // progress in the row above before proceeding.
 | 
			
		||||
  static const char expected_md5[] = "b35a1b707b28e82be025d960aba039bc";
 | 
			
		||||
  static const char filename[] = "vp90-2-03-size-226x226.webm";
 | 
			
		||||
  VP9WorkerInterface default_interface = *vp9_get_worker_interface();
 | 
			
		||||
  VPxWorkerInterface default_interface = *vpx_get_worker_interface();
 | 
			
		||||
 | 
			
		||||
  EXPECT_NE(vp9_set_worker_interface(&serial_interface), 0);
 | 
			
		||||
  EXPECT_NE(vpx_set_worker_interface(&serial_interface), 0);
 | 
			
		||||
  EXPECT_EQ(expected_md5, DecodeFile(filename, 2));
 | 
			
		||||
 | 
			
		||||
  // Reset the interface.
 | 
			
		||||
  EXPECT_NE(vp9_set_worker_interface(&default_interface), 0);
 | 
			
		||||
  EXPECT_NE(vpx_set_worker_interface(&default_interface), 0);
 | 
			
		||||
  EXPECT_EQ(expected_md5, DecodeFile(filename, 2));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -309,6 +309,6 @@ TEST(VP9DecodeMultiThreadedTest, Decode3) {
 | 
			
		||||
}
 | 
			
		||||
#endif  // CONFIG_WEBM_IO
 | 
			
		||||
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(Synchronous, VP9WorkerThreadTest, ::testing::Bool());
 | 
			
		||||
INSTANTIATE_TEST_CASE_P(Synchronous, VPxWorkerThreadTest, ::testing::Bool());
 | 
			
		||||
 | 
			
		||||
}  // namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -10,11 +10,10 @@
 | 
			
		||||
 | 
			
		||||
#include "third_party/googletest/src/include/gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
 | 
			
		||||
#include "./vpx_config.h"
 | 
			
		||||
#include "./vpx_scale_rtcd.h"
 | 
			
		||||
#include "test/clear_system_state.h"
 | 
			
		||||
#include "test/register_state_check.h"
 | 
			
		||||
#include "vpx_mem/vpx_mem.h"
 | 
			
		||||
#include "vpx_scale/yv12config.h"
 | 
			
		||||
 | 
			
		||||
@@ -33,10 +32,10 @@ class VpxScaleBase {
 | 
			
		||||
  void ResetImage(int width, int height) {
 | 
			
		||||
    width_ = width;
 | 
			
		||||
    height_ = height;
 | 
			
		||||
    vpx_memset(&img_, 0, sizeof(img_));
 | 
			
		||||
    memset(&img_, 0, sizeof(img_));
 | 
			
		||||
    ASSERT_EQ(0, vp8_yv12_alloc_frame_buffer(&img_, width_, height_,
 | 
			
		||||
                                             VP8BORDERINPIXELS));
 | 
			
		||||
    vpx_memset(img_.buffer_alloc, kBufFiller, img_.frame_size);
 | 
			
		||||
    memset(img_.buffer_alloc, kBufFiller, img_.frame_size);
 | 
			
		||||
    FillPlane(img_.y_buffer, img_.y_crop_width, img_.y_crop_height,
 | 
			
		||||
              img_.y_stride);
 | 
			
		||||
    FillPlane(img_.u_buffer, img_.uv_crop_width, img_.uv_crop_height,
 | 
			
		||||
@@ -44,15 +43,15 @@ class VpxScaleBase {
 | 
			
		||||
    FillPlane(img_.v_buffer, img_.uv_crop_width, img_.uv_crop_height,
 | 
			
		||||
              img_.uv_stride);
 | 
			
		||||
 | 
			
		||||
    vpx_memset(&ref_img_, 0, sizeof(ref_img_));
 | 
			
		||||
    memset(&ref_img_, 0, sizeof(ref_img_));
 | 
			
		||||
    ASSERT_EQ(0, vp8_yv12_alloc_frame_buffer(&ref_img_, width_, height_,
 | 
			
		||||
                                             VP8BORDERINPIXELS));
 | 
			
		||||
    vpx_memset(ref_img_.buffer_alloc, kBufFiller, ref_img_.frame_size);
 | 
			
		||||
    memset(ref_img_.buffer_alloc, kBufFiller, ref_img_.frame_size);
 | 
			
		||||
 | 
			
		||||
    vpx_memset(&cpy_img_, 0, sizeof(cpy_img_));
 | 
			
		||||
    memset(&cpy_img_, 0, sizeof(cpy_img_));
 | 
			
		||||
    ASSERT_EQ(0, vp8_yv12_alloc_frame_buffer(&cpy_img_, width_, height_,
 | 
			
		||||
                                             VP8BORDERINPIXELS));
 | 
			
		||||
    vpx_memset(cpy_img_.buffer_alloc, kBufFiller, cpy_img_.frame_size);
 | 
			
		||||
    memset(cpy_img_.buffer_alloc, kBufFiller, cpy_img_.frame_size);
 | 
			
		||||
    ReferenceCopyFrame();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -87,8 +86,8 @@ class VpxScaleBase {
 | 
			
		||||
 | 
			
		||||
    // Fill the border pixels from the nearest image pixel.
 | 
			
		||||
    for (int y = 0; y < crop_height; ++y) {
 | 
			
		||||
      vpx_memset(left, left[padding], padding);
 | 
			
		||||
      vpx_memset(right, right[-1], right_extend);
 | 
			
		||||
      memset(left, left[padding], padding);
 | 
			
		||||
      memset(right, right[-1], right_extend);
 | 
			
		||||
      left += stride;
 | 
			
		||||
      right += stride;
 | 
			
		||||
    }
 | 
			
		||||
@@ -101,13 +100,13 @@ class VpxScaleBase {
 | 
			
		||||
 | 
			
		||||
    // The first row was already extended to the left and right. Copy it up.
 | 
			
		||||
    for (int y = 0; y < padding; ++y) {
 | 
			
		||||
      vpx_memcpy(top, left, extend_width);
 | 
			
		||||
      memcpy(top, left, extend_width);
 | 
			
		||||
      top += stride;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    uint8_t *bottom = left + (crop_height * stride);
 | 
			
		||||
    for (int y = 0; y <  bottom_extend; ++y) {
 | 
			
		||||
      vpx_memcpy(bottom, left + (crop_height - 1) * stride, extend_width);
 | 
			
		||||
      memcpy(bottom, left + (crop_height - 1) * stride, extend_width);
 | 
			
		||||
      bottom += stride;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,8 @@
 | 
			
		||||
# Environment check: Make sure input is available.
 | 
			
		||||
vpxdec_verify_environment() {
 | 
			
		||||
  if [ ! -e "${VP8_IVF_FILE}" ] || [ ! -e "${VP9_WEBM_FILE}" ] || \
 | 
			
		||||
    [ ! -e "${VP9_FPM_WEBM_FILE}" ] ; then
 | 
			
		||||
    [ ! -e "${VP9_FPM_WEBM_FILE}" ] || \
 | 
			
		||||
    [ ! -e "${VP9_LT_50_FRAMES_WEBM_FILE}" ] ; then
 | 
			
		||||
    elog "Libvpx test data must exist in LIBVPX_TEST_DATA_PATH."
 | 
			
		||||
    return 1
 | 
			
		||||
  fi
 | 
			
		||||
@@ -87,12 +88,29 @@ vpxdec_vp9_webm_frame_parallel() {
 | 
			
		||||
        --frame-parallel
 | 
			
		||||
    done
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vpxdec_vp9_webm_less_than_50_frames() {
 | 
			
		||||
  # ensure that reaching eof in webm_guess_framerate doesn't result in invalid
 | 
			
		||||
  # frames in actual webm_read_frame calls.
 | 
			
		||||
  if [ "$(vpxdec_can_decode_vp9)" = "yes" ] && \
 | 
			
		||||
     [ "$(webm_io_available)" = "yes" ]; then
 | 
			
		||||
    local readonly decoder="$(vpx_tool_path vpxdec)"
 | 
			
		||||
    local readonly expected=10
 | 
			
		||||
    local readonly num_frames=$(${VPX_TEST_PREFIX} "${decoder}" \
 | 
			
		||||
      "${VP9_LT_50_FRAMES_WEBM_FILE}" --summary --noblit 2>&1 \
 | 
			
		||||
      | awk '/^[0-9]+ decoded frames/ { print $1 }')
 | 
			
		||||
    if [ "$num_frames" -ne "$expected" ]; then
 | 
			
		||||
      elog "Output frames ($num_frames) != expected ($expected)"
 | 
			
		||||
      return 1
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vpxdec_tests="vpxdec_vp8_ivf
 | 
			
		||||
              vpxdec_vp8_ivf_pipe_input
 | 
			
		||||
              vpxdec_vp9_webm
 | 
			
		||||
              vpxdec_vp9_webm_frame_parallel"
 | 
			
		||||
              vpxdec_vp9_webm_frame_parallel
 | 
			
		||||
              vpxdec_vp9_webm_less_than_50_frames"
 | 
			
		||||
 | 
			
		||||
run_tests vpxdec_verify_environment "${vpxdec_tests}"
 | 
			
		||||
 
 | 
			
		||||
@@ -23,6 +23,13 @@ vpxenc_verify_environment() {
 | 
			
		||||
    elog "The file ${YUV_RAW_INPUT##*/} must exist in LIBVPX_TEST_DATA_PATH."
 | 
			
		||||
    return 1
 | 
			
		||||
  fi
 | 
			
		||||
  if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then
 | 
			
		||||
    if [ ! -e "${Y4M_NOSQ_PAR_INPUT}" ]; then
 | 
			
		||||
      elog "The file ${Y4M_NOSQ_PAR_INPUT##*/} must exist in"
 | 
			
		||||
      elog "LIBVPX_TEST_DATA_PATH."
 | 
			
		||||
      return 1
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
  if [ -z "$(vpx_tool_path vpxenc)" ]; then
 | 
			
		||||
    elog "vpxenc not found. It must exist in LIBVPX_BIN_PATH or its parent."
 | 
			
		||||
    return 1
 | 
			
		||||
@@ -49,6 +56,14 @@ yuv_input_hantro_collage() {
 | 
			
		||||
       --height="${YUV_RAW_INPUT_HEIGHT}""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
y4m_input_non_square_par() {
 | 
			
		||||
  echo ""${Y4M_NOSQ_PAR_INPUT}""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
y4m_input_720p() {
 | 
			
		||||
  echo ""${Y4M_720P_INPUT}""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Echo default vpxenc real time encoding params. $1 is the codec, which defaults
 | 
			
		||||
# to vp8 if unspecified.
 | 
			
		||||
vpxenc_rt_params() {
 | 
			
		||||
@@ -57,7 +72,7 @@ vpxenc_rt_params() {
 | 
			
		||||
    --buf-initial-sz=500
 | 
			
		||||
    --buf-optimal-sz=600
 | 
			
		||||
    --buf-sz=1000
 | 
			
		||||
    --cpu-used=-5
 | 
			
		||||
    --cpu-used=-6
 | 
			
		||||
    --end-usage=cbr
 | 
			
		||||
    --error-resilient=1
 | 
			
		||||
    --kf-max-dist=90000
 | 
			
		||||
@@ -247,6 +262,63 @@ vpxenc_vp9_webm_rt() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vpxenc_vp9_webm_rt_multithread_tiled() {
 | 
			
		||||
  if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \
 | 
			
		||||
     [ "$(webm_io_available)" = "yes" ]; then
 | 
			
		||||
    local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_rt_multithread_tiled.webm"
 | 
			
		||||
    local readonly tilethread_min=2
 | 
			
		||||
    local readonly tilethread_max=4
 | 
			
		||||
    local readonly num_threads="$(seq ${tilethread_min} ${tilethread_max})"
 | 
			
		||||
    local readonly num_tile_cols="$(seq ${tilethread_min} ${tilethread_max})"
 | 
			
		||||
 | 
			
		||||
    for threads in ${num_threads}; do
 | 
			
		||||
      for tile_cols in ${num_tile_cols}; do
 | 
			
		||||
        vpxenc $(y4m_input_720p) \
 | 
			
		||||
          $(vpxenc_rt_params vp9) \
 | 
			
		||||
          --threads=${threads} \
 | 
			
		||||
          --tile-columns=${tile_cols} \
 | 
			
		||||
          --output="${output}"
 | 
			
		||||
      done
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    if [ ! -e "${output}" ]; then
 | 
			
		||||
      elog "Output file does not exist."
 | 
			
		||||
      return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    rm "${output}"
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vpxenc_vp9_webm_rt_multithread_tiled_frameparallel() {
 | 
			
		||||
  if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \
 | 
			
		||||
     [ "$(webm_io_available)" = "yes" ]; then
 | 
			
		||||
    local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_rt_mt_t_fp.webm"
 | 
			
		||||
    local readonly tilethread_min=2
 | 
			
		||||
    local readonly tilethread_max=4
 | 
			
		||||
    local readonly num_threads="$(seq ${tilethread_min} ${tilethread_max})"
 | 
			
		||||
    local readonly num_tile_cols="$(seq ${tilethread_min} ${tilethread_max})"
 | 
			
		||||
 | 
			
		||||
    for threads in ${num_threads}; do
 | 
			
		||||
      for tile_cols in ${num_tile_cols}; do
 | 
			
		||||
        vpxenc $(y4m_input_720p) \
 | 
			
		||||
          $(vpxenc_rt_params vp9) \
 | 
			
		||||
          --threads=${threads} \
 | 
			
		||||
          --tile-columns=${tile_cols} \
 | 
			
		||||
          --frame-parallel=1 \
 | 
			
		||||
          --output="${output}"
 | 
			
		||||
      done
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    if [ ! -e "${output}" ]; then
 | 
			
		||||
      elog "Output file does not exist."
 | 
			
		||||
      return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    rm "${output}"
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vpxenc_vp9_webm_2pass() {
 | 
			
		||||
  if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \
 | 
			
		||||
     [ "$(webm_io_available)" = "yes" ]; then
 | 
			
		||||
@@ -320,6 +392,23 @@ vpxenc_vp9_webm_lag10_frames20() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# TODO(fgalligan): Test that DisplayWidth is different than video width.
 | 
			
		||||
vpxenc_vp9_webm_non_square_par() {
 | 
			
		||||
  if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \
 | 
			
		||||
     [ "$(webm_io_available)" = "yes" ]; then
 | 
			
		||||
    local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_non_square_par.webm"
 | 
			
		||||
    vpxenc $(y4m_input_non_square_par) \
 | 
			
		||||
      --codec=vp9 \
 | 
			
		||||
      --limit="${TEST_FRAMES}" \
 | 
			
		||||
      --output="${output}"
 | 
			
		||||
 | 
			
		||||
    if [ ! -e "${output}" ]; then
 | 
			
		||||
      elog "Output file does not exist."
 | 
			
		||||
      return 1
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vpxenc_tests="vpxenc_vp8_ivf
 | 
			
		||||
              vpxenc_vp8_webm
 | 
			
		||||
              vpxenc_vp8_webm_rt
 | 
			
		||||
@@ -329,9 +418,12 @@ vpxenc_tests="vpxenc_vp8_ivf
 | 
			
		||||
              vpxenc_vp9_ivf
 | 
			
		||||
              vpxenc_vp9_webm
 | 
			
		||||
              vpxenc_vp9_webm_rt
 | 
			
		||||
              vpxenc_vp9_webm_rt_multithread_tiled
 | 
			
		||||
              vpxenc_vp9_webm_rt_multithread_tiled_frameparallel
 | 
			
		||||
              vpxenc_vp9_webm_2pass
 | 
			
		||||
              vpxenc_vp9_ivf_lossless
 | 
			
		||||
              vpxenc_vp9_ivf_minq0_maxq0
 | 
			
		||||
              vpxenc_vp9_webm_lag10_frames20"
 | 
			
		||||
              vpxenc_vp9_webm_lag10_frames20
 | 
			
		||||
              vpxenc_vp9_webm_non_square_par"
 | 
			
		||||
 | 
			
		||||
run_tests vpxenc_verify_environment "${vpxenc_tests}"
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user