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

Issue 10451051: Provide a Chrome-owned buffer to FFmpeg for video decoding, instead of (Closed)

Created:
8 years, 7 months ago by rbultje1
Modified:
8 years, 6 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://src.chromium.org/chrome/trunk/src/
Visibility:
Public.

Description

Provide a Chrome-owned buffer to FFmpeg for video decoding, instead of letting it allocate a buffer internally and then copy it to our own buffers after decoding finishes. This saves one memcpy() per decoded video frame. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=143115

Patch Set 1 #

Total comments: 25

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 24

Patch Set 4 : #

Total comments: 16

Patch Set 5 : #

Total comments: 14

Patch Set 6 : #

Total comments: 1

Patch Set 7 : #

Total comments: 9

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -51 lines) Patch
M content/test/content_test_suite_base.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M media/base/video_frame.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/base/video_frame.cc View 1 2 3 4 5 6 7 8 10 3 chunks +49 lines, -21 lines 0 comments Download
M media/ffmpeg/ffmpeg_common.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -4 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.cc View 1 2 3 4 5 6 7 8 9 5 chunks +65 lines, -26 lines 0 comments Download

Messages

Total messages: 49 (0 generated)
rbultje1
8 years, 7 months ago (2012-05-26 22:11:21 UTC) #1
rbultje1
Using posix_memalign() is likely wrong, but I couldn't find the right way to allocate an ...
8 years, 7 months ago (2012-05-26 22:12:43 UTC) #2
Ami GONE FROM CHROMIUM
Thanks for sending this out. Have you seen any performance effect of making this change? ...
8 years, 7 months ago (2012-05-26 22:52:34 UTC) #3
rbultje1
On 2012/05/26 22:52:34, Ami Fischman wrote: > Thanks for sending this out. > > Have ...
8 years, 7 months ago (2012-05-27 00:13:36 UTC) #4
DaleCurtis
https://chromiumcodereview.appspot.com/10451051/diff/1/media/base/video_frame.cc File media/base/video_frame.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/1/media/base/video_frame.cc#newcode145 media/base/video_frame.cc:145: if (posix_memalign((void **) &data, 32, strides[0] * aligned_h)) { ...
8 years, 6 months ago (2012-05-29 17:33:19 UTC) #5
scherkus (not reviewing)
waiting for addressing fischman's comments before digging in
8 years, 6 months ago (2012-05-29 20:20:15 UTC) #6
rbultje
On 2012/05/29 17:33:19, DaleCurtis wrote: > https://chromiumcodereview.appspot.com/10451051/diff/1/media/base/video_frame.cc > File media/base/video_frame.cc (right): > > https://chromiumcodereview.appspot.com/10451051/diff/1/media/base/video_frame.cc#newcode145 > ...
8 years, 6 months ago (2012-06-07 13:31:01 UTC) #7
scherkus (not reviewing)
On 2012/06/07 13:31:01, rbultje wrote: > On 2012/05/29 17:33:19, DaleCurtis wrote: > > > https://chromiumcodereview.appspot.com/10451051/diff/1/media/base/video_frame.cc ...
8 years, 6 months ago (2012-06-07 16:41:17 UTC) #8
rbultje
On 2012/06/07 16:41:17, scherkus wrote: > On 2012/06/07 13:31:01, rbultje wrote: > > On 2012/05/29 ...
8 years, 6 months ago (2012-06-07 17:21:04 UTC) #9
scherkus (not reviewing)
On 2012/06/07 17:21:04, rbultje wrote: > On 2012/06/07 16:41:17, scherkus wrote: > > On 2012/06/07 ...
8 years, 6 months ago (2012-06-07 17:30:48 UTC) #10
rbultje
On 2012/05/26 22:52:34, Ami Fischman wrote: > https://chromiumcodereview.appspot.com/10451051/diff/1/media/base/video_frame... > media/base/video_frame.cc:136: extern "C" { > this ...
8 years, 6 months ago (2012-06-07 19:58:28 UTC) #11
Ami GONE FROM CHROMIUM
Holding off the rest of the review given my question below. http://codereview.chromium.org/10451051/diff/10001/media/base/video_frame.h File media/base/video_frame.h (right): ...
8 years, 6 months ago (2012-06-08 19:11:04 UTC) #12
rbultje
On 2012/06/08 19:11:04, Ami Fischman wrote: > Holding off the rest of the review given ...
8 years, 6 months ago (2012-06-08 19:32:07 UTC) #13
Ami GONE FROM CHROMIUM
Can you send pointers to the ffmpeg api docs and comments in question?
8 years, 6 months ago (2012-06-08 19:36:30 UTC) #14
rbultje
On 2012/06/08 19:36:30, Ami Fischman wrote: > Can you send pointers to the ffmpeg api ...
8 years, 6 months ago (2012-06-08 19:54:52 UTC) #15
Ami GONE FROM CHROMIUM
I think so. Esp. if it can be the same for y and uv.
8 years, 6 months ago (2012-06-08 19:56:39 UTC) #16
rbultje
On 2012/06/08 19:56:39, Ami Fischman wrote: > I think so. Esp. if it can be ...
8 years, 6 months ago (2012-06-08 20:03:32 UTC) #17
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/10451051/diff/10001/media/filters/ffmpeg_video_decoder.cc File media/filters/ffmpeg_video_decoder.cc (right): http://codereview.chromium.org/10451051/diff/10001/media/filters/ffmpeg_video_decoder.cc#newcode157 media/filters/ffmpeg_video_decoder.cc:157: codec_context_->get_buffer = callbackGetVideoBuffer; I still think it should be ...
8 years, 6 months ago (2012-06-09 02:51:23 UTC) #18
rbultje1
On 2012/06/08 19:11:04, Ami Fischman wrote: > Holding off the rest of the review given ...
8 years, 6 months ago (2012-06-13 16:24:07 UTC) #19
rbultje1
On 2012/06/09 02:51:23, Ami Fischman wrote: > http://codereview.chromium.org/10451051/diff/10001/media/filters/ffmpeg_video_decoder.cc > File media/filters/ffmpeg_video_decoder.cc (right): > > http://codereview.chromium.org/10451051/diff/10001/media/filters/ffmpeg_video_decoder.cc#newcode157 ...
8 years, 6 months ago (2012-06-13 16:26:42 UTC) #20
scherkus (not reviewing)
nice! mostly style nits https://chromiumcodereview.appspot.com/10451051/diff/18001/media/base/video_frame.cc File media/base/video_frame.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/18001/media/base/video_frame.cc#newcode30 media/base/video_frame.cc:30: frame->AllocateRGB(4u, alignment); fix indent here ...
8 years, 6 months ago (2012-06-14 02:21:33 UTC) #21
rbultje1
I think I've made all changes as suggested, except 1, see below. https://chromiumcodereview.appspot.com/10451051/diff/18001/media/base/video_frame.h File media/base/video_frame.h ...
8 years, 6 months ago (2012-06-14 18:32:20 UTC) #22
scherkus (not reviewing)
https://chromiumcodereview.appspot.com/10451051/diff/7010/media/base/video_frame.cc File media/base/video_frame.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/7010/media/base/video_frame.cc#newcode119 media/base/video_frame.cc:119: av_malloc(bytes_per_row * aligned_height)); sorry -- "4 space indent" meant ...
8 years, 6 months ago (2012-06-14 19:21:20 UTC) #23
rbultje1
https://chromiumcodereview.appspot.com/10451051/diff/7010/media/base/video_frame.cc File media/base/video_frame.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/7010/media/base/video_frame.cc#newcode119 media/base/video_frame.cc:119: av_malloc(bytes_per_row * aligned_height)); On 2012/06/14 19:21:20, scherkus wrote: > ...
8 years, 6 months ago (2012-06-14 19:26:25 UTC) #24
scherkus (not reviewing)
Lgtm! Dale/Ami do you have any additional feedback?
8 years, 6 months ago (2012-06-14 21:46:03 UTC) #25
DaleCurtis
lgtm % nits & qs https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.cc File media/base/video_frame.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.cc#newcode24 media/base/video_frame.cc:24: size_t alignment, Do you ...
8 years, 6 months ago (2012-06-14 23:35:37 UTC) #26
rbultje1
https://chromiumcodereview.appspot.com/10451051/diff/16003/media/filters/ffmpeg_video_decoder.cc File media/filters/ffmpeg_video_decoder.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/16003/media/filters/ffmpeg_video_decoder.cc#newcode77 media/filters/ffmpeg_video_decoder.cc:77: VideoFrame::CreateFrame(format, width, height, 16u, On 2012/06/14 23:35:37, DaleCurtis wrote: ...
8 years, 6 months ago (2012-06-14 23:42:07 UTC) #27
rbultje1
https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.cc File media/base/video_frame.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.cc#newcode24 media/base/video_frame.cc:24: size_t alignment, On 2012/06/14 23:35:37, DaleCurtis wrote: > Do ...
8 years, 6 months ago (2012-06-14 23:46:57 UTC) #28
scherkus (not reviewing)
https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.cc File media/base/video_frame.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.cc#newcode24 media/base/video_frame.cc:24: size_t alignment, On 2012/06/14 23:35:37, DaleCurtis wrote: > Do ...
8 years, 6 months ago (2012-06-14 23:47:50 UTC) #29
Ami GONE FROM CHROMIUM
I think Dale & Andrew have this review well in hand so removing myself from ...
8 years, 6 months ago (2012-06-15 06:53:30 UTC) #30
rbultje1
https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.cc File media/base/video_frame.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.cc#newcode44 media/base/video_frame.cc:44: static inline bool IsPowerOfTwo(int alignment) { On 2012/06/15 06:53:30, ...
8 years, 6 months ago (2012-06-15 19:09:44 UTC) #31
rbultje1
https://chromiumcodereview.appspot.com/10451051/diff/16003/media/filters/ffmpeg_video_decoder.cc File media/filters/ffmpeg_video_decoder.cc (right): https://chromiumcodereview.appspot.com/10451051/diff/16003/media/filters/ffmpeg_video_decoder.cc#newcode109 media/filters/ffmpeg_video_decoder.cc:109: memset(frame->data, 0, sizeof(frame->data)); On 2012/06/15 06:53:30, Ami Fischman wrote: ...
8 years, 6 months ago (2012-06-15 19:10:27 UTC) #32
rbultje1
On 2012/06/15 19:10:27, rbultje1 wrote: > https://chromiumcodereview.appspot.com/10451051/diff/16003/media/filters/ffmpeg_video_decoder.cc > File media/filters/ffmpeg_video_decoder.cc (right): > > https://chromiumcodereview.appspot.com/10451051/diff/16003/media/filters/ffmpeg_video_decoder.cc#newcode109 > ...
8 years, 6 months ago (2012-06-16 04:19:33 UTC) #33
rbultje1
On 2012/06/15 06:53:30, Ami Fischman wrote: > https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.h#newcode51 > media/base/video_frame.h:51: static scoped_refptr<VideoFrame> CreateFrame( > Chromium ...
8 years, 6 months ago (2012-06-16 04:20:31 UTC) #34
rbultje1
On 2012/06/14 23:47:50, scherkus wrote: > https://chromiumcodereview.appspot.com/10451051/diff/16003/media/base/video_frame.cc#newcode24 > media/base/video_frame.cc:24: size_t alignment, > On 2012/06/14 23:35:37, ...
8 years, 6 months ago (2012-06-16 04:21:02 UTC) #35
DaleCurtis
Will take a look tomorrow. http://codereview.chromium.org/10451051/diff/24002/media/base/video_frame.cc File media/base/video_frame.cc (right): http://codereview.chromium.org/10451051/diff/24002/media/base/video_frame.cc#newcode104 media/base/video_frame.cc:104: size_t bytes_per_row = RoundUp(width_, ...
8 years, 6 months ago (2012-06-16 04:23:10 UTC) #36
rbultje1
On 2012/06/16 04:23:10, DaleCurtis wrote: > http://codereview.chromium.org/10451051/diff/24002/media/base/video_frame.cc#newcode104 > media/base/video_frame.cc:104: size_t bytes_per_row = RoundUp(width_, 16) * ...
8 years, 6 months ago (2012-06-16 04:30:23 UTC) #37
DaleCurtis
lgtm % nits & qs. http://codereview.chromium.org/10451051/diff/31001/media/base/video_frame.cc File media/base/video_frame.cc (right): http://codereview.chromium.org/10451051/diff/31001/media/base/video_frame.cc#newcode104 media/base/video_frame.cc:104: // Round up to ...
8 years, 6 months ago (2012-06-16 17:34:20 UTC) #38
rbultje
http://codereview.chromium.org/10451051/diff/31001/media/base/video_frame.cc File media/base/video_frame.cc (right): http://codereview.chromium.org/10451051/diff/31001/media/base/video_frame.cc#newcode104 media/base/video_frame.cc:104: // Round up to align at least at a ...
8 years, 6 months ago (2012-06-16 21:36:56 UTC) #39
scherkus (not reviewing)
LGTM w/ 2 nits nice work! http://codereview.chromium.org/10451051/diff/29003/media/base/video_frame.cc File media/base/video_frame.cc (right): http://codereview.chromium.org/10451051/diff/29003/media/base/video_frame.cc#newcode104 media/base/video_frame.cc:104: // Round up ...
8 years, 6 months ago (2012-06-18 20:27:38 UTC) #40
rbultje
On 2012/06/18 20:27:38, scherkus wrote: > http://codereview.chromium.org/10451051/diff/29003/media/base/video_frame.cc#newcode104 > media/base/video_frame.cc:104: // Round up to align at ...
8 years, 6 months ago (2012-06-19 00:48:03 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbultje@chromium.org/10451051/36001
8 years, 6 months ago (2012-06-19 00:54:07 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbultje@chromium.org/10451051/36001
8 years, 6 months ago (2012-06-19 01:35:16 UTC) #43
commit-bot: I haz the power
Try job failure for 10451051-36001 (retry) on linux_rel for steps "media_unittests, content_unittests". It's a second ...
8 years, 6 months ago (2012-06-19 01:43:05 UTC) #44
rbultje1
8 years, 6 months ago (2012-06-19 21:53:13 UTC) #45
jam
content lgtm
8 years, 6 months ago (2012-06-19 22:40:18 UTC) #46
scherkus (not reviewing)
LGTM++
8 years, 6 months ago (2012-06-19 23:33:51 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbultje@chromium.org/10451051/35004
8 years, 6 months ago (2012-06-19 23:40:29 UTC) #48
commit-bot: I haz the power
8 years, 6 months ago (2012-06-20 01:19:25 UTC) #49
Change committed as 143115

Powered by Google App Engine
This is Rietveld 408576698