22
22
#include " VkCodecUtils/VulkanDeviceContext.h"
23
23
#include " VkCodecUtils/Helpers.h"
24
24
#include " VkVideoCore/VkVideoCoreProfile.h"
25
+ #include " Logger.h"
25
26
26
27
class VulkanVideoCapabilities
27
28
{
@@ -219,24 +220,24 @@ class VulkanVideoCapabilities
219
220
}
220
221
221
222
if (dumpData) {
222
- std::cout << " \t\t\t " << ((videoProfile.GetCodecType () == VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR) ? " h264" : " h265" ) << " decode capabilities: " << std::endl;
223
+ LOG_S_DEBUG << " \t\t\t " << ((videoProfile.GetCodecType () == VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR) ? " h264" : " h265" ) << " decode capabilities: " << std::endl;
223
224
224
225
if (pVideoCapabilities->flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR) {
225
- std::cout << " \t\t\t " << " Use separate reference images" << std::endl;
226
+ LOG_S_DEBUG << " \t\t\t " << " Use separate reference images" << std::endl;
226
227
}
227
228
228
- std::cout << " \t\t\t " << " minBitstreamBufferOffsetAlignment: " << pVideoCapabilities->minBitstreamBufferOffsetAlignment << std::endl;
229
- std::cout << " \t\t\t " << " minBitstreamBufferSizeAlignment: " << pVideoCapabilities->minBitstreamBufferSizeAlignment << std::endl;
230
- std::cout << " \t\t\t " << " pictureAccessGranularity: " << pVideoCapabilities->pictureAccessGranularity .width << " x " << pVideoCapabilities->pictureAccessGranularity .height << std::endl;
231
- std::cout << " \t\t\t " << " minCodedExtent: " << pVideoCapabilities->minCodedExtent .width << " x " << pVideoCapabilities->minCodedExtent .height << std::endl;
232
- std::cout << " \t\t\t " << " maxCodedExtent: " << pVideoCapabilities->maxCodedExtent .width << " x " << pVideoCapabilities->maxCodedExtent .height << std::endl;
233
- std::cout << " \t\t\t " << " maxDpbSlots: " << pVideoCapabilities->maxDpbSlots << std::endl;
234
- std::cout << " \t\t\t " << " maxActiveReferencePictures: " << pVideoCapabilities->maxActiveReferencePictures << std::endl;
229
+ LOG_S_DEBUG << " \t\t\t " << " minBitstreamBufferOffsetAlignment: " << pVideoCapabilities->minBitstreamBufferOffsetAlignment << std::endl;
230
+ LOG_S_DEBUG << " \t\t\t " << " minBitstreamBufferSizeAlignment: " << pVideoCapabilities->minBitstreamBufferSizeAlignment << std::endl;
231
+ LOG_S_DEBUG << " \t\t\t " << " pictureAccessGranularity: " << pVideoCapabilities->pictureAccessGranularity .width << " x " << pVideoCapabilities->pictureAccessGranularity .height << std::endl;
232
+ LOG_S_DEBUG << " \t\t\t " << " minCodedExtent: " << pVideoCapabilities->minCodedExtent .width << " x " << pVideoCapabilities->minCodedExtent .height << std::endl;
233
+ LOG_S_DEBUG << " \t\t\t " << " maxCodedExtent: " << pVideoCapabilities->maxCodedExtent .width << " x " << pVideoCapabilities->maxCodedExtent .height << std::endl;
234
+ LOG_S_DEBUG << " \t\t\t " << " maxDpbSlots: " << pVideoCapabilities->maxDpbSlots << std::endl;
235
+ LOG_S_DEBUG << " \t\t\t " << " maxActiveReferencePictures: " << pVideoCapabilities->maxActiveReferencePictures << std::endl;
235
236
236
237
if (videoProfile.GetCodecType () == VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR) {
237
238
const VkVideoDecodeH264CapabilitiesKHR* pH264DecCapabilities = (VkVideoDecodeH264CapabilitiesKHR*)pVideoDecodeCapabilities->pNext ;
238
- std::cout << " \t\t\t " << " maxLevelIdc: " << pH264DecCapabilities->maxLevelIdc << std::endl;
239
- std::cout << " \t\t\t " << " fieldOffsetGranularity: " << pH264DecCapabilities->fieldOffsetGranularity .x << " x " << pH264DecCapabilities->fieldOffsetGranularity .y << std::endl;
239
+ LOG_S_DEBUG << " \t\t\t " << " maxLevelIdc: " << pH264DecCapabilities->maxLevelIdc << std::endl;
240
+ LOG_S_DEBUG << " \t\t\t " << " fieldOffsetGranularity: " << pH264DecCapabilities->fieldOffsetGranularity .x << " x " << pH264DecCapabilities->fieldOffsetGranularity .y << std::endl;
240
241
241
242
if (strncmp (pVideoCapabilities->stdHeaderVersion .extensionName ,
242
243
VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME,
@@ -247,7 +248,7 @@ class VulkanVideoCapabilities
247
248
}
248
249
} else if (videoProfile.GetCodecType () == VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR) {
249
250
const VkVideoDecodeH265CapabilitiesKHR* pH265DecCapabilities = (VkVideoDecodeH265CapabilitiesKHR*)pVideoDecodeCapabilities->pNext ;
250
- std::cout << " \t\t\t " << " maxLevelIdc: " << pH265DecCapabilities->maxLevelIdc << std::endl;
251
+ LOG_S_DEBUG << " \t\t\t " << " maxLevelIdc: " << pH265DecCapabilities->maxLevelIdc << std::endl;
251
252
if (strncmp (pVideoCapabilities->stdHeaderVersion .extensionName ,
252
253
VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME,
253
254
sizeof (pVideoCapabilities->stdHeaderVersion .extensionName ) - 1U ) ||
@@ -301,9 +302,9 @@ class VulkanVideoCapabilities
301
302
result = vkDevCtx->GetPhysicalDeviceVideoFormatPropertiesKHR (vkDevCtx->getPhysicalDevice (), &videoFormatInfo, &supportedFormatCount, pSupportedFormats);
302
303
assert (result == VK_SUCCESS);
303
304
if (dumpData) {
304
- std::cout << " \t\t\t " << ((videoProfile.GetCodecType () == VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR) ? " h264" : " h265" ) << " decode formats: " << std::endl;
305
+ LOG_S_DEBUG << " \t\t\t " << ((videoProfile.GetCodecType () == VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR) ? " h264" : " h265" ) << " decode formats: " << std::endl;
305
306
for (uint32_t fmt = 0 ; fmt < supportedFormatCount; fmt++) {
306
- std::cout << " \t\t\t " << fmt << " : " << std::hex << pSupportedFormats[fmt].format << std::dec << std::endl;
307
+ LOG_S_DEBUG << " \t\t\t " << fmt << " : " << std::hex << pSupportedFormats[fmt].format << std::dec << std::endl;
307
308
}
308
309
}
309
310
0 commit comments