Commit 33198f28 authored by Ted Meyer's avatar Ted Meyer Committed by Commit Bot

Adds D3D11VP9Picture for use in an Accelerator

It is basically a mimic of the h264 picture, and will be used in the
D3D11Vp9accelerator class, when that is ready. There also appear to be
two styles for accelerators to downcast, where vaapi & V4L2 use
as___Picture() methods to get a raw pointer, but D3D11 just uses static
casts. I think a future good cleanup is to get rid of the extra methods
and not rely on forward declarations.

Bug: 881922
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: I6a7cfbb81e230a7ea46ae3c3e27aebf52a559913
Reviewed-on: https://chromium-review.googlesource.com/1213871
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589695}
parent 957876a8
......@@ -266,6 +266,8 @@ component("gpu") {
"windows/d3d11_video_decoder.h",
"windows/d3d11_video_decoder_impl.cc",
"windows/d3d11_video_decoder_impl.h",
"windows/d3d11_vp9_picture.cc",
"windows/d3d11_vp9_picture.h",
"windows/dxva_picture_buffer_win.cc",
"windows/dxva_picture_buffer_win.h",
"windows/dxva_video_decode_accelerator_win.cc",
......@@ -325,6 +327,8 @@ source_set("common") {
"h264_decoder.h",
"h264_dpb.cc",
"h264_dpb.h",
"vp9_picture.cc",
"vp9_picture.h",
]
if (use_v4l2_codec || use_vaapi) {
sources += [
......@@ -337,8 +341,6 @@ source_set("common") {
"vp8_reference_frame_vector.h",
"vp9_decoder.cc",
"vp9_decoder.h",
"vp9_picture.cc",
"vp9_picture.h",
]
}
......
......@@ -20,6 +20,7 @@ class VP9Picture : public CodecPicture {
public:
VP9Picture();
// TODO(tmathmeyer) remove these and just use static casts everywhere.
virtual V4L2VP9Picture* AsV4L2VP9Picture();
virtual VaapiVP9Picture* AsVaapiVP9Picture();
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/windows/d3d11_vp9_picture.h"
namespace media {
D3D11VP9Picture::D3D11VP9Picture(D3D11PictureBuffer* picture_buffer)
: picture_buffer_(picture_buffer), level_(picture_buffer_->level()) {
picture_buffer_->set_in_picture_use(true);
}
D3D11VP9Picture::~D3D11VP9Picture() {
picture_buffer_->set_in_picture_use(false);
}
} // namespace media
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_GPU_WINDOWS_D3D11_VP9_PICTURE_H_
#define MEDIA_GPU_WINDOWS_D3D11_VP9_PICTURE_H_
#include "media/gpu/vp9_picture.h"
#include "media/gpu/windows/d3d11_picture_buffer.h"
namespace media {
class D3D11PictureBuffer;
class D3D11VP9Picture : public VP9Picture {
public:
explicit D3D11VP9Picture(D3D11PictureBuffer* picture_buffer);
protected:
~D3D11VP9Picture() override;
private:
D3D11PictureBuffer* picture_buffer_;
size_t level_;
};
} // namespace media
#endif // MEDIA_GPU_WINDOWS_D3D11_VP9_PICTURE_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment