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

Issue 2058413003: H264 HW encode using MediaFoundation (Closed)

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

Description

H264 HW encode using MediaFoundation This CL adds MediaFoundationVideoEncodeAccelerator which enables H264 encode support using MediaFoundation on Windows 8.1+. Also, it includes a refactor of common MediaFoundation classes under mf_helpers.*. Note that, this is the first CL and H264 codec is still behind a flag. Design Doc(with perf measurements): http://goo.gl/UCnwyA BUG=590060 TEST= Tested AppRTC loopback with Chrome flag "--enable-webrtc-hw-h264-encoding" and "--enable-mf-h264-encoding" on https://apprtc.appspot.com/?debug=loopback&vsc=h264 Also, added WIN specific sections at vea_unittests. Committed: https://crrev.com/e75bb4429ddcf2e79ae678a544064069718ee7a0 Cr-Commit-Position: refs/heads/master@{#406876}

Patch Set 1 #

Total comments: 36

Patch Set 2 : ananta@ comments. #

Patch Set 3 : Rebase. #

Patch Set 4 : Refactor unittests. #

Patch Set 5 : Rebase #

Total comments: 42

Patch Set 6 : grt@ and sanders@ comments. #

Total comments: 21

Patch Set 7 : grt@ and wuchengli@ comments. #

Total comments: 12

Patch Set 8 : grt@ comments. #

Total comments: 16

Patch Set 9 : ananta@ and sanders@ comments. #

Total comments: 6

Patch Set 10 : wuchengli@ comments. #

Total comments: 2

