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

Feature/jan/decoding performance #35

Merged
merged 3 commits into from
Sep 26, 2024
Merged

Conversation

Schnjan
Copy link
Collaborator

@Schnjan Schnjan commented Sep 26, 2024

  • Since encoded blocks usually contain a lot of empty values, we now utilize this information to skip large parts of the decoding calculation
  • The discrete cosine transform now stores the results in a way so we only need one loop to iterate
  • The block metadata is now loaded from the data array using spans instead of a binary reader
  • There's a new shortcut to extract single slices

@Schnjan Schnjan force-pushed the feature/Jan/DecodingPerformance branch from 63f1037 to 287a0bc Compare September 26, 2024 08:27
#if DEBUG
}

ArrayPool<double>.Shared.Return( buffers.Item1 );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might also create a data structure holding these 3 buffers - the code would be easier readable and you can move the Rent/Return logic into a method of that structure.

@Schnjan Schnjan merged commit 6b91beb into develop Sep 26, 2024
1 check passed
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