Skip to content

fix: count only in-range packets toward GOP length to prevent open-GO…#23

Merged
RmSchaffert merged 2 commits into
NVIDIA:mainfrom
xupinjie:pinjie/fix_gop_overap
May 26, 2026
Merged

fix: count only in-range packets toward GOP length to prevent open-GO…#23
RmSchaffert merged 2 commits into
NVIDIA:mainfrom
xupinjie:pinjie/fix_gop_overap

Conversation

@xupinjie
Copy link
Copy Markdown
Collaborator

Description

Bug: HEVC open-GOP leading pictures were counted into the GOP length, making adjacent GOPs report overlapping [first_frame_id, first_frame_id + gop_len] ranges and breaking every downstream consumer that treats this range as a coverage interval.

C++ fix: Exclude leading pictures from the GOP-length count so (first_frame_id, gop_len) becomes a clean non-overlapping partition of the display-index space.

Store fix: Switched SharedGopStore.put()'s dedup from a coverage query to an exact (video, first_frame_id, gop_len)` identity match, so its correctness no longer depends on the upstream non-overlap invariant.

Type of Change

Please select (at least one):

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation / examples / tutorials / demos
  • Supporting functionality change (fix or feature in documentation generation, helper scripts, ...)
  • Refactoring / internal change
  • Other (please describe):

Testing

Checklist for testing:

  • Tests added or updated if/as needed
  • Repository test runner executed: scripts/run_tests.sh

Optionally, add a brief description.

Documentation, Examples, Tutorials, Demos

Checklist for documentation:

  • User-facing documentation updated if/as needed (including API docs)
  • [] Examples / tutorials / demos updated or added (if relevant)
  • Limitations and constraints documented (if relevant)
  • Performance documented (if relevant)
  • Documentation building successful & checks outlined in the Documentation Checks section of the Contribution Guide are performed

Optionally, add a brief description.

Code Quality

Checklist for dependencies:

  • Dependencies updated in the relevant pyproject.toml if/as needed
  • Code formatted according to the Code Formatting Guide

Optionally, add a brief description.

Related Issues / Context

If applicable, link related issues, discussions etc.


DCO / Sign-Off

Please refer to the section on Signing Your Work & Developer Certificate of Origin (DCO)
in the Contribution Guide before submitting your contribution.

References

For additional details, please refer to the Contribution Guide.
The following guides are available (referenced in the Contribution Guide for further details):

Please also refer to the summary checklist in the Contribution Guide,
which is a guideline for what to consider when submitting your contribution and covers the same topics as the checklists above.

…P HEVC range overlap

Signed-off-by: pinjie <pinjiex@nvidia.com>
@xupinjie xupinjie requested a review from RmSchaffert May 22, 2026 13:02
@xupinjie xupinjie self-assigned this May 22, 2026
@xupinjie xupinjie marked this pull request as ready for review May 22, 2026 13:03
@xupinjie
Copy link
Copy Markdown
Collaborator Author

/build

1 similar comment
@RmSchaffert
Copy link
Copy Markdown
Collaborator

/build


import utils

OPEN_GOP_SAMPLE = os.path.join(utils.get_data_dir(), "open_gop_variant", "moving_shape_open_gop_h265.mp4")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please include the required .mp4 file for this test.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done, thx.

Signed-off-by: pinjie <pinjiex@nvidia.com>
@RmSchaffert
Copy link
Copy Markdown
Collaborator

Thanks!

@RmSchaffert
Copy link
Copy Markdown
Collaborator

/build

1 similar comment
@xupinjie
Copy link
Copy Markdown
Collaborator Author

/build

@RmSchaffert RmSchaffert merged commit 21d8353 into NVIDIA:main May 26, 2026
1 check 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.

2 participants