summaryrefslogtreecommitdiff
path: root/test/ivf_video_source.h
diff options
context:
space:
mode:
authorclang-format <noreply@google.com>2016-07-25 22:50:48 -0700
committerJames Zern <jzern@google.com>2016-07-27 01:58:52 +0000
commit33e40cb5db12309b69ef40e84b2ed522a54da09e (patch)
treed9772b1e118a04162b551bdfd53233725a916ab5 /test/ivf_video_source.h
parente4290800b21478a3f9548c58b4f15c5ba5393073 (diff)
downloadlibvpx-33e40cb5db12309b69ef40e84b2ed522a54da09e.tar
libvpx-33e40cb5db12309b69ef40e84b2ed522a54da09e.tar.gz
libvpx-33e40cb5db12309b69ef40e84b2ed522a54da09e.tar.bz2
libvpx-33e40cb5db12309b69ef40e84b2ed522a54da09e.zip
test: apply clang-format
Change-Id: I0d9ab85855eb723f653a7bb09b3d0d31dd6cfd2f
Diffstat (limited to 'test/ivf_video_source.h')
-rw-r--r--test/ivf_video_source.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/test/ivf_video_source.h b/test/ivf_video_source.h
index 824a39d7e..b87624a11 100644
--- a/test/ivf_video_source.h
+++ b/test/ivf_video_source.h
@@ -29,19 +29,13 @@ static unsigned int MemGetLe32(const uint8_t *mem) {
class IVFVideoSource : public CompressedVideoSource {
public:
explicit IVFVideoSource(const std::string &file_name)
- : file_name_(file_name),
- input_file_(NULL),
- compressed_frame_buf_(NULL),
- frame_sz_(0),
- frame_(0),
- end_of_file_(false) {
- }
+ : file_name_(file_name), input_file_(NULL), compressed_frame_buf_(NULL),
+ frame_sz_(0), frame_(0), end_of_file_(false) {}
virtual ~IVFVideoSource() {
delete[] compressed_frame_buf_;
- if (input_file_)
- fclose(input_file_);
+ if (input_file_) fclose(input_file_);
}
virtual void Init() {
@@ -54,15 +48,16 @@ class IVFVideoSource : public CompressedVideoSource {
virtual void Begin() {
input_file_ = OpenTestDataFile(file_name_);
ASSERT_TRUE(input_file_ != NULL) << "Input file open failed. Filename: "
- << file_name_;
+ << file_name_;
// Read file header
uint8_t file_hdr[kIvfFileHdrSize];
ASSERT_EQ(kIvfFileHdrSize, fread(file_hdr, 1, kIvfFileHdrSize, input_file_))
<< "File header read failed.";
// Check file header
- ASSERT_TRUE(file_hdr[0] == 'D' && file_hdr[1] == 'K' && file_hdr[2] == 'I'
- && file_hdr[3] == 'F') << "Input is not an IVF file.";
+ ASSERT_TRUE(file_hdr[0] == 'D' && file_hdr[1] == 'K' &&
+ file_hdr[2] == 'I' && file_hdr[3] == 'F')
+ << "Input is not an IVF file.";
FillFrame();
}
@@ -76,8 +71,8 @@ class IVFVideoSource : public CompressedVideoSource {
ASSERT_TRUE(input_file_ != NULL);
uint8_t frame_hdr[kIvfFrameHdrSize];
// Check frame header and read a frame from input_file.
- if (fread(frame_hdr, 1, kIvfFrameHdrSize, input_file_)
- != kIvfFrameHdrSize) {
+ if (fread(frame_hdr, 1, kIvfFrameHdrSize, input_file_) !=
+ kIvfFrameHdrSize) {
end_of_file_ = true;
} else {
end_of_file_ = false;