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

Unified Diff: webrtc/modules/video_coding/codecs/test/videoprocessor.h

Issue 2700493006: Add optional visualization file writers to VideoProcessor tests. (Closed)
Patch Set: kjellander comments 2. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/test/videoprocessor.h
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor.h b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
index de20020bdc6f08b53b2c191d48b0367356d4baa7..c2e26b3f097eae0b8a58da755557d6358b82b033 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.h
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
@@ -20,6 +20,7 @@
#include "webrtc/modules/video_coding/include/video_codec_interface.h"
#include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h"
#include "webrtc/modules/video_coding/codecs/test/stats.h"
+#include "webrtc/modules/video_coding/utility/ivf_file_writer.h"
#include "webrtc/test/testsupport/frame_reader.h"
#include "webrtc/test/testsupport/frame_writer.h"
@@ -161,11 +162,14 @@ class VideoProcessorImpl : public VideoProcessor {
public:
VideoProcessorImpl(webrtc::VideoEncoder* encoder,
webrtc::VideoDecoder* decoder,
- FrameReader* frame_reader,
- FrameWriter* frame_writer,
+ FrameReader* analysis_frame_reader,
+ FrameWriter* analysis_frame_writer,
PacketManipulator* packet_manipulator,
const TestConfig& config,
- Stats* stats);
+ Stats* stats,
+ FrameWriter* source_frame_writer,
+ IvfFileWriter* encoded_frame_writer,
+ FrameWriter* decoded_frame_writer);
virtual ~VideoProcessorImpl();
bool Init() override;
bool ProcessFrame(int frame_number) override;
@@ -248,12 +252,24 @@ class VideoProcessorImpl : public VideoProcessor {
webrtc::VideoEncoder* const encoder_;
webrtc::VideoDecoder* const decoder_;
std::unique_ptr<VideoBitrateAllocator> bitrate_allocator_;
- FrameReader* const frame_reader_;
- FrameWriter* const frame_writer_;
+ // These (mandatory) file manipulators are used for, e.g., objective PSNR and
+ // SSIM calculations at the end of a test run.
+ FrameReader* const analysis_frame_reader_;
+ FrameWriter* const analysis_frame_writer_;
PacketManipulator* const packet_manipulator_;
const TestConfig& config_;
Stats* stats_;
-
+ // These (optional) file writers are used for persistently storing the output
+ // of the coding pipeline at different stages: pre encode (source), post
+ // encode (encoded), and post decode (decoded). The purpose is to give the
+ // experimenter an option to subjectively evaluate the quality of the
+ // encoding, given the test settings. Each frame writer is enabled by being
+ // non-null.
+ FrameWriter* const source_frame_writer_;
+ IvfFileWriter* const encoded_frame_writer_;
+ FrameWriter* const decoded_frame_writer_;
+
+ // Adapters for the codec callbacks.
std::unique_ptr<EncodedImageCallback> encode_callback_;
std::unique_ptr<DecodedImageCallback> decode_callback_;

Powered by Google App Engine
This is Rietveld 408576698