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

Fixes for small colour variations in tests #24

Merged
merged 5 commits into from
Mar 26, 2014

Conversation

bthorben
Copy link
Contributor

  • Most uses of clampTo8Bit actually didn't want 8-bit integers, but just a clamp
    between 0 and 255. There are now two functions. quantizeAndInverse says in its
    comments that these integers are needed, so small colour variations in the
    tests for this cases are expected
  • The outputBuffer for quantizeAndInverse was changed back to Int32 to allow
    greater precision in the calculations
  • Small refactoring and preperations for things to come

Thorben Bochenek added 2 commits March 21, 2014 16:07
* Most uses of clampTo8Bit actually didn't want 8-bit integers, but just a clamp
  between 0 and 255. There are now two functions. quantizeAndInverse says in its
  comments that these integers are needed, so small colour variations in the
  tests for this cases are expected
* The outputBuffer for quantizeAndInverse was changed back to Int32 to allow
  greater precision in the calculations
@bthorben
Copy link
Contributor Author

This is work in progress, I would better wait and not merge right now

Thorben Bochenek added 2 commits March 25, 2014 17:06
…ut after

quantisation and inversion.

This will make getData() a bit more expensive when done repeatedly for different
sizes, but I would guess this is not a common usecase anyway.

Benchmarking on big images shows that this is 20% faster.
@bthorben
Copy link
Contributor Author

More performance improvements:
Use the same buffer for block data inside the components and the output after
quantisation and inversion.

This will make getData() a bit more expensive when done repeatedly for different
sizes, but I would guess this is not a common usecase anyway.

Benchmarking on big images shows that this is 20% faster.

yurydelendik pushed a commit to yurydelendik/pdf.js that referenced this pull request Mar 26, 2014
yurydelendik added a commit that referenced this pull request Mar 26, 2014
Fixes for small colour variations in tests
@yurydelendik yurydelendik merged commit 3482bd9 into notmasteryet:master Mar 26, 2014
@yurydelendik
Copy link
Collaborator

Thank you

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