Changeset 267444 in webkit
- Timestamp:
- Sep 22, 2020, 3:54:43 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/webaudio/BiquadFilter/tail-time-highpass-expected.txt (modified) (1 diff)
-
LayoutTests/webaudio/BiquadFilter/tail-time-lowpass-expected.txt (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/audio/Biquad.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r267443 r267444 1 2020-09-22 Chris Dumez <cdumez@apple.com> 2 3 Fix BiquadFilterNode's lowpass & highpass filters 4 https://bugs.webkit.org/show_bug.cgi?id=216852 5 6 Reviewed by Eric Carlson. 7 8 Rebaseline tests that are now passing. 9 10 * webaudio/BiquadFilter/tail-time-highpass-expected.txt: 11 * webaudio/BiquadFilter/tail-time-lowpass-expected.txt: 12 1 13 2020-09-22 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/webaudio/BiquadFilter/tail-time-highpass-expected.txt
r267307 r267444 28 28 PASS < [hpf-complex-roots] All assertions passed. (total 19 assertions) 29 29 PASS > [hpf-real-distinct-roots] real distinct roots 30 FAIL X HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): Actual Tail Frame 236 is not greater than or equal to 408. Got 236. assert_true: expected true got false 30 PASS HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): Actual Tail Frame 2560 is greater than or equal to 408. 31 31 PASS HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): output[0:127] is not constantly 0 (contains 128 different values). 32 PASS HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): output[128:255] is not constantly 0 (contains 1 07different values).33 FAIL X HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): output[256:383] should have contain at least one value different from 0. assert_true: expected true got false 34 FAIL X HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): output[384:511] should have contain at least one value different from 0. assert_true: expected true got false 32 PASS HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): output[128:255] is not constantly 0 (contains 128 different values). 33 PASS HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): output[256:383] is not constantly 0 (contains 128 different values). 34 PASS HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): output[384:511] is not constantly 0 (contains 128 different values). 35 35 PASS HPF real distinct roots: Biquad({"type":"highpass","Q":-50,"frequency":2048}): output[768:] equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}. 36 FAIL < [hpf-real-distinct-roots] 3 out of 6 assertions were failed. assert_true: expected true got false 36 PASS < [hpf-real-distinct-roots] All assertions passed. (total 6 assertions) 37 37 PASS > [hpf-repeated-root] repeated real root 38 PASS HPF repeated roots (approximately): Biquad({"type":"highpass","Q":-6.020599913279624,"frequency":4096}): Actual Tail Frame 1 60is greater than or equal to 3.39 PASS HPF repeated roots (approximately): Biquad({"type":"highpass","Q":-6.020599913279624,"frequency":4096}): output[0:127] is not constantly 0 (contains 1 28different values).38 PASS HPF repeated roots (approximately): Biquad({"type":"highpass","Q":-6.020599913279624,"frequency":4096}): Actual Tail Frame 11 is greater than or equal to 3. 39 PASS HPF repeated roots (approximately): Biquad({"type":"highpass","Q":-6.020599913279624,"frequency":4096}): output[0:127] is not constantly 0 (contains 11 different values). 40 40 PASS HPF repeated roots (approximately): Biquad({"type":"highpass","Q":-6.020599913279624,"frequency":4096}): output[384:] equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. 41 41 PASS < [hpf-repeated-root] All assertions passed. (total 3 assertions) 42 42 PASS > [hpf-real-roots-2] complex roots 43 PASS HPF repeated roots 2: Biquad({"type":"highpass","Q":-100,"frequency":4096}): Actual Tail Frame 160is greater than or equal to 0.43 PASS HPF repeated roots 2: Biquad({"type":"highpass","Q":-100,"frequency":4096}): Actual Tail Frame 256 is greater than or equal to 0. 44 44 PASS HPF repeated roots 2: Biquad({"type":"highpass","Q":-100,"frequency":4096}): output[0:127] is not constantly 0 (contains 128 different values). 45 45 PASS HPF repeated roots 2: Biquad({"type":"highpass","Q":-100,"frequency":4096}): output[384:] equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. 46 46 PASS < [hpf-real-roots-2] All assertions passed. (total 3 assertions) 47 FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 4 tasks were failed. assert_true: expected true got false 47 PASS # AUDIT TASK RUNNER FINISHED: 4 tasks ran successfully. 48 48 -
trunk/LayoutTests/webaudio/BiquadFilter/tail-time-lowpass-expected.txt
r267307 r267444 30 30 PASS < [lpf-complex-roots] All assertions passed. (total 19 assertions) 31 31 PASS > [lpf-real-distinct-roots] real distinct roots 32 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): Actual Tail Frame 236 is not greater than or equal to 1700. Got 236. assert_true: expected true got false 32 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): Actual Tail Frame 1920 is greater than or equal to 1700. 33 33 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[0:127] is not constantly 0 (contains 128 different values). 34 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[128:255] is not constantly 0 (contains 1 06different values).35 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[256:383] should have contain at least one value different from 0. assert_true: expected true got false 36 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[384:511] should have contain at least one value different from 0. assert_true: expected true got false 37 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[512:639] should have contain at least one value different from 0. assert_true: expected true got false 38 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[640:767] should have contain at least one value different from 0. assert_true: expected true got false 39 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[768:895] should have contain at least one value different from 0. assert_true: expected true got false 40 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[896:1023] should have contain at least one value different from 0. assert_true: expected true got false 41 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1024:1151] should have contain at least one value different from 0. assert_true: expected true got false 42 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1152:1279] should have contain at least one value different from 0. assert_true: expected true got false 43 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1280:1407] should have contain at least one value different from 0. assert_true: expected true got false 44 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1408:1535] should have contain at least one value different from 0. assert_true: expected true got false 45 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1536:1663] should have contain at least one value different from 0. assert_true: expected true got false 46 FAIL X LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1664:1791] should have contain at least one value different from 0. assert_true: expected true got false 34 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[128:255] is not constantly 0 (contains 128 different values). 35 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[256:383] is not constantly 0 (contains 128 different values). 36 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[384:511] is not constantly 0 (contains 128 different values). 37 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[512:639] is not constantly 0 (contains 128 different values). 38 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[640:767] is not constantly 0 (contains 128 different values). 39 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[768:895] is not constantly 0 (contains 128 different values). 40 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[896:1023] is not constantly 0 (contains 128 different values). 41 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1024:1151] is not constantly 0 (contains 128 different values). 42 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1152:1279] is not constantly 0 (contains 128 different values). 43 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1280:1407] is not constantly 0 (contains 128 different values). 44 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1408:1535] is not constantly 0 (contains 128 different values). 45 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1536:1663] is not constantly 0 (contains 128 different values). 46 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[1664:1791] is not constantly 0 (contains 128 different values). 47 47 PASS LPF real distinct roots: Biquad({"type":"lowpass","Q":-50,"frequency":2048}): output[2048:] equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. 48 FAIL < [lpf-real-distinct-roots] 13 out of 16 assertions were failed. assert_true: expected true got false 48 PASS < [lpf-real-distinct-roots] All assertions passed. (total 16 assertions) 49 49 PASS > [lpf-repeated-root] repeated real root 50 PASS LPF repeated roots (approximately): Biquad({"type":"lowpass","Q":-6.020599913279624,"frequency":4096}): Actual Tail Frame 1 60is greater than or equal to 3.51 PASS LPF repeated roots (approximately): Biquad({"type":"lowpass","Q":-6.020599913279624,"frequency":4096}): output[0:127] is not constantly 0 (contains 1 28different values).50 PASS LPF repeated roots (approximately): Biquad({"type":"lowpass","Q":-6.020599913279624,"frequency":4096}): Actual Tail Frame 11 is greater than or equal to 3. 51 PASS LPF repeated roots (approximately): Biquad({"type":"lowpass","Q":-6.020599913279624,"frequency":4096}): output[0:127] is not constantly 0 (contains 11 different values). 52 52 PASS LPF repeated roots (approximately): Biquad({"type":"lowpass","Q":-6.020599913279624,"frequency":4096}): output[384:] equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. 53 53 PASS < [lpf-repeated-root] All assertions passed. (total 3 assertions) 54 54 PASS > [lpf-real-roots-2] complex roots 55 PASS LPF repeated roots 2: Biquad({"type":"lowpass","Q":-100,"frequency":4096}): Actual Tail Frame 160is greater than or equal to 0.55 PASS LPF repeated roots 2: Biquad({"type":"lowpass","Q":-100,"frequency":4096}): Actual Tail Frame 256 is greater than or equal to 0. 56 56 PASS LPF repeated roots 2: Biquad({"type":"lowpass","Q":-100,"frequency":4096}): output[0:127] is not constantly 0 (contains 128 different values). 57 57 PASS LPF repeated roots 2: Biquad({"type":"lowpass","Q":-100,"frequency":4096}): output[384:] equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. … … 775 775 PASS LPF repeated roots (approximately): Biquad({"type":"lowpass","Q":500,"frequency":100}): output[1024:] equals [] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. 776 776 PASS < [ginormous tail] All assertions passed. (total 8 assertions) 777 FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 6 tasks were failed. assert_true: expected true got false 777 PASS # AUDIT TASK RUNNER FINISHED: 6 tasks ran successfully. 778 778 -
trunk/Source/WebCore/ChangeLog
r267443 r267444 1 2020-09-22 Chris Dumez <cdumez@apple.com> 2 3 Fix BiquadFilterNode's lowpass & highpass filters 4 https://bugs.webkit.org/show_bug.cgi?id=216852 5 6 Reviewed by Eric Carlson. 7 8 Fix BiquadFilterNode's lowpass & highpass filters. They incorrectly clamp the 9 resonance to make it positive. 10 11 Formulas for the filters are specified here: 12 - https://www.w3.org/TR/webaudio/#filters-characteristics 13 14 No new tests, rebaselined existing tests. 15 16 * platform/audio/Biquad.cpp: 17 (WebCore::pow10): 18 (WebCore::Biquad::setLowpassParams): 19 (WebCore::Biquad::setHighpassParams): 20 1 21 2020-09-22 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebCore/platform/audio/Biquad.cpp
r266541 r267444 272 272 } else if (cutoff > 0) { 273 273 // Compute biquad coefficients for lowpass filter 274 resonance = std::max(0.0, resonance); // can't go negative275 274 resonance = pow(10.0, 0.05 * resonance); 276 275 … … 306 305 } else if (cutoff > 0) { 307 306 // Compute biquad coefficients for highpass filter 308 resonance = std::max(0.0, resonance); // can't go negative309 307 resonance = pow(10.0, 0.05 * resonance); 310 308
Note:
See TracChangeset
for help on using the changeset viewer.