Commit 956a9258 authored by John Rummell's avatar John Rummell Committed by Commit Bot

Update H264Accelerator methods to return Status

Methods SubmitFrameMetadata(), SubmitSlice(), and SubmitDecode() updated to return
an enum rather than simply true/false. This allows for future changes that will
handle encrypted media when the key necessary for decryption is not currently
available and needs to be provided before decryption can continue.

BUG=837455

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: I2238178b5643acb99c8254c8cca75ad8ba2bcb11
Reviewed-on: https://chromium-review.googlesource.com/1080211Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566636}
parent 91a0deb0
......@@ -95,7 +95,7 @@ bool H264Decoder::DecodePicture() {
DCHECK(curr_pic_.get());
DVLOG(4) << "Decoding POC " << curr_pic_->pic_order_cnt;
return accelerator_->SubmitDecode(curr_pic_);
return accelerator_->SubmitDecode(curr_pic_) == H264Accelerator::Status::kOk;
}
bool H264Decoder::InitNonexistingPicture(scoped_refptr<H264Picture> pic,
......@@ -707,12 +707,9 @@ bool H264Decoder::StartNewFrame(const H264SliceHeader* slice_hdr) {
UpdatePicNums(frame_num);
PrepareRefPicLists(slice_hdr);
if (!accelerator_->SubmitFrameMetadata(sps, pps, dpb_, ref_pic_list_p0_,
ref_pic_list_b0_, ref_pic_list_b1_,
curr_pic_.get()))
return false;
return true;
return accelerator_->SubmitFrameMetadata(
sps, pps, dpb_, ref_pic_list_p0_, ref_pic_list_b0_,
ref_pic_list_b1_, curr_pic_.get()) == H264Accelerator::Status::kOk;
}
bool H264Decoder::HandleMemoryManagementOps(scoped_refptr<H264Picture> pic) {
......@@ -1217,12 +1214,10 @@ bool H264Decoder::ProcessCurrentSlice() {
if (!pps)
return false;
if (!accelerator_->SubmitSlice(pps, slice_hdr, ref_pic_list0, ref_pic_list1,
curr_pic_.get(), slice_hdr->nalu_data,
slice_hdr->nalu_size))
return false;
return true;
return accelerator_->SubmitSlice(pps, slice_hdr, ref_pic_list0, ref_pic_list1,
curr_pic_.get(), slice_hdr->nalu_data,
slice_hdr->nalu_size) ==
H264Accelerator::Status::kOk;
}
#define SET_ERROR_AND_RETURN() \
......
......@@ -33,6 +33,12 @@ class MEDIA_GPU_EXPORT H264Decoder : public AcceleratedVideoDecoder {
public:
class MEDIA_GPU_EXPORT H264Accelerator {
public:
enum class Status {
kOk, // Operation completed successfully.
kFail, // Operation failed.
kNoKey, // Operation failed because the key for decryption is missing.
};
H264Accelerator();
virtual ~H264Accelerator();
......@@ -53,14 +59,17 @@ class MEDIA_GPU_EXPORT H264Decoder : public AcceleratedVideoDecoder {
// Note that this does not run decode in the accelerator and the decoder
// is expected to follow this call with one or more SubmitSlice() calls
// before calling SubmitDecode().
// Return true if successful.
virtual bool SubmitFrameMetadata(const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) = 0;
// Returns kOk if successful, kNoKey if the buffer is encrypted and could
// not be processed because the key for decryption is missing, or kFail
// if there are errors.
virtual Status SubmitFrameMetadata(
const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) = 0;
// Submit one slice for the current frame, passing the current |pps| and
// |pic| (same as in SubmitFrameMetadata()), the parsed header for the
......@@ -70,20 +79,24 @@ class MEDIA_GPU_EXPORT H264Decoder : public AcceleratedVideoDecoder {
// |size| in bytes.
// This must be called one or more times per frame, before SubmitDecode().
// Note that |data| does not have to remain valid after this call returns.
// Return true if successful.
virtual bool SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) = 0;
// Returns kOk if successful, kNoKey if the buffer is encrypted and could
// not be processed because the key for decryption is missing, or kFail
// if there are errors.
virtual Status SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) = 0;
// Execute the decode in hardware for |pic|, using all the slices and
// metadata submitted via SubmitFrameMetadata() and SubmitSlice() since
// the previous call to SubmitDecode().
// Return true if successful.
virtual bool SubmitDecode(const scoped_refptr<H264Picture>& pic) = 0;
// Returns kOk if successful, kNoKey if the buffer is encrypted and could
// not be processed because the key for decryption is missing, or kFail
// if there are errors.
virtual Status SubmitDecode(const scoped_refptr<H264Picture>& pic) = 0;
// Schedule output (display) of |pic|. Note that returning from this
// method does not mean that |pic| has already been outputted (displayed),
......
......@@ -45,27 +45,27 @@ class MockH264Accelerator : public H264Decoder::H264Accelerator {
MockH264Accelerator() = default;
MOCK_METHOD0(CreateH264Picture, scoped_refptr<H264Picture>());
MOCK_METHOD1(SubmitDecode, bool(const scoped_refptr<H264Picture>& pic));
MOCK_METHOD1(SubmitDecode, Status(const scoped_refptr<H264Picture>& pic));
MOCK_METHOD1(OutputPicture, bool(const scoped_refptr<H264Picture>& pic));
bool SubmitFrameMetadata(const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) override {
return true;
Status SubmitFrameMetadata(const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) override {
return Status::kOk;
}
bool SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) override {
return true;
Status SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) override {
return Status::kOk;
}
void Reset() override {}
......@@ -106,7 +106,8 @@ void H264DecoderTest::SetUp() {
ON_CALL(*accelerator_, CreateH264Picture()).WillByDefault(Invoke([]() {
return new H264Picture();
}));
ON_CALL(*accelerator_, SubmitDecode(_)).WillByDefault(Return(true));
ON_CALL(*accelerator_, SubmitDecode(_))
.WillByDefault(Return(H264Decoder::H264Accelerator::Status::kOk));
ON_CALL(*accelerator_, OutputPicture(_)).WillByDefault(Return(true));
}
......
......@@ -262,29 +262,31 @@ V4L2SliceVideoDecodeAccelerator::PictureRecord::~PictureRecord() {}
class V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator
: public H264Decoder::H264Accelerator {
public:
using Status = H264Decoder::H264Accelerator::Status;
explicit V4L2H264Accelerator(V4L2SliceVideoDecodeAccelerator* v4l2_dec);
~V4L2H264Accelerator() override;
// H264Decoder::H264Accelerator implementation.
scoped_refptr<H264Picture> CreateH264Picture() override;
bool SubmitFrameMetadata(const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) override;
bool SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) override;
bool SubmitDecode(const scoped_refptr<H264Picture>& pic) override;
Status SubmitFrameMetadata(const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) override;
Status SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) override;
Status SubmitDecode(const scoped_refptr<H264Picture>& pic) override;
bool OutputPicture(const scoped_refptr<H264Picture>& pic) override;
void Reset() override;
......@@ -2141,7 +2143,8 @@ void V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::H264DPBToV4L2DPB(
}
}
bool V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitFrameMetadata(
H264Decoder::H264Accelerator::Status
V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitFrameMetadata(
const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
......@@ -2316,10 +2319,11 @@ bool V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitFrameMetadata(
H264DPBToV4L2DPB(dpb, &ref_surfaces);
dec_surface->SetReferenceSurfaces(ref_surfaces);
return true;
return Status::kOk;
}
bool V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitSlice(
H264Decoder::H264Accelerator::Status
V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitSlice(
const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
......@@ -2329,7 +2333,7 @@ bool V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitSlice(
size_t size) {
if (num_slices_ == kMaxSlices) {
VLOGF(1) << "Over limit of supported slices per frame";
return false;
return Status::kFail;
}
struct v4l2_ctrl_h264_slice_param& v4l2_slice_param =
......@@ -2437,7 +2441,9 @@ bool V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitSlice(
data_copy[2] = 0x01;
memcpy(data_copy.get() + 3, data, size);
return v4l2_dec_->SubmitSlice(dec_surface->input_record(), data_copy.get(),
data_copy_size);
data_copy_size)
? Status::kOk
: Status::kFail;
}
bool V4L2SliceVideoDecodeAccelerator::SubmitSlice(int index,
......@@ -2483,7 +2489,8 @@ bool V4L2SliceVideoDecodeAccelerator::IsCtrlExposed(uint32_t ctrl_id) {
return (device_->Ioctl(VIDIOC_QUERYCTRL, &query_ctrl) == 0);
}
bool V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitDecode(
H264Decoder::H264Accelerator::Status
V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitDecode(
const scoped_refptr<H264Picture>& pic) {
scoped_refptr<V4L2DecodeSurface> dec_surface =
H264PictureToV4L2DecodeSurface(pic);
......@@ -2514,12 +2521,12 @@ bool V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::SubmitDecode(
ext_ctrls.controls = &ctrls[0];
ext_ctrls.config_store = dec_surface->config_store();
if (!v4l2_dec_->SubmitExtControls(&ext_ctrls))
return false;
return Status::kFail;
Reset();
v4l2_dec_->DecodeSurface(dec_surface);
return true;
return Status::kOk;
}
bool V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator::OutputPicture(
......
......@@ -19,6 +19,8 @@
namespace media {
using Status = H264Decoder::H264Accelerator::Status;
namespace {
// from ITU-T REC H.264 spec
......@@ -67,7 +69,7 @@ static void InitVAPicture(VAPictureH264* va_pic) {
va_pic->flags = VA_PICTURE_H264_INVALID;
}
bool VaapiH264Accelerator::SubmitFrameMetadata(
Status VaapiH264Accelerator::SubmitFrameMetadata(
const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
......@@ -147,7 +149,7 @@ bool VaapiH264Accelerator::SubmitFrameMetadata(
if (!vaapi_wrapper_->SubmitBuffer(VAPictureParameterBufferType,
sizeof(pic_param), &pic_param))
return false;
return Status::kFail;
VAIQMatrixBufferH264 iq_matrix_buf;
memset(&iq_matrix_buf, 0, sizeof(iq_matrix_buf));
......@@ -179,16 +181,19 @@ bool VaapiH264Accelerator::SubmitFrameMetadata(
}
return vaapi_wrapper_->SubmitBuffer(VAIQMatrixBufferType,
sizeof(iq_matrix_buf), &iq_matrix_buf);
sizeof(iq_matrix_buf), &iq_matrix_buf)
? Status::kOk
: Status::kFail;
}
bool VaapiH264Accelerator::SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) {
Status VaapiH264Accelerator::SubmitSlice(
const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
VASliceParameterBufferH264 slice_param;
memset(&slice_param, 0, sizeof(slice_param));
......@@ -280,16 +285,21 @@ bool VaapiH264Accelerator::SubmitSlice(const H264PPS* pps,
if (!vaapi_wrapper_->SubmitBuffer(VASliceParameterBufferType,
sizeof(slice_param), &slice_param))
return false;
return Status::kFail;
return vaapi_wrapper_->SubmitBuffer(VASliceDataBufferType, size, data);
return vaapi_wrapper_->SubmitBuffer(VASliceDataBufferType, size, data)
? Status::kOk
: Status::kFail;
}
bool VaapiH264Accelerator::SubmitDecode(const scoped_refptr<H264Picture>& pic) {
Status VaapiH264Accelerator::SubmitDecode(
const scoped_refptr<H264Picture>& pic) {
VLOGF(4) << "Decoding POC " << pic->pic_order_cnt;
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return vaapi_dec_->DecodeVASurface(pic->AsVaapiH264Picture()->va_surface());
return vaapi_dec_->DecodeVASurface(pic->AsVaapiH264Picture()->va_surface())
? Status::kOk
: Status::kFail;
}
bool VaapiH264Accelerator::OutputPicture(
......
......@@ -25,21 +25,21 @@ class VaapiH264Accelerator : public H264Decoder::H264Accelerator {
// H264Decoder::H264Accelerator implementation.
scoped_refptr<H264Picture> CreateH264Picture() override;
bool SubmitFrameMetadata(const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) override;
bool SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) override;
bool SubmitDecode(const scoped_refptr<H264Picture>& pic) override;
Status SubmitFrameMetadata(const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) override;
Status SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) override;
Status SubmitDecode(const scoped_refptr<H264Picture>& pic) override;
bool OutputPicture(const scoped_refptr<H264Picture>& pic) override;
void Reset() override;
......
......@@ -23,6 +23,8 @@
namespace media {
using Status = H264Decoder::H264Accelerator::Status;
class D3D11H264Picture : public H264Picture {
public:
D3D11H264Picture(D3D11PictureBuffer* picture)
......@@ -61,7 +63,7 @@ scoped_refptr<H264Picture> D3D11H264Accelerator::CreateH264Picture() {
return base::MakeRefCounted<D3D11H264Picture>(picture);
}
bool D3D11H264Accelerator::SubmitFrameMetadata(
Status D3D11H264Accelerator::SubmitFrameMetadata(
const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
......@@ -84,7 +86,7 @@ bool D3D11H264Accelerator::SubmitFrameMetadata(
;
} else if (!SUCCEEDED(hr)) {
LOG(ERROR) << "DecoderBeginFrame failed";
return false;
return Status::kFail;
} else {
break;
}
......@@ -124,7 +126,7 @@ bool D3D11H264Accelerator::SubmitFrameMetadata(
i++;
}
slice_info_.clear();
return RetrieveBitstreamBuffer();
return RetrieveBitstreamBuffer() ? Status::kOk : Status::kFail;
}
bool D3D11H264Accelerator::RetrieveBitstreamBuffer() {
......@@ -147,13 +149,14 @@ bool D3D11H264Accelerator::RetrieveBitstreamBuffer() {
return true;
}
bool D3D11H264Accelerator::SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) {
Status D3D11H264Accelerator::SubmitSlice(
const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) {
scoped_refptr<D3D11H264Picture> our_pic(
static_cast<D3D11H264Picture*>(pic.get()));
DXVA_PicParams_H264 pic_param = {};
......@@ -248,7 +251,7 @@ bool D3D11H264Accelerator::SubmitSlice(const H264PPS* pps,
&buffer_size, &buffer);
if (!SUCCEEDED(hr)) {
LOG(ERROR) << "ReleaseDecoderBuffer (PictureParams) failed";
return false;
return Status::kFail;
}
memcpy(buffer, &pic_param, sizeof(pic_param));
......@@ -256,7 +259,7 @@ bool D3D11H264Accelerator::SubmitSlice(const H264PPS* pps,
video_decoder_.Get(), D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS);
if (!SUCCEEDED(hr)) {
LOG(ERROR) << "ReleaseDecoderBuffer (PictureParams) failed";
return false;
return Status::kFail;
}
DXVA_Qmatrix_H264 iq_matrix_buf = {};
......@@ -288,7 +291,7 @@ bool D3D11H264Accelerator::SubmitSlice(const H264PPS* pps,
&buffer);
if (!SUCCEEDED(hr)) {
LOG(ERROR) << "GetDecoderBuffer (QuantMatrix) failed";
return false;
return Status::kFail;
}
memcpy(buffer, &iq_matrix_buf, sizeof(iq_matrix_buf));
hr = video_context_->ReleaseDecoderBuffer(
......@@ -296,7 +299,7 @@ bool D3D11H264Accelerator::SubmitSlice(const H264PPS* pps,
D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX);
if (!SUCCEEDED(hr)) {
LOG(ERROR) << "ReleaseDecoderBuffer (QuantMatrix) failed";
return false;
return Status::kFail;
}
// Ideally all slices in a frame are put in the same bitstream buffer.
......@@ -313,11 +316,12 @@ bool D3D11H264Accelerator::SubmitSlice(const H264PPS* pps,
slice_info_.size() > 0) {
if (!SubmitSliceData()) {
LOG(ERROR) << "SubmitSliceData failed";
return false;
return Status::kFail;
}
if (!RetrieveBitstreamBuffer()) {
LOG(ERROR) << "RetrieveBitstreamBuffer failed";
return false;
return Status::kFail;
}
}
......@@ -358,7 +362,7 @@ bool D3D11H264Accelerator::SubmitSlice(const H264PPS* pps,
bitstream_buffer_bytes_ += bytes_to_copy;
}
return true;
return Status::kOk;
}
bool D3D11H264Accelerator::SubmitSliceData() {
......@@ -420,19 +424,20 @@ bool D3D11H264Accelerator::SubmitSliceData() {
return true;
}
bool D3D11H264Accelerator::SubmitDecode(const scoped_refptr<H264Picture>& pic) {
Status D3D11H264Accelerator::SubmitDecode(
const scoped_refptr<H264Picture>& pic) {
if (!SubmitSliceData()) {
LOG(ERROR) << "SubmitSliceData failed";
return false;
return Status::kFail;
}
HRESULT hr = video_context_->DecoderEndFrame(video_decoder_.Get());
if (!SUCCEEDED(hr)) {
LOG(ERROR) << "DecoderEndFrame failed";
return false;
return Status::kFail;
}
return true;
return Status::kOk;
}
void D3D11H264Accelerator::Reset() {
......
......@@ -44,21 +44,21 @@ class D3D11H264Accelerator : public H264Decoder::H264Accelerator {
// H264Decoder::H264Accelerator implementation.
scoped_refptr<H264Picture> CreateH264Picture() override;
bool SubmitFrameMetadata(const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) override;
bool SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) override;
bool SubmitDecode(const scoped_refptr<H264Picture>& pic) override;
Status SubmitFrameMetadata(const H264SPS* sps,
const H264PPS* pps,
const H264DPB& dpb,
const H264Picture::Vector& ref_pic_listp0,
const H264Picture::Vector& ref_pic_listb0,
const H264Picture::Vector& ref_pic_listb1,
const scoped_refptr<H264Picture>& pic) override;
Status SubmitSlice(const H264PPS* pps,
const H264SliceHeader* slice_hdr,
const H264Picture::Vector& ref_pic_list0,
const H264Picture::Vector& ref_pic_list1,
const scoped_refptr<H264Picture>& pic,
const uint8_t* data,
size_t size) override;
Status SubmitDecode(const scoped_refptr<H264Picture>& pic) override;
void Reset() override;
bool OutputPicture(const scoped_refptr<H264Picture>& pic) override;
......
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