Skip to content

Commit

Permalink
H265 VAAPI Accelerator
Browse files Browse the repository at this point in the history
This adds the VAAPI accelerator delegate for H265 decoding. This is not
actually enabled yet because there are other pieces higher up in the
decoding pipeline that still need to be turned on.

BUG=chromium:1141237,b:153111783
TEST=HEVC playback works w/ full set of changes, vaapi_unittest

Change-Id: Ic0a2dbe774267d4852e0d4d47aa378c6602ad41f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2530798
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Sergey Volk <servolk@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>
Cr-Commit-Position: refs/heads/master@{#827050}
  • Loading branch information
Narflex authored and Commit Bot committed Nov 12, 2020
1 parent ca6c887 commit f2d7b53
Show file tree
Hide file tree
Showing 11 changed files with 694 additions and 9 deletions.
4 changes: 4 additions & 0 deletions media/gpu/h265_dpb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ H265Picture::~H265Picture() = default;
H265DPB::H265DPB() = default;
H265DPB::~H265DPB() = default;

VaapiH265Picture* H265Picture::AsVaapiH265Picture() {
return nullptr;
}

void H265DPB::set_max_num_pics(size_t max_num_pics) {
DCHECK_LE(max_num_pics, static_cast<size_t>(kMaxDpbSize));
max_num_pics_ = max_num_pics;
Expand Down
4 changes: 4 additions & 0 deletions media/gpu/h265_dpb.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

namespace media {

class VaapiH265Picture;

// A picture (a frame or a field) in the H.265 spec sense.
// See spec at http://www.itu.int/rec/T-REC-H.265
class MEDIA_GPU_EXPORT H265Picture : public CodecPicture {
Expand All @@ -25,6 +27,8 @@ class MEDIA_GPU_EXPORT H265Picture : public CodecPicture {
H265Picture(const H265Picture&) = delete;
H265Picture& operator=(const H265Picture&) = delete;

virtual VaapiH265Picture* AsVaapiH265Picture();

enum ReferenceType {
kUnused = 0,
kShortTermCurrBefore = 1,
Expand Down
8 changes: 8 additions & 0 deletions media/gpu/vaapi/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import("//build/config/chromeos/ui_mode.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//media/gpu/args.gni")
import("//media/media_options.gni")
import("//testing/test.gni")
import("//tools/generate_stubs/rules.gni")
import("//ui/gl/features.gni")
Expand Down Expand Up @@ -71,6 +72,12 @@ source_set("vaapi") {
"vp9_vaapi_video_decoder_delegate.cc",
"vp9_vaapi_video_decoder_delegate.h",
]
if (proprietary_codecs && enable_platform_hevc) {
sources += [
"h265_vaapi_video_decoder_delegate.cc",
"h265_vaapi_video_decoder_delegate.h",
]
}

configs += [
"//build/config/linux/libva",
Expand All @@ -80,6 +87,7 @@ source_set("vaapi") {
deps = [
":common",
"//base",
"//build:chromeos_buildflags",
"//gpu/config",
"//gpu/ipc/common",
"//gpu/ipc/service",
Expand Down
Loading

0 comments on commit f2d7b53

Please sign in to comment.