Use initial bitrates for software VP8.
Makes the software encoder start at VGA as well, since ~300k isn't good enough to produce a good HD stream. BUG=webrtc:5678 R=glaznev@webrtc.org, stefan@webrtc.org Review URL: https://codereview.webrtc.org/1893313002 . Cr-Commit-Position: refs/heads/master@{#12428}
This commit is contained in:
parent
cc23b7c1ea
commit
e1da27e543
@ -1063,7 +1063,16 @@ class VideoMediaChannelTest : public testing::Test,
|
||||
void TwoStreamsSendAndReceive(const cricket::VideoCodec& codec) {
|
||||
SetUpSecondStream();
|
||||
// Test sending and receiving on first stream.
|
||||
SendAndReceive(codec);
|
||||
EXPECT_TRUE(SetOneCodec(codec));
|
||||
EXPECT_TRUE(SetSend(true));
|
||||
EXPECT_TRUE(channel_->SetSink(kDefaultReceiveSsrc, &renderer_));
|
||||
EXPECT_EQ(0, renderer_.num_rendered_frames());
|
||||
EXPECT_TRUE(SendFrame());
|
||||
// Since multiple streams share this link we should be receiving smaller
|
||||
// initial frames (start at QVGA since shared bitrate is 150k each).
|
||||
EXPECT_FRAME_WAIT(1, codec.width / 2, codec.height / 2, kTimeout);
|
||||
std::unique_ptr<const rtc::CopyOnWriteBuffer> p(GetRtpPacket(0));
|
||||
EXPECT_EQ(codec.id, GetPayloadType(p.get()));
|
||||
// Test sending and receiving on second stream.
|
||||
EXPECT_EQ_WAIT(1, renderer2_.num_rendered_frames(), kTimeout);
|
||||
EXPECT_GT(NumRtpPackets(), 0);
|
||||
|
||||
@ -606,9 +606,8 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
|
||||
// go back down).
|
||||
const int kLowQpThreshold = 29;
|
||||
const int kDisabledBadQpThreshold = 100;
|
||||
// TODO(glaznev/sprang): consider passing codec initial bitrate to quality
|
||||
// scaler to avoid starting with HD for low initial bitrates.
|
||||
quality_scaler_.Init(kLowQpThreshold, kDisabledBadQpThreshold, false, 0, 0, 0,
|
||||
quality_scaler_.Init(kLowQpThreshold, kDisabledBadQpThreshold, false,
|
||||
codec_.startBitrate, codec_.width, codec_.height,
|
||||
codec_.maxFramerate);
|
||||
|
||||
// Only apply scaling to improve for single-layer streams. The scaling metrics
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user