Adding test for SingleNalUnit mode

Test enables single-nalu mode, sets limit for nalu lenght and verifies
that encoder follows that limit.
I found that QP jumps significantly when the mode is enabled. In result
encoder might produce 4kbyte and 0.4kbyte frames back-to-back. But it
seems that happens only to couple of frames in the beginning. This
caused test to fail with default RC thresholds. To bypass this I
increased frame size mismatch threshold from 20 to 30%. This should be
Ok considering single-nalu mode is rare.

BUG=webrtc:8070

Review-Url: https://codereview.webrtc.org/3014623002
Cr-Commit-Position: refs/heads/master@{#20023}
This commit is contained in:
ssilkin
2017-09-28 09:23:17 -07:00
committed by Commit Bot
parent 0cbaf1a6f6
commit 612f858ba0
10 changed files with 103 additions and 17 deletions

View File

@ -32,6 +32,9 @@ struct FrameStatistic {
size_t encoded_frame_size_bytes = 0;
webrtc::FrameType frame_type = kVideoFrameDelta;
// H264 specific.
rtc::Optional<size_t> max_nalu_length;
// Decoding.
int64_t decode_start_ns = 0;
int decode_return_code = 0;