Use backticks not vertical bars to denote variables in comments for /modules/audio_processing

Bug: webrtc:12338
Change-Id: I85bff694dd2ead83c939c4d1945eff82e1296001
No-Presubmit: True
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227161
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34690}
This commit is contained in:
Artem Titov
2021-07-28 20:50:03 +02:00
committed by WebRTC LUCI CQ
parent dc6801c618
commit 0b489303d2
102 changed files with 483 additions and 483 deletions

View File

@ -124,7 +124,7 @@ const int16_t WebRtcAecm_kSinTable[] = {
-1140, -998, -856, -713, -571, -428, -285, -142};
// Moves the pointer to the next entry and inserts |far_spectrum| and
// Moves the pointer to the next entry and inserts `far_spectrum` and
// corresponding Q-domain in its buffer.
//
// Inputs:
@ -574,7 +574,7 @@ int WebRtcAecm_ProcessFrame(AecmCore* aecm,
// Obtain an output frame.
WebRtc_ReadBuffer(aecm->outFrameBuf, (void**)&out_ptr, out, FRAME_LEN);
if (out_ptr != out) {
// ReadBuffer() hasn't copied to |out| in this case.
// ReadBuffer() hasn't copied to `out` in this case.
memcpy(out, out_ptr, FRAME_LEN * sizeof(int16_t));
}
@ -616,22 +616,22 @@ int16_t WebRtcAecm_AsymFilt(const int16_t filtOld,
// ExtractFractionPart(a, zeros)
//
// returns the fraction part of |a|, with |zeros| number of leading zeros, as an
// int16_t scaled to Q8. There is no sanity check of |a| in the sense that the
// returns the fraction part of `a`, with `zeros` number of leading zeros, as an
// int16_t scaled to Q8. There is no sanity check of `a` in the sense that the
// number of zeros match.
static int16_t ExtractFractionPart(uint32_t a, int zeros) {
return (int16_t)(((a << zeros) & 0x7FFFFFFF) >> 23);
}
// Calculates and returns the log of |energy| in Q8. The input |energy| is
// supposed to be in Q(|q_domain|).
// Calculates and returns the log of `energy` in Q8. The input `energy` is
// supposed to be in Q(`q_domain`).
static int16_t LogOfEnergyInQ8(uint32_t energy, int q_domain) {
static const int16_t kLogLowValue = PART_LEN_SHIFT << 7;
int16_t log_energy_q8 = kLogLowValue;
if (energy > 0) {
int zeros = WebRtcSpl_NormU32(energy);
int16_t frac = ExtractFractionPart(energy, zeros);
// log2 of |energy| in Q8.
// log2 of `energy` in Q8.
log_energy_q8 += ((31 - zeros) << 8) + frac - (q_domain << 8);
}
return log_energy_q8;

View File

@ -58,7 +58,7 @@ typedef struct {
void* delay_estimator;
uint16_t currentDelay;
// Far end history variables
// TODO(bjornv): Replace |far_history| with ring_buffer.
// TODO(bjornv): Replace `far_history` with ring_buffer.
uint16_t far_history[PART_LEN1 * MAX_DELAY];
int far_history_pos;
int far_q_domains[MAX_DELAY];
@ -271,7 +271,7 @@ void WebRtcAecm_FetchFarFrame(AecmCore* const aecm,
////////////////////////////////////////////////////////////////////////////////
// WebRtcAecm_UpdateFarHistory()
//
// Moves the pointer to the next entry and inserts |far_spectrum| and
// Moves the pointer to the next entry and inserts `far_spectrum` and
// corresponding Q-domain in its buffer.
//
// Inputs:

View File

@ -98,7 +98,7 @@ static void ComfortNoise(AecmCore* aecm,
// Track the minimum.
if (aecm->noiseEst[i] < (1 << minTrackShift)) {
// For small values, decrease noiseEst[i] every
// |kNoiseEstIncCount| block. The regular approach below can not
// `kNoiseEstIncCount` block. The regular approach below can not
// go further down due to truncation.
aecm->noiseEstTooHighCtr[i]++;
if (aecm->noiseEstTooHighCtr[i] >= kNoiseEstIncCount) {
@ -125,7 +125,7 @@ static void ComfortNoise(AecmCore* aecm,
aecm->noiseEst[i] >>= 11;
} else {
// Make incremental increases based on size every
// |kNoiseEstIncCount| block
// `kNoiseEstIncCount` block
aecm->noiseEstTooLowCtr[i]++;
if (aecm->noiseEstTooLowCtr[i] >= kNoiseEstIncCount) {
aecm->noiseEst[i] += (aecm->noiseEst[i] >> 9) + 1;
@ -181,7 +181,7 @@ static void WindowAndFFT(AecmCore* aecm,
// FFT of signal
for (i = 0; i < PART_LEN; i++) {
// Window time domain signal and insert into real part of
// transformation array |fft|
// transformation array `fft`
int16_t scaled_time_signal = time_signal[i] * (1 << time_signal_scaling);
fft[i] = (int16_t)((scaled_time_signal * WebRtcAecm_kSqrtHanning[i]) >> 14);
scaled_time_signal = time_signal[i + PART_LEN] * (1 << time_signal_scaling);
@ -204,8 +204,8 @@ static void InverseFFTAndWindow(AecmCore* aecm,
const int16_t* nearendClean) {
int i, j, outCFFT;
int32_t tmp32no1;
// Reuse |efw| for the inverse FFT output after transferring
// the contents to |fft|.
// Reuse `efw` for the inverse FFT output after transferring
// the contents to `fft`.
int16_t* ifft_out = (int16_t*)efw;
// Synthesis
@ -312,7 +312,7 @@ static int TimeToFrequencyDomain(AecmCore* aecm,
} else {
// Approximation for magnitude of complex fft output
// magn = sqrt(real^2 + imag^2)
// magn ~= alpha * max(|imag|,|real|) + beta * min(|imag|,|real|)
// magn ~= alpha * max(`imag`,`real`) + beta * min(`imag`,`real`)
//
// The parameters alpha and beta are stored in Q15
@ -541,7 +541,7 @@ int RTC_NO_SANITIZE("signed-integer-overflow") // bugs.webrtc.org/8200
}
zeros16 = WebRtcSpl_NormW16(aecm->nearFilt[i]);
RTC_DCHECK_GE(zeros16, 0); // |zeros16| is a norm, hence non-negative.
RTC_DCHECK_GE(zeros16, 0); // `zeros16` is a norm, hence non-negative.
dfa_clean_q_domain_diff = aecm->dfaCleanQDomain - aecm->dfaCleanQDomainOld;
if (zeros16 < dfa_clean_q_domain_diff && aecm->nearFilt[i]) {
tmp16no1 = aecm->nearFilt[i] * (1 << zeros16);

View File

@ -822,7 +822,7 @@ static int TimeToFrequencyDomain(AecmCore* aecm,
} else {
// Approximation for magnitude of complex fft output
// magn = sqrt(real^2 + imag^2)
// magn ~= alpha * max(|imag|,|real|) + beta * min(|imag|,|real|)
// magn ~= alpha * max(`imag`,`real`) + beta * min(`imag`,`real`)
//
// The parameters alpha and beta are stored in Q15
tmp16no1 = WEBRTC_SPL_ABS_W16(freq_signal[i].real);
@ -1106,7 +1106,7 @@ int WebRtcAecm_ProcessBlock(AecmCore* aecm,
}
zeros16 = WebRtcSpl_NormW16(aecm->nearFilt[i]);
RTC_DCHECK_GE(zeros16, 0); // |zeros16| is a norm, hence non-negative.
RTC_DCHECK_GE(zeros16, 0); // `zeros16` is a norm, hence non-negative.
dfa_clean_q_domain_diff = aecm->dfaCleanQDomain - aecm->dfaCleanQDomainOld;
if (zeros16 < dfa_clean_q_domain_diff && aecm->nearFilt[i]) {
tmp16no1 = aecm->nearFilt[i] << zeros16;
@ -1411,7 +1411,7 @@ static void ComfortNoise(AecmCore* aecm,
// Track the minimum.
if (tnoise < (1 << minTrackShift)) {
// For small values, decrease noiseEst[i] every
// |kNoiseEstIncCount| block. The regular approach below can not
// `kNoiseEstIncCount` block. The regular approach below can not
// go further down due to truncation.
aecm->noiseEstTooHighCtr[i]++;
if (aecm->noiseEstTooHighCtr[i] >= kNoiseEstIncCount) {
@ -1442,7 +1442,7 @@ static void ComfortNoise(AecmCore* aecm,
: "hi", "lo");
} else {
// Make incremental increases based on size every
// |kNoiseEstIncCount| block
// `kNoiseEstIncCount` block
aecm->noiseEstTooLowCtr[i]++;
if (aecm->noiseEstTooLowCtr[i] >= kNoiseEstIncCount) {
__asm __volatile(
@ -1484,7 +1484,7 @@ static void ComfortNoise(AecmCore* aecm,
// Track the minimum.
if (tnoise1 < (1 << minTrackShift)) {
// For small values, decrease noiseEst[i] every
// |kNoiseEstIncCount| block. The regular approach below can not
// `kNoiseEstIncCount` block. The regular approach below can not
// go further down due to truncation.
aecm->noiseEstTooHighCtr[i + 1]++;
if (aecm->noiseEstTooHighCtr[i + 1] >= kNoiseEstIncCount) {
@ -1515,7 +1515,7 @@ static void ComfortNoise(AecmCore* aecm,
: "hi", "lo");
} else {
// Make incremental increases based on size every
// |kNoiseEstIncCount| block
// `kNoiseEstIncCount` block
aecm->noiseEstTooLowCtr[i + 1]++;
if (aecm->noiseEstTooLowCtr[i + 1] >= kNoiseEstIncCount) {
__asm __volatile(