Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Vorbis
Vorbis
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.Org
  • VorbisVorbis
  • Issues
  • #1547

Closed
Open
Created Jun 22, 2009 by Siarhei Siamashka@ssvb

vorbis_fpu_setround is broken

'vorbis_fpu_setround' from 'os.h' does something weird. At least it does not do anything useful. It would probably make sense to have "andw" instruction instead of "orw" (to force rounding to nearest), but considering that the code was in a broken state for ages and nobody cared, does it even have any sense to have this function at all?

There is also SSE2 code and it does not have vorbis_fpu_setround counterpart (that would be only a problem if it is really needed of course).

Additional information to consider is that FPU performs rounding to nearest, but ties to even (for example, 0.5 is rounded to 0). It means that code 'return (int)floor(f+.5)' from the generic path is not completely identical to x87/SSE2 optimized versions.

A testcase attached.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None