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

Issue 897483002: Refactored pixel format resize operations in media/video/capture into a function called VideoCaptu… (Closed)

Created:
5 years, 10 months ago by emircan
Modified:
5 years, 10 months ago
Reviewers:
perkj_chrome, mcasas
CC:
chromium-reviews, posciak+watch_chromium.org, feature-media-reviews_chromium.org, wjia+watch_chromium.org, mcasas+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactored pixel format resize operations in media/video/capture into a function called VideoCaptureFormat::GetSizeForVideoPixelFormat(). BUG= TEST=VideoCaptureDeviceTest.* in media_unittests pass. Committed: https://crrev.com/79288ba0b63021e8731e0401b8a4a9055d33fa10 Cr-Commit-Position: refs/heads/master@{#315175}

Patch Set 1 #

Patch Set 2 : Refactor of image size calculations #

Total comments: 4

Patch Set 3 : Changed function to a public member. Added tests. #

Total comments: 7

Patch Set 4 : Use static_cast and change tests. #

Patch Set 5 : Fixed operator spacing. #

Total comments: 5

Patch Set 6 : Changed comments and outputs. #

Patch Set 7 : Resolve merge conflicts and rebase. #

Patch Set 8 : Cleaned emacs buffers. #

Total comments: 2

Patch Set 9 : Modified comments. #

Patch Set 10 : Rebase. #

Patch Set 11 : Changed some wording in comments #

Total comments: 1

Patch Set 12 : Removed todo and changed comment. #

Patch Set 13 : Added checks for unsupported pixel formats. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -7 lines) Patch
M content/browser/renderer_host/media/video_capture_controller.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M media/video/capture/file_video_capture_device.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/video/capture/file_video_capture_device.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M media/video/capture/video_capture_device_unittest.cc View 1 2 3 4 4 chunks +10 lines, -0 lines 0 comments Download
M media/video/capture/video_capture_types.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M media/video/capture/video_capture_types.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +30 lines, -0 lines 0 comments Download
M media/video/capture/win/sink_input_pin_win.cc View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 40 (15 generated)
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/897483002/1
5 years, 10 months ago (2015-02-02 17:56:33 UTC) #2
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 10 months ago (2015-02-02 17:56:35 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/897483002/1
5 years, 10 months ago (2015-02-02 17:58:49 UTC) #6
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 10 months ago (2015-02-02 17:58:52 UTC) #8
emircan
5 years, 10 months ago (2015-02-02 18:53:30 UTC) #12
emircan
PTAL
5 years, 10 months ago (2015-02-02 19:26:47 UTC) #13
mcasas
Needs some unit testing too. https://codereview.chromium.org/897483002/diff/20001/media/video/capture/video_capture_types.cc File media/video/capture/video_capture_types.cc (right): https://codereview.chromium.org/897483002/diff/20001/media/video/capture/video_capture_types.cc#newcode36 media/video/capture/video_capture_types.cc:36: return VideoCaptureFormat::GetSizeForVideoPixelFormat(frame_size, No need ...
5 years, 10 months ago (2015-02-02 19:46:46 UTC) #14
emircan
PTAL. I chose to declare it as a member function as all the calls are ...
5 years, 10 months ago (2015-02-03 20:03:31 UTC) #15
mcasas
trybots please. https://codereview.chromium.org/897483002/diff/40001/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): https://codereview.chromium.org/897483002/diff/40001/content/browser/renderer_host/media/video_capture_controller.cc#newcode430 content/browser/renderer_host/media/video_capture_controller.cc:430: DCHECK_EQ(frame_format.ImageAllocationSize(), Instead of reimplementing ImageAllocationSize() for DCHECKing ...
5 years, 10 months ago (2015-02-03 20:48:46 UTC) #16
emircan
PTAL I used static_cast as suggested. I changed the unit test to check length at ...
5 years, 10 months ago (2015-02-04 02:30:13 UTC) #17
emircan
PTAL
5 years, 10 months ago (2015-02-04 03:59:05 UTC) #18
mcasas
Can I haz bots please? :) https://codereview.chromium.org/897483002/diff/80001/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): https://codereview.chromium.org/897483002/diff/80001/content/browser/renderer_host/media/video_capture_controller.cc#newcode471 content/browser/renderer_host/media/video_capture_controller.cc:471: Add a comment ...
5 years, 10 months ago (2015-02-04 17:00:02 UTC) #19
emircan
PTAL. Thanks for pointing out the commenting and spacing error. I am learning how to ...
5 years, 10 months ago (2015-02-04 19:57:02 UTC) #20
mcasas
LGTM modulo the comments below. (you need + reviews though). https://codereview.chromium.org/897483002/diff/140001/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): https://codereview.chromium.org/897483002/diff/140001/content/browser/renderer_host/media/video_capture_controller.cc#newcode472 ...
5 years, 10 months ago (2015-02-04 23:02:39 UTC) #21
emircan
PTAL.
5 years, 10 months ago (2015-02-06 00:11:39 UTC) #24
perkj_chrome
lgtm if the todo is removed. https://codereview.chromium.org/897483002/diff/200001/media/video/capture/video_capture_types.h File media/video/capture/video_capture_types.h (right): https://codereview.chromium.org/897483002/diff/200001/media/video/capture/video_capture_types.h#newcode71 media/video/capture/video_capture_types.h:71: // VideoCaptureFormat, with ...
5 years, 10 months ago (2015-02-06 08:27:30 UTC) #25
emircan
On 2015/02/06 08:27:30, perkj wrote: > lgtm if the todo is removed. I removed the ...
5 years, 10 months ago (2015-02-06 17:20:33 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/897483002/220001
5 years, 10 months ago (2015-02-06 17:34:20 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/22418)
5 years, 10 months ago (2015-02-06 18:47:12 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/897483002/240001
5 years, 10 months ago (2015-02-06 22:41:01 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/120640) win_gpu_triggered_tests on tryserver.chromium.gpu (JOB_FAILED, ...
5 years, 10 months ago (2015-02-07 00:25:10 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/897483002/240001
5 years, 10 months ago (2015-02-07 02:20:19 UTC) #37
commit-bot: I haz the power
Committed patchset #13 (id:240001)
5 years, 10 months ago (2015-02-07 03:34:45 UTC) #38
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/79288ba0b63021e8731e0401b8a4a9055d33fa10 Cr-Commit-Position: refs/heads/master@{#315175}
5 years, 10 months ago (2015-02-07 03:35:30 UTC) #39
phoglund_chromium
5 years, 10 months ago (2015-02-07 12:45:00 UTC) #40
Message was sent while issue was closed.
A revert of this CL (patchset #13 id:240001) has been created in
https://codereview.chromium.org/898803004/ by phoglund@chromium.org.

The reason for reverting is: This breaks the WebRTC real webcam tests on
Windows. See for instance
http://chromegw.corp.google.com/i/internal.chromium.webrtc/builders/Win7%20Te....
The error is 

[2292:2232:0206/211958:997267:FATAL:video_capture_controller.cc(474)] Check
failed: static_cast<size_t>(length) >= frame_format.ImageAllocationSize() (0 vs.
614400)

The Win bots are equipped with C920 webcams. I logged into the bot to make sure
the webcam was working right - it is as far I can see..

Powered by Google App Engine
This is Rietveld 408576698