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

Issue 2156003006: Android video capture: use new libyuv::Android420ToI420 API for format converting. (Closed)

Created:
4 years, 5 months ago by braveyao
Modified:
4 years, 5 months ago
Reviewers:
mcasas, miu
CC:
chromium-reviews, posciak+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_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

Android video capture: use new libyuv::Android420ToI420 API for format converting. libyuv offers a new API, Android420ToI420, to convert the Android YUV_420_888 frame (which has interleaved UV planes) to normal I420 frame. This can significantly reduce the de-interlacing time on Android, up to dozens of milliseconds, which can help a lot on the overall end-to-end video delay. BUG=629342 Committed: https://crrev.com/b3edc847c341fa19ccb964ba2ebf89325c8c3723 Cr-Commit-Position: refs/heads/master@{#407183}

Patch Set 1 #

Total comments: 7

Patch Set 2 : address comments and remove unused variables. #

Patch Set 3 : rename variable and format #

Total comments: 6

Patch Set 4 : rebase with no code change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -118 lines) Patch
M media/capture/content/android/screen_capture_machine_android.h View 1 chunk +1 line, -1 line 0 comments Download
M media/capture/content/android/screen_capture_machine_android.cc View 1 2 5 chunks +64 lines, -67 lines 0 comments Download
M media/capture/video/android/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M media/capture/video/android/java/src/org/chromium/media/VideoCapture.java View 2 chunks +6 lines, -0 lines 0 comments Download
M media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java View 1 4 chunks +5 lines, -49 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.h View 1 chunk +13 lines, -0 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.cc View 1 2 3 3 chunks +54 lines, -1 line 0 comments Download

Messages

Total messages: 47 (31 generated)
braveyao
Hi Miguel, as we discussed, here is the cl. Please take a look.
4 years, 5 months ago (2016-07-19 00:53:56 UTC) #4
mcasas
Some minor comments. Please review and rewrite the Description of the CL. https://codereview.chromium.org/2156003006/diff/1/media/capture/content/android/screen_capture_machine_android.cc File media/capture/content/android/screen_capture_machine_android.cc ...
4 years, 5 months ago (2016-07-19 01:22:58 UTC) #5
braveyao
Comments are addressed. PTAL. As to the description of cl, could you please be more ...
4 years, 5 months ago (2016-07-19 19:06:02 UTC) #12
mcasas
On 2016/07/19 19:06:02, braveyao wrote: > Comments are addressed. PTAL. > > As to the ...
4 years, 5 months ago (2016-07-19 20:48:11 UTC) #13
braveyao
Done. PTAL. https://codereview.chromium.org/2156003006/diff/1/media/capture/content/android/screen_capture_machine_android.cc File media/capture/content/android/screen_capture_machine_android.cc (right): https://codereview.chromium.org/2156003006/diff/1/media/capture/content/android/screen_capture_machine_android.cc#newcode138 media/capture/content/android/screen_capture_machine_android.cc:138: scoped_refptr<VideoFrame> unscaled_frame = frame; On 2016/07/19 19:06:01, ...
4 years, 5 months ago (2016-07-20 18:05:21 UTC) #17
mcasas
LGTM % comment. Also, this code is notoriously not unit-tested, https://crbug.com/626857 (although it has content_browsertests ...
4 years, 5 months ago (2016-07-20 18:26:50 UTC) #18
miu
Drive-by comments: https://codereview.chromium.org/2156003006/diff/40001/media/capture/video/android/video_capture_device_android.cc File media/capture/video/android/video_capture_device_android.cc (right): https://codereview.chromium.org/2156003006/diff/40001/media/capture/video/android/video_capture_device_android.cc#newcode269 media/capture/video/android/video_capture_device_android.cc:269: libyuv::Android420ToI420(y_src, y_stride, u_src, uv_row_stride, v_src, Sanity-check question: ...
4 years, 5 months ago (2016-07-20 19:34:22 UTC) #19
braveyao
miu@, thanks for the comments. Please check the answers. https://codereview.chromium.org/2156003006/diff/40001/media/capture/video/android/video_capture_device_android.cc File media/capture/video/android/video_capture_device_android.cc (right): https://codereview.chromium.org/2156003006/diff/40001/media/capture/video/android/video_capture_device_android.cc#newcode269 media/capture/video/android/video_capture_device_android.cc:269: ...
4 years, 5 months ago (2016-07-20 22:02:04 UTC) #23
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/2156003006/40001
4 years, 5 months ago (2016-07-21 18:09:37 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/39318) ios-device-gn on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 5 months ago (2016-07-21 18:12:23 UTC) #27
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/2156003006/60001
4 years, 5 months ago (2016-07-21 19:16:46 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/108268)
4 years, 5 months ago (2016-07-21 19:31:23 UTC) #32
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/2156003006/60001
4 years, 5 months ago (2016-07-22 17:07:50 UTC) #42
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-22 17:12:05 UTC) #44
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/b3edc847c341fa19ccb964ba2ebf89325c8c3723 Cr-Commit-Position: refs/heads/master@{#407183}
4 years, 5 months ago (2016-07-22 17:14:41 UTC) #46
miu
4 years, 5 months ago (2016-07-22 20:44:25 UTC) #47
Message was sent while issue was closed.
https://codereview.chromium.org/2156003006/diff/40001/media/capture/video/and...
File media/capture/video/android/video_capture_device_android.cc (right):

https://codereview.chromium.org/2156003006/diff/40001/media/capture/video/and...
media/capture/video/android/video_capture_device_android.cc:269:
libyuv::Android420ToI420(y_src, y_stride, u_src, uv_row_stride, v_src,
On 2016/07/20 22:02:04, braveyao wrote:
> On 2016/07/20 19:34:22, miu wrote:
> > Sanity-check question: Is client code allowed to modify this memory? You
might
> > want to check the Android documentation (or contact Android devs, if the
> > documentation is not sufficient).
> 
> Not quite understand the concern here. Planes have been copied to local
'buffer'
> here, so what client code gets should have nothing to do with the input buffer
> any more (not like the above OnFrameAvailable() ). 

Oh, never mind. I read this wrong. No problem here! :)

Powered by Google App Engine
This is Rietveld 408576698