Skip to content

H264 dpb management fix#197

Merged
zlatinski merged 4 commits intonvpro-samples:mainfrom
krajunv:h264-dpb-management-fix
Jan 29, 2026
Merged

H264 dpb management fix#197
zlatinski merged 4 commits intonvpro-samples:mainfrom
krajunv:h264-dpb-management-fix

Conversation

@krajunv
Copy link
Contributor

@krajunv krajunv commented Jan 29, 2026

Fix a corner case in DPB management logic.

Additional details and rationale are documented directly in the code comments.

- Use DPB_EMPTY enum instead of hardcoded 0 when assigning dpb state
- Remove redundant and self explanatory comments related to dpb state assignments
- Remove comments related to MVC encoding
…om_needed_for_output`.

Both flags are set to 0 (marking the picture as "not needed for output") immediately before
the condition is evaluated.  Because of this, checking whether the picture is "not needed for output"
provides no meaningful value and can be removed.
…ictureEnd()`.

Assigning the last DPB slot to the current picture when `DpbPictureEnd()` fails
to provide one is incorrect. The last slot may still hold a valid picture that is
either needed for reference or needed for output. If no slot is available for the
current picture, it indicates a DPB management error.
Additional details and rationale are documented directly in the code comments.
@krajunv
Copy link
Contributor Author

krajunv commented Jan 29, 2026

@zlatinski @srinathkr-nv for review.

Copy link
Contributor

@zlatinski zlatinski left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for the fixes, Raju!

@zlatinski zlatinski merged commit e021d1f into nvpro-samples:main Jan 29, 2026
4 of 5 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.

2 participants