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

Issue 2515253004: Added tool for reference less video analysis (Closed)

Created:
4 years, 1 month ago by charujain
Modified:
3 years, 10 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, janssonWebRTC, erbily_google.com
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Added tool for reference less video analysis (go/refless-video-analysis) This tool takes list of video file names as input and calculates freezing metrics score for the video files without having reference to original video by comparing the PSNR and SSIM values of current and previous frame. BUG=webrtc:6759 Committed: https://crrev.com/0f01c7f9304e8912bf13d934dc971ecdc63db230 Cr-Commit-Position: refs/heads/master@{#15386}

Patch Set 1 #

Patch Set 2 : Fixed bug in frame analyzer API and other changes. #

Patch Set 3 : Fixed lint errors #

Patch Set 4 : Fixed lint errors #

Total comments: 12

Patch Set 5 : Incorporated review comments and added testcases #

Patch Set 6 : Added test case and refactored code #

Patch Set 7 : Added header file and renamed lib file #

Patch Set 8 : Latest changes #

Total comments: 17

Patch Set 9 : Remove lint errors #

Patch Set 10 : Incorporated Review comments #

Total comments: 1

Patch Set 11 : Modified to read one video file at a time. #

Patch Set 12 : Rebase #

Patch Set 13 : Rebased #

Patch Set 14 : Made test case independent #

Patch Set 15 : Added define to support strtok_r in windows #

Patch Set 16 : precision and size_t to int #

Total comments: 15

Patch Set 17 : review comments and used libvpx util function to get height, width #

Patch Set 18 : fix indent #

Patch Set 19 : Added newline character #

Total comments: 2

Patch Set 20 : Removed reference to libvpx file and added new implememtation #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -0 lines) Patch
M webrtc/tools/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +25 lines, -0 lines 0 comments Download
A webrtc/tools/frame_analyzer/reference_less_video_analysis.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +42 lines, -0 lines 0 comments Download
A webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +50 lines, -0 lines 4 comments Download
A webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +202 lines, -0 lines 4 comments Download
A webrtc/tools/frame_analyzer/reference_less_video_analysis_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +68 lines, -0 lines 0 comments Download

Messages

