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

Issue 14914009: VAVDA: Redesign stage 1. (Closed)

Created:
7 years, 7 months ago by Pawel Osciak
Modified:
7 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium, feature-media-reviews_chromium.org
Visibility:
Public.

Description

VAVDA: Redesign stage 1. This is the first stage of VAVDA VaapiH264Decoder redesigns, aimed at simplifying code, improving and clarifying resource management and lifecycles, reducing dependencies and unnecessary complexity, removing locking, simplifying state machines and reducing threading dependencies, as well as to prepare for new features, including missing frame concealment and dynamic resolution changes. The second stage will involve simplification and hopefully removal of locking in VAVDA itself. Main changes: - Introduce VaapiDelegate class to handle all VAAPI calls and libva locking, as well as manage VA resources. - VaapiH264Decoder now runs entirely on one thread. No more confusing rules which methods need to be run on the ChildThread. - VaapiH264Decoder is now oblivious to GLX, textures, pixmaps, etc. and only uses VA surfaces. VAVDA now manages the rest. - VA surfaces used for decoding are decoupled from TFP pictures. Also, otuput buffers passed to/from client are no longer tied to VA surfaces and don't go to Decoder, simplifying things and squeezing some more parallelism. - Most resources are now automatically managed instead of having to manage them explicitly. - Remove confusing decode surface states in favor of automatic refcounting and releasing. - Perform texture to pixmap binding on each frame to conform with the TFP spec (this is a no-op on our CrOS platforms, so it didn't matter correctness-wise, neither does this affect performance) - Simplify VaapiH264Decoder in many places, including a simpler state machine. - Extracted some more parallelism in places. - And more... Performance is comparable (within measurement error) to old VAVDA, although I have seen FPS gains of ~10-20% in some situations on specific streams and during multiple simultaneous decodes. BUG=222427, 177422, 151045 TEST=vda unittest, videotestmatrix, vimeo, youtube, timescapes, seek tests, memory leak tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=203343

Patch Set 1 : #

Total comments: 185

Patch Set 2 : #

Total comments: 24

Patch Set 3 : #

Total comments: 4

Patch Set 4 : Added DCHECKs for ChildThread in TFPPicture #

Total comments: 7

Patch Set 5 : Remove glTexParameterf calls and va_surface_id() in favor of va_surface()->id() #

Patch Set 6 : #

Patch Set 7 : Rebase #

