VP9 per layer settings should not force denoising.
In r36379 a change to per-resolution setting of denoising was introduced that unintentionally enabled denoising on lower resolutions in the case that VideoCodec::VP9()->denoising was false. The CL makes sure the per-resolution setting are only allowed to disable denoising, not enable it. Bug: webrtc:13888 Change-Id: Ice07a5a7d27798dc2182a40af0ec521bde6210b6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257303 Reviewed-by: Ying Wang <yinwa@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36412}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
62e423d6f8
commit
3225385b3e
@ -399,9 +399,9 @@ bool LibvpxVp9Encoder::SetSvcRates(
|
||||
|
||||
if (seen_active_layer && performance_flags_.use_per_layer_speed) {
|
||||
bool denoiser_on =
|
||||
AllowDenoising() &&
|
||||
AllowDenoising() && codec_.VP9()->denoisingOn &&
|
||||
performance_flags_by_spatial_index_[num_active_spatial_layers_ - 1]
|
||||
.denoiser_on;
|
||||
.allow_denoising;
|
||||
libvpx_->codec_control(encoder_, VP9E_SET_NOISE_SENSITIVITY,
|
||||
denoiser_on ? 1 : 0);
|
||||
}
|
||||
@ -823,9 +823,9 @@ int LibvpxVp9Encoder::InitAndSetControlSettings(const VideoCodec* inst) {
|
||||
performance_flags_by_spatial_index_[si].deblock_mode;
|
||||
}
|
||||
bool denoiser_on =
|
||||
AllowDenoising() &&
|
||||
AllowDenoising() && inst->VP9().denoisingOn &&
|
||||
performance_flags_by_spatial_index_[num_spatial_layers_ - 1]
|
||||
.denoiser_on;
|
||||
.allow_denoising;
|
||||
libvpx_->codec_control(encoder_, VP9E_SET_NOISE_SENSITIVITY,
|
||||
denoiser_on ? 1 : 0);
|
||||
}
|
||||
@ -1911,7 +1911,7 @@ LibvpxVp9Encoder::ParsePerformanceFlagsFromTrials(
|
||||
FieldTrialStructMember("deblock_mode",
|
||||
[](Params* p) { return &p->deblock_mode; }),
|
||||
FieldTrialStructMember("denoiser",
|
||||
[](Params* p) { return &p->denoiser_on; })},
|
||||
[](Params* p) { return &p->allow_denoising; })},
|
||||
{});
|
||||
|
||||
FieldTrialFlag per_layer_speed("use_per_layer_speed");
|
||||
|
||||
@ -220,7 +220,7 @@ class LibvpxVp9Encoder : public VP9Encoder {
|
||||
// 1 = disable deblock for top-most TL
|
||||
// 2 = disable deblock for all TLs
|
||||
int deblock_mode = 0;
|
||||
bool denoiser_on = true;
|
||||
bool allow_denoising = true;
|
||||
};
|
||||
// Map from min pixel count to settings for that resolution and above.
|
||||
// E.g. if you want some settings A if below wvga (640x360) and some other
|
||||
|
||||
Reference in New Issue
Block a user