Skip to content

Make sure that the proper video stream index is used by the GPU decoder #5682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Oct 17, 2024

Category:

Bug fix (non-breaking change which fixes an issue)

Description:

  • fixes the use of 0 index stream inside the GPU decoder by properly
    obtained index

Additional information:

Affected modules and functionalities:

  • video GPU decoder

Key points relevant for the review:

  • NA

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
      • inputs/test_video.test_video_input_audio_stream
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

- fixes the use of 0 index stream inside the GPU decoder by properly
  obtained index

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL JanuszL force-pushed the proper_stream_gpu_Dec branch from 9275e2c to eada8b2 Compare October 17, 2024 17:15
@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 17, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19454423]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19454423]: BUILD FAILED

Comment on lines 222 to 223
// False when the file doesn't have any correct content or doesn't have valid video stream
bool is_valid_ = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick1: move one field up for better packing.
Nitpick2:

Suggested change
// False when the file doesn't have any correct content or doesn't have valid video stream
bool is_valid_ = false;
// False when the file doesn't have any correct content or doesn't have a valid video stream
bool is_valid_ = false;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 18, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19481473]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19481473]: BUILD PASSED

DALI_ENFORCE(filtered_packet_, "Could not allocate av packet");
if (!filtered_packet_) {
DALI_WARN(make_string("Could not allocate av packet for \"", Filename(), "\""));
is_valid_ = false;
Copy link
Member

Choose a reason for hiding this comment

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

The sample will be skipped by the reader, is that right? So we don't try to access filtered_packet_->data when it was not allocated properly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is the idea. We check if the decoder if valid during the operator instantiation and we warn and skip sample. For the decoder and video input operators (I saw we missed that, just added a commit for that) we cannot skip and just error.

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 23, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19655629]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19655629]: BUILD PASSED

@JanuszL JanuszL merged commit af14919 into NVIDIA:main Oct 24, 2024
7 checks passed
@JanuszL JanuszL deleted the proper_stream_gpu_Dec branch October 24, 2024 07:21
@JanuszL JanuszL added the important-fix Fixes an important issue in the software or development environment. label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
important-fix Fixes an important issue in the software or development environment.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants