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

Issue 74563002: AndroidVideoEncodeAccelerator is born! (Closed)

Created:
7 years, 1 month ago by Ami GONE FROM CHROMIUM
Modified:
7 years ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, wjia+watch_chromium.org, Jeremy Mao, wolenetz
Visibility:
Public.

Description

AndroidVideoEncodeAccelerator is born! AVEA is the encode-side analogue of AndroidVideoDecodeAccelerator, or the Android analogue of ExynosVideoEncodeAccelerator, depending on your POV. Also included in this CL: - MediaCodecBridge learns how to be an encoder, too. - MediaCodecBridge::Start is sunk into Create since they were always called together. - android.os.Log() is given an exception parameter instead of concatenating its .toString() (and losing its stacktrace!) - MediaCodecBridge exposes its buffers to reduce unnecessary memcpy'ing Performance impact: isolating encode performance by making Android decode only 240p and no audio send/receive with the following URLs: z620/gprecise: https://apprtc.appspot.com/?video=maxHeight=240&audio=false&r=<ROOM>; Nexus5: https://apprtc.appspot.com/?video=minHeight=720,maxHeight=720,minWidth=1280,maxWidth=1280&audio=false&r=<ROOM>; All 4 cores are max'd are running at top speed (ondemand governor ramps them up on its own with this workload). SW encode: CPU utilization 80% and desktop receives 0.1-0.5FPS (jankily). HW encode: CPU utilization 60-70% and desktop receives 30FPS reliably. Comparing an easier workload of encoding 360p: z620/gprecise: https://apprtc.appspot.com/?video=maxHeight=240&audio=false&r=<ROOM>; Nexus5: https://apprtc.appspot.com/?video=minHeight=360,maxHeight=360,minWidth=640,maxWidth=640&audio=false&r=<ROOM>; Set all 4 cores to "performance" governor for stable comparison. SW encode: CPU utilization 63% and desktop receives 30FPS reliably. HW encode: CPU utilization 53% and desktop receives 30FPS reliably. BUG=313115 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238658

Patch Set 1 : . #

Total comments: 44

Patch Set 2 : xhwang review comments, clang-format, and flags support #

Patch Set 3 : Added blacklist-based disabling #

Total comments: 11

Patch Set 4 : kbr comments. #

Total comments: 4

