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

Issue 1913503002: Memory copy the VideoFrame to match the requirement for HW encoders. (Closed)

Created:
4 years, 8 months ago by xjz
Modified:
4 years, 7 months ago
Reviewers:
xhwang, miu
CC:
chromium-reviews, imcheng+watch_chromium.org, jasonroberts+watch_google.com, avayvod+watch_chromium.org, feature-media-reviews_chromium.org, xjz+watch_chromium.org, isheriff+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

Memory copy the VideoFrame to match the requirement for HW encoders. BUG=578938 Committed: https://crrev.com/957fd159c32d6a62718993e9758a9a5c276e000a Cr-Commit-Position: refs/heads/master@{#392098}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Addressed comments. #

Total comments: 4

Patch Set 3 : Used shared memory for encoder input buffer. #

Total comments: 36

Patch Set 4 : Addressed comments. #

Total comments: 12

Patch Set 5 : Addressed comments and rebased. #

Total comments: 4

Patch Set 6 : Addressed comments. #

Total comments: 10

Patch Set 7 : Add unit test and addressed Xiaohan's comments. #

Total comments: 14

Patch Set 8 : Addressed Xiaohan's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+339 lines, -9 lines) Patch
M media/base/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/base/video_util.h View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download
M media/base/video_util.cc View 1 2 3 4 5 6 7 3 chunks +79 lines, -0 lines 0 comments Download
M media/base/video_util_unittest.cc View 1 2 3 4 5 6 7 2 chunks +116 lines, -0 lines 0 comments Download
M media/cast/sender/external_video_encoder.cc View 1 2 3 4 5 11 chunks +117 lines, -8 lines 0 comments Download
M media/cast/sender/size_adaptable_video_encoder_base.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M media/cast/sender/video_sender.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (13 generated)
xjz
PTAL
4 years, 8 months ago (2016-04-25 20:31:26 UTC) #3
miu
https://codereview.chromium.org/1913503002/diff/20001/media/cast/sender/external_video_encoder.cc File media/cast/sender/external_video_encoder.cc (right): https://codereview.chromium.org/1913503002/diff/20001/media/cast/sender/external_video_encoder.cc#newcode76 media/cast/sender/external_video_encoder.cc:76: bool StridedFrameCopy(const scoped_refptr<media::VideoFrame> src_frame, Oh! Oops, I forgot to ...
4 years, 8 months ago (2016-04-25 23:39:39 UTC) #4
xjz
Addressed comments. PTAL. https://codereview.chromium.org/1913503002/diff/20001/media/cast/sender/external_video_encoder.cc File media/cast/sender/external_video_encoder.cc (right): https://codereview.chromium.org/1913503002/diff/20001/media/cast/sender/external_video_encoder.cc#newcode76 media/cast/sender/external_video_encoder.cc:76: bool StridedFrameCopy(const scoped_refptr<media::VideoFrame> src_frame, On 2016/04/25 ...
4 years, 8 months ago (2016-04-26 17:42:31 UTC) #5
miu
https://codereview.chromium.org/1913503002/diff/20001/media/cast/sender/external_video_encoder.cc File media/cast/sender/external_video_encoder.cc (right): https://codereview.chromium.org/1913503002/diff/20001/media/cast/sender/external_video_encoder.cc#newcode76 media/cast/sender/external_video_encoder.cc:76: bool StridedFrameCopy(const scoped_refptr<media::VideoFrame> src_frame, On 2016/04/26 17:42:30, xjz wrote: ...
4 years, 8 months ago (2016-04-26 19:20:17 UTC) #6
xjz
PTAL. Changes in PS#3: 1. Copy input frames to shared memory, as the encoder requires ...
4 years, 7 months ago (2016-04-27 22:13:54 UTC) #7
miu
https://codereview.chromium.org/1913503002/diff/60001/media/base/video_util.cc File media/base/video_util.cc (right): https://codereview.chromium.org/1913503002/diff/60001/media/base/video_util.cc#newcode344 media/base/video_util.cc:344: void Padding(uint8_t* frame, Please put this function in an ...
4 years, 7 months ago (2016-04-30 00:41:14 UTC) #8
xjz
Addressed comments. PTAL https://codereview.chromium.org/1913503002/diff/60001/media/base/video_util.cc File media/base/video_util.cc (right): https://codereview.chromium.org/1913503002/diff/60001/media/base/video_util.cc#newcode344 media/base/video_util.cc:344: void Padding(uint8_t* frame, On 2016/04/30 00:41:14, ...
4 years, 7 months ago (2016-05-03 01:17:59 UTC) #10
miu
https://codereview.chromium.org/1913503002/diff/100001/media/base/video_util.cc File media/base/video_util.cc (right): https://codereview.chromium.org/1913503002/diff/100001/media/base/video_util.cc#newcode28 media/base/video_util.cc:28: if (visible_size.IsEmpty()) This just occurred to me: If coded_size ...
4 years, 7 months ago (2016-05-03 19:05:43 UTC) #11
xjz
PTAL https://codereview.chromium.org/1913503002/diff/100001/media/base/video_util.cc File media/base/video_util.cc (right): https://codereview.chromium.org/1913503002/diff/100001/media/base/video_util.cc#newcode28 media/base/video_util.cc:28: if (visible_size.IsEmpty()) On 2016/05/03 19:05:43, miu wrote: > ...
4 years, 7 months ago (2016-05-03 23:30:15 UTC) #14
miu
lgtm % a couple minor things: https://codereview.chromium.org/1913503002/diff/160001/media/cast/sender/external_video_encoder.cc File media/cast/sender/external_video_encoder.cc (right): https://codereview.chromium.org/1913503002/diff/160001/media/cast/sender/external_video_encoder.cc#newcode457 media/cast/sender/external_video_encoder.cc:457: input_buffers_.push_back(std::move(memory)); Make sure ...
4 years, 7 months ago (2016-05-04 19:37:52 UTC) #15
xjz
xhwang: PTAL on media/base/*. https://codereview.chromium.org/1913503002/diff/160001/media/cast/sender/external_video_encoder.cc File media/cast/sender/external_video_encoder.cc (right): https://codereview.chromium.org/1913503002/diff/160001/media/cast/sender/external_video_encoder.cc#newcode457 media/cast/sender/external_video_encoder.cc:457: input_buffers_.push_back(std::move(memory)); On 2016/05/04 19:37:52, miu ...
4 years, 7 months ago (2016-05-04 20:43:05 UTC) #17
xhwang
https://chromiumcodereview.appspot.com/1913503002/diff/180001/media/base/video_util.cc File media/base/video_util.cc (right): https://chromiumcodereview.appspot.com/1913503002/diff/180001/media/base/video_util.cc#newcode378 media/base/video_util.cc:378: DCHECK(dst_frame->visible_rect().origin().IsOrigin()); All these conditions should be documented in the ...
4 years, 7 months ago (2016-05-04 21:08:29 UTC) #18
xjz
Add unit test and addressed Xiaohan's comments. PTAL. https://chromiumcodereview.appspot.com/1913503002/diff/180001/media/base/video_util.cc File media/base/video_util.cc (right): https://chromiumcodereview.appspot.com/1913503002/diff/180001/media/base/video_util.cc#newcode378 media/base/video_util.cc:378: DCHECK(dst_frame->visible_rect().origin().IsOrigin()); ...
4 years, 7 months ago (2016-05-05 01:15:56 UTC) #20
xhwang
LGTM with nits https://chromiumcodereview.appspot.com/1913503002/diff/220001/media/base/video_util.cc File media/base/video_util.cc (right): https://chromiumcodereview.appspot.com/1913503002/diff/220001/media/base/video_util.cc#newcode25 media/base/video_util.cc:25: void FillRegionOutsideVisibleRect(uint8_t* frame, This is a ...
4 years, 7 months ago (2016-05-05 22:00:21 UTC) #21
xjz
Addressed Xiaohan's comments. Thanks for the review! https://chromiumcodereview.appspot.com/1913503002/diff/220001/media/base/video_util.cc File media/base/video_util.cc (right): https://chromiumcodereview.appspot.com/1913503002/diff/220001/media/base/video_util.cc#newcode25 media/base/video_util.cc:25: void FillRegionOutsideVisibleRect(uint8_t* ...
4 years, 7 months ago (2016-05-05 22:52:20 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1913503002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1913503002/240001
4 years, 7 months ago (2016-05-05 23:34:21 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/66030)
4 years, 7 months ago (2016-05-06 02:34:01 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1913503002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1913503002/240001
4 years, 7 months ago (2016-05-06 16:49:54 UTC) #29
commit-bot: I haz the power
Committed patchset #8 (id:240001)
4 years, 7 months ago (2016-05-06 18:15:06 UTC) #30
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/957fd159c32d6a62718993e9758a9a5c276e000a Cr-Commit-Position: refs/heads/master@{#392098}
4 years, 7 months ago (2016-05-06 18:15:52 UTC) #32
Nico
4 years, 7 months ago (2016-05-07 14:14:13 UTC) #33
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:240001) has been created in
https://codereview.chromium.org/1955233002/ by thakis@chromium.org.

The reason for reverting is: Turns msan red:
https://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20MSan%20Test...

[ RUN      ] VideoUtilTest.I420CopyWithPadding
==2446==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0xc369b7 in VerifyPlanCopyWithPadding
media/base/video_util_unittest.cc:44:11
    #1 0xc32802 in VerifyCopyWithPadding media/base/video_util_unittest.cc:62:8
    #2 0xc307b5 in TestBody media/base/video_util_unittest.cc:468:3
.

Powered by Google App Engine
This is Rietveld 408576698