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:
@ -71,6 +71,12 @@ struct QualityThresholds {
|
||||
double min_min_ssim;
|
||||
};
|
||||
|
||||
struct BitstreamThresholds {
|
||||
explicit BitstreamThresholds(size_t max_nalu_length)
|
||||
: max_nalu_length(max_nalu_length) {}
|
||||
size_t max_nalu_length;
|
||||
};
|
||||
|
||||
// Should video files be saved persistently to disk for post-run visualization?
|
||||
struct VisualizationParams {
|
||||
bool save_encoded_ivf;
|
||||
@ -122,6 +128,7 @@ class VideoProcessorIntegrationTest : public testing::Test {
|
||||
const RateProfile& rate_profile,
|
||||
const std::vector<RateControlThresholds>* rc_thresholds,
|
||||
const QualityThresholds* quality_thresholds,
|
||||
const BitstreamThresholds* bs_thresholds,
|
||||
const VisualizationParams* visualization_params);
|
||||
|
||||
// Config.
|
||||
@ -192,6 +199,9 @@ class VideoProcessorIntegrationTest : public testing::Test {
|
||||
const std::vector<int>& num_dropped_frames,
|
||||
const std::vector<int>& num_spatial_resizes) const;
|
||||
|
||||
void VerifyBitstream(int frame_number,
|
||||
const BitstreamThresholds& bs_thresholds);
|
||||
|
||||
// Codecs.
|
||||
std::unique_ptr<VideoEncoder> encoder_;
|
||||
std::unique_ptr<VideoDecoder> decoder_;
|
||||
|
Reference in New Issue
Block a user