Skip to content

Reindex all level cel blocks#7863

Merged
AJenbo merged 1 commit intodiasurgical:masterfrom
StephenCWills:cel-block-adjustments
Mar 19, 2025
Merged

Reindex all level cel blocks#7863
AJenbo merged 1 commit intodiasurgical:masterfrom
StephenCWills:cel-block-adjustments

Conversation

@StephenCWills
Copy link
Copy Markdown
Member

Follow-up to fix an issue with #7852

It occurred to me that frames may be referenced by multiple tiles, and therefore one pointer per frame is not going to be enough to reindex all the references to that frame in DPieceMicros. If the unreferenced frames precede a frame that is referenced more than once in the min file, there will still be at least one reference in DPieceMicros that wasn't properly reindexed.

I removed the pointer from DunFrameInfo. We can still compute the adjustment values based on the sorted vector of frames, but we need to scan all the active blocks in DPieceMicros to find the ones that need to be reindexed. To make it work, I generate a sparse vector of "frame index gaps" that can be used to find the adjustment value for a given frame index using a binary search. This also enables us to detect when there are no gaps at all, skipping the reindexing step in the most common case where every frame is used by at least one tile.

@AJenbo AJenbo merged commit 09f24ae into diasurgical:master Mar 19, 2025
23 checks passed
@StephenCWills StephenCWills deleted the cel-block-adjustments branch March 19, 2025 13:57
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