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

Issue 2534903002: Revert of Bug in ExtractFrame API (extracts frames incorrectly) (Closed)

Created:
4 years ago by charujain
Modified:
4 years ago
Reviewers:
phoglund
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, kjellander (google.com)
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Revert of Bug in ExtractFrame API (extracts frames incorrectly) (patchset #10 id:140001 of https://codereview.webrtc.org/2529923002/ ) Reason for revert: Its breaking some trybots due to memory issue. Original issue's description: > Fixed bug in ExtractFrameFromY4mFile API which was not extracting the frames correctly. > > Issue: This API was calculating the file_header and frame_header offset only for the first frame which is not the right logic. We need to skip the file and frame header every time we extract a new frame. > > Also added a unit test case which compares the extracted frame with the frame stored in text file. > > BUG=webrtc:6761 > > NOPRESUBMIT=true > NOTRY=true > > Committed: https://crrev.com/b7636b4656d7f8c368963f2256dc2ef7b7ba89c8 > Cr-Commit-Position: refs/heads/master@{#15260} TBR=phoglund@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:6761

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -66 lines) Patch
D resources/reference_less_video_test_file.y4m.sha1 View 1 chunk +0 lines, -1 line 0 comments Download
D resources/video_quality_analysis_frame.txt.sha1 View 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/tools/BUILD.gn View 1 chunk +1 line, -5 lines 0 comments Download
M webrtc/tools/frame_analyzer/video_quality_analysis.cc View 3 chunks +31 lines, -32 lines 0 comments Download
M webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc View 2 chunks +0 lines, -27 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
charujain
Created Revert of Bug in ExtractFrame API (extracts frames incorrectly)
4 years ago (2016-11-28 13:29:52 UTC) #2
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/2534903002/1
4 years ago (2016-11-28 13:30:07 UTC) #3
commit-bot: I haz the power
Failed to apply patch for webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-11-28 13:30:14 UTC) #5
kjellander_webrtc
4 years ago (2016-11-28 14:11:01 UTC) #6
On 2016/11/28 13:30:14, commit-bot: I haz the power wrote:
> Failed to apply patch for
> webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc:
> While running git apply --index -p1;
>   error: patch failed:
> webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc:38
>   error: webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc: patch
> does not apply
> 
> Patch:       webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
> Index: webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
> diff --git a/webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
> b/webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
> index
>
34c5fa77cb35dab3dcf94cc444466a1227506f5a..f8a4b6979f16a0a4916578345e544b7440c9c838
> 100644
> --- a/webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
> +++ b/webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
> @@ -11,7 +11,6 @@
>  // This test doesn't actually verify the output since it's just printed
>  // to stdout by void functions, but it's still useful as it executes the
code.
>  
> -#include <stdio.h>
>  #include <fstream>
>  #include <string>
>  
> @@ -38,32 +37,6 @@
>    static FILE* logfile_;
>  };
>  FILE* VideoQualityAnalysisTest::logfile_ = NULL;
> -
> -TEST_F(VideoQualityAnalysisTest, MatchExtractedY4mFrame) {
> -  std::string video_file =
> -         webrtc::test::ResourcePath("reference_less_video_test_file", "y4m");
> -
> -  std::string extracted_frame_from_video_file =
> -         webrtc::test::ResourcePath("video_quality_analysis_frame", "txt");
> -
> -  int frame_height = 720, frame_width = 1280;
> -  int frame_number = 2;
> -  int size = GetI420FrameSize(frame_width, frame_height);
> -  uint8_t* result_frame = new uint8_t[size];
> -  uint8_t* expected_frame = new uint8_t[size];
> -
> -  FILE* input_file = fopen(extracted_frame_from_video_file.c_str(), "rb");
> -  fread(expected_frame, 1, size, input_file);
> -
> -  ExtractFrameFromY4mFile(video_file.c_str(),
> -                          frame_width, frame_height,
> -                          frame_number, result_frame);
> -
> -  EXPECT_EQ(*expected_frame, *result_frame);
> -  fclose(input_file);
> -  delete[] result_frame;
> -  delete[] expected_frame;
> -}
>  
>  TEST_F(VideoQualityAnalysisTest, PrintAnalysisResultsEmpty) {
>    ResultsContainer result;

Working revert in https://codereview.webrtc.org/2535783002.
Closing this.

Powered by Google App Engine
This is Rietveld 408576698