Bug 62053

Summary: Biquad filter coefficient naming is incorrect
Product: WebKit Reporter: Chris Rogers <crogers>
Component: Web AudioAssignee: Chris Rogers <crogers>
Status: RESOLVED FIXED    
Severity: Normal CC: crogers, kbr
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch kbr: review+

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>