OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 float kneeCurve(float x, float k); | 103 float kneeCurve(float x, float k); |
104 float saturate(float x, float k); | 104 float saturate(float x, float k); |
105 float slopeAt(float x, float k); | 105 float slopeAt(float x, float k); |
106 float kAtSlope(float desiredSlope); | 106 float kAtSlope(float desiredSlope); |
107 | 107 |
108 float updateStaticCurveParameters(float dbThreshold, | 108 float updateStaticCurveParameters(float dbThreshold, |
109 float dbKnee, | 109 float dbKnee, |
110 float ratio); | 110 float ratio); |
111 | 111 |
112 // Amount of input change in dB required for 1 dB of output change. | 112 // Amount of input change in dB required for 1 dB of output change. |
113 // This applies to the portion of the curve above m_kneeThresholdDb (see below ). | 113 // This applies to the portion of the curve above m_kneeThresholdDb (see |
114 // below). | |
114 float m_ratio; | 115 float m_ratio; |
115 float m_slope; // Inverse ratio. | 116 float m_slope; // Inverse ratio. |
116 | 117 |
117 // The input to output change below the threshold is linear 1:1. | 118 // The input to output change below the threshold is linear 1:1. |
118 float m_linearThreshold; | 119 float m_linearThreshold; |
119 float m_dbThreshold; | 120 float m_dbThreshold; |
120 | 121 |
121 // m_dbKnee is the number of dB above the threshold before we enter the "ratio " portion of the curve. | 122 // m_dbKnee is the number of dB above the threshold before we enter the |
123 // "ratio" portion of the curve. | |
122 // m_kneeThresholdDb = m_dbThreshold + m_dbKnee | 124 // m_kneeThresholdDb = m_dbThreshold + m_dbKnee |
123 // The portion between m_dbThreshold and m_kneeThresholdDb is the "soft knee" portion of the curve | 125 // The portion between m_dbThreshold and m_kneeThresholdDb is the "soft knee" |
126 // portion of the curve | |
dcheng
2016/10/03 01:21:04
Nit: merge
Nico
2016/10/03 02:15:24
Done.
| |
124 // which transitions smoothly from the linear portion to the ratio portion. | 127 // which transitions smoothly from the linear portion to the ratio portion. |
125 float m_dbKnee; | 128 float m_dbKnee; |
126 float m_kneeThreshold; | 129 float m_kneeThreshold; |
127 float m_kneeThresholdDb; | 130 float m_kneeThresholdDb; |
128 float m_ykneeThresholdDb; | 131 float m_ykneeThresholdDb; |
129 | 132 |
130 // Internal parameter for the knee portion of the curve. | 133 // Internal parameter for the knee portion of the curve. |
131 float m_knee; | 134 float m_knee; |
132 }; | 135 }; |
133 | 136 |
134 } // namespace blink | 137 } // namespace blink |
135 | 138 |
136 #endif // DynamicsCompressorKernel_h | 139 #endif // DynamicsCompressorKernel_h |
OLD | NEW |