Total messages: 54 (27 generated)
charujain
Created this draft CL, so that you can take a look if i am doing ...
4 years, 1 month ago (2016-11-22 09:03:13 UTC) #3
charujain
4 years ago (2016-11-23 12:53:16 UTC) #5
kjellander_webrtc
Can you break out the bugfix for video_quality_analysis into a separate CL + add a ...
4 years ago (2016-11-23 14:21:11 UTC) #7
kjellander_webrtc
Can you add a unit test? Add a tiny .y4m video to //resources for this ...
4 years ago (2016-11-23 14:44:23 UTC) #8
kjellander_webrtc
On 2016/11/23 14:44:23, kjellander_webrtc wrote: > Can you add a unit test? Add a tiny ...
4 years ago (2016-11-23 14:44:48 UTC) #9
phoglund
https://codereview.webrtc.org/2515253004/diff/60001/webrtc/tools/frame_analyzer/reference_less_video_analysis.cc File webrtc/tools/frame_analyzer/reference_less_video_analysis.cc (right): https://codereview.webrtc.org/2515253004/diff/60001/webrtc/tools/frame_analyzer/reference_less_video_analysis.cc#newcode2 webrtc/tools/frame_analyzer/reference_less_video_analysis.cc:2: * Copyright (c) 2012 The WebRTC project authors. All ...
4 years ago (2016-11-23 15:19:57 UTC) #10
charujain
PTAL.
4 years ago (2016-11-25 10:32:04 UTC) #13
phoglund
lgtm https://codereview.webrtc.org/2515253004/diff/140001/webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc File webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc (right): https://codereview.webrtc.org/2515253004/diff/140001/webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc#newcode29 webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc:29: * Parse file header to get height width ...
4 years ago (2016-11-25 11:08:09 UTC) #14
kjellander_webrtc
https://codereview.webrtc.org/2515253004/diff/140001/webrtc/tools/BUILD.gn File webrtc/tools/BUILD.gn (right): https://codereview.webrtc.org/2515253004/diff/140001/webrtc/tools/BUILD.gn#newcode99 webrtc/tools/BUILD.gn:99: "//build/win:default_exe_manifest", This should be a dependency for the executable ...
4 years ago (2016-11-28 15:02:08 UTC) #15
kjellander_webrtc
Realized I posted comments on PS#8, but they all seem valid for PS#10 as well ...
4 years ago (2016-11-28 15:04:13 UTC) #16
charujain
On 2016/11/28 15:02:08, kjellander_webrtc wrote: > https://codereview.webrtc.org/2515253004/diff/140001/webrtc/tools/BUILD.gn > File webrtc/tools/BUILD.gn (right): > > https://codereview.webrtc.org/2515253004/diff/140001/webrtc/tools/BUILD.gn#newcode99 > ...
4 years ago (2016-11-29 09:31:50 UTC) #17
charujain
On 2016/11/28 15:04:13, kjellander_webrtc wrote: > Realized I posted comments on PS#8, but they all ...
4 years ago (2016-11-29 09:33:27 UTC) #18
charujain
On 2016/11/29 09:33:27, charujain wrote: > On 2016/11/28 15:04:13, kjellander_webrtc wrote: > > Realized I ...
4 years ago (2016-11-29 09:35:03 UTC) #19
kjellander_webrtc
On 2016/11/29 09:31:50, charujain wrote: > On 2016/11/28 15:02:08, kjellander_webrtc wrote: > > https://codereview.webrtc.org/2515253004/diff/140001/webrtc/tools/BUILD.gn > ...
4 years ago (2016-11-29 09:55:16 UTC) #20
kjellander_webrtc
On 2016/11/29 09:35:03, charujain wrote: > On 2016/11/29 09:33:27, charujain wrote: > > On 2016/11/28 ...
4 years ago (2016-11-29 09:56:48 UTC) #21
phoglund
> > Oh, not until now I realized the program takes a --input_file flag which ...
4 years ago (2016-11-29 10:40:04 UTC) #22
charujain
Incorporated most of the comments. PTAL. Although as I discussed offline about using https://cs.chromium.org/chromium/src/third_party/libvpx/source/libvpx/y4minput.c?q=y4m_parse_tags&sq=package:chromium&dr=C&l=53, we ...
4 years ago (2016-11-29 15:22:06 UTC) #26
kjellander_webrtc
It was quite easy to use libvpx's y4minput.c function. I did a proof-of-concept CL here: ...
4 years ago (2016-11-30 07:52:46 UTC) #27
charujain
PTAL. https://codereview.webrtc.org/2515253004/diff/360001/webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc File webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc (right): https://codereview.webrtc.org/2515253004/diff/360001/webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc#newcode30 webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc:30: const char* video_file) { On 2016/11/30 07:52:45, kjellander_webrtc ...
4 years ago (2016-11-30 13:56:27 UTC) #28
kjellander_webrtc
lgtm with remaining comments addressed. https://codereview.webrtc.org/2515253004/diff/360001/webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc File webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc (right): https://codereview.webrtc.org/2515253004/diff/360001/webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc#newcode30 webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc:30: const char* video_file) { ...
4 years ago (2016-11-30 14:02:34 UTC) #29
phoglund
https://codereview.webrtc.org/2515253004/diff/420001/BUILD.gn File BUILD.gn (right): https://codereview.webrtc.org/2515253004/diff/420001/BUILD.gn#newcode25 BUILD.gn:25: rtc_source_set("libvpx_y4minput") { I'm not sure about the decision to ...
4 years ago (2016-12-02 09:51:41 UTC) #38
kjellander_webrtc
https://codereview.webrtc.org/2515253004/diff/420001/BUILD.gn File BUILD.gn (right): https://codereview.webrtc.org/2515253004/diff/420001/BUILD.gn#newcode25 BUILD.gn:25: rtc_source_set("libvpx_y4minput") { On 2016/12/02 09:51:41, phoglund wrote: > I'm ...
4 years ago (2016-12-02 09:58:06 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2515253004/440001
4 years ago (2016-12-02 12:56:46 UTC) #46
commit-bot: I haz the power
Committed patchset #20 (id:440001)
4 years ago (2016-12-02 13:00:05 UTC) #49
commit-bot: I haz the power
Patchset 20 (id:??) landed as https://crrev.com/0f01c7f9304e8912bf13d934dc971ecdc63db230 Cr-Commit-Position: refs/heads/master@{#15386}
4 years ago (2016-12-02 13:00:18 UTC) #51
mandermo
https://codereview.webrtc.org/2515253004/diff/440001/webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc File webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc (right): https://codereview.webrtc.org/2515253004/diff/440001/webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc#newcode20 webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc:20: #define STATS_LINE_LENGTH 28 The Style Guide prefer constants over ...
3 years, 10 months ago (2017-02-07 14:57:51 UTC) #53
kjellander_webrtc
3 years, 10 months ago (2017-02-08 09:11:32 UTC) #54
Message was sent while issue was closed.
Thanks for the post-commit review Magnus!
Charu: can you do a follow-up CL to address the comments?

https://codereview.webrtc.org/2515253004/diff/440001/webrtc/tools/frame_analy...
File webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc (right):

https://codereview.webrtc.org/2515253004/diff/440001/webrtc/tools/frame_analy...
webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc:20: #define
STATS_LINE_LENGTH 28
On 2017/02/07 14:57:50, mandermo wrote:
> The Style Guide prefer constants over defines
> https://google.github.io/styleguide/cppguide.html#Preprocessor_Macros

+1

https://codereview.webrtc.org/2515253004/diff/440001/webrtc/tools/frame_analy...
webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.cc:144: uint8_t*
current_frame = new uint8_t[size];
On 2017/02/07 14:57:50, mandermo wrote:
> Maybe std::unique_ptr<uint8_t[]> would simplify the code.

+1

https://codereview.webrtc.org/2515253004/diff/440001/webrtc/tools/frame_analy...
File webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.h (right):

https://codereview.webrtc.org/2515253004/diff/440001/webrtc/tools/frame_analy...
webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.h:16: 
On 2017/02/07 14:57:50, mandermo wrote:
> Using _ in function names is different from the other files in
> webrtc/tools/frame_analyzer where CamelCase is used.

You're right, the style guide says CamelCase:
https://google.github.io/styleguide/cppguide.html#Function_Names
Charu, can you address in a follow-up CL?

https://codereview.webrtc.org/2515253004/diff/440001/webrtc/tools/frame_analy...
webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.h:48: int
run_analysis(const std::string& video_file);
On 2017/02/07 14:57:51, mandermo wrote:
> Maybe it could be worth putting the functions in this header in a namespace.
> Especially int run_analysis(const std::string&) is quite a general name and
> could clash in the future if it is in the global namespace.

Yes, please use the webrtc::test namespace.

Powered by Google App Engine
This is Rietveld 408576698