Add per-frame RC state slots and u64 total_bits fix (from PR #228) - #234
Merged
Conversation
…oftwareFoundation#228) Extract the rate-control-only changes from PR AcademySoftwareFoundation#228 (TMV multi-mip work): - Per-frame RC state: oapve_ctx gains rc_param_frm[OAPV_MAX_NUM_FRAMES]. At the start of each frame in an AU, ctx->rc_param is loaded from the frame-index slot and saved back after oapve_rc_update_after_pic, so alpha/beta adaptation stays per frame index (0 = primary, 1..N = non-primary) instead of drifting across frames of different resolutions/characteristics within a multi-frame AU. - oapve_rc_update_after_pic: total_bits becomes u64. A 16k 10-bit 4:2:2 frame at high quality can exceed INT_MAX bits, which wrapped negative and turned the subsequent log() into NaN, corrupting alpha/beta. Single-frame-per-AU encoding is behaviorally unchanged (slot 0 mirrors the previous single rc_param). ctest 16/16 pass. Signed-off-by: Minsoo Park <mss.park@samsung.com>
lordnn
reviewed
Aug 5, 2026
Signed-off-by: Minsoo Park <mss.park@samsung.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract the rate-control-only changes from PR #228 (TMV multi-mip work)