Write scalability structure in flexible mode.
Always write scalability structure no matter whether flexible mode is enabled or not. Bug: webrtc:9658 Change-Id: I6c3d5c8e46046dfe89e8ec38536d71b195e80593 Reviewed-on: https://webrtc-review.googlesource.com/95723 Reviewed-by: Åsa Persson <asapersson@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24406}
This commit is contained in:

committed by
Commit Bot

parent
370c050ecd
commit
738b7e9c24
@ -465,6 +465,20 @@ TEST_F(TestVp9Impl,
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(TestVp9Impl, ScalabilityStructureIsAvailableInFlexibleMode) {
|
||||
codec_settings_.VP9()->flexibleMode = true;
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
encoder_->InitEncode(&codec_settings_, 1 /* number of cores */,
|
||||
0 /* max payload size (unused) */));
|
||||
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
encoder_->Encode(*NextInputFrame(), nullptr, nullptr));
|
||||
EncodedImage encoded_frame;
|
||||
CodecSpecificInfo codec_specific_info;
|
||||
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
|
||||
EXPECT_TRUE(codec_specific_info.codecSpecific.VP9.ss_data_available);
|
||||
}
|
||||
|
||||
class TestVp9ImplWithLayering
|
||||
: public TestVp9Impl,
|
||||
public ::testing::WithParamInterface<::testing::tuple<uint8_t, uint8_t>> {
|
||||
|
@ -763,11 +763,9 @@ void VP9EncoderImpl::PopulateCodecSpecific(CodecSpecificInfo* codec_specific,
|
||||
CodecSpecificInfoVP9* vp9_info = &(codec_specific->codecSpecific.VP9);
|
||||
|
||||
vp9_info->first_frame_in_picture = first_frame_in_picture;
|
||||
vp9_info->flexible_mode = codec_.VP9()->flexibleMode;
|
||||
vp9_info->flexible_mode = is_flexible_mode_;
|
||||
vp9_info->ss_data_available =
|
||||
((pkt.data.frame.flags & VPX_FRAME_IS_KEY) && !codec_.VP9()->flexibleMode)
|
||||
? true
|
||||
: false;
|
||||
(pkt.data.frame.flags & VPX_FRAME_IS_KEY) ? true : false;
|
||||
|
||||
vpx_svc_layer_id_t layer_id = {0};
|
||||
vpx_codec_control(encoder_, VP9E_GET_SVC_LAYER_ID, &layer_id);
|
||||
@ -844,7 +842,9 @@ void VP9EncoderImpl::PopulateCodecSpecific(CodecSpecificInfo* codec_specific,
|
||||
vp9_info->height[i] = codec_.height * svc_params_.scaling_factor_num[i] /
|
||||
svc_params_.scaling_factor_den[i];
|
||||
}
|
||||
if (!vp9_info->flexible_mode) {
|
||||
if (vp9_info->flexible_mode) {
|
||||
vp9_info->gof.num_frames_in_gof = 0;
|
||||
} else {
|
||||
vp9_info->gof.CopyGofInfoVP9(gof_);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user