Use vaMapBuffer() to avoid casting to non-cost pointer when calling VaapiWrapper::SubmitBuffer() |
||||
Issue descriptionWe are currently casting to non-cost when passing pointers to VaapiWrapper::SubmitBuffer(), as vaCreateBuffer() declares the buffer pointer passed to it as pointing to non-const data (the documentation of it however says that the data will be copied out, and the implementation does so as well). We can avoid this by mapping server-side memory via the vaMapBuffer() call instead, similarly to what VaapiWrapper::SubmitVAEncMiscParamBuffer() does.
,
May 31 2018
,
May 31 2018
Sent for review: https://chromium-review.googlesource.com/c/chromium/src/+/1080495
,
May 31 2018
,
Jun 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dbb57509d78498db27327d20883b4175001d793d commit dbb57509d78498db27327d20883b4175001d793d Author: Sharif Elcott <selcott@chromium.org> Date: Wed Jun 06 14:34:47 2018 Change Vaapi::SubmitBuffer() to accept a const buffer. Previously we were casting away const at call sites because vaCreateBuffer accepts a non-const buffer. However its documentation says that the data will be copied out, and the implementation does so as well. We can avoid this by mapping server-side memory via vaMapBuffer and copying it ourselves, as VaapiWrapper::SubmitVAEncMiscParamBuffer does. Bug: 844303 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I4d66d0d6ee5e672d22a5dbe4073244515fa1b14d Reviewed-on: https://chromium-review.googlesource.com/1080495 Commit-Queue: Sharif Elcott <selcott@chromium.org> Reviewed-by: Pawel Osciak <posciak@chromium.org> Cr-Commit-Position: refs/heads/master@{#564878} [modify] https://crrev.com/dbb57509d78498db27327d20883b4175001d793d/media/gpu/vaapi/vaapi_h264_accelerator.cc [modify] https://crrev.com/dbb57509d78498db27327d20883b4175001d793d/media/gpu/vaapi/vaapi_video_encode_accelerator.cc [modify] https://crrev.com/dbb57509d78498db27327d20883b4175001d793d/media/gpu/vaapi/vaapi_vp8_accelerator.cc [modify] https://crrev.com/dbb57509d78498db27327d20883b4175001d793d/media/gpu/vaapi/vaapi_vp9_accelerator.cc [modify] https://crrev.com/dbb57509d78498db27327d20883b4175001d793d/media/gpu/vaapi/vaapi_wrapper.cc [modify] https://crrev.com/dbb57509d78498db27327d20883b4175001d793d/media/gpu/vaapi/vaapi_wrapper.h
,
Jun 6 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by posciak@chromium.org
, May 31 2018Owner: selcott@chromium.org
Status: Assigned (was: Untriaged)