Summary: | sound: OSS have no AFMT_FLOAT support | ||
---|---|---|---|
Product: | Base System | Reporter: | Ivan Rozhuk <rozhuk.im> |
Component: | kern | Assignee: | Christos Margiolis <christos> |
Status: | Open --- | ||
Severity: | Affects Some People | CC: | agh, bsdcode, christos, emaste, markj, rozhuk.im, sascha.folie |
Priority: | --- | ||
Version: | Unspecified | ||
Hardware: | Any | ||
OS: | Any | ||
See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=157050 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264973 |
||
Bug Depends on: | |||
Bug Blocks: | 280612 |
Description
Ivan Rozhuk
2024-09-09 12:38:33 UTC
^Triage: I don't see a proposed solution yet, so "In Progress" may be premature. (In reply to Mark Linimon from comment #1) I am working on it. Thanks! Probably you can avoid fpu_kern_**() staff. https://stackoverflow.com/questions/10212892/how-to-avoid-fpu-when-given-float-numbers https://www.jhauser.us/arithmetic/SoftFloat.html https://stackoverflow.com/questions/78619/what-is-the-fastest-way-to-convert-float-to-int-on-x86 https://stackoverflow.com/questions/68258170/fastest-way-to-convert-a-float-to-int-in-c https://medium.com/@ryan_forrester_/c-float-to-int-conversion-how-to-guide-aea5be6d3d4b (In reply to Ivan Rozhuk from comment #4) Note that we need not plain float->int but rather (float*constant)->int; this could be done with integer instructions but either way this should be something we look at after profiling if the overhead of fpu_kern_enter/_leave is excessive. (In reply to Ed Maste from comment #6) (float*constant)->int -> float->(int*constant) ? :) As described in http://0x80.pl/articles/convert-float-to-integer.html float to int conversion should be not so expensive as fpu_kern_**() staff. Also their code simple and under BSD2 license. |