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

Side by Side Diff: media/cast/test/utility/video_utility.h

Issue 892383002: RELAND: [Cast] Software encoder support for varying video frame sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for 'access to uninitialized memory' error. Created 5 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 unified diff | Download patch
« no previous file with comments | « media/cast/test/simulator.cc ('k') | media/cast/test/utility/video_utility.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Utility functions for video testing. 5 // Utility functions for video testing.
6 6
7 #include "media/base/video_frame.h" 7 #include "media/base/video_frame.h"
8 8
9 namespace media { 9 namespace media {
10 namespace cast { 10 namespace cast {
11 11
12 // Compute and return PSNR between two frames. 12 // Compute and return PSNR between two frames.
13 double I420PSNR(const scoped_refptr<media::VideoFrame>& frame1, 13 double I420PSNR(const scoped_refptr<media::VideoFrame>& frame1,
14 const scoped_refptr<media::VideoFrame>& frame2); 14 const scoped_refptr<media::VideoFrame>& frame2);
15 15
16 // Compute and return SSIM between two frames. 16 // Compute and return SSIM between two frames.
17 double I420SSIM(const scoped_refptr<media::VideoFrame>& frame1, 17 double I420SSIM(const scoped_refptr<media::VideoFrame>& frame1,
18 const scoped_refptr<media::VideoFrame>& frame2); 18 const scoped_refptr<media::VideoFrame>& frame2);
19 19
20 // Populate a video frame with values starting with the given start value. 20 // Populate a video |frame| with a plaid pattern, cycling from the given
21 // |start_value|.
21 // Width, height and stride should be set in advance. 22 // Width, height and stride should be set in advance.
22 // Memory is allocated within the function. 23 // Memory is allocated within the function.
23 void PopulateVideoFrame(VideoFrame* frame, int start_value); 24 void PopulateVideoFrame(VideoFrame* frame, int start_value);
24 25
25 // Populate a video frame with noise. 26 // Populate a video frame with noise.
26 void PopulateVideoFrameWithNoise(VideoFrame* frame); 27 void PopulateVideoFrameWithNoise(VideoFrame* frame);
27 28
28 // Populate a video frame from a file. 29 // Populate a video frame from a file.
29 // Returns true if frame was populated, false if not (EOF). 30 // Returns true if frame was populated, false if not (EOF).
30 bool PopulateVideoFrameFromFile(VideoFrame* frame, FILE* video_file); 31 bool PopulateVideoFrameFromFile(VideoFrame* frame, FILE* video_file);
31 32
32 } // namespace cast 33 } // namespace cast
33 } // namespace media 34 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/test/simulator.cc ('k') | media/cast/test/utility/video_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698