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

Issue 872623002: VaapiVEA: Get maximum resolution from libva (Closed)

Created:
5 years, 11 months ago by henryhsu
Modified:
5 years, 9 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, wjia+watch_chromium.org, robert.bradford
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

VaapiVEA: Get maximum resolution from libva Add GetMaxResolutionForVAConfigID function to get hardware supported maximum resolution for video encode and decode. This is also the preparation of removing --ignore-resolution-limits-for-accelerated-video-decode flag. Because this function uses va_config_id as parameter, we refactor vaapi_wrapper and add LazyInstance to initialize supported profile infos once and reuse it in Initialize and GetSupportedEncodeProfiles functions. BUG=350197 TEST=Test on squawks, and lumpy. Make sure this function works well. Committed: https://crrev.com/a598f3adabbe02f427e2233239cdead68cf21d4f Cr-Commit-Position: refs/heads/master@{#319842}

Patch Set 1 #

Total comments: 1

Patch Set 2 : refactor vaapi_wrapper #

Patch Set 3 : modify description #

Total comments: 29

Patch Set 4 : Address review comments #

Total comments: 33

Patch Set 5 : address review comments #

Patch Set 6 : fix nits #

Total comments: 64

Patch Set 7 : address all review comments #

Total comments: 23

Patch Set 8 : address patch set 7 review comments #

Total comments: 11

Patch Set 9 : address comments #

Total comments: 6

Patch Set 10 : add comments #

Total comments: 25

Patch Set 11 : address all review comments #

Total comments: 2

Patch Set 12 : #

Total comments: 11

Patch Set 13 : fix nits #

Patch Set 14 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+253 lines, -110 lines) Patch
M content/common/gpu/media/va.sigs View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/media/vaapi_video_encode_accelerator.cc View 1 2 3 4 5 6 2 chunks +2 lines, -20 lines 0 comments Download
M content/common/gpu/media/vaapi_wrapper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +61 lines, -10 lines 0 comments Download
M content/common/gpu/media/vaapi_wrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +189 lines, -80 lines 0 comments Download

Messages

