1e5c31af7Sopenharmony_ci/*------------------------------------------------------------------------ 2e5c31af7Sopenharmony_ci * Vulkan Conformance Tests 3e5c31af7Sopenharmony_ci * ------------------------ 4e5c31af7Sopenharmony_ci * 5e5c31af7Sopenharmony_ci * Copyright (c) 2023 The Khronos Group Inc. 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 8e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License. 9e5c31af7Sopenharmony_ci * You may obtain a copy of the License at 10e5c31af7Sopenharmony_ci * 11e5c31af7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 12e5c31af7Sopenharmony_ci * 13e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 14e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 15e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and 17e5c31af7Sopenharmony_ci * limitations under the License. 18e5c31af7Sopenharmony_ci * 19e5c31af7Sopenharmony_ci *//*! 20e5c31af7Sopenharmony_ci * \file 21e5c31af7Sopenharmony_ci * \brief Reference checksums for video decode validation 22e5c31af7Sopenharmony_ci * 23e5c31af7Sopenharmony_ci * See the <vulkan_data_dir>/vulkan/video/frame_checksums.py file for 24e5c31af7Sopenharmony_ci * instructions on generating the checksums for new tests. 25e5c31af7Sopenharmony_ci *--------------------------------------------------------------------*/ 26e5c31af7Sopenharmony_ci 27e5c31af7Sopenharmony_ci#include "vktVideoClipInfo.hpp" 28e5c31af7Sopenharmony_ci#include "vktVideoTestUtils.hpp" 29e5c31af7Sopenharmony_ci 30e5c31af7Sopenharmony_ci 31e5c31af7Sopenharmony_cinamespace vkt { 32e5c31af7Sopenharmony_cinamespace video 33e5c31af7Sopenharmony_ci{ 34e5c31af7Sopenharmony_ci 35e5c31af7Sopenharmony_cistatic const char* clipA[30] = 36e5c31af7Sopenharmony_ci{ 37e5c31af7Sopenharmony_ci "7fec73fbcd485785b0c5f14776628bd6", 38e5c31af7Sopenharmony_ci "4e635dfa94b770ee983540746f416270", 39e5c31af7Sopenharmony_ci "a8bbb2ae42f5edebe7891ff803be7c4f", 40e5c31af7Sopenharmony_ci "3389478c7a0011551274bb68ce6deb5f", 41e5c31af7Sopenharmony_ci "63aa1d861304729dfec950f486a15a0b", 42e5c31af7Sopenharmony_ci "04980dcedb06d21d0c7dc37653d3a458", 43e5c31af7Sopenharmony_ci "2a0162386ebbf3eea6f613042cb2a617", 44e5c31af7Sopenharmony_ci "a29121c412ae6bda174254039a5b6086", 45e5c31af7Sopenharmony_ci "bfdeb27a7a83b250a8311a4468c3e4bf", 46e5c31af7Sopenharmony_ci "cee21548a5235a8eea878dd695ef8f50", 47e5c31af7Sopenharmony_ci "3b8cc378c3843c7c5918e9213e9e4f81", 48e5c31af7Sopenharmony_ci "d11322bbaec122fcc7f2d8ed6b455110", 49e5c31af7Sopenharmony_ci "ffe3f13784f7689735d2b8c96bcd2d0b", 50e5c31af7Sopenharmony_ci "0253711c4523988d4b9736238f5e5d01", 51e5c31af7Sopenharmony_ci "d3968c4560c31815443f857ddb0082a3", 52e5c31af7Sopenharmony_ci "74b0ae5f72a6676e4679b30f06598277", 53e5c31af7Sopenharmony_ci "7d49ad952d2600aefe20e0a6611e91bf", 54e5c31af7Sopenharmony_ci "32d86ff0d1dfb493adb2d90e973025fb", 55e5c31af7Sopenharmony_ci "a0f52f968b800bd8b67c2a44b5394690", 56e5c31af7Sopenharmony_ci "0a54a47ed72ecead9f7a43f39a562fca", 57e5c31af7Sopenharmony_ci "c1effee5f75f5c59c71a3765e199861c", 58e5c31af7Sopenharmony_ci "75f020c1da96c2d5da31483c16a1e4ed", 59e5c31af7Sopenharmony_ci "66cfa534ced4f1b18b6b04cc0a41331d", 60e5c31af7Sopenharmony_ci "3648527cf7b9b7366759c5ab8f1aab20", 61e5c31af7Sopenharmony_ci "1c7c47a07c5bb38dfe2a4e9e2cf5d860", 62e5c31af7Sopenharmony_ci "2e2bc3c723a731b4df4eb32a0b36293d", 63e5c31af7Sopenharmony_ci "6e647c760a0304d97abf291a2b9e66be", 64e5c31af7Sopenharmony_ci "5a9fe2e1bdf31ad0d256aeeecbe35ae7", 65e5c31af7Sopenharmony_ci "3e825fb6fb5361151fb7c1347523d6d0", 66e5c31af7Sopenharmony_ci "2870bd63631f4b787a1b084974cd519c", 67e5c31af7Sopenharmony_ci}; 68e5c31af7Sopenharmony_ci 69e5c31af7Sopenharmony_cistatic const char* clipB[30] = 70e5c31af7Sopenharmony_ci{ 71e5c31af7Sopenharmony_ci "a5221c5caa575aadb9c6c1e968ab6c29", 72e5c31af7Sopenharmony_ci "5214efd7d98f6c4dcab897bb1310743b", 73e5c31af7Sopenharmony_ci "6c7ab991e68a285711731911d88ed121", 74e5c31af7Sopenharmony_ci "43a583ed805e254a5473ae515eea2e93", 75e5c31af7Sopenharmony_ci "1a9fb658f449d71648b6f2cdca1aa34d", 76e5c31af7Sopenharmony_ci "377be6813960071259167f7305894469", 77e5c31af7Sopenharmony_ci "cf3ab21b6b6570f63a2b8eff7ee04879", 78e5c31af7Sopenharmony_ci "596a68452693b2e56df40e30275a353e", 79e5c31af7Sopenharmony_ci "e785d42901a1196690bd0f3700011a90", 80e5c31af7Sopenharmony_ci "88a00463d768d796e106408ebcb6721e", 81e5c31af7Sopenharmony_ci "bda7da34a619ef6d9cd08ab03fa72e3a", 82e5c31af7Sopenharmony_ci "bebc1624c3cdebcfc3016c33955f4923", 83e5c31af7Sopenharmony_ci "e209eac5c302e23252570b74973f94bf", 84e5c31af7Sopenharmony_ci "4ff0ba2f72cb6d8f0229dc12e2cfbbcf", 85e5c31af7Sopenharmony_ci "18ac88f74d7df142046079d733779035", 86e5c31af7Sopenharmony_ci "147bb36e92f6ff87e348c48f38b47dab", 87e5c31af7Sopenharmony_ci "9e09197f76ba89c70c2b183a167a6696", 88e5c31af7Sopenharmony_ci "867c16867c26bc0c58f16c5ebeff6eb2", 89e5c31af7Sopenharmony_ci "b8efc23369b7f2ea19e2b21ce97368db", 90e5c31af7Sopenharmony_ci "5b911f588984740ef772f5845f3a5805", 91e5c31af7Sopenharmony_ci "27f0f7fe39718799061e0e532bfbed14", 92e5c31af7Sopenharmony_ci "60020402bc2b645b703af5156f52ee9d", 93e5c31af7Sopenharmony_ci "d73e71817bf776b62b4d1e81793d659f", 94e5c31af7Sopenharmony_ci "e873082290fbcfddebd784fc2edaab9f", 95e5c31af7Sopenharmony_ci "2f4e293b00c145f1f5515920d2fd5705", 96e5c31af7Sopenharmony_ci "be907f259eca15e8914bc08861f3c76f", 97e5c31af7Sopenharmony_ci "a18eb46de4c7dff7915bc65673d2fff9", 98e5c31af7Sopenharmony_ci "615315bca5a50fabad86745e070b3c8f", 99e5c31af7Sopenharmony_ci "2a2aa07f61aa590eb9a10a07c85dfe04", 100e5c31af7Sopenharmony_ci "119fd37851af0cac45fda60d7dc1ccd8", 101e5c31af7Sopenharmony_ci}; 102e5c31af7Sopenharmony_ci 103e5c31af7Sopenharmony_cistatic const char* clipC[30] = 104e5c31af7Sopenharmony_ci{ 105e5c31af7Sopenharmony_ci "2086be0ea6f35e68a9f34ea51a359ef0", // 352x288 reference checksums 106e5c31af7Sopenharmony_ci "9e045b8e14c7f635fff4a4e56a359ff7", 107e5c31af7Sopenharmony_ci "b9aace50035d92d2b2b0cbc5049ccea1", 108e5c31af7Sopenharmony_ci "eda08231bb604567d72d850b9aaa8658", 109e5c31af7Sopenharmony_ci "b5b9ec2c1a231f595c6c747a93926287", 110e5c31af7Sopenharmony_ci "81f77e981e65926f04ed9483f838ce1f", 111e5c31af7Sopenharmony_ci "8fb63cb865f410e5d003a6691ef6d998", 112e5c31af7Sopenharmony_ci "0417e3ce4d51670e8cf5e1a1a8b64b0d", 113e5c31af7Sopenharmony_ci "5c7cee8e1e72b3acb71dd09f51e3d4e4", 114e5c31af7Sopenharmony_ci "966368b1970e59dbd14d5e492691c25c", 115e5c31af7Sopenharmony_ci "8afd1bb08c05651dacc5bf1a72fb1001", 116e5c31af7Sopenharmony_ci "bd9fe310e70fc55fbc0b43895aa14eb1", 117e5c31af7Sopenharmony_ci "057435492eb70ebf1ffcec5b423828f7", 118e5c31af7Sopenharmony_ci "6df3ab9e8f590e8e21b88e5401361d49", 119e5c31af7Sopenharmony_ci "531730c9a1ce3076c5f1a30609efcf17", 120e5c31af7Sopenharmony_ci "87823f36c56ecd539c955cfe3e44d097", // 176x144 reference checksums 121e5c31af7Sopenharmony_ci "65399b5342b3ee7bba9f51074523ae16", 122e5c31af7Sopenharmony_ci "fd3c5efbc237e24c3242aaa35124b77c", 123e5c31af7Sopenharmony_ci "56dd0b57ba4b436605f236ae7ad8535c", 124e5c31af7Sopenharmony_ci "c1694a837158581a282493ffb7778d1a", 125e5c31af7Sopenharmony_ci "64417694aeccbe36abb77cd5689083ea", 126e5c31af7Sopenharmony_ci "08bba16075a5d1d36fadac3ca3a71d06", 127e5c31af7Sopenharmony_ci "adb982cd7240ab8d97924631455a5d88", 128e5c31af7Sopenharmony_ci "822bd35904dabe46e9238aae77c5e85f", 129e5c31af7Sopenharmony_ci "1da1fc85653b894fc6f4cf2ddd41b7f6", 130e5c31af7Sopenharmony_ci "80e283c058324a21cace4c8ed1f0a178", 131e5c31af7Sopenharmony_ci "b5169864eb21620a1a4a0f988c01fefa", 132e5c31af7Sopenharmony_ci "cf38cf96287f0cd13fdbdc2b25cfd0d1", 133e5c31af7Sopenharmony_ci "95b71dc4a6a7925cfb1ad6c76e547b95", 134e5c31af7Sopenharmony_ci "c2146da8b89f068e00d7de837a02b89c", 135e5c31af7Sopenharmony_ci}; 136e5c31af7Sopenharmony_ci 137e5c31af7Sopenharmony_cistatic const char* h264_4k_26_ibp_main[26] = 138e5c31af7Sopenharmony_ci{ 139e5c31af7Sopenharmony_ci "2cd5ad413430098893a617ab46a7b885", 140e5c31af7Sopenharmony_ci "0b82fc7501897a834470f68e0647c96b", 141e5c31af7Sopenharmony_ci "5099dbd788ec90ad9010bbcc4ca3a813", 142e5c31af7Sopenharmony_ci "10ffaf41904c779627ab6ae9ebe5bf9f", 143e5c31af7Sopenharmony_ci "7d4aca0319da143a09d03b3b13d5ba23", 144e5c31af7Sopenharmony_ci "34f6ab5b1b676c189950f0b2f80d9431", 145e5c31af7Sopenharmony_ci "e812f06035d77030cf56eaa65632783c", 146e5c31af7Sopenharmony_ci "f8dbeb21b35a5fedcfd171a8207f836b", 147e5c31af7Sopenharmony_ci "b0c5a18f31c92e9778d1dcdca4b781d3", 148e5c31af7Sopenharmony_ci "bb89ff68261f0626eb8699dc3e000278", 149e5c31af7Sopenharmony_ci "aeb5064995db3a5cdae6283c67a2949e", 150e5c31af7Sopenharmony_ci "425dfb76d5961994a6dff267dc0fc5a6", 151e5c31af7Sopenharmony_ci "17800cb3d7598c6284f544069653c594", 152e5c31af7Sopenharmony_ci "bb193efca8e1a2f6bcb9f523c815468f", 153e5c31af7Sopenharmony_ci "a8eb65b204edc25a9dada32889717218", 154e5c31af7Sopenharmony_ci "715e7ec00e756ca3c85722f9464aeba3", 155e5c31af7Sopenharmony_ci "496e1e2c97a8cbfabb7b179838e3384f", 156e5c31af7Sopenharmony_ci "102445bf67c88ecb761f3263b8ab672b", 157e5c31af7Sopenharmony_ci "d9a3dbe8b05a4d7fd04a4564771b3dc0", 158e5c31af7Sopenharmony_ci "8fe9190578592d6a551f47f19926bb21", 159e5c31af7Sopenharmony_ci "854519810e75eb9501e896ec66b83d59", 160e5c31af7Sopenharmony_ci "ccd65246951a2b77dce66e11faa97811", 161e5c31af7Sopenharmony_ci "cde30e5d581267834ae91f4af77d7fac", 162e5c31af7Sopenharmony_ci "e144d9fe07470ae7be48362ab8817cc1", 163e5c31af7Sopenharmony_ci "4ef58adc2006d4456a0145102efe83b3", 164e5c31af7Sopenharmony_ci "ebfb7d5301c287e09a6473402fdcd010", 165e5c31af7Sopenharmony_ci}; 166e5c31af7Sopenharmony_ci 167e5c31af7Sopenharmony_cistatic const char* jellyfishHEVC[26] = 168e5c31af7Sopenharmony_ci{ 169e5c31af7Sopenharmony_ci "131ecbc5c6ebac63c3b25721cb5cb2b2", 170e5c31af7Sopenharmony_ci "0a9da70fd9959874e74542c7768d9e08", 171e5c31af7Sopenharmony_ci "2f09ce3f5d243d84b12f53d2574b8e9c", 172e5c31af7Sopenharmony_ci "909d939a5d09650e49703b7e78beddfe", 173e5c31af7Sopenharmony_ci "483cf425d719b961173db2f1a1c7f282", 174e5c31af7Sopenharmony_ci "b3d1e44427723fb80d1229e335e2cacd", 175e5c31af7Sopenharmony_ci "5c5f38b8ab0f19602c0af8fc4a7b37a1", 176e5c31af7Sopenharmony_ci "7e3e579e923a0f5d07b75fa18e8be8ce", 177e5c31af7Sopenharmony_ci "ad2dc11df6f46a011d0dd923c0001dc5", 178e5c31af7Sopenharmony_ci "f490093b4e2dfee8fe13b2e41310607f", 179e5c31af7Sopenharmony_ci "982511b0c457e643b4f77bfd64db55eb", 180e5c31af7Sopenharmony_ci "f985dc3bd5b366edf0a7541af3fa3a72", 181e5c31af7Sopenharmony_ci "6493f4a899a3450fe8f2dfb77ab97812", 182e5c31af7Sopenharmony_ci "04dec3a5a5ce2bd480593a708885a0c2", 183e5c31af7Sopenharmony_ci "0afbf90e7e45c04f566eac2aecb19e52", 184e5c31af7Sopenharmony_ci "e1016a026c40490db627cdc51ef7b600", 185e5c31af7Sopenharmony_ci "869d25ef36cc75bc2729ab4a563cd1a0", 186e5c31af7Sopenharmony_ci "ba0f91e20161af480776c24790538153", 187e5c31af7Sopenharmony_ci "5896ccae5cdc7abbee7d064f11bc55bf", 188e5c31af7Sopenharmony_ci "80565c134c28c8413cb8ee6217af15fd", 189e5c31af7Sopenharmony_ci "e1acab18892d012cf14d6acc69f660b5", 190e5c31af7Sopenharmony_ci "c05cf136e5f464daa2e03484d855913e", 191e5c31af7Sopenharmony_ci "20f32820fa8deb9e971f56778bc7ba96", 192e5c31af7Sopenharmony_ci "e9bbe21340ed0c828a6f2eb5c2b204e6", 193e5c31af7Sopenharmony_ci "27c5e8099070dfcbae31ba7f9ddd97e5", 194e5c31af7Sopenharmony_ci "87be085bd498c3f97e9bc55beed79683", 195e5c31af7Sopenharmony_ci}; 196e5c31af7Sopenharmony_ci 197e5c31af7Sopenharmony_cistatic auto H264_420_8BIT_HIGH_PROFILE = VideoProfileInfo{VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, 198e5c31af7Sopenharmony_ci VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR, 199e5c31af7Sopenharmony_ci VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, 200e5c31af7Sopenharmony_ci VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, 201e5c31af7Sopenharmony_ci STD_VIDEO_H264_PROFILE_IDC_HIGH}; 202e5c31af7Sopenharmony_cistatic auto H264_420_8BIT_MAIN_PROFILE = VideoProfileInfo{VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, 203e5c31af7Sopenharmony_ci VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR, 204e5c31af7Sopenharmony_ci VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, 205e5c31af7Sopenharmony_ci VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, 206e5c31af7Sopenharmony_ci STD_VIDEO_H264_PROFILE_IDC_MAIN}; 207e5c31af7Sopenharmony_cistatic auto H265_420_8BIT_MAIN_PROFILE = VideoProfileInfo{VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, 208e5c31af7Sopenharmony_ci VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR, 209e5c31af7Sopenharmony_ci VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, 210e5c31af7Sopenharmony_ci VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, 211e5c31af7Sopenharmony_ci STD_VIDEO_H265_PROFILE_IDC_MAIN}; 212e5c31af7Sopenharmony_ci 213e5c31af7Sopenharmony_cistatic ClipInfo Clips[] = 214e5c31af7Sopenharmony_ci{ 215e5c31af7Sopenharmony_ci { 216e5c31af7Sopenharmony_ci CLIP_A, 217e5c31af7Sopenharmony_ci "vulkan/video/clip-a.h264", 218e5c31af7Sopenharmony_ci H264_420_8BIT_HIGH_PROFILE, 219e5c31af7Sopenharmony_ci 30, 220e5c31af7Sopenharmony_ci 10, 221e5c31af7Sopenharmony_ci 3, 222e5c31af7Sopenharmony_ci clipA, 223e5c31af7Sopenharmony_ci }, 224e5c31af7Sopenharmony_ci { 225e5c31af7Sopenharmony_ci CLIP_B, 226e5c31af7Sopenharmony_ci "vulkan/video/clip-b.h264", 227e5c31af7Sopenharmony_ci H264_420_8BIT_HIGH_PROFILE, 228e5c31af7Sopenharmony_ci 30, 229e5c31af7Sopenharmony_ci 10, 230e5c31af7Sopenharmony_ci 3, 231e5c31af7Sopenharmony_ci clipB, 232e5c31af7Sopenharmony_ci }, 233e5c31af7Sopenharmony_ci { 234e5c31af7Sopenharmony_ci CLIP_C, 235e5c31af7Sopenharmony_ci "vulkan/video/clip-c.h264", 236e5c31af7Sopenharmony_ci H264_420_8BIT_HIGH_PROFILE, 237e5c31af7Sopenharmony_ci 30, 238e5c31af7Sopenharmony_ci 10, 239e5c31af7Sopenharmony_ci 3, 240e5c31af7Sopenharmony_ci clipC, 241e5c31af7Sopenharmony_ci }, 242e5c31af7Sopenharmony_ci { 243e5c31af7Sopenharmony_ci CLIP_D, 244e5c31af7Sopenharmony_ci "vulkan/video/clip-d.h265", 245e5c31af7Sopenharmony_ci H265_420_8BIT_MAIN_PROFILE, 246e5c31af7Sopenharmony_ci 30, 247e5c31af7Sopenharmony_ci 10, 248e5c31af7Sopenharmony_ci 3, 249e5c31af7Sopenharmony_ci clipA,// same as clip A 250e5c31af7Sopenharmony_ci }, 251e5c31af7Sopenharmony_ci { 252e5c31af7Sopenharmony_ci CLIP_H264_4K_26_IBP_MAIN, 253e5c31af7Sopenharmony_ci "vulkan/video/4k_26_ibp_main.h264", 254e5c31af7Sopenharmony_ci H264_420_8BIT_MAIN_PROFILE, 255e5c31af7Sopenharmony_ci 26, 256e5c31af7Sopenharmony_ci 13, 257e5c31af7Sopenharmony_ci 2, 258e5c31af7Sopenharmony_ci h264_4k_26_ibp_main, 259e5c31af7Sopenharmony_ci }, 260e5c31af7Sopenharmony_ci { 261e5c31af7Sopenharmony_ci CLIP_JELLY_HEVC, 262e5c31af7Sopenharmony_ci "vulkan/video/jellyfish-250-mbps-4k-uhd-GOB-IPB13.h265", 263e5c31af7Sopenharmony_ci H265_420_8BIT_MAIN_PROFILE, 264e5c31af7Sopenharmony_ci 26, 265e5c31af7Sopenharmony_ci 26, 266e5c31af7Sopenharmony_ci 1, 267e5c31af7Sopenharmony_ci jellyfishHEVC, 268e5c31af7Sopenharmony_ci }, 269e5c31af7Sopenharmony_ci}; 270e5c31af7Sopenharmony_ci 271e5c31af7Sopenharmony_ciconst ClipInfo* clipInfo(ClipName c) 272e5c31af7Sopenharmony_ci{ 273e5c31af7Sopenharmony_ci return &Clips[c]; 274e5c31af7Sopenharmony_ci} 275e5c31af7Sopenharmony_ci 276e5c31af7Sopenharmony_ciconst char* checksumForClipFrame(const ClipInfo* cinfo, int frameNumber) 277e5c31af7Sopenharmony_ci{ 278e5c31af7Sopenharmony_ci DE_ASSERT(frameNumber >= 0 && frameNumber < cinfo->totalFrames); 279e5c31af7Sopenharmony_ci return cinfo->frameChecksums[frameNumber]; 280e5c31af7Sopenharmony_ci} 281e5c31af7Sopenharmony_ci 282e5c31af7Sopenharmony_ci 283e5c31af7Sopenharmony_ci} // namespace video 284e5c31af7Sopenharmony_ci} // namespace vkt 285