Patch Set 11 : wuchengli@ and ananta@ comments. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+980 lines, -127 lines) Patch
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M media/base/media_switches.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M media/base/media_switches.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M media/base/win/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A media/base/win/mf_helpers.h View 1 2 3 4 1 chunk +77 lines, -0 lines 0 comments Download
A media/base/win/mf_helpers.cc View 1 2 3 4 1 chunk +57 lines, -0 lines 0 comments Download
M media/gpu/BUILD.gn View 1 2 3 4 3 chunks +7 lines, -2 lines 0 comments Download
M media/gpu/dxva_video_decode_accelerator_win.cc View 1 2 3 4 6 chunks +3 lines, -101 lines 0 comments Download
M media/gpu/ipc/service/gpu_video_encode_accelerator.h View 1 chunk +4 lines, -0 lines 0 comments Download
M media/gpu/ipc/service/gpu_video_encode_accelerator.cc View 1 2 3 4 5 3 chunks +19 lines, -0 lines 0 comments Download
A media/gpu/media_foundation_video_encode_accelerator_win.h View 1 2 3 4 5 6 7 8 1 chunk +147 lines, -0 lines 0 comments Download
A media/gpu/media_foundation_video_encode_accelerator_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +562 lines, -0 lines 1 comment Download
M media/gpu/video_encode_accelerator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 22 chunks +84 lines, -23 lines 0 comments Download
M media/media.gyp View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M media/media_gpu.gypi View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 91 (58 generated)
emircan
ananta@ PTAL for Media Foundation related code. I will send it for owners review afterwards.
4 years, 6 months ago (2016-06-15 05:35:10 UTC) #7
ananta
Looks reasonable. General comment is please don't assume that a Windows API is going to ...
4 years, 5 months ago (2016-06-28 22:50:02 UTC) #18
emircan
https://codereview.chromium.org/2058413003/diff/200001/media/gpu/media_foundation_video_encode_accelerator_win.cc File media/gpu/media_foundation_video_encode_accelerator_win.cc (right): https://codereview.chromium.org/2058413003/diff/200001/media/gpu/media_foundation_video_encode_accelerator_win.cc#newcode8 media/gpu/media_foundation_video_encode_accelerator_win.cc:8: // #error This file should only be built on ...
4 years, 5 months ago (2016-07-02 00:07:38 UTC) #19
emircan
Friendly PING on this. Rebasing takes quite a while.
4 years, 5 months ago (2016-07-13 03:05:45 UTC) #21
emircan
PING again. Adding wuchengli@ and sandersd@ for /media/gpu OWNERS review.
4 years, 5 months ago (2016-07-14 16:20:40 UTC) #28
grt (UTC plus 2)
Some comments on the new _win file to get you started. Not sure I'm the ...
4 years, 5 months ago (2016-07-14 20:07:25 UTC) #30
sandersd (OOO until July 31)
https://codereview.chromium.org/2058413003/diff/300001/media/base/media_switches.cc File media/base/media_switches.cc (right): https://codereview.chromium.org/2058413003/diff/300001/media/base/media_switches.cc#newcode59 media/base/media_switches.cc:59: const char kEnableWinHWH264Encoding[] = "enable-win-hw-h264-encoding"; Probably better to remove ...
4 years, 5 months ago (2016-07-14 22:38:04 UTC) #31
emircan
https://codereview.chromium.org/2058413003/diff/300001/media/base/media_switches.cc File media/base/media_switches.cc (right): https://codereview.chromium.org/2058413003/diff/300001/media/base/media_switches.cc#newcode59 media/base/media_switches.cc:59: const char kEnableWinHWH264Encoding[] = "enable-win-hw-h264-encoding"; On 2016/07/14 22:38:04, sandersd ...
4 years, 5 months ago (2016-07-15 04:58:31 UTC) #35
grt (UTC plus 2)
https://codereview.chromium.org/2058413003/diff/300001/media/gpu/media_foundation_video_encode_accelerator_win.h File media/gpu/media_foundation_video_encode_accelerator_win.h (right): https://codereview.chromium.org/2058413003/diff/300001/media/gpu/media_foundation_video_encode_accelerator_win.h#newcode99 media/gpu/media_foundation_video_encode_accelerator_win.h:99: const scoped_refptr<base::SingleThreadTaskRunner> client_task_runner_; On 2016/07/15 04:58:31, emircan wrote: > ...
4 years, 5 months ago (2016-07-15 07:59:04 UTC) #38
wuchengli
I reviewed the following files. I'm not familiar with other windows files in media/gpu. media/gpu/BUILD.gn ...
4 years, 5 months ago (2016-07-15 13:39:40 UTC) #39
emircan
https://codereview.chromium.org/2058413003/diff/300001/media/gpu/media_foundation_video_encode_accelerator_win.h File media/gpu/media_foundation_video_encode_accelerator_win.h (right): https://codereview.chromium.org/2058413003/diff/300001/media/gpu/media_foundation_video_encode_accelerator_win.h#newcode99 media/gpu/media_foundation_video_encode_accelerator_win.h:99: const scoped_refptr<base::SingleThreadTaskRunner> client_task_runner_; On 2016/07/15 07:59:03, grt (UTC plus ...
4 years, 5 months ago (2016-07-16 06:56:38 UTC) #41
emircan
4 years, 5 months ago (2016-07-16 06:56:43 UTC) #42
grt (UTC plus 2)
I'm getting near the end of my review of media_foundation_video_encode_accelerator_win.* here. Please be sure to ...
4 years, 5 months ago (2016-07-18 08:35:04 UTC) #46
emircan
https://codereview.chromium.org/2058413003/diff/340001/media/gpu/media_foundation_video_encode_accelerator_win.cc File media/gpu/media_foundation_video_encode_accelerator_win.cc (right): https://codereview.chromium.org/2058413003/diff/340001/media/gpu/media_foundation_video_encode_accelerator_win.cc#newcode42 media/gpu/media_foundation_video_encode_accelerator_win.cc:42: static const wchar_t* const kMediaFoundationVideoEncoderDLLs[] = { On 2016/07/18 ...
4 years, 5 months ago (2016-07-18 20:45:22 UTC) #47
grt (UTC plus 2)
win stuff lgtm. please get OWNERS approval as requested.
4 years, 5 months ago (2016-07-18 20:50:57 UTC) #50
emircan
On 2016/07/18 20:50:57, grt (UTC plus 2) wrote: > win stuff lgtm. please get OWNERS ...
4 years, 5 months ago (2016-07-18 22:07:49 UTC) #51
ananta
https://codereview.chromium.org/2058413003/diff/360001/media/gpu/media_foundation_video_encode_accelerator_win.cc File media/gpu/media_foundation_video_encode_accelerator_win.cc (right): https://codereview.chromium.org/2058413003/diff/360001/media/gpu/media_foundation_video_encode_accelerator_win.cc#newcode7 media/gpu/media_foundation_video_encode_accelerator_win.cc:7: #if defined(OS_WIN) Remove if defined() This file should only ...
4 years, 5 months ago (2016-07-18 23:26:08 UTC) #54
sandersd (OOO until July 31)
media/ lgtm (excluding gpu/ which I did not fully review). https://codereview.chromium.org/2058413003/diff/360001/media/base/media_switches.cc File media/base/media_switches.cc (right): https://codereview.chromium.org/2058413003/diff/360001/media/base/media_switches.cc#newcode58 ...
4 years, 5 months ago (2016-07-18 23:50:53 UTC) #55
emircan
https://codereview.chromium.org/2058413003/diff/360001/media/base/media_switches.cc File media/base/media_switches.cc (right): https://codereview.chromium.org/2058413003/diff/360001/media/base/media_switches.cc#newcode58 media/base/media_switches.cc:58: // Enables H264 HW encode acceleration using Media Foundation ...
4 years, 5 months ago (2016-07-19 03:09:20 UTC) #56
wuchengli
https://codereview.chromium.org/2058413003/diff/320001/media/gpu/video_encode_accelerator_unittest.cc File media/gpu/video_encode_accelerator_unittest.cc (right): https://codereview.chromium.org/2058413003/diff/320001/media/gpu/video_encode_accelerator_unittest.cc#newcode138 media/gpu/video_encode_accelerator_unittest.cc:138: const char* g_default_in_parameters = "&320&192&1&out.h264&200000"; On 2016/07/16 06:56:38, emircan ...
4 years, 5 months ago (2016-07-19 15:50:45 UTC) #61
emircan
https://codereview.chromium.org/2058413003/diff/380001/media/gpu/video_encode_accelerator_unittest.cc File media/gpu/video_encode_accelerator_unittest.cc (right): https://codereview.chromium.org/2058413003/diff/380001/media/gpu/video_encode_accelerator_unittest.cc#newcode138 media/gpu/video_encode_accelerator_unittest.cc:138: const char* g_default_in_parameters = "&320&192&1&out.h264&200000"; On 2016/07/19 15:50:44, wuchengli ...
4 years, 5 months ago (2016-07-19 22:14:41 UTC) #63
ananta
https://codereview.chromium.org/2058413003/diff/360001/media/gpu/media_foundation_video_encode_accelerator_win.cc File media/gpu/media_foundation_video_encode_accelerator_win.cc (right): https://codereview.chromium.org/2058413003/diff/360001/media/gpu/media_foundation_video_encode_accelerator_win.cc#newcode418 media/gpu/media_foundation_video_encode_accelerator_win.cc:418: base::Bind(&MediaFoundationVideoEncodeAccelerator::EncodeTask, On 2016/07/19 03:09:20, emircan wrote: > On 2016/07/18 ...
4 years, 5 months ago (2016-07-20 01:57:22 UTC) #68
wuchengli
https://codereview.chromium.org/2058413003/diff/400001/media/gpu/video_encode_accelerator_unittest.cc File media/gpu/video_encode_accelerator_unittest.cc (right): https://codereview.chromium.org/2058413003/diff/400001/media/gpu/video_encode_accelerator_unittest.cc#newcode113 media/gpu/video_encode_accelerator_unittest.cc:113: // "in_filename&width&height&profile&out_filename&requested_bitrate Pawel, Kuang-che and I discussed. - Can ...
4 years, 5 months ago (2016-07-20 09:22:18 UTC) #69
emircan
https://codereview.chromium.org/2058413003/diff/360001/media/gpu/media_foundation_video_encode_accelerator_win.cc File media/gpu/media_foundation_video_encode_accelerator_win.cc (right): https://codereview.chromium.org/2058413003/diff/360001/media/gpu/media_foundation_video_encode_accelerator_win.cc#newcode418 media/gpu/media_foundation_video_encode_accelerator_win.cc:418: base::Bind(&MediaFoundationVideoEncodeAccelerator::EncodeTask, On 2016/07/20 01:57:22, ananta wrote: > On 2016/07/19 ...
4 years, 5 months ago (2016-07-20 19:01:19 UTC) #71
emircan
I updated the Design Doc that includes performance measurements if you want to take a ...
4 years, 5 months ago (2016-07-20 20:18:06 UTC) #74
ananta
lgtm https://codereview.chromium.org/2058413003/diff/420001/media/gpu/media_foundation_video_encode_accelerator_win.cc File media/gpu/media_foundation_video_encode_accelerator_win.cc (right): https://codereview.chromium.org/2058413003/diff/420001/media/gpu/media_foundation_video_encode_accelerator_win.cc#newcode499 media/gpu/media_foundation_video_encode_accelerator_win.cc:499: // If there is already EncodeOutput waiting, copy ...
4 years, 5 months ago (2016-07-20 23:53:48 UTC) #78
emircan
Thanks. avi@ can you PTAL at content/* as OWNERS?
4 years, 5 months ago (2016-07-20 23:58:28 UTC) #80
Avi (use Gerrit)
content lgtm
4 years, 5 months ago (2016-07-21 00:36:23 UTC) #81
wuchengli
lgtm I reviewed gpu_video_encode_accelerator.h gpu_video_encode_accelerator.cc video_encode_accelerator_unittest.cc
4 years, 5 months ago (2016-07-21 03:20:16 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2058413003/420001
4 years, 5 months ago (2016-07-21 16:45:59 UTC) #85
commit-bot: I haz the power
Committed patchset #11 (id:420001)
4 years, 5 months ago (2016-07-21 16:51:45 UTC) #87
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/e75bb4429ddcf2e79ae678a544064069718ee7a0 Cr-Commit-Position: refs/heads/master@{#406876}
4 years, 5 months ago (2016-07-21 16:55:32 UTC) #89
jiayl
4 years, 5 months ago (2016-07-21 17:27:47 UTC) #90
Message was sent while issue was closed.
A revert of this CL (patchset #11 id:420001) has been created in
https://codereview.chromium.org/2172703002/ by jiayl@chromium.org.

The reason for reverting is: Build break:

https://bugs.chromium.org/p/chromium/issues/detail?id=630335.

Powered by Google App Engine
This is Rietveld 408576698