Fix some instances of -Wunused-but-set-variable.
Bug: chromium:1203071 Change-Id: I1ef3c8fd1f8e2bbf980d5d5217257e919f4564c2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226961 Commit-Queue: Peter Kasting <pkasting@chromium.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34579}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
dc364e5bc2
commit
55ec1a43bb
@ -222,7 +222,6 @@ void NetEqDecodingTest::WrapTest(uint16_t start_seq_no,
|
||||
const int kSamples = kBlockSize16kHz * kBlocksPerFrame;
|
||||
const size_t kPayloadBytes = kSamples * sizeof(int16_t);
|
||||
double next_input_time_ms = 0.0;
|
||||
uint32_t receive_timestamp = 0;
|
||||
|
||||
// Insert speech for 2 seconds.
|
||||
const int kSpeechDurationMs = 2000;
|
||||
@ -260,7 +259,6 @@ void NetEqDecodingTest::WrapTest(uint16_t start_seq_no,
|
||||
|
||||
++seq_no;
|
||||
timestamp += kSamples;
|
||||
receive_timestamp += kSamples;
|
||||
next_input_time_ms += static_cast<double>(kFrameSizeMs);
|
||||
|
||||
seq_no_wrapped |= seq_no < last_seq_no;
|
||||
|
||||
@ -79,10 +79,9 @@ int32_t WebRtcAgc_CalculateGainTable(int32_t* gainTable, // Q16
|
||||
uint16_t constMaxGain;
|
||||
uint16_t tmpU16, intPart, fracPart;
|
||||
const int16_t kCompRatio = 3;
|
||||
const int16_t kSoftLimiterLeft = 1;
|
||||
int16_t limiterOffset = 0; // Limiter offset
|
||||
int16_t limiterIdx, limiterLvlX;
|
||||
int16_t constLinApprox, zeroGainLvl, maxGain, diffGain;
|
||||
int16_t constLinApprox, maxGain, diffGain;
|
||||
int16_t i, tmp16, tmp16no1;
|
||||
int zeros, zerosScale;
|
||||
|
||||
@ -98,17 +97,11 @@ int32_t WebRtcAgc_CalculateGainTable(int32_t* gainTable, // Q16
|
||||
WebRtcSpl_DivW32W16ResW16(tmp32no1 + (kCompRatio >> 1), kCompRatio);
|
||||
maxGain = WEBRTC_SPL_MAX(tmp16no1, (analogTarget - targetLevelDbfs));
|
||||
tmp32no1 = maxGain * kCompRatio;
|
||||
zeroGainLvl = digCompGaindB;
|
||||
zeroGainLvl -= WebRtcSpl_DivW32W16ResW16(tmp32no1 + ((kCompRatio - 1) >> 1),
|
||||
kCompRatio - 1);
|
||||
if ((digCompGaindB <= analogTarget) && (limiterEnable)) {
|
||||
zeroGainLvl += (analogTarget - digCompGaindB + kSoftLimiterLeft);
|
||||
limiterOffset = 0;
|
||||
}
|
||||
|
||||
// Calculate the difference between maximum gain and gain at 0dB0v:
|
||||
// diffGain = maxGain + (compRatio-1)*zeroGainLvl/compRatio
|
||||
// = (compRatio-1)*digCompGaindB/compRatio
|
||||
// Calculate the difference between maximum gain and gain at 0dB0v
|
||||
tmp32no1 = digCompGaindB * (kCompRatio - 1);
|
||||
diffGain =
|
||||
WebRtcSpl_DivW32W16ResW16(tmp32no1 + (kCompRatio >> 1), kCompRatio);
|
||||
@ -294,15 +287,12 @@ int32_t WebRtcAgc_ComputeDigitalGains(DigitalAgc* stt,
|
||||
int16_t gate, gain_adj;
|
||||
int16_t k;
|
||||
size_t n, L;
|
||||
int16_t L2; // samples/subframe
|
||||
|
||||
// determine number of samples per ms
|
||||
if (FS == 8000) {
|
||||
L = 8;
|
||||
L2 = 3;
|
||||
} else if (FS == 16000 || FS == 32000 || FS == 48000) {
|
||||
L = 16;
|
||||
L2 = 4;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -95,7 +95,6 @@ int32_t FakeEncoder::Encode(const VideoFrame& input_image,
|
||||
SpatialLayer simulcast_streams[kMaxSimulcastStreams];
|
||||
EncodedImageCallback* callback;
|
||||
RateControlParameters rates;
|
||||
VideoCodecMode mode;
|
||||
bool keyframe;
|
||||
uint32_t counter;
|
||||
absl::optional<int> qp;
|
||||
@ -108,7 +107,6 @@ int32_t FakeEncoder::Encode(const VideoFrame& input_image,
|
||||
}
|
||||
callback = callback_;
|
||||
rates = current_rate_settings_;
|
||||
mode = config_.mode;
|
||||
if (rates.framerate_fps <= 0.0) {
|
||||
rates.framerate_fps = max_framerate;
|
||||
}
|
||||
|
||||
@ -1827,6 +1827,9 @@ EncodedImageCallback::Result VideoStreamEncoder::OnEncodedImage(
|
||||
const CodecSpecificInfo* codec_specific_info) {
|
||||
TRACE_EVENT_INSTANT1("webrtc", "VCMEncodedFrameCallback::Encoded",
|
||||
"timestamp", encoded_image.Timestamp());
|
||||
|
||||
// TODO(bugs.webrtc.org/10520): Signal the simulcast id explicitly.
|
||||
|
||||
const size_t spatial_idx = encoded_image.SpatialIndex().value_or(0);
|
||||
EncodedImage image_copy(encoded_image);
|
||||
|
||||
@ -1896,18 +1899,6 @@ EncodedImageCallback::Result VideoStreamEncoder::OnEncodedImage(
|
||||
// running in parallel on different threads.
|
||||
encoder_stats_observer_->OnSendEncodedImage(image_copy, codec_specific_info);
|
||||
|
||||
// The simulcast id is signaled in the SpatialIndex. This makes it impossible
|
||||
// to do simulcast for codecs that actually support spatial layers since we
|
||||
// can't distinguish between an actual spatial layer and a simulcast stream.
|
||||
// TODO(bugs.webrtc.org/10520): Signal the simulcast id explicitly.
|
||||
int simulcast_id = 0;
|
||||
if (codec_specific_info &&
|
||||
(codec_specific_info->codecType == kVideoCodecVP8 ||
|
||||
codec_specific_info->codecType == kVideoCodecH264 ||
|
||||
codec_specific_info->codecType == kVideoCodecGeneric)) {
|
||||
simulcast_id = encoded_image.SpatialIndex().value_or(0);
|
||||
}
|
||||
|
||||
EncodedImageCallback::Result result =
|
||||
sink_->OnEncodedImage(image_copy, codec_specific_info);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user