Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve keyframe stripping #458

Open
nfrechette opened this issue Mar 28, 2023 · 0 comments
Open

Improve keyframe stripping #458

nfrechette opened this issue Mar 28, 2023 · 0 comments

Comments

@nfrechette
Copy link
Owner

We currently retain the first/last keyframe of every segment, but this is overkill. We could retain first/last of clip, and allow last of segment to be stripped. When we decompress, if the second sample isn't found within the expected segment, we know it is the first sample of the next segment. We can extend this to allow stripping of the first keyframe in a segment as well. We simply need to scan our segments headers forward/backwards. This might be slightly slower during decompression but in practice the segment header metadata touched likely lives in the same cache line as the expected segments.

It is unclear if this would be a win. In practice, we would only really benefit if we can strip whole segments but that would only happen if a character is stationary for some time. This is more likely to happen in a cinematic but not in gameplay animations.

We have on average 16 samples per segment. If we freeze the first/last keyframe, we can only strip 87.5% of keyframes. Each keyframe contributes 6.25% to the footprint. If we can strip a whole segment, we can also strip its metadata which is considerable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant