{"action":"created","issue":{"url":"https://api.github.com/repos/kfrlib/kfr/issues/10","repository_url":"https://api.github.com/repos/kfrlib/kfr","labels_url":"https://api.github.com/repos/kfrlib/kfr/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/kfrlib/kfr/issues/10/comments","events_url":"https://api.github.com/repos/kfrlib/kfr/issues/10/events","html_url":"https://github.com/kfrlib/kfr/issues/10","id":193366400,"number":10,"title":"Overflow for small input lengths in zero latency biqaud","user":{"login":"codingkeith","id":5716612,"avatar_url":"https://avatars.githubusercontent.com/u/5716612?v=3","gravatar_id":"","url":"https://api.github.com/users/codingkeith","html_url":"https://github.com/codingkeith","followers_url":"https://api.github.com/users/codingkeith/followers","following_url":"https://api.github.com/users/codingkeith/following{/other_user}","gists_url":"https://api.github.com/users/codingkeith/gists{/gist_id}","starred_url":"https://api.github.com/users/codingkeith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codingkeith/subscriptions","organizations_url":"https://api.github.com/users/codingkeith/orgs","repos_url":"https://api.github.com/users/codingkeith/repos","events_url":"https://api.github.com/users/codingkeith/events{/privacy}","received_events_url":"https://api.github.com/users/codingkeith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-04T18:29:52Z","updated_at":"2016-12-05T22:09:15Z","closed_at":null,"body":"In the zero latency biquad expression the begin_block may overflow if the input source is less than the number of `filters - 1`:\r\n\r\nThis line: https://github.com/kfrlib/kfr/blob/master/include/kfr/dsp/biquad.hpp#L178\r\n\r\nThis code block assumes the input source will be greater than of equal to `filters - 1` in length:\r\n```\r\n    CMT_INLINE void begin_block(cinput_t cinput, size_t size) const\r\n    {\r\n        block_end = size;\r\n        for (size_t i = 0; i < filters - 1; i++)\r\n        {\r\n            const vec<T, 1> in = this->argument_first(cinput, i, vec_t<T, 1>());\r\n            state.out = process(bq, state, insertleft(in[0], state.out));\r\n        }\r\n    }\r\n```\r\n\r\nFor real time audio applications this isn't going to be a good assumption for large numbers of filters.\r\n"},"comment":{"url":"https://api.github.com/repos/kfrlib/kfr/issues/comments/264993819","html_url":"https://github.com/kfrlib/kfr/issues/10#issuecomment-264993819","issue_url":"https://api.github.com/repos/kfrlib/kfr/issues/10","id":264993819,"user":{"login":"dlevin256","id":20210737,"avatar_url":"https://avatars.githubusercontent.com/u/20210737?v=3","gravatar_id":"","url":"https://api.github.com/users/dlevin256","html_url":"https://github.com/dlevin256","followers_url":"https://api.github.com/users/dlevin256/followers","following_url":"https://api.github.com/users/dlevin256/following{/other_user}","gists_url":"https://api.github.com/users/dlevin256/gists{/gist_id}","starred_url":"https://api.github.com/users/dlevin256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlevin256/subscriptions","organizations_url":"https://api.github.com/users/dlevin256/orgs","repos_url":"https://api.github.com/users/dlevin256/repos","events_url":"https://api.github.com/users/dlevin256/events{/privacy}","received_events_url":"https://api.github.com/users/dlevin256/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T22:09:15Z","updated_at":"2016-12-05T22:09:15Z","body":"Thank you for the catch. I will add the fix soon."}}
{"actor":{"display_login":"dlevin256"}}