Use backticks not vertical bars to denote variables in comments for /modules/audio_coding
Bug: webrtc:12338 Change-Id: I02613d9fca45d00e2477f334b7a0416e7912e26b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227037 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34621}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
0146a34b3f
commit
d00ce747c7
@ -51,8 +51,8 @@ class DspHelper {
|
||||
static const int kUnmuteFactorIncrement48kHz = 1057;
|
||||
|
||||
// Multiplies the signal with a gradually changing factor.
|
||||
// The first sample is multiplied with |factor| (in Q14). For each sample,
|
||||
// |factor| is increased (additive) by the |increment| (in Q20), which can
|
||||
// The first sample is multiplied with `factor` (in Q14). For each sample,
|
||||
// `factor` is increased (additive) by the `increment` (in Q20), which can
|
||||
// be negative. Returns the scale factor after the last increment.
|
||||
static int RampSignal(const int16_t* input,
|
||||
size_t length,
|
||||
@ -60,14 +60,14 @@ class DspHelper {
|
||||
int increment,
|
||||
int16_t* output);
|
||||
|
||||
// Same as above, but with the samples of |signal| being modified in-place.
|
||||
// Same as above, but with the samples of `signal` being modified in-place.
|
||||
static int RampSignal(int16_t* signal,
|
||||
size_t length,
|
||||
int factor,
|
||||
int increment);
|
||||
|
||||
// Same as above, but processes |length| samples from |signal|, starting at
|
||||
// |start_index|.
|
||||
// Same as above, but processes `length` samples from `signal`, starting at
|
||||
// `start_index`.
|
||||
static int RampSignal(AudioVector* signal,
|
||||
size_t start_index,
|
||||
size_t length,
|
||||
@ -81,10 +81,10 @@ class DspHelper {
|
||||
int factor,
|
||||
int increment);
|
||||
|
||||
// Peak detection with parabolic fit. Looks for |num_peaks| maxima in |data|,
|
||||
// having length |data_length| and sample rate multiplier |fs_mult|. The peak
|
||||
// locations and values are written to the arrays |peak_index| and
|
||||
// |peak_value|, respectively. Both arrays must hold at least |num_peaks|
|
||||
// Peak detection with parabolic fit. Looks for `num_peaks` maxima in `data`,
|
||||
// having length `data_length` and sample rate multiplier `fs_mult`. The peak
|
||||
// locations and values are written to the arrays `peak_index` and
|
||||
// `peak_value`, respectively. Both arrays must hold at least `num_peaks`
|
||||
// elements.
|
||||
static void PeakDetection(int16_t* data,
|
||||
size_t data_length,
|
||||
@ -94,30 +94,30 @@ class DspHelper {
|
||||
int16_t* peak_value);
|
||||
|
||||
// Estimates the height and location of a maximum. The three values in the
|
||||
// array |signal_points| are used as basis for a parabolic fit, which is then
|
||||
// used to find the maximum in an interpolated signal. The |signal_points| are
|
||||
// array `signal_points` are used as basis for a parabolic fit, which is then
|
||||
// used to find the maximum in an interpolated signal. The `signal_points` are
|
||||
// assumed to be from a 4 kHz signal, while the maximum, written to
|
||||
// |peak_index| and |peak_value| is given in the full sample rate, as
|
||||
// indicated by the sample rate multiplier |fs_mult|.
|
||||
// `peak_index` and `peak_value` is given in the full sample rate, as
|
||||
// indicated by the sample rate multiplier `fs_mult`.
|
||||
static void ParabolicFit(int16_t* signal_points,
|
||||
int fs_mult,
|
||||
size_t* peak_index,
|
||||
int16_t* peak_value);
|
||||
|
||||
// Calculates the sum-abs-diff for |signal| when compared to a displaced
|
||||
// Calculates the sum-abs-diff for `signal` when compared to a displaced
|
||||
// version of itself. Returns the displacement lag that results in the minimum
|
||||
// distortion. The resulting distortion is written to |distortion_value|.
|
||||
// The values of |min_lag| and |max_lag| are boundaries for the search.
|
||||
// distortion. The resulting distortion is written to `distortion_value`.
|
||||
// The values of `min_lag` and `max_lag` are boundaries for the search.
|
||||
static size_t MinDistortion(const int16_t* signal,
|
||||
size_t min_lag,
|
||||
size_t max_lag,
|
||||
size_t length,
|
||||
int32_t* distortion_value);
|
||||
|
||||
// Mixes |length| samples from |input1| and |input2| together and writes the
|
||||
// result to |output|. The gain for |input1| starts at |mix_factor| (Q14) and
|
||||
// is decreased by |factor_decrement| (Q14) for each sample. The gain for
|
||||
// |input2| is the complement 16384 - mix_factor.
|
||||
// Mixes `length` samples from `input1` and `input2` together and writes the
|
||||
// result to `output`. The gain for `input1` starts at `mix_factor` (Q14) and
|
||||
// is decreased by `factor_decrement` (Q14) for each sample. The gain for
|
||||
// `input2` is the complement 16384 - mix_factor.
|
||||
static void CrossFade(const int16_t* input1,
|
||||
const int16_t* input2,
|
||||
size_t length,
|
||||
@ -125,24 +125,24 @@ class DspHelper {
|
||||
int16_t factor_decrement,
|
||||
int16_t* output);
|
||||
|
||||
// Scales |input| with an increasing gain. Applies |factor| (Q14) to the first
|
||||
// sample and increases the gain by |increment| (Q20) for each sample. The
|
||||
// result is written to |output|. |length| samples are processed.
|
||||
// Scales `input` with an increasing gain. Applies `factor` (Q14) to the first
|
||||
// sample and increases the gain by `increment` (Q20) for each sample. The
|
||||
// result is written to `output`. `length` samples are processed.
|
||||
static void UnmuteSignal(const int16_t* input,
|
||||
size_t length,
|
||||
int16_t* factor,
|
||||
int increment,
|
||||
int16_t* output);
|
||||
|
||||
// Starts at unity gain and gradually fades out |signal|. For each sample,
|
||||
// the gain is reduced by |mute_slope| (Q14). |length| samples are processed.
|
||||
// Starts at unity gain and gradually fades out `signal`. For each sample,
|
||||
// the gain is reduced by `mute_slope` (Q14). `length` samples are processed.
|
||||
static void MuteSignal(int16_t* signal, int mute_slope, size_t length);
|
||||
|
||||
// Downsamples |input| from |sample_rate_hz| to 4 kHz sample rate. The input
|
||||
// has |input_length| samples, and the method will write |output_length|
|
||||
// samples to |output|. Compensates for the phase delay of the downsampling
|
||||
// filters if |compensate_delay| is true. Returns -1 if the input is too short
|
||||
// to produce |output_length| samples, otherwise 0.
|
||||
// Downsamples `input` from `sample_rate_hz` to 4 kHz sample rate. The input
|
||||
// has `input_length` samples, and the method will write `output_length`
|
||||
// samples to `output`. Compensates for the phase delay of the downsampling
|
||||
// filters if `compensate_delay` is true. Returns -1 if the input is too short
|
||||
// to produce `output_length` samples, otherwise 0.
|
||||
static int DownsampleTo4kHz(const int16_t* input,
|
||||
size_t input_length,
|
||||
size_t output_length,
|
||||
|
||||
Reference in New Issue
Block a user