Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: webrtc/modules/video_coding/codecs/test/videoprocessor.h

Issue 2993063002: Remove source file writer from VideoProcessor. (Closed)
Patch Set: video_quality_measurement updates. Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC 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 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // purposes. 138 // purposes.
139 class VideoProcessor { 139 class VideoProcessor {
140 public: 140 public:
141 VideoProcessor(webrtc::VideoEncoder* encoder, 141 VideoProcessor(webrtc::VideoEncoder* encoder,
142 webrtc::VideoDecoder* decoder, 142 webrtc::VideoDecoder* decoder,
143 FrameReader* analysis_frame_reader, 143 FrameReader* analysis_frame_reader,
144 FrameWriter* analysis_frame_writer, 144 FrameWriter* analysis_frame_writer,
145 PacketManipulator* packet_manipulator, 145 PacketManipulator* packet_manipulator,
146 const TestConfig& config, 146 const TestConfig& config,
147 Stats* stats, 147 Stats* stats,
148 FrameWriter* source_frame_writer,
149 IvfFileWriter* encoded_frame_writer, 148 IvfFileWriter* encoded_frame_writer,
150 FrameWriter* decoded_frame_writer); 149 FrameWriter* decoded_frame_writer);
151 ~VideoProcessor(); 150 ~VideoProcessor();
152 151
153 // Sets up callbacks and initializes the encoder and decoder. 152 // Sets up callbacks and initializes the encoder and decoder.
154 void Init(); 153 void Init();
155 154
156 // Processes a single frame. Returns true as long as there's more frames 155 // Processes a single frame. Returns true as long as there's more frames
157 // available in the source clip. 156 // available in the source clip.
158 // |frame_number| must be an integer >= 0. 157 // |frame_number| must be an integer >= 0.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 const std::unique_ptr<DecodedImageCallback> decode_callback_; 279 const std::unique_ptr<DecodedImageCallback> decode_callback_;
281 280
282 PacketManipulator* const packet_manipulator_; 281 PacketManipulator* const packet_manipulator_;
283 const TestConfig& config_; 282 const TestConfig& config_;
284 283
285 // These (mandatory) file manipulators are used for, e.g., objective PSNR and 284 // These (mandatory) file manipulators are used for, e.g., objective PSNR and
286 // SSIM calculations at the end of a test run. 285 // SSIM calculations at the end of a test run.
287 FrameReader* const analysis_frame_reader_; 286 FrameReader* const analysis_frame_reader_;
288 FrameWriter* const analysis_frame_writer_; 287 FrameWriter* const analysis_frame_writer_;
289 288
290 // These (optional) file writers are used for persistently storing the output 289 // These (optional) file writers are used to persistently store the encoded
291 // of the coding pipeline at different stages: pre encode (source), post 290 // and decoded bitstreams. The purpose is to give the experimenter an option
292 // encode (encoded), and post decode (decoded). The purpose is to give the 291 // to subjectively evaluate the quality of the processing. Each frame writer
293 // experimenter an option to subjectively evaluate the quality of the 292 // is enabled by being non-null.
294 // encoding, given the test settings. Each frame writer is enabled by being
295 // non-null.
296 FrameWriter* const source_frame_writer_;
297 IvfFileWriter* const encoded_frame_writer_; 293 IvfFileWriter* const encoded_frame_writer_;
298 FrameWriter* const decoded_frame_writer_; 294 FrameWriter* const decoded_frame_writer_;
299 295
300 bool initialized_; 296 bool initialized_;
301 297
302 // Frame metadata for all frames that have been added through a call to 298 // Frame metadata for all frames that have been added through a call to
303 // ProcessFrames(). We need to store this metadata over the course of the 299 // ProcessFrames(). We need to store this metadata over the course of the
304 // test run, to support pipelining HW codecs. 300 // test run, to support pipelining HW codecs.
305 std::vector<FrameInfo> frame_infos_; 301 std::vector<FrameInfo> frame_infos_;
306 int last_encoded_frame_num_; 302 int last_encoded_frame_num_;
307 int last_decoded_frame_num_; 303 int last_decoded_frame_num_;
308 304
309 // Keep track of if we have excluded the first key frame from packet loss. 305 // Keep track of if we have excluded the first key frame from packet loss.
310 bool first_key_frame_has_been_excluded_; 306 bool first_key_frame_has_been_excluded_;
311 307
312 // Keep track of the last successfully decoded frame, since we write that 308 // Keep track of the last successfully decoded frame, since we write that
313 // frame to disk when decoding fails. 309 // frame to disk when decoding fails.
314 rtc::Buffer last_decoded_frame_buffer_; 310 rtc::Buffer last_decoded_frame_buffer_;
315 311
316 // Statistics. 312 // Statistics.
317 Stats* stats_; 313 Stats* stats_;
318 int num_dropped_frames_; 314 int num_dropped_frames_;
319 int num_spatial_resizes_; 315 int num_spatial_resizes_;
320 }; 316 };
321 317
322 } // namespace test 318 } // namespace test
323 } // namespace webrtc 319 } // namespace webrtc
324 320
325 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ 321 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698