OLD | NEW |
(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 char* 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, int 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(std::vector<double> psnr_per_frame, |
| 30 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(std::vector<double> psnr_per_frame, |
| 35 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(char video_file_name[], |
| 40 std::vector<double>* psnr_per_frame, |
| 41 std::vector<double>* ssim_per_frame); |
| 42 |
| 43 // Compute freezing score metrics and prints the metrics |
| 44 // for a list of video files. |
| 45 void run_analysis(const char* video_file); |
| 46 |
| 47 #endif // WEBRTC_TOOLS_FRAME_ANALYZER_REFERENCE_LESS_VIDEO_ANALYSIS_LIB_H_ |
OLD | NEW |