Drop entire superframe if any layer is overshooting.
Use new frame dropping mode - FULL_SUPERFRAME_DROP - in VP9 encoder and configure it to drop entire superframe if any layer is overshooting. Bug: none Change-Id: Ie22ed5c175e530bcce365d40cba0d10cb608ad4f Reviewed-on: https://webrtc-review.googlesource.com/79622 Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23447}
This commit is contained in:

committed by
Commit Bot

parent
df736d83ea
commit
ee20336f6e
@ -426,7 +426,7 @@ TEST(VideoCodecTestLibvpx, MAYBE_SvcVP9) {
|
||||
|
||||
std::vector<RateControlThresholds> rc_thresholds = {
|
||||
{5, 1, 5, 0.2, 0.3, 0.1, 0, 1}};
|
||||
std::vector<QualityThresholds> quality_thresholds = {{36, 34, 0.93, 0.91}};
|
||||
std::vector<QualityThresholds> quality_thresholds = {{36, 34, 0.93, 0.90}};
|
||||
|
||||
fixture->RunTest(rate_profiles, &rc_thresholds, &quality_thresholds, nullptr);
|
||||
}
|
||||
|
@ -500,22 +500,16 @@ int VP9EncoderImpl::InitAndSetControlSettings(const VideoCodec* inst) {
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
if (!is_flexible_mode_) {
|
||||
// In RTP non-flexible mode, frame dropping of individual layers in a
|
||||
// superframe leads to incorrect reference picture ID values in the
|
||||
// RTP header. Dropping the entire superframe if the base is dropped
|
||||
// or not dropping upper layers if base is not dropped mitigates
|
||||
// the problem.
|
||||
vpx_svc_frame_drop_t svc_drop_frame;
|
||||
memset(&svc_drop_frame, 0, sizeof(svc_drop_frame));
|
||||
svc_drop_frame.framedrop_mode = CONSTRAINED_LAYER_DROP;
|
||||
for (size_t i = 0; i < num_spatial_layers_; ++i) {
|
||||
svc_drop_frame.framedrop_thresh[i] =
|
||||
(i == 0) ? config_->rc_dropframe_thresh : 0;
|
||||
}
|
||||
vpx_codec_control(encoder_, VP9E_SET_SVC_FRAME_DROP_LAYER,
|
||||
&svc_drop_frame);
|
||||
// Configure encoder to drop entire superframe whenever it needs to drop
|
||||
// a layer. This mode is prefered over per-layer dropping which causes
|
||||
// quality flickering and is not compatible with RTP non-flexible mode.
|
||||
vpx_svc_frame_drop_t svc_drop_frame;
|
||||
memset(&svc_drop_frame, 0, sizeof(svc_drop_frame));
|
||||
svc_drop_frame.framedrop_mode = FULL_SUPERFRAME_DROP;
|
||||
for (size_t i = 0; i < num_spatial_layers_; ++i) {
|
||||
svc_drop_frame.framedrop_thresh[i] = config_->rc_dropframe_thresh;
|
||||
}
|
||||
vpx_codec_control(encoder_, VP9E_SET_SVC_FRAME_DROP_LAYER, &svc_drop_frame);
|
||||
}
|
||||
|
||||
// Register callback for getting each spatial layer.
|
||||
|
Reference in New Issue
Block a user