Patch Set 5 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1105 lines, -207 lines) Patch
M chrome/browser/about_flags.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/gpu/compositor_util.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_data_manager_impl_private.cc View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/resources/gpu/info_view.js View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/media/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 2 3 3 chunks +10 lines, -10 lines 0 comments Download
A content/common/gpu/media/android_video_encode_accelerator.h View 1 1 chunk +115 lines, -0 lines 0 comments Download
A content/common/gpu/media/android_video_encode_accelerator.cc View 1 2 3 1 chunk +400 lines, -0 lines 0 comments Download
M content/common/gpu/media/gpu_video_encode_accelerator.cc View 1 2 3 4 3 chunks +7 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_dependency_factory.cc View 1 2 chunks +11 lines, -0 lines 0 comments Download
M gpu/config/gpu_blacklist.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/config/gpu_blacklist_unittest.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/config/gpu_feature_type.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M gpu/config/software_rendering_list_json.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaCodecBridge.java View 1 2 3 4 19 chunks +100 lines, -36 lines 0 comments Download
M media/base/android/media_codec_bridge.h View 1 2 3 7 chunks +84 lines, -28 lines 0 comments Download
M media/base/android/media_codec_bridge.cc View 1 2 3 15 chunks +264 lines, -105 lines 0 comments Download
M media/base/android/media_codec_bridge_unittest.cc View 1 2 3 4 7 chunks +48 lines, -21 lines 0 comments Download
M media/base/android/media_decoder_job.cc View 1 1 chunk +8 lines, -3 lines 0 comments Download
M media/base/android/video_decoder_job.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
Ami GONE FROM CHROMIUM
@xhwang: PTAL. I hope you're happy to review the encoder but if not let me ...
7 years, 1 month ago (2013-11-16 01:26:19 UTC) #1
xhwang
This CL is looking pretty good. Mostly nits. https://codereview.chromium.org/74563002/diff/30001/content/common/gpu/media/android_video_encode_accelerator.cc File content/common/gpu/media/android_video_encode_accelerator.cc (right): https://codereview.chromium.org/74563002/diff/30001/content/common/gpu/media/android_video_encode_accelerator.cc#newcode28 content/common/gpu/media/android_video_encode_accelerator.cc:28: // ...
7 years, 1 month ago (2013-11-19 00:11:24 UTC) #2
Ami GONE FROM CHROMIUM
Thanks for the review, Xiaohan. In addition to addressing your comments, I: - Added perf ...
7 years, 1 month ago (2013-11-21 22:59:07 UTC) #3
Ami GONE FROM CHROMIUM
On 2013/11/21 22:59:07, Ami Fischman wrote: > I'd rather the flag went the other way ...
7 years, 1 month ago (2013-11-22 02:07:23 UTC) #4
xhwang
lgtm % nits, sorry for the delay https://codereview.chromium.org/74563002/diff/330001/content/browser/gpu/compositor_util.cc File content/browser/gpu/compositor_util.cc (right): https://codereview.chromium.org/74563002/diff/330001/content/browser/gpu/compositor_util.cc#newcode148 content/browser/gpu/compositor_util.cc:148: "Accelerated video ...
7 years ago (2013-11-26 18:08:27 UTC) #5
Ami GONE FROM CHROMIUM
Thanks for the review. https://codereview.chromium.org/74563002/diff/330001/content/browser/gpu/compositor_util.cc File content/browser/gpu/compositor_util.cc (right): https://codereview.chromium.org/74563002/diff/330001/content/browser/gpu/compositor_util.cc#newcode148 content/browser/gpu/compositor_util.cc:148: "Accelerated video encode has been ...
7 years ago (2013-11-26 19:11:58 UTC) #6
Ami GONE FROM CHROMIUM
@avi: please OWNERS-review content/content_common.gypi and content/browser/resources/gpu/info_view.js @kbr: please OWNERS-review everything else that doesn't have /media/ ...
7 years ago (2013-11-26 19:17:11 UTC) #7
xhwang
https://codereview.chromium.org/74563002/diff/330001/content/browser/gpu/gpu_data_manager_impl_private.cc File content/browser/gpu/gpu_data_manager_impl_private.cc (right): https://codereview.chromium.org/74563002/diff/330001/content/browser/gpu/gpu_data_manager_impl_private.cc#newcode651 content/browser/gpu/gpu_data_manager_impl_private.cc:651: command_line->AppendSwitch(switches::kDisableWebRtcHWEncoding); On 2013/11/26 19:11:59, Ami Fischman wrote: > On ...
7 years ago (2013-11-26 19:19:25 UTC) #8
Ken Russell (switch to Gerrit)
LGTM for any parts for which I'm an OWNER. Couple of minor comments. https://codereview.chromium.org/74563002/diff/330001/content/common/gpu/media/android_video_decode_accelerator.cc File ...
7 years ago (2013-11-27 00:18:20 UTC) #9
Ami GONE FROM CHROMIUM
https://codereview.chromium.org/74563002/diff/330001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/74563002/diff/330001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode87 content/common/gpu/media/android_video_decode_accelerator.cc:87: if (media::VideoCodecBridge::IsKnownUnaccelerated(codec_, false)) On 2013/11/27 00:18:20, Ken Russell wrote: ...
7 years ago (2013-11-27 01:13:12 UTC) #10
Ken Russell (switch to Gerrit)
Still LGTM. https://codereview.chromium.org/74563002/diff/330001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/74563002/diff/330001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode87 content/common/gpu/media/android_video_decode_accelerator.cc:87: if (media::VideoCodecBridge::IsKnownUnaccelerated(codec_, false)) On 2013/11/27 01:13:13, Ami ...
7 years ago (2013-11-27 01:16:37 UTC) #11
Avi (use Gerrit)
stampity stamp LGTM
7 years ago (2013-12-02 22:12:38 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/74563002/430001
7 years ago (2013-12-02 22:24:05 UTC) #13
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=38952
7 years ago (2013-12-02 22:43:55 UTC) #14
Ami GONE FROM CHROMIUM
@fbarchard: please OWNERS-review the addition of third_party/libyuv to content/common/gpu/media/DEPS: https://codereview.chromium.org/74563002/diff/430001/content/common/gpu/media/DEPS (this is the presubmit script's ...
7 years ago (2013-12-02 23:27:25 UTC) #15
fbarchard
lgtm https://codereview.chromium.org/74563002/diff/430001/content/common/gpu/media/android_video_encode_accelerator.cc File content/common/gpu/media/android_video_encode_accelerator.cc (right): https://codereview.chromium.org/74563002/diff/430001/content/common/gpu/media/android_video_encode_accelerator.cc#newcode291 content/common/gpu/media/android_video_encode_accelerator.cc:291: frame->rows(VideoFrame::kYPlane); indent of line 291 looks wrong -> ...
7 years ago (2013-12-03 04:51:09 UTC) #16
Ami GONE FROM CHROMIUM
Thanks for the review. https://codereview.chromium.org/74563002/diff/430001/content/common/gpu/media/android_video_encode_accelerator.cc File content/common/gpu/media/android_video_encode_accelerator.cc (right): https://codereview.chromium.org/74563002/diff/430001/content/common/gpu/media/android_video_encode_accelerator.cc#newcode291 content/common/gpu/media/android_video_encode_accelerator.cc:291: frame->rows(VideoFrame::kYPlane); On 2013/12/03 04:51:09, fbarchard ...
7 years ago (2013-12-03 06:46:19 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/74563002/430001
7 years ago (2013-12-03 08:05:22 UTC) #18
commit-bot: I haz the power
Retried try job too often on android_clang_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_clang_dbg&number=97382
7 years ago (2013-12-03 11:23:18 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/74563002/450001
7 years ago (2013-12-03 18:49:23 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/74563002/450001
7 years ago (2013-12-03 19:11:33 UTC) #21
commit-bot: I haz the power
Retried try job too often on android_aosp for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_aosp&number=31418
7 years ago (2013-12-03 19:47:05 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/74563002/480001
7 years ago (2013-12-03 20:53:28 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/74563002/480001
7 years ago (2013-12-03 23:37:27 UTC) #24
commit-bot: I haz the power
Retried try job too often on android_aosp for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_aosp&number=31536
7 years ago (2013-12-04 01:02:22 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/74563002/500001
7 years ago (2013-12-04 01:29:05 UTC) #26
commit-bot: I haz the power
Retried try job too often on android_aosp for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_aosp&number=31583
7 years ago (2013-12-04 03:05:17 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/74563002/520001
7 years ago (2013-12-04 03:58:39 UTC) #28
commit-bot: I haz the power
Retried try job too often on android_aosp for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_aosp&number=31614
7 years ago (2013-12-04 05:19:51 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/74563002/540001
7 years ago (2013-12-04 06:40:46 UTC) #30
commit-bot: I haz the power
7 years ago (2013-12-04 09:28:00 UTC) #31
Message was sent while issue was closed.
Change committed as 238658

Powered by Google App Engine
This is Rietveld 408576698