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

Side by Side Diff: webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.h

Issue 2965593002: Move webrtc/{tools => rtc_tools} (Closed)
Patch Set: Adding back root changes Created 3 years, 5 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
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_TOOLS_FRAME_ANALYZER_REFERENCE_LESS_VIDEO_ANALYSIS_LIB_H_
12 #define WEBRTC_TOOLS_FRAME_ANALYZER_REFERENCE_LESS_VIDEO_ANALYSIS_LIB_H_
13
14 #include <string>
15 #include <vector>
16
17 // Parse the file header to extract height, width and fps
18 // for a given video file.
19 void get_height_width_fps(int *height, int *width, int *fps,
20 const std::string& video_file);
21
22 // Returns true if the frame is frozen based on psnr and ssim freezing
23 // threshold values.
24 bool frozen_frame(std::vector<double> psnr_per_frame,
25 std::vector<double> ssim_per_frame, size_t frame);
26
27 // Returns the vector of identical cluster of frames that are frozen
28 // and appears continuously.
29 std::vector<int> find_frame_clusters(const std::vector<double>& psnr_per_frame,
30 const std::vector<double>& ssim_per_frame);
31
32 // Prints various freezing metrics like identical frames,
33 // total unique frames etc.
34 void print_freezing_metrics(const std::vector<double>& psnr_per_frame,
35 const std::vector<double>& ssim_per_frame);
36
37 // Compute the metrics like freezing score based on PSNR and SSIM values for a
38 // given video file.
39 void compute_metrics(const std::string& video_file_name,
40 std::vector<double>* psnr_per_frame,
41 std::vector<double>* ssim_per_frame);
42
43 // Checks the file extension and return true if it is y4m.
44 bool check_file_extension(const std::string& video_file_name);
45
46 // Compute freezing score metrics and prints the metrics
47 // for a list of video files.
48 int run_analysis(const std::string& video_file);
49
50 #endif // WEBRTC_TOOLS_FRAME_ANALYZER_REFERENCE_LESS_VIDEO_ANALYSIS_LIB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698