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:
committed by
Commit Bot
parent
edf4ff7e0f
commit
f7a3558f3e
@ -16,6 +16,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "common_video/h264/h264_common.h"
|
||||
#include "media/engine/webrtcvideodecoderfactory.h"
|
||||
#include "media/engine/webrtcvideoencoderfactory.h"
|
||||
#include "modules/video_coding/codecs/test/packet_manipulator.h"
|
||||
@ -91,6 +92,13 @@ struct VisualizationParams {
|
||||
// or breakdown occurs.
|
||||
class VideoProcessorIntegrationTest : public testing::Test {
|
||||
protected:
|
||||
// Verifies that all H.264 keyframes contain SPS/PPS/IDR NALUs.
|
||||
class H264KeyframeChecker : public TestConfig::EncodedFrameChecker {
|
||||
public:
|
||||
void CheckEncodedFrame(webrtc::VideoCodecType codec,
|
||||
const EncodedImage& encoded_frame) const override;
|
||||
};
|
||||
|
||||
VideoProcessorIntegrationTest();
|
||||
~VideoProcessorIntegrationTest() override;
|
||||
|
||||
@ -104,6 +112,9 @@ class VideoProcessorIntegrationTest : public testing::Test {
|
||||
// Config.
|
||||
TestConfig config_;
|
||||
|
||||
// Can be used by all H.264 tests.
|
||||
const H264KeyframeChecker h264_keyframe_checker_;
|
||||
|
||||
private:
|
||||
class CpuProcessTime;
|
||||
static const int kMaxNumTemporalLayers = 3;
|
||||
|
||||
Reference in New Issue
Block a user