Skip to content

Conversation

@dabrain34
Copy link
Contributor

@dabrain34 dabrain34 commented Jun 3, 2025

LAST COMMIT

001c2ff Fix frame to file from adding .yuv to filenames with .y4m already

BACKPORT

5376ce2 Add cast-qual to the cmake settings
001c2ff Fix frame to file from adding .yuv to filenames with .y4m already
16607fe encoder: Deal with the Vulkan chained stuctures
441343e common: Use the CRC generator instead of embedding it
88875e4 common: Code compilation fixes
db43c78 encode: remove the CPU input conversion function
593777c Modify the output filename extension based on the type

OPTIONAL:

77ca65c github actions: Build Windows only with FFMPEG
98a13b0 github actions: add a job to build with ffmpeg
1b1df8b Add option to generate raw YUV frames
b9df139 Instead of defining the destructor inline, provide its implementation in a separate source file to make GCC 13 happy in release mode. Also fix other compilation errors in release mode.
624a0ad Add Duck IVF parsing support to the elementary stream.
1f5ebf0 decode: make the Y4M file format to be the default output

BACKPORTED:

f6fdb5e Remove duplicate messages about finding shaderc
a0497b5 Remove unused variables and code related to shaderc
23636aa Use the SHADERC_SHARED_LIBRARY variable/target for shaderc linkage
b0f6e33 determine levelIdc first to estimate dpbsize
709faac Fix parser build on Linux aarch64
8669553 Report invalid cmdline arguments in h264 and hevc encoder
d2d75b5 decoder: messages clean-up and disable shader dump
85bebde common: Fix the deviceUUID to use the device UUID
167db00 encode: add support for HW load-balancing
1d17ec6 common and decode: HW LoadBalancing fixes
8364c59 common: Disable googletests for the loader build

MERGED:

f468fc9 decode: Linux shaderc library path fixes
f6985e7 Remove the FFMPEG lib dependency from the decoder's lib
4319ec4 decode: AV1 related fixes from Khronos GitLab fix //already in the VP9 decode patch
cdf58c3 decode: AV1 related fixes from Khronos GitLab //already in the VP9 decode patch
8255b25 For chroma resolution in 420 or 422 format, round width/height to next integer when caculation from luma width/height //already in the VP9 decode patch
8b9fe03 Switch to VkSubmitInfo2KHR and use TL semaphores //already in the VP9 decode patch
25689a1 Remove assert if fence times out but the timeout vlaue is less than total wait time

SYNCED:

