27 return picture->
f.
data[3];
46 DXVA2_DecodeBufferDesc *dsc,
47 unsigned type,
const void *
data,
unsigned size,
55 &dxva_data, &dxva_size))) {
59 if (size <= dxva_size) {
60 memcpy(dxva_data, data, size);
62 memset(dsc, 0,
sizeof(*dsc));
63 dsc->CompressedBufferType = type;
65 dsc->NumMBsInBuffer = mb_count;
72 if (
FAILED(IDirectXVideoDecoder_ReleaseBuffer(ctx->
decoder, type))) {
80 const void *pp,
unsigned pp_size,
81 const void *qm,
unsigned qm_size,
83 DXVA2_DecodeBufferDesc *bs,
84 DXVA2_DecodeBufferDesc *slice))
87 unsigned buffer_count = 0;
88 DXVA2_DecodeBufferDesc
buffer[4];
89 DXVA2_DecodeExecuteParams exec = { 0 };
100 DXVA2_PictureParametersBufferType,
104 "Failed to add picture parameter buffer\n");
111 DXVA2_InverseQuantizationMatrixBufferType,
115 "Failed to add inverse quantization matrix buffer\n");
121 result = commit_bs_si(avctx,
122 &buffer[buffer_count + 0],
123 &buffer[buffer_count + 1]);
126 "Failed to add bitstream or slice control buffer\n");
133 assert(buffer_count == 1 + (qm_size > 0) + 2);
135 exec.NumCompBuffers = buffer_count;
136 exec.pCompressedBuffers =
buffer;
137 exec.pExtensionData = NULL;
138 if (
FAILED(IDirectXVideoDecoder_Execute(ctx->
decoder, &exec))) {
144 if (
FAILED(IDirectXVideoDecoder_EndFrame(ctx->
decoder, NULL))) {