Debian Codegraph @

media_driver/agnostic/gen11/hw/vdbox/mhw_vdbox_hcp_hwcmd_g11_X.h

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