c0c159c Use MAIN profile for YUV420 and 8-bit input. Use MAIN_10 profie for YUV420 and 10-bit input. For others, use RANGE_EXTENSIONS profile.
37fd14e H265: Initialize profile_idc with INVALID value
57a6a2f Fixed quality level validation layer warning
b8f5ba2 Fix YUV filter push constant size
d077b55 github actions: Add a release build
d9e38a1 vkVideoDecoder: fix valid unused variable
6d27dea ffmpeg: clean up the support
4fac41b log: disable shaders dump
627bd4c Fixed rate control cmdline arg value overriding with preferred
262ea92 update doc to follow new build infra
5bf51f1 DecoderConfig: enable stream demuxing by default
b31dccb use correct baseArrayLayer for the subresource in optimal to linear image copy
c8f5f2a ProgramConfig: add av1 decode operation
0d211d3 encode: input image row and column replication
b76d98a decoder: compute filter fixes
f7d9bc0 common: Compute filter 16-bit support
c24eb7f encode: input debug display fixes
e590ef8 Fix the Windows ARM64 build support 2
abbd907 Fix the Windows ARM64 build support
89d784b Add missing copy of input data from file to memory for YUV444P Also add support frame count calcuations for YUV444P and YUV422P
1ceb09f Return error if the specified qualityLevel is greater than the maximum supported quality level
445200d AV profile and tier selection fix.
84b2703 Set the bitstream buffer size to match the input image size.
b5d0d26 decode: fix memory leak in decoder simple sample
dd0ade8 decode: remove the shared device from decoder sample
349ea03 decode: simplify the decoder sample
90be13f Remove WSI shell and FFMPEG libs from simple
37d5ab5 decode: Fix DumpDecoderStreamInfo func name
b1ac620 decode: add a simple decode app - file out only
c8d0337 Remove the WSI Shell library from the decoder lib
4584ce5 decode: Rename VkVideoFrameToFile IF to VkVideoFrameOutput // Merged with 8229fe8
da411b4 encode: Fix h.264 compiler warnings
8229fe8 decode: client side VkVideoFrameToFile
9170a95 common: create a common encoder and decoder build
06ec316 common: Add decoder library build and docs
5cc8705 decode: Add decoder library and test app WIP
cb2cb0f decode: Add decoder library and test app WIP
be2a96f use preferred settings for h265 and tune some parameters based on these settings
b362231 use preferred settings for h264 and tune some parameters based on these settings
16aa62c Use preferred settings for gopstructure, rate control mode and constQp in av1 encode
13df2c2 Add support to query qualityLevel properties, query from each codec and print the preferred settings
4b39a5e Updated the documentation
3b51589 Remove update_external_sources*
4a09ca2 Remove local header files
68c52a4 Remove explicit shaderc and tools
a5221f8 encode: enablePreprocessComputeFilter init reorder
a6990d1 encode: add compute image pre-processor
0a7ebcd common: make compute filter generic
e0ba998 encode: QpMap prefer not to do image staging
8867778 encode: QpMap use inline staging with input cmdBuf
4656218 encode: QpMap add ProcessQpMap() and LoadNextQpMapFrameFromFile()
952bb40 EncoderConfig: fix BPP rounding logic
6f7bc4d vk-video-dec: fix enumerated warning
51e53ef vk-video-enc: fix enumerated warning
4d98c61 VulkanVideoFrameBuffer: add a pre c++17 compatibility
4ea7e94 ci: update build script for both linux and win
534130d ShellDirect: assert instead of returning NULL
381a14c encode: Remove the verbose messages

COMMON BASE

