Makes it possible to disable frame dropping in the VP8 codec.
BUG= Review URL: https://webrtc-codereview.appspot.com/757006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2661 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
6a6121c0b1
commit
3387b88595
@ -522,6 +522,7 @@ struct VideoCodecVP8
|
||||
bool denoisingOn;
|
||||
bool errorConcealmentOn;
|
||||
bool automaticResizeOn;
|
||||
bool frameDroppingOn;
|
||||
};
|
||||
|
||||
// Unknown specific
|
||||
|
@ -233,7 +233,8 @@ int VP8Encoder::InitEncode(const VideoCodec* inst,
|
||||
}
|
||||
|
||||
// rate control settings
|
||||
config_->rc_dropframe_thresh = 30;
|
||||
config_->rc_dropframe_thresh = inst->codecSpecific.VP8.frameDroppingOn ?
|
||||
30 : 0;
|
||||
config_->rc_end_usage = VPX_CBR;
|
||||
config_->g_pass = VPX_RC_ONE_PASS;
|
||||
config_->rc_resize_allowed = inst->codecSpecific.VP8.automaticResizeOn ?
|
||||
|
@ -175,6 +175,7 @@ VCMCodecDataBase::Codec(WebRtc_UWord8 listId, VideoCodec *settings)
|
||||
settings->codecSpecific.VP8.denoisingOn = true;
|
||||
settings->codecSpecific.VP8.errorConcealmentOn = false;
|
||||
settings->codecSpecific.VP8.automaticResizeOn = false;
|
||||
settings->codecSpecific.VP8.frameDroppingOn = true;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -463,6 +463,7 @@ void ViEAutoTest::ViECodecAPITest() {
|
||||
EXPECT_EQ(0, codec->GetCodec(i, video_codec));
|
||||
if (video_codec.codecType == webrtc::kVideoCodecVP8) {
|
||||
video_codec.codecSpecific.VP8.automaticResizeOn = true;
|
||||
video_codec.codecSpecific.VP8.frameDroppingOn = true;
|
||||
EXPECT_EQ(0, codec->SetSendCodec(video_channel, video_codec));
|
||||
break;
|
||||
}
|
||||
@ -471,11 +472,13 @@ void ViEAutoTest::ViECodecAPITest() {
|
||||
EXPECT_EQ(0, codec->GetSendCodec(video_channel, video_codec));
|
||||
EXPECT_EQ(webrtc::kVideoCodecVP8, video_codec.codecType);
|
||||
EXPECT_TRUE(video_codec.codecSpecific.VP8.automaticResizeOn);
|
||||
EXPECT_TRUE(video_codec.codecSpecific.VP8.frameDroppingOn);
|
||||
|
||||
for (int i = 0; i < number_of_codecs; i++) {
|
||||
EXPECT_EQ(0, codec->GetCodec(i, video_codec));
|
||||
if (video_codec.codecType == webrtc::kVideoCodecI420) {
|
||||
video_codec.codecSpecific.VP8.automaticResizeOn = false;
|
||||
video_codec.codecSpecific.VP8.frameDroppingOn = false;
|
||||
EXPECT_EQ(0, codec->SetSendCodec(video_channel, video_codec));
|
||||
break;
|
||||
}
|
||||
@ -484,6 +487,7 @@ void ViEAutoTest::ViECodecAPITest() {
|
||||
EXPECT_EQ(0, codec->GetSendCodec(video_channel, video_codec));
|
||||
EXPECT_EQ(webrtc::kVideoCodecI420, video_codec.codecType);
|
||||
EXPECT_FALSE(video_codec.codecSpecific.VP8.automaticResizeOn);
|
||||
EXPECT_FALSE(video_codec.codecSpecific.VP8.frameDroppingOn);
|
||||
|
||||
EXPECT_EQ(0, base->DeleteChannel(video_channel));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user