Skip to content

Comments

Testing framework hotfixes#156

Merged
dabrain34 merged 5 commits intomainfrom
dab_testing_framewok_hotfixes
Feb 5, 2026
Merged

Testing framework hotfixes#156
dabrain34 merged 5 commits intomainfrom
dab_testing_framewok_hotfixes

Conversation

@dabrain34
Copy link
Contributor

@dabrain34 dabrain34 commented Jan 26, 2026

This PR improves error handling in the video decoder

VulkanVideoProcessor::Initialize now returns VkResult instead of int32_t, enabling proper Vulkan error propagation and avoid issue with -vkResult which was driving to confusion. Now use vkResult as in other init method of the code.

Fixes a bug where unsupported video dimensions weren't detected (negated VkResult codes became positive, always failing the < 0 check)

@dabrain34 dabrain34 force-pushed the dab_testing_framewok_hotfixes branch from 101ffee to df07492 Compare January 26, 2026 16:06
@dabrain34 dabrain34 force-pushed the dab_testing_framewok_hotfixes branch from df07492 to 7aea1d3 Compare January 28, 2026 09:16
@dabrain34 dabrain34 changed the title Testing framewok hotfixes Testing framework hotfixes Jan 28, 2026
@dabrain34 dabrain34 force-pushed the dab_testing_framewok_hotfixes branch from ea6b838 to 19df939 Compare January 29, 2026 10:34
@dabrain34 dabrain34 force-pushed the dab_testing_framewok_hotfixes branch from 19df939 to 1d18bd0 Compare January 30, 2026 16:13
@dabrain34 dabrain34 force-pushed the dab_testing_framewok_hotfixes branch 2 times, most recently from 6811514 to 525a432 Compare January 30, 2026 17:20
@dabrain34 dabrain34 force-pushed the dab_testing_framewok_hotfixes branch 4 times, most recently from 84ad3ea to e789d83 Compare February 3, 2026 16:58
Change VulkanVideoProcessor::Initialize return type from int32_t to
VkResult for proper Vulkan error handling. This removes the need to
negate VkResult values and fixes broken error detection (the previous
initResult < 0 check always failed since negated negative VkResult
codes become positive).

Error cases now return appropriate VkResult codes directly:
- VK_ERROR_FEATURE_NOT_PRESENT for invalid video queue
- VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR for unsupported codec
- VK_ERROR_FORMAT_NOT_SUPPORTED for unsupported dimensions
- Add VkVideoQueueResult enum with FrameAvailable, NotAvailable,
EndOfStream,
  Error values (avoiding X11 Success macro conflict)
- Change GetNextFrame to return enum instead of int32_t with bool*
endOfStream
- Update OutputFrame and related functions to return bool with optional
  bytesWritten output parameter
- Add proper errno handling in WriteDataToFile with strerror messages
- Stop frame processing on file write failure instead of continuing
- Add early null checks for mpInfo parameter in ConvertFrameToNv12 and
WriteFrameToFileY4M to prevent potential null pointer dereference.
Returns VVS_EXIT_UNSUPPORTED in tests and demos app properly for both
encoder and decoder apps.
@dabrain34 dabrain34 force-pushed the dab_testing_framewok_hotfixes branch from e789d83 to f52adee Compare February 4, 2026 14:02
@dabrain34 dabrain34 force-pushed the dab_testing_framewok_hotfixes branch from f52adee to 82a32b3 Compare February 4, 2026 15:02
Copy link

@ceyusa ceyusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dabrain34 dabrain34 merged commit 9968a93 into main Feb 5, 2026
17 checks passed
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.

3 participants