Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Unified Diff: modules/video_coding/codecs/test/videoprocessor_integrationtest_openh264.cc

Issue 3014623002: Adding test for SingleNalUnit mode (Closed)
Patch Set: Addressed review notes Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/video_coding/codecs/test/videoprocessor_integrationtest_openh264.cc
diff --git a/modules/video_coding/codecs/test/videoprocessor_integrationtest_openh264.cc b/modules/video_coding/codecs/test/videoprocessor_integrationtest_openh264.cc
index e6db027e1d8d22e4a251e37053f42a61173eda3c..df3e4d0bef3db42a8d9b413dd6cfede89283bcea 100644
--- a/modules/video_coding/codecs/test/videoprocessor_integrationtest_openh264.cc
+++ b/modules/video_coding/codecs/test/videoprocessor_integrationtest_openh264.cc
@@ -53,7 +53,7 @@ class VideoProcessorIntegrationTestOpenH264
// these unittests appears to drop "packets" in a way that is not compatible
// with H264. Therefore ProcessXPercentPacketLossH264, X != 0, unittests have
// not been added.
-TEST_F(VideoProcessorIntegrationTestOpenH264, Process0PercentPacketLossH264) {
+TEST_F(VideoProcessorIntegrationTestOpenH264, Process0PercentPacketLoss) {
SetCodecSettings(&config_, kVideoCodecH264, 1, false, false, true, false,
kResilienceOn, kCifWidth, kCifHeight);
@@ -68,7 +68,32 @@ TEST_F(VideoProcessorIntegrationTestOpenH264, Process0PercentPacketLossH264) {
QualityThresholds quality_thresholds(35.0, 25.0, 0.93, 0.70);
ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds,
- kNoVisualizationParams);
+ nullptr, kNoVisualizationParams);
+}
+
+// H264: Enable SingleNalUnit packetization mode. Encoder should split
+// large frames into multiple slices and limit length of NAL units.
+TEST_F(VideoProcessorIntegrationTestOpenH264, ProcessNoLossSingleNalUnit) {
+ config_.packetization_mode = H264PacketizationMode::SingleNalUnit;
+ config_.networking_config.max_payload_size_in_bytes = 500;
+ SetCodecSettings(&config_, kVideoCodecH264, 1, false, false, true, false,
+ kResilienceOn, kCifWidth, kCifHeight);
+
+ RateProfile rate_profile;
+ SetRateProfile(&rate_profile, 0, 500, 30, 0);
+ rate_profile.frame_index_rate_update[1] = kNumFrames + 1;
+ rate_profile.num_frames = kNumFrames;
+
+ std::vector<RateControlThresholds> rc_thresholds;
+ AddRateControlThresholds(2, 60, 30, 10, 20, 0, 1, &rc_thresholds);
+
+ QualityThresholds quality_thresholds(35.0, 25.0, 0.93, 0.70);
+
+ BitstreamThresholds bs_thresholds(
+ config_.networking_config.max_payload_size_in_bytes);
+
+ ProcessFramesAndMaybeVerify(rate_profile, &rc_thresholds, &quality_thresholds,
+ &bs_thresholds, kNoVisualizationParams);
}
#endif // defined(WEBRTC_USE_H264)

Powered by Google App Engine
This is Rietveld 408576698