Bug 62053 - Biquad filter coefficient naming is incorrect
Summary: Biquad filter coefficient naming is incorrect
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Rogers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-03 14:32 PDT by Chris Rogers
Modified: 2011-06-03 15:52 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.57 KB, patch)
2011-06-03 14:48 PDT, Chris Rogers
kbr: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rogers 2011-06-03 14:32:16 PDT
Biquad filter coefficient naming is incorrect
Comment 1 Chris Rogers 2011-06-03 14:46:24 PDT
This is just a simple variable naming change to reflect the commonly used naming convention for biquad filters:
http://en.wikipedia.org/wiki/Digital_biquad_filter

This is not a change in functionality, just in naming convention.  The current names have the 'a' and 'b' variable names reversed.  This patch changes the naming as follows:

m_a0 -> m_b0
m_a1 -> m_b1
m_b2 -> m_b2
m_b1 -> m_a1
m_b2 -> m_a2

This minor naming change will help clarify filter coefficient calculation from cookbook filter formulas.

Why did I have the names reversed in the first place?  Because I was coding this from memory and got the names (if not the functionality) wrong.
Comment 2 Chris Rogers 2011-06-03 14:48:22 PDT
Created attachment 95967 [details]
Patch
Comment 3 Kenneth Russell 2011-06-03 15:23:28 PDT
Comment on attachment 95967 [details]
Patch

Looks fine.
Comment 4 Chris Rogers 2011-06-03 15:52:52 PDT
Committed r88072: <http://trac.webkit.org/changeset/88072>