Add VideoProcessor tests verifying that H.264 keyframes contain SPS/PPS/IDR.

This CL adds an EncodedFrameChecker interface which can be used by users
of the VideoProcessor to inject customized per-frame checks to the
encoding/decoding pipeline. This currently has two uses:
- Verifying that the QP parser works correctly for VP8 and VP9, by comparing the
  parsed QP to that produced by libvpx.
- Verifying that our H.264 encoders always produce SPS/PPS/IDR in tandem.

TESTED=Galaxy S8, Pixel 2 XL, iPhone 7.
BUG=webrtc:8423

Change-Id: Ic3e401546e239a9ffaf2ed2907689cebb1127805
Reviewed-on: https://webrtc-review.googlesource.com/14559
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20409}
This commit is contained in:
Rasmus Brandt
2017-10-24 10:16:33 +02:00
committed by Commit Bot
parent edf4ff7e0f
commit f7a3558f3e
9 changed files with 173 additions and 19 deletions

View File

@ -32,6 +32,14 @@ enum ExcludeFrameTypes {
// Test configuration for a test run.
struct TestConfig {
class EncodedFrameChecker {
public:
virtual ~EncodedFrameChecker() = default;
virtual void CheckEncodedFrame(webrtc::VideoCodecType codec,
const EncodedImage& encoded_frame) const = 0;
};
void SetCodecSettings(VideoCodecType codec_type,
int num_temporal_layers,
bool error_concealment_on,
@ -103,6 +111,9 @@ struct TestConfig {
// RTP H264 packetization mode.
H264PacketizationMode packetization_mode =
webrtc::H264PacketizationMode::NonInterleaved;
// Custom checker that will be called for each frame.
const EncodedFrameChecker* encoded_frame_checker = nullptr;
};
} // namespace test