Skip to content

Comments

Fix MVC DPB slot aliasing between base and dependent views#23

Open
intrepidsilence wants to merge 1 commit intotvlabs:masterfrom
intrepidsilence:fix/mvc-dpb-aliasing
Open

Fix MVC DPB slot aliasing between base and dependent views#23
intrepidsilence wants to merge 1 commit intotvlabs:masterfrom
intrepidsilence:fix/mvc-dpb-aliasing

Conversation

@intrepidsilence
Copy link

Summary

When decoding MVC streams, the DPB slot allocator can assign the dependent view to the same slot as the base view (basePic). Since the dependent view references the base view's pixels for inter-view prediction, this overwrites the reference data and corrupts the dependent view's decoded output.

Fix

Add basePic to the unavailability bitmask when allocating a slot for a dependent view frame (line ~1137 of edge264_headers.c):

if (non_base_view && dec->basePic >= 0)
    unavail |= 1u << dec->basePic;

The check is placed after the existing while loop (not inside it) to avoid potential issues if basePic were the only nominally free slot.

Symptom

Bright rectangular artifact blocks (~8x6 macroblocks) appear at variable positions in the MVC dependent view output. The artifacts correspond to macroblocks where the dependent view reads from its own overwritten buffer instead of the base view's original pixels.

Verification

  • Tested on commercial 3D Blu-ray MVC streams (130,000+ frame pairs, High Profile, CABAC)
  • Before fix: max luma in artifact region = 213 (corrupt bright blocks)
  • After fix: max luma in same region = 89 (correct atmospheric gradient)
  • 85/85 JVT conformance streams continue to pass

When decoding MVC streams, the DPB slot allocator can assign the
dependent view to the same slot as the base view (basePic). Since the
dependent view references the base view's pixels for inter-view
prediction, this overwrites the reference data and corrupts the
dependent view's decoded output.

Add basePic to the unavailability bitmask when allocating a slot for a
dependent view frame. The check is placed after the existing while loop
(not inside it) to avoid potential issues if basePic were the only
nominally free slot.

Symptom: bright rectangular artifact blocks (~8x6 macroblocks) appear
at variable positions in the MVC dependent view output. Verified on
commercial 3D Blu-ray MVC streams.
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.

1 participant