Debian Codegraph @

media_driver/agnostic/gen12/hw/vdbox/mhw_vdbox_hcp_hwcmd_g12_X.h

raw
1 /*===================== begin_copyright_notice ==================================
2
3 Copyright (c) 2018-2019, Intel Corporation
4
5 Permission is hereby granted, free of charge, to any person obtaining a
6 copy of this software and associated documentation files (the "Software"),
7 to deal in the Software without restriction, including without limitation
8 the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 and/or sell copies of the Software, and to permit persons to whom the
10 Software is furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included
13 in all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 OTHER DEALINGS IN THE SOFTWARE.
22
23 ======================= end_copyright_notice ==================================*/
24 //!
25 //! \file mhw_vdbox_hcp_hwcmd_g12_X.h
26 //! \brief Auto-generated constructors for MHW and states.
27 //! \details This file may not be included outside of g12_X as other components
28 //! should use MHW interface to interact with MHW commands and states.
29 //!
30
31 // DO NOT EDIT
32
33 #ifndef __MHW_VDBOX_HCP_HWCMD_G12_X_H__
34 #define __MHW_VDBOX_HCP_HWCMD_G12_X_H__
35
36 #pragma once
37 #include <cstdint>
38 #include <cstddef>
39
40
41 #pragma pack(1)
42
43 class mhw_vdbox_hcp_g12_X
44 {
45 public:
46 // Internal Macros
47 #define __CODEGEN_MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b))
48 #define __CODEGEN_BITFIELD(l, h) (h) - (l) + 1
49 #define __CODEGEN_OP_LENGTH_BIAS 2
50 #define __CODEGEN_OP_LENGTH(x) (uint32_t)((__CODEGEN_MAX(x, __CODEGEN_OP_LENGTH_BIAS)) - __CODEGEN_OP_LENGTH_BIAS)
51
52 static uint32_t GetOpLength(uint32_t uiLength) { return __CODEGEN_OP_LENGTH(uiLength); }
53
54 //!
55 //! \brief MEMORYADDRESSATTRIBUTES
56 //! \details
57 //! This field controls the priority of arbitration used in the GAC/GAM
58 //! pipeline for this surface. It defines the attributes for VDBOX addresses
59 //! on BDW+.
60 //!
61 struct MEMORYADDRESSATTRIBUTES_CMD
62 {
63 union
64 {
65 struct
66 {
67 uint32_t Reserved0 : __CODEGEN_BITFIELD( 0, 0) ; //!< Reserved
68 uint32_t BaseAddressIndexToMemoryObjectControlStateMocsTables : __CODEGEN_BITFIELD( 1, 6) ; //!< Base Address - Index to Memory Object Control State (MOCS) Tables
69 uint32_t BaseAddressArbitrationPriorityControl : __CODEGEN_BITFIELD( 7, 8) ; //!< Base Address - Arbitration Priority Control
70 uint32_t BaseAddressMemoryCompressionEnable : __CODEGEN_BITFIELD( 9, 9) ; //!< Base Address - Memory Compression Enable
71 uint32_t CompressionType : __CODEGEN_BITFIELD(10, 10) ; //!< COMPRESSION_TYPE
72 uint32_t Reserved11 : __CODEGEN_BITFIELD(11, 11) ; //!< Reserved
73 uint32_t BaseAddressRowStoreScratchBufferCacheSelect : __CODEGEN_BITFIELD(12, 12) ; //!< BASE_ADDRESS_ROW_STORE_SCRATCH_BUFFER_CACHE_SELECT
74 uint32_t BaseAddressTiledResourceMode : __CODEGEN_BITFIELD(13, 14) ; //!< BASE_ADDRESS_TILED_RESOURCE_MODE
75 uint32_t Reserved15 : __CODEGEN_BITFIELD(15, 31) ; //!< Reserved
76 };
77 uint32_t Value;
78 } DW0;
79
80 //! \name Local enumerations
81
82 //! \brief COMPRESSION_TYPE
83 //! \details
84 //! Indicates if buffer is render/media compressed.
85 enum COMPRESSION_TYPE
86 {
87 COMPRESSION_TYPE_MEDIACOMPRESSIONENABLE = 0, //!< No additional details
88 COMPRESSION_TYPE_RENDERCOMPRESSIONENABLE = 1, //!< No additional details
89 };
90
91 //! \brief BASE_ADDRESS_ROW_STORE_SCRATCH_BUFFER_CACHE_SELECT
92 //! \details
93 //! This field controls if the Row Store is going to store inside Media
94 //! Cache (rowstore cache) or to LLC.
95 enum BASE_ADDRESS_ROW_STORE_SCRATCH_BUFFER_CACHE_SELECT
96 {
97 BASE_ADDRESS_ROW_STORE_SCRATCH_BUFFER_CACHE_SELECT_UNNAMED0 = 0, //!< Buffer going to LLC.
98 BASE_ADDRESS_ROW_STORE_SCRATCH_BUFFER_CACHE_SELECT_UNNAMED1 = 1, //!< Buffer going to Internal Media Storage.
99 };
100
101 //! \brief BASE_ADDRESS_TILED_RESOURCE_MODE
102 //! \details
103 //! <b>For Media Surfaces:</b> This field specifies the tiled resource mode.
104 enum BASE_ADDRESS_TILED_RESOURCE_MODE
105 {
106 BASE_ADDRESS_TILED_RESOURCE_MODE_TRMODENONE = 0, //!< TileY resources
107 BASE_ADDRESS_TILED_RESOURCE_MODE_TRMODETILEYF = 1, //!< 4KB tiled resources
108 BASE_ADDRESS_TILED_RESOURCE_MODE_TRMODETILEYS = 2, //!< 64KB tiled resources
109 };
110
111 //! \name Initializations
112
113 //! \brief Explicit member initialization function
114 MEMORYADDRESSATTRIBUTES_CMD();
115
116 static const size_t dwSize = 1;
117 static const size_t byteSize = 4;
118 };
119
120 //!
121 //! \brief SPLITBASEADDRESS64BYTEALIGNED
122 //! \details
123 //! Specifies a 64-bit (48-bit canonical) 64-byte aligned memory base
124 //! address.
125 //!
126 struct SPLITBASEADDRESS64BYTEALIGNED_CMD
127 {
128 union
129 {
130 struct
131 {
132 uint64_t Reserved0 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
133 uint64_t Graphicsaddress476 : __CODEGEN_BITFIELD( 6, 47) ; //!< GraphicsAddress47-6
134 uint64_t Reserved48 : __CODEGEN_BITFIELD(48, 63) ; //!< Reserved
135 };
136 uint32_t Value[2];
137 } DW0_1;
138
139 //! \name Local enumerations
140
141 //! \name Initializations
142
143 //! \brief Explicit member initialization function
144 SPLITBASEADDRESS64BYTEALIGNED_CMD();
145
146 static const size_t dwSize = 2;
147 static const size_t byteSize = 8;
148 };
149
150 //!
151 //! \brief SPLITBASEADDRESS4KBYTEALIGNED
152 //! \details
153 //! Specifies a 64-bit (48-bit canonical) 4K-byte aligned memory base
154 //! address. GraphicsAddress is a 64-bit value [63:0], but only a portion of
155 //! it is used by hardware. The upper reserved bits are ignored and MBZ.
156 //!
157 struct SPLITBASEADDRESS4KBYTEALIGNED_CMD
158 {
159 union
160 {
161 struct
162 {
163 uint64_t Reserved0 : __CODEGEN_BITFIELD( 0, 11) ; //!< Reserved
164 uint64_t Graphicsaddress4712 : __CODEGEN_BITFIELD(12, 47) ; //!< GraphicsAddress47-12
165 uint64_t Reserved48 : __CODEGEN_BITFIELD(48, 63) ; //!< Reserved
166 };
167 uint32_t Value[2];
168 } DW0_1;
169
170 //! \name Local enumerations
171
172 //! \name Initializations
173
174 //! \brief Explicit member initialization function
175 SPLITBASEADDRESS4KBYTEALIGNED_CMD();
176
177 static const size_t dwSize = 2;
178 static const size_t byteSize = 8;
179 };
180
181 //!
182 //! \brief HCP_PIPE_MODE_SELECT
183 //! \details
184 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
185 //! Commands. Each HCP command has assigned a media instruction command as
186 //! defined in DWord 0, BitField 22:16.
187 //!
188 //! The workload for the HCP is based upon a single frame decode. There are
189 //! no states saved between frame decodes in the HCP. Once the bit stream
190 //! DMA is configured with the HCP_BSD_OBJECT command, and the bit stream is
191 //! presented to the HCP, the frame decode will begin. The
192 //! HCP_PIPE_MODE_SELECT command is responsible for general pipeline level
193 //! configuration that would normally be set once for a single stream encode
194 //! or decode and would not be modified on a frame workload basis. This is a
195 //! picture level state command and is shared by both encoding and decoding
196 //! processes.
197 //!
198 struct HCP_PIPE_MODE_SELECT_CMD
199 {
200 union
201 {
202 struct
203 {
204 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
205 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
206 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
207 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
208 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
209 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
210 };
211 uint32_t Value;
212 } DW0;
213 union
214 {
215 struct
216 {
217 uint32_t CodecSelect : __CODEGEN_BITFIELD( 0, 0) ; //!< CODEC_SELECT
218 uint32_t DeblockerStreamoutEnable : __CODEGEN_BITFIELD( 1, 1) ; //!< DEBLOCKER_STREAMOUT_ENABLE
219 uint32_t PakPipelineStreamoutEnable : __CODEGEN_BITFIELD( 2, 2) ; //!< PAK_PIPELINE_STREAMOUT_ENABLE
220 uint32_t PicStatusErrorReportEnable : __CODEGEN_BITFIELD( 3, 3) ; //!< PIC_STATUSERROR_REPORT_ENABLE
221 uint32_t Reserved36 : __CODEGEN_BITFIELD( 4, 4) ; //!< Reserved
222 uint32_t CodecStandardSelect : __CODEGEN_BITFIELD( 5, 7) ; //!< CODEC_STANDARD_SELECT
223 uint32_t Reserved40 : __CODEGEN_BITFIELD( 8, 8) ; //!< Reserved
224 uint32_t AdvancedRateControlEnable : __CODEGEN_BITFIELD( 9, 9) ; //!< Advanced Rate Control Enable
225 uint32_t VdencMode : __CODEGEN_BITFIELD(10, 10) ; //!< VDEnc_Mode
226 uint32_t RdoqEnabledFlag : __CODEGEN_BITFIELD(11, 11) ; //!< RDOQ_ENABLED_FLAG
227 uint32_t PakFrameLevelStreamoutEnable : __CODEGEN_BITFIELD(12, 12) ; //!< PAK Frame Level StreamOut enable
228 uint32_t MultiEngineMode : __CODEGEN_BITFIELD(13, 14) ; //!< MULTI_ENGINE_MODE
229 uint32_t PipeWorkingMode : __CODEGEN_BITFIELD(15, 16) ; //!< PIPE_WORKING_MODE
230 uint32_t TileBasedEngine : __CODEGEN_BITFIELD(17, 17) ; //!< Tile Based Engine
231 uint32_t PrefetchDisable : __CODEGEN_BITFIELD(18, 18) ; //!< Prefetch Disable
232 uint32_t Vp9DynamicScalingEnable : __CODEGEN_BITFIELD(19, 19) ; //!< VP9 Dynamic scaling enable
233 uint32_t Reserved52 : __CODEGEN_BITFIELD(20, 22) ; //!< Reserved
234 uint32_t MotionCompMemoryTrackerCounterEnable : __CODEGEN_BITFIELD(23, 23) ; //!< Motion Comp Memory Tracker Counter Enable
235 uint32_t Reserved56 : __CODEGEN_BITFIELD(24, 31) ; //!< Reserved
236 };
237 uint32_t Value;
238 } DW1;
239 union
240 {
241 struct
242 {
243 uint32_t MediaSoftResetCounterPer1000Clocks ; //!< MEDIA_SOFT_RESET_COUNTER_PER_1000_CLOCKS
244 };
245 uint32_t Value;
246 } DW2;
247 union
248 {
249 struct
250 {
251 uint32_t PicStatusErrorReportId ; //!< PIC_STATUSERROR_REPORT_ID
252 };
253 uint32_t Value;
254 } DW3;
255 union
256 {
257 struct
258 {
259 uint32_t Reserved128 ; //!< Reserved
260 };
261 uint32_t Value;
262 } DW4;
263 union
264 {
265 struct
266 {
267 uint32_t Reserved160 ; //!< Reserved
268 };
269 uint32_t Value;
270 } DW5;
271 union
272 {
273 struct
274 {
275 uint32_t PhaseIndicator : __CODEGEN_BITFIELD( 0, 1) ; //!< PHASE_INDICATOR
276 uint32_t HevcSeparateTileProgramming : __CODEGEN_BITFIELD( 2, 2) ; //!< HEVC Separate Tile Programming
277 uint32_t FrameReconstructionDisable : __CODEGEN_BITFIELD( 3, 3) ; //!< Frame reconstruction disable
278 uint32_t Reserved196 : __CODEGEN_BITFIELD( 4, 31) ; //!< Reserved
279 };
280 uint32_t Value;
281 } DW6;
282
283 //! \name Local enumerations
284
285 enum MEDIA_INSTRUCTION_COMMAND
286 {
287 MEDIA_INSTRUCTION_COMMAND_HCPPIPEMODESELECT = 0, //!< No additional details
288 };
289
290 //! \brief MEDIA_INSTRUCTION_OPCODE
291 //! \details
292 //! Codec/Engine Name = HCP = 7h
293 enum MEDIA_INSTRUCTION_OPCODE
294 {
295 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
296 };
297
298 enum PIPELINE_TYPE
299 {
300 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
301 };
302
303 enum COMMAND_TYPE
304 {
305 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
306 };
307
308 enum CODEC_SELECT
309 {
310 CODEC_SELECT_DECODE = 0, //!< No additional details
311 CODEC_SELECT_ENCODE = 1, //!< No additional details
312 };
313
314 //! \brief DEBLOCKER_STREAMOUT_ENABLE
315 //! \details
316 //! Deblocker Streamout Enable not currently supported for Encode or Decode
317 enum DEBLOCKER_STREAMOUT_ENABLE
318 {
319 DEBLOCKER_STREAMOUT_ENABLE_DISABLE = 0, //!< Disable deblocker-only parameter streamout
320 DEBLOCKER_STREAMOUT_ENABLE_ENABLE = 1, //!< Enable deblocker-only parameter streamout
321 };
322
323 //! \brief PAK_PIPELINE_STREAMOUT_ENABLE
324 //! \details
325 //! Pipeline Streamout Enable is only defined for encode. It is ignored for
326 //! decode.
327 enum PAK_PIPELINE_STREAMOUT_ENABLE
328 {
329 PAK_PIPELINE_STREAMOUT_ENABLE_DISABLEPIPELINESTATESANDPARAMETERSSTREAMOUT = 0, //!< No additional details
330 PAK_PIPELINE_STREAMOUT_ENABLE_ENABLEPIPELINESTATESANDPARAMETERSSTREAMOUT = 1, //!< No additional details
331 };
332
333 enum PIC_STATUSERROR_REPORT_ENABLE
334 {
335 PIC_STATUSERROR_REPORT_ENABLE_DISABLE = 0, //!< Disable status/error reporting
336 PIC_STATUSERROR_REPORT_ENABLE_ENABLE = 1, //!< Status/Error reporting is written out once per picture. The Pic Status/Error Report ID in DWord3along with the status/error status bits are packed into one cache line and written to theStatus/Error Buffer address in the HCP_PIPE_BUF_ADDR_STATE command. Must be zero for encoder mode.
337 };
338
339 enum CODEC_STANDARD_SELECT
340 {
341 CODEC_STANDARD_SELECT_HEVC = 0, //!< No additional details
342 CODEC_STANDARD_SELECT_VP9 = 1, //!< No additional details
343 };
344
345 enum RDOQ_ENABLED_FLAG
346 {
347 RDOQ_ENABLED_FLAG_DISABLED = 0, //!< No additional details
348 RDOQ_ENABLED_FLAG_ENABLED = 1, //!< No additional details
349 };
350
351 //! \brief MULTI_ENGINE_MODE
352 //! \details
353 //! <p>This indicates the current pipe is in single pipe mode or if in
354 //! scalable mode is in left/right/middle pipe in multi-engine mode.</p>
355 enum MULTI_ENGINE_MODE
356 {
357 MULTI_ENGINE_MODE_SINGLEENGINEMODEORCABACFEONLYDECODEMODE = 0, //!< This is for single engine mode (legacy) OR CABAC FE only decode mode During HEVC Decoder Scalability Real Tile Mode, for the last phase, it is possible to have single tile column left. In this case, it should be programmed with pipe as a single engine mode (using this value).For example, for 9 tile column running on 4 pipes. The first two phases will use all 4 pipes and finish 8 tile column. The remaining one column will be processed as last third phase as single tile column.
358 MULTI_ENGINE_MODE_PIPEISTHELEFTENGINEINAMULTI_ENGINEMODE = 1, //!< Current pipe is the most left engine while running in scalable multi-engine mode
359 MULTI_ENGINE_MODE_PIPEISTHERIGHTENGINEINAMULTI_ENGINEMODE = 2, //!< Current pipe is the most right engine while running in scalable multi-engine mode
360 MULTI_ENGINE_MODE_PIPEISONEOFTHEMIDDLEENGINEINAMULTI_ENGINEMODE = 3, //!< Current pipe is in one of the middle engine while running in scalable multi-engine mode
361 };
362
363 //! \brief PIPE_WORKING_MODE
364 //! \details
365 //! <p>This programs the working mode for HCP pipe.</p>
366 enum PIPE_WORKING_MODE
367 {
368 PIPE_WORKING_MODE_LEGACYDECODERENCODERMODE_SINGLEPIPE = 0, //!< This is for single pipe mode non-scalable mode. It is used by both decoder and encoder.
369 PIPE_WORKING_MODE_CABACFEONLYDECODEMODE_SINGLECABACPIPE = 1, //!< This is for the single CABAC FE only in decoder mode. This will be only run CABAC and streamout syntax element.
370 PIPE_WORKING_MODE_DECODERBEONLYORENCODERMODE_SCALABLEMULTI_PIPE = 2, //!< This is for multiple-pipe scalable mode. In decoder, it is only on BE reconstruction. In ecoder, it is for PAK.
371 PIPE_WORKING_MODE_DECODERSCALABLEMODEWITHCABACINREALTILES_SCALABLEMULTI_PIPE = 3, //!< This is for multiple-pipe scalable mode decoder mode in real tiles. CABAC and reconstruction will run together. Each pipes will run in real tiles vertically.
372 };
373
374 //! \brief MEDIA_SOFT_RESET_COUNTER_PER_1000_CLOCKS
375 //! \details
376 //! In decoder modes, this counter value specifies the number of clocks (per
377 //! 1000) of GAC inactivity
378 //! before a media soft-reset is applied to the HCP and HuC. If counter
379 //! value is set to 0, the media
380 //! soft-reset feature is disabled and no reset will occur.
381 //! <p>In encoder modes, this counter must be set to 0 to disable media
382 //! soft reset. This feature is not
383 //! supported for the encoder.</p>
384 enum MEDIA_SOFT_RESET_COUNTER_PER_1000_CLOCKS
385 {
386 MEDIA_SOFT_RESET_COUNTER_PER_1000_CLOCKS_DISABLE = 0, //!< No additional details
387 };
388
389 //! \brief PIC_STATUSERROR_REPORT_ID
390 //! \details
391 //! The Pic Status/Error Report ID is a unique 32-bit unsigned integer
392 //! assigned to each picture
393 //! status/error output. Must be zero for encoder mode.
394 enum PIC_STATUSERROR_REPORT_ID
395 {
396 PIC_STATUSERROR_REPORT_ID_32_BITUNSIGNED = 0, //!< Unique ID Number
397 };
398
399 //! \brief PHASE_INDICATOR
400 //! \details
401 //! <p>This is used to indicate whether this is first, middle or last phase
402 //! of programming during Real-Tile Decoder Mode. Since HEVC can have upto
403 //! 20 tile columns, maximum 10 phases are possible during 2 VDbox scalable
404 //! mode. This is used by hardware to know if the current programming is
405 //! first or last phases.</p>
406 //! <p>This field is ignored (programmed to 0) for other modes other than
407 //! HEVC Real-Tile Decoder Mode.</p>
408 enum PHASE_INDICATOR
409 {
410 PHASE_INDICATOR_FIRSTPHASE = 0, //!< No additional details
411 PHASE_INDICATOR_MIDDLEPHASE = 1, //!< No additional details
412 PHASE_INDICATOR_LASTPHASE = 2, //!< No additional details
413 };
414
415 //! \name Initializations
416
417 //! \brief Explicit member initialization function
418 HCP_PIPE_MODE_SELECT_CMD();
419
420 static const size_t dwSize = 7;
421 static const size_t byteSize = 28;
422 };
423
424 //!
425 //! \brief HCP_SURFACE_STATE
426 //! \details
427 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
428 //! Commands. Each HCP command has assigned a media instruction command as
429 //! defined in DWord 0, BitField 22:16.
430 //!
431 //! The HCP_SURFACE_STATE command is responsible for defining the frame
432 //! buffer pitch and the offset of the chroma component. This is a picture
433 //! level state command and is shared by both encoding and decoding
434 //! processes. Note : Only NV12 and Tile Y are being supported for HEVC.
435 //! Hence full pitch and interleaved UV is always in use. U and V Xoffset
436 //! must be set to 0; U and V Yoffset must be 16-pixel aligned. This Surface
437 //! State is not the same as that of the 3D engine and of the MFX pipeline.
438 //!
439 struct HCP_SURFACE_STATE_CMD
440 {
441 union
442 {
443 struct
444 {
445 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
446 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
447 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
448 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
449 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
450 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
451 };
452 uint32_t Value;
453 } DW0;
454 union
455 {
456 struct
457 {
458 uint32_t SurfacePitchMinus1 : __CODEGEN_BITFIELD( 0, 16) ; //!< Surface Pitch Minus1
459 uint32_t Reserved49 : __CODEGEN_BITFIELD(17, 27) ; //!< Reserved
460 uint32_t SurfaceId : __CODEGEN_BITFIELD(28, 31) ; //!< SURFACE_ID
461 };
462 uint32_t Value;
463 } DW1;
464 union
465 {
466 struct
467 {
468 uint32_t YOffsetForUCbInPixel : __CODEGEN_BITFIELD( 0, 14) ; //!< Y Offset for U(Cb) in pixel
469 uint32_t Reserved79 : __CODEGEN_BITFIELD(15, 26) ; //!< Reserved
470 uint32_t SurfaceFormat : __CODEGEN_BITFIELD(27, 31) ; //!< SURFACE_FORMAT
471 };
472 uint32_t Value;
473 } DW2;
474 union
475 {
476 struct
477 {
478 uint32_t DefaultAlphaValue : __CODEGEN_BITFIELD( 0, 15) ; //!< Default Alpha Value
479 uint32_t YOffsetForVCr : __CODEGEN_BITFIELD(16, 31) ; //!< Y Offset for V(Cr)
480 };
481 uint32_t Value;
482 } DW3;
483 union
484 {
485 struct
486 {
487 uint32_t MemoryCompressionEnable : __CODEGEN_BITFIELD( 0, 7) ; //!< MEMORY_COMPRESSION_ENABLE
488 uint32_t CompressionType : __CODEGEN_BITFIELD( 8, 15) ; //!< COMPRESSION_TYPE
489 uint32_t CompressionFormat : __CODEGEN_BITFIELD(16, 20) ; //!< COMPRESSION_FORMAT
490 uint32_t Reserved144 : __CODEGEN_BITFIELD(21, 31) ; //!< Reserved
491 };
492 uint32_t Value;
493 } DW4;
494
495 //! \name Local enumerations
496
497 enum MEDIA_INSTRUCTION_COMMAND
498 {
499 MEDIA_INSTRUCTION_COMMAND_HCPSURFACESTATE = 1, //!< No additional details
500 };
501
502 //! \brief MEDIA_INSTRUCTION_OPCODE
503 //! \details
504 //! Codec/Engine Name = HCP = 7h
505 enum MEDIA_INSTRUCTION_OPCODE
506 {
507 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
508 };
509
510 enum PIPELINE_TYPE
511 {
512 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
513 };
514
515 enum COMMAND_TYPE
516 {
517 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
518 };
519
520 enum SURFACE_ID
521 {
522 SURFACE_ID_HEVCFORCURRENTDECODEDPICTURE = 0, //!< 8-bit uncompressed data
523 SURFACE_ID_SOURCEINPUTPICTURE_ENCODER = 1, //!< 8-bit uncompressed data
524 SURFACE_ID_PREVREFERENCEPICTURE = 2, //!< (VP9 only) Previous Reference
525 SURFACE_ID_GOLDENREFERENCEPICTURE = 3, //!< (VP9 only) Golden Reference
526 SURFACE_ID_ALTREFREFERENCEPICTURE = 4, //!< (VP9 only) AltRef Reference
527 SURFACE_ID_HEVCREFERENCEPICTURES = 5, //!< (HEVC only) Reference. Also, this will have separate compressible bits per reference surfaces for HEVC
528 };
529
530 //! \brief SURFACE_FORMAT
531 //! \details
532 //! <p>Specifies the format of the surface.</p>
533 enum SURFACE_FORMAT
534 {
535 SURFACE_FORMAT_YUY2FORMAT = 0, //!< No additional details
536 SURFACE_FORMAT_RGB8FORMAT = 1, //!< No additional details
537 SURFACE_FORMAT_AYUV4444FORMAT = 2, //!< No additional details
538 SURFACE_FORMAT_P010VARIANT = 3, //!< No additional details
539 SURFACE_FORMAT_PLANAR4208 = 4, //!< No additional details
540 SURFACE_FORMAT_YCRCBSWAPYFORMAT = 5, //!< No additional details
541 SURFACE_FORMAT_YCRCBSWAPUVFORMAT = 6, //!< No additional details
542 SURFACE_FORMAT_YCRCBSWAPUVYFORMAT = 7, //!< No additional details
543 SURFACE_FORMAT_Y216Y210FORMAT = 8, //!< Same value is used to represent Y216 and Y210
544 SURFACE_FORMAT_RGB10FORMAT = 9, //!< No additional details
545 SURFACE_FORMAT_Y410FORMAT = 10, //!< No additional details
546 SURFACE_FORMAT_NV21PLANAR4208FORMAT = 11, //!< No additional details
547 SURFACE_FORMAT_Y416FORMAT = 12, //!< No additional details
548 SURFACE_FORMAT_P010 = 13, //!< No additional details
549 SURFACE_FORMAT_P016 = 14, //!< No additional details
550 SURFACE_FORMAT_Y8FORMAT = 15, //!< No additional details
551 SURFACE_FORMAT_Y16FORMAT = 16, //!< No additional details
552 SURFACE_FORMAT_Y216VARIANT = 17, //!< Y216Variant is the modifed Y210/Y216 format, 8 bit planar 422 with MSB bytes packed together and LSB bytes at an offset in the X-direction where the x-offset is 32-bit aligned. The chroma is UV interleaved with identical MSB and LSB split as luma and is at an offset in the Y-direction (similar to NV12) but is the same height as the luma.
553 SURFACE_FORMAT_Y416VARIANT = 18, //!< Y416Variant is the modifed Y410/Y412/Y416 format,8 bit planar 444 with MSB bytes packed together and LSB bytes at an offset in the X-direction where the x-offset is 32-bit aligned. The U channel is below the luma, has identical MSB and LSB split as luma and is at an offset in the Y-direction (similar to NV12) but is the same height as the luma The V channel is below the U, has identical MSB and LSB split as luma and is at an offset in the Y-direction (similar to NV12) but is the same height as the luma.
554 SURFACE_FORMAT_YUY2VARIANT = 19, //!< YUY2Variant is the modifed YUY2 format, 8 bit planar 422. The chroma is UV interleaved and is at an offset in the Y-direction (similar to NV12) but is the same height as the luma.
555 SURFACE_FORMAT_AYUV4444VARIANT = 20, //!< AYUV4444Variant is the modifed AYUV4444 format, 8 bit planar 444 format. The U channel is below the luma and is at an offset in the Y-direction (similar to NV12) but is the same height as the luma. The V channel is below the and is at an offset in the Y-direction (similar to NV12) but is the same height as the luma.
556 };
557
558 //! \brief MEMORY_COMPRESSION_ENABLE
559 //! \details
560 //! <p>In HEVC mode, each bit is used for 1 reference starting with Bit 0
561 //! for Ref 0 in the ref list and Bit 1 for Ref 1 and so on.</p>
562 //! <p>In VP9 mode, Bit 0 is for Previous Reference; Bit 1 is for Golden
563 //! Reference and Bit 2 is for Alterante Reference; Bits 3-7 are unused and
564 //! should be programmed to 0.</p>
565 enum MEMORY_COMPRESSION_ENABLE
566 {
567 MEMORY_COMPRESSION_ENABLE_MEMORYCOMPRESSIONDISABLE = 0, //!< No additional details
568 MEMORY_COMPRESSION_ENABLE_MEMORYCOMPRESSIONENABLE = 1, //!< No additional details
569 };
570
571 //! \brief COMPRESSION_TYPE
572 //! \details
573 //! <p>This field indicates if the compression type for the reference
574 //! surface is media or render compressed.</p>
575 //! <p>In HEVC mode, each bit is used for 1 reference starting with Bit 8for
576 //! Ref 0 in the ref list and Bit 9for Ref 1 and so on.</p>
577 //! <p>In VP9 mode, Bit 8is for Previous Reference; Bit 9is for Golden
578 //! Reference and Bit 10is for Alterante Reference; Bits11-15are unused and
579 //! should be programmed to 0</p>
580 enum COMPRESSION_TYPE
581 {
582 COMPRESSION_TYPE_MEDIACOMPRESSIONENABLED = 0, //!< No additional details
583 COMPRESSION_TYPE_RENDERCOMPRESSIONENABLED = 1, //!< No additional details
584 };
585
586 //! \name Initializations
587
588 //! \brief Explicit member initialization function
589 HCP_SURFACE_STATE_CMD();
590
591 static const size_t dwSize = 5;
592 static const size_t byteSize = 20;
593 };
594
595 //!
596 //! \brief HCP_PIPE_BUF_ADDR_STATE
597 //! \details
598 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
599 //! Commands. Each HCP command has assigned a media instruction command as
600 //! defined in DWord 0, BitField 22:16.
601 //!
602 //! This state command provides the memory base addresses for the row store
603 //! buffer and reconstructed picture output buffers required by the HCP.
604 //! This is a picture level state command and is shared by both encoding and
605 //! decoding processes.
606 //!
607 //! All pixel surface addresses must be 4K byte aligned. There is a max of 8
608 //! Reference Picture Buffer Addresses, and all share the same third address
609 //! DW in specifying 48-bit address.
610 //!
611 struct HCP_PIPE_BUF_ADDR_STATE_CMD
612 {
613 union
614 {
615 struct
616 {
617 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
618 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
619 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
620 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
621 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
622 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
623 };
624 uint32_t Value;
625 } DW0;
626 SPLITBASEADDRESS4KBYTEALIGNED_CMD DecodedPicture; //!< DW1..2, Decoded Picture
627 MEMORYADDRESSATTRIBUTES_CMD DecodedPictureMemoryAddressAttributes; //!< DW3, Decoded Picture Memory Address Attributes
628 SPLITBASEADDRESS64BYTEALIGNED_CMD DeblockingFilterLineBuffer; //!< DW4..5, Deblocking Filter Line Buffer
629 MEMORYADDRESSATTRIBUTES_CMD DeblockingFilterLineBufferMemoryAddressAttributes; //!< DW6, Deblocking Filter Line Buffer Memory Address Attributes
630 SPLITBASEADDRESS64BYTEALIGNED_CMD DeblockingFilterTileLineBuffer; //!< DW7..8, Deblocking Filter Tile Line Buffer
631 MEMORYADDRESSATTRIBUTES_CMD DeblockingFilterTileLineBufferMemoryAddressAttributes; //!< DW9, Deblocking Filter Tile Line Buffer Memory Address Attributes
632 SPLITBASEADDRESS64BYTEALIGNED_CMD DeblockingFilterTileColumnBuffer; //!< DW10..11, Deblocking Filter Tile Column Buffer
633 MEMORYADDRESSATTRIBUTES_CMD DeblockingFilterTileColumnBufferMemoryAddressAttributes; //!< DW12, Deblocking Filter Tile Column Buffer Memory Address Attributes
634 SPLITBASEADDRESS64BYTEALIGNED_CMD MetadataLineBuffer; //!< DW13..14, Metadata Line Buffer
635 MEMORYADDRESSATTRIBUTES_CMD MetadataLineBufferMemoryAddressAttributes; //!< DW15, Metadata Line Buffer Memory Address Attributes
636 SPLITBASEADDRESS64BYTEALIGNED_CMD MetadataTileLineBuffer; //!< DW16..17, Metadata Tile Line Buffer
637 MEMORYADDRESSATTRIBUTES_CMD MetadataTileLineBufferMemoryAddressAttributes; //!< DW18, Metadata Tile Line Buffer Memory Address Attributes
638 SPLITBASEADDRESS64BYTEALIGNED_CMD MetadataTileColumnBuffer; //!< DW19..20, Metadata Tile Column Buffer
639 MEMORYADDRESSATTRIBUTES_CMD MetadataTileColumnBufferMemoryAddressAttributes; //!< DW21, Metadata Tile Column Buffer Memory Address Attributes
640 SPLITBASEADDRESS64BYTEALIGNED_CMD SaoLineBuffer; //!< DW22..23, SAO Line Buffer
641 MEMORYADDRESSATTRIBUTES_CMD SaoLineBufferMemoryAddressAttributes; //!< DW24, SAO Line Buffer Memory Address Attributes
642 SPLITBASEADDRESS64BYTEALIGNED_CMD SaoTileLineBuffer; //!< DW25..26, SAO Tile Line Buffer
643 MEMORYADDRESSATTRIBUTES_CMD SaoTileLineBufferMemoryAddressAttributes; //!< DW27, SAO Tile Line Buffer Memory Address Attributes
644 SPLITBASEADDRESS64BYTEALIGNED_CMD SaoTileColumnBuffer; //!< DW28..29, SAO Tile Column Buffer
645 MEMORYADDRESSATTRIBUTES_CMD SaoTileColumnBufferMemoryAddressAttributes; //!< DW30, SAO Tile Column Buffer Memory Address Attributes
646 SPLITBASEADDRESS64BYTEALIGNED_CMD CurrentMotionVectorTemporalBuffer; //!< DW31..32, Current Motion Vector Temporal Buffer
647 MEMORYADDRESSATTRIBUTES_CMD CurrentMotionVectorTemporalBufferMemoryAddressAttributes; //!< DW33, Current Motion Vector Temporal Buffer Memory Address Attributes
648 union
649 {
650 struct
651 {
652 uint64_t Reserved1088 ; //!< Reserved
653 };
654 uint32_t Value[2];
655 } DW34_35;
656 union
657 {
658 struct
659 {
660 uint32_t Reserved1152 ; //!< Reserved
661 };
662 uint32_t Value;
663 } DW36;
664 SPLITBASEADDRESS64BYTEALIGNED_CMD ReferencePictureBaseAddressRefaddr07[8]; //!< DW37..52, Reference Picture Base Address (RefAddr[0-7])
665 MEMORYADDRESSATTRIBUTES_CMD ReferencePictureBaseAddressMemoryAddressAttributes; //!< DW53, Reference Picture Base Address Memory Address Attributes
666 SPLITBASEADDRESS64BYTEALIGNED_CMD OriginalUncompressedPictureSource; //!< DW54..55, Original Uncompressed Picture Source
667 MEMORYADDRESSATTRIBUTES_CMD OriginalUncompressedPictureSourceMemoryAddressAttributes; //!< DW56, Original Uncompressed Picture Source Memory Address Attributes
668 SPLITBASEADDRESS64BYTEALIGNED_CMD StreamoutDataDestination; //!< DW57..58, Streamout Data Destination
669 MEMORYADDRESSATTRIBUTES_CMD StreamoutDataDestinationMemoryAddressAttributes; //!< DW59, Streamout Data Destination Memory Address Attributes, Decoder Only
670 SPLITBASEADDRESS64BYTEALIGNED_CMD DecodedPictureStatusErrorBufferBaseAddressOrEncodedSliceSizeStreamoutBaseAddress;//!< DW60..61, Decoded Picture Status/Error Buffer Base Address or Encoded slice size streamout Base Address
671 MEMORYADDRESSATTRIBUTES_CMD DecodedPictureStatusErrorBufferBaseAddressMemoryAddressAttributes; //!< DW62, Decoded Picture Status/Error Buffer Base Address Memory Address Attributes
672 SPLITBASEADDRESS64BYTEALIGNED_CMD LcuIldbStreamoutBuffer; //!< DW63..64, LCU ILDB Streamout Buffer
673 MEMORYADDRESSATTRIBUTES_CMD LcuIldbStreamoutBufferMemoryAddressAttributes; //!< DW65, LCU ILDB Streamout Buffer Memory Address Attributes
674 SPLITBASEADDRESS64BYTEALIGNED_CMD CollocatedMotionVectorTemporalBuffer07[8]; //!< DW66..81, Collocated Motion Vector Temporal Buffer[0-7]
675 MEMORYADDRESSATTRIBUTES_CMD CollocatedMotionVectorTemporalBuffer07MemoryAddressAttributes; //!< DW82, Collocated Motion Vector Temporal Buffer[0-7] Memory Address Attributes
676 SPLITBASEADDRESS64BYTEALIGNED_CMD Vp9ProbabilityBufferReadWrite; //!< DW83..84, VP9 Probability Buffer Read/Write
677 MEMORYADDRESSATTRIBUTES_CMD Vp9ProbabilityBufferReadWriteMemoryAddressAttributes; //!< DW85, VP9 Probability Buffer Read/Write Memory Address Attributes
678 union
679 {
680 struct
681 {
682 uint64_t Vp9SegmentIdBufferReadWrite ; //!< VP9 Segment ID Buffer Read/Write
683 };
684 uint32_t Value[2];
685 } DW86_87;
686 MEMORYADDRESSATTRIBUTES_CMD Vp9SegmentIdBufferReadWriteMemoryAddressAttributes; //!< DW88, VP9 Segment ID buffer Read/Write Memory Address Attributes
687 SPLITBASEADDRESS64BYTEALIGNED_CMD Vp9HvdLineRowstoreBufferReadWrite; //!< DW89..90, VP9 HVD Line Rowstore Buffer Read/Write
688 MEMORYADDRESSATTRIBUTES_CMD Vp9HvdLineRowstoreBufferReadWriteMemoryAddressAttributes; //!< DW91, VP9 HVD Line Rowstore buffer Read/Write Memory Address Attributes
689 SPLITBASEADDRESS64BYTEALIGNED_CMD Vp9HvdTileRowstoreBufferReadWrite; //!< DW92..93, VP9 HVD Tile Rowstore Buffer Read/Write
690 MEMORYADDRESSATTRIBUTES_CMD Vp9HvdTileRowstoreBufferReadWriteMemoryAddressAttributes; //!< DW94, VP9 HVD Tile Rowstore buffer Read/Write Memory Address Attributes
691 union
692 {
693 struct
694 {
695 uint64_t SaoRowstoreBufferBaseAddress ; //!< SAO Rowstore Buffer Base Address
696 };
697 uint32_t Value[2];
698 } DW95_96;
699 MEMORYADDRESSATTRIBUTES_CMD SaoRowstoreBufferReadWriteMemoryAddressAttributes; //!< DW97, SAO Rowstore Buffer Read/Write Memory Address Attributes
700 SPLITBASEADDRESS64BYTEALIGNED_CMD FrameStatisticsStreamoutDataDestinationBufferBaseAddress; //!< DW98..99, Frame Statistics Streamout Data Destination Buffer Base Address
701 MEMORYADDRESSATTRIBUTES_CMD FrameStatisticsStreamoutDataDestinationBufferAttributesReadWrite; //!< DW100, Frame Statistics Streamout Data Destination buffer (attributes) Read/Write
702 SPLITBASEADDRESS64BYTEALIGNED_CMD SseSourcePixelRowstoreBufferBaseAddress; //!< DW101..102, SSE Source Pixel RowStore Buffer Base Address
703 MEMORYADDRESSATTRIBUTES_CMD SseSourcePixelRowstoreBufferAttributesReadWrite; //!< DW103, SSE Source Pixel RowStore buffer (attributes) Read/Write
704 SPLITBASEADDRESS64BYTEALIGNED_CMD HcpScalabilitySliceStateBufferBaseAddress; //!< DW104..105, HCP Scalability Slice State Buffer Base Address
705 MEMORYADDRESSATTRIBUTES_CMD HcpScalabilitySliceStateBufferAttributesReadWrite; //!< DW106, HCP Scalability Slice State Buffer (attributes) Read/Write
706 SPLITBASEADDRESS64BYTEALIGNED_CMD HcpScalabilityCabacDecodedSyntaxElementsBufferBaseAddress; //!< DW107..108, HCP Scalability CABAC Decoded Syntax Elements Buffer Base Address
707 MEMORYADDRESSATTRIBUTES_CMD HcpScalabilityCabacDecodedSyntaxElementsBufferAttributesReadWrite; //!< DW109, HCP Scalability CABAC Decoded Syntax Elements Buffer (attributes) Read/Write
708 SPLITBASEADDRESS64BYTEALIGNED_CMD MotionVectorUpperRightColumnStoreBufferBaseAddress; //!< DW110..111, Motion Vector Upper Right Column Store Buffer Base Address
709 MEMORYADDRESSATTRIBUTES_CMD MotionVectorUpperRightColumnStoreBufferAttributesReadWrite; //!< DW112, Motion Vector Upper Right Column Store Buffer (attributes) Read/Write
710 SPLITBASEADDRESS64BYTEALIGNED_CMD IntraPredictionUpperRightColumnStoreBufferBaseAddress; //!< DW113..114, Intra Prediction Upper Right Column Store Buffer Base Address
711 MEMORYADDRESSATTRIBUTES_CMD IntraPredictionUpperRightColumnStoreBufferAttributesReadWrite; //!< DW115, Intra Prediction Upper Right Column Store Buffer (attributes) Read/Write
712 SPLITBASEADDRESS64BYTEALIGNED_CMD IntraPredictionLeftReconColumnStoreBufferBaseAddress; //!< DW116..117, Intra Prediction Left Recon Column Store Buffer Base Address
713 MEMORYADDRESSATTRIBUTES_CMD IntraPredictionLeftReconColumnStoreBufferAttributesReadWrite; //!< DW118, Intra Prediction Left Recon Column Store Buffer (attributes) Read/Write
714 SPLITBASEADDRESS64BYTEALIGNED_CMD HcpScalabilityCabacDecodedSyntaxElementsBufferMaxAddress; //!< DW119..120, HCP Scalability CABAC Decoded Syntax Elements Buffer Max Address
715
716 //! \name Local enumerations
717
718 enum MEDIA_INSTRUCTION_COMMAND
719 {
720 MEDIA_INSTRUCTION_COMMAND_HCPPIPEBUFADDRSTATE = 2, //!< No additional details
721 };
722
723 //! \brief MEDIA_INSTRUCTION_OPCODE
724 //! \details
725 //! Codec/Engine Name = HCP = 7h
726 enum MEDIA_INSTRUCTION_OPCODE
727 {
728 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
729 };
730
731 enum PIPELINE_TYPE
732 {
733 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
734 };
735
736 enum COMMAND_TYPE
737 {
738 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
739 };
740
741 //! \name Initializations
742
743 //! \brief Explicit member initialization function
744 HCP_PIPE_BUF_ADDR_STATE_CMD();
745
746 static const size_t dwSize = 121;
747 static const size_t byteSize = 484;
748 };
749
750 //!
751 //! \brief HCP_IND_OBJ_BASE_ADDR_STATE
752 //! \details
753 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
754 //! Commands. Each HCP command has assigned a media instruction command as
755 //! defined in DWord 0, BitField 22:16.
756 //!
757 //! The HCP_IND_OBJ_BASE_ADDR_STATE command is used to define the indirect
758 //! object base address of the stream in graphics memory. This is a frame
759 //! level command. (Is it frame or picture level?)
760 //! This is a picture level state command and is issued in both encoding and
761 //! decoding processes.
762 //!
763 //! Compressed Header Format
764 //!
765 //!
766 //!
767 struct HCP_IND_OBJ_BASE_ADDR_STATE_CMD
768 {
769 union
770 {
771 struct
772 {
773 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
774 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
775 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
776 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
777 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
778 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
779 };
780 uint32_t Value;
781 } DW0;
782 SPLITBASEADDRESS4KBYTEALIGNED_CMD HcpIndirectBitstreamObjectBaseAddress; //!< DW1..2, HCP Indirect Bitstream Object Base Address
783 MEMORYADDRESSATTRIBUTES_CMD HcpIndirectBitstreamObjectMemoryAddressAttributes; //!< DW3, HCP Indirect Bitstream Object Memory Address Attributes
784 SPLITBASEADDRESS4KBYTEALIGNED_CMD HcpIndirectBitstreamObjectAccessUpperBound; //!< DW4..5, HCP Indirect Bitstream Object Access Upper Bound
785 union
786 {
787 struct
788 {
789 uint64_t HcpIndirectCuObjectBaseAddress ; //!< HCP Indirect CU Object Base Address
790 };
791 uint32_t Value[2];
792 } DW6_7;
793 MEMORYADDRESSATTRIBUTES_CMD HcpIndirectCuObjectObjectMemoryAddressAttributes; //!< DW8, HCP Indirect CU Object Object Memory Address Attributes
794 union
795 {
796 struct
797 {
798 uint64_t HcpPakBseObjectBaseAddress ; //!< HCP PAK-BSE Object Base Address
799 };
800 uint32_t Value[2];
801 } DW9_10;
802 MEMORYADDRESSATTRIBUTES_CMD HcpPakBseObjectAddressMemoryAddressAttributes; //!< DW11, HCP PAK-BSE Object Address Memory Address Attributes
803 SPLITBASEADDRESS4KBYTEALIGNED_CMD HcpPakBseObjectAccessUpperBound; //!< DW12..13, HCP PAK-BSE Object Access Upper Bound
804 union
805 {
806 struct
807 {
808 uint64_t HcpVp9PakCompressedHeaderSyntaxStreaminBaseAddress ; //!< HCP VP9 PAK Compressed Header Syntax Streamin- Base Address
809 };
810 uint32_t Value[2];
811 } DW14_15;
812 MEMORYADDRESSATTRIBUTES_CMD HcpVp9PakCompressedHeaderSyntaxStreaminMemoryAddressAttributes; //!< DW16, HCP VP9 PAK Compressed Header Syntax StreamIn Memory Address Attributes
813 union
814 {
815 struct
816 {
817 uint64_t HcpVp9PakProbabilityCounterStreamoutBaseAddress ; //!< HCP VP9 PAK Probability Counter StreamOut- Base Address
818 };
819 uint32_t Value[2];
820 } DW17_18;
821 MEMORYADDRESSATTRIBUTES_CMD HcpVp9PakProbabilityCounterStreamoutMemoryAddressAttributes; //!< DW19, HCP VP9 PAK Probability Counter StreamOut Memory Address Attributes
822 union
823 {
824 struct
825 {
826 uint64_t HcpVp9PakProbabilityDeltasStreaminBaseAddress ; //!< HCP VP9 PAK Probability Deltas StreamIn- Base Address
827 };
828 uint32_t Value[2];
829 } DW20_21;
830 MEMORYADDRESSATTRIBUTES_CMD HcpVp9PakProbabilityDeltasStreaminMemoryAddressAttributes; //!< DW22, HCP VP9 PAK Probability Deltas StreamIn Memory Address Attributes
831 union
832 {
833 struct
834 {
835 uint64_t HcpVp9PakTileRecordStreamoutBaseAddress ; //!< HCP VP9 PAK Tile Record StreamOut- Base Address
836 };
837 uint32_t Value[2];
838 } DW23_24;
839 MEMORYADDRESSATTRIBUTES_CMD HcpVp9PakTileRecordStreamoutMemoryAddressAttributes; //!< DW25, HCP VP9 PAK Tile Record StreamOut Memory Address Attributes
840 union
841 {
842 struct
843 {
844 uint64_t HcpVp9PakCuLevelStatisticStreamoutBaseAddress ; //!< HCP VP9 PAK CU Level Statistic StreamOut- Base Address
845 };
846 uint32_t Value[2];
847 } DW26_27;
848 MEMORYADDRESSATTRIBUTES_CMD HcpVp9PakCuLevelStatisticStreamoutMemoryAddressAttributes; //!< DW28, HCP VP9 PAK CU Level Statistic StreamOut Memory Address Attributes
849
850 //! \name Local enumerations
851
852 enum MEDIA_INSTRUCTION_COMMAND
853 {
854 MEDIA_INSTRUCTION_COMMAND_HCPINDOBJBASEADDRSTATE = 3, //!< No additional details
855 };
856
857 //! \brief MEDIA_INSTRUCTION_OPCODE
858 //! \details
859 //! Codec/Engine Name = HCP = 7h
860 enum MEDIA_INSTRUCTION_OPCODE
861 {
862 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
863 };
864
865 enum PIPELINE_TYPE
866 {
867 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
868 };
869
870 enum COMMAND_TYPE
871 {
872 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
873 };
874
875 //! \name Initializations
876
877 //! \brief Explicit member initialization function
878 HCP_IND_OBJ_BASE_ADDR_STATE_CMD();
879
880 static const size_t dwSize = 29;
881 static const size_t byteSize = 116;
882 };
883
884 //!
885 //! \brief HCP_QM_STATE
886 //! \details
887 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
888 //! Commands. Each HCP command has assigned a media instruction command as
889 //! defined in DWord 0, BitField 22:16.
890 //!
891 //! The HCP_QM_STATE command loads the custom HEVC quantization tables into
892 //! local RAM and may be issued up to 20 times: 3x Colour Component plus 2x
893 //! intra/inter plus 4x SizeID minus 4 for the 32x32 chroma components. When
894 //! the scaling_list_enable_flag is set to disable, the scaling matrix is
895 //! still sent to the decoder, and with all entries programmed to the same
896 //! value = 16. This is a picture level state command and is issued in both
897 //! encoding and decoding processes.
898 //!
899 //! Dwords 2-17 form a table for the DCT coefficients, 4 8-bit
900 //! coefficients/DWord. Size 4x4 for SizeID0, DWords 2-5.
901 //! Size 8x8 for SizeID1/2/3, DWords 2-17.
902 //!
903 //!
904 //! SizeID 0 (Table 4-10)
905 //!
906 struct HCP_QM_STATE_CMD
907 {
908 union
909 {
910 struct
911 {
912 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
913 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
914 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
915 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
916 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
917 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
918 };
919 uint32_t Value;
920 } DW0;
921 union
922 {
923 struct
924 {
925 uint32_t PredictionType : __CODEGEN_BITFIELD( 0, 0) ; //!< PREDICTION_TYPE
926 uint32_t Sizeid : __CODEGEN_BITFIELD( 1, 2) ; //!< SIZEID
927 uint32_t ColorComponent : __CODEGEN_BITFIELD( 3, 4) ; //!< COLOR_COMPONENT
928 uint32_t DcCoefficient : __CODEGEN_BITFIELD( 5, 12) ; //!< DC Coefficient
929 uint32_t Reserved45 : __CODEGEN_BITFIELD(13, 31) ; //!< Reserved
930 };
931 uint32_t Value;
932 } DW1;
933 uint32_t Quantizermatrix[16]; //!< QuantizerMatrix
934
935 //! \name Local enumerations
936
937 enum MEDIA_INSTRUCTION_COMMAND
938 {
939 MEDIA_INSTRUCTION_COMMAND_HCPQMSTATE = 4, //!< No additional details
940 };
941
942 //! \brief MEDIA_INSTRUCTION_OPCODE
943 //! \details
944 //! Codec/Engine Name = HCP = 7h
945 enum MEDIA_INSTRUCTION_OPCODE
946 {
947 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
948 };
949
950 enum PIPELINE_TYPE
951 {
952 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
953 };
954
955 enum COMMAND_TYPE
956 {
957 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
958 };
959
960 enum PREDICTION_TYPE
961 {
962 PREDICTION_TYPE_INTRA = 0, //!< No additional details
963 PREDICTION_TYPE_INTER = 1, //!< No additional details
964 };
965
966 enum SIZEID
967 {
968 SIZEID_4X4 = 0, //!< No additional details
969 SIZEID_8X8 = 1, //!< No additional details
970 SIZEID_16X16 = 2, //!< No additional details
971 SIZEID_32X32 = 3, //!< (Illegal Value for Colour Component Chroma Cr and Cb.)
972 };
973
974 //! \brief COLOR_COMPONENT
975 //! \details
976 //! Encoder: When RDOQ is enabled, scaling list for all 3 color components
977 //! must be same. So this field is set to always 0.
978 enum COLOR_COMPONENT
979 {
980 COLOR_COMPONENT_LUMA = 0, //!< No additional details
981 COLOR_COMPONENT_CHROMACB = 1, //!< No additional details
982 COLOR_COMPONENT_CHROMACR = 2, //!< No additional details
983 };
984
985 //! \name Initializations
986
987 //! \brief Explicit member initialization function
988 HCP_QM_STATE_CMD();
989
990 static const size_t dwSize = 18;
991 static const size_t byteSize = 72;
992 };
993
994 //!
995 //! \brief HCP_PIC_STATE
996 //! \details
997 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
998 //! Commands. Each HCP command has assigned a media instruction command as
999 //! defined in DWord 0, BitField 22:16.
1000 //!
1001 //! This is a picture level command and is issued only once per workload for
1002 //! both encoding and decoding processes.
1003 //!
1004 struct HCP_PIC_STATE_CMD
1005 {
1006 union
1007 {
1008 struct
1009 {
1010 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
1011 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
1012 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
1013 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
1014 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
1015 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
1016 };
1017 uint32_t Value;
1018 } DW0;
1019 union
1020 {
1021 struct
1022 {
1023 uint32_t Framewidthinmincbminus1 : __CODEGEN_BITFIELD( 0, 10) ; //!< FrameWidthInMinCbMinus1
1024 uint32_t Reserved43 : __CODEGEN_BITFIELD(11, 14) ; //!< Reserved
1025 uint32_t PakTransformSkipEnable : __CODEGEN_BITFIELD(15, 15) ; //!< PAK Transform Skip Enable
1026 uint32_t Frameheightinmincbminus1 : __CODEGEN_BITFIELD(16, 26) ; //!< FrameHeightInMinCbMinus1
1027 uint32_t Reserved59 : __CODEGEN_BITFIELD(27, 31) ; //!< Reserved
1028 };
1029 uint32_t Value;
1030 } DW1;
1031 union
1032 {
1033 struct
1034 {
1035 uint32_t Mincusize : __CODEGEN_BITFIELD( 0, 1) ; //!< MINCUSIZE
1036 uint32_t CtbsizeLcusize : __CODEGEN_BITFIELD( 2, 3) ; //!< CTBSIZE_LCUSIZE
1037 uint32_t Mintusize : __CODEGEN_BITFIELD( 4, 5) ; //!< MINTUSIZE
1038 uint32_t Maxtusize : __CODEGEN_BITFIELD( 6, 7) ; //!< MAXTUSIZE
1039 uint32_t Minpcmsize : __CODEGEN_BITFIELD( 8, 9) ; //!< MINPCMSIZE
1040 uint32_t Maxpcmsize : __CODEGEN_BITFIELD(10, 11) ; //!< MAXPCMSIZE
1041 uint32_t Log2SaoOffsetScaleLuma : __CODEGEN_BITFIELD(12, 14) ; //!< LOG2_SAO_OFFSET_SCALE_LUMA
1042 uint32_t Reserved79 : __CODEGEN_BITFIELD(15, 15) ; //!< Reserved
1043 uint32_t Log2SaoOffsetScaleChroma : __CODEGEN_BITFIELD(16, 18) ; //!< LOG2_SAO_OFFSET_SCALE_CHROMA
1044 uint32_t Reserved83 : __CODEGEN_BITFIELD(19, 19) ; //!< Reserved
1045 uint32_t ChromaQpOffsetListLenMinus1 : __CODEGEN_BITFIELD(20, 22) ; //!< chroma_qp_offset_list_len_minus1
1046 uint32_t Reserved87 : __CODEGEN_BITFIELD(23, 23) ; //!< Reserved
1047 uint32_t DiffCuChromaQpOffsetDepth : __CODEGEN_BITFIELD(24, 27) ; //!< diff_cu_chroma_qp_offset_depth
1048 uint32_t ChromaQpOffsetListEnabledFlag : __CODEGEN_BITFIELD(28, 28) ; //!< chroma_qp_offset_list_enabled_flag
1049 uint32_t ChromaSubsampling : __CODEGEN_BITFIELD(29, 31) ; //!< CHROMA_SUBSAMPLING
1050 };
1051 uint32_t Value;
1052 } DW2;
1053 union
1054 {
1055 struct
1056 {
1057 uint32_t Colpicisi : __CODEGEN_BITFIELD( 0, 0) ; //!< COLPICISI
1058 uint32_t Curpicisi : __CODEGEN_BITFIELD( 1, 1) ; //!< CURPICISI
1059 uint32_t Inserttestflag : __CODEGEN_BITFIELD( 2, 2) ; //!< INSERTTESTFLAG
1060 uint32_t Reserved99 : __CODEGEN_BITFIELD( 3, 7) ; //!< Reserved
1061 uint32_t TileNumber : __CODEGEN_BITFIELD( 8, 13) ; //!< Tile number
1062 uint32_t FrameNumber : __CODEGEN_BITFIELD(14, 17) ; //!< Frame number
1063 uint32_t Reserved114 : __CODEGEN_BITFIELD(18, 18) ; //!< Reserved
1064 uint32_t HighPrecisionOffsetsEnableFlag : __CODEGEN_BITFIELD(19, 19) ; //!< High Precision Offsets Enable Flag
1065 uint32_t Log2Maxtransformskipsize : __CODEGEN_BITFIELD(20, 22) ; //!< Log2MaxTransformSkipSize
1066 uint32_t CrossComponentPredictionEnabledFlag : __CODEGEN_BITFIELD(23, 23) ; //!< cross_component_prediction_enabled_flag
1067 uint32_t CabacBypassAlignmentEnabledFlag : __CODEGEN_BITFIELD(24, 24) ; //!< cabac_bypass_alignment_enabled_flag
1068 uint32_t PersistentRiceAdaptationEnabledFlag : __CODEGEN_BITFIELD(25, 25) ; //!< persistent_rice_adaptation_enabled_flag
1069 uint32_t IntraSmoothingDisabledFlag : __CODEGEN_BITFIELD(26, 26) ; //!< intra_smoothing_disabled_flag
1070 uint32_t ExplicitRdpcmEnabledFlag : __CODEGEN_BITFIELD(27, 27) ; //!< explicit_rdpcm_enabled_flag
1071 uint32_t ImplicitRdpcmEnabledFlag : __CODEGEN_BITFIELD(28, 28) ; //!< implicit_rdpcm_enabled_flag
1072 uint32_t TransformSkipContextEnabledFlag : __CODEGEN_BITFIELD(29, 29) ; //!< transform_skip_context_enabled_flag
1073 uint32_t TransformSkipRotationEnabledFlag : __CODEGEN_BITFIELD(30, 30) ; //!< transform_skip_rotation_enabled_flag
1074 uint32_t SpsRangeExtensionEnableFlag : __CODEGEN_BITFIELD(31, 31) ; //!< sps_range_extension_enable_flag
1075 };
1076 uint32_t Value;
1077 } DW3;
1078 union
1079 {
1080 struct
1081 {
1082 uint32_t Reserved128 : __CODEGEN_BITFIELD( 0, 2) ; //!< Reserved
1083 uint32_t SampleAdaptiveOffsetEnabledFlag : __CODEGEN_BITFIELD( 3, 3) ; //!< sample_adaptive_offset_enabled_flag
1084 uint32_t PcmEnabledFlag : __CODEGEN_BITFIELD( 4, 4) ; //!< pcm_enabled_flag
1085 uint32_t CuQpDeltaEnabledFlag : __CODEGEN_BITFIELD( 5, 5) ; //!< CU_QP_DELTA_ENABLED_FLAG
1086 uint32_t DiffCuQpDeltaDepthOrNamedAsMaxDqpDepth : __CODEGEN_BITFIELD( 6, 7) ; //!< diff_cu_qp_delta_depth (or named as max_dqp_depth)
1087 uint32_t PcmLoopFilterDisableFlag : __CODEGEN_BITFIELD( 8, 8) ; //!< pcm_loop_filter_disable_flag
1088 uint32_t ConstrainedIntraPredFlag : __CODEGEN_BITFIELD( 9, 9) ; //!< constrained_intra_pred_flag
1089 uint32_t Log2ParallelMergeLevelMinus2 : __CODEGEN_BITFIELD(10, 12) ; //!< log2_parallel_merge_level_minus2
1090 uint32_t SignDataHidingFlag : __CODEGEN_BITFIELD(13, 13) ; //!< SIGN_DATA_HIDING_FLAG
1091 uint32_t Reserved142 : __CODEGEN_BITFIELD(14, 14) ; //!< Reserved
1092 uint32_t LoopFilterAcrossTilesEnabledFlag : __CODEGEN_BITFIELD(15, 15) ; //!< loop_filter_across_tiles_enabled_flag
1093 uint32_t EntropyCodingSyncEnabledFlag : __CODEGEN_BITFIELD(16, 16) ; //!< entropy_coding_sync_enabled_flag
1094 uint32_t TilesEnabledFlag : __CODEGEN_BITFIELD(17, 17) ; //!< tiles_enabled_flag
1095 uint32_t WeightedBipredFlag : __CODEGEN_BITFIELD(18, 18) ; //!< weighted_bipred_flag
1096 uint32_t WeightedPredFlag : __CODEGEN_BITFIELD(19, 19) ; //!< weighted_pred_flag
1097 uint32_t Fieldpic : __CODEGEN_BITFIELD(20, 20) ; //!< FIELDPIC
1098 uint32_t Bottomfield : __CODEGEN_BITFIELD(21, 21) ; //!< BOTTOMFIELD
1099 uint32_t TransformSkipEnabledFlag : __CODEGEN_BITFIELD(22, 22) ; //!< TRANSFORM_SKIP_ENABLED_FLAG
1100 uint32_t AmpEnabledFlag : __CODEGEN_BITFIELD(23, 23) ; //!< AMP_ENABLED_FLAG
1101 uint32_t Reserved152 : __CODEGEN_BITFIELD(24, 24) ; //!< Reserved
1102 uint32_t TransquantBypassEnableFlag : __CODEGEN_BITFIELD(25, 25) ; //!< TRANSQUANT_BYPASS_ENABLE_FLAG
1103 uint32_t StrongIntraSmoothingEnableFlag : __CODEGEN_BITFIELD(26, 26) ; //!< strong_intra_smoothing_enable_flag
1104 uint32_t CuPacketStructure : __CODEGEN_BITFIELD(27, 27) ; //!< CU packet structure
1105 uint32_t Reserved156 : __CODEGEN_BITFIELD(28, 31) ; //!< Reserved
1106 };
1107 uint32_t Value;
1108 } DW4;
1109 union
1110 {
1111 struct
1112 {
1113 uint32_t PicCbQpOffset : __CODEGEN_BITFIELD( 0, 4) ; //!< pic_cb_qp_offset
1114 uint32_t PicCrQpOffset : __CODEGEN_BITFIELD( 5, 9) ; //!< pic_cr_qp_offset
1115 uint32_t MaxTransformHierarchyDepthIntraOrNamedAsTuMaxDepthIntra : __CODEGEN_BITFIELD(10, 12) ; //!< max_transform_hierarchy_depth_intra (or named as tu_max_depth_intra)
1116 uint32_t MaxTransformHierarchyDepthInterOrNamedAsTuMaxDepthInter : __CODEGEN_BITFIELD(13, 15) ; //!< max_transform_hierarchy_depth_inter(or named as tu_max_depth_inter)
1117 uint32_t PcmSampleBitDepthChromaMinus1 : __CODEGEN_BITFIELD(16, 19) ; //!< pcm_sample_bit_depth_chroma_minus1
1118 uint32_t PcmSampleBitDepthLumaMinus1 : __CODEGEN_BITFIELD(20, 23) ; //!< pcm_sample_bit_depth_luma_minus1
1119 uint32_t BitDepthChromaMinus8 : __CODEGEN_BITFIELD(24, 26) ; //!< BIT_DEPTH_CHROMA_MINUS8
1120 uint32_t BitDepthLumaMinus8 : __CODEGEN_BITFIELD(27, 29) ; //!< BIT_DEPTH_LUMA_MINUS8
1121 uint32_t Reserved190 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
1122 };
1123 uint32_t Value;
1124 } DW5;
1125 union
1126 {
1127 struct
1128 {
1129 uint32_t LcuMaxBitsizeAllowed : __CODEGEN_BITFIELD( 0, 15) ; //!< LCU Max BitSize Allowed
1130 uint32_t Nonfirstpassflag : __CODEGEN_BITFIELD(16, 16) ; //!< NonFirstPassFlag
1131 uint32_t Reserved209 : __CODEGEN_BITFIELD(17, 23) ; //!< Reserved
1132 uint32_t LcumaxbitstatusenLcumaxsizereportmask : __CODEGEN_BITFIELD(24, 24) ; //!< LCUMAXBITSTATUSEN_LCUMAXSIZEREPORTMASK
1133 uint32_t FrameszoverstatusenFramebitratemaxreportmask : __CODEGEN_BITFIELD(25, 25) ; //!< FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK
1134 uint32_t FrameszunderstatusenFramebitrateminreportmask : __CODEGEN_BITFIELD(26, 26) ; //!< FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK
1135 uint32_t Reserved219 : __CODEGEN_BITFIELD(27, 28) ; //!< Reserved
1136 uint32_t LoadSlicePointerFlag : __CODEGEN_BITFIELD(29, 29) ; //!< LOAD_SLICE_POINTER_FLAG
1137 uint32_t Reserved222 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
1138 };
1139 uint32_t Value;
1140 } DW6;
1141 union
1142 {
1143 struct
1144 {
1145 uint32_t Framebitratemax : __CODEGEN_BITFIELD( 0, 13) ; //!< FrameBitRateMax
1146 uint32_t Reserved238 : __CODEGEN_BITFIELD(14, 30) ; //!< Reserved
1147 uint32_t Framebitratemaxunit : __CODEGEN_BITFIELD(31, 31) ; //!< FRAMEBITRATEMAXUNIT
1148 };
1149 uint32_t Value;
1150 } DW7;
1151 union
1152 {
1153 struct
1154 {
1155 uint32_t Framebitratemin : __CODEGEN_BITFIELD( 0, 13) ; //!< FrameBitRateMin
1156 uint32_t Reserved270 : __CODEGEN_BITFIELD(14, 30) ; //!< Reserved
1157 uint32_t Framebitrateminunit : __CODEGEN_BITFIELD(31, 31) ; //!< FRAMEBITRATEMINUNIT
1158 };
1159 uint32_t Value;
1160 } DW8;
1161 union
1162 {
1163 struct
1164 {
1165 uint32_t Framebitratemindelta : __CODEGEN_BITFIELD( 0, 14) ; //!< FRAMEBITRATEMINDELTA
1166 uint32_t Reserved303 : __CODEGEN_BITFIELD(15, 15) ; //!< Reserved
1167 uint32_t Framebitratemaxdelta : __CODEGEN_BITFIELD(16, 30) ; //!< FRAMEBITRATEMAXDELTA
1168 uint32_t Reserved319 : __CODEGEN_BITFIELD(31, 31) ; //!< Reserved
1169 };
1170 uint32_t Value;
1171 } DW9;
1172 union
1173 {
1174 struct
1175 {
1176 uint64_t Framedeltaqpmax ; //!< FrameDeltaQpMax
1177 };
1178 uint32_t Value[2];
1179 } DW10_11;
1180 union
1181 {
1182 struct
1183 {
1184 uint64_t Framedeltaqpmin ; //!< FrameDeltaQpMin
1185 };
1186 uint32_t Value[2];
1187 } DW12_13;
1188 union
1189 {
1190 struct
1191 {
1192 uint64_t Framedeltaqpmaxrange ; //!< FrameDeltaQpMaxRange
1193 };
1194 uint32_t Value[2];
1195 } DW14_15;
1196 union
1197 {
1198 struct
1199 {
1200 uint64_t Framedeltaqpminrange ; //!< FrameDeltaQpMinRange
1201 };
1202 uint32_t Value[2];
1203 } DW16_17;
1204 union
1205 {
1206 struct
1207 {
1208 uint32_t Minframesize : __CODEGEN_BITFIELD( 0, 15) ; //!< MINFRAMESIZE
1209 uint32_t Reserved592 : __CODEGEN_BITFIELD(16, 29) ; //!< Reserved
1210 uint32_t Minframesizeunits : __CODEGEN_BITFIELD(30, 31) ; //!< MINFRAMESIZEUNITS
1211 };
1212 uint32_t Value;
1213 } DW18;
1214 union
1215 {
1216 struct
1217 {
1218 uint32_t FractionalQpInput : __CODEGEN_BITFIELD( 0, 2) ; //!< Fractional QP Input
1219 uint32_t FractionalQpOffset : __CODEGEN_BITFIELD( 3, 5) ; //!< Fractional QP Offset
1220 uint32_t RhodomainRateControlEnable : __CODEGEN_BITFIELD( 6, 6) ; //!< RhoDomain Rate Control Enable
1221 uint32_t FractionalQpAdjustmentEnable : __CODEGEN_BITFIELD( 7, 7) ; //!< Fractional QP adjustment enable
1222 uint32_t Rhodomainframelevelqp : __CODEGEN_BITFIELD( 8, 13) ; //!< RhoDomainFrameLevelQP
1223 uint32_t PakDynamicSliceModeEnable : __CODEGEN_BITFIELD(14, 14) ; //!< PAK Dynamic Slice Mode Enable
1224 uint32_t NoOutputOfPriorPicsFlag : __CODEGEN_BITFIELD(15, 15) ; //!< no_output_of_prior_pics_flag
1225 uint32_t FirstSliceSegmentInPicFlag : __CODEGEN_BITFIELD(16, 16) ; //!< first_slice_segment_in_pic_flag
1226 uint32_t Nalunittypeflag : __CODEGEN_BITFIELD(17, 17) ; //!< NalUnitTypeFlag
1227 uint32_t SlicePicParameterSetId : __CODEGEN_BITFIELD(18, 23) ; //!< slice_pic_parameter_set_id
1228 uint32_t SseEnable : __CODEGEN_BITFIELD(24, 24) ; //!< SSE Enable
1229 uint32_t RdoqEnable : __CODEGEN_BITFIELD(25, 25) ; //!< RDOQ Enable
1230 uint32_t NumberoflcusinnormalSliceSizeConformanceMode : __CODEGEN_BITFIELD(26, 27) ; //!< NumberOfLCUsInNormal Slice size conformance Mode
1231 uint32_t Reserved636 : __CODEGEN_BITFIELD(28, 29) ; //!< Reserved
1232 uint32_t PartialFrameUpdateMode : __CODEGEN_BITFIELD(30, 30) ; //!< Partial Frame Update Mode
1233 uint32_t TemporalMvPredDisable : __CODEGEN_BITFIELD(31, 31) ; //!< Temporal MV pred disable
1234 };
1235 uint32_t Value;
1236 } DW19;
1237 union
1238 {
1239 struct
1240 {
1241 uint32_t Reserved640 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
1242 uint32_t Intratucountbasedrdoqdisable : __CODEGEN_BITFIELD( 6, 6) ; //!< IntraTuCountBasedRDOQdisable
1243 uint32_t Reserved647 : __CODEGEN_BITFIELD( 7, 31) ; //!< Reserved
1244 };
1245 uint32_t Value;
1246 } DW20;
1247 union
1248 {
1249 struct
1250 {
1251 uint32_t SliceSizeThresholdInBytes ; //!< Slice Size Threshold in Bytes
1252 };
1253 uint32_t Value;
1254 } DW21;
1255 union
1256 {
1257 struct
1258 {
1259 uint32_t TargetSliceSizeInBytes ; //!< Target Slice Size in Bytes
1260 };
1261 uint32_t Value;
1262 } DW22;
1263 union
1264 {
1265 struct
1266 {
1267 uint32_t Class0SseThreshold0 : __CODEGEN_BITFIELD( 0, 15) ; //!< Class0_SSE_Threshold0
1268 uint32_t Class0SseThreshold1 : __CODEGEN_BITFIELD(16, 31) ; //!< Class0_SSE_Threshold1
1269 };
1270 uint32_t Value;
1271 } DW23;
1272 uint32_t SseThresholdsForClass18[8]; //!< SSE thresholds for Class1-8
1273 union
1274 {
1275 struct
1276 {
1277 uint32_t CbQpOffsetList0 : __CODEGEN_BITFIELD( 0, 4) ; //!< cb_qp_offset_list[0]
1278 uint32_t CbQpOffsetList1 : __CODEGEN_BITFIELD( 5, 9) ; //!< cb_qp_offset_list[1]
1279 uint32_t CbQpOffsetList2 : __CODEGEN_BITFIELD(10, 14) ; //!< cb_qp_offset_list[2]
1280 uint32_t CbQpOffsetList3 : __CODEGEN_BITFIELD(15, 19) ; //!< cb_qp_offset_list[3]
1281 uint32_t CbQpOffsetList4 : __CODEGEN_BITFIELD(20, 24) ; //!< cb_qp_offset_list[4]
1282 uint32_t CbQpOffsetList5 : __CODEGEN_BITFIELD(25, 29) ; //!< cb_qp_offset_list[5]
1283 uint32_t Reserved1054 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
1284 };
1285 uint32_t Value;
1286 } DW32;
1287 union
1288 {
1289 struct
1290 {
1291 uint32_t CrQpOffsetList0 : __CODEGEN_BITFIELD( 0, 4) ; //!< cr_qp_offset_list[0]
1292 uint32_t CrQpOffsetList1 : __CODEGEN_BITFIELD( 5, 9) ; //!< cr_qp_offset_list[1]
1293 uint32_t CrQpOffsetList2 : __CODEGEN_BITFIELD(10, 14) ; //!< cr_qp_offset_list[2]
1294 uint32_t CrQpOffsetList3 : __CODEGEN_BITFIELD(15, 19) ; //!< cr_qp_offset_list[3]
1295 uint32_t CrQpOffsetList4 : __CODEGEN_BITFIELD(20, 24) ; //!< cr_qp_offset_list[4]
1296 uint32_t CrQpOffsetList5 : __CODEGEN_BITFIELD(25, 29) ; //!< cr_qp_offset_list[5]
1297 uint32_t Reserved1086 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
1298 };
1299 uint32_t Value;
1300 } DW33;
1301 union
1302 {
1303 struct
1304 {
1305 uint32_t IbcMotionCompensationBufferReferenceIdc : __CODEGEN_BITFIELD( 0, 2) ; //!< IBC Motion Compensation Buffer Reference IDC
1306 uint32_t Reserved1091 : __CODEGEN_BITFIELD( 3, 5) ; //!< Reserved
1307 uint32_t DeblockingFilterOverrideEnabledFlag : __CODEGEN_BITFIELD( 6, 6) ; //!< deblocking_filter_override_enabled_flag
1308 uint32_t PpsDeblockingFilterDisabledFlag : __CODEGEN_BITFIELD( 7, 7) ; //!< pps_deblocking_filter_disabled_flag
1309 uint32_t PpsActCrQpOffsetPlus3 : __CODEGEN_BITFIELD( 8, 13) ; //!< pps_act_cr_qp_offset_plus3
1310 uint32_t PpsActCbQpOffsetPlus5 : __CODEGEN_BITFIELD(14, 19) ; //!< pps_act_cb_qp_offset_plus5
1311 uint32_t PpsActYOffsetPlus5 : __CODEGEN_BITFIELD(20, 25) ; //!< pps_act_y_offset_plus5
1312 uint32_t PpsSliceActQpOffsetsPresentFlag : __CODEGEN_BITFIELD(26, 26) ; //!< pps_slice_act_qp_offsets_present_flag
1313 uint32_t ResidualAdaptiveColourTransformEnabledFlag : __CODEGEN_BITFIELD(27, 27) ; //!< residual_adaptive_colour_transform_enabled_flag
1314 uint32_t PpsCurrPicRefEnabledFlag : __CODEGEN_BITFIELD(28, 28) ; //!< pps_curr_pic_ref_enabled_flag
1315 uint32_t MotionVectorResolutionControlIdc : __CODEGEN_BITFIELD(29, 30) ; //!< MOTION_VECTOR_RESOLUTION_CONTROL_IDC
1316 uint32_t IntraBoundaryFilteringDisabledFlag : __CODEGEN_BITFIELD(31, 31) ; //!< intra_boundary_filtering_disabled_flag
1317 };
1318 uint32_t Value;
1319 } DW34;
1320 union
1321 {
1322 struct
1323 {
1324 uint32_t PaletteMaxSize : __CODEGEN_BITFIELD( 0, 6) ; //!< palette_max_size
1325 uint32_t Reserved1127 : __CODEGEN_BITFIELD( 7, 9) ; //!< Reserved
1326 uint32_t DeltaPaletteMaxPredictorSize : __CODEGEN_BITFIELD(10, 16) ; //!< delta_palette_max_predictor_size
1327 uint32_t Reserved1137 : __CODEGEN_BITFIELD(17, 18) ; //!< Reserved
1328 uint32_t IbcMotionVectorErrorHandlingDisable : __CODEGEN_BITFIELD(19, 19) ; //!< IBC Motion Vector Error Handling Disable
1329 uint32_t ChromaBitDepthEntryMinus8 : __CODEGEN_BITFIELD(20, 23) ; //!< chroma_bit_depth_entry_minus8
1330 uint32_t LumaBitDepthEntryMinus8 : __CODEGEN_BITFIELD(24, 27) ; //!< luma_bit_depth_entry_minus8
1331 uint32_t IbcConfiguration : __CODEGEN_BITFIELD(28, 29) ; //!< IBC_CONFIGURATION
1332 uint32_t MonochromePaletteFlag : __CODEGEN_BITFIELD(30, 30) ; //!< monochrome_palette_flag
1333 uint32_t PaletteModeEnabledFlag : __CODEGEN_BITFIELD(31, 31) ; //!< palette_mode_enabled_flag
1334 };
1335 uint32_t Value;
1336 } DW35;
1337 union
1338 {
1339 struct
1340 {
1341 uint32_t EnableFpakMessaging : __CODEGEN_BITFIELD( 0, 0) ; //!< Enable FPAK Messaging
1342 uint32_t Reserved1153 : __CODEGEN_BITFIELD( 1, 29) ; //!< Reserved
1343 uint32_t FrameCrcType : __CODEGEN_BITFIELD(30, 30) ; //!< FRAME_CRC_TYPE
1344 uint32_t FrameCrcEnable : __CODEGEN_BITFIELD(31, 31) ; //!< Frame CRC Enable
1345 };
1346 uint32_t Value;
1347 } DW36;
1348 union
1349 {
1350 struct
1351 {
1352 uint32_t Rdoqintratuthreshold : __CODEGEN_BITFIELD( 0, 15) ; //!< RDOQIntraTUThreshold
1353 uint32_t Reserved1200 : __CODEGEN_BITFIELD(16, 31) ; //!< Reserved
1354 };
1355 uint32_t Value;
1356 } DW37;
1357 union
1358 {
1359 struct
1360 {
1361 uint32_t Rdoqintra16X16Tuthreshold : __CODEGEN_BITFIELD( 0, 15) ; //!< RDOQIntra16x16TUThreshold
1362 uint32_t Rdoqintra32X32Tuthreshold : __CODEGEN_BITFIELD(16, 31) ; //!< RDOQIntra32x32TUThreshold
1363 };
1364 uint32_t Value;
1365 } DW38;
1366 union
1367 {
1368 struct
1369 {
1370 uint64_t SsethresholdsForClass910 ; //!< SSEThresholds for Class9 ..10
1371 };
1372 uint32_t Value[2];
1373 } DW39_40;
1374
1375 //! \name Local enumerations
1376
1377 enum MEDIA_INSTRUCTION_COMMAND
1378 {
1379 MEDIA_INSTRUCTION_COMMAND_HCPPICSTATE = 16, //!< No additional details
1380 };
1381
1382 //! \brief MEDIA_INSTRUCTION_OPCODE
1383 //! \details
1384 //! Codec/Engine Name = HCP = 7h
1385 enum MEDIA_INSTRUCTION_OPCODE
1386 {
1387 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
1388 };
1389
1390 enum PIPELINE_TYPE
1391 {
1392 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
1393 };
1394
1395 enum COMMAND_TYPE
1396 {
1397 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
1398 };
1399
1400 //! \brief MINCUSIZE
1401 //! \details
1402 //! Specifies the smallest coding block size.
1403 enum MINCUSIZE
1404 {
1405 MINCUSIZE_8X8 = 0, //!< No additional details
1406 MINCUSIZE_16X16 = 1, //!< No additional details
1407 MINCUSIZE_32X32 = 2, //!< No additional details
1408 MINCUSIZE_64X64 = 3, //!< No additional details
1409 };
1410
1411 //! \brief CTBSIZE_LCUSIZE
1412 //! \details
1413 //! Specifies the coding tree block size.
1414 enum CTBSIZE_LCUSIZE
1415 {
1416 CTBSIZE_LCUSIZE_ILLEGALRESERVED = 0, //!< No additional details
1417 CTBSIZE_LCUSIZE_16X16 = 1, //!< No additional details
1418 CTBSIZE_LCUSIZE_32X32 = 2, //!< No additional details
1419 CTBSIZE_LCUSIZE_64X64 = 3, //!< No additional details
1420 };
1421
1422 //! \brief MINTUSIZE
1423 //! \details
1424 //! Specifies the smallest allowed transform block size.
1425 enum MINTUSIZE
1426 {
1427 MINTUSIZE_4X4 = 0, //!< No additional details
1428 MINTUSIZE_8X8 = 1, //!< No additional details
1429 MINTUSIZE_16X16 = 2, //!< No additional details
1430 MINTUSIZE_32X32 = 3, //!< No additional details
1431 };
1432
1433 //! \brief MAXTUSIZE
1434 //! \details
1435 //! Specifies the largest allowed transform block size.
1436 enum MAXTUSIZE
1437 {
1438 MAXTUSIZE_4X4 = 0, //!< No additional details
1439 MAXTUSIZE_8X8 = 1, //!< No additional details
1440 MAXTUSIZE_16X16 = 2, //!< No additional details
1441 MAXTUSIZE_32X32 = 3, //!< No additional details
1442 };
1443
1444 //! \brief MINPCMSIZE
1445 //! \details
1446 //! Specifies the smallest allowed PCM coding block size.
1447 enum MINPCMSIZE
1448 {
1449 MINPCMSIZE_8X8 = 0, //!< No additional details
1450 MINPCMSIZE_16X16 = 1, //!< No additional details
1451 MINPCMSIZE_32X32 = 2, //!< No additional details
1452 };
1453
1454 //! \brief MAXPCMSIZE
1455 //! \details
1456 //! Specifies the largest allowed PCM coding block size.
1457 enum MAXPCMSIZE
1458 {
1459 MAXPCMSIZE_8X8 = 0, //!< No additional details
1460 MAXPCMSIZE_16X16 = 1, //!< No additional details
1461 MAXPCMSIZE_32X32 = 2, //!< No additional details
1462 };
1463
1464 //! \brief LOG2_SAO_OFFSET_SCALE_LUMA
1465 //! \details
1466 //! <p>To scale SAO offset values for luma samples</p>
1467 //! <p>0 to Max(0,BitDepth<sub><font size="2">C</font></sub>−10)</p>
1468 //! <p>Default = 0</p>
1469 enum LOG2_SAO_OFFSET_SCALE_LUMA
1470 {
1471 LOG2_SAO_OFFSET_SCALE_LUMA_0 = 0, //!< No additional details
1472 LOG2_SAO_OFFSET_SCALE_LUMA_1 = 1, //!< No additional details
1473 LOG2_SAO_OFFSET_SCALE_LUMA_2 = 2, //!< No additional details
1474 };
1475
1476 //! \brief LOG2_SAO_OFFSET_SCALE_CHROMA
1477 //! \details
1478 //! <p>To scale SAO offset values for chroma samples.</p>
1479 //! <p>0 to Max(0,BitDepth<sub>C</sub>−10)</p>
1480 //! <p>default = 0</p>
1481 //! <p>Decoder Only</p>
1482 enum LOG2_SAO_OFFSET_SCALE_CHROMA
1483 {
1484 LOG2_SAO_OFFSET_SCALE_CHROMA_0 = 0, //!< No additional details
1485 LOG2_SAO_OFFSET_SCALE_CHROMA_1 = 1, //!< No additional details
1486 LOG2_SAO_OFFSET_SCALE_CHROMA_2 = 2, //!< No additional details
1487 };
1488
1489 //! \brief CHROMA_SUBSAMPLING
1490 //! \details
1491 //! <p>Specify the chroma subsampling of the current bitstream to be decoded
1492 //! or encoded.</p>
1493 //! <p>000 (0h) - Reserved (This setting is reserved for Monochrome
1494 //! setting--currently not suppported)</p>
1495 //! <p>001 (1h) - 4:2:0</p>
1496 //! <p>010 (2h) - 4:2:2</p>
1497 //! <p>011 (3h) - 4:4:4</p>
1498 //! <p>All other values are invalid for both encoder and decoder.</p>
1499 enum CHROMA_SUBSAMPLING
1500 {
1501 CHROMA_SUBSAMPLING_420 = 1, //!< No additional details
1502 CHROMA_SUBSAMPLING_422 = 2, //!< No additional details
1503 CHROMA_SUBSAMPLING_444 = 3, //!< No additional details
1504 };
1505
1506 //! \brief COLPICISI
1507 //! \details
1508 //! Specifies that the collocated picture is comprised solely of I slices
1509 //! and that there are no P or B slices in the picture.
1510 enum COLPICISI
1511 {
1512 COLPICISI_COLLOCATEDPICTUREHASATLEASTONEPORBSLICE = 0, //!< No additional details
1513 };
1514
1515 //! \brief CURPICISI
1516 //! \details
1517 //! Specifies that the current picture is comprised solely of I slices and
1518 //! that there are no P or B slices in the picture.
1519 enum CURPICISI
1520 {
1521 CURPICISI_CURRENTPICTUREHASATLEASTONEPORBSLICE = 0, //!< No additional details
1522 };
1523
1524 //! \brief INSERTTESTFLAG
1525 //! \details
1526 //! <p>CABAC 0 Word Insertion Test Enable (Encoder Only)This bit will modify
1527 //! CABAC K equation so that a positive K value can be generated easily.
1528 //! This is done for validation purpose only. In normal usage this bit
1529 //! should be set to 0.</p>
1530 //! <p>Regular equation for generating 'K' value when CABAC 0 Word Insertion
1531 //! Test Enable is set to 0.</p>
1532 //! <pre>K = {[((96 * pic_bin_count()) - (RawMinCUBits * PicSizeInMinCUs *3)
1533 //! + 1023) / 1024] - bytes_in_picture} / 3</pre>
1534 //!
1535 //! <p>Modified equation when CABAC 0 Word Insertion Test Enable bit set to
1536 //! 1.</p>
1537 //!
1538 //! <pre>K = {[((1536 * pic_bin_count()) - (RawMinCUBits * PicSizeInMinCUs
1539 //! *3) + 1023) / 1024] - bytes_in_picture} / 3</pre>
1540 //!
1541 //! <p>Encoder only feature.</p>
1542 enum INSERTTESTFLAG
1543 {
1544 INSERTTESTFLAG_UNNAMED0 = 0, //!< No additional details
1545 INSERTTESTFLAG_UNNAMED1 = 1, //!< No additional details
1546 };
1547
1548 //! \brief CU_QP_DELTA_ENABLED_FLAG
1549 //! \details
1550 //! <p>cu_qp_delta_enabled_flag = 1 and Max_DQP_Level = 0 or 3 is supported
1551 //! for PAK standalone andVDEnc modes.</p>
1552 enum CU_QP_DELTA_ENABLED_FLAG
1553 {
1554 CU_QP_DELTA_ENABLED_FLAG_DISABLE = 0, //!< Does not allow QP change at CU or LCU level, the same QP is used for the entire slice. Max_DQP_Level = 0 (i.e. diff_cu_qp_delta_depath = 0).
1555 CU_QP_DELTA_ENABLED_FLAG_ENABLE = 1, //!< Allow QP change at CU level. MAX_DQP_level can be >0.
1556 };
1557
1558 //! \brief SIGN_DATA_HIDING_FLAG
1559 //! \details
1560 //! Currently not supported in encoder, so must be set to 0 for encoding
1561 //! session.
1562 enum SIGN_DATA_HIDING_FLAG
1563 {
1564 SIGN_DATA_HIDING_FLAG_DISABLE = 0, //!< Specifies that sign bit hiding is disabled.
1565 SIGN_DATA_HIDING_FLAG_ENABLE = 1, //!< Specifies that sign bit hiding is enabled.
1566 };
1567
1568 //! \brief FIELDPIC
1569 //! \details
1570 //! <p>Must be zero for encoder only.</p>
1571 enum FIELDPIC
1572 {
1573 FIELDPIC_VIDEOFRAME = 0, //!< No additional details
1574 FIELDPIC_VIDEOFIELD = 1, //!< No additional details
1575 };
1576
1577 //! \brief BOTTOMFIELD
1578 //! \details
1579 //! <p>Must be zero for encoder only</p>
1580 enum BOTTOMFIELD
1581 {
1582 BOTTOMFIELD_BOTTOMFIELD = 0, //!< No additional details
1583 BOTTOMFIELD_TOPFIELD = 1, //!< No additional details
1584 };
1585
1586 enum TRANSFORM_SKIP_ENABLED_FLAG
1587 {
1588 TRANSFORM_SKIP_ENABLED_FLAG_DISABLE = 0, //!< transform_skip_flag is not supported in the residual coding
1589 TRANSFORM_SKIP_ENABLED_FLAG_ENABLE = 1, //!< transform_skip_flag is supported
1590 };
1591
1592 //! \brief AMP_ENABLED_FLAG
1593 //! \details
1594 //! In VDENC mode, this bit should be set to 1.
1595 enum AMP_ENABLED_FLAG
1596 {
1597 AMP_ENABLED_FLAG_DISABLE = 0, //!< Asymmetric motion partitions cannot be used in coding tree blocks.
1598 AMP_ENABLED_FLAG_ENABLE = 1, //!< Support asymmetric motion partitions, i.e. PartMode equal to PART_2NxnU, PART_2NxnD, PART_nLx2N, or PART_nRx2N.
1599 };
1600
1601 enum TRANSQUANT_BYPASS_ENABLE_FLAG
1602 {
1603 TRANSQUANT_BYPASS_ENABLE_FLAG_DISABLE = 0, //!< cu_transquant_bypass is not supported
1604 TRANSQUANT_BYPASS_ENABLE_FLAG_ENABLE = 1, //!< cu_transquant_bypass is supported
1605 };
1606
1607 //! \brief BIT_DEPTH_CHROMA_MINUS8
1608 //! \details
1609 //! This specifies the number of bit allow for Chroma pixels. In 8 bit mode,
1610 //! this must be set to 0. Encoder: Supports bit depths 8, 10 and 12 only.
1611 //! And also it must be same as Luma. Encoder: Does not support 10 or 12 bit
1612 //! Source Pixels and 8bit PAK. i.e. The source pixel depth should be less
1613 //! than or equal to the PAK bit depth.
1614 enum BIT_DEPTH_CHROMA_MINUS8
1615 {
1616 BIT_DEPTH_CHROMA_MINUS8_CHROMA8BIT = 0, //!< No additional details
1617 BIT_DEPTH_CHROMA_MINUS8_CHROMA9BIT = 1, //!< Only HEVC decoder supports 9 bits chroma.HEVC encoder does not supports 9 bits chroma.
1618 BIT_DEPTH_CHROMA_MINUS8_CHROMA10BIT = 2, //!< No additional details
1619 BIT_DEPTH_CHROMA_MINUS8_CHROMA11BIT = 3, //!< HEVC SCC does not support 11 bits chromaAlso only HEVC decoder (non-SCC) support 11 bits chromaHEVC encoder (non-SCC) does not support 11 bits chroma
1620 BIT_DEPTH_CHROMA_MINUS8_CHROMA12BIT = 4, //!< HEVC SCC does not support 12bits Luma
1621 };
1622
1623 //! \brief BIT_DEPTH_LUMA_MINUS8
1624 //! \details
1625 //! This specifies the number of bit allow for Luma pixels. In 8 bit mode,
1626 //! this must be set to 0. Encoder: Suports bit depths 8, 10 and 12 only.
1627 //! Encoder: Does not support 10 or 12 bit Source Pixels and 8bit PAK i.e.
1628 //! the source pixel depth should be less than or equal to PAK bit depth.
1629 enum BIT_DEPTH_LUMA_MINUS8
1630 {
1631 BIT_DEPTH_LUMA_MINUS8_LUMA8BIT = 0, //!< No additional details
1632 BIT_DEPTH_LUMA_MINUS8_LUMA9BIT = 1, //!< Only HEVC decoder supports 9 bits luma.HEVC encoder does not supports 9 bits luma.
1633 BIT_DEPTH_LUMA_MINUS8_LUMA10BIT = 2, //!< No additional details
1634 BIT_DEPTH_LUMA_MINUS8_LUMA11BIT = 3, //!< HEVC SCC does not support 11 bits LumaAlso only HEVC decoder (non-SCC) support 11 bits LumaHEVC encoder (non-SCC) does not support 11 bits Luma
1635 BIT_DEPTH_LUMA_MINUS8_LUMA12BIT = 4, //!< HEVC SCC does not support 12bits Luma
1636 };
1637
1638 //! \brief NONFIRSTPASSFLAG
1639 //! \details
1640 //! This signals the current pass is not the first pass. It will imply
1641 //! designate HW behavior.
1642 enum NONFIRSTPASSFLAG
1643 {
1644 NONFIRSTPASSFLAG_DISABLE = 0, //!< If it is initial-Pass, this bit is set to 0.
1645 NONFIRSTPASSFLAG_ENABLE = 1, //!< For subsequent passes, this bit is set to 1.
1646 };
1647
1648 //! \brief LCUMAXBITSTATUSEN_LCUMAXSIZEREPORTMASK
1649 //! \details
1650 //! This is a mask bit controlling if the condition of any LCU in the frame
1651 //! exceeds LCUMaxSize.
1652 enum LCUMAXBITSTATUSEN_LCUMAXSIZEREPORTMASK
1653 {
1654 LCUMAXBITSTATUSEN_LCUMAXSIZEREPORTMASK_DISABLE = 0, //!< Do not update bit 0 of HCP_IMAGE_STATUS control register.
1655 LCUMAXBITSTATUSEN_LCUMAXSIZEREPORTMASK_ENABLE = 1, //!< HW does not use this bit to set the bit in HCP_IMAGE_STATUS_CONTROL register.
1656 };
1657
1658 //! \brief FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK
1659 //! \details
1660 //! This is a mask bit controlling if the condition of frame level bit count
1661 //! exceeds FrameBitRateMax.
1662 enum FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK
1663 {
1664 FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK_DISABLE = 0, //!< Do not update bit 1 of HCP_IMAGE_STATUS control register.
1665 FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK_ENABLE = 1, //!< HW does not use this bit to set the bit in HCP_IMAGE_STATUS_CONTROL register. It's used pass the bit inHCP_IMAGE_STATUS_MASK register
1666 };
1667
1668 //! \brief FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK
1669 //! \details
1670 //! This is a mask bit controlling if the condition of frame level bit count
1671 //! is less than FrameBitRateMin.
1672 enum FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK
1673 {
1674 FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK_DISABLE = 0, //!< Do not update bit 2 (Frame Bit Count Violate -- under run) of HCP_IMAGE_STATUS control register.
1675 FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK_ENABLE = 1, //!< Set bit 2 (Frame Bit Count Violate -- under run) of HCP_IMAGE_STATUS control register if the total frame level bit counter is less than or equal to Frame Bit Rate Minimum limit. HW does not use this bit to set the bit in HCP_IMAGE_STATUS_CONTROL register. It's used pass the bit in HCP_IMAGE_STATUS_MASK register
1676 };
1677
1678 //! \brief LOAD_SLICE_POINTER_FLAG
1679 //! \details
1680 //! <p>LoadBitStreamPointerPerSlice (Encoder-only)</p>
1681 //! <p>To support multiple slice picture and additional header/data
1682 //! insertion before and after an encoded slice. When this field is set to
1683 //! 0, bitstream pointer is only loaded once for the first slice of a frame.
1684 //! For subsequent slices in the frame, bitstream data are stitched together
1685 //! to form a single output data stream. When this field is set to 1,
1686 //! bitstream pointer is loaded for each slice of a frame. Basically
1687 //! bitstream data for different slices of a frame will be written to
1688 //! different memory locations.</p>
1689 enum LOAD_SLICE_POINTER_FLAG
1690 {
1691 LOAD_SLICE_POINTER_FLAG_DISABLE = 0, //!< Load BitStream Pointer only once for the first slice of a frame.
1692 LOAD_SLICE_POINTER_FLAG_ENABLE = 1, //!< Load/reload BitStream Pointer only once for the each slice, reload the start location of thebitstream buffer from the Indirect PAK-BSE Object Data Start Address field.
1693 };
1694
1695 //! \brief FRAMEBITRATEMAXUNIT
1696 //! \details
1697 //! This field is the Frame Bitrate Maximum Limit Units.
1698 enum FRAMEBITRATEMAXUNIT
1699 {
1700 FRAMEBITRATEMAXUNIT_BYTE = 0, //!< 32byte unit
1701 FRAMEBITRATEMAXUNIT_KILOBYTE = 1, //!< 4kbyte unit
1702 };
1703
1704 //! \brief FRAMEBITRATEMINUNIT
1705 //! \details
1706 //! This field is the Frame Bitrate Minimum Limit Units.
1707 enum FRAMEBITRATEMINUNIT
1708 {
1709 FRAMEBITRATEMINUNIT_BYTE = 0, //!< 32byte unit
1710 FRAMEBITRATEMINUNIT_KILOBYTE = 1, //!< 4kbyte unit
1711 };
1712
1713 //! \brief FRAMEBITRATEMINDELTA
1714 //! \details
1715 //! This field is used to select the slice delta QP when FrameBitRateMin Is
1716 //! exceeded. It shares the same
1717 //! FrameBitrateMinUnit.
1718 enum FRAMEBITRATEMINDELTA
1719 {
1720 FRAMEBITRATEMINDELTA_UNNAMED0 = 0, //!< No additional details
1721 };
1722
1723 //! \brief FRAMEBITRATEMAXDELTA
1724 //! \details
1725 //! This field is used to select the slice delta QP when FrameBitRateMax Is
1726 //! exceeded. It shares the same
1727 //! FrameBitrateMaxUnit.
1728 enum FRAMEBITRATEMAXDELTA
1729 {
1730 FRAMEBITRATEMAXDELTA_UNNAMED0 = 0, //!< No additional details
1731 };
1732
1733 //! \brief MINFRAMESIZE
1734 //! \details
1735 //! <p>Minimum Frame Size [15:0] (in Word, 16-bit)(Encoder Only)</p>
1736 //! <p>Mininum Frame Size is specified to compensate for intel Rate Control
1737 //! Currently zero fill (no need to perform emulation byte insertion) is
1738 //! done only to the end of the CABAC_ZERO_WORD insertion (if any) at the
1739 //! last slice of a picture. It is needed for CBR. Intel encoder parameter.
1740 //! The caller should always make sure that the value, represented by
1741 //! Mininum Frame Size, is always less than maximum frame size
1742 //! FrameBitRateMax. This field is reserved in Decode mode.</p>
1743 enum MINFRAMESIZE
1744 {
1745 MINFRAMESIZE_UNNAMED0 = 0, //!< No additional details
1746 };
1747
1748 //! \brief MINFRAMESIZEUNITS
1749 //! \details
1750 //! This field is the Minimum Frame Size Units
1751 enum MINFRAMESIZEUNITS
1752 {
1753 MINFRAMESIZEUNITS_4KB = 0, //!< Minimum Frame Size is in 4Kbytes.
1754 MINFRAMESIZEUNITS_16KB = 1, //!< Minimum Frame Size is in 16Kbytes.
1755 MINFRAMESIZEUNITS_COMPATIBILITYMODE = 2, //!< Minimum Frame Size is in 4bytes
1756 MINFRAMESIZEUNITS_16BYTES = 3, //!< Minimum Frame Size is 16 bytes.
1757 };
1758
1759 //! \brief MOTION_VECTOR_RESOLUTION_CONTROL_IDC
1760 //! \details
1761 //! <p>This controls the presense and inference of the use_integer_mv_flag
1762 //! that specifies the resolution of motion vectors for inter
1763 //! prediction.</p>
1764 //! <p>Decoder only (Encoder default to "00")</p>
1765 enum MOTION_VECTOR_RESOLUTION_CONTROL_IDC
1766 {
1767 MOTION_VECTOR_RESOLUTION_CONTROL_IDC_NOINTEGERMVFORTHEFRAME = 0, //!< No additional details
1768 MOTION_VECTOR_RESOLUTION_CONTROL_IDC_ONLYINTEGERMVFORTHEFRAME = 1, //!< No additional details
1769 MOTION_VECTOR_RESOLUTION_CONTROL_IDC_ADAPTIVEINTEGERMVFORTHEFRAME = 2, //!< Slice signal use_inter_mv_flag will indicate if the slice will use interger MV or not
1770 };
1771
1772 //! \brief IBC_CONFIGURATION
1773 //! \details
1774 //! <p>IBC configuration is used configure Intra block copy.</p>
1775 //! <p>- Disable Intra block copy.</p>
1776 //! <p>- Limit Intra block copy from Left blocks only.</p>
1777 //! <p>- Allow full range of Intra block copy as specified in spec.</p>
1778 //! <p></p>
1779 enum IBC_CONFIGURATION
1780 {
1781 IBC_CONFIGURATION_UNNAMED0 = 0, //!< When IBC configuration is 0, intra block copy is disabled and it applies for both Fixed function encoder and decoder.
1782 IBC_CONFIGURATION_UNNAMED1 = 1, //!< When IBC configuration in fixed function encoder (VDENC) mode is set to 1, Intra block search includes only left region.
1783 IBC_CONFIGURATION_UNNAMED2 = 2, //!< No additional details
1784 IBC_CONFIGURATION_UNNAMED3 = 3, //!< When IBC configuration in VDENC mode is set to 3, Intra block search includes top and left regions.In decoder mode, When SCC is enabled this field should be set to 3.
1785 };
1786
1787 //! \brief FRAME_CRC_TYPE
1788 //! \details
1789 //! <p>This indicates how CRC is generated. This bit is ignored and must be
1790 //! programmed to 0 if Frame CRC Enable is "0"</p>
1791 enum FRAME_CRC_TYPE
1792 {
1793 FRAME_CRC_TYPE_CRCWITHYUVVALUE = 0, //!< No additional details
1794 FRAME_CRC_TYPE_CRCWITHYVALUEONLY = 1, //!< No additional details
1795 };
1796
1797 //! \name Initializations
1798
1799 //! \brief Explicit member initialization function
1800 HCP_PIC_STATE_CMD();
1801
1802 static const size_t dwSize = 41;
1803 static const size_t byteSize = 164;
1804 };
1805
1806 //!
1807 //! \brief HCP_TILE_POSITION_IN_CTB
1808 //! \details
1809 //!
1810 //!
1811 struct HCP_TILE_POSITION_IN_CTB_CMD
1812 {
1813 union
1814 {
1815 struct
1816 {
1817 uint32_t Ctbpos0I : __CODEGEN_BITFIELD( 0, 7) ; //!< CtbPos0+i
1818 uint32_t Ctbpos1I : __CODEGEN_BITFIELD( 8, 15) ; //!< CtbPos1+i
1819 uint32_t Ctbpos2I : __CODEGEN_BITFIELD(16, 23) ; //!< CtbPos2+i
1820 uint32_t Ctbpos3I : __CODEGEN_BITFIELD(24, 31) ; //!< CtbPos3+i
1821 };
1822 uint32_t Value;
1823 } DW0;
1824
1825 //! \name Local enumerations
1826
1827 //! \name Initializations
1828
1829 //! \brief Explicit member initialization function
1830 HCP_TILE_POSITION_IN_CTB_CMD();
1831
1832 static const size_t dwSize = 1;
1833 static const size_t byteSize = 4;
1834 };
1835
1836 //!
1837 //! \brief HCP_TILE_POSITION_IN_CTB_MSB
1838 //! \details
1839 //! Added to support 16k picture size.
1840 //!
1841 struct HCP_TILE_POSITION_IN_CTB_MSB_CMD
1842 {
1843 union
1844 {
1845 struct
1846 {
1847 uint32_t CtbRowPositionOfTileColumn098 : __CODEGEN_BITFIELD( 0, 1) ; //!< Ctb row position of tile column 0 [9:8]
1848 uint32_t CtbRowPositionOfTileColumn198 : __CODEGEN_BITFIELD( 2, 3) ; //!< Ctb row position of tile column 1 [9:8]
1849 uint32_t CtbRowPositionOfTileColumn298 : __CODEGEN_BITFIELD( 4, 5) ; //!< Ctb row position of tile column 2 [9:8]
1850 uint32_t CtbRowPositionOfTileColumn398 : __CODEGEN_BITFIELD( 6, 7) ; //!< Ctb row position of tile column 3 [9:8]
1851 uint32_t CtbRowPositionOfTileColumn498 : __CODEGEN_BITFIELD( 8, 9) ; //!< Ctb row position of tile column 4 [9:8]
1852 uint32_t CtbRowPositionOfTileColumn598 : __CODEGEN_BITFIELD(10, 11) ; //!< Ctb row position of tile column 5 [9:8]
1853 uint32_t CtbRowPositionOfTileColumn698 : __CODEGEN_BITFIELD(12, 13) ; //!< Ctb row position of tile column 6 [9:8]
1854 uint32_t CtbRowPositionOfTileColumn798 : __CODEGEN_BITFIELD(14, 15) ; //!< Ctb row position of tile column 7 [9:8]
1855 uint32_t CtbRowPositionOfTileColumn898 : __CODEGEN_BITFIELD(16, 17) ; //!< Ctb row position of tile column 8 [9:8]
1856 uint32_t CtbRowPositionOfTileColumn998 : __CODEGEN_BITFIELD(18, 19) ; //!< Ctb row position of tile column 9 [9:8]
1857 uint32_t CtbRowPositionOfTileColumn1098 : __CODEGEN_BITFIELD(20, 21) ; //!< Ctb row position of tile column 10 [9:8]
1858 uint32_t CtbRowPositionOfTileColumn1198 : __CODEGEN_BITFIELD(22, 23) ; //!< Ctb row position of tile column 11 [9:8]
1859 uint32_t CtbRowPositionOfTileColumn1298 : __CODEGEN_BITFIELD(24, 25) ; //!< Ctb row position of tile column 12 [9:8]
1860 uint32_t CtbRowPositionOfTileColumn1398 : __CODEGEN_BITFIELD(26, 27) ; //!< Ctb row position of tile column 13 [9:8]
1861 uint32_t CtbRowPositionOfTileColumn1498 : __CODEGEN_BITFIELD(28, 29) ; //!< Ctb row position of tile column 14 [9:8]
1862 uint32_t CtbRowPositionOfTileColumn1598 : __CODEGEN_BITFIELD(30, 31) ; //!< Ctb row position of tile column 15 [9:8]
1863 };
1864 uint32_t Value;
1865 } DW0;
1866 union
1867 {
1868 struct
1869 {
1870 uint32_t CtbRowPositionOfTileColumn1698 : __CODEGEN_BITFIELD( 0, 1) ; //!< Ctb row position of tile column 16 [9:8]
1871 uint32_t CtbRowPositionOfTileColumn1798 : __CODEGEN_BITFIELD( 2, 3) ; //!< Ctb row position of tile column 17 [9:8]
1872 uint32_t CtbRowPositionOfTileColumn1898 : __CODEGEN_BITFIELD( 4, 5) ; //!< Ctb row position of tile column 18 [9:8]
1873 uint32_t CtbRowPositionOfTileColumn1998 : __CODEGEN_BITFIELD( 6, 7) ; //!< Ctb row position of tile column 19 [9:8]
1874 uint32_t CtbRowPositionOfTileColumn2098 : __CODEGEN_BITFIELD( 8, 9) ; //!< Ctb row position of tile column 20 [9:8]
1875 uint32_t CtbPositionOfTile2198 : __CODEGEN_BITFIELD(10, 11) ; //!< Ctb position of tile 21 [9:8]
1876 uint32_t Reserved44 : __CODEGEN_BITFIELD(12, 31) ; //!< Reserved
1877 };
1878 uint32_t Value;
1879 } DW1;
1880
1881 //! \name Local enumerations
1882
1883 //! \name Initializations
1884
1885 //! \brief Explicit member initialization function
1886 HCP_TILE_POSITION_IN_CTB_MSB_CMD();
1887
1888 static const size_t dwSize = 2;
1889 static const size_t byteSize = 8;
1890 };
1891
1892 //!
1893 //! \brief HCP_TILE_STATE
1894 //! \details
1895 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
1896 //! Commands. Each HCP command has assigned a media instruction command as
1897 //! defined in DWord 0, BitField 22:16.
1898 //!
1899 //! This command is valid for decoder only.
1900 //!
1901 struct HCP_TILE_STATE_CMD
1902 {
1903 union
1904 {
1905 struct
1906 {
1907 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
1908 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
1909 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
1910 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
1911 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
1912 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
1913 };
1914 uint32_t Value;
1915 } DW0;
1916 union
1917 {
1918 struct
1919 {
1920 uint32_t Numtilerowsminus1 : __CODEGEN_BITFIELD( 0, 4) ; //!< NumTileRowsMinus1
1921 uint32_t Numtilecolumnsminus1 : __CODEGEN_BITFIELD( 5, 9) ; //!< NumTileColumnsMinus1
1922 uint32_t Reserved42 : __CODEGEN_BITFIELD(10, 31) ; //!< Reserved
1923 };
1924 uint32_t Value;
1925 } DW1;
1926 HCP_TILE_POSITION_IN_CTB_CMD CtbColumnPositionOfTileColumn[5]; //!< DW2..6, Ctb column position of tile column
1927 HCP_TILE_POSITION_IN_CTB_CMD CtbRowPositionOfTileRow[6]; //!< DW7..12, Ctb row position of tile row
1928 HCP_TILE_POSITION_IN_CTB_MSB_CMD CtbColumnPositionMsb; //!< DW13..14, Ctb column position MSB
1929 HCP_TILE_POSITION_IN_CTB_MSB_CMD CtbRowPositionMsb; //!< DW15..16, Ctb row position MSB
1930
1931 //! \name Local enumerations
1932
1933 enum MEDIA_INSTRUCTION_COMMAND
1934 {
1935 MEDIA_INSTRUCTION_COMMAND_HCPTILESTATE = 17, //!< No additional details
1936 };
1937
1938 //! \brief MEDIA_INSTRUCTION_OPCODE
1939 //! \details
1940 //! Codec/Engine Name = HCP = 7h
1941 enum MEDIA_INSTRUCTION_OPCODE
1942 {
1943 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
1944 };
1945
1946 enum PIPELINE_TYPE
1947 {
1948 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
1949 };
1950
1951 enum COMMAND_TYPE
1952 {
1953 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
1954 };
1955
1956 //! \name Initializations
1957
1958 //! \brief Explicit member initialization function
1959 HCP_TILE_STATE_CMD();
1960
1961 static const size_t dwSize = 17;
1962 static const size_t byteSize = 68;
1963 };
1964
1965 //!
1966 //! \brief HCP_REF_LIST_ENTRY
1967 //! \details
1968 //!
1969 //!
1970 struct HCP_REF_LIST_ENTRY_CMD
1971 {
1972 union
1973 {
1974 struct
1975 {
1976 uint32_t ReferencePictureTbValue : __CODEGEN_BITFIELD( 0, 7) ; //!< Reference Picture tb Value
1977 uint32_t ListEntryLxReferencePictureFrameIdRefaddr07 : __CODEGEN_BITFIELD( 8, 10) ; //!< list_entry_lX: Reference Picture Frame ID (RefAddr[0-7])
1978 uint32_t ChromaWeightLxFlag : __CODEGEN_BITFIELD(11, 11) ; //!< CHROMA_WEIGHT_LX_FLAG
1979 uint32_t LumaWeightLxFlag : __CODEGEN_BITFIELD(12, 12) ; //!< LUMA_WEIGHT_LX_FLAG
1980 uint32_t Longtermreference : __CODEGEN_BITFIELD(13, 13) ; //!< LONGTERMREFERENCE
1981 uint32_t FieldPicFlag : __CODEGEN_BITFIELD(14, 14) ; //!< FIELD_PIC_FLAG
1982 uint32_t BottomFieldFlag : __CODEGEN_BITFIELD(15, 15) ; //!< BOTTOM_FIELD_FLAG
1983 uint32_t Reserved16 : __CODEGEN_BITFIELD(16, 31) ; //!< Reserved
1984 };
1985 uint32_t Value;
1986 } DW0;
1987
1988 //! \name Local enumerations
1989
1990 //! \brief CHROMA_WEIGHT_LX_FLAG
1991 //! \details
1992 //! Where X is the RefPicListNum and i is the list entry number 0 through
1993 //! 15. DW2 corresponds to i=0,
1994 //! DW17 corresponds to i=15.
1995 enum CHROMA_WEIGHT_LX_FLAG
1996 {
1997 CHROMA_WEIGHT_LX_FLAG_DEFAULTWEIGHTEDPREDICTIONFORCHROMA = 0, //!< No additional details
1998 CHROMA_WEIGHT_LX_FLAG_EXPLICITWEIGHTEDPREDICTIONFORCHROMA = 1, //!< No additional details
1999 };
2000
2001 //! \brief LUMA_WEIGHT_LX_FLAG
2002 //! \details
2003 //! Where X is the RefPicListNum and i is the list entry number 0 through
2004 //! 15. DW2 corresponds to i=0,
2005 //! DW17 corresponds to i=15.
2006 enum LUMA_WEIGHT_LX_FLAG
2007 {
2008 LUMA_WEIGHT_LX_FLAG_DEFAULTWEIGHTEDPREDICTIONFORLUMA = 0, //!< No additional details
2009 LUMA_WEIGHT_LX_FLAG_EXPLICITWEIGHTEDPREDICTIONFORLUMA = 1, //!< No additional details
2010 };
2011
2012 //! \brief LONGTERMREFERENCE
2013 //! \details
2014 //! Where X is the RefPicListNum and i is the list entry number 0 through
2015 //! 15. DW2 corresponds to i=0,
2016 //! DW17 corresponds to i=15.
2017 enum LONGTERMREFERENCE
2018 {
2019 LONGTERMREFERENCE_SHORTTERMREFERENCE = 0, //!< No additional details
2020 LONGTERMREFERENCE_LONGTERMREFERENCE = 1, //!< No additional details
2021 };
2022
2023 //! \brief FIELD_PIC_FLAG
2024 //! \details
2025 //! Where X is the RefPicListNum and i is the list entry number 0 through
2026 //! 15. DW2 corresponds to i=0,
2027 //! DW17 corresponds to i=15.
2028 enum FIELD_PIC_FLAG
2029 {
2030 FIELD_PIC_FLAG_VIDEOFRAME = 0, //!< No additional details
2031 FIELD_PIC_FLAG_VIDEOFIELD = 1, //!< No additional details
2032 };
2033
2034 //! \brief BOTTOM_FIELD_FLAG
2035 //! \details
2036 //! Where X is the RefPicListNum and i is the list entry number 0 through
2037 //! 15. DW2 corresponds to i=0,
2038 //! DW17 corresponds to i=15.
2039 enum BOTTOM_FIELD_FLAG
2040 {
2041 BOTTOM_FIELD_FLAG_BOTTOMFIELD = 0, //!< No additional details
2042 BOTTOM_FIELD_FLAG_TOPFIELD = 1, //!< No additional details
2043 };
2044
2045 //! \name Initializations
2046
2047 //! \brief Explicit member initialization function
2048 HCP_REF_LIST_ENTRY_CMD();
2049
2050 static const size_t dwSize = 1;
2051 static const size_t byteSize = 4;
2052 };
2053
2054 //!
2055 //! \brief HCP_REF_IDX_STATE
2056 //! \details
2057 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
2058 //! Commands. Each HCP command has assigned a media instruction command as
2059 //! defined in DWord 0, BitField 22:16.
2060 //!
2061 //! This is a slice level command used in both encoding and decoding
2062 //! processes. For decoder, it is issued with the HCP_BSD_OBJECT command.
2063 //!
2064 //! Unlike AVC, HEVC allows 16 reference idx entries in each of the L0 and
2065 //! L1 list for a progressive picture. Hence, a max total 32 reference idx
2066 //! in both lists together. The same when the picture is a field picture.
2067 //! Regardless the number of reference idx entries, there are only max 8
2068 //! reference pictures exist at any one time. Multiple reference idx can
2069 //! point to the same reference picture and can optionally pic a top or
2070 //! bottom field, or frame.
2071 //!
2072 //! For P-Slice, this command is issued only once, representing L0 list. For
2073 //! B-Slice, this command can be issued up to two times, one for L0 list and
2074 //! one for L1 list.
2075 //!
2076 struct HCP_REF_IDX_STATE_CMD
2077 {
2078 union
2079 {
2080 struct
2081 {
2082 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
2083 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
2084 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
2085 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
2086 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
2087 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
2088 };
2089 uint32_t Value;
2090 } DW0;
2091 union
2092 {
2093 struct
2094 {
2095 uint32_t Refpiclistnum : __CODEGEN_BITFIELD( 0, 0) ; //!< REFPICLISTNUM
2096 uint32_t NumRefIdxLRefpiclistnumActiveMinus1 : __CODEGEN_BITFIELD( 1, 4) ; //!< num_ref_idx_l[RefPicListNum]_active_minus1
2097 uint32_t Reserved37 : __CODEGEN_BITFIELD( 5, 31) ; //!< Reserved
2098 };
2099 uint32_t Value;
2100 } DW1;
2101 HCP_REF_LIST_ENTRY_CMD Entries[16]; //!< DW2..17, Entries
2102
2103 //! \name Local enumerations
2104
2105 enum MEDIA_INSTRUCTION_COMMAND
2106 {
2107 MEDIA_INSTRUCTION_COMMAND_HCPREFIDXSTATE = 18, //!< No additional details
2108 };
2109
2110 //! \brief MEDIA_INSTRUCTION_OPCODE
2111 //! \details
2112 //! Codec/Engine Name = HCP = 7h
2113 enum MEDIA_INSTRUCTION_OPCODE
2114 {
2115 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
2116 };
2117
2118 enum PIPELINE_TYPE
2119 {
2120 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
2121 };
2122
2123 enum COMMAND_TYPE
2124 {
2125 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
2126 };
2127
2128 enum REFPICLISTNUM
2129 {
2130 REFPICLISTNUM_REFERENCEPICTURELIST0 = 0, //!< No additional details
2131 REFPICLISTNUM_REFERENCEPICTURELIST1 = 1, //!< No additional details
2132 };
2133
2134 //! \name Initializations
2135
2136 //! \brief Explicit member initialization function
2137 HCP_REF_IDX_STATE_CMD();
2138
2139 static const size_t dwSize = 18;
2140 static const size_t byteSize = 72;
2141 };
2142
2143 //!
2144 //! \brief HCP_WEIGHTOFFSET_LUMA_ENTRY
2145 //! \details
2146 //!
2147 //!
2148 struct HCP_WEIGHTOFFSET_LUMA_ENTRY_CMD
2149 {
2150 union
2151 {
2152 struct
2153 {
2154 uint32_t DeltaLumaWeightLxI : __CODEGEN_BITFIELD( 0, 7) ; //!< delta_luma_weight_lX[i]
2155 uint32_t LumaOffsetLxI : __CODEGEN_BITFIELD( 8, 15) ; //!< luma_offset_lX[i]
2156 uint32_t Reserved16 : __CODEGEN_BITFIELD(16, 23) ; //!< Reserved
2157 uint32_t LumaOffsetLxIMsbyte : __CODEGEN_BITFIELD(24, 31) ; //!< luma_offset_lX[i] MSByte
2158 };
2159 uint32_t Value;
2160 } DW0;
2161
2162 //! \name Local enumerations
2163
2164 //! \name Initializations
2165
2166 //! \brief Explicit member initialization function
2167 HCP_WEIGHTOFFSET_LUMA_ENTRY_CMD();
2168
2169 static const size_t dwSize = 1;
2170 static const size_t byteSize = 4;
2171 };
2172
2173 //!
2174 //! \brief HCP_WEIGHTOFFSET_CHROMA_ENTRY
2175 //! \details
2176 //!
2177 //!
2178 struct HCP_WEIGHTOFFSET_CHROMA_ENTRY_CMD
2179 {
2180 union
2181 {
2182 struct
2183 {
2184 uint32_t DeltaChromaWeightLxI0 : __CODEGEN_BITFIELD( 0, 7) ; //!< delta_chroma_weight_lX[i][0]
2185 uint32_t ChromaoffsetlxI0 : __CODEGEN_BITFIELD( 8, 15) ; //!< ChromaOffsetLX[i][0]
2186 uint32_t DeltaChromaWeightLxI1 : __CODEGEN_BITFIELD(16, 23) ; //!< delta_chroma_weight_lX[i][1]
2187 uint32_t ChromaoffsetlxI1 : __CODEGEN_BITFIELD(24, 31) ; //!< ChromaOffsetLX [i][1]
2188 };
2189 uint32_t Value;
2190 } DW0;
2191
2192 //! \name Local enumerations
2193
2194 //! \name Initializations
2195
2196 //! \brief Explicit member initialization function
2197 HCP_WEIGHTOFFSET_CHROMA_ENTRY_CMD();
2198
2199 static const size_t dwSize = 1;
2200 static const size_t byteSize = 4;
2201 };
2202
2203 //!
2204 //! \brief HCP_WEIGHTOFFSET_CHROMA_EXT_ENTRY
2205 //! \details
2206 //!
2207 //!
2208 struct HCP_WEIGHTOFFSET_CHROMA_EXT_ENTRY_CMD
2209 {
2210 union
2211 {
2212 struct
2213 {
2214 uint32_t ChromaoffsetlxI0Msbyte : __CODEGEN_BITFIELD( 0, 7) ; //!< ChromaOffsetLX[i][0] MSByte
2215 uint32_t ChromaoffsetlxI10Msbyte : __CODEGEN_BITFIELD( 8, 15) ; //!< ChromaOffsetLX[i+1][0] MSByte
2216 uint32_t ChromaoffsetlxI1Msbyte : __CODEGEN_BITFIELD(16, 23) ; //!< ChromaOffsetLX[i][1] MSByte
2217 uint32_t ChromaoffsetlxI11Msbyte : __CODEGEN_BITFIELD(24, 31) ; //!< ChromaOffsetLX[i+1][1] MSByte
2218 };
2219 uint32_t Value;
2220 } DW0;
2221
2222 //! \name Local enumerations
2223
2224 //! \name Initializations
2225
2226 //! \brief Explicit member initialization function
2227 HCP_WEIGHTOFFSET_CHROMA_EXT_ENTRY_CMD();
2228
2229 static const size_t dwSize = 1;
2230 static const size_t byteSize = 4;
2231 };
2232
2233 //!
2234 //! \brief HCP_WEIGHTOFFSET_STATE
2235 //! \details
2236 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
2237 //! Commands. Each HCP command has assigned a media instruction command as
2238 //! defined in DWord 0, BitField 22:16.
2239 //!
2240 //! This slice level command is issued in both the encoding and decoding
2241 //! processes, if the weighted_pred_flag or weighted_bipred_flag equals one.
2242 //! If zero, then this command is not issued. Weight Prediction Values are
2243 //! provided in this command. Only Explicit Weight Prediction is supported
2244 //! in encoder. For P-Slice, this command is issued only once together with
2245 //! HCP_REF_IDX_STATE Command for L0 list. For B-Slice, this command can be
2246 //! issued up to two times together with HCP_REF_IDX_STATE Command, one for
2247 //! L0 list and one for L1 list.
2248 //!
2249 struct HCP_WEIGHTOFFSET_STATE_CMD
2250 {
2251 union
2252 {
2253 struct
2254 {
2255 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
2256 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
2257 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
2258 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
2259 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
2260 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
2261 };
2262 uint32_t Value;
2263 } DW0;
2264 union
2265 {
2266 struct
2267 {
2268 uint32_t Refpiclistnum : __CODEGEN_BITFIELD( 0, 0) ; //!< REFPICLISTNUM
2269 uint32_t Reserved33 : __CODEGEN_BITFIELD( 1, 31) ; //!< Reserved
2270 };
2271 uint32_t Value;
2272 } DW1;
2273 HCP_WEIGHTOFFSET_LUMA_ENTRY_CMD Lumaoffsets[16]; //!< DW2..17, LumaOffsets
2274 HCP_WEIGHTOFFSET_CHROMA_ENTRY_CMD Chromaoffsets[16]; //!< DW18..33, ChromaOffsets
2275 HCP_WEIGHTOFFSET_CHROMA_EXT_ENTRY_CMD Chromaoffsetsext[8]; //!< DW34..41, ChromaOffsetsExt
2276
2277 //! \name Local enumerations
2278
2279 enum MEDIA_INSTRUCTION_COMMAND
2280 {
2281 MEDIA_INSTRUCTION_COMMAND_HCPWEIGHTOFFSETSTATE = 19, //!< No additional details
2282 };
2283
2284 //! \brief MEDIA_INSTRUCTION_OPCODE
2285 //! \details
2286 //! Codec/Engine Name = HCP = 7h
2287 enum MEDIA_INSTRUCTION_OPCODE
2288 {
2289 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
2290 };
2291
2292 enum PIPELINE_TYPE
2293 {
2294 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
2295 };
2296
2297 enum COMMAND_TYPE
2298 {
2299 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
2300 };
2301
2302 enum REFPICLISTNUM
2303 {
2304 REFPICLISTNUM_REFERENCEPICTURELIST0 = 0, //!< No additional details
2305 REFPICLISTNUM_REFERENCEPICTURELIST1 = 1, //!< No additional details
2306 };
2307
2308 //! \name Initializations
2309
2310 //! \brief Explicit member initialization function
2311 HCP_WEIGHTOFFSET_STATE_CMD();
2312
2313 static const size_t dwSize = 42;
2314 static const size_t byteSize = 168;
2315 };
2316
2317 //!
2318 //! \brief HCP_SLICE_STATE
2319 //! \details
2320 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
2321 //! Commands. Each HCP command has assigned a media instruction command as
2322 //! defined in DWord 0, BitField 22:16.
2323 //!
2324 //! This is a slice level command used in both encoding and decoding
2325 //! processes. For decoder, it is issued with the HCP_BSD_OBJECT command.
2326 //!
2327 struct HCP_SLICE_STATE_CMD
2328 {
2329 union
2330 {
2331 struct
2332 {
2333 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
2334 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
2335 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
2336 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
2337 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
2338 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
2339 };
2340 uint32_t Value;
2341 } DW0;
2342 union
2343 {
2344 struct
2345 {
2346 uint32_t SlicestartctbxOrSliceStartLcuXEncoder : __CODEGEN_BITFIELD( 0, 9) ; //!< SliceStartCtbX or (slice_start_lcu_x encoder)
2347 uint32_t Reserved42 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved
2348 uint32_t SlicestartctbyOrSliceStartLcuYEncoder : __CODEGEN_BITFIELD(16, 25) ; //!< SliceStartCtbY or (slice_start_lcu_y encoder)
2349 uint32_t Reserved58 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
2350 };
2351 uint32_t Value;
2352 } DW1;
2353 union
2354 {
2355 struct
2356 {
2357 uint32_t NextslicestartctbxOrNextSliceStartLcuXEncoder : __CODEGEN_BITFIELD( 0, 9) ; //!< NextSliceStartCtbX or (next_slice_start_lcu_x encoder)
2358 uint32_t Reserved74 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved
2359 uint32_t NextslicestartctbyOrNextSliceStartLcuYEncoder : __CODEGEN_BITFIELD(16, 26) ; //!< NextSliceStartCtbY or (next_slice_start_lcu_y encoder)
2360 uint32_t Reserved91 : __CODEGEN_BITFIELD(27, 31) ; //!< Reserved
2361 };
2362 uint32_t Value;
2363 } DW2;
2364 union
2365 {
2366 struct
2367 {
2368 uint32_t SliceType : __CODEGEN_BITFIELD( 0, 1) ; //!< SLICE_TYPE
2369 uint32_t Lastsliceofpic : __CODEGEN_BITFIELD( 2, 2) ; //!< LASTSLICEOFPIC
2370 uint32_t SliceqpSignFlag : __CODEGEN_BITFIELD( 3, 3) ; //!< SliceQp Sign Flag
2371 uint32_t DependentSliceFlag : __CODEGEN_BITFIELD( 4, 4) ; //!< dependent_slice_flag
2372 uint32_t SliceTemporalMvpEnableFlag : __CODEGEN_BITFIELD( 5, 5) ; //!< slice_temporal_mvp_enable_flag
2373 uint32_t Sliceqp : __CODEGEN_BITFIELD( 6, 11) ; //!< SliceQp
2374 uint32_t SliceCbQpOffset : __CODEGEN_BITFIELD(12, 16) ; //!< SLICE_CB_QP_OFFSET
2375 uint32_t SliceCrQpOffset : __CODEGEN_BITFIELD(17, 21) ; //!< SLICE_CR_QP_OFFSET
2376 uint32_t Intrareffetchdisable : __CODEGEN_BITFIELD(22, 22) ; //!< IntraRefFetchDisable
2377 uint32_t CuChromaQpOffsetEnabledFlag : __CODEGEN_BITFIELD(23, 23) ; //!< cu_chroma_qp_offset_enabled_flag
2378 uint32_t Lastsliceoftile : __CODEGEN_BITFIELD(24, 24) ; //!< LastSliceOfTile
2379 uint32_t Lastsliceoftilecolumn : __CODEGEN_BITFIELD(25, 25) ; //!< LastSliceOfTileColumn
2380 uint32_t Reserved122 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
2381 };
2382 uint32_t Value;
2383 } DW3;
2384 union
2385 {
2386 struct
2387 {
2388 uint32_t SliceHeaderDisableDeblockingFilterFlag : __CODEGEN_BITFIELD( 0, 0) ; //!< slice_header_disable_deblocking_filter_flag
2389 uint32_t SliceTcOffsetDiv2OrFinalTcOffsetDiv2Encoder : __CODEGEN_BITFIELD( 1, 4) ; //!< slice_tc_offset_div2 or (final tc_offset_div2 Encoder)
2390 uint32_t SliceBetaOffsetDiv2OrFinalBetaOffsetDiv2Encoder : __CODEGEN_BITFIELD( 5, 8) ; //!< slice_beta_offset_div2 or (final Beta_Offset_div2 Encoder)
2391 uint32_t Reserved137 : __CODEGEN_BITFIELD( 9, 9) ; //!< Reserved
2392 uint32_t SliceLoopFilterAcrossSlicesEnabledFlag : __CODEGEN_BITFIELD(10, 10) ; //!< slice_loop_filter_across_slices_enabled_flag
2393 uint32_t SliceSaoChromaFlag : __CODEGEN_BITFIELD(11, 11) ; //!< slice_sao_chroma_flag
2394 uint32_t SliceSaoLumaFlag : __CODEGEN_BITFIELD(12, 12) ; //!< slice_sao_luma_flag
2395 uint32_t MvdL1ZeroFlag : __CODEGEN_BITFIELD(13, 13) ; //!< mvd_l1_zero_flag
2396 uint32_t Islowdelay : __CODEGEN_BITFIELD(14, 14) ; //!< isLowDelay
2397 uint32_t CollocatedFromL0Flag : __CODEGEN_BITFIELD(15, 15) ; //!< collocated_from_l0_flag
2398 uint32_t Chromalog2Weightdenom : __CODEGEN_BITFIELD(16, 18) ; //!< ChromaLog2WeightDenom
2399 uint32_t LumaLog2WeightDenom : __CODEGEN_BITFIELD(19, 21) ; //!< luma_log2_weight_denom
2400 uint32_t CabacInitFlag : __CODEGEN_BITFIELD(22, 22) ; //!< cabac_init_flag
2401 uint32_t Maxmergeidx : __CODEGEN_BITFIELD(23, 25) ; //!< MAXMERGEIDX
2402 uint32_t Collocatedrefidx : __CODEGEN_BITFIELD(26, 28) ; //!< CollocatedRefIDX
2403 uint32_t Reserved157 : __CODEGEN_BITFIELD(29, 31) ; //!< Reserved
2404 };
2405 uint32_t Value;
2406 } DW4;
2407 union
2408 {
2409 struct
2410 {
2411 uint32_t Sliceheaderlength : __CODEGEN_BITFIELD( 0, 15) ; //!< SliceHeaderLength
2412 uint32_t Reserved176 : __CODEGEN_BITFIELD(16, 31) ; //!< Reserved
2413 };
2414 uint32_t Value;
2415 } DW5;
2416 union
2417 {
2418 struct
2419 {
2420 uint32_t Reserved192 : __CODEGEN_BITFIELD( 0, 19) ; //!< Reserved
2421 uint32_t Roundintra : __CODEGEN_BITFIELD(20, 23) ; //!< ROUNDINTRA
2422 uint32_t Reserved216 : __CODEGEN_BITFIELD(24, 25) ; //!< Reserved
2423 uint32_t Roundinter : __CODEGEN_BITFIELD(26, 29) ; //!< ROUNDINTER
2424 uint32_t Reserved222 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
2425 };
2426 uint32_t Value;
2427 } DW6;
2428 union
2429 {
2430 struct
2431 {
2432 uint32_t DependentSliceDueToTileSplit : __CODEGEN_BITFIELD( 0, 0) ; //!< Dependent Slice due to Tile Split
2433 uint32_t Cabaczerowordinsertionenable : __CODEGEN_BITFIELD( 1, 1) ; //!< CABACZEROWORDINSERTIONENABLE
2434 uint32_t Emulationbytesliceinsertenable : __CODEGEN_BITFIELD( 2, 2) ; //!< EMULATIONBYTESLICEINSERTENABLE
2435 uint32_t Reserved227 : __CODEGEN_BITFIELD( 3, 7) ; //!< Reserved
2436 uint32_t TailInsertionEnable : __CODEGEN_BITFIELD( 8, 8) ; //!< TAIL_INSERTION_ENABLE
2437 uint32_t SlicedataEnable : __CODEGEN_BITFIELD( 9, 9) ; //!< SLICEDATA_ENABLE
2438 uint32_t HeaderInsertionEnable : __CODEGEN_BITFIELD(10, 10) ; //!< HEADER_INSERTION_ENABLE
2439 uint32_t Reserved235 : __CODEGEN_BITFIELD(11, 31) ; //!< Reserved
2440 };
2441 uint32_t Value;
2442 } DW7;
2443 union
2444 {
2445 struct
2446 {
2447 uint32_t Reserved256 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
2448 uint32_t IndirectPakBseDataStartOffsetWrite : __CODEGEN_BITFIELD( 6, 28) ; //!< Indirect PAK-BSE Data Start Offset (Write)
2449 uint32_t Reserved285 : __CODEGEN_BITFIELD(29, 31) ; //!< Reserved
2450 };
2451 uint32_t Value;
2452 } DW8;
2453 union
2454 {
2455 struct
2456 {
2457 uint32_t TransformskipLambda : __CODEGEN_BITFIELD( 0, 15) ; //!< Transformskip_lambda
2458 uint32_t Reserved304 : __CODEGEN_BITFIELD(16, 30) ; //!< Reserved
2459 uint32_t ForceSaoParametersToZero : __CODEGEN_BITFIELD(31, 31) ; //!< Force SAO parameters to zero
2460 };
2461 uint32_t Value;
2462 } DW9;
2463 union
2464 {
2465 struct
2466 {
2467 uint32_t TransformskipNumzerocoeffsFactor0 : __CODEGEN_BITFIELD( 0, 7) ; //!< Transformskip_numzerocoeffs_factor0
2468 uint32_t TransformskipNumnonzerocoeffsFactor0 : __CODEGEN_BITFIELD( 8, 15) ; //!< Transformskip_numnonzerocoeffs_factor0
2469 uint32_t TransformskipNumzerocoeffsFactor1 : __CODEGEN_BITFIELD(16, 23) ; //!< Transformskip_numzerocoeffs_factor1
2470 uint32_t TransformskipNumnonzerocoeffsFactor1 : __CODEGEN_BITFIELD(24, 31) ; //!< Transformskip_numnonzerocoeffs_factor1
2471 };
2472 uint32_t Value;
2473 } DW10;
2474 union
2475 {
2476 struct
2477 {
2478 uint32_t Originalslicestartctbx : __CODEGEN_BITFIELD( 0, 9) ; //!< OriginalSliceStartCtbX
2479 uint32_t Reserved362 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved
2480 uint32_t Originalslicestartctby : __CODEGEN_BITFIELD(16, 25) ; //!< OriginalSliceStartCtbY
2481 uint32_t Reserved378 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
2482 };
2483 uint32_t Value;
2484 } DW11;
2485 union
2486 {
2487 struct
2488 {
2489 uint32_t SliceActCrQpOffset : __CODEGEN_BITFIELD( 0, 5) ; //!< slice_act_cr_qp_offset
2490 uint32_t SliceActCbQpOffset : __CODEGEN_BITFIELD( 6, 11) ; //!< slice_act_cb_qp_offset
2491 uint32_t SliceActYQpOffset : __CODEGEN_BITFIELD(12, 17) ; //!< slice_act_y_qp_offset
2492 uint32_t Reserved402 : __CODEGEN_BITFIELD(18, 30) ; //!< Reserved
2493 uint32_t UseIntegerMvFlag : __CODEGEN_BITFIELD(31, 31) ; //!< use_integer_mv_flag
2494 };
2495 uint32_t Value;
2496 } DW12;
2497
2498 //! \name Local enumerations
2499
2500 enum MEDIA_INSTRUCTION_COMMAND
2501 {
2502 MEDIA_INSTRUCTION_COMMAND_HCPSLICESTATE = 20, //!< No additional details
2503 };
2504
2505 //! \brief MEDIA_INSTRUCTION_OPCODE
2506 //! \details
2507 //! Codec/Engine Name = HCP = 7h
2508 enum MEDIA_INSTRUCTION_OPCODE
2509 {
2510 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
2511 };
2512
2513 enum PIPELINE_TYPE
2514 {
2515 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
2516 };
2517
2518 enum COMMAND_TYPE
2519 {
2520 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
2521 };
2522
2523 //! \brief SLICE_TYPE
2524 //! \details
2525 //! In VDENC mode, for HEVC standard this field can be 0 or 2 only.
2526 enum SLICE_TYPE
2527 {
2528 SLICE_TYPE_B_SLICE = 0, //!< No additional details
2529 SLICE_TYPE_P_SLICE = 1, //!< No additional details
2530 SLICE_TYPE_I_SLICE = 2, //!< No additional details
2531 SLICE_TYPE_ILLEGALRESERVED = 3, //!< No additional details
2532 };
2533
2534 //! \brief LASTSLICEOFPIC
2535 //! \details
2536 //! This indicates the current slice is the very last slice of the current
2537 //! picture
2538 enum LASTSLICEOFPIC
2539 {
2540 LASTSLICEOFPIC_NOTTHELASTSLICEOFTHEPICTURE = 0, //!< No additional details
2541 LASTSLICEOFPIC_LASTSLICEOFTHEPICTURE = 1, //!< No additional details
2542 };
2543
2544 //! \brief SLICE_CB_QP_OFFSET
2545 //! \details
2546 //! For deblocking purpose, the pic and slice level cb qp offset must be
2547 //! provided separately.
2548 enum SLICE_CB_QP_OFFSET
2549 {
2550 SLICE_CB_QP_OFFSET_0 = 0, //!< No additional details
2551 SLICE_CB_QP_OFFSET_1 = 1, //!< No additional details
2552 SLICE_CB_QP_OFFSET_2 = 2, //!< No additional details
2553 SLICE_CB_QP_OFFSET_3 = 3, //!< No additional details
2554 SLICE_CB_QP_OFFSET_4 = 4, //!< No additional details
2555 SLICE_CB_QP_OFFSET_5 = 5, //!< No additional details
2556 SLICE_CB_QP_OFFSET_6 = 6, //!< No additional details
2557 SLICE_CB_QP_OFFSET_7 = 7, //!< No additional details
2558 SLICE_CB_QP_OFFSET_8 = 8, //!< No additional details
2559 SLICE_CB_QP_OFFSET_9 = 9, //!< No additional details
2560 SLICE_CB_QP_OFFSET_10 = 10, //!< No additional details
2561 SLICE_CB_QP_OFFSET_11 = 11, //!< No additional details
2562 SLICE_CB_QP_OFFSET_12 = 12, //!< No additional details
2563 SLICE_CB_QP_OFFSET_NEG_12 = 20, //!< No additional details
2564 SLICE_CB_QP_OFFSET_NEG_11 = 21, //!< No additional details
2565 SLICE_CB_QP_OFFSET_NEG_10 = 22, //!< No additional details
2566 SLICE_CB_QP_OFFSET_NEG_9 = 23, //!< No additional details
2567 SLICE_CB_QP_OFFSET_NEG_8 = 24, //!< No additional details
2568 SLICE_CB_QP_OFFSET_NEG_7 = 25, //!< No additional details
2569 SLICE_CB_QP_OFFSET_NEG_6 = 26, //!< No additional details
2570 SLICE_CB_QP_OFFSET_NEG_5 = 27, //!< No additional details
2571 SLICE_CB_QP_OFFSET_NEG_4 = 28, //!< No additional details
2572 SLICE_CB_QP_OFFSET_NEG_3 = 29, //!< No additional details
2573 SLICE_CB_QP_OFFSET_NEG_2 = 30, //!< No additional details
2574 SLICE_CB_QP_OFFSET_NEG_1 = 31, //!< No additional details
2575 };
2576
2577 //! \brief SLICE_CR_QP_OFFSET
2578 //! \details
2579 //! For deblocking purpose, the pic and slice level cr qp offset must be
2580 //! provided separately.
2581 enum SLICE_CR_QP_OFFSET
2582 {
2583 SLICE_CR_QP_OFFSET_0 = 0, //!< No additional details
2584 SLICE_CR_QP_OFFSET_1 = 1, //!< No additional details
2585 SLICE_CR_QP_OFFSET_2 = 2, //!< No additional details
2586 SLICE_CR_QP_OFFSET_3 = 3, //!< No additional details
2587 SLICE_CR_QP_OFFSET_4 = 4, //!< No additional details
2588 SLICE_CR_QP_OFFSET_5 = 5, //!< No additional details
2589 SLICE_CR_QP_OFFSET_6 = 6, //!< No additional details
2590 SLICE_CR_QP_OFFSET_7 = 7, //!< No additional details
2591 SLICE_CR_QP_OFFSET_8 = 8, //!< No additional details
2592 SLICE_CR_QP_OFFSET_9 = 9, //!< No additional details
2593 SLICE_CR_QP_OFFSET_10 = 10, //!< No additional details
2594 SLICE_CR_QP_OFFSET_11 = 11, //!< No additional details
2595 SLICE_CR_QP_OFFSET_12 = 12, //!< No additional details
2596 SLICE_CR_QP_OFFSET_NEG_12 = 20, //!< No additional details
2597 SLICE_CR_QP_OFFSET_NEG_11 = 21, //!< No additional details
2598 SLICE_CR_QP_OFFSET_NEG_10 = 22, //!< No additional details
2599 SLICE_CR_QP_OFFSET_NEG_9 = 23, //!< No additional details
2600 SLICE_CR_QP_OFFSET_NEG_8 = 24, //!< No additional details
2601 SLICE_CR_QP_OFFSET_NEG_7 = 25, //!< No additional details
2602 SLICE_CR_QP_OFFSET_NEG_6 = 26, //!< No additional details
2603 SLICE_CR_QP_OFFSET_NEG_5 = 27, //!< No additional details
2604 SLICE_CR_QP_OFFSET_NEG_4 = 28, //!< No additional details
2605 SLICE_CR_QP_OFFSET_NEG_3 = 29, //!< No additional details
2606 SLICE_CR_QP_OFFSET_NEG_2 = 30, //!< No additional details
2607 SLICE_CR_QP_OFFSET_NEG_1 = 31, //!< No additional details
2608 };
2609
2610 //! \brief MAXMERGEIDX
2611 //! \details
2612 //! MaxNumMergeCand = 5 - five_minus_max_num_merge_cand -1.
2613 enum MAXMERGEIDX
2614 {
2615 MAXMERGEIDX_0 = 0, //!< No additional details
2616 MAXMERGEIDX_1 = 1, //!< No additional details
2617 MAXMERGEIDX_2 = 2, //!< No additional details
2618 MAXMERGEIDX_3 = 3, //!< No additional details
2619 MAXMERGEIDX_4 = 4, //!< No additional details
2620 };
2621
2622 //! \brief ROUNDINTRA
2623 //! \details
2624 //! In VDENC mode, this field is ignored.
2625 enum ROUNDINTRA
2626 {
2627 ROUNDINTRA_132 = 0, //!< No additional details
2628 ROUNDINTRA_232 = 1, //!< No additional details
2629 ROUNDINTRA_332 = 2, //!< No additional details
2630 ROUNDINTRA_432 = 3, //!< No additional details
2631 ROUNDINTRA_532 = 4, //!< No additional details
2632 ROUNDINTRA_632 = 5, //!< No additional details
2633 ROUNDINTRA_732 = 6, //!< No additional details
2634 ROUNDINTRA_832 = 7, //!< No additional details
2635 ROUNDINTRA_932 = 8, //!< No additional details
2636 ROUNDINTRA_1032 = 9, //!< No additional details
2637 ROUNDINTRA_1132 = 10, //!< No additional details
2638 ROUNDINTRA_1232 = 11, //!< No additional details
2639 ROUNDINTRA_1332 = 12, //!< No additional details
2640 ROUNDINTRA_1432 = 13, //!< No additional details
2641 ROUNDINTRA_1532 = 14, //!< No additional details
2642 ROUNDINTRA_1632 = 15, //!< No additional details
2643 };
2644
2645 //! \brief ROUNDINTER
2646 //! \details
2647 //! In VDENC mode, this field is ignored.
2648 enum ROUNDINTER
2649 {
2650 ROUNDINTER_132 = 0, //!< No additional details
2651 ROUNDINTER_232 = 1, //!< No additional details
2652 ROUNDINTER_332 = 2, //!< No additional details
2653 ROUNDINTER_432 = 3, //!< No additional details
2654 ROUNDINTER_532 = 4, //!< No additional details
2655 ROUNDINTER_632 = 5, //!< No additional details
2656 ROUNDINTER_732 = 6, //!< No additional details
2657 ROUNDINTER_832 = 7, //!< No additional details
2658 ROUNDINTER_932 = 8, //!< No additional details
2659 ROUNDINTER_1032 = 9, //!< No additional details
2660 ROUNDINTER_1132 = 10, //!< No additional details
2661 ROUNDINTER_1232 = 11, //!< No additional details
2662 ROUNDINTER_1332 = 12, //!< No additional details
2663 ROUNDINTER_1432 = 13, //!< No additional details
2664 ROUNDINTER_1532 = 14, //!< No additional details
2665 ROUNDINTER_1632 = 15, //!< No additional details
2666 };
2667
2668 //! \brief CABACZEROWORDINSERTIONENABLE
2669 //! \details
2670 //! To pad the end of a SliceLayer RBSP to meet the encoded size
2671 //! requirement.
2672 enum CABACZEROWORDINSERTIONENABLE
2673 {
2674 CABACZEROWORDINSERTIONENABLE_UNNAMED0 = 0, //!< No Cabac_Zero_Word Insertion.
2675 CABACZEROWORDINSERTIONENABLE_UNNAMED1 = 1, //!< Allow internal Cabac_Zero_Word generation and append to the end of RBSP (effectively can be usedas an indicator for last slice of a picture, if the assumption is only the last slice of a pictureneeds to insert CABAC_ZERO_WORDs).
2676 };
2677
2678 //! \brief EMULATIONBYTESLICEINSERTENABLE
2679 //! \details
2680 //! To have PAK outputting SODB or EBSP to the output bitstream buffer.
2681 enum EMULATIONBYTESLICEINSERTENABLE
2682 {
2683 EMULATIONBYTESLICEINSERTENABLE_OUTPUTTINGRBSP = 0, //!< No additional details
2684 EMULATIONBYTESLICEINSERTENABLE_OUTPUTTINGEBSP = 1, //!< No additional details
2685 };
2686
2687 //! \brief TAIL_INSERTION_ENABLE
2688 //! \details
2689 //! Must be followed by the PAK Insertion Object Command to perform the
2690 //! actual insertion.
2691 enum TAIL_INSERTION_ENABLE
2692 {
2693 TAIL_INSERTION_ENABLE_UNNAMED0 = 0, //!< No tail insertion into the output bitstream buffer, after the current slice encoded bits.
2694 TAIL_INSERTION_ENABLE_UNNAMED1 = 1, //!< Tail insertion into the output bitstream buffer is present, and is after the current slice encoded bits.SKL restriction: Tail insertion is only possible at the end of frame but not in the middle (say slice end)
2695 };
2696
2697 //! \brief SLICEDATA_ENABLE
2698 //! \details
2699 //! <p>Must always be enabled.</p>
2700 //! <p>Encoder only feature.</p>
2701 enum SLICEDATA_ENABLE
2702 {
2703 SLICEDATA_ENABLE_UNNAMED0 = 0, //!< No operation; no insertion.
2704 SLICEDATA_ENABLE_UNNAMED1 = 1, //!< Slice Data insertion by PAK Object Commands into the output bitstream buffer.
2705 };
2706
2707 //! \brief HEADER_INSERTION_ENABLE
2708 //! \details
2709 //! Must be followed by the PAK Insertion Object Command to perform the
2710 //! actual insertion.
2711 enum HEADER_INSERTION_ENABLE
2712 {
2713 HEADER_INSERTION_ENABLE_UNNAMED0 = 0, //!< No header insertion into the output bitstream buffer, before the current slice encoded bits.
2714 HEADER_INSERTION_ENABLE_UNNAMED1 = 1, //!< Header insertion into the output bitstream buffer is present, and is before the current slice encoded bits.
2715 };
2716
2717 //! \name Initializations
2718
2719 //! \brief Explicit member initialization function
2720 HCP_SLICE_STATE_CMD();
2721
2722 static const size_t dwSize = 13;
2723 static const size_t byteSize = 52;
2724 };
2725
2726 //!
2727 //! \brief HCP_BSD_OBJECT
2728 //! \details
2729 //! The HCP is selected with the Media Instruction Opcode "7h" for all HCP
2730 //! Commands. Each HCP command has assigned a media instruction command as
2731 //! defined in DWord 0, BitField 22:16.
2732 //!
2733 //! The HCP_BSD_OBJECT command fetches the HEVC bit stream for a slice
2734 //! starting with the first byte in the slice. The bit stream ends with the
2735 //! last non-zero bit of the frame and does not include any zero-padding at
2736 //! the end of the bit stream. There can be multiple slices in a HEVC frame
2737 //! and thus this command can be issued multiple times per frame.
2738 //!
2739 //! The HCP_BSD_OBJECT command must be the last command issued in the
2740 //! sequence of batch commands before the HCP starts decoding. Prior to
2741 //! issuing this command, it is assumed that all configuration parameters in
2742 //! the HCP have been loaded including workload configuration registers and
2743 //! configuration tables. When this command is issued, the HCP is waiting
2744 //! for bit stream data to be presented to the shift register.
2745 //!
2746 struct HCP_BSD_OBJECT_CMD
2747 {
2748 union
2749 {
2750 struct
2751 {
2752 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
2753 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
2754 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
2755 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
2756 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
2757 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
2758 };
2759 uint32_t Value;
2760 } DW0;
2761 union
2762 {
2763 struct
2764 {
2765 uint32_t IndirectBsdDataLength ; //!< Indirect BSD Data Length
2766 };
2767 uint32_t Value;
2768 } DW1;
2769 union
2770 {
2771 struct
2772 {
2773 uint32_t IndirectDataStartAddress : __CODEGEN_BITFIELD( 0, 28) ; //!< Indirect Data Start Address
2774 uint32_t Reserved93 : __CODEGEN_BITFIELD(29, 31) ; //!< Reserved
2775 };
2776 uint32_t Value;
2777 } DW2;
2778
2779 //! \name Local enumerations
2780
2781 enum MEDIA_INSTRUCTION_COMMAND
2782 {
2783 MEDIA_INSTRUCTION_COMMAND_HCPBSDOBJECTSTATE = 32, //!< No additional details
2784 };
2785
2786 //! \brief MEDIA_INSTRUCTION_OPCODE
2787 //! \details
2788 //! Codec/Engine Name = HCP = 7h
2789 enum MEDIA_INSTRUCTION_OPCODE
2790 {
2791 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
2792 };
2793
2794 enum PIPELINE_TYPE
2795 {
2796 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
2797 };
2798
2799 enum COMMAND_TYPE
2800 {
2801 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
2802 };
2803
2804 //! \name Initializations
2805
2806 //! \brief Explicit member initialization function
2807 HCP_BSD_OBJECT_CMD();
2808
2809 static const size_t dwSize = 3;
2810 static const size_t byteSize = 12;
2811 };
2812
2813 //!
2814 //! \brief HCP_VP9_SEGMENT_STATE
2815 //! \details
2816 //!
2817 //!
2818 struct HCP_VP9_SEGMENT_STATE_CMD
2819 {
2820 union
2821 {
2822 struct
2823 {
2824 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
2825 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
2826 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
2827 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
2828 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
2829 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
2830 };
2831 uint32_t Value;
2832 } DW0;
2833 union
2834 {
2835 struct
2836 {
2837 uint32_t SegmentId : __CODEGEN_BITFIELD( 0, 2) ; //!< Segment ID
2838 uint32_t Reserved35 : __CODEGEN_BITFIELD( 3, 31) ; //!< Reserved
2839 };
2840 uint32_t Value;
2841 } DW1;
2842 union
2843 {
2844 struct
2845 {
2846 uint32_t SegmentSkipped : __CODEGEN_BITFIELD( 0, 0) ; //!< Segment Skipped
2847 uint32_t SegmentReference : __CODEGEN_BITFIELD( 1, 2) ; //!< Segment Reference
2848 uint32_t SegmentReferenceEnabled : __CODEGEN_BITFIELD( 3, 3) ; //!< Segment Reference Enabled
2849 uint32_t Reserved68 : __CODEGEN_BITFIELD( 4, 31) ; //!< Reserved
2850 };
2851 uint32_t Value;
2852 } DW2;
2853 union
2854 {
2855 struct
2856 {
2857 uint32_t Filterlevelref0Mode0 : __CODEGEN_BITFIELD( 0, 5) ; //!< FilterLevelRef0Mode0
2858 uint32_t Reserved102 : __CODEGEN_BITFIELD( 6, 7) ; //!< Reserved
2859 uint32_t Filterlevelref0Mode1 : __CODEGEN_BITFIELD( 8, 13) ; //!< FilterLevelRef0Mode1
2860 uint32_t Reserved110 : __CODEGEN_BITFIELD(14, 15) ; //!< Reserved
2861 uint32_t Filterlevelref1Mode0 : __CODEGEN_BITFIELD(16, 21) ; //!< FilterLevelRef1Mode0
2862 uint32_t Reserved118 : __CODEGEN_BITFIELD(22, 23) ; //!< Reserved
2863 uint32_t Filterlevelref1Mode1 : __CODEGEN_BITFIELD(24, 29) ; //!< FilterLevelRef1Mode1
2864 uint32_t Reserved126 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
2865 };
2866 uint32_t Value;
2867 } DW3;
2868 union
2869 {
2870 struct
2871 {
2872 uint32_t Filterlevelref2Mode0 : __CODEGEN_BITFIELD( 0, 5) ; //!< FilterLevelRef2Mode0
2873 uint32_t Reserved134 : __CODEGEN_BITFIELD( 6, 7) ; //!< Reserved
2874 uint32_t Filterlevelref2Mode1 : __CODEGEN_BITFIELD( 8, 13) ; //!< FilterLevelRef2Mode1
2875 uint32_t Reserved142 : __CODEGEN_BITFIELD(14, 15) ; //!< Reserved
2876 uint32_t Filterlevelref3Mode0 : __CODEGEN_BITFIELD(16, 21) ; //!< FilterLevelRef3Mode0
2877 uint32_t Reserved150 : __CODEGEN_BITFIELD(22, 23) ; //!< Reserved
2878 uint32_t Filterlevelref3Mode1 : __CODEGEN_BITFIELD(24, 29) ; //!< FilterLevelRef3Mode1
2879 uint32_t Reserved158 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
2880 };
2881 uint32_t Value;
2882 } DW4;
2883 union
2884 {
2885 struct
2886 {
2887 uint32_t LumaDcQuantScaleDecodeModeOnly : __CODEGEN_BITFIELD( 0, 15) ; //!< Luma DC Quant Scale (Decode mode Only)
2888 uint32_t LumaAcQuantScaleDecodeModeOnly : __CODEGEN_BITFIELD(16, 31) ; //!< Luma AC Quant Scale (Decode mode Only)
2889 };
2890 uint32_t Value;
2891 } DW5;
2892 union
2893 {
2894 struct
2895 {
2896 uint32_t ChromaDcQuantScaleDecodeModeOnly : __CODEGEN_BITFIELD( 0, 15) ; //!< Chroma DC Quant Scale (Decode mode Only)
2897 uint32_t ChromaAcQuantScaleDecodeModeOnly : __CODEGEN_BITFIELD(16, 31) ; //!< Chroma AC Quant Scale (Decode mode Only)
2898 };
2899 uint32_t Value;
2900 } DW6;
2901 union
2902 {
2903 struct
2904 {
2905 uint32_t SegmentQindexDeltaEncodeModeOnly : __CODEGEN_BITFIELD( 0, 8) ; //!< Segment QIndex Delta (encode mode only)
2906 uint32_t Reserved233 : __CODEGEN_BITFIELD( 9, 15) ; //!< Reserved
2907 uint32_t SegmentLfLevelDeltaEncodeModeOnly : __CODEGEN_BITFIELD(16, 22) ; //!< Segment LF Level Delta (Encode mode Only)
2908 uint32_t Reserved247 : __CODEGEN_BITFIELD(23, 31) ; //!< Reserved
2909 };
2910 uint32_t Value;
2911 } DW7;
2912
2913 //! \name Local enumerations
2914
2915 enum MEDIA_INSTRUCTION_COMMAND
2916 {
2917 MEDIA_INSTRUCTION_COMMAND_HCPVP9SEGMENTSTATE = 50, //!< No additional details
2918 };
2919
2920 //! \brief MEDIA_INSTRUCTION_OPCODE
2921 //! \details
2922 //! Codec/Engine Name = HUC = Bh
2923 enum MEDIA_INSTRUCTION_OPCODE
2924 {
2925 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
2926 };
2927
2928 enum PIPELINE_TYPE
2929 {
2930 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
2931 };
2932
2933 enum COMMAND_TYPE
2934 {
2935 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
2936 };
2937
2938 //! \name Initializations
2939
2940 //! \brief Explicit member initialization function
2941 HCP_VP9_SEGMENT_STATE_CMD();
2942
2943 static const size_t dwSize = 8;
2944 static const size_t byteSize = 32;
2945 };
2946
2947 //!
2948 //! \brief HCP_FQM_STATE
2949 //! \details
2950 //! The HCP_FQM_STATE command loads the custom HEVC quantization tables into
2951 //! local RAM and may be issued up to 8 times: 4 scaling list per intra and
2952 //! inter.
2953 //!
2954 //! Driver is responsible for performing the Scaling List division. So, save
2955 //! the division HW cost in HW. The 1/x value is provided in 16-bit
2956 //! fixed-point precision as ((1<<17)/QM +1) >> 1. .
2957 //!
2958 //! Note: FQM is computed as (2^16)/QM. If QM=1, FQM=all 1's.
2959 //!
2960 //! To simplify the design, only a limited number of scaling lists are
2961 //! provided at the PAK interface: default two SizeID0 and two SizeID123
2962 //! (one set for inter and the other set for intra), and the encoder only
2963 //! allows custom entries for these four matrices. The DC value of SizeID2
2964 //! and SizeID3 will be provided.
2965 //!
2966 //! When the scaling_list_enable_flag is set to disable, the scaling matrix
2967 //! is still sent to the PAK, and with all entries programmed to the same
2968 //! value of 16.
2969 //!
2970 //! This is a picture level state command and is issued in encoding
2971 //! processes only.
2972 //!
2973 //! Dwords 2-33 form a table for the DCT coefficients, 2 16-bit
2974 //! coefficients/DWord. Size 4x4 for SizeID0, DWords 2-9.
2975 //! Size 8x8 for SizeID1/2/3, DWords 2-33.
2976 //!
2977 //!
2978 //! SizeID 0 (Table 4-13)
2979 //!
2980 struct HCP_FQM_STATE_CMD
2981 {
2982 union
2983 {
2984 struct
2985 {
2986 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
2987 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
2988 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
2989 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
2990 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
2991 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
2992 };
2993 uint32_t Value;
2994 } DW0;
2995 union
2996 {
2997 struct
2998 {
2999 uint32_t IntraInter : __CODEGEN_BITFIELD( 0, 0) ; //!< INTRAINTER
3000 uint32_t Sizeid : __CODEGEN_BITFIELD( 1, 2) ; //!< SIZEID
3001 uint32_t ColorComponent : __CODEGEN_BITFIELD( 3, 4) ; //!< COLOR_COMPONENT
3002 uint32_t Reserved37 : __CODEGEN_BITFIELD( 5, 15) ; //!< Reserved
3003 uint32_t FqmDcValue1Dc : __CODEGEN_BITFIELD(16, 31) ; //!< FQM DC Value: (1/DC):
3004 };
3005 uint32_t Value;
3006 } DW1;
3007 uint32_t Quantizermatrix[32]; //!< QuantizerMatrix
3008
3009 //! \name Local enumerations
3010
3011 enum MEDIA_INSTRUCTION_COMMAND
3012 {
3013 MEDIA_INSTRUCTION_COMMAND_HCPFQMSTATE = 5, //!< No additional details
3014 };
3015
3016 //! \brief MEDIA_INSTRUCTION_OPCODE
3017 //! \details
3018 //! Codec/Engine Name = HCP = 7h
3019 enum MEDIA_INSTRUCTION_OPCODE
3020 {
3021 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
3022 };
3023
3024 enum PIPELINE_TYPE
3025 {
3026 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
3027 };
3028
3029 enum COMMAND_TYPE
3030 {
3031 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
3032 };
3033
3034 //! \brief INTRAINTER
3035 //! \details
3036 //! This field specifies the quant matrix intra or inter type.
3037 enum INTRAINTER
3038 {
3039 INTRAINTER_INTRA = 0, //!< No additional details
3040 INTRAINTER_INTER = 1, //!< No additional details
3041 };
3042
3043 enum SIZEID
3044 {
3045 SIZEID_SIZEID04X4 = 0, //!< No additional details
3046 SIZEID_SIZEID1_2_3_8X8_16X16_32X32 = 1, //!< No additional details
3047 SIZEID_SIZEID2_FORDCVALUEIN16X16 = 2, //!< No additional details
3048 SIZEID_SIZEID3_FORDCVALUEIN32X32 = 3, //!< No additional details
3049 };
3050
3051 //! \brief COLOR_COMPONENT
3052 //! \details
3053 //! <p>Luma and Chroma's share the same scaling list and DC value for the
3054 //! same SizeID.</p>
3055 enum COLOR_COMPONENT
3056 {
3057 COLOR_COMPONENT_LUMA = 0, //!< No additional details
3058 COLOR_COMPONENT_CHROMACB = 1, //!< No additional details
3059 COLOR_COMPONENT_CHROMACR = 2, //!< No additional details
3060 };
3061
3062 //! \name Initializations
3063
3064 //! \brief Explicit member initialization function
3065 HCP_FQM_STATE_CMD();
3066
3067 static const size_t dwSize = 34;
3068 static const size_t byteSize = 136;
3069 };
3070
3071 //!
3072 //! \brief HCP_PAK_INSERT_OBJECT
3073 //! \details
3074 //! It is an encoder only command, operating at bitstream level, before and
3075 //! after SliceData compressed bitstream. It is setup by the header and tail
3076 //! present flags in the Slice State command. If these flags are set and no
3077 //! subsequent PAK_INSERT_OBJECT commands are issued, the pipeline will
3078 //! hang.
3079 //!
3080 //! The HCP_ PAK_ INSERT _OBJECT command supports both inline and indirect
3081 //! data payload, but only one can be active at any time. It is issued to
3082 //! insert a chunk of bits (payload) into the current compressed bitstream
3083 //! output buffer (specified in the HCP_PAK-BSE Object Base Address field of
3084 //! the HCP_IND_OBJ_BASE_ADDR_STATE command) starting at its current write
3085 //! pointer bit position. Hardware will keep track of this write pointer's
3086 //! byte position and the associated next bit insertion position index.
3087 //!
3088 //! It is a variable length command when the payload (data to be inserted)
3089 //! is presented as inline data within the command itself. The inline
3090 //! payload is a multiple of 32-bit (1 DW), as the data bus to the
3091 //! compressed bitstream output buffer is 32-bit wide.
3092 //!
3093 //! The payload data is required to be byte aligned on the left (first
3094 //! transmitted bit order) and may or may not be byte aligned on the right
3095 //! (last transmitted bits). The command will specify the bit offset of the
3096 //! last valid DW. Note that : Stitch Command is used if the beginning
3097 //! position of data is in bit position. When PAK Insert Command is used the
3098 //! beginning position must be in byte position.
3099 //!
3100 //! Multiple insertion commands can be issued back to back in a series. It
3101 //! is host software's responsibility to make sure their corresponding data
3102 //! will properly stitch together to form a valid bitstream.
3103 //!
3104 //! Internally, HCP hardware will keep track of the very last two bytes'
3105 //! (the very last byte can be a partial byte) values of the previous
3106 //! insertion. It is required that the next Insertion Object Command or the
3107 //! next PAK Object Command to perform the start code emulation sequence
3108 //! check and prevention 0x03 byte insertion with this end condition of the
3109 //! previous insertion.
3110 //!
3111 //! The payload data may have already been processed for start code
3112 //! emulation byte insertion, except the possibility of the last 2 bytes
3113 //! plus the very last partial byte (if any). Hence, when hardware
3114 //! performing the concatenation of multiple consecutive insertion commands,
3115 //! or concatenation of an insertion command and a PAK object command, it
3116 //! must check and perform the necessary start code emulation byte insert at
3117 //! the junction.
3118 //!
3119 //! Data to be inserted can be a valid NAL units or a partial NAL unit. It
3120 //! can be any encoded syntax elements bit data before the encoded Slice
3121 //! Data (PAK Object Command) of the current Slice - SPS NAL, PPS NAL, SEI
3122 //! NAL and Other Non-Slice NAL, Leading_Zero_8_bits (as many bytes as there
3123 //! is), Start Code , Slice Header. Any encoded syntax elements bit data
3124 //! after the encoded Slice Data (PAK Object Command) of the current Slice
3125 //! and prior to the next encoded Slice Data of the next Slice or prior to
3126 //! the end of the bitstream, whichever comes first Cabac_Zero_Word or
3127 //! Trailing_Zero_8bits (as many bytes as there is).
3128 //!
3129 //! Certain NAL unit has a minimum byte size requirement. As such the
3130 //! hardware will optionally (enabled by SLICE STATE Command) determines the
3131 //! number of CABAC_ZERO_WORD to be inserted to the end of the current NAL,
3132 //! based on the minimum byte size of a NAL and the actual bin count of the
3133 //! encoded Slice. Since prior to the CABAC_ZERO_WORD insertion, the RBSP or
3134 //! EBSP is already byte-aligned, so each CABAC_ZERO_WORD insertion is
3135 //! actually a 3-byte sequence 0x00 00 03.
3136 //!
3137 //! Context switch interrupt is not supported by this command.
3138 //!
3139 struct HCP_PAK_INSERT_OBJECT_CMD
3140 {
3141 union
3142 {
3143 struct
3144 {
3145 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< Dword Length
3146 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
3147 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
3148 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
3149 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
3150 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
3151 };
3152 uint32_t Value;
3153 } DW0;
3154 union
3155 {
3156 struct
3157 {
3158 uint32_t Reserved32 : __CODEGEN_BITFIELD( 0, 0) ; //!< Reserved
3159 uint32_t EndofsliceflagLastdstdatainsertcommandflag : __CODEGEN_BITFIELD( 1, 1) ; //!< EndOfSliceFlag - LastDstDataInsertCommandFlag
3160 uint32_t LastheaderflagLastsrcheaderdatainsertcommandflag : __CODEGEN_BITFIELD( 2, 2) ; //!< LastHeaderFlag - LastSrcHeaderDataInsertCommandFlag
3161 uint32_t EmulationflagEmulationbytebitsinsertenable : __CODEGEN_BITFIELD( 3, 3) ; //!< EMULATIONFLAG_EMULATIONBYTEBITSINSERTENABLE
3162 uint32_t SkipemulbytecntSkipEmulationByteCount : __CODEGEN_BITFIELD( 4, 7) ; //!< SkipEmulByteCnt - Skip Emulation Byte Count
3163 uint32_t DatabitsinlastdwSrcdataendingbitinclusion50 : __CODEGEN_BITFIELD( 8, 13) ; //!< DataBitsInLastDW - SrCDataEndingBitInclusion[5:0]
3164 uint32_t SliceHeaderIndicator : __CODEGEN_BITFIELD(14, 14) ; //!< Slice Header Indicator
3165 uint32_t Headerlengthexcludefrmsize : __CODEGEN_BITFIELD(15, 15) ; //!< HEADERLENGTHEXCLUDEFRMSIZE_
3166 uint32_t DatabyteoffsetSrcdatastartingbyteoffset10 : __CODEGEN_BITFIELD(16, 17) ; //!< DataByteOffset - SrcDataStartingByteOffset[1:0]
3167 uint32_t Reserved50 : __CODEGEN_BITFIELD(18, 30) ; //!< Reserved
3168 uint32_t IndirectPayloadEnable : __CODEGEN_BITFIELD(31, 31) ; //!< INDIRECT_PAYLOAD_ENABLE
3169 };
3170 uint32_t Value;
3171 } DW1;
3172
3173 //! \name Local enumerations
3174
3175 enum MEDIA_INSTRUCTION_COMMAND
3176 {
3177 MEDIA_INSTRUCTION_COMMAND_HCPPAKINSERTOBJECT = 34, //!< No additional details
3178 };
3179
3180 //! \brief MEDIA_INSTRUCTION_OPCODE
3181 //! \details
3182 //! Codec/Engine Name = HCP = 7h
3183 enum MEDIA_INSTRUCTION_OPCODE
3184 {
3185 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
3186 };
3187
3188 enum PIPELINE_TYPE
3189 {
3190 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
3191 };
3192
3193 enum COMMAND_TYPE
3194 {
3195 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
3196 };
3197
3198 //! \brief EMULATIONFLAG_EMULATIONBYTEBITSINSERTENABLE
3199 //! \details
3200 //! Only valid for HEVC and reserved for VP9.
3201 enum EMULATIONFLAG_EMULATIONBYTEBITSINSERTENABLE
3202 {
3203 EMULATIONFLAG_EMULATIONBYTEBITSINSERTENABLE_STARTCODEPREFIX = 1, //!< Instruct the hardware to perform Start Code Prefix (0x 00 00 01/02/03/00) Search and Prevention Byte (0x 03) insertion on the insertion data of this command. It is required that hardware will handle a start code prefix crossing the boundary between.
3204 EMULATIONFLAG_EMULATIONBYTEBITSINSERTENABLE_INSERTIONCOMMAND = 2, //!< Insertion commands, or an insertion command followed by a PAK Object command.
3205 };
3206
3207 //! \brief HEADERLENGTHEXCLUDEFRMSIZE_
3208 //! \details
3209 //! <p>In case this flag is on, bits are NOT accumulated during current
3210 //! access unit coding neither for Cabac Zero Word insertion bits counting
3211 //! or for output in MMIO register
3212 //! HCP_BITSTREAM_BYTECOUNT_FRAME_NO_HEADER.</p>
3213 //! <p>When using HeaderLenghtExcludeFrmSize for header insertion, the
3214 //! software needs to make sure that data comes already with inserted start
3215 //! code emulation bytes. SW shouldn't set EmulationFlag bit ( Bit 3 of
3216 //! DWORD1 of HCP_PAK_INSERT_OBJECT).</p>
3217 //! <table border="1" cellpadding="0" cellspacing="0" style="width: 100%;"
3218 //! width="100%">
3219 //! <tbody>
3220 //! <tr>
3221 //! <td>
3222 //! <p align="center"><b>Value</b></p></td>
3223 //! <td>
3224 //! <p align="center"><b style="text-align:
3225 //! -webkit-center;">Description</b></p></td>
3226 //! </tr>
3227 //! <tr>
3228 //! <td>
3229 //! <p>0</p></td>
3230 //! <td>
3231 //! <p>All bits accumulated</p></td>
3232 //! </tr>
3233 //! <tr>
3234 //! <td>
3235 //! <p>1</p></td>
3236 //! <td>
3237 //! <p>Bits during current call are not accumulated</p></td>
3238 //! </tr>
3239 //! </tbody>
3240 //! </table>
3241 //!
3242 //! <p></p>
3243 enum HEADERLENGTHEXCLUDEFRMSIZE_
3244 {
3245 HEADERLENGTHEXCLUDEFRMSIZE_ALLBITSACCUMULATED = 0, //!< No additional details
3246 HEADERLENGTHEXCLUDEFRMSIZE_BITSDURINGCURRENTCALLARENOTACCUMULATED = 1, //!< No additional details
3247 };
3248
3249 //! \brief INDIRECT_PAYLOAD_ENABLE
3250 //! \details
3251 //! <p>Only one of these two payload modes can be active at any time.</p>
3252 //! <p>When Slice Size Conformance is enable the Payload(header) must be
3253 //! inline only so this bit set to MBZ.</p>
3254 enum INDIRECT_PAYLOAD_ENABLE
3255 {
3256 INDIRECT_PAYLOAD_ENABLE_INLINEPAYLOADISUSED = 0, //!< No additional details
3257 INDIRECT_PAYLOAD_ENABLE_INDIRECTPAYLOADISUSED = 1, //!< No additional details
3258 };
3259
3260 //! \name Initializations
3261
3262 //! \brief Explicit member initialization function
3263 HCP_PAK_INSERT_OBJECT_CMD();
3264
3265 static const size_t dwSize = 2;
3266 static const size_t byteSize = 8;
3267 };
3268
3269 //!
3270 //! \brief HCP_VP9_PIC_STATE
3271 //! \details
3272 //!
3273 //!
3274 struct HCP_VP9_PIC_STATE_CMD
3275 {
3276 union
3277 {
3278 struct
3279 {
3280 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
3281 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
3282 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
3283 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
3284 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
3285 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
3286 };
3287 uint32_t Value;
3288 } DW0;
3289 union
3290 {
3291 struct
3292 {
3293 uint32_t FrameWidthInPixelsMinus1 : __CODEGEN_BITFIELD( 0, 13) ; //!< Frame Width In Pixels Minus 1
3294 uint32_t Reserved46 : __CODEGEN_BITFIELD(14, 15) ; //!< Reserved
3295 uint32_t FrameHeightInPixelsMinus1 : __CODEGEN_BITFIELD(16, 29) ; //!< Frame Height In Pixels Minus 1
3296 uint32_t Reserved62 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
3297 };
3298 uint32_t Value;
3299 } DW1;
3300 union
3301 {
3302 struct
3303 {
3304 uint32_t FrameType : __CODEGEN_BITFIELD( 0, 0) ; //!< FRAME_TYPE
3305 uint32_t AdaptProbabilitiesFlag : __CODEGEN_BITFIELD( 1, 1) ; //!< ADAPT_PROBABILITIES_FLAG
3306 uint32_t IntraonlyFlag : __CODEGEN_BITFIELD( 2, 2) ; //!< IntraOnly Flag
3307 uint32_t AllowHiPrecisionMv : __CODEGEN_BITFIELD( 3, 3) ; //!< ALLOW_HI_PRECISION_MV
3308 uint32_t McompFilterType : __CODEGEN_BITFIELD( 4, 6) ; //!< MCOMP_FILTER_TYPE
3309 uint32_t RefFrameSignBias02 : __CODEGEN_BITFIELD( 7, 9) ; //!< Ref Frame Sign Bias[0..2]
3310 uint32_t UsePrevInFindMvReferences : __CODEGEN_BITFIELD(10, 10) ; //!< Use Prev in Find MV References
3311 uint32_t HybridPredictionMode : __CODEGEN_BITFIELD(11, 11) ; //!< HYBRID_PREDICTION_MODE
3312 uint32_t SelectableTxMode : __CODEGEN_BITFIELD(12, 12) ; //!< SELECTABLE_TX_MODE
3313 uint32_t LastFrameType : __CODEGEN_BITFIELD(13, 13) ; //!< LAST_FRAME_TYPE
3314 uint32_t RefreshFrameContext : __CODEGEN_BITFIELD(14, 14) ; //!< REFRESH_FRAME_CONTEXT
3315 uint32_t ErrorResilientMode : __CODEGEN_BITFIELD(15, 15) ; //!< ERROR_RESILIENT_MODE
3316 uint32_t FrameParallelDecodingMode : __CODEGEN_BITFIELD(16, 16) ; //!< FRAME_PARALLEL_DECODING_MODE
3317 uint32_t FilterLevel : __CODEGEN_BITFIELD(17, 22) ; //!< Filter Level
3318 uint32_t SharpnessLevel : __CODEGEN_BITFIELD(23, 25) ; //!< Sharpness Level
3319 uint32_t SegmentationEnabled : __CODEGEN_BITFIELD(26, 26) ; //!< SEGMENTATION_ENABLED
3320 uint32_t SegmentationUpdateMap : __CODEGEN_BITFIELD(27, 27) ; //!< SEGMENTATION_UPDATE_MAP
3321 uint32_t SegmentationTemporalUpdate : __CODEGEN_BITFIELD(28, 28) ; //!< SEGMENTATION_TEMPORAL_UPDATE
3322 uint32_t LosslessMode : __CODEGEN_BITFIELD(29, 29) ; //!< LOSSLESS_MODE
3323 uint32_t SegmentIdStreamoutEnable : __CODEGEN_BITFIELD(30, 30) ; //!< SEGMENT_ID_STREAMOUT_ENABLE
3324 uint32_t SegmentIdStreaminEnable : __CODEGEN_BITFIELD(31, 31) ; //!< SEGMENT_ID_STREAMIN_ENABLE
3325 };
3326 uint32_t Value;
3327 } DW2;
3328 union
3329 {
3330 struct
3331 {
3332 uint32_t Log2TileColumn : __CODEGEN_BITFIELD( 0, 3) ; //!< LOG2_TILE_COLUMN
3333 uint32_t Reserved100 : __CODEGEN_BITFIELD( 4, 7) ; //!< Reserved
3334 uint32_t Log2TileRow : __CODEGEN_BITFIELD( 8, 9) ; //!< LOG2_TILE_ROW
3335 uint32_t Reserved106 : __CODEGEN_BITFIELD(10, 20) ; //!< Reserved
3336 uint32_t SseEnable : __CODEGEN_BITFIELD(21, 21) ; //!< SSE Enable
3337 uint32_t ChromaSamplingFormat : __CODEGEN_BITFIELD(22, 23) ; //!< CHROMA_SAMPLING_FORMAT
3338 uint32_t Bitdepthminus8 : __CODEGEN_BITFIELD(24, 27) ; //!< BITDEPTHMINUS8
3339 uint32_t ProfileLevel : __CODEGEN_BITFIELD(28, 31) ; //!< PROFILE_LEVEL
3340 };
3341 uint32_t Value;
3342 } DW3;
3343 union
3344 {
3345 struct
3346 {
3347 uint32_t VerticalScaleFactorForLast : __CODEGEN_BITFIELD( 0, 15) ; //!< Vertical Scale Factor for LAST
3348 uint32_t HorizontalScaleFactorForLast : __CODEGEN_BITFIELD(16, 31) ; //!< Horizontal Scale Factor for LAST
3349 };
3350 uint32_t Value;
3351 } DW4;
3352 union
3353 {
3354 struct
3355 {
3356 uint32_t VerticalScaleFactorForGolden : __CODEGEN_BITFIELD( 0, 15) ; //!< Vertical Scale Factor for GOLDEN
3357 uint32_t HorizontalScaleFactorForGolden : __CODEGEN_BITFIELD(16, 31) ; //!< Horizontal Scale Factor for GOLDEN
3358 };
3359 uint32_t Value;
3360 } DW5;
3361 union
3362 {
3363 struct
3364 {
3365 uint32_t VerticalScaleFactorForAltref : __CODEGEN_BITFIELD( 0, 15) ; //!< Vertical Scale Factor for ALTREF
3366 uint32_t HorizontalScaleFactorForAltref : __CODEGEN_BITFIELD(16, 31) ; //!< Horizontal Scale Factor for ALTREF
3367 };
3368 uint32_t Value;
3369 } DW6;
3370 union
3371 {
3372 struct
3373 {
3374 uint32_t LastFrameWidthInPixelsMinus1 : __CODEGEN_BITFIELD( 0, 13) ; //!< Last Frame Width In Pixels Minus 1
3375 uint32_t Reserved238 : __CODEGEN_BITFIELD(14, 15) ; //!< Reserved
3376 uint32_t LastFrameHieghtInPixelsMinus1 : __CODEGEN_BITFIELD(16, 29) ; //!< Last Frame Hieght In Pixels Minus 1
3377 uint32_t Reserved254 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
3378 };
3379 uint32_t Value;
3380 } DW7;
3381 union
3382 {
3383 struct
3384 {
3385 uint32_t GoldenFrameWidthInPixelsMinus1 : __CODEGEN_BITFIELD( 0, 13) ; //!< Golden Frame Width In Pixels Minus 1
3386 uint32_t Reserved270 : __CODEGEN_BITFIELD(14, 15) ; //!< Reserved
3387 uint32_t GoldenFrameHieghtInPixelsMinus1 : __CODEGEN_BITFIELD(16, 29) ; //!< Golden Frame Hieght In Pixels Minus 1
3388 uint32_t Reserved286 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
3389 };
3390 uint32_t Value;
3391 } DW8;
3392 union
3393 {
3394 struct
3395 {
3396 uint32_t AltrefFrameWidthInPixelsMinus1 : __CODEGEN_BITFIELD( 0, 13) ; //!< Altref Frame Width In Pixels Minus 1
3397 uint32_t Reserved302 : __CODEGEN_BITFIELD(14, 15) ; //!< Reserved
3398 uint32_t AltrefFrameHieghtInPixelsMinus1 : __CODEGEN_BITFIELD(16, 29) ; //!< Altref Frame Hieght In Pixels Minus 1
3399 uint32_t Reserved318 : __CODEGEN_BITFIELD(30, 31) ; //!< Reserved
3400 };
3401 uint32_t Value;
3402 } DW9;
3403 union
3404 {
3405 struct
3406 {
3407 uint32_t UncompressedHeaderLengthInBytes70 : __CODEGEN_BITFIELD( 0, 7) ; //!< Uncompressed Header Length in Bytes [7:0]
3408 uint32_t Reserved328 : __CODEGEN_BITFIELD( 8, 15) ; //!< Reserved
3409 uint32_t FirstPartitionSizeInBytes150 : __CODEGEN_BITFIELD(16, 31) ; //!< First Partition Size in Bytes [15:0]
3410 };
3411 uint32_t Value;
3412 } DW10;
3413 union
3414 {
3415 struct
3416 {
3417 uint32_t Reserved352 : __CODEGEN_BITFIELD( 0, 0) ; //!< Reserved
3418 uint32_t MotionCompScalingEnableBit : __CODEGEN_BITFIELD( 1, 1) ; //!< MOTION_COMP_SCALING_ENABLE_BIT
3419 uint32_t Reserved354 : __CODEGEN_BITFIELD( 2, 31) ; //!< Reserved
3420 };
3421 uint32_t Value;
3422 } DW11;
3423 union
3424 {
3425 struct
3426 {
3427 uint32_t Reserved384 ; //!< Reserved
3428 };
3429 uint32_t Value;
3430 } DW12;
3431 union
3432 {
3433 struct
3434 {
3435 uint32_t CompressedHeaderBinCount : __CODEGEN_BITFIELD( 0, 15) ; //!< Compressed header BIN count
3436 uint32_t BaseQIndexSameAsLumaAc : __CODEGEN_BITFIELD(16, 23) ; //!< Base Q Index (Same as Luma AC)
3437 uint32_t TailInsertionEnable : __CODEGEN_BITFIELD(24, 24) ; //!< Tail Insertion Enable
3438 uint32_t HeaderInsertionEnable : __CODEGEN_BITFIELD(25, 25) ; //!< Header Insertion Enable
3439 uint32_t Reserved442 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
3440 };
3441 uint32_t Value;
3442 } DW13;
3443 union
3444 {
3445 struct
3446 {
3447 uint32_t ChromaacQindexdelta : __CODEGEN_BITFIELD( 0, 4) ; //!< ChromaAC_QindexDelta
3448 uint32_t Reserved453 : __CODEGEN_BITFIELD( 5, 7) ; //!< Reserved
3449 uint32_t ChromadcQindexdelta : __CODEGEN_BITFIELD( 8, 12) ; //!< ChromaDC_QindexDelta
3450 uint32_t Reserved461 : __CODEGEN_BITFIELD(13, 15) ; //!< Reserved
3451 uint32_t LumaDcQIndexDelta : __CODEGEN_BITFIELD(16, 20) ; //!< Luma DC Q Index Delta
3452 uint32_t Reserved469 : __CODEGEN_BITFIELD(21, 31) ; //!< Reserved
3453 };
3454 uint32_t Value;
3455 } DW14;
3456 union
3457 {
3458 struct
3459 {
3460 uint32_t LfRefDelta0 : __CODEGEN_BITFIELD( 0, 6) ; //!< LF_ref_delta0
3461 uint32_t Reserved487 : __CODEGEN_BITFIELD( 7, 7) ; //!< Reserved
3462 uint32_t LfRefDelta1 : __CODEGEN_BITFIELD( 8, 14) ; //!< LF_ref_delta1
3463 uint32_t Reserved495 : __CODEGEN_BITFIELD(15, 15) ; //!< Reserved
3464 uint32_t LfRefDelta2 : __CODEGEN_BITFIELD(16, 22) ; //!< LF_ref_delta2
3465 uint32_t Reserved503 : __CODEGEN_BITFIELD(23, 23) ; //!< Reserved
3466 uint32_t LfRefDelta3 : __CODEGEN_BITFIELD(24, 30) ; //!< LF_ref_delta3
3467 uint32_t Reserved511 : __CODEGEN_BITFIELD(31, 31) ; //!< Reserved
3468 };
3469 uint32_t Value;
3470 } DW15;
3471 union
3472 {
3473 struct
3474 {
3475 uint32_t LfModeDelta0 : __CODEGEN_BITFIELD( 0, 6) ; //!< LF Mode Delta 0
3476 uint32_t Reserved519 : __CODEGEN_BITFIELD( 7, 7) ; //!< Reserved
3477 uint32_t LfModeDelta1 : __CODEGEN_BITFIELD( 8, 14) ; //!< LF Mode Delta 1
3478 uint32_t Reserved527 : __CODEGEN_BITFIELD(15, 31) ; //!< Reserved
3479 };
3480 uint32_t Value;
3481 } DW16;
3482 union
3483 {
3484 struct
3485 {
3486 uint32_t Bitoffsetforlfrefdelta : __CODEGEN_BITFIELD( 0, 15) ; //!< BitOffsetForLFRefDelta
3487 uint32_t Bitoffsetforlfmodedelta : __CODEGEN_BITFIELD(16, 31) ; //!< BitOffsetForLFModeDelta
3488 };
3489 uint32_t Value;
3490 } DW17;
3491 union
3492 {
3493 struct
3494 {
3495 uint32_t Bitoffsetforqindex : __CODEGEN_BITFIELD( 0, 15) ; //!< BitOffsetForQindex
3496 uint32_t Bitoffsetforlflevel : __CODEGEN_BITFIELD(16, 31) ; //!< BitOffsetForLFLevel
3497 };
3498 uint32_t Value;
3499 } DW18;
3500 union
3501 {
3502 struct
3503 {
3504 uint32_t Reserved608 : __CODEGEN_BITFIELD( 0, 15) ; //!< Reserved
3505 uint32_t Nonfirstpassflag : __CODEGEN_BITFIELD(16, 16) ; //!< NONFIRSTPASSFLAG
3506 uint32_t VdencPakOnlyPass : __CODEGEN_BITFIELD(17, 17) ; //!< VDENC PAK_ONLY PASS
3507 uint32_t Reserved626 : __CODEGEN_BITFIELD(18, 24) ; //!< Reserved
3508 uint32_t FrameszoverstatusenFramebitratemaxreportmask : __CODEGEN_BITFIELD(25, 25) ; //!< FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK
3509 uint32_t FrameszunderstatusenFramebitrateminreportmask : __CODEGEN_BITFIELD(26, 26) ; //!< FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK
3510 uint32_t Reserved635 : __CODEGEN_BITFIELD(27, 31) ; //!< Reserved
3511 };
3512 uint32_t Value;
3513 } DW19;
3514 union
3515 {
3516 struct
3517 {
3518 uint32_t Framebitratemax : __CODEGEN_BITFIELD( 0, 13) ; //!< FrameBitRateMax
3519 uint32_t Reserved654 : __CODEGEN_BITFIELD(14, 30) ; //!< Reserved
3520 uint32_t Framebitratemaxunit : __CODEGEN_BITFIELD(31, 31) ; //!< FRAMEBITRATEMAXUNIT
3521 };
3522 uint32_t Value;
3523 } DW20;
3524 union
3525 {
3526 struct
3527 {
3528 uint32_t Framebitratemin : __CODEGEN_BITFIELD( 0, 13) ; //!< FrameBitRateMin
3529 uint32_t Reserved686 : __CODEGEN_BITFIELD(14, 30) ; //!< Reserved
3530 uint32_t Framebitrateminunit : __CODEGEN_BITFIELD(31, 31) ; //!< FRAMEBITRATEMINUNIT
3531 };
3532 uint32_t Value;
3533 } DW21;
3534 union
3535 {
3536 struct
3537 {
3538 uint64_t Framedeltaqindexmax ; //!< FrameDeltaQindexMax
3539 };
3540 uint32_t Value[2];
3541 } DW22_23;
3542 union
3543 {
3544 struct
3545 {
3546 uint32_t Framedeltaqindexmin ; //!< FrameDeltaQindexMin
3547 };
3548 uint32_t Value;
3549 } DW24;
3550 union
3551 {
3552 struct
3553 {
3554 uint64_t Framedeltalfmax ; //!< FrameDeltaLFMax
3555 };
3556 uint32_t Value[2];
3557 } DW25_26;
3558 union
3559 {
3560 struct
3561 {
3562 uint32_t Framedeltalfmin ; //!< FrameDeltaLFMin
3563 };
3564 uint32_t Value;
3565 } DW27;
3566 union
3567 {
3568 struct
3569 {
3570 uint64_t Framedeltaqindexlfmaxrange ; //!< FrameDeltaQindexLFMaxRange
3571 };
3572 uint32_t Value[2];
3573 } DW28_29;
3574 union
3575 {
3576 struct
3577 {
3578 uint32_t Framedeltaqindexlfminrange ; //!< FrameDeltaQindexLFMinRange
3579 };
3580 uint32_t Value;
3581 } DW30;
3582 union
3583 {
3584 struct
3585 {
3586 uint32_t Minframsize : __CODEGEN_BITFIELD( 0, 15) ; //!< MinFramSize
3587 uint32_t Reserved1008 : __CODEGEN_BITFIELD(16, 29) ; //!< Reserved
3588 uint32_t Minframesizeunits : __CODEGEN_BITFIELD(30, 31) ; //!< MINFRAMESIZEUNITS
3589 };
3590 uint32_t Value;
3591 } DW31;
3592 union
3593 {
3594 struct
3595 {
3596 uint32_t Bitoffsetforfirstpartitionsize : __CODEGEN_BITFIELD( 0, 15) ; //!< BitOffsetForFirstPartitionSize
3597 uint32_t Reserved1040 : __CODEGEN_BITFIELD(16, 31) ; //!< Reserved
3598 };
3599 uint32_t Value;
3600 } DW32;
3601 union
3602 {
3603 struct
3604 {
3605 uint32_t Class0SseThreshold0 : __CODEGEN_BITFIELD( 0, 15) ; //!< Class0_SSE_Threshold0
3606 uint32_t Class0SseThreshold1 : __CODEGEN_BITFIELD(16, 31) ; //!< Class0_SSE_Threshold1
3607 };
3608 uint32_t Value;
3609 } DW33;
3610 uint32_t SseThresholdsForClass18[8]; //!< SSE thresholds for Class1-8
3611
3612 //! \name Local enumerations
3613
3614 enum MEDIA_INSTRUCTION_COMMAND
3615 {
3616 MEDIA_INSTRUCTION_COMMAND_HCPVP9PICSTATE = 48, //!< No additional details
3617 };
3618
3619 //! \brief MEDIA_INSTRUCTION_OPCODE
3620 //! \details
3621 //! Codec/Engine Name = HUC = Bh
3622 enum MEDIA_INSTRUCTION_OPCODE
3623 {
3624 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
3625 };
3626
3627 enum PIPELINE_TYPE
3628 {
3629 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
3630 };
3631
3632 enum COMMAND_TYPE
3633 {
3634 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
3635 };
3636
3637 //! \brief FRAME_TYPE
3638 //! \details
3639 //! Specifies the VP9 frame type
3640 enum FRAME_TYPE
3641 {
3642 FRAME_TYPE_KEYFRAME = 0, //!< No additional details
3643 FRAME_TYPE_INTERFRAME = 1, //!< No additional details
3644 };
3645
3646 //! \brief ADAPT_PROBABILITIES_FLAG
3647 //! \details
3648 //! Indicates that the probabilities used to decode this frame should be
3649 //! adapted
3650 enum ADAPT_PROBABILITIES_FLAG
3651 {
3652 ADAPT_PROBABILITIES_FLAG_0DONOTADAPT_ERRORRESILIENTORFRAMEPARALLELMODEARESET = 0, //!< No additional details
3653 ADAPT_PROBABILITIES_FLAG_1ADAPT_NOTERRORRESILIENTANDNOTFRAMEPARALLELMODE = 1, //!< No additional details
3654 };
3655
3656 //! \brief ALLOW_HI_PRECISION_MV
3657 //! \details
3658 //! Indicate high precision mode for Motion Vector prediction
3659 enum ALLOW_HI_PRECISION_MV
3660 {
3661 ALLOW_HI_PRECISION_MV_NORMALMODE = 0, //!< No additional details
3662 ALLOW_HI_PRECISION_MV_HIGHPRECISIONMODE = 1, //!< No additional details
3663 };
3664
3665 //! \brief MCOMP_FILTER_TYPE
3666 //! \details
3667 //! Indicate Motion Compensation Filter type.
3668 enum MCOMP_FILTER_TYPE
3669 {
3670 MCOMP_FILTER_TYPE_EIGHT_TAP = 0, //!< No additional details
3671 MCOMP_FILTER_TYPE_EIGHT_TAP_SMOOTH = 1, //!< No additional details
3672 MCOMP_FILTER_TYPE_EIGHT_TAP_SHARP = 2, //!< No additional details
3673 MCOMP_FILTER_TYPE_BILINEAR = 3, //!< No additional details
3674 MCOMP_FILTER_TYPE_SWITCHABLE = 4, //!< No additional details
3675 };
3676
3677 //! \brief HYBRID_PREDICTION_MODE
3678 //! \details
3679 //! Indicates if comp_pred_mode is hybrid
3680 enum HYBRID_PREDICTION_MODE
3681 {
3682 HYBRID_PREDICTION_MODE_COMPPREDICTIONMODEHYBRID_ENCODERDOESNOTPACKCOMPPREDMODEINTERPREDCOMPINPAKOBJINTOBITSTREAM = 0, //!< No additional details
3683 HYBRID_PREDICTION_MODE_COMPPREDICTIONMODEHYBRID_ENCODERPACKSCOMPPREDMODEINTOBITSTREAMTHISHELPSREDUCEBITSTREAMSIZEFURTHER = 1, //!< No additional details
3684 };
3685
3686 //! \brief SELECTABLE_TX_MODE
3687 //! \details
3688 //! Indicates if tx_mode is selectable
3689 enum SELECTABLE_TX_MODE
3690 {
3691 SELECTABLE_TX_MODE_ENCODERDOESNOTPACKTUSIZEINTOBITSTREAMTHISHELPSREDUCEBITSTREAMSIZEFURTHER = 0, //!< No additional details
3692 SELECTABLE_TX_MODE_ENCODERPACKSTUSIZEINTOBITSTREAM = 1, //!< No additional details
3693 };
3694
3695 //! \brief LAST_FRAME_TYPE
3696 //! \details
3697 //! <p>It indicates the frame type of previous frame (Key or Non-Key
3698 //! Frame)</p>
3699 enum LAST_FRAME_TYPE
3700 {
3701 LAST_FRAME_TYPE_KEYFRAME = 0, //!< No additional details
3702 LAST_FRAME_TYPE_NONKEYFRAME = 1, //!< No additional details
3703 };
3704
3705 //! \brief REFRESH_FRAME_CONTEXT
3706 //! \details
3707 //! <p>Indicates if Frame Context should be refresh.  This bit should come
3708 //! from Uncompressed header</p>
3709 enum REFRESH_FRAME_CONTEXT
3710 {
3711 REFRESH_FRAME_CONTEXT_DISABLE = 0, //!< No additional details
3712 REFRESH_FRAME_CONTEXT_ENABLE = 1, //!< No additional details
3713 };
3714
3715 //! \brief ERROR_RESILIENT_MODE
3716 //! \details
3717 //! <p>Indicates if error resilient mode is enabled. This bit should come
3718 //! from Uncompressed header.When error resilient is 1, Frame Parallel
3719 //! Decoding Mode will be 1, and Refresh Frame Context will be 0.When error
3720 //! resilient is 0, Frame Parallel Decoding Mode and Refresh Frame Context
3721 //! read from bit stream.Together with Frame Parallel Decoding mode, they
3722 //! decide the value of AdaptProbabilityFlag.</p>
3723 enum ERROR_RESILIENT_MODE
3724 {
3725 ERROR_RESILIENT_MODE_DISABLE = 0, //!< No additional details
3726 ERROR_RESILIENT_MODE_ENABLE = 1, //!< No additional details
3727 };
3728
3729 //! \brief FRAME_PARALLEL_DECODING_MODE
3730 //! \details
3731 //! <p>Indicates if parallel decoding mode is enabled.  This bit should come
3732 //! from Uncompressed header.  Together with Error Resilient mode, they
3733 //! decide the value of AdaptProbabilityFlag.</p>
3734 enum FRAME_PARALLEL_DECODING_MODE
3735 {
3736 FRAME_PARALLEL_DECODING_MODE_DISABLE = 0, //!< No additional details
3737 FRAME_PARALLEL_DECODING_MODE_ENABLE = 1, //!< No additional details
3738 };
3739
3740 //! \brief SEGMENTATION_ENABLED
3741 //! \details
3742 //! Indicate if segementation is enabled or not
3743 enum SEGMENTATION_ENABLED
3744 {
3745 SEGMENTATION_ENABLED_ALLBLOCKSAREIMPLIEDTOBELONGTOSEGMENT0 = 0, //!< No additional details
3746 SEGMENTATION_ENABLED_SEGIDDETERMINATIONDEPENDSONSEGMENTATIONUPDATEMAPSETTING = 1, //!< No additional details
3747 };
3748
3749 //! \brief SEGMENTATION_UPDATE_MAP
3750 //! \details
3751 //! Indicates how hardware determines segmentation ID
3752 enum SEGMENTATION_UPDATE_MAP
3753 {
3754 SEGMENTATION_UPDATE_MAP_UNNAMED0 = 0, //!< Intra block: segment ID is zero Inter block: get segment ID from previous frame (streamIN)
3755 SEGMENTATION_UPDATE_MAP_UNNAMED1 = 1, //!< Intra block: decode segment ID from bitstream. Inter block: determins from segmentation_temporal_update setting
3756 };
3757
3758 //! \brief SEGMENTATION_TEMPORAL_UPDATE
3759 //! \details
3760 //! Indicates whether segID is decoding from bitstream or predicted from
3761 //! previous frame.
3762 enum SEGMENTATION_TEMPORAL_UPDATE
3763 {
3764 SEGMENTATION_TEMPORAL_UPDATE_DECODESEGIDFROMBITSTREAM = 0, //!< No additional details
3765 SEGMENTATION_TEMPORAL_UPDATE_GETSEGIDEITHERFROMBITSTREAMORFROMPREVIOUSFRAME = 1, //!< No additional details
3766 };
3767
3768 //! \brief LOSSLESS_MODE
3769 //! \details
3770 //! This bitSet to indicate lossless coding mode.
3771 enum LOSSLESS_MODE
3772 {
3773 LOSSLESS_MODE_NORMALMODE = 0, //!< No additional details
3774 LOSSLESS_MODE_LOLESSMODE = 1, //!< No additional details
3775 };
3776
3777 //! \brief SEGMENT_ID_STREAMOUT_ENABLE
3778 //! \details
3779 //! Indicates SegmentID of current frame needs to be streamOut for next
3780 //! frame
3781 enum SEGMENT_ID_STREAMOUT_ENABLE
3782 {
3783 SEGMENT_ID_STREAMOUT_ENABLE_DISABLE = 0, //!< No additional details
3784 SEGMENT_ID_STREAMOUT_ENABLE_ENABLE = 1, //!< No additional details
3785 };
3786
3787 //! \brief SEGMENT_ID_STREAMIN_ENABLE
3788 //! \details
3789 //! Indicates SegmentID from previous frame needs to be streamIn for Segment
3790 //! ID prediction
3791 enum SEGMENT_ID_STREAMIN_ENABLE
3792 {
3793 SEGMENT_ID_STREAMIN_ENABLE_DISABLE = 0, //!< No additional details
3794 SEGMENT_ID_STREAMIN_ENABLE_ENABLE = 1, //!< No additional details
3795 };
3796
3797 //! \brief LOG2_TILE_COLUMN
3798 //! \details
3799 //! This indicates the number of tile rows (log2).
3800 enum LOG2_TILE_COLUMN
3801 {
3802 LOG2_TILE_COLUMN_1TILECOLUMN = 0, //!< No additional details
3803 LOG2_TILE_COLUMN_2TILECOLUMN = 1, //!< No additional details
3804 LOG2_TILE_COLUMN_4TILECOLUMN = 2, //!< No additional details
3805 LOG2_TILE_COLUMN_8TILECOLUMN = 3, //!< No additional details
3806 LOG2_TILE_COLUMN_16TILECOLUMN = 4, //!< No additional details
3807 LOG2_TILE_COLUMN_32TILECOLUMN = 5, //!< No additional details
3808 LOG2_TILE_COLUMN_64TILECOLUMN = 6, //!< No additional details
3809 };
3810
3811 //! \brief LOG2_TILE_ROW
3812 //! \details
3813 //! This indicates the number of tile rows (log2).
3814 enum LOG2_TILE_ROW
3815 {
3816 LOG2_TILE_ROW_1TILEROW = 0, //!< No additional details
3817 LOG2_TILE_ROW_2TILEROW = 1, //!< No additional details
3818 LOG2_TILE_ROW_4TILEROW = 2, //!< No additional details
3819 };
3820
3821 //! \brief CHROMA_SAMPLING_FORMAT
3822 //! \details
3823 //! This indicates the chroma sampling format of the bitstream
3824 enum CHROMA_SAMPLING_FORMAT
3825 {
3826 CHROMA_SAMPLING_FORMAT_FORMAT420 = 0, //!< No additional details
3827 CHROMA_SAMPLING_FORMAT_FORMAT444 = 2, //!< No additional details
3828 };
3829
3830 //! \brief BITDEPTHMINUS8
3831 //! \details
3832 //! This indicates the bitdepth (minus 8) of the pixels
3833 enum BITDEPTHMINUS8
3834 {
3835 BITDEPTHMINUS8_BITDEPTH8 = 0, //!< No additional details
3836 BITDEPTHMINUS8_BITDEPTH10 = 2, //!< No additional details
3837 BITDEPTHMINUS8_BITDEPTH12 = 4, //!< No additional details
3838 };
3839
3840 //! \brief PROFILE_LEVEL
3841 //! \details
3842 //! This indicates VP9 Profile level from bitstream
3843 enum PROFILE_LEVEL
3844 {
3845 PROFILE_LEVEL_PROFILE0 = 0, //!< Profile 0 only supports 8 bit 420 only
3846 PROFILE_LEVEL_PROFILE1 = 1, //!< Profile 1 only supports 8 bit 444 only
3847 PROFILE_LEVEL_PROFILE2 = 2, //!< Profile 2 only supports 10 bits 420 only
3848 PROFILE_LEVEL_PROFILE3 = 3, //!< Profile 3 only supports 10-bit 444 only
3849 };
3850
3851 //! \brief MOTION_COMP_SCALING_ENABLE_BIT
3852 //! \details
3853 //! This bit must be set to "1"
3854 enum MOTION_COMP_SCALING_ENABLE_BIT
3855 {
3856 MOTION_COMP_SCALING_ENABLE_BIT_ENABLE = 1, //!< This enables Motion Comp Scaling
3857 };
3858
3859 //! \brief NONFIRSTPASSFLAG
3860 //! \details
3861 //! This signals the current pass is not the first pass. It will imply
3862 //! designate HW behavior.
3863 enum NONFIRSTPASSFLAG
3864 {
3865 NONFIRSTPASSFLAG_DISABLE = 0, //!< If it is initial-Pass, this bit is set to 0.
3866 NONFIRSTPASSFLAG_ENABLE = 1, //!< For subsequent passes, this bit is set to 1.
3867 };
3868
3869 //! \brief FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK
3870 //! \details
3871 //! This is a mask bit controlling if the condition of frame level bit count
3872 //! exceeds FrameBitRateMax.
3873 enum FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK
3874 {
3875 FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK_DISABLE = 0, //!< Do not update bit 1 of HCP_VP9_IMAGE_STATUS control register.
3876 FRAMESZOVERSTATUSEN_FRAMEBITRATEMAXREPORTMASK_ENABLE = 1, //!< Set bit 1 of HCP_VP9_IMAGE_STATUS control register if the total frame level bit counter is greater than or equal to Frame Bit Rate Maximum limit.
3877 };
3878
3879 //! \brief FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK
3880 //! \details
3881 //! This is a mask bit controlling if the condition of frame level bit count
3882 //! is less than FrameBitRateMin.
3883 enum FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK
3884 {
3885 FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK_DISABLE = 0, //!< Do not update bit 2 (Frame Bit Count Violate -- under run) of HCP_VP9_IMAGE_STATUS control register.
3886 FRAMESZUNDERSTATUSEN_FRAMEBITRATEMINREPORTMASK_ENABLE = 1, //!< Set bit 2 (Frame Bit Count Violate -- under run) of HCP_VP9_IMAGE_STATUS control register if the total frame level bit counter is less than or equal to Frame Bit Rate Minimum limit.
3887 };
3888
3889 //! \brief FRAMEBITRATEMAXUNIT
3890 //! \details
3891 //! This field is the Frame Bitrate Maximum Limit Units.
3892 enum FRAMEBITRATEMAXUNIT
3893 {
3894 FRAMEBITRATEMAXUNIT_BYTE = 0, //!< 32byte unit
3895 FRAMEBITRATEMAXUNIT_KILOBYTE = 1, //!< 4Kbyte unit
3896 };
3897
3898 //! \brief FRAMEBITRATEMINUNIT
3899 //! \details
3900 //! This field is the Frame Bitrate Maximum Limit Units.
3901 enum FRAMEBITRATEMINUNIT
3902 {
3903 FRAMEBITRATEMINUNIT_BYTE = 0, //!< 32byte unit
3904 FRAMEBITRATEMINUNIT_KILOBYTE = 1, //!< 4Kbyte unit
3905 };
3906
3907 //! \brief MINFRAMESIZEUNITS
3908 //! \details
3909 //! This field is the Minimum Frame Size Units
3910 enum MINFRAMESIZEUNITS
3911 {
3912 MINFRAMESIZEUNITS_4KB = 0, //!< Minimum Frame Size is in 4Kbytes.
3913 MINFRAMESIZEUNITS_16KB = 1, //!< Minimum Frame Size is in 4Kbytes.
3914 MINFRAMESIZEUNITS_COMAPTIBILITYMODE = 2, //!< No additional details
3915 MINFRAMESIZEUNITS_6BYTES = 3, //!< No additional details
3916 };
3917
3918 //! \name Initializations
3919
3920 //! \brief Explicit member initialization function
3921 HCP_VP9_PIC_STATE_CMD();
3922
3923 static const size_t dwSize = 42;
3924 static const size_t byteSize = 168;
3925 };
3926
3927 //!
3928 //! \brief HEVC_VP9_RDOQ_LAMBDA_FIELDS
3929 //! \details
3930 //!
3931 //!
3932 struct HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD
3933 {
3934 union
3935 {
3936 struct
3937 {
3938 uint32_t Lambdavalue0 : __CODEGEN_BITFIELD( 0, 15) ; //!< LambdaValue0
3939 uint32_t Lambdavalue1 : __CODEGEN_BITFIELD(16, 31) ; //!< LambdaValue1
3940 };
3941 uint32_t Value;
3942 } DW0;
3943
3944 //! \name Local enumerations
3945
3946 //! \name Initializations
3947
3948 //! \brief Explicit member initialization function
3949 HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD();
3950
3951 static const size_t dwSize = 1;
3952 static const size_t byteSize = 4;
3953 };
3954
3955 //!
3956 //! \brief HEVC_VP9_RDOQ_STATE
3957 //! \details
3958 //!
3959 //!
3960 struct HEVC_VP9_RDOQ_STATE_CMD
3961 {
3962 union
3963 {
3964 struct
3965 {
3966 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
3967 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
3968 uint32_t Subopb : __CODEGEN_BITFIELD(16, 20) ; //!< SUBOPB
3969 uint32_t Subopa : __CODEGEN_BITFIELD(21, 22) ; //!< SUBOPA
3970 uint32_t Opcode : __CODEGEN_BITFIELD(23, 26) ; //!< OPCODE
3971 uint32_t Pipeline : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE
3972 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
3973 };
3974 uint32_t Value;
3975 } DW0;
3976 union
3977 {
3978 struct
3979 {
3980 uint32_t Reserved32 : __CODEGEN_BITFIELD( 0, 29) ; //!< Reserved
3981 uint32_t DisableHtqPerformanceFix1 : __CODEGEN_BITFIELD(30, 30) ; //!< Disable HTQ performance fix1
3982 uint32_t DisableHtqPerformanceFix0 : __CODEGEN_BITFIELD(31, 31) ; //!< Disable HTQ performance fix0
3983 };
3984 uint32_t Value;
3985 } DW1;
3986 HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD Intralumalambda[32]; //!< DW2..33, IntraLumaLambda
3987 HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD Intrachromalambda[32]; //!< DW34..65, IntraChromaLambda
3988 HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD Interlumalambda[32]; //!< DW66..97, InterLumaLambda
3989 HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD Interchromalambda[32]; //!< DW98..129, InterChromaLambda
3990
3991 HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD Intralumalambda12bit[6]; //!< DW130..135, IntraLumaLambda
3992 HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD Intrachromalambda12bit[6]; //!< DW136..141, IntraChromaLambda
3993 HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD Interlumalambda12bit[6]; //!< DW142..147, InterLumaLambda
3994 HEVC_VP9_RDOQ_LAMBDA_FIELDS_CMD Interchromalambda12bit[6]; //!< DW148..153, InterChromaLambda
3995
3996 //! \name Local enumerations
3997
3998 enum SUBOPB
3999 {
4000 SUBOPB_UNNAMED8 = 8, //!< No additional details
4001 };
4002
4003 enum SUBOPA
4004 {
4005 SUBOPA_UNNAMED0 = 0, //!< No additional details
4006 };
4007
4008 //! \brief OPCODE
4009 //! \details
4010 //! Codec/Engine Name = HCP = 7h
4011 enum OPCODE
4012 {
4013 OPCODE_UNNAMED7 = 7, //!< No additional details
4014 };
4015
4016 //! \brief PIPELINE
4017 //! \details
4018 //! MFX_COMMON
4019 enum PIPELINE
4020 {
4021 PIPELINE_UNNAMED2 = 2, //!< No additional details
4022 };
4023
4024 //! \brief COMMAND_TYPE
4025 //! \details
4026 //! PARALLEL_VIDEO_PIPE
4027 enum COMMAND_TYPE
4028 {
4029 COMMAND_TYPE_UNNAMED3 = 3, //!< No additional details
4030 };
4031
4032 //! \name Initializations
4033
4034 //! \brief Explicit member initialization function
4035 HEVC_VP9_RDOQ_STATE_CMD();
4036
4037 static const size_t dwSize = 154;
4038 static const size_t byteSize = 616;
4039 };
4040
4041 //!
4042 //! \brief HCP_TILE_CODING
4043 //! \details
4044 //! This command is used for both HEVC and VP9 codecs
4045 //!
4046 struct HCP_TILE_CODING_CMD
4047 {
4048 union
4049 {
4050 struct
4051 {
4052 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
4053 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
4054 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
4055 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
4056 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
4057 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
4058 };
4059 uint32_t Value;
4060 } DW0;
4061 union
4062 {
4063 struct
4064 {
4065 uint32_t NumberOfActiveBePipes : __CODEGEN_BITFIELD( 0, 7) ; //!< Number of Active BE Pipes
4066 uint32_t TileRowStoreSelect : __CODEGEN_BITFIELD( 8, 8) ; //!< Tile Row store Select
4067 uint32_t TileColumnStoreSelect : __CODEGEN_BITFIELD( 9, 9) ; //!< Tile Column store Select
4068 uint32_t Reserved42 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved MBZ
4069 uint32_t NumOfTileColumnsInAFrame : __CODEGEN_BITFIELD(16, 31) ; //!< Num of Tile columns in a Frame
4070 };
4071 uint32_t Value;
4072 } DW1;
4073 union
4074 {
4075 struct
4076 {
4077 uint32_t TileColumnPosition : __CODEGEN_BITFIELD( 0, 9) ; //!< Tile Column Position
4078 uint32_t NonFirstPassTile : __CODEGEN_BITFIELD(10, 10) ; //!< Non First Pass Tile
4079 uint32_t Reserved75 : __CODEGEN_BITFIELD(11, 15) ; //!< Reserved
4080 uint32_t TileRowPosition : __CODEGEN_BITFIELD(16, 25) ; //!< Tile Row Position
4081 uint32_t Reserved90 : __CODEGEN_BITFIELD(26, 29) ; //!< Reserved
4082 uint32_t Islasttileofrow : __CODEGEN_BITFIELD(30, 30) ; //!< IsLastTileOfRow
4083 uint32_t Islasttileofcolumn : __CODEGEN_BITFIELD(31, 31) ; //!< IsLastTileOfColumn
4084 };
4085 uint32_t Value;
4086 } DW2;
4087 union
4088 {
4089 struct
4090 {
4091 uint32_t Tileheightinmincbminus1 : __CODEGEN_BITFIELD( 0, 10) ; //!< TileHeightInMinCbMinus1
4092 uint32_t Reserved107 : __CODEGEN_BITFIELD(11, 15) ; //!< Reserved
4093 uint32_t Tilewidthinmincbminus1 : __CODEGEN_BITFIELD(16, 26) ; //!< TileWidthInMinCbMinus1
4094 uint32_t Reserved123 : __CODEGEN_BITFIELD(27, 30) ; //!< Reserved
4095 uint32_t LastpassoftileValidationonly : __CODEGEN_BITFIELD(31, 31) ; //!< LastPassOfTile (ValidationOnly)
4096 };
4097 uint32_t Value;
4098 } DW3;
4099 union
4100 {
4101 struct
4102 {
4103 uint32_t BitstreamByteOffsetEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< Bitstream Byte Offset Enable
4104 uint32_t Reserved129 : __CODEGEN_BITFIELD( 1, 5) ; //!< Reserved
4105 uint32_t BitstreamByteOffset : __CODEGEN_BITFIELD( 6, 31) ; //!< Bitstream Byte Offset
4106 };
4107 uint32_t Value;
4108 } DW4;
4109 union
4110 {
4111 struct
4112 {
4113 uint32_t Reserved160 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
4114 uint32_t PakFrameStatisticsOffset : __CODEGEN_BITFIELD( 6, 31) ; //!< PAK Frame Statistics Offset
4115 };
4116 uint32_t Value;
4117 } DW5;
4118 union
4119 {
4120 struct
4121 {
4122 uint32_t Reserved192 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
4123 uint32_t CuLevelStreamoutOffset : __CODEGEN_BITFIELD( 6, 31) ; //!< CU Level Streamout Offset
4124 };
4125 uint32_t Value;
4126 } DW6;
4127 union
4128 {
4129 struct
4130 {
4131 uint32_t Reserved224 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
4132 uint32_t SliceSizeStreamoutOffset : __CODEGEN_BITFIELD( 6, 31) ; //!< Slice Size Streamout Offset
4133 };
4134 uint32_t Value;
4135 } DW7;
4136 union
4137 {
4138 struct
4139 {
4140 uint32_t Reserved256 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
4141 uint32_t CuRecordOffset : __CODEGEN_BITFIELD( 6, 31) ; //!< CU record offset
4142 };
4143 uint32_t Value;
4144 } DW8;
4145 union
4146 {
4147 struct
4148 {
4149 uint32_t Reserved288 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
4150 uint32_t SseRowstoreOffset : __CODEGEN_BITFIELD( 6, 31) ; //!< SSE RowStore offset
4151 };
4152 uint32_t Value;
4153 } DW9;
4154 union
4155 {
4156 struct
4157 {
4158 uint32_t Reserved320 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
4159 uint32_t SaoRowstoreOffset : __CODEGEN_BITFIELD( 6, 31) ; //!< SAO RowStore offset
4160 };
4161 uint32_t Value;
4162 } DW10;
4163 union
4164 {
4165 struct
4166 {
4167 uint32_t Reserved352 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
4168 uint32_t TileSizeStreamoutOffset : __CODEGEN_BITFIELD( 6, 31) ; //!< Tile Size StreamOut Offset
4169 };
4170 uint32_t Value;
4171 } DW11;
4172 union
4173 {
4174 struct
4175 {
4176 uint32_t Reserved384 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
4177 uint32_t Vp9ProbabilityCounterStreamoutOffset : __CODEGEN_BITFIELD( 6, 31) ; //!< VP9 Probability Counter Streamout Offset
4178 };
4179 uint32_t Value;
4180 } DW12;
4181 SPLITBASEADDRESS64BYTEALIGNED_CMD HcpScalabilitySynchronizeBufferBaseAddress; //!< DW13..14, HCP Scalability Synchronize Buffer - Base Address
4182 MEMORYADDRESSATTRIBUTES_CMD HcpScalabilitySynchronizeBufferAttributes; //!< DW15, HCP Scalability Synchronize Buffer - Attributes
4183 union
4184 {
4185 struct
4186 {
4187 uint32_t Reserved512 ; //!< Reserved
4188 };
4189 uint32_t Value;
4190 } DW16;
4191 union
4192 {
4193 struct
4194 {
4195 uint32_t Reserved544 : __CODEGEN_BITFIELD( 0, 7) ; //!< Reserved
4196 uint32_t TileNumber : __CODEGEN_BITFIELD( 8, 13) ; //!< Tile number
4197 uint32_t FrameNumber : __CODEGEN_BITFIELD(14, 17) ; //!< Frame Number
4198 uint32_t Reserved562 : __CODEGEN_BITFIELD(18, 31) ; //!< Reserved
4199 };
4200 uint32_t Value;
4201 } DW17;
4202 union
4203 {
4204 struct
4205 {
4206 uint32_t TilemetadataDw1 ; //!< TileMetaData_DW1
4207 };
4208 uint32_t Value;
4209 } DW18;
4210 union
4211 {
4212 struct
4213 {
4214 uint32_t TilemetadataDw2 ; //!< TileMetaData_DW2
4215 };
4216 uint32_t Value;
4217 } DW19;
4218
4219 //! \name Local enumerations
4220
4221 enum MEDIA_INSTRUCTION_COMMAND
4222 {
4223 MEDIA_INSTRUCTION_COMMAND_HCPTILECODING = 21, //!< No additional details
4224 };
4225
4226 enum MEDIA_INSTRUCTION_OPCODE
4227 {
4228 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
4229 };
4230
4231 enum PIPELINE_TYPE
4232 {
4233 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
4234 };
4235
4236 enum COMMAND_TYPE
4237 {
4238 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
4239 };
4240
4241 //! \name Initializations
4242
4243 //! \brief Explicit member initialization function
4244 HCP_TILE_CODING_CMD();
4245
4246 static const size_t dwSize = 20;
4247 static const size_t byteSize = 80;
4248 };
4249
4250 //!
4251 //! \brief VDENC_CONTROL_STATE
4252 //! \details
4253 //!
4254 //!
4255 struct VDENC_CONTROL_STATE_CMD
4256 {
4257 union
4258 {
4259 struct
4260 {
4261 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
4262 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
4263 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
4264 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
4265 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
4266 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
4267 };
4268 uint32_t Value;
4269 } DW0;
4270 union
4271 {
4272 struct
4273 {
4274 uint32_t Reserved32 : __CODEGEN_BITFIELD( 0, 0) ; //!< Reserved
4275 uint32_t VdencInitialization : __CODEGEN_BITFIELD( 1, 1) ; //!< VDenc Initialization
4276 uint32_t Reserved34 : __CODEGEN_BITFIELD( 2, 31) ; //!< Reserved
4277 };
4278 uint32_t Value;
4279 } DW1;
4280
4281 //! \name Local enumerations
4282
4283 enum MEDIA_INSTRUCTION_COMMAND
4284 {
4285 MEDIA_INSTRUCTION_COMMAND_VDCONTROLSTATEFORVDNEC = 11, //!< No additional details
4286 };
4287
4288 //! \brief MEDIA_INSTRUCTION_OPCODE
4289 //! \details
4290 //! <p></p>
4291 //! <p>Codec/Engine Name = VDNEC = 1h;</p>
4292 enum MEDIA_INSTRUCTION_OPCODE
4293 {
4294 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAMEFORVDENC = 1, //!< No additional details
4295 };
4296
4297 enum PIPELINE_TYPE
4298 {
4299 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
4300 };
4301
4302 enum COMMAND_TYPE
4303 {
4304 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
4305 };
4306
4307 //! \name Initializations
4308
4309 //! \brief Explicit member initialization function
4310 VDENC_CONTROL_STATE_CMD();
4311
4312 static const size_t dwSize = 2;
4313 static const size_t byteSize = 8;
4314 };
4315
4316 //!
4317 //! \brief HCP_PALETTE_INITIALIZER_STATE
4318 //! \details
4319 //! The HCP is selected with theMedia Instruction Opcode "7h"for all HCP
4320 //! Commands. Each HCP command has assigned a media instruction command as
4321 //! defined in DWord 0, BitField 22:16.
4322 //!
4323 //! The HCP_PALETTE_INITIALIZER_STATE command loads in the SCC Palette
4324 //! Initilizer Table to the HW.
4325 //! Decoder only command.
4326 //!
4327 //! Dword#2 - 193form a fixed size table for the Palette Initializer Table.
4328 //! Max PaletteInitializer Table is 128entries. Each entry has 3 components
4329 //! (Y, Cb and Cr) for a color.
4330 //! Each component is 16-bits, even though currently only support up to
4331 //! 10-bit SCC extension. The upper (higher bits) 6 bits are set to zero -
4332 //! that is Least Significant Bit alignment.
4333 //! Each entry of thePalette Initializer Table will consume 1.5 Dwords.
4334 //! Every two entries will consume 2 Dwords. Hence, total requires 96
4335 //! Dwords.
4336 //! Dword#2 Bit 31 Cb#0 15:0 Luma#0 15:0 Bit 0
4337 //! Dword#3 Bit 31 Luma#115:0 Cr#015:0 Bit 0
4338 //! Dword#4 Bit 31 Cr#115:0 Cb#115:0 Bit 0
4339 //! Dword#2 correspondsto the entry# 0 of thePalette Initializer Table.
4340 //! Dword#193correspondsto the entry# 127of thePalette Initializer Table.
4341 //!
4342 //! Palette Initialization needs to happen at the beginning of each
4343 //! frame/tiles or start of each independent slice. Palette initialization
4344 //! is not needed at the start of dependent slices (except the start of a
4345 //! new tiles since each tile needs to re-initialize the palette list) and
4346 //! the palette list is inherited from previous slice.
4347 //! The following is the programming restriction:
4348 //! (1) Palette Initialization commandmust be programmedin palette mode at
4349 //! the beginning of each frame and tiles (regardless if the slice
4350 //! isindependent/dependent)and also the start of each independent slices.
4351 //! (2) Palette Initialization command must not be programmed for dependent
4352 //! slices except the dependent slices are start of tiles (first slice in
4353 //! frame must be independent slice).
4354 //!
4355 //!
4356 struct HCP_PALETTE_INITIALIZER_STATE_CMD
4357 {
4358 union
4359 {
4360 struct
4361 {
4362 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 11) ; //!< DWORD_LENGTH
4363 uint32_t Reserved12 : __CODEGEN_BITFIELD(12, 15) ; //!< Reserved
4364 uint32_t MediaInstructionCommand : __CODEGEN_BITFIELD(16, 22) ; //!< MEDIA_INSTRUCTION_COMMAND
4365 uint32_t MediaInstructionOpcode : __CODEGEN_BITFIELD(23, 26) ; //!< MEDIA_INSTRUCTION_OPCODE
4366 uint32_t PipelineType : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE_TYPE
4367 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
4368 };
4369 uint32_t Value;
4370 } DW0;
4371 union
4372 {
4373 struct
4374 {
4375 uint32_t ActivePaletteInitializerTableEntries : __CODEGEN_BITFIELD( 0, 7) ; //!< Active Palette Initializer Table Entries
4376 uint32_t Reserved40 : __CODEGEN_BITFIELD( 8, 31) ; //!< Reserved
4377 };
4378 uint32_t Value;
4379 } DW1;
4380 uint32_t First64ColorEntries[96]; //!< First 64 Color Entries
4381 uint32_t Second64ColorEntries[96]; //!< Second 64 Color Entries
4382
4383 //! \name Local enumerations
4384
4385 enum MEDIA_INSTRUCTION_COMMAND
4386 {
4387 MEDIA_INSTRUCTION_COMMAND_HCPPALETTEINITIALIZERSTATE = 9, //!< No additional details
4388 };
4389
4390 //! \brief MEDIA_INSTRUCTION_OPCODE
4391 //! \details
4392 //! Codec/Engine Name = HCP = 7h
4393 enum MEDIA_INSTRUCTION_OPCODE
4394 {
4395 MEDIA_INSTRUCTION_OPCODE_CODECENGINENAME = 7, //!< No additional details
4396 };
4397
4398 enum PIPELINE_TYPE
4399 {
4400 PIPELINE_TYPE_UNNAMED2 = 2, //!< No additional details
4401 };
4402
4403 enum COMMAND_TYPE
4404 {
4405 COMMAND_TYPE_PARALLELVIDEOPIPE = 3, //!< No additional details
4406 };
4407
4408 //! \name Initializations
4409
4410 //! \brief Explicit member initialization function
4411 HCP_PALETTE_INITIALIZER_STATE_CMD();
4412
4413 static const size_t dwSize = 194;
4414 static const size_t byteSize = 776;
4415 };
4416
4417 };
4418
4419 #pragma pack()
4420
4421 #endif // __MHW_VDBOX_HCP_HWCMD_G12_X_H__