Skip to content

Fix rocDecode test#480

Open
daniellegillai wants to merge 2 commits into
ROCm:developfrom
daniellegillai:decode_test_fix
Open

Fix rocDecode test#480
daniellegillai wants to merge 2 commits into
ROCm:developfrom
daniellegillai:decode_test_fix

Conversation

@daniellegillai

Copy link
Copy Markdown

Motivation

Fixes #479 so that the video_tests_rocdecode ctest passes.

Technical Details

Pass in 1 as the hardware_decode_mode arg for video_tests.cpp (instead of 2), and also change video_tests.cpp to consistently check if the decoder_type == 1, rather than == 1 in one check and > 0 in another.

Test Plan

rocAL ctests.

Test Result

All 21 ctests pass.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes the failing video_tests_rocdecode CTest by aligning the test arguments and decoder selection logic with the documented hardware_decode_mode=0/1 contract, preventing mismatched decode configuration that could lead to hangs/timeouts.

Changes:

  • Update video_tests_rocdecode CTest to pass hardware_decode_mode=1 (valid value) instead of 2.
  • Make video_tests.cpp consistently treat decoder_type == 1 as the only condition for HW/rocDecode mode.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/cpp_api/video_tests/video_tests.cpp Makes HW decode mode selection consistent by checking decoder_type == 1.
tests/cpp_api/CMakeLists.txt Fixes the rocDecode CTest argument to use a valid hardware_decode_mode value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +133 to 136
auto decoder_mode = ((decoder_type == 1) ? RocalDecodeDevice::ROCAL_HW_DECODE : RocalDecodeDevice::ROCAL_SW_DECODE);
RocalDecoderType rocal_decoder_type = RocalDecoderType::ROCAL_DECODER_VIDEO_FFMPEG_SW;
if (decoder_type == 1) {
rocal_decoder_type = RocalDecoderType::ROCAL_DECODER_VIDEO_ROCDECODE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue]: rocDecode ctest fails due to bad param

3 participants