{"action":"created","issue":{"url":"https://api.github.com/repos/FluidSynth/fluidsynth/issues/373","repository_url":"https://api.github.com/repos/FluidSynth/fluidsynth","labels_url":"https://api.github.com/repos/FluidSynth/fluidsynth/issues/373/labels{/name}","comments_url":"https://api.github.com/repos/FluidSynth/fluidsynth/issues/373/comments","events_url":"https://api.github.com/repos/FluidSynth/fluidsynth/issues/373/events","html_url":"https://github.com/FluidSynth/fluidsynth/issues/373","id":320009339,"number":373,"title":"24 bit support enhancement to support fast 24/16 bits interpolation","user":{"login":"jjceresa","id":32781294,"avatar_url":"https://avatars3.githubusercontent.com/u/32781294?v=4","gravatar_id":"","url":"https://api.github.com/users/jjceresa","html_url":"https://github.com/jjceresa","followers_url":"https://api.github.com/users/jjceresa/followers","following_url":"https://api.github.com/users/jjceresa/following{/other_user}","gists_url":"https://api.github.com/users/jjceresa/gists{/gist_id}","starred_url":"https://api.github.com/users/jjceresa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjceresa/subscriptions","organizations_url":"https://api.github.com/users/jjceresa/orgs","repos_url":"https://api.github.com/users/jjceresa/repos","events_url":"https://api.github.com/users/jjceresa/events{/privacy}","received_events_url":"https://api.github.com/users/jjceresa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-03T17:20:48Z","updated_at":"2018-05-03T20:03:19Z","closed_at":null,"author_association":"COLLABORATOR","body":"Since 24 bits support, Fluidsynth accepts now 16 or 24 bits soundfonts. \r\nTo be independent of sample format  and for memory consumption reason , the internal interpolator uses numbers on 24 bits  regardless of the initial soundfont sample format (16 or 24b) (in fluid_rvoice_get_sample()). However compared to \"`without 24 bits support`\"  ` fluid_rvoice_get_sample()` introduces a `cpu load augmentation` of 30% this lead to `lost of number of maximum voices` of 24%. (measured on Windows XP and linux Debian (MinSize release) ). \r\n\r\nIt is this simple instruction that introduces mainly this cpu load augmentation (used with FLUID_INTERP_DEFAULT interpolation method):\r\nhttps://github.com/FluidSynth/fluidsynth/blob/05c2d57e65f3fdc264c53fcaa4947cda2eb508a8/src/rvoice/fluid_rvoice.h#L216\r\n\r\nWithout the check of `dsp_lsb` pointer, the `cpu load augmentation` is only 2.07% (in others word the `lost of maximun numbers of voices` is only 2.03%) introduced by the necessary following instruction:\r\nhttps://github.com/FluidSynth/fluidsynth/blob/05c2d57e65f3fdc264c53fcaa4947cda2eb508a8/src/rvoice/fluid_rvoice.h#L218\r\n\r\nFor no fast embedded cpu with no math co-processor this lost of 22% is not negligible and could be solved \"relatively\" easily.\r\n\r\n@derselbst , @mawe42 Could you please confirm this  ?. This is easy to do as the `dsp_lsb` pointer, check  instruction can be safely temporarily commented when using a 16 bits soundfont.\r\n\r\nNext i will continue for a proposal to solve this.\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/FluidSynth/fluidsynth/issues/comments/386418934","html_url":"https://github.com/FluidSynth/fluidsynth/issues/373#issuecomment-386418934","issue_url":"https://api.github.com/repos/FluidSynth/fluidsynth/issues/373","id":386418934,"user":{"login":"mawe42","id":812001,"avatar_url":"https://avatars1.githubusercontent.com/u/812001?v=4","gravatar_id":"","url":"https://api.github.com/users/mawe42","html_url":"https://github.com/mawe42","followers_url":"https://api.github.com/users/mawe42/followers","following_url":"https://api.github.com/users/mawe42/following{/other_user}","gists_url":"https://api.github.com/users/mawe42/gists{/gist_id}","starred_url":"https://api.github.com/users/mawe42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mawe42/subscriptions","organizations_url":"https://api.github.com/users/mawe42/orgs","repos_url":"https://api.github.com/users/mawe42/repos","events_url":"https://api.github.com/users/mawe42/events{/privacy}","received_events_url":"https://api.github.com/users/mawe42/received_events","type":"User","site_admin":false},"created_at":"2018-05-03T20:03:19Z","updated_at":"2018-05-03T20:03:19Z","author_association":"MEMBER","body":"Some more tests on my embedded machine: ~162 voices with current master, ~171 voices with the modified ```fluid_rvoice_get_sample```. So around 5% performance gain. Profiling done on ARM Coretex-A7, 960MHz, without reverb and chorus, 64 byte buffer size, 2 buffers. Fluidsynth compiled with \"Release\" build, but custom build flags ```-O3 -ffast-math```."}}
{"actor":{"display_login":"mawe42"}}