Fix MVC per-view DPB management: add same_views mask#24
Open
intrepidsilence wants to merge 1 commit intotvlabs:masterfrom
Open
Fix MVC per-view DPB management: add same_views mask#24intrepidsilence wants to merge 1 commit intotvlabs:masterfrom
intrepidsilence wants to merge 1 commit intotvlabs:masterfrom
Conversation
In MVC streams, the DPB fullness check (line 1225) and reorder threshold check (line 1231) count pending frames from both views against per-view SPS limits (max_dec_frame_buffering and max_num_reorder_frames). This causes two problems: 1. DPB fullness (line 1225): With both views contributing ~8 frames against a per-view limit of 4, the while loop bumps too many frames, driving max_bump negative. The max_bump < 0 path (line 1228) then directly inserts frames into the FIFO output queue, bypassing bump_frame()'s POC-ordered output. This corrupts the base view's display order. 2. Reorder threshold (line 1231): Counting both views' pending frames triggers premature bumping of frames from the current view's output queue. Since edge264_get_frame() pairs base and dependent views by FIFO queue position, this desynchronizes the two queues, causing the dependent view to be paired with the wrong temporal frame. Fix both by masking with same_views before counting, so each view's frames are checked independently against its own limits. The same_views bitmask is already computed earlier in the function. Symptoms: base view frame stutter (bug 1) and dependent view +/-1 frame temporal oscillation in a periodic pattern matching the GOP substructure (bug 2). Verified on commercial 3D Blu-ray MVC streams with max_num_reorder_frames=4.
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.
Summary
Two DPB management checks in
edge264_headers.ccount pending frames from both MVC views against per-view SPS limits. This causes incorrect frame bumping and output ordering in MVC streams.The Two Bugs (Same Root Cause)
1. DPB fullness check (line ~1225)
With both views contributing ~8 frames against a per-view limit of 4, the loop bumps too many frames, driving
max_bumpnegative. Themax_bump < 0path then directly inserts frames into the FIFO output queue, bypassingbump_frame()'s POC-ordered output. This corrupts the base view's display order.2. Reorder threshold check (line ~1231)
Counting both views' pending frames triggers premature bumping from the current view's queue. Since
edge264_get_frame()pairs base and dependent views by FIFO queue position, this desynchronizes the two queues, pairing frames from different temporal moments.Symptoms
Quantitative analysis of a commercial MVC stream showed ~63% of dependent view frames were temporally displaced by ±1 frame (±42ms at 24fps).
Verification
max_num_reorder_frames=4)Note
The
same_viewsbitmask is already used correctly in themax_bumpcalculation at line 1222 and inbump_frame()itself. These two lines were the only places missing it.