blob: 80466e1c291a70ae89d2c35b7fe90fd564d34c01 [file] [log] [blame]
Niels Möller739fcb92016-02-29 12:11:451/*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
Mirko Bonadei92ea95e2017-09-15 04:47:3110#ifndef TEST_FRAME_UTILS_H_
11#define TEST_FRAME_UTILS_H_
Niels Möller739fcb92016-02-29 12:11:4512
pbosc7c26a02017-01-02 16:42:3213#include <stdint.h>
14
Mirko Bonadei92ea95e2017-09-15 04:47:3115#include "rtc_base/scoped_ref_ptr.h"
Niels Möller739fcb92016-02-29 12:11:4516
17namespace webrtc {
nisse115bd152016-09-30 11:14:0718class I420Buffer;
Niels Möller739fcb92016-02-29 12:11:4519class VideoFrame;
nisse7cc9cc02016-03-30 06:44:1920class VideoFrameBuffer;
Niels Möller739fcb92016-02-29 12:11:4521namespace test {
22
23bool EqualPlane(const uint8_t* data1,
24 const uint8_t* data2,
nisse26acec42016-04-15 10:43:3925 int stride1,
26 int stride2,
Niels Möller739fcb92016-02-29 12:11:4527 int width,
28 int height);
29
nisse26acec42016-04-15 10:43:3930static inline bool EqualPlane(const uint8_t* data1,
31 const uint8_t* data2,
32 int stride,
33 int width,
34 int height) {
35 return EqualPlane(data1, data2, stride, stride, width, height);
36}
37
Niels Möller739fcb92016-02-29 12:11:4538bool FramesEqual(const webrtc::VideoFrame& f1, const webrtc::VideoFrame& f2);
39
nisse7cc9cc02016-03-30 06:44:1940bool FrameBufsEqual(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& f1,
41 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& f2);
42
nisse115bd152016-09-30 11:14:0743rtc::scoped_refptr<I420Buffer> ReadI420Buffer(int width, int height, FILE *);
44
Niels Möller739fcb92016-02-29 12:11:4545} // namespace test
46} // namespace webrtc
47
Mirko Bonadei92ea95e2017-09-15 04:47:3148#endif // TEST_FRAME_UTILS_H_