OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 #ifndef TEST_I420_VIDEO_SOURCE_H_ | 10 #ifndef TEST_I420_VIDEO_SOURCE_H_ |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 fclose(input_file_); | 45 fclose(input_file_); |
46 } | 46 } |
47 | 47 |
48 virtual void Begin() { | 48 virtual void Begin() { |
49 if (input_file_) | 49 if (input_file_) |
50 fclose(input_file_); | 50 fclose(input_file_); |
51 input_file_ = OpenTestDataFile(file_name_); | 51 input_file_ = OpenTestDataFile(file_name_); |
52 ASSERT_TRUE(input_file_ != NULL) << "Input file open failed. Filename: " | 52 ASSERT_TRUE(input_file_ != NULL) << "Input file open failed. Filename: " |
53 << file_name_; | 53 << file_name_; |
54 if (start_) { | 54 if (start_) { |
55 fseek(input_file_, raw_sz_ * start_, SEEK_SET); | 55 fseek(input_file_, static_cast<unsigned>(raw_sz_) * start_, SEEK_SET); |
56 } | 56 } |
57 | 57 |
58 frame_ = start_; | 58 frame_ = start_; |
59 FillFrame(); | 59 FillFrame(); |
60 } | 60 } |
61 | 61 |
62 virtual void Next() { | 62 virtual void Next() { |
63 ++frame_; | 63 ++frame_; |
64 FillFrame(); | 64 FillFrame(); |
65 } | 65 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 unsigned int frame_; | 109 unsigned int frame_; |
110 unsigned int width_; | 110 unsigned int width_; |
111 unsigned int height_; | 111 unsigned int height_; |
112 int framerate_numerator_; | 112 int framerate_numerator_; |
113 int framerate_denominator_; | 113 int framerate_denominator_; |
114 }; | 114 }; |
115 | 115 |
116 } // namespace libvpx_test | 116 } // namespace libvpx_test |
117 | 117 |
118 #endif // TEST_I420_VIDEO_SOURCE_H_ | 118 #endif // TEST_I420_VIDEO_SOURCE_H_ |
OLD | NEW |