Patch Set 8 : Add CONTENT_EXPORT to VaapiWrapper #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1398 lines, -1236 lines) Patch
M content/common/gpu/media/h264_dpb.h View 1 chunk +5 lines, -4 lines 0 comments Download
M content/common/gpu/media/h264_dpb.cc View 2 chunks +2 lines, -2 lines 0 comments Download
A content/common/gpu/media/va_surface.h View 1 2 1 chunk +105 lines, -0 lines 0 comments Download
M content/common/gpu/media/vaapi_h264_decoder.h View 1 2 7 chunks +89 lines, -170 lines 0 comments Download
M content/common/gpu/media/vaapi_h264_decoder.cc View 1 2 3 4 23 chunks +154 lines, -925 lines 0 comments Download
M content/common/gpu/media/vaapi_video_decode_accelerator.h View 1 2 8 chunks +77 lines, -30 lines 0 comments Download
M content/common/gpu/media/vaapi_video_decode_accelerator.cc View 1 2 3 4 5 19 chunks +373 lines, -102 lines 0 comments Download
A content/common/gpu/media/vaapi_wrapper.h View 1 2 3 4 5 6 7 1 chunk +133 lines, -0 lines 0 comments Download
A content/common/gpu/media/vaapi_wrapper.cc View 1 2 1 chunk +453 lines, -0 lines 0 comments Download
M content/common/gpu/media/video_decode_accelerator_unittest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
Pawel Osciak
PTAL.
7 years, 7 months ago (2013-05-10 23:22:11 UTC) #1
Pawel Osciak
On 2013/05/10 23:22:11, posciak wrote: > PTAL. Dear reviewers, I would really appreciate a quick ...
7 years, 7 months ago (2013-05-17 14:32:27 UTC) #2
Ami GONE FROM CHROMIUM
On Fri, May 17, 2013 at 7:32 AM, <posciak@chromium.org> wrote: > Dear reviewers, I would ...
7 years, 7 months ago (2013-05-17 15:34:38 UTC) #3
Ami GONE FROM CHROMIUM
This is a significant improvement over the previous version of the code! https://codereview.chromium.org/14914009/diff/3001/content/common/gpu/media/vaapi_delegate.cc File content/common/gpu/media/vaapi_delegate.cc ...
7 years, 7 months ago (2013-05-17 23:19:14 UTC) #4
Pawel Osciak
https://chromiumcodereview.appspot.com/14914009/diff/3001/content/common/gpu/media/vaapi_delegate.cc File content/common/gpu/media/vaapi_delegate.cc (right): https://chromiumcodereview.appspot.com/14914009/diff/3001/content/common/gpu/media/vaapi_delegate.cc#newcode11 content/common/gpu/media/vaapi_delegate.cc:11: #define LOG_VA_ERROR_AND_REPORT(va_res, err_msg) \ On 2013/05/17 23:19:15, Ami Fischman ...
7 years, 7 months ago (2013-05-21 22:32:34 UTC) #5
Ami GONE FROM CHROMIUM
https://chromiumcodereview.appspot.com/14914009/diff/3001/content/common/gpu/media/h264_dpb.h File content/common/gpu/media/h264_dpb.h (right): https://chromiumcodereview.appspot.com/14914009/diff/3001/content/common/gpu/media/h264_dpb.h#newcode1 content/common/gpu/media/h264_dpb.h:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
7 years, 7 months ago (2013-05-22 23:59:47 UTC) #6
marcheu
https://codereview.chromium.org/14914009/diff/12001/content/common/gpu/media/vaapi_delegate.cc File content/common/gpu/media/vaapi_delegate.cc (right): https://codereview.chromium.org/14914009/diff/12001/content/common/gpu/media/vaapi_delegate.cc#newcode224 content/common/gpu/media/vaapi_delegate.cc:224: DVLOG(1) << "YUV420 not supported"; nit: that message is ...
7 years, 7 months ago (2013-05-23 03:02:55 UTC) #7
Pawel Osciak
https://chromiumcodereview.appspot.com/14914009/diff/3001/content/common/gpu/media/vaapi_delegate.cc File content/common/gpu/media/vaapi_delegate.cc (right): https://chromiumcodereview.appspot.com/14914009/diff/3001/content/common/gpu/media/vaapi_delegate.cc#newcode11 content/common/gpu/media/vaapi_delegate.cc:11: #define LOG_VA_ERROR_AND_REPORT(va_res, err_msg) \ On 2013/05/22 23:59:47, Ami Fischman ...
7 years, 7 months ago (2013-05-24 01:46:39 UTC) #8
Ami GONE FROM CHROMIUM
Responding to some comments in email (not rietveld) b/c of file rename. > https://chromiumcodereview.**appspot.com/14914009/diff/** > ...
7 years, 7 months ago (2013-05-24 02:11:11 UTC) #9
Ami GONE FROM CHROMIUM
https://chromiumcodereview.appspot.com/14914009/diff/34013/content/common/gpu/media/vaapi_video_decode_accelerator.cc File content/common/gpu/media/vaapi_video_decode_accelerator.cc (right): https://chromiumcodereview.appspot.com/14914009/diff/34013/content/common/gpu/media/vaapi_video_decode_accelerator.cc#newcode211 content/common/gpu/media/vaapi_video_decode_accelerator.cc:211: DCHECK(glx_pixmap_); On 2013/05/24 01:46:39, posciak wrote: > On 2013/05/23 ...
7 years, 7 months ago (2013-05-24 02:14:37 UTC) #10
Pawel Osciak
On 2013/05/24 02:11:11, Ami Fischman wrote: > Responding to some comments in email (not rietveld) ...
7 years, 7 months ago (2013-05-24 16:38:35 UTC) #11
Pawel Osciak
https://chromiumcodereview.appspot.com/14914009/diff/34013/content/common/gpu/media/vaapi_video_decode_accelerator.cc File content/common/gpu/media/vaapi_video_decode_accelerator.cc (right): https://chromiumcodereview.appspot.com/14914009/diff/34013/content/common/gpu/media/vaapi_video_decode_accelerator.cc#newcode211 content/common/gpu/media/vaapi_video_decode_accelerator.cc:211: DCHECK(glx_pixmap_); On 2013/05/24 02:14:37, Ami Fischman wrote: > On ...
7 years, 7 months ago (2013-05-24 18:51:39 UTC) #12
Pawel Osciak
Added DCHECKs, responded to previous comments in previous reply.
7 years, 7 months ago (2013-05-24 21:59:32 UTC) #13
Ami GONE FROM CHROMIUM
lgtm https://codereview.chromium.org/14914009/diff/55001/content/common/gpu/media/vaapi_h264_decoder.cc File content/common/gpu/media/vaapi_h264_decoder.cc (right): https://codereview.chromium.org/14914009/diff/55001/content/common/gpu/media/vaapi_h264_decoder.cc#newcode31 content/common/gpu/media/vaapi_h264_decoder.cc:31: return va_surface_->id(); > > > > > > ...
7 years, 6 months ago (2013-05-29 19:59:04 UTC) #14
Pawel Osciak
On 2013/05/29 19:59:04, Ami Fischman wrote: > lgtm > > https://codereview.chromium.org/14914009/diff/55001/content/common/gpu/media/vaapi_h264_decoder.cc > File content/common/gpu/media/vaapi_h264_decoder.cc (right): ...
7 years, 6 months ago (2013-05-29 20:25:47 UTC) #15
Ami GONE FROM CHROMIUM
On Wed, May 29, 2013 at 1:25 PM, <posciak@chromium.org> wrote: > va_surface() returns a scoped_refptr... ...
7 years, 6 months ago (2013-05-29 20:27:09 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/posciak@chromium.org/14914009/55001
7 years, 6 months ago (2013-05-29 20:47:22 UTC) #17
posciak1
On Wed, May 29, 2013 at 1:27 PM, Ami Fischman <fischman@chromium.org> wrote: > > On ...
7 years, 6 months ago (2013-05-29 20:48:53 UTC) #18
Pawel Osciak
Antoine: may I have an OWNERS for content/{,gpu} please?
7 years, 6 months ago (2013-05-29 20:50:42 UTC) #19
Pawel Osciak
Antoine: may I have an OWNERS for content/{,gpu} please?
7 years, 6 months ago (2013-05-29 20:50:43 UTC) #20
Pawel Osciak
Antoine: may I have an OWNERS for content/{,gpu} please?
7 years, 6 months ago (2013-05-29 20:50:44 UTC) #21
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=5729
7 years, 6 months ago (2013-05-29 20:54:27 UTC) #22
piman
https://chromiumcodereview.appspot.com/14914009/diff/55001/content/common/gpu/media/vaapi_video_decode_accelerator.cc File content/common/gpu/media/vaapi_video_decode_accelerator.cc (right): https://chromiumcodereview.appspot.com/14914009/diff/55001/content/common/gpu/media/vaapi_video_decode_accelerator.cc#newcode172 content/common/gpu/media/vaapi_video_decode_accelerator.cc:172: glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); These calls look out of place. ...
7 years, 6 months ago (2013-05-29 21:10:01 UTC) #23
Pawel Osciak
https://chromiumcodereview.appspot.com/14914009/diff/55001/content/common/gpu/media/vaapi_video_decode_accelerator.cc File content/common/gpu/media/vaapi_video_decode_accelerator.cc (right): https://chromiumcodereview.appspot.com/14914009/diff/55001/content/common/gpu/media/vaapi_video_decode_accelerator.cc#newcode172 content/common/gpu/media/vaapi_video_decode_accelerator.cc:172: glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); On 2013/05/29 21:10:02, piman wrote: > ...
7 years, 6 months ago (2013-05-29 21:18:37 UTC) #24
piman
On 2013/05/29 21:18:37, posciak wrote: > https://chromiumcodereview.appspot.com/14914009/diff/55001/content/common/gpu/media/vaapi_video_decode_accelerator.cc > File content/common/gpu/media/vaapi_video_decode_accelerator.cc (right): > > https://chromiumcodereview.appspot.com/14914009/diff/55001/content/common/gpu/media/vaapi_video_decode_accelerator.cc#newcode172 > ...
7 years, 6 months ago (2013-05-29 21:28:12 UTC) #25
Pawel Osciak
Removed glTexParameterf calls and va_surface_id(). PTAL. https://chromiumcodereview.appspot.com/14914009/diff/55001/content/common/gpu/media/vaapi_h264_decoder.cc File content/common/gpu/media/vaapi_h264_decoder.cc (right): https://chromiumcodereview.appspot.com/14914009/diff/55001/content/common/gpu/media/vaapi_h264_decoder.cc#newcode31 content/common/gpu/media/vaapi_h264_decoder.cc:31: return va_surface_->id(); On ...
7 years, 6 months ago (2013-05-29 22:18:16 UTC) #26
piman
LGTM for my part.
7 years, 6 months ago (2013-05-29 22:21:02 UTC) #27
Ami GONE FROM CHROMIUM
LGTM
7 years, 6 months ago (2013-05-29 22:28:04 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/posciak@chromium.org/14914009/72001
7 years, 6 months ago (2013-05-29 22:37:29 UTC) #29
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-05-29 23:00:50 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/posciak@chromium.org/14914009/85003
7 years, 6 months ago (2013-05-29 23:06:25 UTC) #31
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-05-29 23:28:37 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/posciak@chromium.org/14914009/85003
7 years, 6 months ago (2013-05-30 00:20:11 UTC) #33
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-05-30 01:04:55 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/posciak@chromium.org/14914009/96002
7 years, 6 months ago (2013-05-30 02:12:03 UTC) #35
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-05-30 02:33:08 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/posciak@chromium.org/14914009/106001
7 years, 6 months ago (2013-05-30 22:20:04 UTC) #37
commit-bot: I haz the power
7 years, 6 months ago (2013-05-31 06:52:42 UTC) #38
Message was sent while issue was closed.
Change committed as 203343

Powered by Google App Engine
This is Rietveld 408576698