4c439a8 Revert "Fixed potential rare corner cases" (except SVE-based code)
8102c9b Fixed potential rare corner cases
d78acbe EncoderConfigAV1: add missing override
7475af5 Fixed inconsistency in sve parser code
1fe8d7c Use MinCbSizeY aligned width and height to calculate conformance window size
83b5cd1 EncoderConfigAV1: Fix GetMaxBFrameCount
eb97ba3 EncoderConfig: add input file get frame count
d6fe796 EncoderConfig: Fix GetMaxBFrameCount conversion
8c8c80d decode: Windows build fix
9616fae Fixed typo in NEON code
b47e0db decode: fix the DPB imageBarriers baseArrayLayer
78ca688 decode: use discrete views with image arrays
c3d6558 decode: framebuffer image resize fixes
d12760e decode: Invalidate image layout or resize
283c843 optimize choosing primary_ref_frame
579000e disable frame id numbers to keep the header simple
4c9bdc3 add timestamp for display-only frame header (show_existing_frame=1)
fe84909 fix commandline option for lossless
d73c986 vk_video_encoder: fix warning with enum
c17ad42 common: Use VkPhysicalDeviceVideoEncodeAV1FeaturesKHR for AV1 encode
a41e547 common: Vulkan spec update to 296 with av1_encode
eb0a107 encode: use fseek on Windows
bb5d7e5 Encoder: support Y4M format
4364507 encode: enable AV1 and QPmap features
d3acbc7 Revert "CMake: use only one generate_dispatch_tables"
3dd9ae9 Revert "CMake: factorize project definition"
f1ec8bc Revert "CMake: move install script and build instructions"
10ec079 common: Add the HelpersDispatchTable to the build
0b0d1f1 Revert "vkCodecUtils: generate a static library"
a72c1aa vkCodecUtils: generate a static library
cc58176 CMake: use only one generate_dispatch_tables
80ddcb4 ci: update to the mono CMakefile
5560138 CMake: move install script and build instructions
589f47b CMake: factorize project definition
a08d6f9 CMake: add ubuntu detection to install the libraries
e68feea EncoderConfig: introduce GetMaxBFrameCount
db39ecc demos: do not generate twice the HelpersDispatchTable
27fc5df decoder: Fix file output for DISTINCT DPB case
41a88df FFMPEG: add support for streamed AV1
1564669 Encoder: fallback to layered if separate not present
ae6152e fixed potential build issues for windows (winarm, generic, arm32bit, minor fix for avx512)
1e89710 H264RateControl: do not force the rate control for default
2fc85bd decode: fixed the SIMD-based next_start_code conformance with rare CPU-models
17d7b2d Fix frame numbering in the CRC output
357a621 Helpers: fence is not a pointer type, use %lld
f489dbb conversion: fix some warning from CTS ubuntu 20.04 x64
bfdf44c videoSessionParametersTemplate is not a pointer
eeb82cd mio: data conversion warning size_t in 32 bits
ed59f8b Encoder: data conversion warning size_t in 32 bits
f0e28f6 common: CRC generator and Y4M build fixes
2e1487f Add the missing CRC generator files fix Y4M output.
0b80ac6 ci: add a first build and release CI
d303907 CRC support and Y4M support
98dfa1e decode: parser disable the default debug level of 1
ce9158e decoder: convert bools from 32-bit to 1-bit bitfield
9f3e627 decoder: revert fix HEVC parser refpic flag
0f57232 encode: Fix dumping of AV1 skipped frames
f7159ad encode: Flush queue based on holdRefFramesInQueue
484fcea encode: rearrange code that inserts show_existing_frame=1 header
75a9ddd decode: scripts fetch origin, don't fetch all
6980b50 decode: VP9 parser aarch64 linux build fix
3a7725e common: Fix Windows build issues
b8984b0 decode: fix the Windows builds of SIMD-based next_start_code
6d86909 VkImprove fixed a warning in the AVX2, SSSE3 functions
697d47a decode: parser SIMD-based next_start_code optimization
ada0a76 common: minor Vulkan spec update
b5114e0 common: Remove bogus assert in VideoCapabilities
3557e4a decoder: Compute AV1 tile offsets and sizes correctly
5fd3578 decode: Fix 16bpp linear output to a file
e422d5e decode: Handle AV1 delta_lf_* correctly
9b8bb3d decode: Fix reference index for Gold Frame Index
056c211 decode: FB, usage and AV1 framework improvements
87aa1d7 decode: Add AV1 decode support
c61db27 encoder: align libs/VkVideoEncoder with Khronos
0d1601b encoder: fix VkVideoPictureResourceInfoKHR::baseArrayLayer
82c1a97 encode: Release images on frame release
f45db5a Clang warnings
ad3dc49 EncoderConfig: enhance deviceID doc
0e0cf5f encode: set holdRefFramesInQueue when B-frames
9cc4358 encode: add out of order cmBuf recording v.2
4ca5bb3 encode: add 10-bit support with word shift
d1d966b encode: h.265 increase the maxDpbPicBuf from 6 to 9
e2e1597 encoder: set aspectMask to COLOR for single plane images
1f184fe encoder: Set constQp for every FrameInfo object
08d8b6b encoder: Add parsing for qp{I,P,B} and {average,max}Bitrate
30ecc29 EncoderH264: fix conversion warning
537a2fe add ffmpeg library to git ignore
1ffa07e fix indentations
31ec05f encoder: Make callbacks non-static for ProcessOutOfOrderFrames
f1b72f6 encoder: Make callbacks non-static
5e05132 encoder: Fix division by enum
9fe647b Fix h264/h265 encoder crash due to insufficient pictures in dpbImagePool
01a28e9 vkVideoEncoder: declare local var maxDpbPicturesCount
9b16929 encode: add out of order cmBuf recording
8c7f4cf encode: dump encode status on error
ff7c69b encode: Fix EncoderThreadQueue
a31d0be encode: Use maxDpbPicturesCount for maxDpbSlots
1b359a4 encode: add encodeMaxWidth / Height params and fix
6c60122 encode: code clean-up and align with khronos repo
044cc24 Encoder: print encoded geometry help
460c23f encoder: test: update the log
96cbe83 encode: add encodeWidth and encodeHeight params
186fd5c encoder: rename m_encoderQueue to m_encoderThreadQueue
ea94fd9 encoder: Use correct format specifier for size_t
10c9476 encode: cmake remove encoder unised libs use
926f543 EncoderConfig: cleanup the argument management
959017d Update help text with new options qualityLevel and tuningMode details
4d58bac Add qualityLevel and tuningMode cmd line option
f97c199 encode: Add explicit dpbMode setting
8b46d04 Add rateControlMode option to the command line arguments
4c8c595 encode: fix h.265's rate control calculations
2658755 encode: wait on fence before AssembleBitstreamData
5948eb3 Fixes the printf formatter of WaitAndResetFence
6f13afa FilterYuvCompute: fix the fence signaling and reset
c9fb926 encode: Fix the first frame fence state to non-SIGNALED
547d7c2 encode: Windows build warnings and error fixes
42c6ab6 encode: transtion layout only if valid setup image
abe11c3 encoder: add ResetCommandBuffer before recording
8735538 VLfix dpb slot management
882ae5f VLfix validation layers howto enable/disable
be72d80 VLfix encodeInfo's dstBuffer type and usage flags
29209bb VLfix videosession parameters createinfo flags
15a9f25 VLfix h264 pEncodeInfo->pSetupReferenceSlot->pNext chain includes unexpected VkStructureType
0b7312b VLfix sync-hazard-read-after-write for setupImage
425b585 VLfix VkVideoEncodeRateControlInfoKHR when beginning the video coding
9227468 VLfix redundant semaphore
ae33f5e VLfix maxActiveReferencePictures supported by the video profile
2d4ee48 VLfix h265 framerate default value
33900e1 VLfix dpb slot index 0 is not active in VkVideoSessionKHR
132a76d VLfix inline queries in vkCmdBeginQuery
d97438f VLfix pEncodeInfo->pSetupReferenceSlot->pNext chain does not contain a VkVideoEncodeH264/H265/DpbSlotInfoKHR structure
51657bc VLfix pEncodeInfo->flags
318e1f9 VLfix pEncodeInfo->srcPictureResource.sType
ee263e0 VLfix VkImageBarrier acquiring ownership of VkImage has no matching release barrier
9443ef8 VLfix videoMaintenance1Features and synchronization2Features
8843426 VLfix refPicList no-reference elements value
1a3d3a9 VLfix the cmdpipelinebarrier: read-after-write hazards
58bbc19 VLfix cmdpipeline barrier
c38eed2 VLfix image layout
2dccef7 Add --deviceUuid parameter to select a device
b679bb1 encode: Add command line options for few av1 tools
192aece encode: fix some more compiler-generated warnings
5c945dc encode: fix some compiler-generated warnings
50ec3e4 encode: Don't mangle the CreateVulkanVideoEncoder symbol
4e15d08 encode: Fix the HelpersDispatchTable dependency
4780c0e Update help string and run instruction to indicate av1 encode support
8d20982 frameEncodeOrderNum is not actual encode order.
594bfcb encode: Closed GOP structure support
84d0cd0 YcbcrNormalizeColorRange: Build warning fixes
c4f5e29 common: Build warning fixes
2bf0d29 VulkanVideoDisplayQueue embed the template to the class
6468b73 encoder: add cmake ENCODER_DISPLAY_QUEUE_SUPPORT
1dbe9e8 encoder: Gop structure fixes v.3
e88779e encode: add encoder library target and test
75b4880 video: Fix the encode and decode device interfaces
f90e368 video: fix device extensions context
ebfc221 Framebuffer image mgr restructure
8c505bc Reduce decoderQueueSize from 8 to 5 buffers
c70c7a1 Reduce backBufferCount from 8 to 3 buffers
07fa7ed DPB imageBarriers use only when not in DECODE_DPB
36f7521 Move the codedExtent out of FB to the decoder
9af0664 Remove unused field noTick from ProgramConfig
082b5d1 Add extra validation for CLI parameter values not starting with -
8df7655 Refactor decoder CLI to show help
53f5794 Fix submit's pWaitDstStageMask
a36c23f VulkanVideoImagePool fix the MP MUTABLE FORMAT
37b2fa9 Fix double vkUnmap calls
bbec7f6 decoder: only create compute queue when requested
2b35d6c decode: add extra debug for FB pic index allocations
431de1d encode: reset query pool must be outside video coding block
64dc32c Fix timeout wait when outputting to file.
44c118f Fix msvc windows builds
c9807d2 Add support for a separate Xfer queue
c8ac388 Encode: decouple video encode and transfer queue
e66a3e4 Encode H264: Initialize defaults for frame rate
9886df8 Encode H264: Actually set level_idc
e4acebb decoder: Fix the compute filter queue fence
590ac3d decoder: Fix the compute filter queue
8634cda Decoder Parser: fix the ICD level calculations
1c90f94 Disable the display slow-down
8c3d119 decode: Disable query wait for headless decode
41478a8 decode: add assert on non-signaled cmd-buf fence
bed80e3 decode: Enable HW load-balancing messages
6087ffc Vulkan h.264/5 Encoder infrastructure alpha WIP
9840c64 Revert "Bulk Change [2024-01-17]"
59a0e06 Bulk Change [2024-01-17]
1d9eb74 Increase the number of display swapchain images
5ef4937 decode: Do not mark as free bitstream, VPS, SPS, PPS on frame return
ff88cbf decode: spread the images reuse from ReservePictureBuffer
1a3d464 vkencode: upgrade vulkan headers version
113cc7c vulkan: upgrade vulkan headers version
46943b3 parser: make shared pointer C++11 compatible
23567c8 vkdecode: add semaphore array bounds check
749943b vkdecode: fix the requested queue types
2747488 physical device: dump more Vulkan device info
b135833 Guard request of encode extension behind beta flag
f5d8137 Condition optional queue retrieval
d0aadf6 Lookup the official validation layer
c5b748c Fix missing string include
a3b9b62 Decode filter fix multi-layered images v.2
4cf35c6 Fix VkImageResourceView::Create multi-layer
0603398 Implemented VK_KHR_video_maintenance1
827b339 Update vkspec with VK_KHR_video_maintenance1
a8a6d30 Revert DESCRIPTOR_BUFFER mode: only for testing
04b3623 Force switch to descr to DESCRIPTOR_BUFFER
9c358fc Add descriptor buffer support
8b5acab Video encode app restructure and API update WIP
2dd79ce Decode clean-up plus Vulkan filter class
f57a7ce clang C++14 compiler warning fixes
b36f79c chore: suppress warning about static_assert (#47)
f4de028 Change the nvParser License from MIT to Apache v2.0
707fc2e Remove the nvidia-vkvideo-parser.lib binary
badcd1d Check for QueryResultStatusSupport before use
4afd04e Display reported caps.maxImageCount can be zero
1d872b9 Add and use VkBufferResource
b4c5ce6 Add FindRequiredDeviceExtension
6ee9dff Clean-up ImageObject
700ac1e Clean-up VulkanVideoUtils.h use
28c1bf2 Ensure the max number of ActiveReferencePictures is 16
0963d56 decode: CPU YUV conversion host mapping fixes
fcbfc52 Use GetQueryPoolResults when queryPool is available
619c578 Wait with GetQueryPoolResults at queue side
461dcc5 decode: Use clone instead of resize with VulkanBitstreamBuffer
70e21d2 Clean-up the present swapchain back-buffers
f64eef4 Replace assert_success with AssertSuccess
f289815 ImageObject reuse the mapped device memory
9c68bb4 vk_video_encoder: define VULKAN_HPP_NO_TO_STRING (#39)
fa3e115 Add support for VK_KHR_push_descriptor
498cebb Add support for VK_EXT_descriptor_buffer
b553ea6 decoder: Add HW LoadBalancing support
cf5dcce Add configuration for decoderQueueSize
1c33e5e Bitstream and memory: don't clear the memory
a54d7b0 vk_video_decoder: fix segv with invalid args
ddf7d37 Always wait on frameCompleteFence before starting vkCmdBuffer recording
be312ec Minor fixes for 32/64-bit platform builds
c16a277 Fix the display backbuffer queue size
ff6ef40 Release the NVIDIA's Video Parser as open source
5e3eef0 Utils: VulkanDescriptorSet as a separate class
4227568 DPB and output images support for DISTINCT
459ccf8 Remove the req for YCBCR_2PLANE_444_FORMATS ext
bfac142 VulkanDeviceContext QueryResultStatusSupport()
e8cce89 Add error checking for ProfileIdc
0712f2a Merge pull request #32 from theHamsta/check-result-of-VkCreateDevice
8b49ca1 fix: check return code of CreateVulkanDevice in vk-video-dec/Main.cpp
a8fd215 Remove vk_enum_string_helper.h from VulkanVideoFrameBuffer.cpp
9d13ba1 vkvdeo decode sample app MT build fixes
8c472fc vk-video-dec: add ninja to the list of required packages
05c56a7 Remove the bitstream buffer 16-byte zero padding
eabba1a Parser: Allow for missing VPS for HEVC content
fb50095 Flush the display queue parser at end-of-stream
0e1529c FFMPEG: Add AV_PIX_FMT_YUVJ420P to GetChromaSubsampling()
a993c1d Extend support for inlined picture parameters
cfa7b59 Query the required number of YCbCr descriptors
4e70a44 VulkanVideoParser fix the m_maxNumDpbSlots value on update
5a354e8 Fix the number of allocated command buffers
107c2df VideoPictureParametersSet restructure
be1cf37 Restructured vk device and decoder app clean-up
25a8ef8 Move and rename NvVideoProfile to VkVideoCoreProfile
f7f2de1 Update the vulkan and encoder APIs to v.238
7d68747 video: vulkan video rel 1.0 vulkan 236
68398ce video: update the private vk interface to ver. 231
eb5af38 Update build requirements
d593a8d Update vk_video_encoder to API v230
8c79dc2 Merge pull request #20 from dabrain34/dab_fix_typo_support_h265
d82f6b2 Updated the codec profiles per the latest VV spec
cd35835 Fix initializing VkPhysicalDeviceVideoFormatInfoKHR videoFormatInfo
6bbf87f NvVkVideoDecoder: fix typo if codec type is H265
de54a1d Decode Parser bins and API update for Vulkan v.230
b95d9f8 Fixed problem with double buffering technique in main.
1facb51 decode: Add static parser libraries
d258ef1 decode: fix the nvVkFormats.cpp path
351afb6 Update Vulkan BETA driver versions supported
c29ca9f Add vulkan video encode sample
eedb3b3 decode: Update the sample to Vulkan v.1.3.212
dd09e7e Build Windows Parser DLLs in window (non-console) mode
7467196 Minor code fixes
d50a80d Adjust and align image's width and height
54ab5c7 Add nvParserLog to CreateVulkanVideoDecodeParser
bf0bf7c Add support for auto format and size video update
9266a18 Merge pull request #13 from nvpro-samples/master
639bbd9 Vulkan Video Parser and API updates
95eeeb8 Fix the required driver versions
bbb10b1 Update Video Parser and general build fixes
c851b02 Remove the debug dumps from the sample app
17be7e7 Add info links to README
2596e4a Update Linux parser so binaries
c1ef4b8 Linux video sample app build fixes
5f5b4d8 Add an arch Image of the vk decoder
660590a First Public Release of Vulkan Video Decode Sample

@dabrain34 dabrain34 requested a review from zlatinski June 3, 2025 13:11
@dabrain34
Copy link
Contributor Author

@srinathkr-nv
@krajunv

@dabrain34 dabrain34 changed the title Backport vk video samples patches WIP: Backport vk video samples patches Jun 3, 2025
@dabrain34
Copy link
Contributor Author

[ 01972376b7a0f361982200a624615f8878e8e50f] encode: remove the CPU input conversion function introduced a regression with the encoder.

vk-video-enc-test: /DEV/Vulkan-Video-Samples/vk_video_encoder/libs/VkVideoEncoder/VkVideoEncoder.cpp:1405: VkResult VkVideoEncoder::CopyLinearToOptimalImage(VkCommandBuffer_T*&, VkSharedBaseObj<VkImageResourceView>&, VkSharedBaseObj<VkImageResourceView>&, const VkExtent2D&, uint32_t, uint32_t, VkImageLayout, VkImageLayout): Assertion `(mpInfo->vkPlaneFormat[2] == VK_FORMAT_UNDEFINED) && (mpInfo->vkPlaneFormat[3] == VK_FORMAT_UNDEFINED)' failed.

@dabrain34
Copy link
Contributor Author

dabrain34 commented Jun 3, 2025

Fixed with 23ef546 but unfortunately the encoder wont work anymore in CTS where the computeFilter is disabled because the build does not support shaderc.

Need to investigate why enablePreprocessComputeFilter can not be false anymore.

It seems that CopyLinearToOptimalImage does not work anymore

@dabrain34 dabrain34 force-pushed the dab_backport_vk_video_samples branch from 23ef546 to 45f9530 Compare June 9, 2025 12:10
@CLAassistant
Copy link

CLAassistant commented Jun 9, 2025

CLA assistant check
All committers have signed the CLA.

@dabrain34
Copy link
Contributor Author

@srinathkr-nv can you please sign up the CLA ?

@srinathkr-nv
Copy link
Contributor

@srinathkr-nv can you please sign up the CLA ?

Thank you for the reminder; I've done it now.

@dabrain34 dabrain34 force-pushed the dab_backport_vk_video_samples branch from 45f9530 to 8872d06 Compare June 17, 2025 13:18
@zlatinski
Copy link
Contributor

[ 01972376b7a0f361982200a624615f8878e8e50f] encode: remove the CPU input conversion function introduced a regression with the encoder.

vk-video-enc-test: /DEV/Vulkan-Video-Samples/vk_video_encoder/libs/VkVideoEncoder/VkVideoEncoder.cpp:1405: VkResult VkVideoEncoder::CopyLinearToOptimalImage(VkCommandBuffer_T*&, VkSharedBaseObj<VkImageResourceView>&, VkSharedBaseObj<VkImageResourceView>&, const VkExtent2D&, uint32_t, uint32_t, VkImageLayout, VkImageLayout): Assertion `(mpInfo->vkPlaneFormat[2] == VK_FORMAT_UNDEFINED) && (mpInfo->vkPlaneFormat[3] == VK_FORMAT_UNDEFINED)' failed.

What was the format that caused that, do you know?

@dabrain34 dabrain34 force-pushed the dab_backport_vk_video_samples branch from 8872d06 to 7b14822 Compare June 19, 2025 09:19
@dabrain34
Copy link
Contributor Author

[ 01972376b7a0f361982200a624615f8878e8e50f] encode: remove the CPU input conversion function introduced a regression with the encoder.

vk-video-enc-test: /DEV/Vulkan-Video-Samples/vk_video_encoder/libs/VkVideoEncoder/VkVideoEncoder.cpp:1405: VkResult VkVideoEncoder::CopyLinearToOptimalImage(VkCommandBuffer_T*&, VkSharedBaseObj<VkImageResourceView>&, VkSharedBaseObj<VkImageResourceView>&, const VkExtent2D&, uint32_t, uint32_t, VkImageLayout, VkImageLayout): Assertion `(mpInfo->vkPlaneFormat[2] == VK_FORMAT_UNDEFINED) && (mpInfo->vkPlaneFormat[3] == VK_FORMAT_UNDEFINED)' failed.

What was the format that caused that, do you know?

The format value is VK_FORMAT_R8_UNORM for mpInfo->vkPlaneFormat[2].

To reproduce the issue you have to remove encoder: allow to build without shaderc dep 2 and run:

$ ./BUILD/vk_video_encoder/demos/vk-video-enc-test -i ~/DEV/Medias/Videos/RAW/videogen_720x480.yuv --inputWidth 360 --inputHeight 240 -c hevc

If I remove the assert, I get

	 **** WARNING: fence  encoderEncodeFence(102096936612032) is not done after 100 mSec with result 0x2 ****
	 **** WARNING: fence  encoderEncodeFence(102096936612032) is not done after 200 mSec with result 0x2 ****
	 **** WARNING: fence  encoderEncodeFence(102096936612032) is not done after 300 mSec with result 0x2 ****
	 **** WARNING: fence  encoderEncodeFence(102096936612032) is not done after 400 mSec with result 0x2 ****
	 **** WARNING: fence  encoderEncodeFence(102096936612032) is not done after 500 mSec with result 0x2 ****
	 **** WARNING: fence  encoderEncodeFence(102096936612032) is not done after 600 mSec with result 0x2 ****
	 **** WARNING: fence  encoderEncodeFence(102096936612032) is not done after 700 mSec with result 0x2 ****
	 **** WARNING: fence  encoderEncodeFence(102096936612032) is not done after 800 mSec with result 0x2 ****
	 **** WARNING: fence  encoderEncodeFence(102096936612032) is not done after 900 mSec with result 0x2 ****
	 **** ERROR: fence  encoderEncodeFence(102096936612032) is not done after 5000 mSec with result 0xfffffffc ****

@dabrain34
Copy link
Contributor Author

Created #68 to separate the backport and discussed only this patch regression.

@dabrain34 dabrain34 changed the title WIP: Backport vk video samples patches WIP: Backport vk video samples patches part 2 Jun 19, 2025
@dabrain34 dabrain34 force-pushed the dab_backport_vk_video_samples branch from 7b14822 to 1743c12 Compare June 19, 2025 09:43
@dabrain34 dabrain34 force-pushed the dab_backport_vk_video_samples branch from 1743c12 to 7ba4679 Compare June 25, 2025 10:09
@dabrain34
Copy link
Contributor Author

dabrain34 commented Jun 25, 2025

I added new commits to the backport because merge of Add cast-qual to the cmake settings introduced warnings and to fix those, it needs the commits from nvpro-samples/vk_video_samples#145.

The patch has been reverted in #75

The main problem here is the regression due to encode: remove the CPU input conversion function which should be adressed first before merging this as it might be an issue with CTS integration.

@zlatinski do you think you could have a look ?

zlatinski and others added 5 commits December 15, 2025 15:52
Compute filter: Add support for bufffer as input
Compute filter: Add support for in/out plane mismatch
Compute filter: Add 10/12-bit shift support
Compute filter: Add supprt for 4:4:4, 4:2:2 and 4:2:0
vasn1k and others added 5 commits December 15, 2025 15:59
Signed-off-by: Vassili Nikolaev (NVIDIA) <vnikolaev@nvidia.com>
Signed-off-by: Vassili Nikolaev (NVIDIA) <vnikolaev@nvidia.com>
DoParseArguments changed with:

a934d3b common: Code compilation fixes
Use explicit struct names to avoid local PushConstants struct
definitions from shadowing the class member PushConstants.
@dabrain34 dabrain34 force-pushed the dab_backport_vk_video_samples branch from 7ba4679 to 5730e04 Compare December 16, 2025 08:57
numPlanes will be used only in Debug as assert are disabled in
release.

This is a fixup of "encode: remove the CPU input conversion function"
@dabrain34 dabrain34 changed the title WIP: Backport vk video samples patches part 2 Backport vk video samples patches part 2 Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants