Code Monkey home page Code Monkey logo

Comments (4)

fluppeteer avatar fluppeteer commented on June 8, 2024

Ah, thanks. I'll seek clarification on hardware implementations for that, and see whether we can tighten the spec; hopefully we trivially can. I'm doing other clean-up triggered by the previous issues, and hope to have an update in the near future.

from dataformat.

lexaknyazev avatar lexaknyazev commented on June 8, 2024

Here's the proper interpolation formula (resulting numbers match MSDN and AMD implementations):

Integer version:

e0, e1 - unsigned integer endpoints [0 .. 255]
weight - unsigned integer interpolation factor (from table 12.1)

((64 - weight) * e0 + weight * e1 + 32) >> 6

returns unsigned integer interpolated value [0 .. 255]

Floating-point version (results should be exactly the same as above):

floor(ep0 * (1.0 - weight / 64.0) + ep1 * (weight / 64.0) + 0.5)

from dataformat.

fluppeteer avatar fluppeteer commented on June 8, 2024

Thank you! A fix for this is (and other related issues) is in flight, it's just in a tangled web of other minor tweaks. It should appear soon.

from dataformat.

fluppeteer avatar fluppeteer commented on June 8, 2024

So much for "soon", but it should now appear in 1.1.9 and 1.2.1. Thanks!

from dataformat.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.