Total messages: 42 (4 generated)
henryhsu
PTAL
5 years, 11 months ago (2015-01-23 06:07:29 UTC) #2
wuchengli
https://codereview.chromium.org/872623002/diff/1/third_party/libva/va/va_backend.h File third_party/libva/va/va_backend.h (right): https://codereview.chromium.org/872623002/diff/1/third_party/libva/va/va_backend.h#newcode395 third_party/libva/va/va_backend.h:395: VAStatus (*vaGetCodecResolution) ( We should call this vaGetProfileResolution. Functions ...
5 years, 11 months ago (2015-01-23 12:58:21 UTC) #3
henryhsu
PTAL
5 years, 10 months ago (2015-02-02 08:40:53 UTC) #4
wuchengli
Kuang-che. Please also help review this. https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/vaapi_wrapper.h File content/common/gpu/media/vaapi_wrapper.h (right): https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/vaapi_wrapper.h#newcode259 content/common/gpu/media/vaapi_wrapper.h:259: static ProfileConfig supported_profiles_[media::VIDEO_CODEC_PROFILE_MAX ...
5 years, 10 months ago (2015-02-02 09:01:07 UTC) #6
kcwu
https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/va.sigs File content/common/gpu/media/va.sigs (right): https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/va.sigs#newcode34 content/common/gpu/media/va.sigs:34: VAStatus vaQuerySurfaceAttributes(VADisplay dpy, VAConfigID config, VASurfaceAttrib *attrib_list, unsigned int ...
5 years, 10 months ago (2015-02-02 10:11:02 UTC) #7
henryhsu
https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/vaapi_wrapper.cc#newcode443 content/common/gpu/media/vaapi_wrapper.cc:443: return true; On 2015/02/02 10:11:02, kcwu wrote: > Is ...
5 years, 10 months ago (2015-02-02 10:42:24 UTC) #8
wuchengli
https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/vaapi_video_encode_accelerator.cc File content/common/gpu/media/vaapi_video_encode_accelerator.cc (right): https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/vaapi_video_encode_accelerator.cc#newcode120 content/common/gpu/media/vaapi_video_encode_accelerator.cc:120: profile.max_resolution.SetSize(1920, 1088); remove https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/vaapi_wrapper.cc#newcode248 content/common/gpu/media/vaapi_wrapper.cc:248: ...
5 years, 10 months ago (2015-02-03 03:17:33 UTC) #9
henryhsu
all done. PTAL https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/va.sigs File content/common/gpu/media/va.sigs (right): https://codereview.chromium.org/872623002/diff/40001/content/common/gpu/media/va.sigs#newcode34 content/common/gpu/media/va.sigs:34: VAStatus vaQuerySurfaceAttributes(VADisplay dpy, VAConfigID config, VASurfaceAttrib ...
5 years, 10 months ago (2015-02-13 04:01:04 UTC) #10
kcwu
https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_wrapper.cc#newcode92 content/common/gpu/media/vaapi_wrapper.cc:92: {media::H264PROFILE_BASELINE, VAProfileH264ConstrainedBaseline}, This is incorrect. You break the original ...
5 years, 10 months ago (2015-02-13 07:15:39 UTC) #11
kcwu
https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_wrapper.cc#newcode92 content/common/gpu/media/vaapi_wrapper.cc:92: {media::H264PROFILE_BASELINE, VAProfileH264ConstrainedBaseline}, On 2015/02/13 07:15:38, kcwu wrote: > This ...
5 years, 10 months ago (2015-02-13 07:35:11 UTC) #12
henryhsu
https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_wrapper.cc#newcode92 content/common/gpu/media/vaapi_wrapper.cc:92: {media::H264PROFILE_BASELINE, VAProfileH264ConstrainedBaseline}, On 2015/02/13 07:15:38, kcwu wrote: > This ...
5 years, 10 months ago (2015-02-13 07:35:28 UTC) #13
wuchengli
https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_video_encode_accelerator.cc File content/common/gpu/media/vaapi_video_encode_accelerator.cc (right): https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_video_encode_accelerator.cc#newcode119 content/common/gpu/media/vaapi_video_encode_accelerator.cc:119: profiles[i].max_framerate_numerator = kDefaultFramerate; Let's move setting framerate and make ...
5 years, 10 months ago (2015-02-13 15:38:55 UTC) #14
henryhsu
all done. PTAL https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_video_encode_accelerator.cc File content/common/gpu/media/vaapi_video_encode_accelerator.cc (right): https://codereview.chromium.org/872623002/diff/60001/content/common/gpu/media/vaapi_video_encode_accelerator.cc#newcode119 content/common/gpu/media/vaapi_video_encode_accelerator.cc:119: profiles[i].max_framerate_numerator = kDefaultFramerate; On 2015/02/13 15:38:54, ...
5 years, 10 months ago (2015-02-13 17:24:28 UTC) #15
wuchengli
https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_wrapper.cc#newcode60 content/common/gpu/media/vaapi_wrapper.cc:60: const int kDefaultFramerate = 30; s/kDefaultFramerate/kMaxFramerate/. in VaapiVDA, it's ...
5 years, 9 months ago (2015-03-02 07:10:12 UTC) #16
wuchengli
https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_wrapper.cc#newcode96 content/common/gpu/media/vaapi_wrapper.cc:96: {VAProfileH264ConstrainedBaseline, media::H264PROFILE_BASELINE}, Move this below VAProfileH264Baseline so two H264PROFILE_BASELINE ...
5 years, 9 months ago (2015-03-02 07:28:32 UTC) #17
Pawel Osciak
https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_video_encode_accelerator.cc File content/common/gpu/media/vaapi_video_encode_accelerator.cc (right): https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_video_encode_accelerator.cc#newcode111 content/common/gpu/media/vaapi_video_encode_accelerator.cc:111: if (cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode)) I think we should move this to ...
5 years, 9 months ago (2015-03-02 11:00:21 UTC) #18
kcwu
https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_wrapper.cc#newcode429 content/common/gpu/media/vaapi_wrapper.cc:429: if (!resolution->height() || !resolution->width()) { resolution->IsEmpty() https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_wrapper.cc#newcode1033 content/common/gpu/media/vaapi_wrapper.cc:1033: for ...
5 years, 9 months ago (2015-03-02 14:02:18 UTC) #19
henryhsu
all done. PTAL https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_video_encode_accelerator.cc File content/common/gpu/media/vaapi_video_encode_accelerator.cc (right): https://codereview.chromium.org/872623002/diff/100001/content/common/gpu/media/vaapi_video_encode_accelerator.cc#newcode111 content/common/gpu/media/vaapi_video_encode_accelerator.cc:111: if (cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode)) On 2015/03/02 11:00:20, Pawel ...
5 years, 9 months ago (2015-03-03 10:48:03 UTC) #20
wuchengli
https://codereview.chromium.org/872623002/diff/120001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/120001/content/common/gpu/media/vaapi_wrapper.cc#newcode152 content/common/gpu/media/vaapi_wrapper.cc:152: VAProfile VaapiWrapper::CheckConstrainedBaselineWorkaround( The name is not descriptive. This function ...
5 years, 9 months ago (2015-03-04 04:03:19 UTC) #21
wuchengli
https://codereview.chromium.org/872623002/diff/120001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/120001/content/common/gpu/media/vaapi_wrapper.cc#newcode152 content/common/gpu/media/vaapi_wrapper.cc:152: VAProfile VaapiWrapper::CheckConstrainedBaselineWorkaround( On 2015/03/04 04:03:18, wuchengli wrote: > The ...
5 years, 9 months ago (2015-03-04 04:05:05 UTC) #22
henryhsu
https://codereview.chromium.org/872623002/diff/120001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/120001/content/common/gpu/media/vaapi_wrapper.cc#newcode152 content/common/gpu/media/vaapi_wrapper.cc:152: VAProfile VaapiWrapper::CheckConstrainedBaselineWorkaround( On 2015/03/04 04:03:18, wuchengli wrote: > The ...
5 years, 9 months ago (2015-03-04 06:30:18 UTC) #23
wuchengli
Looking good. Only some small comments. https://codereview.chromium.org/872623002/diff/140001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/140001/content/common/gpu/media/vaapi_wrapper.cc#newcode263 content/common/gpu/media/vaapi_wrapper.cc:263: base::AutoLock auto_lock(va_lock_); We ...
5 years, 9 months ago (2015-03-04 08:45:56 UTC) #24
henryhsu
https://codereview.chromium.org/872623002/diff/140001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/140001/content/common/gpu/media/vaapi_wrapper.cc#newcode263 content/common/gpu/media/vaapi_wrapper.cc:263: base::AutoLock auto_lock(va_lock_); On 2015/03/04 08:45:55, wuchengli wrote: > We ...
5 years, 9 months ago (2015-03-05 03:23:38 UTC) #25
wuchengli
https://codereview.chromium.org/872623002/diff/160001/content/common/gpu/media/vaapi_wrapper.h File content/common/gpu/media/vaapi_wrapper.h (right): https://codereview.chromium.org/872623002/diff/160001/content/common/gpu/media/vaapi_wrapper.h#newcode212 content/common/gpu/media/vaapi_wrapper.h:212: bool IsEntrypointSupported(VAProfile va_profile, VAEntrypoint entrypoint); Add a comment to ...
5 years, 9 months ago (2015-03-05 03:40:29 UTC) #26
henryhsu
https://codereview.chromium.org/872623002/diff/160001/content/common/gpu/media/vaapi_wrapper.h File content/common/gpu/media/vaapi_wrapper.h (right): https://codereview.chromium.org/872623002/diff/160001/content/common/gpu/media/vaapi_wrapper.h#newcode212 content/common/gpu/media/vaapi_wrapper.h:212: bool IsEntrypointSupported(VAProfile va_profile, VAEntrypoint entrypoint); On 2015/03/05 03:40:28, wuchengli ...
5 years, 9 months ago (2015-03-05 09:14:40 UTC) #27
wuchengli
lgtm https://codereview.chromium.org/872623002/diff/180001/content/common/gpu/media/vaapi_wrapper.h File content/common/gpu/media/vaapi_wrapper.h (right): https://codereview.chromium.org/872623002/diff/180001/content/common/gpu/media/vaapi_wrapper.h#newcode213 content/common/gpu/media/vaapi_wrapper.h:213: // Check |va_profile| support |entrypoint| or not. |va_lock_| ...
5 years, 9 months ago (2015-03-05 16:24:22 UTC) #28
Pawel Osciak
https://chromiumcodereview.appspot.com/872623002/diff/180001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://chromiumcodereview.appspot.com/872623002/diff/180001/content/common/gpu/media/vaapi_wrapper.cc#newcode150 content/common/gpu/media/vaapi_wrapper.cc:150: DVLOG(1) << "Unsupported va profile: " << va_profile; Initialize() ...
5 years, 9 months ago (2015-03-08 00:58:25 UTC) #29
henryhsu
all done. https://codereview.chromium.org/872623002/diff/180001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/180001/content/common/gpu/media/vaapi_wrapper.cc#newcode150 content/common/gpu/media/vaapi_wrapper.cc:150: DVLOG(1) << "Unsupported va profile: " << ...
5 years, 9 months ago (2015-03-09 03:56:52 UTC) #30
wuchengli
https://codereview.chromium.org/872623002/diff/180001/content/common/gpu/media/vaapi_wrapper.h File content/common/gpu/media/vaapi_wrapper.h (right): https://codereview.chromium.org/872623002/diff/180001/content/common/gpu/media/vaapi_wrapper.h#newcode255 content/common/gpu/media/vaapi_wrapper.h:255: // GetSupportedProfileInfosForCodecModeInternal for static usage. On 2015/03/09 03:56:52, henryhsu ...
5 years, 9 months ago (2015-03-09 04:59:18 UTC) #31
wuchengli
https://codereview.chromium.org/872623002/diff/200001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/200001/content/common/gpu/media/vaapi_wrapper.cc#newcode268 content/common/gpu/media/vaapi_wrapper.cc:268: VAStatus va_res = vaCreateConfig( Pawel and I discussed. vaCreateConfig ...
5 years, 9 months ago (2015-03-09 05:17:30 UTC) #32
henryhsu
https://codereview.chromium.org/872623002/diff/200001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/200001/content/common/gpu/media/vaapi_wrapper.cc#newcode268 content/common/gpu/media/vaapi_wrapper.cc:268: VAStatus va_res = vaCreateConfig( On 2015/03/09 05:17:30, wuchengli wrote: ...
5 years, 9 months ago (2015-03-09 09:21:53 UTC) #33
wuchengli
lgtm and one small comment https://codereview.chromium.org/872623002/diff/220001/content/common/gpu/media/vaapi_wrapper.h File content/common/gpu/media/vaapi_wrapper.h (right): https://codereview.chromium.org/872623002/diff/220001/content/common/gpu/media/vaapi_wrapper.h#newcode230 content/common/gpu/media/vaapi_wrapper.h:230: std::vector<VAConfigAttrib>& required_attribs, add const
5 years, 9 months ago (2015-03-09 11:14:53 UTC) #34
Pawel Osciak
lgtm % nits https://chromiumcodereview.appspot.com/872623002/diff/220001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://chromiumcodereview.appspot.com/872623002/diff/220001/content/common/gpu/media/vaapi_wrapper.cc#newcode263 content/common/gpu/media/vaapi_wrapper.cc:263: LOG(ERROR) << "GetMaxResolution failed by va_profile ...
5 years, 9 months ago (2015-03-10 03:41:14 UTC) #35
henryhsu
https://codereview.chromium.org/872623002/diff/220001/content/common/gpu/media/vaapi_wrapper.cc File content/common/gpu/media/vaapi_wrapper.cc (right): https://codereview.chromium.org/872623002/diff/220001/content/common/gpu/media/vaapi_wrapper.cc#newcode263 content/common/gpu/media/vaapi_wrapper.cc:263: LOG(ERROR) << "GetMaxResolution failed by va_profile " << va_profile; ...
5 years, 9 months ago (2015-03-10 05:36:53 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/872623002/260001
5 years, 9 months ago (2015-03-10 05:55:15 UTC) #39
wuchengli
lgtm https://codereview.chromium.org/872623002/diff/220001/content/common/gpu/media/vaapi_wrapper.h File content/common/gpu/media/vaapi_wrapper.h (right): https://codereview.chromium.org/872623002/diff/220001/content/common/gpu/media/vaapi_wrapper.h#newcode230 content/common/gpu/media/vaapi_wrapper.h:230: std::vector<VAConfigAttrib>& required_attribs, On 2015/03/10 05:36:53, henryhsu wrote: > ...
5 years, 9 months ago (2015-03-10 05:55:26 UTC) #40
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 9 months ago (2015-03-10 06:24:08 UTC) #41
commit-bot: I haz the power
5 years, 9 months ago (2015-03-10 06:25:04 UTC) #42
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/a598f3adabbe02f427e2233239cdead68cf21d4f
Cr-Commit-Position: refs/heads/master@{#319842}

Powered by Google App Engine
This is Rietveld 408576698