1 module aurora.directx.d3d12.d3d12video; 2 3 version(Windows): 4 5 public import aurora.directx.com; 6 public import aurora.directx.dxgi.dxgicommon; 7 public import aurora.directx.d3d12.d3d12; 8 9 public: 10 11 /// 12 /// Constants 13 /// 14 15 /// 16 /// Functions 17 /// 18 19 /// 20 /// Enumerations 21 /// 22 23 enum D3D12_VIDEO_FIELD_TYPE 24 { 25 D3D12_VIDEO_FIELD_TYPE_NONE = 0, 26 D3D12_VIDEO_FIELD_TYPE_INTERLACED_TOP_FIELD_FIRST = 1, 27 D3D12_VIDEO_FIELD_TYPE_INTERLACED_BOTTOM_FIELD_FIRST = 2 28 } 29 30 enum D3D12_VIDEO_FRAME_STEREO_FORMAT 31 { 32 NONE = 0, 33 MONO = 1, 34 HORIZONTAL = 2, 35 VERTICAL = 3, 36 SEPARATE = 4 37 } 38 39 enum D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE 40 { 41 NONE = 0, 42 FIELD_BASED = 1 43 } 44 45 enum D3D12_FEATURE_VIDEO 46 { 47 DECODE_SUPPORT = 0, 48 DECODE_PROFILES = 1, 49 DECODE_FORMATS = 2, 50 DECODE_CONVERSION_SUPPORT = 3, 51 PROCESS_SUPPORT = 5, 52 PROCESS_MAX_INPUT_STREAMS = 6, 53 PROCESS_REFERENCE_INFO = 7, 54 DECODER_HEAP_SIZE = 8, 55 PROCESSOR_SIZE = 9, 56 DECODE_PROFILE_COUNT = 10, 57 DECODE_FORMAT_COUNT = 11, 58 ARCHITECTURE = 17 59 } 60 61 enum D3D12_BITSTREAM_ENCRYPTION_TYPE 62 { 63 NONE = 0 64 } 65 66 enum D3D12_VIDEO_PROCESS_FILTER 67 { 68 BRIGHTNESS = 0, 69 CONTRAST = 1, 70 HUE = 2, 71 SATURATION = 3, 72 NOISE_REDUCTION = 4, 73 EDGE_ENHANCEMENT = 5, 74 ANAMORPHIC_SCALING = 6, 75 STEREO_ADJUSTMENT = 7 76 } 77 78 enum D3D12_VIDEO_PROCESS_FILTER_FLAGS 79 { 80 RANGE_UINT64NONE = 0, 81 RANGE_UINT64BRIGHTNESS = ( 1 << D3D12_VIDEO_PROCESS_FILTER.BRIGHTNESS ) , 82 RANGE_UINT64CONTRAST = ( 1 << D3D12_VIDEO_PROCESS_FILTER.CONTRAST ) , 83 RANGE_UINT64HUE = ( 1 << D3D12_VIDEO_PROCESS_FILTER.HUE ) , 84 RANGE_UINT64SATURATION = ( 1 << D3D12_VIDEO_PROCESS_FILTER.SATURATION ) , 85 RANGE_UINT64NOISE_REDUCTION = ( 1 << D3D12_VIDEO_PROCESS_FILTER.NOISE_REDUCTION ) , 86 RANGE_UINT64EDGE_ENHANCEMENT = ( 1 << D3D12_VIDEO_PROCESS_FILTER.EDGE_ENHANCEMENT ) , 87 RANGE_UINT64ANAMORPHIC_SCALING = ( 1 << D3D12_VIDEO_PROCESS_FILTER.ANAMORPHIC_SCALING ) , 88 RANGE_UINT64STEREO_ADJUSTMENT = ( 1 << D3D12_VIDEO_PROCESS_FILTER.STEREO_ADJUSTMENT ) 89 } 90 91 enum D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS 92 { 93 NONE = 0, 94 BOB = 0x1, 95 CUSTOM = 0x80000000 96 } 97 98 enum D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE 99 { 100 OPAQUE = 0, 101 BACKGROUND = 1, 102 DESTINATION = 2, 103 SOURCE_STREAM = 3 104 } 105 106 enum D3D12_VIDEO_DECODE_TIER 107 { 108 TIER_NOT_SUPPORTED = 0, 109 TIER_1 = 1, 110 TIER_2 = 2, 111 TIER_3 = 3 112 } 113 114 enum D3D12_VIDEO_DECODE_SUPPORT_FLAGS 115 { 116 NONE = 0, 117 SUPPORTED = 0x1 118 } 119 120 enum D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS 121 { 122 NONE = 0, 123 HEIGHT_ALIGNMENT_MULTIPLE_32_REQUIRED = 0x1, 124 POST_PROCESSING_SUPPORTED = 0x2, 125 REFERENCE_ONLY_ALLOCATIONS_REQUIRED = 0x4, 126 ALLOW_RESOLUTION_CHANGE_ON_NON_KEY_FRAME = 0x8 127 } 128 129 enum D3D12_VIDEO_DECODE_STATUS 130 { 131 OK = 0, 132 CONTINUE = 1, 133 CONTINUE_SKIP_DISPLAY = 2, 134 RESTART = 3 135 } 136 137 enum D3D12_VIDEO_DECODE_ARGUMENT_TYPE 138 { 139 PICTURE_PARAMETERS = 0, 140 INVERSE_QUANTIZATION_MATRIX = 1, 141 SLICE_CONTROL = 2, 142 MAX_VALID = 3 143 } 144 145 enum D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS 146 { 147 NONE = 0, 148 SUPPORTED = 0x1 149 } 150 151 enum D3D12_VIDEO_SCALE_SUPPORT_FLAGS 152 { 153 NONE = 0, 154 POW2_ONLY = 0x1, 155 EVEN_DIMENSIONS_ONLY = 0x2 156 } 157 158 enum D3D12_VIDEO_PROCESS_FEATURE_FLAGS 159 { 160 NONE = 0, 161 ALPHA_FILL = 0x1, 162 LUMA_KEY = 0x2, 163 STEREO = 0x4, 164 ROTATION = 0x8, 165 FLIP = 0x10, 166 ALPHA_BLENDING = 0x20, 167 PIXEL_ASPECT_RATIO = 0x40 168 } 169 170 enum D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS 171 { 172 NONE = 0, 173 DENOISE = 0x1, 174 DERINGING = 0x2, 175 EDGE_ENHANCEMENT = 0x4, 176 COLOR_CORRECTION = 0x8, 177 FLESH_TONE_MAPPING = 0x10, 178 IMAGE_STABILIZATION = 0x20, 179 SUPER_RESOLUTION = 0x40, 180 ANAMORPHIC_SCALING = 0x80, 181 CUSTOM = 0x80000000 182 } 183 184 enum D3D12_VIDEO_PROCESS_ORIENTATION 185 { 186 DEFAULT = 0, 187 FLIP_HORIZONTAL = 1, 188 CLOCKWISE_90 = 2, 189 CLOCKWISE_90_FLIP_HORIZONTAL = 3, 190 CLOCKWISE_180 = 4, 191 FLIP_VERTICAL = 5, 192 CLOCKWISE_270 = 6, 193 CLOCKWISE_270_FLIP_HORIZONTAL = 7 194 } 195 196 enum D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS 197 { 198 NONE = 0, 199 FRAME_DISCONTINUITY = 0x1, 200 D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_FRAME_REPEAT = 0x2 201 } 202 203 enum D3D12_VIDEO_PROCESS_SUPPORT_FLAGS 204 { 205 NONE = 0, 206 SUPPORTED = 0x1 207 } 208 209 /// 210 /// Structures 211 /// 212 213 struct D3D12_VIDEO_FORMAT 214 { 215 DXGI_FORMAT Format; 216 DXGI_COLOR_SPACE_TYPE ColorSpace; 217 } 218 219 struct D3D12_VIDEO_SAMPLE 220 { 221 uint Width; 222 uint Height; 223 D3D12_VIDEO_FORMAT Format; 224 } 225 226 struct D3D12_VIDEO_DECODE_CONFIGURATION 227 { 228 GUID DecodeProfile; 229 D3D12_BITSTREAM_ENCRYPTION_TYPE BitstreamEncryption; 230 D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE InterlaceType; 231 } 232 233 struct D3D12_VIDEO_DECODER_DESC 234 { 235 uint NodeMask; 236 D3D12_VIDEO_DECODE_CONFIGURATION Configuration; 237 } 238 239 struct D3D12_VIDEO_DECODER_HEAP_DESC 240 { 241 uint NodeMask; 242 D3D12_VIDEO_DECODE_CONFIGURATION Configuration; 243 uint DecodeWidth; 244 uint DecodeHeight; 245 DXGI_FORMAT Format; 246 DXGI_RATIONAL FrameRate; 247 uint BitRate; 248 uint MaxDecodePictureBufferCount; 249 } 250 251 struct D3D12_VIDEO_SIZE_RANGE 252 { 253 uint MaxWidth; 254 uint MaxHeight; 255 uint MinWidth; 256 uint MinHeight; 257 } 258 259 struct D3D12_VIDEO_PROCESS_ALPHA_BLENDING 260 { 261 bool Enable; 262 float Alpha; 263 } 264 265 struct D3D12_VIDEO_PROCESS_LUMA_KEY 266 { 267 bool Enable; 268 float Lower; 269 float Upper; 270 } 271 272 struct D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC 273 { 274 DXGI_FORMAT Format; 275 DXGI_COLOR_SPACE_TYPE ColorSpace; 276 DXGI_RATIONAL SourceAspectRatio; 277 DXGI_RATIONAL DestinationAspectRatio; 278 DXGI_RATIONAL FrameRate; 279 D3D12_VIDEO_SIZE_RANGE SourceSizeRange; 280 D3D12_VIDEO_SIZE_RANGE DestinationSizeRange; 281 bool EnableOrientation; 282 D3D12_VIDEO_PROCESS_FILTER_FLAGS FilterFlags; 283 D3D12_VIDEO_FRAME_STEREO_FORMAT StereoFormat; 284 D3D12_VIDEO_FIELD_TYPE FieldType; 285 D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceMode; 286 bool EnableAlphaBlending; 287 D3D12_VIDEO_PROCESS_LUMA_KEY LumaKey; 288 uint NumPastFrames; 289 uint NumFutureFrames; 290 bool EnableAutoProcessing; 291 } 292 293 struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC 294 { 295 DXGI_FORMAT Format; 296 DXGI_COLOR_SPACE_TYPE ColorSpace; 297 D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE AlphaFillMode; 298 uint AlphaFillModeSourceStreamIndex; 299 float[4] BackgroundColor; 300 DXGI_RATIONAL FrameRate; 301 bool EnableStereo; 302 } 303 304 struct D3D12_FEATURE_DATA_VIDEO_DECODE_SUPPORT 305 { 306 uint NodeIndex; 307 D3D12_VIDEO_DECODE_CONFIGURATION Configuration; 308 uint Width; 309 uint Height; 310 DXGI_FORMAT DecodeFormat; 311 DXGI_RATIONAL FrameRate; 312 uint BitRate; 313 D3D12_VIDEO_DECODE_SUPPORT_FLAGS SupportFlags; 314 D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS ConfigurationFlags; 315 D3D12_VIDEO_DECODE_TIER DecodeTier; 316 } 317 318 struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILE_COUNT 319 { 320 uint NodeIndex; 321 uint ProfileCount; 322 } 323 324 struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILES 325 { 326 uint NodeIndex; 327 uint ProfileCount; 328 GUID *pProfiles; 329 } 330 331 struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT 332 { 333 uint NodeIndex; 334 D3D12_VIDEO_DECODE_CONFIGURATION Configuration; 335 uint FormatCount; 336 } 337 338 struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS 339 { 340 uint NodeIndex; 341 D3D12_VIDEO_DECODE_CONFIGURATION Configuration; 342 uint FormatCount; 343 DXGI_FORMAT *pOutputFormats; 344 } 345 346 struct D3D12_FEATURE_DATA_VIDEO_ARCHITECTURE 347 { 348 bool IOCoherent; 349 } 350 351 struct D3D12_VIDEO_SCALE_SUPPORT 352 { 353 D3D12_VIDEO_SIZE_RANGE OutputSizeRange; 354 D3D12_VIDEO_SCALE_SUPPORT_FLAGS Flags; 355 } 356 357 struct D3D12_FEATURE_DATA_VIDEO_DECODE_CONVERSION_SUPPORT 358 { 359 uint NodeIndex; 360 D3D12_VIDEO_DECODE_CONFIGURATION Configuration; 361 D3D12_VIDEO_SAMPLE DecodeSample; 362 D3D12_VIDEO_FORMAT OutputFormat; 363 DXGI_RATIONAL FrameRate; 364 uint BitRate; 365 D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS SupportFlags; 366 D3D12_VIDEO_SCALE_SUPPORT ScaleSupport; 367 } 368 369 struct D3D12_FEATURE_DATA_VIDEO_DECODER_HEAP_SIZE 370 { 371 D3D12_VIDEO_DECODER_HEAP_DESC VideoDecoderHeapDesc; 372 ulong MemoryPoolL0Size; 373 ulong MemoryPoolL1Size; 374 } 375 376 struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE 377 { 378 uint NodeMask; 379 const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC *pOutputStreamDesc; 380 uint NumInputStreamDescs; 381 const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs; 382 ulong MemoryPoolL0Size; 383 ulong MemoryPoolL1Size; 384 } 385 386 struct D3D12_QUERY_DATA_VIDEO_DECODE_STATISTICS 387 { 388 ulong Status; 389 ulong NumMacroblocksAffected; 390 DXGI_RATIONAL FrameRate; 391 uint BitRate; 392 } 393 394 struct D3D12_VIDEO_DECODE_SUB_SAMPLE_MAPPING_BLOCK 395 { 396 uint ClearSize; 397 uint EncryptedSize; 398 } 399 400 struct D3D12_VIDEO_DECODE_FRAME_ARGUMENT 401 { 402 D3D12_VIDEO_DECODE_ARGUMENT_TYPE Type; 403 uint Size; 404 void *pData; 405 } 406 407 struct D3D12_VIDEO_DECODE_REFERENCE_FRAMES 408 { 409 uint NumTexture2Ds; 410 ID3D12Resource *ppTexture2Ds; 411 uint *pSubresources; 412 ID3D12VideoDecoderHeap *ppHeaps; 413 } 414 415 struct D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM 416 { 417 ID3D12Resource pBuffer; 418 ulong Offset; 419 ulong Size; 420 } 421 422 struct D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS 423 { 424 bool Enable; 425 ID3D12Resource pReferenceTexture2D; 426 uint ReferenceSubresource; 427 DXGI_COLOR_SPACE_TYPE OutputColorSpace; 428 DXGI_COLOR_SPACE_TYPE DecodeColorSpace; 429 } 430 431 struct D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS 432 { 433 uint NumFrameArguments; 434 D3D12_VIDEO_DECODE_FRAME_ARGUMENT[10] FrameArguments; 435 D3D12_VIDEO_DECODE_REFERENCE_FRAMES ReferenceFrames; 436 D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM CompressedBitstream; 437 ID3D12VideoDecoderHeap pHeap; 438 } 439 440 struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS 441 { 442 ID3D12Resource pOutputTexture2D; 443 uint OutputSubresource; 444 D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS ConversionArguments; 445 } 446 447 struct D3D12_VIDEO_PROCESS_FILTER_RANGE 448 { 449 int Minimum; 450 int Maximum; 451 int Default; 452 float Multiplier; 453 } 454 455 struct D3D12_FEATURE_DATA_VIDEO_PROCESS_SUPPORT 456 { 457 uint NodeIndex; 458 D3D12_VIDEO_SAMPLE InputSample; 459 D3D12_VIDEO_FIELD_TYPE InputFieldType; 460 D3D12_VIDEO_FRAME_STEREO_FORMAT InputStereoFormat; 461 DXGI_RATIONAL InputFrameRate; 462 D3D12_VIDEO_FORMAT OutputFormat; 463 D3D12_VIDEO_FRAME_STEREO_FORMAT OutputStereoFormat; 464 DXGI_RATIONAL OutputFrameRate; 465 D3D12_VIDEO_PROCESS_SUPPORT_FLAGS SupportFlags; 466 D3D12_VIDEO_SCALE_SUPPORT ScaleSupport; 467 D3D12_VIDEO_PROCESS_FEATURE_FLAGS FeatureSupport; 468 D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceSupport; 469 D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS AutoProcessingSupport; 470 D3D12_VIDEO_PROCESS_FILTER_FLAGS FilterSupport; 471 D3D12_VIDEO_PROCESS_FILTER_RANGE[32] FilterRangeSupport; 472 } 473 474 struct D3D12_FEATURE_DATA_VIDEO_PROCESS_MAX_INPUT_STREAMS 475 { 476 uint NodeIndex; 477 uint MaxInputStreams; 478 } 479 480 struct D3D12_FEATURE_DATA_VIDEO_PROCESS_REFERENCE_INFO 481 { 482 uint NodeIndex; 483 D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceMode; 484 D3D12_VIDEO_PROCESS_FILTER_FLAGS Filters; 485 D3D12_VIDEO_PROCESS_FEATURE_FLAGS FeatureSupport; 486 DXGI_RATIONAL InputFrameRate; 487 DXGI_RATIONAL OutputFrameRate; 488 bool EnableAutoProcessing; 489 uint PastFrames; 490 uint FutureFrames; 491 } 492 493 struct D3D12_VIDEO_PROCESS_REFERENCE_SET 494 { 495 uint NumPastFrames; 496 ID3D12Resource *ppPastFrames; 497 uint *pPastSubresources; 498 uint NumFutureFrames; 499 ID3D12Resource *ppFutureFrames; 500 uint *pFutureSubresources; 501 } 502 503 struct D3D12_VIDEO_PROCESS_TRANSFORM 504 { 505 D3D12_RECT SourceRectangle; 506 D3D12_RECT DestinationRectangle; 507 D3D12_VIDEO_PROCESS_ORIENTATION Orientation; 508 } 509 510 struct D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE 511 { 512 uint OutputIndex; 513 uint InputFrameOrField; 514 } 515 516 struct D3D12_VIDEO_PROCESS_INPUT_STREAM 517 { 518 ID3D12Resource pTexture2D; 519 uint Subresource; 520 D3D12_VIDEO_PROCESS_REFERENCE_SET ReferenceSet; 521 } 522 523 struct D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS 524 { 525 D3D12_VIDEO_PROCESS_INPUT_STREAM[2] InputStream; 526 D3D12_VIDEO_PROCESS_TRANSFORM Transform; 527 D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS Flags; 528 D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE RateInfo; 529 int[32] FilterLevels; 530 D3D12_VIDEO_PROCESS_ALPHA_BLENDING AlphaBlending; 531 } 532 533 struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM 534 { 535 ID3D12Resource pTexture2D; 536 uint Subresource; 537 } 538 539 struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS 540 { 541 D3D12_VIDEO_PROCESS_OUTPUT_STREAM[2] OutputStream; 542 D3D12_RECT TargetRectangle; 543 } 544 545 /// 546 /// Interfaces 547 /// 548 549 mixin(uuid!(ID3D12VideoDecoderHeap, "0946B7C9-EBF6-4047-BB73-8683E27DBB1F")); 550 public interface ID3D12VideoDecoderHeap : ID3D12Pageable 551 { 552 extern(Windows): 553 D3D12_VIDEO_DECODER_HEAP_DESC GetDesc(); 554 } 555 556 mixin(uuid!(ID3D12VideoDevice, "1F052807-0B46-4ACC-8A89-364F793718A4")); 557 public interface ID3D12VideoDevice : IUnknown 558 { 559 extern(Windows): 560 HRESULT CheckFeatureSupport(D3D12_FEATURE_VIDEO FeatureVideo, void *pFeatureSupportData, uint FeatureSupportDataSize); 561 HRESULT CreateVideoDecoder(const D3D12_VIDEO_DECODER_DESC *pDesc, REFIID riid, void **ppVideoDecoder); 562 HRESULT CreateVideoDecoderHeap(const D3D12_VIDEO_DECODER_HEAP_DESC *pVideoDecoderHeapDesc, REFIID riid, void **ppVideoDecoderHeap); 563 HRESULT CreateVideoProcessor(uint NodeMask, const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC *pOutputStreamDesc, uint NumInputStreamDescs, const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs, REFIID riid, void **ppVideoProcessor); 564 } 565 566 mixin(uuid!(ID3D12VideoDecoder, "C59B6BDC-7720-4074-A136-17A156037470")); 567 public interface ID3D12VideoDecoder : ID3D12Pageable 568 { 569 extern(Windows): 570 D3D12_VIDEO_DECODER_DESC GetDesc(); 571 } 572 573 mixin(uuid!(ID3D12VideoProcessor, "304FDB32-BEDE-410A-8545-943AC6A46138")); 574 public interface ID3D12VideoProcessor : ID3D12Pageable 575 { 576 extern(Windows): 577 uint GetNodeMask(); 578 uint GetNumInputStreamDescs(); 579 HRESULT GetInputStreamDescs(uint NumInputStreamDescs, D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs); 580 D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC GetOutputStreamDesc(); 581 } 582 583 mixin(uuid!(ID3D12VideoDecodeCommandList, "3B60536E-AD29-4E64-A269-F853837E5E53")); 584 public interface ID3D12VideoDecodeCommandList : ID3D12CommandList 585 { 586 extern(Windows): 587 HRESULT Close(); 588 HRESULT Reset(ID3D12CommandAllocator pAllocator); 589 void ClearState(); 590 void ResourceBarrier( uint NumBarriers, const D3D12_RESOURCE_BARRIER *pBarriers); 591 void DiscardResource(ID3D12Resource pResource, const D3D12_DISCARD_REGION *pRegion); 592 void BeginQuery(ID3D12QueryHeap pQueryHeap, D3D12_QUERY_TYPE Type, uint Index); 593 void EndQuery(ID3D12QueryHeap pQueryHeap, D3D12_QUERY_TYPE Type, uint Index); 594 void ResolveQueryData(ID3D12QueryHeap pQueryHeap, D3D12_QUERY_TYPE Type, uint StartIndex, uint NumQueries, ID3D12Resource pDestinationBuffer, ulong AlignedDestinationBufferOffset); 595 void SetPredication(ID3D12Resource pBuffer, ulong AlignedBufferOffset, D3D12_PREDICATION_OP Operation); 596 void SetMarker(uint Metadata, const void *pData, uint Size); 597 void BeginEvent(uint Metadata, const void *pData, uint Size); 598 void EndEvent(); 599 void DecodeFrame(ID3D12VideoDecoder pDecoder, const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS *pOutputArguments, const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments); 600 void WriteBufferImmediate(uint Count, const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes); 601 } 602 603 mixin(uuid!(ID3D12VideoProcessCommandList, "AEB2543A-167F-4682-ACC8-D159ED4A6209")); 604 public interface ID3D12VideoProcessCommandList : ID3D12CommandList 605 { 606 extern(Windows): 607 HRESULT Close(); 608 HRESULT Reset(ID3D12CommandAllocator pAllocator); 609 void ClearState(); 610 void ResourceBarrier(uint NumBarriers, const D3D12_RESOURCE_BARRIER *pBarriers); 611 void DiscardResource(ID3D12Resource pResource, const D3D12_DISCARD_REGION *pRegion); 612 void BeginQuery(ID3D12QueryHeap pQueryHeap, D3D12_QUERY_TYPE Type, uint Index); 613 void EndQuery(ID3D12QueryHeap pQueryHeap, D3D12_QUERY_TYPE Type, uint Index); 614 void ResolveQueryData(ID3D12QueryHeap pQueryHeap, D3D12_QUERY_TYPE Type, uint StartIndex, uint NumQueries, ID3D12Resource pDestinationBuffer, ulong AlignedDestinationBufferOffset); 615 void SetPredication(ID3D12Resource pBuffer, ulong AlignedBufferOffset, D3D12_PREDICATION_OP Operation); 616 void SetMarker(uint Metadata, const void *pData, uint Size); 617 void BeginEvent(uint Metadata, const void *pData, uint Size); 618 void EndEvent(); 619 void ProcessFrames(ID3D12VideoProcessor pVideoProcessor, const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments, uint NumInputStreams, const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS *pInputArguments); 620 void WriteBufferImmediate(uint Count, const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes); 621 } 622 623 struct D3D12_VIDEO_DECODE_OUTPUT_HISTOGRAM 624 { 625 ulong Offset; 626 ID3D12Resource pBuffer; 627 } 628 629 struct D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS1 630 { 631 bool Enable; 632 ID3D12Resource pReferenceTexture2D; 633 uint ReferenceSubresource; 634 DXGI_COLOR_SPACE_TYPE OutputColorSpace; 635 DXGI_COLOR_SPACE_TYPE DecodeColorSpace; 636 uint OutputWidth; 637 uint OutputHeight; 638 } 639 640 struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1 641 { 642 ID3D12Resource pOutputTexture2D; 643 uint OutputSubresource; 644 D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS1 ConversionArguments; 645 D3D12_VIDEO_DECODE_OUTPUT_HISTOGRAM[4] Histograms; 646 } 647 648 mixin(uuid!(ID3D12VideoDecodeCommandList1, "D52F011B-B56E-453C-A05A-A7F311C8F472")); 649 public interface ID3D12VideoDecodeCommandList1 : ID3D12VideoDecodeCommandList 650 { 651 extern(Windows): 652 void DecodeFrame1(ID3D12VideoDecoder pDecoder, const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1 *pOutputArguments, const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments); 653 } 654 655 struct D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1 656 { 657 D3D12_VIDEO_PROCESS_INPUT_STREAM[2] InputStream; 658 D3D12_VIDEO_PROCESS_TRANSFORM Transform; 659 D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS Flags; 660 D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE RateInfo; 661 int[32] FilterLevels; 662 D3D12_VIDEO_PROCESS_ALPHA_BLENDING AlphaBlending; 663 D3D12_VIDEO_FIELD_TYPE FieldType; 664 } 665 666 mixin(uuid!(ID3D12VideoProcessCommandList1, "542C5C4D-7596-434F-8C93-4EFA6766F267")); 667 public interface ID3D12VideoProcessCommandList1 : ID3D12VideoProcessCommandList 668 { 669 extern(Windows): 670 void ProcessFrames1(ID3D12VideoProcessor pVideoProcessor, const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments, uint NumInputStreams, const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1 *pInputArguments); 671 }