Reindex all level cel blocks#7863
Merged
AJenbo merged 1 commit intodiasurgical:masterfrom Mar 19, 2025
Merged
Conversation
AJenbo
approved these changes
Mar 19, 2025
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.
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 inDPieceMicrosthat 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 inDPieceMicrosto 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.