pub mod gen10 {
use crate::*;
#[derive(Clone, Copy)]
pub enum _3dColorBufferBlendFactor {
_3dColorBufferBlendFactorOne,
_3dColorBufferBlendFactorSrcColor,
_3dColorBufferBlendFactorSrcAlpha,
_3dColorBufferBlendFactorDstAlpha,
_3dColorBufferBlendFactorDstColor,
_3dColorBufferBlendFactorSrcAlphaSaturate,
_3dColorBufferBlendFactorConstColor,
_3dColorBufferBlendFactorConstAlpha,
_3dColorBufferBlendFactorSrc1Color,
_3dColorBufferBlendFactorSrc1Alpha,
_3dColorBufferBlendFactorZero,
_3dColorBufferBlendFactorInvSrcColor,
_3dColorBufferBlendFactorInvSrcAlpha,
_3dColorBufferBlendFactorInvDstAlpha,
_3dColorBufferBlendFactorInvDstColor,
_3dColorBufferBlendFactorInvConstColor,
_3dColorBufferBlendFactorInvConstAlpha,
_3dColorBufferBlendFactorInvSrc1Color,
_3dColorBufferBlendFactorInvSrc1Alpha,
Unknown(u32),
}
impl Into<u32> for _3dColorBufferBlendFactor {
fn into(self) -> u32 {
type E = _3dColorBufferBlendFactor;
match self {
E::_3dColorBufferBlendFactorOne => 1,
E::_3dColorBufferBlendFactorSrcColor => 2,
E::_3dColorBufferBlendFactorSrcAlpha => 3,
E::_3dColorBufferBlendFactorDstAlpha => 4,
E::_3dColorBufferBlendFactorDstColor => 5,
E::_3dColorBufferBlendFactorSrcAlphaSaturate => 6,
E::_3dColorBufferBlendFactorConstColor => 7,
E::_3dColorBufferBlendFactorConstAlpha => 8,
E::_3dColorBufferBlendFactorSrc1Color => 9,
E::_3dColorBufferBlendFactorSrc1Alpha => 10,
E::_3dColorBufferBlendFactorZero => 17,
E::_3dColorBufferBlendFactorInvSrcColor => 18,
E::_3dColorBufferBlendFactorInvSrcAlpha => 19,
E::_3dColorBufferBlendFactorInvDstAlpha => 20,
E::_3dColorBufferBlendFactorInvDstColor => 21,
E::_3dColorBufferBlendFactorInvConstColor => 23,
E::_3dColorBufferBlendFactorInvConstAlpha => 24,
E::_3dColorBufferBlendFactorInvSrc1Color => 25,
E::_3dColorBufferBlendFactorInvSrc1Alpha => 26,
E::Unknown(val) => val,
}
}
}
impl From<u32> for _3dColorBufferBlendFactor {
fn from(val: u32) -> Self {
match val {
1 => Self::_3dColorBufferBlendFactorOne,
2 => Self::_3dColorBufferBlendFactorSrcColor,
3 => Self::_3dColorBufferBlendFactorSrcAlpha,
4 => Self::_3dColorBufferBlendFactorDstAlpha,
5 => Self::_3dColorBufferBlendFactorDstColor,
6 => Self::_3dColorBufferBlendFactorSrcAlphaSaturate,
7 => Self::_3dColorBufferBlendFactorConstColor,
8 => Self::_3dColorBufferBlendFactorConstAlpha,
9 => Self::_3dColorBufferBlendFactorSrc1Color,
10 => Self::_3dColorBufferBlendFactorSrc1Alpha,
17 => Self::_3dColorBufferBlendFactorZero,
18 => Self::_3dColorBufferBlendFactorInvSrcColor,
19 => Self::_3dColorBufferBlendFactorInvSrcAlpha,
20 => Self::_3dColorBufferBlendFactorInvDstAlpha,
21 => Self::_3dColorBufferBlendFactorInvDstColor,
23 => Self::_3dColorBufferBlendFactorInvConstColor,
24 => Self::_3dColorBufferBlendFactorInvConstAlpha,
25 => Self::_3dColorBufferBlendFactorInvSrc1Color,
26 => Self::_3dColorBufferBlendFactorInvSrc1Alpha,
_ => Self::Unknown(val),
}
}
}
impl Default for _3dColorBufferBlendFactor {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum _3dColorBufferBlendFunction {
_3dColorBufferBlendFunctionAdd,
_3dColorBufferBlendFunctionSubtract,
_3dColorBufferBlendFunctionReverseSubtract,
_3dColorBufferBlendFunctionMin,
_3dColorBufferBlendFunctionMax,
Unknown(u32),
}
impl Into<u32> for _3dColorBufferBlendFunction {
fn into(self) -> u32 {
type E = _3dColorBufferBlendFunction;
match self {
E::_3dColorBufferBlendFunctionAdd => 0,
E::_3dColorBufferBlendFunctionSubtract => 1,
E::_3dColorBufferBlendFunctionReverseSubtract => 2,
E::_3dColorBufferBlendFunctionMin => 3,
E::_3dColorBufferBlendFunctionMax => 4,
E::Unknown(val) => val,
}
}
}
impl From<u32> for _3dColorBufferBlendFunction {
fn from(val: u32) -> Self {
match val {
0 => Self::_3dColorBufferBlendFunctionAdd,
1 => Self::_3dColorBufferBlendFunctionSubtract,
2 => Self::_3dColorBufferBlendFunctionReverseSubtract,
3 => Self::_3dColorBufferBlendFunctionMin,
4 => Self::_3dColorBufferBlendFunctionMax,
_ => Self::Unknown(val),
}
}
}
impl Default for _3dColorBufferBlendFunction {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum _3dCompareFunction {
_3dCompareFunctionAlways,
_3dCompareFunctionNever,
_3dCompareFunctionLess,
_3dCompareFunctionEqual,
_3dCompareFunctionLequal,
_3dCompareFunctionGreater,
_3dCompareFunctionNotequal,
_3dCompareFunctionGequal,
Unknown(u32),
}
impl Into<u32> for _3dCompareFunction {
fn into(self) -> u32 {
type E = _3dCompareFunction;
match self {
E::_3dCompareFunctionAlways => 0,
E::_3dCompareFunctionNever => 1,
E::_3dCompareFunctionLess => 2,
E::_3dCompareFunctionEqual => 3,
E::_3dCompareFunctionLequal => 4,
E::_3dCompareFunctionGreater => 5,
E::_3dCompareFunctionNotequal => 6,
E::_3dCompareFunctionGequal => 7,
E::Unknown(val) => val,
}
}
}
impl From<u32> for _3dCompareFunction {
fn from(val: u32) -> Self {
match val {
0 => Self::_3dCompareFunctionAlways,
1 => Self::_3dCompareFunctionNever,
2 => Self::_3dCompareFunctionLess,
3 => Self::_3dCompareFunctionEqual,
4 => Self::_3dCompareFunctionLequal,
5 => Self::_3dCompareFunctionGreater,
6 => Self::_3dCompareFunctionNotequal,
7 => Self::_3dCompareFunctionGequal,
_ => Self::Unknown(val),
}
}
}
impl Default for _3dCompareFunction {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum _3dLogicOpFunction {
_3dLogicOpFunctionClear,
_3dLogicOpFunctionNor,
_3dLogicOpFunctionAndInverted,
_3dLogicOpFunctionCopyInverted,
_3dLogicOpFunctionAndReverse,
_3dLogicOpFunctionInvert,
_3dLogicOpFunctionXor,
_3dLogicOpFunctionNand,
_3dLogicOpFunctionAnd,
_3dLogicOpFunctionEquiv,
_3dLogicOpFunctionNoop,
_3dLogicOpFunctionOrInverted,
_3dLogicOpFunctionCopy,
_3dLogicOpFunctionOrReverse,
_3dLogicOpFunctionOr,
_3dLogicOpFunctionSet,
Unknown(u32),
}
impl Into<u32> for _3dLogicOpFunction {
fn into(self) -> u32 {
type E = _3dLogicOpFunction;
match self {
E::_3dLogicOpFunctionClear => 0,
E::_3dLogicOpFunctionNor => 1,
E::_3dLogicOpFunctionAndInverted => 2,
E::_3dLogicOpFunctionCopyInverted => 3,
E::_3dLogicOpFunctionAndReverse => 4,
E::_3dLogicOpFunctionInvert => 5,
E::_3dLogicOpFunctionXor => 6,
E::_3dLogicOpFunctionNand => 7,
E::_3dLogicOpFunctionAnd => 8,
E::_3dLogicOpFunctionEquiv => 9,
E::_3dLogicOpFunctionNoop => 10,
E::_3dLogicOpFunctionOrInverted => 11,
E::_3dLogicOpFunctionCopy => 12,
E::_3dLogicOpFunctionOrReverse => 13,
E::_3dLogicOpFunctionOr => 14,
E::_3dLogicOpFunctionSet => 15,
E::Unknown(val) => val,
}
}
}
impl From<u32> for _3dLogicOpFunction {
fn from(val: u32) -> Self {
match val {
0 => Self::_3dLogicOpFunctionClear,
1 => Self::_3dLogicOpFunctionNor,
2 => Self::_3dLogicOpFunctionAndInverted,
3 => Self::_3dLogicOpFunctionCopyInverted,
4 => Self::_3dLogicOpFunctionAndReverse,
5 => Self::_3dLogicOpFunctionInvert,
6 => Self::_3dLogicOpFunctionXor,
7 => Self::_3dLogicOpFunctionNand,
8 => Self::_3dLogicOpFunctionAnd,
9 => Self::_3dLogicOpFunctionEquiv,
10 => Self::_3dLogicOpFunctionNoop,
11 => Self::_3dLogicOpFunctionOrInverted,
12 => Self::_3dLogicOpFunctionCopy,
13 => Self::_3dLogicOpFunctionOrReverse,
14 => Self::_3dLogicOpFunctionOr,
15 => Self::_3dLogicOpFunctionSet,
_ => Self::Unknown(val),
}
}
}
impl Default for _3dLogicOpFunction {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum _3dPrimTopoType {
_3dPrimTopoTypePointlist,
_3dPrimTopoTypeLinelist,
_3dPrimTopoTypeLinestrip,
_3dPrimTopoTypeTrilist,
_3dPrimTopoTypeTristrip,
_3dPrimTopoTypeTrifan,
_3dPrimTopoTypeQuadlist,
_3dPrimTopoTypeQuadstrip,
_3dPrimTopoTypeLinelistAdj,
_3dPrimTopoTypeLinestripAdj,
_3dPrimTopoTypeTrilistAdj,
_3dPrimTopoTypeTristripAdj,
_3dPrimTopoTypeTristripReverse,
_3dPrimTopoTypePolygon,
_3dPrimTopoTypeRectlist,
_3dPrimTopoTypeLineloop,
_3dPrimTopoTypePointlistBf,
_3dPrimTopoTypeLinestripCont,
_3dPrimTopoTypeLinestripBf,
_3dPrimTopoTypeLinestripContBf,
_3dPrimTopoTypeTrifanNostipple,
_3dPrimTopoTypePatchlist1,
_3dPrimTopoTypePatchlist2,
_3dPrimTopoTypePatchlist3,
_3dPrimTopoTypePatchlist4,
_3dPrimTopoTypePatchlist5,
_3dPrimTopoTypePatchlist6,
_3dPrimTopoTypePatchlist7,
_3dPrimTopoTypePatchlist8,
_3dPrimTopoTypePatchlist9,
_3dPrimTopoTypePatchlist10,
_3dPrimTopoTypePatchlist11,
_3dPrimTopoTypePatchlist12,
_3dPrimTopoTypePatchlist13,
_3dPrimTopoTypePatchlist14,
_3dPrimTopoTypePatchlist15,
_3dPrimTopoTypePatchlist16,
_3dPrimTopoTypePatchlist17,
_3dPrimTopoTypePatchlist18,
_3dPrimTopoTypePatchlist19,
_3dPrimTopoTypePatchlist20,
_3dPrimTopoTypePatchlist21,
_3dPrimTopoTypePatchlist22,
_3dPrimTopoTypePatchlist23,
_3dPrimTopoTypePatchlist24,
_3dPrimTopoTypePatchlist25,
_3dPrimTopoTypePatchlist26,
_3dPrimTopoTypePatchlist27,
_3dPrimTopoTypePatchlist28,
_3dPrimTopoTypePatchlist29,
_3dPrimTopoTypePatchlist30,
_3dPrimTopoTypePatchlist31,
_3dPrimTopoTypePatchlist32,
Unknown(u32),
}
impl Into<u32> for _3dPrimTopoType {
fn into(self) -> u32 {
type E = _3dPrimTopoType;
match self {
E::_3dPrimTopoTypePointlist => 1,
E::_3dPrimTopoTypeLinelist => 2,
E::_3dPrimTopoTypeLinestrip => 3,
E::_3dPrimTopoTypeTrilist => 4,
E::_3dPrimTopoTypeTristrip => 5,
E::_3dPrimTopoTypeTrifan => 6,
E::_3dPrimTopoTypeQuadlist => 7,
E::_3dPrimTopoTypeQuadstrip => 8,
E::_3dPrimTopoTypeLinelistAdj => 9,
E::_3dPrimTopoTypeLinestripAdj => 10,
E::_3dPrimTopoTypeTrilistAdj => 11,
E::_3dPrimTopoTypeTristripAdj => 12,
E::_3dPrimTopoTypeTristripReverse => 13,
E::_3dPrimTopoTypePolygon => 14,
E::_3dPrimTopoTypeRectlist => 15,
E::_3dPrimTopoTypeLineloop => 16,
E::_3dPrimTopoTypePointlistBf => 17,
E::_3dPrimTopoTypeLinestripCont => 18,
E::_3dPrimTopoTypeLinestripBf => 19,
E::_3dPrimTopoTypeLinestripContBf => 20,
E::_3dPrimTopoTypeTrifanNostipple => 22,
E::_3dPrimTopoTypePatchlist1 => 32,
E::_3dPrimTopoTypePatchlist2 => 33,
E::_3dPrimTopoTypePatchlist3 => 34,
E::_3dPrimTopoTypePatchlist4 => 35,
E::_3dPrimTopoTypePatchlist5 => 36,
E::_3dPrimTopoTypePatchlist6 => 37,
E::_3dPrimTopoTypePatchlist7 => 38,
E::_3dPrimTopoTypePatchlist8 => 39,
E::_3dPrimTopoTypePatchlist9 => 40,
E::_3dPrimTopoTypePatchlist10 => 41,
E::_3dPrimTopoTypePatchlist11 => 42,
E::_3dPrimTopoTypePatchlist12 => 43,
E::_3dPrimTopoTypePatchlist13 => 44,
E::_3dPrimTopoTypePatchlist14 => 45,
E::_3dPrimTopoTypePatchlist15 => 46,
E::_3dPrimTopoTypePatchlist16 => 47,
E::_3dPrimTopoTypePatchlist17 => 48,
E::_3dPrimTopoTypePatchlist18 => 49,
E::_3dPrimTopoTypePatchlist19 => 50,
E::_3dPrimTopoTypePatchlist20 => 51,
E::_3dPrimTopoTypePatchlist21 => 52,
E::_3dPrimTopoTypePatchlist22 => 53,
E::_3dPrimTopoTypePatchlist23 => 54,
E::_3dPrimTopoTypePatchlist24 => 55,
E::_3dPrimTopoTypePatchlist25 => 56,
E::_3dPrimTopoTypePatchlist26 => 57,
E::_3dPrimTopoTypePatchlist27 => 58,
E::_3dPrimTopoTypePatchlist28 => 59,
E::_3dPrimTopoTypePatchlist29 => 60,
E::_3dPrimTopoTypePatchlist30 => 61,
E::_3dPrimTopoTypePatchlist31 => 62,
E::_3dPrimTopoTypePatchlist32 => 63,
E::Unknown(val) => val,
}
}
}
impl From<u32> for _3dPrimTopoType {
fn from(val: u32) -> Self {
match val {
1 => Self::_3dPrimTopoTypePointlist,
2 => Self::_3dPrimTopoTypeLinelist,
3 => Self::_3dPrimTopoTypeLinestrip,
4 => Self::_3dPrimTopoTypeTrilist,
5 => Self::_3dPrimTopoTypeTristrip,
6 => Self::_3dPrimTopoTypeTrifan,
7 => Self::_3dPrimTopoTypeQuadlist,
8 => Self::_3dPrimTopoTypeQuadstrip,
9 => Self::_3dPrimTopoTypeLinelistAdj,
10 => Self::_3dPrimTopoTypeLinestripAdj,
11 => Self::_3dPrimTopoTypeTrilistAdj,
12 => Self::_3dPrimTopoTypeTristripAdj,
13 => Self::_3dPrimTopoTypeTristripReverse,
14 => Self::_3dPrimTopoTypePolygon,
15 => Self::_3dPrimTopoTypeRectlist,
16 => Self::_3dPrimTopoTypeLineloop,
17 => Self::_3dPrimTopoTypePointlistBf,
18 => Self::_3dPrimTopoTypeLinestripCont,
19 => Self::_3dPrimTopoTypeLinestripBf,
20 => Self::_3dPrimTopoTypeLinestripContBf,
22 => Self::_3dPrimTopoTypeTrifanNostipple,
32 => Self::_3dPrimTopoTypePatchlist1,
33 => Self::_3dPrimTopoTypePatchlist2,
34 => Self::_3dPrimTopoTypePatchlist3,
35 => Self::_3dPrimTopoTypePatchlist4,
36 => Self::_3dPrimTopoTypePatchlist5,
37 => Self::_3dPrimTopoTypePatchlist6,
38 => Self::_3dPrimTopoTypePatchlist7,
39 => Self::_3dPrimTopoTypePatchlist8,
40 => Self::_3dPrimTopoTypePatchlist9,
41 => Self::_3dPrimTopoTypePatchlist10,
42 => Self::_3dPrimTopoTypePatchlist11,
43 => Self::_3dPrimTopoTypePatchlist12,
44 => Self::_3dPrimTopoTypePatchlist13,
45 => Self::_3dPrimTopoTypePatchlist14,
46 => Self::_3dPrimTopoTypePatchlist15,
47 => Self::_3dPrimTopoTypePatchlist16,
48 => Self::_3dPrimTopoTypePatchlist17,
49 => Self::_3dPrimTopoTypePatchlist18,
50 => Self::_3dPrimTopoTypePatchlist19,
51 => Self::_3dPrimTopoTypePatchlist20,
52 => Self::_3dPrimTopoTypePatchlist21,
53 => Self::_3dPrimTopoTypePatchlist22,
54 => Self::_3dPrimTopoTypePatchlist23,
55 => Self::_3dPrimTopoTypePatchlist24,
56 => Self::_3dPrimTopoTypePatchlist25,
57 => Self::_3dPrimTopoTypePatchlist26,
58 => Self::_3dPrimTopoTypePatchlist27,
59 => Self::_3dPrimTopoTypePatchlist28,
60 => Self::_3dPrimTopoTypePatchlist29,
61 => Self::_3dPrimTopoTypePatchlist30,
62 => Self::_3dPrimTopoTypePatchlist31,
63 => Self::_3dPrimTopoTypePatchlist32,
_ => Self::Unknown(val),
}
}
}
impl Default for _3dPrimTopoType {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum _3dStencilOperation {
_3dStencilOperationKeep,
_3dStencilOperationZero,
_3dStencilOperationReplace,
_3dStencilOperationIncrsat,
_3dStencilOperationDecrsat,
_3dStencilOperationIncr,
_3dStencilOperationDecr,
_3dStencilOperationInvert,
Unknown(u32),
}
impl Into<u32> for _3dStencilOperation {
fn into(self) -> u32 {
type E = _3dStencilOperation;
match self {
E::_3dStencilOperationKeep => 0,
E::_3dStencilOperationZero => 1,
E::_3dStencilOperationReplace => 2,
E::_3dStencilOperationIncrsat => 3,
E::_3dStencilOperationDecrsat => 4,
E::_3dStencilOperationIncr => 5,
E::_3dStencilOperationDecr => 6,
E::_3dStencilOperationInvert => 7,
E::Unknown(val) => val,
}
}
}
impl From<u32> for _3dStencilOperation {
fn from(val: u32) -> Self {
match val {
0 => Self::_3dStencilOperationKeep,
1 => Self::_3dStencilOperationZero,
2 => Self::_3dStencilOperationReplace,
3 => Self::_3dStencilOperationIncrsat,
4 => Self::_3dStencilOperationDecrsat,
5 => Self::_3dStencilOperationIncr,
6 => Self::_3dStencilOperationDecr,
7 => Self::_3dStencilOperationInvert,
_ => Self::Unknown(val),
}
}
}
impl Default for _3dStencilOperation {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum _3dVertexComponentControl {
_3dVertexComponentControlNostore,
_3dVertexComponentControlStoreSrc,
_3dVertexComponentControlStore0,
_3dVertexComponentControlStore1Fp,
_3dVertexComponentControlStore1Int,
_3dVertexComponentControlStorePid,
Unknown(u32),
}
impl Into<u32> for _3dVertexComponentControl {
fn into(self) -> u32 {
type E = _3dVertexComponentControl;
match self {
E::_3dVertexComponentControlNostore => 0,
E::_3dVertexComponentControlStoreSrc => 1,
E::_3dVertexComponentControlStore0 => 2,
E::_3dVertexComponentControlStore1Fp => 3,
E::_3dVertexComponentControlStore1Int => 4,
E::_3dVertexComponentControlStorePid => 7,
E::Unknown(val) => val,
}
}
}
impl From<u32> for _3dVertexComponentControl {
fn from(val: u32) -> Self {
match val {
0 => Self::_3dVertexComponentControlNostore,
1 => Self::_3dVertexComponentControlStoreSrc,
2 => Self::_3dVertexComponentControlStore0,
3 => Self::_3dVertexComponentControlStore1Fp,
4 => Self::_3dVertexComponentControlStore1Int,
7 => Self::_3dVertexComponentControlStorePid,
_ => Self::Unknown(val),
}
}
}
impl Default for _3dVertexComponentControl {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum AtomicOpcode {
AtomicOpcodeAnd,
AtomicOpcodeOr,
AtomicOpcodeXor,
AtomicOpcodeMove,
AtomicOpcodeInc,
AtomicOpcodeDec,
AtomicOpcodeAdd,
AtomicOpcodeSub,
AtomicOpcodeRsub,
AtomicOpcodeImax,
AtomicOpcodeImin,
AtomicOpcodeUmax,
AtomicOpcodeUmin,
AtomicOpcodeCmpWr,
AtomicOpcodePredec,
AtomicOpcodeAnd8b,
AtomicOpcodeOr8b,
AtomicOpcodeXor8b,
AtomicOpcodeMove8b,
AtomicOpcodeInc8b,
AtomicOpcodeDec8b,
AtomicOpcodeAdd8b,
AtomicOpcodeSub8b,
AtomicOpcodeRsub8b,
AtomicOpcodeImax8b,
AtomicOpcodeImin8b,
AtomicOpcodeUmax8b,
AtomicOpcodeUmin8b,
AtomicOpcodeCmpWr8b,
AtomicOpcodePredec8b,
AtomicOpcodeCmpWr16b,
Unknown(u32),
}
impl Into<u32> for AtomicOpcode {
fn into(self) -> u32 {
type E = AtomicOpcode;
match self {
E::AtomicOpcodeAnd => 0x01,
E::AtomicOpcodeOr => 0x02,
E::AtomicOpcodeXor => 0x03,
E::AtomicOpcodeMove => 0x04,
E::AtomicOpcodeInc => 0x05,
E::AtomicOpcodeDec => 0x06,
E::AtomicOpcodeAdd => 0x07,
E::AtomicOpcodeSub => 0x08,
E::AtomicOpcodeRsub => 0x09,
E::AtomicOpcodeImax => 0x0a,
E::AtomicOpcodeImin => 0x0b,
E::AtomicOpcodeUmax => 0x0c,
E::AtomicOpcodeUmin => 0x0d,
E::AtomicOpcodeCmpWr => 0x0e,
E::AtomicOpcodePredec => 0x0f,
E::AtomicOpcodeAnd8b => 0x21,
E::AtomicOpcodeOr8b => 0x22,
E::AtomicOpcodeXor8b => 0x23,
E::AtomicOpcodeMove8b => 0x24,
E::AtomicOpcodeInc8b => 0x25,
E::AtomicOpcodeDec8b => 0x26,
E::AtomicOpcodeAdd8b => 0x27,
E::AtomicOpcodeSub8b => 0x28,
E::AtomicOpcodeRsub8b => 0x29,
E::AtomicOpcodeImax8b => 0x2a,
E::AtomicOpcodeImin8b => 0x2b,
E::AtomicOpcodeUmax8b => 0x2c,
E::AtomicOpcodeUmin8b => 0x2d,
E::AtomicOpcodeCmpWr8b => 0x2e,
E::AtomicOpcodePredec8b => 0x2f,
E::AtomicOpcodeCmpWr16b => 0x4e,
E::Unknown(val) => val,
}
}
}
impl From<u32> for AtomicOpcode {
fn from(val: u32) -> Self {
match val {
0x01 => Self::AtomicOpcodeAnd,
0x02 => Self::AtomicOpcodeOr,
0x03 => Self::AtomicOpcodeXor,
0x04 => Self::AtomicOpcodeMove,
0x05 => Self::AtomicOpcodeInc,
0x06 => Self::AtomicOpcodeDec,
0x07 => Self::AtomicOpcodeAdd,
0x08 => Self::AtomicOpcodeSub,
0x09 => Self::AtomicOpcodeRsub,
0x0a => Self::AtomicOpcodeImax,
0x0b => Self::AtomicOpcodeImin,
0x0c => Self::AtomicOpcodeUmax,
0x0d => Self::AtomicOpcodeUmin,
0x0e => Self::AtomicOpcodeCmpWr,
0x0f => Self::AtomicOpcodePredec,
0x21 => Self::AtomicOpcodeAnd8b,
0x22 => Self::AtomicOpcodeOr8b,
0x23 => Self::AtomicOpcodeXor8b,
0x24 => Self::AtomicOpcodeMove8b,
0x25 => Self::AtomicOpcodeInc8b,
0x26 => Self::AtomicOpcodeDec8b,
0x27 => Self::AtomicOpcodeAdd8b,
0x28 => Self::AtomicOpcodeSub8b,
0x29 => Self::AtomicOpcodeRsub8b,
0x2a => Self::AtomicOpcodeImax8b,
0x2b => Self::AtomicOpcodeImin8b,
0x2c => Self::AtomicOpcodeUmax8b,
0x2d => Self::AtomicOpcodeUmin8b,
0x2e => Self::AtomicOpcodeCmpWr8b,
0x2f => Self::AtomicOpcodePredec8b,
0x4e => Self::AtomicOpcodeCmpWr16b,
_ => Self::Unknown(val),
}
}
}
impl Default for AtomicOpcode {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum AttributeComponentFormat {
AttributeComponentFormatDisabled,
AttributeComponentFormatXy,
AttributeComponentFormatXyz,
AttributeComponentFormatXyzw,
Unknown(u32),
}
impl Into<u32> for AttributeComponentFormat {
fn into(self) -> u32 {
type E = AttributeComponentFormat;
match self {
E::AttributeComponentFormatDisabled => 0,
E::AttributeComponentFormatXy => 1,
E::AttributeComponentFormatXyz => 2,
E::AttributeComponentFormatXyzw => 3,
E::Unknown(val) => val,
}
}
}
impl From<u32> for AttributeComponentFormat {
fn from(val: u32) -> Self {
match val {
0 => Self::AttributeComponentFormatDisabled,
1 => Self::AttributeComponentFormatXy,
2 => Self::AttributeComponentFormatXyz,
3 => Self::AttributeComponentFormatXyzw,
_ => Self::Unknown(val),
}
}
}
impl Default for AttributeComponentFormat {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum ComponentEnables {
ComponentEnablesNone,
ComponentEnablesX,
ComponentEnablesY,
ComponentEnablesXy,
ComponentEnablesZ,
ComponentEnablesXz,
ComponentEnablesYz,
ComponentEnablesXyz,
ComponentEnablesW,
ComponentEnablesXw,
ComponentEnablesYw,
ComponentEnablesXyw,
ComponentEnablesZw,
ComponentEnablesXzw,
ComponentEnablesYzw,
ComponentEnablesXyzw,
Unknown(u32),
}
impl Into<u32> for ComponentEnables {
fn into(self) -> u32 {
type E = ComponentEnables;
match self {
E::ComponentEnablesNone => 0,
E::ComponentEnablesX => 1,
E::ComponentEnablesY => 2,
E::ComponentEnablesXy => 3,
E::ComponentEnablesZ => 4,
E::ComponentEnablesXz => 5,
E::ComponentEnablesYz => 6,
E::ComponentEnablesXyz => 7,
E::ComponentEnablesW => 8,
E::ComponentEnablesXw => 9,
E::ComponentEnablesYw => 10,
E::ComponentEnablesXyw => 11,
E::ComponentEnablesZw => 12,
E::ComponentEnablesXzw => 13,
E::ComponentEnablesYzw => 14,
E::ComponentEnablesXyzw => 15,
E::Unknown(val) => val,
}
}
}
impl From<u32> for ComponentEnables {
fn from(val: u32) -> Self {
match val {
0 => Self::ComponentEnablesNone,
1 => Self::ComponentEnablesX,
2 => Self::ComponentEnablesY,
3 => Self::ComponentEnablesXy,
4 => Self::ComponentEnablesZ,
5 => Self::ComponentEnablesXz,
6 => Self::ComponentEnablesYz,
7 => Self::ComponentEnablesXyz,
8 => Self::ComponentEnablesW,
9 => Self::ComponentEnablesXw,
10 => Self::ComponentEnablesYw,
11 => Self::ComponentEnablesXyw,
12 => Self::ComponentEnablesZw,
13 => Self::ComponentEnablesXzw,
14 => Self::ComponentEnablesYzw,
15 => Self::ComponentEnablesXyzw,
_ => Self::Unknown(val),
}
}
}
impl Default for ComponentEnables {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum ShaderChannelSelect {
ShaderChannelSelectZero,
ShaderChannelSelectOne,
ShaderChannelSelectRed,
ShaderChannelSelectGreen,
ShaderChannelSelectBlue,
ShaderChannelSelectAlpha,
Unknown(u32),
}
impl Into<u32> for ShaderChannelSelect {
fn into(self) -> u32 {
type E = ShaderChannelSelect;
match self {
E::ShaderChannelSelectZero => 0,
E::ShaderChannelSelectOne => 1,
E::ShaderChannelSelectRed => 4,
E::ShaderChannelSelectGreen => 5,
E::ShaderChannelSelectBlue => 6,
E::ShaderChannelSelectAlpha => 7,
E::Unknown(val) => val,
}
}
}
impl From<u32> for ShaderChannelSelect {
fn from(val: u32) -> Self {
match val {
0 => Self::ShaderChannelSelectZero,
1 => Self::ShaderChannelSelectOne,
4 => Self::ShaderChannelSelectRed,
5 => Self::ShaderChannelSelectGreen,
6 => Self::ShaderChannelSelectBlue,
7 => Self::ShaderChannelSelectAlpha,
_ => Self::Unknown(val),
}
}
}
impl Default for ShaderChannelSelect {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum TextureCoordinateMode {
TextureCoordinateModeWrap,
TextureCoordinateModeMirror,
TextureCoordinateModeClamp,
TextureCoordinateModeCube,
TextureCoordinateModeClampBorder,
TextureCoordinateModeMirrorOnce,
TextureCoordinateModeHalfBorder,
Unknown(u32),
}
impl Into<u32> for TextureCoordinateMode {
fn into(self) -> u32 {
type E = TextureCoordinateMode;
match self {
E::TextureCoordinateModeWrap => 0,
E::TextureCoordinateModeMirror => 1,
E::TextureCoordinateModeClamp => 2,
E::TextureCoordinateModeCube => 3,
E::TextureCoordinateModeClampBorder => 4,
E::TextureCoordinateModeMirrorOnce => 5,
E::TextureCoordinateModeHalfBorder => 6,
E::Unknown(val) => val,
}
}
}
impl From<u32> for TextureCoordinateMode {
fn from(val: u32) -> Self {
match val {
0 => Self::TextureCoordinateModeWrap,
1 => Self::TextureCoordinateModeMirror,
2 => Self::TextureCoordinateModeClamp,
3 => Self::TextureCoordinateModeCube,
4 => Self::TextureCoordinateModeClampBorder,
5 => Self::TextureCoordinateModeMirrorOnce,
6 => Self::TextureCoordinateModeHalfBorder,
_ => Self::Unknown(val),
}
}
}
impl Default for TextureCoordinateMode {
fn default() -> Self {
0u32.into()
}
}
#[derive(Clone, Copy)]
pub enum WrapShortestEnable {
WrapShortestEnableX,
WrapShortestEnableY,
WrapShortestEnableXy,
WrapShortestEnableZ,
WrapShortestEnableXz,
WrapShortestEnableYz,
WrapShortestEnableXyz,
WrapShortestEnableW,
WrapShortestEnableXw,
WrapShortestEnableYw,
WrapShortestEnableXyw,
WrapShortestEnableZw,
WrapShortestEnableXzw,
WrapShortestEnableYzw,
WrapShortestEnableXyzw,
Unknown(u32),
}
impl Into<u32> for WrapShortestEnable {
fn into(self) -> u32 {
type E = WrapShortestEnable;
match self {
E::WrapShortestEnableX => 1,
E::WrapShortestEnableY => 2,
E::WrapShortestEnableXy => 3,
E::WrapShortestEnableZ => 4,
E::WrapShortestEnableXz => 5,
E::WrapShortestEnableYz => 6,
E::WrapShortestEnableXyz => 7,
E::WrapShortestEnableW => 8,
E::WrapShortestEnableXw => 9,
E::WrapShortestEnableYw => 10,
E::WrapShortestEnableXyw => 11,
E::WrapShortestEnableZw => 12,
E::WrapShortestEnableXzw => 13,
E::WrapShortestEnableYzw => 14,
E::WrapShortestEnableXyzw => 15,
E::Unknown(val) => val,
}
}
}
impl From<u32> for WrapShortestEnable {
fn from(val: u32) -> Self {
match val {
1 => Self::WrapShortestEnableX,
2 => Self::WrapShortestEnableY,
3 => Self::WrapShortestEnableXy,
4 => Self::WrapShortestEnableZ,
5 => Self::WrapShortestEnableXz,
6 => Self::WrapShortestEnableYz,
7 => Self::WrapShortestEnableXyz,
8 => Self::WrapShortestEnableW,
9 => Self::WrapShortestEnableXw,
10 => Self::WrapShortestEnableYw,
11 => Self::WrapShortestEnableXyw,
12 => Self::WrapShortestEnableZw,
13 => Self::WrapShortestEnableXzw,
14 => Self::WrapShortestEnableYzw,
15 => Self::WrapShortestEnableXyzw,
_ => Self::Unknown(val),
}
}
}
impl Default for WrapShortestEnable {
fn default() -> Self {
0u32.into()
}
}
pub struct BcsInstdone {
pub ring_enable: bool,
pub blitter_idle: bool,
pub gab_idle: bool,
pub bcs_done: bool,
}
impl BcsInstdone {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x2206c;
}
impl Default for BcsInstdone {
fn default() -> Self {
BcsInstdone {
ring_enable: Default::default(),
blitter_idle: true,
gab_idle: true,
bcs_done: true,
}
}
}
impl Serialize for BcsInstdone {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.ring_enable.into(), 0, 0) |
__gen_uint(self.blitter_idle.into(), 1, 1) |
__gen_uint(self.gab_idle.into(), 2, 2) |
__gen_uint(self.bcs_done.into(), 3, 3);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for BcsInstdone {
fn from(input: &[u32; 1]) -> Self {
BcsInstdone {
ring_enable: __gen_unuint(input[0], 0, 0) != 0,
blitter_idle: __gen_unuint(input[0], 1, 1) != 0,
gab_idle: __gen_unuint(input[0], 2, 2) != 0,
bcs_done: __gen_unuint(input[0], 3, 3) != 0,
}
}
}
impl Deserialize for BcsInstdone {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct BindingTableEditEntry {
pub surface_state_pointer: u64,
pub binding_table_index: u32,
}
impl BindingTableEditEntry {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for BindingTableEditEntry {
fn default() -> Self {
BindingTableEditEntry {
surface_state_pointer: Default::default(),
binding_table_index: Default::default(),
}
}
}
impl Serialize for BindingTableEditEntry {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_offset(self.surface_state_pointer as u32, 0, 15) |
__gen_uint(self.binding_table_index, 16, 23);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for BindingTableEditEntry {
fn from(input: &[u32; 1]) -> Self {
BindingTableEditEntry {
surface_state_pointer: (__gen_unuint(input[0], 0, 15) as u64),
binding_table_index: __gen_unuint(input[0], 16, 23),
}
}
}
impl Deserialize for BindingTableEditEntry {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct BindingTableState {
pub surface_state_pointer: u64,
}
impl BindingTableState {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for BindingTableState {
fn default() -> Self {
BindingTableState {
surface_state_pointer: Default::default(),
}
}
}
impl Serialize for BindingTableState {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_offset(self.surface_state_pointer as u32, 6, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for BindingTableState {
fn from(input: &[u32; 1]) -> Self {
BindingTableState {
surface_state_pointer: (__gen_unuint(input[0], 6, 31) as u64) << 6,
}
}
}
impl Deserialize for BindingTableState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct BlendState {
pub y_dither_offset: u32,
pub x_dither_offset: u32,
pub color_dither_enable: bool,
pub alpha_test_function: _3dCompareFunction,
pub alpha_test_enable: bool,
pub alpha_to_coverage_dither_enable: bool,
pub alpha_to_one_enable: bool,
pub independent_alpha_blend_enable: bool,
pub alpha_to_coverage_enable: bool,
}
impl BlendState {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for BlendState {
fn default() -> Self {
BlendState {
y_dither_offset: Default::default(),
x_dither_offset: Default::default(),
color_dither_enable: Default::default(),
alpha_test_function: Default::default(),
alpha_test_enable: Default::default(),
alpha_to_coverage_dither_enable: Default::default(),
alpha_to_one_enable: Default::default(),
independent_alpha_blend_enable: Default::default(),
alpha_to_coverage_enable: Default::default(),
}
}
}
impl Serialize for BlendState {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.y_dither_offset, 19, 20) |
__gen_uint(self.x_dither_offset, 21, 22) |
__gen_uint(self.color_dither_enable.into(), 23, 23) |
__gen_uint(self.alpha_test_function.into(), 24, 26) |
__gen_uint(self.alpha_test_enable.into(), 27, 27) |
__gen_uint(self.alpha_to_coverage_dither_enable.into(), 28, 28) |
__gen_uint(self.alpha_to_one_enable.into(), 29, 29) |
__gen_uint(self.independent_alpha_blend_enable.into(), 30, 30) |
__gen_uint(self.alpha_to_coverage_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for BlendState {
fn from(input: &[u32; 1]) -> Self {
BlendState {
y_dither_offset: __gen_unuint(input[0], 19, 20),
x_dither_offset: __gen_unuint(input[0], 21, 22),
color_dither_enable: __gen_unuint(input[0], 23, 23) != 0,
alpha_test_function: (__gen_unuint(input[0], 24, 26)).into(),
alpha_test_enable: __gen_unuint(input[0], 27, 27) != 0,
alpha_to_coverage_dither_enable: __gen_unuint(input[0], 28, 28) != 0,
alpha_to_one_enable: __gen_unuint(input[0], 29, 29) != 0,
independent_alpha_blend_enable: __gen_unuint(input[0], 30, 30) != 0,
alpha_to_coverage_enable: __gen_unuint(input[0], 31, 31) != 0,
}
}
}
impl Deserialize for BlendState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct BlendStateEntry {
pub write_disable_blue: bool,
pub write_disable_green: bool,
pub write_disable_red: bool,
pub write_disable_alpha: bool,
pub alpha_blend_function: _3dColorBufferBlendFunction,
pub destination_alpha_blend_factor: _3dColorBufferBlendFactor,
pub source_alpha_blend_factor: _3dColorBufferBlendFactor,
pub color_blend_function: _3dColorBufferBlendFunction,
pub destination_blend_factor: _3dColorBufferBlendFactor,
pub source_blend_factor: _3dColorBufferBlendFactor,
pub color_buffer_blend_enable: bool,
pub post_blend_color_clamp_enable: bool,
pub pre_blend_color_clamp_enable: bool,
pub color_clamp_range: u32,
pub pre_blend_source_only_clamp_enable: bool,
pub logic_op_function: _3dLogicOpFunction,
pub logic_op_enable: bool,
}
impl BlendStateEntry {
pub const DWORD_LENGTH: u32 = 2;
pub const COLORCLAMP_RTFORMAT: u32 = 2;
pub const COLORCLAMP_SNORM: u32 = 1;
pub const COLORCLAMP_UNORM: u32 = 0;
}
impl Default for BlendStateEntry {
fn default() -> Self {
BlendStateEntry {
write_disable_blue: Default::default(),
write_disable_green: Default::default(),
write_disable_red: Default::default(),
write_disable_alpha: Default::default(),
alpha_blend_function: Default::default(),
destination_alpha_blend_factor: Default::default(),
source_alpha_blend_factor: Default::default(),
color_blend_function: Default::default(),
destination_blend_factor: Default::default(),
source_blend_factor: Default::default(),
color_buffer_blend_enable: Default::default(),
post_blend_color_clamp_enable: Default::default(),
pre_blend_color_clamp_enable: Default::default(),
color_clamp_range: Default::default(),
pre_blend_source_only_clamp_enable: Default::default(),
logic_op_function: Default::default(),
logic_op_enable: Default::default(),
}
}
}
impl Serialize for BlendStateEntry {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.write_disable_blue.into(), 0, 0) |
__gen_uint(self.write_disable_green.into(), 1, 1) |
__gen_uint(self.write_disable_red.into(), 2, 2) |
__gen_uint(self.write_disable_alpha.into(), 3, 3) |
__gen_uint(self.alpha_blend_function.into(), 5, 7) |
__gen_uint(self.destination_alpha_blend_factor.into(), 8, 12) |
__gen_uint(self.source_alpha_blend_factor.into(), 13, 17) |
__gen_uint(self.color_blend_function.into(), 18, 20) |
__gen_uint(self.destination_blend_factor.into(), 21, 25) |
__gen_uint(self.source_blend_factor.into(), 26, 30) |
__gen_uint(self.color_buffer_blend_enable.into(), 31, 31);
out[1] = __gen_uint(self.post_blend_color_clamp_enable.into(), 0, 0) |
__gen_uint(self.pre_blend_color_clamp_enable.into(), 1, 1) |
__gen_uint(self.color_clamp_range, 2, 3) |
__gen_uint(self.pre_blend_source_only_clamp_enable.into(), 4, 4) |
__gen_uint(self.logic_op_function.into(), 27, 30) |
__gen_uint(self.logic_op_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for BlendStateEntry {
fn from(input: &[u32; 2]) -> Self {
BlendStateEntry {
write_disable_blue: __gen_unuint(input[0], 0, 0) != 0,
write_disable_green: __gen_unuint(input[0], 1, 1) != 0,
write_disable_red: __gen_unuint(input[0], 2, 2) != 0,
write_disable_alpha: __gen_unuint(input[0], 3, 3) != 0,
alpha_blend_function: (__gen_unuint(input[0], 5, 7)).into(),
destination_alpha_blend_factor: (__gen_unuint(input[0], 8, 12)).into(),
source_alpha_blend_factor: (__gen_unuint(input[0], 13, 17)).into(),
color_blend_function: (__gen_unuint(input[0], 18, 20)).into(),
destination_blend_factor: (__gen_unuint(input[0], 21, 25)).into(),
source_blend_factor: (__gen_unuint(input[0], 26, 30)).into(),
color_buffer_blend_enable: __gen_unuint(input[0], 31, 31) != 0,
post_blend_color_clamp_enable: __gen_unuint(input[1], 0, 0) != 0,
pre_blend_color_clamp_enable: __gen_unuint(input[1], 1, 1) != 0,
color_clamp_range: __gen_unuint(input[1], 2, 3),
pre_blend_source_only_clamp_enable: __gen_unuint(input[1], 4, 4) != 0,
logic_op_function: (__gen_unuint(input[1], 27, 30)).into(),
logic_op_enable: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for BlendStateEntry {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct CacheMode0 {
pub null_tile_fix_disable: bool,
pub disable_clock_gating_in_the_pixel_backend: bool,
pub hierarchical_z_raw_stall_optimization_disable: bool,
pub rcc_eviction_policy: bool,
pub stc_pma_optimization_enable: bool,
pub sampler_l2_request_arbitration: u32,
pub sampler_l2_tlb_prefetch_enable: bool,
pub sampler_set_remapping_for_3d_disable: bool,
pub msaa_compression_plane_number_threshold_for_ellc: u32,
pub sampler_l2_disable: bool,
pub null_tile_fix_disable_mask: bool,
pub disable_clock_gating_in_the_pixel_backend_mask: bool,
pub hierarchical_z_raw_stall_optimization_disable_mask: bool,
pub rcc_eviction_policy_mask: bool,
pub stc_pma_optimization_enable_mask: bool,
pub sampler_l2_request_arbitration_mask: u32,
pub sampler_l2_tlb_prefetch_enable_mask: bool,
pub sampler_set_remapping_for_3d_disable_mask: bool,
pub msaa_compression_plane_number_threshold_for_ellc_mask: u32,
pub sampler_l2_disable_mask: bool,
}
impl CacheMode0 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x7000;
pub const CONSTANTS_ARE_HIGHEST_PRIORITY: u32 = 2;
pub const FETCH_ARE_HIGHEST_PRIORITY: u32 = 1;
pub const ROUND_ROBIN: u32 = 0;
}
impl Default for CacheMode0 {
fn default() -> Self {
CacheMode0 {
null_tile_fix_disable: Default::default(),
disable_clock_gating_in_the_pixel_backend: Default::default(),
hierarchical_z_raw_stall_optimization_disable: Default::default(),
rcc_eviction_policy: Default::default(),
stc_pma_optimization_enable: Default::default(),
sampler_l2_request_arbitration: Default::default(),
sampler_l2_tlb_prefetch_enable: Default::default(),
sampler_set_remapping_for_3d_disable: Default::default(),
msaa_compression_plane_number_threshold_for_ellc: Default::default(),
sampler_l2_disable: Default::default(),
null_tile_fix_disable_mask: Default::default(),
disable_clock_gating_in_the_pixel_backend_mask: Default::default(),
hierarchical_z_raw_stall_optimization_disable_mask: Default::default(),
rcc_eviction_policy_mask: Default::default(),
stc_pma_optimization_enable_mask: Default::default(),
sampler_l2_request_arbitration_mask: Default::default(),
sampler_l2_tlb_prefetch_enable_mask: Default::default(),
sampler_set_remapping_for_3d_disable_mask: Default::default(),
msaa_compression_plane_number_threshold_for_ellc_mask: Default::default(),
sampler_l2_disable_mask: Default::default(),
}
}
}
impl Serialize for CacheMode0 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.null_tile_fix_disable.into(), 0, 0) |
__gen_uint(self.disable_clock_gating_in_the_pixel_backend.into(), 1, 1) |
__gen_uint(self.hierarchical_z_raw_stall_optimization_disable.into(), 2, 2) |
__gen_uint(self.rcc_eviction_policy.into(), 4, 4) |
__gen_uint(self.stc_pma_optimization_enable.into(), 5, 5) |
__gen_uint(self.sampler_l2_request_arbitration, 6, 7) |
__gen_uint(self.sampler_l2_tlb_prefetch_enable.into(), 9, 9) |
__gen_uint(self.sampler_set_remapping_for_3d_disable.into(), 11, 11) |
__gen_uint(self.msaa_compression_plane_number_threshold_for_ellc, 12, 14) |
__gen_uint(self.sampler_l2_disable.into(), 15, 15) |
__gen_uint(self.null_tile_fix_disable_mask.into(), 16, 16) |
__gen_uint(self.disable_clock_gating_in_the_pixel_backend_mask.into(), 17, 17) |
__gen_uint(self.hierarchical_z_raw_stall_optimization_disable_mask.into(), 18, 18) |
__gen_uint(self.rcc_eviction_policy_mask.into(), 20, 20) |
__gen_uint(self.stc_pma_optimization_enable_mask.into(), 21, 21) |
__gen_uint(self.sampler_l2_request_arbitration_mask, 22, 23) |
__gen_uint(self.sampler_l2_tlb_prefetch_enable_mask.into(), 25, 25) |
__gen_uint(self.sampler_set_remapping_for_3d_disable_mask.into(), 27, 27) |
__gen_uint(self.msaa_compression_plane_number_threshold_for_ellc_mask, 28, 30) |
__gen_uint(self.sampler_l2_disable_mask.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for CacheMode0 {
fn from(input: &[u32; 1]) -> Self {
CacheMode0 {
null_tile_fix_disable: __gen_unuint(input[0], 0, 0) != 0,
disable_clock_gating_in_the_pixel_backend: __gen_unuint(input[0], 1, 1) != 0,
hierarchical_z_raw_stall_optimization_disable: __gen_unuint(input[0], 2, 2) != 0,
rcc_eviction_policy: __gen_unuint(input[0], 4, 4) != 0,
stc_pma_optimization_enable: __gen_unuint(input[0], 5, 5) != 0,
sampler_l2_request_arbitration: __gen_unuint(input[0], 6, 7),
sampler_l2_tlb_prefetch_enable: __gen_unuint(input[0], 9, 9) != 0,
sampler_set_remapping_for_3d_disable: __gen_unuint(input[0], 11, 11) != 0,
msaa_compression_plane_number_threshold_for_ellc: __gen_unuint(input[0], 12, 14),
sampler_l2_disable: __gen_unuint(input[0], 15, 15) != 0,
null_tile_fix_disable_mask: __gen_unuint(input[0], 16, 16) != 0,
disable_clock_gating_in_the_pixel_backend_mask: __gen_unuint(input[0], 17, 17) != 0,
hierarchical_z_raw_stall_optimization_disable_mask: __gen_unuint(input[0], 18, 18) != 0,
rcc_eviction_policy_mask: __gen_unuint(input[0], 20, 20) != 0,
stc_pma_optimization_enable_mask: __gen_unuint(input[0], 21, 21) != 0,
sampler_l2_request_arbitration_mask: __gen_unuint(input[0], 22, 23),
sampler_l2_tlb_prefetch_enable_mask: __gen_unuint(input[0], 25, 25) != 0,
sampler_set_remapping_for_3d_disable_mask: __gen_unuint(input[0], 27, 27) != 0,
msaa_compression_plane_number_threshold_for_ellc_mask: __gen_unuint(input[0], 28, 30),
sampler_l2_disable_mask: __gen_unuint(input[0], 31, 31) != 0,
}
}
}
impl Deserialize for CacheMode0 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct CacheMode1 {
pub partial_resolve_disable_in_vc: bool,
pub rcz_pma_promoted_2_not_promoted_allocation_stall_optimization_disable: bool,
pub mcs_cache_disable: bool,
pub msc_raw_hazard_avoidance_bit: bool,
pub np_early_z_fails_disable: u32,
pub blend_optimization_fix_disable: bool,
pub color_compression_disable: bool,
pub partial_resolve_disable_in_vc_mask: bool,
pub rcz_pma_promoted_2_not_promoted_allocation_stall_optimization_disable_mask: bool,
pub mcs_cache_disable_mask: bool,
pub msc_raw_hazard_avoidance_bit_mask: bool,
pub np_early_z_fails_disable_mask: bool,
pub blend_optimization_fix_disable_mask: bool,
pub color_compression_disable_mask: bool,
}
impl CacheMode1 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x7004;
}
impl Default for CacheMode1 {
fn default() -> Self {
CacheMode1 {
partial_resolve_disable_in_vc: Default::default(),
rcz_pma_promoted_2_not_promoted_allocation_stall_optimization_disable: Default::default(),
mcs_cache_disable: Default::default(),
msc_raw_hazard_avoidance_bit: Default::default(),
np_early_z_fails_disable: Default::default(),
blend_optimization_fix_disable: Default::default(),
color_compression_disable: Default::default(),
partial_resolve_disable_in_vc_mask: Default::default(),
rcz_pma_promoted_2_not_promoted_allocation_stall_optimization_disable_mask: Default::default(),
mcs_cache_disable_mask: Default::default(),
msc_raw_hazard_avoidance_bit_mask: Default::default(),
np_early_z_fails_disable_mask: Default::default(),
blend_optimization_fix_disable_mask: Default::default(),
color_compression_disable_mask: Default::default(),
}
}
}
impl Serialize for CacheMode1 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.partial_resolve_disable_in_vc.into(), 1, 1) |
__gen_uint(self.rcz_pma_promoted_2_not_promoted_allocation_stall_optimization_disable.into(), 3, 3) |
__gen_uint(self.mcs_cache_disable.into(), 5, 5) |
__gen_uint(self.msc_raw_hazard_avoidance_bit.into(), 9, 9) |
__gen_uint(self.np_early_z_fails_disable, 13, 13) |
__gen_uint(self.blend_optimization_fix_disable.into(), 14, 14) |
__gen_uint(self.color_compression_disable.into(), 15, 15) |
__gen_uint(self.partial_resolve_disable_in_vc_mask.into(), 17, 17) |
__gen_uint(self.rcz_pma_promoted_2_not_promoted_allocation_stall_optimization_disable_mask.into(), 19, 19) |
__gen_uint(self.mcs_cache_disable_mask.into(), 21, 21) |
__gen_uint(self.msc_raw_hazard_avoidance_bit_mask.into(), 25, 25) |
__gen_uint(self.np_early_z_fails_disable_mask.into(), 29, 29) |
__gen_uint(self.blend_optimization_fix_disable_mask.into(), 30, 30) |
__gen_uint(self.color_compression_disable_mask.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for CacheMode1 {
fn from(input: &[u32; 1]) -> Self {
CacheMode1 {
partial_resolve_disable_in_vc: __gen_unuint(input[0], 1, 1) != 0,
rcz_pma_promoted_2_not_promoted_allocation_stall_optimization_disable: __gen_unuint(input[0], 3, 3) != 0,
mcs_cache_disable: __gen_unuint(input[0], 5, 5) != 0,
msc_raw_hazard_avoidance_bit: __gen_unuint(input[0], 9, 9) != 0,
np_early_z_fails_disable: __gen_unuint(input[0], 13, 13),
blend_optimization_fix_disable: __gen_unuint(input[0], 14, 14) != 0,
color_compression_disable: __gen_unuint(input[0], 15, 15) != 0,
partial_resolve_disable_in_vc_mask: __gen_unuint(input[0], 17, 17) != 0,
rcz_pma_promoted_2_not_promoted_allocation_stall_optimization_disable_mask: __gen_unuint(input[0], 19, 19) != 0,
mcs_cache_disable_mask: __gen_unuint(input[0], 21, 21) != 0,
msc_raw_hazard_avoidance_bit_mask: __gen_unuint(input[0], 25, 25) != 0,
np_early_z_fails_disable_mask: __gen_unuint(input[0], 29, 29) != 0,
blend_optimization_fix_disable_mask: __gen_unuint(input[0], 30, 30) != 0,
color_compression_disable_mask: __gen_unuint(input[0], 31, 31) != 0,
}
}
}
impl Deserialize for CacheMode1 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct CacheModeSs {
pub instruction_level_1_cache_disable: bool,
pub instruction_level_1_cache_and_in_flight_queue_disable: bool,
pub float_blend_optimization_enable: bool,
pub per_sample_blend_opt_disable: bool,
pub instruction_level_1_cache_disable_mask: bool,
pub instruction_level_1_cache_and_in_flight_queue_disable_mask: bool,
pub float_blend_optimization_enable_mask: bool,
pub per_sample_blend_opt_disable_mask: bool,
}
impl CacheModeSs {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x0e420;
}
impl Default for CacheModeSs {
fn default() -> Self {
CacheModeSs {
instruction_level_1_cache_disable: Default::default(),
instruction_level_1_cache_and_in_flight_queue_disable: Default::default(),
float_blend_optimization_enable: Default::default(),
per_sample_blend_opt_disable: Default::default(),
instruction_level_1_cache_disable_mask: Default::default(),
instruction_level_1_cache_and_in_flight_queue_disable_mask: Default::default(),
float_blend_optimization_enable_mask: Default::default(),
per_sample_blend_opt_disable_mask: Default::default(),
}
}
}
impl Serialize for CacheModeSs {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.instruction_level_1_cache_disable.into(), 0, 0) |
__gen_uint(self.instruction_level_1_cache_and_in_flight_queue_disable.into(), 1, 1) |
__gen_uint(self.float_blend_optimization_enable.into(), 4, 4) |
__gen_uint(self.per_sample_blend_opt_disable.into(), 11, 11) |
__gen_uint(self.instruction_level_1_cache_disable_mask.into(), 16, 16) |
__gen_uint(self.instruction_level_1_cache_and_in_flight_queue_disable_mask.into(), 17, 17) |
__gen_uint(self.float_blend_optimization_enable_mask.into(), 20, 20) |
__gen_uint(self.per_sample_blend_opt_disable_mask.into(), 27, 27);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for CacheModeSs {
fn from(input: &[u32; 1]) -> Self {
CacheModeSs {
instruction_level_1_cache_disable: __gen_unuint(input[0], 0, 0) != 0,
instruction_level_1_cache_and_in_flight_queue_disable: __gen_unuint(input[0], 1, 1) != 0,
float_blend_optimization_enable: __gen_unuint(input[0], 4, 4) != 0,
per_sample_blend_opt_disable: __gen_unuint(input[0], 11, 11) != 0,
instruction_level_1_cache_disable_mask: __gen_unuint(input[0], 16, 16) != 0,
instruction_level_1_cache_and_in_flight_queue_disable_mask: __gen_unuint(input[0], 17, 17) != 0,
float_blend_optimization_enable_mask: __gen_unuint(input[0], 20, 20) != 0,
per_sample_blend_opt_disable_mask: __gen_unuint(input[0], 27, 27) != 0,
}
}
}
impl Deserialize for CacheModeSs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct CcViewport {
pub minimum_depth: f32,
pub maximum_depth: f32,
}
impl CcViewport {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for CcViewport {
fn default() -> Self {
CcViewport {
minimum_depth: Default::default(),
maximum_depth: Default::default(),
}
}
}
impl Serialize for CcViewport {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = self.minimum_depth.to_bits();
out[1] = self.maximum_depth.to_bits();
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for CcViewport {
fn from(input: &[u32; 2]) -> Self {
CcViewport {
minimum_depth: f32::from_bits(input[0]),
maximum_depth: f32::from_bits(input[1]),
}
}
}
impl Deserialize for CcViewport {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct ChromaFilterCoefficientsArray {
pub table_1x_filter_coefficient_n_2: f32,
pub table_1y_filter_coefficient_n_2: f32,
pub table_1x_filter_coefficient_n_3: f32,
pub table_1y_filter_coefficient_n_3: f32,
pub table_1x_filter_coefficient_n_4: f32,
pub table_1y_filter_coefficient_n_4: f32,
pub table_1x_filter_coefficient_n_5: f32,
pub table_1y_filter_coefficient_n_5: f32,
}
impl ChromaFilterCoefficientsArray {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for ChromaFilterCoefficientsArray {
fn default() -> Self {
ChromaFilterCoefficientsArray {
table_1x_filter_coefficient_n_2: Default::default(),
table_1y_filter_coefficient_n_2: Default::default(),
table_1x_filter_coefficient_n_3: Default::default(),
table_1y_filter_coefficient_n_3: Default::default(),
table_1x_filter_coefficient_n_4: Default::default(),
table_1y_filter_coefficient_n_4: Default::default(),
table_1x_filter_coefficient_n_5: Default::default(),
table_1y_filter_coefficient_n_5: Default::default(),
}
}
}
impl Serialize for ChromaFilterCoefficientsArray {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_sfixed(self.table_1x_filter_coefficient_n_2, 0, 7, 6) |
__gen_sfixed(self.table_1y_filter_coefficient_n_2, 8, 15, 6) |
__gen_sfixed(self.table_1x_filter_coefficient_n_3, 16, 23, 6) |
__gen_sfixed(self.table_1y_filter_coefficient_n_3, 24, 31, 6);
out[1] = __gen_sfixed(self.table_1x_filter_coefficient_n_4, 0, 7, 6) |
__gen_sfixed(self.table_1y_filter_coefficient_n_4, 8, 15, 6) |
__gen_sfixed(self.table_1x_filter_coefficient_n_5, 16, 23, 6) |
__gen_sfixed(self.table_1y_filter_coefficient_n_5, 24, 31, 6);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for ChromaFilterCoefficientsArray {
fn from(input: &[u32; 2]) -> Self {
ChromaFilterCoefficientsArray {
table_1x_filter_coefficient_n_2: __gen_unsfixed(input[0], 0, 7, 6),
table_1y_filter_coefficient_n_2: __gen_unsfixed(input[0], 8, 15, 6),
table_1x_filter_coefficient_n_3: __gen_unsfixed(input[0], 16, 23, 6),
table_1y_filter_coefficient_n_3: __gen_unsfixed(input[0], 24, 31, 6),
table_1x_filter_coefficient_n_4: __gen_unsfixed(input[1], 0, 7, 6),
table_1y_filter_coefficient_n_4: __gen_unsfixed(input[1], 8, 15, 6),
table_1x_filter_coefficient_n_5: __gen_unsfixed(input[1], 16, 23, 6),
table_1y_filter_coefficient_n_5: __gen_unsfixed(input[1], 24, 31, 6),
}
}
}
impl Deserialize for ChromaFilterCoefficientsArray {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct ClInvocationCount {
pub cl_invocation_count_report: u64,
}
impl ClInvocationCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2338;
}
impl Default for ClInvocationCount {
fn default() -> Self {
ClInvocationCount {
cl_invocation_count_report: Default::default(),
}
}
}
impl Serialize for ClInvocationCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.cl_invocation_count_report as u32, 0, 31);
out[1] = __gen_uint((self.cl_invocation_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for ClInvocationCount {
fn from(input: &[u32; 2]) -> Self {
ClInvocationCount {
cl_invocation_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for ClInvocationCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct ClPrimitivesCount {
pub cl_primitives_count_report: u64,
}
impl ClPrimitivesCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2340;
}
impl Default for ClPrimitivesCount {
fn default() -> Self {
ClPrimitivesCount {
cl_primitives_count_report: Default::default(),
}
}
}
impl Serialize for ClPrimitivesCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.cl_primitives_count_report as u32, 0, 31);
out[1] = __gen_uint((self.cl_primitives_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for ClPrimitivesCount {
fn from(input: &[u32; 2]) -> Self {
ClPrimitivesCount {
cl_primitives_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for ClPrimitivesCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct ClearColor {
pub raw_clear_color_red: i32,
pub raw_clear_color_green: i32,
pub raw_clear_color_blue: i32,
pub raw_clear_color_alpha: i32,
}
impl ClearColor {
pub const DWORD_LENGTH: u32 = 8;
}
impl Default for ClearColor {
fn default() -> Self {
ClearColor {
raw_clear_color_red: Default::default(),
raw_clear_color_green: Default::default(),
raw_clear_color_blue: Default::default(),
raw_clear_color_alpha: Default::default(),
}
}
}
impl Serialize for ClearColor {
type Out = [u32; 8];
fn pack_into(&self, out: &mut [u32; 8]) {
out[0] = __gen_uint(self.raw_clear_color_red as u32, 0, 31);
out[1] = __gen_uint(self.raw_clear_color_green as u32, 0, 31);
out[2] = __gen_uint(self.raw_clear_color_blue as u32, 0, 31);
out[3] = __gen_uint(self.raw_clear_color_alpha as u32, 0, 31);
out[4] = 0;
out[5] = 0;
out[6] = 0;
out[7] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 8];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 8] as *const [u8; 32]) })
}
}
impl From<&[u32; 8]> for ClearColor {
fn from(input: &[u32; 8]) -> Self {
ClearColor {
raw_clear_color_red: (__gen_unuint(input[0], 0, 31)) as i32,
raw_clear_color_green: (__gen_unuint(input[1], 0, 31)) as i32,
raw_clear_color_blue: (__gen_unuint(input[2], 0, 31)) as i32,
raw_clear_color_alpha: (__gen_unuint(input[3], 0, 31)) as i32,
}
}
}
impl Deserialize for ClearColor {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 8];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 8] as *mut [u8; 32]) })?;
Ok((&input).into())
}
}
pub struct ColorCalcState {
pub alpha_test_format: u32,
pub round_disable_function_disable: bool,
pub alpha_reference_value_as_unorm8: u32,
pub alpha_reference_value_as_float32: f32,
pub blend_constant_color_red: f32,
pub blend_constant_color_green: f32,
pub blend_constant_color_blue: f32,
pub blend_constant_color_alpha: f32,
}
impl ColorCalcState {
pub const DWORD_LENGTH: u32 = 6;
pub const ALPHATEST_FLOAT32: u32 = 1;
pub const ALPHATEST_UNORM8: u32 = 0;
}
impl Default for ColorCalcState {
fn default() -> Self {
ColorCalcState {
alpha_test_format: Default::default(),
round_disable_function_disable: Default::default(),
alpha_reference_value_as_unorm8: Default::default(),
alpha_reference_value_as_float32: Default::default(),
blend_constant_color_red: Default::default(),
blend_constant_color_green: Default::default(),
blend_constant_color_blue: Default::default(),
blend_constant_color_alpha: Default::default(),
}
}
}
impl Serialize for ColorCalcState {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.alpha_test_format, 0, 0) |
__gen_uint(self.round_disable_function_disable.into(), 15, 15);
out[1] = self.alpha_reference_value_as_float32.to_bits();
out[2] = self.blend_constant_color_red.to_bits();
out[3] = self.blend_constant_color_green.to_bits();
out[4] = self.blend_constant_color_blue.to_bits();
out[5] = self.blend_constant_color_alpha.to_bits();
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for ColorCalcState {
fn from(input: &[u32; 6]) -> Self {
ColorCalcState {
alpha_test_format: __gen_unuint(input[0], 0, 0),
round_disable_function_disable: __gen_unuint(input[0], 15, 15) != 0,
alpha_reference_value_as_unorm8: __gen_unuint(input[1], 0, 31),
alpha_reference_value_as_float32: f32::from_bits(input[1]),
blend_constant_color_red: f32::from_bits(input[2]),
blend_constant_color_green: f32::from_bits(input[3]),
blend_constant_color_blue: f32::from_bits(input[4]),
blend_constant_color_alpha: f32::from_bits(input[5]),
}
}
}
impl Deserialize for ColorCalcState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct CsChicken1 {
pub replay_mode: u32,
pub replay_mode_mask: bool,
}
impl CsChicken1 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x2580;
pub const MID_CMDBUFFER_PREEMPTION: u32 = 0;
pub const OBJECT_LEVEL_PREEMPTION: u32 = 1;
}
impl Default for CsChicken1 {
fn default() -> Self {
CsChicken1 {
replay_mode: Default::default(),
replay_mode_mask: Default::default(),
}
}
}
impl Serialize for CsChicken1 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.replay_mode, 0, 0) |
__gen_uint(self.replay_mode_mask.into(), 16, 16);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for CsChicken1 {
fn from(input: &[u32; 1]) -> Self {
CsChicken1 {
replay_mode: __gen_unuint(input[0], 0, 0),
replay_mode_mask: __gen_unuint(input[0], 16, 16) != 0,
}
}
}
impl Deserialize for CsChicken1 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct CsDebugMode2 {
pub _3d_rendering_instruction_disable: bool,
pub media_instruction_disable: bool,
pub constant_buffer_address_offset_disable: bool,
pub _3d_rendering_instruction_disable_mask: bool,
pub media_instruction_disable_mask: bool,
pub constant_buffer_address_offset_disable_mask: bool,
}
impl CsDebugMode2 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x20d8;
}
impl Default for CsDebugMode2 {
fn default() -> Self {
CsDebugMode2 {
_3d_rendering_instruction_disable: Default::default(),
media_instruction_disable: Default::default(),
constant_buffer_address_offset_disable: Default::default(),
_3d_rendering_instruction_disable_mask: Default::default(),
media_instruction_disable_mask: Default::default(),
constant_buffer_address_offset_disable_mask: Default::default(),
}
}
}
impl Serialize for CsDebugMode2 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self._3d_rendering_instruction_disable.into(), 0, 0) |
__gen_uint(self.media_instruction_disable.into(), 1, 1) |
__gen_uint(self.constant_buffer_address_offset_disable.into(), 4, 4) |
__gen_uint(self._3d_rendering_instruction_disable_mask.into(), 16, 16) |
__gen_uint(self.media_instruction_disable_mask.into(), 17, 17) |
__gen_uint(self.constant_buffer_address_offset_disable_mask.into(), 20, 20);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for CsDebugMode2 {
fn from(input: &[u32; 1]) -> Self {
CsDebugMode2 {
_3d_rendering_instruction_disable: __gen_unuint(input[0], 0, 0) != 0,
media_instruction_disable: __gen_unuint(input[0], 1, 1) != 0,
constant_buffer_address_offset_disable: __gen_unuint(input[0], 4, 4) != 0,
_3d_rendering_instruction_disable_mask: __gen_unuint(input[0], 16, 16) != 0,
media_instruction_disable_mask: __gen_unuint(input[0], 17, 17) != 0,
constant_buffer_address_offset_disable_mask: __gen_unuint(input[0], 20, 20) != 0,
}
}
}
impl Deserialize for CsDebugMode2 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct CsInvocationCount {
pub cs_invocation_count_report: u64,
}
impl CsInvocationCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2290;
}
impl Default for CsInvocationCount {
fn default() -> Self {
CsInvocationCount {
cs_invocation_count_report: Default::default(),
}
}
}
impl Serialize for CsInvocationCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.cs_invocation_count_report as u32, 0, 31);
out[1] = __gen_uint((self.cs_invocation_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for CsInvocationCount {
fn from(input: &[u32; 2]) -> Self {
CsInvocationCount {
cs_invocation_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for CsInvocationCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct DsInvocationCount {
pub ds_invocation_count_report: u64,
}
impl DsInvocationCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2308;
}
impl Default for DsInvocationCount {
fn default() -> Self {
DsInvocationCount {
ds_invocation_count_report: Default::default(),
}
}
}
impl Serialize for DsInvocationCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.ds_invocation_count_report as u32, 0, 31);
out[1] = __gen_uint((self.ds_invocation_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for DsInvocationCount {
fn from(input: &[u32; 2]) -> Self {
DsInvocationCount {
ds_invocation_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for DsInvocationCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct ExecutionUnitExtendedMessageDescriptor {
pub target_function_id: u32,
pub end_of_thread: u32,
pub extended_message_length: u32,
}
impl ExecutionUnitExtendedMessageDescriptor {
pub const DWORD_LENGTH: u32 = 1;
pub const EOT: u32 = 1;
pub const NO_TERMINATION: u32 = 0;
}
impl Default for ExecutionUnitExtendedMessageDescriptor {
fn default() -> Self {
ExecutionUnitExtendedMessageDescriptor {
target_function_id: Default::default(),
end_of_thread: Default::default(),
extended_message_length: Default::default(),
}
}
}
impl Serialize for ExecutionUnitExtendedMessageDescriptor {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.target_function_id, 0, 3) |
__gen_uint(self.end_of_thread, 5, 5) |
__gen_uint(self.extended_message_length, 6, 9);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for ExecutionUnitExtendedMessageDescriptor {
fn from(input: &[u32; 1]) -> Self {
ExecutionUnitExtendedMessageDescriptor {
target_function_id: __gen_unuint(input[0], 0, 3),
end_of_thread: __gen_unuint(input[0], 5, 5),
extended_message_length: __gen_unuint(input[0], 6, 9),
}
}
}
impl Deserialize for ExecutionUnitExtendedMessageDescriptor {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct FilterCoefficient {
pub filter_coefficient: f32,
}
impl FilterCoefficient {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for FilterCoefficient {
fn default() -> Self {
FilterCoefficient {
filter_coefficient: Default::default(),
}
}
}
impl Serialize for FilterCoefficient {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_sfixed(self.filter_coefficient, 0, 7, 6);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for FilterCoefficient {
fn from(input: &[u32; 1]) -> Self {
FilterCoefficient {
filter_coefficient: __gen_unsfixed(input[0], 0, 7, 6),
}
}
}
impl Deserialize for FilterCoefficient {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct Framedeltaqp {
pub frame_delta_qp: [i32; 8],
}
impl Framedeltaqp {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for Framedeltaqp {
fn default() -> Self {
Framedeltaqp {
frame_delta_qp: Default::default(),
}
}
}
impl Serialize for Framedeltaqp {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.frame_delta_qp[0] as u32, 0, 7) |
__gen_uint(self.frame_delta_qp[1] as u32, 8, 15) |
__gen_uint(self.frame_delta_qp[2] as u32, 16, 23) |
__gen_uint(self.frame_delta_qp[3] as u32, 24, 31);
out[1] = __gen_uint(self.frame_delta_qp[4] as u32, 0, 7) |
__gen_uint(self.frame_delta_qp[5] as u32, 8, 15) |
__gen_uint(self.frame_delta_qp[6] as u32, 16, 23) |
__gen_uint(self.frame_delta_qp[7] as u32, 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for Framedeltaqp {
fn from(input: &[u32; 2]) -> Self {
Framedeltaqp {
frame_delta_qp: [
(__gen_unuint(input[0], 0, 7)) as i32,
(__gen_unuint(input[0], 8, 15)) as i32,
(__gen_unuint(input[0], 16, 23)) as i32,
(__gen_unuint(input[0], 24, 31)) as i32,
(__gen_unuint(input[1], 0, 7)) as i32,
(__gen_unuint(input[1], 8, 15)) as i32,
(__gen_unuint(input[1], 16, 23)) as i32,
(__gen_unuint(input[1], 24, 31)) as i32
],
}
}
}
impl Deserialize for Framedeltaqp {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct Framedeltaqprange {
pub frame_delta_qp_range: [u32; 8],
}
impl Framedeltaqprange {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for Framedeltaqprange {
fn default() -> Self {
Framedeltaqprange {
frame_delta_qp_range: Default::default(),
}
}
}
impl Serialize for Framedeltaqprange {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.frame_delta_qp_range[0], 0, 7) |
__gen_uint(self.frame_delta_qp_range[1], 8, 15) |
__gen_uint(self.frame_delta_qp_range[2], 16, 23) |
__gen_uint(self.frame_delta_qp_range[3], 24, 31);
out[1] = __gen_uint(self.frame_delta_qp_range[4], 0, 7) |
__gen_uint(self.frame_delta_qp_range[5], 8, 15) |
__gen_uint(self.frame_delta_qp_range[6], 16, 23) |
__gen_uint(self.frame_delta_qp_range[7], 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for Framedeltaqprange {
fn from(input: &[u32; 2]) -> Self {
Framedeltaqprange {
frame_delta_qp_range: [
__gen_unuint(input[0], 0, 7),
__gen_unuint(input[0], 8, 15),
__gen_unuint(input[0], 16, 23),
__gen_unuint(input[0], 24, 31),
__gen_unuint(input[1], 0, 7),
__gen_unuint(input[1], 8, 15),
__gen_unuint(input[1], 16, 23),
__gen_unuint(input[1], 24, 31)
],
}
}
}
impl Deserialize for Framedeltaqprange {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct GatherConstantEntry {
pub binding_table_index_offset: u32,
pub channel_mask: u32,
pub constant_buffer_offset: u64,
}
impl GatherConstantEntry {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for GatherConstantEntry {
fn default() -> Self {
GatherConstantEntry {
binding_table_index_offset: Default::default(),
channel_mask: Default::default(),
constant_buffer_offset: Default::default(),
}
}
}
impl Serialize for GatherConstantEntry {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.binding_table_index_offset, 0, 3) |
__gen_uint(self.channel_mask, 4, 7) |
__gen_offset(self.constant_buffer_offset as u32, 8, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for GatherConstantEntry {
fn from(input: &[u32; 1]) -> Self {
GatherConstantEntry {
binding_table_index_offset: __gen_unuint(input[0], 0, 3),
channel_mask: __gen_unuint(input[0], 4, 7),
constant_buffer_offset: (__gen_unuint(input[0], 8, 15) as u64) << 8,
}
}
}
impl Deserialize for GatherConstantEntry {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct GpgpuWalker {
pub dword_length: u32,
pub predicate_enable: bool,
pub indirect_parameter_enable: bool,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub interface_descriptor_offset: u32,
pub indirect_data_length: u32,
pub indirect_data_start_address: u64,
pub thread_width_counter_maximum: u32,
pub thread_height_counter_maximum: u32,
pub thread_depth_counter_maximum: u32,
pub simd_size: u32,
pub thread_group_id_starting_x: u32,
pub thread_group_id_x_dimension: u32,
pub thread_group_id_starting_y: u32,
pub thread_group_id_y_dimension: u32,
pub thread_group_id_starting_resume_z: u32,
pub thread_group_id_z_dimension: u32,
pub right_execution_mask: u32,
pub bottom_execution_mask: u32,
}
impl GpgpuWalker {
pub const DWORD_LENGTH: u32 = 15;
pub const SIMD16: u32 = 1;
pub const SIMD32: u32 = 2;
pub const SIMD8: u32 = 0;
}
impl Default for GpgpuWalker {
fn default() -> Self {
GpgpuWalker {
dword_length: 13,
predicate_enable: Default::default(),
indirect_parameter_enable: Default::default(),
subopcode: 5,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
interface_descriptor_offset: Default::default(),
indirect_data_length: Default::default(),
indirect_data_start_address: Default::default(),
thread_width_counter_maximum: Default::default(),
thread_height_counter_maximum: Default::default(),
thread_depth_counter_maximum: Default::default(),
simd_size: Default::default(),
thread_group_id_starting_x: Default::default(),
thread_group_id_x_dimension: Default::default(),
thread_group_id_starting_y: Default::default(),
thread_group_id_y_dimension: Default::default(),
thread_group_id_starting_resume_z: Default::default(),
thread_group_id_z_dimension: Default::default(),
right_execution_mask: Default::default(),
bottom_execution_mask: Default::default(),
}
}
}
impl Serialize for GpgpuWalker {
type Out = [u32; 15];
fn pack_into(&self, out: &mut [u32; 15]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.predicate_enable.into(), 8, 8) |
__gen_uint(self.indirect_parameter_enable.into(), 10, 10) |
__gen_uint(self.subopcode, 16, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.interface_descriptor_offset, 0, 5);
out[2] = __gen_uint(self.indirect_data_length, 0, 16);
out[3] = __gen_offset(self.indirect_data_start_address as u32, 6, 31);
out[4] = __gen_uint(self.thread_width_counter_maximum, 0, 5) |
__gen_uint(self.thread_height_counter_maximum, 8, 13) |
__gen_uint(self.thread_depth_counter_maximum, 16, 21) |
__gen_uint(self.simd_size, 30, 31);
out[5] = __gen_uint(self.thread_group_id_starting_x, 0, 31);
out[6] = 0;
out[7] = __gen_uint(self.thread_group_id_x_dimension, 0, 31);
out[8] = __gen_uint(self.thread_group_id_starting_y, 0, 31);
out[9] = 0;
out[10] = __gen_uint(self.thread_group_id_y_dimension, 0, 31);
out[11] = __gen_uint(self.thread_group_id_starting_resume_z, 0, 31);
out[12] = __gen_uint(self.thread_group_id_z_dimension, 0, 31);
out[13] = __gen_uint(self.right_execution_mask, 0, 31);
out[14] = __gen_uint(self.bottom_execution_mask, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 15];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 15] as *const [u8; 60]) })
}
}
impl From<&[u32; 15]> for GpgpuWalker {
fn from(input: &[u32; 15]) -> Self {
GpgpuWalker {
dword_length: __gen_unuint(input[0], 0, 7),
predicate_enable: __gen_unuint(input[0], 8, 8) != 0,
indirect_parameter_enable: __gen_unuint(input[0], 10, 10) != 0,
subopcode: __gen_unuint(input[0], 16, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
interface_descriptor_offset: __gen_unuint(input[1], 0, 5),
indirect_data_length: __gen_unuint(input[2], 0, 16),
indirect_data_start_address: (__gen_unuint(input[3], 6, 31) as u64) << 6,
thread_width_counter_maximum: __gen_unuint(input[4], 0, 5),
thread_height_counter_maximum: __gen_unuint(input[4], 8, 13),
thread_depth_counter_maximum: __gen_unuint(input[4], 16, 21),
simd_size: __gen_unuint(input[4], 30, 31),
thread_group_id_starting_x: __gen_unuint(input[5], 0, 31),
thread_group_id_x_dimension: __gen_unuint(input[7], 0, 31),
thread_group_id_starting_y: __gen_unuint(input[8], 0, 31),
thread_group_id_y_dimension: __gen_unuint(input[10], 0, 31),
thread_group_id_starting_resume_z: __gen_unuint(input[11], 0, 31),
thread_group_id_z_dimension: __gen_unuint(input[12], 0, 31),
right_execution_mask: __gen_unuint(input[13], 0, 31),
bottom_execution_mask: __gen_unuint(input[14], 0, 31),
}
}
}
impl Deserialize for GpgpuWalker {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 15];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 15] as *mut [u8; 60]) })?;
Ok((&input).into())
}
}
pub struct GsInvocationCount {
pub gs_invocation_count_report: u64,
}
impl GsInvocationCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2328;
}
impl Default for GsInvocationCount {
fn default() -> Self {
GsInvocationCount {
gs_invocation_count_report: Default::default(),
}
}
}
impl Serialize for GsInvocationCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.gs_invocation_count_report as u32, 0, 31);
out[1] = __gen_uint((self.gs_invocation_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for GsInvocationCount {
fn from(input: &[u32; 2]) -> Self {
GsInvocationCount {
gs_invocation_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for GsInvocationCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct GsPrimitivesCount {
pub gs_primitives_count_report: u64,
}
impl GsPrimitivesCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2330;
}
impl Default for GsPrimitivesCount {
fn default() -> Self {
GsPrimitivesCount {
gs_primitives_count_report: Default::default(),
}
}
}
impl Serialize for GsPrimitivesCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.gs_primitives_count_report as u32, 0, 31);
out[1] = __gen_uint((self.gs_primitives_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for GsPrimitivesCount {
fn from(input: &[u32; 2]) -> Self {
GsPrimitivesCount {
gs_primitives_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for GsPrimitivesCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct HcpBsdObject {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_bsd_data_length: u32,
pub indirect_bsd_data_start_address: u64,
}
impl HcpBsdObject {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for HcpBsdObject {
fn default() -> Self {
HcpBsdObject {
dword_length: Default::default(),
subopcode: 32,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
indirect_bsd_data_length: Default::default(),
indirect_bsd_data_start_address: Default::default(),
}
}
}
impl Serialize for HcpBsdObject {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_bsd_data_length, 0, 31);
out[2] = __gen_offset(self.indirect_bsd_data_start_address as u32, 0, 28);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for HcpBsdObject {
fn from(input: &[u32; 3]) -> Self {
HcpBsdObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_bsd_data_length: __gen_unuint(input[1], 0, 31),
indirect_bsd_data_start_address: (__gen_unuint(input[2], 0, 28) as u64),
}
}
}
impl Deserialize for HcpBsdObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct HcpFqmState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub intra_inter: u32,
pub sizeid: u32,
pub color_component: u32,
pub fqm_dc_value: u32,
pub quantizer_matrix_8x8: [u32; 64],
}
impl HcpFqmState {
pub const DWORD_LENGTH: u32 = 34;
pub const CHROMA_CB: u32 = 1;
pub const CHROMA_CR: u32 = 2;
pub const INTER: u32 = 1;
pub const INTRA: u32 = 0;
pub const LUMA: u32 = 0;
pub const _16X16: u32 = 2;
pub const _32X32: u32 = 3;
pub const _4X4: u32 = 0;
pub const _8X8: u32 = 1;
}
impl Default for HcpFqmState {
fn default() -> Self {
HcpFqmState {
dword_length: Default::default(),
subopcode: 5,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
intra_inter: Default::default(),
sizeid: Default::default(),
color_component: Default::default(),
fqm_dc_value: Default::default(),
quantizer_matrix_8x8: [0; 64],
}
}
}
impl Serialize for HcpFqmState {
type Out = [u32; 34];
fn pack_into(&self, out: &mut [u32; 34]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.intra_inter, 0, 0) |
__gen_uint(self.sizeid, 1, 2) |
__gen_uint(self.color_component, 3, 4) |
__gen_uint(self.fqm_dc_value, 16, 31);
out[2] = __gen_uint(self.quantizer_matrix_8x8[0], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[1], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[2], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[3], 24, 31);
out[3] = __gen_uint(self.quantizer_matrix_8x8[4], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[5], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[6], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[7], 24, 31);
out[4] = __gen_uint(self.quantizer_matrix_8x8[8], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[9], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[10], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[11], 24, 31);
out[5] = __gen_uint(self.quantizer_matrix_8x8[12], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[13], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[14], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[15], 24, 31);
out[6] = __gen_uint(self.quantizer_matrix_8x8[16], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[17], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[18], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[19], 24, 31);
out[7] = __gen_uint(self.quantizer_matrix_8x8[20], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[21], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[22], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[23], 24, 31);
out[8] = __gen_uint(self.quantizer_matrix_8x8[24], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[25], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[26], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[27], 24, 31);
out[9] = __gen_uint(self.quantizer_matrix_8x8[28], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[29], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[30], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[31], 24, 31);
out[10] = __gen_uint(self.quantizer_matrix_8x8[32], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[33], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[34], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[35], 24, 31);
out[11] = __gen_uint(self.quantizer_matrix_8x8[36], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[37], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[38], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[39], 24, 31);
out[12] = __gen_uint(self.quantizer_matrix_8x8[40], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[41], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[42], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[43], 24, 31);
out[13] = __gen_uint(self.quantizer_matrix_8x8[44], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[45], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[46], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[47], 24, 31);
out[14] = __gen_uint(self.quantizer_matrix_8x8[48], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[49], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[50], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[51], 24, 31);
out[15] = __gen_uint(self.quantizer_matrix_8x8[52], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[53], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[54], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[55], 24, 31);
out[16] = __gen_uint(self.quantizer_matrix_8x8[56], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[57], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[58], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[59], 24, 31);
out[17] = __gen_uint(self.quantizer_matrix_8x8[60], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[61], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[62], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[63], 24, 31);
out[18] = 0;
out[19] = 0;
out[20] = 0;
out[21] = 0;
out[22] = 0;
out[23] = 0;
out[24] = 0;
out[25] = 0;
out[26] = 0;
out[27] = 0;
out[28] = 0;
out[29] = 0;
out[30] = 0;
out[31] = 0;
out[32] = 0;
out[33] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 34];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 34] as *const [u8; 136]) })
}
}
impl From<&[u32; 34]> for HcpFqmState {
fn from(input: &[u32; 34]) -> Self {
HcpFqmState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
intra_inter: __gen_unuint(input[1], 0, 0),
sizeid: __gen_unuint(input[1], 1, 2),
color_component: __gen_unuint(input[1], 3, 4),
fqm_dc_value: __gen_unuint(input[1], 16, 31),
quantizer_matrix_8x8: [
__gen_unuint(input[2], 0, 7),
__gen_unuint(input[2], 8, 15),
__gen_unuint(input[2], 16, 23),
__gen_unuint(input[2], 24, 31),
__gen_unuint(input[3], 0, 7),
__gen_unuint(input[3], 8, 15),
__gen_unuint(input[3], 16, 23),
__gen_unuint(input[3], 24, 31),
__gen_unuint(input[4], 0, 7),
__gen_unuint(input[4], 8, 15),
__gen_unuint(input[4], 16, 23),
__gen_unuint(input[4], 24, 31),
__gen_unuint(input[5], 0, 7),
__gen_unuint(input[5], 8, 15),
__gen_unuint(input[5], 16, 23),
__gen_unuint(input[5], 24, 31),
__gen_unuint(input[6], 0, 7),
__gen_unuint(input[6], 8, 15),
__gen_unuint(input[6], 16, 23),
__gen_unuint(input[6], 24, 31),
__gen_unuint(input[7], 0, 7),
__gen_unuint(input[7], 8, 15),
__gen_unuint(input[7], 16, 23),
__gen_unuint(input[7], 24, 31),
__gen_unuint(input[8], 0, 7),
__gen_unuint(input[8], 8, 15),
__gen_unuint(input[8], 16, 23),
__gen_unuint(input[8], 24, 31),
__gen_unuint(input[9], 0, 7),
__gen_unuint(input[9], 8, 15),
__gen_unuint(input[9], 16, 23),
__gen_unuint(input[9], 24, 31),
__gen_unuint(input[10], 0, 7),
__gen_unuint(input[10], 8, 15),
__gen_unuint(input[10], 16, 23),
__gen_unuint(input[10], 24, 31),
__gen_unuint(input[11], 0, 7),
__gen_unuint(input[11], 8, 15),
__gen_unuint(input[11], 16, 23),
__gen_unuint(input[11], 24, 31),
__gen_unuint(input[12], 0, 7),
__gen_unuint(input[12], 8, 15),
__gen_unuint(input[12], 16, 23),
__gen_unuint(input[12], 24, 31),
__gen_unuint(input[13], 0, 7),
__gen_unuint(input[13], 8, 15),
__gen_unuint(input[13], 16, 23),
__gen_unuint(input[13], 24, 31),
__gen_unuint(input[14], 0, 7),
__gen_unuint(input[14], 8, 15),
__gen_unuint(input[14], 16, 23),
__gen_unuint(input[14], 24, 31),
__gen_unuint(input[15], 0, 7),
__gen_unuint(input[15], 8, 15),
__gen_unuint(input[15], 16, 23),
__gen_unuint(input[15], 24, 31),
__gen_unuint(input[16], 0, 7),
__gen_unuint(input[16], 8, 15),
__gen_unuint(input[16], 16, 23),
__gen_unuint(input[16], 24, 31),
__gen_unuint(input[17], 0, 7),
__gen_unuint(input[17], 8, 15),
__gen_unuint(input[17], 16, 23),
__gen_unuint(input[17], 24, 31)
],
}
}
}
impl Deserialize for HcpFqmState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 34];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 34] as *mut [u8; 136]) })?;
Ok((&input).into())
}
}
pub struct HcpIndObjBaseAddrState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub hcp_indirect_bitstream_object_base_address: A,
pub hcp_indirect_bitstream_object_memory_address_attributes: Memoryaddressattributes,
pub hcp_indirect_bitstream_object_access_upper_bound: A,
pub hcp_indirect_cu_object_base_address: A,
pub hcp_indirect_cu_object_memory_address_attributes: Memoryaddressattributes,
pub hcp_pak_bse_object_base_address: A,
pub hcp_pak_bse_object_memory_address_attributes: Memoryaddressattributes,
pub hcp_pak_bse_object_access_upper_bound: A,
pub hcp_vp9_pak_compressed_header_syntax_stream_in_base_address: A,
pub hcp_vp9_pak_compressed_header_syntax_stream_in_memory_address_attributes: Memoryaddressattributes,
pub hcp_vp9_pak_probability_counter_stream_out_base_address: A,
pub hcp_vp9_pak_probability_counter_stream_out_memory_address_attributes: Memoryaddressattributes,
pub hcp_vp9_pak_probability_deltas_stream_in_base_address: A,
pub hcp_vp9_pak_probability_deltas_stream_in_memory_address_attributes: Memoryaddressattributes,
pub hcp_vp9_pak_tile_record_stream_out_base_address: A,
pub hcp_vp9_pak_tile_record_stream_out_memory_address_attributes: Memoryaddressattributes,
pub hcp_vp9_pak_cu_level_statistic_stream_out_base_address: A,
pub hcp_vp9_pak_cu_level_statistic_stream_out_memory_address_attributes: Memoryaddressattributes,
}
impl<A: Addr + Default> HcpIndObjBaseAddrState<A> {
pub const DWORD_LENGTH: u32 = 29;
}
impl<A: Addr + Default> Default for HcpIndObjBaseAddrState<A> {
fn default() -> Self {
HcpIndObjBaseAddrState {
dword_length: Default::default(),
subopcode: 3,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
hcp_indirect_bitstream_object_base_address: Default::default(),
hcp_indirect_bitstream_object_memory_address_attributes: Default::default(),
hcp_indirect_bitstream_object_access_upper_bound: Default::default(),
hcp_indirect_cu_object_base_address: Default::default(),
hcp_indirect_cu_object_memory_address_attributes: Default::default(),
hcp_pak_bse_object_base_address: Default::default(),
hcp_pak_bse_object_memory_address_attributes: Default::default(),
hcp_pak_bse_object_access_upper_bound: Default::default(),
hcp_vp9_pak_compressed_header_syntax_stream_in_base_address: Default::default(),
hcp_vp9_pak_compressed_header_syntax_stream_in_memory_address_attributes: Default::default(),
hcp_vp9_pak_probability_counter_stream_out_base_address: Default::default(),
hcp_vp9_pak_probability_counter_stream_out_memory_address_attributes: Default::default(),
hcp_vp9_pak_probability_deltas_stream_in_base_address: Default::default(),
hcp_vp9_pak_probability_deltas_stream_in_memory_address_attributes: Default::default(),
hcp_vp9_pak_tile_record_stream_out_base_address: Default::default(),
hcp_vp9_pak_tile_record_stream_out_memory_address_attributes: Default::default(),
hcp_vp9_pak_cu_level_statistic_stream_out_base_address: Default::default(),
hcp_vp9_pak_cu_level_statistic_stream_out_memory_address_attributes: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for HcpIndObjBaseAddrState<A> {
type Out = [u32; 29];
fn pack_into(&self, out: &mut [u32; 29]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.hcp_indirect_bitstream_object_base_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.hcp_indirect_bitstream_object_memory_address_attributes.pack_into(out3);
}
let v4_address = self.hcp_indirect_bitstream_object_access_upper_bound.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
let v6_address = self.hcp_indirect_cu_object_base_address.combine(0);
out[6] = v6_address as u32;
out[7] = (v6_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, ref mut out8 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.hcp_indirect_cu_object_memory_address_attributes.pack_into(out8);
}
let v9_address = self.hcp_pak_bse_object_base_address.combine(0);
out[9] = v9_address as u32;
out[10] = (v9_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, ref mut out11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.hcp_pak_bse_object_memory_address_attributes.pack_into(out11);
}
let v12_address = self.hcp_pak_bse_object_access_upper_bound.combine(0);
out[12] = v12_address as u32;
out[13] = (v12_address >> 32) as u32;
let v14_address = self.hcp_vp9_pak_compressed_header_syntax_stream_in_base_address.combine(0);
out[14] = v14_address as u32;
out[15] = (v14_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out16 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.hcp_vp9_pak_compressed_header_syntax_stream_in_memory_address_attributes.pack_into(out16);
}
let v17_address = self.hcp_vp9_pak_probability_counter_stream_out_base_address.combine(0);
out[17] = v17_address as u32;
out[18] = (v17_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out19 @ .., _, _, _, _, _, _, _, _, _] = out;
self.hcp_vp9_pak_probability_counter_stream_out_memory_address_attributes.pack_into(out19);
}
let v20_address = self.hcp_vp9_pak_probability_deltas_stream_in_base_address.combine(0);
out[20] = v20_address as u32;
out[21] = (v20_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out22 @ .., _, _, _, _, _, _] = out;
self.hcp_vp9_pak_probability_deltas_stream_in_memory_address_attributes.pack_into(out22);
}
let v23_address = self.hcp_vp9_pak_tile_record_stream_out_base_address.combine(0);
out[23] = v23_address as u32;
out[24] = (v23_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out25 @ .., _, _, _] = out;
self.hcp_vp9_pak_tile_record_stream_out_memory_address_attributes.pack_into(out25);
}
let v26_address = self.hcp_vp9_pak_cu_level_statistic_stream_out_base_address.combine(0);
out[26] = v26_address as u32;
out[27] = (v26_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out28 @ ..] = out;
self.hcp_vp9_pak_cu_level_statistic_stream_out_memory_address_attributes.pack_into(out28);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 29];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 29] as *const [u8; 116]) })
}
}
impl From<&[u32; 29]> for HcpIndObjBaseAddrState<u64> {
fn from(input: &[u32; 29]) -> Self {
HcpIndObjBaseAddrState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
hcp_indirect_bitstream_object_base_address: (__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
hcp_indirect_bitstream_object_memory_address_attributes: {{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in3.into()
}},
hcp_indirect_bitstream_object_access_upper_bound: (__gen_unuint(input[4], 0, 31) as u64) |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
hcp_indirect_cu_object_base_address: (__gen_unuint(input[6], 0, 31) as u64) |
(__gen_unuint(input[7], 0, 31) as u64) << 32,
hcp_indirect_cu_object_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, ref in8 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in8.into()
}},
hcp_pak_bse_object_base_address: (__gen_unuint(input[9], 0, 31) as u64) |
(__gen_unuint(input[10], 0, 31) as u64) << 32,
hcp_pak_bse_object_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, ref in11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in11.into()
}},
hcp_pak_bse_object_access_upper_bound: (__gen_unuint(input[12], 0, 31) as u64) |
(__gen_unuint(input[13], 0, 31) as u64) << 32,
hcp_vp9_pak_compressed_header_syntax_stream_in_base_address: (__gen_unuint(input[14], 0, 31) as u64) |
(__gen_unuint(input[15], 0, 31) as u64) << 32,
hcp_vp9_pak_compressed_header_syntax_stream_in_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in16 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = input;
in16.into()
}},
hcp_vp9_pak_probability_counter_stream_out_base_address: (__gen_unuint(input[17], 0, 31) as u64) |
(__gen_unuint(input[18], 0, 31) as u64) << 32,
hcp_vp9_pak_probability_counter_stream_out_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in19 @ .., _, _, _, _, _, _, _, _, _] = input;
in19.into()
}},
hcp_vp9_pak_probability_deltas_stream_in_base_address: (__gen_unuint(input[20], 0, 31) as u64) |
(__gen_unuint(input[21], 0, 31) as u64) << 32,
hcp_vp9_pak_probability_deltas_stream_in_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in22 @ .., _, _, _, _, _, _] = input;
in22.into()
}},
hcp_vp9_pak_tile_record_stream_out_base_address: (__gen_unuint(input[23], 0, 31) as u64) |
(__gen_unuint(input[24], 0, 31) as u64) << 32,
hcp_vp9_pak_tile_record_stream_out_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in25 @ .., _, _, _] = input;
in25.into()
}},
hcp_vp9_pak_cu_level_statistic_stream_out_base_address: (__gen_unuint(input[26], 0, 31) as u64) |
(__gen_unuint(input[27], 0, 31) as u64) << 32,
hcp_vp9_pak_cu_level_statistic_stream_out_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in28 @ ..] = input;
in28.into()
}},
}
}
}
impl Deserialize for HcpIndObjBaseAddrState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 29];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 29] as *mut [u8; 116]) })?;
Ok((&input).into())
}
}
pub struct HcpPakInsertObject {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub end_of_slice: bool,
pub last_header: bool,
pub emulation_byte_bits_insert_enable: bool,
pub skip_emulation_byte_count: u32,
pub data_bits_in_last_dw: u32,
pub slice_header_indicator: bool,
pub header_length_excluded_from_size: u32,
pub data_byte_offset: u32,
pub indirect_payload_enable: bool,
}
impl HcpPakInsertObject {
pub const DWORD_LENGTH: u32 = 2;
pub const ACCUMULATE: u32 = 0;
pub const NO_ACCUMULATION: u32 = 1;
}
impl Default for HcpPakInsertObject {
fn default() -> Self {
HcpPakInsertObject {
dword_length: 0,
subopcode: 34,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
end_of_slice: Default::default(),
last_header: Default::default(),
emulation_byte_bits_insert_enable: Default::default(),
skip_emulation_byte_count: Default::default(),
data_bits_in_last_dw: Default::default(),
slice_header_indicator: Default::default(),
header_length_excluded_from_size: Default::default(),
data_byte_offset: Default::default(),
indirect_payload_enable: Default::default(),
}
}
}
impl Serialize for HcpPakInsertObject {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.end_of_slice.into(), 1, 1) |
__gen_uint(self.last_header.into(), 2, 2) |
__gen_uint(self.emulation_byte_bits_insert_enable.into(), 3, 3) |
__gen_uint(self.skip_emulation_byte_count, 4, 7) |
__gen_uint(self.data_bits_in_last_dw, 8, 13) |
__gen_uint(self.slice_header_indicator.into(), 14, 14) |
__gen_uint(self.header_length_excluded_from_size, 15, 15) |
__gen_uint(self.data_byte_offset, 16, 17) |
__gen_uint(self.indirect_payload_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for HcpPakInsertObject {
fn from(input: &[u32; 2]) -> Self {
HcpPakInsertObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
end_of_slice: __gen_unuint(input[1], 1, 1) != 0,
last_header: __gen_unuint(input[1], 2, 2) != 0,
emulation_byte_bits_insert_enable: __gen_unuint(input[1], 3, 3) != 0,
skip_emulation_byte_count: __gen_unuint(input[1], 4, 7),
data_bits_in_last_dw: __gen_unuint(input[1], 8, 13),
slice_header_indicator: __gen_unuint(input[1], 14, 14) != 0,
header_length_excluded_from_size: __gen_unuint(input[1], 15, 15),
data_byte_offset: __gen_unuint(input[1], 16, 17),
indirect_payload_enable: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for HcpPakInsertObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct HcpPakInsertObjectIndirectPayload<A: Addr + Default> {
pub indirect_payload_data_size_in_bits: u32,
pub indirect_payload_base_address: A,
pub indirect_payload_base_address2: Memoryaddressattributes,
}
impl<A: Addr + Default> HcpPakInsertObjectIndirectPayload<A> {
pub const DWORD_LENGTH: u32 = 4;
}
impl<A: Addr + Default> Default for HcpPakInsertObjectIndirectPayload<A> {
fn default() -> Self {
HcpPakInsertObjectIndirectPayload {
indirect_payload_data_size_in_bits: Default::default(),
indirect_payload_base_address: Default::default(),
indirect_payload_base_address2: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for HcpPakInsertObjectIndirectPayload<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.indirect_payload_data_size_in_bits, 0, 31);
let v1_address = self.indirect_payload_base_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ ..] = out;
self.indirect_payload_base_address2.pack_into(out3);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for HcpPakInsertObjectIndirectPayload<u64> {
fn from(input: &[u32; 4]) -> Self {
HcpPakInsertObjectIndirectPayload {
indirect_payload_data_size_in_bits: __gen_unuint(input[0], 0, 31),
indirect_payload_base_address: (__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
indirect_payload_base_address2: {{
let [_, _, _, ref in3 @ ..] = input;
in3.into()
}},
}
}
}
impl Deserialize for HcpPakInsertObjectIndirectPayload<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct HcpPakObject {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub split_level_2_part_0: u32,
pub split_level_2_part_1: u32,
pub split_level_2_part_2: u32,
pub split_level_2_part_3: u32,
pub split_level_1: u32,
pub split_level_0: u32,
pub cu_count: u32,
pub last_lcu_of_tile: bool,
pub last_lcu_of_slice: bool,
pub current_lcu_x_address: u32,
pub current_lcu_y_address: u32,
pub estimated_lcu_size: u32,
pub sse_classid_32x32_0: u32,
pub sse_classid_32x32_1: u32,
pub sse_classid_32x32_2: u32,
pub sse_classid_32x32_3: u32,
pub lcu_force_zero_coeff: bool,
}
impl HcpPakObject {
pub const DWORD_LENGTH: u32 = 5;
}
impl Default for HcpPakObject {
fn default() -> Self {
HcpPakObject {
dword_length: Default::default(),
subopcode: 33,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
split_level_2_part_0: Default::default(),
split_level_2_part_1: Default::default(),
split_level_2_part_2: Default::default(),
split_level_2_part_3: Default::default(),
split_level_1: Default::default(),
split_level_0: Default::default(),
cu_count: Default::default(),
last_lcu_of_tile: Default::default(),
last_lcu_of_slice: Default::default(),
current_lcu_x_address: Default::default(),
current_lcu_y_address: Default::default(),
estimated_lcu_size: Default::default(),
sse_classid_32x32_0: Default::default(),
sse_classid_32x32_1: Default::default(),
sse_classid_32x32_2: Default::default(),
sse_classid_32x32_3: Default::default(),
lcu_force_zero_coeff: Default::default(),
}
}
}
impl Serialize for HcpPakObject {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.split_level_2_part_0, 0, 3) |
__gen_uint(self.split_level_2_part_1, 4, 7) |
__gen_uint(self.split_level_2_part_2, 8, 11) |
__gen_uint(self.split_level_2_part_3, 12, 15) |
__gen_uint(self.split_level_1, 16, 19) |
__gen_uint(self.split_level_0, 20, 20) |
__gen_uint(self.cu_count, 24, 29) |
__gen_uint(self.last_lcu_of_tile.into(), 30, 30) |
__gen_uint(self.last_lcu_of_slice.into(), 31, 31);
out[2] = __gen_uint(self.current_lcu_x_address, 0, 15) |
__gen_uint(self.current_lcu_y_address, 16, 31);
out[3] = __gen_uint(self.estimated_lcu_size, 0, 31);
out[4] = __gen_uint(self.sse_classid_32x32_0, 0, 3) |
__gen_uint(self.sse_classid_32x32_1, 4, 7) |
__gen_uint(self.sse_classid_32x32_2, 8, 11) |
__gen_uint(self.sse_classid_32x32_3, 12, 15) |
__gen_uint(self.lcu_force_zero_coeff.into(), 16, 16);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for HcpPakObject {
fn from(input: &[u32; 5]) -> Self {
HcpPakObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
split_level_2_part_0: __gen_unuint(input[1], 0, 3),
split_level_2_part_1: __gen_unuint(input[1], 4, 7),
split_level_2_part_2: __gen_unuint(input[1], 8, 11),
split_level_2_part_3: __gen_unuint(input[1], 12, 15),
split_level_1: __gen_unuint(input[1], 16, 19),
split_level_0: __gen_unuint(input[1], 20, 20),
cu_count: __gen_unuint(input[1], 24, 29),
last_lcu_of_tile: __gen_unuint(input[1], 30, 30) != 0,
last_lcu_of_slice: __gen_unuint(input[1], 31, 31) != 0,
current_lcu_x_address: __gen_unuint(input[2], 0, 15),
current_lcu_y_address: __gen_unuint(input[2], 16, 31),
estimated_lcu_size: __gen_unuint(input[3], 0, 31),
sse_classid_32x32_0: __gen_unuint(input[4], 0, 3),
sse_classid_32x32_1: __gen_unuint(input[4], 4, 7),
sse_classid_32x32_2: __gen_unuint(input[4], 8, 11),
sse_classid_32x32_3: __gen_unuint(input[4], 12, 15),
lcu_force_zero_coeff: __gen_unuint(input[4], 16, 16) != 0,
}
}
}
impl Deserialize for HcpPakObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct HcpPicState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub frame_width_in_minimum_coding_block_size: u32,
pub pak_transform_skip_enable: bool,
pub frame_height_in_minimum_coding_block_size: u32,
pub min_cu_size: u32,
pub lcu_size: u32,
pub min_tu_size: u32,
pub max_tu_size: u32,
pub min_pcm_size: u32,
pub max_pcm_size: u32,
pub collocated_picture_is_i_slice: bool,
pub current_picture_is_i_slice: bool,
pub cabac_zero_word_insertion_test_enable: bool,
pub sample_adaptive_offset_enable: bool,
pub pcm_enable: bool,
pub cu_qp_delta_enable: bool,
pub max_dqp_depth: u32,
pub pcm_loop_filter_disable: bool,
pub constrained_intra_prediction: bool,
pub log2_parallel_merge_level: u32,
pub sign_data_hiding: bool,
pub loop_filter_enable: bool,
pub entropy_coding_sync_enable: bool,
pub tiling_enable: bool,
pub weighted_bipredication_enable: bool,
pub weighted_predication_enable: bool,
pub field_pic: bool,
pub top_field: bool,
pub transform_skip_enable: bool,
pub amp_enable: bool,
pub transquant_bypass_enable: bool,
pub strong_intra_smoothing_enable: bool,
pub cu_packet_structure: u32,
pub picture_cb_qp_offset: i32,
pub picture_cr_qp_offset: i32,
pub intra_max_transform_hierarchy_depth: u32,
pub inter_max_transform_hierarchy_depth: u32,
pub chroma_pcm_sample_bit_depth: u32,
pub luma_pcm_sample_bit_depth: u32,
pub chroma_bit_depth: u32,
pub luma_bit_depth: u32,
pub lcu_max_bit_size_allowed: u32,
pub non_first_pass: bool,
pub lcu_max_size_report: bool,
pub frame_bitrate_max_report: bool,
pub frame_bitrate_min_report: bool,
pub load_bitstream_pointer_per_slice: bool,
pub frame_bitrate_max: u32,
pub frame_bitrate_max_unit: u32,
pub frame_bitrate_min: u32,
pub frame_bitrate_min_unit: u32,
pub frame_bitrate_min_delta: u32,
pub frame_bitrate_max_delta: u32,
pub frame_delta_qp_max: Framedeltaqp,
pub frame_delta_qp_min: Framedeltaqp,
pub frame_delta_qp_max_range: Framedeltaqprange,
pub frame_delta_qp_min_range: Framedeltaqprange,
pub minimum_frame_size: u32,
pub minimum_frame_size_units: u32,
pub fractional_qp_input: u32,
pub fractional_qp_offset: u32,
pub rho_domain_rate_control_enable: bool,
pub fractional_qp_adjustment_enable: bool,
pub rho_domain_frame_level_qp: u32,
pub pak_dynamic_slice_mode_enable: bool,
pub no_output_of_prior_pics: bool,
pub first_slice_segment_in_pic: bool,
pub nal_unit_type: u32,
pub slice_pic_parameter_set_id: u32,
pub sse_enable: bool,
pub rdoq_enable: bool,
pub number_of_lcus_innormal_slice_size_conformance_mode: u32,
pub slice_size_threshold: u32,
pub target_slice_size: u32,
pub class0_sse_threshold0: u32,
pub class0_sse_threshold1: u32,
pub sse_thresholds_for_class1_8: [u8; 32],
}
impl HcpPicState {
pub const DWORD_LENGTH: u32 = 32;
pub const EXTENC: u32 = 1;
pub const ILLEGAL_RESERVED: u32 = 0;
pub const VME: u32 = 0;
pub const _10_BIT: u32 = 2;
pub const _11_BIT: u32 = 3;
pub const _12_BIT: u32 = 4;
pub const _16KB: u32 = 1;
pub const _4KB: u32 = 0;
pub const _4X4: u32 = 0;
pub const _64X64: u32 = 3;
pub const _8_BIT: u32 = 0;
pub const _9_BIT: u32 = 1;
}
impl Default for HcpPicState {
fn default() -> Self {
HcpPicState {
dword_length: Default::default(),
subopcode: 16,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
frame_width_in_minimum_coding_block_size: Default::default(),
pak_transform_skip_enable: Default::default(),
frame_height_in_minimum_coding_block_size: Default::default(),
min_cu_size: Default::default(),
lcu_size: Default::default(),
min_tu_size: Default::default(),
max_tu_size: Default::default(),
min_pcm_size: Default::default(),
max_pcm_size: Default::default(),
collocated_picture_is_i_slice: Default::default(),
current_picture_is_i_slice: Default::default(),
cabac_zero_word_insertion_test_enable: Default::default(),
sample_adaptive_offset_enable: Default::default(),
pcm_enable: Default::default(),
cu_qp_delta_enable: Default::default(),
max_dqp_depth: Default::default(),
pcm_loop_filter_disable: Default::default(),
constrained_intra_prediction: Default::default(),
log2_parallel_merge_level: Default::default(),
sign_data_hiding: Default::default(),
loop_filter_enable: Default::default(),
entropy_coding_sync_enable: Default::default(),
tiling_enable: Default::default(),
weighted_bipredication_enable: Default::default(),
weighted_predication_enable: Default::default(),
field_pic: Default::default(),
top_field: Default::default(),
transform_skip_enable: Default::default(),
amp_enable: Default::default(),
transquant_bypass_enable: Default::default(),
strong_intra_smoothing_enable: Default::default(),
cu_packet_structure: Default::default(),
picture_cb_qp_offset: Default::default(),
picture_cr_qp_offset: Default::default(),
intra_max_transform_hierarchy_depth: Default::default(),
inter_max_transform_hierarchy_depth: Default::default(),
chroma_pcm_sample_bit_depth: Default::default(),
luma_pcm_sample_bit_depth: Default::default(),
chroma_bit_depth: Default::default(),
luma_bit_depth: Default::default(),
lcu_max_bit_size_allowed: Default::default(),
non_first_pass: Default::default(),
lcu_max_size_report: Default::default(),
frame_bitrate_max_report: Default::default(),
frame_bitrate_min_report: Default::default(),
load_bitstream_pointer_per_slice: Default::default(),
frame_bitrate_max: Default::default(),
frame_bitrate_max_unit: Default::default(),
frame_bitrate_min: Default::default(),
frame_bitrate_min_unit: Default::default(),
frame_bitrate_min_delta: Default::default(),
frame_bitrate_max_delta: Default::default(),
frame_delta_qp_max: Default::default(),
frame_delta_qp_min: Default::default(),
frame_delta_qp_max_range: Default::default(),
frame_delta_qp_min_range: Default::default(),
minimum_frame_size: Default::default(),
minimum_frame_size_units: Default::default(),
fractional_qp_input: Default::default(),
fractional_qp_offset: Default::default(),
rho_domain_rate_control_enable: Default::default(),
fractional_qp_adjustment_enable: Default::default(),
rho_domain_frame_level_qp: Default::default(),
pak_dynamic_slice_mode_enable: Default::default(),
no_output_of_prior_pics: Default::default(),
first_slice_segment_in_pic: Default::default(),
nal_unit_type: Default::default(),
slice_pic_parameter_set_id: Default::default(),
sse_enable: Default::default(),
rdoq_enable: Default::default(),
number_of_lcus_innormal_slice_size_conformance_mode: Default::default(),
slice_size_threshold: Default::default(),
target_slice_size: Default::default(),
class0_sse_threshold0: Default::default(),
class0_sse_threshold1: Default::default(),
sse_thresholds_for_class1_8: Default::default(),
}
}
}
impl Serialize for HcpPicState {
type Out = [u32; 32];
fn pack_into(&self, out: &mut [u32; 32]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.frame_width_in_minimum_coding_block_size, 0, 10) |
__gen_uint(self.pak_transform_skip_enable.into(), 15, 15) |
__gen_uint(self.frame_height_in_minimum_coding_block_size, 16, 26);
out[2] = __gen_uint(self.min_cu_size, 0, 1) |
__gen_uint(self.lcu_size, 2, 3) |
__gen_uint(self.min_tu_size, 4, 5) |
__gen_uint(self.max_tu_size, 6, 7) |
__gen_uint(self.min_pcm_size, 8, 9) |
__gen_uint(self.max_pcm_size, 10, 11);
out[3] = __gen_uint(self.collocated_picture_is_i_slice.into(), 0, 0) |
__gen_uint(self.current_picture_is_i_slice.into(), 1, 1) |
__gen_uint(self.cabac_zero_word_insertion_test_enable.into(), 2, 2);
out[4] = __gen_uint(self.sample_adaptive_offset_enable.into(), 3, 3) |
__gen_uint(self.pcm_enable.into(), 4, 4) |
__gen_uint(self.cu_qp_delta_enable.into(), 5, 5) |
__gen_uint(self.max_dqp_depth, 6, 7) |
__gen_uint(self.pcm_loop_filter_disable.into(), 8, 8) |
__gen_uint(self.constrained_intra_prediction.into(), 9, 9) |
__gen_uint(self.log2_parallel_merge_level, 10, 12) |
__gen_uint(self.sign_data_hiding.into(), 13, 13) |
__gen_uint(self.loop_filter_enable.into(), 15, 15) |
__gen_uint(self.entropy_coding_sync_enable.into(), 16, 16) |
__gen_uint(self.tiling_enable.into(), 17, 17) |
__gen_uint(self.weighted_bipredication_enable.into(), 18, 18) |
__gen_uint(self.weighted_predication_enable.into(), 19, 19) |
__gen_uint(self.field_pic.into(), 20, 20) |
__gen_uint(self.top_field.into(), 21, 21) |
__gen_uint(self.transform_skip_enable.into(), 22, 22) |
__gen_uint(self.amp_enable.into(), 23, 23) |
__gen_uint(self.transquant_bypass_enable.into(), 25, 25) |
__gen_uint(self.strong_intra_smoothing_enable.into(), 26, 26) |
__gen_uint(self.cu_packet_structure, 27, 27);
out[5] = __gen_uint(self.picture_cb_qp_offset as u32, 0, 4) |
__gen_uint(self.picture_cr_qp_offset as u32, 5, 9) |
__gen_uint(self.intra_max_transform_hierarchy_depth, 10, 12) |
__gen_uint(self.inter_max_transform_hierarchy_depth, 13, 15) |
__gen_uint(self.chroma_pcm_sample_bit_depth, 16, 19) |
__gen_uint(self.luma_pcm_sample_bit_depth, 20, 23) |
__gen_uint(self.chroma_bit_depth, 24, 26) |
__gen_uint(self.luma_bit_depth, 27, 29);
out[6] = __gen_uint(self.lcu_max_bit_size_allowed, 0, 15) |
__gen_uint(self.non_first_pass.into(), 16, 16) |
__gen_uint(self.lcu_max_size_report.into(), 24, 24) |
__gen_uint(self.frame_bitrate_max_report.into(), 25, 25) |
__gen_uint(self.frame_bitrate_min_report.into(), 26, 26) |
__gen_uint(self.load_bitstream_pointer_per_slice.into(), 29, 29);
out[7] = __gen_uint(self.frame_bitrate_max, 0, 13) |
__gen_uint(self.frame_bitrate_max_unit, 31, 31);
out[8] = __gen_uint(self.frame_bitrate_min, 0, 13) |
__gen_uint(self.frame_bitrate_min_unit, 31, 31);
out[9] = __gen_uint(self.frame_bitrate_min_delta, 0, 14) |
__gen_uint(self.frame_bitrate_max_delta, 16, 30);
{
let [_, _, _, _, _, _, _, _, _, _, ref mut out10_11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.frame_delta_qp_max.pack_into(out10_11);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12_13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.frame_delta_qp_min.pack_into(out12_13);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out14_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.frame_delta_qp_max_range.pack_into(out14_15);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out16_17 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.frame_delta_qp_min_range.pack_into(out16_17);
}
out[18] = __gen_uint(self.minimum_frame_size, 0, 15) |
__gen_uint(self.minimum_frame_size_units, 30, 31);
out[19] = __gen_uint(self.fractional_qp_input, 0, 2) |
__gen_uint(self.fractional_qp_offset, 3, 5) |
__gen_uint(self.rho_domain_rate_control_enable.into(), 6, 6) |
__gen_uint(self.fractional_qp_adjustment_enable.into(), 7, 7) |
__gen_uint(self.rho_domain_frame_level_qp, 8, 13) |
__gen_uint(self.pak_dynamic_slice_mode_enable.into(), 14, 14) |
__gen_uint(self.no_output_of_prior_pics.into(), 15, 15) |
__gen_uint(self.first_slice_segment_in_pic.into(), 16, 16) |
__gen_uint(self.nal_unit_type, 17, 17) |
__gen_uint(self.slice_pic_parameter_set_id, 18, 23) |
__gen_uint(self.sse_enable.into(), 24, 24) |
__gen_uint(self.rdoq_enable.into(), 25, 25) |
__gen_uint(self.number_of_lcus_innormal_slice_size_conformance_mode, 26, 27);
out[20] = 0;
out[21] = __gen_uint(self.slice_size_threshold, 0, 31);
out[22] = __gen_uint(self.target_slice_size, 0, 31);
out[23] = __gen_uint(self.class0_sse_threshold0, 0, 15) |
__gen_uint(self.class0_sse_threshold1, 16, 31);
out[24] = __gen_uint(self.sse_thresholds_for_class1_8[0].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[1].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[2].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[3].into(), 24, 31);
out[25] = __gen_uint(self.sse_thresholds_for_class1_8[4].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[5].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[6].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[7].into(), 24, 31);
out[26] = __gen_uint(self.sse_thresholds_for_class1_8[8].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[9].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[10].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[11].into(), 24, 31);
out[27] = __gen_uint(self.sse_thresholds_for_class1_8[12].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[13].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[14].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[15].into(), 24, 31);
out[28] = __gen_uint(self.sse_thresholds_for_class1_8[16].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[17].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[18].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[19].into(), 24, 31);
out[29] = __gen_uint(self.sse_thresholds_for_class1_8[20].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[21].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[22].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[23].into(), 24, 31);
out[30] = __gen_uint(self.sse_thresholds_for_class1_8[24].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[25].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[26].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[27].into(), 24, 31);
out[31] = __gen_uint(self.sse_thresholds_for_class1_8[28].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[29].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[30].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[31].into(), 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 32];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 32] as *const [u8; 128]) })
}
}
impl From<&[u32; 32]> for HcpPicState {
fn from(input: &[u32; 32]) -> Self {
HcpPicState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
frame_width_in_minimum_coding_block_size: __gen_unuint(input[1], 0, 10),
pak_transform_skip_enable: __gen_unuint(input[1], 15, 15) != 0,
frame_height_in_minimum_coding_block_size: __gen_unuint(input[1], 16, 26),
min_cu_size: __gen_unuint(input[2], 0, 1),
lcu_size: __gen_unuint(input[2], 2, 3),
min_tu_size: __gen_unuint(input[2], 4, 5),
max_tu_size: __gen_unuint(input[2], 6, 7),
min_pcm_size: __gen_unuint(input[2], 8, 9),
max_pcm_size: __gen_unuint(input[2], 10, 11),
collocated_picture_is_i_slice: __gen_unuint(input[3], 0, 0) != 0,
current_picture_is_i_slice: __gen_unuint(input[3], 1, 1) != 0,
cabac_zero_word_insertion_test_enable: __gen_unuint(input[3], 2, 2) != 0,
sample_adaptive_offset_enable: __gen_unuint(input[4], 3, 3) != 0,
pcm_enable: __gen_unuint(input[4], 4, 4) != 0,
cu_qp_delta_enable: __gen_unuint(input[4], 5, 5) != 0,
max_dqp_depth: __gen_unuint(input[4], 6, 7),
pcm_loop_filter_disable: __gen_unuint(input[4], 8, 8) != 0,
constrained_intra_prediction: __gen_unuint(input[4], 9, 9) != 0,
log2_parallel_merge_level: __gen_unuint(input[4], 10, 12),
sign_data_hiding: __gen_unuint(input[4], 13, 13) != 0,
loop_filter_enable: __gen_unuint(input[4], 15, 15) != 0,
entropy_coding_sync_enable: __gen_unuint(input[4], 16, 16) != 0,
tiling_enable: __gen_unuint(input[4], 17, 17) != 0,
weighted_bipredication_enable: __gen_unuint(input[4], 18, 18) != 0,
weighted_predication_enable: __gen_unuint(input[4], 19, 19) != 0,
field_pic: __gen_unuint(input[4], 20, 20) != 0,
top_field: __gen_unuint(input[4], 21, 21) != 0,
transform_skip_enable: __gen_unuint(input[4], 22, 22) != 0,
amp_enable: __gen_unuint(input[4], 23, 23) != 0,
transquant_bypass_enable: __gen_unuint(input[4], 25, 25) != 0,
strong_intra_smoothing_enable: __gen_unuint(input[4], 26, 26) != 0,
cu_packet_structure: __gen_unuint(input[4], 27, 27),
picture_cb_qp_offset: (__gen_unuint(input[5], 0, 4)) as i32,
picture_cr_qp_offset: (__gen_unuint(input[5], 5, 9)) as i32,
intra_max_transform_hierarchy_depth: __gen_unuint(input[5], 10, 12),
inter_max_transform_hierarchy_depth: __gen_unuint(input[5], 13, 15),
chroma_pcm_sample_bit_depth: __gen_unuint(input[5], 16, 19),
luma_pcm_sample_bit_depth: __gen_unuint(input[5], 20, 23),
chroma_bit_depth: __gen_unuint(input[5], 24, 26),
luma_bit_depth: __gen_unuint(input[5], 27, 29),
lcu_max_bit_size_allowed: __gen_unuint(input[6], 0, 15),
non_first_pass: __gen_unuint(input[6], 16, 16) != 0,
lcu_max_size_report: __gen_unuint(input[6], 24, 24) != 0,
frame_bitrate_max_report: __gen_unuint(input[6], 25, 25) != 0,
frame_bitrate_min_report: __gen_unuint(input[6], 26, 26) != 0,
load_bitstream_pointer_per_slice: __gen_unuint(input[6], 29, 29) != 0,
frame_bitrate_max: __gen_unuint(input[7], 0, 13),
frame_bitrate_max_unit: __gen_unuint(input[7], 31, 31),
frame_bitrate_min: __gen_unuint(input[8], 0, 13),
frame_bitrate_min_unit: __gen_unuint(input[8], 31, 31),
frame_bitrate_min_delta: __gen_unuint(input[9], 0, 14),
frame_bitrate_max_delta: __gen_unuint(input[9], 16, 30),
frame_delta_qp_max: {{
let [_, _, _, _, _, _, _, _, _, _, ref in10_11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in10_11.into()
}},
frame_delta_qp_min: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12_13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in12_13.into()
}},
frame_delta_qp_max_range: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in14_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in14_15.into()
}},
frame_delta_qp_min_range: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in16_17 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in16_17.into()
}},
minimum_frame_size: __gen_unuint(input[18], 0, 15),
minimum_frame_size_units: __gen_unuint(input[18], 30, 31),
fractional_qp_input: __gen_unuint(input[19], 0, 2),
fractional_qp_offset: __gen_unuint(input[19], 3, 5),
rho_domain_rate_control_enable: __gen_unuint(input[19], 6, 6) != 0,
fractional_qp_adjustment_enable: __gen_unuint(input[19], 7, 7) != 0,
rho_domain_frame_level_qp: __gen_unuint(input[19], 8, 13),
pak_dynamic_slice_mode_enable: __gen_unuint(input[19], 14, 14) != 0,
no_output_of_prior_pics: __gen_unuint(input[19], 15, 15) != 0,
first_slice_segment_in_pic: __gen_unuint(input[19], 16, 16) != 0,
nal_unit_type: __gen_unuint(input[19], 17, 17),
slice_pic_parameter_set_id: __gen_unuint(input[19], 18, 23),
sse_enable: __gen_unuint(input[19], 24, 24) != 0,
rdoq_enable: __gen_unuint(input[19], 25, 25) != 0,
number_of_lcus_innormal_slice_size_conformance_mode: __gen_unuint(input[19], 26, 27),
slice_size_threshold: __gen_unuint(input[21], 0, 31),
target_slice_size: __gen_unuint(input[22], 0, 31),
class0_sse_threshold0: __gen_unuint(input[23], 0, 15),
class0_sse_threshold1: __gen_unuint(input[23], 16, 31),
sse_thresholds_for_class1_8: [
(__gen_unuint(input[24], 0, 7)) as u8,
(__gen_unuint(input[24], 8, 15)) as u8,
(__gen_unuint(input[24], 16, 23)) as u8,
(__gen_unuint(input[24], 24, 31)) as u8,
(__gen_unuint(input[25], 0, 7)) as u8,
(__gen_unuint(input[25], 8, 15)) as u8,
(__gen_unuint(input[25], 16, 23)) as u8,
(__gen_unuint(input[25], 24, 31)) as u8,
(__gen_unuint(input[26], 0, 7)) as u8,
(__gen_unuint(input[26], 8, 15)) as u8,
(__gen_unuint(input[26], 16, 23)) as u8,
(__gen_unuint(input[26], 24, 31)) as u8,
(__gen_unuint(input[27], 0, 7)) as u8,
(__gen_unuint(input[27], 8, 15)) as u8,
(__gen_unuint(input[27], 16, 23)) as u8,
(__gen_unuint(input[27], 24, 31)) as u8,
(__gen_unuint(input[28], 0, 7)) as u8,
(__gen_unuint(input[28], 8, 15)) as u8,
(__gen_unuint(input[28], 16, 23)) as u8,
(__gen_unuint(input[28], 24, 31)) as u8,
(__gen_unuint(input[29], 0, 7)) as u8,
(__gen_unuint(input[29], 8, 15)) as u8,
(__gen_unuint(input[29], 16, 23)) as u8,
(__gen_unuint(input[29], 24, 31)) as u8,
(__gen_unuint(input[30], 0, 7)) as u8,
(__gen_unuint(input[30], 8, 15)) as u8,
(__gen_unuint(input[30], 16, 23)) as u8,
(__gen_unuint(input[30], 24, 31)) as u8,
(__gen_unuint(input[31], 0, 7)) as u8,
(__gen_unuint(input[31], 8, 15)) as u8,
(__gen_unuint(input[31], 16, 23)) as u8,
(__gen_unuint(input[31], 24, 31)) as u8
],
}
}
}
impl Deserialize for HcpPicState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 32];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 32] as *mut [u8; 128]) })?;
Ok((&input).into())
}
}
pub struct HcpPipeBufAddrState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub decoded_picture_address: A,
pub decoded_picture_memory_address_attributes: Memoryaddressattributes,
pub deblocking_filter_line_buffer_address: A,
pub deblocking_filter_line_buffer_memory_address_attributes: Memoryaddressattributes,
pub deblocking_filter_tile_line_buffer_address: A,
pub deblocking_filter_tile_line_buffer_memory_address_attributes: Memoryaddressattributes,
pub deblocking_filter_tile_column_buffer_address: A,
pub deblocking_filter_tile_column_buffer_memory_address_attributes: Memoryaddressattributes,
pub metadata_line_buffer_address: A,
pub metadata_line_buffer_memory_address_attributes: Memoryaddressattributes,
pub metadata_tile_line_buffer_address: A,
pub metadata_tile_line_buffer_memory_address_attributes: Memoryaddressattributes,
pub metadata_tile_column_buffer_address: A,
pub metadata_tile_column_buffer_memory_address_attributes: Memoryaddressattributes,
pub sao_line_buffer_address: A,
pub sao_line_buffer_memory_address_attributes: Memoryaddressattributes,
pub sao_tile_line_buffer_address: A,
pub sao_tile_line_buffer_memory_address_attributes: Memoryaddressattributes,
pub sao_tile_column_buffer_address: A,
pub sao_tile_column_buffer_memory_address_attributes: Memoryaddressattributes,
pub current_mv_temporal_buffer_address: A,
pub current_mv_temporal_buffer_memory_address_attributes: Memoryaddressattributes,
pub reference_picture_address: [A; 8],
pub reference_picture_memory_address_attributes: Memoryaddressattributes,
pub original_uncompressed_picture_source_address: A,
pub original_uncompressed_picture_source_memory_address_attributes: Memoryaddressattributes,
pub stream_out_data_destination_address: A,
pub stream_out_data_destination_memory_address_attributes: Memoryaddressattributes,
pub decoded_picture_status_buffer_address: A,
pub decoded_picture_status_buffer_memory_address_attributes: Memoryaddressattributes,
pub lcu_ildb_stream_out_buffer_address: A,
pub lcu_ildb_stream_out_buffer_memory_address_attributes: Memoryaddressattributes,
pub collocated_mv_temporal_buffer_address: [A; 8],
pub collocated_mv_temporal_buffer_memory_address_attributes: Memoryaddressattributes,
pub vp9_probability_buffer_address: A,
pub vp9_probability_buffer_memory_address_attributes: Memoryaddressattributes,
pub vp9_segment_id_buffer_address: u64,
pub vp9_segment_id_buffer_memory_address_attributes: Memoryaddressattributes,
pub vp9_hvd_line_row_store_buffer_address: A,
pub vp9_hvd_line_row_store_buffer_memory_address_attributes: Memoryaddressattributes,
pub vp9_hvd_tile_row_store_buffer_address: A,
pub vp9_hvd_tile_row_store_buffer_memory_address_attributes: Memoryaddressattributes,
pub sao_stream_out_data_destination_buffer_base_address: A,
pub sao_stream_out_data_destination_buffer_memory_address_attributes: Memoryaddressattributes,
pub frame_statistics_stream_out_data_destination_buffer_base_address: A,
pub frame_statistics_stream_out_data_destination_buffer_memory_address_attributes: Memoryaddressattributes,
pub sse_source_pixel_row_store_buffer_base_address: A,
pub sse_source_pixel_row_store_buffer_memory_address_attributes_read_write: Memoryaddressattributes,
}
impl<A: Addr + Default> HcpPipeBufAddrState<A> {
pub const DWORD_LENGTH: u32 = 104;
}
impl<A: Addr + Default> Default for HcpPipeBufAddrState<A> {
fn default() -> Self {
HcpPipeBufAddrState {
dword_length: Default::default(),
subopcode: 2,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
decoded_picture_address: Default::default(),
decoded_picture_memory_address_attributes: Default::default(),
deblocking_filter_line_buffer_address: Default::default(),
deblocking_filter_line_buffer_memory_address_attributes: Default::default(),
deblocking_filter_tile_line_buffer_address: Default::default(),
deblocking_filter_tile_line_buffer_memory_address_attributes: Default::default(),
deblocking_filter_tile_column_buffer_address: Default::default(),
deblocking_filter_tile_column_buffer_memory_address_attributes: Default::default(),
metadata_line_buffer_address: Default::default(),
metadata_line_buffer_memory_address_attributes: Default::default(),
metadata_tile_line_buffer_address: Default::default(),
metadata_tile_line_buffer_memory_address_attributes: Default::default(),
metadata_tile_column_buffer_address: Default::default(),
metadata_tile_column_buffer_memory_address_attributes: Default::default(),
sao_line_buffer_address: Default::default(),
sao_line_buffer_memory_address_attributes: Default::default(),
sao_tile_line_buffer_address: Default::default(),
sao_tile_line_buffer_memory_address_attributes: Default::default(),
sao_tile_column_buffer_address: Default::default(),
sao_tile_column_buffer_memory_address_attributes: Default::default(),
current_mv_temporal_buffer_address: Default::default(),
current_mv_temporal_buffer_memory_address_attributes: Default::default(),
reference_picture_address: Default::default(),
reference_picture_memory_address_attributes: Default::default(),
original_uncompressed_picture_source_address: Default::default(),
original_uncompressed_picture_source_memory_address_attributes: Default::default(),
stream_out_data_destination_address: Default::default(),
stream_out_data_destination_memory_address_attributes: Default::default(),
decoded_picture_status_buffer_address: Default::default(),
decoded_picture_status_buffer_memory_address_attributes: Default::default(),
lcu_ildb_stream_out_buffer_address: Default::default(),
lcu_ildb_stream_out_buffer_memory_address_attributes: Default::default(),
collocated_mv_temporal_buffer_address: Default::default(),
collocated_mv_temporal_buffer_memory_address_attributes: Default::default(),
vp9_probability_buffer_address: Default::default(),
vp9_probability_buffer_memory_address_attributes: Default::default(),
vp9_segment_id_buffer_address: Default::default(),
vp9_segment_id_buffer_memory_address_attributes: Default::default(),
vp9_hvd_line_row_store_buffer_address: Default::default(),
vp9_hvd_line_row_store_buffer_memory_address_attributes: Default::default(),
vp9_hvd_tile_row_store_buffer_address: Default::default(),
vp9_hvd_tile_row_store_buffer_memory_address_attributes: Default::default(),
sao_stream_out_data_destination_buffer_base_address: Default::default(),
sao_stream_out_data_destination_buffer_memory_address_attributes: Default::default(),
frame_statistics_stream_out_data_destination_buffer_base_address: Default::default(),
frame_statistics_stream_out_data_destination_buffer_memory_address_attributes: Default::default(),
sse_source_pixel_row_store_buffer_base_address: Default::default(),
sse_source_pixel_row_store_buffer_memory_address_attributes_read_write: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for HcpPipeBufAddrState<A> {
type Out = [u32; 104];
fn pack_into(&self, out: &mut [u32; 104]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.decoded_picture_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.decoded_picture_memory_address_attributes.pack_into(out3);
}
let v4_address = self.deblocking_filter_line_buffer_address.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
{
let [_, _, _, _, _, _, ref mut out6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.deblocking_filter_line_buffer_memory_address_attributes.pack_into(out6);
}
let v7_address = self.deblocking_filter_tile_line_buffer_address.combine(0);
out[7] = v7_address as u32;
out[8] = (v7_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, ref mut out9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.deblocking_filter_tile_line_buffer_memory_address_attributes.pack_into(out9);
}
let v10_address = self.deblocking_filter_tile_column_buffer_address.combine(0);
out[10] = v10_address as u32;
out[11] = (v10_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.deblocking_filter_tile_column_buffer_memory_address_attributes.pack_into(out12);
}
let v13_address = self.metadata_line_buffer_address.combine(0);
out[13] = v13_address as u32;
out[14] = (v13_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.metadata_line_buffer_memory_address_attributes.pack_into(out15);
}
let v16_address = self.metadata_tile_line_buffer_address.combine(0);
out[16] = v16_address as u32;
out[17] = (v16_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.metadata_tile_line_buffer_memory_address_attributes.pack_into(out18);
}
let v19_address = self.metadata_tile_column_buffer_address.combine(0);
out[19] = v19_address as u32;
out[20] = (v19_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.metadata_tile_column_buffer_memory_address_attributes.pack_into(out21);
}
let v22_address = self.sao_line_buffer_address.combine(0);
out[22] = v22_address as u32;
out[23] = (v22_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out24 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.sao_line_buffer_memory_address_attributes.pack_into(out24);
}
let v25_address = self.sao_tile_line_buffer_address.combine(0);
out[25] = v25_address as u32;
out[26] = (v25_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.sao_tile_line_buffer_memory_address_attributes.pack_into(out27);
}
let v28_address = self.sao_tile_column_buffer_address.combine(0);
out[28] = v28_address as u32;
out[29] = (v28_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out30 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.sao_tile_column_buffer_memory_address_attributes.pack_into(out30);
}
let v31_address = self.current_mv_temporal_buffer_address.combine(0);
out[31] = v31_address as u32;
out[32] = (v31_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.current_mv_temporal_buffer_memory_address_attributes.pack_into(out33);
}
out[34] = 0;
out[35] = 0;
out[36] = 0;
let v37_address = self.reference_picture_address[0].combine(0);
out[37] = v37_address as u32;
out[38] = (v37_address >> 32) as u32;
let v39_address = self.reference_picture_address[1].combine(0);
out[39] = v39_address as u32;
out[40] = (v39_address >> 32) as u32;
let v41_address = self.reference_picture_address[2].combine(0);
out[41] = v41_address as u32;
out[42] = (v41_address >> 32) as u32;
let v43_address = self.reference_picture_address[3].combine(0);
out[43] = v43_address as u32;
out[44] = (v43_address >> 32) as u32;
let v45_address = self.reference_picture_address[4].combine(0);
out[45] = v45_address as u32;
out[46] = (v45_address >> 32) as u32;
let v47_address = self.reference_picture_address[5].combine(0);
out[47] = v47_address as u32;
out[48] = (v47_address >> 32) as u32;
let v49_address = self.reference_picture_address[6].combine(0);
out[49] = v49_address as u32;
out[50] = (v49_address >> 32) as u32;
let v51_address = self.reference_picture_address[7].combine(0);
out[51] = v51_address as u32;
out[52] = (v51_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out53 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.reference_picture_memory_address_attributes.pack_into(out53);
}
let v54_address = self.original_uncompressed_picture_source_address.combine(0);
out[54] = v54_address as u32;
out[55] = (v54_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out56 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.original_uncompressed_picture_source_memory_address_attributes.pack_into(out56);
}
let v57_address = self.stream_out_data_destination_address.combine(0);
out[57] = v57_address as u32;
out[58] = (v57_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out59 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.stream_out_data_destination_memory_address_attributes.pack_into(out59);
}
let v60_address = self.decoded_picture_status_buffer_address.combine(0);
out[60] = v60_address as u32;
out[61] = (v60_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out62 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.decoded_picture_status_buffer_memory_address_attributes.pack_into(out62);
}
let v63_address = self.lcu_ildb_stream_out_buffer_address.combine(0);
out[63] = v63_address as u32;
out[64] = (v63_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out65 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.lcu_ildb_stream_out_buffer_memory_address_attributes.pack_into(out65);
}
let v66_address = self.collocated_mv_temporal_buffer_address[0].combine(0);
out[66] = v66_address as u32;
out[67] = (v66_address >> 32) as u32;
let v68_address = self.collocated_mv_temporal_buffer_address[1].combine(0);
out[68] = v68_address as u32;
out[69] = (v68_address >> 32) as u32;
let v70_address = self.collocated_mv_temporal_buffer_address[2].combine(0);
out[70] = v70_address as u32;
out[71] = (v70_address >> 32) as u32;
let v72_address = self.collocated_mv_temporal_buffer_address[3].combine(0);
out[72] = v72_address as u32;
out[73] = (v72_address >> 32) as u32;
let v74_address = self.collocated_mv_temporal_buffer_address[4].combine(0);
out[74] = v74_address as u32;
out[75] = (v74_address >> 32) as u32;
let v76_address = self.collocated_mv_temporal_buffer_address[5].combine(0);
out[76] = v76_address as u32;
out[77] = (v76_address >> 32) as u32;
let v78_address = self.collocated_mv_temporal_buffer_address[6].combine(0);
out[78] = v78_address as u32;
out[79] = (v78_address >> 32) as u32;
let v80_address = self.collocated_mv_temporal_buffer_address[7].combine(0);
out[80] = v80_address as u32;
out[81] = (v80_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out82 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.collocated_mv_temporal_buffer_memory_address_attributes.pack_into(out82);
}
let v83_address = self.vp9_probability_buffer_address.combine(0);
out[83] = v83_address as u32;
out[84] = (v83_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out85 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.vp9_probability_buffer_memory_address_attributes.pack_into(out85);
}
out[86] = __gen_uint(self.vp9_segment_id_buffer_address as u32, 0, 31);
out[87] = __gen_uint((self.vp9_segment_id_buffer_address >> 32) as u32, 0, 31);
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out88 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.vp9_segment_id_buffer_memory_address_attributes.pack_into(out88);
}
let v89_address = self.vp9_hvd_line_row_store_buffer_address.combine(0);
out[89] = v89_address as u32;
out[90] = (v89_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out91 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.vp9_hvd_line_row_store_buffer_memory_address_attributes.pack_into(out91);
}
let v92_address = self.vp9_hvd_tile_row_store_buffer_address.combine(0);
out[92] = v92_address as u32;
out[93] = (v92_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out94 @ .., _, _, _, _, _, _, _, _, _] = out;
self.vp9_hvd_tile_row_store_buffer_memory_address_attributes.pack_into(out94);
}
let v95_address = self.sao_stream_out_data_destination_buffer_base_address.combine(0);
out[95] = v95_address as u32;
out[96] = (v95_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out97 @ .., _, _, _, _, _, _] = out;
self.sao_stream_out_data_destination_buffer_memory_address_attributes.pack_into(out97);
}
let v98_address = self.frame_statistics_stream_out_data_destination_buffer_base_address.combine(0);
out[98] = v98_address as u32;
out[99] = (v98_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out100 @ .., _, _, _] = out;
self.frame_statistics_stream_out_data_destination_buffer_memory_address_attributes.pack_into(out100);
}
let v101_address = self.sse_source_pixel_row_store_buffer_base_address.combine(0);
out[101] = v101_address as u32;
out[102] = (v101_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out103 @ ..] = out;
self.sse_source_pixel_row_store_buffer_memory_address_attributes_read_write.pack_into(out103);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 104];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 104] as *const [u8; 416]) })
}
}
impl From<&[u32; 104]> for HcpPipeBufAddrState<u64> {
fn from(input: &[u32; 104]) -> Self {
HcpPipeBufAddrState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
decoded_picture_address: (__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
decoded_picture_memory_address_attributes: {{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in3.into()
}},
deblocking_filter_line_buffer_address: (__gen_unuint(input[4], 0, 31) as u64) |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
deblocking_filter_line_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, ref in6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in6.into()
}},
deblocking_filter_tile_line_buffer_address: (__gen_unuint(input[7], 0, 31) as u64) |
(__gen_unuint(input[8], 0, 31) as u64) << 32,
deblocking_filter_tile_line_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, ref in9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in9.into()
}},
deblocking_filter_tile_column_buffer_address: (__gen_unuint(input[10], 0, 31) as u64) |
(__gen_unuint(input[11], 0, 31) as u64) << 32,
deblocking_filter_tile_column_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in12.into()
}},
metadata_line_buffer_address: (__gen_unuint(input[13], 0, 31) as u64) |
(__gen_unuint(input[14], 0, 31) as u64) << 32,
metadata_line_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in15.into()
}},
metadata_tile_line_buffer_address: (__gen_unuint(input[16], 0, 31) as u64) |
(__gen_unuint(input[17], 0, 31) as u64) << 32,
metadata_tile_line_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in18.into()
}},
metadata_tile_column_buffer_address: (__gen_unuint(input[19], 0, 31) as u64) |
(__gen_unuint(input[20], 0, 31) as u64) << 32,
metadata_tile_column_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in21.into()
}},
sao_line_buffer_address: (__gen_unuint(input[22], 0, 31) as u64) |
(__gen_unuint(input[23], 0, 31) as u64) << 32,
sao_line_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in24 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in24.into()
}},
sao_tile_line_buffer_address: (__gen_unuint(input[25], 0, 31) as u64) |
(__gen_unuint(input[26], 0, 31) as u64) << 32,
sao_tile_line_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in27.into()
}},
sao_tile_column_buffer_address: (__gen_unuint(input[28], 0, 31) as u64) |
(__gen_unuint(input[29], 0, 31) as u64) << 32,
sao_tile_column_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in30 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in30.into()
}},
current_mv_temporal_buffer_address: (__gen_unuint(input[31], 0, 31) as u64) |
(__gen_unuint(input[32], 0, 31) as u64) << 32,
current_mv_temporal_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in33.into()
}},
reference_picture_address: [
(__gen_unuint(input[37], 0, 31) as u64) |
(__gen_unuint(input[38], 0, 31) as u64) << 32,
(__gen_unuint(input[39], 0, 31) as u64) |
(__gen_unuint(input[40], 0, 31) as u64) << 32,
(__gen_unuint(input[41], 0, 31) as u64) |
(__gen_unuint(input[42], 0, 31) as u64) << 32,
(__gen_unuint(input[43], 0, 31) as u64) |
(__gen_unuint(input[44], 0, 31) as u64) << 32,
(__gen_unuint(input[45], 0, 31) as u64) |
(__gen_unuint(input[46], 0, 31) as u64) << 32,
(__gen_unuint(input[47], 0, 31) as u64) |
(__gen_unuint(input[48], 0, 31) as u64) << 32,
(__gen_unuint(input[49], 0, 31) as u64) |
(__gen_unuint(input[50], 0, 31) as u64) << 32,
(__gen_unuint(input[51], 0, 31) as u64) |
(__gen_unuint(input[52], 0, 31) as u64) << 32
],
reference_picture_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in53 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in53.into()
}},
original_uncompressed_picture_source_address: (__gen_unuint(input[54], 0, 31) as u64) |
(__gen_unuint(input[55], 0, 31) as u64) << 32,
original_uncompressed_picture_source_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in56 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in56.into()
}},
stream_out_data_destination_address: (__gen_unuint(input[57], 0, 31) as u64) |
(__gen_unuint(input[58], 0, 31) as u64) << 32,
stream_out_data_destination_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in59 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in59.into()
}},
decoded_picture_status_buffer_address: (__gen_unuint(input[60], 0, 31) as u64) |
(__gen_unuint(input[61], 0, 31) as u64) << 32,
decoded_picture_status_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in62 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in62.into()
}},
lcu_ildb_stream_out_buffer_address: (__gen_unuint(input[63], 0, 31) as u64) |
(__gen_unuint(input[64], 0, 31) as u64) << 32,
lcu_ildb_stream_out_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in65 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in65.into()
}},
collocated_mv_temporal_buffer_address: [
(__gen_unuint(input[66], 0, 31) as u64) |
(__gen_unuint(input[67], 0, 31) as u64) << 32,
(__gen_unuint(input[68], 0, 31) as u64) |
(__gen_unuint(input[69], 0, 31) as u64) << 32,
(__gen_unuint(input[70], 0, 31) as u64) |
(__gen_unuint(input[71], 0, 31) as u64) << 32,
(__gen_unuint(input[72], 0, 31) as u64) |
(__gen_unuint(input[73], 0, 31) as u64) << 32,
(__gen_unuint(input[74], 0, 31) as u64) |
(__gen_unuint(input[75], 0, 31) as u64) << 32,
(__gen_unuint(input[76], 0, 31) as u64) |
(__gen_unuint(input[77], 0, 31) as u64) << 32,
(__gen_unuint(input[78], 0, 31) as u64) |
(__gen_unuint(input[79], 0, 31) as u64) << 32,
(__gen_unuint(input[80], 0, 31) as u64) |
(__gen_unuint(input[81], 0, 31) as u64) << 32
],
collocated_mv_temporal_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in82 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in82.into()
}},
vp9_probability_buffer_address: (__gen_unuint(input[83], 0, 31) as u64) |
(__gen_unuint(input[84], 0, 31) as u64) << 32,
vp9_probability_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in85 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in85.into()
}},
vp9_segment_id_buffer_address: (__gen_unuint(input[86], 0, 31) as u64) |
(__gen_unuint(input[87], 0, 31) as u64) << 32,
vp9_segment_id_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in88 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in88.into()
}},
vp9_hvd_line_row_store_buffer_address: (__gen_unuint(input[89], 0, 31) as u64) |
(__gen_unuint(input[90], 0, 31) as u64) << 32,
vp9_hvd_line_row_store_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in91 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = input;
in91.into()
}},
vp9_hvd_tile_row_store_buffer_address: (__gen_unuint(input[92], 0, 31) as u64) |
(__gen_unuint(input[93], 0, 31) as u64) << 32,
vp9_hvd_tile_row_store_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in94 @ .., _, _, _, _, _, _, _, _, _] = input;
in94.into()
}},
sao_stream_out_data_destination_buffer_base_address: (__gen_unuint(input[95], 0, 31) as u64) |
(__gen_unuint(input[96], 0, 31) as u64) << 32,
sao_stream_out_data_destination_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in97 @ .., _, _, _, _, _, _] = input;
in97.into()
}},
frame_statistics_stream_out_data_destination_buffer_base_address: (__gen_unuint(input[98], 0, 31) as u64) |
(__gen_unuint(input[99], 0, 31) as u64) << 32,
frame_statistics_stream_out_data_destination_buffer_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in100 @ .., _, _, _] = input;
in100.into()
}},
sse_source_pixel_row_store_buffer_base_address: (__gen_unuint(input[101], 0, 31) as u64) |
(__gen_unuint(input[102], 0, 31) as u64) << 32,
sse_source_pixel_row_store_buffer_memory_address_attributes_read_write: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in103 @ ..] = input;
in103.into()
}},
}
}
}
impl Deserialize for HcpPipeBufAddrState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 104];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 104] as *mut [u8; 416]) })?;
Ok((&input).into())
}
}
pub struct HcpPipeModeSelect {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub codec_select: u32,
pub deblocker_stream_out_enable: bool,
pub pak_pipeline_stream_out_enable: bool,
pub pic_status_error_report_enable: bool,
pub codec_standard_select: u32,
pub sao_first_pass: bool,
pub advanced_rate_control_enable: bool,
pub vdenc_mode: u32,
pub rdoq_enable: bool,
pub pak_frame_level_stream_out_enable: bool,
pub media_soft_reset_counter: u32,
pub pic_status_error_report_id: u32,
}
impl HcpPipeModeSelect {
pub const DWORD_LENGTH: u32 = 6;
pub const DECODE: u32 = 0;
pub const ENCODE: u32 = 1;
pub const HEVC: u32 = 0;
pub const MBENC_MODE: u32 = 0;
pub const VDENC_MODE: u32 = 1;
pub const VP9: u32 = 1;
}
impl Default for HcpPipeModeSelect {
fn default() -> Self {
HcpPipeModeSelect {
dword_length: Default::default(),
subopcode: 0,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
codec_select: Default::default(),
deblocker_stream_out_enable: Default::default(),
pak_pipeline_stream_out_enable: Default::default(),
pic_status_error_report_enable: Default::default(),
codec_standard_select: Default::default(),
sao_first_pass: Default::default(),
advanced_rate_control_enable: Default::default(),
vdenc_mode: Default::default(),
rdoq_enable: Default::default(),
pak_frame_level_stream_out_enable: Default::default(),
media_soft_reset_counter: Default::default(),
pic_status_error_report_id: Default::default(),
}
}
}
impl Serialize for HcpPipeModeSelect {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.codec_select, 0, 0) |
__gen_uint(self.deblocker_stream_out_enable.into(), 1, 1) |
__gen_uint(self.pak_pipeline_stream_out_enable.into(), 2, 2) |
__gen_uint(self.pic_status_error_report_enable.into(), 3, 3) |
__gen_uint(self.codec_standard_select, 5, 7) |
__gen_uint(self.sao_first_pass.into(), 8, 8) |
__gen_uint(self.advanced_rate_control_enable.into(), 9, 9) |
__gen_uint(self.vdenc_mode, 10, 10) |
__gen_uint(self.rdoq_enable.into(), 11, 11) |
__gen_uint(self.pak_frame_level_stream_out_enable.into(), 12, 12);
out[2] = __gen_uint(self.media_soft_reset_counter, 0, 31);
out[3] = __gen_uint(self.pic_status_error_report_id, 0, 31);
out[4] = 0;
out[5] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for HcpPipeModeSelect {
fn from(input: &[u32; 6]) -> Self {
HcpPipeModeSelect {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
codec_select: __gen_unuint(input[1], 0, 0),
deblocker_stream_out_enable: __gen_unuint(input[1], 1, 1) != 0,
pak_pipeline_stream_out_enable: __gen_unuint(input[1], 2, 2) != 0,
pic_status_error_report_enable: __gen_unuint(input[1], 3, 3) != 0,
codec_standard_select: __gen_unuint(input[1], 5, 7),
sao_first_pass: __gen_unuint(input[1], 8, 8) != 0,
advanced_rate_control_enable: __gen_unuint(input[1], 9, 9) != 0,
vdenc_mode: __gen_unuint(input[1], 10, 10),
rdoq_enable: __gen_unuint(input[1], 11, 11) != 0,
pak_frame_level_stream_out_enable: __gen_unuint(input[1], 12, 12) != 0,
media_soft_reset_counter: __gen_unuint(input[2], 0, 31),
pic_status_error_report_id: __gen_unuint(input[3], 0, 31),
}
}
}
impl Deserialize for HcpPipeModeSelect {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct HcpQmState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub prediction_type: u32,
pub sizeid: u32,
pub color_component: u32,
pub dc_coefficient: u32,
pub quantizer_matrix: [u8; 64],
}
impl HcpQmState {
pub const DWORD_LENGTH: u32 = 18;
pub const CHROMA_CB: u32 = 1;
pub const CHROMA_CR: u32 = 2;
pub const INTER: u32 = 1;
pub const INTRA: u32 = 0;
pub const LUMA: u32 = 0;
pub const _16X16: u32 = 2;
pub const _32X32: u32 = 3;
pub const _4X4: u32 = 0;
pub const _8X8: u32 = 1;
}
impl Default for HcpQmState {
fn default() -> Self {
HcpQmState {
dword_length: Default::default(),
subopcode: 4,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
prediction_type: Default::default(),
sizeid: Default::default(),
color_component: Default::default(),
dc_coefficient: Default::default(),
quantizer_matrix: [0; 64],
}
}
}
impl Serialize for HcpQmState {
type Out = [u32; 18];
fn pack_into(&self, out: &mut [u32; 18]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.prediction_type, 0, 0) |
__gen_uint(self.sizeid, 1, 2) |
__gen_uint(self.color_component, 3, 4) |
__gen_uint(self.dc_coefficient, 5, 12);
out[2] = __gen_uint(self.quantizer_matrix[0].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[1].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[2].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[3].into(), 24, 31);
out[3] = __gen_uint(self.quantizer_matrix[4].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[5].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[6].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[7].into(), 24, 31);
out[4] = __gen_uint(self.quantizer_matrix[8].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[9].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[10].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[11].into(), 24, 31);
out[5] = __gen_uint(self.quantizer_matrix[12].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[13].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[14].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[15].into(), 24, 31);
out[6] = __gen_uint(self.quantizer_matrix[16].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[17].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[18].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[19].into(), 24, 31);
out[7] = __gen_uint(self.quantizer_matrix[20].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[21].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[22].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[23].into(), 24, 31);
out[8] = __gen_uint(self.quantizer_matrix[24].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[25].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[26].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[27].into(), 24, 31);
out[9] = __gen_uint(self.quantizer_matrix[28].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[29].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[30].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[31].into(), 24, 31);
out[10] = __gen_uint(self.quantizer_matrix[32].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[33].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[34].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[35].into(), 24, 31);
out[11] = __gen_uint(self.quantizer_matrix[36].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[37].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[38].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[39].into(), 24, 31);
out[12] = __gen_uint(self.quantizer_matrix[40].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[41].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[42].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[43].into(), 24, 31);
out[13] = __gen_uint(self.quantizer_matrix[44].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[45].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[46].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[47].into(), 24, 31);
out[14] = __gen_uint(self.quantizer_matrix[48].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[49].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[50].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[51].into(), 24, 31);
out[15] = __gen_uint(self.quantizer_matrix[52].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[53].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[54].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[55].into(), 24, 31);
out[16] = __gen_uint(self.quantizer_matrix[56].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[57].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[58].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[59].into(), 24, 31);
out[17] = __gen_uint(self.quantizer_matrix[60].into(), 0, 7) |
__gen_uint(self.quantizer_matrix[61].into(), 8, 15) |
__gen_uint(self.quantizer_matrix[62].into(), 16, 23) |
__gen_uint(self.quantizer_matrix[63].into(), 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 18];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 18] as *const [u8; 72]) })
}
}
impl From<&[u32; 18]> for HcpQmState {
fn from(input: &[u32; 18]) -> Self {
HcpQmState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
prediction_type: __gen_unuint(input[1], 0, 0),
sizeid: __gen_unuint(input[1], 1, 2),
color_component: __gen_unuint(input[1], 3, 4),
dc_coefficient: __gen_unuint(input[1], 5, 12),
quantizer_matrix: [
(__gen_unuint(input[2], 0, 7)) as u8,
(__gen_unuint(input[2], 8, 15)) as u8,
(__gen_unuint(input[2], 16, 23)) as u8,
(__gen_unuint(input[2], 24, 31)) as u8,
(__gen_unuint(input[3], 0, 7)) as u8,
(__gen_unuint(input[3], 8, 15)) as u8,
(__gen_unuint(input[3], 16, 23)) as u8,
(__gen_unuint(input[3], 24, 31)) as u8,
(__gen_unuint(input[4], 0, 7)) as u8,
(__gen_unuint(input[4], 8, 15)) as u8,
(__gen_unuint(input[4], 16, 23)) as u8,
(__gen_unuint(input[4], 24, 31)) as u8,
(__gen_unuint(input[5], 0, 7)) as u8,
(__gen_unuint(input[5], 8, 15)) as u8,
(__gen_unuint(input[5], 16, 23)) as u8,
(__gen_unuint(input[5], 24, 31)) as u8,
(__gen_unuint(input[6], 0, 7)) as u8,
(__gen_unuint(input[6], 8, 15)) as u8,
(__gen_unuint(input[6], 16, 23)) as u8,
(__gen_unuint(input[6], 24, 31)) as u8,
(__gen_unuint(input[7], 0, 7)) as u8,
(__gen_unuint(input[7], 8, 15)) as u8,
(__gen_unuint(input[7], 16, 23)) as u8,
(__gen_unuint(input[7], 24, 31)) as u8,
(__gen_unuint(input[8], 0, 7)) as u8,
(__gen_unuint(input[8], 8, 15)) as u8,
(__gen_unuint(input[8], 16, 23)) as u8,
(__gen_unuint(input[8], 24, 31)) as u8,
(__gen_unuint(input[9], 0, 7)) as u8,
(__gen_unuint(input[9], 8, 15)) as u8,
(__gen_unuint(input[9], 16, 23)) as u8,
(__gen_unuint(input[9], 24, 31)) as u8,
(__gen_unuint(input[10], 0, 7)) as u8,
(__gen_unuint(input[10], 8, 15)) as u8,
(__gen_unuint(input[10], 16, 23)) as u8,
(__gen_unuint(input[10], 24, 31)) as u8,
(__gen_unuint(input[11], 0, 7)) as u8,
(__gen_unuint(input[11], 8, 15)) as u8,
(__gen_unuint(input[11], 16, 23)) as u8,
(__gen_unuint(input[11], 24, 31)) as u8,
(__gen_unuint(input[12], 0, 7)) as u8,
(__gen_unuint(input[12], 8, 15)) as u8,
(__gen_unuint(input[12], 16, 23)) as u8,
(__gen_unuint(input[12], 24, 31)) as u8,
(__gen_unuint(input[13], 0, 7)) as u8,
(__gen_unuint(input[13], 8, 15)) as u8,
(__gen_unuint(input[13], 16, 23)) as u8,
(__gen_unuint(input[13], 24, 31)) as u8,
(__gen_unuint(input[14], 0, 7)) as u8,
(__gen_unuint(input[14], 8, 15)) as u8,
(__gen_unuint(input[14], 16, 23)) as u8,
(__gen_unuint(input[14], 24, 31)) as u8,
(__gen_unuint(input[15], 0, 7)) as u8,
(__gen_unuint(input[15], 8, 15)) as u8,
(__gen_unuint(input[15], 16, 23)) as u8,
(__gen_unuint(input[15], 24, 31)) as u8,
(__gen_unuint(input[16], 0, 7)) as u8,
(__gen_unuint(input[16], 8, 15)) as u8,
(__gen_unuint(input[16], 16, 23)) as u8,
(__gen_unuint(input[16], 24, 31)) as u8,
(__gen_unuint(input[17], 0, 7)) as u8,
(__gen_unuint(input[17], 8, 15)) as u8,
(__gen_unuint(input[17], 16, 23)) as u8,
(__gen_unuint(input[17], 24, 31)) as u8
],
}
}
}
impl Deserialize for HcpQmState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 18];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 18] as *mut [u8; 72]) })?;
Ok((&input).into())
}
}
pub struct HcpRdoqState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub intra_rdoq: bool,
pub inter_rdoq: bool,
pub lambda_intra_luma: [u32; 26],
pub lambda_intra_chroma: [u32; 26],
pub lambda_inter_luma: [u32; 26],
pub lambda_inter_chroma: [u32; 26],
}
impl HcpRdoqState {
pub const DWORD_LENGTH: u32 = 54;
}
impl Default for HcpRdoqState {
fn default() -> Self {
HcpRdoqState {
dword_length: Default::default(),
subopcode: 21,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
intra_rdoq: Default::default(),
inter_rdoq: Default::default(),
lambda_intra_luma: Default::default(),
lambda_intra_chroma: Default::default(),
lambda_inter_luma: Default::default(),
lambda_inter_chroma: Default::default(),
}
}
}
impl Serialize for HcpRdoqState {
type Out = [u32; 54];
fn pack_into(&self, out: &mut [u32; 54]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.intra_rdoq.into(), 0, 0) |
__gen_uint(self.inter_rdoq.into(), 1, 1);
out[2] = __gen_uint(self.lambda_intra_luma[0], 0, 15) |
__gen_uint(self.lambda_intra_luma[1], 16, 31);
out[3] = __gen_uint(self.lambda_intra_luma[2], 0, 15) |
__gen_uint(self.lambda_intra_luma[3], 16, 31);
out[4] = __gen_uint(self.lambda_intra_luma[4], 0, 15) |
__gen_uint(self.lambda_intra_luma[5], 16, 31);
out[5] = __gen_uint(self.lambda_intra_luma[6], 0, 15) |
__gen_uint(self.lambda_intra_luma[7], 16, 31);
out[6] = __gen_uint(self.lambda_intra_luma[8], 0, 15) |
__gen_uint(self.lambda_intra_luma[9], 16, 31);
out[7] = __gen_uint(self.lambda_intra_luma[10], 0, 15) |
__gen_uint(self.lambda_intra_luma[11], 16, 31);
out[8] = __gen_uint(self.lambda_intra_luma[12], 0, 15) |
__gen_uint(self.lambda_intra_luma[13], 16, 31);
out[9] = __gen_uint(self.lambda_intra_luma[14], 0, 15) |
__gen_uint(self.lambda_intra_luma[15], 16, 31);
out[10] = __gen_uint(self.lambda_intra_luma[16], 0, 15) |
__gen_uint(self.lambda_intra_luma[17], 16, 31);
out[11] = __gen_uint(self.lambda_intra_luma[18], 0, 15) |
__gen_uint(self.lambda_intra_luma[19], 16, 31);
out[12] = __gen_uint(self.lambda_intra_luma[20], 0, 15) |
__gen_uint(self.lambda_intra_luma[21], 16, 31);
out[13] = __gen_uint(self.lambda_intra_luma[22], 0, 15) |
__gen_uint(self.lambda_intra_luma[23], 16, 31);
out[14] = __gen_uint(self.lambda_intra_luma[24], 0, 15) |
__gen_uint(self.lambda_intra_luma[25], 16, 31);
out[15] = __gen_uint(self.lambda_intra_chroma[0], 0, 15) |
__gen_uint(self.lambda_intra_chroma[1], 16, 31);
out[16] = __gen_uint(self.lambda_intra_chroma[2], 0, 15) |
__gen_uint(self.lambda_intra_chroma[3], 16, 31);
out[17] = __gen_uint(self.lambda_intra_chroma[4], 0, 15) |
__gen_uint(self.lambda_intra_chroma[5], 16, 31);
out[18] = __gen_uint(self.lambda_intra_chroma[6], 0, 15) |
__gen_uint(self.lambda_intra_chroma[7], 16, 31);
out[19] = __gen_uint(self.lambda_intra_chroma[8], 0, 15) |
__gen_uint(self.lambda_intra_chroma[9], 16, 31);
out[20] = __gen_uint(self.lambda_intra_chroma[10], 0, 15) |
__gen_uint(self.lambda_intra_chroma[11], 16, 31);
out[21] = __gen_uint(self.lambda_intra_chroma[12], 0, 15) |
__gen_uint(self.lambda_intra_chroma[13], 16, 31);
out[22] = __gen_uint(self.lambda_intra_chroma[14], 0, 15) |
__gen_uint(self.lambda_intra_chroma[15], 16, 31);
out[23] = __gen_uint(self.lambda_intra_chroma[16], 0, 15) |
__gen_uint(self.lambda_intra_chroma[17], 16, 31);
out[24] = __gen_uint(self.lambda_intra_chroma[18], 0, 15) |
__gen_uint(self.lambda_intra_chroma[19], 16, 31);
out[25] = __gen_uint(self.lambda_intra_chroma[20], 0, 15) |
__gen_uint(self.lambda_intra_chroma[21], 16, 31);
out[26] = __gen_uint(self.lambda_intra_chroma[22], 0, 15) |
__gen_uint(self.lambda_intra_chroma[23], 16, 31);
out[27] = __gen_uint(self.lambda_intra_chroma[24], 0, 15) |
__gen_uint(self.lambda_intra_chroma[25], 16, 31);
out[28] = __gen_uint(self.lambda_inter_luma[0], 0, 15) |
__gen_uint(self.lambda_inter_luma[1], 16, 31);
out[29] = __gen_uint(self.lambda_inter_luma[2], 0, 15) |
__gen_uint(self.lambda_inter_luma[3], 16, 31);
out[30] = __gen_uint(self.lambda_inter_luma[4], 0, 15) |
__gen_uint(self.lambda_inter_luma[5], 16, 31);
out[31] = __gen_uint(self.lambda_inter_luma[6], 0, 15) |
__gen_uint(self.lambda_inter_luma[7], 16, 31);
out[32] = __gen_uint(self.lambda_inter_luma[8], 0, 15) |
__gen_uint(self.lambda_inter_luma[9], 16, 31);
out[33] = __gen_uint(self.lambda_inter_luma[10], 0, 15) |
__gen_uint(self.lambda_inter_luma[11], 16, 31);
out[34] = __gen_uint(self.lambda_inter_luma[12], 0, 15) |
__gen_uint(self.lambda_inter_luma[13], 16, 31);
out[35] = __gen_uint(self.lambda_inter_luma[14], 0, 15) |
__gen_uint(self.lambda_inter_luma[15], 16, 31);
out[36] = __gen_uint(self.lambda_inter_luma[16], 0, 15) |
__gen_uint(self.lambda_inter_luma[17], 16, 31);
out[37] = __gen_uint(self.lambda_inter_luma[18], 0, 15) |
__gen_uint(self.lambda_inter_luma[19], 16, 31);
out[38] = __gen_uint(self.lambda_inter_luma[20], 0, 15) |
__gen_uint(self.lambda_inter_luma[21], 16, 31);
out[39] = __gen_uint(self.lambda_inter_luma[22], 0, 15) |
__gen_uint(self.lambda_inter_luma[23], 16, 31);
out[40] = __gen_uint(self.lambda_inter_luma[24], 0, 15) |
__gen_uint(self.lambda_inter_luma[25], 16, 31);
out[41] = __gen_uint(self.lambda_inter_chroma[0], 0, 15) |
__gen_uint(self.lambda_inter_chroma[1], 16, 31);
out[42] = __gen_uint(self.lambda_inter_chroma[2], 0, 15) |
__gen_uint(self.lambda_inter_chroma[3], 16, 31);
out[43] = __gen_uint(self.lambda_inter_chroma[4], 0, 15) |
__gen_uint(self.lambda_inter_chroma[5], 16, 31);
out[44] = __gen_uint(self.lambda_inter_chroma[6], 0, 15) |
__gen_uint(self.lambda_inter_chroma[7], 16, 31);
out[45] = __gen_uint(self.lambda_inter_chroma[8], 0, 15) |
__gen_uint(self.lambda_inter_chroma[9], 16, 31);
out[46] = __gen_uint(self.lambda_inter_chroma[10], 0, 15) |
__gen_uint(self.lambda_inter_chroma[11], 16, 31);
out[47] = __gen_uint(self.lambda_inter_chroma[12], 0, 15) |
__gen_uint(self.lambda_inter_chroma[13], 16, 31);
out[48] = __gen_uint(self.lambda_inter_chroma[14], 0, 15) |
__gen_uint(self.lambda_inter_chroma[15], 16, 31);
out[49] = __gen_uint(self.lambda_inter_chroma[16], 0, 15) |
__gen_uint(self.lambda_inter_chroma[17], 16, 31);
out[50] = __gen_uint(self.lambda_inter_chroma[18], 0, 15) |
__gen_uint(self.lambda_inter_chroma[19], 16, 31);
out[51] = __gen_uint(self.lambda_inter_chroma[20], 0, 15) |
__gen_uint(self.lambda_inter_chroma[21], 16, 31);
out[52] = __gen_uint(self.lambda_inter_chroma[22], 0, 15) |
__gen_uint(self.lambda_inter_chroma[23], 16, 31);
out[53] = __gen_uint(self.lambda_inter_chroma[24], 0, 15) |
__gen_uint(self.lambda_inter_chroma[25], 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 54];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 54] as *const [u8; 216]) })
}
}
impl From<&[u32; 54]> for HcpRdoqState {
fn from(input: &[u32; 54]) -> Self {
HcpRdoqState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
intra_rdoq: __gen_unuint(input[1], 0, 0) != 0,
inter_rdoq: __gen_unuint(input[1], 1, 1) != 0,
lambda_intra_luma: [
__gen_unuint(input[2], 0, 15),
__gen_unuint(input[2], 16, 31),
__gen_unuint(input[3], 0, 15),
__gen_unuint(input[3], 16, 31),
__gen_unuint(input[4], 0, 15),
__gen_unuint(input[4], 16, 31),
__gen_unuint(input[5], 0, 15),
__gen_unuint(input[5], 16, 31),
__gen_unuint(input[6], 0, 15),
__gen_unuint(input[6], 16, 31),
__gen_unuint(input[7], 0, 15),
__gen_unuint(input[7], 16, 31),
__gen_unuint(input[8], 0, 15),
__gen_unuint(input[8], 16, 31),
__gen_unuint(input[9], 0, 15),
__gen_unuint(input[9], 16, 31),
__gen_unuint(input[10], 0, 15),
__gen_unuint(input[10], 16, 31),
__gen_unuint(input[11], 0, 15),
__gen_unuint(input[11], 16, 31),
__gen_unuint(input[12], 0, 15),
__gen_unuint(input[12], 16, 31),
__gen_unuint(input[13], 0, 15),
__gen_unuint(input[13], 16, 31),
__gen_unuint(input[14], 0, 15),
__gen_unuint(input[14], 16, 31)
],
lambda_intra_chroma: [
__gen_unuint(input[15], 0, 15),
__gen_unuint(input[15], 16, 31),
__gen_unuint(input[16], 0, 15),
__gen_unuint(input[16], 16, 31),
__gen_unuint(input[17], 0, 15),
__gen_unuint(input[17], 16, 31),
__gen_unuint(input[18], 0, 15),
__gen_unuint(input[18], 16, 31),
__gen_unuint(input[19], 0, 15),
__gen_unuint(input[19], 16, 31),
__gen_unuint(input[20], 0, 15),
__gen_unuint(input[20], 16, 31),
__gen_unuint(input[21], 0, 15),
__gen_unuint(input[21], 16, 31),
__gen_unuint(input[22], 0, 15),
__gen_unuint(input[22], 16, 31),
__gen_unuint(input[23], 0, 15),
__gen_unuint(input[23], 16, 31),
__gen_unuint(input[24], 0, 15),
__gen_unuint(input[24], 16, 31),
__gen_unuint(input[25], 0, 15),
__gen_unuint(input[25], 16, 31),
__gen_unuint(input[26], 0, 15),
__gen_unuint(input[26], 16, 31),
__gen_unuint(input[27], 0, 15),
__gen_unuint(input[27], 16, 31)
],
lambda_inter_luma: [
__gen_unuint(input[28], 0, 15),
__gen_unuint(input[28], 16, 31),
__gen_unuint(input[29], 0, 15),
__gen_unuint(input[29], 16, 31),
__gen_unuint(input[30], 0, 15),
__gen_unuint(input[30], 16, 31),
__gen_unuint(input[31], 0, 15),
__gen_unuint(input[31], 16, 31),
__gen_unuint(input[32], 0, 15),
__gen_unuint(input[32], 16, 31),
__gen_unuint(input[33], 0, 15),
__gen_unuint(input[33], 16, 31),
__gen_unuint(input[34], 0, 15),
__gen_unuint(input[34], 16, 31),
__gen_unuint(input[35], 0, 15),
__gen_unuint(input[35], 16, 31),
__gen_unuint(input[36], 0, 15),
__gen_unuint(input[36], 16, 31),
__gen_unuint(input[37], 0, 15),
__gen_unuint(input[37], 16, 31),
__gen_unuint(input[38], 0, 15),
__gen_unuint(input[38], 16, 31),
__gen_unuint(input[39], 0, 15),
__gen_unuint(input[39], 16, 31),
__gen_unuint(input[40], 0, 15),
__gen_unuint(input[40], 16, 31)
],
lambda_inter_chroma: [
__gen_unuint(input[41], 0, 15),
__gen_unuint(input[41], 16, 31),
__gen_unuint(input[42], 0, 15),
__gen_unuint(input[42], 16, 31),
__gen_unuint(input[43], 0, 15),
__gen_unuint(input[43], 16, 31),
__gen_unuint(input[44], 0, 15),
__gen_unuint(input[44], 16, 31),
__gen_unuint(input[45], 0, 15),
__gen_unuint(input[45], 16, 31),
__gen_unuint(input[46], 0, 15),
__gen_unuint(input[46], 16, 31),
__gen_unuint(input[47], 0, 15),
__gen_unuint(input[47], 16, 31),
__gen_unuint(input[48], 0, 15),
__gen_unuint(input[48], 16, 31),
__gen_unuint(input[49], 0, 15),
__gen_unuint(input[49], 16, 31),
__gen_unuint(input[50], 0, 15),
__gen_unuint(input[50], 16, 31),
__gen_unuint(input[51], 0, 15),
__gen_unuint(input[51], 16, 31),
__gen_unuint(input[52], 0, 15),
__gen_unuint(input[52], 16, 31),
__gen_unuint(input[53], 0, 15),
__gen_unuint(input[53], 16, 31)
],
}
}
}
impl Deserialize for HcpRdoqState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 54];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 54] as *mut [u8; 216]) })?;
Ok((&input).into())
}
}
pub struct HcpRefIdxState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub reference_picture_list_select: u32,
pub number_of_reference_indexes_active: u32,
pub reference_list_entry: [HcpRefListEntry; 16],
}
impl HcpRefIdxState {
pub const DWORD_LENGTH: u32 = 18;
}
impl Default for HcpRefIdxState {
fn default() -> Self {
HcpRefIdxState {
dword_length: Default::default(),
subopcode: 18,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
reference_picture_list_select: Default::default(),
number_of_reference_indexes_active: Default::default(),
reference_list_entry: Default::default(),
}
}
}
impl Serialize for HcpRefIdxState {
type Out = [u32; 18];
fn pack_into(&self, out: &mut [u32; 18]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.reference_picture_list_select, 0, 0) |
__gen_uint(self.number_of_reference_indexes_active, 1, 4);
{
let [_, _, ref mut out2 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.reference_list_entry[0].pack_into(out2);
}
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.reference_list_entry[1].pack_into(out3);
}
{
let [_, _, _, _, ref mut out4 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.reference_list_entry[2].pack_into(out4);
}
{
let [_, _, _, _, _, ref mut out5 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.reference_list_entry[3].pack_into(out5);
}
{
let [_, _, _, _, _, _, ref mut out6 @ .., _, _, _, _, _, _, _, _, _, _, _] = out;
self.reference_list_entry[4].pack_into(out6);
}
{
let [_, _, _, _, _, _, _, ref mut out7 @ .., _, _, _, _, _, _, _, _, _, _] = out;
self.reference_list_entry[5].pack_into(out7);
}
{
let [_, _, _, _, _, _, _, _, ref mut out8 @ .., _, _, _, _, _, _, _, _, _] = out;
self.reference_list_entry[6].pack_into(out8);
}
{
let [_, _, _, _, _, _, _, _, _, ref mut out9 @ .., _, _, _, _, _, _, _, _] = out;
self.reference_list_entry[7].pack_into(out9);
}
{
let [_, _, _, _, _, _, _, _, _, _, ref mut out10 @ .., _, _, _, _, _, _, _] = out;
self.reference_list_entry[8].pack_into(out10);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, ref mut out11 @ .., _, _, _, _, _, _] = out;
self.reference_list_entry[9].pack_into(out11);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12 @ .., _, _, _, _, _] = out;
self.reference_list_entry[10].pack_into(out12);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out13 @ .., _, _, _, _] = out;
self.reference_list_entry[11].pack_into(out13);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out14 @ .., _, _, _] = out;
self.reference_list_entry[12].pack_into(out14);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out15 @ .., _, _] = out;
self.reference_list_entry[13].pack_into(out15);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out16 @ .., _] = out;
self.reference_list_entry[14].pack_into(out16);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out17 @ ..] = out;
self.reference_list_entry[15].pack_into(out17);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 18];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 18] as *const [u8; 72]) })
}
}
impl From<&[u32; 18]> for HcpRefIdxState {
fn from(input: &[u32; 18]) -> Self {
HcpRefIdxState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
reference_picture_list_select: __gen_unuint(input[1], 0, 0),
number_of_reference_indexes_active: __gen_unuint(input[1], 1, 4),
reference_list_entry: [
{{
let [_, _, ref in2 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in2.into()
}},
{{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in3.into()
}},
{{
let [_, _, _, _, ref in4 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in4.into()
}},
{{
let [_, _, _, _, _, ref in5 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = input;
in5.into()
}},
{{
let [_, _, _, _, _, _, ref in6 @ .., _, _, _, _, _, _, _, _, _, _, _] = input;
in6.into()
}},
{{
let [_, _, _, _, _, _, _, ref in7 @ .., _, _, _, _, _, _, _, _, _, _] = input;
in7.into()
}},
{{
let [_, _, _, _, _, _, _, _, ref in8 @ .., _, _, _, _, _, _, _, _, _] = input;
in8.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, ref in9 @ .., _, _, _, _, _, _, _, _] = input;
in9.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, ref in10 @ .., _, _, _, _, _, _, _] = input;
in10.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, ref in11 @ .., _, _, _, _, _, _] = input;
in11.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12 @ .., _, _, _, _, _] = input;
in12.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref in13 @ .., _, _, _, _] = input;
in13.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in14 @ .., _, _, _] = input;
in14.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in15 @ .., _, _] = input;
in15.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in16 @ .., _] = input;
in16.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in17 @ ..] = input;
in17.into()
}}
],
}
}
}
impl Deserialize for HcpRefIdxState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 18];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 18] as *mut [u8; 72]) })?;
Ok((&input).into())
}
}
pub struct HcpRefListEntry {
pub reference_picture_tb_value: u32,
pub list_entry: u32,
pub chroma_weighted_prediction: u32,
pub luma_weighted_prediction: u32,
pub long_term_reference: bool,
pub field_pic: bool,
pub top_field: bool,
}
impl HcpRefListEntry {
pub const DWORD_LENGTH: u32 = 1;
pub const DEFAULT: u32 = 0;
pub const EXPLICIT: u32 = 1;
}
impl Default for HcpRefListEntry {
fn default() -> Self {
HcpRefListEntry {
reference_picture_tb_value: Default::default(),
list_entry: Default::default(),
chroma_weighted_prediction: Default::default(),
luma_weighted_prediction: Default::default(),
long_term_reference: Default::default(),
field_pic: Default::default(),
top_field: Default::default(),
}
}
}
impl Serialize for HcpRefListEntry {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.reference_picture_tb_value, 0, 7) |
__gen_uint(self.list_entry, 8, 10) |
__gen_uint(self.chroma_weighted_prediction, 11, 11) |
__gen_uint(self.luma_weighted_prediction, 12, 12) |
__gen_uint(self.long_term_reference.into(), 13, 13) |
__gen_uint(self.field_pic.into(), 14, 14) |
__gen_uint(self.top_field.into(), 15, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for HcpRefListEntry {
fn from(input: &[u32; 1]) -> Self {
HcpRefListEntry {
reference_picture_tb_value: __gen_unuint(input[0], 0, 7),
list_entry: __gen_unuint(input[0], 8, 10),
chroma_weighted_prediction: __gen_unuint(input[0], 11, 11),
luma_weighted_prediction: __gen_unuint(input[0], 12, 12),
long_term_reference: __gen_unuint(input[0], 13, 13) != 0,
field_pic: __gen_unuint(input[0], 14, 14) != 0,
top_field: __gen_unuint(input[0], 15, 15) != 0,
}
}
}
impl Deserialize for HcpRefListEntry {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct HcpSliceState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub slice_horizontal_position: u32,
pub slice_vertical_position: u32,
pub next_slice_horizontal_position: u32,
pub next_slice_vertical_position: u32,
pub slice_type: u32,
pub last_slice: bool,
pub slice_qp_sign: u32,
pub dependent_slice: bool,
pub slice_temporal_mvp_enable: bool,
pub slice_qp: u32,
pub slice_cb_qp_offset: i32,
pub slice_cr_qp_offset: i32,
pub intra_ref_fetch_disable: bool,
pub last_slice_of_tile: u32,
pub slice_header_disable_deblocking_filter: bool,
pub slice_tc_offset_div2: i32,
pub slice_beta_offset_div2: i32,
pub slice_loop_filter_enable: bool,
pub slice_sao_chroma: bool,
pub slice_sao_luma: bool,
pub mvd_l1_zero: bool,
pub low_delay: bool,
pub collocated_from_l0: bool,
pub log2_weight_denominator_chroma: u32,
pub log2_weight_denominator_luma: u32,
pub cabac_init: bool,
pub max_merge_index: u32,
pub collocated_mv_temporal_buffer_index: u32,
pub slice_header_length: u32,
pub round_intra: u32,
pub round_inter: u32,
pub cabac_zero_word_insertion_enable: bool,
pub emulation_byte_slice_insert_enable: bool,
pub tail_insertion_present: bool,
pub slice_data_insertion_present: bool,
pub header_insertion_present: bool,
pub indirect_pak_bse_data_start_offset: u64,
pub transform_skip_lambda: u32,
pub transform_skip_number_of_zero_coeffs_factor0: u32,
pub transform_skip_number_of_non_zero_coeffs_factor0: u32,
pub transform_skip_number_of_zero_coeffs_factor1: u32,
pub transform_skip_number_of_non_zero_coeffs_factor1: u32,
}
impl HcpSliceState {
pub const DWORD_LENGTH: u32 = 11;
pub const B_SLICE: u32 = 0;
pub const I_SLICE: u32 = 2;
pub const P_SLICE: u32 = 1;
pub const _1: i32 = 31;
pub const _10: i32 = 22;
pub const _10_32: u32 = 9;
pub const _11: i32 = 21;
pub const _11_32: u32 = 10;
pub const _12: i32 = 20;
pub const _12_32: u32 = 11;
pub const _13_32: u32 = 12;
pub const _14_32: u32 = 13;
pub const _15_32: u32 = 14;
pub const _16_32: u32 = 15;
pub const _1_32: u32 = 0;
pub const _2: i32 = 30;
pub const _2_32: u32 = 1;
pub const _3: i32 = 29;
pub const _3_32: u32 = 2;
pub const _4: i32 = 28;
pub const _4_32: u32 = 3;
pub const _5: i32 = 27;
pub const _5_32: u32 = 4;
pub const _6: i32 = 26;
pub const _6_32: u32 = 5;
pub const _7: i32 = 25;
pub const _7_32: u32 = 6;
pub const _8: i32 = 24;
pub const _8_32: u32 = 7;
pub const _9: i32 = 23;
pub const _9_32: u32 = 8;
}
impl Default for HcpSliceState {
fn default() -> Self {
HcpSliceState {
dword_length: Default::default(),
subopcode: 20,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
slice_horizontal_position: Default::default(),
slice_vertical_position: Default::default(),
next_slice_horizontal_position: Default::default(),
next_slice_vertical_position: Default::default(),
slice_type: Default::default(),
last_slice: Default::default(),
slice_qp_sign: Default::default(),
dependent_slice: Default::default(),
slice_temporal_mvp_enable: Default::default(),
slice_qp: Default::default(),
slice_cb_qp_offset: Default::default(),
slice_cr_qp_offset: Default::default(),
intra_ref_fetch_disable: Default::default(),
last_slice_of_tile: Default::default(),
slice_header_disable_deblocking_filter: Default::default(),
slice_tc_offset_div2: Default::default(),
slice_beta_offset_div2: Default::default(),
slice_loop_filter_enable: Default::default(),
slice_sao_chroma: Default::default(),
slice_sao_luma: Default::default(),
mvd_l1_zero: Default::default(),
low_delay: Default::default(),
collocated_from_l0: Default::default(),
log2_weight_denominator_chroma: Default::default(),
log2_weight_denominator_luma: Default::default(),
cabac_init: Default::default(),
max_merge_index: Default::default(),
collocated_mv_temporal_buffer_index: Default::default(),
slice_header_length: Default::default(),
round_intra: Default::default(),
round_inter: Default::default(),
cabac_zero_word_insertion_enable: Default::default(),
emulation_byte_slice_insert_enable: Default::default(),
tail_insertion_present: Default::default(),
slice_data_insertion_present: Default::default(),
header_insertion_present: Default::default(),
indirect_pak_bse_data_start_offset: Default::default(),
transform_skip_lambda: Default::default(),
transform_skip_number_of_zero_coeffs_factor0: Default::default(),
transform_skip_number_of_non_zero_coeffs_factor0: Default::default(),
transform_skip_number_of_zero_coeffs_factor1: Default::default(),
transform_skip_number_of_non_zero_coeffs_factor1: Default::default(),
}
}
}
impl Serialize for HcpSliceState {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.slice_horizontal_position, 0, 8) |
__gen_uint(self.slice_vertical_position, 16, 24);
out[2] = __gen_uint(self.next_slice_horizontal_position, 0, 8) |
__gen_uint(self.next_slice_vertical_position, 16, 24);
out[3] = __gen_uint(self.slice_type, 0, 1) |
__gen_uint(self.last_slice.into(), 2, 2) |
__gen_uint(self.slice_qp_sign, 3, 3) |
__gen_uint(self.dependent_slice.into(), 4, 4) |
__gen_uint(self.slice_temporal_mvp_enable.into(), 5, 5) |
__gen_uint(self.slice_qp, 6, 11) |
__gen_uint(self.slice_cb_qp_offset as u32, 12, 16) |
__gen_uint(self.slice_cr_qp_offset as u32, 17, 21) |
__gen_uint(self.intra_ref_fetch_disable.into(), 22, 22) |
__gen_uint(self.last_slice_of_tile, 24, 24);
out[4] = __gen_uint(self.slice_header_disable_deblocking_filter.into(), 0, 0) |
__gen_uint(self.slice_tc_offset_div2 as u32, 1, 4) |
__gen_uint(self.slice_beta_offset_div2 as u32, 5, 8) |
__gen_uint(self.slice_loop_filter_enable.into(), 10, 10) |
__gen_uint(self.slice_sao_chroma.into(), 11, 11) |
__gen_uint(self.slice_sao_luma.into(), 12, 12) |
__gen_uint(self.mvd_l1_zero.into(), 13, 13) |
__gen_uint(self.low_delay.into(), 14, 14) |
__gen_uint(self.collocated_from_l0.into(), 15, 15) |
__gen_uint(self.log2_weight_denominator_chroma, 16, 18) |
__gen_uint(self.log2_weight_denominator_luma, 19, 21) |
__gen_uint(self.cabac_init.into(), 22, 22) |
__gen_uint(self.max_merge_index, 23, 25) |
__gen_uint(self.collocated_mv_temporal_buffer_index, 26, 28);
out[5] = __gen_uint(self.slice_header_length, 0, 15);
out[6] = __gen_uint(self.round_intra, 20, 23) |
__gen_uint(self.round_inter, 26, 29);
out[7] = __gen_uint(self.cabac_zero_word_insertion_enable.into(), 1, 1) |
__gen_uint(self.emulation_byte_slice_insert_enable.into(), 2, 2) |
__gen_uint(self.tail_insertion_present.into(), 8, 8) |
__gen_uint(self.slice_data_insertion_present.into(), 9, 9) |
__gen_uint(self.header_insertion_present.into(), 10, 10);
out[8] = __gen_offset(self.indirect_pak_bse_data_start_offset as u32, 6, 28);
out[9] = __gen_uint(self.transform_skip_lambda, 0, 15);
out[10] = __gen_uint(self.transform_skip_number_of_zero_coeffs_factor0, 0, 7) |
__gen_uint(self.transform_skip_number_of_non_zero_coeffs_factor0, 8, 15) |
__gen_uint(self.transform_skip_number_of_zero_coeffs_factor1, 16, 23) |
__gen_uint(self.transform_skip_number_of_non_zero_coeffs_factor1, 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for HcpSliceState {
fn from(input: &[u32; 11]) -> Self {
HcpSliceState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
slice_horizontal_position: __gen_unuint(input[1], 0, 8),
slice_vertical_position: __gen_unuint(input[1], 16, 24),
next_slice_horizontal_position: __gen_unuint(input[2], 0, 8),
next_slice_vertical_position: __gen_unuint(input[2], 16, 24),
slice_type: __gen_unuint(input[3], 0, 1),
last_slice: __gen_unuint(input[3], 2, 2) != 0,
slice_qp_sign: __gen_unuint(input[3], 3, 3),
dependent_slice: __gen_unuint(input[3], 4, 4) != 0,
slice_temporal_mvp_enable: __gen_unuint(input[3], 5, 5) != 0,
slice_qp: __gen_unuint(input[3], 6, 11),
slice_cb_qp_offset: (__gen_unuint(input[3], 12, 16)) as i32,
slice_cr_qp_offset: (__gen_unuint(input[3], 17, 21)) as i32,
intra_ref_fetch_disable: __gen_unuint(input[3], 22, 22) != 0,
last_slice_of_tile: __gen_unuint(input[3], 24, 24),
slice_header_disable_deblocking_filter: __gen_unuint(input[4], 0, 0) != 0,
slice_tc_offset_div2: (__gen_unuint(input[4], 1, 4)) as i32,
slice_beta_offset_div2: (__gen_unuint(input[4], 5, 8)) as i32,
slice_loop_filter_enable: __gen_unuint(input[4], 10, 10) != 0,
slice_sao_chroma: __gen_unuint(input[4], 11, 11) != 0,
slice_sao_luma: __gen_unuint(input[4], 12, 12) != 0,
mvd_l1_zero: __gen_unuint(input[4], 13, 13) != 0,
low_delay: __gen_unuint(input[4], 14, 14) != 0,
collocated_from_l0: __gen_unuint(input[4], 15, 15) != 0,
log2_weight_denominator_chroma: __gen_unuint(input[4], 16, 18),
log2_weight_denominator_luma: __gen_unuint(input[4], 19, 21),
cabac_init: __gen_unuint(input[4], 22, 22) != 0,
max_merge_index: __gen_unuint(input[4], 23, 25),
collocated_mv_temporal_buffer_index: __gen_unuint(input[4], 26, 28),
slice_header_length: __gen_unuint(input[5], 0, 15),
round_intra: __gen_unuint(input[6], 20, 23),
round_inter: __gen_unuint(input[6], 26, 29),
cabac_zero_word_insertion_enable: __gen_unuint(input[7], 1, 1) != 0,
emulation_byte_slice_insert_enable: __gen_unuint(input[7], 2, 2) != 0,
tail_insertion_present: __gen_unuint(input[7], 8, 8) != 0,
slice_data_insertion_present: __gen_unuint(input[7], 9, 9) != 0,
header_insertion_present: __gen_unuint(input[7], 10, 10) != 0,
indirect_pak_bse_data_start_offset: (__gen_unuint(input[8], 6, 28) as u64) << 6,
transform_skip_lambda: __gen_unuint(input[9], 0, 15),
transform_skip_number_of_zero_coeffs_factor0: __gen_unuint(input[10], 0, 7),
transform_skip_number_of_non_zero_coeffs_factor0: __gen_unuint(input[10], 8, 15),
transform_skip_number_of_zero_coeffs_factor1: __gen_unuint(input[10], 16, 23),
transform_skip_number_of_non_zero_coeffs_factor1: __gen_unuint(input[10], 24, 31),
}
}
}
impl Deserialize for HcpSliceState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct HcpSurfaceState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub surface_pitch: u32,
pub surface_id: u32,
pub y_offset_for_u_cb: u32,
pub surface_format: u32,
}
impl HcpSurfaceState {
pub const DWORD_LENGTH: u32 = 3;
pub const ALTREF_REFERENCE_PICTURE: u32 = 4;
pub const CURRENT_DECODED_PICTURE: u32 = 0;
pub const GOLDEN_REFERENCE_PICTURE: u32 = 3;
pub const P010: u32 = 13;
pub const P010VARIANT: u32 = 3;
pub const P016: u32 = 14;
pub const PLANAR_420_8: u32 = 4;
pub const PREV_REFERENCE_PICTURE: u32 = 2;
pub const SOURCE_INPUT_PICTURE: u32 = 1;
}
impl Default for HcpSurfaceState {
fn default() -> Self {
HcpSurfaceState {
dword_length: Default::default(),
subopcode: 1,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
surface_pitch: Default::default(),
surface_id: Default::default(),
y_offset_for_u_cb: Default::default(),
surface_format: Default::default(),
}
}
}
impl Serialize for HcpSurfaceState {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.surface_pitch, 0, 16) |
__gen_uint(self.surface_id, 28, 31);
out[2] = __gen_uint(self.y_offset_for_u_cb, 0, 14) |
__gen_uint(self.surface_format, 28, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for HcpSurfaceState {
fn from(input: &[u32; 3]) -> Self {
HcpSurfaceState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
surface_pitch: __gen_unuint(input[1], 0, 16),
surface_id: __gen_unuint(input[1], 28, 31),
y_offset_for_u_cb: __gen_unuint(input[2], 0, 14),
surface_format: __gen_unuint(input[2], 28, 31),
}
}
}
impl Deserialize for HcpSurfaceState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct HcpTileCoding {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub sao_parameter_offset: u32,
}
impl HcpTileCoding {
pub const DWORD_LENGTH: u32 = 5;
}
impl Default for HcpTileCoding {
fn default() -> Self {
HcpTileCoding {
dword_length: Default::default(),
subopcode: 21,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
sao_parameter_offset: Default::default(),
}
}
}
impl Serialize for HcpTileCoding {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = __gen_uint(self.sao_parameter_offset, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for HcpTileCoding {
fn from(input: &[u32; 5]) -> Self {
HcpTileCoding {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
sao_parameter_offset: __gen_unuint(input[4], 0, 31),
}
}
}
impl Deserialize for HcpTileCoding {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct HcpTilePositionInCtb {
pub ctbpos0_i: u32,
pub ctbpos1_i: u32,
pub ctbpos2_i: u32,
pub ctbpos3_i: u32,
}
impl HcpTilePositionInCtb {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for HcpTilePositionInCtb {
fn default() -> Self {
HcpTilePositionInCtb {
ctbpos0_i: Default::default(),
ctbpos1_i: Default::default(),
ctbpos2_i: Default::default(),
ctbpos3_i: Default::default(),
}
}
}
impl Serialize for HcpTilePositionInCtb {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.ctbpos0_i, 0, 7) |
__gen_uint(self.ctbpos1_i, 8, 15) |
__gen_uint(self.ctbpos2_i, 16, 23) |
__gen_uint(self.ctbpos3_i, 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for HcpTilePositionInCtb {
fn from(input: &[u32; 1]) -> Self {
HcpTilePositionInCtb {
ctbpos0_i: __gen_unuint(input[0], 0, 7),
ctbpos1_i: __gen_unuint(input[0], 8, 15),
ctbpos2_i: __gen_unuint(input[0], 16, 23),
ctbpos3_i: __gen_unuint(input[0], 24, 31),
}
}
}
impl Deserialize for HcpTilePositionInCtb {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct HcpTileState {
pub dword_length: u32,
pub media_instruction_command: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub number_of_tile_rows: u32,
pub number_of_tile_columns: u32,
pub column_position: [HcpTilePositionInCtb; 5],
pub row_position: [HcpTilePositionInCtb; 6],
}
impl HcpTileState {
pub const DWORD_LENGTH: u32 = 13;
}
impl Default for HcpTileState {
fn default() -> Self {
HcpTileState {
dword_length: Default::default(),
media_instruction_command: 17,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
number_of_tile_rows: Default::default(),
number_of_tile_columns: Default::default(),
column_position: Default::default(),
row_position: Default::default(),
}
}
}
impl Serialize for HcpTileState {
type Out = [u32; 13];
fn pack_into(&self, out: &mut [u32; 13]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.media_instruction_command, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.number_of_tile_rows, 0, 4) |
__gen_uint(self.number_of_tile_columns, 5, 9);
{
let [_, _, ref mut out2 @ .., _, _, _, _, _, _, _, _, _, _] = out;
self.column_position[0].pack_into(out2);
}
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _, _, _] = out;
self.column_position[1].pack_into(out3);
}
{
let [_, _, _, _, ref mut out4 @ .., _, _, _, _, _, _, _, _] = out;
self.column_position[2].pack_into(out4);
}
{
let [_, _, _, _, _, ref mut out5 @ .., _, _, _, _, _, _, _] = out;
self.column_position[3].pack_into(out5);
}
{
let [_, _, _, _, _, _, ref mut out6 @ .., _, _, _, _, _, _] = out;
self.column_position[4].pack_into(out6);
}
{
let [_, _, _, _, _, _, _, ref mut out7 @ .., _, _, _, _, _] = out;
self.row_position[0].pack_into(out7);
}
{
let [_, _, _, _, _, _, _, _, ref mut out8 @ .., _, _, _, _] = out;
self.row_position[1].pack_into(out8);
}
{
let [_, _, _, _, _, _, _, _, _, ref mut out9 @ .., _, _, _] = out;
self.row_position[2].pack_into(out9);
}
{
let [_, _, _, _, _, _, _, _, _, _, ref mut out10 @ .., _, _] = out;
self.row_position[3].pack_into(out10);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, ref mut out11 @ .., _] = out;
self.row_position[4].pack_into(out11);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12 @ ..] = out;
self.row_position[5].pack_into(out12);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 13];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 13] as *const [u8; 52]) })
}
}
impl From<&[u32; 13]> for HcpTileState {
fn from(input: &[u32; 13]) -> Self {
HcpTileState {
dword_length: __gen_unuint(input[0], 0, 11),
media_instruction_command: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
number_of_tile_rows: __gen_unuint(input[1], 0, 4),
number_of_tile_columns: __gen_unuint(input[1], 5, 9),
column_position: [
{{
let [_, _, ref in2 @ .., _, _, _, _, _, _, _, _, _, _] = input;
in2.into()
}},
{{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _, _, _] = input;
in3.into()
}},
{{
let [_, _, _, _, ref in4 @ .., _, _, _, _, _, _, _, _] = input;
in4.into()
}},
{{
let [_, _, _, _, _, ref in5 @ .., _, _, _, _, _, _, _] = input;
in5.into()
}},
{{
let [_, _, _, _, _, _, ref in6 @ .., _, _, _, _, _, _] = input;
in6.into()
}}
],
row_position: [
{{
let [_, _, _, _, _, _, _, ref in7 @ .., _, _, _, _, _] = input;
in7.into()
}},
{{
let [_, _, _, _, _, _, _, _, ref in8 @ .., _, _, _, _] = input;
in8.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, ref in9 @ .., _, _, _] = input;
in9.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, ref in10 @ .., _, _] = input;
in10.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, ref in11 @ .., _] = input;
in11.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12 @ ..] = input;
in12.into()
}}
],
}
}
}
impl Deserialize for HcpTileState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 13];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 13] as *mut [u8; 52]) })?;
Ok((&input).into())
}
}
pub struct HcpVp9PakObject {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub split_coding_unit_flag_x0_y0: u32,
pub cu_count: u32,
pub last_sb_of_tile: bool,
pub current_sb_x_address: u32,
pub current_sb_y_address: u32,
pub sse_classid_32x32_0: u32,
pub sse_classid_32x32_1: u32,
pub sse_classid_32x32_2: u32,
pub sse_classid_32x32_3: u32,
pub lcu_force_zero_coeff: bool,
}
impl HcpVp9PakObject {
pub const DWORD_LENGTH: u32 = 5;
}
impl Default for HcpVp9PakObject {
fn default() -> Self {
HcpVp9PakObject {
dword_length: Default::default(),
subopcode: 53,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
split_coding_unit_flag_x0_y0: Default::default(),
cu_count: Default::default(),
last_sb_of_tile: Default::default(),
current_sb_x_address: Default::default(),
current_sb_y_address: Default::default(),
sse_classid_32x32_0: Default::default(),
sse_classid_32x32_1: Default::default(),
sse_classid_32x32_2: Default::default(),
sse_classid_32x32_3: Default::default(),
lcu_force_zero_coeff: Default::default(),
}
}
}
impl Serialize for HcpVp9PakObject {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.split_coding_unit_flag_x0_y0, 0, 20) |
__gen_uint(self.cu_count, 24, 29) |
__gen_uint(self.last_sb_of_tile.into(), 31, 31);
out[2] = __gen_uint(self.current_sb_x_address, 0, 15) |
__gen_uint(self.current_sb_y_address, 16, 31);
out[3] = 0;
out[4] = __gen_uint(self.sse_classid_32x32_0, 0, 3) |
__gen_uint(self.sse_classid_32x32_1, 4, 7) |
__gen_uint(self.sse_classid_32x32_2, 8, 11) |
__gen_uint(self.sse_classid_32x32_3, 12, 15) |
__gen_uint(self.lcu_force_zero_coeff.into(), 16, 16);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for HcpVp9PakObject {
fn from(input: &[u32; 5]) -> Self {
HcpVp9PakObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
split_coding_unit_flag_x0_y0: __gen_unuint(input[1], 0, 20),
cu_count: __gen_unuint(input[1], 24, 29),
last_sb_of_tile: __gen_unuint(input[1], 31, 31) != 0,
current_sb_x_address: __gen_unuint(input[2], 0, 15),
current_sb_y_address: __gen_unuint(input[2], 16, 31),
sse_classid_32x32_0: __gen_unuint(input[4], 0, 3),
sse_classid_32x32_1: __gen_unuint(input[4], 4, 7),
sse_classid_32x32_2: __gen_unuint(input[4], 8, 11),
sse_classid_32x32_3: __gen_unuint(input[4], 12, 15),
lcu_force_zero_coeff: __gen_unuint(input[4], 16, 16) != 0,
}
}
}
impl Deserialize for HcpVp9PakObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct HcpVp9PicState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub frame_width: u32,
pub frame_height: u32,
pub frame_type: u32,
pub adapt_probabilities: bool,
pub intra_only: bool,
pub allow_hi_precision_mv: bool,
pub motion_compensation_filter_type: u32,
pub reference_frame_sign_bias: u32,
pub use_prev_in_find_mv_references: bool,
pub hybrid_prediction_mode: u32,
pub selectable_tx_mode: u32,
pub last_frame_type: u32,
pub refresh_frame_context_enable: bool,
pub error_resilient_mode_enable: bool,
pub frame_parallel_decoding_mode_enable: bool,
pub filter_level: u32,
pub sharpness_level: u32,
pub segmentation_enable: bool,
pub segmentation_update_map: bool,
pub segmentation_temporal_update: bool,
pub lossless_mode: bool,
pub segment_id_stream_out_enable: bool,
pub segment_id_stream_in_enable: bool,
pub log2_tile_column: u32,
pub log2_tile_row: u32,
pub sse_enable: bool,
pub chroma_sampling_format: u32,
pub bit_depth: u32,
pub profile_level: u32,
pub vertical_scale_factor_for_last: f32,
pub horizontal_scale_factor_for_last: f32,
pub vertical_scale_factor_for_golden: f32,
pub horizontal_scale_factor_for_golden: f32,
pub vertical_scale_factor_for_altref: f32,
pub horizontal_scale_factor_for_altref: f32,
pub last_frame_width: u32,
pub last_frame_height: u32,
pub golden_frame_width: u32,
pub golden_frame_height: u32,
pub altref_frame_width: u32,
pub altref_frame_height: u32,
pub uncompressed_header_length: u32,
pub first_partition_size: u32,
pub motion_comp_scaling_enable: bool,
pub compressed_header_bin_count: u32,
pub luma_ac_q_index_delta: u32,
pub tail_insertion_enable: bool,
pub header_insertion_enable: bool,
pub chroma_ac_q_index_delta: i32,
pub chroma_dc_q_index_delta: i32,
pub luma_dc_q_index_delta: i32,
pub lf_ref_delta_0: i32,
pub lf_ref_delta_1: i32,
pub lf_ref_delta_2: i32,
pub lf_ref_delta_3: i32,
pub lf_mode_delta_0: i32,
pub lf_mode_delta_1: i32,
pub bit_offset_for_lf_ref_delta: u32,
pub bit_offset_for_lf_mode_delta: u32,
pub bit_offset_for_qindex: u32,
pub bit_offset_for_lf_level: u32,
pub non_first_pass: bool,
pub vdenc_pak_only_pass: bool,
pub frame_bitrate_max_report: bool,
pub frame_bitrate_min_report: bool,
pub frame_bitrate_max: u32,
pub frame_bitrate_max_unit: u32,
pub frame_bitrate_min: u32,
pub frame_bitrate_min_unit: u32,
pub frame_delta_qindex_max: u64,
pub frame_delta_qindex_min: u32,
pub frame_delta_lfmax: u64,
pub frame_delta_lfmin: u32,
pub frame_delta_qindex_lfmax_range: u64,
pub frame_delta_qindex_lfmin_range: u32,
pub minimum_frame_size: u32,
pub minimum_frame_size_units: u32,
pub bit_offset_for_first_partition_size: u32,
pub class0_sse_threshold0: u32,
pub class0_sse_threshold1: u32,
pub sse_thresholds_for_class1_8: [u8; 32],
}
impl HcpVp9PicState {
pub const DWORD_LENGTH: u32 = 42;
pub const BILINEAR: u32 = 3;
pub const EIGHT_TAP: u32 = 0;
pub const EIGHT_TAP_SHARP: u32 = 2;
pub const EIGHT_TAP_SMOOTH: u32 = 1;
pub const FORMAT_420: u32 = 0;
pub const INTER_FRAME: u32 = 1;
pub const KEY_FRAME: u32 = 0;
pub const NON_KEY_FRAME: u32 = 1;
pub const PROFILE_0: u32 = 0;
pub const PROFILE_2: u32 = 2;
pub const SWITCHABLE: u32 = 4;
pub const _10_BIT: u32 = 2;
pub const _12_BIT: u32 = 4;
pub const _16KB: u32 = 1;
pub const _16_TILE_COLUMN: u32 = 4;
pub const _1_TILE_COLUMN: u32 = 0;
pub const _1_TILE_ROW: u32 = 0;
pub const _2_TILE_COLUMN: u32 = 1;
pub const _2_TILE_ROW: u32 = 1;
pub const _32_TILE_COLUMN: u32 = 5;
pub const _4KB: u32 = 0;
pub const _4_TILE_COLUMN: u32 = 2;
pub const _4_TILE_ROW: u32 = 2;
pub const _64_TILE_COLUMN: u32 = 6;
pub const _8_BIT: u32 = 0;
pub const _8_TILE_COLUMN: u32 = 3;
}
impl Default for HcpVp9PicState {
fn default() -> Self {
HcpVp9PicState {
dword_length: Default::default(),
subopcode: 48,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
frame_width: Default::default(),
frame_height: Default::default(),
frame_type: Default::default(),
adapt_probabilities: Default::default(),
intra_only: Default::default(),
allow_hi_precision_mv: Default::default(),
motion_compensation_filter_type: Default::default(),
reference_frame_sign_bias: Default::default(),
use_prev_in_find_mv_references: Default::default(),
hybrid_prediction_mode: Default::default(),
selectable_tx_mode: Default::default(),
last_frame_type: Default::default(),
refresh_frame_context_enable: Default::default(),
error_resilient_mode_enable: Default::default(),
frame_parallel_decoding_mode_enable: Default::default(),
filter_level: Default::default(),
sharpness_level: Default::default(),
segmentation_enable: Default::default(),
segmentation_update_map: Default::default(),
segmentation_temporal_update: Default::default(),
lossless_mode: Default::default(),
segment_id_stream_out_enable: Default::default(),
segment_id_stream_in_enable: Default::default(),
log2_tile_column: Default::default(),
log2_tile_row: Default::default(),
sse_enable: Default::default(),
chroma_sampling_format: Default::default(),
bit_depth: Default::default(),
profile_level: Default::default(),
vertical_scale_factor_for_last: Default::default(),
horizontal_scale_factor_for_last: Default::default(),
vertical_scale_factor_for_golden: Default::default(),
horizontal_scale_factor_for_golden: Default::default(),
vertical_scale_factor_for_altref: Default::default(),
horizontal_scale_factor_for_altref: Default::default(),
last_frame_width: Default::default(),
last_frame_height: Default::default(),
golden_frame_width: Default::default(),
golden_frame_height: Default::default(),
altref_frame_width: Default::default(),
altref_frame_height: Default::default(),
uncompressed_header_length: Default::default(),
first_partition_size: Default::default(),
motion_comp_scaling_enable: Default::default(),
compressed_header_bin_count: Default::default(),
luma_ac_q_index_delta: Default::default(),
tail_insertion_enable: Default::default(),
header_insertion_enable: Default::default(),
chroma_ac_q_index_delta: Default::default(),
chroma_dc_q_index_delta: Default::default(),
luma_dc_q_index_delta: Default::default(),
lf_ref_delta_0: Default::default(),
lf_ref_delta_1: Default::default(),
lf_ref_delta_2: Default::default(),
lf_ref_delta_3: Default::default(),
lf_mode_delta_0: Default::default(),
lf_mode_delta_1: Default::default(),
bit_offset_for_lf_ref_delta: Default::default(),
bit_offset_for_lf_mode_delta: Default::default(),
bit_offset_for_qindex: Default::default(),
bit_offset_for_lf_level: Default::default(),
non_first_pass: Default::default(),
vdenc_pak_only_pass: Default::default(),
frame_bitrate_max_report: Default::default(),
frame_bitrate_min_report: Default::default(),
frame_bitrate_max: Default::default(),
frame_bitrate_max_unit: Default::default(),
frame_bitrate_min: Default::default(),
frame_bitrate_min_unit: Default::default(),
frame_delta_qindex_max: Default::default(),
frame_delta_qindex_min: Default::default(),
frame_delta_lfmax: Default::default(),
frame_delta_lfmin: Default::default(),
frame_delta_qindex_lfmax_range: Default::default(),
frame_delta_qindex_lfmin_range: Default::default(),
minimum_frame_size: Default::default(),
minimum_frame_size_units: Default::default(),
bit_offset_for_first_partition_size: Default::default(),
class0_sse_threshold0: Default::default(),
class0_sse_threshold1: Default::default(),
sse_thresholds_for_class1_8: Default::default(),
}
}
}
impl Serialize for HcpVp9PicState {
type Out = [u32; 42];
fn pack_into(&self, out: &mut [u32; 42]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.frame_width, 0, 13) |
__gen_uint(self.frame_height, 16, 29);
out[2] = __gen_uint(self.frame_type, 0, 0) |
__gen_uint(self.adapt_probabilities.into(), 1, 1) |
__gen_uint(self.intra_only.into(), 2, 2) |
__gen_uint(self.allow_hi_precision_mv.into(), 3, 3) |
__gen_uint(self.motion_compensation_filter_type, 4, 6) |
__gen_uint(self.reference_frame_sign_bias, 7, 9) |
__gen_uint(self.use_prev_in_find_mv_references.into(), 10, 10) |
__gen_uint(self.hybrid_prediction_mode, 11, 11) |
__gen_uint(self.selectable_tx_mode, 12, 12) |
__gen_uint(self.last_frame_type, 13, 13) |
__gen_uint(self.refresh_frame_context_enable.into(), 14, 14) |
__gen_uint(self.error_resilient_mode_enable.into(), 15, 15) |
__gen_uint(self.frame_parallel_decoding_mode_enable.into(), 16, 16) |
__gen_uint(self.filter_level, 17, 22) |
__gen_uint(self.sharpness_level, 23, 25) |
__gen_uint(self.segmentation_enable.into(), 26, 26) |
__gen_uint(self.segmentation_update_map.into(), 27, 27) |
__gen_uint(self.segmentation_temporal_update.into(), 28, 28) |
__gen_uint(self.lossless_mode.into(), 29, 29) |
__gen_uint(self.segment_id_stream_out_enable.into(), 30, 30) |
__gen_uint(self.segment_id_stream_in_enable.into(), 31, 31);
out[3] = __gen_uint(self.log2_tile_column, 0, 3) |
__gen_uint(self.log2_tile_row, 8, 9) |
__gen_uint(self.sse_enable.into(), 21, 21) |
__gen_uint(self.chroma_sampling_format, 22, 23) |
__gen_uint(self.bit_depth, 24, 27) |
__gen_uint(self.profile_level, 28, 31);
out[4] = __gen_ufixed(self.vertical_scale_factor_for_last, 0, 15, 14) |
__gen_ufixed(self.horizontal_scale_factor_for_last, 16, 31, 14);
out[5] = __gen_ufixed(self.vertical_scale_factor_for_golden, 0, 15, 14) |
__gen_ufixed(self.horizontal_scale_factor_for_golden, 16, 31, 14);
out[6] = __gen_ufixed(self.vertical_scale_factor_for_altref, 0, 15, 14) |
__gen_ufixed(self.horizontal_scale_factor_for_altref, 16, 31, 14);
out[7] = __gen_uint(self.last_frame_width, 0, 13) |
__gen_uint(self.last_frame_height, 16, 29);
out[8] = __gen_uint(self.golden_frame_width, 0, 13) |
__gen_uint(self.golden_frame_height, 16, 29);
out[9] = __gen_uint(self.altref_frame_width, 0, 13) |
__gen_uint(self.altref_frame_height, 16, 29);
out[10] = __gen_uint(self.uncompressed_header_length, 0, 7) |
__gen_uint(self.first_partition_size, 16, 31);
out[11] = __gen_uint(self.motion_comp_scaling_enable.into(), 1, 1);
out[12] = 0;
out[13] = __gen_uint(self.compressed_header_bin_count, 0, 15) |
__gen_uint(self.luma_ac_q_index_delta, 16, 23) |
__gen_uint(self.tail_insertion_enable.into(), 24, 24) |
__gen_uint(self.header_insertion_enable.into(), 25, 25);
out[14] = __gen_uint(self.chroma_ac_q_index_delta as u32, 0, 4) |
__gen_uint(self.chroma_dc_q_index_delta as u32, 8, 12) |
__gen_uint(self.luma_dc_q_index_delta as u32, 16, 20);
out[15] = __gen_uint(self.lf_ref_delta_0 as u32, 0, 6) |
__gen_uint(self.lf_ref_delta_1 as u32, 8, 14) |
__gen_uint(self.lf_ref_delta_2 as u32, 16, 22) |
__gen_uint(self.lf_ref_delta_3 as u32, 24, 30);
out[16] = __gen_uint(self.lf_mode_delta_0 as u32, 0, 6) |
__gen_uint(self.lf_mode_delta_1 as u32, 8, 14);
out[17] = __gen_uint(self.bit_offset_for_lf_ref_delta, 0, 15) |
__gen_uint(self.bit_offset_for_lf_mode_delta, 16, 31);
out[18] = __gen_uint(self.bit_offset_for_qindex, 0, 15) |
__gen_uint(self.bit_offset_for_lf_level, 16, 31);
out[19] = __gen_uint(self.non_first_pass.into(), 16, 16) |
__gen_uint(self.vdenc_pak_only_pass.into(), 17, 17) |
__gen_uint(self.frame_bitrate_max_report.into(), 25, 25) |
__gen_uint(self.frame_bitrate_min_report.into(), 26, 26);
out[20] = __gen_uint(self.frame_bitrate_max, 0, 13) |
__gen_uint(self.frame_bitrate_max_unit, 31, 31);
out[21] = __gen_uint(self.frame_bitrate_min, 0, 13) |
__gen_uint(self.frame_bitrate_min_unit, 31, 31);
out[22] = __gen_uint(self.frame_delta_qindex_max as u32, 0, 31);
out[23] = __gen_uint((self.frame_delta_qindex_max >> 32) as u32, 0, 31);
out[24] = __gen_uint(self.frame_delta_qindex_min, 0, 31);
out[25] = __gen_uint(self.frame_delta_lfmax as u32, 0, 31);
out[26] = __gen_uint((self.frame_delta_lfmax >> 32) as u32, 0, 31);
out[27] = __gen_uint(self.frame_delta_lfmin, 0, 31);
out[28] = __gen_uint(self.frame_delta_qindex_lfmax_range as u32, 0, 31);
out[29] = __gen_uint((self.frame_delta_qindex_lfmax_range >> 32) as u32, 0, 31);
out[30] = __gen_uint(self.frame_delta_qindex_lfmin_range, 0, 31);
out[31] = __gen_uint(self.minimum_frame_size, 0, 15) |
__gen_uint(self.minimum_frame_size_units, 30, 31);
out[32] = __gen_uint(self.bit_offset_for_first_partition_size, 0, 15);
out[33] = __gen_uint(self.class0_sse_threshold0, 0, 15) |
__gen_uint(self.class0_sse_threshold1, 16, 31);
out[34] = __gen_uint(self.sse_thresholds_for_class1_8[0].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[1].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[2].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[3].into(), 24, 31);
out[35] = __gen_uint(self.sse_thresholds_for_class1_8[4].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[5].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[6].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[7].into(), 24, 31);
out[36] = __gen_uint(self.sse_thresholds_for_class1_8[8].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[9].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[10].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[11].into(), 24, 31);
out[37] = __gen_uint(self.sse_thresholds_for_class1_8[12].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[13].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[14].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[15].into(), 24, 31);
out[38] = __gen_uint(self.sse_thresholds_for_class1_8[16].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[17].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[18].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[19].into(), 24, 31);
out[39] = __gen_uint(self.sse_thresholds_for_class1_8[20].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[21].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[22].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[23].into(), 24, 31);
out[40] = __gen_uint(self.sse_thresholds_for_class1_8[24].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[25].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[26].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[27].into(), 24, 31);
out[41] = __gen_uint(self.sse_thresholds_for_class1_8[28].into(), 0, 7) |
__gen_uint(self.sse_thresholds_for_class1_8[29].into(), 8, 15) |
__gen_uint(self.sse_thresholds_for_class1_8[30].into(), 16, 23) |
__gen_uint(self.sse_thresholds_for_class1_8[31].into(), 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 42];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 42] as *const [u8; 168]) })
}
}
impl From<&[u32; 42]> for HcpVp9PicState {
fn from(input: &[u32; 42]) -> Self {
HcpVp9PicState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
frame_width: __gen_unuint(input[1], 0, 13),
frame_height: __gen_unuint(input[1], 16, 29),
frame_type: __gen_unuint(input[2], 0, 0),
adapt_probabilities: __gen_unuint(input[2], 1, 1) != 0,
intra_only: __gen_unuint(input[2], 2, 2) != 0,
allow_hi_precision_mv: __gen_unuint(input[2], 3, 3) != 0,
motion_compensation_filter_type: __gen_unuint(input[2], 4, 6),
reference_frame_sign_bias: __gen_unuint(input[2], 7, 9),
use_prev_in_find_mv_references: __gen_unuint(input[2], 10, 10) != 0,
hybrid_prediction_mode: __gen_unuint(input[2], 11, 11),
selectable_tx_mode: __gen_unuint(input[2], 12, 12),
last_frame_type: __gen_unuint(input[2], 13, 13),
refresh_frame_context_enable: __gen_unuint(input[2], 14, 14) != 0,
error_resilient_mode_enable: __gen_unuint(input[2], 15, 15) != 0,
frame_parallel_decoding_mode_enable: __gen_unuint(input[2], 16, 16) != 0,
filter_level: __gen_unuint(input[2], 17, 22),
sharpness_level: __gen_unuint(input[2], 23, 25),
segmentation_enable: __gen_unuint(input[2], 26, 26) != 0,
segmentation_update_map: __gen_unuint(input[2], 27, 27) != 0,
segmentation_temporal_update: __gen_unuint(input[2], 28, 28) != 0,
lossless_mode: __gen_unuint(input[2], 29, 29) != 0,
segment_id_stream_out_enable: __gen_unuint(input[2], 30, 30) != 0,
segment_id_stream_in_enable: __gen_unuint(input[2], 31, 31) != 0,
log2_tile_column: __gen_unuint(input[3], 0, 3),
log2_tile_row: __gen_unuint(input[3], 8, 9),
sse_enable: __gen_unuint(input[3], 21, 21) != 0,
chroma_sampling_format: __gen_unuint(input[3], 22, 23),
bit_depth: __gen_unuint(input[3], 24, 27),
profile_level: __gen_unuint(input[3], 28, 31),
vertical_scale_factor_for_last: __gen_unufixed(input[4], 0, 15, 14),
horizontal_scale_factor_for_last: __gen_unufixed(input[4], 16, 31, 14),
vertical_scale_factor_for_golden: __gen_unufixed(input[5], 0, 15, 14),
horizontal_scale_factor_for_golden: __gen_unufixed(input[5], 16, 31, 14),
vertical_scale_factor_for_altref: __gen_unufixed(input[6], 0, 15, 14),
horizontal_scale_factor_for_altref: __gen_unufixed(input[6], 16, 31, 14),
last_frame_width: __gen_unuint(input[7], 0, 13),
last_frame_height: __gen_unuint(input[7], 16, 29),
golden_frame_width: __gen_unuint(input[8], 0, 13),
golden_frame_height: __gen_unuint(input[8], 16, 29),
altref_frame_width: __gen_unuint(input[9], 0, 13),
altref_frame_height: __gen_unuint(input[9], 16, 29),
uncompressed_header_length: __gen_unuint(input[10], 0, 7),
first_partition_size: __gen_unuint(input[10], 16, 31),
motion_comp_scaling_enable: __gen_unuint(input[11], 1, 1) != 0,
compressed_header_bin_count: __gen_unuint(input[13], 0, 15),
luma_ac_q_index_delta: __gen_unuint(input[13], 16, 23),
tail_insertion_enable: __gen_unuint(input[13], 24, 24) != 0,
header_insertion_enable: __gen_unuint(input[13], 25, 25) != 0,
chroma_ac_q_index_delta: (__gen_unuint(input[14], 0, 4)) as i32,
chroma_dc_q_index_delta: (__gen_unuint(input[14], 8, 12)) as i32,
luma_dc_q_index_delta: (__gen_unuint(input[14], 16, 20)) as i32,
lf_ref_delta_0: (__gen_unuint(input[15], 0, 6)) as i32,
lf_ref_delta_1: (__gen_unuint(input[15], 8, 14)) as i32,
lf_ref_delta_2: (__gen_unuint(input[15], 16, 22)) as i32,
lf_ref_delta_3: (__gen_unuint(input[15], 24, 30)) as i32,
lf_mode_delta_0: (__gen_unuint(input[16], 0, 6)) as i32,
lf_mode_delta_1: (__gen_unuint(input[16], 8, 14)) as i32,
bit_offset_for_lf_ref_delta: __gen_unuint(input[17], 0, 15),
bit_offset_for_lf_mode_delta: __gen_unuint(input[17], 16, 31),
bit_offset_for_qindex: __gen_unuint(input[18], 0, 15),
bit_offset_for_lf_level: __gen_unuint(input[18], 16, 31),
non_first_pass: __gen_unuint(input[19], 16, 16) != 0,
vdenc_pak_only_pass: __gen_unuint(input[19], 17, 17) != 0,
frame_bitrate_max_report: __gen_unuint(input[19], 25, 25) != 0,
frame_bitrate_min_report: __gen_unuint(input[19], 26, 26) != 0,
frame_bitrate_max: __gen_unuint(input[20], 0, 13),
frame_bitrate_max_unit: __gen_unuint(input[20], 31, 31),
frame_bitrate_min: __gen_unuint(input[21], 0, 13),
frame_bitrate_min_unit: __gen_unuint(input[21], 31, 31),
frame_delta_qindex_max: (__gen_unuint(input[22], 0, 31) as u64) |
(__gen_unuint(input[23], 0, 31) as u64) << 32,
frame_delta_qindex_min: __gen_unuint(input[24], 0, 31),
frame_delta_lfmax: (__gen_unuint(input[25], 0, 31) as u64) |
(__gen_unuint(input[26], 0, 31) as u64) << 32,
frame_delta_lfmin: __gen_unuint(input[27], 0, 31),
frame_delta_qindex_lfmax_range: (__gen_unuint(input[28], 0, 31) as u64) |
(__gen_unuint(input[29], 0, 31) as u64) << 32,
frame_delta_qindex_lfmin_range: __gen_unuint(input[30], 0, 31),
minimum_frame_size: __gen_unuint(input[31], 0, 15),
minimum_frame_size_units: __gen_unuint(input[31], 30, 31),
bit_offset_for_first_partition_size: __gen_unuint(input[32], 0, 15),
class0_sse_threshold0: __gen_unuint(input[33], 0, 15),
class0_sse_threshold1: __gen_unuint(input[33], 16, 31),
sse_thresholds_for_class1_8: [
(__gen_unuint(input[34], 0, 7)) as u8,
(__gen_unuint(input[34], 8, 15)) as u8,
(__gen_unuint(input[34], 16, 23)) as u8,
(__gen_unuint(input[34], 24, 31)) as u8,
(__gen_unuint(input[35], 0, 7)) as u8,
(__gen_unuint(input[35], 8, 15)) as u8,
(__gen_unuint(input[35], 16, 23)) as u8,
(__gen_unuint(input[35], 24, 31)) as u8,
(__gen_unuint(input[36], 0, 7)) as u8,
(__gen_unuint(input[36], 8, 15)) as u8,
(__gen_unuint(input[36], 16, 23)) as u8,
(__gen_unuint(input[36], 24, 31)) as u8,
(__gen_unuint(input[37], 0, 7)) as u8,
(__gen_unuint(input[37], 8, 15)) as u8,
(__gen_unuint(input[37], 16, 23)) as u8,
(__gen_unuint(input[37], 24, 31)) as u8,
(__gen_unuint(input[38], 0, 7)) as u8,
(__gen_unuint(input[38], 8, 15)) as u8,
(__gen_unuint(input[38], 16, 23)) as u8,
(__gen_unuint(input[38], 24, 31)) as u8,
(__gen_unuint(input[39], 0, 7)) as u8,
(__gen_unuint(input[39], 8, 15)) as u8,
(__gen_unuint(input[39], 16, 23)) as u8,
(__gen_unuint(input[39], 24, 31)) as u8,
(__gen_unuint(input[40], 0, 7)) as u8,
(__gen_unuint(input[40], 8, 15)) as u8,
(__gen_unuint(input[40], 16, 23)) as u8,
(__gen_unuint(input[40], 24, 31)) as u8,
(__gen_unuint(input[41], 0, 7)) as u8,
(__gen_unuint(input[41], 8, 15)) as u8,
(__gen_unuint(input[41], 16, 23)) as u8,
(__gen_unuint(input[41], 24, 31)) as u8
],
}
}
}
impl Deserialize for HcpVp9PicState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 42];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 42] as *mut [u8; 168]) })?;
Ok((&input).into())
}
}
pub struct HcpVp9SegmentState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub segment_id: u32,
pub segment_skipped: bool,
pub segment_reference: u32,
pub segment_reference_enable: bool,
pub filter_level_ref0_mode_0: u32,
pub filter_level_ref0_mode_1: u32,
pub filter_level_ref1_mode_0: u32,
pub filter_level_ref1_mode_1: u32,
pub filter_level_ref2_mode_0: u32,
pub filter_level_ref2_mode_1: u32,
pub filter_level_ref3_mode_0: u32,
pub filter_level_ref3_mode_1: u32,
pub luma_dc_quant_scale: u32,
pub luma_ac_quant_scale: u32,
pub chroma_dc_quant_scale: u32,
pub chroma_ac_quant_scale: u32,
pub segment_qindex_delta: i32,
pub segment_lf_level_delta: i32,
}
impl HcpVp9SegmentState {
pub const DWORD_LENGTH: u32 = 8;
}
impl Default for HcpVp9SegmentState {
fn default() -> Self {
HcpVp9SegmentState {
dword_length: Default::default(),
subopcode: 50,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
segment_id: Default::default(),
segment_skipped: Default::default(),
segment_reference: Default::default(),
segment_reference_enable: Default::default(),
filter_level_ref0_mode_0: Default::default(),
filter_level_ref0_mode_1: Default::default(),
filter_level_ref1_mode_0: Default::default(),
filter_level_ref1_mode_1: Default::default(),
filter_level_ref2_mode_0: Default::default(),
filter_level_ref2_mode_1: Default::default(),
filter_level_ref3_mode_0: Default::default(),
filter_level_ref3_mode_1: Default::default(),
luma_dc_quant_scale: Default::default(),
luma_ac_quant_scale: Default::default(),
chroma_dc_quant_scale: Default::default(),
chroma_ac_quant_scale: Default::default(),
segment_qindex_delta: Default::default(),
segment_lf_level_delta: Default::default(),
}
}
}
impl Serialize for HcpVp9SegmentState {
type Out = [u32; 8];
fn pack_into(&self, out: &mut [u32; 8]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.segment_id, 0, 2);
out[2] = __gen_uint(self.segment_skipped.into(), 0, 0) |
__gen_uint(self.segment_reference, 1, 2) |
__gen_uint(self.segment_reference_enable.into(), 3, 3);
out[3] = __gen_uint(self.filter_level_ref0_mode_0, 0, 5) |
__gen_uint(self.filter_level_ref0_mode_1, 8, 13) |
__gen_uint(self.filter_level_ref1_mode_0, 16, 21) |
__gen_uint(self.filter_level_ref1_mode_1, 24, 29);
out[4] = __gen_uint(self.filter_level_ref2_mode_0, 0, 5) |
__gen_uint(self.filter_level_ref2_mode_1, 8, 13) |
__gen_uint(self.filter_level_ref3_mode_0, 16, 21) |
__gen_uint(self.filter_level_ref3_mode_1, 24, 29);
out[5] = __gen_uint(self.luma_dc_quant_scale, 0, 14) |
__gen_uint(self.luma_ac_quant_scale, 16, 30);
out[6] = __gen_uint(self.chroma_dc_quant_scale, 0, 14) |
__gen_uint(self.chroma_ac_quant_scale, 16, 30);
out[7] = __gen_uint(self.segment_qindex_delta as u32, 0, 8) |
__gen_uint(self.segment_lf_level_delta as u32, 16, 22);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 8];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 8] as *const [u8; 32]) })
}
}
impl From<&[u32; 8]> for HcpVp9SegmentState {
fn from(input: &[u32; 8]) -> Self {
HcpVp9SegmentState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
segment_id: __gen_unuint(input[1], 0, 2),
segment_skipped: __gen_unuint(input[2], 0, 0) != 0,
segment_reference: __gen_unuint(input[2], 1, 2),
segment_reference_enable: __gen_unuint(input[2], 3, 3) != 0,
filter_level_ref0_mode_0: __gen_unuint(input[3], 0, 5),
filter_level_ref0_mode_1: __gen_unuint(input[3], 8, 13),
filter_level_ref1_mode_0: __gen_unuint(input[3], 16, 21),
filter_level_ref1_mode_1: __gen_unuint(input[3], 24, 29),
filter_level_ref2_mode_0: __gen_unuint(input[4], 0, 5),
filter_level_ref2_mode_1: __gen_unuint(input[4], 8, 13),
filter_level_ref3_mode_0: __gen_unuint(input[4], 16, 21),
filter_level_ref3_mode_1: __gen_unuint(input[4], 24, 29),
luma_dc_quant_scale: __gen_unuint(input[5], 0, 14),
luma_ac_quant_scale: __gen_unuint(input[5], 16, 30),
chroma_dc_quant_scale: __gen_unuint(input[6], 0, 14),
chroma_ac_quant_scale: __gen_unuint(input[6], 16, 30),
segment_qindex_delta: (__gen_unuint(input[7], 0, 8)) as i32,
segment_lf_level_delta: (__gen_unuint(input[7], 16, 22)) as i32,
}
}
}
impl Deserialize for HcpVp9SegmentState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 8];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 8] as *mut [u8; 32]) })?;
Ok((&input).into())
}
}
pub struct HcpWeightoffsetChromaEntry {
pub delta_chroma_weight_lx_0: i32,
pub chroma_offset_lx_0: u32,
pub delta_chroma_weight_lx_1: i32,
pub chroma_offset_lx_1: u32,
}
impl HcpWeightoffsetChromaEntry {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for HcpWeightoffsetChromaEntry {
fn default() -> Self {
HcpWeightoffsetChromaEntry {
delta_chroma_weight_lx_0: Default::default(),
chroma_offset_lx_0: Default::default(),
delta_chroma_weight_lx_1: Default::default(),
chroma_offset_lx_1: Default::default(),
}
}
}
impl Serialize for HcpWeightoffsetChromaEntry {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.delta_chroma_weight_lx_0 as u32, 0, 7) |
__gen_uint(self.chroma_offset_lx_0, 8, 15) |
__gen_uint(self.delta_chroma_weight_lx_1 as u32, 16, 23) |
__gen_uint(self.chroma_offset_lx_1, 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for HcpWeightoffsetChromaEntry {
fn from(input: &[u32; 1]) -> Self {
HcpWeightoffsetChromaEntry {
delta_chroma_weight_lx_0: (__gen_unuint(input[0], 0, 7)) as i32,
chroma_offset_lx_0: __gen_unuint(input[0], 8, 15),
delta_chroma_weight_lx_1: (__gen_unuint(input[0], 16, 23)) as i32,
chroma_offset_lx_1: __gen_unuint(input[0], 24, 31),
}
}
}
impl Deserialize for HcpWeightoffsetChromaEntry {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct HcpWeightoffsetLumaEntry {
pub delta_luma_weight_lx: i32,
pub luma_offset_lx: u32,
}
impl HcpWeightoffsetLumaEntry {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for HcpWeightoffsetLumaEntry {
fn default() -> Self {
HcpWeightoffsetLumaEntry {
delta_luma_weight_lx: Default::default(),
luma_offset_lx: Default::default(),
}
}
}
impl Serialize for HcpWeightoffsetLumaEntry {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.delta_luma_weight_lx as u32, 0, 7) |
__gen_uint(self.luma_offset_lx, 8, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for HcpWeightoffsetLumaEntry {
fn from(input: &[u32; 1]) -> Self {
HcpWeightoffsetLumaEntry {
delta_luma_weight_lx: (__gen_unuint(input[0], 0, 7)) as i32,
luma_offset_lx: __gen_unuint(input[0], 8, 15),
}
}
}
impl Deserialize for HcpWeightoffsetLumaEntry {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct HcpWeightoffsetState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub reference_picture_list_select: u32,
pub luma_offsets: [HcpWeightoffsetLumaEntry; 16],
pub chroma_offsets: [HcpWeightoffsetChromaEntry; 16],
}
impl HcpWeightoffsetState {
pub const DWORD_LENGTH: u32 = 34;
}
impl Default for HcpWeightoffsetState {
fn default() -> Self {
HcpWeightoffsetState {
dword_length: Default::default(),
subopcode: 19,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
reference_picture_list_select: Default::default(),
luma_offsets: Default::default(),
chroma_offsets: Default::default(),
}
}
}
impl Serialize for HcpWeightoffsetState {
type Out = [u32; 34];
fn pack_into(&self, out: &mut [u32; 34]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.reference_picture_list_select, 0, 0);
{
let [_, _, ref mut out2 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[0].pack_into(out2);
}
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[1].pack_into(out3);
}
{
let [_, _, _, _, ref mut out4 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[2].pack_into(out4);
}
{
let [_, _, _, _, _, ref mut out5 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[3].pack_into(out5);
}
{
let [_, _, _, _, _, _, ref mut out6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[4].pack_into(out6);
}
{
let [_, _, _, _, _, _, _, ref mut out7 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[5].pack_into(out7);
}
{
let [_, _, _, _, _, _, _, _, ref mut out8 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[6].pack_into(out8);
}
{
let [_, _, _, _, _, _, _, _, _, ref mut out9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[7].pack_into(out9);
}
{
let [_, _, _, _, _, _, _, _, _, _, ref mut out10 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[8].pack_into(out10);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, ref mut out11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[9].pack_into(out11);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[10].pack_into(out12);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[11].pack_into(out13);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out14 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[12].pack_into(out14);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[13].pack_into(out15);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out16 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[14].pack_into(out16);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out17 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.luma_offsets[15].pack_into(out17);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.chroma_offsets[0].pack_into(out18);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out19 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.chroma_offsets[1].pack_into(out19);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out20 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.chroma_offsets[2].pack_into(out20);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out21 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.chroma_offsets[3].pack_into(out21);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out22 @ .., _, _, _, _, _, _, _, _, _, _, _] = out;
self.chroma_offsets[4].pack_into(out22);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out23 @ .., _, _, _, _, _, _, _, _, _, _] = out;
self.chroma_offsets[5].pack_into(out23);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out24 @ .., _, _, _, _, _, _, _, _, _] = out;
self.chroma_offsets[6].pack_into(out24);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out25 @ .., _, _, _, _, _, _, _, _] = out;
self.chroma_offsets[7].pack_into(out25);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out26 @ .., _, _, _, _, _, _, _] = out;
self.chroma_offsets[8].pack_into(out26);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out27 @ .., _, _, _, _, _, _] = out;
self.chroma_offsets[9].pack_into(out27);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out28 @ .., _, _, _, _, _] = out;
self.chroma_offsets[10].pack_into(out28);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out29 @ .., _, _, _, _] = out;
self.chroma_offsets[11].pack_into(out29);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out30 @ .., _, _, _] = out;
self.chroma_offsets[12].pack_into(out30);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out31 @ .., _, _] = out;
self.chroma_offsets[13].pack_into(out31);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out32 @ .., _] = out;
self.chroma_offsets[14].pack_into(out32);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out33 @ ..] = out;
self.chroma_offsets[15].pack_into(out33);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 34];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 34] as *const [u8; 136]) })
}
}
impl From<&[u32; 34]> for HcpWeightoffsetState {
fn from(input: &[u32; 34]) -> Self {
HcpWeightoffsetState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
reference_picture_list_select: __gen_unuint(input[1], 0, 0),
luma_offsets: [
{{
let [_, _, ref in2 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in2.into()
}},
{{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in3.into()
}},
{{
let [_, _, _, _, ref in4 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in4.into()
}},
{{
let [_, _, _, _, _, ref in5 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in5.into()
}},
{{
let [_, _, _, _, _, _, ref in6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in6.into()
}},
{{
let [_, _, _, _, _, _, _, ref in7 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in7.into()
}},
{{
let [_, _, _, _, _, _, _, _, ref in8 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in8.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, ref in9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in9.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, ref in10 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in10.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, ref in11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in11.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in12.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref in13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in13.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in14 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in14.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in15.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in16 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in16.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in17 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in17.into()
}}
],
chroma_offsets: [
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in18.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in19 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in19.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in20 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in20.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in21 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = input;
in21.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in22 @ .., _, _, _, _, _, _, _, _, _, _, _] = input;
in22.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in23 @ .., _, _, _, _, _, _, _, _, _, _] = input;
in23.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in24 @ .., _, _, _, _, _, _, _, _, _] = input;
in24.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in25 @ .., _, _, _, _, _, _, _, _] = input;
in25.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in26 @ .., _, _, _, _, _, _, _] = input;
in26.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in27 @ .., _, _, _, _, _, _] = input;
in27.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in28 @ .., _, _, _, _, _] = input;
in28.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in29 @ .., _, _, _, _] = input;
in29.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in30 @ .., _, _, _] = input;
in30.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in31 @ .., _, _] = input;
in31.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in32 @ .., _] = input;
in32.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in33 @ ..] = input;
in33.into()
}}
],
}
}
}
impl Deserialize for HcpWeightoffsetState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 34];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 34] as *mut [u8; 136]) })?;
Ok((&input).into())
}
}
pub struct HevcArbitrationPriority {
pub priority: u32,
}
impl HevcArbitrationPriority {
pub const DWORD_LENGTH: u32 = 1;
pub const HIGHEST_PRIORITY: u32 = 0;
pub const LOWEST_PRIORITY: u32 = 3;
pub const SECOND_HIGHEST_PRIORITY: u32 = 1;
pub const THIRD_HIGHEST_PRIORITY: u32 = 2;
}
impl Default for HevcArbitrationPriority {
fn default() -> Self {
HevcArbitrationPriority {
priority: Default::default(),
}
}
}
impl Serialize for HevcArbitrationPriority {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.priority, 0, 1);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for HevcArbitrationPriority {
fn from(input: &[u32; 1]) -> Self {
HevcArbitrationPriority {
priority: __gen_unuint(input[0], 0, 1),
}
}
}
impl Deserialize for HevcArbitrationPriority {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct HevcVp9RdoqLambdaFields {
pub lambda_value_0: u32,
pub lambda_value_1: u32,
}
impl HevcVp9RdoqLambdaFields {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for HevcVp9RdoqLambdaFields {
fn default() -> Self {
HevcVp9RdoqLambdaFields {
lambda_value_0: Default::default(),
lambda_value_1: Default::default(),
}
}
}
impl Serialize for HevcVp9RdoqLambdaFields {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.lambda_value_0, 0, 15) |
__gen_uint(self.lambda_value_1, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for HevcVp9RdoqLambdaFields {
fn from(input: &[u32; 1]) -> Self {
HevcVp9RdoqLambdaFields {
lambda_value_0: __gen_unuint(input[0], 0, 15),
lambda_value_1: __gen_unuint(input[0], 16, 31),
}
}
}
impl Deserialize for HevcVp9RdoqLambdaFields {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct HevcVp9RdoqState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub htq_performance_fix_1_disable: bool,
pub htq_performance_fix_0_disable: bool,
pub intra_luma_lambda: [HevcVp9RdoqLambdaFields; 32],
pub intra_chroma_lambda: [HevcVp9RdoqLambdaFields; 32],
pub inter_luma_lambda: [HevcVp9RdoqLambdaFields; 32],
pub inter_chroma_lambda: [HevcVp9RdoqLambdaFields; 32],
}
impl HevcVp9RdoqState {
pub const DWORD_LENGTH: u32 = 130;
}
impl Default for HevcVp9RdoqState {
fn default() -> Self {
HevcVp9RdoqState {
dword_length: 60,
subopcode_b: 8,
subopcode_a: 0,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
htq_performance_fix_1_disable: Default::default(),
htq_performance_fix_0_disable: Default::default(),
intra_luma_lambda: Default::default(),
intra_chroma_lambda: Default::default(),
inter_luma_lambda: Default::default(),
inter_chroma_lambda: Default::default(),
}
}
}
impl Serialize for HevcVp9RdoqState {
type Out = [u32; 130];
fn pack_into(&self, out: &mut [u32; 130]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.htq_performance_fix_1_disable.into(), 30, 30) |
__gen_uint(self.htq_performance_fix_0_disable.into(), 31, 31);
{
let [_, _, ref mut out2 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[0].pack_into(out2);
}
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[1].pack_into(out3);
}
{
let [_, _, _, _, ref mut out4 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[2].pack_into(out4);
}
{
let [_, _, _, _, _, ref mut out5 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[3].pack_into(out5);
}
{
let [_, _, _, _, _, _, ref mut out6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[4].pack_into(out6);
}
{
let [_, _, _, _, _, _, _, ref mut out7 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[5].pack_into(out7);
}
{
let [_, _, _, _, _, _, _, _, ref mut out8 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[6].pack_into(out8);
}
{
let [_, _, _, _, _, _, _, _, _, ref mut out9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[7].pack_into(out9);
}
{
let [_, _, _, _, _, _, _, _, _, _, ref mut out10 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[8].pack_into(out10);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, ref mut out11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[9].pack_into(out11);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[10].pack_into(out12);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[11].pack_into(out13);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out14 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[12].pack_into(out14);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[13].pack_into(out15);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out16 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[14].pack_into(out16);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out17 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[15].pack_into(out17);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[16].pack_into(out18);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out19 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[17].pack_into(out19);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out20 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[18].pack_into(out20);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[19].pack_into(out21);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out22 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[20].pack_into(out22);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out23 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[21].pack_into(out23);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out24 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[22].pack_into(out24);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out25 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[23].pack_into(out25);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out26 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[24].pack_into(out26);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[25].pack_into(out27);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out28 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[26].pack_into(out28);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out29 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[27].pack_into(out29);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out30 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[28].pack_into(out30);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out31 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[29].pack_into(out31);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out32 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[30].pack_into(out32);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_luma_lambda[31].pack_into(out33);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out34 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[0].pack_into(out34);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out35 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[1].pack_into(out35);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out36 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[2].pack_into(out36);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out37 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[3].pack_into(out37);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out38 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[4].pack_into(out38);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out39 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[5].pack_into(out39);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out40 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[6].pack_into(out40);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out41 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[7].pack_into(out41);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out42 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[8].pack_into(out42);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out43 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[9].pack_into(out43);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out44 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[10].pack_into(out44);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out45 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[11].pack_into(out45);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out46 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[12].pack_into(out46);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out47 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[13].pack_into(out47);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out48 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[14].pack_into(out48);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out49 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[15].pack_into(out49);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out50 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[16].pack_into(out50);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out51 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[17].pack_into(out51);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out52 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[18].pack_into(out52);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out53 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[19].pack_into(out53);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out54 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[20].pack_into(out54);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out55 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[21].pack_into(out55);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out56 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[22].pack_into(out56);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out57 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[23].pack_into(out57);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out58 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[24].pack_into(out58);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out59 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[25].pack_into(out59);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out60 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[26].pack_into(out60);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out61 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[27].pack_into(out61);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out62 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[28].pack_into(out62);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out63 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[29].pack_into(out63);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out64 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[30].pack_into(out64);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out65 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_chroma_lambda[31].pack_into(out65);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out66 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[0].pack_into(out66);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out67 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[1].pack_into(out67);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out68 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[2].pack_into(out68);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out69 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[3].pack_into(out69);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out70 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[4].pack_into(out70);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out71 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[5].pack_into(out71);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out72 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[6].pack_into(out72);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out73 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[7].pack_into(out73);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out74 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[8].pack_into(out74);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out75 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[9].pack_into(out75);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out76 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[10].pack_into(out76);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out77 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[11].pack_into(out77);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out78 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[12].pack_into(out78);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out79 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[13].pack_into(out79);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out80 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[14].pack_into(out80);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out81 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[15].pack_into(out81);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out82 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[16].pack_into(out82);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out83 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[17].pack_into(out83);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out84 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[18].pack_into(out84);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out85 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[19].pack_into(out85);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out86 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[20].pack_into(out86);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out87 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[21].pack_into(out87);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out88 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[22].pack_into(out88);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out89 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[23].pack_into(out89);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out90 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[24].pack_into(out90);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out91 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[25].pack_into(out91);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out92 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[26].pack_into(out92);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out93 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[27].pack_into(out93);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out94 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[28].pack_into(out94);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out95 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[29].pack_into(out95);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out96 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[30].pack_into(out96);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out97 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_luma_lambda[31].pack_into(out97);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out98 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[0].pack_into(out98);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out99 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[1].pack_into(out99);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out100 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[2].pack_into(out100);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out101 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[3].pack_into(out101);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out102 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[4].pack_into(out102);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out103 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[5].pack_into(out103);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out104 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[6].pack_into(out104);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out105 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[7].pack_into(out105);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out106 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[8].pack_into(out106);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out107 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[9].pack_into(out107);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out108 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[10].pack_into(out108);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out109 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[11].pack_into(out109);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out110 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[12].pack_into(out110);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out111 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[13].pack_into(out111);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out112 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[14].pack_into(out112);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out113 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[15].pack_into(out113);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out114 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[16].pack_into(out114);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out115 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[17].pack_into(out115);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out116 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[18].pack_into(out116);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out117 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[19].pack_into(out117);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out118 @ .., _, _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[20].pack_into(out118);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out119 @ .., _, _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[21].pack_into(out119);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out120 @ .., _, _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[22].pack_into(out120);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out121 @ .., _, _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[23].pack_into(out121);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out122 @ .., _, _, _, _, _, _, _] = out;
self.inter_chroma_lambda[24].pack_into(out122);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out123 @ .., _, _, _, _, _, _] = out;
self.inter_chroma_lambda[25].pack_into(out123);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out124 @ .., _, _, _, _, _] = out;
self.inter_chroma_lambda[26].pack_into(out124);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out125 @ .., _, _, _, _] = out;
self.inter_chroma_lambda[27].pack_into(out125);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out126 @ .., _, _, _] = out;
self.inter_chroma_lambda[28].pack_into(out126);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out127 @ .., _, _] = out;
self.inter_chroma_lambda[29].pack_into(out127);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out128 @ .., _] = out;
self.inter_chroma_lambda[30].pack_into(out128);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out129 @ ..] = out;
self.inter_chroma_lambda[31].pack_into(out129);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 130];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 130] as *const [u8; 520]) })
}
}
impl From<&[u32; 130]> for HevcVp9RdoqState {
fn from(input: &[u32; 130]) -> Self {
HevcVp9RdoqState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
htq_performance_fix_1_disable: __gen_unuint(input[1], 30, 30) != 0,
htq_performance_fix_0_disable: __gen_unuint(input[1], 31, 31) != 0,
intra_luma_lambda: [
{{
let [_, _, ref in2 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in2.into()
}},
{{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in3.into()
}},
{{
let [_, _, _, _, ref in4 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in4.into()
}},
{{
let [_, _, _, _, _, ref in5 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in5.into()
}},
{{
let [_, _, _, _, _, _, ref in6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in6.into()
}},
{{
let [_, _, _, _, _, _, _, ref in7 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in7.into()
}},
{{
let [_, _, _, _, _, _, _, _, ref in8 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in8.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, ref in9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in9.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, ref in10 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in10.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, ref in11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in11.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in12.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref in13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in13.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in14 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in14.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in15.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in16 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in16.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in17 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in17.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in18.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in19 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in19.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in20 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in20.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in21.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in22 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in22.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in23 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in23.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in24 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in24.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in25 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in25.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in26 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in26.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in27.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in28 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in28.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in29 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in29.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in30 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in30.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in31 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in31.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in32 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in32.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in33.into()
}}
],
intra_chroma_lambda: [
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in34 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in34.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in35 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in35.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in36 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in36.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in37 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in37.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in38 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in38.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in39 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in39.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in40 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in40.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in41 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in41.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in42 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in42.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in43 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in43.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in44 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in44.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in45 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in45.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in46 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in46.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in47 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in47.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in48 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in48.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in49 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in49.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in50 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in50.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in51 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in51.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in52 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in52.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in53 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in53.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in54 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in54.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in55 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in55.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in56 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in56.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in57 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in57.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in58 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in58.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in59 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in59.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in60 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in60.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in61 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in61.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in62 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in62.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in63 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in63.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in64 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in64.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in65 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in65.into()
}}
],
inter_luma_lambda: [
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in66 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in66.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in67 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in67.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in68 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in68.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in69 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in69.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in70 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in70.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in71 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in71.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in72 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in72.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in73 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in73.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in74 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in74.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in75 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in75.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in76 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in76.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in77 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in77.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in78 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in78.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in79 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in79.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in80 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in80.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in81 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in81.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in82 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in82.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in83 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in83.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in84 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in84.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in85 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in85.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in86 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in86.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in87 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in87.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in88 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in88.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in89 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in89.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in90 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in90.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in91 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in91.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in92 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in92.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in93 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in93.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in94 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in94.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in95 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in95.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in96 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in96.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in97 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in97.into()
}}
],
inter_chroma_lambda: [
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in98 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in98.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in99 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in99.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in100 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in100.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in101 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in101.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in102 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in102.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in103 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in103.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in104 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in104.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in105 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in105.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in106 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in106.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in107 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in107.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in108 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in108.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in109 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in109.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in110 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in110.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in111 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in111.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in112 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in112.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in113 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in113.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in114 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in114.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in115 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in115.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in116 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in116.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in117 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = input;
in117.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in118 @ .., _, _, _, _, _, _, _, _, _, _, _] = input;
in118.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in119 @ .., _, _, _, _, _, _, _, _, _, _] = input;
in119.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in120 @ .., _, _, _, _, _, _, _, _, _] = input;
in120.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in121 @ .., _, _, _, _, _, _, _, _] = input;
in121.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in122 @ .., _, _, _, _, _, _, _] = input;
in122.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in123 @ .., _, _, _, _, _, _] = input;
in123.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in124 @ .., _, _, _, _, _] = input;
in124.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in125 @ .., _, _, _, _] = input;
in125.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in126 @ .., _, _, _] = input;
in126.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in127 @ .., _, _] = input;
in127.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in128 @ .., _] = input;
in128.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in129 @ ..] = input;
in129.into()
}}
],
}
}
}
impl Deserialize for HevcVp9RdoqState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 130];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 130] as *mut [u8; 520]) })?;
Ok((&input).into())
}
}
pub struct HsInvocationCount {
pub hs_invocation_count_report: u64,
}
impl HsInvocationCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2300;
}
impl Default for HsInvocationCount {
fn default() -> Self {
HsInvocationCount {
hs_invocation_count_report: Default::default(),
}
}
}
impl Serialize for HsInvocationCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.hs_invocation_count_report as u32, 0, 31);
out[1] = __gen_uint((self.hs_invocation_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for HsInvocationCount {
fn from(input: &[u32; 2]) -> Self {
HsInvocationCount {
hs_invocation_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for HsInvocationCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct HucCfgState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub p24c: u32,
}
impl HucCfgState {
pub const DWORD_LENGTH: u32 = 2;
pub const FORCE_RESET: u32 = 1;
pub const NORMAL_OPERATION: u32 = 0;
}
impl Default for HucCfgState {
fn default() -> Self {
HucCfgState {
dword_length: Default::default(),
subopcode: 3,
media_command_opcode: 11,
pipeline: 2,
command_type: 3,
p24c: Default::default(),
}
}
}
impl Serialize for HucCfgState {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.p24c, 0, 0);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for HucCfgState {
fn from(input: &[u32; 2]) -> Self {
HucCfgState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
p24c: __gen_unuint(input[1], 0, 0),
}
}
}
impl Deserialize for HucCfgState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct HucDmemState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub huc_data_source_address: A,
pub huc_data_source_memory_address_attributes: Memoryaddressattributes,
pub huc_data_destination_address: A,
pub huc_data_length: u32,
}
impl<A: Addr + Default> HucDmemState<A> {
pub const DWORD_LENGTH: u32 = 6;
}
impl<A: Addr + Default> Default for HucDmemState<A> {
fn default() -> Self {
HucDmemState {
dword_length: Default::default(),
subopcode: 2,
media_command_opcode: 11,
pipeline: 2,
command_type: 3,
huc_data_source_address: Default::default(),
huc_data_source_memory_address_attributes: Default::default(),
huc_data_destination_address: Default::default(),
huc_data_length: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for HucDmemState<A> {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.huc_data_source_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ .., _, _] = out;
self.huc_data_source_memory_address_attributes.pack_into(out3);
}
let v4_address = self.huc_data_destination_address.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
out[5] = __gen_uint(self.huc_data_length, 6, 16);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for HucDmemState<u64> {
fn from(input: &[u32; 6]) -> Self {
HucDmemState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
huc_data_source_address: (__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
huc_data_source_memory_address_attributes: {{
let [_, _, _, ref in3 @ .., _, _] = input;
in3.into()
}},
huc_data_destination_address: (__gen_unuint(input[4], 6, 16) as u64) << 6,
huc_data_length: __gen_unuint(input[5], 6, 16),
}
}
}
impl Deserialize for HucDmemState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct HucImemState {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub huc_firmware_descriptor: u32,
}
impl HucImemState {
pub const DWORD_LENGTH: u32 = 5;
}
impl Default for HucImemState {
fn default() -> Self {
HucImemState {
dword_length: Default::default(),
subopcode: 1,
media_command_opcode: 11,
pipeline: 2,
command_type: 3,
huc_firmware_descriptor: Default::default(),
}
}
}
impl Serialize for HucImemState {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = __gen_uint(self.huc_firmware_descriptor, 0, 7);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for HucImemState {
fn from(input: &[u32; 5]) -> Self {
HucImemState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
huc_firmware_descriptor: __gen_unuint(input[4], 0, 7),
}
}
}
impl Deserialize for HucImemState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct HucIndObjBaseAddrState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub huc_indirect_stream_in_object_address: A,
pub huc_indirect_stream_in_object_memory_address_attributes: Memoryaddressattributes,
pub huc_indirect_stream_in_object_access_upper_bound: A,
pub huc_indirect_stream_out_object_address: A,
pub huc_indirect_stream_out_object_memory_address_attributes: Memoryaddressattributes,
pub huc_indirect_stream_out_object_access_upper_bound: A,
}
impl<A: Addr + Default> HucIndObjBaseAddrState<A> {
pub const DWORD_LENGTH: u32 = 11;
}
impl<A: Addr + Default> Default for HucIndObjBaseAddrState<A> {
fn default() -> Self {
HucIndObjBaseAddrState {
dword_length: Default::default(),
subopcode: 5,
media_command_opcode: 11,
pipeline: 2,
command_type: 3,
huc_indirect_stream_in_object_address: Default::default(),
huc_indirect_stream_in_object_memory_address_attributes: Default::default(),
huc_indirect_stream_in_object_access_upper_bound: Default::default(),
huc_indirect_stream_out_object_address: Default::default(),
huc_indirect_stream_out_object_memory_address_attributes: Default::default(),
huc_indirect_stream_out_object_access_upper_bound: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for HucIndObjBaseAddrState<A> {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.huc_indirect_stream_in_object_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _] = out;
self.huc_indirect_stream_in_object_memory_address_attributes.pack_into(out3);
}
let v4_address = self.huc_indirect_stream_in_object_access_upper_bound.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
let v6_address = self.huc_indirect_stream_out_object_address.combine(0);
out[6] = v6_address as u32;
out[7] = (v6_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, ref mut out8 @ .., _, _] = out;
self.huc_indirect_stream_out_object_memory_address_attributes.pack_into(out8);
}
let v9_address = self.huc_indirect_stream_out_object_access_upper_bound.combine(0);
out[9] = v9_address as u32;
out[10] = (v9_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for HucIndObjBaseAddrState<u64> {
fn from(input: &[u32; 11]) -> Self {
HucIndObjBaseAddrState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
huc_indirect_stream_in_object_address: (__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
huc_indirect_stream_in_object_memory_address_attributes: {{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _] = input;
in3.into()
}},
huc_indirect_stream_in_object_access_upper_bound: (__gen_unuint(input[4], 0, 31) as u64) |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
huc_indirect_stream_out_object_address: (__gen_unuint(input[6], 0, 31) as u64) |
(__gen_unuint(input[7], 0, 31) as u64) << 32,
huc_indirect_stream_out_object_memory_address_attributes: {{
let [_, _, _, _, _, _, _, _, ref in8 @ .., _, _] = input;
in8.into()
}},
huc_indirect_stream_out_object_access_upper_bound: (__gen_unuint(input[9], 0, 31) as u64) |
(__gen_unuint(input[10], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for HucIndObjBaseAddrState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct HucPipeModeSelect {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_stream_out_enable: bool,
pub huc_stream_object_enable: bool,
pub media_soft_reset_counter: u32,
}
impl HucPipeModeSelect {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for HucPipeModeSelect {
fn default() -> Self {
HucPipeModeSelect {
dword_length: Default::default(),
subopcode: 0,
media_command_opcode: 11,
pipeline: 2,
command_type: 3,
indirect_stream_out_enable: Default::default(),
huc_stream_object_enable: Default::default(),
media_soft_reset_counter: Default::default(),
}
}
}
impl Serialize for HucPipeModeSelect {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_stream_out_enable.into(), 4, 4) |
__gen_uint(self.huc_stream_object_enable.into(), 10, 10);
out[2] = __gen_uint(self.media_soft_reset_counter, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for HucPipeModeSelect {
fn from(input: &[u32; 3]) -> Self {
HucPipeModeSelect {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_stream_out_enable: __gen_unuint(input[1], 4, 4) != 0,
huc_stream_object_enable: __gen_unuint(input[1], 10, 10) != 0,
media_soft_reset_counter: __gen_unuint(input[2], 0, 31),
}
}
}
impl Deserialize for HucPipeModeSelect {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct HucStart {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub last_stream_object: bool,
}
impl HucStart {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for HucStart {
fn default() -> Self {
HucStart {
dword_length: Default::default(),
subopcode: 33,
media_command_opcode: 11,
pipeline: 2,
command_type: 3,
last_stream_object: Default::default(),
}
}
}
impl Serialize for HucStart {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.last_stream_object.into(), 0, 0);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for HucStart {
fn from(input: &[u32; 2]) -> Self {
HucStart {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
last_stream_object: __gen_unuint(input[1], 0, 0) != 0,
}
}
}
impl Deserialize for HucStart {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct HucStreamObject<A: Addr + Default> {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_stream_in_data_length: u32,
pub indirect_stream_in_address: A,
pub huc_processing: bool,
pub indirect_stream_out_address: A,
pub start_code_byte_0: u32,
pub start_code_byte_1: u32,
pub start_code_byte_2: u32,
pub start_code_search_engine: bool,
pub emulation_prevention_byte_removal: bool,
pub stream_out: bool,
pub drm_length_mode: u32,
pub huc_bitstream_enable: bool,
}
impl<A: Addr + Default> HucStreamObject<A> {
pub const DWORD_LENGTH: u32 = 5;
pub const LENGTH_MODE: u32 = 1;
pub const START_CODE_MODE: u32 = 0;
}
impl<A: Addr + Default> Default for HucStreamObject<A> {
fn default() -> Self {
HucStreamObject {
dword_length: Default::default(),
subopcode: 32,
media_command_opcode: 11,
pipeline: 2,
command_type: 3,
indirect_stream_in_data_length: Default::default(),
indirect_stream_in_address: Default::default(),
huc_processing: Default::default(),
indirect_stream_out_address: Default::default(),
start_code_byte_0: Default::default(),
start_code_byte_1: Default::default(),
start_code_byte_2: Default::default(),
start_code_search_engine: Default::default(),
emulation_prevention_byte_removal: Default::default(),
stream_out: Default::default(),
drm_length_mode: Default::default(),
huc_bitstream_enable: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for HucStreamObject<A> {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_stream_in_data_length, 0, 31);
let v2 = __gen_uint(self.huc_processing.into(), 31, 31);
let v2_address = self.indirect_stream_in_address.combine(v2);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
let v3_address = self.indirect_stream_out_address.combine(0);
out[3] = v3_address as u32;
out[4] = (v3_address >> 32) as u32;
out[4] = __gen_uint(self.start_code_byte_0, 0, 7) |
__gen_uint(self.start_code_byte_1, 8, 15) |
__gen_uint(self.start_code_byte_2, 16, 23) |
__gen_uint(self.start_code_search_engine.into(), 24, 24) |
__gen_uint(self.emulation_prevention_byte_removal.into(), 25, 25) |
__gen_uint(self.stream_out.into(), 26, 26) |
__gen_uint(self.drm_length_mode, 27, 28) |
__gen_uint(self.huc_bitstream_enable.into(), 29, 29);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for HucStreamObject<u64> {
fn from(input: &[u32; 5]) -> Self {
HucStreamObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_stream_in_data_length: __gen_unuint(input[1], 0, 31),
indirect_stream_in_address: (__gen_unuint(input[2], 0, 28) as u64),
huc_processing: __gen_unuint(input[2], 31, 31) != 0,
indirect_stream_out_address: (__gen_unuint(input[3], 0, 28) as u64),
start_code_byte_0: __gen_unuint(input[4], 0, 7),
start_code_byte_1: __gen_unuint(input[4], 8, 15),
start_code_byte_2: __gen_unuint(input[4], 16, 23),
start_code_search_engine: __gen_unuint(input[4], 24, 24) != 0,
emulation_prevention_byte_removal: __gen_unuint(input[4], 25, 25) != 0,
stream_out: __gen_unuint(input[4], 26, 26) != 0,
drm_length_mode: __gen_unuint(input[4], 27, 28),
huc_bitstream_enable: __gen_unuint(input[4], 29, 29) != 0,
}
}
}
impl Deserialize for HucStreamObject<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct HucVirtualAddrRegion<A: Addr + Default> {
pub address: A,
pub memory_address_attributes: Memoryaddressattributes,
}
impl<A: Addr + Default> HucVirtualAddrRegion<A> {
pub const DWORD_LENGTH: u32 = 3;
}
impl<A: Addr + Default> Default for HucVirtualAddrRegion<A> {
fn default() -> Self {
HucVirtualAddrRegion {
address: Default::default(),
memory_address_attributes: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for HucVirtualAddrRegion<A> {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
let v0_address = self.address.combine(0);
out[0] = v0_address as u32;
out[1] = (v0_address >> 32) as u32;
{
let [_, _, ref mut out2 @ ..] = out;
self.memory_address_attributes.pack_into(out2);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for HucVirtualAddrRegion<u64> {
fn from(input: &[u32; 3]) -> Self {
HucVirtualAddrRegion {
address: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
memory_address_attributes: {{
let [_, _, ref in2 @ ..] = input;
in2.into()
}},
}
}
}
impl Deserialize for HucVirtualAddrRegion<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct HucVirtualAddrState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub huc_virtual_address_region: [HucVirtualAddrRegion<A>; 16],
}
impl<A: Addr + Default> HucVirtualAddrState<A> {
pub const DWORD_LENGTH: u32 = 49;
}
impl<A: Addr + Default> Default for HucVirtualAddrState<A> {
fn default() -> Self {
HucVirtualAddrState {
dword_length: Default::default(),
subopcode: 4,
media_command_opcode: 11,
pipeline: 2,
command_type: 3,
huc_virtual_address_region: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for HucVirtualAddrState<A> {
type Out = [u32; 49];
fn pack_into(&self, out: &mut [u32; 49]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode, 16, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[0].pack_into(out1_3);
}
{
let [_, _, _, _, ref mut out4_6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[1].pack_into(out4_6);
}
{
let [_, _, _, _, _, _, _, ref mut out7_9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[2].pack_into(out7_9);
}
{
let [_, _, _, _, _, _, _, _, _, _, ref mut out10_12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[3].pack_into(out10_12);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out13_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[4].pack_into(out13_15);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out16_18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[5].pack_into(out16_18);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out19_21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[6].pack_into(out19_21);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out22_24 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[7].pack_into(out22_24);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out25_27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[8].pack_into(out25_27);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out28_30 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[9].pack_into(out28_30);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out31_33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[10].pack_into(out31_33);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out34_36 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[11].pack_into(out34_36);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out37_39 @ .., _, _, _, _, _, _, _, _, _] = out;
self.huc_virtual_address_region[12].pack_into(out37_39);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out40_42 @ .., _, _, _, _, _, _] = out;
self.huc_virtual_address_region[13].pack_into(out40_42);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out43_45 @ .., _, _, _] = out;
self.huc_virtual_address_region[14].pack_into(out43_45);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out46_48 @ ..] = out;
self.huc_virtual_address_region[15].pack_into(out46_48);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 49];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 49] as *const [u8; 196]) })
}
}
impl From<&[u32; 49]> for HucVirtualAddrState<u64> {
fn from(input: &[u32; 49]) -> Self {
HucVirtualAddrState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode: __gen_unuint(input[0], 16, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
huc_virtual_address_region: [
{{
let [_, ref in1_3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in1_3.into()
}},
{{
let [_, _, _, _, ref in4_6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in4_6.into()
}},
{{
let [_, _, _, _, _, _, _, ref in7_9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in7_9.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, ref in10_12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in10_12.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref in13_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in13_15.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in16_18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in16_18.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in19_21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in19_21.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in22_24 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in22_24.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in25_27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in25_27.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in28_30 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in28_30.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in31_33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in31_33.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in34_36 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = input;
in34_36.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in37_39 @ .., _, _, _, _, _, _, _, _, _] = input;
in37_39.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in40_42 @ .., _, _, _, _, _, _] = input;
in40_42.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in43_45 @ .., _, _, _] = input;
in43_45.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in46_48 @ ..] = input;
in46_48.into()
}}
],
}
}
}
impl Deserialize for HucVirtualAddrState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 49];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 49] as *mut [u8; 196]) })?;
Ok((&input).into())
}
}
pub struct IaPrimitivesCount {
pub ia_primitives_count_report: u64,
}
impl IaPrimitivesCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2318;
}
impl Default for IaPrimitivesCount {
fn default() -> Self {
IaPrimitivesCount {
ia_primitives_count_report: Default::default(),
}
}
}
impl Serialize for IaPrimitivesCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.ia_primitives_count_report as u32, 0, 31);
out[1] = __gen_uint((self.ia_primitives_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for IaPrimitivesCount {
fn from(input: &[u32; 2]) -> Self {
IaPrimitivesCount {
ia_primitives_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for IaPrimitivesCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct IaVerticesCount {
pub ia_vertices_count_report: u64,
}
impl IaVerticesCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2310;
}
impl Default for IaVerticesCount {
fn default() -> Self {
IaVerticesCount {
ia_vertices_count_report: Default::default(),
}
}
}
impl Serialize for IaVerticesCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.ia_vertices_count_report as u32, 0, 31);
out[1] = __gen_uint((self.ia_vertices_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for IaVerticesCount {
fn from(input: &[u32; 2]) -> Self {
IaVerticesCount {
ia_vertices_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for IaVerticesCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct ImageStateCost {
pub mv_0_cost: u32,
pub mv_1_cost: u32,
pub mv_2_cost: u32,
pub mv_3_cost: u32,
pub mv_4_cost: u32,
pub mv_5_cost: u32,
pub mv_6_cost: u32,
pub mv_7_cost: u32,
}
impl ImageStateCost {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for ImageStateCost {
fn default() -> Self {
ImageStateCost {
mv_0_cost: Default::default(),
mv_1_cost: Default::default(),
mv_2_cost: Default::default(),
mv_3_cost: Default::default(),
mv_4_cost: Default::default(),
mv_5_cost: Default::default(),
mv_6_cost: Default::default(),
mv_7_cost: Default::default(),
}
}
}
impl Serialize for ImageStateCost {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.mv_0_cost, 0, 7) |
__gen_uint(self.mv_1_cost, 8, 15) |
__gen_uint(self.mv_2_cost, 16, 23) |
__gen_uint(self.mv_3_cost, 24, 31);
out[1] = __gen_uint(self.mv_4_cost, 0, 7) |
__gen_uint(self.mv_5_cost, 8, 15) |
__gen_uint(self.mv_6_cost, 16, 23) |
__gen_uint(self.mv_7_cost, 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for ImageStateCost {
fn from(input: &[u32; 2]) -> Self {
ImageStateCost {
mv_0_cost: __gen_unuint(input[0], 0, 7),
mv_1_cost: __gen_unuint(input[0], 8, 15),
mv_2_cost: __gen_unuint(input[0], 16, 23),
mv_3_cost: __gen_unuint(input[0], 24, 31),
mv_4_cost: __gen_unuint(input[1], 0, 7),
mv_5_cost: __gen_unuint(input[1], 8, 15),
mv_6_cost: __gen_unuint(input[1], 16, 23),
mv_7_cost: __gen_unuint(input[1], 24, 31),
}
}
}
impl Deserialize for ImageStateCost {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct InlineDataDescriptionForMfdAvcBsdObject {
pub mb_error_concealment_p_slice_weight_prediction_disable_flag: bool,
pub mb_error_concealment_p_slice_motion_vectors_override_disable_flag: bool,
pub mb_error_concealment_b_spatial_weight_prediction_disable_flag: bool,
pub mb_error_concealment_b_spatial_motion_vectors_override_disable_flag: bool,
pub mb_error_concealment_b_spatial_prediction_mode: u32,
pub mb_header_error_handling: bool,
pub entropy_error_handling: bool,
pub mpr_error_handling: bool,
pub bsd_premature_complete_error_handling: bool,
pub concealment_picture_id: u32,
pub mb_error_concealment_b_temporal_weight_prediction_disable: bool,
pub mb_error_concealment_b_temporal_motion_vectors_override_enable: bool,
pub mb_error_concealment_b_temporal_prediction_mode: u32,
pub intra_predmode_4x4_8x8_luma_error_control: bool,
pub init_current_mb_number: bool,
pub concealment_method: u32,
pub first_mb_bit_offset: u32,
pub last_slice: bool,
pub emulation_prevention_byte_present: bool,
pub fix_prev_mb_skipped: bool,
pub first_mb_byte_offset_of_slice_data_or_slice_header: u32,
pub intra_prediction_error_control: bool,
pub intra_8x8_4x4_prediction_error_concealment_control: bool,
pub b_slice_temporal_inter_concealment_mode: u32,
pub b_slice_spatial_inter_concealment_mode: u32,
pub b_slice_inter_direct_type_concealment_mode: u32,
pub b_slice_concealment_mode: u32,
pub p_slice_inter_concealment_mode: u32,
pub p_slice_concealment_mode: u32,
pub concealment_reference_picture_field_bit: u32,
pub i_slice_concealment_mode: u32,
}
impl InlineDataDescriptionForMfdAvcBsdObject {
pub const DWORD_LENGTH: u32 = 3;
pub const INTER_CONCEALMENT: u32 = 0;
pub const INTRA_CONCEALMENT: u32 = 1;
}
impl Default for InlineDataDescriptionForMfdAvcBsdObject {
fn default() -> Self {
InlineDataDescriptionForMfdAvcBsdObject {
mb_error_concealment_p_slice_weight_prediction_disable_flag: Default::default(),
mb_error_concealment_p_slice_motion_vectors_override_disable_flag: Default::default(),
mb_error_concealment_b_spatial_weight_prediction_disable_flag: Default::default(),
mb_error_concealment_b_spatial_motion_vectors_override_disable_flag: Default::default(),
mb_error_concealment_b_spatial_prediction_mode: Default::default(),
mb_header_error_handling: Default::default(),
entropy_error_handling: Default::default(),
mpr_error_handling: Default::default(),
bsd_premature_complete_error_handling: Default::default(),
concealment_picture_id: Default::default(),
mb_error_concealment_b_temporal_weight_prediction_disable: Default::default(),
mb_error_concealment_b_temporal_motion_vectors_override_enable: Default::default(),
mb_error_concealment_b_temporal_prediction_mode: Default::default(),
intra_predmode_4x4_8x8_luma_error_control: Default::default(),
init_current_mb_number: Default::default(),
concealment_method: Default::default(),
first_mb_bit_offset: Default::default(),
last_slice: Default::default(),
emulation_prevention_byte_present: Default::default(),
fix_prev_mb_skipped: Default::default(),
first_mb_byte_offset_of_slice_data_or_slice_header: Default::default(),
intra_prediction_error_control: Default::default(),
intra_8x8_4x4_prediction_error_concealment_control: Default::default(),
b_slice_temporal_inter_concealment_mode: Default::default(),
b_slice_spatial_inter_concealment_mode: Default::default(),
b_slice_inter_direct_type_concealment_mode: Default::default(),
b_slice_concealment_mode: Default::default(),
p_slice_inter_concealment_mode: Default::default(),
p_slice_concealment_mode: Default::default(),
concealment_reference_picture_field_bit: Default::default(),
i_slice_concealment_mode: Default::default(),
}
}
}
impl Serialize for InlineDataDescriptionForMfdAvcBsdObject {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.mb_error_concealment_p_slice_weight_prediction_disable_flag.into(), 0, 0) |
__gen_uint(self.mb_error_concealment_p_slice_motion_vectors_override_disable_flag.into(), 1, 1) |
__gen_uint(self.mb_error_concealment_b_spatial_weight_prediction_disable_flag.into(), 3, 3) |
__gen_uint(self.mb_error_concealment_b_spatial_motion_vectors_override_disable_flag.into(), 4, 4) |
__gen_uint(self.mb_error_concealment_b_spatial_prediction_mode, 6, 7) |
__gen_uint(self.mb_header_error_handling.into(), 8, 8) |
__gen_uint(self.entropy_error_handling.into(), 10, 10) |
__gen_uint(self.mpr_error_handling.into(), 12, 12) |
__gen_uint(self.bsd_premature_complete_error_handling.into(), 14, 14) |
__gen_uint(self.concealment_picture_id, 16, 21) |
__gen_uint(self.mb_error_concealment_b_temporal_weight_prediction_disable.into(), 24, 24) |
__gen_uint(self.mb_error_concealment_b_temporal_motion_vectors_override_enable.into(), 25, 25) |
__gen_uint(self.mb_error_concealment_b_temporal_prediction_mode, 27, 28) |
__gen_uint(self.intra_predmode_4x4_8x8_luma_error_control.into(), 29, 29) |
__gen_uint(self.init_current_mb_number.into(), 30, 30) |
__gen_uint(self.concealment_method, 31, 31);
out[1] = __gen_uint(self.first_mb_bit_offset, 0, 2) |
__gen_uint(self.last_slice.into(), 3, 3) |
__gen_uint(self.emulation_prevention_byte_present.into(), 4, 4) |
__gen_uint(self.fix_prev_mb_skipped.into(), 7, 7) |
__gen_uint(self.first_mb_byte_offset_of_slice_data_or_slice_header, 16, 31);
out[2] = __gen_uint(self.intra_prediction_error_control.into(), 0, 0) |
__gen_uint(self.intra_8x8_4x4_prediction_error_concealment_control.into(), 1, 1) |
__gen_uint(self.b_slice_temporal_inter_concealment_mode, 4, 6) |
__gen_uint(self.b_slice_spatial_inter_concealment_mode, 8, 10) |
__gen_uint(self.b_slice_inter_direct_type_concealment_mode, 12, 13) |
__gen_uint(self.b_slice_concealment_mode, 15, 15) |
__gen_uint(self.p_slice_inter_concealment_mode, 16, 18) |
__gen_uint(self.p_slice_concealment_mode, 23, 23) |
__gen_uint(self.concealment_reference_picture_field_bit, 24, 29) |
__gen_uint(self.i_slice_concealment_mode, 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for InlineDataDescriptionForMfdAvcBsdObject {
fn from(input: &[u32; 3]) -> Self {
InlineDataDescriptionForMfdAvcBsdObject {
mb_error_concealment_p_slice_weight_prediction_disable_flag: __gen_unuint(input[0], 0, 0) != 0,
mb_error_concealment_p_slice_motion_vectors_override_disable_flag: __gen_unuint(input[0], 1, 1) != 0,
mb_error_concealment_b_spatial_weight_prediction_disable_flag: __gen_unuint(input[0], 3, 3) != 0,
mb_error_concealment_b_spatial_motion_vectors_override_disable_flag: __gen_unuint(input[0], 4, 4) != 0,
mb_error_concealment_b_spatial_prediction_mode: __gen_unuint(input[0], 6, 7),
mb_header_error_handling: __gen_unuint(input[0], 8, 8) != 0,
entropy_error_handling: __gen_unuint(input[0], 10, 10) != 0,
mpr_error_handling: __gen_unuint(input[0], 12, 12) != 0,
bsd_premature_complete_error_handling: __gen_unuint(input[0], 14, 14) != 0,
concealment_picture_id: __gen_unuint(input[0], 16, 21),
mb_error_concealment_b_temporal_weight_prediction_disable: __gen_unuint(input[0], 24, 24) != 0,
mb_error_concealment_b_temporal_motion_vectors_override_enable: __gen_unuint(input[0], 25, 25) != 0,
mb_error_concealment_b_temporal_prediction_mode: __gen_unuint(input[0], 27, 28),
intra_predmode_4x4_8x8_luma_error_control: __gen_unuint(input[0], 29, 29) != 0,
init_current_mb_number: __gen_unuint(input[0], 30, 30) != 0,
concealment_method: __gen_unuint(input[0], 31, 31),
first_mb_bit_offset: __gen_unuint(input[1], 0, 2),
last_slice: __gen_unuint(input[1], 3, 3) != 0,
emulation_prevention_byte_present: __gen_unuint(input[1], 4, 4) != 0,
fix_prev_mb_skipped: __gen_unuint(input[1], 7, 7) != 0,
first_mb_byte_offset_of_slice_data_or_slice_header: __gen_unuint(input[1], 16, 31),
intra_prediction_error_control: __gen_unuint(input[2], 0, 0) != 0,
intra_8x8_4x4_prediction_error_concealment_control: __gen_unuint(input[2], 1, 1) != 0,
b_slice_temporal_inter_concealment_mode: __gen_unuint(input[2], 4, 6),
b_slice_spatial_inter_concealment_mode: __gen_unuint(input[2], 8, 10),
b_slice_inter_direct_type_concealment_mode: __gen_unuint(input[2], 12, 13),
b_slice_concealment_mode: __gen_unuint(input[2], 15, 15),
p_slice_inter_concealment_mode: __gen_unuint(input[2], 16, 18),
p_slice_concealment_mode: __gen_unuint(input[2], 23, 23),
concealment_reference_picture_field_bit: __gen_unuint(input[2], 24, 29),
i_slice_concealment_mode: __gen_unuint(input[2], 31, 31),
}
}
}
impl Deserialize for InlineDataDescriptionForMfdAvcBsdObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct Instdone1 {
pub prb0_ring_enable: bool,
pub vfg_done: bool,
pub vs_done: bool,
pub hs_done: bool,
pub te_done: bool,
pub ds_done: bool,
pub gs_done: bool,
pub sol_done: bool,
pub cl_done: bool,
pub sf_done: bool,
pub tdg_done: bool,
pub urbm_done: bool,
pub svg_done: bool,
pub gafs_done: bool,
pub vfe_done: bool,
pub tsg_done: bool,
pub gafm_done: bool,
pub gam_done: bool,
pub rs_done: bool,
pub cs_done: bool,
pub sde_done: bool,
pub rccfbc_cs_done: bool,
}
impl Instdone1 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x206c;
}
impl Default for Instdone1 {
fn default() -> Self {
Instdone1 {
prb0_ring_enable: Default::default(),
vfg_done: Default::default(),
vs_done: Default::default(),
hs_done: Default::default(),
te_done: Default::default(),
ds_done: Default::default(),
gs_done: Default::default(),
sol_done: Default::default(),
cl_done: Default::default(),
sf_done: Default::default(),
tdg_done: Default::default(),
urbm_done: Default::default(),
svg_done: Default::default(),
gafs_done: Default::default(),
vfe_done: Default::default(),
tsg_done: Default::default(),
gafm_done: Default::default(),
gam_done: Default::default(),
rs_done: Default::default(),
cs_done: Default::default(),
sde_done: Default::default(),
rccfbc_cs_done: Default::default(),
}
}
}
impl Serialize for Instdone1 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.prb0_ring_enable.into(), 0, 0) |
__gen_uint(self.vfg_done.into(), 1, 1) |
__gen_uint(self.vs_done.into(), 2, 2) |
__gen_uint(self.hs_done.into(), 3, 3) |
__gen_uint(self.te_done.into(), 4, 4) |
__gen_uint(self.ds_done.into(), 5, 5) |
__gen_uint(self.gs_done.into(), 6, 6) |
__gen_uint(self.sol_done.into(), 7, 7) |
__gen_uint(self.cl_done.into(), 8, 8) |
__gen_uint(self.sf_done.into(), 9, 9) |
__gen_uint(self.tdg_done.into(), 12, 12) |
__gen_uint(self.urbm_done.into(), 13, 13) |
__gen_uint(self.svg_done.into(), 14, 14) |
__gen_uint(self.gafs_done.into(), 15, 15) |
__gen_uint(self.vfe_done.into(), 16, 16) |
__gen_uint(self.tsg_done.into(), 17, 17) |
__gen_uint(self.gafm_done.into(), 18, 18) |
__gen_uint(self.gam_done.into(), 19, 19) |
__gen_uint(self.rs_done.into(), 20, 20) |
__gen_uint(self.cs_done.into(), 21, 21) |
__gen_uint(self.sde_done.into(), 22, 22) |
__gen_uint(self.rccfbc_cs_done.into(), 23, 23);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for Instdone1 {
fn from(input: &[u32; 1]) -> Self {
Instdone1 {
prb0_ring_enable: __gen_unuint(input[0], 0, 0) != 0,
vfg_done: __gen_unuint(input[0], 1, 1) != 0,
vs_done: __gen_unuint(input[0], 2, 2) != 0,
hs_done: __gen_unuint(input[0], 3, 3) != 0,
te_done: __gen_unuint(input[0], 4, 4) != 0,
ds_done: __gen_unuint(input[0], 5, 5) != 0,
gs_done: __gen_unuint(input[0], 6, 6) != 0,
sol_done: __gen_unuint(input[0], 7, 7) != 0,
cl_done: __gen_unuint(input[0], 8, 8) != 0,
sf_done: __gen_unuint(input[0], 9, 9) != 0,
tdg_done: __gen_unuint(input[0], 12, 12) != 0,
urbm_done: __gen_unuint(input[0], 13, 13) != 0,
svg_done: __gen_unuint(input[0], 14, 14) != 0,
gafs_done: __gen_unuint(input[0], 15, 15) != 0,
vfe_done: __gen_unuint(input[0], 16, 16) != 0,
tsg_done: __gen_unuint(input[0], 17, 17) != 0,
gafm_done: __gen_unuint(input[0], 18, 18) != 0,
gam_done: __gen_unuint(input[0], 19, 19) != 0,
rs_done: __gen_unuint(input[0], 20, 20) != 0,
cs_done: __gen_unuint(input[0], 21, 21) != 0,
sde_done: __gen_unuint(input[0], 22, 22) != 0,
rccfbc_cs_done: __gen_unuint(input[0], 23, 23) != 0,
}
}
}
impl Deserialize for Instdone1 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct InterfaceDescriptorData {
pub kernel_start_pointer: u64,
pub software_exception_enable: bool,
pub mask_stack_exception_enable: bool,
pub illegal_opcode_exception_enable: bool,
pub floating_point_mode: u32,
pub thread_priority: u32,
pub single_program_flow: bool,
pub denorm_mode: u32,
pub thread_preemption_disable: bool,
pub sampler_count: u32,
pub sampler_state_pointer: u64,
pub binding_table_entry_count: u32,
pub binding_table_pointer: u64,
pub constant_urb_entry_read_offset: u32,
pub constant_urb_entry_read_length: u32,
pub number_of_threads_in_gpgpu_thread_group: u32,
pub global_barrier_enable: bool,
pub shared_local_memory_size: u32,
pub barrier_enable: bool,
pub rounding_mode: u32,
pub cross_thread_constant_data_read_length: u32,
}
impl InterfaceDescriptorData {
pub const DWORD_LENGTH: u32 = 8;
pub const ALTERNATE: u32 = 1;
pub const BETWEEN_13_AND_16_SAMPLERS_USED: u32 = 4;
pub const BETWEEN_1_AND_4_SAMPLERS_USED: u32 = 1;
pub const BETWEEN_5_AND_8_SAMPLERS_USED: u32 = 2;
pub const BETWEEN_9_AND_12_SAMPLERS_USED: u32 = 3;
pub const ENCODES_0K: u32 = 0;
pub const ENCODES_16K: u32 = 5;
pub const ENCODES_1K: u32 = 1;
pub const ENCODES_2K: u32 = 2;
pub const ENCODES_32K: u32 = 6;
pub const ENCODES_4K: u32 = 3;
pub const ENCODES_64K: u32 = 7;
pub const ENCODES_8K: u32 = 4;
pub const FTZ: u32 = 0;
pub const HIGH_PRIORITY: u32 = 1;
pub const IEEE_754: u32 = 0;
pub const NORMAL_PRIORITY: u32 = 0;
pub const NO_SAMPLERS_USED: u32 = 0;
pub const RD: u32 = 2;
pub const RTNE: u32 = 0;
pub const RTZ: u32 = 3;
pub const RU: u32 = 1;
pub const SETBYKERNEL: u32 = 1;
}
impl Default for InterfaceDescriptorData {
fn default() -> Self {
InterfaceDescriptorData {
kernel_start_pointer: Default::default(),
software_exception_enable: Default::default(),
mask_stack_exception_enable: Default::default(),
illegal_opcode_exception_enable: Default::default(),
floating_point_mode: Default::default(),
thread_priority: Default::default(),
single_program_flow: Default::default(),
denorm_mode: Default::default(),
thread_preemption_disable: Default::default(),
sampler_count: Default::default(),
sampler_state_pointer: Default::default(),
binding_table_entry_count: Default::default(),
binding_table_pointer: Default::default(),
constant_urb_entry_read_offset: Default::default(),
constant_urb_entry_read_length: Default::default(),
number_of_threads_in_gpgpu_thread_group: Default::default(),
global_barrier_enable: Default::default(),
shared_local_memory_size: Default::default(),
barrier_enable: Default::default(),
rounding_mode: Default::default(),
cross_thread_constant_data_read_length: Default::default(),
}
}
}
impl Serialize for InterfaceDescriptorData {
type Out = [u32; 8];
fn pack_into(&self, out: &mut [u32; 8]) {
out[0] = __gen_offset(self.kernel_start_pointer as u32, 6, 31);
out[1] = __gen_offset((self.kernel_start_pointer >> 32) as u32, 0, 15);
out[2] = __gen_uint(self.software_exception_enable.into(), 7, 7) |
__gen_uint(self.mask_stack_exception_enable.into(), 11, 11) |
__gen_uint(self.illegal_opcode_exception_enable.into(), 13, 13) |
__gen_uint(self.floating_point_mode, 16, 16) |
__gen_uint(self.thread_priority, 17, 17) |
__gen_uint(self.single_program_flow.into(), 18, 18) |
__gen_uint(self.denorm_mode, 19, 19) |
__gen_uint(self.thread_preemption_disable.into(), 20, 20);
out[3] = __gen_uint(self.sampler_count, 2, 4) |
__gen_offset(self.sampler_state_pointer as u32, 5, 31);
out[4] = __gen_uint(self.binding_table_entry_count, 0, 4) |
__gen_offset(self.binding_table_pointer as u32, 5, 15);
out[5] = __gen_uint(self.constant_urb_entry_read_offset, 0, 15) |
__gen_uint(self.constant_urb_entry_read_length, 16, 31);
out[6] = __gen_uint(self.number_of_threads_in_gpgpu_thread_group, 0, 9) |
__gen_uint(self.global_barrier_enable.into(), 15, 15) |
__gen_uint(self.shared_local_memory_size, 16, 20) |
__gen_uint(self.barrier_enable.into(), 21, 21) |
__gen_uint(self.rounding_mode, 22, 23);
out[7] = __gen_uint(self.cross_thread_constant_data_read_length, 0, 7);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 8];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 8] as *const [u8; 32]) })
}
}
impl From<&[u32; 8]> for InterfaceDescriptorData {
fn from(input: &[u32; 8]) -> Self {
InterfaceDescriptorData {
kernel_start_pointer: (__gen_unuint(input[0], 6, 31) as u64) << 6 |
(__gen_unuint(input[1], 0, 15) as u64) << 32,
software_exception_enable: __gen_unuint(input[2], 7, 7) != 0,
mask_stack_exception_enable: __gen_unuint(input[2], 11, 11) != 0,
illegal_opcode_exception_enable: __gen_unuint(input[2], 13, 13) != 0,
floating_point_mode: __gen_unuint(input[2], 16, 16),
thread_priority: __gen_unuint(input[2], 17, 17),
single_program_flow: __gen_unuint(input[2], 18, 18) != 0,
denorm_mode: __gen_unuint(input[2], 19, 19),
thread_preemption_disable: __gen_unuint(input[2], 20, 20) != 0,
sampler_count: __gen_unuint(input[3], 2, 4),
sampler_state_pointer: (__gen_unuint(input[3], 5, 31) as u64) << 5,
binding_table_entry_count: __gen_unuint(input[4], 0, 4),
binding_table_pointer: (__gen_unuint(input[4], 5, 15) as u64) << 5,
constant_urb_entry_read_offset: __gen_unuint(input[5], 0, 15),
constant_urb_entry_read_length: __gen_unuint(input[5], 16, 31),
number_of_threads_in_gpgpu_thread_group: __gen_unuint(input[6], 0, 9),
global_barrier_enable: __gen_unuint(input[6], 15, 15) != 0,
shared_local_memory_size: __gen_unuint(input[6], 16, 20),
barrier_enable: __gen_unuint(input[6], 21, 21) != 0,
rounding_mode: __gen_unuint(input[6], 22, 23),
cross_thread_constant_data_read_length: __gen_unuint(input[7], 0, 7),
}
}
}
impl Deserialize for InterfaceDescriptorData {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 8];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 8] as *mut [u8; 32]) })?;
Ok((&input).into())
}
}
pub struct L3cntlreg {
pub slm_enable: bool,
pub urb_allocation: u32,
pub ro_allocation: u32,
pub dc_allocation: u32,
pub all_allocation: u32,
}
impl L3cntlreg {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x7034;
}
impl Default for L3cntlreg {
fn default() -> Self {
L3cntlreg {
slm_enable: Default::default(),
urb_allocation: Default::default(),
ro_allocation: Default::default(),
dc_allocation: Default::default(),
all_allocation: Default::default(),
}
}
}
impl Serialize for L3cntlreg {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.slm_enable.into(), 0, 0) |
__gen_uint(self.urb_allocation, 1, 7) |
__gen_uint(self.ro_allocation, 11, 17) |
__gen_uint(self.dc_allocation, 18, 24) |
__gen_uint(self.all_allocation, 25, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for L3cntlreg {
fn from(input: &[u32; 1]) -> Self {
L3cntlreg {
slm_enable: __gen_unuint(input[0], 0, 0) != 0,
urb_allocation: __gen_unuint(input[0], 1, 7),
ro_allocation: __gen_unuint(input[0], 11, 17),
dc_allocation: __gen_unuint(input[0], 18, 24),
all_allocation: __gen_unuint(input[0], 25, 31),
}
}
}
impl Deserialize for L3cntlreg {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct LumaFilterCoefficientsArray {
pub table_0x_filter_coefficient_n_0: f32,
pub table_0y_filter_coefficient_n_0: f32,
pub table_0x_filter_coefficient_n_1: f32,
pub table_0y_filter_coefficient_n_1: f32,
pub table_0x_filter_coefficient_n_2: f32,
pub table_0y_filter_coefficient_n_2: f32,
pub table_0x_filter_coefficient_n_3: f32,
pub table_0y_filter_coefficient_n_3: f32,
pub table_0x_filter_coefficient_n_4: f32,
pub table_0y_filter_coefficient_n_4: f32,
pub table_0x_filter_coefficient_n_5: f32,
pub table_0y_filter_coefficient_n_5: f32,
pub table_0x_filter_coefficient_n_6: f32,
pub table_0y_filter_coefficient_n_6: f32,
pub table_0x_filter_coefficient_n_7: f32,
pub table_0y_filter_coefficient_n_7: f32,
}
impl LumaFilterCoefficientsArray {
pub const DWORD_LENGTH: u32 = 4;
}
impl Default for LumaFilterCoefficientsArray {
fn default() -> Self {
LumaFilterCoefficientsArray {
table_0x_filter_coefficient_n_0: Default::default(),
table_0y_filter_coefficient_n_0: Default::default(),
table_0x_filter_coefficient_n_1: Default::default(),
table_0y_filter_coefficient_n_1: Default::default(),
table_0x_filter_coefficient_n_2: Default::default(),
table_0y_filter_coefficient_n_2: Default::default(),
table_0x_filter_coefficient_n_3: Default::default(),
table_0y_filter_coefficient_n_3: Default::default(),
table_0x_filter_coefficient_n_4: Default::default(),
table_0y_filter_coefficient_n_4: Default::default(),
table_0x_filter_coefficient_n_5: Default::default(),
table_0y_filter_coefficient_n_5: Default::default(),
table_0x_filter_coefficient_n_6: Default::default(),
table_0y_filter_coefficient_n_6: Default::default(),
table_0x_filter_coefficient_n_7: Default::default(),
table_0y_filter_coefficient_n_7: Default::default(),
}
}
}
impl Serialize for LumaFilterCoefficientsArray {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_sfixed(self.table_0x_filter_coefficient_n_0, 0, 7, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_0, 8, 15, 6) |
__gen_sfixed(self.table_0x_filter_coefficient_n_1, 16, 23, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_1, 24, 31, 6);
out[1] = __gen_sfixed(self.table_0x_filter_coefficient_n_2, 0, 7, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_2, 8, 15, 6) |
__gen_sfixed(self.table_0x_filter_coefficient_n_3, 16, 23, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_3, 24, 31, 6);
out[2] = __gen_sfixed(self.table_0x_filter_coefficient_n_4, 0, 7, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_4, 8, 15, 6) |
__gen_sfixed(self.table_0x_filter_coefficient_n_5, 16, 23, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_5, 24, 31, 6);
out[3] = __gen_sfixed(self.table_0x_filter_coefficient_n_6, 0, 7, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_6, 8, 15, 6) |
__gen_sfixed(self.table_0x_filter_coefficient_n_7, 16, 23, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_7, 24, 31, 6);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for LumaFilterCoefficientsArray {
fn from(input: &[u32; 4]) -> Self {
LumaFilterCoefficientsArray {
table_0x_filter_coefficient_n_0: __gen_unsfixed(input[0], 0, 7, 6),
table_0y_filter_coefficient_n_0: __gen_unsfixed(input[0], 8, 15, 6),
table_0x_filter_coefficient_n_1: __gen_unsfixed(input[0], 16, 23, 6),
table_0y_filter_coefficient_n_1: __gen_unsfixed(input[0], 24, 31, 6),
table_0x_filter_coefficient_n_2: __gen_unsfixed(input[1], 0, 7, 6),
table_0y_filter_coefficient_n_2: __gen_unsfixed(input[1], 8, 15, 6),
table_0x_filter_coefficient_n_3: __gen_unsfixed(input[1], 16, 23, 6),
table_0y_filter_coefficient_n_3: __gen_unsfixed(input[1], 24, 31, 6),
table_0x_filter_coefficient_n_4: __gen_unsfixed(input[2], 0, 7, 6),
table_0y_filter_coefficient_n_4: __gen_unsfixed(input[2], 8, 15, 6),
table_0x_filter_coefficient_n_5: __gen_unsfixed(input[2], 16, 23, 6),
table_0y_filter_coefficient_n_5: __gen_unsfixed(input[2], 24, 31, 6),
table_0x_filter_coefficient_n_6: __gen_unsfixed(input[3], 0, 7, 6),
table_0y_filter_coefficient_n_6: __gen_unsfixed(input[3], 8, 15, 6),
table_0x_filter_coefficient_n_7: __gen_unsfixed(input[3], 16, 23, 6),
table_0y_filter_coefficient_n_7: __gen_unsfixed(input[3], 24, 31, 6),
}
}
}
impl Deserialize for LumaFilterCoefficientsArray {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MediaCurbeLoad {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub curbe_total_data_length: u32,
pub curbe_data_start_address: u32,
}
impl MediaCurbeLoad {
pub const DWORD_LENGTH: u32 = 4;
}
impl Default for MediaCurbeLoad {
fn default() -> Self {
MediaCurbeLoad {
dword_length: 2,
subopcode: 1,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
curbe_total_data_length: Default::default(),
curbe_data_start_address: Default::default(),
}
}
}
impl Serialize for MediaCurbeLoad {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 15) |
__gen_uint(self.subopcode, 16, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = 0;
out[2] = __gen_uint(self.curbe_total_data_length, 0, 16);
out[3] = __gen_uint(self.curbe_data_start_address, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MediaCurbeLoad {
fn from(input: &[u32; 4]) -> Self {
MediaCurbeLoad {
dword_length: __gen_unuint(input[0], 0, 15),
subopcode: __gen_unuint(input[0], 16, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
curbe_total_data_length: __gen_unuint(input[2], 0, 16),
curbe_data_start_address: __gen_unuint(input[3], 0, 31),
}
}
}
impl Deserialize for MediaCurbeLoad {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MediaInterfaceDescriptorLoad {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub interface_descriptor_total_length: u32,
pub interface_descriptor_data_start_address: u64,
}
impl MediaInterfaceDescriptorLoad {
pub const DWORD_LENGTH: u32 = 4;
}
impl Default for MediaInterfaceDescriptorLoad {
fn default() -> Self {
MediaInterfaceDescriptorLoad {
dword_length: 2,
subopcode: 2,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
interface_descriptor_total_length: Default::default(),
interface_descriptor_data_start_address: Default::default(),
}
}
}
impl Serialize for MediaInterfaceDescriptorLoad {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 15) |
__gen_uint(self.subopcode, 16, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = 0;
out[2] = __gen_uint(self.interface_descriptor_total_length, 0, 16);
out[3] = __gen_offset(self.interface_descriptor_data_start_address as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MediaInterfaceDescriptorLoad {
fn from(input: &[u32; 4]) -> Self {
MediaInterfaceDescriptorLoad {
dword_length: __gen_unuint(input[0], 0, 15),
subopcode: __gen_unuint(input[0], 16, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
interface_descriptor_total_length: __gen_unuint(input[2], 0, 16),
interface_descriptor_data_start_address: (__gen_unuint(input[3], 0, 31) as u64),
}
}
}
impl Deserialize for MediaInterfaceDescriptorLoad {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MediaObject<A: Addr + Default> {
pub dword_length: u32,
pub media_command_sub_opcode: u32,
pub media_command_opcode: u32,
pub media_command_pipeline: u32,
pub command_type: u32,
pub interface_descriptor_offset: u32,
pub indirect_data_length: u32,
pub subslice_destination_select: u32,
pub slice_destination_select: u32,
pub use_scoreboard: u32,
pub force_destination: u32,
pub thread_synchronization: u32,
pub slice_destination_select_msbs: u32,
pub children_present: bool,
pub indirect_data_start_address: A,
pub scoreboard_x: u32,
pub scoredboard_y: u32,
pub scoreboard_mask: u32,
pub scoreboard_color: u32,
}
impl<A: Addr + Default> MediaObject<A> {
pub const DWORD_LENGTH: u32 = 6;
pub const NOT_USING_SCOREBOARD: u32 = 0;
pub const NO_THREAD_SYNCHRONIZATION: u32 = 0;
pub const SLICE_0: u32 = 0;
pub const SLICE_1: u32 = 1;
pub const SLICE_2: u32 = 2;
pub const SUBSLICE_0: u32 = 0;
pub const SUBSLICE_1: u32 = 1;
pub const SUBSLICE_2: u32 = 2;
pub const SUBSLICE_3: u32 = 3;
pub const THREAD_DISPATCH_IS_SYNCHRONIZED_BY_THE_SPAWN_ROOT_THREAD_MESSAGE: u32 = 1;
pub const USING_SCOREBOARD: u32 = 1;
}
impl<A: Addr + Default> Default for MediaObject<A> {
fn default() -> Self {
MediaObject {
dword_length: 4,
media_command_sub_opcode: 0,
media_command_opcode: 1,
media_command_pipeline: 2,
command_type: 3,
interface_descriptor_offset: Default::default(),
indirect_data_length: Default::default(),
subslice_destination_select: Default::default(),
slice_destination_select: Default::default(),
use_scoreboard: Default::default(),
force_destination: Default::default(),
thread_synchronization: Default::default(),
slice_destination_select_msbs: Default::default(),
children_present: Default::default(),
indirect_data_start_address: Default::default(),
scoreboard_x: Default::default(),
scoredboard_y: Default::default(),
scoreboard_mask: Default::default(),
scoreboard_color: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MediaObject<A> {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 14) |
__gen_uint(self.media_command_sub_opcode, 16, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.media_command_pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.interface_descriptor_offset, 0, 5);
out[2] = __gen_uint(self.indirect_data_length, 0, 16) |
__gen_uint(self.subslice_destination_select, 17, 18) |
__gen_uint(self.slice_destination_select, 19, 20) |
__gen_uint(self.use_scoreboard, 21, 21) |
__gen_uint(self.force_destination, 22, 22) |
__gen_uint(self.thread_synchronization, 24, 24) |
__gen_uint(self.slice_destination_select_msbs, 25, 26) |
__gen_uint(self.children_present.into(), 31, 31);
let v3_address = self.indirect_data_start_address.combine(0);
out[3] = v3_address as u32;
out[4] = (v3_address >> 32) as u32;
out[4] = __gen_uint(self.scoreboard_x, 0, 8) |
__gen_uint(self.scoredboard_y, 16, 24);
out[5] = __gen_uint(self.scoreboard_mask, 0, 7) |
__gen_uint(self.scoreboard_color, 16, 19);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for MediaObject<u64> {
fn from(input: &[u32; 6]) -> Self {
MediaObject {
dword_length: __gen_unuint(input[0], 0, 14),
media_command_sub_opcode: __gen_unuint(input[0], 16, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
media_command_pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
interface_descriptor_offset: __gen_unuint(input[1], 0, 5),
indirect_data_length: __gen_unuint(input[2], 0, 16),
subslice_destination_select: __gen_unuint(input[2], 17, 18),
slice_destination_select: __gen_unuint(input[2], 19, 20),
use_scoreboard: __gen_unuint(input[2], 21, 21),
force_destination: __gen_unuint(input[2], 22, 22),
thread_synchronization: __gen_unuint(input[2], 24, 24),
slice_destination_select_msbs: __gen_unuint(input[2], 25, 26),
children_present: __gen_unuint(input[2], 31, 31) != 0,
indirect_data_start_address: (__gen_unuint(input[3], 0, 31) as u64),
scoreboard_x: __gen_unuint(input[4], 0, 8),
scoredboard_y: __gen_unuint(input[4], 16, 24),
scoreboard_mask: __gen_unuint(input[5], 0, 7),
scoreboard_color: __gen_unuint(input[5], 16, 19),
}
}
}
impl Deserialize for MediaObject<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct MediaObjectGrpid<A: Addr + Default> {
pub dword_length: u32,
pub media_command_sub_opcode: u32,
pub media_command_opcode: u32,
pub media_command_pipeline: u32,
pub command_type: u32,
pub interface_descriptor_offset: u32,
pub indirect_data_length: u32,
pub use_scoreboard: u32,
pub end_of_thread_group: u32,
pub indirect_data_start_address: A,
pub scoreboard_x: u32,
pub scoreboard_y: u32,
pub scoreboard_mask: u32,
pub scoreboard_color: u32,
pub groupid: u32,
}
impl<A: Addr + Default> MediaObjectGrpid<A> {
pub const DWORD_LENGTH: u32 = 7;
pub const NOT_USING_SCOREBOARD: u32 = 0;
pub const USING_SCOREBOARD: u32 = 1;
}
impl<A: Addr + Default> Default for MediaObjectGrpid<A> {
fn default() -> Self {
MediaObjectGrpid {
dword_length: 5,
media_command_sub_opcode: 6,
media_command_opcode: 1,
media_command_pipeline: 2,
command_type: 3,
interface_descriptor_offset: Default::default(),
indirect_data_length: Default::default(),
use_scoreboard: Default::default(),
end_of_thread_group: Default::default(),
indirect_data_start_address: Default::default(),
scoreboard_x: Default::default(),
scoreboard_y: Default::default(),
scoreboard_mask: Default::default(),
scoreboard_color: Default::default(),
groupid: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MediaObjectGrpid<A> {
type Out = [u32; 7];
fn pack_into(&self, out: &mut [u32; 7]) {
out[0] = __gen_uint(self.dword_length, 0, 15) |
__gen_uint(self.media_command_sub_opcode, 16, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.media_command_pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.interface_descriptor_offset, 0, 5);
out[2] = __gen_uint(self.indirect_data_length, 0, 16) |
__gen_uint(self.use_scoreboard, 21, 21) |
__gen_uint(self.end_of_thread_group, 23, 23);
let v3_address = self.indirect_data_start_address.combine(0);
out[3] = v3_address as u32;
out[4] = (v3_address >> 32) as u32;
out[4] = __gen_uint(self.scoreboard_x, 0, 8) |
__gen_uint(self.scoreboard_y, 16, 24);
out[5] = __gen_uint(self.scoreboard_mask, 0, 7) |
__gen_uint(self.scoreboard_color, 16, 19);
out[6] = __gen_uint(self.groupid, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 7];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 7] as *const [u8; 28]) })
}
}
impl From<&[u32; 7]> for MediaObjectGrpid<u64> {
fn from(input: &[u32; 7]) -> Self {
MediaObjectGrpid {
dword_length: __gen_unuint(input[0], 0, 15),
media_command_sub_opcode: __gen_unuint(input[0], 16, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
media_command_pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
interface_descriptor_offset: __gen_unuint(input[1], 0, 5),
indirect_data_length: __gen_unuint(input[2], 0, 16),
use_scoreboard: __gen_unuint(input[2], 21, 21),
end_of_thread_group: __gen_unuint(input[2], 23, 23),
indirect_data_start_address: (__gen_unuint(input[3], 0, 31) as u64),
scoreboard_x: __gen_unuint(input[4], 0, 8),
scoreboard_y: __gen_unuint(input[4], 16, 24),
scoreboard_mask: __gen_unuint(input[5], 0, 7),
scoreboard_color: __gen_unuint(input[5], 16, 19),
groupid: __gen_unuint(input[6], 0, 31),
}
}
}
impl Deserialize for MediaObjectGrpid<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 7];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 7] as *mut [u8; 28]) })?;
Ok((&input).into())
}
}
pub struct MediaObjectPrt {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub interface_descriptor_offset: u32,
pub prt_fencetype: u32,
pub prt_fence_needed: bool,
pub children_present: bool,
pub inline_data: [u32; 12],
}
impl MediaObjectPrt {
pub const DWORD_LENGTH: u32 = 16;
pub const ROOT_THREAD_QUEUE: u32 = 0;
pub const VFE_STATE_FLUSH: u32 = 1;
}
impl Default for MediaObjectPrt {
fn default() -> Self {
MediaObjectPrt {
dword_length: 14,
subopcode: 2,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
interface_descriptor_offset: Default::default(),
prt_fencetype: Default::default(),
prt_fence_needed: Default::default(),
children_present: Default::default(),
inline_data: Default::default(),
}
}
}
impl Serialize for MediaObjectPrt {
type Out = [u32; 16];
fn pack_into(&self, out: &mut [u32; 16]) {
out[0] = __gen_uint(self.dword_length, 0, 14) |
__gen_uint(self.subopcode, 16, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.interface_descriptor_offset, 0, 5);
out[2] = __gen_uint(self.prt_fencetype, 22, 22) |
__gen_uint(self.prt_fence_needed.into(), 23, 23) |
__gen_uint(self.children_present.into(), 31, 31);
out[3] = 0;
out[4] = __gen_uint(self.inline_data[0], 0, 31);
out[5] = __gen_uint(self.inline_data[1], 0, 31);
out[6] = __gen_uint(self.inline_data[2], 0, 31);
out[7] = __gen_uint(self.inline_data[3], 0, 31);
out[8] = __gen_uint(self.inline_data[4], 0, 31);
out[9] = __gen_uint(self.inline_data[5], 0, 31);
out[10] = __gen_uint(self.inline_data[6], 0, 31);
out[11] = __gen_uint(self.inline_data[7], 0, 31);
out[12] = __gen_uint(self.inline_data[8], 0, 31);
out[13] = __gen_uint(self.inline_data[9], 0, 31);
out[14] = __gen_uint(self.inline_data[10], 0, 31);
out[15] = __gen_uint(self.inline_data[11], 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 16];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 16] as *const [u8; 64]) })
}
}
impl From<&[u32; 16]> for MediaObjectPrt {
fn from(input: &[u32; 16]) -> Self {
MediaObjectPrt {
dword_length: __gen_unuint(input[0], 0, 14),
subopcode: __gen_unuint(input[0], 16, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
interface_descriptor_offset: __gen_unuint(input[1], 0, 5),
prt_fencetype: __gen_unuint(input[2], 22, 22),
prt_fence_needed: __gen_unuint(input[2], 23, 23) != 0,
children_present: __gen_unuint(input[2], 31, 31) != 0,
inline_data: [
__gen_unuint(input[4], 0, 31),
__gen_unuint(input[5], 0, 31),
__gen_unuint(input[6], 0, 31),
__gen_unuint(input[7], 0, 31),
__gen_unuint(input[8], 0, 31),
__gen_unuint(input[9], 0, 31),
__gen_unuint(input[10], 0, 31),
__gen_unuint(input[11], 0, 31),
__gen_unuint(input[12], 0, 31),
__gen_unuint(input[13], 0, 31),
__gen_unuint(input[14], 0, 31),
__gen_unuint(input[15], 0, 31)
],
}
}
}
impl Deserialize for MediaObjectPrt {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 16];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 16] as *mut [u8; 64]) })?;
Ok((&input).into())
}
}
pub struct MediaObjectWalker {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub interface_descriptor_offset: u32,
pub indirect_data_length: u32,
pub use_scoreboard: u32,
pub masked_dispatch: u32,
pub thread_synchronization: u32,
pub indirect_data_start_address: u32,
pub scoreboard_mask: u32,
pub group_id_loop_select: u32,
pub mid_loop_unit_x: i32,
pub local_mid_loop_unit_y: i32,
pub middle_loop_extra_steps: u32,
pub color_count_minus_one: u32,
pub local_loop_exec_count: u32,
pub global_loop_exec_count: u32,
pub block_resolution_x: u32,
pub block_resolution_y: u32,
pub local_start_x: u32,
pub local_start_y: u32,
pub local_outer_loop_stride_x: i32,
pub local_outer_loop_stride_y: i32,
pub local_inner_loop_unit_x: i32,
pub local_inner_loop_unit_y: i32,
pub global_resolution_x: u32,
pub global_resolution_y: u32,
pub global_start_x: i32,
pub global_start_y: i32,
pub global_outer_loop_stride_x: i32,
pub global_outer_loop_stride_y: i32,
pub global_inner_loop_unit_x: i32,
pub global_inner_loop_unit_y: i32,
}
impl MediaObjectWalker {
pub const DWORD_LENGTH: u32 = 17;
pub const COLOR_GROUPS: u32 = 1;
pub const INNERGLOBAL_GROUPS: u32 = 5;
pub const INNERLOCAL_GROUPS: u32 = 2;
pub const MIDLOCAL_GROUPS: u32 = 3;
pub const NOT_USING_SCOREBOARD: u32 = 0;
pub const NO_GROUPS: u32 = 0;
pub const NO_THREAD_SYNCHRONIZATION: u32 = 0;
pub const OUTERLOCAL_GROUPS: u32 = 4;
pub const THREAD_DISPATCH_IS_SYNCHRONIZED_BY_THE_SPAWN_ROOT_THREAD_MESSAGE: u32 = 1;
pub const USING_SCOREBOARD: u32 = 1;
}
impl Default for MediaObjectWalker {
fn default() -> Self {
MediaObjectWalker {
dword_length: 15,
subopcode: 3,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
interface_descriptor_offset: Default::default(),
indirect_data_length: Default::default(),
use_scoreboard: Default::default(),
masked_dispatch: Default::default(),
thread_synchronization: Default::default(),
indirect_data_start_address: Default::default(),
scoreboard_mask: Default::default(),
group_id_loop_select: Default::default(),
mid_loop_unit_x: Default::default(),
local_mid_loop_unit_y: Default::default(),
middle_loop_extra_steps: Default::default(),
color_count_minus_one: Default::default(),
local_loop_exec_count: Default::default(),
global_loop_exec_count: Default::default(),
block_resolution_x: Default::default(),
block_resolution_y: Default::default(),
local_start_x: Default::default(),
local_start_y: Default::default(),
local_outer_loop_stride_x: Default::default(),
local_outer_loop_stride_y: Default::default(),
local_inner_loop_unit_x: Default::default(),
local_inner_loop_unit_y: Default::default(),
global_resolution_x: Default::default(),
global_resolution_y: Default::default(),
global_start_x: Default::default(),
global_start_y: Default::default(),
global_outer_loop_stride_x: Default::default(),
global_outer_loop_stride_y: Default::default(),
global_inner_loop_unit_x: Default::default(),
global_inner_loop_unit_y: Default::default(),
}
}
}
impl Serialize for MediaObjectWalker {
type Out = [u32; 17];
fn pack_into(&self, out: &mut [u32; 17]) {
out[0] = __gen_uint(self.dword_length, 0, 14) |
__gen_uint(self.subopcode, 16, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.interface_descriptor_offset, 0, 5);
out[2] = __gen_uint(self.indirect_data_length, 0, 16) |
__gen_uint(self.use_scoreboard, 21, 21) |
__gen_uint(self.masked_dispatch, 22, 23) |
__gen_uint(self.thread_synchronization, 24, 24);
out[3] = __gen_uint(self.indirect_data_start_address, 0, 31);
out[4] = 0;
out[5] = __gen_uint(self.scoreboard_mask, 0, 7) |
__gen_uint(self.group_id_loop_select, 8, 31);
out[6] = __gen_uint(self.mid_loop_unit_x as u32, 8, 9) |
__gen_uint(self.local_mid_loop_unit_y as u32, 12, 13) |
__gen_uint(self.middle_loop_extra_steps, 16, 20) |
__gen_uint(self.color_count_minus_one, 24, 27);
out[7] = __gen_uint(self.local_loop_exec_count, 0, 11) |
__gen_uint(self.global_loop_exec_count, 16, 27);
out[8] = __gen_uint(self.block_resolution_x, 0, 10) |
__gen_uint(self.block_resolution_y, 16, 26);
out[9] = __gen_uint(self.local_start_x, 0, 10) |
__gen_uint(self.local_start_y, 16, 26);
out[10] = 0;
out[11] = __gen_uint(self.local_outer_loop_stride_x as u32, 0, 11) |
__gen_uint(self.local_outer_loop_stride_y as u32, 16, 27);
out[12] = __gen_uint(self.local_inner_loop_unit_x as u32, 0, 11) |
__gen_uint(self.local_inner_loop_unit_y as u32, 16, 27);
out[13] = __gen_uint(self.global_resolution_x, 0, 10) |
__gen_uint(self.global_resolution_y, 16, 26);
out[14] = __gen_uint(self.global_start_x as u32, 0, 11) |
__gen_uint(self.global_start_y as u32, 16, 27);
out[15] = __gen_uint(self.global_outer_loop_stride_x as u32, 0, 11) |
__gen_uint(self.global_outer_loop_stride_y as u32, 16, 27);
out[16] = __gen_uint(self.global_inner_loop_unit_x as u32, 0, 11) |
__gen_uint(self.global_inner_loop_unit_y as u32, 16, 27);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 17];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 17] as *const [u8; 68]) })
}
}
impl From<&[u32; 17]> for MediaObjectWalker {
fn from(input: &[u32; 17]) -> Self {
MediaObjectWalker {
dword_length: __gen_unuint(input[0], 0, 14),
subopcode: __gen_unuint(input[0], 16, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
interface_descriptor_offset: __gen_unuint(input[1], 0, 5),
indirect_data_length: __gen_unuint(input[2], 0, 16),
use_scoreboard: __gen_unuint(input[2], 21, 21),
masked_dispatch: __gen_unuint(input[2], 22, 23),
thread_synchronization: __gen_unuint(input[2], 24, 24),
indirect_data_start_address: __gen_unuint(input[3], 0, 31),
scoreboard_mask: __gen_unuint(input[5], 0, 7),
group_id_loop_select: __gen_unuint(input[5], 8, 31),
mid_loop_unit_x: (__gen_unuint(input[6], 8, 9)) as i32,
local_mid_loop_unit_y: (__gen_unuint(input[6], 12, 13)) as i32,
middle_loop_extra_steps: __gen_unuint(input[6], 16, 20),
color_count_minus_one: __gen_unuint(input[6], 24, 27),
local_loop_exec_count: __gen_unuint(input[7], 0, 11),
global_loop_exec_count: __gen_unuint(input[7], 16, 27),
block_resolution_x: __gen_unuint(input[8], 0, 10),
block_resolution_y: __gen_unuint(input[8], 16, 26),
local_start_x: __gen_unuint(input[9], 0, 10),
local_start_y: __gen_unuint(input[9], 16, 26),
local_outer_loop_stride_x: (__gen_unuint(input[11], 0, 11)) as i32,
local_outer_loop_stride_y: (__gen_unuint(input[11], 16, 27)) as i32,
local_inner_loop_unit_x: (__gen_unuint(input[12], 0, 11)) as i32,
local_inner_loop_unit_y: (__gen_unuint(input[12], 16, 27)) as i32,
global_resolution_x: __gen_unuint(input[13], 0, 10),
global_resolution_y: __gen_unuint(input[13], 16, 26),
global_start_x: (__gen_unuint(input[14], 0, 11)) as i32,
global_start_y: (__gen_unuint(input[14], 16, 27)) as i32,
global_outer_loop_stride_x: (__gen_unuint(input[15], 0, 11)) as i32,
global_outer_loop_stride_y: (__gen_unuint(input[15], 16, 27)) as i32,
global_inner_loop_unit_x: (__gen_unuint(input[16], 0, 11)) as i32,
global_inner_loop_unit_y: (__gen_unuint(input[16], 16, 27)) as i32,
}
}
}
impl Deserialize for MediaObjectWalker {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 17];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 17] as *mut [u8; 68]) })?;
Ok((&input).into())
}
}
pub struct MediaStateFlush {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub interface_descriptor_offset: u32,
pub watermark_required: u32,
pub flush_to_go: bool,
}
impl MediaStateFlush {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for MediaStateFlush {
fn default() -> Self {
MediaStateFlush {
dword_length: 0,
subopcode: 4,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
interface_descriptor_offset: Default::default(),
watermark_required: Default::default(),
flush_to_go: Default::default(),
}
}
}
impl Serialize for MediaStateFlush {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 15) |
__gen_uint(self.subopcode, 16, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.interface_descriptor_offset, 0, 5) |
__gen_uint(self.watermark_required, 6, 6) |
__gen_uint(self.flush_to_go.into(), 7, 7);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MediaStateFlush {
fn from(input: &[u32; 2]) -> Self {
MediaStateFlush {
dword_length: __gen_unuint(input[0], 0, 15),
subopcode: __gen_unuint(input[0], 16, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
interface_descriptor_offset: __gen_unuint(input[1], 0, 5),
watermark_required: __gen_unuint(input[1], 6, 6),
flush_to_go: __gen_unuint(input[1], 7, 7) != 0,
}
}
}
impl Deserialize for MediaStateFlush {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MediaVfeState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub per_thread_scratch_space: u32,
pub stack_size: u32,
pub scratch_space_base_pointer: A,
pub slm_bank_selection_policy: u32,
pub thread_dispatch_selection_policy: u32,
pub reset_gateway_timer: u32,
pub number_of_urb_entries: u32,
pub maximum_number_of_threads: u32,
pub slice_disable: u32,
pub curbe_allocation_size: u32,
pub urb_entry_allocation_size: u32,
pub scoreboard_mask: u32,
pub number_of_media_objects_per_pre_emption_checkpoint: u32,
pub scoreboard_type: u32,
pub scoreboard_enable: bool,
pub scoreboard_0_delta_x: i32,
pub scoreboard_0_delta_y: i32,
pub scoreboard_1_delta_x: i32,
pub scoreboard_1_delta_y: i32,
pub scoreboard_2_delta_x: i32,
pub scoreboard_2_delta_y: i32,
pub scoreboard_3_delta_x: i32,
pub scoreboard_3_delta_y: i32,
pub scoreboard_4_delta_x: i32,
pub scoreboard_4_delta_y: i32,
pub scoreboard_5_delta_x: i32,
pub scoreboard_5_delta_y: i32,
pub scoreboard_6_delta_x: i32,
pub scoreboard_6_delta_y: i32,
pub scoreboard_7_delta_x: i32,
pub scoreboard_7_delta_y: i32,
}
impl<A: Addr + Default> MediaVfeState<A> {
pub const DWORD_LENGTH: u32 = 9;
pub const ALL_SUBSLICES_ENABLED: u32 = 0;
pub const LEGACY: u32 = 0;
pub const LOAD_BALANCE: u32 = 3;
pub const MAINTAINING_THE_EXISTING_TIMESTAMP_STATE: u32 = 0;
pub const NON_STALLING_SCOREBOARD: u32 = 1;
pub const ONLY_SLICE_0_ENABLED: u32 = 1;
pub const ONLY_SLICE_0_SUBSLICE_0_ENABLED: u32 = 3;
pub const PREFER_1SS: u32 = 1;
pub const PREFER_2SS: u32 = 2;
pub const RESETTING_RELATIVE_TIMER_AND_LATCHING_THE_GLOBAL_TIMESTAMP: u32 = 1;
pub const SLM_LOAD_BALANCE: u32 = 1;
pub const STALLING_SCOREBOARD: u32 = 0;
}
impl<A: Addr + Default> Default for MediaVfeState<A> {
fn default() -> Self {
MediaVfeState {
dword_length: 7,
subopcode: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
per_thread_scratch_space: Default::default(),
stack_size: Default::default(),
scratch_space_base_pointer: Default::default(),
slm_bank_selection_policy: Default::default(),
thread_dispatch_selection_policy: Default::default(),
reset_gateway_timer: Default::default(),
number_of_urb_entries: Default::default(),
maximum_number_of_threads: Default::default(),
slice_disable: Default::default(),
curbe_allocation_size: Default::default(),
urb_entry_allocation_size: Default::default(),
scoreboard_mask: Default::default(),
number_of_media_objects_per_pre_emption_checkpoint: Default::default(),
scoreboard_type: Default::default(),
scoreboard_enable: Default::default(),
scoreboard_0_delta_x: Default::default(),
scoreboard_0_delta_y: Default::default(),
scoreboard_1_delta_x: Default::default(),
scoreboard_1_delta_y: Default::default(),
scoreboard_2_delta_x: Default::default(),
scoreboard_2_delta_y: Default::default(),
scoreboard_3_delta_x: Default::default(),
scoreboard_3_delta_y: Default::default(),
scoreboard_4_delta_x: Default::default(),
scoreboard_4_delta_y: Default::default(),
scoreboard_5_delta_x: Default::default(),
scoreboard_5_delta_y: Default::default(),
scoreboard_6_delta_x: Default::default(),
scoreboard_6_delta_y: Default::default(),
scoreboard_7_delta_x: Default::default(),
scoreboard_7_delta_y: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MediaVfeState<A> {
type Out = [u32; 9];
fn pack_into(&self, out: &mut [u32; 9]) {
out[0] = __gen_uint(self.dword_length, 0, 15) |
__gen_uint(self.subopcode, 16, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.per_thread_scratch_space, 0, 3) |
__gen_uint(self.stack_size, 4, 7);
let v1_address = self.scratch_space_base_pointer.combine(v1);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.slm_bank_selection_policy, 3, 3) |
__gen_uint(self.thread_dispatch_selection_policy, 4, 5) |
__gen_uint(self.reset_gateway_timer, 7, 7) |
__gen_uint(self.number_of_urb_entries, 8, 15) |
__gen_uint(self.maximum_number_of_threads, 16, 31);
out[4] = __gen_uint(self.slice_disable, 0, 1);
out[5] = __gen_uint(self.curbe_allocation_size, 0, 15) |
__gen_uint(self.urb_entry_allocation_size, 16, 31);
out[6] = __gen_uint(self.scoreboard_mask, 0, 7) |
__gen_uint(self.number_of_media_objects_per_pre_emption_checkpoint, 8, 15) |
__gen_uint(self.scoreboard_type, 30, 30) |
__gen_uint(self.scoreboard_enable.into(), 31, 31);
out[7] = __gen_uint(self.scoreboard_0_delta_x as u32, 0, 3) |
__gen_uint(self.scoreboard_0_delta_y as u32, 4, 7) |
__gen_uint(self.scoreboard_1_delta_x as u32, 8, 11) |
__gen_uint(self.scoreboard_1_delta_y as u32, 12, 15) |
__gen_uint(self.scoreboard_2_delta_x as u32, 16, 19) |
__gen_uint(self.scoreboard_2_delta_y as u32, 20, 23) |
__gen_uint(self.scoreboard_3_delta_x as u32, 24, 27) |
__gen_uint(self.scoreboard_3_delta_y as u32, 28, 31);
out[8] = __gen_uint(self.scoreboard_4_delta_x as u32, 0, 3) |
__gen_uint(self.scoreboard_4_delta_y as u32, 4, 7) |
__gen_uint(self.scoreboard_5_delta_x as u32, 8, 11) |
__gen_uint(self.scoreboard_5_delta_y as u32, 12, 15) |
__gen_uint(self.scoreboard_6_delta_x as u32, 16, 19) |
__gen_uint(self.scoreboard_6_delta_y as u32, 20, 23) |
__gen_uint(self.scoreboard_7_delta_x as u32, 24, 27) |
__gen_uint(self.scoreboard_7_delta_y as u32, 28, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 9];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 9] as *const [u8; 36]) })
}
}
impl From<&[u32; 9]> for MediaVfeState<u64> {
fn from(input: &[u32; 9]) -> Self {
MediaVfeState {
dword_length: __gen_unuint(input[0], 0, 15),
subopcode: __gen_unuint(input[0], 16, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
per_thread_scratch_space: __gen_unuint(input[1], 0, 3),
stack_size: __gen_unuint(input[1], 4, 7),
scratch_space_base_pointer: (__gen_unuint(input[1], 10, 31) as u64) << 10 |
(__gen_unuint(input[2], 0, 15) as u64) << 32,
slm_bank_selection_policy: __gen_unuint(input[3], 3, 3),
thread_dispatch_selection_policy: __gen_unuint(input[3], 4, 5),
reset_gateway_timer: __gen_unuint(input[3], 7, 7),
number_of_urb_entries: __gen_unuint(input[3], 8, 15),
maximum_number_of_threads: __gen_unuint(input[3], 16, 31),
slice_disable: __gen_unuint(input[4], 0, 1),
curbe_allocation_size: __gen_unuint(input[5], 0, 15),
urb_entry_allocation_size: __gen_unuint(input[5], 16, 31),
scoreboard_mask: __gen_unuint(input[6], 0, 7),
number_of_media_objects_per_pre_emption_checkpoint: __gen_unuint(input[6], 8, 15),
scoreboard_type: __gen_unuint(input[6], 30, 30),
scoreboard_enable: __gen_unuint(input[6], 31, 31) != 0,
scoreboard_0_delta_x: (__gen_unuint(input[7], 0, 3)) as i32,
scoreboard_0_delta_y: (__gen_unuint(input[7], 4, 7)) as i32,
scoreboard_1_delta_x: (__gen_unuint(input[7], 8, 11)) as i32,
scoreboard_1_delta_y: (__gen_unuint(input[7], 12, 15)) as i32,
scoreboard_2_delta_x: (__gen_unuint(input[7], 16, 19)) as i32,
scoreboard_2_delta_y: (__gen_unuint(input[7], 20, 23)) as i32,
scoreboard_3_delta_x: (__gen_unuint(input[7], 24, 27)) as i32,
scoreboard_3_delta_y: (__gen_unuint(input[7], 28, 31)) as i32,
scoreboard_4_delta_x: (__gen_unuint(input[8], 0, 3)) as i32,
scoreboard_4_delta_y: (__gen_unuint(input[8], 4, 7)) as i32,
scoreboard_5_delta_x: (__gen_unuint(input[8], 8, 11)) as i32,
scoreboard_5_delta_y: (__gen_unuint(input[8], 12, 15)) as i32,
scoreboard_6_delta_x: (__gen_unuint(input[8], 16, 19)) as i32,
scoreboard_6_delta_y: (__gen_unuint(input[8], 20, 23)) as i32,
scoreboard_7_delta_x: (__gen_unuint(input[8], 24, 27)) as i32,
scoreboard_7_delta_y: (__gen_unuint(input[8], 28, 31)) as i32,
}
}
}
impl Deserialize for MediaVfeState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 9];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 9] as *mut [u8; 36]) })?;
Ok((&input).into())
}
}
pub struct Memoryaddressattributes {
pub mocs: u32,
pub arbitration_priority_control: HevcArbitrationPriority,
pub memory_compression_enable: bool,
pub memory_compression_mode: u32,
pub row_store_scratch_buffer_cache_select: u32,
pub tiled_resource_mode: u32,
}
impl Memoryaddressattributes {
pub const DWORD_LENGTH: u32 = 1;
pub const TRMODE_NONE: u32 = 0;
pub const TRMODE_TILEYF: u32 = 1;
pub const TRMODE_TILEYS: u32 = 2;
}
impl Default for Memoryaddressattributes {
fn default() -> Self {
Memoryaddressattributes {
mocs: Default::default(),
arbitration_priority_control: Default::default(),
memory_compression_enable: Default::default(),
memory_compression_mode: Default::default(),
row_store_scratch_buffer_cache_select: Default::default(),
tiled_resource_mode: Default::default(),
}
}
}
impl Serialize for Memoryaddressattributes {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
let mut v0_0 = [0_u32; 1];
self.arbitration_priority_control.pack_into(&mut v0_0);
out[0] = __gen_uint(self.mocs, 1, 6) |
__gen_uint(v0_0[0], 7, 8) |
__gen_uint(self.memory_compression_enable.into(), 9, 9) |
__gen_uint(self.memory_compression_mode, 10, 10) |
__gen_uint(self.row_store_scratch_buffer_cache_select, 12, 12) |
__gen_uint(self.tiled_resource_mode, 13, 14);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for Memoryaddressattributes {
fn from(input: &[u32; 1]) -> Self {
Memoryaddressattributes {
mocs: __gen_unuint(input[0], 1, 6),
arbitration_priority_control: {{
let i: [u32; 1] = [__gen_unuint(input[0], 7, 8)];
(&i).into()
}},
memory_compression_enable: __gen_unuint(input[0], 9, 9) != 0,
memory_compression_mode: __gen_unuint(input[0], 10, 10),
row_store_scratch_buffer_cache_select: __gen_unuint(input[0], 12, 12),
tiled_resource_mode: __gen_unuint(input[0], 13, 14),
}
}
}
impl Deserialize for Memoryaddressattributes {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MfcAvcPakObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_pak_mv_data_length: u32,
pub indirect_pak_mv_data_start_address_offset: u64,
pub inline_data: [u32; 8],
pub vdenc_mode_inline_data: [u32; 12],
}
impl MfcAvcPakObject {
pub const DWORD_LENGTH: u32 = 24;
}
impl Default for MfcAvcPakObject {
fn default() -> Self {
MfcAvcPakObject {
dword_length: 10,
subopcode_b: 9,
subopcode_a: 2,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
indirect_pak_mv_data_length: Default::default(),
indirect_pak_mv_data_start_address_offset: Default::default(),
inline_data: Default::default(),
vdenc_mode_inline_data: Default::default(),
}
}
}
impl Serialize for MfcAvcPakObject {
type Out = [u32; 24];
fn pack_into(&self, out: &mut [u32; 24]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_pak_mv_data_length, 0, 9);
out[2] = __gen_offset(self.indirect_pak_mv_data_start_address_offset as u32, 0, 28);
out[3] = __gen_uint(self.inline_data[0], 0, 31);
out[4] = __gen_uint(self.inline_data[1], 0, 31);
out[5] = __gen_uint(self.inline_data[2], 0, 31);
out[6] = __gen_uint(self.inline_data[3], 0, 31);
out[7] = __gen_uint(self.inline_data[4], 0, 31);
out[8] = __gen_uint(self.inline_data[5], 0, 31);
out[9] = __gen_uint(self.inline_data[6], 0, 31);
out[10] = __gen_uint(self.inline_data[7], 0, 31);
out[11] = 0;
out[12] = __gen_uint(self.vdenc_mode_inline_data[0], 0, 31);
out[13] = __gen_uint(self.vdenc_mode_inline_data[1], 0, 31);
out[14] = __gen_uint(self.vdenc_mode_inline_data[2], 0, 31);
out[15] = __gen_uint(self.vdenc_mode_inline_data[3], 0, 31);
out[16] = __gen_uint(self.vdenc_mode_inline_data[4], 0, 31);
out[17] = __gen_uint(self.vdenc_mode_inline_data[5], 0, 31);
out[18] = __gen_uint(self.vdenc_mode_inline_data[6], 0, 31);
out[19] = __gen_uint(self.vdenc_mode_inline_data[7], 0, 31);
out[20] = __gen_uint(self.vdenc_mode_inline_data[8], 0, 31);
out[21] = __gen_uint(self.vdenc_mode_inline_data[9], 0, 31);
out[22] = __gen_uint(self.vdenc_mode_inline_data[10], 0, 31);
out[23] = __gen_uint(self.vdenc_mode_inline_data[11], 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 24];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 24] as *const [u8; 96]) })
}
}
impl From<&[u32; 24]> for MfcAvcPakObject {
fn from(input: &[u32; 24]) -> Self {
MfcAvcPakObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_pak_mv_data_length: __gen_unuint(input[1], 0, 9),
indirect_pak_mv_data_start_address_offset: (__gen_unuint(input[2], 0, 28) as u64),
inline_data: [
__gen_unuint(input[3], 0, 31),
__gen_unuint(input[4], 0, 31),
__gen_unuint(input[5], 0, 31),
__gen_unuint(input[6], 0, 31),
__gen_unuint(input[7], 0, 31),
__gen_unuint(input[8], 0, 31),
__gen_unuint(input[9], 0, 31),
__gen_unuint(input[10], 0, 31)
],
vdenc_mode_inline_data: [
__gen_unuint(input[12], 0, 31),
__gen_unuint(input[13], 0, 31),
__gen_unuint(input[14], 0, 31),
__gen_unuint(input[15], 0, 31),
__gen_unuint(input[16], 0, 31),
__gen_unuint(input[17], 0, 31),
__gen_unuint(input[18], 0, 31),
__gen_unuint(input[19], 0, 31),
__gen_unuint(input[20], 0, 31),
__gen_unuint(input[21], 0, 31),
__gen_unuint(input[22], 0, 31),
__gen_unuint(input[23], 0, 31)
],
}
}
}
impl Deserialize for MfcAvcPakObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 24];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 24] as *mut [u8; 96]) })?;
Ok((&input).into())
}
}
pub struct MfcJpegHuffTableState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub huff_table_id: u32,
pub dc_table: [u8; 48],
pub ac_table: [u8; 648],
}
impl MfcJpegHuffTableState {
pub const DWORD_LENGTH: u32 = 176;
}
impl Default for MfcJpegHuffTableState {
fn default() -> Self {
MfcJpegHuffTableState {
dword_length: 174,
subopcode_b: 3,
subopcode_a: 2,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
huff_table_id: Default::default(),
dc_table: [0; 48],
ac_table: [0; 648],
}
}
}
impl Serialize for MfcJpegHuffTableState {
type Out = [u32; 176];
fn pack_into(&self, out: &mut [u32; 176]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.huff_table_id, 0, 0);
out[2] = __gen_uint(self.dc_table[0].into(), 0, 7) |
__gen_uint(self.dc_table[1].into(), 8, 15) |
__gen_uint(self.dc_table[2].into(), 16, 23) |
__gen_uint(self.dc_table[3].into(), 24, 31);
out[3] = __gen_uint(self.dc_table[4].into(), 0, 7) |
__gen_uint(self.dc_table[5].into(), 8, 15) |
__gen_uint(self.dc_table[6].into(), 16, 23) |
__gen_uint(self.dc_table[7].into(), 24, 31);
out[4] = __gen_uint(self.dc_table[8].into(), 0, 7) |
__gen_uint(self.dc_table[9].into(), 8, 15) |
__gen_uint(self.dc_table[10].into(), 16, 23) |
__gen_uint(self.dc_table[11].into(), 24, 31);
out[5] = __gen_uint(self.dc_table[12].into(), 0, 7) |
__gen_uint(self.dc_table[13].into(), 8, 15) |
__gen_uint(self.dc_table[14].into(), 16, 23) |
__gen_uint(self.dc_table[15].into(), 24, 31);
out[6] = __gen_uint(self.dc_table[16].into(), 0, 7) |
__gen_uint(self.dc_table[17].into(), 8, 15) |
__gen_uint(self.dc_table[18].into(), 16, 23) |
__gen_uint(self.dc_table[19].into(), 24, 31);
out[7] = __gen_uint(self.dc_table[20].into(), 0, 7) |
__gen_uint(self.dc_table[21].into(), 8, 15) |
__gen_uint(self.dc_table[22].into(), 16, 23) |
__gen_uint(self.dc_table[23].into(), 24, 31);
out[8] = __gen_uint(self.dc_table[24].into(), 0, 7) |
__gen_uint(self.dc_table[25].into(), 8, 15) |
__gen_uint(self.dc_table[26].into(), 16, 23) |
__gen_uint(self.dc_table[27].into(), 24, 31);
out[9] = __gen_uint(self.dc_table[28].into(), 0, 7) |
__gen_uint(self.dc_table[29].into(), 8, 15) |
__gen_uint(self.dc_table[30].into(), 16, 23) |
__gen_uint(self.dc_table[31].into(), 24, 31);
out[10] = __gen_uint(self.dc_table[32].into(), 0, 7) |
__gen_uint(self.dc_table[33].into(), 8, 15) |
__gen_uint(self.dc_table[34].into(), 16, 23) |
__gen_uint(self.dc_table[35].into(), 24, 31);
out[11] = __gen_uint(self.dc_table[36].into(), 0, 7) |
__gen_uint(self.dc_table[37].into(), 8, 15) |
__gen_uint(self.dc_table[38].into(), 16, 23) |
__gen_uint(self.dc_table[39].into(), 24, 31);
out[12] = __gen_uint(self.dc_table[40].into(), 0, 7) |
__gen_uint(self.dc_table[41].into(), 8, 15) |
__gen_uint(self.dc_table[42].into(), 16, 23) |
__gen_uint(self.dc_table[43].into(), 24, 31);
out[13] = __gen_uint(self.dc_table[44].into(), 0, 7) |
__gen_uint(self.dc_table[45].into(), 8, 15) |
__gen_uint(self.dc_table[46].into(), 16, 23) |
__gen_uint(self.dc_table[47].into(), 24, 31);
out[14] = __gen_uint(self.ac_table[0].into(), 0, 7) |
__gen_uint(self.ac_table[1].into(), 8, 15) |
__gen_uint(self.ac_table[2].into(), 16, 23) |
__gen_uint(self.ac_table[3].into(), 24, 31);
out[15] = __gen_uint(self.ac_table[4].into(), 0, 7) |
__gen_uint(self.ac_table[5].into(), 8, 15) |
__gen_uint(self.ac_table[6].into(), 16, 23) |
__gen_uint(self.ac_table[7].into(), 24, 31);
out[16] = __gen_uint(self.ac_table[8].into(), 0, 7) |
__gen_uint(self.ac_table[9].into(), 8, 15) |
__gen_uint(self.ac_table[10].into(), 16, 23) |
__gen_uint(self.ac_table[11].into(), 24, 31);
out[17] = __gen_uint(self.ac_table[12].into(), 0, 7) |
__gen_uint(self.ac_table[13].into(), 8, 15) |
__gen_uint(self.ac_table[14].into(), 16, 23) |
__gen_uint(self.ac_table[15].into(), 24, 31);
out[18] = __gen_uint(self.ac_table[16].into(), 0, 7) |
__gen_uint(self.ac_table[17].into(), 8, 15) |
__gen_uint(self.ac_table[18].into(), 16, 23) |
__gen_uint(self.ac_table[19].into(), 24, 31);
out[19] = __gen_uint(self.ac_table[20].into(), 0, 7) |
__gen_uint(self.ac_table[21].into(), 8, 15) |
__gen_uint(self.ac_table[22].into(), 16, 23) |
__gen_uint(self.ac_table[23].into(), 24, 31);
out[20] = __gen_uint(self.ac_table[24].into(), 0, 7) |
__gen_uint(self.ac_table[25].into(), 8, 15) |
__gen_uint(self.ac_table[26].into(), 16, 23) |
__gen_uint(self.ac_table[27].into(), 24, 31);
out[21] = __gen_uint(self.ac_table[28].into(), 0, 7) |
__gen_uint(self.ac_table[29].into(), 8, 15) |
__gen_uint(self.ac_table[30].into(), 16, 23) |
__gen_uint(self.ac_table[31].into(), 24, 31);
out[22] = __gen_uint(self.ac_table[32].into(), 0, 7) |
__gen_uint(self.ac_table[33].into(), 8, 15) |
__gen_uint(self.ac_table[34].into(), 16, 23) |
__gen_uint(self.ac_table[35].into(), 24, 31);
out[23] = __gen_uint(self.ac_table[36].into(), 0, 7) |
__gen_uint(self.ac_table[37].into(), 8, 15) |
__gen_uint(self.ac_table[38].into(), 16, 23) |
__gen_uint(self.ac_table[39].into(), 24, 31);
out[24] = __gen_uint(self.ac_table[40].into(), 0, 7) |
__gen_uint(self.ac_table[41].into(), 8, 15) |
__gen_uint(self.ac_table[42].into(), 16, 23) |
__gen_uint(self.ac_table[43].into(), 24, 31);
out[25] = __gen_uint(self.ac_table[44].into(), 0, 7) |
__gen_uint(self.ac_table[45].into(), 8, 15) |
__gen_uint(self.ac_table[46].into(), 16, 23) |
__gen_uint(self.ac_table[47].into(), 24, 31);
out[26] = __gen_uint(self.ac_table[48].into(), 0, 7) |
__gen_uint(self.ac_table[49].into(), 8, 15) |
__gen_uint(self.ac_table[50].into(), 16, 23) |
__gen_uint(self.ac_table[51].into(), 24, 31);
out[27] = __gen_uint(self.ac_table[52].into(), 0, 7) |
__gen_uint(self.ac_table[53].into(), 8, 15) |
__gen_uint(self.ac_table[54].into(), 16, 23) |
__gen_uint(self.ac_table[55].into(), 24, 31);
out[28] = __gen_uint(self.ac_table[56].into(), 0, 7) |
__gen_uint(self.ac_table[57].into(), 8, 15) |
__gen_uint(self.ac_table[58].into(), 16, 23) |
__gen_uint(self.ac_table[59].into(), 24, 31);
out[29] = __gen_uint(self.ac_table[60].into(), 0, 7) |
__gen_uint(self.ac_table[61].into(), 8, 15) |
__gen_uint(self.ac_table[62].into(), 16, 23) |
__gen_uint(self.ac_table[63].into(), 24, 31);
out[30] = __gen_uint(self.ac_table[64].into(), 0, 7) |
__gen_uint(self.ac_table[65].into(), 8, 15) |
__gen_uint(self.ac_table[66].into(), 16, 23) |
__gen_uint(self.ac_table[67].into(), 24, 31);
out[31] = __gen_uint(self.ac_table[68].into(), 0, 7) |
__gen_uint(self.ac_table[69].into(), 8, 15) |
__gen_uint(self.ac_table[70].into(), 16, 23) |
__gen_uint(self.ac_table[71].into(), 24, 31);
out[32] = __gen_uint(self.ac_table[72].into(), 0, 7) |
__gen_uint(self.ac_table[73].into(), 8, 15) |
__gen_uint(self.ac_table[74].into(), 16, 23) |
__gen_uint(self.ac_table[75].into(), 24, 31);
out[33] = __gen_uint(self.ac_table[76].into(), 0, 7) |
__gen_uint(self.ac_table[77].into(), 8, 15) |
__gen_uint(self.ac_table[78].into(), 16, 23) |
__gen_uint(self.ac_table[79].into(), 24, 31);
out[34] = __gen_uint(self.ac_table[80].into(), 0, 7) |
__gen_uint(self.ac_table[81].into(), 8, 15) |
__gen_uint(self.ac_table[82].into(), 16, 23) |
__gen_uint(self.ac_table[83].into(), 24, 31);
out[35] = __gen_uint(self.ac_table[84].into(), 0, 7) |
__gen_uint(self.ac_table[85].into(), 8, 15) |
__gen_uint(self.ac_table[86].into(), 16, 23) |
__gen_uint(self.ac_table[87].into(), 24, 31);
out[36] = __gen_uint(self.ac_table[88].into(), 0, 7) |
__gen_uint(self.ac_table[89].into(), 8, 15) |
__gen_uint(self.ac_table[90].into(), 16, 23) |
__gen_uint(self.ac_table[91].into(), 24, 31);
out[37] = __gen_uint(self.ac_table[92].into(), 0, 7) |
__gen_uint(self.ac_table[93].into(), 8, 15) |
__gen_uint(self.ac_table[94].into(), 16, 23) |
__gen_uint(self.ac_table[95].into(), 24, 31);
out[38] = __gen_uint(self.ac_table[96].into(), 0, 7) |
__gen_uint(self.ac_table[97].into(), 8, 15) |
__gen_uint(self.ac_table[98].into(), 16, 23) |
__gen_uint(self.ac_table[99].into(), 24, 31);
out[39] = __gen_uint(self.ac_table[100].into(), 0, 7) |
__gen_uint(self.ac_table[101].into(), 8, 15) |
__gen_uint(self.ac_table[102].into(), 16, 23) |
__gen_uint(self.ac_table[103].into(), 24, 31);
out[40] = __gen_uint(self.ac_table[104].into(), 0, 7) |
__gen_uint(self.ac_table[105].into(), 8, 15) |
__gen_uint(self.ac_table[106].into(), 16, 23) |
__gen_uint(self.ac_table[107].into(), 24, 31);
out[41] = __gen_uint(self.ac_table[108].into(), 0, 7) |
__gen_uint(self.ac_table[109].into(), 8, 15) |
__gen_uint(self.ac_table[110].into(), 16, 23) |
__gen_uint(self.ac_table[111].into(), 24, 31);
out[42] = __gen_uint(self.ac_table[112].into(), 0, 7) |
__gen_uint(self.ac_table[113].into(), 8, 15) |
__gen_uint(self.ac_table[114].into(), 16, 23) |
__gen_uint(self.ac_table[115].into(), 24, 31);
out[43] = __gen_uint(self.ac_table[116].into(), 0, 7) |
__gen_uint(self.ac_table[117].into(), 8, 15) |
__gen_uint(self.ac_table[118].into(), 16, 23) |
__gen_uint(self.ac_table[119].into(), 24, 31);
out[44] = __gen_uint(self.ac_table[120].into(), 0, 7) |
__gen_uint(self.ac_table[121].into(), 8, 15) |
__gen_uint(self.ac_table[122].into(), 16, 23) |
__gen_uint(self.ac_table[123].into(), 24, 31);
out[45] = __gen_uint(self.ac_table[124].into(), 0, 7) |
__gen_uint(self.ac_table[125].into(), 8, 15) |
__gen_uint(self.ac_table[126].into(), 16, 23) |
__gen_uint(self.ac_table[127].into(), 24, 31);
out[46] = __gen_uint(self.ac_table[128].into(), 0, 7) |
__gen_uint(self.ac_table[129].into(), 8, 15) |
__gen_uint(self.ac_table[130].into(), 16, 23) |
__gen_uint(self.ac_table[131].into(), 24, 31);
out[47] = __gen_uint(self.ac_table[132].into(), 0, 7) |
__gen_uint(self.ac_table[133].into(), 8, 15) |
__gen_uint(self.ac_table[134].into(), 16, 23) |
__gen_uint(self.ac_table[135].into(), 24, 31);
out[48] = __gen_uint(self.ac_table[136].into(), 0, 7) |
__gen_uint(self.ac_table[137].into(), 8, 15) |
__gen_uint(self.ac_table[138].into(), 16, 23) |
__gen_uint(self.ac_table[139].into(), 24, 31);
out[49] = __gen_uint(self.ac_table[140].into(), 0, 7) |
__gen_uint(self.ac_table[141].into(), 8, 15) |
__gen_uint(self.ac_table[142].into(), 16, 23) |
__gen_uint(self.ac_table[143].into(), 24, 31);
out[50] = __gen_uint(self.ac_table[144].into(), 0, 7) |
__gen_uint(self.ac_table[145].into(), 8, 15) |
__gen_uint(self.ac_table[146].into(), 16, 23) |
__gen_uint(self.ac_table[147].into(), 24, 31);
out[51] = __gen_uint(self.ac_table[148].into(), 0, 7) |
__gen_uint(self.ac_table[149].into(), 8, 15) |
__gen_uint(self.ac_table[150].into(), 16, 23) |
__gen_uint(self.ac_table[151].into(), 24, 31);
out[52] = __gen_uint(self.ac_table[152].into(), 0, 7) |
__gen_uint(self.ac_table[153].into(), 8, 15) |
__gen_uint(self.ac_table[154].into(), 16, 23) |
__gen_uint(self.ac_table[155].into(), 24, 31);
out[53] = __gen_uint(self.ac_table[156].into(), 0, 7) |
__gen_uint(self.ac_table[157].into(), 8, 15) |
__gen_uint(self.ac_table[158].into(), 16, 23) |
__gen_uint(self.ac_table[159].into(), 24, 31);
out[54] = __gen_uint(self.ac_table[160].into(), 0, 7) |
__gen_uint(self.ac_table[161].into(), 8, 15) |
__gen_uint(self.ac_table[162].into(), 16, 23) |
__gen_uint(self.ac_table[163].into(), 24, 31);
out[55] = __gen_uint(self.ac_table[164].into(), 0, 7) |
__gen_uint(self.ac_table[165].into(), 8, 15) |
__gen_uint(self.ac_table[166].into(), 16, 23) |
__gen_uint(self.ac_table[167].into(), 24, 31);
out[56] = __gen_uint(self.ac_table[168].into(), 0, 7) |
__gen_uint(self.ac_table[169].into(), 8, 15) |
__gen_uint(self.ac_table[170].into(), 16, 23) |
__gen_uint(self.ac_table[171].into(), 24, 31);
out[57] = __gen_uint(self.ac_table[172].into(), 0, 7) |
__gen_uint(self.ac_table[173].into(), 8, 15) |
__gen_uint(self.ac_table[174].into(), 16, 23) |
__gen_uint(self.ac_table[175].into(), 24, 31);
out[58] = __gen_uint(self.ac_table[176].into(), 0, 7) |
__gen_uint(self.ac_table[177].into(), 8, 15) |
__gen_uint(self.ac_table[178].into(), 16, 23) |
__gen_uint(self.ac_table[179].into(), 24, 31);
out[59] = __gen_uint(self.ac_table[180].into(), 0, 7) |
__gen_uint(self.ac_table[181].into(), 8, 15) |
__gen_uint(self.ac_table[182].into(), 16, 23) |
__gen_uint(self.ac_table[183].into(), 24, 31);
out[60] = __gen_uint(self.ac_table[184].into(), 0, 7) |
__gen_uint(self.ac_table[185].into(), 8, 15) |
__gen_uint(self.ac_table[186].into(), 16, 23) |
__gen_uint(self.ac_table[187].into(), 24, 31);
out[61] = __gen_uint(self.ac_table[188].into(), 0, 7) |
__gen_uint(self.ac_table[189].into(), 8, 15) |
__gen_uint(self.ac_table[190].into(), 16, 23) |
__gen_uint(self.ac_table[191].into(), 24, 31);
out[62] = __gen_uint(self.ac_table[192].into(), 0, 7) |
__gen_uint(self.ac_table[193].into(), 8, 15) |
__gen_uint(self.ac_table[194].into(), 16, 23) |
__gen_uint(self.ac_table[195].into(), 24, 31);
out[63] = __gen_uint(self.ac_table[196].into(), 0, 7) |
__gen_uint(self.ac_table[197].into(), 8, 15) |
__gen_uint(self.ac_table[198].into(), 16, 23) |
__gen_uint(self.ac_table[199].into(), 24, 31);
out[64] = __gen_uint(self.ac_table[200].into(), 0, 7) |
__gen_uint(self.ac_table[201].into(), 8, 15) |
__gen_uint(self.ac_table[202].into(), 16, 23) |
__gen_uint(self.ac_table[203].into(), 24, 31);
out[65] = __gen_uint(self.ac_table[204].into(), 0, 7) |
__gen_uint(self.ac_table[205].into(), 8, 15) |
__gen_uint(self.ac_table[206].into(), 16, 23) |
__gen_uint(self.ac_table[207].into(), 24, 31);
out[66] = __gen_uint(self.ac_table[208].into(), 0, 7) |
__gen_uint(self.ac_table[209].into(), 8, 15) |
__gen_uint(self.ac_table[210].into(), 16, 23) |
__gen_uint(self.ac_table[211].into(), 24, 31);
out[67] = __gen_uint(self.ac_table[212].into(), 0, 7) |
__gen_uint(self.ac_table[213].into(), 8, 15) |
__gen_uint(self.ac_table[214].into(), 16, 23) |
__gen_uint(self.ac_table[215].into(), 24, 31);
out[68] = __gen_uint(self.ac_table[216].into(), 0, 7) |
__gen_uint(self.ac_table[217].into(), 8, 15) |
__gen_uint(self.ac_table[218].into(), 16, 23) |
__gen_uint(self.ac_table[219].into(), 24, 31);
out[69] = __gen_uint(self.ac_table[220].into(), 0, 7) |
__gen_uint(self.ac_table[221].into(), 8, 15) |
__gen_uint(self.ac_table[222].into(), 16, 23) |
__gen_uint(self.ac_table[223].into(), 24, 31);
out[70] = __gen_uint(self.ac_table[224].into(), 0, 7) |
__gen_uint(self.ac_table[225].into(), 8, 15) |
__gen_uint(self.ac_table[226].into(), 16, 23) |
__gen_uint(self.ac_table[227].into(), 24, 31);
out[71] = __gen_uint(self.ac_table[228].into(), 0, 7) |
__gen_uint(self.ac_table[229].into(), 8, 15) |
__gen_uint(self.ac_table[230].into(), 16, 23) |
__gen_uint(self.ac_table[231].into(), 24, 31);
out[72] = __gen_uint(self.ac_table[232].into(), 0, 7) |
__gen_uint(self.ac_table[233].into(), 8, 15) |
__gen_uint(self.ac_table[234].into(), 16, 23) |
__gen_uint(self.ac_table[235].into(), 24, 31);
out[73] = __gen_uint(self.ac_table[236].into(), 0, 7) |
__gen_uint(self.ac_table[237].into(), 8, 15) |
__gen_uint(self.ac_table[238].into(), 16, 23) |
__gen_uint(self.ac_table[239].into(), 24, 31);
out[74] = __gen_uint(self.ac_table[240].into(), 0, 7) |
__gen_uint(self.ac_table[241].into(), 8, 15) |
__gen_uint(self.ac_table[242].into(), 16, 23) |
__gen_uint(self.ac_table[243].into(), 24, 31);
out[75] = __gen_uint(self.ac_table[244].into(), 0, 7) |
__gen_uint(self.ac_table[245].into(), 8, 15) |
__gen_uint(self.ac_table[246].into(), 16, 23) |
__gen_uint(self.ac_table[247].into(), 24, 31);
out[76] = __gen_uint(self.ac_table[248].into(), 0, 7) |
__gen_uint(self.ac_table[249].into(), 8, 15) |
__gen_uint(self.ac_table[250].into(), 16, 23) |
__gen_uint(self.ac_table[251].into(), 24, 31);
out[77] = __gen_uint(self.ac_table[252].into(), 0, 7) |
__gen_uint(self.ac_table[253].into(), 8, 15) |
__gen_uint(self.ac_table[254].into(), 16, 23) |
__gen_uint(self.ac_table[255].into(), 24, 31);
out[78] = __gen_uint(self.ac_table[256].into(), 0, 7) |
__gen_uint(self.ac_table[257].into(), 8, 15) |
__gen_uint(self.ac_table[258].into(), 16, 23) |
__gen_uint(self.ac_table[259].into(), 24, 31);
out[79] = __gen_uint(self.ac_table[260].into(), 0, 7) |
__gen_uint(self.ac_table[261].into(), 8, 15) |
__gen_uint(self.ac_table[262].into(), 16, 23) |
__gen_uint(self.ac_table[263].into(), 24, 31);
out[80] = __gen_uint(self.ac_table[264].into(), 0, 7) |
__gen_uint(self.ac_table[265].into(), 8, 15) |
__gen_uint(self.ac_table[266].into(), 16, 23) |
__gen_uint(self.ac_table[267].into(), 24, 31);
out[81] = __gen_uint(self.ac_table[268].into(), 0, 7) |
__gen_uint(self.ac_table[269].into(), 8, 15) |
__gen_uint(self.ac_table[270].into(), 16, 23) |
__gen_uint(self.ac_table[271].into(), 24, 31);
out[82] = __gen_uint(self.ac_table[272].into(), 0, 7) |
__gen_uint(self.ac_table[273].into(), 8, 15) |
__gen_uint(self.ac_table[274].into(), 16, 23) |
__gen_uint(self.ac_table[275].into(), 24, 31);
out[83] = __gen_uint(self.ac_table[276].into(), 0, 7) |
__gen_uint(self.ac_table[277].into(), 8, 15) |
__gen_uint(self.ac_table[278].into(), 16, 23) |
__gen_uint(self.ac_table[279].into(), 24, 31);
out[84] = __gen_uint(self.ac_table[280].into(), 0, 7) |
__gen_uint(self.ac_table[281].into(), 8, 15) |
__gen_uint(self.ac_table[282].into(), 16, 23) |
__gen_uint(self.ac_table[283].into(), 24, 31);
out[85] = __gen_uint(self.ac_table[284].into(), 0, 7) |
__gen_uint(self.ac_table[285].into(), 8, 15) |
__gen_uint(self.ac_table[286].into(), 16, 23) |
__gen_uint(self.ac_table[287].into(), 24, 31);
out[86] = __gen_uint(self.ac_table[288].into(), 0, 7) |
__gen_uint(self.ac_table[289].into(), 8, 15) |
__gen_uint(self.ac_table[290].into(), 16, 23) |
__gen_uint(self.ac_table[291].into(), 24, 31);
out[87] = __gen_uint(self.ac_table[292].into(), 0, 7) |
__gen_uint(self.ac_table[293].into(), 8, 15) |
__gen_uint(self.ac_table[294].into(), 16, 23) |
__gen_uint(self.ac_table[295].into(), 24, 31);
out[88] = __gen_uint(self.ac_table[296].into(), 0, 7) |
__gen_uint(self.ac_table[297].into(), 8, 15) |
__gen_uint(self.ac_table[298].into(), 16, 23) |
__gen_uint(self.ac_table[299].into(), 24, 31);
out[89] = __gen_uint(self.ac_table[300].into(), 0, 7) |
__gen_uint(self.ac_table[301].into(), 8, 15) |
__gen_uint(self.ac_table[302].into(), 16, 23) |
__gen_uint(self.ac_table[303].into(), 24, 31);
out[90] = __gen_uint(self.ac_table[304].into(), 0, 7) |
__gen_uint(self.ac_table[305].into(), 8, 15) |
__gen_uint(self.ac_table[306].into(), 16, 23) |
__gen_uint(self.ac_table[307].into(), 24, 31);
out[91] = __gen_uint(self.ac_table[308].into(), 0, 7) |
__gen_uint(self.ac_table[309].into(), 8, 15) |
__gen_uint(self.ac_table[310].into(), 16, 23) |
__gen_uint(self.ac_table[311].into(), 24, 31);
out[92] = __gen_uint(self.ac_table[312].into(), 0, 7) |
__gen_uint(self.ac_table[313].into(), 8, 15) |
__gen_uint(self.ac_table[314].into(), 16, 23) |
__gen_uint(self.ac_table[315].into(), 24, 31);
out[93] = __gen_uint(self.ac_table[316].into(), 0, 7) |
__gen_uint(self.ac_table[317].into(), 8, 15) |
__gen_uint(self.ac_table[318].into(), 16, 23) |
__gen_uint(self.ac_table[319].into(), 24, 31);
out[94] = __gen_uint(self.ac_table[320].into(), 0, 7) |
__gen_uint(self.ac_table[321].into(), 8, 15) |
__gen_uint(self.ac_table[322].into(), 16, 23) |
__gen_uint(self.ac_table[323].into(), 24, 31);
out[95] = __gen_uint(self.ac_table[324].into(), 0, 7) |
__gen_uint(self.ac_table[325].into(), 8, 15) |
__gen_uint(self.ac_table[326].into(), 16, 23) |
__gen_uint(self.ac_table[327].into(), 24, 31);
out[96] = __gen_uint(self.ac_table[328].into(), 0, 7) |
__gen_uint(self.ac_table[329].into(), 8, 15) |
__gen_uint(self.ac_table[330].into(), 16, 23) |
__gen_uint(self.ac_table[331].into(), 24, 31);
out[97] = __gen_uint(self.ac_table[332].into(), 0, 7) |
__gen_uint(self.ac_table[333].into(), 8, 15) |
__gen_uint(self.ac_table[334].into(), 16, 23) |
__gen_uint(self.ac_table[335].into(), 24, 31);
out[98] = __gen_uint(self.ac_table[336].into(), 0, 7) |
__gen_uint(self.ac_table[337].into(), 8, 15) |
__gen_uint(self.ac_table[338].into(), 16, 23) |
__gen_uint(self.ac_table[339].into(), 24, 31);
out[99] = __gen_uint(self.ac_table[340].into(), 0, 7) |
__gen_uint(self.ac_table[341].into(), 8, 15) |
__gen_uint(self.ac_table[342].into(), 16, 23) |
__gen_uint(self.ac_table[343].into(), 24, 31);
out[100] = __gen_uint(self.ac_table[344].into(), 0, 7) |
__gen_uint(self.ac_table[345].into(), 8, 15) |
__gen_uint(self.ac_table[346].into(), 16, 23) |
__gen_uint(self.ac_table[347].into(), 24, 31);
out[101] = __gen_uint(self.ac_table[348].into(), 0, 7) |
__gen_uint(self.ac_table[349].into(), 8, 15) |
__gen_uint(self.ac_table[350].into(), 16, 23) |
__gen_uint(self.ac_table[351].into(), 24, 31);
out[102] = __gen_uint(self.ac_table[352].into(), 0, 7) |
__gen_uint(self.ac_table[353].into(), 8, 15) |
__gen_uint(self.ac_table[354].into(), 16, 23) |
__gen_uint(self.ac_table[355].into(), 24, 31);
out[103] = __gen_uint(self.ac_table[356].into(), 0, 7) |
__gen_uint(self.ac_table[357].into(), 8, 15) |
__gen_uint(self.ac_table[358].into(), 16, 23) |
__gen_uint(self.ac_table[359].into(), 24, 31);
out[104] = __gen_uint(self.ac_table[360].into(), 0, 7) |
__gen_uint(self.ac_table[361].into(), 8, 15) |
__gen_uint(self.ac_table[362].into(), 16, 23) |
__gen_uint(self.ac_table[363].into(), 24, 31);
out[105] = __gen_uint(self.ac_table[364].into(), 0, 7) |
__gen_uint(self.ac_table[365].into(), 8, 15) |
__gen_uint(self.ac_table[366].into(), 16, 23) |
__gen_uint(self.ac_table[367].into(), 24, 31);
out[106] = __gen_uint(self.ac_table[368].into(), 0, 7) |
__gen_uint(self.ac_table[369].into(), 8, 15) |
__gen_uint(self.ac_table[370].into(), 16, 23) |
__gen_uint(self.ac_table[371].into(), 24, 31);
out[107] = __gen_uint(self.ac_table[372].into(), 0, 7) |
__gen_uint(self.ac_table[373].into(), 8, 15) |
__gen_uint(self.ac_table[374].into(), 16, 23) |
__gen_uint(self.ac_table[375].into(), 24, 31);
out[108] = __gen_uint(self.ac_table[376].into(), 0, 7) |
__gen_uint(self.ac_table[377].into(), 8, 15) |
__gen_uint(self.ac_table[378].into(), 16, 23) |
__gen_uint(self.ac_table[379].into(), 24, 31);
out[109] = __gen_uint(self.ac_table[380].into(), 0, 7) |
__gen_uint(self.ac_table[381].into(), 8, 15) |
__gen_uint(self.ac_table[382].into(), 16, 23) |
__gen_uint(self.ac_table[383].into(), 24, 31);
out[110] = __gen_uint(self.ac_table[384].into(), 0, 7) |
__gen_uint(self.ac_table[385].into(), 8, 15) |
__gen_uint(self.ac_table[386].into(), 16, 23) |
__gen_uint(self.ac_table[387].into(), 24, 31);
out[111] = __gen_uint(self.ac_table[388].into(), 0, 7) |
__gen_uint(self.ac_table[389].into(), 8, 15) |
__gen_uint(self.ac_table[390].into(), 16, 23) |
__gen_uint(self.ac_table[391].into(), 24, 31);
out[112] = __gen_uint(self.ac_table[392].into(), 0, 7) |
__gen_uint(self.ac_table[393].into(), 8, 15) |
__gen_uint(self.ac_table[394].into(), 16, 23) |
__gen_uint(self.ac_table[395].into(), 24, 31);
out[113] = __gen_uint(self.ac_table[396].into(), 0, 7) |
__gen_uint(self.ac_table[397].into(), 8, 15) |
__gen_uint(self.ac_table[398].into(), 16, 23) |
__gen_uint(self.ac_table[399].into(), 24, 31);
out[114] = __gen_uint(self.ac_table[400].into(), 0, 7) |
__gen_uint(self.ac_table[401].into(), 8, 15) |
__gen_uint(self.ac_table[402].into(), 16, 23) |
__gen_uint(self.ac_table[403].into(), 24, 31);
out[115] = __gen_uint(self.ac_table[404].into(), 0, 7) |
__gen_uint(self.ac_table[405].into(), 8, 15) |
__gen_uint(self.ac_table[406].into(), 16, 23) |
__gen_uint(self.ac_table[407].into(), 24, 31);
out[116] = __gen_uint(self.ac_table[408].into(), 0, 7) |
__gen_uint(self.ac_table[409].into(), 8, 15) |
__gen_uint(self.ac_table[410].into(), 16, 23) |
__gen_uint(self.ac_table[411].into(), 24, 31);
out[117] = __gen_uint(self.ac_table[412].into(), 0, 7) |
__gen_uint(self.ac_table[413].into(), 8, 15) |
__gen_uint(self.ac_table[414].into(), 16, 23) |
__gen_uint(self.ac_table[415].into(), 24, 31);
out[118] = __gen_uint(self.ac_table[416].into(), 0, 7) |
__gen_uint(self.ac_table[417].into(), 8, 15) |
__gen_uint(self.ac_table[418].into(), 16, 23) |
__gen_uint(self.ac_table[419].into(), 24, 31);
out[119] = __gen_uint(self.ac_table[420].into(), 0, 7) |
__gen_uint(self.ac_table[421].into(), 8, 15) |
__gen_uint(self.ac_table[422].into(), 16, 23) |
__gen_uint(self.ac_table[423].into(), 24, 31);
out[120] = __gen_uint(self.ac_table[424].into(), 0, 7) |
__gen_uint(self.ac_table[425].into(), 8, 15) |
__gen_uint(self.ac_table[426].into(), 16, 23) |
__gen_uint(self.ac_table[427].into(), 24, 31);
out[121] = __gen_uint(self.ac_table[428].into(), 0, 7) |
__gen_uint(self.ac_table[429].into(), 8, 15) |
__gen_uint(self.ac_table[430].into(), 16, 23) |
__gen_uint(self.ac_table[431].into(), 24, 31);
out[122] = __gen_uint(self.ac_table[432].into(), 0, 7) |
__gen_uint(self.ac_table[433].into(), 8, 15) |
__gen_uint(self.ac_table[434].into(), 16, 23) |
__gen_uint(self.ac_table[435].into(), 24, 31);
out[123] = __gen_uint(self.ac_table[436].into(), 0, 7) |
__gen_uint(self.ac_table[437].into(), 8, 15) |
__gen_uint(self.ac_table[438].into(), 16, 23) |
__gen_uint(self.ac_table[439].into(), 24, 31);
out[124] = __gen_uint(self.ac_table[440].into(), 0, 7) |
__gen_uint(self.ac_table[441].into(), 8, 15) |
__gen_uint(self.ac_table[442].into(), 16, 23) |
__gen_uint(self.ac_table[443].into(), 24, 31);
out[125] = __gen_uint(self.ac_table[444].into(), 0, 7) |
__gen_uint(self.ac_table[445].into(), 8, 15) |
__gen_uint(self.ac_table[446].into(), 16, 23) |
__gen_uint(self.ac_table[447].into(), 24, 31);
out[126] = __gen_uint(self.ac_table[448].into(), 0, 7) |
__gen_uint(self.ac_table[449].into(), 8, 15) |
__gen_uint(self.ac_table[450].into(), 16, 23) |
__gen_uint(self.ac_table[451].into(), 24, 31);
out[127] = __gen_uint(self.ac_table[452].into(), 0, 7) |
__gen_uint(self.ac_table[453].into(), 8, 15) |
__gen_uint(self.ac_table[454].into(), 16, 23) |
__gen_uint(self.ac_table[455].into(), 24, 31);
out[128] = __gen_uint(self.ac_table[456].into(), 0, 7) |
__gen_uint(self.ac_table[457].into(), 8, 15) |
__gen_uint(self.ac_table[458].into(), 16, 23) |
__gen_uint(self.ac_table[459].into(), 24, 31);
out[129] = __gen_uint(self.ac_table[460].into(), 0, 7) |
__gen_uint(self.ac_table[461].into(), 8, 15) |
__gen_uint(self.ac_table[462].into(), 16, 23) |
__gen_uint(self.ac_table[463].into(), 24, 31);
out[130] = __gen_uint(self.ac_table[464].into(), 0, 7) |
__gen_uint(self.ac_table[465].into(), 8, 15) |
__gen_uint(self.ac_table[466].into(), 16, 23) |
__gen_uint(self.ac_table[467].into(), 24, 31);
out[131] = __gen_uint(self.ac_table[468].into(), 0, 7) |
__gen_uint(self.ac_table[469].into(), 8, 15) |
__gen_uint(self.ac_table[470].into(), 16, 23) |
__gen_uint(self.ac_table[471].into(), 24, 31);
out[132] = __gen_uint(self.ac_table[472].into(), 0, 7) |
__gen_uint(self.ac_table[473].into(), 8, 15) |
__gen_uint(self.ac_table[474].into(), 16, 23) |
__gen_uint(self.ac_table[475].into(), 24, 31);
out[133] = __gen_uint(self.ac_table[476].into(), 0, 7) |
__gen_uint(self.ac_table[477].into(), 8, 15) |
__gen_uint(self.ac_table[478].into(), 16, 23) |
__gen_uint(self.ac_table[479].into(), 24, 31);
out[134] = __gen_uint(self.ac_table[480].into(), 0, 7) |
__gen_uint(self.ac_table[481].into(), 8, 15) |
__gen_uint(self.ac_table[482].into(), 16, 23) |
__gen_uint(self.ac_table[483].into(), 24, 31);
out[135] = __gen_uint(self.ac_table[484].into(), 0, 7) |
__gen_uint(self.ac_table[485].into(), 8, 15) |
__gen_uint(self.ac_table[486].into(), 16, 23) |
__gen_uint(self.ac_table[487].into(), 24, 31);
out[136] = __gen_uint(self.ac_table[488].into(), 0, 7) |
__gen_uint(self.ac_table[489].into(), 8, 15) |
__gen_uint(self.ac_table[490].into(), 16, 23) |
__gen_uint(self.ac_table[491].into(), 24, 31);
out[137] = __gen_uint(self.ac_table[492].into(), 0, 7) |
__gen_uint(self.ac_table[493].into(), 8, 15) |
__gen_uint(self.ac_table[494].into(), 16, 23) |
__gen_uint(self.ac_table[495].into(), 24, 31);
out[138] = __gen_uint(self.ac_table[496].into(), 0, 7) |
__gen_uint(self.ac_table[497].into(), 8, 15) |
__gen_uint(self.ac_table[498].into(), 16, 23) |
__gen_uint(self.ac_table[499].into(), 24, 31);
out[139] = __gen_uint(self.ac_table[500].into(), 0, 7) |
__gen_uint(self.ac_table[501].into(), 8, 15) |
__gen_uint(self.ac_table[502].into(), 16, 23) |
__gen_uint(self.ac_table[503].into(), 24, 31);
out[140] = __gen_uint(self.ac_table[504].into(), 0, 7) |
__gen_uint(self.ac_table[505].into(), 8, 15) |
__gen_uint(self.ac_table[506].into(), 16, 23) |
__gen_uint(self.ac_table[507].into(), 24, 31);
out[141] = __gen_uint(self.ac_table[508].into(), 0, 7) |
__gen_uint(self.ac_table[509].into(), 8, 15) |
__gen_uint(self.ac_table[510].into(), 16, 23) |
__gen_uint(self.ac_table[511].into(), 24, 31);
out[142] = __gen_uint(self.ac_table[512].into(), 0, 7) |
__gen_uint(self.ac_table[513].into(), 8, 15) |
__gen_uint(self.ac_table[514].into(), 16, 23) |
__gen_uint(self.ac_table[515].into(), 24, 31);
out[143] = __gen_uint(self.ac_table[516].into(), 0, 7) |
__gen_uint(self.ac_table[517].into(), 8, 15) |
__gen_uint(self.ac_table[518].into(), 16, 23) |
__gen_uint(self.ac_table[519].into(), 24, 31);
out[144] = __gen_uint(self.ac_table[520].into(), 0, 7) |
__gen_uint(self.ac_table[521].into(), 8, 15) |
__gen_uint(self.ac_table[522].into(), 16, 23) |
__gen_uint(self.ac_table[523].into(), 24, 31);
out[145] = __gen_uint(self.ac_table[524].into(), 0, 7) |
__gen_uint(self.ac_table[525].into(), 8, 15) |
__gen_uint(self.ac_table[526].into(), 16, 23) |
__gen_uint(self.ac_table[527].into(), 24, 31);
out[146] = __gen_uint(self.ac_table[528].into(), 0, 7) |
__gen_uint(self.ac_table[529].into(), 8, 15) |
__gen_uint(self.ac_table[530].into(), 16, 23) |
__gen_uint(self.ac_table[531].into(), 24, 31);
out[147] = __gen_uint(self.ac_table[532].into(), 0, 7) |
__gen_uint(self.ac_table[533].into(), 8, 15) |
__gen_uint(self.ac_table[534].into(), 16, 23) |
__gen_uint(self.ac_table[535].into(), 24, 31);
out[148] = __gen_uint(self.ac_table[536].into(), 0, 7) |
__gen_uint(self.ac_table[537].into(), 8, 15) |
__gen_uint(self.ac_table[538].into(), 16, 23) |
__gen_uint(self.ac_table[539].into(), 24, 31);
out[149] = __gen_uint(self.ac_table[540].into(), 0, 7) |
__gen_uint(self.ac_table[541].into(), 8, 15) |
__gen_uint(self.ac_table[542].into(), 16, 23) |
__gen_uint(self.ac_table[543].into(), 24, 31);
out[150] = __gen_uint(self.ac_table[544].into(), 0, 7) |
__gen_uint(self.ac_table[545].into(), 8, 15) |
__gen_uint(self.ac_table[546].into(), 16, 23) |
__gen_uint(self.ac_table[547].into(), 24, 31);
out[151] = __gen_uint(self.ac_table[548].into(), 0, 7) |
__gen_uint(self.ac_table[549].into(), 8, 15) |
__gen_uint(self.ac_table[550].into(), 16, 23) |
__gen_uint(self.ac_table[551].into(), 24, 31);
out[152] = __gen_uint(self.ac_table[552].into(), 0, 7) |
__gen_uint(self.ac_table[553].into(), 8, 15) |
__gen_uint(self.ac_table[554].into(), 16, 23) |
__gen_uint(self.ac_table[555].into(), 24, 31);
out[153] = __gen_uint(self.ac_table[556].into(), 0, 7) |
__gen_uint(self.ac_table[557].into(), 8, 15) |
__gen_uint(self.ac_table[558].into(), 16, 23) |
__gen_uint(self.ac_table[559].into(), 24, 31);
out[154] = __gen_uint(self.ac_table[560].into(), 0, 7) |
__gen_uint(self.ac_table[561].into(), 8, 15) |
__gen_uint(self.ac_table[562].into(), 16, 23) |
__gen_uint(self.ac_table[563].into(), 24, 31);
out[155] = __gen_uint(self.ac_table[564].into(), 0, 7) |
__gen_uint(self.ac_table[565].into(), 8, 15) |
__gen_uint(self.ac_table[566].into(), 16, 23) |
__gen_uint(self.ac_table[567].into(), 24, 31);
out[156] = __gen_uint(self.ac_table[568].into(), 0, 7) |
__gen_uint(self.ac_table[569].into(), 8, 15) |
__gen_uint(self.ac_table[570].into(), 16, 23) |
__gen_uint(self.ac_table[571].into(), 24, 31);
out[157] = __gen_uint(self.ac_table[572].into(), 0, 7) |
__gen_uint(self.ac_table[573].into(), 8, 15) |
__gen_uint(self.ac_table[574].into(), 16, 23) |
__gen_uint(self.ac_table[575].into(), 24, 31);
out[158] = __gen_uint(self.ac_table[576].into(), 0, 7) |
__gen_uint(self.ac_table[577].into(), 8, 15) |
__gen_uint(self.ac_table[578].into(), 16, 23) |
__gen_uint(self.ac_table[579].into(), 24, 31);
out[159] = __gen_uint(self.ac_table[580].into(), 0, 7) |
__gen_uint(self.ac_table[581].into(), 8, 15) |
__gen_uint(self.ac_table[582].into(), 16, 23) |
__gen_uint(self.ac_table[583].into(), 24, 31);
out[160] = __gen_uint(self.ac_table[584].into(), 0, 7) |
__gen_uint(self.ac_table[585].into(), 8, 15) |
__gen_uint(self.ac_table[586].into(), 16, 23) |
__gen_uint(self.ac_table[587].into(), 24, 31);
out[161] = __gen_uint(self.ac_table[588].into(), 0, 7) |
__gen_uint(self.ac_table[589].into(), 8, 15) |
__gen_uint(self.ac_table[590].into(), 16, 23) |
__gen_uint(self.ac_table[591].into(), 24, 31);
out[162] = __gen_uint(self.ac_table[592].into(), 0, 7) |
__gen_uint(self.ac_table[593].into(), 8, 15) |
__gen_uint(self.ac_table[594].into(), 16, 23) |
__gen_uint(self.ac_table[595].into(), 24, 31);
out[163] = __gen_uint(self.ac_table[596].into(), 0, 7) |
__gen_uint(self.ac_table[597].into(), 8, 15) |
__gen_uint(self.ac_table[598].into(), 16, 23) |
__gen_uint(self.ac_table[599].into(), 24, 31);
out[164] = __gen_uint(self.ac_table[600].into(), 0, 7) |
__gen_uint(self.ac_table[601].into(), 8, 15) |
__gen_uint(self.ac_table[602].into(), 16, 23) |
__gen_uint(self.ac_table[603].into(), 24, 31);
out[165] = __gen_uint(self.ac_table[604].into(), 0, 7) |
__gen_uint(self.ac_table[605].into(), 8, 15) |
__gen_uint(self.ac_table[606].into(), 16, 23) |
__gen_uint(self.ac_table[607].into(), 24, 31);
out[166] = __gen_uint(self.ac_table[608].into(), 0, 7) |
__gen_uint(self.ac_table[609].into(), 8, 15) |
__gen_uint(self.ac_table[610].into(), 16, 23) |
__gen_uint(self.ac_table[611].into(), 24, 31);
out[167] = __gen_uint(self.ac_table[612].into(), 0, 7) |
__gen_uint(self.ac_table[613].into(), 8, 15) |
__gen_uint(self.ac_table[614].into(), 16, 23) |
__gen_uint(self.ac_table[615].into(), 24, 31);
out[168] = __gen_uint(self.ac_table[616].into(), 0, 7) |
__gen_uint(self.ac_table[617].into(), 8, 15) |
__gen_uint(self.ac_table[618].into(), 16, 23) |
__gen_uint(self.ac_table[619].into(), 24, 31);
out[169] = __gen_uint(self.ac_table[620].into(), 0, 7) |
__gen_uint(self.ac_table[621].into(), 8, 15) |
__gen_uint(self.ac_table[622].into(), 16, 23) |
__gen_uint(self.ac_table[623].into(), 24, 31);
out[170] = __gen_uint(self.ac_table[624].into(), 0, 7) |
__gen_uint(self.ac_table[625].into(), 8, 15) |
__gen_uint(self.ac_table[626].into(), 16, 23) |
__gen_uint(self.ac_table[627].into(), 24, 31);
out[171] = __gen_uint(self.ac_table[628].into(), 0, 7) |
__gen_uint(self.ac_table[629].into(), 8, 15) |
__gen_uint(self.ac_table[630].into(), 16, 23) |
__gen_uint(self.ac_table[631].into(), 24, 31);
out[172] = __gen_uint(self.ac_table[632].into(), 0, 7) |
__gen_uint(self.ac_table[633].into(), 8, 15) |
__gen_uint(self.ac_table[634].into(), 16, 23) |
__gen_uint(self.ac_table[635].into(), 24, 31);
out[173] = __gen_uint(self.ac_table[636].into(), 0, 7) |
__gen_uint(self.ac_table[637].into(), 8, 15) |
__gen_uint(self.ac_table[638].into(), 16, 23) |
__gen_uint(self.ac_table[639].into(), 24, 31);
out[174] = __gen_uint(self.ac_table[640].into(), 0, 7) |
__gen_uint(self.ac_table[641].into(), 8, 15) |
__gen_uint(self.ac_table[642].into(), 16, 23) |
__gen_uint(self.ac_table[643].into(), 24, 31);
out[175] = __gen_uint(self.ac_table[644].into(), 0, 7) |
__gen_uint(self.ac_table[645].into(), 8, 15) |
__gen_uint(self.ac_table[646].into(), 16, 23) |
__gen_uint(self.ac_table[647].into(), 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 176];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 176] as *const [u8; 704]) })
}
}
impl From<&[u32; 176]> for MfcJpegHuffTableState {
fn from(input: &[u32; 176]) -> Self {
MfcJpegHuffTableState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
huff_table_id: __gen_unuint(input[1], 0, 0),
dc_table: [
(__gen_unuint(input[2], 0, 7)) as u8,
(__gen_unuint(input[2], 8, 15)) as u8,
(__gen_unuint(input[2], 16, 23)) as u8,
(__gen_unuint(input[2], 24, 31)) as u8,
(__gen_unuint(input[3], 0, 7)) as u8,
(__gen_unuint(input[3], 8, 15)) as u8,
(__gen_unuint(input[3], 16, 23)) as u8,
(__gen_unuint(input[3], 24, 31)) as u8,
(__gen_unuint(input[4], 0, 7)) as u8,
(__gen_unuint(input[4], 8, 15)) as u8,
(__gen_unuint(input[4], 16, 23)) as u8,
(__gen_unuint(input[4], 24, 31)) as u8,
(__gen_unuint(input[5], 0, 7)) as u8,
(__gen_unuint(input[5], 8, 15)) as u8,
(__gen_unuint(input[5], 16, 23)) as u8,
(__gen_unuint(input[5], 24, 31)) as u8,
(__gen_unuint(input[6], 0, 7)) as u8,
(__gen_unuint(input[6], 8, 15)) as u8,
(__gen_unuint(input[6], 16, 23)) as u8,
(__gen_unuint(input[6], 24, 31)) as u8,
(__gen_unuint(input[7], 0, 7)) as u8,
(__gen_unuint(input[7], 8, 15)) as u8,
(__gen_unuint(input[7], 16, 23)) as u8,
(__gen_unuint(input[7], 24, 31)) as u8,
(__gen_unuint(input[8], 0, 7)) as u8,
(__gen_unuint(input[8], 8, 15)) as u8,
(__gen_unuint(input[8], 16, 23)) as u8,
(__gen_unuint(input[8], 24, 31)) as u8,
(__gen_unuint(input[9], 0, 7)) as u8,
(__gen_unuint(input[9], 8, 15)) as u8,
(__gen_unuint(input[9], 16, 23)) as u8,
(__gen_unuint(input[9], 24, 31)) as u8,
(__gen_unuint(input[10], 0, 7)) as u8,
(__gen_unuint(input[10], 8, 15)) as u8,
(__gen_unuint(input[10], 16, 23)) as u8,
(__gen_unuint(input[10], 24, 31)) as u8,
(__gen_unuint(input[11], 0, 7)) as u8,
(__gen_unuint(input[11], 8, 15)) as u8,
(__gen_unuint(input[11], 16, 23)) as u8,
(__gen_unuint(input[11], 24, 31)) as u8,
(__gen_unuint(input[12], 0, 7)) as u8,
(__gen_unuint(input[12], 8, 15)) as u8,
(__gen_unuint(input[12], 16, 23)) as u8,
(__gen_unuint(input[12], 24, 31)) as u8,
(__gen_unuint(input[13], 0, 7)) as u8,
(__gen_unuint(input[13], 8, 15)) as u8,
(__gen_unuint(input[13], 16, 23)) as u8,
(__gen_unuint(input[13], 24, 31)) as u8
],
ac_table: [
(__gen_unuint(input[14], 0, 7)) as u8,
(__gen_unuint(input[14], 8, 15)) as u8,
(__gen_unuint(input[14], 16, 23)) as u8,
(__gen_unuint(input[14], 24, 31)) as u8,
(__gen_unuint(input[15], 0, 7)) as u8,
(__gen_unuint(input[15], 8, 15)) as u8,
(__gen_unuint(input[15], 16, 23)) as u8,
(__gen_unuint(input[15], 24, 31)) as u8,
(__gen_unuint(input[16], 0, 7)) as u8,
(__gen_unuint(input[16], 8, 15)) as u8,
(__gen_unuint(input[16], 16, 23)) as u8,
(__gen_unuint(input[16], 24, 31)) as u8,
(__gen_unuint(input[17], 0, 7)) as u8,
(__gen_unuint(input[17], 8, 15)) as u8,
(__gen_unuint(input[17], 16, 23)) as u8,
(__gen_unuint(input[17], 24, 31)) as u8,
(__gen_unuint(input[18], 0, 7)) as u8,
(__gen_unuint(input[18], 8, 15)) as u8,
(__gen_unuint(input[18], 16, 23)) as u8,
(__gen_unuint(input[18], 24, 31)) as u8,
(__gen_unuint(input[19], 0, 7)) as u8,
(__gen_unuint(input[19], 8, 15)) as u8,
(__gen_unuint(input[19], 16, 23)) as u8,
(__gen_unuint(input[19], 24, 31)) as u8,
(__gen_unuint(input[20], 0, 7)) as u8,
(__gen_unuint(input[20], 8, 15)) as u8,
(__gen_unuint(input[20], 16, 23)) as u8,
(__gen_unuint(input[20], 24, 31)) as u8,
(__gen_unuint(input[21], 0, 7)) as u8,
(__gen_unuint(input[21], 8, 15)) as u8,
(__gen_unuint(input[21], 16, 23)) as u8,
(__gen_unuint(input[21], 24, 31)) as u8,
(__gen_unuint(input[22], 0, 7)) as u8,
(__gen_unuint(input[22], 8, 15)) as u8,
(__gen_unuint(input[22], 16, 23)) as u8,
(__gen_unuint(input[22], 24, 31)) as u8,
(__gen_unuint(input[23], 0, 7)) as u8,
(__gen_unuint(input[23], 8, 15)) as u8,
(__gen_unuint(input[23], 16, 23)) as u8,
(__gen_unuint(input[23], 24, 31)) as u8,
(__gen_unuint(input[24], 0, 7)) as u8,
(__gen_unuint(input[24], 8, 15)) as u8,
(__gen_unuint(input[24], 16, 23)) as u8,
(__gen_unuint(input[24], 24, 31)) as u8,
(__gen_unuint(input[25], 0, 7)) as u8,
(__gen_unuint(input[25], 8, 15)) as u8,
(__gen_unuint(input[25], 16, 23)) as u8,
(__gen_unuint(input[25], 24, 31)) as u8,
(__gen_unuint(input[26], 0, 7)) as u8,
(__gen_unuint(input[26], 8, 15)) as u8,
(__gen_unuint(input[26], 16, 23)) as u8,
(__gen_unuint(input[26], 24, 31)) as u8,
(__gen_unuint(input[27], 0, 7)) as u8,
(__gen_unuint(input[27], 8, 15)) as u8,
(__gen_unuint(input[27], 16, 23)) as u8,
(__gen_unuint(input[27], 24, 31)) as u8,
(__gen_unuint(input[28], 0, 7)) as u8,
(__gen_unuint(input[28], 8, 15)) as u8,
(__gen_unuint(input[28], 16, 23)) as u8,
(__gen_unuint(input[28], 24, 31)) as u8,
(__gen_unuint(input[29], 0, 7)) as u8,
(__gen_unuint(input[29], 8, 15)) as u8,
(__gen_unuint(input[29], 16, 23)) as u8,
(__gen_unuint(input[29], 24, 31)) as u8,
(__gen_unuint(input[30], 0, 7)) as u8,
(__gen_unuint(input[30], 8, 15)) as u8,
(__gen_unuint(input[30], 16, 23)) as u8,
(__gen_unuint(input[30], 24, 31)) as u8,
(__gen_unuint(input[31], 0, 7)) as u8,
(__gen_unuint(input[31], 8, 15)) as u8,
(__gen_unuint(input[31], 16, 23)) as u8,
(__gen_unuint(input[31], 24, 31)) as u8,
(__gen_unuint(input[32], 0, 7)) as u8,
(__gen_unuint(input[32], 8, 15)) as u8,
(__gen_unuint(input[32], 16, 23)) as u8,
(__gen_unuint(input[32], 24, 31)) as u8,
(__gen_unuint(input[33], 0, 7)) as u8,
(__gen_unuint(input[33], 8, 15)) as u8,
(__gen_unuint(input[33], 16, 23)) as u8,
(__gen_unuint(input[33], 24, 31)) as u8,
(__gen_unuint(input[34], 0, 7)) as u8,
(__gen_unuint(input[34], 8, 15)) as u8,
(__gen_unuint(input[34], 16, 23)) as u8,
(__gen_unuint(input[34], 24, 31)) as u8,
(__gen_unuint(input[35], 0, 7)) as u8,
(__gen_unuint(input[35], 8, 15)) as u8,
(__gen_unuint(input[35], 16, 23)) as u8,
(__gen_unuint(input[35], 24, 31)) as u8,
(__gen_unuint(input[36], 0, 7)) as u8,
(__gen_unuint(input[36], 8, 15)) as u8,
(__gen_unuint(input[36], 16, 23)) as u8,
(__gen_unuint(input[36], 24, 31)) as u8,
(__gen_unuint(input[37], 0, 7)) as u8,
(__gen_unuint(input[37], 8, 15)) as u8,
(__gen_unuint(input[37], 16, 23)) as u8,
(__gen_unuint(input[37], 24, 31)) as u8,
(__gen_unuint(input[38], 0, 7)) as u8,
(__gen_unuint(input[38], 8, 15)) as u8,
(__gen_unuint(input[38], 16, 23)) as u8,
(__gen_unuint(input[38], 24, 31)) as u8,
(__gen_unuint(input[39], 0, 7)) as u8,
(__gen_unuint(input[39], 8, 15)) as u8,
(__gen_unuint(input[39], 16, 23)) as u8,
(__gen_unuint(input[39], 24, 31)) as u8,
(__gen_unuint(input[40], 0, 7)) as u8,
(__gen_unuint(input[40], 8, 15)) as u8,
(__gen_unuint(input[40], 16, 23)) as u8,
(__gen_unuint(input[40], 24, 31)) as u8,
(__gen_unuint(input[41], 0, 7)) as u8,
(__gen_unuint(input[41], 8, 15)) as u8,
(__gen_unuint(input[41], 16, 23)) as u8,
(__gen_unuint(input[41], 24, 31)) as u8,
(__gen_unuint(input[42], 0, 7)) as u8,
(__gen_unuint(input[42], 8, 15)) as u8,
(__gen_unuint(input[42], 16, 23)) as u8,
(__gen_unuint(input[42], 24, 31)) as u8,
(__gen_unuint(input[43], 0, 7)) as u8,
(__gen_unuint(input[43], 8, 15)) as u8,
(__gen_unuint(input[43], 16, 23)) as u8,
(__gen_unuint(input[43], 24, 31)) as u8,
(__gen_unuint(input[44], 0, 7)) as u8,
(__gen_unuint(input[44], 8, 15)) as u8,
(__gen_unuint(input[44], 16, 23)) as u8,
(__gen_unuint(input[44], 24, 31)) as u8,
(__gen_unuint(input[45], 0, 7)) as u8,
(__gen_unuint(input[45], 8, 15)) as u8,
(__gen_unuint(input[45], 16, 23)) as u8,
(__gen_unuint(input[45], 24, 31)) as u8,
(__gen_unuint(input[46], 0, 7)) as u8,
(__gen_unuint(input[46], 8, 15)) as u8,
(__gen_unuint(input[46], 16, 23)) as u8,
(__gen_unuint(input[46], 24, 31)) as u8,
(__gen_unuint(input[47], 0, 7)) as u8,
(__gen_unuint(input[47], 8, 15)) as u8,
(__gen_unuint(input[47], 16, 23)) as u8,
(__gen_unuint(input[47], 24, 31)) as u8,
(__gen_unuint(input[48], 0, 7)) as u8,
(__gen_unuint(input[48], 8, 15)) as u8,
(__gen_unuint(input[48], 16, 23)) as u8,
(__gen_unuint(input[48], 24, 31)) as u8,
(__gen_unuint(input[49], 0, 7)) as u8,
(__gen_unuint(input[49], 8, 15)) as u8,
(__gen_unuint(input[49], 16, 23)) as u8,
(__gen_unuint(input[49], 24, 31)) as u8,
(__gen_unuint(input[50], 0, 7)) as u8,
(__gen_unuint(input[50], 8, 15)) as u8,
(__gen_unuint(input[50], 16, 23)) as u8,
(__gen_unuint(input[50], 24, 31)) as u8,
(__gen_unuint(input[51], 0, 7)) as u8,
(__gen_unuint(input[51], 8, 15)) as u8,
(__gen_unuint(input[51], 16, 23)) as u8,
(__gen_unuint(input[51], 24, 31)) as u8,
(__gen_unuint(input[52], 0, 7)) as u8,
(__gen_unuint(input[52], 8, 15)) as u8,
(__gen_unuint(input[52], 16, 23)) as u8,
(__gen_unuint(input[52], 24, 31)) as u8,
(__gen_unuint(input[53], 0, 7)) as u8,
(__gen_unuint(input[53], 8, 15)) as u8,
(__gen_unuint(input[53], 16, 23)) as u8,
(__gen_unuint(input[53], 24, 31)) as u8,
(__gen_unuint(input[54], 0, 7)) as u8,
(__gen_unuint(input[54], 8, 15)) as u8,
(__gen_unuint(input[54], 16, 23)) as u8,
(__gen_unuint(input[54], 24, 31)) as u8,
(__gen_unuint(input[55], 0, 7)) as u8,
(__gen_unuint(input[55], 8, 15)) as u8,
(__gen_unuint(input[55], 16, 23)) as u8,
(__gen_unuint(input[55], 24, 31)) as u8,
(__gen_unuint(input[56], 0, 7)) as u8,
(__gen_unuint(input[56], 8, 15)) as u8,
(__gen_unuint(input[56], 16, 23)) as u8,
(__gen_unuint(input[56], 24, 31)) as u8,
(__gen_unuint(input[57], 0, 7)) as u8,
(__gen_unuint(input[57], 8, 15)) as u8,
(__gen_unuint(input[57], 16, 23)) as u8,
(__gen_unuint(input[57], 24, 31)) as u8,
(__gen_unuint(input[58], 0, 7)) as u8,
(__gen_unuint(input[58], 8, 15)) as u8,
(__gen_unuint(input[58], 16, 23)) as u8,
(__gen_unuint(input[58], 24, 31)) as u8,
(__gen_unuint(input[59], 0, 7)) as u8,
(__gen_unuint(input[59], 8, 15)) as u8,
(__gen_unuint(input[59], 16, 23)) as u8,
(__gen_unuint(input[59], 24, 31)) as u8,
(__gen_unuint(input[60], 0, 7)) as u8,
(__gen_unuint(input[60], 8, 15)) as u8,
(__gen_unuint(input[60], 16, 23)) as u8,
(__gen_unuint(input[60], 24, 31)) as u8,
(__gen_unuint(input[61], 0, 7)) as u8,
(__gen_unuint(input[61], 8, 15)) as u8,
(__gen_unuint(input[61], 16, 23)) as u8,
(__gen_unuint(input[61], 24, 31)) as u8,
(__gen_unuint(input[62], 0, 7)) as u8,
(__gen_unuint(input[62], 8, 15)) as u8,
(__gen_unuint(input[62], 16, 23)) as u8,
(__gen_unuint(input[62], 24, 31)) as u8,
(__gen_unuint(input[63], 0, 7)) as u8,
(__gen_unuint(input[63], 8, 15)) as u8,
(__gen_unuint(input[63], 16, 23)) as u8,
(__gen_unuint(input[63], 24, 31)) as u8,
(__gen_unuint(input[64], 0, 7)) as u8,
(__gen_unuint(input[64], 8, 15)) as u8,
(__gen_unuint(input[64], 16, 23)) as u8,
(__gen_unuint(input[64], 24, 31)) as u8,
(__gen_unuint(input[65], 0, 7)) as u8,
(__gen_unuint(input[65], 8, 15)) as u8,
(__gen_unuint(input[65], 16, 23)) as u8,
(__gen_unuint(input[65], 24, 31)) as u8,
(__gen_unuint(input[66], 0, 7)) as u8,
(__gen_unuint(input[66], 8, 15)) as u8,
(__gen_unuint(input[66], 16, 23)) as u8,
(__gen_unuint(input[66], 24, 31)) as u8,
(__gen_unuint(input[67], 0, 7)) as u8,
(__gen_unuint(input[67], 8, 15)) as u8,
(__gen_unuint(input[67], 16, 23)) as u8,
(__gen_unuint(input[67], 24, 31)) as u8,
(__gen_unuint(input[68], 0, 7)) as u8,
(__gen_unuint(input[68], 8, 15)) as u8,
(__gen_unuint(input[68], 16, 23)) as u8,
(__gen_unuint(input[68], 24, 31)) as u8,
(__gen_unuint(input[69], 0, 7)) as u8,
(__gen_unuint(input[69], 8, 15)) as u8,
(__gen_unuint(input[69], 16, 23)) as u8,
(__gen_unuint(input[69], 24, 31)) as u8,
(__gen_unuint(input[70], 0, 7)) as u8,
(__gen_unuint(input[70], 8, 15)) as u8,
(__gen_unuint(input[70], 16, 23)) as u8,
(__gen_unuint(input[70], 24, 31)) as u8,
(__gen_unuint(input[71], 0, 7)) as u8,
(__gen_unuint(input[71], 8, 15)) as u8,
(__gen_unuint(input[71], 16, 23)) as u8,
(__gen_unuint(input[71], 24, 31)) as u8,
(__gen_unuint(input[72], 0, 7)) as u8,
(__gen_unuint(input[72], 8, 15)) as u8,
(__gen_unuint(input[72], 16, 23)) as u8,
(__gen_unuint(input[72], 24, 31)) as u8,
(__gen_unuint(input[73], 0, 7)) as u8,
(__gen_unuint(input[73], 8, 15)) as u8,
(__gen_unuint(input[73], 16, 23)) as u8,
(__gen_unuint(input[73], 24, 31)) as u8,
(__gen_unuint(input[74], 0, 7)) as u8,
(__gen_unuint(input[74], 8, 15)) as u8,
(__gen_unuint(input[74], 16, 23)) as u8,
(__gen_unuint(input[74], 24, 31)) as u8,
(__gen_unuint(input[75], 0, 7)) as u8,
(__gen_unuint(input[75], 8, 15)) as u8,
(__gen_unuint(input[75], 16, 23)) as u8,
(__gen_unuint(input[75], 24, 31)) as u8,
(__gen_unuint(input[76], 0, 7)) as u8,
(__gen_unuint(input[76], 8, 15)) as u8,
(__gen_unuint(input[76], 16, 23)) as u8,
(__gen_unuint(input[76], 24, 31)) as u8,
(__gen_unuint(input[77], 0, 7)) as u8,
(__gen_unuint(input[77], 8, 15)) as u8,
(__gen_unuint(input[77], 16, 23)) as u8,
(__gen_unuint(input[77], 24, 31)) as u8,
(__gen_unuint(input[78], 0, 7)) as u8,
(__gen_unuint(input[78], 8, 15)) as u8,
(__gen_unuint(input[78], 16, 23)) as u8,
(__gen_unuint(input[78], 24, 31)) as u8,
(__gen_unuint(input[79], 0, 7)) as u8,
(__gen_unuint(input[79], 8, 15)) as u8,
(__gen_unuint(input[79], 16, 23)) as u8,
(__gen_unuint(input[79], 24, 31)) as u8,
(__gen_unuint(input[80], 0, 7)) as u8,
(__gen_unuint(input[80], 8, 15)) as u8,
(__gen_unuint(input[80], 16, 23)) as u8,
(__gen_unuint(input[80], 24, 31)) as u8,
(__gen_unuint(input[81], 0, 7)) as u8,
(__gen_unuint(input[81], 8, 15)) as u8,
(__gen_unuint(input[81], 16, 23)) as u8,
(__gen_unuint(input[81], 24, 31)) as u8,
(__gen_unuint(input[82], 0, 7)) as u8,
(__gen_unuint(input[82], 8, 15)) as u8,
(__gen_unuint(input[82], 16, 23)) as u8,
(__gen_unuint(input[82], 24, 31)) as u8,
(__gen_unuint(input[83], 0, 7)) as u8,
(__gen_unuint(input[83], 8, 15)) as u8,
(__gen_unuint(input[83], 16, 23)) as u8,
(__gen_unuint(input[83], 24, 31)) as u8,
(__gen_unuint(input[84], 0, 7)) as u8,
(__gen_unuint(input[84], 8, 15)) as u8,
(__gen_unuint(input[84], 16, 23)) as u8,
(__gen_unuint(input[84], 24, 31)) as u8,
(__gen_unuint(input[85], 0, 7)) as u8,
(__gen_unuint(input[85], 8, 15)) as u8,
(__gen_unuint(input[85], 16, 23)) as u8,
(__gen_unuint(input[85], 24, 31)) as u8,
(__gen_unuint(input[86], 0, 7)) as u8,
(__gen_unuint(input[86], 8, 15)) as u8,
(__gen_unuint(input[86], 16, 23)) as u8,
(__gen_unuint(input[86], 24, 31)) as u8,
(__gen_unuint(input[87], 0, 7)) as u8,
(__gen_unuint(input[87], 8, 15)) as u8,
(__gen_unuint(input[87], 16, 23)) as u8,
(__gen_unuint(input[87], 24, 31)) as u8,
(__gen_unuint(input[88], 0, 7)) as u8,
(__gen_unuint(input[88], 8, 15)) as u8,
(__gen_unuint(input[88], 16, 23)) as u8,
(__gen_unuint(input[88], 24, 31)) as u8,
(__gen_unuint(input[89], 0, 7)) as u8,
(__gen_unuint(input[89], 8, 15)) as u8,
(__gen_unuint(input[89], 16, 23)) as u8,
(__gen_unuint(input[89], 24, 31)) as u8,
(__gen_unuint(input[90], 0, 7)) as u8,
(__gen_unuint(input[90], 8, 15)) as u8,
(__gen_unuint(input[90], 16, 23)) as u8,
(__gen_unuint(input[90], 24, 31)) as u8,
(__gen_unuint(input[91], 0, 7)) as u8,
(__gen_unuint(input[91], 8, 15)) as u8,
(__gen_unuint(input[91], 16, 23)) as u8,
(__gen_unuint(input[91], 24, 31)) as u8,
(__gen_unuint(input[92], 0, 7)) as u8,
(__gen_unuint(input[92], 8, 15)) as u8,
(__gen_unuint(input[92], 16, 23)) as u8,
(__gen_unuint(input[92], 24, 31)) as u8,
(__gen_unuint(input[93], 0, 7)) as u8,
(__gen_unuint(input[93], 8, 15)) as u8,
(__gen_unuint(input[93], 16, 23)) as u8,
(__gen_unuint(input[93], 24, 31)) as u8,
(__gen_unuint(input[94], 0, 7)) as u8,
(__gen_unuint(input[94], 8, 15)) as u8,
(__gen_unuint(input[94], 16, 23)) as u8,
(__gen_unuint(input[94], 24, 31)) as u8,
(__gen_unuint(input[95], 0, 7)) as u8,
(__gen_unuint(input[95], 8, 15)) as u8,
(__gen_unuint(input[95], 16, 23)) as u8,
(__gen_unuint(input[95], 24, 31)) as u8,
(__gen_unuint(input[96], 0, 7)) as u8,
(__gen_unuint(input[96], 8, 15)) as u8,
(__gen_unuint(input[96], 16, 23)) as u8,
(__gen_unuint(input[96], 24, 31)) as u8,
(__gen_unuint(input[97], 0, 7)) as u8,
(__gen_unuint(input[97], 8, 15)) as u8,
(__gen_unuint(input[97], 16, 23)) as u8,
(__gen_unuint(input[97], 24, 31)) as u8,
(__gen_unuint(input[98], 0, 7)) as u8,
(__gen_unuint(input[98], 8, 15)) as u8,
(__gen_unuint(input[98], 16, 23)) as u8,
(__gen_unuint(input[98], 24, 31)) as u8,
(__gen_unuint(input[99], 0, 7)) as u8,
(__gen_unuint(input[99], 8, 15)) as u8,
(__gen_unuint(input[99], 16, 23)) as u8,
(__gen_unuint(input[99], 24, 31)) as u8,
(__gen_unuint(input[100], 0, 7)) as u8,
(__gen_unuint(input[100], 8, 15)) as u8,
(__gen_unuint(input[100], 16, 23)) as u8,
(__gen_unuint(input[100], 24, 31)) as u8,
(__gen_unuint(input[101], 0, 7)) as u8,
(__gen_unuint(input[101], 8, 15)) as u8,
(__gen_unuint(input[101], 16, 23)) as u8,
(__gen_unuint(input[101], 24, 31)) as u8,
(__gen_unuint(input[102], 0, 7)) as u8,
(__gen_unuint(input[102], 8, 15)) as u8,
(__gen_unuint(input[102], 16, 23)) as u8,
(__gen_unuint(input[102], 24, 31)) as u8,
(__gen_unuint(input[103], 0, 7)) as u8,
(__gen_unuint(input[103], 8, 15)) as u8,
(__gen_unuint(input[103], 16, 23)) as u8,
(__gen_unuint(input[103], 24, 31)) as u8,
(__gen_unuint(input[104], 0, 7)) as u8,
(__gen_unuint(input[104], 8, 15)) as u8,
(__gen_unuint(input[104], 16, 23)) as u8,
(__gen_unuint(input[104], 24, 31)) as u8,
(__gen_unuint(input[105], 0, 7)) as u8,
(__gen_unuint(input[105], 8, 15)) as u8,
(__gen_unuint(input[105], 16, 23)) as u8,
(__gen_unuint(input[105], 24, 31)) as u8,
(__gen_unuint(input[106], 0, 7)) as u8,
(__gen_unuint(input[106], 8, 15)) as u8,
(__gen_unuint(input[106], 16, 23)) as u8,
(__gen_unuint(input[106], 24, 31)) as u8,
(__gen_unuint(input[107], 0, 7)) as u8,
(__gen_unuint(input[107], 8, 15)) as u8,
(__gen_unuint(input[107], 16, 23)) as u8,
(__gen_unuint(input[107], 24, 31)) as u8,
(__gen_unuint(input[108], 0, 7)) as u8,
(__gen_unuint(input[108], 8, 15)) as u8,
(__gen_unuint(input[108], 16, 23)) as u8,
(__gen_unuint(input[108], 24, 31)) as u8,
(__gen_unuint(input[109], 0, 7)) as u8,
(__gen_unuint(input[109], 8, 15)) as u8,
(__gen_unuint(input[109], 16, 23)) as u8,
(__gen_unuint(input[109], 24, 31)) as u8,
(__gen_unuint(input[110], 0, 7)) as u8,
(__gen_unuint(input[110], 8, 15)) as u8,
(__gen_unuint(input[110], 16, 23)) as u8,
(__gen_unuint(input[110], 24, 31)) as u8,
(__gen_unuint(input[111], 0, 7)) as u8,
(__gen_unuint(input[111], 8, 15)) as u8,
(__gen_unuint(input[111], 16, 23)) as u8,
(__gen_unuint(input[111], 24, 31)) as u8,
(__gen_unuint(input[112], 0, 7)) as u8,
(__gen_unuint(input[112], 8, 15)) as u8,
(__gen_unuint(input[112], 16, 23)) as u8,
(__gen_unuint(input[112], 24, 31)) as u8,
(__gen_unuint(input[113], 0, 7)) as u8,
(__gen_unuint(input[113], 8, 15)) as u8,
(__gen_unuint(input[113], 16, 23)) as u8,
(__gen_unuint(input[113], 24, 31)) as u8,
(__gen_unuint(input[114], 0, 7)) as u8,
(__gen_unuint(input[114], 8, 15)) as u8,
(__gen_unuint(input[114], 16, 23)) as u8,
(__gen_unuint(input[114], 24, 31)) as u8,
(__gen_unuint(input[115], 0, 7)) as u8,
(__gen_unuint(input[115], 8, 15)) as u8,
(__gen_unuint(input[115], 16, 23)) as u8,
(__gen_unuint(input[115], 24, 31)) as u8,
(__gen_unuint(input[116], 0, 7)) as u8,
(__gen_unuint(input[116], 8, 15)) as u8,
(__gen_unuint(input[116], 16, 23)) as u8,
(__gen_unuint(input[116], 24, 31)) as u8,
(__gen_unuint(input[117], 0, 7)) as u8,
(__gen_unuint(input[117], 8, 15)) as u8,
(__gen_unuint(input[117], 16, 23)) as u8,
(__gen_unuint(input[117], 24, 31)) as u8,
(__gen_unuint(input[118], 0, 7)) as u8,
(__gen_unuint(input[118], 8, 15)) as u8,
(__gen_unuint(input[118], 16, 23)) as u8,
(__gen_unuint(input[118], 24, 31)) as u8,
(__gen_unuint(input[119], 0, 7)) as u8,
(__gen_unuint(input[119], 8, 15)) as u8,
(__gen_unuint(input[119], 16, 23)) as u8,
(__gen_unuint(input[119], 24, 31)) as u8,
(__gen_unuint(input[120], 0, 7)) as u8,
(__gen_unuint(input[120], 8, 15)) as u8,
(__gen_unuint(input[120], 16, 23)) as u8,
(__gen_unuint(input[120], 24, 31)) as u8,
(__gen_unuint(input[121], 0, 7)) as u8,
(__gen_unuint(input[121], 8, 15)) as u8,
(__gen_unuint(input[121], 16, 23)) as u8,
(__gen_unuint(input[121], 24, 31)) as u8,
(__gen_unuint(input[122], 0, 7)) as u8,
(__gen_unuint(input[122], 8, 15)) as u8,
(__gen_unuint(input[122], 16, 23)) as u8,
(__gen_unuint(input[122], 24, 31)) as u8,
(__gen_unuint(input[123], 0, 7)) as u8,
(__gen_unuint(input[123], 8, 15)) as u8,
(__gen_unuint(input[123], 16, 23)) as u8,
(__gen_unuint(input[123], 24, 31)) as u8,
(__gen_unuint(input[124], 0, 7)) as u8,
(__gen_unuint(input[124], 8, 15)) as u8,
(__gen_unuint(input[124], 16, 23)) as u8,
(__gen_unuint(input[124], 24, 31)) as u8,
(__gen_unuint(input[125], 0, 7)) as u8,
(__gen_unuint(input[125], 8, 15)) as u8,
(__gen_unuint(input[125], 16, 23)) as u8,
(__gen_unuint(input[125], 24, 31)) as u8,
(__gen_unuint(input[126], 0, 7)) as u8,
(__gen_unuint(input[126], 8, 15)) as u8,
(__gen_unuint(input[126], 16, 23)) as u8,
(__gen_unuint(input[126], 24, 31)) as u8,
(__gen_unuint(input[127], 0, 7)) as u8,
(__gen_unuint(input[127], 8, 15)) as u8,
(__gen_unuint(input[127], 16, 23)) as u8,
(__gen_unuint(input[127], 24, 31)) as u8,
(__gen_unuint(input[128], 0, 7)) as u8,
(__gen_unuint(input[128], 8, 15)) as u8,
(__gen_unuint(input[128], 16, 23)) as u8,
(__gen_unuint(input[128], 24, 31)) as u8,
(__gen_unuint(input[129], 0, 7)) as u8,
(__gen_unuint(input[129], 8, 15)) as u8,
(__gen_unuint(input[129], 16, 23)) as u8,
(__gen_unuint(input[129], 24, 31)) as u8,
(__gen_unuint(input[130], 0, 7)) as u8,
(__gen_unuint(input[130], 8, 15)) as u8,
(__gen_unuint(input[130], 16, 23)) as u8,
(__gen_unuint(input[130], 24, 31)) as u8,
(__gen_unuint(input[131], 0, 7)) as u8,
(__gen_unuint(input[131], 8, 15)) as u8,
(__gen_unuint(input[131], 16, 23)) as u8,
(__gen_unuint(input[131], 24, 31)) as u8,
(__gen_unuint(input[132], 0, 7)) as u8,
(__gen_unuint(input[132], 8, 15)) as u8,
(__gen_unuint(input[132], 16, 23)) as u8,
(__gen_unuint(input[132], 24, 31)) as u8,
(__gen_unuint(input[133], 0, 7)) as u8,
(__gen_unuint(input[133], 8, 15)) as u8,
(__gen_unuint(input[133], 16, 23)) as u8,
(__gen_unuint(input[133], 24, 31)) as u8,
(__gen_unuint(input[134], 0, 7)) as u8,
(__gen_unuint(input[134], 8, 15)) as u8,
(__gen_unuint(input[134], 16, 23)) as u8,
(__gen_unuint(input[134], 24, 31)) as u8,
(__gen_unuint(input[135], 0, 7)) as u8,
(__gen_unuint(input[135], 8, 15)) as u8,
(__gen_unuint(input[135], 16, 23)) as u8,
(__gen_unuint(input[135], 24, 31)) as u8,
(__gen_unuint(input[136], 0, 7)) as u8,
(__gen_unuint(input[136], 8, 15)) as u8,
(__gen_unuint(input[136], 16, 23)) as u8,
(__gen_unuint(input[136], 24, 31)) as u8,
(__gen_unuint(input[137], 0, 7)) as u8,
(__gen_unuint(input[137], 8, 15)) as u8,
(__gen_unuint(input[137], 16, 23)) as u8,
(__gen_unuint(input[137], 24, 31)) as u8,
(__gen_unuint(input[138], 0, 7)) as u8,
(__gen_unuint(input[138], 8, 15)) as u8,
(__gen_unuint(input[138], 16, 23)) as u8,
(__gen_unuint(input[138], 24, 31)) as u8,
(__gen_unuint(input[139], 0, 7)) as u8,
(__gen_unuint(input[139], 8, 15)) as u8,
(__gen_unuint(input[139], 16, 23)) as u8,
(__gen_unuint(input[139], 24, 31)) as u8,
(__gen_unuint(input[140], 0, 7)) as u8,
(__gen_unuint(input[140], 8, 15)) as u8,
(__gen_unuint(input[140], 16, 23)) as u8,
(__gen_unuint(input[140], 24, 31)) as u8,
(__gen_unuint(input[141], 0, 7)) as u8,
(__gen_unuint(input[141], 8, 15)) as u8,
(__gen_unuint(input[141], 16, 23)) as u8,
(__gen_unuint(input[141], 24, 31)) as u8,
(__gen_unuint(input[142], 0, 7)) as u8,
(__gen_unuint(input[142], 8, 15)) as u8,
(__gen_unuint(input[142], 16, 23)) as u8,
(__gen_unuint(input[142], 24, 31)) as u8,
(__gen_unuint(input[143], 0, 7)) as u8,
(__gen_unuint(input[143], 8, 15)) as u8,
(__gen_unuint(input[143], 16, 23)) as u8,
(__gen_unuint(input[143], 24, 31)) as u8,
(__gen_unuint(input[144], 0, 7)) as u8,
(__gen_unuint(input[144], 8, 15)) as u8,
(__gen_unuint(input[144], 16, 23)) as u8,
(__gen_unuint(input[144], 24, 31)) as u8,
(__gen_unuint(input[145], 0, 7)) as u8,
(__gen_unuint(input[145], 8, 15)) as u8,
(__gen_unuint(input[145], 16, 23)) as u8,
(__gen_unuint(input[145], 24, 31)) as u8,
(__gen_unuint(input[146], 0, 7)) as u8,
(__gen_unuint(input[146], 8, 15)) as u8,
(__gen_unuint(input[146], 16, 23)) as u8,
(__gen_unuint(input[146], 24, 31)) as u8,
(__gen_unuint(input[147], 0, 7)) as u8,
(__gen_unuint(input[147], 8, 15)) as u8,
(__gen_unuint(input[147], 16, 23)) as u8,
(__gen_unuint(input[147], 24, 31)) as u8,
(__gen_unuint(input[148], 0, 7)) as u8,
(__gen_unuint(input[148], 8, 15)) as u8,
(__gen_unuint(input[148], 16, 23)) as u8,
(__gen_unuint(input[148], 24, 31)) as u8,
(__gen_unuint(input[149], 0, 7)) as u8,
(__gen_unuint(input[149], 8, 15)) as u8,
(__gen_unuint(input[149], 16, 23)) as u8,
(__gen_unuint(input[149], 24, 31)) as u8,
(__gen_unuint(input[150], 0, 7)) as u8,
(__gen_unuint(input[150], 8, 15)) as u8,
(__gen_unuint(input[150], 16, 23)) as u8,
(__gen_unuint(input[150], 24, 31)) as u8,
(__gen_unuint(input[151], 0, 7)) as u8,
(__gen_unuint(input[151], 8, 15)) as u8,
(__gen_unuint(input[151], 16, 23)) as u8,
(__gen_unuint(input[151], 24, 31)) as u8,
(__gen_unuint(input[152], 0, 7)) as u8,
(__gen_unuint(input[152], 8, 15)) as u8,
(__gen_unuint(input[152], 16, 23)) as u8,
(__gen_unuint(input[152], 24, 31)) as u8,
(__gen_unuint(input[153], 0, 7)) as u8,
(__gen_unuint(input[153], 8, 15)) as u8,
(__gen_unuint(input[153], 16, 23)) as u8,
(__gen_unuint(input[153], 24, 31)) as u8,
(__gen_unuint(input[154], 0, 7)) as u8,
(__gen_unuint(input[154], 8, 15)) as u8,
(__gen_unuint(input[154], 16, 23)) as u8,
(__gen_unuint(input[154], 24, 31)) as u8,
(__gen_unuint(input[155], 0, 7)) as u8,
(__gen_unuint(input[155], 8, 15)) as u8,
(__gen_unuint(input[155], 16, 23)) as u8,
(__gen_unuint(input[155], 24, 31)) as u8,
(__gen_unuint(input[156], 0, 7)) as u8,
(__gen_unuint(input[156], 8, 15)) as u8,
(__gen_unuint(input[156], 16, 23)) as u8,
(__gen_unuint(input[156], 24, 31)) as u8,
(__gen_unuint(input[157], 0, 7)) as u8,
(__gen_unuint(input[157], 8, 15)) as u8,
(__gen_unuint(input[157], 16, 23)) as u8,
(__gen_unuint(input[157], 24, 31)) as u8,
(__gen_unuint(input[158], 0, 7)) as u8,
(__gen_unuint(input[158], 8, 15)) as u8,
(__gen_unuint(input[158], 16, 23)) as u8,
(__gen_unuint(input[158], 24, 31)) as u8,
(__gen_unuint(input[159], 0, 7)) as u8,
(__gen_unuint(input[159], 8, 15)) as u8,
(__gen_unuint(input[159], 16, 23)) as u8,
(__gen_unuint(input[159], 24, 31)) as u8,
(__gen_unuint(input[160], 0, 7)) as u8,
(__gen_unuint(input[160], 8, 15)) as u8,
(__gen_unuint(input[160], 16, 23)) as u8,
(__gen_unuint(input[160], 24, 31)) as u8,
(__gen_unuint(input[161], 0, 7)) as u8,
(__gen_unuint(input[161], 8, 15)) as u8,
(__gen_unuint(input[161], 16, 23)) as u8,
(__gen_unuint(input[161], 24, 31)) as u8,
(__gen_unuint(input[162], 0, 7)) as u8,
(__gen_unuint(input[162], 8, 15)) as u8,
(__gen_unuint(input[162], 16, 23)) as u8,
(__gen_unuint(input[162], 24, 31)) as u8,
(__gen_unuint(input[163], 0, 7)) as u8,
(__gen_unuint(input[163], 8, 15)) as u8,
(__gen_unuint(input[163], 16, 23)) as u8,
(__gen_unuint(input[163], 24, 31)) as u8,
(__gen_unuint(input[164], 0, 7)) as u8,
(__gen_unuint(input[164], 8, 15)) as u8,
(__gen_unuint(input[164], 16, 23)) as u8,
(__gen_unuint(input[164], 24, 31)) as u8,
(__gen_unuint(input[165], 0, 7)) as u8,
(__gen_unuint(input[165], 8, 15)) as u8,
(__gen_unuint(input[165], 16, 23)) as u8,
(__gen_unuint(input[165], 24, 31)) as u8,
(__gen_unuint(input[166], 0, 7)) as u8,
(__gen_unuint(input[166], 8, 15)) as u8,
(__gen_unuint(input[166], 16, 23)) as u8,
(__gen_unuint(input[166], 24, 31)) as u8,
(__gen_unuint(input[167], 0, 7)) as u8,
(__gen_unuint(input[167], 8, 15)) as u8,
(__gen_unuint(input[167], 16, 23)) as u8,
(__gen_unuint(input[167], 24, 31)) as u8,
(__gen_unuint(input[168], 0, 7)) as u8,
(__gen_unuint(input[168], 8, 15)) as u8,
(__gen_unuint(input[168], 16, 23)) as u8,
(__gen_unuint(input[168], 24, 31)) as u8,
(__gen_unuint(input[169], 0, 7)) as u8,
(__gen_unuint(input[169], 8, 15)) as u8,
(__gen_unuint(input[169], 16, 23)) as u8,
(__gen_unuint(input[169], 24, 31)) as u8,
(__gen_unuint(input[170], 0, 7)) as u8,
(__gen_unuint(input[170], 8, 15)) as u8,
(__gen_unuint(input[170], 16, 23)) as u8,
(__gen_unuint(input[170], 24, 31)) as u8,
(__gen_unuint(input[171], 0, 7)) as u8,
(__gen_unuint(input[171], 8, 15)) as u8,
(__gen_unuint(input[171], 16, 23)) as u8,
(__gen_unuint(input[171], 24, 31)) as u8,
(__gen_unuint(input[172], 0, 7)) as u8,
(__gen_unuint(input[172], 8, 15)) as u8,
(__gen_unuint(input[172], 16, 23)) as u8,
(__gen_unuint(input[172], 24, 31)) as u8,
(__gen_unuint(input[173], 0, 7)) as u8,
(__gen_unuint(input[173], 8, 15)) as u8,
(__gen_unuint(input[173], 16, 23)) as u8,
(__gen_unuint(input[173], 24, 31)) as u8,
(__gen_unuint(input[174], 0, 7)) as u8,
(__gen_unuint(input[174], 8, 15)) as u8,
(__gen_unuint(input[174], 16, 23)) as u8,
(__gen_unuint(input[174], 24, 31)) as u8,
(__gen_unuint(input[175], 0, 7)) as u8,
(__gen_unuint(input[175], 8, 15)) as u8,
(__gen_unuint(input[175], 16, 23)) as u8,
(__gen_unuint(input[175], 24, 31)) as u8
],
}
}
}
impl Deserialize for MfcJpegHuffTableState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 176];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 176] as *mut [u8; 704]) })?;
Ok((&input).into())
}
}
pub struct MfcJpegScanObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub mcu_count: u32,
pub restart_interval: u32,
pub last_scan: bool,
pub head_present: bool,
pub huffman_dc_table: u32,
pub huffman_ac_table: u32,
}
impl MfcJpegScanObject {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for MfcJpegScanObject {
fn default() -> Self {
MfcJpegScanObject {
dword_length: 1,
subopcode_b: 9,
subopcode_a: 2,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
mcu_count: Default::default(),
restart_interval: Default::default(),
last_scan: Default::default(),
head_present: Default::default(),
huffman_dc_table: Default::default(),
huffman_ac_table: Default::default(),
}
}
}
impl Serialize for MfcJpegScanObject {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.mcu_count, 0, 25);
out[2] = __gen_uint(self.restart_interval, 0, 15) |
__gen_uint(self.last_scan.into(), 16, 16) |
__gen_uint(self.head_present.into(), 17, 17) |
__gen_uint(self.huffman_dc_table, 18, 20) |
__gen_uint(self.huffman_ac_table, 22, 24);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for MfcJpegScanObject {
fn from(input: &[u32; 3]) -> Self {
MfcJpegScanObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
mcu_count: __gen_unuint(input[1], 0, 25),
restart_interval: __gen_unuint(input[2], 0, 15),
last_scan: __gen_unuint(input[2], 16, 16) != 0,
head_present: __gen_unuint(input[2], 17, 17) != 0,
huffman_dc_table: __gen_unuint(input[2], 18, 20),
huffman_ac_table: __gen_unuint(input[2], 22, 24),
}
}
}
impl Deserialize for MfcJpegScanObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct MfcMpeg2PakObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub inline_data: [u32; 8],
}
impl MfcMpeg2PakObject {
pub const DWORD_LENGTH: u32 = 9;
}
impl Default for MfcMpeg2PakObject {
fn default() -> Self {
MfcMpeg2PakObject {
dword_length: 7,
subopcode_b: 9,
subopcode_a: 2,
media_command_opcode: 3,
pipeline: 2,
command_type: 3,
inline_data: Default::default(),
}
}
}
impl Serialize for MfcMpeg2PakObject {
type Out = [u32; 9];
fn pack_into(&self, out: &mut [u32; 9]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.inline_data[0], 0, 31);
out[2] = __gen_uint(self.inline_data[1], 0, 31);
out[3] = __gen_uint(self.inline_data[2], 0, 31);
out[4] = __gen_uint(self.inline_data[3], 0, 31);
out[5] = __gen_uint(self.inline_data[4], 0, 31);
out[6] = __gen_uint(self.inline_data[5], 0, 31);
out[7] = __gen_uint(self.inline_data[6], 0, 31);
out[8] = __gen_uint(self.inline_data[7], 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 9];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 9] as *const [u8; 36]) })
}
}
impl From<&[u32; 9]> for MfcMpeg2PakObject {
fn from(input: &[u32; 9]) -> Self {
MfcMpeg2PakObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
inline_data: [
__gen_unuint(input[1], 0, 31),
__gen_unuint(input[2], 0, 31),
__gen_unuint(input[3], 0, 31),
__gen_unuint(input[4], 0, 31),
__gen_unuint(input[5], 0, 31),
__gen_unuint(input[6], 0, 31),
__gen_unuint(input[7], 0, 31),
__gen_unuint(input[8], 0, 31)
],
}
}
}
impl Deserialize for MfcMpeg2PakObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 9];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 9] as *mut [u8; 36]) })?;
Ok((&input).into())
}
}
pub struct MfcMpeg2SlicegroupState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub stream_id: u32,
pub slice_id: u32,
pub intra_slice_flag: bool,
pub intra_slice: bool,
pub first_slice_header_disable: bool,
pub tail_insertion_present: bool,
pub slice_data_insertion_present: bool,
pub header_insertion_present: bool,
pub compressed_bitstream_output_disable: bool,
pub last_slice: bool,
pub mb_type_skip_conversion_disable: bool,
pub rate_control_panic_type: u32,
pub rate_control_panic_enable: bool,
pub rate_control_stable_tolerance: u32,
pub rate_control_triggle_mode: u32,
pub reset_rate_control_counter: bool,
pub rate_control_counter_enable: bool,
pub first_mb_x_count: u32,
pub first_mb_y_count: u32,
pub next_slice_group_mb_x_count: u32,
pub next_slice_group_mb_y_count: u32,
pub slice_group_qp: u32,
pub slice_group_skip: bool,
pub indirect_pak_bse_data_start_address: u64,
pub grow_init: u32,
pub grow_resistance: u32,
pub shrink_init: u32,
pub shrink_resistance: u32,
pub qp_max_positive_modifier_magnitude: u32,
pub qp_max_negative_modifier_magnitude: u32,
pub correct_1: u32,
pub correct_2: u32,
pub correct_3: u32,
pub correct_4: u32,
pub correct_5: u32,
pub correct_6: u32,
pub cv0: u32,
pub cv1: u32,
pub cv2: u32,
pub cv3: u32,
pub cv4: u32,
pub cv5: u32,
pub cv6: u32,
pub cv7: u32,
}
impl MfcMpeg2SlicegroupState {
pub const DWORD_LENGTH: u32 = 8;
pub const ALWAYS_RATE_CONTROL: u32 = 0;
pub const CBP_PANIC: u32 = 1;
pub const GENTLE_RATE_CONTROL: u32 = 1;
pub const LOOSE_RATE_CONTROL: u32 = 2;
pub const QP_PANIC: u32 = 0;
}
impl Default for MfcMpeg2SlicegroupState {
fn default() -> Self {
MfcMpeg2SlicegroupState {
dword_length: 6,
subopcode_b: 3,
subopcode_a: 2,
media_command_opcode: 3,
pipeline: 2,
command_type: 3,
stream_id: Default::default(),
slice_id: Default::default(),
intra_slice_flag: Default::default(),
intra_slice: Default::default(),
first_slice_header_disable: Default::default(),
tail_insertion_present: Default::default(),
slice_data_insertion_present: Default::default(),
header_insertion_present: Default::default(),
compressed_bitstream_output_disable: Default::default(),
last_slice: Default::default(),
mb_type_skip_conversion_disable: Default::default(),
rate_control_panic_type: Default::default(),
rate_control_panic_enable: Default::default(),
rate_control_stable_tolerance: Default::default(),
rate_control_triggle_mode: Default::default(),
reset_rate_control_counter: Default::default(),
rate_control_counter_enable: Default::default(),
first_mb_x_count: Default::default(),
first_mb_y_count: Default::default(),
next_slice_group_mb_x_count: Default::default(),
next_slice_group_mb_y_count: Default::default(),
slice_group_qp: Default::default(),
slice_group_skip: Default::default(),
indirect_pak_bse_data_start_address: Default::default(),
grow_init: Default::default(),
grow_resistance: Default::default(),
shrink_init: Default::default(),
shrink_resistance: Default::default(),
qp_max_positive_modifier_magnitude: Default::default(),
qp_max_negative_modifier_magnitude: Default::default(),
correct_1: Default::default(),
correct_2: Default::default(),
correct_3: Default::default(),
correct_4: Default::default(),
correct_5: Default::default(),
correct_6: Default::default(),
cv0: Default::default(),
cv1: Default::default(),
cv2: Default::default(),
cv3: Default::default(),
cv4: Default::default(),
cv5: Default::default(),
cv6: Default::default(),
cv7: Default::default(),
}
}
}
impl Serialize for MfcMpeg2SlicegroupState {
type Out = [u32; 8];
fn pack_into(&self, out: &mut [u32; 8]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.stream_id, 0, 1) |
__gen_uint(self.slice_id, 4, 7) |
__gen_uint(self.intra_slice_flag.into(), 12, 12) |
__gen_uint(self.intra_slice.into(), 13, 13) |
__gen_uint(self.first_slice_header_disable.into(), 14, 14) |
__gen_uint(self.tail_insertion_present.into(), 15, 15) |
__gen_uint(self.slice_data_insertion_present.into(), 16, 16) |
__gen_uint(self.header_insertion_present.into(), 17, 17) |
__gen_uint(self.compressed_bitstream_output_disable.into(), 18, 18) |
__gen_uint(self.last_slice.into(), 19, 19) |
__gen_uint(self.mb_type_skip_conversion_disable.into(), 20, 20) |
__gen_uint(self.rate_control_panic_type, 22, 22) |
__gen_uint(self.rate_control_panic_enable.into(), 23, 23) |
__gen_uint(self.rate_control_stable_tolerance, 24, 27) |
__gen_uint(self.rate_control_triggle_mode, 28, 29) |
__gen_uint(self.reset_rate_control_counter.into(), 30, 30) |
__gen_uint(self.rate_control_counter_enable.into(), 31, 31);
out[2] = __gen_uint(self.first_mb_x_count, 0, 7) |
__gen_uint(self.first_mb_y_count, 8, 15) |
__gen_uint(self.next_slice_group_mb_x_count, 16, 23) |
__gen_uint(self.next_slice_group_mb_y_count, 24, 31);
out[3] = __gen_uint(self.slice_group_qp, 0, 5) |
__gen_uint(self.slice_group_skip.into(), 8, 8);
out[4] = __gen_offset(self.indirect_pak_bse_data_start_address as u32, 0, 28);
out[5] = __gen_uint(self.grow_init, 0, 3) |
__gen_uint(self.grow_resistance, 4, 7) |
__gen_uint(self.shrink_init, 8, 11) |
__gen_uint(self.shrink_resistance, 12, 15) |
__gen_uint(self.qp_max_positive_modifier_magnitude, 16, 23) |
__gen_uint(self.qp_max_negative_modifier_magnitude, 24, 31);
out[6] = __gen_uint(self.correct_1, 0, 3) |
__gen_uint(self.correct_2, 4, 7) |
__gen_uint(self.correct_3, 8, 11) |
__gen_uint(self.correct_4, 12, 15) |
__gen_uint(self.correct_5, 16, 19) |
__gen_uint(self.correct_6, 20, 23);
out[7] = __gen_uint(self.cv0, 0, 3) |
__gen_uint(self.cv1, 4, 7) |
__gen_uint(self.cv2, 8, 11) |
__gen_uint(self.cv3, 12, 15) |
__gen_uint(self.cv4, 16, 19) |
__gen_uint(self.cv5, 20, 23) |
__gen_uint(self.cv6, 24, 27) |
__gen_uint(self.cv7, 28, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 8];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 8] as *const [u8; 32]) })
}
}
impl From<&[u32; 8]> for MfcMpeg2SlicegroupState {
fn from(input: &[u32; 8]) -> Self {
MfcMpeg2SlicegroupState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
stream_id: __gen_unuint(input[1], 0, 1),
slice_id: __gen_unuint(input[1], 4, 7),
intra_slice_flag: __gen_unuint(input[1], 12, 12) != 0,
intra_slice: __gen_unuint(input[1], 13, 13) != 0,
first_slice_header_disable: __gen_unuint(input[1], 14, 14) != 0,
tail_insertion_present: __gen_unuint(input[1], 15, 15) != 0,
slice_data_insertion_present: __gen_unuint(input[1], 16, 16) != 0,
header_insertion_present: __gen_unuint(input[1], 17, 17) != 0,
compressed_bitstream_output_disable: __gen_unuint(input[1], 18, 18) != 0,
last_slice: __gen_unuint(input[1], 19, 19) != 0,
mb_type_skip_conversion_disable: __gen_unuint(input[1], 20, 20) != 0,
rate_control_panic_type: __gen_unuint(input[1], 22, 22),
rate_control_panic_enable: __gen_unuint(input[1], 23, 23) != 0,
rate_control_stable_tolerance: __gen_unuint(input[1], 24, 27),
rate_control_triggle_mode: __gen_unuint(input[1], 28, 29),
reset_rate_control_counter: __gen_unuint(input[1], 30, 30) != 0,
rate_control_counter_enable: __gen_unuint(input[1], 31, 31) != 0,
first_mb_x_count: __gen_unuint(input[2], 0, 7),
first_mb_y_count: __gen_unuint(input[2], 8, 15),
next_slice_group_mb_x_count: __gen_unuint(input[2], 16, 23),
next_slice_group_mb_y_count: __gen_unuint(input[2], 24, 31),
slice_group_qp: __gen_unuint(input[3], 0, 5),
slice_group_skip: __gen_unuint(input[3], 8, 8) != 0,
indirect_pak_bse_data_start_address: (__gen_unuint(input[4], 0, 28) as u64),
grow_init: __gen_unuint(input[5], 0, 3),
grow_resistance: __gen_unuint(input[5], 4, 7),
shrink_init: __gen_unuint(input[5], 8, 11),
shrink_resistance: __gen_unuint(input[5], 12, 15),
qp_max_positive_modifier_magnitude: __gen_unuint(input[5], 16, 23),
qp_max_negative_modifier_magnitude: __gen_unuint(input[5], 24, 31),
correct_1: __gen_unuint(input[6], 0, 3),
correct_2: __gen_unuint(input[6], 4, 7),
correct_3: __gen_unuint(input[6], 8, 11),
correct_4: __gen_unuint(input[6], 12, 15),
correct_5: __gen_unuint(input[6], 16, 19),
correct_6: __gen_unuint(input[6], 20, 23),
cv0: __gen_unuint(input[7], 0, 3),
cv1: __gen_unuint(input[7], 4, 7),
cv2: __gen_unuint(input[7], 8, 11),
cv3: __gen_unuint(input[7], 12, 15),
cv4: __gen_unuint(input[7], 16, 19),
cv5: __gen_unuint(input[7], 20, 23),
cv6: __gen_unuint(input[7], 24, 27),
cv7: __gen_unuint(input[7], 28, 31),
}
}
}
impl Deserialize for MfcMpeg2SlicegroupState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 8];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 8] as *mut [u8; 32]) })?;
Ok((&input).into())
}
}
pub struct MfdAvcBsdObject<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_bsd_data_length: u32,
pub indirect_bsd_data_start_address: A,
pub inline_data: InlineDataDescriptionForMfdAvcBsdObject,
}
impl<A: Addr + Default> MfdAvcBsdObject<A> {
pub const DWORD_LENGTH: u32 = 7;
}
impl<A: Addr + Default> Default for MfdAvcBsdObject<A> {
fn default() -> Self {
MfdAvcBsdObject {
dword_length: 5,
subopcode_b: 8,
subopcode_a: 1,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
indirect_bsd_data_length: Default::default(),
indirect_bsd_data_start_address: Default::default(),
inline_data: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MfdAvcBsdObject<A> {
type Out = [u32; 7];
fn pack_into(&self, out: &mut [u32; 7]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_bsd_data_length, 0, 31);
let v2_address = self.indirect_bsd_data_start_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
{
let [_, _, _, ref mut out3_5 @ .., _] = out;
self.inline_data.pack_into(out3_5);
}
out[6] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 7];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 7] as *const [u8; 28]) })
}
}
impl From<&[u32; 7]> for MfdAvcBsdObject<u64> {
fn from(input: &[u32; 7]) -> Self {
MfdAvcBsdObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_bsd_data_length: __gen_unuint(input[1], 0, 31),
indirect_bsd_data_start_address: (__gen_unuint(input[2], 0, 28) as u64),
inline_data: {{
let [_, _, _, ref in3_5 @ .., _] = input;
in3_5.into()
}},
}
}
}
impl Deserialize for MfdAvcBsdObject<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 7];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 7] as *mut [u8; 28]) })?;
Ok((&input).into())
}
}
pub struct MfdAvcDpbState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub non_existing_frame: [u32; 16],
pub long_term_frame: [u32; 16],
pub used_for_reference: [u32; 16],
pub ltst_frame_number_list: [u32; 16],
pub view_id: [u32; 16],
pub l0_view_order: [u32; 16],
pub l1_view_order: [u32; 16],
}
impl MfdAvcDpbState {
pub const DWORD_LENGTH: u32 = 27;
pub const BOTTOM_FIELD: u32 = 2;
pub const FRAME: u32 = 3;
pub const INVALID: u32 = 1;
pub const LONG_TERM_FRAME: u32 = 1;
pub const NOT_REFERENCE: u32 = 0;
pub const SHORT_TERM_FRAME: u32 = 0;
pub const TOP_FIELD: u32 = 1;
pub const VALID: u32 = 0;
}
impl Default for MfdAvcDpbState {
fn default() -> Self {
MfdAvcDpbState {
dword_length: 9,
subopcode_b: 6,
subopcode_a: 1,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
non_existing_frame: Default::default(),
long_term_frame: Default::default(),
used_for_reference: Default::default(),
ltst_frame_number_list: Default::default(),
view_id: Default::default(),
l0_view_order: Default::default(),
l1_view_order: Default::default(),
}
}
}
impl Serialize for MfdAvcDpbState {
type Out = [u32; 27];
fn pack_into(&self, out: &mut [u32; 27]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.non_existing_frame[0], 0, 0) |
__gen_uint(self.non_existing_frame[1], 1, 1) |
__gen_uint(self.non_existing_frame[2], 2, 2) |
__gen_uint(self.non_existing_frame[3], 3, 3) |
__gen_uint(self.non_existing_frame[4], 4, 4) |
__gen_uint(self.non_existing_frame[5], 5, 5) |
__gen_uint(self.non_existing_frame[6], 6, 6) |
__gen_uint(self.non_existing_frame[7], 7, 7) |
__gen_uint(self.non_existing_frame[8], 8, 8) |
__gen_uint(self.non_existing_frame[9], 9, 9) |
__gen_uint(self.non_existing_frame[10], 10, 10) |
__gen_uint(self.non_existing_frame[11], 11, 11) |
__gen_uint(self.non_existing_frame[12], 12, 12) |
__gen_uint(self.non_existing_frame[13], 13, 13) |
__gen_uint(self.non_existing_frame[14], 14, 14) |
__gen_uint(self.non_existing_frame[15], 15, 15) |
__gen_uint(self.long_term_frame[0], 16, 16) |
__gen_uint(self.long_term_frame[1], 17, 17) |
__gen_uint(self.long_term_frame[2], 18, 18) |
__gen_uint(self.long_term_frame[3], 19, 19) |
__gen_uint(self.long_term_frame[4], 20, 20) |
__gen_uint(self.long_term_frame[5], 21, 21) |
__gen_uint(self.long_term_frame[6], 22, 22) |
__gen_uint(self.long_term_frame[7], 23, 23) |
__gen_uint(self.long_term_frame[8], 24, 24) |
__gen_uint(self.long_term_frame[9], 25, 25) |
__gen_uint(self.long_term_frame[10], 26, 26) |
__gen_uint(self.long_term_frame[11], 27, 27) |
__gen_uint(self.long_term_frame[12], 28, 28) |
__gen_uint(self.long_term_frame[13], 29, 29) |
__gen_uint(self.long_term_frame[14], 30, 30) |
__gen_uint(self.long_term_frame[15], 31, 31);
out[2] = __gen_uint(self.used_for_reference[0], 0, 1) |
__gen_uint(self.used_for_reference[1], 2, 3) |
__gen_uint(self.used_for_reference[2], 4, 5) |
__gen_uint(self.used_for_reference[3], 6, 7) |
__gen_uint(self.used_for_reference[4], 8, 9) |
__gen_uint(self.used_for_reference[5], 10, 11) |
__gen_uint(self.used_for_reference[6], 12, 13) |
__gen_uint(self.used_for_reference[7], 14, 15) |
__gen_uint(self.used_for_reference[8], 16, 17) |
__gen_uint(self.used_for_reference[9], 18, 19) |
__gen_uint(self.used_for_reference[10], 20, 21) |
__gen_uint(self.used_for_reference[11], 22, 23) |
__gen_uint(self.used_for_reference[12], 24, 25) |
__gen_uint(self.used_for_reference[13], 26, 27) |
__gen_uint(self.used_for_reference[14], 28, 29) |
__gen_uint(self.used_for_reference[15], 30, 31);
out[3] = __gen_uint(self.ltst_frame_number_list[0], 0, 15) |
__gen_uint(self.ltst_frame_number_list[1], 16, 31);
out[4] = __gen_uint(self.ltst_frame_number_list[2], 0, 15) |
__gen_uint(self.ltst_frame_number_list[3], 16, 31);
out[5] = __gen_uint(self.ltst_frame_number_list[4], 0, 15) |
__gen_uint(self.ltst_frame_number_list[5], 16, 31);
out[6] = __gen_uint(self.ltst_frame_number_list[6], 0, 15) |
__gen_uint(self.ltst_frame_number_list[7], 16, 31);
out[7] = __gen_uint(self.ltst_frame_number_list[8], 0, 15) |
__gen_uint(self.ltst_frame_number_list[9], 16, 31);
out[8] = __gen_uint(self.ltst_frame_number_list[10], 0, 15) |
__gen_uint(self.ltst_frame_number_list[11], 16, 31);
out[9] = __gen_uint(self.ltst_frame_number_list[12], 0, 15) |
__gen_uint(self.ltst_frame_number_list[13], 16, 31);
out[10] = __gen_uint(self.ltst_frame_number_list[14], 0, 15) |
__gen_uint(self.ltst_frame_number_list[15], 16, 31);
out[11] = __gen_uint(self.view_id[0], 0, 15) |
__gen_uint(self.view_id[1], 16, 31);
out[12] = __gen_uint(self.view_id[2], 0, 15) |
__gen_uint(self.view_id[3], 16, 31);
out[13] = __gen_uint(self.view_id[4], 0, 15) |
__gen_uint(self.view_id[5], 16, 31);
out[14] = __gen_uint(self.view_id[6], 0, 15) |
__gen_uint(self.view_id[7], 16, 31);
out[15] = __gen_uint(self.view_id[8], 0, 15) |
__gen_uint(self.view_id[9], 16, 31);
out[16] = __gen_uint(self.view_id[10], 0, 15) |
__gen_uint(self.view_id[11], 16, 31);
out[17] = __gen_uint(self.view_id[12], 0, 15) |
__gen_uint(self.view_id[13], 16, 31);
out[18] = __gen_uint(self.view_id[14], 0, 15) |
__gen_uint(self.view_id[15], 16, 31);
out[19] = __gen_uint(self.l0_view_order[0], 0, 7) |
__gen_uint(self.l0_view_order[1], 8, 15) |
__gen_uint(self.l0_view_order[2], 16, 23) |
__gen_uint(self.l0_view_order[3], 24, 31);
out[20] = __gen_uint(self.l0_view_order[4], 0, 7) |
__gen_uint(self.l0_view_order[5], 8, 15) |
__gen_uint(self.l0_view_order[6], 16, 23) |
__gen_uint(self.l0_view_order[7], 24, 31);
out[21] = __gen_uint(self.l0_view_order[8], 0, 7) |
__gen_uint(self.l0_view_order[9], 8, 15) |
__gen_uint(self.l0_view_order[10], 16, 23) |
__gen_uint(self.l0_view_order[11], 24, 31);
out[22] = __gen_uint(self.l0_view_order[12], 0, 7) |
__gen_uint(self.l0_view_order[13], 8, 15) |
__gen_uint(self.l0_view_order[14], 16, 23) |
__gen_uint(self.l0_view_order[15], 24, 31);
out[23] = __gen_uint(self.l1_view_order[0], 0, 7) |
__gen_uint(self.l1_view_order[1], 8, 15) |
__gen_uint(self.l1_view_order[2], 16, 23) |
__gen_uint(self.l1_view_order[3], 24, 31);
out[24] = __gen_uint(self.l1_view_order[4], 0, 7) |
__gen_uint(self.l1_view_order[5], 8, 15) |
__gen_uint(self.l1_view_order[6], 16, 23) |
__gen_uint(self.l1_view_order[7], 24, 31);
out[25] = __gen_uint(self.l1_view_order[8], 0, 7) |
__gen_uint(self.l1_view_order[9], 8, 15) |
__gen_uint(self.l1_view_order[10], 16, 23) |
__gen_uint(self.l1_view_order[11], 24, 31);
out[26] = __gen_uint(self.l1_view_order[12], 0, 7) |
__gen_uint(self.l1_view_order[13], 8, 15) |
__gen_uint(self.l1_view_order[14], 16, 23) |
__gen_uint(self.l1_view_order[15], 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 27];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 27] as *const [u8; 108]) })
}
}
impl From<&[u32; 27]> for MfdAvcDpbState {
fn from(input: &[u32; 27]) -> Self {
MfdAvcDpbState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
non_existing_frame: [
__gen_unuint(input[1], 0, 0),
__gen_unuint(input[1], 1, 1),
__gen_unuint(input[1], 2, 2),
__gen_unuint(input[1], 3, 3),
__gen_unuint(input[1], 4, 4),
__gen_unuint(input[1], 5, 5),
__gen_unuint(input[1], 6, 6),
__gen_unuint(input[1], 7, 7),
__gen_unuint(input[1], 8, 8),
__gen_unuint(input[1], 9, 9),
__gen_unuint(input[1], 10, 10),
__gen_unuint(input[1], 11, 11),
__gen_unuint(input[1], 12, 12),
__gen_unuint(input[1], 13, 13),
__gen_unuint(input[1], 14, 14),
__gen_unuint(input[1], 15, 15)
],
long_term_frame: [
__gen_unuint(input[1], 16, 16),
__gen_unuint(input[1], 17, 17),
__gen_unuint(input[1], 18, 18),
__gen_unuint(input[1], 19, 19),
__gen_unuint(input[1], 20, 20),
__gen_unuint(input[1], 21, 21),
__gen_unuint(input[1], 22, 22),
__gen_unuint(input[1], 23, 23),
__gen_unuint(input[1], 24, 24),
__gen_unuint(input[1], 25, 25),
__gen_unuint(input[1], 26, 26),
__gen_unuint(input[1], 27, 27),
__gen_unuint(input[1], 28, 28),
__gen_unuint(input[1], 29, 29),
__gen_unuint(input[1], 30, 30),
__gen_unuint(input[1], 31, 31)
],
used_for_reference: [
__gen_unuint(input[2], 0, 1),
__gen_unuint(input[2], 2, 3),
__gen_unuint(input[2], 4, 5),
__gen_unuint(input[2], 6, 7),
__gen_unuint(input[2], 8, 9),
__gen_unuint(input[2], 10, 11),
__gen_unuint(input[2], 12, 13),
__gen_unuint(input[2], 14, 15),
__gen_unuint(input[2], 16, 17),
__gen_unuint(input[2], 18, 19),
__gen_unuint(input[2], 20, 21),
__gen_unuint(input[2], 22, 23),
__gen_unuint(input[2], 24, 25),
__gen_unuint(input[2], 26, 27),
__gen_unuint(input[2], 28, 29),
__gen_unuint(input[2], 30, 31)
],
ltst_frame_number_list: [
__gen_unuint(input[3], 0, 15),
__gen_unuint(input[3], 16, 31),
__gen_unuint(input[4], 0, 15),
__gen_unuint(input[4], 16, 31),
__gen_unuint(input[5], 0, 15),
__gen_unuint(input[5], 16, 31),
__gen_unuint(input[6], 0, 15),
__gen_unuint(input[6], 16, 31),
__gen_unuint(input[7], 0, 15),
__gen_unuint(input[7], 16, 31),
__gen_unuint(input[8], 0, 15),
__gen_unuint(input[8], 16, 31),
__gen_unuint(input[9], 0, 15),
__gen_unuint(input[9], 16, 31),
__gen_unuint(input[10], 0, 15),
__gen_unuint(input[10], 16, 31)
],
view_id: [
__gen_unuint(input[11], 0, 15),
__gen_unuint(input[11], 16, 31),
__gen_unuint(input[12], 0, 15),
__gen_unuint(input[12], 16, 31),
__gen_unuint(input[13], 0, 15),
__gen_unuint(input[13], 16, 31),
__gen_unuint(input[14], 0, 15),
__gen_unuint(input[14], 16, 31),
__gen_unuint(input[15], 0, 15),
__gen_unuint(input[15], 16, 31),
__gen_unuint(input[16], 0, 15),
__gen_unuint(input[16], 16, 31),
__gen_unuint(input[17], 0, 15),
__gen_unuint(input[17], 16, 31),
__gen_unuint(input[18], 0, 15),
__gen_unuint(input[18], 16, 31)
],
l0_view_order: [
__gen_unuint(input[19], 0, 7),
__gen_unuint(input[19], 8, 15),
__gen_unuint(input[19], 16, 23),
__gen_unuint(input[19], 24, 31),
__gen_unuint(input[20], 0, 7),
__gen_unuint(input[20], 8, 15),
__gen_unuint(input[20], 16, 23),
__gen_unuint(input[20], 24, 31),
__gen_unuint(input[21], 0, 7),
__gen_unuint(input[21], 8, 15),
__gen_unuint(input[21], 16, 23),
__gen_unuint(input[21], 24, 31),
__gen_unuint(input[22], 0, 7),
__gen_unuint(input[22], 8, 15),
__gen_unuint(input[22], 16, 23),
__gen_unuint(input[22], 24, 31)
],
l1_view_order: [
__gen_unuint(input[23], 0, 7),
__gen_unuint(input[23], 8, 15),
__gen_unuint(input[23], 16, 23),
__gen_unuint(input[23], 24, 31),
__gen_unuint(input[24], 0, 7),
__gen_unuint(input[24], 8, 15),
__gen_unuint(input[24], 16, 23),
__gen_unuint(input[24], 24, 31),
__gen_unuint(input[25], 0, 7),
__gen_unuint(input[25], 8, 15),
__gen_unuint(input[25], 16, 23),
__gen_unuint(input[25], 24, 31),
__gen_unuint(input[26], 0, 7),
__gen_unuint(input[26], 8, 15),
__gen_unuint(input[26], 16, 23),
__gen_unuint(input[26], 24, 31)
],
}
}
}
impl Deserialize for MfdAvcDpbState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 27];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 27] as *mut [u8; 108]) })?;
Ok((&input).into())
}
}
pub struct MfdAvcPicidState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub pictureid_remapping_disable: u32,
pub picture_id: [u32; 16],
}
impl MfdAvcPicidState {
pub const DWORD_LENGTH: u32 = 10;
pub const USE_16_BITS_PICTURE_ID: u32 = 0;
pub const USE_4_BITS_FRAMESTOREID: u32 = 1;
}
impl Default for MfdAvcPicidState {
fn default() -> Self {
MfdAvcPicidState {
dword_length: 8,
subopcode_b: 5,
subopcode_a: 1,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
pictureid_remapping_disable: Default::default(),
picture_id: Default::default(),
}
}
}
impl Serialize for MfdAvcPicidState {
type Out = [u32; 10];
fn pack_into(&self, out: &mut [u32; 10]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.pictureid_remapping_disable, 0, 0);
out[2] = __gen_uint(self.picture_id[0], 0, 15) |
__gen_uint(self.picture_id[1], 16, 31);
out[3] = __gen_uint(self.picture_id[2], 0, 15) |
__gen_uint(self.picture_id[3], 16, 31);
out[4] = __gen_uint(self.picture_id[4], 0, 15) |
__gen_uint(self.picture_id[5], 16, 31);
out[5] = __gen_uint(self.picture_id[6], 0, 15) |
__gen_uint(self.picture_id[7], 16, 31);
out[6] = __gen_uint(self.picture_id[8], 0, 15) |
__gen_uint(self.picture_id[9], 16, 31);
out[7] = __gen_uint(self.picture_id[10], 0, 15) |
__gen_uint(self.picture_id[11], 16, 31);
out[8] = __gen_uint(self.picture_id[12], 0, 15) |
__gen_uint(self.picture_id[13], 16, 31);
out[9] = __gen_uint(self.picture_id[14], 0, 15) |
__gen_uint(self.picture_id[15], 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 10];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 10] as *const [u8; 40]) })
}
}
impl From<&[u32; 10]> for MfdAvcPicidState {
fn from(input: &[u32; 10]) -> Self {
MfdAvcPicidState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pictureid_remapping_disable: __gen_unuint(input[1], 0, 0),
picture_id: [
__gen_unuint(input[2], 0, 15),
__gen_unuint(input[2], 16, 31),
__gen_unuint(input[3], 0, 15),
__gen_unuint(input[3], 16, 31),
__gen_unuint(input[4], 0, 15),
__gen_unuint(input[4], 16, 31),
__gen_unuint(input[5], 0, 15),
__gen_unuint(input[5], 16, 31),
__gen_unuint(input[6], 0, 15),
__gen_unuint(input[6], 16, 31),
__gen_unuint(input[7], 0, 15),
__gen_unuint(input[7], 16, 31),
__gen_unuint(input[8], 0, 15),
__gen_unuint(input[8], 16, 31),
__gen_unuint(input[9], 0, 15),
__gen_unuint(input[9], 16, 31)
],
}
}
}
impl Deserialize for MfdAvcPicidState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 10];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 10] as *mut [u8; 40]) })?;
Ok((&input).into())
}
}
pub struct MfdAvcSliceaddr<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_bsd_data_length: u32,
pub indirect_bsd_data_start_address: A,
pub driver_provided_nal_type_value: u32,
pub avc_nal_type_first_byte_override: u32,
}
impl<A: Addr + Default> MfdAvcSliceaddr<A> {
pub const DWORD_LENGTH: u32 = 4;
pub const USE_BITSTREAM_DECODED_NAL_TYPE: u32 = 0;
pub const USE_DRIVER_PROGRAMMED_NAL_TYPE: u32 = 1;
}
impl<A: Addr + Default> Default for MfdAvcSliceaddr<A> {
fn default() -> Self {
MfdAvcSliceaddr {
dword_length: 2,
subopcode_b: 7,
subopcode_a: 1,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
indirect_bsd_data_length: Default::default(),
indirect_bsd_data_start_address: Default::default(),
driver_provided_nal_type_value: Default::default(),
avc_nal_type_first_byte_override: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MfdAvcSliceaddr<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_bsd_data_length, 0, 31);
let v2_address = self.indirect_bsd_data_start_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
out[3] = __gen_uint(self.driver_provided_nal_type_value, 0, 7) |
__gen_uint(self.avc_nal_type_first_byte_override, 8, 8);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MfdAvcSliceaddr<u64> {
fn from(input: &[u32; 4]) -> Self {
MfdAvcSliceaddr {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_bsd_data_length: __gen_unuint(input[1], 0, 31),
indirect_bsd_data_start_address: (__gen_unuint(input[2], 0, 28) as u64),
driver_provided_nal_type_value: __gen_unuint(input[3], 0, 7),
avc_nal_type_first_byte_override: __gen_unuint(input[3], 8, 8),
}
}
}
impl Deserialize for MfdAvcSliceaddr<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MfdItObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_it_mv_data_length: u32,
pub indirect_it_mv_data_start_address_offset: u64,
pub indirect_it_coeff_data_length: u32,
pub indirect_it_coeff_data_start_address_offset: u64,
pub indirect_it_dblk_control_data_length: u32,
pub indirect_it_dblk_control_data_start_address_offset: u64,
}
impl MfdItObject {
pub const DWORD_LENGTH: u32 = 7;
}
impl Default for MfdItObject {
fn default() -> Self {
MfdItObject {
dword_length: 6,
subopcode_b: 9,
subopcode_a: 1,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
indirect_it_mv_data_length: Default::default(),
indirect_it_mv_data_start_address_offset: Default::default(),
indirect_it_coeff_data_length: Default::default(),
indirect_it_coeff_data_start_address_offset: Default::default(),
indirect_it_dblk_control_data_length: Default::default(),
indirect_it_dblk_control_data_start_address_offset: Default::default(),
}
}
}
impl Serialize for MfdItObject {
type Out = [u32; 7];
fn pack_into(&self, out: &mut [u32; 7]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_it_mv_data_length, 0, 9);
out[2] = __gen_offset(self.indirect_it_mv_data_start_address_offset as u32, 0, 28);
out[3] = __gen_uint(self.indirect_it_coeff_data_length, 0, 11);
out[4] = __gen_offset(self.indirect_it_coeff_data_start_address_offset as u32, 0, 28);
out[5] = __gen_uint(self.indirect_it_dblk_control_data_length, 0, 5);
out[6] = __gen_offset(self.indirect_it_dblk_control_data_start_address_offset as u32, 0, 28);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 7];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 7] as *const [u8; 28]) })
}
}
impl From<&[u32; 7]> for MfdItObject {
fn from(input: &[u32; 7]) -> Self {
MfdItObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_it_mv_data_length: __gen_unuint(input[1], 0, 9),
indirect_it_mv_data_start_address_offset: (__gen_unuint(input[2], 0, 28) as u64),
indirect_it_coeff_data_length: __gen_unuint(input[3], 0, 11),
indirect_it_coeff_data_start_address_offset: (__gen_unuint(input[4], 0, 28) as u64),
indirect_it_dblk_control_data_length: __gen_unuint(input[5], 0, 5),
indirect_it_dblk_control_data_start_address_offset: (__gen_unuint(input[6], 0, 28) as u64),
}
}
}
impl Deserialize for MfdItObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 7];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 7] as *mut [u8; 28]) })?;
Ok((&input).into())
}
}
pub struct MfdJpegBsdObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_data_length: u32,
pub indirect_data_start_address: u64,
pub scan_vertical_position: u32,
pub scan_horizontal_position: u32,
pub mcu_count: u32,
pub scan_components: u32,
pub interleaved: bool,
pub restart_interval: u32,
}
impl MfdJpegBsdObject {
pub const DWORD_LENGTH: u32 = 6;
}
impl Default for MfdJpegBsdObject {
fn default() -> Self {
MfdJpegBsdObject {
dword_length: 4,
subopcode_b: 8,
subopcode_a: 1,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
indirect_data_length: Default::default(),
indirect_data_start_address: Default::default(),
scan_vertical_position: Default::default(),
scan_horizontal_position: Default::default(),
mcu_count: Default::default(),
scan_components: Default::default(),
interleaved: Default::default(),
restart_interval: Default::default(),
}
}
}
impl Serialize for MfdJpegBsdObject {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_data_length, 0, 31);
out[2] = __gen_offset(self.indirect_data_start_address as u32, 0, 28);
out[3] = __gen_uint(self.scan_vertical_position, 0, 12) |
__gen_uint(self.scan_horizontal_position, 16, 28);
out[4] = __gen_uint(self.mcu_count, 0, 25) |
__gen_uint(self.scan_components, 27, 29) |
__gen_uint(self.interleaved.into(), 30, 30);
out[5] = __gen_uint(self.restart_interval, 0, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for MfdJpegBsdObject {
fn from(input: &[u32; 6]) -> Self {
MfdJpegBsdObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_data_length: __gen_unuint(input[1], 0, 31),
indirect_data_start_address: (__gen_unuint(input[2], 0, 28) as u64),
scan_vertical_position: __gen_unuint(input[3], 0, 12),
scan_horizontal_position: __gen_unuint(input[3], 16, 28),
mcu_count: __gen_unuint(input[4], 0, 25),
scan_components: __gen_unuint(input[4], 27, 29),
interleaved: __gen_unuint(input[4], 30, 30) != 0,
restart_interval: __gen_unuint(input[5], 0, 15),
}
}
}
impl Deserialize for MfdJpegBsdObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct MfdMpeg2BsdObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_bsd_data_length: u32,
pub indirect_bsd_data_start_address: u64,
pub inline_data: MfdMpeg2BsdObjectInlineDataDescription,
}
impl MfdMpeg2BsdObject {
pub const DWORD_LENGTH: u32 = 5;
}
impl Default for MfdMpeg2BsdObject {
fn default() -> Self {
MfdMpeg2BsdObject {
dword_length: 3,
subopcode_b: 8,
subopcode_a: 1,
media_command_opcode: 3,
pipeline: 2,
command_type: 3,
indirect_bsd_data_length: Default::default(),
indirect_bsd_data_start_address: Default::default(),
inline_data: Default::default(),
}
}
}
impl Serialize for MfdMpeg2BsdObject {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_bsd_data_length, 0, 31);
out[2] = __gen_offset(self.indirect_bsd_data_start_address as u32, 0, 28);
{
let [_, _, _, ref mut out3_4 @ ..] = out;
self.inline_data.pack_into(out3_4);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for MfdMpeg2BsdObject {
fn from(input: &[u32; 5]) -> Self {
MfdMpeg2BsdObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_bsd_data_length: __gen_unuint(input[1], 0, 31),
indirect_bsd_data_start_address: (__gen_unuint(input[2], 0, 28) as u64),
inline_data: {{
let [_, _, _, ref in3_4 @ ..] = input;
in3_4.into()
}},
}
}
}
impl Deserialize for MfdMpeg2BsdObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct MfdMpeg2BsdObjectInlineDataDescription {
pub first_mb_bit_offset: u32,
pub last_mb: bool,
pub last_pic_slice: bool,
pub slice_concealment_type: u32,
pub slice_concealment_override: u32,
pub mb_count: u32,
pub slice_vertical_position: u32,
pub slice_horizontal_position: u32,
pub next_slice_horizontal_position: u32,
pub next_slice_vertical_position: u32,
pub quantizer_scale_code: u32,
}
impl MfdMpeg2BsdObjectInlineDataDescription {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for MfdMpeg2BsdObjectInlineDataDescription {
fn default() -> Self {
MfdMpeg2BsdObjectInlineDataDescription {
first_mb_bit_offset: Default::default(),
last_mb: Default::default(),
last_pic_slice: Default::default(),
slice_concealment_type: Default::default(),
slice_concealment_override: Default::default(),
mb_count: Default::default(),
slice_vertical_position: Default::default(),
slice_horizontal_position: Default::default(),
next_slice_horizontal_position: Default::default(),
next_slice_vertical_position: Default::default(),
quantizer_scale_code: Default::default(),
}
}
}
impl Serialize for MfdMpeg2BsdObjectInlineDataDescription {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.first_mb_bit_offset, 0, 2) |
__gen_uint(self.last_mb.into(), 3, 3) |
__gen_uint(self.last_pic_slice.into(), 5, 5) |
__gen_uint(self.slice_concealment_type, 6, 6) |
__gen_uint(self.slice_concealment_override, 7, 7) |
__gen_uint(self.mb_count, 8, 15) |
__gen_uint(self.slice_vertical_position, 16, 23) |
__gen_uint(self.slice_horizontal_position, 24, 31);
out[1] = __gen_uint(self.next_slice_horizontal_position, 0, 7) |
__gen_uint(self.next_slice_vertical_position, 8, 16) |
__gen_uint(self.quantizer_scale_code, 24, 28);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MfdMpeg2BsdObjectInlineDataDescription {
fn from(input: &[u32; 2]) -> Self {
MfdMpeg2BsdObjectInlineDataDescription {
first_mb_bit_offset: __gen_unuint(input[0], 0, 2),
last_mb: __gen_unuint(input[0], 3, 3) != 0,
last_pic_slice: __gen_unuint(input[0], 5, 5) != 0,
slice_concealment_type: __gen_unuint(input[0], 6, 6),
slice_concealment_override: __gen_unuint(input[0], 7, 7),
mb_count: __gen_unuint(input[0], 8, 15),
slice_vertical_position: __gen_unuint(input[0], 16, 23),
slice_horizontal_position: __gen_unuint(input[0], 24, 31),
next_slice_horizontal_position: __gen_unuint(input[1], 0, 7),
next_slice_vertical_position: __gen_unuint(input[1], 8, 16),
quantizer_scale_code: __gen_unuint(input[1], 24, 28),
}
}
}
impl Deserialize for MfdMpeg2BsdObjectInlineDataDescription {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MfdVc1BsdObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_bsd_data_length: u32,
pub indirect_bsd_data_start_address: u64,
pub next_slice_vertical_position: u32,
pub slice_start_vertical_position: u32,
pub first_mb_bit_offset: u32,
pub emulation_prevention_byte_present: u32,
pub first_mb_byte_offset_of_slice_data_or_slice_header: u32,
}
impl MfdVc1BsdObject {
pub const DWORD_LENGTH: u32 = 5;
}
impl Default for MfdVc1BsdObject {
fn default() -> Self {
MfdVc1BsdObject {
dword_length: 3,
subopcode_b: 8,
subopcode_a: 1,
media_command_opcode: 2,
pipeline: 2,
command_type: 3,
indirect_bsd_data_length: Default::default(),
indirect_bsd_data_start_address: Default::default(),
next_slice_vertical_position: Default::default(),
slice_start_vertical_position: Default::default(),
first_mb_bit_offset: Default::default(),
emulation_prevention_byte_present: Default::default(),
first_mb_byte_offset_of_slice_data_or_slice_header: Default::default(),
}
}
}
impl Serialize for MfdVc1BsdObject {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_bsd_data_length, 0, 23);
out[2] = __gen_offset(self.indirect_bsd_data_start_address as u32, 0, 28);
out[3] = __gen_uint(self.next_slice_vertical_position, 0, 8) |
__gen_uint(self.slice_start_vertical_position, 16, 23);
out[4] = __gen_uint(self.first_mb_bit_offset, 0, 2) |
__gen_uint(self.emulation_prevention_byte_present, 4, 4) |
__gen_uint(self.first_mb_byte_offset_of_slice_data_or_slice_header, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for MfdVc1BsdObject {
fn from(input: &[u32; 5]) -> Self {
MfdVc1BsdObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_bsd_data_length: __gen_unuint(input[1], 0, 23),
indirect_bsd_data_start_address: (__gen_unuint(input[2], 0, 28) as u64),
next_slice_vertical_position: __gen_unuint(input[3], 0, 8),
slice_start_vertical_position: __gen_unuint(input[3], 16, 23),
first_mb_bit_offset: __gen_unuint(input[4], 0, 2),
emulation_prevention_byte_present: __gen_unuint(input[4], 4, 4),
first_mb_byte_offset_of_slice_data_or_slice_header: __gen_unuint(input[4], 16, 31),
}
}
}
impl Deserialize for MfdVc1BsdObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct MfdVc1LongPicState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub picture_width_in_mbs: u32,
pub picture_height_in_mbs: u32,
pub vc1_profile: u32,
pub second_field: bool,
pub overlap_smoothing_enable: bool,
pub loop_filter_enable: bool,
pub range_reduction_enable: bool,
pub range_reduction_scale: u32,
pub mv_mode: u32,
pub sync_marker: bool,
pub interpolation_rounder_control: bool,
pub implicit_quantizer: bool,
pub dmv_surface_valid: bool,
pub bitplane_buffer_pitch: u32,
pub b_scale_factor: u32,
pub pq_value: u32,
pub alternative_pq_value: u32,
pub frame_coding_mode: u32,
pub picure_type: u32,
pub condover: u32,
pub pq_uniform: bool,
pub half_qp: bool,
pub alternative_pq_configuration: u32,
pub alternative_pq_edge_mask: u32,
pub extended_mv_range: u32,
pub extended_dmv_range: u32,
pub forward_reference_distance: u32,
pub backward_reference_distance: u32,
pub number_of_references: u32,
pub reference_field_picture_polarity: u32,
pub fast_uv_motion_compensation: u32,
pub four_mv_switch: u32,
pub unified_mv_mode: u32,
pub coded_block_pattern_table: u32,
pub intra_transform_dc_table: u32,
pub picture_level_transform_chroma_ac_coding_set_index: u32,
pub picture_level_transform_luma_ac_coding_set_index: u32,
pub mb_mode_table: u32,
pub mb_transform_type: bool,
pub picture_level_transform_type: u32,
pub _2_mv_block_pattern_table: u32,
pub _4_mv_block_pattern_table: u32,
pub mv_table: u32,
pub fieldtx_raw: bool,
pub acpred_raw: bool,
pub overflags_raw: bool,
pub directmb_raw: bool,
pub skipmb_raw: bool,
pub mvtypemb_raw: bool,
pub forwardmb_raw: bool,
pub bitplane_buffer_present: bool,
}
impl MfdVc1LongPicState {
pub const DWORD_LENGTH: u32 = 6;
pub const ADVANCED_PROFILE: u32 = 1;
pub const BOTTOM_ODD_FIELD: u32 = 1;
pub const FIELD_PICTURE_WITH_BOTTOM_FIELD_FIRST: u32 = 3;
pub const FIELD_PICTURE_WITH_TOP_FIELD_FIRST: u32 = 2;
pub const INTERLACED_FRAME_PICTURE: u32 = 1;
pub const MIXED_MV: u32 = 0;
pub const NO_ROUNDING: u32 = 0;
pub const ONE_FIELD_REFERENCED: u32 = 0;
pub const ONLY_1_MV: u32 = 0;
pub const PROGRESSIVE_FRAME_PICTURE: u32 = 0;
pub const QUARTER_PEL_OFFSETS_TO_HALF_FULL_PEL_POSITIONS: u32 = 1;
pub const SIMPLE_MAIN_PROFILE: u32 = 0;
pub const TOP_EVEN_FIELD: u32 = 0;
pub const TWO_FIELDS_REFERENCED: u32 = 1;
pub const _1_2_OR_4_MVS: u32 = 1;
pub const _1_MV: u32 = 1;
pub const _1_MV_HALF_PEL: u32 = 2;
pub const _1_MV_HALF_PEL_BILINEAR: u32 = 3;
pub const _4X4_TRANSFORM: u32 = 3;
pub const _4X8_TRANSFORM: u32 = 2;
pub const _8X4_TRANSFORM: u32 = 1;
pub const _8X8_TRANSFORM: u32 = 0;
}
impl Default for MfdVc1LongPicState {
fn default() -> Self {
MfdVc1LongPicState {
dword_length: 4,
subopcode_b: 1,
subopcode_a: 1,
media_command_opcode: 2,
pipeline: 2,
command_type: 3,
picture_width_in_mbs: Default::default(),
picture_height_in_mbs: Default::default(),
vc1_profile: Default::default(),
second_field: Default::default(),
overlap_smoothing_enable: Default::default(),
loop_filter_enable: Default::default(),
range_reduction_enable: Default::default(),
range_reduction_scale: Default::default(),
mv_mode: Default::default(),
sync_marker: Default::default(),
interpolation_rounder_control: Default::default(),
implicit_quantizer: Default::default(),
dmv_surface_valid: Default::default(),
bitplane_buffer_pitch: Default::default(),
b_scale_factor: Default::default(),
pq_value: Default::default(),
alternative_pq_value: Default::default(),
frame_coding_mode: Default::default(),
picure_type: Default::default(),
condover: Default::default(),
pq_uniform: Default::default(),
half_qp: Default::default(),
alternative_pq_configuration: Default::default(),
alternative_pq_edge_mask: Default::default(),
extended_mv_range: Default::default(),
extended_dmv_range: Default::default(),
forward_reference_distance: Default::default(),
backward_reference_distance: Default::default(),
number_of_references: Default::default(),
reference_field_picture_polarity: Default::default(),
fast_uv_motion_compensation: Default::default(),
four_mv_switch: Default::default(),
unified_mv_mode: Default::default(),
coded_block_pattern_table: Default::default(),
intra_transform_dc_table: Default::default(),
picture_level_transform_chroma_ac_coding_set_index: Default::default(),
picture_level_transform_luma_ac_coding_set_index: Default::default(),
mb_mode_table: Default::default(),
mb_transform_type: Default::default(),
picture_level_transform_type: Default::default(),
_2_mv_block_pattern_table: Default::default(),
_4_mv_block_pattern_table: Default::default(),
mv_table: Default::default(),
fieldtx_raw: Default::default(),
acpred_raw: Default::default(),
overflags_raw: Default::default(),
directmb_raw: Default::default(),
skipmb_raw: Default::default(),
mvtypemb_raw: Default::default(),
forwardmb_raw: Default::default(),
bitplane_buffer_present: Default::default(),
}
}
}
impl Serialize for MfdVc1LongPicState {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.picture_width_in_mbs, 0, 7) |
__gen_uint(self.picture_height_in_mbs, 16, 23);
out[2] = __gen_uint(self.vc1_profile, 0, 0) |
__gen_uint(self.second_field.into(), 3, 3) |
__gen_uint(self.overlap_smoothing_enable.into(), 4, 4) |
__gen_uint(self.loop_filter_enable.into(), 5, 5) |
__gen_uint(self.range_reduction_enable.into(), 6, 6) |
__gen_uint(self.range_reduction_scale, 7, 7) |
__gen_uint(self.mv_mode, 8, 11) |
__gen_uint(self.sync_marker.into(), 12, 12) |
__gen_uint(self.interpolation_rounder_control.into(), 13, 13) |
__gen_uint(self.implicit_quantizer.into(), 14, 14) |
__gen_uint(self.dmv_surface_valid.into(), 15, 15) |
__gen_uint(self.bitplane_buffer_pitch, 24, 31);
out[3] = __gen_uint(self.b_scale_factor, 0, 7) |
__gen_uint(self.pq_value, 8, 12) |
__gen_uint(self.alternative_pq_value, 16, 20) |
__gen_uint(self.frame_coding_mode, 24, 25) |
__gen_uint(self.picure_type, 26, 28) |
__gen_uint(self.condover, 29, 30);
out[4] = __gen_uint(self.pq_uniform.into(), 0, 0) |
__gen_uint(self.half_qp.into(), 1, 1) |
__gen_uint(self.alternative_pq_configuration, 2, 3) |
__gen_uint(self.alternative_pq_edge_mask, 4, 7) |
__gen_uint(self.extended_mv_range, 8, 9) |
__gen_uint(self.extended_dmv_range, 10, 11) |
__gen_uint(self.forward_reference_distance, 16, 19) |
__gen_uint(self.backward_reference_distance, 20, 23) |
__gen_uint(self.number_of_references, 24, 24) |
__gen_uint(self.reference_field_picture_polarity, 25, 25) |
__gen_uint(self.fast_uv_motion_compensation, 26, 26) |
__gen_uint(self.four_mv_switch, 27, 27) |
__gen_uint(self.unified_mv_mode, 28, 29);
out[5] = __gen_uint(self.coded_block_pattern_table, 0, 2) |
__gen_uint(self.intra_transform_dc_table, 3, 3) |
__gen_uint(self.picture_level_transform_chroma_ac_coding_set_index, 4, 5) |
__gen_uint(self.picture_level_transform_luma_ac_coding_set_index, 6, 7) |
__gen_uint(self.mb_mode_table, 8, 10) |
__gen_uint(self.mb_transform_type.into(), 11, 11) |
__gen_uint(self.picture_level_transform_type, 12, 13) |
__gen_uint(self._2_mv_block_pattern_table, 16, 17) |
__gen_uint(self._4_mv_block_pattern_table, 18, 19) |
__gen_uint(self.mv_table, 20, 22) |
__gen_uint(self.fieldtx_raw.into(), 24, 24) |
__gen_uint(self.acpred_raw.into(), 25, 25) |
__gen_uint(self.overflags_raw.into(), 26, 26) |
__gen_uint(self.directmb_raw.into(), 27, 27) |
__gen_uint(self.skipmb_raw.into(), 28, 28) |
__gen_uint(self.mvtypemb_raw.into(), 29, 29) |
__gen_uint(self.forwardmb_raw.into(), 30, 30) |
__gen_uint(self.bitplane_buffer_present.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for MfdVc1LongPicState {
fn from(input: &[u32; 6]) -> Self {
MfdVc1LongPicState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
picture_width_in_mbs: __gen_unuint(input[1], 0, 7),
picture_height_in_mbs: __gen_unuint(input[1], 16, 23),
vc1_profile: __gen_unuint(input[2], 0, 0),
second_field: __gen_unuint(input[2], 3, 3) != 0,
overlap_smoothing_enable: __gen_unuint(input[2], 4, 4) != 0,
loop_filter_enable: __gen_unuint(input[2], 5, 5) != 0,
range_reduction_enable: __gen_unuint(input[2], 6, 6) != 0,
range_reduction_scale: __gen_unuint(input[2], 7, 7),
mv_mode: __gen_unuint(input[2], 8, 11),
sync_marker: __gen_unuint(input[2], 12, 12) != 0,
interpolation_rounder_control: __gen_unuint(input[2], 13, 13) != 0,
implicit_quantizer: __gen_unuint(input[2], 14, 14) != 0,
dmv_surface_valid: __gen_unuint(input[2], 15, 15) != 0,
bitplane_buffer_pitch: __gen_unuint(input[2], 24, 31),
b_scale_factor: __gen_unuint(input[3], 0, 7),
pq_value: __gen_unuint(input[3], 8, 12),
alternative_pq_value: __gen_unuint(input[3], 16, 20),
frame_coding_mode: __gen_unuint(input[3], 24, 25),
picure_type: __gen_unuint(input[3], 26, 28),
condover: __gen_unuint(input[3], 29, 30),
pq_uniform: __gen_unuint(input[4], 0, 0) != 0,
half_qp: __gen_unuint(input[4], 1, 1) != 0,
alternative_pq_configuration: __gen_unuint(input[4], 2, 3),
alternative_pq_edge_mask: __gen_unuint(input[4], 4, 7),
extended_mv_range: __gen_unuint(input[4], 8, 9),
extended_dmv_range: __gen_unuint(input[4], 10, 11),
forward_reference_distance: __gen_unuint(input[4], 16, 19),
backward_reference_distance: __gen_unuint(input[4], 20, 23),
number_of_references: __gen_unuint(input[4], 24, 24),
reference_field_picture_polarity: __gen_unuint(input[4], 25, 25),
fast_uv_motion_compensation: __gen_unuint(input[4], 26, 26),
four_mv_switch: __gen_unuint(input[4], 27, 27),
unified_mv_mode: __gen_unuint(input[4], 28, 29),
coded_block_pattern_table: __gen_unuint(input[5], 0, 2),
intra_transform_dc_table: __gen_unuint(input[5], 3, 3),
picture_level_transform_chroma_ac_coding_set_index: __gen_unuint(input[5], 4, 5),
picture_level_transform_luma_ac_coding_set_index: __gen_unuint(input[5], 6, 7),
mb_mode_table: __gen_unuint(input[5], 8, 10),
mb_transform_type: __gen_unuint(input[5], 11, 11) != 0,
picture_level_transform_type: __gen_unuint(input[5], 12, 13),
_2_mv_block_pattern_table: __gen_unuint(input[5], 16, 17),
_4_mv_block_pattern_table: __gen_unuint(input[5], 18, 19),
mv_table: __gen_unuint(input[5], 20, 22),
fieldtx_raw: __gen_unuint(input[5], 24, 24) != 0,
acpred_raw: __gen_unuint(input[5], 25, 25) != 0,
overflags_raw: __gen_unuint(input[5], 26, 26) != 0,
directmb_raw: __gen_unuint(input[5], 27, 27) != 0,
skipmb_raw: __gen_unuint(input[5], 28, 28) != 0,
mvtypemb_raw: __gen_unuint(input[5], 29, 29) != 0,
forwardmb_raw: __gen_unuint(input[5], 30, 30) != 0,
bitplane_buffer_present: __gen_unuint(input[5], 31, 31) != 0,
}
}
}
impl Deserialize for MfdVc1LongPicState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct MfdVc1ShortPicState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub picture_width: u32,
pub picture_height: u32,
pub picture_structure: u32,
pub second_field: bool,
pub intra_picture: bool,
pub backward_prediction_present: bool,
pub vc1_profile: u32,
pub dmv_surface_valid: bool,
pub mv_mode: u32,
pub interpolation_rounder_control: bool,
pub bitplane_buffer_pitch: u32,
pub variable_sized_transform_coding: bool,
pub dquant: u32,
pub extended_mv_present: bool,
pub fast_uv_motion_compensation: u32,
pub loop_filter_enable: bool,
pub refdist_flag: bool,
pub panscan_present: bool,
pub maxbframes: u32,
pub rangered_present: bool,
pub syncmarker_present: bool,
pub multires_present: bool,
pub quantizer: u32,
pub p_pic_ref_distance: u32,
pub progressive_pic_type: u32,
pub range_reduction_enable: u32,
pub range_reduction_scale: u32,
pub overlap_smoothing_enable: bool,
pub extended_dmv_present: bool,
pub psf: bool,
pub refpic: bool,
pub finterflag: bool,
pub tfcntrflag: bool,
pub interlace: bool,
pub pulldown: bool,
pub postproc: bool,
pub _4_mv_allowed: bool,
pub bfraction_enumeration: u32,
}
impl MfdVc1ShortPicState {
pub const DWORD_LENGTH: u32 = 5;
pub const ADVANCED_PROFILE: u32 = 1;
pub const NO_ROUNDING: u32 = 0;
pub const QUARTER_PEL_OFFSETS_TO_HALF_FULL_PEL_POSITIONS: u32 = 1;
pub const SIMPLE_MAIN_PROFILE: u32 = 0;
}
impl Default for MfdVc1ShortPicState {
fn default() -> Self {
MfdVc1ShortPicState {
dword_length: 3,
subopcode_b: 0,
subopcode_a: 1,
media_command_opcode: 2,
pipeline: 2,
command_type: 3,
picture_width: Default::default(),
picture_height: Default::default(),
picture_structure: Default::default(),
second_field: Default::default(),
intra_picture: Default::default(),
backward_prediction_present: Default::default(),
vc1_profile: Default::default(),
dmv_surface_valid: Default::default(),
mv_mode: Default::default(),
interpolation_rounder_control: Default::default(),
bitplane_buffer_pitch: Default::default(),
variable_sized_transform_coding: Default::default(),
dquant: Default::default(),
extended_mv_present: Default::default(),
fast_uv_motion_compensation: Default::default(),
loop_filter_enable: Default::default(),
refdist_flag: Default::default(),
panscan_present: Default::default(),
maxbframes: Default::default(),
rangered_present: Default::default(),
syncmarker_present: Default::default(),
multires_present: Default::default(),
quantizer: Default::default(),
p_pic_ref_distance: Default::default(),
progressive_pic_type: Default::default(),
range_reduction_enable: Default::default(),
range_reduction_scale: Default::default(),
overlap_smoothing_enable: Default::default(),
extended_dmv_present: Default::default(),
psf: Default::default(),
refpic: Default::default(),
finterflag: Default::default(),
tfcntrflag: Default::default(),
interlace: Default::default(),
pulldown: Default::default(),
postproc: Default::default(),
_4_mv_allowed: Default::default(),
bfraction_enumeration: Default::default(),
}
}
}
impl Serialize for MfdVc1ShortPicState {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.picture_width, 0, 7) |
__gen_uint(self.picture_height, 16, 23);
out[2] = __gen_uint(self.picture_structure, 0, 1) |
__gen_uint(self.second_field.into(), 3, 3) |
__gen_uint(self.intra_picture.into(), 4, 4) |
__gen_uint(self.backward_prediction_present.into(), 5, 5) |
__gen_uint(self.vc1_profile, 11, 11) |
__gen_uint(self.dmv_surface_valid.into(), 15, 15) |
__gen_uint(self.mv_mode, 16, 19) |
__gen_uint(self.interpolation_rounder_control.into(), 23, 23) |
__gen_uint(self.bitplane_buffer_pitch, 24, 31);
out[3] = __gen_uint(self.variable_sized_transform_coding.into(), 0, 0) |
__gen_uint(self.dquant, 1, 2) |
__gen_uint(self.extended_mv_present.into(), 3, 3) |
__gen_uint(self.fast_uv_motion_compensation, 4, 4) |
__gen_uint(self.loop_filter_enable.into(), 5, 5) |
__gen_uint(self.refdist_flag.into(), 6, 6) |
__gen_uint(self.panscan_present.into(), 7, 7) |
__gen_uint(self.maxbframes, 8, 10) |
__gen_uint(self.rangered_present.into(), 11, 11) |
__gen_uint(self.syncmarker_present.into(), 12, 12) |
__gen_uint(self.multires_present.into(), 13, 13) |
__gen_uint(self.quantizer, 14, 15) |
__gen_uint(self.p_pic_ref_distance, 16, 20) |
__gen_uint(self.progressive_pic_type, 22, 23) |
__gen_uint(self.range_reduction_enable, 28, 28) |
__gen_uint(self.range_reduction_scale, 29, 29) |
__gen_uint(self.overlap_smoothing_enable.into(), 30, 30);
out[4] = __gen_uint(self.extended_dmv_present.into(), 0, 0) |
__gen_uint(self.psf.into(), 1, 1) |
__gen_uint(self.refpic.into(), 2, 2) |
__gen_uint(self.finterflag.into(), 3, 3) |
__gen_uint(self.tfcntrflag.into(), 4, 4) |
__gen_uint(self.interlace.into(), 5, 5) |
__gen_uint(self.pulldown.into(), 6, 6) |
__gen_uint(self.postproc.into(), 7, 7) |
__gen_uint(self._4_mv_allowed.into(), 8, 8) |
__gen_uint(self.bfraction_enumeration, 24, 28);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for MfdVc1ShortPicState {
fn from(input: &[u32; 5]) -> Self {
MfdVc1ShortPicState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
picture_width: __gen_unuint(input[1], 0, 7),
picture_height: __gen_unuint(input[1], 16, 23),
picture_structure: __gen_unuint(input[2], 0, 1),
second_field: __gen_unuint(input[2], 3, 3) != 0,
intra_picture: __gen_unuint(input[2], 4, 4) != 0,
backward_prediction_present: __gen_unuint(input[2], 5, 5) != 0,
vc1_profile: __gen_unuint(input[2], 11, 11),
dmv_surface_valid: __gen_unuint(input[2], 15, 15) != 0,
mv_mode: __gen_unuint(input[2], 16, 19),
interpolation_rounder_control: __gen_unuint(input[2], 23, 23) != 0,
bitplane_buffer_pitch: __gen_unuint(input[2], 24, 31),
variable_sized_transform_coding: __gen_unuint(input[3], 0, 0) != 0,
dquant: __gen_unuint(input[3], 1, 2),
extended_mv_present: __gen_unuint(input[3], 3, 3) != 0,
fast_uv_motion_compensation: __gen_unuint(input[3], 4, 4),
loop_filter_enable: __gen_unuint(input[3], 5, 5) != 0,
refdist_flag: __gen_unuint(input[3], 6, 6) != 0,
panscan_present: __gen_unuint(input[3], 7, 7) != 0,
maxbframes: __gen_unuint(input[3], 8, 10),
rangered_present: __gen_unuint(input[3], 11, 11) != 0,
syncmarker_present: __gen_unuint(input[3], 12, 12) != 0,
multires_present: __gen_unuint(input[3], 13, 13) != 0,
quantizer: __gen_unuint(input[3], 14, 15),
p_pic_ref_distance: __gen_unuint(input[3], 16, 20),
progressive_pic_type: __gen_unuint(input[3], 22, 23),
range_reduction_enable: __gen_unuint(input[3], 28, 28),
range_reduction_scale: __gen_unuint(input[3], 29, 29),
overlap_smoothing_enable: __gen_unuint(input[3], 30, 30) != 0,
extended_dmv_present: __gen_unuint(input[4], 0, 0) != 0,
psf: __gen_unuint(input[4], 1, 1) != 0,
refpic: __gen_unuint(input[4], 2, 2) != 0,
finterflag: __gen_unuint(input[4], 3, 3) != 0,
tfcntrflag: __gen_unuint(input[4], 4, 4) != 0,
interlace: __gen_unuint(input[4], 5, 5) != 0,
pulldown: __gen_unuint(input[4], 6, 6) != 0,
postproc: __gen_unuint(input[4], 7, 7) != 0,
_4_mv_allowed: __gen_unuint(input[4], 8, 8) != 0,
bfraction_enumeration: __gen_unuint(input[4], 24, 28),
}
}
}
impl Deserialize for MfdVc1ShortPicState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct MfdVp8BsdObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub partition0_first_mb_bit_offset_from_frame_header: u32,
pub coded_num_of_coeff_token_partitions: u32,
pub partition0_cpbac_entropy_range: u32,
pub partition0_cpbac_entropy_count: u32,
pub partition0_cpbac_entropy_value: u32,
pub indirect_partition0_data_length: u32,
pub indirect_partition0_data_start_offset: u32,
pub indirect_partition1_data_length: u32,
pub indirect_partition1_data_start_offset: u32,
pub indirect_partition2_data_length: u32,
pub indirect_partition2_data_start_offset: u32,
pub indirect_partition3_data_length: u32,
pub indirect_partition3_data_start_offset: u32,
pub indirect_partition4_data_length: u32,
pub indirect_partition4_data_start_offset: u32,
pub indirect_partition5_data_length: u32,
pub indirect_partition5_data_start_offset: u32,
pub indirect_partition6_data_length: u32,
pub indirect_partition6_data_start_offset: u32,
pub indirect_partition7_data_length: u32,
pub indirect_partition7_data_start_offset: u32,
pub indirect_partition8_data_length: u32,
pub indirect_partition8_data_start_offset: u32,
pub mb_header_error_handling: u32,
pub entropy_error_handling: u32,
pub mpr_error_mv_out_of_range_handling: u32,
pub bsd_premature_complete_error_handling: u32,
pub concealment_picture_id: u32,
pub concealment_method: u32,
}
impl MfdVp8BsdObject {
pub const DWORD_LENGTH: u32 = 22;
pub const INTER_P_COPY: u32 = 1;
pub const INTRA_16X16_PREDICTION: u32 = 0;
}
impl Default for MfdVp8BsdObject {
fn default() -> Self {
MfdVp8BsdObject {
dword_length: 20,
subopcode_b: 8,
subopcode_a: 1,
media_command_opcode: 4,
pipeline: 2,
command_type: 3,
partition0_first_mb_bit_offset_from_frame_header: Default::default(),
coded_num_of_coeff_token_partitions: Default::default(),
partition0_cpbac_entropy_range: Default::default(),
partition0_cpbac_entropy_count: Default::default(),
partition0_cpbac_entropy_value: Default::default(),
indirect_partition0_data_length: Default::default(),
indirect_partition0_data_start_offset: Default::default(),
indirect_partition1_data_length: Default::default(),
indirect_partition1_data_start_offset: Default::default(),
indirect_partition2_data_length: Default::default(),
indirect_partition2_data_start_offset: Default::default(),
indirect_partition3_data_length: Default::default(),
indirect_partition3_data_start_offset: Default::default(),
indirect_partition4_data_length: Default::default(),
indirect_partition4_data_start_offset: Default::default(),
indirect_partition5_data_length: Default::default(),
indirect_partition5_data_start_offset: Default::default(),
indirect_partition6_data_length: Default::default(),
indirect_partition6_data_start_offset: Default::default(),
indirect_partition7_data_length: Default::default(),
indirect_partition7_data_start_offset: Default::default(),
indirect_partition8_data_length: Default::default(),
indirect_partition8_data_start_offset: Default::default(),
mb_header_error_handling: Default::default(),
entropy_error_handling: Default::default(),
mpr_error_mv_out_of_range_handling: Default::default(),
bsd_premature_complete_error_handling: Default::default(),
concealment_picture_id: Default::default(),
concealment_method: Default::default(),
}
}
}
impl Serialize for MfdVp8BsdObject {
type Out = [u32; 22];
fn pack_into(&self, out: &mut [u32; 22]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.partition0_first_mb_bit_offset_from_frame_header, 0, 2) |
__gen_uint(self.coded_num_of_coeff_token_partitions, 4, 5) |
__gen_uint(self.partition0_cpbac_entropy_range, 8, 15) |
__gen_uint(self.partition0_cpbac_entropy_count, 16, 20);
out[2] = __gen_uint(self.partition0_cpbac_entropy_value, 24, 31);
out[3] = __gen_uint(self.indirect_partition0_data_length, 0, 23);
out[4] = __gen_uint(self.indirect_partition0_data_start_offset, 0, 31);
out[5] = __gen_uint(self.indirect_partition1_data_length, 0, 23);
out[6] = __gen_uint(self.indirect_partition1_data_start_offset, 0, 31);
out[7] = __gen_uint(self.indirect_partition2_data_length, 0, 23);
out[8] = __gen_uint(self.indirect_partition2_data_start_offset, 0, 31);
out[9] = __gen_uint(self.indirect_partition3_data_length, 0, 23);
out[10] = __gen_uint(self.indirect_partition3_data_start_offset, 0, 31);
out[11] = __gen_uint(self.indirect_partition4_data_length, 0, 23);
out[12] = __gen_uint(self.indirect_partition4_data_start_offset, 0, 31);
out[13] = __gen_uint(self.indirect_partition5_data_length, 0, 23);
out[14] = __gen_uint(self.indirect_partition5_data_start_offset, 0, 31);
out[15] = __gen_uint(self.indirect_partition6_data_length, 0, 23);
out[16] = __gen_uint(self.indirect_partition6_data_start_offset, 0, 31);
out[17] = __gen_uint(self.indirect_partition7_data_length, 0, 23);
out[18] = __gen_uint(self.indirect_partition7_data_start_offset, 0, 31);
out[19] = __gen_uint(self.indirect_partition8_data_length, 0, 23);
out[20] = __gen_uint(self.indirect_partition8_data_start_offset, 0, 31);
out[21] = __gen_uint(self.mb_header_error_handling, 8, 8) |
__gen_uint(self.entropy_error_handling, 10, 10) |
__gen_uint(self.mpr_error_mv_out_of_range_handling, 12, 12) |
__gen_uint(self.bsd_premature_complete_error_handling, 14, 14) |
__gen_uint(self.concealment_picture_id, 16, 17) |
__gen_uint(self.concealment_method, 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 22];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 22] as *const [u8; 88]) })
}
}
impl From<&[u32; 22]> for MfdVp8BsdObject {
fn from(input: &[u32; 22]) -> Self {
MfdVp8BsdObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
partition0_first_mb_bit_offset_from_frame_header: __gen_unuint(input[1], 0, 2),
coded_num_of_coeff_token_partitions: __gen_unuint(input[1], 4, 5),
partition0_cpbac_entropy_range: __gen_unuint(input[1], 8, 15),
partition0_cpbac_entropy_count: __gen_unuint(input[1], 16, 20),
partition0_cpbac_entropy_value: __gen_unuint(input[2], 24, 31),
indirect_partition0_data_length: __gen_unuint(input[3], 0, 23),
indirect_partition0_data_start_offset: __gen_unuint(input[4], 0, 31),
indirect_partition1_data_length: __gen_unuint(input[5], 0, 23),
indirect_partition1_data_start_offset: __gen_unuint(input[6], 0, 31),
indirect_partition2_data_length: __gen_unuint(input[7], 0, 23),
indirect_partition2_data_start_offset: __gen_unuint(input[8], 0, 31),
indirect_partition3_data_length: __gen_unuint(input[9], 0, 23),
indirect_partition3_data_start_offset: __gen_unuint(input[10], 0, 31),
indirect_partition4_data_length: __gen_unuint(input[11], 0, 23),
indirect_partition4_data_start_offset: __gen_unuint(input[12], 0, 31),
indirect_partition5_data_length: __gen_unuint(input[13], 0, 23),
indirect_partition5_data_start_offset: __gen_unuint(input[14], 0, 31),
indirect_partition6_data_length: __gen_unuint(input[15], 0, 23),
indirect_partition6_data_start_offset: __gen_unuint(input[16], 0, 31),
indirect_partition7_data_length: __gen_unuint(input[17], 0, 23),
indirect_partition7_data_start_offset: __gen_unuint(input[18], 0, 31),
indirect_partition8_data_length: __gen_unuint(input[19], 0, 23),
indirect_partition8_data_start_offset: __gen_unuint(input[20], 0, 31),
mb_header_error_handling: __gen_unuint(input[21], 8, 8),
entropy_error_handling: __gen_unuint(input[21], 10, 10),
mpr_error_mv_out_of_range_handling: __gen_unuint(input[21], 12, 12),
bsd_premature_complete_error_handling: __gen_unuint(input[21], 14, 14),
concealment_picture_id: __gen_unuint(input[21], 16, 17),
concealment_method: __gen_unuint(input[21], 31, 31),
}
}
}
impl Deserialize for MfdVp8BsdObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 22];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 22] as *mut [u8; 88]) })?;
Ok((&input).into())
}
}
pub struct MfxAvcDirectmodeState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub direct_mv_buffer_address: [A; 16],
pub direct_mv_buffer_attributes: Memoryaddressattributes,
pub direct_mv_buffer_write_address: A,
pub direct_mv_buffer_write_attributes: Memoryaddressattributes,
pub poc_list: [u32; 34],
}
impl<A: Addr + Default> MfxAvcDirectmodeState<A> {
pub const DWORD_LENGTH: u32 = 71;
}
impl<A: Addr + Default> Default for MfxAvcDirectmodeState<A> {
fn default() -> Self {
MfxAvcDirectmodeState {
dword_length: 69,
subopcode_b: 2,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
direct_mv_buffer_address: Default::default(),
direct_mv_buffer_attributes: Default::default(),
direct_mv_buffer_write_address: Default::default(),
direct_mv_buffer_write_attributes: Default::default(),
poc_list: [0; 34],
}
}
}
impl<A: Addr + Default> Serialize for MfxAvcDirectmodeState<A> {
type Out = [u32; 71];
fn pack_into(&self, out: &mut [u32; 71]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.direct_mv_buffer_address[0].combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
let v3_address = self.direct_mv_buffer_address[1].combine(0);
out[3] = v3_address as u32;
out[4] = (v3_address >> 32) as u32;
let v5_address = self.direct_mv_buffer_address[2].combine(0);
out[5] = v5_address as u32;
out[6] = (v5_address >> 32) as u32;
let v7_address = self.direct_mv_buffer_address[3].combine(0);
out[7] = v7_address as u32;
out[8] = (v7_address >> 32) as u32;
let v9_address = self.direct_mv_buffer_address[4].combine(0);
out[9] = v9_address as u32;
out[10] = (v9_address >> 32) as u32;
let v11_address = self.direct_mv_buffer_address[5].combine(0);
out[11] = v11_address as u32;
out[12] = (v11_address >> 32) as u32;
let v13_address = self.direct_mv_buffer_address[6].combine(0);
out[13] = v13_address as u32;
out[14] = (v13_address >> 32) as u32;
let v15_address = self.direct_mv_buffer_address[7].combine(0);
out[15] = v15_address as u32;
out[16] = (v15_address >> 32) as u32;
let v17_address = self.direct_mv_buffer_address[8].combine(0);
out[17] = v17_address as u32;
out[18] = (v17_address >> 32) as u32;
let v19_address = self.direct_mv_buffer_address[9].combine(0);
out[19] = v19_address as u32;
out[20] = (v19_address >> 32) as u32;
let v21_address = self.direct_mv_buffer_address[10].combine(0);
out[21] = v21_address as u32;
out[22] = (v21_address >> 32) as u32;
let v23_address = self.direct_mv_buffer_address[11].combine(0);
out[23] = v23_address as u32;
out[24] = (v23_address >> 32) as u32;
let v25_address = self.direct_mv_buffer_address[12].combine(0);
out[25] = v25_address as u32;
out[26] = (v25_address >> 32) as u32;
let v27_address = self.direct_mv_buffer_address[13].combine(0);
out[27] = v27_address as u32;
out[28] = (v27_address >> 32) as u32;
let v29_address = self.direct_mv_buffer_address[14].combine(0);
out[29] = v29_address as u32;
out[30] = (v29_address >> 32) as u32;
let v31_address = self.direct_mv_buffer_address[15].combine(0);
out[31] = v31_address as u32;
out[32] = (v31_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.direct_mv_buffer_attributes.pack_into(out33);
}
let v34_address = self.direct_mv_buffer_write_address.combine(0);
out[34] = v34_address as u32;
out[35] = (v34_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out36 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.direct_mv_buffer_write_attributes.pack_into(out36);
}
out[37] = __gen_uint(self.poc_list[0], 0, 31);
out[38] = __gen_uint(self.poc_list[1], 0, 31);
out[39] = __gen_uint(self.poc_list[2], 0, 31);
out[40] = __gen_uint(self.poc_list[3], 0, 31);
out[41] = __gen_uint(self.poc_list[4], 0, 31);
out[42] = __gen_uint(self.poc_list[5], 0, 31);
out[43] = __gen_uint(self.poc_list[6], 0, 31);
out[44] = __gen_uint(self.poc_list[7], 0, 31);
out[45] = __gen_uint(self.poc_list[8], 0, 31);
out[46] = __gen_uint(self.poc_list[9], 0, 31);
out[47] = __gen_uint(self.poc_list[10], 0, 31);
out[48] = __gen_uint(self.poc_list[11], 0, 31);
out[49] = __gen_uint(self.poc_list[12], 0, 31);
out[50] = __gen_uint(self.poc_list[13], 0, 31);
out[51] = __gen_uint(self.poc_list[14], 0, 31);
out[52] = __gen_uint(self.poc_list[15], 0, 31);
out[53] = __gen_uint(self.poc_list[16], 0, 31);
out[54] = __gen_uint(self.poc_list[17], 0, 31);
out[55] = __gen_uint(self.poc_list[18], 0, 31);
out[56] = __gen_uint(self.poc_list[19], 0, 31);
out[57] = __gen_uint(self.poc_list[20], 0, 31);
out[58] = __gen_uint(self.poc_list[21], 0, 31);
out[59] = __gen_uint(self.poc_list[22], 0, 31);
out[60] = __gen_uint(self.poc_list[23], 0, 31);
out[61] = __gen_uint(self.poc_list[24], 0, 31);
out[62] = __gen_uint(self.poc_list[25], 0, 31);
out[63] = __gen_uint(self.poc_list[26], 0, 31);
out[64] = __gen_uint(self.poc_list[27], 0, 31);
out[65] = __gen_uint(self.poc_list[28], 0, 31);
out[66] = __gen_uint(self.poc_list[29], 0, 31);
out[67] = __gen_uint(self.poc_list[30], 0, 31);
out[68] = __gen_uint(self.poc_list[31], 0, 31);
out[69] = __gen_uint(self.poc_list[32], 0, 31);
out[70] = __gen_uint(self.poc_list[33], 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 71];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 71] as *const [u8; 284]) })
}
}
impl From<&[u32; 71]> for MfxAvcDirectmodeState<u64> {
fn from(input: &[u32; 71]) -> Self {
MfxAvcDirectmodeState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
direct_mv_buffer_address: [
(__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
(__gen_unuint(input[3], 0, 31) as u64) |
(__gen_unuint(input[4], 0, 31) as u64) << 32,
(__gen_unuint(input[5], 0, 31) as u64) |
(__gen_unuint(input[6], 0, 31) as u64) << 32,
(__gen_unuint(input[7], 0, 31) as u64) |
(__gen_unuint(input[8], 0, 31) as u64) << 32,
(__gen_unuint(input[9], 0, 31) as u64) |
(__gen_unuint(input[10], 0, 31) as u64) << 32,
(__gen_unuint(input[11], 0, 31) as u64) |
(__gen_unuint(input[12], 0, 31) as u64) << 32,
(__gen_unuint(input[13], 0, 31) as u64) |
(__gen_unuint(input[14], 0, 31) as u64) << 32,
(__gen_unuint(input[15], 0, 31) as u64) |
(__gen_unuint(input[16], 0, 31) as u64) << 32,
(__gen_unuint(input[17], 0, 31) as u64) |
(__gen_unuint(input[18], 0, 31) as u64) << 32,
(__gen_unuint(input[19], 0, 31) as u64) |
(__gen_unuint(input[20], 0, 31) as u64) << 32,
(__gen_unuint(input[21], 0, 31) as u64) |
(__gen_unuint(input[22], 0, 31) as u64) << 32,
(__gen_unuint(input[23], 0, 31) as u64) |
(__gen_unuint(input[24], 0, 31) as u64) << 32,
(__gen_unuint(input[25], 0, 31) as u64) |
(__gen_unuint(input[26], 0, 31) as u64) << 32,
(__gen_unuint(input[27], 0, 31) as u64) |
(__gen_unuint(input[28], 0, 31) as u64) << 32,
(__gen_unuint(input[29], 0, 31) as u64) |
(__gen_unuint(input[30], 0, 31) as u64) << 32,
(__gen_unuint(input[31], 0, 31) as u64) |
(__gen_unuint(input[32], 0, 31) as u64) << 32
],
direct_mv_buffer_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in33.into()
}},
direct_mv_buffer_write_address: (__gen_unuint(input[34], 0, 31) as u64) |
(__gen_unuint(input[35], 0, 31) as u64) << 32,
direct_mv_buffer_write_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in36 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in36.into()
}},
poc_list: [
__gen_unuint(input[37], 0, 31),
__gen_unuint(input[38], 0, 31),
__gen_unuint(input[39], 0, 31),
__gen_unuint(input[40], 0, 31),
__gen_unuint(input[41], 0, 31),
__gen_unuint(input[42], 0, 31),
__gen_unuint(input[43], 0, 31),
__gen_unuint(input[44], 0, 31),
__gen_unuint(input[45], 0, 31),
__gen_unuint(input[46], 0, 31),
__gen_unuint(input[47], 0, 31),
__gen_unuint(input[48], 0, 31),
__gen_unuint(input[49], 0, 31),
__gen_unuint(input[50], 0, 31),
__gen_unuint(input[51], 0, 31),
__gen_unuint(input[52], 0, 31),
__gen_unuint(input[53], 0, 31),
__gen_unuint(input[54], 0, 31),
__gen_unuint(input[55], 0, 31),
__gen_unuint(input[56], 0, 31),
__gen_unuint(input[57], 0, 31),
__gen_unuint(input[58], 0, 31),
__gen_unuint(input[59], 0, 31),
__gen_unuint(input[60], 0, 31),
__gen_unuint(input[61], 0, 31),
__gen_unuint(input[62], 0, 31),
__gen_unuint(input[63], 0, 31),
__gen_unuint(input[64], 0, 31),
__gen_unuint(input[65], 0, 31),
__gen_unuint(input[66], 0, 31),
__gen_unuint(input[67], 0, 31),
__gen_unuint(input[68], 0, 31),
__gen_unuint(input[69], 0, 31),
__gen_unuint(input[70], 0, 31)
],
}
}
}
impl Deserialize for MfxAvcDirectmodeState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 71];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 71] as *mut [u8; 284]) })?;
Ok((&input).into())
}
}
pub struct MfxAvcImgState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub frame_size: u32,
pub frame_width: u32,
pub frame_height: u32,
pub image_structure: u32,
pub weighted_biprediction_idc: u32,
pub weighted_prediction_enable: bool,
pub rho_domain_rate_control_enable: bool,
pub first_chroma_qp_offset: u32,
pub second_chroma_qp_offset: u32,
pub field_picure: bool,
pub mbaff_mode: bool,
pub frame_mb_only: bool,
pub _8x8_idct_transform_mode: bool,
pub direct_8x8_inference: bool,
pub constrained_intra_prediction: bool,
pub non_reference_picture: bool,
pub entropy_coding_sync_enable: bool,
pub mb_mv_format: u32,
pub chroma_format_idc: u32,
pub mv_unpacked_enable: bool,
pub load_bitstream_pointer_per_slice: bool,
pub mb_status_read: bool,
pub minimum_frame_size: u32,
pub intra_mb_max_bit_control: bool,
pub inter_mb_max_bit_control: bool,
pub frame_bitrate_max_report: bool,
pub frame_bitrate_min_report: bool,
pub force_ipcm_control: bool,
pub mb_level_rate_control: bool,
pub minimum_frame_size_units: u32,
pub non_first_pass: u32,
pub trellis_quantization_chroma_disable: bool,
pub trellis_quantization_rounding: u32,
pub trellis_quantization_enable: bool,
pub intra_mb_conformance_max_size: u32,
pub inter_mb_conformance_max_size: u32,
pub slice_delta_qp_max_0: i32,
pub slice_delta_qp_max_1: i32,
pub slice_delta_qp_max_2: u32,
pub slice_delta_qp_max_3: i32,
pub slice_delta_qp_min_0: i32,
pub slice_delta_qp_min_1: i32,
pub slice_delta_qp_min_2: i32,
pub slice_delta_qp_min_3: i32,
pub frame_bitrate_min: u32,
pub frame_bitrate_min_unit_mode: u32,
pub frame_bitrate_min_unit: u32,
pub frame_bitrate_max: u32,
pub frame_bitrate_max_unit_mode: u32,
pub frame_bitrate_max_unit: u32,
pub frame_bitrate_min_delta: u32,
pub frame_bitrate_max_delta: u32,
pub slice_stats_stream_out_enable: bool,
pub initial_qp_value: i32,
pub number_of_active_reference_pictures_from_l0: u32,
pub number_of_active_reference_pictures_from_l1: u32,
pub number_of_reference_frames: u32,
pub current_picture_has_performed_mmco5: bool,
pub pic_order_present: bool,
pub delta_pic_order_always_zero: bool,
pub pic_order_count_type: u32,
pub slice_group_map_type: u32,
pub redundant_pic_count_present: bool,
pub number_of_slice_groups: u32,
pub deblocking_filter_control_present: bool,
pub log2_max_frame_number: u32,
pub log2_max_pic_order_count_lsb: u32,
pub slice_group_change_rate: u32,
pub current_picture_frame_number: u32,
pub current_frame_view_id: u32,
pub max_view_idxl0: u32,
pub max_view_idxl1: u32,
pub inter_view_order_disable: bool,
pub fractional_qp_input: u32,
pub fractional_qp_offset: u32,
pub extended_rho_domain_statistics_enable: bool,
pub rho_domain_average_mb_qp: u32,
pub threshold_size: u32,
pub target_slice_size: u32,
}
impl MfxAvcImgState {
pub const DWORD_LENGTH: u32 = 21;
pub const BOTTOM_FIELD_PICTURE: u32 = 3;
pub const COMPATIBILITY_MODE: u32 = 0;
pub const DEFAULT: u32 = 0;
pub const EXPLICIT: u32 = 1;
pub const FOLLOW: u32 = 1;
pub const FRAME_PICTURE: u32 = 0;
pub const IGNORE: u32 = 0;
pub const IMPLICIT: u32 = 2;
pub const INVALID_NOT_ALLOWED: u32 = 2;
pub const MONOCHROME_PICTURE: u32 = 0;
pub const NEW_MODE: u32 = 1;
pub const TOP_FIELD_PICTURE: u32 = 1;
pub const _16KB: u32 = 3;
pub const _16_BYTES: u32 = 1;
pub const _4KB: u32 = 2;
pub const _4_2_0_PICTURE: u32 = 1;
pub const _4_2_2_PICTURE_NOT_SUPPORTED: u32 = 2;
pub const _4_4_4_PICTURE_NOT_SUPPORTED: u32 = 3;
}
impl Default for MfxAvcImgState {
fn default() -> Self {
MfxAvcImgState {
dword_length: 12,
subopcode_b: 0,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
frame_size: Default::default(),
frame_width: Default::default(),
frame_height: Default::default(),
image_structure: Default::default(),
weighted_biprediction_idc: Default::default(),
weighted_prediction_enable: Default::default(),
rho_domain_rate_control_enable: Default::default(),
first_chroma_qp_offset: Default::default(),
second_chroma_qp_offset: Default::default(),
field_picure: Default::default(),
mbaff_mode: Default::default(),
frame_mb_only: Default::default(),
_8x8_idct_transform_mode: Default::default(),
direct_8x8_inference: Default::default(),
constrained_intra_prediction: Default::default(),
non_reference_picture: Default::default(),
entropy_coding_sync_enable: Default::default(),
mb_mv_format: Default::default(),
chroma_format_idc: Default::default(),
mv_unpacked_enable: Default::default(),
load_bitstream_pointer_per_slice: Default::default(),
mb_status_read: Default::default(),
minimum_frame_size: Default::default(),
intra_mb_max_bit_control: Default::default(),
inter_mb_max_bit_control: Default::default(),
frame_bitrate_max_report: Default::default(),
frame_bitrate_min_report: Default::default(),
force_ipcm_control: Default::default(),
mb_level_rate_control: Default::default(),
minimum_frame_size_units: Default::default(),
non_first_pass: Default::default(),
trellis_quantization_chroma_disable: Default::default(),
trellis_quantization_rounding: Default::default(),
trellis_quantization_enable: Default::default(),
intra_mb_conformance_max_size: Default::default(),
inter_mb_conformance_max_size: Default::default(),
slice_delta_qp_max_0: Default::default(),
slice_delta_qp_max_1: Default::default(),
slice_delta_qp_max_2: Default::default(),
slice_delta_qp_max_3: Default::default(),
slice_delta_qp_min_0: Default::default(),
slice_delta_qp_min_1: Default::default(),
slice_delta_qp_min_2: Default::default(),
slice_delta_qp_min_3: Default::default(),
frame_bitrate_min: Default::default(),
frame_bitrate_min_unit_mode: Default::default(),
frame_bitrate_min_unit: Default::default(),
frame_bitrate_max: Default::default(),
frame_bitrate_max_unit_mode: Default::default(),
frame_bitrate_max_unit: Default::default(),
frame_bitrate_min_delta: Default::default(),
frame_bitrate_max_delta: Default::default(),
slice_stats_stream_out_enable: Default::default(),
initial_qp_value: Default::default(),
number_of_active_reference_pictures_from_l0: Default::default(),
number_of_active_reference_pictures_from_l1: Default::default(),
number_of_reference_frames: Default::default(),
current_picture_has_performed_mmco5: Default::default(),
pic_order_present: Default::default(),
delta_pic_order_always_zero: Default::default(),
pic_order_count_type: Default::default(),
slice_group_map_type: Default::default(),
redundant_pic_count_present: Default::default(),
number_of_slice_groups: Default::default(),
deblocking_filter_control_present: Default::default(),
log2_max_frame_number: Default::default(),
log2_max_pic_order_count_lsb: Default::default(),
slice_group_change_rate: Default::default(),
current_picture_frame_number: Default::default(),
current_frame_view_id: Default::default(),
max_view_idxl0: Default::default(),
max_view_idxl1: Default::default(),
inter_view_order_disable: Default::default(),
fractional_qp_input: Default::default(),
fractional_qp_offset: Default::default(),
extended_rho_domain_statistics_enable: Default::default(),
rho_domain_average_mb_qp: Default::default(),
threshold_size: Default::default(),
target_slice_size: Default::default(),
}
}
}
impl Serialize for MfxAvcImgState {
type Out = [u32; 21];
fn pack_into(&self, out: &mut [u32; 21]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.frame_size, 0, 15);
out[2] = __gen_uint(self.frame_width, 0, 7) |
__gen_uint(self.frame_height, 16, 23);
out[3] = __gen_uint(self.image_structure, 8, 9) |
__gen_uint(self.weighted_biprediction_idc, 10, 11) |
__gen_uint(self.weighted_prediction_enable.into(), 12, 12) |
__gen_uint(self.rho_domain_rate_control_enable.into(), 13, 13) |
__gen_uint(self.first_chroma_qp_offset, 16, 20) |
__gen_uint(self.second_chroma_qp_offset, 24, 28);
out[4] = __gen_uint(self.field_picure.into(), 0, 0) |
__gen_uint(self.mbaff_mode.into(), 1, 1) |
__gen_uint(self.frame_mb_only.into(), 2, 2) |
__gen_uint(self._8x8_idct_transform_mode.into(), 3, 3) |
__gen_uint(self.direct_8x8_inference.into(), 4, 4) |
__gen_uint(self.constrained_intra_prediction.into(), 5, 5) |
__gen_uint(self.non_reference_picture.into(), 6, 6) |
__gen_uint(self.entropy_coding_sync_enable.into(), 7, 7) |
__gen_uint(self.mb_mv_format, 8, 8) |
__gen_uint(self.chroma_format_idc, 10, 11) |
__gen_uint(self.mv_unpacked_enable.into(), 12, 12) |
__gen_uint(self.load_bitstream_pointer_per_slice.into(), 14, 14) |
__gen_uint(self.mb_status_read.into(), 15, 15) |
__gen_uint(self.minimum_frame_size, 16, 31);
out[5] = __gen_uint(self.intra_mb_max_bit_control.into(), 0, 0) |
__gen_uint(self.inter_mb_max_bit_control.into(), 1, 1) |
__gen_uint(self.frame_bitrate_max_report.into(), 2, 2) |
__gen_uint(self.frame_bitrate_min_report.into(), 3, 3) |
__gen_uint(self.force_ipcm_control.into(), 7, 7) |
__gen_uint(self.mb_level_rate_control.into(), 9, 9) |
__gen_uint(self.minimum_frame_size_units, 10, 11) |
__gen_uint(self.non_first_pass, 16, 16) |
__gen_uint(self.trellis_quantization_chroma_disable.into(), 27, 27) |
__gen_uint(self.trellis_quantization_rounding, 28, 30) |
__gen_uint(self.trellis_quantization_enable.into(), 31, 31);
out[6] = __gen_uint(self.intra_mb_conformance_max_size, 0, 11) |
__gen_uint(self.inter_mb_conformance_max_size, 16, 27);
out[7] = 0;
out[8] = __gen_uint(self.slice_delta_qp_max_0 as u32, 0, 7) |
__gen_uint(self.slice_delta_qp_max_1 as u32, 8, 15) |
__gen_uint(self.slice_delta_qp_max_2, 16, 23) |
__gen_uint(self.slice_delta_qp_max_3 as u32, 24, 31);
out[9] = __gen_uint(self.slice_delta_qp_min_0 as u32, 0, 7) |
__gen_uint(self.slice_delta_qp_min_1 as u32, 8, 15) |
__gen_uint(self.slice_delta_qp_min_2 as u32, 16, 23) |
__gen_uint(self.slice_delta_qp_min_3 as u32, 24, 31);
out[10] = __gen_uint(self.frame_bitrate_min, 0, 13) |
__gen_uint(self.frame_bitrate_min_unit_mode, 14, 14) |
__gen_uint(self.frame_bitrate_min_unit, 15, 15) |
__gen_uint(self.frame_bitrate_max, 16, 29) |
__gen_uint(self.frame_bitrate_max_unit_mode, 30, 30) |
__gen_uint(self.frame_bitrate_max_unit, 31, 31);
out[11] = __gen_uint(self.frame_bitrate_min_delta, 0, 14) |
__gen_uint(self.frame_bitrate_max_delta, 16, 30) |
__gen_uint(self.slice_stats_stream_out_enable.into(), 31, 31);
out[12] = 0;
out[13] = __gen_uint(self.initial_qp_value as u32, 0, 7) |
__gen_uint(self.number_of_active_reference_pictures_from_l0, 8, 13) |
__gen_uint(self.number_of_active_reference_pictures_from_l1, 16, 21) |
__gen_uint(self.number_of_reference_frames, 24, 28) |
__gen_uint(self.current_picture_has_performed_mmco5.into(), 29, 29);
out[14] = __gen_uint(self.pic_order_present.into(), 0, 0) |
__gen_uint(self.delta_pic_order_always_zero.into(), 1, 1) |
__gen_uint(self.pic_order_count_type, 2, 3) |
__gen_uint(self.slice_group_map_type, 8, 10) |
__gen_uint(self.redundant_pic_count_present.into(), 11, 11) |
__gen_uint(self.number_of_slice_groups, 12, 14) |
__gen_uint(self.deblocking_filter_control_present.into(), 15, 15) |
__gen_uint(self.log2_max_frame_number, 16, 23) |
__gen_uint(self.log2_max_pic_order_count_lsb, 24, 31);
out[15] = __gen_uint(self.slice_group_change_rate, 0, 15) |
__gen_uint(self.current_picture_frame_number, 16, 31);
out[16] = __gen_uint(self.current_frame_view_id, 0, 9) |
__gen_uint(self.max_view_idxl0, 12, 15) |
__gen_uint(self.max_view_idxl1, 18, 21) |
__gen_uint(self.inter_view_order_disable.into(), 31, 31);
out[17] = __gen_uint(self.fractional_qp_input, 0, 2) |
__gen_uint(self.fractional_qp_offset, 3, 5) |
__gen_uint(self.extended_rho_domain_statistics_enable.into(), 8, 8) |
__gen_uint(self.rho_domain_average_mb_qp, 16, 21);
out[18] = 0;
out[19] = __gen_uint(self.threshold_size, 0, 31);
out[20] = __gen_uint(self.target_slice_size, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 21];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 21] as *const [u8; 84]) })
}
}
impl From<&[u32; 21]> for MfxAvcImgState {
fn from(input: &[u32; 21]) -> Self {
MfxAvcImgState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
frame_size: __gen_unuint(input[1], 0, 15),
frame_width: __gen_unuint(input[2], 0, 7),
frame_height: __gen_unuint(input[2], 16, 23),
image_structure: __gen_unuint(input[3], 8, 9),
weighted_biprediction_idc: __gen_unuint(input[3], 10, 11),
weighted_prediction_enable: __gen_unuint(input[3], 12, 12) != 0,
rho_domain_rate_control_enable: __gen_unuint(input[3], 13, 13) != 0,
first_chroma_qp_offset: __gen_unuint(input[3], 16, 20),
second_chroma_qp_offset: __gen_unuint(input[3], 24, 28),
field_picure: __gen_unuint(input[4], 0, 0) != 0,
mbaff_mode: __gen_unuint(input[4], 1, 1) != 0,
frame_mb_only: __gen_unuint(input[4], 2, 2) != 0,
_8x8_idct_transform_mode: __gen_unuint(input[4], 3, 3) != 0,
direct_8x8_inference: __gen_unuint(input[4], 4, 4) != 0,
constrained_intra_prediction: __gen_unuint(input[4], 5, 5) != 0,
non_reference_picture: __gen_unuint(input[4], 6, 6) != 0,
entropy_coding_sync_enable: __gen_unuint(input[4], 7, 7) != 0,
mb_mv_format: __gen_unuint(input[4], 8, 8),
chroma_format_idc: __gen_unuint(input[4], 10, 11),
mv_unpacked_enable: __gen_unuint(input[4], 12, 12) != 0,
load_bitstream_pointer_per_slice: __gen_unuint(input[4], 14, 14) != 0,
mb_status_read: __gen_unuint(input[4], 15, 15) != 0,
minimum_frame_size: __gen_unuint(input[4], 16, 31),
intra_mb_max_bit_control: __gen_unuint(input[5], 0, 0) != 0,
inter_mb_max_bit_control: __gen_unuint(input[5], 1, 1) != 0,
frame_bitrate_max_report: __gen_unuint(input[5], 2, 2) != 0,
frame_bitrate_min_report: __gen_unuint(input[5], 3, 3) != 0,
force_ipcm_control: __gen_unuint(input[5], 7, 7) != 0,
mb_level_rate_control: __gen_unuint(input[5], 9, 9) != 0,
minimum_frame_size_units: __gen_unuint(input[5], 10, 11),
non_first_pass: __gen_unuint(input[5], 16, 16),
trellis_quantization_chroma_disable: __gen_unuint(input[5], 27, 27) != 0,
trellis_quantization_rounding: __gen_unuint(input[5], 28, 30),
trellis_quantization_enable: __gen_unuint(input[5], 31, 31) != 0,
intra_mb_conformance_max_size: __gen_unuint(input[6], 0, 11),
inter_mb_conformance_max_size: __gen_unuint(input[6], 16, 27),
slice_delta_qp_max_0: (__gen_unuint(input[8], 0, 7)) as i32,
slice_delta_qp_max_1: (__gen_unuint(input[8], 8, 15)) as i32,
slice_delta_qp_max_2: __gen_unuint(input[8], 16, 23),
slice_delta_qp_max_3: (__gen_unuint(input[8], 24, 31)) as i32,
slice_delta_qp_min_0: (__gen_unuint(input[9], 0, 7)) as i32,
slice_delta_qp_min_1: (__gen_unuint(input[9], 8, 15)) as i32,
slice_delta_qp_min_2: (__gen_unuint(input[9], 16, 23)) as i32,
slice_delta_qp_min_3: (__gen_unuint(input[9], 24, 31)) as i32,
frame_bitrate_min: __gen_unuint(input[10], 0, 13),
frame_bitrate_min_unit_mode: __gen_unuint(input[10], 14, 14),
frame_bitrate_min_unit: __gen_unuint(input[10], 15, 15),
frame_bitrate_max: __gen_unuint(input[10], 16, 29),
frame_bitrate_max_unit_mode: __gen_unuint(input[10], 30, 30),
frame_bitrate_max_unit: __gen_unuint(input[10], 31, 31),
frame_bitrate_min_delta: __gen_unuint(input[11], 0, 14),
frame_bitrate_max_delta: __gen_unuint(input[11], 16, 30),
slice_stats_stream_out_enable: __gen_unuint(input[11], 31, 31) != 0,
initial_qp_value: (__gen_unuint(input[13], 0, 7)) as i32,
number_of_active_reference_pictures_from_l0: __gen_unuint(input[13], 8, 13),
number_of_active_reference_pictures_from_l1: __gen_unuint(input[13], 16, 21),
number_of_reference_frames: __gen_unuint(input[13], 24, 28),
current_picture_has_performed_mmco5: __gen_unuint(input[13], 29, 29) != 0,
pic_order_present: __gen_unuint(input[14], 0, 0) != 0,
delta_pic_order_always_zero: __gen_unuint(input[14], 1, 1) != 0,
pic_order_count_type: __gen_unuint(input[14], 2, 3),
slice_group_map_type: __gen_unuint(input[14], 8, 10),
redundant_pic_count_present: __gen_unuint(input[14], 11, 11) != 0,
number_of_slice_groups: __gen_unuint(input[14], 12, 14),
deblocking_filter_control_present: __gen_unuint(input[14], 15, 15) != 0,
log2_max_frame_number: __gen_unuint(input[14], 16, 23),
log2_max_pic_order_count_lsb: __gen_unuint(input[14], 24, 31),
slice_group_change_rate: __gen_unuint(input[15], 0, 15),
current_picture_frame_number: __gen_unuint(input[15], 16, 31),
current_frame_view_id: __gen_unuint(input[16], 0, 9),
max_view_idxl0: __gen_unuint(input[16], 12, 15),
max_view_idxl1: __gen_unuint(input[16], 18, 21),
inter_view_order_disable: __gen_unuint(input[16], 31, 31) != 0,
fractional_qp_input: __gen_unuint(input[17], 0, 2),
fractional_qp_offset: __gen_unuint(input[17], 3, 5),
extended_rho_domain_statistics_enable: __gen_unuint(input[17], 8, 8) != 0,
rho_domain_average_mb_qp: __gen_unuint(input[17], 16, 21),
threshold_size: __gen_unuint(input[19], 0, 31),
target_slice_size: __gen_unuint(input[20], 0, 31),
}
}
}
impl Deserialize for MfxAvcImgState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 21];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 21] as *mut [u8; 84]) })?;
Ok((&input).into())
}
}
pub struct MfxAvcRefIdxState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub reference_picture_list_select: u32,
pub reference_list_entry: [u32; 32],
}
impl MfxAvcRefIdxState {
pub const DWORD_LENGTH: u32 = 10;
}
impl Default for MfxAvcRefIdxState {
fn default() -> Self {
MfxAvcRefIdxState {
dword_length: 8,
subopcode_b: 4,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
reference_picture_list_select: Default::default(),
reference_list_entry: Default::default(),
}
}
}
impl Serialize for MfxAvcRefIdxState {
type Out = [u32; 10];
fn pack_into(&self, out: &mut [u32; 10]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.reference_picture_list_select, 0, 0);
out[2] = __gen_uint(self.reference_list_entry[0], 0, 7) |
__gen_uint(self.reference_list_entry[1], 8, 15) |
__gen_uint(self.reference_list_entry[2], 16, 23) |
__gen_uint(self.reference_list_entry[3], 24, 31);
out[3] = __gen_uint(self.reference_list_entry[4], 0, 7) |
__gen_uint(self.reference_list_entry[5], 8, 15) |
__gen_uint(self.reference_list_entry[6], 16, 23) |
__gen_uint(self.reference_list_entry[7], 24, 31);
out[4] = __gen_uint(self.reference_list_entry[8], 0, 7) |
__gen_uint(self.reference_list_entry[9], 8, 15) |
__gen_uint(self.reference_list_entry[10], 16, 23) |
__gen_uint(self.reference_list_entry[11], 24, 31);
out[5] = __gen_uint(self.reference_list_entry[12], 0, 7) |
__gen_uint(self.reference_list_entry[13], 8, 15) |
__gen_uint(self.reference_list_entry[14], 16, 23) |
__gen_uint(self.reference_list_entry[15], 24, 31);
out[6] = __gen_uint(self.reference_list_entry[16], 0, 7) |
__gen_uint(self.reference_list_entry[17], 8, 15) |
__gen_uint(self.reference_list_entry[18], 16, 23) |
__gen_uint(self.reference_list_entry[19], 24, 31);
out[7] = __gen_uint(self.reference_list_entry[20], 0, 7) |
__gen_uint(self.reference_list_entry[21], 8, 15) |
__gen_uint(self.reference_list_entry[22], 16, 23) |
__gen_uint(self.reference_list_entry[23], 24, 31);
out[8] = __gen_uint(self.reference_list_entry[24], 0, 7) |
__gen_uint(self.reference_list_entry[25], 8, 15) |
__gen_uint(self.reference_list_entry[26], 16, 23) |
__gen_uint(self.reference_list_entry[27], 24, 31);
out[9] = __gen_uint(self.reference_list_entry[28], 0, 7) |
__gen_uint(self.reference_list_entry[29], 8, 15) |
__gen_uint(self.reference_list_entry[30], 16, 23) |
__gen_uint(self.reference_list_entry[31], 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 10];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 10] as *const [u8; 40]) })
}
}
impl From<&[u32; 10]> for MfxAvcRefIdxState {
fn from(input: &[u32; 10]) -> Self {
MfxAvcRefIdxState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
reference_picture_list_select: __gen_unuint(input[1], 0, 0),
reference_list_entry: [
__gen_unuint(input[2], 0, 7),
__gen_unuint(input[2], 8, 15),
__gen_unuint(input[2], 16, 23),
__gen_unuint(input[2], 24, 31),
__gen_unuint(input[3], 0, 7),
__gen_unuint(input[3], 8, 15),
__gen_unuint(input[3], 16, 23),
__gen_unuint(input[3], 24, 31),
__gen_unuint(input[4], 0, 7),
__gen_unuint(input[4], 8, 15),
__gen_unuint(input[4], 16, 23),
__gen_unuint(input[4], 24, 31),
__gen_unuint(input[5], 0, 7),
__gen_unuint(input[5], 8, 15),
__gen_unuint(input[5], 16, 23),
__gen_unuint(input[5], 24, 31),
__gen_unuint(input[6], 0, 7),
__gen_unuint(input[6], 8, 15),
__gen_unuint(input[6], 16, 23),
__gen_unuint(input[6], 24, 31),
__gen_unuint(input[7], 0, 7),
__gen_unuint(input[7], 8, 15),
__gen_unuint(input[7], 16, 23),
__gen_unuint(input[7], 24, 31),
__gen_unuint(input[8], 0, 7),
__gen_unuint(input[8], 8, 15),
__gen_unuint(input[8], 16, 23),
__gen_unuint(input[8], 24, 31),
__gen_unuint(input[9], 0, 7),
__gen_unuint(input[9], 8, 15),
__gen_unuint(input[9], 16, 23),
__gen_unuint(input[9], 24, 31)
],
}
}
}
impl Deserialize for MfxAvcRefIdxState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 10];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 10] as *mut [u8; 40]) })?;
Ok((&input).into())
}
}
pub struct MfxAvcSliceState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub slice_type: u32,
pub log2_weight_denominator_luma: u32,
pub log2_weight_denominator_chroma: u32,
pub number_of_reference_pictures_in_inter_prediction_list_0: u32,
pub number_of_reference_pictures_in_inter_prediction_list_1: u32,
pub slice_alpha_c0_offset_div2: i32,
pub slice_beta_offset_div2: i32,
pub slice_quantization_parameter: u32,
pub cabac_init_idc: u32,
pub disable_deblocking_filter_indicator: u32,
pub direct_prediction_type: u32,
pub weighted_prediction_indicator: u32,
pub slice_start_mb_number: u32,
pub slice_horizontal_position: u32,
pub slice_vertical_position: u32,
pub next_slice_horizontal_position: u32,
pub next_slice_vertical_position: u32,
pub stream_id: u32,
pub slice_id: u32,
pub cabac_zero_word_insertion_enable: bool,
pub emulation_byte_slice_insert_enable: bool,
pub tail_insertion_present: bool,
pub slice_data_insertion_present: bool,
pub header_insertion_present: bool,
pub last_slice_group: bool,
pub mb_type_skip_conversion_disable: bool,
pub mb_type_direct_conversion_disable: bool,
pub rate_control_panic_type: u32,
pub rate_control_panic_enable: bool,
pub rate_control_stable_tolerance: u32,
pub rate_control_triggle_mode: u32,
pub reset_rate_control_counter: bool,
pub rate_control_counter_enable: u32,
pub indirect_pak_bse_data_start_address: u64,
pub grow_init: u32,
pub grow_resistance: u32,
pub shrink_init: u32,
pub shrink_resistance: u32,
pub qp_max_positive_modifier_magnitude: u32,
pub qp_max_negative_modifier_magnitude: u32,
pub correct_1: u32,
pub correct_2: u32,
pub correct_3: u32,
pub correct_4: u32,
pub correct_5: u32,
pub correct_6: u32,
pub round_intra: u32,
pub round_intra_enable: bool,
pub round_inter: u32,
pub round_inter_enable: bool,
pub cv0: u32,
pub cv1: u32,
pub cv2: u32,
pub cv3: u32,
pub cv4: u32,
pub cv5: u32,
pub cv6: u32,
pub cv7: u32,
}
impl MfxAvcSliceState {
pub const DWORD_LENGTH: u32 = 11;
pub const ALWAYS_RATE_CONTROL: u32 = 0;
pub const B_SLICE: u32 = 1;
pub const CBP_PANIC: u32 = 1;
pub const GENTLE_RATE_CONTROL: u32 = 1;
pub const I_SLICE: u32 = 2;
pub const LOOSE_RATE_CONTROL: u32 = 2;
pub const P_SLICE: u32 = 0;
pub const QP_PANIC: u32 = 0;
pub const SPATIAL: u32 = 1;
pub const TEMPORAL: u32 = 0;
pub const _1_16: u32 = 0;
pub const _2_16: u32 = 1;
pub const _3_16: u32 = 2;
pub const _4_16: u32 = 3;
pub const _5_16: u32 = 4;
pub const _6_16: u32 = 5;
pub const _7_16: u32 = 6;
pub const _8_16: u32 = 7;
}
impl Default for MfxAvcSliceState {
fn default() -> Self {
MfxAvcSliceState {
dword_length: 8,
subopcode_b: 3,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
slice_type: Default::default(),
log2_weight_denominator_luma: Default::default(),
log2_weight_denominator_chroma: Default::default(),
number_of_reference_pictures_in_inter_prediction_list_0: Default::default(),
number_of_reference_pictures_in_inter_prediction_list_1: Default::default(),
slice_alpha_c0_offset_div2: Default::default(),
slice_beta_offset_div2: Default::default(),
slice_quantization_parameter: Default::default(),
cabac_init_idc: Default::default(),
disable_deblocking_filter_indicator: Default::default(),
direct_prediction_type: Default::default(),
weighted_prediction_indicator: Default::default(),
slice_start_mb_number: Default::default(),
slice_horizontal_position: Default::default(),
slice_vertical_position: Default::default(),
next_slice_horizontal_position: Default::default(),
next_slice_vertical_position: Default::default(),
stream_id: Default::default(),
slice_id: Default::default(),
cabac_zero_word_insertion_enable: Default::default(),
emulation_byte_slice_insert_enable: Default::default(),
tail_insertion_present: Default::default(),
slice_data_insertion_present: Default::default(),
header_insertion_present: Default::default(),
last_slice_group: Default::default(),
mb_type_skip_conversion_disable: Default::default(),
mb_type_direct_conversion_disable: Default::default(),
rate_control_panic_type: Default::default(),
rate_control_panic_enable: Default::default(),
rate_control_stable_tolerance: Default::default(),
rate_control_triggle_mode: Default::default(),
reset_rate_control_counter: Default::default(),
rate_control_counter_enable: Default::default(),
indirect_pak_bse_data_start_address: Default::default(),
grow_init: Default::default(),
grow_resistance: Default::default(),
shrink_init: Default::default(),
shrink_resistance: Default::default(),
qp_max_positive_modifier_magnitude: Default::default(),
qp_max_negative_modifier_magnitude: Default::default(),
correct_1: Default::default(),
correct_2: Default::default(),
correct_3: Default::default(),
correct_4: Default::default(),
correct_5: Default::default(),
correct_6: Default::default(),
round_intra: Default::default(),
round_intra_enable: Default::default(),
round_inter: Default::default(),
round_inter_enable: Default::default(),
cv0: Default::default(),
cv1: Default::default(),
cv2: Default::default(),
cv3: Default::default(),
cv4: Default::default(),
cv5: Default::default(),
cv6: Default::default(),
cv7: Default::default(),
}
}
}
impl Serialize for MfxAvcSliceState {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.slice_type, 0, 3);
out[2] = __gen_uint(self.log2_weight_denominator_luma, 0, 2) |
__gen_uint(self.log2_weight_denominator_chroma, 8, 10) |
__gen_uint(self.number_of_reference_pictures_in_inter_prediction_list_0, 16, 21) |
__gen_uint(self.number_of_reference_pictures_in_inter_prediction_list_1, 24, 29);
out[3] = __gen_uint(self.slice_alpha_c0_offset_div2 as u32, 0, 3) |
__gen_uint(self.slice_beta_offset_div2 as u32, 8, 11) |
__gen_uint(self.slice_quantization_parameter, 16, 21) |
__gen_uint(self.cabac_init_idc, 24, 25) |
__gen_uint(self.disable_deblocking_filter_indicator, 27, 28) |
__gen_uint(self.direct_prediction_type, 29, 29) |
__gen_uint(self.weighted_prediction_indicator, 30, 31);
out[4] = __gen_uint(self.slice_start_mb_number, 0, 14) |
__gen_uint(self.slice_horizontal_position, 16, 23) |
__gen_uint(self.slice_vertical_position, 24, 31);
out[5] = __gen_uint(self.next_slice_horizontal_position, 0, 7) |
__gen_uint(self.next_slice_vertical_position, 16, 23);
out[6] = __gen_uint(self.stream_id, 0, 1) |
__gen_uint(self.slice_id, 4, 7) |
__gen_uint(self.cabac_zero_word_insertion_enable.into(), 12, 12) |
__gen_uint(self.emulation_byte_slice_insert_enable.into(), 13, 13) |
__gen_uint(self.tail_insertion_present.into(), 15, 15) |
__gen_uint(self.slice_data_insertion_present.into(), 16, 16) |
__gen_uint(self.header_insertion_present.into(), 17, 17) |
__gen_uint(self.last_slice_group.into(), 19, 19) |
__gen_uint(self.mb_type_skip_conversion_disable.into(), 20, 20) |
__gen_uint(self.mb_type_direct_conversion_disable.into(), 21, 21) |
__gen_uint(self.rate_control_panic_type, 22, 22) |
__gen_uint(self.rate_control_panic_enable.into(), 23, 23) |
__gen_uint(self.rate_control_stable_tolerance, 24, 27) |
__gen_uint(self.rate_control_triggle_mode, 28, 29) |
__gen_uint(self.reset_rate_control_counter.into(), 30, 30) |
__gen_uint(self.rate_control_counter_enable, 31, 31);
out[7] = __gen_offset(self.indirect_pak_bse_data_start_address as u32, 0, 28);
out[8] = __gen_uint(self.grow_init, 0, 3) |
__gen_uint(self.grow_resistance, 4, 7) |
__gen_uint(self.shrink_init, 8, 11) |
__gen_uint(self.shrink_resistance, 12, 15) |
__gen_uint(self.qp_max_positive_modifier_magnitude, 16, 23) |
__gen_uint(self.qp_max_negative_modifier_magnitude, 24, 31);
out[9] = __gen_uint(self.correct_1, 0, 3) |
__gen_uint(self.correct_2, 4, 7) |
__gen_uint(self.correct_3, 8, 11) |
__gen_uint(self.correct_4, 12, 15) |
__gen_uint(self.correct_5, 16, 19) |
__gen_uint(self.correct_6, 20, 23) |
__gen_uint(self.round_intra, 24, 26) |
__gen_uint(self.round_intra_enable.into(), 27, 27) |
__gen_uint(self.round_inter, 28, 30) |
__gen_uint(self.round_inter_enable.into(), 31, 31);
out[10] = __gen_uint(self.cv0, 0, 3) |
__gen_uint(self.cv1, 4, 7) |
__gen_uint(self.cv2, 8, 11) |
__gen_uint(self.cv3, 12, 15) |
__gen_uint(self.cv4, 16, 19) |
__gen_uint(self.cv5, 20, 23) |
__gen_uint(self.cv6, 24, 27) |
__gen_uint(self.cv7, 28, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for MfxAvcSliceState {
fn from(input: &[u32; 11]) -> Self {
MfxAvcSliceState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
slice_type: __gen_unuint(input[1], 0, 3),
log2_weight_denominator_luma: __gen_unuint(input[2], 0, 2),
log2_weight_denominator_chroma: __gen_unuint(input[2], 8, 10),
number_of_reference_pictures_in_inter_prediction_list_0: __gen_unuint(input[2], 16, 21),
number_of_reference_pictures_in_inter_prediction_list_1: __gen_unuint(input[2], 24, 29),
slice_alpha_c0_offset_div2: (__gen_unuint(input[3], 0, 3)) as i32,
slice_beta_offset_div2: (__gen_unuint(input[3], 8, 11)) as i32,
slice_quantization_parameter: __gen_unuint(input[3], 16, 21),
cabac_init_idc: __gen_unuint(input[3], 24, 25),
disable_deblocking_filter_indicator: __gen_unuint(input[3], 27, 28),
direct_prediction_type: __gen_unuint(input[3], 29, 29),
weighted_prediction_indicator: __gen_unuint(input[3], 30, 31),
slice_start_mb_number: __gen_unuint(input[4], 0, 14),
slice_horizontal_position: __gen_unuint(input[4], 16, 23),
slice_vertical_position: __gen_unuint(input[4], 24, 31),
next_slice_horizontal_position: __gen_unuint(input[5], 0, 7),
next_slice_vertical_position: __gen_unuint(input[5], 16, 23),
stream_id: __gen_unuint(input[6], 0, 1),
slice_id: __gen_unuint(input[6], 4, 7),
cabac_zero_word_insertion_enable: __gen_unuint(input[6], 12, 12) != 0,
emulation_byte_slice_insert_enable: __gen_unuint(input[6], 13, 13) != 0,
tail_insertion_present: __gen_unuint(input[6], 15, 15) != 0,
slice_data_insertion_present: __gen_unuint(input[6], 16, 16) != 0,
header_insertion_present: __gen_unuint(input[6], 17, 17) != 0,
last_slice_group: __gen_unuint(input[6], 19, 19) != 0,
mb_type_skip_conversion_disable: __gen_unuint(input[6], 20, 20) != 0,
mb_type_direct_conversion_disable: __gen_unuint(input[6], 21, 21) != 0,
rate_control_panic_type: __gen_unuint(input[6], 22, 22),
rate_control_panic_enable: __gen_unuint(input[6], 23, 23) != 0,
rate_control_stable_tolerance: __gen_unuint(input[6], 24, 27),
rate_control_triggle_mode: __gen_unuint(input[6], 28, 29),
reset_rate_control_counter: __gen_unuint(input[6], 30, 30) != 0,
rate_control_counter_enable: __gen_unuint(input[6], 31, 31),
indirect_pak_bse_data_start_address: (__gen_unuint(input[7], 0, 28) as u64),
grow_init: __gen_unuint(input[8], 0, 3),
grow_resistance: __gen_unuint(input[8], 4, 7),
shrink_init: __gen_unuint(input[8], 8, 11),
shrink_resistance: __gen_unuint(input[8], 12, 15),
qp_max_positive_modifier_magnitude: __gen_unuint(input[8], 16, 23),
qp_max_negative_modifier_magnitude: __gen_unuint(input[8], 24, 31),
correct_1: __gen_unuint(input[9], 0, 3),
correct_2: __gen_unuint(input[9], 4, 7),
correct_3: __gen_unuint(input[9], 8, 11),
correct_4: __gen_unuint(input[9], 12, 15),
correct_5: __gen_unuint(input[9], 16, 19),
correct_6: __gen_unuint(input[9], 20, 23),
round_intra: __gen_unuint(input[9], 24, 26),
round_intra_enable: __gen_unuint(input[9], 27, 27) != 0,
round_inter: __gen_unuint(input[9], 28, 30),
round_inter_enable: __gen_unuint(input[9], 31, 31) != 0,
cv0: __gen_unuint(input[10], 0, 3),
cv1: __gen_unuint(input[10], 4, 7),
cv2: __gen_unuint(input[10], 8, 11),
cv3: __gen_unuint(input[10], 12, 15),
cv4: __gen_unuint(input[10], 16, 19),
cv5: __gen_unuint(input[10], 20, 23),
cv6: __gen_unuint(input[10], 24, 27),
cv7: __gen_unuint(input[10], 28, 31),
}
}
}
impl Deserialize for MfxAvcSliceState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct MfxAvcWeightoffsetState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub weight_and_offset_select: u32,
pub weight_offset: [u32; 96],
}
impl MfxAvcWeightoffsetState {
pub const DWORD_LENGTH: u32 = 98;
pub const L0_TABLE: u32 = 0;
pub const L1_TABLE: u32 = 1;
}
impl Default for MfxAvcWeightoffsetState {
fn default() -> Self {
MfxAvcWeightoffsetState {
dword_length: 96,
subopcode_b: 5,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
weight_and_offset_select: Default::default(),
weight_offset: [0; 96],
}
}
}
impl Serialize for MfxAvcWeightoffsetState {
type Out = [u32; 98];
fn pack_into(&self, out: &mut [u32; 98]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.weight_and_offset_select, 0, 0);
out[2] = __gen_uint(self.weight_offset[0], 0, 31);
out[3] = __gen_uint(self.weight_offset[1], 0, 31);
out[4] = __gen_uint(self.weight_offset[2], 0, 31);
out[5] = __gen_uint(self.weight_offset[3], 0, 31);
out[6] = __gen_uint(self.weight_offset[4], 0, 31);
out[7] = __gen_uint(self.weight_offset[5], 0, 31);
out[8] = __gen_uint(self.weight_offset[6], 0, 31);
out[9] = __gen_uint(self.weight_offset[7], 0, 31);
out[10] = __gen_uint(self.weight_offset[8], 0, 31);
out[11] = __gen_uint(self.weight_offset[9], 0, 31);
out[12] = __gen_uint(self.weight_offset[10], 0, 31);
out[13] = __gen_uint(self.weight_offset[11], 0, 31);
out[14] = __gen_uint(self.weight_offset[12], 0, 31);
out[15] = __gen_uint(self.weight_offset[13], 0, 31);
out[16] = __gen_uint(self.weight_offset[14], 0, 31);
out[17] = __gen_uint(self.weight_offset[15], 0, 31);
out[18] = __gen_uint(self.weight_offset[16], 0, 31);
out[19] = __gen_uint(self.weight_offset[17], 0, 31);
out[20] = __gen_uint(self.weight_offset[18], 0, 31);
out[21] = __gen_uint(self.weight_offset[19], 0, 31);
out[22] = __gen_uint(self.weight_offset[20], 0, 31);
out[23] = __gen_uint(self.weight_offset[21], 0, 31);
out[24] = __gen_uint(self.weight_offset[22], 0, 31);
out[25] = __gen_uint(self.weight_offset[23], 0, 31);
out[26] = __gen_uint(self.weight_offset[24], 0, 31);
out[27] = __gen_uint(self.weight_offset[25], 0, 31);
out[28] = __gen_uint(self.weight_offset[26], 0, 31);
out[29] = __gen_uint(self.weight_offset[27], 0, 31);
out[30] = __gen_uint(self.weight_offset[28], 0, 31);
out[31] = __gen_uint(self.weight_offset[29], 0, 31);
out[32] = __gen_uint(self.weight_offset[30], 0, 31);
out[33] = __gen_uint(self.weight_offset[31], 0, 31);
out[34] = __gen_uint(self.weight_offset[32], 0, 31);
out[35] = __gen_uint(self.weight_offset[33], 0, 31);
out[36] = __gen_uint(self.weight_offset[34], 0, 31);
out[37] = __gen_uint(self.weight_offset[35], 0, 31);
out[38] = __gen_uint(self.weight_offset[36], 0, 31);
out[39] = __gen_uint(self.weight_offset[37], 0, 31);
out[40] = __gen_uint(self.weight_offset[38], 0, 31);
out[41] = __gen_uint(self.weight_offset[39], 0, 31);
out[42] = __gen_uint(self.weight_offset[40], 0, 31);
out[43] = __gen_uint(self.weight_offset[41], 0, 31);
out[44] = __gen_uint(self.weight_offset[42], 0, 31);
out[45] = __gen_uint(self.weight_offset[43], 0, 31);
out[46] = __gen_uint(self.weight_offset[44], 0, 31);
out[47] = __gen_uint(self.weight_offset[45], 0, 31);
out[48] = __gen_uint(self.weight_offset[46], 0, 31);
out[49] = __gen_uint(self.weight_offset[47], 0, 31);
out[50] = __gen_uint(self.weight_offset[48], 0, 31);
out[51] = __gen_uint(self.weight_offset[49], 0, 31);
out[52] = __gen_uint(self.weight_offset[50], 0, 31);
out[53] = __gen_uint(self.weight_offset[51], 0, 31);
out[54] = __gen_uint(self.weight_offset[52], 0, 31);
out[55] = __gen_uint(self.weight_offset[53], 0, 31);
out[56] = __gen_uint(self.weight_offset[54], 0, 31);
out[57] = __gen_uint(self.weight_offset[55], 0, 31);
out[58] = __gen_uint(self.weight_offset[56], 0, 31);
out[59] = __gen_uint(self.weight_offset[57], 0, 31);
out[60] = __gen_uint(self.weight_offset[58], 0, 31);
out[61] = __gen_uint(self.weight_offset[59], 0, 31);
out[62] = __gen_uint(self.weight_offset[60], 0, 31);
out[63] = __gen_uint(self.weight_offset[61], 0, 31);
out[64] = __gen_uint(self.weight_offset[62], 0, 31);
out[65] = __gen_uint(self.weight_offset[63], 0, 31);
out[66] = __gen_uint(self.weight_offset[64], 0, 31);
out[67] = __gen_uint(self.weight_offset[65], 0, 31);
out[68] = __gen_uint(self.weight_offset[66], 0, 31);
out[69] = __gen_uint(self.weight_offset[67], 0, 31);
out[70] = __gen_uint(self.weight_offset[68], 0, 31);
out[71] = __gen_uint(self.weight_offset[69], 0, 31);
out[72] = __gen_uint(self.weight_offset[70], 0, 31);
out[73] = __gen_uint(self.weight_offset[71], 0, 31);
out[74] = __gen_uint(self.weight_offset[72], 0, 31);
out[75] = __gen_uint(self.weight_offset[73], 0, 31);
out[76] = __gen_uint(self.weight_offset[74], 0, 31);
out[77] = __gen_uint(self.weight_offset[75], 0, 31);
out[78] = __gen_uint(self.weight_offset[76], 0, 31);
out[79] = __gen_uint(self.weight_offset[77], 0, 31);
out[80] = __gen_uint(self.weight_offset[78], 0, 31);
out[81] = __gen_uint(self.weight_offset[79], 0, 31);
out[82] = __gen_uint(self.weight_offset[80], 0, 31);
out[83] = __gen_uint(self.weight_offset[81], 0, 31);
out[84] = __gen_uint(self.weight_offset[82], 0, 31);
out[85] = __gen_uint(self.weight_offset[83], 0, 31);
out[86] = __gen_uint(self.weight_offset[84], 0, 31);
out[87] = __gen_uint(self.weight_offset[85], 0, 31);
out[88] = __gen_uint(self.weight_offset[86], 0, 31);
out[89] = __gen_uint(self.weight_offset[87], 0, 31);
out[90] = __gen_uint(self.weight_offset[88], 0, 31);
out[91] = __gen_uint(self.weight_offset[89], 0, 31);
out[92] = __gen_uint(self.weight_offset[90], 0, 31);
out[93] = __gen_uint(self.weight_offset[91], 0, 31);
out[94] = __gen_uint(self.weight_offset[92], 0, 31);
out[95] = __gen_uint(self.weight_offset[93], 0, 31);
out[96] = __gen_uint(self.weight_offset[94], 0, 31);
out[97] = __gen_uint(self.weight_offset[95], 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 98];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 98] as *const [u8; 392]) })
}
}
impl From<&[u32; 98]> for MfxAvcWeightoffsetState {
fn from(input: &[u32; 98]) -> Self {
MfxAvcWeightoffsetState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
weight_and_offset_select: __gen_unuint(input[1], 0, 0),
weight_offset: [
__gen_unuint(input[2], 0, 31),
__gen_unuint(input[3], 0, 31),
__gen_unuint(input[4], 0, 31),
__gen_unuint(input[5], 0, 31),
__gen_unuint(input[6], 0, 31),
__gen_unuint(input[7], 0, 31),
__gen_unuint(input[8], 0, 31),
__gen_unuint(input[9], 0, 31),
__gen_unuint(input[10], 0, 31),
__gen_unuint(input[11], 0, 31),
__gen_unuint(input[12], 0, 31),
__gen_unuint(input[13], 0, 31),
__gen_unuint(input[14], 0, 31),
__gen_unuint(input[15], 0, 31),
__gen_unuint(input[16], 0, 31),
__gen_unuint(input[17], 0, 31),
__gen_unuint(input[18], 0, 31),
__gen_unuint(input[19], 0, 31),
__gen_unuint(input[20], 0, 31),
__gen_unuint(input[21], 0, 31),
__gen_unuint(input[22], 0, 31),
__gen_unuint(input[23], 0, 31),
__gen_unuint(input[24], 0, 31),
__gen_unuint(input[25], 0, 31),
__gen_unuint(input[26], 0, 31),
__gen_unuint(input[27], 0, 31),
__gen_unuint(input[28], 0, 31),
__gen_unuint(input[29], 0, 31),
__gen_unuint(input[30], 0, 31),
__gen_unuint(input[31], 0, 31),
__gen_unuint(input[32], 0, 31),
__gen_unuint(input[33], 0, 31),
__gen_unuint(input[34], 0, 31),
__gen_unuint(input[35], 0, 31),
__gen_unuint(input[36], 0, 31),
__gen_unuint(input[37], 0, 31),
__gen_unuint(input[38], 0, 31),
__gen_unuint(input[39], 0, 31),
__gen_unuint(input[40], 0, 31),
__gen_unuint(input[41], 0, 31),
__gen_unuint(input[42], 0, 31),
__gen_unuint(input[43], 0, 31),
__gen_unuint(input[44], 0, 31),
__gen_unuint(input[45], 0, 31),
__gen_unuint(input[46], 0, 31),
__gen_unuint(input[47], 0, 31),
__gen_unuint(input[48], 0, 31),
__gen_unuint(input[49], 0, 31),
__gen_unuint(input[50], 0, 31),
__gen_unuint(input[51], 0, 31),
__gen_unuint(input[52], 0, 31),
__gen_unuint(input[53], 0, 31),
__gen_unuint(input[54], 0, 31),
__gen_unuint(input[55], 0, 31),
__gen_unuint(input[56], 0, 31),
__gen_unuint(input[57], 0, 31),
__gen_unuint(input[58], 0, 31),
__gen_unuint(input[59], 0, 31),
__gen_unuint(input[60], 0, 31),
__gen_unuint(input[61], 0, 31),
__gen_unuint(input[62], 0, 31),
__gen_unuint(input[63], 0, 31),
__gen_unuint(input[64], 0, 31),
__gen_unuint(input[65], 0, 31),
__gen_unuint(input[66], 0, 31),
__gen_unuint(input[67], 0, 31),
__gen_unuint(input[68], 0, 31),
__gen_unuint(input[69], 0, 31),
__gen_unuint(input[70], 0, 31),
__gen_unuint(input[71], 0, 31),
__gen_unuint(input[72], 0, 31),
__gen_unuint(input[73], 0, 31),
__gen_unuint(input[74], 0, 31),
__gen_unuint(input[75], 0, 31),
__gen_unuint(input[76], 0, 31),
__gen_unuint(input[77], 0, 31),
__gen_unuint(input[78], 0, 31),
__gen_unuint(input[79], 0, 31),
__gen_unuint(input[80], 0, 31),
__gen_unuint(input[81], 0, 31),
__gen_unuint(input[82], 0, 31),
__gen_unuint(input[83], 0, 31),
__gen_unuint(input[84], 0, 31),
__gen_unuint(input[85], 0, 31),
__gen_unuint(input[86], 0, 31),
__gen_unuint(input[87], 0, 31),
__gen_unuint(input[88], 0, 31),
__gen_unuint(input[89], 0, 31),
__gen_unuint(input[90], 0, 31),
__gen_unuint(input[91], 0, 31),
__gen_unuint(input[92], 0, 31),
__gen_unuint(input[93], 0, 31),
__gen_unuint(input[94], 0, 31),
__gen_unuint(input[95], 0, 31),
__gen_unuint(input[96], 0, 31),
__gen_unuint(input[97], 0, 31)
],
}
}
}
impl Deserialize for MfxAvcWeightoffsetState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 98];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 98] as *mut [u8; 392]) })?;
Ok((&input).into())
}
}
pub struct MfxBspBufBaseAddrState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub bsd_mpc_row_store_scratch_buffer_address: A,
pub bsd_mpc_row_store_scratch_buffer_attributes: Memoryaddressattributes,
pub mpr_row_store_scratch_buffer_address: A,
pub mpr_row_store_scratch_buffer_attributes: Memoryaddressattributes,
pub bitplane_read_buffer_address: A,
pub bitplane_read_buffer_attributes: Memoryaddressattributes,
}
impl<A: Addr + Default> MfxBspBufBaseAddrState<A> {
pub const DWORD_LENGTH: u32 = 10;
}
impl<A: Addr + Default> Default for MfxBspBufBaseAddrState<A> {
fn default() -> Self {
MfxBspBufBaseAddrState {
dword_length: 8,
subopcode_b: 4,
subopcode_a: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
bsd_mpc_row_store_scratch_buffer_address: Default::default(),
bsd_mpc_row_store_scratch_buffer_attributes: Default::default(),
mpr_row_store_scratch_buffer_address: Default::default(),
mpr_row_store_scratch_buffer_attributes: Default::default(),
bitplane_read_buffer_address: Default::default(),
bitplane_read_buffer_attributes: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MfxBspBufBaseAddrState<A> {
type Out = [u32; 10];
fn pack_into(&self, out: &mut [u32; 10]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.bsd_mpc_row_store_scratch_buffer_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _] = out;
self.bsd_mpc_row_store_scratch_buffer_attributes.pack_into(out3);
}
let v4_address = self.mpr_row_store_scratch_buffer_address.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
{
let [_, _, _, _, _, _, ref mut out6 @ .., _, _, _] = out;
self.mpr_row_store_scratch_buffer_attributes.pack_into(out6);
}
let v7_address = self.bitplane_read_buffer_address.combine(0);
out[7] = v7_address as u32;
out[8] = (v7_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, ref mut out9 @ ..] = out;
self.bitplane_read_buffer_attributes.pack_into(out9);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 10];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 10] as *const [u8; 40]) })
}
}
impl From<&[u32; 10]> for MfxBspBufBaseAddrState<u64> {
fn from(input: &[u32; 10]) -> Self {
MfxBspBufBaseAddrState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
bsd_mpc_row_store_scratch_buffer_address: (__gen_unuint(input[1], 6, 31) as u64) << 6 |
(__gen_unuint(input[2], 0, 15) as u64) << 32,
bsd_mpc_row_store_scratch_buffer_attributes: {{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _] = input;
in3.into()
}},
mpr_row_store_scratch_buffer_address: (__gen_unuint(input[4], 6, 31) as u64) << 6 |
(__gen_unuint(input[5], 0, 15) as u64) << 32,
mpr_row_store_scratch_buffer_attributes: {{
let [_, _, _, _, _, _, ref in6 @ .., _, _, _] = input;
in6.into()
}},
bitplane_read_buffer_address: (__gen_unuint(input[7], 6, 31) as u64) << 6 |
(__gen_unuint(input[8], 0, 15) as u64) << 32,
bitplane_read_buffer_attributes: {{
let [_, _, _, _, _, _, _, _, _, ref in9 @ ..] = input;
in9.into()
}},
}
}
}
impl Deserialize for MfxBspBufBaseAddrState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 10];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 10] as *mut [u8; 40]) })?;
Ok((&input).into())
}
}
pub struct MfxDbkObject<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub pre_deblocking_source_address: A,
pub pre_deblocking_source_mocs: u32,
pub pre_deblocking_source_arbitration_priority_control: u32,
pub pre_deblocking_source_memory_compression_enable: bool,
pub pre_deblocking_source_memory_compression_mode: u32,
pub pre_deblocking_source_tiled_resource_mode: u32,
pub deblocking_control_address: A,
pub deblocking_control_mocs: u32,
pub deblocking_control_arbitration_priority_control: u32,
pub deblocking_control_memory_compression_enable: bool,
pub deblocking_control_memory_compression_mode: u32,
pub deblocking_control_tiled_resource_mode: u32,
pub deblocking_destination_address_high: A,
pub deblocking_destination_mocs: u32,
pub deblocking_destination_arbitration_priority_control: u32,
pub deblocking_destination_memory_compression_enable: bool,
pub deblocking_destination_memory_compression_mode: u32,
pub deblocking_destination_tiled_resource_mode: u32,
pub deblock_row_store_address: A,
pub coeffprobability_stream_in_mocs: u32,
pub deblock_row_store_arbitration_priority_control: u32,
pub deblock_row_store_memory_compression_enable: bool,
pub deblock_row_store_memory_compression_mode: u32,
pub deblock_row_store_tiled_resource_mode: u32,
}
impl<A: Addr + Default> MfxDbkObject<A> {
pub const DWORD_LENGTH: u32 = 13;
pub const HIGHEST_PRIORITY: u32 = 0;
pub const LOWEST_PRIORITY: u32 = 3;
pub const SECOND_HIGHEST_PRIORITY: u32 = 1;
pub const THIRD_HIGHEST_PRIORITY: u32 = 2;
pub const TRMODE_NONE: u32 = 0;
pub const TRMODE_TILEYF: u32 = 1;
pub const TRMODE_TILEYS: u32 = 2;
}
impl<A: Addr + Default> Default for MfxDbkObject<A> {
fn default() -> Self {
MfxDbkObject {
dword_length: 11,
subopcode_b: 9,
subopcode_a: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
pre_deblocking_source_address: Default::default(),
pre_deblocking_source_mocs: Default::default(),
pre_deblocking_source_arbitration_priority_control: Default::default(),
pre_deblocking_source_memory_compression_enable: Default::default(),
pre_deblocking_source_memory_compression_mode: Default::default(),
pre_deblocking_source_tiled_resource_mode: Default::default(),
deblocking_control_address: Default::default(),
deblocking_control_mocs: Default::default(),
deblocking_control_arbitration_priority_control: Default::default(),
deblocking_control_memory_compression_enable: Default::default(),
deblocking_control_memory_compression_mode: Default::default(),
deblocking_control_tiled_resource_mode: Default::default(),
deblocking_destination_address_high: Default::default(),
deblocking_destination_mocs: Default::default(),
deblocking_destination_arbitration_priority_control: Default::default(),
deblocking_destination_memory_compression_enable: Default::default(),
deblocking_destination_memory_compression_mode: Default::default(),
deblocking_destination_tiled_resource_mode: Default::default(),
deblock_row_store_address: Default::default(),
coeffprobability_stream_in_mocs: Default::default(),
deblock_row_store_arbitration_priority_control: Default::default(),
deblock_row_store_memory_compression_enable: Default::default(),
deblock_row_store_memory_compression_mode: Default::default(),
deblock_row_store_tiled_resource_mode: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MfxDbkObject<A> {
type Out = [u32; 13];
fn pack_into(&self, out: &mut [u32; 13]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.pre_deblocking_source_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.pre_deblocking_source_mocs, 1, 6) |
__gen_uint(self.pre_deblocking_source_arbitration_priority_control, 7, 8) |
__gen_uint(self.pre_deblocking_source_memory_compression_enable.into(), 9, 9) |
__gen_uint(self.pre_deblocking_source_memory_compression_mode, 10, 10) |
__gen_uint(self.pre_deblocking_source_tiled_resource_mode, 13, 14);
let v4_address = self.deblocking_control_address.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
out[6] = __gen_uint(self.deblocking_control_mocs, 1, 6) |
__gen_uint(self.deblocking_control_arbitration_priority_control, 7, 8) |
__gen_uint(self.deblocking_control_memory_compression_enable.into(), 9, 9) |
__gen_uint(self.deblocking_control_memory_compression_mode, 10, 10) |
__gen_uint(self.deblocking_control_tiled_resource_mode, 13, 14);
let v7_address = self.deblocking_destination_address_high.combine(0);
out[7] = v7_address as u32;
out[8] = (v7_address >> 32) as u32;
out[9] = __gen_uint(self.deblocking_destination_mocs, 1, 6) |
__gen_uint(self.deblocking_destination_arbitration_priority_control, 7, 8) |
__gen_uint(self.deblocking_destination_memory_compression_enable.into(), 9, 9) |
__gen_uint(self.deblocking_destination_memory_compression_mode, 10, 10) |
__gen_uint(self.deblocking_destination_tiled_resource_mode, 13, 14);
let v10_address = self.deblock_row_store_address.combine(0);
out[10] = v10_address as u32;
out[11] = (v10_address >> 32) as u32;
out[12] = __gen_uint(self.coeffprobability_stream_in_mocs, 1, 6) |
__gen_uint(self.deblock_row_store_arbitration_priority_control, 7, 8) |
__gen_uint(self.deblock_row_store_memory_compression_enable.into(), 9, 9) |
__gen_uint(self.deblock_row_store_memory_compression_mode, 10, 10) |
__gen_uint(self.deblock_row_store_tiled_resource_mode, 13, 14);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 13];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 13] as *const [u8; 52]) })
}
}
impl From<&[u32; 13]> for MfxDbkObject<u64> {
fn from(input: &[u32; 13]) -> Self {
MfxDbkObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pre_deblocking_source_address: (__gen_unuint(input[1], 6, 31) as u64) << 6 |
(__gen_unuint(input[2], 0, 15) as u64) << 32,
pre_deblocking_source_mocs: __gen_unuint(input[3], 1, 6),
pre_deblocking_source_arbitration_priority_control: __gen_unuint(input[3], 7, 8),
pre_deblocking_source_memory_compression_enable: __gen_unuint(input[3], 9, 9) != 0,
pre_deblocking_source_memory_compression_mode: __gen_unuint(input[3], 10, 10),
pre_deblocking_source_tiled_resource_mode: __gen_unuint(input[3], 13, 14),
deblocking_control_address: (__gen_unuint(input[4], 6, 31) as u64) << 6 |
(__gen_unuint(input[5], 0, 15) as u64) << 32,
deblocking_control_mocs: __gen_unuint(input[6], 1, 6),
deblocking_control_arbitration_priority_control: __gen_unuint(input[6], 7, 8),
deblocking_control_memory_compression_enable: __gen_unuint(input[6], 9, 9) != 0,
deblocking_control_memory_compression_mode: __gen_unuint(input[6], 10, 10),
deblocking_control_tiled_resource_mode: __gen_unuint(input[6], 13, 14),
deblocking_destination_address_high: (__gen_unuint(input[7], 6, 31) as u64) << 6 |
(__gen_unuint(input[8], 0, 15) as u64) << 32,
deblocking_destination_mocs: __gen_unuint(input[9], 1, 6),
deblocking_destination_arbitration_priority_control: __gen_unuint(input[9], 7, 8),
deblocking_destination_memory_compression_enable: __gen_unuint(input[9], 9, 9) != 0,
deblocking_destination_memory_compression_mode: __gen_unuint(input[9], 10, 10),
deblocking_destination_tiled_resource_mode: __gen_unuint(input[9], 13, 14),
deblock_row_store_address: (__gen_unuint(input[10], 6, 31) as u64) << 6 |
(__gen_unuint(input[11], 0, 15) as u64) << 32,
coeffprobability_stream_in_mocs: __gen_unuint(input[12], 1, 6),
deblock_row_store_arbitration_priority_control: __gen_unuint(input[12], 7, 8),
deblock_row_store_memory_compression_enable: __gen_unuint(input[12], 9, 9) != 0,
deblock_row_store_memory_compression_mode: __gen_unuint(input[12], 10, 10),
deblock_row_store_tiled_resource_mode: __gen_unuint(input[12], 13, 14),
}
}
}
impl Deserialize for MfxDbkObject<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 13];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 13] as *mut [u8; 52]) })?;
Ok((&input).into())
}
}
pub struct MfxFqmState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub avc: u32,
pub mpeg2: u32,
pub jpeg: u32,
pub quantizer_matrix_8x8: [u32; 64],
}
impl MfxFqmState {
pub const DWORD_LENGTH: u32 = 34;
pub const AVC_4X4_INTER_MATRIX: u32 = 1;
pub const AVC_4X4_INTRA_MATRIX: u32 = 0;
pub const AVC_8X8_INTER_MATRIX: u32 = 3;
pub const AVC_8X8_INTRA_MATRIX: u32 = 2;
pub const JPEG_CHROMA_CB_QUANTIZER_MATRIX_OR_G: u32 = 1;
pub const JPEG_CHROMA_CR_QUANTIZER_MATRIX_OR_B: u32 = 2;
pub const JPEG_LUMA_Y_QUANTIZER_MATRIX_OR_R: u32 = 0;
pub const MPEG_INTRA_QUANTIZER_MATRIX: u32 = 0;
pub const MPEG_NON_INTRA_QUANTIZER_MATRIX: u32 = 1;
}
impl Default for MfxFqmState {
fn default() -> Self {
MfxFqmState {
dword_length: 32,
subopcode_b: 8,
subopcode_a: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
avc: Default::default(),
mpeg2: Default::default(),
jpeg: Default::default(),
quantizer_matrix_8x8: [0; 64],
}
}
}
impl Serialize for MfxFqmState {
type Out = [u32; 34];
fn pack_into(&self, out: &mut [u32; 34]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.jpeg, 0, 1);
out[2] = __gen_uint(self.quantizer_matrix_8x8[0], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[1], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[2], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[3], 24, 31);
out[3] = __gen_uint(self.quantizer_matrix_8x8[4], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[5], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[6], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[7], 24, 31);
out[4] = __gen_uint(self.quantizer_matrix_8x8[8], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[9], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[10], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[11], 24, 31);
out[5] = __gen_uint(self.quantizer_matrix_8x8[12], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[13], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[14], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[15], 24, 31);
out[6] = __gen_uint(self.quantizer_matrix_8x8[16], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[17], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[18], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[19], 24, 31);
out[7] = __gen_uint(self.quantizer_matrix_8x8[20], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[21], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[22], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[23], 24, 31);
out[8] = __gen_uint(self.quantizer_matrix_8x8[24], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[25], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[26], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[27], 24, 31);
out[9] = __gen_uint(self.quantizer_matrix_8x8[28], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[29], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[30], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[31], 24, 31);
out[10] = __gen_uint(self.quantizer_matrix_8x8[32], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[33], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[34], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[35], 24, 31);
out[11] = __gen_uint(self.quantizer_matrix_8x8[36], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[37], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[38], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[39], 24, 31);
out[12] = __gen_uint(self.quantizer_matrix_8x8[40], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[41], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[42], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[43], 24, 31);
out[13] = __gen_uint(self.quantizer_matrix_8x8[44], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[45], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[46], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[47], 24, 31);
out[14] = __gen_uint(self.quantizer_matrix_8x8[48], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[49], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[50], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[51], 24, 31);
out[15] = __gen_uint(self.quantizer_matrix_8x8[52], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[53], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[54], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[55], 24, 31);
out[16] = __gen_uint(self.quantizer_matrix_8x8[56], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[57], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[58], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[59], 24, 31);
out[17] = __gen_uint(self.quantizer_matrix_8x8[60], 0, 7) |
__gen_uint(self.quantizer_matrix_8x8[61], 8, 15) |
__gen_uint(self.quantizer_matrix_8x8[62], 16, 23) |
__gen_uint(self.quantizer_matrix_8x8[63], 24, 31);
out[18] = 0;
out[19] = 0;
out[20] = 0;
out[21] = 0;
out[22] = 0;
out[23] = 0;
out[24] = 0;
out[25] = 0;
out[26] = 0;
out[27] = 0;
out[28] = 0;
out[29] = 0;
out[30] = 0;
out[31] = 0;
out[32] = 0;
out[33] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 34];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 34] as *const [u8; 136]) })
}
}
impl From<&[u32; 34]> for MfxFqmState {
fn from(input: &[u32; 34]) -> Self {
MfxFqmState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
avc: __gen_unuint(input[1], 0, 1),
mpeg2: __gen_unuint(input[1], 0, 1),
jpeg: __gen_unuint(input[1], 0, 1),
quantizer_matrix_8x8: [
__gen_unuint(input[2], 0, 7),
__gen_unuint(input[2], 8, 15),
__gen_unuint(input[2], 16, 23),
__gen_unuint(input[2], 24, 31),
__gen_unuint(input[3], 0, 7),
__gen_unuint(input[3], 8, 15),
__gen_unuint(input[3], 16, 23),
__gen_unuint(input[3], 24, 31),
__gen_unuint(input[4], 0, 7),
__gen_unuint(input[4], 8, 15),
__gen_unuint(input[4], 16, 23),
__gen_unuint(input[4], 24, 31),
__gen_unuint(input[5], 0, 7),
__gen_unuint(input[5], 8, 15),
__gen_unuint(input[5], 16, 23),
__gen_unuint(input[5], 24, 31),
__gen_unuint(input[6], 0, 7),
__gen_unuint(input[6], 8, 15),
__gen_unuint(input[6], 16, 23),
__gen_unuint(input[6], 24, 31),
__gen_unuint(input[7], 0, 7),
__gen_unuint(input[7], 8, 15),
__gen_unuint(input[7], 16, 23),
__gen_unuint(input[7], 24, 31),
__gen_unuint(input[8], 0, 7),
__gen_unuint(input[8], 8, 15),
__gen_unuint(input[8], 16, 23),
__gen_unuint(input[8], 24, 31),
__gen_unuint(input[9], 0, 7),
__gen_unuint(input[9], 8, 15),
__gen_unuint(input[9], 16, 23),
__gen_unuint(input[9], 24, 31),
__gen_unuint(input[10], 0, 7),
__gen_unuint(input[10], 8, 15),
__gen_unuint(input[10], 16, 23),
__gen_unuint(input[10], 24, 31),
__gen_unuint(input[11], 0, 7),
__gen_unuint(input[11], 8, 15),
__gen_unuint(input[11], 16, 23),
__gen_unuint(input[11], 24, 31),
__gen_unuint(input[12], 0, 7),
__gen_unuint(input[12], 8, 15),
__gen_unuint(input[12], 16, 23),
__gen_unuint(input[12], 24, 31),
__gen_unuint(input[13], 0, 7),
__gen_unuint(input[13], 8, 15),
__gen_unuint(input[13], 16, 23),
__gen_unuint(input[13], 24, 31),
__gen_unuint(input[14], 0, 7),
__gen_unuint(input[14], 8, 15),
__gen_unuint(input[14], 16, 23),
__gen_unuint(input[14], 24, 31),
__gen_unuint(input[15], 0, 7),
__gen_unuint(input[15], 8, 15),
__gen_unuint(input[15], 16, 23),
__gen_unuint(input[15], 24, 31),
__gen_unuint(input[16], 0, 7),
__gen_unuint(input[16], 8, 15),
__gen_unuint(input[16], 16, 23),
__gen_unuint(input[16], 24, 31),
__gen_unuint(input[17], 0, 7),
__gen_unuint(input[17], 8, 15),
__gen_unuint(input[17], 16, 23),
__gen_unuint(input[17], 24, 31)
],
}
}
}
impl Deserialize for MfxFqmState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 34];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 34] as *mut [u8; 136]) })?;
Ok((&input).into())
}
}
pub struct MfxIndObjBaseAddrState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub mfx_indirect_bitstream_object_address: A,
pub mfx_indirect_bitstream_object_attributes: Memoryaddressattributes,
pub mfx_indirect_bitstream_object_upper_bound: A,
pub mfx_indirect_mv_object_address: A,
pub mfx_indirect_mv_object_attributes: Memoryaddressattributes,
pub mfx_indirect_mv_object_upper_bound: A,
pub mfd_indirect_it_coeff_object_address: A,
pub mfd_indirect_it_coeff_object_attributes: Memoryaddressattributes,
pub mfd_indirect_it_coeff_object_upper_bound: A,
pub mfd_indirect_it_dblk_object_address: A,
pub mfd_indirect_it_dblk_object_attributes: Memoryaddressattributes,
pub mfd_indirect_it_dblk_object_upper_bound: A,
pub mfc_indirect_pak_bse_object_address: A,
pub mfc_indirect_pak_bse_object_attributes: Memoryaddressattributes,
pub mfc_indirect_pak_bse_object_upper_bound: A,
}
impl<A: Addr + Default> MfxIndObjBaseAddrState<A> {
pub const DWORD_LENGTH: u32 = 26;
}
impl<A: Addr + Default> Default for MfxIndObjBaseAddrState<A> {
fn default() -> Self {
MfxIndObjBaseAddrState {
dword_length: 24,
subopcode_b: 3,
subopcode_a: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
mfx_indirect_bitstream_object_address: Default::default(),
mfx_indirect_bitstream_object_attributes: Default::default(),
mfx_indirect_bitstream_object_upper_bound: Default::default(),
mfx_indirect_mv_object_address: Default::default(),
mfx_indirect_mv_object_attributes: Default::default(),
mfx_indirect_mv_object_upper_bound: Default::default(),
mfd_indirect_it_coeff_object_address: Default::default(),
mfd_indirect_it_coeff_object_attributes: Default::default(),
mfd_indirect_it_coeff_object_upper_bound: Default::default(),
mfd_indirect_it_dblk_object_address: Default::default(),
mfd_indirect_it_dblk_object_attributes: Default::default(),
mfd_indirect_it_dblk_object_upper_bound: Default::default(),
mfc_indirect_pak_bse_object_address: Default::default(),
mfc_indirect_pak_bse_object_attributes: Default::default(),
mfc_indirect_pak_bse_object_upper_bound: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MfxIndObjBaseAddrState<A> {
type Out = [u32; 26];
fn pack_into(&self, out: &mut [u32; 26]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.mfx_indirect_bitstream_object_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.mfx_indirect_bitstream_object_attributes.pack_into(out3);
}
let v4_address = self.mfx_indirect_bitstream_object_upper_bound.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
let v6_address = self.mfx_indirect_mv_object_address.combine(0);
out[6] = v6_address as u32;
out[7] = (v6_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, ref mut out8 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.mfx_indirect_mv_object_attributes.pack_into(out8);
}
let v9_address = self.mfx_indirect_mv_object_upper_bound.combine(0);
out[9] = v9_address as u32;
out[10] = (v9_address >> 32) as u32;
let v11_address = self.mfd_indirect_it_coeff_object_address.combine(0);
out[11] = v11_address as u32;
out[12] = (v11_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out13 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.mfd_indirect_it_coeff_object_attributes.pack_into(out13);
}
let v14_address = self.mfd_indirect_it_coeff_object_upper_bound.combine(0);
out[14] = v14_address as u32;
out[15] = (v14_address >> 32) as u32;
let v16_address = self.mfd_indirect_it_dblk_object_address.combine(0);
out[16] = v16_address as u32;
out[17] = (v16_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out18 @ .., _, _, _, _, _, _, _] = out;
self.mfd_indirect_it_dblk_object_attributes.pack_into(out18);
}
let v19_address = self.mfd_indirect_it_dblk_object_upper_bound.combine(0);
out[19] = v19_address as u32;
out[20] = (v19_address >> 32) as u32;
let v21_address = self.mfc_indirect_pak_bse_object_address.combine(0);
out[21] = v21_address as u32;
out[22] = (v21_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out23 @ .., _, _] = out;
self.mfc_indirect_pak_bse_object_attributes.pack_into(out23);
}
let v24_address = self.mfc_indirect_pak_bse_object_upper_bound.combine(0);
out[24] = v24_address as u32;
out[25] = (v24_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 26];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 26] as *const [u8; 104]) })
}
}
impl From<&[u32; 26]> for MfxIndObjBaseAddrState<u64> {
fn from(input: &[u32; 26]) -> Self {
MfxIndObjBaseAddrState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
mfx_indirect_bitstream_object_address: (__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
mfx_indirect_bitstream_object_attributes: {{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in3.into()
}},
mfx_indirect_bitstream_object_upper_bound: (__gen_unuint(input[4], 0, 31) as u64) |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
mfx_indirect_mv_object_address: (__gen_unuint(input[6], 0, 31) as u64) |
(__gen_unuint(input[7], 0, 31) as u64) << 32,
mfx_indirect_mv_object_attributes: {{
let [_, _, _, _, _, _, _, _, ref in8 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in8.into()
}},
mfx_indirect_mv_object_upper_bound: (__gen_unuint(input[9], 0, 31) as u64) |
(__gen_unuint(input[10], 0, 31) as u64) << 32,
mfd_indirect_it_coeff_object_address: (__gen_unuint(input[11], 0, 31) as u64) |
(__gen_unuint(input[12], 0, 31) as u64) << 32,
mfd_indirect_it_coeff_object_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref in13 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = input;
in13.into()
}},
mfd_indirect_it_coeff_object_upper_bound: (__gen_unuint(input[14], 0, 31) as u64) |
(__gen_unuint(input[15], 0, 31) as u64) << 32,
mfd_indirect_it_dblk_object_address: (__gen_unuint(input[16], 0, 31) as u64) |
(__gen_unuint(input[17], 0, 31) as u64) << 32,
mfd_indirect_it_dblk_object_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in18 @ .., _, _, _, _, _, _, _] = input;
in18.into()
}},
mfd_indirect_it_dblk_object_upper_bound: (__gen_unuint(input[19], 0, 31) as u64) |
(__gen_unuint(input[20], 0, 31) as u64) << 32,
mfc_indirect_pak_bse_object_address: (__gen_unuint(input[21], 0, 31) as u64) |
(__gen_unuint(input[22], 0, 31) as u64) << 32,
mfc_indirect_pak_bse_object_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in23 @ .., _, _] = input;
in23.into()
}},
mfc_indirect_pak_bse_object_upper_bound: (__gen_unuint(input[24], 0, 31) as u64) |
(__gen_unuint(input[25], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for MfxIndObjBaseAddrState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 26];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 26] as *mut [u8; 104]) })?;
Ok((&input).into())
}
}
pub struct MfxJpegHuffTableState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub huffman_table_id: u32,
pub dc_bits: [u32; 12],
pub dc_huffval: [u32; 12],
pub ac_bits: [u32; 16],
pub ac_huffval: [u32; 160],
pub ac_huffval2: [u32; 2],
}
impl MfxJpegHuffTableState {
pub const DWORD_LENGTH: u32 = 831;
}
impl Default for MfxJpegHuffTableState {
fn default() -> Self {
MfxJpegHuffTableState {
dword_length: 829,
subopcode_b: 2,
subopcode_a: 0,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
huffman_table_id: Default::default(),
dc_bits: Default::default(),
dc_huffval: Default::default(),
ac_bits: Default::default(),
ac_huffval: [0; 160],
ac_huffval2: Default::default(),
}
}
}
impl Serialize for MfxJpegHuffTableState {
type Out = [u32; 831];
fn pack_into(&self, out: &mut [u32; 831]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.huffman_table_id, 0, 0);
out[2] = __gen_uint(self.dc_bits[0], 0, 7) |
__gen_uint(self.dc_bits[1], 8, 15) |
__gen_uint(self.dc_bits[2], 16, 23) |
__gen_uint(self.dc_bits[3], 24, 31);
out[3] = __gen_uint(self.dc_bits[4], 0, 7) |
__gen_uint(self.dc_bits[5], 8, 15) |
__gen_uint(self.dc_bits[6], 16, 23) |
__gen_uint(self.dc_bits[7], 24, 31);
out[4] = __gen_uint(self.dc_bits[8], 0, 7) |
__gen_uint(self.dc_bits[9], 8, 15) |
__gen_uint(self.dc_bits[10], 16, 23) |
__gen_uint(self.dc_bits[11], 24, 31);
out[5] = __gen_uint(self.dc_huffval[0], 0, 7) |
__gen_uint(self.dc_huffval[1], 8, 15) |
__gen_uint(self.dc_huffval[2], 16, 23) |
__gen_uint(self.dc_huffval[3], 24, 31);
out[6] = __gen_uint(self.dc_huffval[4], 0, 7) |
__gen_uint(self.dc_huffval[5], 8, 15) |
__gen_uint(self.dc_huffval[6], 16, 23) |
__gen_uint(self.dc_huffval[7], 24, 31);
out[7] = __gen_uint(self.dc_huffval[8], 0, 7) |
__gen_uint(self.dc_huffval[9], 8, 15) |
__gen_uint(self.dc_huffval[10], 16, 23) |
__gen_uint(self.dc_huffval[11], 24, 31);
out[8] = __gen_uint(self.ac_bits[0], 0, 7) |
__gen_uint(self.ac_bits[1], 8, 15) |
__gen_uint(self.ac_bits[2], 16, 23) |
__gen_uint(self.ac_bits[3], 24, 31);
out[9] = __gen_uint(self.ac_bits[4], 0, 7) |
__gen_uint(self.ac_bits[5], 8, 15) |
__gen_uint(self.ac_bits[6], 16, 23) |
__gen_uint(self.ac_bits[7], 24, 31);
out[10] = __gen_uint(self.ac_bits[8], 0, 7) |
__gen_uint(self.ac_bits[9], 8, 15) |
__gen_uint(self.ac_bits[10], 16, 23) |
__gen_uint(self.ac_bits[11], 24, 31);
out[11] = __gen_uint(self.ac_bits[12], 0, 7) |
__gen_uint(self.ac_bits[13], 8, 15) |
__gen_uint(self.ac_bits[14], 16, 23) |
__gen_uint(self.ac_bits[15], 24, 31);
out[12] = __gen_uint(self.ac_huffval[0], 0, 7) |
__gen_uint(self.ac_huffval[1], 8, 15) |
__gen_uint(self.ac_huffval[2], 16, 23) |
__gen_uint(self.ac_huffval[3], 24, 31);
out[13] = __gen_uint(self.ac_huffval[4], 0, 7) |
__gen_uint(self.ac_huffval[5], 8, 15) |
__gen_uint(self.ac_huffval[6], 16, 23) |
__gen_uint(self.ac_huffval[7], 24, 31);
out[14] = __gen_uint(self.ac_huffval[8], 0, 7) |
__gen_uint(self.ac_huffval[9], 8, 15) |
__gen_uint(self.ac_huffval[10], 16, 23) |
__gen_uint(self.ac_huffval[11], 24, 31);
out[15] = __gen_uint(self.ac_huffval[12], 0, 7) |
__gen_uint(self.ac_huffval[13], 8, 15) |
__gen_uint(self.ac_huffval[14], 16, 23) |
__gen_uint(self.ac_huffval[15], 24, 31);
out[16] = __gen_uint(self.ac_huffval[16], 0, 7) |
__gen_uint(self.ac_huffval[17], 8, 15) |
__gen_uint(self.ac_huffval[18], 16, 23) |
__gen_uint(self.ac_huffval[19], 24, 31);
out[17] = __gen_uint(self.ac_huffval[20], 0, 7) |
__gen_uint(self.ac_huffval[21], 8, 15) |
__gen_uint(self.ac_huffval[22], 16, 23) |
__gen_uint(self.ac_huffval[23], 24, 31);
out[18] = __gen_uint(self.ac_huffval[24], 0, 7) |
__gen_uint(self.ac_huffval[25], 8, 15) |
__gen_uint(self.ac_huffval[26], 16, 23) |
__gen_uint(self.ac_huffval[27], 24, 31);
out[19] = __gen_uint(self.ac_huffval[28], 0, 7) |
__gen_uint(self.ac_huffval[29], 8, 15) |
__gen_uint(self.ac_huffval[30], 16, 23) |
__gen_uint(self.ac_huffval[31], 24, 31);
out[20] = __gen_uint(self.ac_huffval[32], 0, 7) |
__gen_uint(self.ac_huffval[33], 8, 15) |
__gen_uint(self.ac_huffval[34], 16, 23) |
__gen_uint(self.ac_huffval[35], 24, 31);
out[21] = __gen_uint(self.ac_huffval[36], 0, 7) |
__gen_uint(self.ac_huffval[37], 8, 15) |
__gen_uint(self.ac_huffval[38], 16, 23) |
__gen_uint(self.ac_huffval[39], 24, 31);
out[22] = __gen_uint(self.ac_huffval[40], 0, 7) |
__gen_uint(self.ac_huffval[41], 8, 15) |
__gen_uint(self.ac_huffval[42], 16, 23) |
__gen_uint(self.ac_huffval[43], 24, 31);
out[23] = __gen_uint(self.ac_huffval[44], 0, 7) |
__gen_uint(self.ac_huffval[45], 8, 15) |
__gen_uint(self.ac_huffval[46], 16, 23) |
__gen_uint(self.ac_huffval[47], 24, 31);
out[24] = __gen_uint(self.ac_huffval[48], 0, 7) |
__gen_uint(self.ac_huffval[49], 8, 15) |
__gen_uint(self.ac_huffval[50], 16, 23) |
__gen_uint(self.ac_huffval[51], 24, 31);
out[25] = __gen_uint(self.ac_huffval[52], 0, 7) |
__gen_uint(self.ac_huffval[53], 8, 15) |
__gen_uint(self.ac_huffval[54], 16, 23) |
__gen_uint(self.ac_huffval[55], 24, 31);
out[26] = __gen_uint(self.ac_huffval[56], 0, 7) |
__gen_uint(self.ac_huffval[57], 8, 15) |
__gen_uint(self.ac_huffval[58], 16, 23) |
__gen_uint(self.ac_huffval[59], 24, 31);
out[27] = __gen_uint(self.ac_huffval[60], 0, 7) |
__gen_uint(self.ac_huffval[61], 8, 15) |
__gen_uint(self.ac_huffval[62], 16, 23) |
__gen_uint(self.ac_huffval[63], 24, 31);
out[28] = __gen_uint(self.ac_huffval[64], 0, 7) |
__gen_uint(self.ac_huffval[65], 8, 15) |
__gen_uint(self.ac_huffval[66], 16, 23) |
__gen_uint(self.ac_huffval[67], 24, 31);
out[29] = __gen_uint(self.ac_huffval[68], 0, 7) |
__gen_uint(self.ac_huffval[69], 8, 15) |
__gen_uint(self.ac_huffval[70], 16, 23) |
__gen_uint(self.ac_huffval[71], 24, 31);
out[30] = __gen_uint(self.ac_huffval[72], 0, 7) |
__gen_uint(self.ac_huffval[73], 8, 15) |
__gen_uint(self.ac_huffval[74], 16, 23) |
__gen_uint(self.ac_huffval[75], 24, 31);
out[31] = __gen_uint(self.ac_huffval[76], 0, 7) |
__gen_uint(self.ac_huffval[77], 8, 15) |
__gen_uint(self.ac_huffval[78], 16, 23) |
__gen_uint(self.ac_huffval[79], 24, 31);
out[32] = __gen_uint(self.ac_huffval[80], 0, 7) |
__gen_uint(self.ac_huffval[81], 8, 15) |
__gen_uint(self.ac_huffval[82], 16, 23) |
__gen_uint(self.ac_huffval[83], 24, 31);
out[33] = __gen_uint(self.ac_huffval[84], 0, 7) |
__gen_uint(self.ac_huffval[85], 8, 15) |
__gen_uint(self.ac_huffval[86], 16, 23) |
__gen_uint(self.ac_huffval[87], 24, 31);
out[34] = __gen_uint(self.ac_huffval[88], 0, 7) |
__gen_uint(self.ac_huffval[89], 8, 15) |
__gen_uint(self.ac_huffval[90], 16, 23) |
__gen_uint(self.ac_huffval[91], 24, 31);
out[35] = __gen_uint(self.ac_huffval[92], 0, 7) |
__gen_uint(self.ac_huffval[93], 8, 15) |
__gen_uint(self.ac_huffval[94], 16, 23) |
__gen_uint(self.ac_huffval[95], 24, 31);
out[36] = __gen_uint(self.ac_huffval[96], 0, 7) |
__gen_uint(self.ac_huffval[97], 8, 15) |
__gen_uint(self.ac_huffval[98], 16, 23) |
__gen_uint(self.ac_huffval[99], 24, 31);
out[37] = __gen_uint(self.ac_huffval[100], 0, 7) |
__gen_uint(self.ac_huffval[101], 8, 15) |
__gen_uint(self.ac_huffval[102], 16, 23) |
__gen_uint(self.ac_huffval[103], 24, 31);
out[38] = __gen_uint(self.ac_huffval[104], 0, 7) |
__gen_uint(self.ac_huffval[105], 8, 15) |
__gen_uint(self.ac_huffval[106], 16, 23) |
__gen_uint(self.ac_huffval[107], 24, 31);
out[39] = __gen_uint(self.ac_huffval[108], 0, 7) |
__gen_uint(self.ac_huffval[109], 8, 15) |
__gen_uint(self.ac_huffval[110], 16, 23) |
__gen_uint(self.ac_huffval[111], 24, 31);
out[40] = __gen_uint(self.ac_huffval[112], 0, 7) |
__gen_uint(self.ac_huffval[113], 8, 15) |
__gen_uint(self.ac_huffval[114], 16, 23) |
__gen_uint(self.ac_huffval[115], 24, 31);
out[41] = __gen_uint(self.ac_huffval[116], 0, 7) |
__gen_uint(self.ac_huffval[117], 8, 15) |
__gen_uint(self.ac_huffval[118], 16, 23) |
__gen_uint(self.ac_huffval[119], 24, 31);
out[42] = __gen_uint(self.ac_huffval[120], 0, 7) |
__gen_uint(self.ac_huffval[121], 8, 15) |
__gen_uint(self.ac_huffval[122], 16, 23) |
__gen_uint(self.ac_huffval[123], 24, 31);
out[43] = __gen_uint(self.ac_huffval[124], 0, 7) |
__gen_uint(self.ac_huffval[125], 8, 15) |
__gen_uint(self.ac_huffval[126], 16, 23) |
__gen_uint(self.ac_huffval[127], 24, 31);
out[44] = __gen_uint(self.ac_huffval[128], 0, 7) |
__gen_uint(self.ac_huffval[129], 8, 15) |
__gen_uint(self.ac_huffval[130], 16, 23) |
__gen_uint(self.ac_huffval[131], 24, 31);
out[45] = __gen_uint(self.ac_huffval[132], 0, 7) |
__gen_uint(self.ac_huffval[133], 8, 15) |
__gen_uint(self.ac_huffval[134], 16, 23) |
__gen_uint(self.ac_huffval[135], 24, 31);
out[46] = __gen_uint(self.ac_huffval[136], 0, 7) |
__gen_uint(self.ac_huffval[137], 8, 15) |
__gen_uint(self.ac_huffval[138], 16, 23) |
__gen_uint(self.ac_huffval[139], 24, 31);
out[47] = __gen_uint(self.ac_huffval[140], 0, 7) |
__gen_uint(self.ac_huffval[141], 8, 15) |
__gen_uint(self.ac_huffval[142], 16, 23) |
__gen_uint(self.ac_huffval[143], 24, 31);
out[48] = __gen_uint(self.ac_huffval[144], 0, 7) |
__gen_uint(self.ac_huffval[145], 8, 15) |
__gen_uint(self.ac_huffval[146], 16, 23) |
__gen_uint(self.ac_huffval[147], 24, 31);
out[49] = __gen_uint(self.ac_huffval[148], 0, 7) |
__gen_uint(self.ac_huffval[149], 8, 15) |
__gen_uint(self.ac_huffval[150], 16, 23) |
__gen_uint(self.ac_huffval[151], 24, 31);
out[50] = __gen_uint(self.ac_huffval[152], 0, 7) |
__gen_uint(self.ac_huffval[153], 8, 15) |
__gen_uint(self.ac_huffval[154], 16, 23) |
__gen_uint(self.ac_huffval[155], 24, 31);
out[51] = __gen_uint(self.ac_huffval[156], 0, 7) |
__gen_uint(self.ac_huffval[157], 8, 15) |
__gen_uint(self.ac_huffval[158], 16, 23) |
__gen_uint(self.ac_huffval[159], 24, 31);
out[52] = __gen_uint(self.ac_huffval2[0], 0, 7) |
__gen_uint(self.ac_huffval2[1], 8, 15);
out[53] = 0;
out[54] = 0;
out[55] = 0;
out[56] = 0;
out[57] = 0;
out[58] = 0;
out[59] = 0;
out[60] = 0;
out[61] = 0;
out[62] = 0;
out[63] = 0;
out[64] = 0;
out[65] = 0;
out[66] = 0;
out[67] = 0;
out[68] = 0;
out[69] = 0;
out[70] = 0;
out[71] = 0;
out[72] = 0;
out[73] = 0;
out[74] = 0;
out[75] = 0;
out[76] = 0;
out[77] = 0;
out[78] = 0;
out[79] = 0;
out[80] = 0;
out[81] = 0;
out[82] = 0;
out[83] = 0;
out[84] = 0;
out[85] = 0;
out[86] = 0;
out[87] = 0;
out[88] = 0;
out[89] = 0;
out[90] = 0;
out[91] = 0;
out[92] = 0;
out[93] = 0;
out[94] = 0;
out[95] = 0;
out[96] = 0;
out[97] = 0;
out[98] = 0;
out[99] = 0;
out[100] = 0;
out[101] = 0;
out[102] = 0;
out[103] = 0;
out[104] = 0;
out[105] = 0;
out[106] = 0;
out[107] = 0;
out[108] = 0;
out[109] = 0;
out[110] = 0;
out[111] = 0;
out[112] = 0;
out[113] = 0;
out[114] = 0;
out[115] = 0;
out[116] = 0;
out[117] = 0;
out[118] = 0;
out[119] = 0;
out[120] = 0;
out[121] = 0;
out[122] = 0;
out[123] = 0;
out[124] = 0;
out[125] = 0;
out[126] = 0;
out[127] = 0;
out[128] = 0;
out[129] = 0;
out[130] = 0;
out[131] = 0;
out[132] = 0;
out[133] = 0;
out[134] = 0;
out[135] = 0;
out[136] = 0;
out[137] = 0;
out[138] = 0;
out[139] = 0;
out[140] = 0;
out[141] = 0;
out[142] = 0;
out[143] = 0;
out[144] = 0;
out[145] = 0;
out[146] = 0;
out[147] = 0;
out[148] = 0;
out[149] = 0;
out[150] = 0;
out[151] = 0;
out[152] = 0;
out[153] = 0;
out[154] = 0;
out[155] = 0;
out[156] = 0;
out[157] = 0;
out[158] = 0;
out[159] = 0;
out[160] = 0;
out[161] = 0;
out[162] = 0;
out[163] = 0;
out[164] = 0;
out[165] = 0;
out[166] = 0;
out[167] = 0;
out[168] = 0;
out[169] = 0;
out[170] = 0;
out[171] = 0;
out[172] = 0;
out[173] = 0;
out[174] = 0;
out[175] = 0;
out[176] = 0;
out[177] = 0;
out[178] = 0;
out[179] = 0;
out[180] = 0;
out[181] = 0;
out[182] = 0;
out[183] = 0;
out[184] = 0;
out[185] = 0;
out[186] = 0;
out[187] = 0;
out[188] = 0;
out[189] = 0;
out[190] = 0;
out[191] = 0;
out[192] = 0;
out[193] = 0;
out[194] = 0;
out[195] = 0;
out[196] = 0;
out[197] = 0;
out[198] = 0;
out[199] = 0;
out[200] = 0;
out[201] = 0;
out[202] = 0;
out[203] = 0;
out[204] = 0;
out[205] = 0;
out[206] = 0;
out[207] = 0;
out[208] = 0;
out[209] = 0;
out[210] = 0;
out[211] = 0;
out[212] = 0;
out[213] = 0;
out[214] = 0;
out[215] = 0;
out[216] = 0;
out[217] = 0;
out[218] = 0;
out[219] = 0;
out[220] = 0;
out[221] = 0;
out[222] = 0;
out[223] = 0;
out[224] = 0;
out[225] = 0;
out[226] = 0;
out[227] = 0;
out[228] = 0;
out[229] = 0;
out[230] = 0;
out[231] = 0;
out[232] = 0;
out[233] = 0;
out[234] = 0;
out[235] = 0;
out[236] = 0;
out[237] = 0;
out[238] = 0;
out[239] = 0;
out[240] = 0;
out[241] = 0;
out[242] = 0;
out[243] = 0;
out[244] = 0;
out[245] = 0;
out[246] = 0;
out[247] = 0;
out[248] = 0;
out[249] = 0;
out[250] = 0;
out[251] = 0;
out[252] = 0;
out[253] = 0;
out[254] = 0;
out[255] = 0;
out[256] = 0;
out[257] = 0;
out[258] = 0;
out[259] = 0;
out[260] = 0;
out[261] = 0;
out[262] = 0;
out[263] = 0;
out[264] = 0;
out[265] = 0;
out[266] = 0;
out[267] = 0;
out[268] = 0;
out[269] = 0;
out[270] = 0;
out[271] = 0;
out[272] = 0;
out[273] = 0;
out[274] = 0;
out[275] = 0;
out[276] = 0;
out[277] = 0;
out[278] = 0;
out[279] = 0;
out[280] = 0;
out[281] = 0;
out[282] = 0;
out[283] = 0;
out[284] = 0;
out[285] = 0;
out[286] = 0;
out[287] = 0;
out[288] = 0;
out[289] = 0;
out[290] = 0;
out[291] = 0;
out[292] = 0;
out[293] = 0;
out[294] = 0;
out[295] = 0;
out[296] = 0;
out[297] = 0;
out[298] = 0;
out[299] = 0;
out[300] = 0;
out[301] = 0;
out[302] = 0;
out[303] = 0;
out[304] = 0;
out[305] = 0;
out[306] = 0;
out[307] = 0;
out[308] = 0;
out[309] = 0;
out[310] = 0;
out[311] = 0;
out[312] = 0;
out[313] = 0;
out[314] = 0;
out[315] = 0;
out[316] = 0;
out[317] = 0;
out[318] = 0;
out[319] = 0;
out[320] = 0;
out[321] = 0;
out[322] = 0;
out[323] = 0;
out[324] = 0;
out[325] = 0;
out[326] = 0;
out[327] = 0;
out[328] = 0;
out[329] = 0;
out[330] = 0;
out[331] = 0;
out[332] = 0;
out[333] = 0;
out[334] = 0;
out[335] = 0;
out[336] = 0;
out[337] = 0;
out[338] = 0;
out[339] = 0;
out[340] = 0;
out[341] = 0;
out[342] = 0;
out[343] = 0;
out[344] = 0;
out[345] = 0;
out[346] = 0;
out[347] = 0;
out[348] = 0;
out[349] = 0;
out[350] = 0;
out[351] = 0;
out[352] = 0;
out[353] = 0;
out[354] = 0;
out[355] = 0;
out[356] = 0;
out[357] = 0;
out[358] = 0;
out[359] = 0;
out[360] = 0;
out[361] = 0;
out[362] = 0;
out[363] = 0;
out[364] = 0;
out[365] = 0;
out[366] = 0;
out[367] = 0;
out[368] = 0;
out[369] = 0;
out[370] = 0;
out[371] = 0;
out[372] = 0;
out[373] = 0;
out[374] = 0;
out[375] = 0;
out[376] = 0;
out[377] = 0;
out[378] = 0;
out[379] = 0;
out[380] = 0;
out[381] = 0;
out[382] = 0;
out[383] = 0;
out[384] = 0;
out[385] = 0;
out[386] = 0;
out[387] = 0;
out[388] = 0;
out[389] = 0;
out[390] = 0;
out[391] = 0;
out[392] = 0;
out[393] = 0;
out[394] = 0;
out[395] = 0;
out[396] = 0;
out[397] = 0;
out[398] = 0;
out[399] = 0;
out[400] = 0;
out[401] = 0;
out[402] = 0;
out[403] = 0;
out[404] = 0;
out[405] = 0;
out[406] = 0;
out[407] = 0;
out[408] = 0;
out[409] = 0;
out[410] = 0;
out[411] = 0;
out[412] = 0;
out[413] = 0;
out[414] = 0;
out[415] = 0;
out[416] = 0;
out[417] = 0;
out[418] = 0;
out[419] = 0;
out[420] = 0;
out[421] = 0;
out[422] = 0;
out[423] = 0;
out[424] = 0;
out[425] = 0;
out[426] = 0;
out[427] = 0;
out[428] = 0;
out[429] = 0;
out[430] = 0;
out[431] = 0;
out[432] = 0;
out[433] = 0;
out[434] = 0;
out[435] = 0;
out[436] = 0;
out[437] = 0;
out[438] = 0;
out[439] = 0;
out[440] = 0;
out[441] = 0;
out[442] = 0;
out[443] = 0;
out[444] = 0;
out[445] = 0;
out[446] = 0;
out[447] = 0;
out[448] = 0;
out[449] = 0;
out[450] = 0;
out[451] = 0;
out[452] = 0;
out[453] = 0;
out[454] = 0;
out[455] = 0;
out[456] = 0;
out[457] = 0;
out[458] = 0;
out[459] = 0;
out[460] = 0;
out[461] = 0;
out[462] = 0;
out[463] = 0;
out[464] = 0;
out[465] = 0;
out[466] = 0;
out[467] = 0;
out[468] = 0;
out[469] = 0;
out[470] = 0;
out[471] = 0;
out[472] = 0;
out[473] = 0;
out[474] = 0;
out[475] = 0;
out[476] = 0;
out[477] = 0;
out[478] = 0;
out[479] = 0;
out[480] = 0;
out[481] = 0;
out[482] = 0;
out[483] = 0;
out[484] = 0;
out[485] = 0;
out[486] = 0;
out[487] = 0;
out[488] = 0;
out[489] = 0;
out[490] = 0;
out[491] = 0;
out[492] = 0;
out[493] = 0;
out[494] = 0;
out[495] = 0;
out[496] = 0;
out[497] = 0;
out[498] = 0;
out[499] = 0;
out[500] = 0;
out[501] = 0;
out[502] = 0;
out[503] = 0;
out[504] = 0;
out[505] = 0;
out[506] = 0;
out[507] = 0;
out[508] = 0;
out[509] = 0;
out[510] = 0;
out[511] = 0;
out[512] = 0;
out[513] = 0;
out[514] = 0;
out[515] = 0;
out[516] = 0;
out[517] = 0;
out[518] = 0;
out[519] = 0;
out[520] = 0;
out[521] = 0;
out[522] = 0;
out[523] = 0;
out[524] = 0;
out[525] = 0;
out[526] = 0;
out[527] = 0;
out[528] = 0;
out[529] = 0;
out[530] = 0;
out[531] = 0;
out[532] = 0;
out[533] = 0;
out[534] = 0;
out[535] = 0;
out[536] = 0;
out[537] = 0;
out[538] = 0;
out[539] = 0;
out[540] = 0;
out[541] = 0;
out[542] = 0;
out[543] = 0;
out[544] = 0;
out[545] = 0;
out[546] = 0;
out[547] = 0;
out[548] = 0;
out[549] = 0;
out[550] = 0;
out[551] = 0;
out[552] = 0;
out[553] = 0;
out[554] = 0;
out[555] = 0;
out[556] = 0;
out[557] = 0;
out[558] = 0;
out[559] = 0;
out[560] = 0;
out[561] = 0;
out[562] = 0;
out[563] = 0;
out[564] = 0;
out[565] = 0;
out[566] = 0;
out[567] = 0;
out[568] = 0;
out[569] = 0;
out[570] = 0;
out[571] = 0;
out[572] = 0;
out[573] = 0;
out[574] = 0;
out[575] = 0;
out[576] = 0;
out[577] = 0;
out[578] = 0;
out[579] = 0;
out[580] = 0;
out[581] = 0;
out[582] = 0;
out[583] = 0;
out[584] = 0;
out[585] = 0;
out[586] = 0;
out[587] = 0;
out[588] = 0;
out[589] = 0;
out[590] = 0;
out[591] = 0;
out[592] = 0;
out[593] = 0;
out[594] = 0;
out[595] = 0;
out[596] = 0;
out[597] = 0;
out[598] = 0;
out[599] = 0;
out[600] = 0;
out[601] = 0;
out[602] = 0;
out[603] = 0;
out[604] = 0;
out[605] = 0;
out[606] = 0;
out[607] = 0;
out[608] = 0;
out[609] = 0;
out[610] = 0;
out[611] = 0;
out[612] = 0;
out[613] = 0;
out[614] = 0;
out[615] = 0;
out[616] = 0;
out[617] = 0;
out[618] = 0;
out[619] = 0;
out[620] = 0;
out[621] = 0;
out[622] = 0;
out[623] = 0;
out[624] = 0;
out[625] = 0;
out[626] = 0;
out[627] = 0;
out[628] = 0;
out[629] = 0;
out[630] = 0;
out[631] = 0;
out[632] = 0;
out[633] = 0;
out[634] = 0;
out[635] = 0;
out[636] = 0;
out[637] = 0;
out[638] = 0;
out[639] = 0;
out[640] = 0;
out[641] = 0;
out[642] = 0;
out[643] = 0;
out[644] = 0;
out[645] = 0;
out[646] = 0;
out[647] = 0;
out[648] = 0;
out[649] = 0;
out[650] = 0;
out[651] = 0;
out[652] = 0;
out[653] = 0;
out[654] = 0;
out[655] = 0;
out[656] = 0;
out[657] = 0;
out[658] = 0;
out[659] = 0;
out[660] = 0;
out[661] = 0;
out[662] = 0;
out[663] = 0;
out[664] = 0;
out[665] = 0;
out[666] = 0;
out[667] = 0;
out[668] = 0;
out[669] = 0;
out[670] = 0;
out[671] = 0;
out[672] = 0;
out[673] = 0;
out[674] = 0;
out[675] = 0;
out[676] = 0;
out[677] = 0;
out[678] = 0;
out[679] = 0;
out[680] = 0;
out[681] = 0;
out[682] = 0;
out[683] = 0;
out[684] = 0;
out[685] = 0;
out[686] = 0;
out[687] = 0;
out[688] = 0;
out[689] = 0;
out[690] = 0;
out[691] = 0;
out[692] = 0;
out[693] = 0;
out[694] = 0;
out[695] = 0;
out[696] = 0;
out[697] = 0;
out[698] = 0;
out[699] = 0;
out[700] = 0;
out[701] = 0;
out[702] = 0;
out[703] = 0;
out[704] = 0;
out[705] = 0;
out[706] = 0;
out[707] = 0;
out[708] = 0;
out[709] = 0;
out[710] = 0;
out[711] = 0;
out[712] = 0;
out[713] = 0;
out[714] = 0;
out[715] = 0;
out[716] = 0;
out[717] = 0;
out[718] = 0;
out[719] = 0;
out[720] = 0;
out[721] = 0;
out[722] = 0;
out[723] = 0;
out[724] = 0;
out[725] = 0;
out[726] = 0;
out[727] = 0;
out[728] = 0;
out[729] = 0;
out[730] = 0;
out[731] = 0;
out[732] = 0;
out[733] = 0;
out[734] = 0;
out[735] = 0;
out[736] = 0;
out[737] = 0;
out[738] = 0;
out[739] = 0;
out[740] = 0;
out[741] = 0;
out[742] = 0;
out[743] = 0;
out[744] = 0;
out[745] = 0;
out[746] = 0;
out[747] = 0;
out[748] = 0;
out[749] = 0;
out[750] = 0;
out[751] = 0;
out[752] = 0;
out[753] = 0;
out[754] = 0;
out[755] = 0;
out[756] = 0;
out[757] = 0;
out[758] = 0;
out[759] = 0;
out[760] = 0;
out[761] = 0;
out[762] = 0;
out[763] = 0;
out[764] = 0;
out[765] = 0;
out[766] = 0;
out[767] = 0;
out[768] = 0;
out[769] = 0;
out[770] = 0;
out[771] = 0;
out[772] = 0;
out[773] = 0;
out[774] = 0;
out[775] = 0;
out[776] = 0;
out[777] = 0;
out[778] = 0;
out[779] = 0;
out[780] = 0;
out[781] = 0;
out[782] = 0;
out[783] = 0;
out[784] = 0;
out[785] = 0;
out[786] = 0;
out[787] = 0;
out[788] = 0;
out[789] = 0;
out[790] = 0;
out[791] = 0;
out[792] = 0;
out[793] = 0;
out[794] = 0;
out[795] = 0;
out[796] = 0;
out[797] = 0;
out[798] = 0;
out[799] = 0;
out[800] = 0;
out[801] = 0;
out[802] = 0;
out[803] = 0;
out[804] = 0;
out[805] = 0;
out[806] = 0;
out[807] = 0;
out[808] = 0;
out[809] = 0;
out[810] = 0;
out[811] = 0;
out[812] = 0;
out[813] = 0;
out[814] = 0;
out[815] = 0;
out[816] = 0;
out[817] = 0;
out[818] = 0;
out[819] = 0;
out[820] = 0;
out[821] = 0;
out[822] = 0;
out[823] = 0;
out[824] = 0;
out[825] = 0;
out[826] = 0;
out[827] = 0;
out[828] = 0;
out[829] = 0;
out[830] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 831];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 831] as *const [u8; 3324]) })
}
}
impl From<&[u32; 831]> for MfxJpegHuffTableState {
fn from(input: &[u32; 831]) -> Self {
MfxJpegHuffTableState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
huffman_table_id: __gen_unuint(input[1], 0, 0),
dc_bits: [
__gen_unuint(input[2], 0, 7),
__gen_unuint(input[2], 8, 15),
__gen_unuint(input[2], 16, 23),
__gen_unuint(input[2], 24, 31),
__gen_unuint(input[3], 0, 7),
__gen_unuint(input[3], 8, 15),
__gen_unuint(input[3], 16, 23),
__gen_unuint(input[3], 24, 31),
__gen_unuint(input[4], 0, 7),
__gen_unuint(input[4], 8, 15),
__gen_unuint(input[4], 16, 23),
__gen_unuint(input[4], 24, 31)
],
dc_huffval: [
__gen_unuint(input[5], 0, 7),
__gen_unuint(input[5], 8, 15),
__gen_unuint(input[5], 16, 23),
__gen_unuint(input[5], 24, 31),
__gen_unuint(input[6], 0, 7),
__gen_unuint(input[6], 8, 15),
__gen_unuint(input[6], 16, 23),
__gen_unuint(input[6], 24, 31),
__gen_unuint(input[7], 0, 7),
__gen_unuint(input[7], 8, 15),
__gen_unuint(input[7], 16, 23),
__gen_unuint(input[7], 24, 31)
],
ac_bits: [
__gen_unuint(input[8], 0, 7),
__gen_unuint(input[8], 8, 15),
__gen_unuint(input[8], 16, 23),
__gen_unuint(input[8], 24, 31),
__gen_unuint(input[9], 0, 7),
__gen_unuint(input[9], 8, 15),
__gen_unuint(input[9], 16, 23),
__gen_unuint(input[9], 24, 31),
__gen_unuint(input[10], 0, 7),
__gen_unuint(input[10], 8, 15),
__gen_unuint(input[10], 16, 23),
__gen_unuint(input[10], 24, 31),
__gen_unuint(input[11], 0, 7),
__gen_unuint(input[11], 8, 15),
__gen_unuint(input[11], 16, 23),
__gen_unuint(input[11], 24, 31)
],
ac_huffval: [
__gen_unuint(input[12], 0, 7),
__gen_unuint(input[12], 8, 15),
__gen_unuint(input[12], 16, 23),
__gen_unuint(input[12], 24, 31),
__gen_unuint(input[13], 0, 7),
__gen_unuint(input[13], 8, 15),
__gen_unuint(input[13], 16, 23),
__gen_unuint(input[13], 24, 31),
__gen_unuint(input[14], 0, 7),
__gen_unuint(input[14], 8, 15),
__gen_unuint(input[14], 16, 23),
__gen_unuint(input[14], 24, 31),
__gen_unuint(input[15], 0, 7),
__gen_unuint(input[15], 8, 15),
__gen_unuint(input[15], 16, 23),
__gen_unuint(input[15], 24, 31),
__gen_unuint(input[16], 0, 7),
__gen_unuint(input[16], 8, 15),
__gen_unuint(input[16], 16, 23),
__gen_unuint(input[16], 24, 31),
__gen_unuint(input[17], 0, 7),
__gen_unuint(input[17], 8, 15),
__gen_unuint(input[17], 16, 23),
__gen_unuint(input[17], 24, 31),
__gen_unuint(input[18], 0, 7),
__gen_unuint(input[18], 8, 15),
__gen_unuint(input[18], 16, 23),
__gen_unuint(input[18], 24, 31),
__gen_unuint(input[19], 0, 7),
__gen_unuint(input[19], 8, 15),
__gen_unuint(input[19], 16, 23),
__gen_unuint(input[19], 24, 31),
__gen_unuint(input[20], 0, 7),
__gen_unuint(input[20], 8, 15),
__gen_unuint(input[20], 16, 23),
__gen_unuint(input[20], 24, 31),
__gen_unuint(input[21], 0, 7),
__gen_unuint(input[21], 8, 15),
__gen_unuint(input[21], 16, 23),
__gen_unuint(input[21], 24, 31),
__gen_unuint(input[22], 0, 7),
__gen_unuint(input[22], 8, 15),
__gen_unuint(input[22], 16, 23),
__gen_unuint(input[22], 24, 31),
__gen_unuint(input[23], 0, 7),
__gen_unuint(input[23], 8, 15),
__gen_unuint(input[23], 16, 23),
__gen_unuint(input[23], 24, 31),
__gen_unuint(input[24], 0, 7),
__gen_unuint(input[24], 8, 15),
__gen_unuint(input[24], 16, 23),
__gen_unuint(input[24], 24, 31),
__gen_unuint(input[25], 0, 7),
__gen_unuint(input[25], 8, 15),
__gen_unuint(input[25], 16, 23),
__gen_unuint(input[25], 24, 31),
__gen_unuint(input[26], 0, 7),
__gen_unuint(input[26], 8, 15),
__gen_unuint(input[26], 16, 23),
__gen_unuint(input[26], 24, 31),
__gen_unuint(input[27], 0, 7),
__gen_unuint(input[27], 8, 15),
__gen_unuint(input[27], 16, 23),
__gen_unuint(input[27], 24, 31),
__gen_unuint(input[28], 0, 7),
__gen_unuint(input[28], 8, 15),
__gen_unuint(input[28], 16, 23),
__gen_unuint(input[28], 24, 31),
__gen_unuint(input[29], 0, 7),
__gen_unuint(input[29], 8, 15),
__gen_unuint(input[29], 16, 23),
__gen_unuint(input[29], 24, 31),
__gen_unuint(input[30], 0, 7),
__gen_unuint(input[30], 8, 15),
__gen_unuint(input[30], 16, 23),
__gen_unuint(input[30], 24, 31),
__gen_unuint(input[31], 0, 7),
__gen_unuint(input[31], 8, 15),
__gen_unuint(input[31], 16, 23),
__gen_unuint(input[31], 24, 31),
__gen_unuint(input[32], 0, 7),
__gen_unuint(input[32], 8, 15),
__gen_unuint(input[32], 16, 23),
__gen_unuint(input[32], 24, 31),
__gen_unuint(input[33], 0, 7),
__gen_unuint(input[33], 8, 15),
__gen_unuint(input[33], 16, 23),
__gen_unuint(input[33], 24, 31),
__gen_unuint(input[34], 0, 7),
__gen_unuint(input[34], 8, 15),
__gen_unuint(input[34], 16, 23),
__gen_unuint(input[34], 24, 31),
__gen_unuint(input[35], 0, 7),
__gen_unuint(input[35], 8, 15),
__gen_unuint(input[35], 16, 23),
__gen_unuint(input[35], 24, 31),
__gen_unuint(input[36], 0, 7),
__gen_unuint(input[36], 8, 15),
__gen_unuint(input[36], 16, 23),
__gen_unuint(input[36], 24, 31),
__gen_unuint(input[37], 0, 7),
__gen_unuint(input[37], 8, 15),
__gen_unuint(input[37], 16, 23),
__gen_unuint(input[37], 24, 31),
__gen_unuint(input[38], 0, 7),
__gen_unuint(input[38], 8, 15),
__gen_unuint(input[38], 16, 23),
__gen_unuint(input[38], 24, 31),
__gen_unuint(input[39], 0, 7),
__gen_unuint(input[39], 8, 15),
__gen_unuint(input[39], 16, 23),
__gen_unuint(input[39], 24, 31),
__gen_unuint(input[40], 0, 7),
__gen_unuint(input[40], 8, 15),
__gen_unuint(input[40], 16, 23),
__gen_unuint(input[40], 24, 31),
__gen_unuint(input[41], 0, 7),
__gen_unuint(input[41], 8, 15),
__gen_unuint(input[41], 16, 23),
__gen_unuint(input[41], 24, 31),
__gen_unuint(input[42], 0, 7),
__gen_unuint(input[42], 8, 15),
__gen_unuint(input[42], 16, 23),
__gen_unuint(input[42], 24, 31),
__gen_unuint(input[43], 0, 7),
__gen_unuint(input[43], 8, 15),
__gen_unuint(input[43], 16, 23),
__gen_unuint(input[43], 24, 31),
__gen_unuint(input[44], 0, 7),
__gen_unuint(input[44], 8, 15),
__gen_unuint(input[44], 16, 23),
__gen_unuint(input[44], 24, 31),
__gen_unuint(input[45], 0, 7),
__gen_unuint(input[45], 8, 15),
__gen_unuint(input[45], 16, 23),
__gen_unuint(input[45], 24, 31),
__gen_unuint(input[46], 0, 7),
__gen_unuint(input[46], 8, 15),
__gen_unuint(input[46], 16, 23),
__gen_unuint(input[46], 24, 31),
__gen_unuint(input[47], 0, 7),
__gen_unuint(input[47], 8, 15),
__gen_unuint(input[47], 16, 23),
__gen_unuint(input[47], 24, 31),
__gen_unuint(input[48], 0, 7),
__gen_unuint(input[48], 8, 15),
__gen_unuint(input[48], 16, 23),
__gen_unuint(input[48], 24, 31),
__gen_unuint(input[49], 0, 7),
__gen_unuint(input[49], 8, 15),
__gen_unuint(input[49], 16, 23),
__gen_unuint(input[49], 24, 31),
__gen_unuint(input[50], 0, 7),
__gen_unuint(input[50], 8, 15),
__gen_unuint(input[50], 16, 23),
__gen_unuint(input[50], 24, 31),
__gen_unuint(input[51], 0, 7),
__gen_unuint(input[51], 8, 15),
__gen_unuint(input[51], 16, 23),
__gen_unuint(input[51], 24, 31)
],
ac_huffval2: [
__gen_unuint(input[52], 0, 7),
__gen_unuint(input[52], 8, 15)
],
}
}
}
impl Deserialize for MfxJpegHuffTableState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 831];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 831] as *mut [u8; 3324]) })?;
Ok((&input).into())
}
}
pub struct MfxJpegPicState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub input_format_yuv: u32,
pub output_mcu_structure: u32,
pub rotation: u32,
pub output_format_yuv: u32,
pub input_surface_format_yuv: u32,
pub average_down_sampling: u32,
pub vertical_down_sampling_enable: bool,
pub horizontal_down_sampling_enable: bool,
pub vertical_up_sampling_enable: bool,
pub pixels_in_vertical_last_mcu: u32,
pub pixels_in_horizontal_last_mcu: u32,
pub frame_width_in_blocks: u32,
pub rounding_quant: u32,
pub frame_height_in_blocks: u32,
pub output_pixel_normalize: u32,
}
impl MfxJpegPicState {
pub const DWORD_LENGTH: u32 = 3;
pub const NV12: u32 = 1;
pub const UYVY: u32 = 2;
pub const Y8: u32 = 4;
pub const YUV400: u32 = 0;
pub const YUV420: u32 = 1;
pub const YUV422H_2Y: u32 = 2;
pub const YUY2: u32 = 3;
}
impl Default for MfxJpegPicState {
fn default() -> Self {
MfxJpegPicState {
dword_length: 1,
subopcode_b: 0,
subopcode_a: 0,
media_command_opcode: 7,
pipeline: 2,
command_type: 3,
input_format_yuv: Default::default(),
output_mcu_structure: Default::default(),
rotation: Default::default(),
output_format_yuv: Default::default(),
input_surface_format_yuv: Default::default(),
average_down_sampling: Default::default(),
vertical_down_sampling_enable: Default::default(),
horizontal_down_sampling_enable: Default::default(),
vertical_up_sampling_enable: Default::default(),
pixels_in_vertical_last_mcu: Default::default(),
pixels_in_horizontal_last_mcu: Default::default(),
frame_width_in_blocks: Default::default(),
rounding_quant: Default::default(),
frame_height_in_blocks: Default::default(),
output_pixel_normalize: Default::default(),
}
}
}
impl Serialize for MfxJpegPicState {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.output_mcu_structure, 0, 2) |
__gen_uint(self.rotation, 4, 5) |
__gen_uint(self.input_surface_format_yuv, 8, 11) |
__gen_uint(self.average_down_sampling, 16, 16) |
__gen_uint(self.vertical_down_sampling_enable.into(), 17, 17) |
__gen_uint(self.horizontal_down_sampling_enable.into(), 18, 18) |
__gen_uint(self.vertical_up_sampling_enable.into(), 20, 20) |
__gen_uint(self.pixels_in_vertical_last_mcu, 21, 25) |
__gen_uint(self.pixels_in_horizontal_last_mcu, 26, 30);
out[2] = __gen_uint(self.frame_width_in_blocks, 0, 12) |
__gen_uint(self.rounding_quant, 13, 15) |
__gen_uint(self.frame_height_in_blocks, 16, 28) |
__gen_uint(self.output_pixel_normalize, 29, 29);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for MfxJpegPicState {
fn from(input: &[u32; 3]) -> Self {
MfxJpegPicState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
input_format_yuv: __gen_unuint(input[1], 0, 2),
output_mcu_structure: __gen_unuint(input[1], 0, 2),
rotation: __gen_unuint(input[1], 4, 5),
output_format_yuv: __gen_unuint(input[1], 8, 11),
input_surface_format_yuv: __gen_unuint(input[1], 8, 11),
average_down_sampling: __gen_unuint(input[1], 16, 16),
vertical_down_sampling_enable: __gen_unuint(input[1], 17, 17) != 0,
horizontal_down_sampling_enable: __gen_unuint(input[1], 18, 18) != 0,
vertical_up_sampling_enable: __gen_unuint(input[1], 20, 20) != 0,
pixels_in_vertical_last_mcu: __gen_unuint(input[1], 21, 25),
pixels_in_horizontal_last_mcu: __gen_unuint(input[1], 26, 30),
frame_width_in_blocks: __gen_unuint(input[2], 0, 12),
rounding_quant: __gen_unuint(input[2], 13, 15),
frame_height_in_blocks: __gen_unuint(input[2], 16, 28),
output_pixel_normalize: __gen_unuint(input[2], 29, 29),
}
}
}
impl Deserialize for MfxJpegPicState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct MfxMpeg2PicState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub scan_order: u32,
pub intra_vlc_format: u32,
pub quantizer_scale_type: u32,
pub concealment_mv: bool,
pub frame_prediction_frame_dct: u32,
pub top_field_first: bool,
pub picture_structure: u32,
pub intra_dc_precision: u32,
pub f_code_0_0: u32,
pub f_code_0_1: u32,
pub f_code_1_0: u32,
pub f_code_1_1: u32,
pub disable_mismatch: bool,
pub mismatch_control_disable: bool,
pub picture_coding_type: u32,
pub load_bitstream_pointer_per_slice: bool,
pub p_b_slice_predicted_mv_override: u32,
pub p_b_slice_predicted_bi_direction_mv_type_override: u32,
pub p_b_slice_concealment_mode: u32,
pub i_slice_concealment_mode: u32,
pub frame_width_in_mbs: u32,
pub frame_height_in_mbs: u32,
pub slice_concealment_disable: bool,
pub round_intra_dc: u32,
pub round_inter_dc: u32,
pub round_intra_ac: u32,
pub round_inter_ac: u32,
pub minimum_frame_size: u32,
pub intra_mb_max_bit_control: u32,
pub inter_mb_max_bit_control: u32,
pub frame_bitrate_max_report: u32,
pub frame_bitrate_min_report: u32,
pub mbratecontrolmask: u32,
pub minimum_frame_size_units: u32,
pub inter_mb_force_cbp_to_zero_control: u32,
pub frame_size_control: u32,
pub intra_mb_conformance_max_size: u32,
pub inter_mb_conformance_max_size: u32,
pub slice_delta_qp_max_0: i32,
pub slice_delta_qp_max_1: i32,
pub slice_delta_qp_max_2: i32,
pub slice_delta_qp_max_3: i32,
pub slice_delta_qp_min_0: i32,
pub slice_delta_qp_min_1: i32,
pub slice_delta_qp_min_2: i32,
pub slice_delta_qp_min_3: i32,
pub frame_bitrate_min: u32,
pub frame_bitrate_min_unit_mode: u32,
pub frame_bitrate_min_unit: u32,
pub frame_bitrate_max: u32,
pub frame_bitrate_max_unit_mode: u32,
pub frame_bitrate_max_unit: u32,
pub frame_bitrate_min_delta: u32,
pub frame_bitrate_max_delta: u32,
}
impl MfxMpeg2PicState {
pub const DWORD_LENGTH: u32 = 12;
pub const BID: u32 = 0;
pub const BWD: u32 = 3;
pub const COMPATIBILITY_MODE: u32 = 0;
pub const FWD: u32 = 2;
pub const INTER: u32 = 0;
pub const INTER_CONCEALMENT: u32 = 1;
pub const INTRA: u32 = 3;
pub const INTRA_CONCEALMENT: u32 = 0;
pub const LEFT: u32 = 1;
pub const MPEG_ALTERNATE_VERTICAL_SCAN: u32 = 1;
pub const MPEG_BOTTOM_FIELD: u32 = 2;
pub const MPEG_B_PICTURE: u32 = 3;
pub const MPEG_FRAME: u32 = 3;
pub const MPEG_I_PICTURE: u32 = 1;
pub const MPEG_P_PICTURE: u32 = 2;
pub const MPEG_QSCALE_LINEAR: u32 = 0;
pub const MPEG_QSCALE_NONLINEAR: u32 = 1;
pub const MPEG_TOP_FIELD: u32 = 1;
pub const MPEG_ZIGZAG_SCAN: u32 = 0;
pub const NEW_MODE: u32 = 1;
pub const PREDICTED: u32 = 0;
pub const RESERVED: u32 = 1;
pub const _16KB: u32 = 3;
pub const _16_BYTES: u32 = 1;
pub const _4KB: u32 = 2;
}
impl Default for MfxMpeg2PicState {
fn default() -> Self {
MfxMpeg2PicState {
dword_length: 0,
subopcode_b: 0,
subopcode_a: 0,
media_command_opcode: 3,
pipeline: 2,
command_type: 3,
scan_order: Default::default(),
intra_vlc_format: Default::default(),
quantizer_scale_type: Default::default(),
concealment_mv: Default::default(),
frame_prediction_frame_dct: Default::default(),
top_field_first: Default::default(),
picture_structure: Default::default(),
intra_dc_precision: Default::default(),
f_code_0_0: Default::default(),
f_code_0_1: Default::default(),
f_code_1_0: Default::default(),
f_code_1_1: Default::default(),
disable_mismatch: Default::default(),
mismatch_control_disable: Default::default(),
picture_coding_type: Default::default(),
load_bitstream_pointer_per_slice: Default::default(),
p_b_slice_predicted_mv_override: Default::default(),
p_b_slice_predicted_bi_direction_mv_type_override: Default::default(),
p_b_slice_concealment_mode: Default::default(),
i_slice_concealment_mode: Default::default(),
frame_width_in_mbs: Default::default(),
frame_height_in_mbs: Default::default(),
slice_concealment_disable: Default::default(),
round_intra_dc: Default::default(),
round_inter_dc: Default::default(),
round_intra_ac: Default::default(),
round_inter_ac: Default::default(),
minimum_frame_size: Default::default(),
intra_mb_max_bit_control: Default::default(),
inter_mb_max_bit_control: Default::default(),
frame_bitrate_max_report: Default::default(),
frame_bitrate_min_report: Default::default(),
mbratecontrolmask: Default::default(),
minimum_frame_size_units: Default::default(),
inter_mb_force_cbp_to_zero_control: Default::default(),
frame_size_control: Default::default(),
intra_mb_conformance_max_size: Default::default(),
inter_mb_conformance_max_size: Default::default(),
slice_delta_qp_max_0: Default::default(),
slice_delta_qp_max_1: Default::default(),
slice_delta_qp_max_2: Default::default(),
slice_delta_qp_max_3: Default::default(),
slice_delta_qp_min_0: Default::default(),
slice_delta_qp_min_1: Default::default(),
slice_delta_qp_min_2: Default::default(),
slice_delta_qp_min_3: Default::default(),
frame_bitrate_min: Default::default(),
frame_bitrate_min_unit_mode: Default::default(),
frame_bitrate_min_unit: Default::default(),
frame_bitrate_max: Default::default(),
frame_bitrate_max_unit_mode: Default::default(),
frame_bitrate_max_unit: Default::default(),
frame_bitrate_min_delta: Default::default(),
frame_bitrate_max_delta: Default::default(),
}
}
}
impl Serialize for MfxMpeg2PicState {
type Out = [u32; 12];
fn pack_into(&self, out: &mut [u32; 12]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.scan_order, 6, 6) |
__gen_uint(self.intra_vlc_format, 7, 7) |
__gen_uint(self.quantizer_scale_type, 8, 8) |
__gen_uint(self.concealment_mv.into(), 9, 9) |
__gen_uint(self.frame_prediction_frame_dct, 10, 10) |
__gen_uint(self.top_field_first.into(), 11, 11) |
__gen_uint(self.picture_structure, 12, 13) |
__gen_uint(self.intra_dc_precision, 14, 15) |
__gen_uint(self.f_code_0_0, 16, 19) |
__gen_uint(self.f_code_0_1, 20, 23) |
__gen_uint(self.f_code_1_0, 24, 27) |
__gen_uint(self.f_code_1_1, 28, 31);
out[2] = __gen_uint(self.disable_mismatch.into(), 0, 0) |
__gen_uint(self.mismatch_control_disable.into(), 1, 1) |
__gen_uint(self.picture_coding_type, 9, 10) |
__gen_uint(self.load_bitstream_pointer_per_slice.into(), 14, 14) |
__gen_uint(self.p_b_slice_predicted_mv_override, 24, 24) |
__gen_uint(self.p_b_slice_predicted_bi_direction_mv_type_override, 25, 26) |
__gen_uint(self.p_b_slice_concealment_mode, 28, 29) |
__gen_uint(self.i_slice_concealment_mode, 31, 31);
out[3] = __gen_uint(self.frame_width_in_mbs, 0, 7) |
__gen_uint(self.frame_height_in_mbs, 16, 23) |
__gen_uint(self.slice_concealment_disable.into(), 31, 31);
out[4] = __gen_uint(self.round_intra_dc, 1, 2) |
__gen_uint(self.round_inter_dc, 4, 6) |
__gen_uint(self.round_intra_ac, 8, 10) |
__gen_uint(self.round_inter_ac, 12, 14) |
__gen_uint(self.minimum_frame_size, 16, 31);
out[5] = __gen_uint(self.intra_mb_max_bit_control, 0, 0) |
__gen_uint(self.inter_mb_max_bit_control, 1, 1) |
__gen_uint(self.frame_bitrate_max_report, 2, 2) |
__gen_uint(self.frame_bitrate_min_report, 3, 3) |
__gen_uint(self.mbratecontrolmask, 9, 9) |
__gen_uint(self.minimum_frame_size_units, 10, 11) |
__gen_uint(self.inter_mb_force_cbp_to_zero_control, 12, 12) |
__gen_uint(self.frame_size_control, 16, 16);
out[6] = __gen_uint(self.intra_mb_conformance_max_size, 0, 11) |
__gen_uint(self.inter_mb_conformance_max_size, 16, 27);
out[7] = 0;
out[8] = __gen_uint(self.slice_delta_qp_max_0 as u32, 0, 7) |
__gen_uint(self.slice_delta_qp_max_1 as u32, 8, 15) |
__gen_uint(self.slice_delta_qp_max_2 as u32, 16, 23) |
__gen_uint(self.slice_delta_qp_max_3 as u32, 24, 31);
out[9] = __gen_uint(self.slice_delta_qp_min_0 as u32, 0, 7) |
__gen_uint(self.slice_delta_qp_min_1 as u32, 8, 15) |
__gen_uint(self.slice_delta_qp_min_2 as u32, 16, 23) |
__gen_uint(self.slice_delta_qp_min_3 as u32, 24, 31);
out[10] = __gen_uint(self.frame_bitrate_min, 0, 13) |
__gen_uint(self.frame_bitrate_min_unit_mode, 14, 14) |
__gen_uint(self.frame_bitrate_min_unit, 15, 15) |
__gen_uint(self.frame_bitrate_max, 16, 29) |
__gen_uint(self.frame_bitrate_max_unit_mode, 30, 30) |
__gen_uint(self.frame_bitrate_max_unit, 31, 31);
out[11] = __gen_uint(self.frame_bitrate_min_delta, 0, 14) |
__gen_uint(self.frame_bitrate_max_delta, 16, 30);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 12];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 12] as *const [u8; 48]) })
}
}
impl From<&[u32; 12]> for MfxMpeg2PicState {
fn from(input: &[u32; 12]) -> Self {
MfxMpeg2PicState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
scan_order: __gen_unuint(input[1], 6, 6),
intra_vlc_format: __gen_unuint(input[1], 7, 7),
quantizer_scale_type: __gen_unuint(input[1], 8, 8),
concealment_mv: __gen_unuint(input[1], 9, 9) != 0,
frame_prediction_frame_dct: __gen_unuint(input[1], 10, 10),
top_field_first: __gen_unuint(input[1], 11, 11) != 0,
picture_structure: __gen_unuint(input[1], 12, 13),
intra_dc_precision: __gen_unuint(input[1], 14, 15),
f_code_0_0: __gen_unuint(input[1], 16, 19),
f_code_0_1: __gen_unuint(input[1], 20, 23),
f_code_1_0: __gen_unuint(input[1], 24, 27),
f_code_1_1: __gen_unuint(input[1], 28, 31),
disable_mismatch: __gen_unuint(input[2], 0, 0) != 0,
mismatch_control_disable: __gen_unuint(input[2], 1, 1) != 0,
picture_coding_type: __gen_unuint(input[2], 9, 10),
load_bitstream_pointer_per_slice: __gen_unuint(input[2], 14, 14) != 0,
p_b_slice_predicted_mv_override: __gen_unuint(input[2], 24, 24),
p_b_slice_predicted_bi_direction_mv_type_override: __gen_unuint(input[2], 25, 26),
p_b_slice_concealment_mode: __gen_unuint(input[2], 28, 29),
i_slice_concealment_mode: __gen_unuint(input[2], 31, 31),
frame_width_in_mbs: __gen_unuint(input[3], 0, 7),
frame_height_in_mbs: __gen_unuint(input[3], 16, 23),
slice_concealment_disable: __gen_unuint(input[3], 31, 31) != 0,
round_intra_dc: __gen_unuint(input[4], 1, 2),
round_inter_dc: __gen_unuint(input[4], 4, 6),
round_intra_ac: __gen_unuint(input[4], 8, 10),
round_inter_ac: __gen_unuint(input[4], 12, 14),
minimum_frame_size: __gen_unuint(input[4], 16, 31),
intra_mb_max_bit_control: __gen_unuint(input[5], 0, 0),
inter_mb_max_bit_control: __gen_unuint(input[5], 1, 1),
frame_bitrate_max_report: __gen_unuint(input[5], 2, 2),
frame_bitrate_min_report: __gen_unuint(input[5], 3, 3),
mbratecontrolmask: __gen_unuint(input[5], 9, 9),
minimum_frame_size_units: __gen_unuint(input[5], 10, 11),
inter_mb_force_cbp_to_zero_control: __gen_unuint(input[5], 12, 12),
frame_size_control: __gen_unuint(input[5], 16, 16),
intra_mb_conformance_max_size: __gen_unuint(input[6], 0, 11),
inter_mb_conformance_max_size: __gen_unuint(input[6], 16, 27),
slice_delta_qp_max_0: (__gen_unuint(input[8], 0, 7)) as i32,
slice_delta_qp_max_1: (__gen_unuint(input[8], 8, 15)) as i32,
slice_delta_qp_max_2: (__gen_unuint(input[8], 16, 23)) as i32,
slice_delta_qp_max_3: (__gen_unuint(input[8], 24, 31)) as i32,
slice_delta_qp_min_0: (__gen_unuint(input[9], 0, 7)) as i32,
slice_delta_qp_min_1: (__gen_unuint(input[9], 8, 15)) as i32,
slice_delta_qp_min_2: (__gen_unuint(input[9], 16, 23)) as i32,
slice_delta_qp_min_3: (__gen_unuint(input[9], 24, 31)) as i32,
frame_bitrate_min: __gen_unuint(input[10], 0, 13),
frame_bitrate_min_unit_mode: __gen_unuint(input[10], 14, 14),
frame_bitrate_min_unit: __gen_unuint(input[10], 15, 15),
frame_bitrate_max: __gen_unuint(input[10], 16, 29),
frame_bitrate_max_unit_mode: __gen_unuint(input[10], 30, 30),
frame_bitrate_max_unit: __gen_unuint(input[10], 31, 31),
frame_bitrate_min_delta: __gen_unuint(input[11], 0, 14),
frame_bitrate_max_delta: __gen_unuint(input[11], 16, 30),
}
}
}
impl Deserialize for MfxMpeg2PicState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 12];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 12] as *mut [u8; 48]) })?;
Ok((&input).into())
}
}
pub struct MfxPakInsertObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub bitstream_start_reset: bool,
pub end_of_slice: bool,
pub last_header: bool,
pub emulation_byte_bits_insert_enable: bool,
pub skip_emulation_byte_count: u32,
pub data_bits_in_last_dw: u32,
pub slice_header_indicator: u32,
pub header_length_excluded_from_size: u32,
pub data_byte_offset: u32,
}
impl MfxPakInsertObject {
pub const DWORD_LENGTH: u32 = 2;
pub const ACCUMULATE: u32 = 0;
pub const LEGACY: u32 = 0;
pub const NO_ACCUMULATION: u32 = 1;
pub const SLICE_HEADER: u32 = 1;
}
impl Default for MfxPakInsertObject {
fn default() -> Self {
MfxPakInsertObject {
dword_length: 0,
subopcode_b: 8,
subopcode_a: 2,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
bitstream_start_reset: Default::default(),
end_of_slice: Default::default(),
last_header: Default::default(),
emulation_byte_bits_insert_enable: Default::default(),
skip_emulation_byte_count: Default::default(),
data_bits_in_last_dw: Default::default(),
slice_header_indicator: Default::default(),
header_length_excluded_from_size: Default::default(),
data_byte_offset: Default::default(),
}
}
}
impl Serialize for MfxPakInsertObject {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.bitstream_start_reset.into(), 0, 0) |
__gen_uint(self.end_of_slice.into(), 1, 1) |
__gen_uint(self.last_header.into(), 2, 2) |
__gen_uint(self.emulation_byte_bits_insert_enable.into(), 3, 3) |
__gen_uint(self.skip_emulation_byte_count, 4, 7) |
__gen_uint(self.data_bits_in_last_dw, 8, 13) |
__gen_uint(self.slice_header_indicator, 14, 14) |
__gen_uint(self.header_length_excluded_from_size, 15, 15) |
__gen_uint(self.data_byte_offset, 16, 17);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MfxPakInsertObject {
fn from(input: &[u32; 2]) -> Self {
MfxPakInsertObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
bitstream_start_reset: __gen_unuint(input[1], 0, 0) != 0,
end_of_slice: __gen_unuint(input[1], 1, 1) != 0,
last_header: __gen_unuint(input[1], 2, 2) != 0,
emulation_byte_bits_insert_enable: __gen_unuint(input[1], 3, 3) != 0,
skip_emulation_byte_count: __gen_unuint(input[1], 4, 7),
data_bits_in_last_dw: __gen_unuint(input[1], 8, 13),
slice_header_indicator: __gen_unuint(input[1], 14, 14),
header_length_excluded_from_size: __gen_unuint(input[1], 15, 15),
data_byte_offset: __gen_unuint(input[1], 16, 17),
}
}
}
impl Deserialize for MfxPakInsertObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MfxPipeBufAddrState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub pre_deblocking_destination_address: A,
pub pre_deblocking_destination_attributes: Memoryaddressattributes,
pub post_deblocking_destination_address: A,
pub post_deblocking_destination_attributes: Memoryaddressattributes,
pub original_uncompressed_picture_source_address: A,
pub original_uncompressed_picture_source_attributes: Memoryaddressattributes,
pub stream_out_data_destination_address: A,
pub stream_out_data_destination_attributes: Memoryaddressattributes,
pub intra_row_store_scratch_buffer_address: A,
pub intra_row_store_scratch_buffer_attributes: Memoryaddressattributes,
pub deblocking_filter_row_store_scratch_address: A,
pub deblocking_filter_row_store_scratch_attributes: Memoryaddressattributes,
pub reference_picture_address: [A; 16],
pub reference_picture_attributes: Memoryaddressattributes,
pub mb_status_buffer_address: A,
pub mb_status_buffer_attributes: Memoryaddressattributes,
pub mb_ildb_stream_out_buffer_address: A,
pub mb_ildb_stream_out_buffer_attributes: Memoryaddressattributes,
pub second_mb_ildb_stream_out_buffer_address: A,
pub second_mb_ildb_stream_out_buffer_attributes: Memoryaddressattributes,
pub reference_picture_memory_compression_mode: [u32; 16],
pub reference_picture_memory_compression_enable: [bool; 16],
pub scaled_reference_surface_address: A,
pub scaled_reference_surface_attributes: Memoryaddressattributes,
}
impl<A: Addr + Default> MfxPipeBufAddrState<A> {
pub const DWORD_LENGTH: u32 = 65;
}
impl<A: Addr + Default> Default for MfxPipeBufAddrState<A> {
fn default() -> Self {
MfxPipeBufAddrState {
dword_length: 63,
subopcode_b: 2,
subopcode_a: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
pre_deblocking_destination_address: Default::default(),
pre_deblocking_destination_attributes: Default::default(),
post_deblocking_destination_address: Default::default(),
post_deblocking_destination_attributes: Default::default(),
original_uncompressed_picture_source_address: Default::default(),
original_uncompressed_picture_source_attributes: Default::default(),
stream_out_data_destination_address: Default::default(),
stream_out_data_destination_attributes: Default::default(),
intra_row_store_scratch_buffer_address: Default::default(),
intra_row_store_scratch_buffer_attributes: Default::default(),
deblocking_filter_row_store_scratch_address: Default::default(),
deblocking_filter_row_store_scratch_attributes: Default::default(),
reference_picture_address: Default::default(),
reference_picture_attributes: Default::default(),
mb_status_buffer_address: Default::default(),
mb_status_buffer_attributes: Default::default(),
mb_ildb_stream_out_buffer_address: Default::default(),
mb_ildb_stream_out_buffer_attributes: Default::default(),
second_mb_ildb_stream_out_buffer_address: Default::default(),
second_mb_ildb_stream_out_buffer_attributes: Default::default(),
reference_picture_memory_compression_mode: Default::default(),
reference_picture_memory_compression_enable: Default::default(),
scaled_reference_surface_address: Default::default(),
scaled_reference_surface_attributes: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MfxPipeBufAddrState<A> {
type Out = [u32; 65];
fn pack_into(&self, out: &mut [u32; 65]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.pre_deblocking_destination_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.pre_deblocking_destination_attributes.pack_into(out3);
}
let v4_address = self.post_deblocking_destination_address.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
{
let [_, _, _, _, _, _, ref mut out6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.post_deblocking_destination_attributes.pack_into(out6);
}
let v7_address = self.original_uncompressed_picture_source_address.combine(0);
out[7] = v7_address as u32;
out[8] = (v7_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, ref mut out9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.original_uncompressed_picture_source_attributes.pack_into(out9);
}
let v10_address = self.stream_out_data_destination_address.combine(0);
out[10] = v10_address as u32;
out[11] = (v10_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.stream_out_data_destination_attributes.pack_into(out12);
}
let v13_address = self.intra_row_store_scratch_buffer_address.combine(0);
out[13] = v13_address as u32;
out[14] = (v13_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intra_row_store_scratch_buffer_attributes.pack_into(out15);
}
let v16_address = self.deblocking_filter_row_store_scratch_address.combine(0);
out[16] = v16_address as u32;
out[17] = (v16_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.deblocking_filter_row_store_scratch_attributes.pack_into(out18);
}
let v19_address = self.reference_picture_address[0].combine(0);
out[19] = v19_address as u32;
out[20] = (v19_address >> 32) as u32;
let v21_address = self.reference_picture_address[1].combine(0);
out[21] = v21_address as u32;
out[22] = (v21_address >> 32) as u32;
let v23_address = self.reference_picture_address[2].combine(0);
out[23] = v23_address as u32;
out[24] = (v23_address >> 32) as u32;
let v25_address = self.reference_picture_address[3].combine(0);
out[25] = v25_address as u32;
out[26] = (v25_address >> 32) as u32;
let v27_address = self.reference_picture_address[4].combine(0);
out[27] = v27_address as u32;
out[28] = (v27_address >> 32) as u32;
let v29_address = self.reference_picture_address[5].combine(0);
out[29] = v29_address as u32;
out[30] = (v29_address >> 32) as u32;
let v31_address = self.reference_picture_address[6].combine(0);
out[31] = v31_address as u32;
out[32] = (v31_address >> 32) as u32;
let v33_address = self.reference_picture_address[7].combine(0);
out[33] = v33_address as u32;
out[34] = (v33_address >> 32) as u32;
let v35_address = self.reference_picture_address[8].combine(0);
out[35] = v35_address as u32;
out[36] = (v35_address >> 32) as u32;
let v37_address = self.reference_picture_address[9].combine(0);
out[37] = v37_address as u32;
out[38] = (v37_address >> 32) as u32;
let v39_address = self.reference_picture_address[10].combine(0);
out[39] = v39_address as u32;
out[40] = (v39_address >> 32) as u32;
let v41_address = self.reference_picture_address[11].combine(0);
out[41] = v41_address as u32;
out[42] = (v41_address >> 32) as u32;
let v43_address = self.reference_picture_address[12].combine(0);
out[43] = v43_address as u32;
out[44] = (v43_address >> 32) as u32;
let v45_address = self.reference_picture_address[13].combine(0);
out[45] = v45_address as u32;
out[46] = (v45_address >> 32) as u32;
let v47_address = self.reference_picture_address[14].combine(0);
out[47] = v47_address as u32;
out[48] = (v47_address >> 32) as u32;
let v49_address = self.reference_picture_address[15].combine(0);
out[49] = v49_address as u32;
out[50] = (v49_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out51 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.reference_picture_attributes.pack_into(out51);
}
let v52_address = self.mb_status_buffer_address.combine(0);
out[52] = v52_address as u32;
out[53] = (v52_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out54 @ .., _, _, _, _, _, _, _, _, _, _] = out;
self.mb_status_buffer_attributes.pack_into(out54);
}
let v55_address = self.mb_ildb_stream_out_buffer_address.combine(0);
out[55] = v55_address as u32;
out[56] = (v55_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out57 @ .., _, _, _, _, _, _, _] = out;
self.mb_ildb_stream_out_buffer_attributes.pack_into(out57);
}
let v58_address = self.second_mb_ildb_stream_out_buffer_address.combine(0);
out[58] = v58_address as u32;
out[59] = (v58_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out60 @ .., _, _, _, _] = out;
self.second_mb_ildb_stream_out_buffer_attributes.pack_into(out60);
}
out[61] = __gen_uint(self.reference_picture_memory_compression_enable[0].into(), 0, 0) |
__gen_uint(self.reference_picture_memory_compression_mode[0], 1, 1) |
__gen_uint(self.reference_picture_memory_compression_enable[1].into(), 2, 2) |
__gen_uint(self.reference_picture_memory_compression_mode[1], 3, 3) |
__gen_uint(self.reference_picture_memory_compression_enable[2].into(), 4, 4) |
__gen_uint(self.reference_picture_memory_compression_mode[2], 5, 5) |
__gen_uint(self.reference_picture_memory_compression_enable[3].into(), 6, 6) |
__gen_uint(self.reference_picture_memory_compression_mode[3], 7, 7) |
__gen_uint(self.reference_picture_memory_compression_enable[4].into(), 8, 8) |
__gen_uint(self.reference_picture_memory_compression_mode[4], 9, 9) |
__gen_uint(self.reference_picture_memory_compression_enable[5].into(), 10, 10) |
__gen_uint(self.reference_picture_memory_compression_mode[5], 11, 11) |
__gen_uint(self.reference_picture_memory_compression_enable[6].into(), 12, 12) |
__gen_uint(self.reference_picture_memory_compression_mode[6], 13, 13) |
__gen_uint(self.reference_picture_memory_compression_enable[7].into(), 14, 14) |
__gen_uint(self.reference_picture_memory_compression_mode[7], 15, 15) |
__gen_uint(self.reference_picture_memory_compression_enable[8].into(), 16, 16) |
__gen_uint(self.reference_picture_memory_compression_mode[8], 17, 17) |
__gen_uint(self.reference_picture_memory_compression_enable[9].into(), 18, 18) |
__gen_uint(self.reference_picture_memory_compression_mode[9], 19, 19) |
__gen_uint(self.reference_picture_memory_compression_enable[10].into(), 20, 20) |
__gen_uint(self.reference_picture_memory_compression_mode[10], 21, 21) |
__gen_uint(self.reference_picture_memory_compression_enable[11].into(), 22, 22) |
__gen_uint(self.reference_picture_memory_compression_mode[11], 23, 23) |
__gen_uint(self.reference_picture_memory_compression_enable[12].into(), 24, 24) |
__gen_uint(self.reference_picture_memory_compression_mode[12], 25, 25) |
__gen_uint(self.reference_picture_memory_compression_enable[13].into(), 26, 26) |
__gen_uint(self.reference_picture_memory_compression_mode[13], 27, 27) |
__gen_uint(self.reference_picture_memory_compression_enable[14].into(), 28, 28) |
__gen_uint(self.reference_picture_memory_compression_mode[14], 29, 29) |
__gen_uint(self.reference_picture_memory_compression_enable[15].into(), 30, 30) |
__gen_uint(self.reference_picture_memory_compression_mode[15], 31, 31);
let v62_address = self.scaled_reference_surface_address.combine(0);
out[62] = v62_address as u32;
out[63] = (v62_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out64 @ ..] = out;
self.scaled_reference_surface_attributes.pack_into(out64);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 65];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 65] as *const [u8; 260]) })
}
}
impl From<&[u32; 65]> for MfxPipeBufAddrState<u64> {
fn from(input: &[u32; 65]) -> Self {
MfxPipeBufAddrState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pre_deblocking_destination_address: (__gen_unuint(input[1], 6, 31) as u64) << 6 |
(__gen_unuint(input[2], 0, 15) as u64) << 32,
pre_deblocking_destination_attributes: {{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in3.into()
}},
post_deblocking_destination_address: (__gen_unuint(input[4], 6, 31) as u64) << 6 |
(__gen_unuint(input[5], 0, 15) as u64) << 32,
post_deblocking_destination_attributes: {{
let [_, _, _, _, _, _, ref in6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in6.into()
}},
original_uncompressed_picture_source_address: (__gen_unuint(input[7], 6, 31) as u64) << 6 |
(__gen_unuint(input[8], 0, 15) as u64) << 32,
original_uncompressed_picture_source_attributes: {{
let [_, _, _, _, _, _, _, _, _, ref in9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in9.into()
}},
stream_out_data_destination_address: (__gen_unuint(input[10], 6, 31) as u64) << 6 |
(__gen_unuint(input[11], 0, 15) as u64) << 32,
stream_out_data_destination_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in12.into()
}},
intra_row_store_scratch_buffer_address: (__gen_unuint(input[13], 6, 31) as u64) << 6 |
(__gen_unuint(input[14], 0, 15) as u64) << 32,
intra_row_store_scratch_buffer_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in15.into()
}},
deblocking_filter_row_store_scratch_address: (__gen_unuint(input[16], 6, 31) as u64) << 6 |
(__gen_unuint(input[17], 0, 15) as u64) << 32,
deblocking_filter_row_store_scratch_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in18.into()
}},
reference_picture_address: [
(__gen_unuint(input[19], 0, 31) as u64) |
(__gen_unuint(input[20], 0, 31) as u64) << 32,
(__gen_unuint(input[21], 0, 31) as u64) |
(__gen_unuint(input[22], 0, 31) as u64) << 32,
(__gen_unuint(input[23], 0, 31) as u64) |
(__gen_unuint(input[24], 0, 31) as u64) << 32,
(__gen_unuint(input[25], 0, 31) as u64) |
(__gen_unuint(input[26], 0, 31) as u64) << 32,
(__gen_unuint(input[27], 0, 31) as u64) |
(__gen_unuint(input[28], 0, 31) as u64) << 32,
(__gen_unuint(input[29], 0, 31) as u64) |
(__gen_unuint(input[30], 0, 31) as u64) << 32,
(__gen_unuint(input[31], 0, 31) as u64) |
(__gen_unuint(input[32], 0, 31) as u64) << 32,
(__gen_unuint(input[33], 0, 31) as u64) |
(__gen_unuint(input[34], 0, 31) as u64) << 32,
(__gen_unuint(input[35], 0, 31) as u64) |
(__gen_unuint(input[36], 0, 31) as u64) << 32,
(__gen_unuint(input[37], 0, 31) as u64) |
(__gen_unuint(input[38], 0, 31) as u64) << 32,
(__gen_unuint(input[39], 0, 31) as u64) |
(__gen_unuint(input[40], 0, 31) as u64) << 32,
(__gen_unuint(input[41], 0, 31) as u64) |
(__gen_unuint(input[42], 0, 31) as u64) << 32,
(__gen_unuint(input[43], 0, 31) as u64) |
(__gen_unuint(input[44], 0, 31) as u64) << 32,
(__gen_unuint(input[45], 0, 31) as u64) |
(__gen_unuint(input[46], 0, 31) as u64) << 32,
(__gen_unuint(input[47], 0, 31) as u64) |
(__gen_unuint(input[48], 0, 31) as u64) << 32,
(__gen_unuint(input[49], 0, 31) as u64) |
(__gen_unuint(input[50], 0, 31) as u64) << 32
],
reference_picture_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in51 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in51.into()
}},
mb_status_buffer_address: (__gen_unuint(input[52], 6, 31) as u64) << 6 |
(__gen_unuint(input[53], 0, 15) as u64) << 32,
mb_status_buffer_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in54 @ .., _, _, _, _, _, _, _, _, _, _] = input;
in54.into()
}},
mb_ildb_stream_out_buffer_address: (__gen_unuint(input[55], 6, 31) as u64) << 6 |
(__gen_unuint(input[56], 0, 15) as u64) << 32,
mb_ildb_stream_out_buffer_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in57 @ .., _, _, _, _, _, _, _] = input;
in57.into()
}},
second_mb_ildb_stream_out_buffer_address: (__gen_unuint(input[58], 6, 31) as u64) << 6 |
(__gen_unuint(input[59], 0, 15) as u64) << 32,
second_mb_ildb_stream_out_buffer_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in60 @ .., _, _, _, _] = input;
in60.into()
}},
reference_picture_memory_compression_mode: [
__gen_unuint(input[61], 1, 1),
__gen_unuint(input[61], 3, 3),
__gen_unuint(input[61], 5, 5),
__gen_unuint(input[61], 7, 7),
__gen_unuint(input[61], 9, 9),
__gen_unuint(input[61], 11, 11),
__gen_unuint(input[61], 13, 13),
__gen_unuint(input[61], 15, 15),
__gen_unuint(input[61], 17, 17),
__gen_unuint(input[61], 19, 19),
__gen_unuint(input[61], 21, 21),
__gen_unuint(input[61], 23, 23),
__gen_unuint(input[61], 25, 25),
__gen_unuint(input[61], 27, 27),
__gen_unuint(input[61], 29, 29),
__gen_unuint(input[61], 31, 31)
],
reference_picture_memory_compression_enable: [
__gen_unuint(input[61], 0, 0) != 0,
__gen_unuint(input[61], 2, 2) != 0,
__gen_unuint(input[61], 4, 4) != 0,
__gen_unuint(input[61], 6, 6) != 0,
__gen_unuint(input[61], 8, 8) != 0,
__gen_unuint(input[61], 10, 10) != 0,
__gen_unuint(input[61], 12, 12) != 0,
__gen_unuint(input[61], 14, 14) != 0,
__gen_unuint(input[61], 16, 16) != 0,
__gen_unuint(input[61], 18, 18) != 0,
__gen_unuint(input[61], 20, 20) != 0,
__gen_unuint(input[61], 22, 22) != 0,
__gen_unuint(input[61], 24, 24) != 0,
__gen_unuint(input[61], 26, 26) != 0,
__gen_unuint(input[61], 28, 28) != 0,
__gen_unuint(input[61], 30, 30) != 0
],
scaled_reference_surface_address: (__gen_unuint(input[62], 6, 31) as u64) << 6 |
(__gen_unuint(input[63], 0, 15) as u64) << 32,
scaled_reference_surface_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in64 @ ..] = input;
in64.into()
}},
}
}
}
impl Deserialize for MfxPipeBufAddrState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 65];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 65] as *mut [u8; 260]) })?;
Ok((&input).into())
}
}
pub struct MfxPipeModeSelect {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub standard_select: u32,
pub codec_select: u32,
pub stitch_mode: bool,
pub frame_statistics_stream_out_enable: bool,
pub scaled_surface_enable: bool,
pub pre_deblocking_output_enable: bool,
pub post_deblocking_output_enable: bool,
pub stream_out_enable: bool,
pub pic_error_status_report_enable: bool,
pub deblocker_stream_out_enable: bool,
pub vdenc_mode: u32,
pub standalone_vdenc_mode_enable: bool,
pub decoder_mode_select: u32,
pub decoder_short_format_mode: u32,
pub extended_stream_out_enable: bool,
pub pic_status_error_report_id: u32,
}
impl MfxPipeModeSelect {
pub const DWORD_LENGTH: u32 = 5;
pub const AVC: u32 = 2;
pub const DEBLOCKER_MODE: u32 = 2;
pub const DECODE: u32 = 0;
pub const ENCODE: u32 = 1;
pub const INTERLAYER_MODE: u32 = 3;
pub const IT_MODE: u32 = 1;
pub const JPEG: u32 = 3;
pub const LONG_FORMAT_DRIVER_INTERFACE: u32 = 1;
pub const MBENC_MODE: u32 = 0;
pub const MPEG2: u32 = 0;
pub const SHORT_FORMAT_DRIVER_INTERFACE: u32 = 0;
pub const UVLD: u32 = 15;
pub const VC1: u32 = 1;
pub const VDENC_MODE: u32 = 1;
pub const VLD_MODE: u32 = 0;
pub const VP8: u32 = 5;
}
impl Default for MfxPipeModeSelect {
fn default() -> Self {
MfxPipeModeSelect {
dword_length: 3,
subopcode_b: 0,
subopcode_a: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
standard_select: Default::default(),
codec_select: Default::default(),
stitch_mode: Default::default(),
frame_statistics_stream_out_enable: Default::default(),
scaled_surface_enable: Default::default(),
pre_deblocking_output_enable: Default::default(),
post_deblocking_output_enable: Default::default(),
stream_out_enable: Default::default(),
pic_error_status_report_enable: Default::default(),
deblocker_stream_out_enable: Default::default(),
vdenc_mode: Default::default(),
standalone_vdenc_mode_enable: Default::default(),
decoder_mode_select: Default::default(),
decoder_short_format_mode: Default::default(),
extended_stream_out_enable: Default::default(),
pic_status_error_report_id: Default::default(),
}
}
}
impl Serialize for MfxPipeModeSelect {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.standard_select, 0, 3) |
__gen_uint(self.codec_select, 4, 4) |
__gen_uint(self.stitch_mode.into(), 5, 5) |
__gen_uint(self.frame_statistics_stream_out_enable.into(), 6, 6) |
__gen_uint(self.scaled_surface_enable.into(), 7, 7) |
__gen_uint(self.pre_deblocking_output_enable.into(), 8, 8) |
__gen_uint(self.post_deblocking_output_enable.into(), 9, 9) |
__gen_uint(self.stream_out_enable.into(), 10, 10) |
__gen_uint(self.pic_error_status_report_enable.into(), 11, 11) |
__gen_uint(self.deblocker_stream_out_enable.into(), 12, 12) |
__gen_uint(self.vdenc_mode, 13, 13) |
__gen_uint(self.standalone_vdenc_mode_enable.into(), 14, 14) |
__gen_uint(self.decoder_mode_select, 15, 16) |
__gen_uint(self.decoder_short_format_mode, 17, 17) |
__gen_uint(self.extended_stream_out_enable.into(), 18, 18);
out[2] = 0;
out[3] = __gen_uint(self.pic_status_error_report_id, 0, 31);
out[4] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for MfxPipeModeSelect {
fn from(input: &[u32; 5]) -> Self {
MfxPipeModeSelect {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
standard_select: __gen_unuint(input[1], 0, 3),
codec_select: __gen_unuint(input[1], 4, 4),
stitch_mode: __gen_unuint(input[1], 5, 5) != 0,
frame_statistics_stream_out_enable: __gen_unuint(input[1], 6, 6) != 0,
scaled_surface_enable: __gen_unuint(input[1], 7, 7) != 0,
pre_deblocking_output_enable: __gen_unuint(input[1], 8, 8) != 0,
post_deblocking_output_enable: __gen_unuint(input[1], 9, 9) != 0,
stream_out_enable: __gen_unuint(input[1], 10, 10) != 0,
pic_error_status_report_enable: __gen_unuint(input[1], 11, 11) != 0,
deblocker_stream_out_enable: __gen_unuint(input[1], 12, 12) != 0,
vdenc_mode: __gen_unuint(input[1], 13, 13),
standalone_vdenc_mode_enable: __gen_unuint(input[1], 14, 14) != 0,
decoder_mode_select: __gen_unuint(input[1], 15, 16),
decoder_short_format_mode: __gen_unuint(input[1], 17, 17),
extended_stream_out_enable: __gen_unuint(input[1], 18, 18) != 0,
pic_status_error_report_id: __gen_unuint(input[3], 0, 31),
}
}
}
impl Deserialize for MfxPipeModeSelect {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct MfxQmState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub avc: u32,
pub mpeg2: u32,
pub jpeg: u32,
pub forward_quantizer_8x8: [u32; 64],
}
impl MfxQmState {
pub const DWORD_LENGTH: u32 = 34;
pub const AVC_4X4_INTER_MATRIX: u32 = 1;
pub const AVC_4X4_INTRA_MATRIX: u32 = 0;
pub const AVC_8X8_INTER_MATRIX: u32 = 3;
pub const AVC_8X8_INTRA_MATRIX: u32 = 2;
pub const JPEG_CHROMA_CB_QUANTIZER_MATRIX_OR_G: u32 = 1;
pub const JPEG_CHROMA_CR_QUANTIZER_MATRIX_OR_B: u32 = 2;
pub const JPEG_LUMA_Y_QUANTIZER_MATRIX_OR_R: u32 = 0;
pub const MPEG_INTRA_QUANTIZER_MATRIX: u32 = 0;
pub const MPEG_NON_INTRA_QUANTIZER_MATRIX: u32 = 1;
}
impl Default for MfxQmState {
fn default() -> Self {
MfxQmState {
dword_length: 32,
subopcode_b: 7,
subopcode_a: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
avc: Default::default(),
mpeg2: Default::default(),
jpeg: Default::default(),
forward_quantizer_8x8: [0; 64],
}
}
}
impl Serialize for MfxQmState {
type Out = [u32; 34];
fn pack_into(&self, out: &mut [u32; 34]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.jpeg, 0, 1);
out[2] = __gen_uint(self.forward_quantizer_8x8[0], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[1], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[2], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[3], 24, 31);
out[3] = __gen_uint(self.forward_quantizer_8x8[4], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[5], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[6], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[7], 24, 31);
out[4] = __gen_uint(self.forward_quantizer_8x8[8], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[9], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[10], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[11], 24, 31);
out[5] = __gen_uint(self.forward_quantizer_8x8[12], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[13], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[14], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[15], 24, 31);
out[6] = __gen_uint(self.forward_quantizer_8x8[16], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[17], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[18], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[19], 24, 31);
out[7] = __gen_uint(self.forward_quantizer_8x8[20], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[21], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[22], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[23], 24, 31);
out[8] = __gen_uint(self.forward_quantizer_8x8[24], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[25], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[26], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[27], 24, 31);
out[9] = __gen_uint(self.forward_quantizer_8x8[28], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[29], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[30], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[31], 24, 31);
out[10] = __gen_uint(self.forward_quantizer_8x8[32], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[33], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[34], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[35], 24, 31);
out[11] = __gen_uint(self.forward_quantizer_8x8[36], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[37], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[38], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[39], 24, 31);
out[12] = __gen_uint(self.forward_quantizer_8x8[40], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[41], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[42], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[43], 24, 31);
out[13] = __gen_uint(self.forward_quantizer_8x8[44], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[45], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[46], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[47], 24, 31);
out[14] = __gen_uint(self.forward_quantizer_8x8[48], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[49], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[50], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[51], 24, 31);
out[15] = __gen_uint(self.forward_quantizer_8x8[52], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[53], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[54], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[55], 24, 31);
out[16] = __gen_uint(self.forward_quantizer_8x8[56], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[57], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[58], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[59], 24, 31);
out[17] = __gen_uint(self.forward_quantizer_8x8[60], 0, 7) |
__gen_uint(self.forward_quantizer_8x8[61], 8, 15) |
__gen_uint(self.forward_quantizer_8x8[62], 16, 23) |
__gen_uint(self.forward_quantizer_8x8[63], 24, 31);
out[18] = 0;
out[19] = 0;
out[20] = 0;
out[21] = 0;
out[22] = 0;
out[23] = 0;
out[24] = 0;
out[25] = 0;
out[26] = 0;
out[27] = 0;
out[28] = 0;
out[29] = 0;
out[30] = 0;
out[31] = 0;
out[32] = 0;
out[33] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 34];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 34] as *const [u8; 136]) })
}
}
impl From<&[u32; 34]> for MfxQmState {
fn from(input: &[u32; 34]) -> Self {
MfxQmState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
avc: __gen_unuint(input[1], 0, 1),
mpeg2: __gen_unuint(input[1], 0, 1),
jpeg: __gen_unuint(input[1], 0, 1),
forward_quantizer_8x8: [
__gen_unuint(input[2], 0, 7),
__gen_unuint(input[2], 8, 15),
__gen_unuint(input[2], 16, 23),
__gen_unuint(input[2], 24, 31),
__gen_unuint(input[3], 0, 7),
__gen_unuint(input[3], 8, 15),
__gen_unuint(input[3], 16, 23),
__gen_unuint(input[3], 24, 31),
__gen_unuint(input[4], 0, 7),
__gen_unuint(input[4], 8, 15),
__gen_unuint(input[4], 16, 23),
__gen_unuint(input[4], 24, 31),
__gen_unuint(input[5], 0, 7),
__gen_unuint(input[5], 8, 15),
__gen_unuint(input[5], 16, 23),
__gen_unuint(input[5], 24, 31),
__gen_unuint(input[6], 0, 7),
__gen_unuint(input[6], 8, 15),
__gen_unuint(input[6], 16, 23),
__gen_unuint(input[6], 24, 31),
__gen_unuint(input[7], 0, 7),
__gen_unuint(input[7], 8, 15),
__gen_unuint(input[7], 16, 23),
__gen_unuint(input[7], 24, 31),
__gen_unuint(input[8], 0, 7),
__gen_unuint(input[8], 8, 15),
__gen_unuint(input[8], 16, 23),
__gen_unuint(input[8], 24, 31),
__gen_unuint(input[9], 0, 7),
__gen_unuint(input[9], 8, 15),
__gen_unuint(input[9], 16, 23),
__gen_unuint(input[9], 24, 31),
__gen_unuint(input[10], 0, 7),
__gen_unuint(input[10], 8, 15),
__gen_unuint(input[10], 16, 23),
__gen_unuint(input[10], 24, 31),
__gen_unuint(input[11], 0, 7),
__gen_unuint(input[11], 8, 15),
__gen_unuint(input[11], 16, 23),
__gen_unuint(input[11], 24, 31),
__gen_unuint(input[12], 0, 7),
__gen_unuint(input[12], 8, 15),
__gen_unuint(input[12], 16, 23),
__gen_unuint(input[12], 24, 31),
__gen_unuint(input[13], 0, 7),
__gen_unuint(input[13], 8, 15),
__gen_unuint(input[13], 16, 23),
__gen_unuint(input[13], 24, 31),
__gen_unuint(input[14], 0, 7),
__gen_unuint(input[14], 8, 15),
__gen_unuint(input[14], 16, 23),
__gen_unuint(input[14], 24, 31),
__gen_unuint(input[15], 0, 7),
__gen_unuint(input[15], 8, 15),
__gen_unuint(input[15], 16, 23),
__gen_unuint(input[15], 24, 31),
__gen_unuint(input[16], 0, 7),
__gen_unuint(input[16], 8, 15),
__gen_unuint(input[16], 16, 23),
__gen_unuint(input[16], 24, 31),
__gen_unuint(input[17], 0, 7),
__gen_unuint(input[17], 8, 15),
__gen_unuint(input[17], 16, 23),
__gen_unuint(input[17], 24, 31)
],
}
}
}
impl Deserialize for MfxQmState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 34];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 34] as *mut [u8; 136]) })?;
Ok((&input).into())
}
}
pub struct MfxStatePointer {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub state_pointer_index: u32,
pub state_pointer: u32,
}
impl MfxStatePointer {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for MfxStatePointer {
fn default() -> Self {
MfxStatePointer {
dword_length: 0,
subopcode_b: 6,
subopcode_a: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
state_pointer_index: Default::default(),
state_pointer: Default::default(),
}
}
}
impl Serialize for MfxStatePointer {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.state_pointer_index, 0, 1) |
__gen_uint(self.state_pointer, 5, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MfxStatePointer {
fn from(input: &[u32; 2]) -> Self {
MfxStatePointer {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
state_pointer_index: __gen_unuint(input[1], 0, 1),
state_pointer: __gen_unuint(input[1], 5, 31),
}
}
}
impl Deserialize for MfxStatePointer {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MfxStitchObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub end_of_slice: bool,
pub last_header: bool,
pub source_data_ending_bit_inclusion: u32,
pub source_data_starting_byte_offset: u32,
pub indirect_data_length: u32,
pub indirect_data_start_address: u64,
}
impl MfxStitchObject {
pub const DWORD_LENGTH: u32 = 4;
}
impl Default for MfxStitchObject {
fn default() -> Self {
MfxStitchObject {
dword_length: 0,
subopcode_b: 10,
subopcode_a: 2,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
end_of_slice: Default::default(),
last_header: Default::default(),
source_data_ending_bit_inclusion: Default::default(),
source_data_starting_byte_offset: Default::default(),
indirect_data_length: Default::default(),
indirect_data_start_address: Default::default(),
}
}
}
impl Serialize for MfxStitchObject {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.end_of_slice.into(), 1, 1) |
__gen_uint(self.last_header.into(), 2, 2) |
__gen_uint(self.source_data_ending_bit_inclusion, 8, 13) |
__gen_uint(self.source_data_starting_byte_offset, 16, 17);
out[2] = __gen_uint(self.indirect_data_length, 0, 18);
out[3] = __gen_offset(self.indirect_data_start_address as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MfxStitchObject {
fn from(input: &[u32; 4]) -> Self {
MfxStitchObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
end_of_slice: __gen_unuint(input[1], 1, 1) != 0,
last_header: __gen_unuint(input[1], 2, 2) != 0,
source_data_ending_bit_inclusion: __gen_unuint(input[1], 8, 13),
source_data_starting_byte_offset: __gen_unuint(input[1], 16, 17),
indirect_data_length: __gen_unuint(input[2], 0, 18),
indirect_data_start_address: (__gen_unuint(input[3], 0, 31) as u64),
}
}
}
impl Deserialize for MfxStitchObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MfxSurfaceState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub surface_id: u32,
pub cr_v_cb_u_pixel_offset_v_direction: f32,
pub width: u32,
pub height: u32,
pub tile_walk: u32,
pub tiled_surface: bool,
pub half_pitch_for_chroma: bool,
pub surface_pitch: u32,
pub interleave_chroma: bool,
pub surface_format: u32,
pub y_offset_for_u_cb: u32,
pub x_offset_for_u_cb: u32,
pub y_offset_for_v_cr: u32,
pub x_offset_for_v_cr: u32,
}
impl MfxSurfaceState {
pub const DWORD_LENGTH: u32 = 6;
pub const PLANAR_411_8: u32 = 5;
pub const PLANAR_420_8: u32 = 4;
pub const PLANAR_422_8: u32 = 6;
pub const R10G10B10A2_UNORM: u32 = 8;
pub const R8B8_UNORM_CRCB: u32 = 10;
pub const R8G8B8A8_UNORM: u32 = 9;
pub const R8_UNORM_CR_CB: u32 = 11;
pub const RECONSTRUCTED_SCALED_REFERENCE_PICTURE: u32 = 5;
pub const SOURCE_INPUT_PICTURE: u32 = 4;
pub const STMM_DN_STATISTICS: u32 = 7;
pub const XMAJOR: u32 = 0;
pub const Y8_UNORM: u32 = 12;
pub const YCRCB_NORMAL: u32 = 0;
pub const YCRCB_SWAPUV: u32 = 2;
pub const YCRCB_SWAPUVY: u32 = 1;
pub const YCRCB_SWAPY: u32 = 3;
pub const YMAJOR: u32 = 1;
}
impl Default for MfxSurfaceState {
fn default() -> Self {
MfxSurfaceState {
dword_length: 4,
subopcode_b: 1,
subopcode_a: 0,
media_command_opcode: 0,
pipeline: 2,
command_type: 3,
surface_id: Default::default(),
cr_v_cb_u_pixel_offset_v_direction: Default::default(),
width: Default::default(),
height: Default::default(),
tile_walk: Default::default(),
tiled_surface: Default::default(),
half_pitch_for_chroma: Default::default(),
surface_pitch: Default::default(),
interleave_chroma: Default::default(),
surface_format: Default::default(),
y_offset_for_u_cb: Default::default(),
x_offset_for_u_cb: Default::default(),
y_offset_for_v_cr: Default::default(),
x_offset_for_v_cr: Default::default(),
}
}
}
impl Serialize for MfxSurfaceState {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.surface_id, 0, 3);
out[2] = __gen_ufixed(self.cr_v_cb_u_pixel_offset_v_direction, 0, 1, 2) |
__gen_uint(self.width, 4, 17) |
__gen_uint(self.height, 18, 31);
out[3] = __gen_uint(self.tile_walk, 0, 0) |
__gen_uint(self.tiled_surface.into(), 1, 1) |
__gen_uint(self.half_pitch_for_chroma.into(), 2, 2) |
__gen_uint(self.surface_pitch, 3, 19) |
__gen_uint(self.interleave_chroma.into(), 27, 27) |
__gen_uint(self.surface_format, 28, 31);
out[4] = __gen_uint(self.y_offset_for_u_cb, 0, 14) |
__gen_uint(self.x_offset_for_u_cb, 16, 30);
out[5] = __gen_uint(self.y_offset_for_v_cr, 0, 15) |
__gen_uint(self.x_offset_for_v_cr, 16, 28);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for MfxSurfaceState {
fn from(input: &[u32; 6]) -> Self {
MfxSurfaceState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
surface_id: __gen_unuint(input[1], 0, 3),
cr_v_cb_u_pixel_offset_v_direction: __gen_unufixed(input[2], 0, 1, 2),
width: __gen_unuint(input[2], 4, 17),
height: __gen_unuint(input[2], 18, 31),
tile_walk: __gen_unuint(input[3], 0, 0),
tiled_surface: __gen_unuint(input[3], 1, 1) != 0,
half_pitch_for_chroma: __gen_unuint(input[3], 2, 2) != 0,
surface_pitch: __gen_unuint(input[3], 3, 19),
interleave_chroma: __gen_unuint(input[3], 27, 27) != 0,
surface_format: __gen_unuint(input[3], 28, 31),
y_offset_for_u_cb: __gen_unuint(input[4], 0, 14),
x_offset_for_u_cb: __gen_unuint(input[4], 16, 30),
y_offset_for_v_cr: __gen_unuint(input[5], 0, 15),
x_offset_for_v_cr: __gen_unuint(input[5], 16, 28),
}
}
}
impl Deserialize for MfxSurfaceState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct MfxVc1DirectmodeState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub direct_mv_write_buffer_address: A,
pub direct_mv_write_buffer_attributes: Memoryaddressattributes,
pub direct_mv_read_buffer_address: A,
pub direct_mv_read_buffer_attributes: Memoryaddressattributes,
}
impl<A: Addr + Default> MfxVc1DirectmodeState<A> {
pub const DWORD_LENGTH: u32 = 7;
}
impl<A: Addr + Default> Default for MfxVc1DirectmodeState<A> {
fn default() -> Self {
MfxVc1DirectmodeState {
dword_length: 5,
subopcode_b: 2,
subopcode_a: 0,
media_command_opcode: 2,
pipeline: 2,
command_type: 3,
direct_mv_write_buffer_address: Default::default(),
direct_mv_write_buffer_attributes: Default::default(),
direct_mv_read_buffer_address: Default::default(),
direct_mv_read_buffer_attributes: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MfxVc1DirectmodeState<A> {
type Out = [u32; 7];
fn pack_into(&self, out: &mut [u32; 7]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.direct_mv_write_buffer_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ .., _, _, _] = out;
self.direct_mv_write_buffer_attributes.pack_into(out3);
}
let v4_address = self.direct_mv_read_buffer_address.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
{
let [_, _, _, _, _, _, ref mut out6 @ ..] = out;
self.direct_mv_read_buffer_attributes.pack_into(out6);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 7];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 7] as *const [u8; 28]) })
}
}
impl From<&[u32; 7]> for MfxVc1DirectmodeState<u64> {
fn from(input: &[u32; 7]) -> Self {
MfxVc1DirectmodeState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
direct_mv_write_buffer_address: (__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
direct_mv_write_buffer_attributes: {{
let [_, _, _, ref in3 @ .., _, _, _] = input;
in3.into()
}},
direct_mv_read_buffer_address: (__gen_unuint(input[4], 0, 31) as u64) |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
direct_mv_read_buffer_attributes: {{
let [_, _, _, _, _, _, ref in6 @ ..] = input;
in6.into()
}},
}
}
}
impl Deserialize for MfxVc1DirectmodeState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 7];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 7] as *mut [u8; 28]) })?;
Ok((&input).into())
}
}
pub struct MfxVc1PredPipeState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub reference_frame_boundary_replication_mode: u32,
pub vin_intensitycomp_single_bwden: u32,
pub vin_intensitycomp_single_fwden: u32,
pub vin_intensitycomp_double_bwden: u32,
pub vin_intensitycomp_double_fwden: u32,
pub lumscale1_single_fwd: u32,
pub lumscale2_single_fwd: u32,
pub lumshift1_single_fwd: u32,
pub lumshift2_single_fwd: u32,
pub lumscale1_double_fwd: u32,
pub lumscale2_double_fwd: u32,
pub lumshift1_double_fwd: u32,
pub lumshift2_double_fwd: u32,
pub lumscale1_single_bwd: u32,
pub lumscale2_single_bwd: u32,
pub lumshift1_single_bwd: u32,
pub lumshift2_single_bwd: u32,
pub lumscale1_double_bwd: u32,
pub lumscale2_double_bwd: u32,
pub lumshift1_double_bwd: u32,
pub lumshift2_double_bwd: u32,
}
impl MfxVc1PredPipeState {
pub const DWORD_LENGTH: u32 = 6;
}
impl Default for MfxVc1PredPipeState {
fn default() -> Self {
MfxVc1PredPipeState {
dword_length: 4,
subopcode_b: 1,
subopcode_a: 0,
media_command_opcode: 2,
pipeline: 2,
command_type: 3,
reference_frame_boundary_replication_mode: Default::default(),
vin_intensitycomp_single_bwden: Default::default(),
vin_intensitycomp_single_fwden: Default::default(),
vin_intensitycomp_double_bwden: Default::default(),
vin_intensitycomp_double_fwden: Default::default(),
lumscale1_single_fwd: Default::default(),
lumscale2_single_fwd: Default::default(),
lumshift1_single_fwd: Default::default(),
lumshift2_single_fwd: Default::default(),
lumscale1_double_fwd: Default::default(),
lumscale2_double_fwd: Default::default(),
lumshift1_double_fwd: Default::default(),
lumshift2_double_fwd: Default::default(),
lumscale1_single_bwd: Default::default(),
lumscale2_single_bwd: Default::default(),
lumshift1_single_bwd: Default::default(),
lumshift2_single_bwd: Default::default(),
lumscale1_double_bwd: Default::default(),
lumscale2_double_bwd: Default::default(),
lumshift1_double_bwd: Default::default(),
lumshift2_double_bwd: Default::default(),
}
}
}
impl Serialize for MfxVc1PredPipeState {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.reference_frame_boundary_replication_mode, 4, 7) |
__gen_uint(self.vin_intensitycomp_single_bwden, 8, 9) |
__gen_uint(self.vin_intensitycomp_single_fwden, 10, 11) |
__gen_uint(self.vin_intensitycomp_double_bwden, 12, 13) |
__gen_uint(self.vin_intensitycomp_double_fwden, 14, 15);
out[2] = __gen_uint(self.lumscale1_single_fwd, 0, 5) |
__gen_uint(self.lumscale2_single_fwd, 8, 13) |
__gen_uint(self.lumshift1_single_fwd, 16, 21) |
__gen_uint(self.lumshift2_single_fwd, 24, 29);
out[3] = __gen_uint(self.lumscale1_double_fwd, 0, 5) |
__gen_uint(self.lumscale2_double_fwd, 8, 13) |
__gen_uint(self.lumshift1_double_fwd, 16, 21) |
__gen_uint(self.lumshift2_double_fwd, 24, 29);
out[4] = __gen_uint(self.lumscale1_single_bwd, 0, 5) |
__gen_uint(self.lumscale2_single_bwd, 8, 13) |
__gen_uint(self.lumshift1_single_bwd, 16, 21) |
__gen_uint(self.lumshift2_single_bwd, 24, 29);
out[5] = __gen_uint(self.lumscale1_double_bwd, 0, 5) |
__gen_uint(self.lumscale2_double_bwd, 8, 13) |
__gen_uint(self.lumshift1_double_bwd, 16, 21) |
__gen_uint(self.lumshift2_double_bwd, 24, 29);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for MfxVc1PredPipeState {
fn from(input: &[u32; 6]) -> Self {
MfxVc1PredPipeState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
reference_frame_boundary_replication_mode: __gen_unuint(input[1], 4, 7),
vin_intensitycomp_single_bwden: __gen_unuint(input[1], 8, 9),
vin_intensitycomp_single_fwden: __gen_unuint(input[1], 10, 11),
vin_intensitycomp_double_bwden: __gen_unuint(input[1], 12, 13),
vin_intensitycomp_double_fwden: __gen_unuint(input[1], 14, 15),
lumscale1_single_fwd: __gen_unuint(input[2], 0, 5),
lumscale2_single_fwd: __gen_unuint(input[2], 8, 13),
lumshift1_single_fwd: __gen_unuint(input[2], 16, 21),
lumshift2_single_fwd: __gen_unuint(input[2], 24, 29),
lumscale1_double_fwd: __gen_unuint(input[3], 0, 5),
lumscale2_double_fwd: __gen_unuint(input[3], 8, 13),
lumshift1_double_fwd: __gen_unuint(input[3], 16, 21),
lumshift2_double_fwd: __gen_unuint(input[3], 24, 29),
lumscale1_single_bwd: __gen_unuint(input[4], 0, 5),
lumscale2_single_bwd: __gen_unuint(input[4], 8, 13),
lumshift1_single_bwd: __gen_unuint(input[4], 16, 21),
lumshift2_single_bwd: __gen_unuint(input[4], 24, 29),
lumscale1_double_bwd: __gen_unuint(input[5], 0, 5),
lumscale2_double_bwd: __gen_unuint(input[5], 8, 13),
lumshift1_double_bwd: __gen_unuint(input[5], 16, 21),
lumshift2_double_bwd: __gen_unuint(input[5], 24, 29),
}
}
}
impl Deserialize for MfxVc1PredPipeState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct MfxVp8BspBufBaseAddrState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub frame_header_address: A,
pub frame_header_attributes: Memoryaddressattributes,
pub intermediate_buffer_address: A,
pub intermediate_buffer_attributes: Memoryaddressattributes,
pub intermediate_buffer_partition_offset: [u8; 32],
pub intermediate_buffer_max_size: u32,
pub final_frame_address: A,
pub final_frame_attributes: Memoryaddressattributes,
pub final_frame_byte_offset: u32,
pub stream_out_address: A,
pub stream_out_attributes: Memoryaddressattributes,
pub coeff_probs_stream_in_surface_address: A,
pub coeff_probs_stream_in_surface_attributes: Memoryaddressattributes,
pub token_statistics_surface_address: A,
pub token_statistics_surface_attributes: Memoryaddressattributes,
pub mpc_row_store_surface_address: A,
pub mpc_row_store_surface_attributes: Memoryaddressattributes,
}
impl<A: Addr + Default> MfxVp8BspBufBaseAddrState<A> {
pub const DWORD_LENGTH: u32 = 32;
}
impl<A: Addr + Default> Default for MfxVp8BspBufBaseAddrState<A> {
fn default() -> Self {
MfxVp8BspBufBaseAddrState {
dword_length: 0,
subopcode_b: 3,
subopcode_a: 2,
media_command_opcode: 4,
pipeline: 2,
command_type: 3,
frame_header_address: Default::default(),
frame_header_attributes: Default::default(),
intermediate_buffer_address: Default::default(),
intermediate_buffer_attributes: Default::default(),
intermediate_buffer_partition_offset: Default::default(),
intermediate_buffer_max_size: Default::default(),
final_frame_address: Default::default(),
final_frame_attributes: Default::default(),
final_frame_byte_offset: Default::default(),
stream_out_address: Default::default(),
stream_out_attributes: Default::default(),
coeff_probs_stream_in_surface_address: Default::default(),
coeff_probs_stream_in_surface_attributes: Default::default(),
token_statistics_surface_address: Default::default(),
token_statistics_surface_attributes: Default::default(),
mpc_row_store_surface_address: Default::default(),
mpc_row_store_surface_attributes: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MfxVp8BspBufBaseAddrState<A> {
type Out = [u32; 32];
fn pack_into(&self, out: &mut [u32; 32]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.frame_header_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
{
let [_, _, _, ref mut out3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.frame_header_attributes.pack_into(out3);
}
let v4_address = self.intermediate_buffer_address.combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
{
let [_, _, _, _, _, _, ref mut out6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.intermediate_buffer_attributes.pack_into(out6);
}
out[7] = __gen_uint(self.intermediate_buffer_partition_offset[0].into(), 0, 7) |
__gen_uint(self.intermediate_buffer_partition_offset[1].into(), 8, 15) |
__gen_uint(self.intermediate_buffer_partition_offset[2].into(), 16, 23) |
__gen_uint(self.intermediate_buffer_partition_offset[3].into(), 24, 31);
out[8] = __gen_uint(self.intermediate_buffer_partition_offset[4].into(), 0, 7) |
__gen_uint(self.intermediate_buffer_partition_offset[5].into(), 8, 15) |
__gen_uint(self.intermediate_buffer_partition_offset[6].into(), 16, 23) |
__gen_uint(self.intermediate_buffer_partition_offset[7].into(), 24, 31);
out[9] = __gen_uint(self.intermediate_buffer_partition_offset[8].into(), 0, 7) |
__gen_uint(self.intermediate_buffer_partition_offset[9].into(), 8, 15) |
__gen_uint(self.intermediate_buffer_partition_offset[10].into(), 16, 23) |
__gen_uint(self.intermediate_buffer_partition_offset[11].into(), 24, 31);
out[10] = __gen_uint(self.intermediate_buffer_partition_offset[12].into(), 0, 7) |
__gen_uint(self.intermediate_buffer_partition_offset[13].into(), 8, 15) |
__gen_uint(self.intermediate_buffer_partition_offset[14].into(), 16, 23) |
__gen_uint(self.intermediate_buffer_partition_offset[15].into(), 24, 31);
out[11] = __gen_uint(self.intermediate_buffer_partition_offset[16].into(), 0, 7) |
__gen_uint(self.intermediate_buffer_partition_offset[17].into(), 8, 15) |
__gen_uint(self.intermediate_buffer_partition_offset[18].into(), 16, 23) |
__gen_uint(self.intermediate_buffer_partition_offset[19].into(), 24, 31);
out[12] = __gen_uint(self.intermediate_buffer_partition_offset[20].into(), 0, 7) |
__gen_uint(self.intermediate_buffer_partition_offset[21].into(), 8, 15) |
__gen_uint(self.intermediate_buffer_partition_offset[22].into(), 16, 23) |
__gen_uint(self.intermediate_buffer_partition_offset[23].into(), 24, 31);
out[13] = __gen_uint(self.intermediate_buffer_partition_offset[24].into(), 0, 7) |
__gen_uint(self.intermediate_buffer_partition_offset[25].into(), 8, 15) |
__gen_uint(self.intermediate_buffer_partition_offset[26].into(), 16, 23) |
__gen_uint(self.intermediate_buffer_partition_offset[27].into(), 24, 31);
out[14] = __gen_uint(self.intermediate_buffer_partition_offset[28].into(), 0, 7) |
__gen_uint(self.intermediate_buffer_partition_offset[29].into(), 8, 15) |
__gen_uint(self.intermediate_buffer_partition_offset[30].into(), 16, 23) |
__gen_uint(self.intermediate_buffer_partition_offset[31].into(), 24, 31);
out[15] = __gen_uint(self.intermediate_buffer_max_size, 0, 31);
let v16_address = self.final_frame_address.combine(0);
out[16] = v16_address as u32;
out[17] = (v16_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.final_frame_attributes.pack_into(out18);
}
out[19] = __gen_uint(self.final_frame_byte_offset, 0, 5);
let v20_address = self.stream_out_address.combine(0);
out[20] = v20_address as u32;
out[21] = (v20_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out22 @ .., _, _, _, _, _, _, _, _, _] = out;
self.stream_out_attributes.pack_into(out22);
}
let v23_address = self.coeff_probs_stream_in_surface_address.combine(0);
out[23] = v23_address as u32;
out[24] = (v23_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out25 @ .., _, _, _, _, _, _] = out;
self.coeff_probs_stream_in_surface_attributes.pack_into(out25);
}
let v26_address = self.token_statistics_surface_address.combine(0);
out[26] = v26_address as u32;
out[27] = (v26_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out28 @ .., _, _, _] = out;
self.token_statistics_surface_attributes.pack_into(out28);
}
let v29_address = self.mpc_row_store_surface_address.combine(0);
out[29] = v29_address as u32;
out[30] = (v29_address >> 32) as u32;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out31 @ ..] = out;
self.mpc_row_store_surface_attributes.pack_into(out31);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 32];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 32] as *const [u8; 128]) })
}
}
impl From<&[u32; 32]> for MfxVp8BspBufBaseAddrState<u64> {
fn from(input: &[u32; 32]) -> Self {
MfxVp8BspBufBaseAddrState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
frame_header_address: (__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
frame_header_attributes: {{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in3.into()
}},
intermediate_buffer_address: (__gen_unuint(input[4], 0, 31) as u64) |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
intermediate_buffer_attributes: {{
let [_, _, _, _, _, _, ref in6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in6.into()
}},
intermediate_buffer_partition_offset: [
(__gen_unuint(input[7], 0, 7)) as u8,
(__gen_unuint(input[7], 8, 15)) as u8,
(__gen_unuint(input[7], 16, 23)) as u8,
(__gen_unuint(input[7], 24, 31)) as u8,
(__gen_unuint(input[8], 0, 7)) as u8,
(__gen_unuint(input[8], 8, 15)) as u8,
(__gen_unuint(input[8], 16, 23)) as u8,
(__gen_unuint(input[8], 24, 31)) as u8,
(__gen_unuint(input[9], 0, 7)) as u8,
(__gen_unuint(input[9], 8, 15)) as u8,
(__gen_unuint(input[9], 16, 23)) as u8,
(__gen_unuint(input[9], 24, 31)) as u8,
(__gen_unuint(input[10], 0, 7)) as u8,
(__gen_unuint(input[10], 8, 15)) as u8,
(__gen_unuint(input[10], 16, 23)) as u8,
(__gen_unuint(input[10], 24, 31)) as u8,
(__gen_unuint(input[11], 0, 7)) as u8,
(__gen_unuint(input[11], 8, 15)) as u8,
(__gen_unuint(input[11], 16, 23)) as u8,
(__gen_unuint(input[11], 24, 31)) as u8,
(__gen_unuint(input[12], 0, 7)) as u8,
(__gen_unuint(input[12], 8, 15)) as u8,
(__gen_unuint(input[12], 16, 23)) as u8,
(__gen_unuint(input[12], 24, 31)) as u8,
(__gen_unuint(input[13], 0, 7)) as u8,
(__gen_unuint(input[13], 8, 15)) as u8,
(__gen_unuint(input[13], 16, 23)) as u8,
(__gen_unuint(input[13], 24, 31)) as u8,
(__gen_unuint(input[14], 0, 7)) as u8,
(__gen_unuint(input[14], 8, 15)) as u8,
(__gen_unuint(input[14], 16, 23)) as u8,
(__gen_unuint(input[14], 24, 31)) as u8
],
intermediate_buffer_max_size: __gen_unuint(input[15], 0, 31),
final_frame_address: (__gen_unuint(input[16], 0, 31) as u64) |
(__gen_unuint(input[17], 0, 31) as u64) << 32,
final_frame_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in18.into()
}},
final_frame_byte_offset: __gen_unuint(input[19], 0, 5),
stream_out_address: (__gen_unuint(input[20], 0, 31) as u64) |
(__gen_unuint(input[21], 0, 31) as u64) << 32,
stream_out_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in22 @ .., _, _, _, _, _, _, _, _, _] = input;
in22.into()
}},
coeff_probs_stream_in_surface_address: (__gen_unuint(input[23], 0, 31) as u64) |
(__gen_unuint(input[24], 0, 31) as u64) << 32,
coeff_probs_stream_in_surface_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in25 @ .., _, _, _, _, _, _] = input;
in25.into()
}},
token_statistics_surface_address: (__gen_unuint(input[26], 0, 31) as u64) |
(__gen_unuint(input[27], 0, 31) as u64) << 32,
token_statistics_surface_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in28 @ .., _, _, _] = input;
in28.into()
}},
mpc_row_store_surface_address: (__gen_unuint(input[29], 0, 31) as u64) |
(__gen_unuint(input[30], 0, 31) as u64) << 32,
mpc_row_store_surface_attributes: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in31 @ ..] = input;
in31.into()
}},
}
}
}
impl Deserialize for MfxVp8BspBufBaseAddrState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 32];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 32] as *mut [u8; 128]) })?;
Ok((&input).into())
}
}
pub struct MfxVp8EncoderCfg {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub performance_counter_enable: bool,
pub final_bitstream_output_disable: bool,
pub token_statistics_output_enable: bool,
pub bitstream_statistics_output_enable: bool,
pub update_segment_feature_data_flag: bool,
pub skip_final_bitstream_when_over_underflow: bool,
pub rate_control_initial_pass: bool,
pub per_segment_delta_qindex_loopfilter_disable: bool,
pub finer_brc_enable: bool,
pub compressed_bitstream_output_disable: bool,
pub vbsp_unit_power_clock_gating_disable: bool,
pub max_frame_bit_count_rate_control_enable: bool,
pub min_frame_bit_count_rate_control_enable: bool,
pub max_inter_mb_bit_count_check_enable: bool,
pub max_intra_mb_bit_count_check_enable: bool,
pub intermediate_bit_buffer_overrun_enable: bool,
pub final_bistream_buffer_overrun_enable: bool,
pub qindex_clamp_high_for_underflow: bool,
pub qindex_clamp_high_for_overflow: bool,
pub max_inter_mb_bit_count: u32,
pub max_intra_mb_bit_count_limit: u32,
pub frame_bitrate_max: u32,
pub frame_bitrate_max_unit: u32,
pub frame_bitrate_max_unit_mode: u32,
pub frame_bitrate_min: u32,
pub frame_bitrate_min_unit: u32,
pub frame_bitrate_min_unit_mode: u32,
pub frame_delta_qindex_max_0: u32,
pub frame_delta_qindex_max_1: u32,
pub frame_delta_qindex_max_2: u32,
pub frame_delta_qindex_max_3: u32,
pub frame_delta_qindex_min_0: u32,
pub frame_delta_qindex_min_1: u32,
pub frame_delta_qindex_min_2: u32,
pub frame_delta_qindex_min_3: u32,
pub per_segment_frame_delta_qindex_max_1: u32,
pub per_segment_frame_delta_qindex_min_1: u32,
pub per_segment_frame_delta_qindex_max_2: u32,
pub per_segment_frame_delta_qindex_min_2: u32,
pub per_segment_frame_delta_qindex_max_3: u32,
pub per_segment_frame_delta_qindex_min_3: u32,
pub frame_delta_loop_filter_max_0: u32,
pub frame_delta_loop_filter_max_1: u32,
pub frame_delta_loop_filter_max_2: u32,
pub frame_delta_loop_filter_max_3: u32,
pub frame_delta_loop_filter_min_0: u32,
pub frame_delta_loop_filter_min_1: u32,
pub frame_delta_loop_filter_min_2: u32,
pub frame_delta_loop_filter_min_3: u32,
pub per_segment_frame_delta_loop_filter_max_1: u32,
pub per_segment_frame_delta_loop_filter_min_1: u32,
pub per_segment_frame_delta_loop_filter_max_2: u32,
pub per_segment_frame_delta_loop_filter_min_2: u32,
pub per_segment_frame_delta_loop_filter_max_3: u32,
pub per_segment_frame_delta_loop_filter_min_3: u32,
pub frame_bitrate_max_delta: u32,
pub frame_bitrate_min_delta: u32,
pub minimum_frame_size: u32,
pub minimum_frame_size_unit: u32,
pub bitstream_format_version: u32,
pub show_frame: u32,
pub horizontal_size_code: u32,
pub vertical_size_code: u32,
pub frame_header_bit_count: u32,
pub frame_header_bin_buffer_qindex_update_pointer: u32,
pub frame_header_bin_buffer_loop_filter_update_pointer: u32,
pub frame_header_bin_buffer_token_update_pointer: u32,
pub frame_header_bin_buffer_mv_update_pointer: u32,
pub cv0: u32,
pub cv1: u32,
pub cv2: u32,
pub cv3: u32,
pub cv4: u32,
pub cv5: u32,
pub cv6: u32,
pub cv7: u32,
}
impl MfxVp8EncoderCfg {
pub const DWORD_LENGTH: u32 = 30;
pub const COMPATIBILITY_MODE: u32 = 0;
pub const NEW_MODE: u32 = 1;
}
impl Default for MfxVp8EncoderCfg {
fn default() -> Self {
MfxVp8EncoderCfg {
dword_length: 0,
subopcode_b: 1,
subopcode_a: 2,
media_command_opcode: 4,
pipeline: 2,
command_type: 3,
performance_counter_enable: Default::default(),
final_bitstream_output_disable: Default::default(),
token_statistics_output_enable: Default::default(),
bitstream_statistics_output_enable: Default::default(),
update_segment_feature_data_flag: Default::default(),
skip_final_bitstream_when_over_underflow: Default::default(),
rate_control_initial_pass: Default::default(),
per_segment_delta_qindex_loopfilter_disable: Default::default(),
finer_brc_enable: Default::default(),
compressed_bitstream_output_disable: Default::default(),
vbsp_unit_power_clock_gating_disable: Default::default(),
max_frame_bit_count_rate_control_enable: Default::default(),
min_frame_bit_count_rate_control_enable: Default::default(),
max_inter_mb_bit_count_check_enable: Default::default(),
max_intra_mb_bit_count_check_enable: Default::default(),
intermediate_bit_buffer_overrun_enable: Default::default(),
final_bistream_buffer_overrun_enable: Default::default(),
qindex_clamp_high_for_underflow: Default::default(),
qindex_clamp_high_for_overflow: Default::default(),
max_inter_mb_bit_count: Default::default(),
max_intra_mb_bit_count_limit: Default::default(),
frame_bitrate_max: Default::default(),
frame_bitrate_max_unit: Default::default(),
frame_bitrate_max_unit_mode: Default::default(),
frame_bitrate_min: Default::default(),
frame_bitrate_min_unit: Default::default(),
frame_bitrate_min_unit_mode: Default::default(),
frame_delta_qindex_max_0: Default::default(),
frame_delta_qindex_max_1: Default::default(),
frame_delta_qindex_max_2: Default::default(),
frame_delta_qindex_max_3: Default::default(),
frame_delta_qindex_min_0: Default::default(),
frame_delta_qindex_min_1: Default::default(),
frame_delta_qindex_min_2: Default::default(),
frame_delta_qindex_min_3: Default::default(),
per_segment_frame_delta_qindex_max_1: Default::default(),
per_segment_frame_delta_qindex_min_1: Default::default(),
per_segment_frame_delta_qindex_max_2: Default::default(),
per_segment_frame_delta_qindex_min_2: Default::default(),
per_segment_frame_delta_qindex_max_3: Default::default(),
per_segment_frame_delta_qindex_min_3: Default::default(),
frame_delta_loop_filter_max_0: Default::default(),
frame_delta_loop_filter_max_1: Default::default(),
frame_delta_loop_filter_max_2: Default::default(),
frame_delta_loop_filter_max_3: Default::default(),
frame_delta_loop_filter_min_0: Default::default(),
frame_delta_loop_filter_min_1: Default::default(),
frame_delta_loop_filter_min_2: Default::default(),
frame_delta_loop_filter_min_3: Default::default(),
per_segment_frame_delta_loop_filter_max_1: Default::default(),
per_segment_frame_delta_loop_filter_min_1: Default::default(),
per_segment_frame_delta_loop_filter_max_2: Default::default(),
per_segment_frame_delta_loop_filter_min_2: Default::default(),
per_segment_frame_delta_loop_filter_max_3: Default::default(),
per_segment_frame_delta_loop_filter_min_3: Default::default(),
frame_bitrate_max_delta: Default::default(),
frame_bitrate_min_delta: Default::default(),
minimum_frame_size: Default::default(),
minimum_frame_size_unit: Default::default(),
bitstream_format_version: Default::default(),
show_frame: Default::default(),
horizontal_size_code: Default::default(),
vertical_size_code: Default::default(),
frame_header_bit_count: Default::default(),
frame_header_bin_buffer_qindex_update_pointer: Default::default(),
frame_header_bin_buffer_loop_filter_update_pointer: Default::default(),
frame_header_bin_buffer_token_update_pointer: Default::default(),
frame_header_bin_buffer_mv_update_pointer: Default::default(),
cv0: Default::default(),
cv1: Default::default(),
cv2: Default::default(),
cv3: Default::default(),
cv4: Default::default(),
cv5: Default::default(),
cv6: Default::default(),
cv7: Default::default(),
}
}
}
impl Serialize for MfxVp8EncoderCfg {
type Out = [u32; 30];
fn pack_into(&self, out: &mut [u32; 30]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.performance_counter_enable.into(), 0, 0) |
__gen_uint(self.final_bitstream_output_disable.into(), 1, 1) |
__gen_uint(self.token_statistics_output_enable.into(), 2, 2) |
__gen_uint(self.bitstream_statistics_output_enable.into(), 3, 3) |
__gen_uint(self.update_segment_feature_data_flag.into(), 4, 4) |
__gen_uint(self.skip_final_bitstream_when_over_underflow.into(), 5, 5) |
__gen_uint(self.rate_control_initial_pass.into(), 6, 6) |
__gen_uint(self.per_segment_delta_qindex_loopfilter_disable.into(), 7, 7) |
__gen_uint(self.finer_brc_enable.into(), 8, 8) |
__gen_uint(self.compressed_bitstream_output_disable.into(), 9, 9) |
__gen_uint(self.vbsp_unit_power_clock_gating_disable.into(), 10, 10);
out[2] = __gen_uint(self.max_frame_bit_count_rate_control_enable.into(), 0, 0) |
__gen_uint(self.min_frame_bit_count_rate_control_enable.into(), 1, 1) |
__gen_uint(self.max_inter_mb_bit_count_check_enable.into(), 2, 2) |
__gen_uint(self.max_intra_mb_bit_count_check_enable.into(), 3, 3) |
__gen_uint(self.intermediate_bit_buffer_overrun_enable.into(), 4, 4) |
__gen_uint(self.final_bistream_buffer_overrun_enable.into(), 5, 5) |
__gen_uint(self.qindex_clamp_high_for_underflow.into(), 6, 6) |
__gen_uint(self.qindex_clamp_high_for_overflow.into(), 7, 7);
out[3] = __gen_uint(self.max_inter_mb_bit_count, 0, 11) |
__gen_uint(self.max_intra_mb_bit_count_limit, 16, 27);
out[4] = __gen_uint(self.frame_bitrate_max, 0, 13) |
__gen_uint(self.frame_bitrate_max_unit, 14, 14) |
__gen_uint(self.frame_bitrate_max_unit_mode, 15, 15) |
__gen_uint(self.frame_bitrate_min, 16, 29) |
__gen_uint(self.frame_bitrate_min_unit, 30, 30) |
__gen_uint(self.frame_bitrate_min_unit_mode, 31, 31);
out[5] = __gen_uint(self.frame_delta_qindex_max_0, 0, 7) |
__gen_uint(self.frame_delta_qindex_max_1, 8, 15) |
__gen_uint(self.frame_delta_qindex_max_2, 16, 23) |
__gen_uint(self.frame_delta_qindex_max_3, 24, 31);
out[6] = __gen_uint(self.frame_delta_qindex_min_0, 0, 7) |
__gen_uint(self.frame_delta_qindex_min_1, 8, 15) |
__gen_uint(self.frame_delta_qindex_min_2, 16, 23) |
__gen_uint(self.frame_delta_qindex_min_3, 24, 31);
out[7] = __gen_uint(self.per_segment_frame_delta_qindex_max_1, 0, 31);
out[8] = __gen_uint(self.per_segment_frame_delta_qindex_min_1, 0, 31);
out[9] = __gen_uint(self.per_segment_frame_delta_qindex_max_2, 0, 31);
out[10] = __gen_uint(self.per_segment_frame_delta_qindex_min_2, 0, 31);
out[11] = __gen_uint(self.per_segment_frame_delta_qindex_max_3, 0, 31);
out[12] = __gen_uint(self.per_segment_frame_delta_qindex_min_3, 0, 31);
out[13] = __gen_uint(self.frame_delta_loop_filter_max_0, 0, 7) |
__gen_uint(self.frame_delta_loop_filter_max_1, 8, 15) |
__gen_uint(self.frame_delta_loop_filter_max_2, 16, 23) |
__gen_uint(self.frame_delta_loop_filter_max_3, 24, 31);
out[14] = __gen_uint(self.frame_delta_loop_filter_min_0, 0, 7) |
__gen_uint(self.frame_delta_loop_filter_min_1, 8, 15) |
__gen_uint(self.frame_delta_loop_filter_min_2, 16, 23) |
__gen_uint(self.frame_delta_loop_filter_min_3, 24, 31);
out[15] = __gen_uint(self.per_segment_frame_delta_loop_filter_max_1, 0, 31);
out[16] = __gen_uint(self.per_segment_frame_delta_loop_filter_min_1, 0, 31);
out[17] = __gen_uint(self.per_segment_frame_delta_loop_filter_max_2, 0, 31);
out[18] = __gen_uint(self.per_segment_frame_delta_loop_filter_min_2, 0, 31);
out[19] = __gen_uint(self.per_segment_frame_delta_loop_filter_max_3, 0, 31);
out[20] = __gen_uint(self.per_segment_frame_delta_loop_filter_min_3, 0, 31);
out[21] = __gen_uint(self.frame_bitrate_max_delta, 0, 14) |
__gen_uint(self.frame_bitrate_min_delta, 16, 30);
out[22] = __gen_uint(self.minimum_frame_size, 0, 15) |
__gen_uint(self.minimum_frame_size_unit, 16, 17) |
__gen_uint(self.bitstream_format_version, 20, 22) |
__gen_uint(self.show_frame, 23, 23);
out[23] = __gen_uint(self.horizontal_size_code, 0, 15) |
__gen_uint(self.vertical_size_code, 16, 31);
out[24] = __gen_uint(self.frame_header_bit_count, 0, 31);
out[25] = __gen_uint(self.frame_header_bin_buffer_qindex_update_pointer, 0, 31);
out[26] = __gen_uint(self.frame_header_bin_buffer_loop_filter_update_pointer, 0, 31);
out[27] = __gen_uint(self.frame_header_bin_buffer_token_update_pointer, 0, 31);
out[28] = __gen_uint(self.frame_header_bin_buffer_mv_update_pointer, 0, 31);
out[29] = __gen_uint(self.cv0, 0, 3) |
__gen_uint(self.cv1, 4, 7) |
__gen_uint(self.cv2, 8, 11) |
__gen_uint(self.cv3, 12, 15) |
__gen_uint(self.cv4, 16, 19) |
__gen_uint(self.cv5, 20, 23) |
__gen_uint(self.cv6, 24, 27) |
__gen_uint(self.cv7, 28, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 30];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 30] as *const [u8; 120]) })
}
}
impl From<&[u32; 30]> for MfxVp8EncoderCfg {
fn from(input: &[u32; 30]) -> Self {
MfxVp8EncoderCfg {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
performance_counter_enable: __gen_unuint(input[1], 0, 0) != 0,
final_bitstream_output_disable: __gen_unuint(input[1], 1, 1) != 0,
token_statistics_output_enable: __gen_unuint(input[1], 2, 2) != 0,
bitstream_statistics_output_enable: __gen_unuint(input[1], 3, 3) != 0,
update_segment_feature_data_flag: __gen_unuint(input[1], 4, 4) != 0,
skip_final_bitstream_when_over_underflow: __gen_unuint(input[1], 5, 5) != 0,
rate_control_initial_pass: __gen_unuint(input[1], 6, 6) != 0,
per_segment_delta_qindex_loopfilter_disable: __gen_unuint(input[1], 7, 7) != 0,
finer_brc_enable: __gen_unuint(input[1], 8, 8) != 0,
compressed_bitstream_output_disable: __gen_unuint(input[1], 9, 9) != 0,
vbsp_unit_power_clock_gating_disable: __gen_unuint(input[1], 10, 10) != 0,
max_frame_bit_count_rate_control_enable: __gen_unuint(input[2], 0, 0) != 0,
min_frame_bit_count_rate_control_enable: __gen_unuint(input[2], 1, 1) != 0,
max_inter_mb_bit_count_check_enable: __gen_unuint(input[2], 2, 2) != 0,
max_intra_mb_bit_count_check_enable: __gen_unuint(input[2], 3, 3) != 0,
intermediate_bit_buffer_overrun_enable: __gen_unuint(input[2], 4, 4) != 0,
final_bistream_buffer_overrun_enable: __gen_unuint(input[2], 5, 5) != 0,
qindex_clamp_high_for_underflow: __gen_unuint(input[2], 6, 6) != 0,
qindex_clamp_high_for_overflow: __gen_unuint(input[2], 7, 7) != 0,
max_inter_mb_bit_count: __gen_unuint(input[3], 0, 11),
max_intra_mb_bit_count_limit: __gen_unuint(input[3], 16, 27),
frame_bitrate_max: __gen_unuint(input[4], 0, 13),
frame_bitrate_max_unit: __gen_unuint(input[4], 14, 14),
frame_bitrate_max_unit_mode: __gen_unuint(input[4], 15, 15),
frame_bitrate_min: __gen_unuint(input[4], 16, 29),
frame_bitrate_min_unit: __gen_unuint(input[4], 30, 30),
frame_bitrate_min_unit_mode: __gen_unuint(input[4], 31, 31),
frame_delta_qindex_max_0: __gen_unuint(input[5], 0, 7),
frame_delta_qindex_max_1: __gen_unuint(input[5], 8, 15),
frame_delta_qindex_max_2: __gen_unuint(input[5], 16, 23),
frame_delta_qindex_max_3: __gen_unuint(input[5], 24, 31),
frame_delta_qindex_min_0: __gen_unuint(input[6], 0, 7),
frame_delta_qindex_min_1: __gen_unuint(input[6], 8, 15),
frame_delta_qindex_min_2: __gen_unuint(input[6], 16, 23),
frame_delta_qindex_min_3: __gen_unuint(input[6], 24, 31),
per_segment_frame_delta_qindex_max_1: __gen_unuint(input[7], 0, 31),
per_segment_frame_delta_qindex_min_1: __gen_unuint(input[8], 0, 31),
per_segment_frame_delta_qindex_max_2: __gen_unuint(input[9], 0, 31),
per_segment_frame_delta_qindex_min_2: __gen_unuint(input[10], 0, 31),
per_segment_frame_delta_qindex_max_3: __gen_unuint(input[11], 0, 31),
per_segment_frame_delta_qindex_min_3: __gen_unuint(input[12], 0, 31),
frame_delta_loop_filter_max_0: __gen_unuint(input[13], 0, 7),
frame_delta_loop_filter_max_1: __gen_unuint(input[13], 8, 15),
frame_delta_loop_filter_max_2: __gen_unuint(input[13], 16, 23),
frame_delta_loop_filter_max_3: __gen_unuint(input[13], 24, 31),
frame_delta_loop_filter_min_0: __gen_unuint(input[14], 0, 7),
frame_delta_loop_filter_min_1: __gen_unuint(input[14], 8, 15),
frame_delta_loop_filter_min_2: __gen_unuint(input[14], 16, 23),
frame_delta_loop_filter_min_3: __gen_unuint(input[14], 24, 31),
per_segment_frame_delta_loop_filter_max_1: __gen_unuint(input[15], 0, 31),
per_segment_frame_delta_loop_filter_min_1: __gen_unuint(input[16], 0, 31),
per_segment_frame_delta_loop_filter_max_2: __gen_unuint(input[17], 0, 31),
per_segment_frame_delta_loop_filter_min_2: __gen_unuint(input[18], 0, 31),
per_segment_frame_delta_loop_filter_max_3: __gen_unuint(input[19], 0, 31),
per_segment_frame_delta_loop_filter_min_3: __gen_unuint(input[20], 0, 31),
frame_bitrate_max_delta: __gen_unuint(input[21], 0, 14),
frame_bitrate_min_delta: __gen_unuint(input[21], 16, 30),
minimum_frame_size: __gen_unuint(input[22], 0, 15),
minimum_frame_size_unit: __gen_unuint(input[22], 16, 17),
bitstream_format_version: __gen_unuint(input[22], 20, 22),
show_frame: __gen_unuint(input[22], 23, 23),
horizontal_size_code: __gen_unuint(input[23], 0, 15),
vertical_size_code: __gen_unuint(input[23], 16, 31),
frame_header_bit_count: __gen_unuint(input[24], 0, 31),
frame_header_bin_buffer_qindex_update_pointer: __gen_unuint(input[25], 0, 31),
frame_header_bin_buffer_loop_filter_update_pointer: __gen_unuint(input[26], 0, 31),
frame_header_bin_buffer_token_update_pointer: __gen_unuint(input[27], 0, 31),
frame_header_bin_buffer_mv_update_pointer: __gen_unuint(input[28], 0, 31),
cv0: __gen_unuint(input[29], 0, 3),
cv1: __gen_unuint(input[29], 4, 7),
cv2: __gen_unuint(input[29], 8, 11),
cv3: __gen_unuint(input[29], 12, 15),
cv4: __gen_unuint(input[29], 16, 19),
cv5: __gen_unuint(input[29], 20, 23),
cv6: __gen_unuint(input[29], 24, 27),
cv7: __gen_unuint(input[29], 28, 31),
}
}
}
impl Deserialize for MfxVp8EncoderCfg {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 30];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 30] as *mut [u8; 120]) })?;
Ok((&input).into())
}
}
pub struct MfxVp8PakObject {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub indirect_pak_mv_data_length: u32,
pub enable_inline_mv_data: bool,
pub indirect_pak_mv_data_start_address_offset: u64,
pub inline_data: [u8; 16],
}
impl MfxVp8PakObject {
pub const DWORD_LENGTH: u32 = 7;
}
impl Default for MfxVp8PakObject {
fn default() -> Self {
MfxVp8PakObject {
dword_length: 5,
subopcode_b: 9,
subopcode_a: 2,
media_command_opcode: 4,
pipeline: 2,
command_type: 3,
indirect_pak_mv_data_length: Default::default(),
enable_inline_mv_data: Default::default(),
indirect_pak_mv_data_start_address_offset: Default::default(),
inline_data: Default::default(),
}
}
}
impl Serialize for MfxVp8PakObject {
type Out = [u32; 7];
fn pack_into(&self, out: &mut [u32; 7]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.indirect_pak_mv_data_length, 0, 9) |
__gen_uint(self.enable_inline_mv_data.into(), 29, 29);
out[2] = __gen_offset(self.indirect_pak_mv_data_start_address_offset as u32, 0, 28);
out[3] = __gen_uint(self.inline_data[0].into(), 0, 7) |
__gen_uint(self.inline_data[1].into(), 8, 15) |
__gen_uint(self.inline_data[2].into(), 16, 23) |
__gen_uint(self.inline_data[3].into(), 24, 31);
out[4] = __gen_uint(self.inline_data[4].into(), 0, 7) |
__gen_uint(self.inline_data[5].into(), 8, 15) |
__gen_uint(self.inline_data[6].into(), 16, 23) |
__gen_uint(self.inline_data[7].into(), 24, 31);
out[5] = __gen_uint(self.inline_data[8].into(), 0, 7) |
__gen_uint(self.inline_data[9].into(), 8, 15) |
__gen_uint(self.inline_data[10].into(), 16, 23) |
__gen_uint(self.inline_data[11].into(), 24, 31);
out[6] = __gen_uint(self.inline_data[12].into(), 0, 7) |
__gen_uint(self.inline_data[13].into(), 8, 15) |
__gen_uint(self.inline_data[14].into(), 16, 23) |
__gen_uint(self.inline_data[15].into(), 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 7];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 7] as *const [u8; 28]) })
}
}
impl From<&[u32; 7]> for MfxVp8PakObject {
fn from(input: &[u32; 7]) -> Self {
MfxVp8PakObject {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
indirect_pak_mv_data_length: __gen_unuint(input[1], 0, 9),
enable_inline_mv_data: __gen_unuint(input[1], 29, 29) != 0,
indirect_pak_mv_data_start_address_offset: (__gen_unuint(input[2], 0, 28) as u64),
inline_data: [
(__gen_unuint(input[3], 0, 7)) as u8,
(__gen_unuint(input[3], 8, 15)) as u8,
(__gen_unuint(input[3], 16, 23)) as u8,
(__gen_unuint(input[3], 24, 31)) as u8,
(__gen_unuint(input[4], 0, 7)) as u8,
(__gen_unuint(input[4], 8, 15)) as u8,
(__gen_unuint(input[4], 16, 23)) as u8,
(__gen_unuint(input[4], 24, 31)) as u8,
(__gen_unuint(input[5], 0, 7)) as u8,
(__gen_unuint(input[5], 8, 15)) as u8,
(__gen_unuint(input[5], 16, 23)) as u8,
(__gen_unuint(input[5], 24, 31)) as u8,
(__gen_unuint(input[6], 0, 7)) as u8,
(__gen_unuint(input[6], 8, 15)) as u8,
(__gen_unuint(input[6], 16, 23)) as u8,
(__gen_unuint(input[6], 24, 31)) as u8
],
}
}
}
impl Deserialize for MfxVp8PakObject {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 7];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 7] as *mut [u8; 28]) })?;
Ok((&input).into())
}
}
pub struct MfxVp8PicState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub frame_width: u32,
pub frame_height: u32,
pub mc_filter_select: u32,
pub chroma_full_pixel_mc_filter_mode: u32,
pub dblk_filter_type: u32,
pub key_frame: bool,
pub segmentation_id_stream_out_enable: bool,
pub segmentation_id_stream_in_enable: bool,
pub segment_enable: bool,
pub update_mb_segment_map: bool,
pub mb_nocoeff_skip: bool,
pub mode_reference_loop_filter_delta_enable: bool,
pub golden_ref_picture_mv_sign_bias: bool,
pub alternate_ref_pic_mv_sign_bias: bool,
pub deblock_sharpness_level: u32,
pub log2_num_of_partition: u32,
pub dblk_filter_level_for_segment0: u32,
pub dblk_filter_level_for_segment1: u32,
pub dblk_filter_level_for_segment2: u32,
pub dblk_filter_level_for_segment3: u32,
pub segment0_qindex: u32,
pub segment1_qindex: u32,
pub segment2_qindex: u32,
pub segment3_qindex: u32,
pub y2dc_qindex_delta: u32,
pub y2ac_qindex_delta_sign: u32,
pub y2ac_qindex_delta: u32,
pub y2ac_qindex_sign: u32,
pub uvdc_qindex_delta: u32,
pub uvdc_qindex_delta_sign: u32,
pub uvac_qindex_delta: u32,
pub uvac_qindex_delta_sign: u32,
pub y1dc_qindex_delta: u32,
pub y1dc_qindex_delta_sign: u32,
pub clamp_qindex_low: u32,
pub clamp_qindex_high: u32,
pub quantizer_value_1_uvdc: u32,
pub quantizer_value_1_uvac: u32,
pub quantizer_value_1_y2dc: u32,
pub quantizer_value_1_y2ac: u32,
pub quantizer_value_2_y1dc: u32,
pub quantizer_value_2_y1ac: u32,
pub quantizer_value_2_uvdc: u32,
pub quantizer_value_2_uvac: u32,
pub quantizer_value_2_y2dc: u32,
pub quantizer_value_2_y2ac: u32,
pub quantizer_value_3_y1dc: u32,
pub quantizer_value_3_y1ac: u32,
pub quantizer_value_3_uvdc: u32,
pub quantizer_value_3_uvac: u32,
pub quantizer_value_3_y2dc: u32,
pub quantizer_value_3_y2ac: u32,
pub coeffprobability_stream_in_address: u64,
pub coeffprobability_stream_in_mocs_encoder_only: u32,
pub coeffprobability_stream_in_arbitration_priority_control: u32,
pub coeffprobability_stream_in_memory_compression_enable: bool,
pub coeffprobability_stream_in_memory_compression_mode: u32,
pub coeffprobability_stream_in_tiled_resource_mode: u32,
pub mbsegmentidtreeprobs_0: u32,
pub mbsegmentidtreeprobs_1: u32,
pub mbsegmentidtreeprobs_2: u32,
pub interpredfromgrefrefprob: u32,
pub interpredfromlastrefprob: u32,
pub intrambprob: u32,
pub mbnocoeffskipfalseprob: u32,
pub ymodeprob_0: u32,
pub ymodeprob_1: u32,
pub ymodeprob_2: u32,
pub ymodeprob_3: u32,
pub uvmodeprob_0: u32,
pub uvmodeprob_1: u32,
pub uvmodeprob_2: u32,
pub mvupdateprobs_0_0: u32,
pub mvupdateprobs_0_1: u32,
pub mvupdateprobs_0_2: u32,
pub mvupdateprobs_0_3: u32,
pub mvupdateprobs_0_4: u32,
pub mvupdateprobs_0_5: u32,
pub mvupdateprobs_0_6: u32,
pub mvupdateprobs_0_7: u32,
pub mvupdateprobs_0_8: u32,
pub mvupdateprobs_0_9: u32,
pub mvupdateprobs_0_10: u32,
pub mvupdateprobs_0_11: u32,
pub mvupdateprobs_0_12: u32,
pub mvupdateprobs_0_13: u32,
pub mvupdateprobs_0_14: u32,
pub mvupdateprobs_0_15: u32,
pub mvupdateprobs_0_16: u32,
pub mvupdateprobs_0_17: u32,
pub mvupdateprobs_0_18: u32,
pub mvupdateprobs_1_0: u32,
pub mvupdateprobs_1_1: u32,
pub mvupdateprobs_1_2: u32,
pub mvupdateprobs_1_3: u32,
pub mvupdateprobs_1_4: u32,
pub mvupdateprobs_1_5: u32,
pub mvupdateprobs_1_6: u32,
pub mvupdateprobs_1_7: u32,
pub mvupdateprobs_1_8: u32,
pub mvupdateprobs_1_9: u32,
pub mvupdateprobs_1_10: u32,
pub mvupdateprobs_1_11: u32,
pub mvupdateprobs_1_12: u32,
pub mvupdateprobs_1_13: u32,
pub mvupdateprobs_1_14: u32,
pub mvupdateprobs_1_15: u32,
pub mvupdateprobs_1_16: u32,
pub mvupdateprobs_1_17: u32,
pub mvupdateprobs_1_18: u32,
pub reflfdelta0: i32,
pub reflfdelta1: i32,
pub reflfdelta2: i32,
pub reflfdelta3: i32,
pub modelfdelta0: i32,
pub modelfdelta1: i32,
pub modelfdelta2: i32,
pub modelfdelta3: i32,
pub segmentation_id_stream_address: u64,
pub coeffprobability_stream_in_mocs: u32,
pub segmentation_id_stream_arbitration_priority_control: u32,
pub segmentation_id_stream_memory_compression_enable: bool,
pub segmentation_id_stream_memory_compression_mode: u32,
pub segmentation_id_stream_tiled_resource_mode: u32,
}
impl MfxVp8PicState {
pub const DWORD_LENGTH: u32 = 38;
pub const HIGHEST_PRIORITY: u32 = 0;
pub const LOWEST_PRIORITY: u32 = 3;
pub const SECOND_HIGHEST_PRIORITY: u32 = 1;
pub const THIRD_HIGHEST_PRIORITY: u32 = 2;
pub const TRMODE_NONE: u32 = 0;
pub const TRMODE_TILEYF: u32 = 1;
pub const TRMODE_TILEYS: u32 = 2;
pub const _1_TOKEN_PARTITION: u32 = 0;
pub const _2_TOKEN_PARTITION: u32 = 1;
pub const _4_TOKEN_PARTITION: u32 = 2;
pub const _8_TOKEN_PARTITION: u32 = 3;
}
impl Default for MfxVp8PicState {
fn default() -> Self {
MfxVp8PicState {
dword_length: 0,
subopcode_b: 0,
subopcode_a: 0,
media_command_opcode: 4,
pipeline: 2,
command_type: 3,
frame_width: Default::default(),
frame_height: Default::default(),
mc_filter_select: Default::default(),
chroma_full_pixel_mc_filter_mode: Default::default(),
dblk_filter_type: Default::default(),
key_frame: Default::default(),
segmentation_id_stream_out_enable: Default::default(),
segmentation_id_stream_in_enable: Default::default(),
segment_enable: Default::default(),
update_mb_segment_map: Default::default(),
mb_nocoeff_skip: Default::default(),
mode_reference_loop_filter_delta_enable: Default::default(),
golden_ref_picture_mv_sign_bias: Default::default(),
alternate_ref_pic_mv_sign_bias: Default::default(),
deblock_sharpness_level: Default::default(),
log2_num_of_partition: Default::default(),
dblk_filter_level_for_segment0: Default::default(),
dblk_filter_level_for_segment1: Default::default(),
dblk_filter_level_for_segment2: Default::default(),
dblk_filter_level_for_segment3: Default::default(),
segment0_qindex: Default::default(),
segment1_qindex: Default::default(),
segment2_qindex: Default::default(),
segment3_qindex: Default::default(),
y2dc_qindex_delta: Default::default(),
y2ac_qindex_delta_sign: Default::default(),
y2ac_qindex_delta: Default::default(),
y2ac_qindex_sign: Default::default(),
uvdc_qindex_delta: Default::default(),
uvdc_qindex_delta_sign: Default::default(),
uvac_qindex_delta: Default::default(),
uvac_qindex_delta_sign: Default::default(),
y1dc_qindex_delta: Default::default(),
y1dc_qindex_delta_sign: Default::default(),
clamp_qindex_low: Default::default(),
clamp_qindex_high: Default::default(),
quantizer_value_1_uvdc: Default::default(),
quantizer_value_1_uvac: Default::default(),
quantizer_value_1_y2dc: Default::default(),
quantizer_value_1_y2ac: Default::default(),
quantizer_value_2_y1dc: Default::default(),
quantizer_value_2_y1ac: Default::default(),
quantizer_value_2_uvdc: Default::default(),
quantizer_value_2_uvac: Default::default(),
quantizer_value_2_y2dc: Default::default(),
quantizer_value_2_y2ac: Default::default(),
quantizer_value_3_y1dc: Default::default(),
quantizer_value_3_y1ac: Default::default(),
quantizer_value_3_uvdc: Default::default(),
quantizer_value_3_uvac: Default::default(),
quantizer_value_3_y2dc: Default::default(),
quantizer_value_3_y2ac: Default::default(),
coeffprobability_stream_in_address: Default::default(),
coeffprobability_stream_in_mocs_encoder_only: Default::default(),
coeffprobability_stream_in_arbitration_priority_control: Default::default(),
coeffprobability_stream_in_memory_compression_enable: Default::default(),
coeffprobability_stream_in_memory_compression_mode: Default::default(),
coeffprobability_stream_in_tiled_resource_mode: Default::default(),
mbsegmentidtreeprobs_0: Default::default(),
mbsegmentidtreeprobs_1: Default::default(),
mbsegmentidtreeprobs_2: Default::default(),
interpredfromgrefrefprob: Default::default(),
interpredfromlastrefprob: Default::default(),
intrambprob: Default::default(),
mbnocoeffskipfalseprob: Default::default(),
ymodeprob_0: Default::default(),
ymodeprob_1: Default::default(),
ymodeprob_2: Default::default(),
ymodeprob_3: Default::default(),
uvmodeprob_0: Default::default(),
uvmodeprob_1: Default::default(),
uvmodeprob_2: Default::default(),
mvupdateprobs_0_0: Default::default(),
mvupdateprobs_0_1: Default::default(),
mvupdateprobs_0_2: Default::default(),
mvupdateprobs_0_3: Default::default(),
mvupdateprobs_0_4: Default::default(),
mvupdateprobs_0_5: Default::default(),
mvupdateprobs_0_6: Default::default(),
mvupdateprobs_0_7: Default::default(),
mvupdateprobs_0_8: Default::default(),
mvupdateprobs_0_9: Default::default(),
mvupdateprobs_0_10: Default::default(),
mvupdateprobs_0_11: Default::default(),
mvupdateprobs_0_12: Default::default(),
mvupdateprobs_0_13: Default::default(),
mvupdateprobs_0_14: Default::default(),
mvupdateprobs_0_15: Default::default(),
mvupdateprobs_0_16: Default::default(),
mvupdateprobs_0_17: Default::default(),
mvupdateprobs_0_18: Default::default(),
mvupdateprobs_1_0: Default::default(),
mvupdateprobs_1_1: Default::default(),
mvupdateprobs_1_2: Default::default(),
mvupdateprobs_1_3: Default::default(),
mvupdateprobs_1_4: Default::default(),
mvupdateprobs_1_5: Default::default(),
mvupdateprobs_1_6: Default::default(),
mvupdateprobs_1_7: Default::default(),
mvupdateprobs_1_8: Default::default(),
mvupdateprobs_1_9: Default::default(),
mvupdateprobs_1_10: Default::default(),
mvupdateprobs_1_11: Default::default(),
mvupdateprobs_1_12: Default::default(),
mvupdateprobs_1_13: Default::default(),
mvupdateprobs_1_14: Default::default(),
mvupdateprobs_1_15: Default::default(),
mvupdateprobs_1_16: Default::default(),
mvupdateprobs_1_17: Default::default(),
mvupdateprobs_1_18: Default::default(),
reflfdelta0: Default::default(),
reflfdelta1: Default::default(),
reflfdelta2: Default::default(),
reflfdelta3: Default::default(),
modelfdelta0: Default::default(),
modelfdelta1: Default::default(),
modelfdelta2: Default::default(),
modelfdelta3: Default::default(),
segmentation_id_stream_address: Default::default(),
coeffprobability_stream_in_mocs: Default::default(),
segmentation_id_stream_arbitration_priority_control: Default::default(),
segmentation_id_stream_memory_compression_enable: Default::default(),
segmentation_id_stream_memory_compression_mode: Default::default(),
segmentation_id_stream_tiled_resource_mode: Default::default(),
}
}
}
impl Serialize for MfxVp8PicState {
type Out = [u32; 38];
fn pack_into(&self, out: &mut [u32; 38]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 23) |
__gen_uint(self.media_command_opcode, 24, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.frame_width, 0, 7) |
__gen_uint(self.frame_height, 16, 23);
out[2] = __gen_uint(self.mc_filter_select, 0, 0) |
__gen_uint(self.chroma_full_pixel_mc_filter_mode, 1, 1) |
__gen_uint(self.dblk_filter_type, 4, 4) |
__gen_uint(self.key_frame.into(), 5, 5) |
__gen_uint(self.segmentation_id_stream_out_enable.into(), 6, 6) |
__gen_uint(self.segmentation_id_stream_in_enable.into(), 7, 7) |
__gen_uint(self.segment_enable.into(), 8, 8) |
__gen_uint(self.update_mb_segment_map.into(), 9, 9) |
__gen_uint(self.mb_nocoeff_skip.into(), 10, 10) |
__gen_uint(self.mode_reference_loop_filter_delta_enable.into(), 11, 11) |
__gen_uint(self.golden_ref_picture_mv_sign_bias.into(), 12, 12) |
__gen_uint(self.alternate_ref_pic_mv_sign_bias.into(), 13, 13) |
__gen_uint(self.deblock_sharpness_level, 16, 18) |
__gen_uint(self.log2_num_of_partition, 24, 25);
out[3] = __gen_uint(self.dblk_filter_level_for_segment0, 0, 5) |
__gen_uint(self.dblk_filter_level_for_segment1, 8, 13) |
__gen_uint(self.dblk_filter_level_for_segment2, 16, 21) |
__gen_uint(self.dblk_filter_level_for_segment3, 24, 29);
out[4] = __gen_uint(self.segment0_qindex, 0, 6) |
__gen_uint(self.segment1_qindex, 8, 14) |
__gen_uint(self.segment2_qindex, 16, 22) |
__gen_uint(self.segment3_qindex, 24, 30);
out[5] = __gen_uint(self.y2dc_qindex_delta, 0, 3) |
__gen_uint(self.y2ac_qindex_delta_sign, 4, 4) |
__gen_uint(self.y2ac_qindex_delta, 8, 11) |
__gen_uint(self.y2ac_qindex_sign, 12, 12) |
__gen_uint(self.uvdc_qindex_delta, 16, 19) |
__gen_uint(self.uvdc_qindex_delta_sign, 20, 20) |
__gen_uint(self.uvac_qindex_delta, 24, 27) |
__gen_uint(self.uvac_qindex_delta_sign, 28, 28);
out[6] = __gen_uint(self.y1dc_qindex_delta, 0, 3) |
__gen_uint(self.y1dc_qindex_delta_sign, 4, 4);
out[7] = __gen_uint(self.clamp_qindex_low, 0, 6) |
__gen_uint(self.clamp_qindex_high, 8, 14);
out[8] = __gen_uint(self.quantizer_value_1_uvdc, 0, 8) |
__gen_uint(self.quantizer_value_1_uvac, 16, 24);
out[9] = __gen_uint(self.quantizer_value_1_y2dc, 0, 8) |
__gen_uint(self.quantizer_value_1_y2ac, 16, 24);
out[10] = __gen_uint(self.quantizer_value_2_y1dc, 0, 8) |
__gen_uint(self.quantizer_value_2_y1ac, 16, 24);
out[11] = __gen_uint(self.quantizer_value_2_uvdc, 0, 8) |
__gen_uint(self.quantizer_value_2_uvac, 16, 24);
out[12] = __gen_uint(self.quantizer_value_2_y2dc, 0, 8) |
__gen_uint(self.quantizer_value_2_y2ac, 16, 24);
out[13] = __gen_uint(self.quantizer_value_3_y1dc, 0, 8) |
__gen_uint(self.quantizer_value_3_y1ac, 16, 24);
out[14] = __gen_uint(self.quantizer_value_3_uvdc, 0, 8) |
__gen_uint(self.quantizer_value_3_uvac, 16, 24);
out[15] = __gen_uint(self.quantizer_value_3_y2dc, 0, 8) |
__gen_uint(self.quantizer_value_3_y2ac, 16, 24);
out[16] = __gen_uint(self.coeffprobability_stream_in_address as u32, 6, 31);
out[17] = __gen_uint((self.coeffprobability_stream_in_address >> 32) as u32, 0, 15);
out[18] = __gen_uint(self.coeffprobability_stream_in_mocs_encoder_only, 1, 6) |
__gen_uint(self.coeffprobability_stream_in_arbitration_priority_control, 7, 8) |
__gen_uint(self.coeffprobability_stream_in_memory_compression_enable.into(), 9, 9) |
__gen_uint(self.coeffprobability_stream_in_memory_compression_mode, 10, 10) |
__gen_uint(self.coeffprobability_stream_in_tiled_resource_mode, 13, 14);
out[19] = __gen_uint(self.mbsegmentidtreeprobs_0, 0, 7) |
__gen_uint(self.mbsegmentidtreeprobs_1, 8, 15) |
__gen_uint(self.mbsegmentidtreeprobs_2, 16, 23);
out[20] = __gen_uint(self.interpredfromgrefrefprob, 0, 7) |
__gen_uint(self.interpredfromlastrefprob, 8, 15) |
__gen_uint(self.intrambprob, 16, 23) |
__gen_uint(self.mbnocoeffskipfalseprob, 24, 31);
out[21] = __gen_uint(self.ymodeprob_0, 0, 7) |
__gen_uint(self.ymodeprob_1, 8, 15) |
__gen_uint(self.ymodeprob_2, 16, 23) |
__gen_uint(self.ymodeprob_3, 24, 31);
out[22] = __gen_uint(self.uvmodeprob_0, 0, 7) |
__gen_uint(self.uvmodeprob_1, 8, 15) |
__gen_uint(self.uvmodeprob_2, 16, 23);
out[23] = __gen_uint(self.mvupdateprobs_0_0, 0, 7) |
__gen_uint(self.mvupdateprobs_0_1, 8, 15) |
__gen_uint(self.mvupdateprobs_0_2, 16, 23) |
__gen_uint(self.mvupdateprobs_0_3, 24, 31);
out[24] = __gen_uint(self.mvupdateprobs_0_4, 0, 7) |
__gen_uint(self.mvupdateprobs_0_5, 8, 15) |
__gen_uint(self.mvupdateprobs_0_6, 16, 23) |
__gen_uint(self.mvupdateprobs_0_7, 24, 31);
out[25] = __gen_uint(self.mvupdateprobs_0_8, 0, 7) |
__gen_uint(self.mvupdateprobs_0_9, 8, 15) |
__gen_uint(self.mvupdateprobs_0_10, 16, 23) |
__gen_uint(self.mvupdateprobs_0_11, 24, 31);
out[26] = __gen_uint(self.mvupdateprobs_0_12, 0, 7) |
__gen_uint(self.mvupdateprobs_0_13, 8, 15) |
__gen_uint(self.mvupdateprobs_0_14, 16, 23) |
__gen_uint(self.mvupdateprobs_0_15, 24, 31);
out[27] = __gen_uint(self.mvupdateprobs_0_16, 0, 7) |
__gen_uint(self.mvupdateprobs_0_17, 8, 15) |
__gen_uint(self.mvupdateprobs_0_18, 16, 23);
out[28] = __gen_uint(self.mvupdateprobs_1_0, 0, 7) |
__gen_uint(self.mvupdateprobs_1_1, 8, 15) |
__gen_uint(self.mvupdateprobs_1_2, 16, 23) |
__gen_uint(self.mvupdateprobs_1_3, 24, 31);
out[29] = __gen_uint(self.mvupdateprobs_1_4, 0, 7) |
__gen_uint(self.mvupdateprobs_1_5, 8, 15) |
__gen_uint(self.mvupdateprobs_1_6, 16, 23) |
__gen_uint(self.mvupdateprobs_1_7, 24, 31);
out[30] = __gen_uint(self.mvupdateprobs_1_8, 0, 7) |
__gen_uint(self.mvupdateprobs_1_9, 8, 15) |
__gen_uint(self.mvupdateprobs_1_10, 16, 23) |
__gen_uint(self.mvupdateprobs_1_11, 24, 31);
out[31] = __gen_uint(self.mvupdateprobs_1_12, 0, 7) |
__gen_uint(self.mvupdateprobs_1_13, 8, 15) |
__gen_uint(self.mvupdateprobs_1_14, 16, 23) |
__gen_uint(self.mvupdateprobs_1_15, 24, 31);
out[32] = __gen_uint(self.mvupdateprobs_1_16, 0, 7) |
__gen_uint(self.mvupdateprobs_1_17, 8, 15) |
__gen_uint(self.mvupdateprobs_1_18, 16, 23);
out[33] = __gen_uint(self.reflfdelta0 as u32, 0, 6) |
__gen_uint(self.reflfdelta1 as u32, 8, 14) |
__gen_uint(self.reflfdelta2 as u32, 16, 22) |
__gen_uint(self.reflfdelta3 as u32, 24, 30);
out[34] = __gen_uint(self.modelfdelta0 as u32, 0, 6) |
__gen_uint(self.modelfdelta1 as u32, 8, 14) |
__gen_uint(self.modelfdelta2 as u32, 16, 22) |
__gen_uint(self.modelfdelta3 as u32, 24, 30);
out[35] = __gen_uint(self.segmentation_id_stream_address as u32, 0, 31);
out[36] = __gen_uint((self.segmentation_id_stream_address >> 32) as u32, 0, 15);
out[37] = __gen_uint(self.coeffprobability_stream_in_mocs, 1, 6) |
__gen_uint(self.segmentation_id_stream_arbitration_priority_control, 7, 8) |
__gen_uint(self.segmentation_id_stream_memory_compression_enable.into(), 9, 9) |
__gen_uint(self.segmentation_id_stream_memory_compression_mode, 10, 10) |
__gen_uint(self.segmentation_id_stream_tiled_resource_mode, 13, 14);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 38];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 38] as *const [u8; 152]) })
}
}
impl From<&[u32; 38]> for MfxVp8PicState {
fn from(input: &[u32; 38]) -> Self {
MfxVp8PicState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 23),
media_command_opcode: __gen_unuint(input[0], 24, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
frame_width: __gen_unuint(input[1], 0, 7),
frame_height: __gen_unuint(input[1], 16, 23),
mc_filter_select: __gen_unuint(input[2], 0, 0),
chroma_full_pixel_mc_filter_mode: __gen_unuint(input[2], 1, 1),
dblk_filter_type: __gen_unuint(input[2], 4, 4),
key_frame: __gen_unuint(input[2], 5, 5) != 0,
segmentation_id_stream_out_enable: __gen_unuint(input[2], 6, 6) != 0,
segmentation_id_stream_in_enable: __gen_unuint(input[2], 7, 7) != 0,
segment_enable: __gen_unuint(input[2], 8, 8) != 0,
update_mb_segment_map: __gen_unuint(input[2], 9, 9) != 0,
mb_nocoeff_skip: __gen_unuint(input[2], 10, 10) != 0,
mode_reference_loop_filter_delta_enable: __gen_unuint(input[2], 11, 11) != 0,
golden_ref_picture_mv_sign_bias: __gen_unuint(input[2], 12, 12) != 0,
alternate_ref_pic_mv_sign_bias: __gen_unuint(input[2], 13, 13) != 0,
deblock_sharpness_level: __gen_unuint(input[2], 16, 18),
log2_num_of_partition: __gen_unuint(input[2], 24, 25),
dblk_filter_level_for_segment0: __gen_unuint(input[3], 0, 5),
dblk_filter_level_for_segment1: __gen_unuint(input[3], 8, 13),
dblk_filter_level_for_segment2: __gen_unuint(input[3], 16, 21),
dblk_filter_level_for_segment3: __gen_unuint(input[3], 24, 29),
segment0_qindex: __gen_unuint(input[4], 0, 6),
segment1_qindex: __gen_unuint(input[4], 8, 14),
segment2_qindex: __gen_unuint(input[4], 16, 22),
segment3_qindex: __gen_unuint(input[4], 24, 30),
y2dc_qindex_delta: __gen_unuint(input[5], 0, 3),
y2ac_qindex_delta_sign: __gen_unuint(input[5], 4, 4),
y2ac_qindex_delta: __gen_unuint(input[5], 8, 11),
y2ac_qindex_sign: __gen_unuint(input[5], 12, 12),
uvdc_qindex_delta: __gen_unuint(input[5], 16, 19),
uvdc_qindex_delta_sign: __gen_unuint(input[5], 20, 20),
uvac_qindex_delta: __gen_unuint(input[5], 24, 27),
uvac_qindex_delta_sign: __gen_unuint(input[5], 28, 28),
y1dc_qindex_delta: __gen_unuint(input[6], 0, 3),
y1dc_qindex_delta_sign: __gen_unuint(input[6], 4, 4),
clamp_qindex_low: __gen_unuint(input[7], 0, 6),
clamp_qindex_high: __gen_unuint(input[7], 8, 14),
quantizer_value_1_uvdc: __gen_unuint(input[8], 0, 8),
quantizer_value_1_uvac: __gen_unuint(input[8], 16, 24),
quantizer_value_1_y2dc: __gen_unuint(input[9], 0, 8),
quantizer_value_1_y2ac: __gen_unuint(input[9], 16, 24),
quantizer_value_2_y1dc: __gen_unuint(input[10], 0, 8),
quantizer_value_2_y1ac: __gen_unuint(input[10], 16, 24),
quantizer_value_2_uvdc: __gen_unuint(input[11], 0, 8),
quantizer_value_2_uvac: __gen_unuint(input[11], 16, 24),
quantizer_value_2_y2dc: __gen_unuint(input[12], 0, 8),
quantizer_value_2_y2ac: __gen_unuint(input[12], 16, 24),
quantizer_value_3_y1dc: __gen_unuint(input[13], 0, 8),
quantizer_value_3_y1ac: __gen_unuint(input[13], 16, 24),
quantizer_value_3_uvdc: __gen_unuint(input[14], 0, 8),
quantizer_value_3_uvac: __gen_unuint(input[14], 16, 24),
quantizer_value_3_y2dc: __gen_unuint(input[15], 0, 8),
quantizer_value_3_y2ac: __gen_unuint(input[15], 16, 24),
coeffprobability_stream_in_address: (__gen_unuint(input[16], 6, 31) as u64) |
(__gen_unuint(input[17], 0, 15) as u64) << 26,
coeffprobability_stream_in_mocs_encoder_only: __gen_unuint(input[18], 1, 6),
coeffprobability_stream_in_arbitration_priority_control: __gen_unuint(input[18], 7, 8),
coeffprobability_stream_in_memory_compression_enable: __gen_unuint(input[18], 9, 9) != 0,
coeffprobability_stream_in_memory_compression_mode: __gen_unuint(input[18], 10, 10),
coeffprobability_stream_in_tiled_resource_mode: __gen_unuint(input[18], 13, 14),
mbsegmentidtreeprobs_0: __gen_unuint(input[19], 0, 7),
mbsegmentidtreeprobs_1: __gen_unuint(input[19], 8, 15),
mbsegmentidtreeprobs_2: __gen_unuint(input[19], 16, 23),
interpredfromgrefrefprob: __gen_unuint(input[20], 0, 7),
interpredfromlastrefprob: __gen_unuint(input[20], 8, 15),
intrambprob: __gen_unuint(input[20], 16, 23),
mbnocoeffskipfalseprob: __gen_unuint(input[20], 24, 31),
ymodeprob_0: __gen_unuint(input[21], 0, 7),
ymodeprob_1: __gen_unuint(input[21], 8, 15),
ymodeprob_2: __gen_unuint(input[21], 16, 23),
ymodeprob_3: __gen_unuint(input[21], 24, 31),
uvmodeprob_0: __gen_unuint(input[22], 0, 7),
uvmodeprob_1: __gen_unuint(input[22], 8, 15),
uvmodeprob_2: __gen_unuint(input[22], 16, 23),
mvupdateprobs_0_0: __gen_unuint(input[23], 0, 7),
mvupdateprobs_0_1: __gen_unuint(input[23], 8, 15),
mvupdateprobs_0_2: __gen_unuint(input[23], 16, 23),
mvupdateprobs_0_3: __gen_unuint(input[23], 24, 31),
mvupdateprobs_0_4: __gen_unuint(input[24], 0, 7),
mvupdateprobs_0_5: __gen_unuint(input[24], 8, 15),
mvupdateprobs_0_6: __gen_unuint(input[24], 16, 23),
mvupdateprobs_0_7: __gen_unuint(input[24], 24, 31),
mvupdateprobs_0_8: __gen_unuint(input[25], 0, 7),
mvupdateprobs_0_9: __gen_unuint(input[25], 8, 15),
mvupdateprobs_0_10: __gen_unuint(input[25], 16, 23),
mvupdateprobs_0_11: __gen_unuint(input[25], 24, 31),
mvupdateprobs_0_12: __gen_unuint(input[26], 0, 7),
mvupdateprobs_0_13: __gen_unuint(input[26], 8, 15),
mvupdateprobs_0_14: __gen_unuint(input[26], 16, 23),
mvupdateprobs_0_15: __gen_unuint(input[26], 24, 31),
mvupdateprobs_0_16: __gen_unuint(input[27], 0, 7),
mvupdateprobs_0_17: __gen_unuint(input[27], 8, 15),
mvupdateprobs_0_18: __gen_unuint(input[27], 16, 23),
mvupdateprobs_1_0: __gen_unuint(input[28], 0, 7),
mvupdateprobs_1_1: __gen_unuint(input[28], 8, 15),
mvupdateprobs_1_2: __gen_unuint(input[28], 16, 23),
mvupdateprobs_1_3: __gen_unuint(input[28], 24, 31),
mvupdateprobs_1_4: __gen_unuint(input[29], 0, 7),
mvupdateprobs_1_5: __gen_unuint(input[29], 8, 15),
mvupdateprobs_1_6: __gen_unuint(input[29], 16, 23),
mvupdateprobs_1_7: __gen_unuint(input[29], 24, 31),
mvupdateprobs_1_8: __gen_unuint(input[30], 0, 7),
mvupdateprobs_1_9: __gen_unuint(input[30], 8, 15),
mvupdateprobs_1_10: __gen_unuint(input[30], 16, 23),
mvupdateprobs_1_11: __gen_unuint(input[30], 24, 31),
mvupdateprobs_1_12: __gen_unuint(input[31], 0, 7),
mvupdateprobs_1_13: __gen_unuint(input[31], 8, 15),
mvupdateprobs_1_14: __gen_unuint(input[31], 16, 23),
mvupdateprobs_1_15: __gen_unuint(input[31], 24, 31),
mvupdateprobs_1_16: __gen_unuint(input[32], 0, 7),
mvupdateprobs_1_17: __gen_unuint(input[32], 8, 15),
mvupdateprobs_1_18: __gen_unuint(input[32], 16, 23),
reflfdelta0: (__gen_unuint(input[33], 0, 6)) as i32,
reflfdelta1: (__gen_unuint(input[33], 8, 14)) as i32,
reflfdelta2: (__gen_unuint(input[33], 16, 22)) as i32,
reflfdelta3: (__gen_unuint(input[33], 24, 30)) as i32,
modelfdelta0: (__gen_unuint(input[34], 0, 6)) as i32,
modelfdelta1: (__gen_unuint(input[34], 8, 14)) as i32,
modelfdelta2: (__gen_unuint(input[34], 16, 22)) as i32,
modelfdelta3: (__gen_unuint(input[34], 24, 30)) as i32,
segmentation_id_stream_address: (__gen_unuint(input[35], 0, 31) as u64) |
(__gen_unuint(input[36], 0, 15) as u64) << 32,
coeffprobability_stream_in_mocs: __gen_unuint(input[37], 1, 6),
segmentation_id_stream_arbitration_priority_control: __gen_unuint(input[37], 7, 8),
segmentation_id_stream_memory_compression_enable: __gen_unuint(input[37], 9, 9) != 0,
segmentation_id_stream_memory_compression_mode: __gen_unuint(input[37], 10, 10),
segmentation_id_stream_tiled_resource_mode: __gen_unuint(input[37], 13, 14),
}
}
}
impl Deserialize for MfxVp8PicState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 38];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 38] as *mut [u8; 152]) })?;
Ok((&input).into())
}
}
pub struct MfxWait {
pub dword_length: u32,
pub mfx_sync_control_flag: u32,
pub subopcode: u32,
pub command_subtype: u32,
pub command_type: u32,
}
impl MfxWait {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MfxWait {
fn default() -> Self {
MfxWait {
dword_length: 0,
mfx_sync_control_flag: Default::default(),
subopcode: 0,
command_subtype: 1,
command_type: 3,
}
}
}
impl Serialize for MfxWait {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.dword_length, 0, 5) |
__gen_uint(self.mfx_sync_control_flag, 8, 8) |
__gen_uint(self.subopcode, 16, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MfxWait {
fn from(input: &[u32; 1]) -> Self {
MfxWait {
dword_length: __gen_unuint(input[0], 0, 5),
mfx_sync_control_flag: __gen_unuint(input[0], 8, 8),
subopcode: __gen_unuint(input[0], 16, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MfxWait {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiArbCheck {
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiArbCheck {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiArbCheck {
fn default() -> Self {
MiArbCheck {
mi_command_opcode: 5,
command_type: 0,
}
}
}
impl Serialize for MiArbCheck {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiArbCheck {
fn from(input: &[u32; 1]) -> Self {
MiArbCheck {
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiArbCheck {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiArbOnOff {
pub arbitration_enable: bool,
pub allow_lite_restore: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiArbOnOff {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiArbOnOff {
fn default() -> Self {
MiArbOnOff {
arbitration_enable: true,
allow_lite_restore: Default::default(),
mi_command_opcode: 8,
command_type: 0,
}
}
}
impl Serialize for MiArbOnOff {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.arbitration_enable.into(), 0, 0) |
__gen_uint(self.allow_lite_restore.into(), 1, 1) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiArbOnOff {
fn from(input: &[u32; 1]) -> Self {
MiArbOnOff {
arbitration_enable: __gen_unuint(input[0], 0, 0) != 0,
allow_lite_restore: __gen_unuint(input[0], 1, 1) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiArbOnOff {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiAtomic<A: Addr + Default> {
pub dword_length: u32,
pub atomic_opcode: AtomicOpcode,
pub return_data_control: bool,
pub cs_stall: bool,
pub inline_data: bool,
pub data_size: u32,
pub post_sync_operation: bool,
pub memory_type: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub memory_address: A,
pub operand1_data_dword_0: u32,
pub operand2_data_dword_0: u32,
pub operand1_data_dword_1: u32,
pub operand2_data_dword_1: u32,
pub operand1_data_dword_2: u32,
pub operand2_data_dword_2: u32,
pub operand1_data_dword_3: u32,
pub operand2_data_dword_3: u32,
}
impl<A: Addr + Default> MiAtomic<A> {
pub const DWORD_LENGTH: u32 = 11;
pub const DWORD: u32 = 0;
pub const GLOBAL_GRAPHICS_ADDRESS: u32 = 1;
pub const OCTWORD: u32 = 2;
pub const PER_PROCESS_GRAPHICS_ADDRESS: u32 = 0;
pub const QWORD: u32 = 1;
pub const RESERVED: u32 = 3;
}
impl<A: Addr + Default> Default for MiAtomic<A> {
fn default() -> Self {
MiAtomic {
dword_length: 1,
atomic_opcode: Default::default(),
return_data_control: Default::default(),
cs_stall: Default::default(),
inline_data: Default::default(),
data_size: Default::default(),
post_sync_operation: Default::default(),
memory_type: Default::default(),
mi_command_opcode: 47,
command_type: 0,
memory_address: Default::default(),
operand1_data_dword_0: Default::default(),
operand2_data_dword_0: Default::default(),
operand1_data_dword_1: Default::default(),
operand2_data_dword_1: Default::default(),
operand1_data_dword_2: Default::default(),
operand2_data_dword_2: Default::default(),
operand1_data_dword_3: Default::default(),
operand2_data_dword_3: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiAtomic<A> {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.atomic_opcode.into(), 8, 15) |
__gen_uint(self.return_data_control.into(), 16, 16) |
__gen_uint(self.cs_stall.into(), 17, 17) |
__gen_uint(self.inline_data.into(), 18, 18) |
__gen_uint(self.data_size, 19, 20) |
__gen_uint(self.post_sync_operation.into(), 21, 21) |
__gen_uint(self.memory_type, 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.memory_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.operand1_data_dword_0, 0, 31);
out[4] = __gen_uint(self.operand2_data_dword_0, 0, 31);
out[5] = __gen_uint(self.operand1_data_dword_1, 0, 31);
out[6] = __gen_uint(self.operand2_data_dword_1, 0, 31);
out[7] = __gen_uint(self.operand1_data_dword_2, 0, 31);
out[8] = __gen_uint(self.operand2_data_dword_2, 0, 31);
out[9] = __gen_uint(self.operand1_data_dword_3, 0, 31);
out[10] = __gen_uint(self.operand2_data_dword_3, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for MiAtomic<u64> {
fn from(input: &[u32; 11]) -> Self {
MiAtomic {
dword_length: __gen_unuint(input[0], 0, 7),
atomic_opcode: (__gen_unuint(input[0], 8, 15)).into(),
return_data_control: __gen_unuint(input[0], 16, 16) != 0,
cs_stall: __gen_unuint(input[0], 17, 17) != 0,
inline_data: __gen_unuint(input[0], 18, 18) != 0,
data_size: __gen_unuint(input[0], 19, 20),
post_sync_operation: __gen_unuint(input[0], 21, 21) != 0,
memory_type: __gen_unuint(input[0], 22, 22),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
memory_address: (__gen_unuint(input[1], 2, 31) as u64) << 2 |
(__gen_unuint(input[2], 0, 15) as u64) << 32,
operand1_data_dword_0: __gen_unuint(input[3], 0, 31),
operand2_data_dword_0: __gen_unuint(input[4], 0, 31),
operand1_data_dword_1: __gen_unuint(input[5], 0, 31),
operand2_data_dword_1: __gen_unuint(input[6], 0, 31),
operand1_data_dword_2: __gen_unuint(input[7], 0, 31),
operand2_data_dword_2: __gen_unuint(input[8], 0, 31),
operand1_data_dword_3: __gen_unuint(input[9], 0, 31),
operand2_data_dword_3: __gen_unuint(input[10], 0, 31),
}
}
}
impl Deserialize for MiAtomic<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct MiBatchBufferEnd {
pub end_context: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiBatchBufferEnd {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiBatchBufferEnd {
fn default() -> Self {
MiBatchBufferEnd {
end_context: Default::default(),
mi_command_opcode: 10,
command_type: 0,
}
}
}
impl Serialize for MiBatchBufferEnd {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.end_context.into(), 0, 0) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiBatchBufferEnd {
fn from(input: &[u32; 1]) -> Self {
MiBatchBufferEnd {
end_context: __gen_unuint(input[0], 0, 0) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiBatchBufferEnd {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiBatchBufferStart<A: Addr + Default> {
pub dword_length: u32,
pub address_space_indicator: u32,
pub resource_streamer_enable: bool,
pub predication_enable: bool,
pub add_offset_enable: bool,
pub second_level_batch_buffer: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub batch_buffer_start_address: A,
}
impl<A: Addr + Default> MiBatchBufferStart<A> {
pub const DWORD_LENGTH: u32 = 3;
pub const FIRST_LEVEL_BATCH: u32 = 0;
pub const GGTT: u32 = 0;
pub const PPGTT: u32 = 1;
pub const SECOND_LEVEL_BATCH: u32 = 1;
}
impl<A: Addr + Default> Default for MiBatchBufferStart<A> {
fn default() -> Self {
MiBatchBufferStart {
dword_length: 1,
address_space_indicator: Default::default(),
resource_streamer_enable: Default::default(),
predication_enable: Default::default(),
add_offset_enable: Default::default(),
second_level_batch_buffer: Default::default(),
mi_command_opcode: 49,
command_type: 0,
batch_buffer_start_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiBatchBufferStart<A> {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.address_space_indicator, 8, 8) |
__gen_uint(self.resource_streamer_enable.into(), 10, 10) |
__gen_uint(self.predication_enable.into(), 15, 15) |
__gen_uint(self.add_offset_enable.into(), 16, 16) |
__gen_uint(self.second_level_batch_buffer, 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.batch_buffer_start_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for MiBatchBufferStart<u64> {
fn from(input: &[u32; 3]) -> Self {
MiBatchBufferStart {
dword_length: __gen_unuint(input[0], 0, 7),
address_space_indicator: __gen_unuint(input[0], 8, 8),
resource_streamer_enable: __gen_unuint(input[0], 10, 10) != 0,
predication_enable: __gen_unuint(input[0], 15, 15) != 0,
add_offset_enable: __gen_unuint(input[0], 16, 16) != 0,
second_level_batch_buffer: __gen_unuint(input[0], 22, 22),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
batch_buffer_start_address: (__gen_unuint(input[1], 2, 31) as u64) << 2 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for MiBatchBufferStart<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct MiClflush<A: Addr + Default> {
pub dword_length: u32,
pub use_global_gtt: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
pub starting_cacheline_offset: u32,
pub page_base_address: A,
}
impl<A: Addr + Default> MiClflush<A> {
pub const DWORD_LENGTH: u32 = 3;
}
impl<A: Addr + Default> Default for MiClflush<A> {
fn default() -> Self {
MiClflush {
dword_length: 1,
use_global_gtt: Default::default(),
mi_command_opcode: 39,
command_type: 0,
starting_cacheline_offset: Default::default(),
page_base_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiClflush<A> {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 9) |
__gen_uint(self.use_global_gtt.into(), 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.starting_cacheline_offset, 6, 11);
let v1_address = self.page_base_address.combine(v1);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for MiClflush<u64> {
fn from(input: &[u32; 3]) -> Self {
MiClflush {
dword_length: __gen_unuint(input[0], 0, 9),
use_global_gtt: __gen_unuint(input[0], 22, 22) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
starting_cacheline_offset: __gen_unuint(input[1], 6, 11),
page_base_address: (__gen_unuint(input[1], 12, 31) as u64) << 12 |
(__gen_unuint(input[2], 0, 15) as u64) << 32,
}
}
}
impl Deserialize for MiClflush<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct MiConditionalBatchBufferEnd<A: Addr + Default> {
pub dword_length: u32,
pub compare_mask_mode: u32,
pub compare_semaphore: u32,
pub use_global_gtt: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
pub compare_data_dword: u32,
pub compare_address: A,
}
impl<A: Addr + Default> MiConditionalBatchBufferEnd<A> {
pub const DWORD_LENGTH: u32 = 4;
pub const COMPARE_MASK_MODE_DISABLED: u32 = 0;
pub const COMPARE_MASK_MODE_ENABLED: u32 = 1;
}
impl<A: Addr + Default> Default for MiConditionalBatchBufferEnd<A> {
fn default() -> Self {
MiConditionalBatchBufferEnd {
dword_length: 2,
compare_mask_mode: Default::default(),
compare_semaphore: 0,
use_global_gtt: Default::default(),
mi_command_opcode: 54,
command_type: 0,
compare_data_dword: Default::default(),
compare_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiConditionalBatchBufferEnd<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.compare_mask_mode, 19, 19) |
__gen_uint(self.compare_semaphore, 21, 21) |
__gen_uint(self.use_global_gtt.into(), 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.compare_data_dword, 0, 31);
let v2_address = self.compare_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MiConditionalBatchBufferEnd<u64> {
fn from(input: &[u32; 4]) -> Self {
MiConditionalBatchBufferEnd {
dword_length: __gen_unuint(input[0], 0, 7),
compare_mask_mode: __gen_unuint(input[0], 19, 19),
compare_semaphore: __gen_unuint(input[0], 21, 21),
use_global_gtt: __gen_unuint(input[0], 22, 22) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
compare_data_dword: __gen_unuint(input[1], 0, 31),
compare_address: (__gen_unuint(input[2], 3, 31) as u64) << 3 |
(__gen_unuint(input[3], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for MiConditionalBatchBufferEnd<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MiCopyMemMem<A: Addr + Default> {
pub dword_length: u32,
pub use_global_gtt_destination: bool,
pub use_global_gtt_source: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
pub destination_memory_address: A,
pub source_memory_address: A,
}
impl<A: Addr + Default> MiCopyMemMem<A> {
pub const DWORD_LENGTH: u32 = 5;
}
impl<A: Addr + Default> Default for MiCopyMemMem<A> {
fn default() -> Self {
MiCopyMemMem {
dword_length: 3,
use_global_gtt_destination: Default::default(),
use_global_gtt_source: Default::default(),
mi_command_opcode: 46,
command_type: 0,
destination_memory_address: Default::default(),
source_memory_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiCopyMemMem<A> {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.use_global_gtt_destination.into(), 21, 21) |
__gen_uint(self.use_global_gtt_source.into(), 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.destination_memory_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
let v3_address = self.source_memory_address.combine(0);
out[3] = v3_address as u32;
out[4] = (v3_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for MiCopyMemMem<u64> {
fn from(input: &[u32; 5]) -> Self {
MiCopyMemMem {
dword_length: __gen_unuint(input[0], 0, 7),
use_global_gtt_destination: __gen_unuint(input[0], 21, 21) != 0,
use_global_gtt_source: __gen_unuint(input[0], 22, 22) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
destination_memory_address: (__gen_unuint(input[1], 2, 31) as u64) << 2 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
source_memory_address: (__gen_unuint(input[3], 2, 31) as u64) << 2 |
(__gen_unuint(input[4], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for MiCopyMemMem<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct MiDisplayFlip<A: Addr + Default> {
pub dword_length: u32,
pub display_plane_select: u32,
pub async_flip_indicator: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
pub tile_parameter: u32,
pub display_buffer_pitch: u32,
pub stereoscopic_3d_mode: bool,
pub flip_type: u32,
pub vrr_master_flip: u32,
pub display_buffer_base_address: A,
pub left_eye_display_buffer_base_address: A,
}
impl<A: Addr + Default> MiDisplayFlip<A> {
pub const DWORD_LENGTH: u32 = 4;
pub const ASYNC_FLIP: u32 = 1;
pub const DISPLAY_PLANE_1: u32 = 0;
pub const DISPLAY_PLANE_10: u32 = 10;
pub const DISPLAY_PLANE_11: u32 = 11;
pub const DISPLAY_PLANE_12: u32 = 12;
pub const DISPLAY_PLANE_2: u32 = 1;
pub const DISPLAY_PLANE_3: u32 = 2;
pub const DISPLAY_PLANE_4: u32 = 4;
pub const DISPLAY_PLANE_5: u32 = 5;
pub const DISPLAY_PLANE_6: u32 = 6;
pub const DISPLAY_PLANE_7: u32 = 7;
pub const DISPLAY_PLANE_8: u32 = 8;
pub const DISPLAY_PLANE_9: u32 = 9;
pub const STEREO_3D_FLIP: u32 = 2;
pub const SYNC_FLIP: u32 = 0;
}
impl<A: Addr + Default> Default for MiDisplayFlip<A> {
fn default() -> Self {
MiDisplayFlip {
dword_length: 1,
display_plane_select: Default::default(),
async_flip_indicator: Default::default(),
mi_command_opcode: 20,
command_type: 0,
tile_parameter: Default::default(),
display_buffer_pitch: Default::default(),
stereoscopic_3d_mode: Default::default(),
flip_type: Default::default(),
vrr_master_flip: Default::default(),
display_buffer_base_address: Default::default(),
left_eye_display_buffer_base_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiDisplayFlip<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.display_plane_select, 8, 12) |
__gen_uint(self.async_flip_indicator.into(), 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.tile_parameter, 0, 2) |
__gen_uint(self.display_buffer_pitch, 6, 15) |
__gen_uint(self.stereoscopic_3d_mode.into(), 31, 31);
let v2 = __gen_uint(self.flip_type, 0, 1) |
__gen_uint(self.vrr_master_flip, 11, 11);
let v2_address = self.display_buffer_base_address.combine(v2);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
let v3_address = self.left_eye_display_buffer_base_address.combine(0);
out[3] = v3_address as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MiDisplayFlip<u64> {
fn from(input: &[u32; 4]) -> Self {
MiDisplayFlip {
dword_length: __gen_unuint(input[0], 0, 7),
display_plane_select: __gen_unuint(input[0], 8, 12),
async_flip_indicator: __gen_unuint(input[0], 22, 22) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
tile_parameter: __gen_unuint(input[1], 0, 2),
display_buffer_pitch: __gen_unuint(input[1], 6, 15),
stereoscopic_3d_mode: __gen_unuint(input[1], 31, 31) != 0,
flip_type: __gen_unuint(input[2], 0, 1),
vrr_master_flip: __gen_unuint(input[2], 11, 11),
display_buffer_base_address: (__gen_unuint(input[2], 12, 31) as u64) << 12,
left_eye_display_buffer_base_address: (__gen_unuint(input[3], 12, 31) as u64) << 12,
}
}
}
impl Deserialize for MiDisplayFlip<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MiFlushDw<A: Addr + Default> {
pub dword_length: u32,
pub video_pipeline_cache_invalidate: bool,
pub notify_enable: bool,
pub flush_llc: bool,
pub post_sync_operation: u32,
pub tlb_invalidate: bool,
pub store_data_index: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub destination_address_type: u32,
pub address: A,
pub immediate_data: u64,
}
impl<A: Addr + Default> MiFlushDw<A> {
pub const DWORD_LENGTH: u32 = 5;
pub const GGTT: u32 = 1;
pub const PPGTT: u32 = 0;
}
impl<A: Addr + Default> Default for MiFlushDw<A> {
fn default() -> Self {
MiFlushDw {
dword_length: Default::default(),
video_pipeline_cache_invalidate: Default::default(),
notify_enable: Default::default(),
flush_llc: Default::default(),
post_sync_operation: Default::default(),
tlb_invalidate: Default::default(),
store_data_index: Default::default(),
mi_command_opcode: 38,
command_type: 0,
destination_address_type: Default::default(),
address: Default::default(),
immediate_data: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiFlushDw<A> {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 5) |
__gen_uint(self.video_pipeline_cache_invalidate.into(), 7, 7) |
__gen_uint(self.notify_enable.into(), 8, 8) |
__gen_uint(self.flush_llc.into(), 9, 9) |
__gen_uint(self.post_sync_operation, 14, 15) |
__gen_uint(self.tlb_invalidate.into(), 18, 18) |
__gen_uint(self.store_data_index, 21, 21) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.destination_address_type, 2, 2);
let v1_address = self.address.combine(v1);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.immediate_data as u32, 0, 31);
out[4] = __gen_uint((self.immediate_data >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for MiFlushDw<u64> {
fn from(input: &[u32; 5]) -> Self {
MiFlushDw {
dword_length: __gen_unuint(input[0], 0, 5),
video_pipeline_cache_invalidate: __gen_unuint(input[0], 7, 7) != 0,
notify_enable: __gen_unuint(input[0], 8, 8) != 0,
flush_llc: __gen_unuint(input[0], 9, 9) != 0,
post_sync_operation: __gen_unuint(input[0], 14, 15),
tlb_invalidate: __gen_unuint(input[0], 18, 18) != 0,
store_data_index: __gen_unuint(input[0], 21, 21),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
destination_address_type: __gen_unuint(input[1], 2, 2),
address: (__gen_unuint(input[1], 3, 31) as u64) << 3 |
(__gen_unuint(input[2], 0, 15) as u64) << 32,
immediate_data: (__gen_unuint(input[3], 0, 31) as u64) |
(__gen_unuint(input[4], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for MiFlushDw<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct MiForceWakeup {
pub dword_length: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub force_media_awake: u32,
pub force_render_awake: u32,
pub mask_bits: u32,
}
impl MiForceWakeup {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for MiForceWakeup {
fn default() -> Self {
MiForceWakeup {
dword_length: 0,
mi_command_opcode: 29,
command_type: 0,
force_media_awake: Default::default(),
force_render_awake: Default::default(),
mask_bits: Default::default(),
}
}
}
impl Serialize for MiForceWakeup {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.force_media_awake, 0, 0) |
__gen_uint(self.force_render_awake, 1, 1) |
__gen_uint(self.mask_bits, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MiForceWakeup {
fn from(input: &[u32; 2]) -> Self {
MiForceWakeup {
dword_length: __gen_unuint(input[0], 0, 7),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
force_media_awake: __gen_unuint(input[1], 0, 0),
force_render_awake: __gen_unuint(input[1], 1, 1),
mask_bits: __gen_unuint(input[1], 16, 31),
}
}
}
impl Deserialize for MiForceWakeup {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MiLoadRegisterImm {
pub dword_length: u32,
pub byte_write_disables: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub register_offset: u64,
pub data_dword: u32,
}
impl MiLoadRegisterImm {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for MiLoadRegisterImm {
fn default() -> Self {
MiLoadRegisterImm {
dword_length: 1,
byte_write_disables: Default::default(),
mi_command_opcode: 34,
command_type: 0,
register_offset: Default::default(),
data_dword: Default::default(),
}
}
}
impl Serialize for MiLoadRegisterImm {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.byte_write_disables, 8, 11) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.register_offset as u32, 2, 22);
out[2] = __gen_uint(self.data_dword, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for MiLoadRegisterImm {
fn from(input: &[u32; 3]) -> Self {
MiLoadRegisterImm {
dword_length: __gen_unuint(input[0], 0, 7),
byte_write_disables: __gen_unuint(input[0], 8, 11),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
register_offset: (__gen_unuint(input[1], 2, 22) as u64) << 2,
data_dword: __gen_unuint(input[2], 0, 31),
}
}
}
impl Deserialize for MiLoadRegisterImm {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct MiLoadRegisterMem<A: Addr + Default> {
pub dword_length: u32,
pub async_mode_enable: bool,
pub use_global_gtt: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
pub register_address: u64,
pub memory_address: A,
}
impl<A: Addr + Default> MiLoadRegisterMem<A> {
pub const DWORD_LENGTH: u32 = 4;
}
impl<A: Addr + Default> Default for MiLoadRegisterMem<A> {
fn default() -> Self {
MiLoadRegisterMem {
dword_length: 2,
async_mode_enable: Default::default(),
use_global_gtt: Default::default(),
mi_command_opcode: 41,
command_type: 0,
register_address: Default::default(),
memory_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiLoadRegisterMem<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.async_mode_enable.into(), 21, 21) |
__gen_uint(self.use_global_gtt.into(), 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.register_address as u32, 2, 22);
let v2_address = self.memory_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MiLoadRegisterMem<u64> {
fn from(input: &[u32; 4]) -> Self {
MiLoadRegisterMem {
dword_length: __gen_unuint(input[0], 0, 7),
async_mode_enable: __gen_unuint(input[0], 21, 21) != 0,
use_global_gtt: __gen_unuint(input[0], 22, 22) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
register_address: (__gen_unuint(input[1], 2, 22) as u64) << 2,
memory_address: (__gen_unuint(input[2], 2, 31) as u64) << 2 |
(__gen_unuint(input[3], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for MiLoadRegisterMem<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MiLoadRegisterReg {
pub dword_length: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub source_register_address: u64,
pub destination_register_address: u64,
}
impl MiLoadRegisterReg {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for MiLoadRegisterReg {
fn default() -> Self {
MiLoadRegisterReg {
dword_length: 1,
mi_command_opcode: 42,
command_type: 0,
source_register_address: Default::default(),
destination_register_address: Default::default(),
}
}
}
impl Serialize for MiLoadRegisterReg {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.source_register_address as u32, 2, 22);
out[2] = __gen_offset(self.destination_register_address as u32, 2, 22);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for MiLoadRegisterReg {
fn from(input: &[u32; 3]) -> Self {
MiLoadRegisterReg {
dword_length: __gen_unuint(input[0], 0, 7),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
source_register_address: (__gen_unuint(input[1], 2, 22) as u64) << 2,
destination_register_address: (__gen_unuint(input[2], 2, 22) as u64) << 2,
}
}
}
impl Deserialize for MiLoadRegisterReg {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct MiLoadScanLinesExcl {
pub dword_length: u32,
pub display_plane_select: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub end_scan_line_number: u32,
pub start_scan_line_number: u32,
}
impl MiLoadScanLinesExcl {
pub const DWORD_LENGTH: u32 = 2;
pub const DISPLAY_PLANE_A: u32 = 0;
pub const DISPLAY_PLANE_B: u32 = 1;
pub const DISPLAY_PLANE_C: u32 = 4;
}
impl Default for MiLoadScanLinesExcl {
fn default() -> Self {
MiLoadScanLinesExcl {
dword_length: 0,
display_plane_select: Default::default(),
mi_command_opcode: 19,
command_type: 0,
end_scan_line_number: Default::default(),
start_scan_line_number: Default::default(),
}
}
}
impl Serialize for MiLoadScanLinesExcl {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 5) |
__gen_uint(self.display_plane_select, 19, 21) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.end_scan_line_number, 0, 12) |
__gen_uint(self.start_scan_line_number, 16, 28);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MiLoadScanLinesExcl {
fn from(input: &[u32; 2]) -> Self {
MiLoadScanLinesExcl {
dword_length: __gen_unuint(input[0], 0, 5),
display_plane_select: __gen_unuint(input[0], 19, 21),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
end_scan_line_number: __gen_unuint(input[1], 0, 12),
start_scan_line_number: __gen_unuint(input[1], 16, 28),
}
}
}
impl Deserialize for MiLoadScanLinesExcl {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MiLoadScanLinesIncl {
pub dword_length: u32,
pub scan_line_event_done_forward: u32,
pub display_plane_select: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub end_scan_line_number: u32,
pub start_scan_line_number: u32,
}
impl MiLoadScanLinesIncl {
pub const DWORD_LENGTH: u32 = 2;
pub const DISPLAY_PLANE_1_A: u32 = 0;
pub const DISPLAY_PLANE_1_B: u32 = 1;
pub const DISPLAY_PLANE_1_C: u32 = 4;
}
impl Default for MiLoadScanLinesIncl {
fn default() -> Self {
MiLoadScanLinesIncl {
dword_length: 0,
scan_line_event_done_forward: Default::default(),
display_plane_select: Default::default(),
mi_command_opcode: 18,
command_type: 0,
end_scan_line_number: Default::default(),
start_scan_line_number: Default::default(),
}
}
}
impl Serialize for MiLoadScanLinesIncl {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 5) |
__gen_uint(self.scan_line_event_done_forward, 17, 18) |
__gen_uint(self.display_plane_select, 19, 21) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.end_scan_line_number, 0, 12) |
__gen_uint(self.start_scan_line_number, 16, 28);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MiLoadScanLinesIncl {
fn from(input: &[u32; 2]) -> Self {
MiLoadScanLinesIncl {
dword_length: __gen_unuint(input[0], 0, 5),
scan_line_event_done_forward: __gen_unuint(input[0], 17, 18),
display_plane_select: __gen_unuint(input[0], 19, 21),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
end_scan_line_number: __gen_unuint(input[1], 0, 12),
start_scan_line_number: __gen_unuint(input[1], 16, 28),
}
}
}
impl Deserialize for MiLoadScanLinesIncl {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MiMath {
pub dword_length: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiMath {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiMath {
fn default() -> Self {
MiMath {
dword_length: 0,
mi_command_opcode: 26,
command_type: 0,
}
}
}
impl Serialize for MiMath {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiMath {
fn from(input: &[u32; 1]) -> Self {
MiMath {
dword_length: __gen_unuint(input[0], 0, 7),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiMath {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiMathAluInstruction {
pub operand_2: u32,
pub operand_1: u32,
pub alu_opcode: u32,
}
impl MiMathAluInstruction {
pub const DWORD_LENGTH: u32 = 1;
pub const ACCU: u32 = 0x31;
pub const ADD: u32 = 0x100;
pub const AND: u32 = 0x102;
pub const CF: u32 = 0x33;
pub const LOAD: u32 = 0x080;
pub const LOAD0: u32 = 0x081;
pub const LOAD1: u32 = 0x481;
pub const LOADINV: u32 = 0x480;
pub const NOOP: u32 = 0x000;
pub const OR: u32 = 0x103;
pub const REG0: u32 = 0x00;
pub const REG1: u32 = 0x01;
pub const REG10: u32 = 0x0a;
pub const REG11: u32 = 0x0b;
pub const REG12: u32 = 0x0c;
pub const REG13: u32 = 0x0d;
pub const REG14: u32 = 0x0e;
pub const REG15: u32 = 0x0f;
pub const REG2: u32 = 0x02;
pub const REG3: u32 = 0x03;
pub const REG4: u32 = 0x04;
pub const REG5: u32 = 0x05;
pub const REG6: u32 = 0x06;
pub const REG7: u32 = 0x07;
pub const REG8: u32 = 0x08;
pub const REG9: u32 = 0x09;
pub const SRCA: u32 = 0x20;
pub const SRCB: u32 = 0x21;
pub const STORE: u32 = 0x180;
pub const STOREINV: u32 = 0x580;
pub const SUB: u32 = 0x101;
pub const XOR: u32 = 0x104;
pub const ZF: u32 = 0x32;
}
impl Default for MiMathAluInstruction {
fn default() -> Self {
MiMathAluInstruction {
operand_2: Default::default(),
operand_1: Default::default(),
alu_opcode: Default::default(),
}
}
}
impl Serialize for MiMathAluInstruction {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.operand_2, 0, 9) |
__gen_uint(self.operand_1, 10, 19) |
__gen_uint(self.alu_opcode, 20, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiMathAluInstruction {
fn from(input: &[u32; 1]) -> Self {
MiMathAluInstruction {
operand_2: __gen_unuint(input[0], 0, 9),
operand_1: __gen_unuint(input[0], 10, 19),
alu_opcode: __gen_unuint(input[0], 20, 31),
}
}
}
impl Deserialize for MiMathAluInstruction {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiNoop {
pub identification_number: u32,
pub identification_number_register_write_enable: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiNoop {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiNoop {
fn default() -> Self {
MiNoop {
identification_number: Default::default(),
identification_number_register_write_enable: Default::default(),
mi_command_opcode: 0,
command_type: 0,
}
}
}
impl Serialize for MiNoop {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.identification_number, 0, 21) |
__gen_uint(self.identification_number_register_write_enable.into(), 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiNoop {
fn from(input: &[u32; 1]) -> Self {
MiNoop {
identification_number: __gen_unuint(input[0], 0, 21),
identification_number_register_write_enable: __gen_unuint(input[0], 22, 22) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiNoop {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiPredicate {
pub compare_operation: u32,
pub combine_operation: u32,
pub load_operation: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiPredicate {
pub const DWORD_LENGTH: u32 = 1;
pub const AND: u32 = 1;
pub const DELTAS_EQUAL: u32 = 3;
pub const FALSE: u32 = 1;
pub const KEEP: u32 = 0;
pub const LOAD: u32 = 2;
pub const LOADINV: u32 = 3;
pub const OR: u32 = 2;
pub const SET: u32 = 0;
pub const SRCS_EQUAL: u32 = 2;
pub const TRUE: u32 = 0;
pub const XOR: u32 = 3;
}
impl Default for MiPredicate {
fn default() -> Self {
MiPredicate {
compare_operation: Default::default(),
combine_operation: Default::default(),
load_operation: Default::default(),
mi_command_opcode: 12,
command_type: 0,
}
}
}
impl Serialize for MiPredicate {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.compare_operation, 0, 1) |
__gen_uint(self.combine_operation, 3, 4) |
__gen_uint(self.load_operation, 6, 7) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiPredicate {
fn from(input: &[u32; 1]) -> Self {
MiPredicate {
compare_operation: __gen_unuint(input[0], 0, 1),
combine_operation: __gen_unuint(input[0], 3, 4),
load_operation: __gen_unuint(input[0], 6, 7),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiPredicate {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiReportHead {
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiReportHead {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiReportHead {
fn default() -> Self {
MiReportHead {
mi_command_opcode: 7,
command_type: 0,
}
}
}
impl Serialize for MiReportHead {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiReportHead {
fn from(input: &[u32; 1]) -> Self {
MiReportHead {
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiReportHead {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiReportPerfCount<A: Addr + Default> {
pub dword_length: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub use_global_gtt: bool,
pub core_mode_enable: u32,
pub memory_address: A,
pub report_id: u32,
}
impl<A: Addr + Default> MiReportPerfCount<A> {
pub const DWORD_LENGTH: u32 = 4;
}
impl<A: Addr + Default> Default for MiReportPerfCount<A> {
fn default() -> Self {
MiReportPerfCount {
dword_length: 2,
mi_command_opcode: 40,
command_type: 0,
use_global_gtt: Default::default(),
core_mode_enable: Default::default(),
memory_address: Default::default(),
report_id: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiReportPerfCount<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 5) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.use_global_gtt.into(), 0, 0) |
__gen_uint(self.core_mode_enable, 4, 4);
let v1_address = self.memory_address.combine(v1);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.report_id, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MiReportPerfCount<u64> {
fn from(input: &[u32; 4]) -> Self {
MiReportPerfCount {
dword_length: __gen_unuint(input[0], 0, 5),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
use_global_gtt: __gen_unuint(input[1], 0, 0) != 0,
core_mode_enable: __gen_unuint(input[1], 4, 4),
memory_address: (__gen_unuint(input[1], 6, 31) as u64) << 6 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
report_id: __gen_unuint(input[3], 0, 31),
}
}
}
impl Deserialize for MiReportPerfCount<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MiRsContext {
pub resource_streamer_save: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiRsContext {
pub const DWORD_LENGTH: u32 = 1;
pub const RESTORE: u32 = 0;
pub const SAVE: u32 = 1;
}
impl Default for MiRsContext {
fn default() -> Self {
MiRsContext {
resource_streamer_save: Default::default(),
mi_command_opcode: 15,
command_type: 0,
}
}
}
impl Serialize for MiRsContext {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.resource_streamer_save, 0, 0) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiRsContext {
fn from(input: &[u32; 1]) -> Self {
MiRsContext {
resource_streamer_save: __gen_unuint(input[0], 0, 0),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiRsContext {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiRsControl {
pub resource_streamer_control: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiRsControl {
pub const DWORD_LENGTH: u32 = 1;
pub const START: u32 = 1;
pub const STOP: u32 = 0;
}
impl Default for MiRsControl {
fn default() -> Self {
MiRsControl {
resource_streamer_control: Default::default(),
mi_command_opcode: 6,
command_type: 0,
}
}
}
impl Serialize for MiRsControl {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.resource_streamer_control, 0, 0) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiRsControl {
fn from(input: &[u32; 1]) -> Self {
MiRsControl {
resource_streamer_control: __gen_unuint(input[0], 0, 0),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiRsControl {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiRsStoreDataImm<A: Addr + Default> {
pub dword_length: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub core_mode_enable: u32,
pub destination_address: A,
pub data_dword_0: u32,
}
impl<A: Addr + Default> MiRsStoreDataImm<A> {
pub const DWORD_LENGTH: u32 = 4;
}
impl<A: Addr + Default> Default for MiRsStoreDataImm<A> {
fn default() -> Self {
MiRsStoreDataImm {
dword_length: 2,
mi_command_opcode: 43,
command_type: 0,
core_mode_enable: Default::default(),
destination_address: Default::default(),
data_dword_0: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiRsStoreDataImm<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.core_mode_enable, 0, 0);
let v1_address = self.destination_address.combine(v1);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.data_dword_0, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MiRsStoreDataImm<u64> {
fn from(input: &[u32; 4]) -> Self {
MiRsStoreDataImm {
dword_length: __gen_unuint(input[0], 0, 7),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
core_mode_enable: __gen_unuint(input[1], 0, 0),
destination_address: (__gen_unuint(input[1], 2, 31) as u64) << 2 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
data_dword_0: __gen_unuint(input[3], 0, 31),
}
}
}
impl Deserialize for MiRsStoreDataImm<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MiSemaphoreSignal {
pub dword_length: u32,
pub target_engine_select: u32,
pub post_sync_operation: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
pub target_context_id: u32,
}
impl MiSemaphoreSignal {
pub const DWORD_LENGTH: u32 = 2;
pub const BCS: u32 = 2;
pub const RCS: u32 = 0;
pub const VCS0: u32 = 1;
pub const VCS1: u32 = 4;
pub const VECS: u32 = 3;
}
impl Default for MiSemaphoreSignal {
fn default() -> Self {
MiSemaphoreSignal {
dword_length: 0,
target_engine_select: Default::default(),
post_sync_operation: Default::default(),
mi_command_opcode: 27,
command_type: 0,
target_context_id: Default::default(),
}
}
}
impl Serialize for MiSemaphoreSignal {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.target_engine_select, 15, 17) |
__gen_uint(self.post_sync_operation.into(), 21, 21) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.target_context_id, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MiSemaphoreSignal {
fn from(input: &[u32; 2]) -> Self {
MiSemaphoreSignal {
dword_length: __gen_unuint(input[0], 0, 7),
target_engine_select: __gen_unuint(input[0], 15, 17),
post_sync_operation: __gen_unuint(input[0], 21, 21) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
target_context_id: __gen_unuint(input[1], 0, 31),
}
}
}
impl Deserialize for MiSemaphoreSignal {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MiSemaphoreWait<A: Addr + Default> {
pub dword_length: u32,
pub compare_operation: u32,
pub wait_mode: u32,
pub register_poll_mode: bool,
pub memory_type: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub semaphore_data_dword: u32,
pub semaphore_address: A,
}
impl<A: Addr + Default> MiSemaphoreWait<A> {
pub const DWORD_LENGTH: u32 = 4;
pub const GLOBAL_GRAPHICS_ADDRESS: u32 = 1;
pub const PER_PROCESS_GRAPHICS_ADDRESS: u32 = 0;
pub const POLLING_MODE: u32 = 1;
pub const SAD_EQUAL_SDD: u32 = 4;
pub const SAD_GREATER_THAN_OR_EQUAL_SDD: u32 = 1;
pub const SAD_GREATER_THAN_SDD: u32 = 0;
pub const SAD_LESS_THAN_OR_EQUAL_SDD: u32 = 3;
pub const SAD_LESS_THAN_SDD: u32 = 2;
pub const SAD_NOT_EQUAL_SDD: u32 = 5;
pub const SIGNAL_MODE: u32 = 0;
}
impl<A: Addr + Default> Default for MiSemaphoreWait<A> {
fn default() -> Self {
MiSemaphoreWait {
dword_length: 2,
compare_operation: Default::default(),
wait_mode: Default::default(),
register_poll_mode: Default::default(),
memory_type: Default::default(),
mi_command_opcode: 28,
command_type: 0,
semaphore_data_dword: Default::default(),
semaphore_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiSemaphoreWait<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.compare_operation, 12, 14) |
__gen_uint(self.wait_mode, 15, 15) |
__gen_uint(self.register_poll_mode.into(), 16, 16) |
__gen_uint(self.memory_type, 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.semaphore_data_dword, 0, 31);
let v2_address = self.semaphore_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MiSemaphoreWait<u64> {
fn from(input: &[u32; 4]) -> Self {
MiSemaphoreWait {
dword_length: __gen_unuint(input[0], 0, 7),
compare_operation: __gen_unuint(input[0], 12, 14),
wait_mode: __gen_unuint(input[0], 15, 15),
register_poll_mode: __gen_unuint(input[0], 16, 16) != 0,
memory_type: __gen_unuint(input[0], 22, 22),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
semaphore_data_dword: __gen_unuint(input[1], 0, 31),
semaphore_address: (__gen_unuint(input[2], 2, 31) as u64) << 2 |
(__gen_unuint(input[3], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for MiSemaphoreWait<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MiSetContext<A: Addr + Default> {
pub dword_length: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub restore_inhibit: u32,
pub force_restore: u32,
pub resource_streamer_state_restore_enable: bool,
pub resource_streamer_state_save_enable: bool,
pub core_mode_enable: bool,
pub reserved_must_be_1: u32,
pub logical_context_address: A,
}
impl<A: Addr + Default> MiSetContext<A> {
pub const DWORD_LENGTH: u32 = 2;
}
impl<A: Addr + Default> Default for MiSetContext<A> {
fn default() -> Self {
MiSetContext {
dword_length: 0,
mi_command_opcode: 24,
command_type: 0,
restore_inhibit: Default::default(),
force_restore: Default::default(),
resource_streamer_state_restore_enable: Default::default(),
resource_streamer_state_save_enable: Default::default(),
core_mode_enable: Default::default(),
reserved_must_be_1: Default::default(),
logical_context_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiSetContext<A> {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.restore_inhibit, 0, 0) |
__gen_uint(self.force_restore, 1, 1) |
__gen_uint(self.resource_streamer_state_restore_enable.into(), 2, 2) |
__gen_uint(self.resource_streamer_state_save_enable.into(), 3, 3) |
__gen_uint(self.core_mode_enable.into(), 4, 4) |
__gen_uint(self.reserved_must_be_1, 8, 8);
let v1_address = self.logical_context_address.combine(v1);
out[1] = v1_address as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MiSetContext<u64> {
fn from(input: &[u32; 2]) -> Self {
MiSetContext {
dword_length: __gen_unuint(input[0], 0, 7),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
restore_inhibit: __gen_unuint(input[1], 0, 0),
force_restore: __gen_unuint(input[1], 1, 1),
resource_streamer_state_restore_enable: __gen_unuint(input[1], 2, 2) != 0,
resource_streamer_state_save_enable: __gen_unuint(input[1], 3, 3) != 0,
core_mode_enable: __gen_unuint(input[1], 4, 4) != 0,
reserved_must_be_1: __gen_unuint(input[1], 8, 8),
logical_context_address: (__gen_unuint(input[1], 12, 31) as u64) << 12,
}
}
}
impl Deserialize for MiSetContext<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MiSetPredicate {
pub predicate_enable: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiSetPredicate {
pub const DWORD_LENGTH: u32 = 1;
pub const NOOP_ALWAYS: u32 = 15;
pub const NOOP_NEVER: u32 = 0;
pub const NOOP_ON_RESULT2_CLEAR: u32 = 1;
pub const NOOP_ON_RESULT2_SET: u32 = 2;
pub const NOOP_ON_RESULT_CLEAR: u32 = 3;
pub const NOOP_ON_RESULT_SET: u32 = 4;
}
impl Default for MiSetPredicate {
fn default() -> Self {
MiSetPredicate {
predicate_enable: Default::default(),
mi_command_opcode: 1,
command_type: 0,
}
}
}
impl Serialize for MiSetPredicate {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.predicate_enable, 0, 3) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiSetPredicate {
fn from(input: &[u32; 1]) -> Self {
MiSetPredicate {
predicate_enable: __gen_unuint(input[0], 0, 3),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiSetPredicate {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiStoreDataImm<A: Addr + Default> {
pub dword_length: u32,
pub store_qword: u32,
pub use_global_gtt: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
pub core_mode_enable: u32,
pub address: A,
pub immediate_data: u64,
}
impl<A: Addr + Default> MiStoreDataImm<A> {
pub const DWORD_LENGTH: u32 = 5;
}
impl<A: Addr + Default> Default for MiStoreDataImm<A> {
fn default() -> Self {
MiStoreDataImm {
dword_length: 2,
store_qword: Default::default(),
use_global_gtt: Default::default(),
mi_command_opcode: 32,
command_type: 0,
core_mode_enable: Default::default(),
address: Default::default(),
immediate_data: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiStoreDataImm<A> {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 9) |
__gen_uint(self.store_qword, 21, 21) |
__gen_uint(self.use_global_gtt.into(), 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.core_mode_enable, 0, 0);
let v1_address = self.address.combine(v1);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.immediate_data as u32, 0, 31);
out[4] = __gen_uint((self.immediate_data >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for MiStoreDataImm<u64> {
fn from(input: &[u32; 5]) -> Self {
MiStoreDataImm {
dword_length: __gen_unuint(input[0], 0, 9),
store_qword: __gen_unuint(input[0], 21, 21),
use_global_gtt: __gen_unuint(input[0], 22, 22) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
core_mode_enable: __gen_unuint(input[1], 0, 0),
address: (__gen_unuint(input[1], 2, 31) as u64) << 2 |
(__gen_unuint(input[2], 0, 15) as u64) << 32,
immediate_data: (__gen_unuint(input[3], 0, 31) as u64) |
(__gen_unuint(input[4], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for MiStoreDataImm<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct MiStoreDataIndex {
pub dword_length: u32,
pub use_per_process_hardware_status_page: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub offset: u32,
pub data_dword_0: u32,
pub data_dword_1: u32,
}
impl MiStoreDataIndex {
pub const DWORD_LENGTH: u32 = 4;
}
impl Default for MiStoreDataIndex {
fn default() -> Self {
MiStoreDataIndex {
dword_length: 1,
use_per_process_hardware_status_page: Default::default(),
mi_command_opcode: 33,
command_type: 0,
offset: Default::default(),
data_dword_0: Default::default(),
data_dword_1: Default::default(),
}
}
}
impl Serialize for MiStoreDataIndex {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.use_per_process_hardware_status_page, 21, 21) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.offset, 2, 11);
out[2] = __gen_uint(self.data_dword_0, 0, 31);
out[3] = __gen_uint(self.data_dword_1, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MiStoreDataIndex {
fn from(input: &[u32; 4]) -> Self {
MiStoreDataIndex {
dword_length: __gen_unuint(input[0], 0, 7),
use_per_process_hardware_status_page: __gen_unuint(input[0], 21, 21),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
offset: __gen_unuint(input[1], 2, 11),
data_dword_0: __gen_unuint(input[2], 0, 31),
data_dword_1: __gen_unuint(input[3], 0, 31),
}
}
}
impl Deserialize for MiStoreDataIndex {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MiStoreRegisterMem<A: Addr + Default> {
pub dword_length: u32,
pub predicate_enable: bool,
pub use_global_gtt: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
pub register_address: u64,
pub memory_address: A,
}
impl<A: Addr + Default> MiStoreRegisterMem<A> {
pub const DWORD_LENGTH: u32 = 4;
}
impl<A: Addr + Default> Default for MiStoreRegisterMem<A> {
fn default() -> Self {
MiStoreRegisterMem {
dword_length: 2,
predicate_enable: Default::default(),
use_global_gtt: Default::default(),
mi_command_opcode: 36,
command_type: 0,
register_address: Default::default(),
memory_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiStoreRegisterMem<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.predicate_enable.into(), 21, 21) |
__gen_uint(self.use_global_gtt.into(), 22, 22) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.register_address as u32, 2, 22);
let v2_address = self.memory_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for MiStoreRegisterMem<u64> {
fn from(input: &[u32; 4]) -> Self {
MiStoreRegisterMem {
dword_length: __gen_unuint(input[0], 0, 7),
predicate_enable: __gen_unuint(input[0], 21, 21) != 0,
use_global_gtt: __gen_unuint(input[0], 22, 22) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
register_address: (__gen_unuint(input[1], 2, 22) as u64) << 2,
memory_address: (__gen_unuint(input[2], 2, 31) as u64) << 2 |
(__gen_unuint(input[3], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for MiStoreRegisterMem<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct MiSuspendFlush {
pub suspend_flush: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiSuspendFlush {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiSuspendFlush {
fn default() -> Self {
MiSuspendFlush {
suspend_flush: Default::default(),
mi_command_opcode: 11,
command_type: 0,
}
}
}
impl Serialize for MiSuspendFlush {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.suspend_flush.into(), 0, 0) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiSuspendFlush {
fn from(input: &[u32; 1]) -> Self {
MiSuspendFlush {
suspend_flush: __gen_unuint(input[0], 0, 0) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiSuspendFlush {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiTopologyFilter {
pub topology_filter_value: _3dPrimTopoType,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiTopologyFilter {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiTopologyFilter {
fn default() -> Self {
MiTopologyFilter {
topology_filter_value: Default::default(),
mi_command_opcode: 13,
command_type: 0,
}
}
}
impl Serialize for MiTopologyFilter {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.topology_filter_value.into(), 0, 5) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiTopologyFilter {
fn from(input: &[u32; 1]) -> Self {
MiTopologyFilter {
topology_filter_value: (__gen_unuint(input[0], 0, 5)).into(),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiTopologyFilter {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiUpdateGtt<A: Addr + Default> {
pub dword_length: u32,
pub mi_command_opcode: u32,
pub command_type: u32,
pub entry_address: A,
}
impl<A: Addr + Default> MiUpdateGtt<A> {
pub const DWORD_LENGTH: u32 = 2;
}
impl<A: Addr + Default> Default for MiUpdateGtt<A> {
fn default() -> Self {
MiUpdateGtt {
dword_length: 0,
mi_command_opcode: 35,
command_type: 0,
entry_address: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for MiUpdateGtt<A> {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 9) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
let v1_address = self.entry_address.combine(0);
out[1] = v1_address as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for MiUpdateGtt<u64> {
fn from(input: &[u32; 2]) -> Self {
MiUpdateGtt {
dword_length: __gen_unuint(input[0], 0, 9),
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
entry_address: (__gen_unuint(input[1], 12, 31) as u64) << 12,
}
}
}
impl Deserialize for MiUpdateGtt<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct MiUserInterrupt {
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiUserInterrupt {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiUserInterrupt {
fn default() -> Self {
MiUserInterrupt {
mi_command_opcode: 2,
command_type: 0,
}
}
}
impl Serialize for MiUserInterrupt {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiUserInterrupt {
fn from(input: &[u32; 1]) -> Self {
MiUserInterrupt {
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiUserInterrupt {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct MiWaitForEvent {
pub display_plnae_1_a_scan_line_wait_enable: bool,
pub display_plane_1_flip_pending_wait_enable: bool,
pub display_plane_4_flip_pending_wait_enable: bool,
pub display_plane_1_a_vertical_blank_wait_enable: bool,
pub display_plane_7_flip_pending_wait_enable: bool,
pub display_plane_8_flip_pending_wait_enable: bool,
pub display_plane_1_b_scan_line_wait_enable: bool,
pub display_plane_2_flip_pending_wait_enable: bool,
pub display_plane_5_flip_pending_wait_enable: bool,
pub display_plane_1_b_vertical_blank_wait_enable: bool,
pub display_plane_1_c_scan_line_wait_enable: bool,
pub display_plane_3_flip_pending_wait_enable: bool,
pub display_plane_9_flip_pending_wait_enable: bool,
pub display_plane_10_flip_pending_wait_enable: bool,
pub display_plane_11_flip_pending_wait_enable: bool,
pub display_plane_12_flip_pending_wait_enable: bool,
pub display_plane_6_flip_pending_wait_enable: bool,
pub display_plane_1_c_vertical_blank_wait_enable: bool,
pub mi_command_opcode: u32,
pub command_type: u32,
}
impl MiWaitForEvent {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for MiWaitForEvent {
fn default() -> Self {
MiWaitForEvent {
display_plnae_1_a_scan_line_wait_enable: Default::default(),
display_plane_1_flip_pending_wait_enable: Default::default(),
display_plane_4_flip_pending_wait_enable: Default::default(),
display_plane_1_a_vertical_blank_wait_enable: Default::default(),
display_plane_7_flip_pending_wait_enable: Default::default(),
display_plane_8_flip_pending_wait_enable: Default::default(),
display_plane_1_b_scan_line_wait_enable: Default::default(),
display_plane_2_flip_pending_wait_enable: Default::default(),
display_plane_5_flip_pending_wait_enable: Default::default(),
display_plane_1_b_vertical_blank_wait_enable: Default::default(),
display_plane_1_c_scan_line_wait_enable: Default::default(),
display_plane_3_flip_pending_wait_enable: Default::default(),
display_plane_9_flip_pending_wait_enable: Default::default(),
display_plane_10_flip_pending_wait_enable: Default::default(),
display_plane_11_flip_pending_wait_enable: Default::default(),
display_plane_12_flip_pending_wait_enable: Default::default(),
display_plane_6_flip_pending_wait_enable: Default::default(),
display_plane_1_c_vertical_blank_wait_enable: Default::default(),
mi_command_opcode: 3,
command_type: 0,
}
}
}
impl Serialize for MiWaitForEvent {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.display_plnae_1_a_scan_line_wait_enable.into(), 0, 0) |
__gen_uint(self.display_plane_1_flip_pending_wait_enable.into(), 1, 1) |
__gen_uint(self.display_plane_4_flip_pending_wait_enable.into(), 2, 2) |
__gen_uint(self.display_plane_1_a_vertical_blank_wait_enable.into(), 3, 3) |
__gen_uint(self.display_plane_7_flip_pending_wait_enable.into(), 6, 6) |
__gen_uint(self.display_plane_8_flip_pending_wait_enable.into(), 7, 7) |
__gen_uint(self.display_plane_1_b_scan_line_wait_enable.into(), 8, 8) |
__gen_uint(self.display_plane_2_flip_pending_wait_enable.into(), 9, 9) |
__gen_uint(self.display_plane_5_flip_pending_wait_enable.into(), 10, 10) |
__gen_uint(self.display_plane_1_b_vertical_blank_wait_enable.into(), 11, 11) |
__gen_uint(self.display_plane_1_c_scan_line_wait_enable.into(), 14, 14) |
__gen_uint(self.display_plane_3_flip_pending_wait_enable.into(), 15, 15) |
__gen_uint(self.display_plane_9_flip_pending_wait_enable.into(), 16, 16) |
__gen_uint(self.display_plane_10_flip_pending_wait_enable.into(), 17, 17) |
__gen_uint(self.display_plane_11_flip_pending_wait_enable.into(), 18, 18) |
__gen_uint(self.display_plane_12_flip_pending_wait_enable.into(), 19, 19) |
__gen_uint(self.display_plane_6_flip_pending_wait_enable.into(), 20, 20) |
__gen_uint(self.display_plane_1_c_vertical_blank_wait_enable.into(), 21, 21) |
__gen_uint(self.mi_command_opcode, 23, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for MiWaitForEvent {
fn from(input: &[u32; 1]) -> Self {
MiWaitForEvent {
display_plnae_1_a_scan_line_wait_enable: __gen_unuint(input[0], 0, 0) != 0,
display_plane_1_flip_pending_wait_enable: __gen_unuint(input[0], 1, 1) != 0,
display_plane_4_flip_pending_wait_enable: __gen_unuint(input[0], 2, 2) != 0,
display_plane_1_a_vertical_blank_wait_enable: __gen_unuint(input[0], 3, 3) != 0,
display_plane_7_flip_pending_wait_enable: __gen_unuint(input[0], 6, 6) != 0,
display_plane_8_flip_pending_wait_enable: __gen_unuint(input[0], 7, 7) != 0,
display_plane_1_b_scan_line_wait_enable: __gen_unuint(input[0], 8, 8) != 0,
display_plane_2_flip_pending_wait_enable: __gen_unuint(input[0], 9, 9) != 0,
display_plane_5_flip_pending_wait_enable: __gen_unuint(input[0], 10, 10) != 0,
display_plane_1_b_vertical_blank_wait_enable: __gen_unuint(input[0], 11, 11) != 0,
display_plane_1_c_scan_line_wait_enable: __gen_unuint(input[0], 14, 14) != 0,
display_plane_3_flip_pending_wait_enable: __gen_unuint(input[0], 15, 15) != 0,
display_plane_9_flip_pending_wait_enable: __gen_unuint(input[0], 16, 16) != 0,
display_plane_10_flip_pending_wait_enable: __gen_unuint(input[0], 17, 17) != 0,
display_plane_11_flip_pending_wait_enable: __gen_unuint(input[0], 18, 18) != 0,
display_plane_12_flip_pending_wait_enable: __gen_unuint(input[0], 19, 19) != 0,
display_plane_6_flip_pending_wait_enable: __gen_unuint(input[0], 20, 20) != 0,
display_plane_1_c_vertical_blank_wait_enable: __gen_unuint(input[0], 21, 21) != 0,
mi_command_opcode: __gen_unuint(input[0], 23, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for MiWaitForEvent {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct PaletteEntry {
pub blue: u32,
pub green: u32,
pub red: u32,
pub alpha: u32,
}
impl PaletteEntry {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for PaletteEntry {
fn default() -> Self {
PaletteEntry {
blue: Default::default(),
green: Default::default(),
red: Default::default(),
alpha: Default::default(),
}
}
}
impl Serialize for PaletteEntry {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.blue, 0, 7) |
__gen_uint(self.green, 8, 15) |
__gen_uint(self.red, 16, 23) |
__gen_uint(self.alpha, 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for PaletteEntry {
fn from(input: &[u32; 1]) -> Self {
PaletteEntry {
blue: __gen_unuint(input[0], 0, 7),
green: __gen_unuint(input[0], 8, 15),
red: __gen_unuint(input[0], 16, 23),
alpha: __gen_unuint(input[0], 24, 31),
}
}
}
impl Deserialize for PaletteEntry {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct Perfcnt1 {
pub value: u64,
pub event_selection: u32,
pub counter_clear: bool,
pub edge_detect: bool,
pub overflow_enable: bool,
pub counter_enable: bool,
}
impl Perfcnt1 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x91b8;
}
impl Default for Perfcnt1 {
fn default() -> Self {
Perfcnt1 {
value: Default::default(),
event_selection: Default::default(),
counter_clear: Default::default(),
edge_detect: Default::default(),
overflow_enable: Default::default(),
counter_enable: Default::default(),
}
}
}
impl Serialize for Perfcnt1 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.value as u32, 0, 31);
out[1] = __gen_uint((self.value >> 32) as u32, 0, 11) |
__gen_uint(self.event_selection, 20, 27) |
__gen_uint(self.counter_clear.into(), 28, 28) |
__gen_uint(self.edge_detect.into(), 29, 29) |
__gen_uint(self.overflow_enable.into(), 30, 30) |
__gen_uint(self.counter_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for Perfcnt1 {
fn from(input: &[u32; 2]) -> Self {
Perfcnt1 {
value: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 11) as u64) << 32,
event_selection: __gen_unuint(input[1], 20, 27),
counter_clear: __gen_unuint(input[1], 28, 28) != 0,
edge_detect: __gen_unuint(input[1], 29, 29) != 0,
overflow_enable: __gen_unuint(input[1], 30, 30) != 0,
counter_enable: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for Perfcnt1 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct Perfcnt2 {
pub value: u64,
pub event_selection: u32,
pub counter_clear: bool,
pub edge_detect: bool,
pub overflow_enable: bool,
pub counter_enable: bool,
}
impl Perfcnt2 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x91c0;
}
impl Default for Perfcnt2 {
fn default() -> Self {
Perfcnt2 {
value: Default::default(),
event_selection: Default::default(),
counter_clear: Default::default(),
edge_detect: Default::default(),
overflow_enable: Default::default(),
counter_enable: Default::default(),
}
}
}
impl Serialize for Perfcnt2 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.value as u32, 0, 31);
out[1] = __gen_uint((self.value >> 32) as u32, 0, 11) |
__gen_uint(self.event_selection, 20, 27) |
__gen_uint(self.counter_clear.into(), 28, 28) |
__gen_uint(self.edge_detect.into(), 29, 29) |
__gen_uint(self.overflow_enable.into(), 30, 30) |
__gen_uint(self.counter_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for Perfcnt2 {
fn from(input: &[u32; 2]) -> Self {
Perfcnt2 {
value: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 11) as u64) << 32,
event_selection: __gen_unuint(input[1], 20, 27),
counter_clear: __gen_unuint(input[1], 28, 28) != 0,
edge_detect: __gen_unuint(input[1], 29, 29) != 0,
overflow_enable: __gen_unuint(input[1], 30, 30) != 0,
counter_enable: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for Perfcnt2 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct PipeControl<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub depth_cache_flush_enable: bool,
pub stall_at_pixel_scoreboard: bool,
pub state_cache_invalidation_enable: bool,
pub constant_cache_invalidation_enable: bool,
pub vf_cache_invalidation_enable: bool,
pub dc_flush_enable: bool,
pub pipe_control_flush_enable: bool,
pub notify_enable: bool,
pub indirect_state_pointers_disable: bool,
pub texture_cache_invalidation_enable: bool,
pub instruction_cache_invalidate_enable: bool,
pub render_target_cache_flush_enable: bool,
pub depth_stall_enable: bool,
pub post_sync_operation: u32,
pub generic_media_state_clear: bool,
pub psd_sync_enable: bool,
pub tlb_invalidate: bool,
pub global_snapshot_count_reset: bool,
pub command_streamer_stall_enable: bool,
pub store_data_index: u32,
pub lri_post_sync_operation: u32,
pub destination_address_type: u32,
pub flush_llc: bool,
pub address: A,
pub immediate_data: u64,
}
impl<A: Addr + Default> PipeControl<A> {
pub const DWORD_LENGTH: u32 = 6;
pub const GGTT: u32 = 1;
pub const MMIO_WRITE_IMMEDIATE_DATA: u32 = 1;
pub const NO_LRI_OPERATION: u32 = 0;
pub const NO_WRITE: u32 = 0;
pub const PPGTT: u32 = 0;
pub const WRITE_IMMEDIATE_DATA: u32 = 1;
pub const WRITE_PS_DEPTH_COUNT: u32 = 2;
pub const WRITE_TIMESTAMP: u32 = 3;
}
impl<A: Addr + Default> Default for PipeControl<A> {
fn default() -> Self {
PipeControl {
dword_length: 4,
_3d_command_sub_opcode: 0,
_3d_command_opcode: 2,
command_subtype: 3,
command_type: 3,
depth_cache_flush_enable: Default::default(),
stall_at_pixel_scoreboard: Default::default(),
state_cache_invalidation_enable: Default::default(),
constant_cache_invalidation_enable: Default::default(),
vf_cache_invalidation_enable: Default::default(),
dc_flush_enable: Default::default(),
pipe_control_flush_enable: Default::default(),
notify_enable: Default::default(),
indirect_state_pointers_disable: Default::default(),
texture_cache_invalidation_enable: Default::default(),
instruction_cache_invalidate_enable: Default::default(),
render_target_cache_flush_enable: Default::default(),
depth_stall_enable: Default::default(),
post_sync_operation: Default::default(),
generic_media_state_clear: Default::default(),
psd_sync_enable: Default::default(),
tlb_invalidate: Default::default(),
global_snapshot_count_reset: Default::default(),
command_streamer_stall_enable: Default::default(),
store_data_index: Default::default(),
lri_post_sync_operation: Default::default(),
destination_address_type: Default::default(),
flush_llc: Default::default(),
address: Default::default(),
immediate_data: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for PipeControl<A> {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.depth_cache_flush_enable.into(), 0, 0) |
__gen_uint(self.stall_at_pixel_scoreboard.into(), 1, 1) |
__gen_uint(self.state_cache_invalidation_enable.into(), 2, 2) |
__gen_uint(self.constant_cache_invalidation_enable.into(), 3, 3) |
__gen_uint(self.vf_cache_invalidation_enable.into(), 4, 4) |
__gen_uint(self.dc_flush_enable.into(), 5, 5) |
__gen_uint(self.pipe_control_flush_enable.into(), 7, 7) |
__gen_uint(self.notify_enable.into(), 8, 8) |
__gen_uint(self.indirect_state_pointers_disable.into(), 9, 9) |
__gen_uint(self.texture_cache_invalidation_enable.into(), 10, 10) |
__gen_uint(self.instruction_cache_invalidate_enable.into(), 11, 11) |
__gen_uint(self.render_target_cache_flush_enable.into(), 12, 12) |
__gen_uint(self.depth_stall_enable.into(), 13, 13) |
__gen_uint(self.post_sync_operation, 14, 15) |
__gen_uint(self.generic_media_state_clear.into(), 16, 16) |
__gen_uint(self.psd_sync_enable.into(), 17, 17) |
__gen_uint(self.tlb_invalidate.into(), 18, 18) |
__gen_uint(self.global_snapshot_count_reset.into(), 19, 19) |
__gen_uint(self.command_streamer_stall_enable.into(), 20, 20) |
__gen_uint(self.store_data_index, 21, 21) |
__gen_uint(self.lri_post_sync_operation, 23, 23) |
__gen_uint(self.destination_address_type, 24, 24) |
__gen_uint(self.flush_llc.into(), 26, 26);
let v2_address = self.address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
out[4] = __gen_uint(self.immediate_data as u32, 0, 31);
out[5] = __gen_uint((self.immediate_data >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for PipeControl<u64> {
fn from(input: &[u32; 6]) -> Self {
PipeControl {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
depth_cache_flush_enable: __gen_unuint(input[1], 0, 0) != 0,
stall_at_pixel_scoreboard: __gen_unuint(input[1], 1, 1) != 0,
state_cache_invalidation_enable: __gen_unuint(input[1], 2, 2) != 0,
constant_cache_invalidation_enable: __gen_unuint(input[1], 3, 3) != 0,
vf_cache_invalidation_enable: __gen_unuint(input[1], 4, 4) != 0,
dc_flush_enable: __gen_unuint(input[1], 5, 5) != 0,
pipe_control_flush_enable: __gen_unuint(input[1], 7, 7) != 0,
notify_enable: __gen_unuint(input[1], 8, 8) != 0,
indirect_state_pointers_disable: __gen_unuint(input[1], 9, 9) != 0,
texture_cache_invalidation_enable: __gen_unuint(input[1], 10, 10) != 0,
instruction_cache_invalidate_enable: __gen_unuint(input[1], 11, 11) != 0,
render_target_cache_flush_enable: __gen_unuint(input[1], 12, 12) != 0,
depth_stall_enable: __gen_unuint(input[1], 13, 13) != 0,
post_sync_operation: __gen_unuint(input[1], 14, 15),
generic_media_state_clear: __gen_unuint(input[1], 16, 16) != 0,
psd_sync_enable: __gen_unuint(input[1], 17, 17) != 0,
tlb_invalidate: __gen_unuint(input[1], 18, 18) != 0,
global_snapshot_count_reset: __gen_unuint(input[1], 19, 19) != 0,
command_streamer_stall_enable: __gen_unuint(input[1], 20, 20) != 0,
store_data_index: __gen_unuint(input[1], 21, 21),
lri_post_sync_operation: __gen_unuint(input[1], 23, 23),
destination_address_type: __gen_unuint(input[1], 24, 24),
flush_llc: __gen_unuint(input[1], 26, 26) != 0,
address: (__gen_unuint(input[2], 2, 31) as u64) << 2 |
(__gen_unuint(input[3], 0, 15) as u64) << 32,
immediate_data: (__gen_unuint(input[4], 0, 31) as u64) |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for PipeControl<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct PipelineSelect {
pub pipeline_selection: u32,
pub media_sampler_dop_clock_gate_enable: bool,
pub force_media_awake: bool,
pub mask_bits: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
}
impl PipelineSelect {
pub const DWORD_LENGTH: u32 = 1;
pub const GPGPU: u32 = 2;
pub const MEDIA: u32 = 1;
pub const _3D: u32 = 0;
}
impl Default for PipelineSelect {
fn default() -> Self {
PipelineSelect {
pipeline_selection: Default::default(),
media_sampler_dop_clock_gate_enable: Default::default(),
force_media_awake: Default::default(),
mask_bits: Default::default(),
_3d_command_sub_opcode: 4,
_3d_command_opcode: 1,
command_subtype: 1,
command_type: 3,
}
}
}
impl Serialize for PipelineSelect {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.pipeline_selection, 0, 1) |
__gen_uint(self.media_sampler_dop_clock_gate_enable.into(), 4, 4) |
__gen_uint(self.force_media_awake.into(), 5, 5) |
__gen_uint(self.mask_bits, 8, 15) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for PipelineSelect {
fn from(input: &[u32; 1]) -> Self {
PipelineSelect {
pipeline_selection: __gen_unuint(input[0], 0, 1),
media_sampler_dop_clock_gate_enable: __gen_unuint(input[0], 4, 4) != 0,
force_media_awake: __gen_unuint(input[0], 5, 5) != 0,
mask_bits: __gen_unuint(input[0], 8, 15),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for PipelineSelect {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct PsInvocationCount {
pub ps_invocation_count_report: u64,
}
impl PsInvocationCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2348;
}
impl Default for PsInvocationCount {
fn default() -> Self {
PsInvocationCount {
ps_invocation_count_report: Default::default(),
}
}
}
impl Serialize for PsInvocationCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.ps_invocation_count_report as u32, 0, 31);
out[1] = __gen_uint((self.ps_invocation_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for PsInvocationCount {
fn from(input: &[u32; 2]) -> Self {
PsInvocationCount {
ps_invocation_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for PsInvocationCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct RenderSurfaceState<A: Addr + Default> {
pub cube_face_enable_positive_z: bool,
pub cube_face_enable_negative_z: bool,
pub cube_face_enable_positive_y: bool,
pub cube_face_enable_negative_y: bool,
pub cube_face_enable_positive_x: bool,
pub cube_face_enable_negative_x: bool,
pub media_boundary_pixel_mode: u32,
pub render_cache_read_write_mode: u32,
pub sampler_l2_bypass_mode_disable: bool,
pub vertical_line_stride_offset: u32,
pub vertical_line_stride: u32,
pub tile_mode: u32,
pub surface_horizontal_alignment: u32,
pub surface_vertical_alignment: u32,
pub surface_format: u32,
pub surface_array: bool,
pub surface_type: u32,
pub surface_qpitch: u32,
pub base_mip_level: f32,
pub mocs: u32,
pub width: u32,
pub height: u32,
pub surface_pitch: u32,
pub tile_address_mapping_mode: u32,
pub depth: u32,
pub multisample_position_palette_index: u32,
pub number_of_multisamples: u32,
pub multisampled_surface_storage_format: u32,
pub render_target_view_extent: u32,
pub minimum_array_element: u32,
pub render_target_and_sample_unorm_rotation: u32,
pub mip_count_lod: u32,
pub surface_min_lod: u32,
pub mip_tail_start_lod: u32,
pub coherency_type: u32,
pub tiled_resource_mode: u32,
pub ewa_disable_for_cube: bool,
pub y_offset: u32,
pub x_offset: u32,
pub auxiliary_surface_mode: u32,
pub y_offset_for_u_or_uv_plane: u32,
pub auxiliary_surface_pitch: u32,
pub auxiliary_surface_qpitch: u32,
pub x_offset_for_u_or_uv_plane: u32,
pub separate_uv_plane_enable: bool,
pub resource_min_lod: f32,
pub shader_channel_select_alpha: ShaderChannelSelect,
pub shader_channel_select_blue: ShaderChannelSelect,
pub shader_channel_select_green: ShaderChannelSelect,
pub shader_channel_select_red: ShaderChannelSelect,
pub memory_compression_enable: bool,
pub memory_compression_mode: u32,
pub surface_base_address: A,
pub quilt_width: u32,
pub quilt_height: u32,
pub clear_value_address_enable: bool,
pub auxiliary_surface_base_address: A,
pub auxiliary_table_index_for_media_compressed_surface: u32,
pub y_offset_for_v_plane: u32,
pub x_offset_for_v_plane: u32,
pub red_clear_color: i32,
pub clear_value_address: A,
pub green_clear_color: i32,
pub blue_clear_color: i32,
pub alpha_clear_color: i32,
}
impl<A: Addr + Default> RenderSurfaceState<A> {
pub const DWORD_LENGTH: u32 = 16;
pub const AUX_APPEND: u32 = 2;
pub const AUX_CCS_D: u32 = 1;
pub const AUX_CCS_E: u32 = 5;
pub const AUX_HIZ: u32 = 3;
pub const AUX_NONE: u32 = 0;
pub const GEN10: u32 = 1;
pub const GEN9: u32 = 0;
pub const GPU_COHERENT: u32 = 0;
pub const HALIGN_16: u32 = 3;
pub const HALIGN_4: u32 = 1;
pub const HALIGN_8: u32 = 2;
pub const HORIZONTAL: u32 = 0;
pub const IA_COHERENT: u32 = 1;
pub const INTERLACED_FRAME: u32 = 3;
pub const LINEAR: u32 = 0;
pub const MSFMT_DEPTH_STENCIL: u32 = 1;
pub const MSFMT_MSS: u32 = 0;
pub const MULTISAMPLECOUNT_1: u32 = 0;
pub const MULTISAMPLECOUNT_16: u32 = 4;
pub const MULTISAMPLECOUNT_2: u32 = 1;
pub const MULTISAMPLECOUNT_4: u32 = 2;
pub const MULTISAMPLECOUNT_8: u32 = 3;
pub const NONE: u32 = 0;
pub const NORMAL_MODE: u32 = 0;
pub const PROGRESSIVE_FRAME: u32 = 2;
pub const READ_WRITE_CACHE: u32 = 1;
pub const SURFTYPE_1D: u32 = 0;
pub const SURFTYPE_2D: u32 = 1;
pub const SURFTYPE_3D: u32 = 2;
pub const SURFTYPE_BUFFER: u32 = 4;
pub const SURFTYPE_CUBE: u32 = 3;
pub const SURFTYPE_NULL: u32 = 7;
pub const SURFTYPE_STRBUF: u32 = 5;
pub const TILEYF: u32 = 1;
pub const TILEYS: u32 = 2;
pub const VALIGN_16: u32 = 3;
pub const VALIGN_4: u32 = 1;
pub const VALIGN_8: u32 = 2;
pub const VERTICAL: u32 = 1;
pub const WMAJOR: u32 = 1;
pub const WRITE_ONLY_CACHE: u32 = 0;
pub const XMAJOR: u32 = 2;
pub const YMAJOR: u32 = 3;
pub const _0DEG: u32 = 0;
pub const _180DEG: u32 = 2;
pub const _270DEG: u32 = 3;
pub const _4KB: u32 = 1;
pub const _64KB: u32 = 2;
pub const _90DEG: u32 = 1;
}
impl<A: Addr + Default> Default for RenderSurfaceState<A> {
fn default() -> Self {
RenderSurfaceState {
cube_face_enable_positive_z: Default::default(),
cube_face_enable_negative_z: Default::default(),
cube_face_enable_positive_y: Default::default(),
cube_face_enable_negative_y: Default::default(),
cube_face_enable_positive_x: Default::default(),
cube_face_enable_negative_x: Default::default(),
media_boundary_pixel_mode: Default::default(),
render_cache_read_write_mode: Default::default(),
sampler_l2_bypass_mode_disable: Default::default(),
vertical_line_stride_offset: Default::default(),
vertical_line_stride: Default::default(),
tile_mode: Default::default(),
surface_horizontal_alignment: Default::default(),
surface_vertical_alignment: Default::default(),
surface_format: Default::default(),
surface_array: Default::default(),
surface_type: Default::default(),
surface_qpitch: Default::default(),
base_mip_level: Default::default(),
mocs: Default::default(),
width: Default::default(),
height: Default::default(),
surface_pitch: Default::default(),
tile_address_mapping_mode: Default::default(),
depth: Default::default(),
multisample_position_palette_index: Default::default(),
number_of_multisamples: Default::default(),
multisampled_surface_storage_format: Default::default(),
render_target_view_extent: Default::default(),
minimum_array_element: Default::default(),
render_target_and_sample_unorm_rotation: Default::default(),
mip_count_lod: Default::default(),
surface_min_lod: Default::default(),
mip_tail_start_lod: Default::default(),
coherency_type: Default::default(),
tiled_resource_mode: Default::default(),
ewa_disable_for_cube: Default::default(),
y_offset: Default::default(),
x_offset: Default::default(),
auxiliary_surface_mode: Default::default(),
y_offset_for_u_or_uv_plane: Default::default(),
auxiliary_surface_pitch: Default::default(),
auxiliary_surface_qpitch: Default::default(),
x_offset_for_u_or_uv_plane: Default::default(),
separate_uv_plane_enable: Default::default(),
resource_min_lod: Default::default(),
shader_channel_select_alpha: Default::default(),
shader_channel_select_blue: Default::default(),
shader_channel_select_green: Default::default(),
shader_channel_select_red: Default::default(),
memory_compression_enable: Default::default(),
memory_compression_mode: Default::default(),
surface_base_address: Default::default(),
quilt_width: Default::default(),
quilt_height: Default::default(),
clear_value_address_enable: Default::default(),
auxiliary_surface_base_address: Default::default(),
auxiliary_table_index_for_media_compressed_surface: Default::default(),
y_offset_for_v_plane: Default::default(),
x_offset_for_v_plane: Default::default(),
red_clear_color: Default::default(),
clear_value_address: Default::default(),
green_clear_color: Default::default(),
blue_clear_color: Default::default(),
alpha_clear_color: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for RenderSurfaceState<A> {
type Out = [u32; 16];
fn pack_into(&self, out: &mut [u32; 16]) {
out[0] = __gen_uint(self.cube_face_enable_positive_z.into(), 0, 0) |
__gen_uint(self.cube_face_enable_negative_z.into(), 1, 1) |
__gen_uint(self.cube_face_enable_positive_y.into(), 2, 2) |
__gen_uint(self.cube_face_enable_negative_y.into(), 3, 3) |
__gen_uint(self.cube_face_enable_positive_x.into(), 4, 4) |
__gen_uint(self.cube_face_enable_negative_x.into(), 5, 5) |
__gen_uint(self.media_boundary_pixel_mode, 6, 7) |
__gen_uint(self.render_cache_read_write_mode, 8, 8) |
__gen_uint(self.sampler_l2_bypass_mode_disable.into(), 9, 9) |
__gen_uint(self.vertical_line_stride_offset, 10, 10) |
__gen_uint(self.vertical_line_stride, 11, 11) |
__gen_uint(self.tile_mode, 12, 13) |
__gen_uint(self.surface_horizontal_alignment, 14, 15) |
__gen_uint(self.surface_vertical_alignment, 16, 17) |
__gen_uint(self.surface_format, 18, 27) |
__gen_uint(self.surface_array.into(), 28, 28) |
__gen_uint(self.surface_type, 29, 31);
out[1] = __gen_uint(self.surface_qpitch, 0, 14) |
__gen_ufixed(self.base_mip_level, 19, 23, 1) |
__gen_uint(self.mocs, 24, 30);
out[2] = __gen_uint(self.width, 0, 13) |
__gen_uint(self.height, 16, 29);
out[3] = __gen_uint(self.surface_pitch, 0, 17) |
__gen_uint(self.tile_address_mapping_mode, 20, 20) |
__gen_uint(self.depth, 21, 31);
out[4] = __gen_uint(self.multisample_position_palette_index, 0, 2) |
__gen_uint(self.number_of_multisamples, 3, 5) |
__gen_uint(self.multisampled_surface_storage_format, 6, 6) |
__gen_uint(self.render_target_view_extent, 7, 17) |
__gen_uint(self.minimum_array_element, 18, 28) |
__gen_uint(self.render_target_and_sample_unorm_rotation, 29, 30);
out[5] = __gen_uint(self.mip_count_lod, 0, 3) |
__gen_uint(self.surface_min_lod, 4, 7) |
__gen_uint(self.mip_tail_start_lod, 8, 11) |
__gen_uint(self.coherency_type, 14, 14) |
__gen_uint(self.tiled_resource_mode, 18, 19) |
__gen_uint(self.ewa_disable_for_cube.into(), 20, 20) |
__gen_uint(self.y_offset, 21, 23) |
__gen_uint(self.x_offset, 25, 31);
out[6] = __gen_uint(self.y_offset_for_u_or_uv_plane, 0, 13) |
__gen_uint(self.auxiliary_surface_pitch, 3, 11) |
__gen_uint(self.x_offset_for_u_or_uv_plane, 16, 29) |
__gen_uint(self.separate_uv_plane_enable.into(), 31, 31);
out[7] = __gen_ufixed(self.resource_min_lod, 0, 11, 8) |
__gen_uint(self.shader_channel_select_alpha.into(), 16, 18) |
__gen_uint(self.shader_channel_select_blue.into(), 19, 21) |
__gen_uint(self.shader_channel_select_green.into(), 22, 24) |
__gen_uint(self.shader_channel_select_red.into(), 25, 27) |
__gen_uint(self.memory_compression_enable.into(), 30, 30) |
__gen_uint(self.memory_compression_mode, 31, 31);
let v8_address = self.surface_base_address.combine(0);
out[8] = v8_address as u32;
out[9] = (v8_address >> 32) as u32;
let v10 = __gen_uint(self.quilt_width, 0, 4) |
__gen_uint(self.quilt_height, 5, 9) |
__gen_uint(self.clear_value_address_enable.into(), 10, 10) |
__gen_uint(self.auxiliary_table_index_for_media_compressed_surface, 21, 31);
let v10_address = self.auxiliary_surface_base_address.combine(v10);
out[10] = v10_address as u32;
out[11] = (v10_address >> 32) as u32;
let v12 = __gen_uint(self.red_clear_color as u32, 0, 31);
let v12_address = self.clear_value_address.combine(v12);
out[12] = v12_address as u32;
out[13] = (v12_address >> 32) as u32;
out[14] = __gen_uint(self.blue_clear_color as u32, 0, 31);
out[15] = __gen_uint(self.alpha_clear_color as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 16];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 16] as *const [u8; 64]) })
}
}
impl From<&[u32; 16]> for RenderSurfaceState<u64> {
fn from(input: &[u32; 16]) -> Self {
RenderSurfaceState {
cube_face_enable_positive_z: __gen_unuint(input[0], 0, 0) != 0,
cube_face_enable_negative_z: __gen_unuint(input[0], 1, 1) != 0,
cube_face_enable_positive_y: __gen_unuint(input[0], 2, 2) != 0,
cube_face_enable_negative_y: __gen_unuint(input[0], 3, 3) != 0,
cube_face_enable_positive_x: __gen_unuint(input[0], 4, 4) != 0,
cube_face_enable_negative_x: __gen_unuint(input[0], 5, 5) != 0,
media_boundary_pixel_mode: __gen_unuint(input[0], 6, 7),
render_cache_read_write_mode: __gen_unuint(input[0], 8, 8),
sampler_l2_bypass_mode_disable: __gen_unuint(input[0], 9, 9) != 0,
vertical_line_stride_offset: __gen_unuint(input[0], 10, 10),
vertical_line_stride: __gen_unuint(input[0], 11, 11),
tile_mode: __gen_unuint(input[0], 12, 13),
surface_horizontal_alignment: __gen_unuint(input[0], 14, 15),
surface_vertical_alignment: __gen_unuint(input[0], 16, 17),
surface_format: __gen_unuint(input[0], 18, 27),
surface_array: __gen_unuint(input[0], 28, 28) != 0,
surface_type: __gen_unuint(input[0], 29, 31),
surface_qpitch: __gen_unuint(input[1], 0, 14),
base_mip_level: __gen_unufixed(input[1], 19, 23, 1),
mocs: __gen_unuint(input[1], 24, 30),
width: __gen_unuint(input[2], 0, 13),
height: __gen_unuint(input[2], 16, 29),
surface_pitch: __gen_unuint(input[3], 0, 17),
tile_address_mapping_mode: __gen_unuint(input[3], 20, 20),
depth: __gen_unuint(input[3], 21, 31),
multisample_position_palette_index: __gen_unuint(input[4], 0, 2),
number_of_multisamples: __gen_unuint(input[4], 3, 5),
multisampled_surface_storage_format: __gen_unuint(input[4], 6, 6),
render_target_view_extent: __gen_unuint(input[4], 7, 17),
minimum_array_element: __gen_unuint(input[4], 18, 28),
render_target_and_sample_unorm_rotation: __gen_unuint(input[4], 29, 30),
mip_count_lod: __gen_unuint(input[5], 0, 3),
surface_min_lod: __gen_unuint(input[5], 4, 7),
mip_tail_start_lod: __gen_unuint(input[5], 8, 11),
coherency_type: __gen_unuint(input[5], 14, 14),
tiled_resource_mode: __gen_unuint(input[5], 18, 19),
ewa_disable_for_cube: __gen_unuint(input[5], 20, 20) != 0,
y_offset: __gen_unuint(input[5], 21, 23),
x_offset: __gen_unuint(input[5], 25, 31),
auxiliary_surface_mode: __gen_unuint(input[6], 0, 2),
y_offset_for_u_or_uv_plane: __gen_unuint(input[6], 0, 13),
auxiliary_surface_pitch: __gen_unuint(input[6], 3, 11),
auxiliary_surface_qpitch: __gen_unuint(input[6], 16, 30),
x_offset_for_u_or_uv_plane: __gen_unuint(input[6], 16, 29),
separate_uv_plane_enable: __gen_unuint(input[6], 31, 31) != 0,
resource_min_lod: __gen_unufixed(input[7], 0, 11, 8),
shader_channel_select_alpha: (__gen_unuint(input[7], 16, 18)).into(),
shader_channel_select_blue: (__gen_unuint(input[7], 19, 21)).into(),
shader_channel_select_green: (__gen_unuint(input[7], 22, 24)).into(),
shader_channel_select_red: (__gen_unuint(input[7], 25, 27)).into(),
memory_compression_enable: __gen_unuint(input[7], 30, 30) != 0,
memory_compression_mode: __gen_unuint(input[7], 31, 31),
surface_base_address: (__gen_unuint(input[8], 0, 31) as u64) |
(__gen_unuint(input[9], 0, 31) as u64) << 32,
quilt_width: __gen_unuint(input[10], 0, 4),
quilt_height: __gen_unuint(input[10], 5, 9),
clear_value_address_enable: __gen_unuint(input[10], 10, 10) != 0,
auxiliary_surface_base_address: (__gen_unuint(input[10], 12, 31) as u64) << 12 |
(__gen_unuint(input[11], 0, 31) as u64) << 32,
auxiliary_table_index_for_media_compressed_surface: __gen_unuint(input[10], 21, 31),
y_offset_for_v_plane: __gen_unuint(input[11], 0, 13),
x_offset_for_v_plane: __gen_unuint(input[11], 16, 29),
red_clear_color: (__gen_unuint(input[12], 0, 31)) as i32,
clear_value_address: (__gen_unuint(input[12], 6, 31) as u64) << 6 |
(__gen_unuint(input[13], 0, 15) as u64) << 32,
green_clear_color: (__gen_unuint(input[13], 0, 31)) as i32,
blue_clear_color: (__gen_unuint(input[14], 0, 31)) as i32,
alpha_clear_color: (__gen_unuint(input[15], 0, 31)) as i32,
}
}
}
impl Deserialize for RenderSurfaceState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 16];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 16] as *mut [u8; 64]) })?;
Ok((&input).into())
}
}
pub struct Roundingprecisiontable3Bits {
pub rounding_precision: u32,
}
impl Roundingprecisiontable3Bits {
pub const DWORD_LENGTH: u32 = 1;
pub const _1_16: u32 = 0;
pub const _2_16: u32 = 1;
pub const _3_16: u32 = 2;
pub const _4_16: u32 = 3;
pub const _5_16: u32 = 4;
pub const _6_16: u32 = 5;
pub const _7_16: u32 = 6;
pub const _8_16: u32 = 7;
}
impl Default for Roundingprecisiontable3Bits {
fn default() -> Self {
Roundingprecisiontable3Bits {
rounding_precision: Default::default(),
}
}
}
impl Serialize for Roundingprecisiontable3Bits {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.rounding_precision, 0, 2);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for Roundingprecisiontable3Bits {
fn from(input: &[u32; 1]) -> Self {
Roundingprecisiontable3Bits {
rounding_precision: __gen_unuint(input[0], 0, 2),
}
}
}
impl Deserialize for Roundingprecisiontable3Bits {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct RowInstdone {
pub bc_done: bool,
pub psd_done: bool,
pub dapr_done: bool,
pub tdl_done: bool,
pub ic_done: bool,
pub ma0_done: bool,
pub eu00_done_ss0: bool,
pub eu01_done_ss0: bool,
pub eu02_done_ss0: bool,
pub eu03_done_ss0: bool,
pub eu10_done_ss0: bool,
pub eu11_done_ss0: bool,
pub eu12_done_ss0: bool,
pub eu13_done_ss0: bool,
pub ma1_done_ss0: bool,
}
impl RowInstdone {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0xe164;
}
impl Default for RowInstdone {
fn default() -> Self {
RowInstdone {
bc_done: Default::default(),
psd_done: Default::default(),
dapr_done: Default::default(),
tdl_done: Default::default(),
ic_done: Default::default(),
ma0_done: Default::default(),
eu00_done_ss0: Default::default(),
eu01_done_ss0: Default::default(),
eu02_done_ss0: Default::default(),
eu03_done_ss0: Default::default(),
eu10_done_ss0: Default::default(),
eu11_done_ss0: Default::default(),
eu12_done_ss0: Default::default(),
eu13_done_ss0: Default::default(),
ma1_done_ss0: Default::default(),
}
}
}
impl Serialize for RowInstdone {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.bc_done.into(), 0, 0) |
__gen_uint(self.psd_done.into(), 1, 1) |
__gen_uint(self.dapr_done.into(), 3, 3) |
__gen_uint(self.tdl_done.into(), 6, 6) |
__gen_uint(self.ic_done.into(), 12, 12) |
__gen_uint(self.ma0_done.into(), 15, 15) |
__gen_uint(self.eu00_done_ss0.into(), 16, 16) |
__gen_uint(self.eu01_done_ss0.into(), 17, 17) |
__gen_uint(self.eu02_done_ss0.into(), 18, 18) |
__gen_uint(self.eu03_done_ss0.into(), 19, 19) |
__gen_uint(self.eu10_done_ss0.into(), 21, 21) |
__gen_uint(self.eu11_done_ss0.into(), 22, 22) |
__gen_uint(self.eu12_done_ss0.into(), 23, 23) |
__gen_uint(self.eu13_done_ss0.into(), 24, 24) |
__gen_uint(self.ma1_done_ss0.into(), 26, 26);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for RowInstdone {
fn from(input: &[u32; 1]) -> Self {
RowInstdone {
bc_done: __gen_unuint(input[0], 0, 0) != 0,
psd_done: __gen_unuint(input[0], 1, 1) != 0,
dapr_done: __gen_unuint(input[0], 3, 3) != 0,
tdl_done: __gen_unuint(input[0], 6, 6) != 0,
ic_done: __gen_unuint(input[0], 12, 12) != 0,
ma0_done: __gen_unuint(input[0], 15, 15) != 0,
eu00_done_ss0: __gen_unuint(input[0], 16, 16) != 0,
eu01_done_ss0: __gen_unuint(input[0], 17, 17) != 0,
eu02_done_ss0: __gen_unuint(input[0], 18, 18) != 0,
eu03_done_ss0: __gen_unuint(input[0], 19, 19) != 0,
eu10_done_ss0: __gen_unuint(input[0], 21, 21) != 0,
eu11_done_ss0: __gen_unuint(input[0], 22, 22) != 0,
eu12_done_ss0: __gen_unuint(input[0], 23, 23) != 0,
eu13_done_ss0: __gen_unuint(input[0], 24, 24) != 0,
ma1_done_ss0: __gen_unuint(input[0], 26, 26) != 0,
}
}
}
impl Deserialize for RowInstdone {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct Rpstat0 {
pub previous_gt_frequency: u32,
pub current_gt_frequency: u32,
}
impl Rpstat0 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0xa01c;
}
impl Default for Rpstat0 {
fn default() -> Self {
Rpstat0 {
previous_gt_frequency: Default::default(),
current_gt_frequency: Default::default(),
}
}
}
impl Serialize for Rpstat0 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.previous_gt_frequency, 0, 8) |
__gen_uint(self.current_gt_frequency, 23, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for Rpstat0 {
fn from(input: &[u32; 1]) -> Self {
Rpstat0 {
previous_gt_frequency: __gen_unuint(input[0], 0, 8),
current_gt_frequency: __gen_unuint(input[0], 23, 31),
}
}
}
impl Deserialize for Rpstat0 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct SamplerBorderColorState {
pub border_color_float_red: f32,
pub border_color_32bit_red: u32,
pub border_color_float_green: f32,
pub border_color_32bit_green: u32,
pub border_color_float_blue: f32,
pub border_color_32bit_blue: u32,
pub border_color_float_alpha: f32,
pub border_color_32bit_alpha: u32,
}
impl SamplerBorderColorState {
pub const DWORD_LENGTH: u32 = 4;
}
impl Default for SamplerBorderColorState {
fn default() -> Self {
SamplerBorderColorState {
border_color_float_red: Default::default(),
border_color_32bit_red: Default::default(),
border_color_float_green: Default::default(),
border_color_32bit_green: Default::default(),
border_color_float_blue: Default::default(),
border_color_32bit_blue: Default::default(),
border_color_float_alpha: Default::default(),
border_color_32bit_alpha: Default::default(),
}
}
}
impl Serialize for SamplerBorderColorState {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.border_color_32bit_red, 0, 31);
out[1] = __gen_uint(self.border_color_32bit_green, 0, 31);
out[2] = __gen_uint(self.border_color_32bit_blue, 0, 31);
out[3] = __gen_uint(self.border_color_32bit_alpha, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for SamplerBorderColorState {
fn from(input: &[u32; 4]) -> Self {
SamplerBorderColorState {
border_color_float_red: f32::from_bits(input[0]),
border_color_32bit_red: __gen_unuint(input[0], 0, 31),
border_color_float_green: f32::from_bits(input[1]),
border_color_32bit_green: __gen_unuint(input[1], 0, 31),
border_color_float_blue: f32::from_bits(input[2]),
border_color_32bit_blue: __gen_unuint(input[2], 0, 31),
border_color_float_alpha: f32::from_bits(input[3]),
border_color_32bit_alpha: __gen_unuint(input[3], 0, 31),
}
}
}
impl Deserialize for SamplerBorderColorState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct SamplerIndirectStateBorderColor {
pub border_color_red_as_s31: i32,
pub border_color_red_as_u32: u32,
pub border_color_red_as_float: f32,
pub border_color_red_as_u8: u32,
pub border_color_green_as_u8: u32,
pub border_color_blue_as_u8: u32,
pub border_color_alpha_as_u8: u32,
pub border_color_green_as_s31: i32,
pub border_color_green_as_u32: u32,
pub border_color_green_as_float: f32,
pub border_color_blue_as_s31: i32,
pub border_color_blue_as_u32: u32,
pub border_color_blue_as_float: f32,
pub border_color_alpha_as_s31: i32,
pub border_color_alpha_as_u32: u32,
pub border_color_alpha_as_float: f32,
}
impl SamplerIndirectStateBorderColor {
pub const DWORD_LENGTH: u32 = 4;
}
impl Default for SamplerIndirectStateBorderColor {
fn default() -> Self {
SamplerIndirectStateBorderColor {
border_color_red_as_s31: Default::default(),
border_color_red_as_u32: Default::default(),
border_color_red_as_float: Default::default(),
border_color_red_as_u8: Default::default(),
border_color_green_as_u8: Default::default(),
border_color_blue_as_u8: Default::default(),
border_color_alpha_as_u8: Default::default(),
border_color_green_as_s31: Default::default(),
border_color_green_as_u32: Default::default(),
border_color_green_as_float: Default::default(),
border_color_blue_as_s31: Default::default(),
border_color_blue_as_u32: Default::default(),
border_color_blue_as_float: Default::default(),
border_color_alpha_as_s31: Default::default(),
border_color_alpha_as_u32: Default::default(),
border_color_alpha_as_float: Default::default(),
}
}
}
impl Serialize for SamplerIndirectStateBorderColor {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.border_color_red_as_u8, 0, 7) |
__gen_uint(self.border_color_green_as_u8, 8, 15) |
__gen_uint(self.border_color_blue_as_u8, 16, 23) |
__gen_uint(self.border_color_alpha_as_u8, 24, 31);
out[1] = self.border_color_green_as_float.to_bits();
out[2] = self.border_color_blue_as_float.to_bits();
out[3] = self.border_color_alpha_as_float.to_bits();
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for SamplerIndirectStateBorderColor {
fn from(input: &[u32; 4]) -> Self {
SamplerIndirectStateBorderColor {
border_color_red_as_s31: (__gen_unuint(input[0], 0, 31)) as i32,
border_color_red_as_u32: __gen_unuint(input[0], 0, 31),
border_color_red_as_float: f32::from_bits(input[0]),
border_color_red_as_u8: __gen_unuint(input[0], 0, 7),
border_color_green_as_u8: __gen_unuint(input[0], 8, 15),
border_color_blue_as_u8: __gen_unuint(input[0], 16, 23),
border_color_alpha_as_u8: __gen_unuint(input[0], 24, 31),
border_color_green_as_s31: (__gen_unuint(input[1], 0, 31)) as i32,
border_color_green_as_u32: __gen_unuint(input[1], 0, 31),
border_color_green_as_float: f32::from_bits(input[1]),
border_color_blue_as_s31: (__gen_unuint(input[2], 0, 31)) as i32,
border_color_blue_as_u32: __gen_unuint(input[2], 0, 31),
border_color_blue_as_float: f32::from_bits(input[2]),
border_color_alpha_as_s31: (__gen_unuint(input[3], 0, 31)) as i32,
border_color_alpha_as_u32: __gen_unuint(input[3], 0, 31),
border_color_alpha_as_float: f32::from_bits(input[3]),
}
}
}
impl Deserialize for SamplerIndirectStateBorderColor {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct SamplerInstdone {
pub ime_done: bool,
pub pl0_done: bool,
pub so0_done: bool,
pub dg0_done: bool,
pub ft0_done: bool,
pub dm0_done: bool,
pub sc_done: bool,
pub fl0_done: bool,
pub qc_done: bool,
pub svsm_done: bool,
pub si0_done: bool,
pub mt0_done: bool,
pub avs_done: bool,
pub ief_done: bool,
pub cre_done: bool,
pub svsm_arb_sifm: bool,
pub svsm_arb2: bool,
pub svsm_arb1: bool,
pub svsm_adapter: bool,
pub bdm_done: bool,
}
impl SamplerInstdone {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0xe160;
}
impl Default for SamplerInstdone {
fn default() -> Self {
SamplerInstdone {
ime_done: Default::default(),
pl0_done: Default::default(),
so0_done: Default::default(),
dg0_done: Default::default(),
ft0_done: Default::default(),
dm0_done: Default::default(),
sc_done: Default::default(),
fl0_done: Default::default(),
qc_done: Default::default(),
svsm_done: Default::default(),
si0_done: Default::default(),
mt0_done: Default::default(),
avs_done: Default::default(),
ief_done: Default::default(),
cre_done: Default::default(),
svsm_arb_sifm: Default::default(),
svsm_arb2: Default::default(),
svsm_arb1: Default::default(),
svsm_adapter: Default::default(),
bdm_done: Default::default(),
}
}
}
impl Serialize for SamplerInstdone {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.ime_done.into(), 0, 0) |
__gen_uint(self.pl0_done.into(), 1, 1) |
__gen_uint(self.so0_done.into(), 2, 2) |
__gen_uint(self.dg0_done.into(), 3, 3) |
__gen_uint(self.ft0_done.into(), 4, 4) |
__gen_uint(self.dm0_done.into(), 5, 5) |
__gen_uint(self.sc_done.into(), 6, 6) |
__gen_uint(self.fl0_done.into(), 7, 7) |
__gen_uint(self.qc_done.into(), 8, 8) |
__gen_uint(self.svsm_done.into(), 9, 9) |
__gen_uint(self.si0_done.into(), 10, 10) |
__gen_uint(self.mt0_done.into(), 11, 11) |
__gen_uint(self.avs_done.into(), 12, 12) |
__gen_uint(self.ief_done.into(), 13, 13) |
__gen_uint(self.cre_done.into(), 14, 14) |
__gen_uint(self.svsm_arb_sifm.into(), 15, 15) |
__gen_uint(self.svsm_arb2.into(), 16, 16) |
__gen_uint(self.svsm_arb1.into(), 17, 17) |
__gen_uint(self.svsm_adapter.into(), 18, 18) |
__gen_uint(self.bdm_done.into(), 19, 19);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for SamplerInstdone {
fn from(input: &[u32; 1]) -> Self {
SamplerInstdone {
ime_done: __gen_unuint(input[0], 0, 0) != 0,
pl0_done: __gen_unuint(input[0], 1, 1) != 0,
so0_done: __gen_unuint(input[0], 2, 2) != 0,
dg0_done: __gen_unuint(input[0], 3, 3) != 0,
ft0_done: __gen_unuint(input[0], 4, 4) != 0,
dm0_done: __gen_unuint(input[0], 5, 5) != 0,
sc_done: __gen_unuint(input[0], 6, 6) != 0,
fl0_done: __gen_unuint(input[0], 7, 7) != 0,
qc_done: __gen_unuint(input[0], 8, 8) != 0,
svsm_done: __gen_unuint(input[0], 9, 9) != 0,
si0_done: __gen_unuint(input[0], 10, 10) != 0,
mt0_done: __gen_unuint(input[0], 11, 11) != 0,
avs_done: __gen_unuint(input[0], 12, 12) != 0,
ief_done: __gen_unuint(input[0], 13, 13) != 0,
cre_done: __gen_unuint(input[0], 14, 14) != 0,
svsm_arb_sifm: __gen_unuint(input[0], 15, 15) != 0,
svsm_arb2: __gen_unuint(input[0], 16, 16) != 0,
svsm_arb1: __gen_unuint(input[0], 17, 17) != 0,
svsm_adapter: __gen_unuint(input[0], 18, 18) != 0,
bdm_done: __gen_unuint(input[0], 19, 19) != 0,
}
}
}
impl Deserialize for SamplerInstdone {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct SamplerState {
pub anisotropic_algorithm: u32,
pub texture_lod_bias: f32,
pub min_mode_filter: u32,
pub mag_mode_filter: u32,
pub mip_mode_filter: u32,
pub coarse_lod_quality_mode: u32,
pub lod_preclamp_mode: u32,
pub texture_border_color_mode: u32,
pub sampler_disable: bool,
pub cube_surface_control_mode: u32,
pub shadow_function: u32,
pub chromakey_mode: u32,
pub chromakey_index: u32,
pub chromakey_enable: bool,
pub max_lod: f32,
pub min_lod: f32,
pub lod_clamp_magnification_mode: u32,
pub force_gather4_behavior: bool,
pub border_color_pointer: u64,
pub tcz_address_control_mode: TextureCoordinateMode,
pub tcy_address_control_mode: TextureCoordinateMode,
pub tcx_address_control_mode: TextureCoordinateMode,
pub reduction_type_enable: bool,
pub non_normalized_coordinate_enable: bool,
pub trilinear_filter_quality: u32,
pub r_address_min_filter_rounding_enable: bool,
pub r_address_mag_filter_rounding_enable: bool,
pub v_address_min_filter_rounding_enable: bool,
pub v_address_mag_filter_rounding_enable: bool,
pub u_address_min_filter_rounding_enable: bool,
pub u_address_mag_filter_rounding_enable: bool,
pub maximum_anisotropy: u32,
pub reduction_type: u32,
}
impl SamplerState {
pub const DWORD_LENGTH: u32 = 4;
pub const ANISOTROPIC: u32 = 2;
pub const COMPARISON: u32 = 1;
pub const DX10_OGL: u32 = 0;
pub const DX9: u32 = 1;
pub const EWA_APPROXIMATION: u32 = 1;
pub const FULL: u32 = 0;
pub const HIGH: u32 = 1;
pub const KEYFILTER_KILL_ON_ANY_MATCH: u32 = 0;
pub const KEYFILTER_REPLACE_BLACK: u32 = 1;
pub const LEGACY: u32 = 0;
pub const LOW: u32 = 3;
pub const MAXIMUM: u32 = 3;
pub const MED: u32 = 2;
pub const MINIMUM: u32 = 2;
pub const MIPFILTER: u32 = 1;
pub const MIPNONE: u32 = 0;
pub const MONO: u32 = 6;
pub const NONE: u32 = 0;
pub const OGL: u32 = 2;
pub const OVERRIDE: u32 = 1;
pub const PREFILTEROP_ALWAYS: u32 = 0;
pub const PREFILTEROP_EQUAL: u32 = 3;
pub const PREFILTEROP_GEQUAL: u32 = 7;
pub const PREFILTEROP_GREATER: u32 = 5;
pub const PREFILTEROP_LEQUAL: u32 = 4;
pub const PREFILTEROP_LESS: u32 = 2;
pub const PREFILTEROP_NEVER: u32 = 1;
pub const PREFILTEROP_NOTEQUAL: u32 = 6;
pub const PROGRAMMED: u32 = 0;
pub const RATIO_10_1: u32 = 4;
pub const RATIO_12_1: u32 = 5;
pub const RATIO_14_1: u32 = 6;
pub const RATIO_16_1: u32 = 7;
pub const RATIO_2_1: u32 = 0;
pub const RATIO_4_1: u32 = 1;
pub const RATIO_6_1: u32 = 2;
pub const RATIO_8_1: u32 = 3;
pub const STD_FILTER: u32 = 0;
}
impl Default for SamplerState {
fn default() -> Self {
SamplerState {
anisotropic_algorithm: Default::default(),
texture_lod_bias: Default::default(),
min_mode_filter: Default::default(),
mag_mode_filter: Default::default(),
mip_mode_filter: Default::default(),
coarse_lod_quality_mode: Default::default(),
lod_preclamp_mode: Default::default(),
texture_border_color_mode: Default::default(),
sampler_disable: Default::default(),
cube_surface_control_mode: Default::default(),
shadow_function: Default::default(),
chromakey_mode: Default::default(),
chromakey_index: Default::default(),
chromakey_enable: Default::default(),
max_lod: Default::default(),
min_lod: Default::default(),
lod_clamp_magnification_mode: Default::default(),
force_gather4_behavior: Default::default(),
border_color_pointer: Default::default(),
tcz_address_control_mode: Default::default(),
tcy_address_control_mode: Default::default(),
tcx_address_control_mode: Default::default(),
reduction_type_enable: Default::default(),
non_normalized_coordinate_enable: Default::default(),
trilinear_filter_quality: Default::default(),
r_address_min_filter_rounding_enable: Default::default(),
r_address_mag_filter_rounding_enable: Default::default(),
v_address_min_filter_rounding_enable: Default::default(),
v_address_mag_filter_rounding_enable: Default::default(),
u_address_min_filter_rounding_enable: Default::default(),
u_address_mag_filter_rounding_enable: Default::default(),
maximum_anisotropy: Default::default(),
reduction_type: Default::default(),
}
}
}
impl Serialize for SamplerState {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.anisotropic_algorithm, 0, 0) |
__gen_sfixed(self.texture_lod_bias, 1, 13, 8) |
__gen_uint(self.min_mode_filter, 14, 16) |
__gen_uint(self.mag_mode_filter, 17, 19) |
__gen_uint(self.mip_mode_filter, 20, 21) |
__gen_uint(self.coarse_lod_quality_mode, 22, 26) |
__gen_uint(self.lod_preclamp_mode, 27, 28) |
__gen_uint(self.texture_border_color_mode, 29, 29) |
__gen_uint(self.sampler_disable.into(), 31, 31);
out[1] = __gen_uint(self.cube_surface_control_mode, 0, 0) |
__gen_uint(self.shadow_function, 1, 3) |
__gen_uint(self.chromakey_mode, 4, 4) |
__gen_uint(self.chromakey_index, 5, 6) |
__gen_uint(self.chromakey_enable.into(), 7, 7) |
__gen_ufixed(self.max_lod, 8, 19, 8) |
__gen_ufixed(self.min_lod, 20, 31, 8);
out[2] = __gen_uint(self.lod_clamp_magnification_mode, 0, 0) |
__gen_uint(self.force_gather4_behavior.into(), 5, 5) |
__gen_offset(self.border_color_pointer as u32, 6, 23);
out[3] = __gen_uint(self.tcz_address_control_mode.into(), 0, 2) |
__gen_uint(self.tcy_address_control_mode.into(), 3, 5) |
__gen_uint(self.tcx_address_control_mode.into(), 6, 8) |
__gen_uint(self.reduction_type_enable.into(), 9, 9) |
__gen_uint(self.non_normalized_coordinate_enable.into(), 10, 10) |
__gen_uint(self.trilinear_filter_quality, 11, 12) |
__gen_uint(self.r_address_min_filter_rounding_enable.into(), 13, 13) |
__gen_uint(self.r_address_mag_filter_rounding_enable.into(), 14, 14) |
__gen_uint(self.v_address_min_filter_rounding_enable.into(), 15, 15) |
__gen_uint(self.v_address_mag_filter_rounding_enable.into(), 16, 16) |
__gen_uint(self.u_address_min_filter_rounding_enable.into(), 17, 17) |
__gen_uint(self.u_address_mag_filter_rounding_enable.into(), 18, 18) |
__gen_uint(self.maximum_anisotropy, 19, 21) |
__gen_uint(self.reduction_type, 22, 23);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for SamplerState {
fn from(input: &[u32; 4]) -> Self {
SamplerState {
anisotropic_algorithm: __gen_unuint(input[0], 0, 0),
texture_lod_bias: __gen_unsfixed(input[0], 1, 13, 8),
min_mode_filter: __gen_unuint(input[0], 14, 16),
mag_mode_filter: __gen_unuint(input[0], 17, 19),
mip_mode_filter: __gen_unuint(input[0], 20, 21),
coarse_lod_quality_mode: __gen_unuint(input[0], 22, 26),
lod_preclamp_mode: __gen_unuint(input[0], 27, 28),
texture_border_color_mode: __gen_unuint(input[0], 29, 29),
sampler_disable: __gen_unuint(input[0], 31, 31) != 0,
cube_surface_control_mode: __gen_unuint(input[1], 0, 0),
shadow_function: __gen_unuint(input[1], 1, 3),
chromakey_mode: __gen_unuint(input[1], 4, 4),
chromakey_index: __gen_unuint(input[1], 5, 6),
chromakey_enable: __gen_unuint(input[1], 7, 7) != 0,
max_lod: __gen_unufixed(input[1], 8, 19, 8),
min_lod: __gen_unufixed(input[1], 20, 31, 8),
lod_clamp_magnification_mode: __gen_unuint(input[2], 0, 0),
force_gather4_behavior: __gen_unuint(input[2], 5, 5) != 0,
border_color_pointer: (__gen_unuint(input[2], 6, 23) as u64) << 6,
tcz_address_control_mode: (__gen_unuint(input[3], 0, 2)).into(),
tcy_address_control_mode: (__gen_unuint(input[3], 3, 5)).into(),
tcx_address_control_mode: (__gen_unuint(input[3], 6, 8)).into(),
reduction_type_enable: __gen_unuint(input[3], 9, 9) != 0,
non_normalized_coordinate_enable: __gen_unuint(input[3], 10, 10) != 0,
trilinear_filter_quality: __gen_unuint(input[3], 11, 12),
r_address_min_filter_rounding_enable: __gen_unuint(input[3], 13, 13) != 0,
r_address_mag_filter_rounding_enable: __gen_unuint(input[3], 14, 14) != 0,
v_address_min_filter_rounding_enable: __gen_unuint(input[3], 15, 15) != 0,
v_address_mag_filter_rounding_enable: __gen_unuint(input[3], 16, 16) != 0,
u_address_min_filter_rounding_enable: __gen_unuint(input[3], 17, 17) != 0,
u_address_mag_filter_rounding_enable: __gen_unuint(input[3], 18, 18) != 0,
maximum_anisotropy: __gen_unuint(input[3], 19, 21),
reduction_type: __gen_unuint(input[3], 22, 23),
}
}
}
impl Deserialize for SamplerState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct SamplerState8x8AvsCoefficients {
pub table_0_filter_coefficient: [f32; 4],
pub table_1_filter_coefficient0: [f32; 4],
pub table_1_filter_coefficient1: [f32; 4],
}
impl SamplerState8x8AvsCoefficients {
pub const DWORD_LENGTH: u32 = 8;
}
impl Default for SamplerState8x8AvsCoefficients {
fn default() -> Self {
SamplerState8x8AvsCoefficients {
table_0_filter_coefficient: Default::default(),
table_1_filter_coefficient0: Default::default(),
table_1_filter_coefficient1: Default::default(),
}
}
}
impl Serialize for SamplerState8x8AvsCoefficients {
type Out = [u32; 8];
fn pack_into(&self, out: &mut [u32; 8]) {
out[0] = __gen_sfixed(self.table_1_filter_coefficient0[0], 0, 7, 6) |
__gen_sfixed(self.table_1_filter_coefficient1[0], 8, 15, 6) |
__gen_sfixed(self.table_0_filter_coefficient[2], 16, 23, 6) |
__gen_sfixed(self.table_0_filter_coefficient[3], 24, 31, 6);
out[1] = __gen_sfixed(self.table_1_filter_coefficient0[1], 0, 7, 6) |
__gen_sfixed(self.table_1_filter_coefficient1[1], 8, 15, 6);
out[2] = __gen_sfixed(self.table_1_filter_coefficient0[2], 0, 7, 6) |
__gen_sfixed(self.table_1_filter_coefficient1[2], 8, 15, 6);
out[3] = __gen_sfixed(self.table_1_filter_coefficient0[3], 0, 7, 6) |
__gen_sfixed(self.table_1_filter_coefficient1[3], 8, 15, 6);
out[4] = 0;
out[5] = 0;
out[6] = 0;
out[7] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 8];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 8] as *const [u8; 32]) })
}
}
impl From<&[u32; 8]> for SamplerState8x8AvsCoefficients {
fn from(input: &[u32; 8]) -> Self {
SamplerState8x8AvsCoefficients {
table_0_filter_coefficient: [
__gen_unsfixed(input[0], 0, 7, 6),
__gen_unsfixed(input[0], 8, 15, 6),
__gen_unsfixed(input[0], 16, 23, 6),
__gen_unsfixed(input[0], 24, 31, 6)
],
table_1_filter_coefficient0: [
__gen_unsfixed(input[0], 0, 7, 6),
__gen_unsfixed(input[1], 0, 7, 6),
__gen_unsfixed(input[2], 0, 7, 6),
__gen_unsfixed(input[3], 0, 7, 6)
],
table_1_filter_coefficient1: [
__gen_unsfixed(input[0], 8, 15, 6),
__gen_unsfixed(input[1], 8, 15, 6),
__gen_unsfixed(input[2], 8, 15, 6),
__gen_unsfixed(input[3], 8, 15, 6)
],
}
}
}
impl Deserialize for SamplerState8x8AvsCoefficients {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 8];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 8] as *mut [u8; 32]) })?;
Ok((&input).into())
}
}
pub struct ScInstdone {
pub svl_done: bool,
pub wmfe_done: bool,
pub wmbe_done: bool,
pub hiz_done: bool,
pub stc_done: bool,
pub iz_done: bool,
pub sbe_done: bool,
pub rcz_done: bool,
pub rcc_done: bool,
pub rcpbe_done: bool,
pub rcpfe_done: bool,
pub dapb_done: bool,
pub daprbe_done: bool,
pub sarb_done: bool,
pub dc0_done: bool,
pub dc1_done: bool,
pub dc2_done: bool,
pub dc3_done: bool,
pub gw0_done: bool,
pub gw1_done: bool,
pub gw2_done: bool,
pub gw3_done: bool,
pub tdc_done: bool,
pub sfbe_done: bool,
}
impl ScInstdone {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x7100;
}
impl Default for ScInstdone {
fn default() -> Self {
ScInstdone {
svl_done: Default::default(),
wmfe_done: Default::default(),
wmbe_done: Default::default(),
hiz_done: Default::default(),
stc_done: Default::default(),
iz_done: Default::default(),
sbe_done: Default::default(),
rcz_done: Default::default(),
rcc_done: Default::default(),
rcpbe_done: Default::default(),
rcpfe_done: Default::default(),
dapb_done: Default::default(),
daprbe_done: Default::default(),
sarb_done: Default::default(),
dc0_done: Default::default(),
dc1_done: Default::default(),
dc2_done: Default::default(),
dc3_done: Default::default(),
gw0_done: Default::default(),
gw1_done: Default::default(),
gw2_done: Default::default(),
gw3_done: Default::default(),
tdc_done: Default::default(),
sfbe_done: Default::default(),
}
}
}
impl Serialize for ScInstdone {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.svl_done.into(), 0, 0) |
__gen_uint(self.wmfe_done.into(), 1, 1) |
__gen_uint(self.wmbe_done.into(), 2, 2) |
__gen_uint(self.hiz_done.into(), 3, 3) |
__gen_uint(self.stc_done.into(), 4, 4) |
__gen_uint(self.iz_done.into(), 5, 5) |
__gen_uint(self.sbe_done.into(), 6, 6) |
__gen_uint(self.rcz_done.into(), 8, 8) |
__gen_uint(self.rcc_done.into(), 9, 9) |
__gen_uint(self.rcpbe_done.into(), 10, 10) |
__gen_uint(self.rcpfe_done.into(), 11, 11) |
__gen_uint(self.dapb_done.into(), 12, 12) |
__gen_uint(self.daprbe_done.into(), 13, 13) |
__gen_uint(self.sarb_done.into(), 15, 15) |
__gen_uint(self.dc0_done.into(), 16, 16) |
__gen_uint(self.dc1_done.into(), 17, 17) |
__gen_uint(self.dc2_done.into(), 18, 18) |
__gen_uint(self.dc3_done.into(), 19, 19) |
__gen_uint(self.gw0_done.into(), 20, 20) |
__gen_uint(self.gw1_done.into(), 21, 21) |
__gen_uint(self.gw2_done.into(), 22, 22) |
__gen_uint(self.gw3_done.into(), 23, 23) |
__gen_uint(self.tdc_done.into(), 24, 24) |
__gen_uint(self.sfbe_done.into(), 25, 25);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for ScInstdone {
fn from(input: &[u32; 1]) -> Self {
ScInstdone {
svl_done: __gen_unuint(input[0], 0, 0) != 0,
wmfe_done: __gen_unuint(input[0], 1, 1) != 0,
wmbe_done: __gen_unuint(input[0], 2, 2) != 0,
hiz_done: __gen_unuint(input[0], 3, 3) != 0,
stc_done: __gen_unuint(input[0], 4, 4) != 0,
iz_done: __gen_unuint(input[0], 5, 5) != 0,
sbe_done: __gen_unuint(input[0], 6, 6) != 0,
rcz_done: __gen_unuint(input[0], 8, 8) != 0,
rcc_done: __gen_unuint(input[0], 9, 9) != 0,
rcpbe_done: __gen_unuint(input[0], 10, 10) != 0,
rcpfe_done: __gen_unuint(input[0], 11, 11) != 0,
dapb_done: __gen_unuint(input[0], 12, 12) != 0,
daprbe_done: __gen_unuint(input[0], 13, 13) != 0,
sarb_done: __gen_unuint(input[0], 15, 15) != 0,
dc0_done: __gen_unuint(input[0], 16, 16) != 0,
dc1_done: __gen_unuint(input[0], 17, 17) != 0,
dc2_done: __gen_unuint(input[0], 18, 18) != 0,
dc3_done: __gen_unuint(input[0], 19, 19) != 0,
gw0_done: __gen_unuint(input[0], 20, 20) != 0,
gw1_done: __gen_unuint(input[0], 21, 21) != 0,
gw2_done: __gen_unuint(input[0], 22, 22) != 0,
gw3_done: __gen_unuint(input[0], 23, 23) != 0,
tdc_done: __gen_unuint(input[0], 24, 24) != 0,
sfbe_done: __gen_unuint(input[0], 25, 25) != 0,
}
}
}
impl Deserialize for ScInstdone {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct ScissorRect {
pub scissor_rectangle_x_min: u32,
pub scissor_rectangle_y_min: u32,
pub scissor_rectangle_x_max: u32,
pub scissor_rectangle_y_max: u32,
}
impl ScissorRect {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for ScissorRect {
fn default() -> Self {
ScissorRect {
scissor_rectangle_x_min: Default::default(),
scissor_rectangle_y_min: Default::default(),
scissor_rectangle_x_max: Default::default(),
scissor_rectangle_y_max: Default::default(),
}
}
}
impl Serialize for ScissorRect {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.scissor_rectangle_x_min, 0, 15) |
__gen_uint(self.scissor_rectangle_y_min, 16, 31);
out[1] = __gen_uint(self.scissor_rectangle_x_max, 0, 15) |
__gen_uint(self.scissor_rectangle_y_max, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for ScissorRect {
fn from(input: &[u32; 2]) -> Self {
ScissorRect {
scissor_rectangle_x_min: __gen_unuint(input[0], 0, 15),
scissor_rectangle_y_min: __gen_unuint(input[0], 16, 31),
scissor_rectangle_x_max: __gen_unuint(input[1], 0, 15),
scissor_rectangle_y_max: __gen_unuint(input[1], 16, 31),
}
}
}
impl Deserialize for ScissorRect {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SfClipViewport {
pub viewport_matrix_element_m00: f32,
pub viewport_matrix_element_m11: f32,
pub viewport_matrix_element_m22: f32,
pub viewport_matrix_element_m30: f32,
pub viewport_matrix_element_m31: f32,
pub viewport_matrix_element_m32: f32,
pub x_min_clip_guardband: f32,
pub x_max_clip_guardband: f32,
pub y_min_clip_guardband: f32,
pub y_max_clip_guardband: f32,
pub x_min_viewport: f32,
pub x_max_viewport: f32,
pub y_min_viewport: f32,
pub y_max_viewport: f32,
}
impl SfClipViewport {
pub const DWORD_LENGTH: u32 = 16;
}
impl Default for SfClipViewport {
fn default() -> Self {
SfClipViewport {
viewport_matrix_element_m00: Default::default(),
viewport_matrix_element_m11: Default::default(),
viewport_matrix_element_m22: Default::default(),
viewport_matrix_element_m30: Default::default(),
viewport_matrix_element_m31: Default::default(),
viewport_matrix_element_m32: Default::default(),
x_min_clip_guardband: Default::default(),
x_max_clip_guardband: Default::default(),
y_min_clip_guardband: Default::default(),
y_max_clip_guardband: Default::default(),
x_min_viewport: Default::default(),
x_max_viewport: Default::default(),
y_min_viewport: Default::default(),
y_max_viewport: Default::default(),
}
}
}
impl Serialize for SfClipViewport {
type Out = [u32; 16];
fn pack_into(&self, out: &mut [u32; 16]) {
out[0] = self.viewport_matrix_element_m00.to_bits();
out[1] = self.viewport_matrix_element_m11.to_bits();
out[2] = self.viewport_matrix_element_m22.to_bits();
out[3] = self.viewport_matrix_element_m30.to_bits();
out[4] = self.viewport_matrix_element_m31.to_bits();
out[5] = self.viewport_matrix_element_m32.to_bits();
out[6] = 0;
out[7] = 0;
out[8] = self.x_min_clip_guardband.to_bits();
out[9] = self.x_max_clip_guardband.to_bits();
out[10] = self.y_min_clip_guardband.to_bits();
out[11] = self.y_max_clip_guardband.to_bits();
out[12] = self.x_min_viewport.to_bits();
out[13] = self.x_max_viewport.to_bits();
out[14] = self.y_min_viewport.to_bits();
out[15] = self.y_max_viewport.to_bits();
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 16];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 16] as *const [u8; 64]) })
}
}
impl From<&[u32; 16]> for SfClipViewport {
fn from(input: &[u32; 16]) -> Self {
SfClipViewport {
viewport_matrix_element_m00: f32::from_bits(input[0]),
viewport_matrix_element_m11: f32::from_bits(input[1]),
viewport_matrix_element_m22: f32::from_bits(input[2]),
viewport_matrix_element_m30: f32::from_bits(input[3]),
viewport_matrix_element_m31: f32::from_bits(input[4]),
viewport_matrix_element_m32: f32::from_bits(input[5]),
x_min_clip_guardband: f32::from_bits(input[8]),
x_max_clip_guardband: f32::from_bits(input[9]),
y_min_clip_guardband: f32::from_bits(input[10]),
y_max_clip_guardband: f32::from_bits(input[11]),
x_min_viewport: f32::from_bits(input[12]),
x_max_viewport: f32::from_bits(input[13]),
y_min_viewport: f32::from_bits(input[14]),
y_max_viewport: f32::from_bits(input[15]),
}
}
}
impl Deserialize for SfClipViewport {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 16];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 16] as *mut [u8; 64]) })?;
Ok((&input).into())
}
}
pub struct SfOutputAttributeDetail {
pub source_attribute: u32,
pub swizzle_select: u32,
pub constant_source: u32,
pub swizzle_control_mode: u32,
pub component_override_x: bool,
pub component_override_y: bool,
pub component_override_z: bool,
pub component_override_w: bool,
}
impl SfOutputAttributeDetail {
pub const DWORD_LENGTH: u32 = 1;
pub const CONST_0000: u32 = 0;
pub const CONST_0001_FLOAT: u32 = 1;
pub const CONST_1111_FLOAT: u32 = 2;
pub const INPUTATTR: u32 = 0;
pub const INPUTATTR_FACING: u32 = 1;
pub const INPUTATTR_FACING_W: u32 = 3;
pub const INPUTATTR_W: u32 = 2;
pub const PRIM_ID: u32 = 3;
}
impl Default for SfOutputAttributeDetail {
fn default() -> Self {
SfOutputAttributeDetail {
source_attribute: Default::default(),
swizzle_select: Default::default(),
constant_source: Default::default(),
swizzle_control_mode: Default::default(),
component_override_x: Default::default(),
component_override_y: Default::default(),
component_override_z: Default::default(),
component_override_w: Default::default(),
}
}
}
impl Serialize for SfOutputAttributeDetail {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.source_attribute, 0, 4) |
__gen_uint(self.swizzle_select, 6, 7) |
__gen_uint(self.constant_source, 9, 10) |
__gen_uint(self.swizzle_control_mode, 11, 11) |
__gen_uint(self.component_override_x.into(), 12, 12) |
__gen_uint(self.component_override_y.into(), 13, 13) |
__gen_uint(self.component_override_z.into(), 14, 14) |
__gen_uint(self.component_override_w.into(), 15, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for SfOutputAttributeDetail {
fn from(input: &[u32; 1]) -> Self {
SfOutputAttributeDetail {
source_attribute: __gen_unuint(input[0], 0, 4),
swizzle_select: __gen_unuint(input[0], 6, 7),
constant_source: __gen_unuint(input[0], 9, 10),
swizzle_control_mode: __gen_unuint(input[0], 11, 11),
component_override_x: __gen_unuint(input[0], 12, 12) != 0,
component_override_y: __gen_unuint(input[0], 13, 13) != 0,
component_override_z: __gen_unuint(input[0], 14, 14) != 0,
component_override_w: __gen_unuint(input[0], 15, 15) != 0,
}
}
}
impl Deserialize for SfOutputAttributeDetail {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct SfcAvsChromaCoeffTable {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub avs_chroma_coefficient_table_body: SfcAvsChromaCoeffTableBody,
}
impl SfcAvsChromaCoeffTable {
pub const DWORD_LENGTH: u32 = 65;
}
impl Default for SfcAvsChromaCoeffTable {
fn default() -> Self {
SfcAvsChromaCoeffTable {
dword_length: 63,
subopcode_b: 6,
subopcode_a: 0,
media_command_opcode: 10,
pipeline: 2,
command_type: 3,
avs_chroma_coefficient_table_body: Default::default(),
}
}
}
impl Serialize for SfcAvsChromaCoeffTable {
type Out = [u32; 65];
fn pack_into(&self, out: &mut [u32; 65]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_64 @ ..] = out;
self.avs_chroma_coefficient_table_body.pack_into(out1_64);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 65];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 65] as *const [u8; 260]) })
}
}
impl From<&[u32; 65]> for SfcAvsChromaCoeffTable {
fn from(input: &[u32; 65]) -> Self {
SfcAvsChromaCoeffTable {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
avs_chroma_coefficient_table_body: {{
let [_, ref in1_64 @ ..] = input;
in1_64.into()
}},
}
}
}
impl Deserialize for SfcAvsChromaCoeffTable {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 65];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 65] as *mut [u8; 260]) })?;
Ok((&input).into())
}
}
pub struct SfcAvsChromaCoeffTableBody {
pub table_1x_filter_coefficient_n_2: f32,
pub table_1y_filter_coefficient_n_2: f32,
pub table_1x_filter_coefficient_n_3: f32,
pub table_1y_filter_coefficient_n_3: f32,
pub table_1x_filter_coefficient_n_4: f32,
pub table_1y_filter_coefficient_n_4: f32,
pub table_1x_filter_coefficient_n_5: f32,
pub table_1y_filter_coefficient_n_5: f32,
pub filter_coefficients: [ChromaFilterCoefficientsArray; 31],
}
impl SfcAvsChromaCoeffTableBody {
pub const DWORD_LENGTH: u32 = 64;
}
impl Default for SfcAvsChromaCoeffTableBody {
fn default() -> Self {
SfcAvsChromaCoeffTableBody {
table_1x_filter_coefficient_n_2: Default::default(),
table_1y_filter_coefficient_n_2: Default::default(),
table_1x_filter_coefficient_n_3: Default::default(),
table_1y_filter_coefficient_n_3: Default::default(),
table_1x_filter_coefficient_n_4: Default::default(),
table_1y_filter_coefficient_n_4: Default::default(),
table_1x_filter_coefficient_n_5: Default::default(),
table_1y_filter_coefficient_n_5: Default::default(),
filter_coefficients: Default::default(),
}
}
}
impl Serialize for SfcAvsChromaCoeffTableBody {
type Out = [u32; 64];
fn pack_into(&self, out: &mut [u32; 64]) {
out[0] = __gen_sfixed(self.table_1x_filter_coefficient_n_2, 0, 7, 6) |
__gen_sfixed(self.table_1y_filter_coefficient_n_2, 8, 15, 6) |
__gen_sfixed(self.table_1x_filter_coefficient_n_3, 16, 23, 6) |
__gen_sfixed(self.table_1y_filter_coefficient_n_3, 24, 31, 6);
out[1] = __gen_sfixed(self.table_1x_filter_coefficient_n_4, 0, 7, 6) |
__gen_sfixed(self.table_1y_filter_coefficient_n_4, 8, 15, 6) |
__gen_sfixed(self.table_1x_filter_coefficient_n_5, 16, 23, 6) |
__gen_sfixed(self.table_1y_filter_coefficient_n_5, 24, 31, 6);
{
let [_, _, ref mut out2_3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[0].pack_into(out2_3);
}
{
let [_, _, _, _, ref mut out4_5 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[1].pack_into(out4_5);
}
{
let [_, _, _, _, _, _, ref mut out6_7 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[2].pack_into(out6_7);
}
{
let [_, _, _, _, _, _, _, _, ref mut out8_9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[3].pack_into(out8_9);
}
{
let [_, _, _, _, _, _, _, _, _, _, ref mut out10_11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[4].pack_into(out10_11);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12_13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[5].pack_into(out12_13);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out14_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[6].pack_into(out14_15);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out16_17 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[7].pack_into(out16_17);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out18_19 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[8].pack_into(out18_19);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out20_21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[9].pack_into(out20_21);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out22_23 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[10].pack_into(out22_23);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out24_25 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[11].pack_into(out24_25);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out26_27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[12].pack_into(out26_27);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out28_29 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[13].pack_into(out28_29);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out30_31 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[14].pack_into(out30_31);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out32_33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[15].pack_into(out32_33);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out34_35 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[16].pack_into(out34_35);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out36_37 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[17].pack_into(out36_37);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out38_39 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[18].pack_into(out38_39);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out40_41 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[19].pack_into(out40_41);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out42_43 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[20].pack_into(out42_43);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out44_45 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[21].pack_into(out44_45);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out46_47 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[22].pack_into(out46_47);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out48_49 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[23].pack_into(out48_49);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out50_51 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[24].pack_into(out50_51);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out52_53 @ .., _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[25].pack_into(out52_53);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out54_55 @ .., _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[26].pack_into(out54_55);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out56_57 @ .., _, _, _, _, _, _] = out;
self.filter_coefficients[27].pack_into(out56_57);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out58_59 @ .., _, _, _, _] = out;
self.filter_coefficients[28].pack_into(out58_59);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out60_61 @ .., _, _] = out;
self.filter_coefficients[29].pack_into(out60_61);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out62_63 @ ..] = out;
self.filter_coefficients[30].pack_into(out62_63);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 64];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 64] as *const [u8; 256]) })
}
}
impl From<&[u32; 64]> for SfcAvsChromaCoeffTableBody {
fn from(input: &[u32; 64]) -> Self {
SfcAvsChromaCoeffTableBody {
table_1x_filter_coefficient_n_2: __gen_unsfixed(input[0], 0, 7, 6),
table_1y_filter_coefficient_n_2: __gen_unsfixed(input[0], 8, 15, 6),
table_1x_filter_coefficient_n_3: __gen_unsfixed(input[0], 16, 23, 6),
table_1y_filter_coefficient_n_3: __gen_unsfixed(input[0], 24, 31, 6),
table_1x_filter_coefficient_n_4: __gen_unsfixed(input[1], 0, 7, 6),
table_1y_filter_coefficient_n_4: __gen_unsfixed(input[1], 8, 15, 6),
table_1x_filter_coefficient_n_5: __gen_unsfixed(input[1], 16, 23, 6),
table_1y_filter_coefficient_n_5: __gen_unsfixed(input[1], 24, 31, 6),
filter_coefficients: [
{{
let [_, _, ref in2_3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in2_3.into()
}},
{{
let [_, _, _, _, ref in4_5 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in4_5.into()
}},
{{
let [_, _, _, _, _, _, ref in6_7 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in6_7.into()
}},
{{
let [_, _, _, _, _, _, _, _, ref in8_9 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in8_9.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, ref in10_11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in10_11.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12_13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in12_13.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in14_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in14_15.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in16_17 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in16_17.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in18_19 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in18_19.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in20_21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in20_21.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in22_23 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in22_23.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in24_25 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in24_25.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in26_27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in26_27.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in28_29 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in28_29.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in30_31 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in30_31.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in32_33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in32_33.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in34_35 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in34_35.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in36_37 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in36_37.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in38_39 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in38_39.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in40_41 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in40_41.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in42_43 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in42_43.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in44_45 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in44_45.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in46_47 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in46_47.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in48_49 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in48_49.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in50_51 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = input;
in50_51.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in52_53 @ .., _, _, _, _, _, _, _, _, _, _] = input;
in52_53.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in54_55 @ .., _, _, _, _, _, _, _, _] = input;
in54_55.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in56_57 @ .., _, _, _, _, _, _] = input;
in56_57.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in58_59 @ .., _, _, _, _] = input;
in58_59.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in60_61 @ .., _, _] = input;
in60_61.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in62_63 @ ..] = input;
in62_63.into()
}}
],
}
}
}
impl Deserialize for SfcAvsChromaCoeffTableBody {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 64];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 64] as *mut [u8; 256]) })?;
Ok((&input).into())
}
}
pub struct SfcAvsLumaCoeffTable {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub avs_luma_coefficient_table_body: SfcAvsLumaCoeffTableBody,
}
impl SfcAvsLumaCoeffTable {
pub const DWORD_LENGTH: u32 = 133;
}
impl Default for SfcAvsLumaCoeffTable {
fn default() -> Self {
SfcAvsLumaCoeffTable {
dword_length: 127,
subopcode_b: 5,
subopcode_a: 0,
media_command_opcode: 10,
pipeline: 2,
command_type: 3,
avs_luma_coefficient_table_body: Default::default(),
}
}
}
impl Serialize for SfcAvsLumaCoeffTable {
type Out = [u32; 133];
fn pack_into(&self, out: &mut [u32; 133]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_128 @ .., _, _, _, _] = out;
self.avs_luma_coefficient_table_body.pack_into(out1_128);
}
out[129] = 0;
out[130] = 0;
out[131] = 0;
out[132] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 133];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 133] as *const [u8; 532]) })
}
}
impl From<&[u32; 133]> for SfcAvsLumaCoeffTable {
fn from(input: &[u32; 133]) -> Self {
SfcAvsLumaCoeffTable {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
avs_luma_coefficient_table_body: {{
let [_, ref in1_128 @ .., _, _, _, _] = input;
in1_128.into()
}},
}
}
}
impl Deserialize for SfcAvsLumaCoeffTable {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 133];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 133] as *mut [u8; 532]) })?;
Ok((&input).into())
}
}
pub struct SfcAvsLumaCoeffTableBody {
pub table_0x_filter_coefficient_n_0: f32,
pub table_0y_filter_coefficient_n_0: f32,
pub table_0x_filter_coefficient_n_1: f32,
pub table_0y_filter_coefficient_n_1: f32,
pub table_0x_filter_coefficient_n_2: f32,
pub table_0y_filter_coefficient_n_2: f32,
pub table_0x_filter_coefficient_n_3: f32,
pub table_0y_filter_coefficient_n_3: f32,
pub table_0x_filter_coefficient_n_4: f32,
pub table_0y_filter_coefficient_n_4: f32,
pub table_0x_filter_coefficient_n_5: f32,
pub table_0y_filter_coefficient_n_5: f32,
pub table_0x_filter_coefficient_n_6: f32,
pub table_0y_filter_coefficient_n_6: f32,
pub table_0x_filter_coefficient_n_7: f32,
pub table_0y_filter_coefficient_n_7: f32,
pub filter_coefficients: [LumaFilterCoefficientsArray; 31],
}
impl SfcAvsLumaCoeffTableBody {
pub const DWORD_LENGTH: u32 = 128;
}
impl Default for SfcAvsLumaCoeffTableBody {
fn default() -> Self {
SfcAvsLumaCoeffTableBody {
table_0x_filter_coefficient_n_0: Default::default(),
table_0y_filter_coefficient_n_0: Default::default(),
table_0x_filter_coefficient_n_1: Default::default(),
table_0y_filter_coefficient_n_1: Default::default(),
table_0x_filter_coefficient_n_2: Default::default(),
table_0y_filter_coefficient_n_2: Default::default(),
table_0x_filter_coefficient_n_3: Default::default(),
table_0y_filter_coefficient_n_3: Default::default(),
table_0x_filter_coefficient_n_4: Default::default(),
table_0y_filter_coefficient_n_4: Default::default(),
table_0x_filter_coefficient_n_5: Default::default(),
table_0y_filter_coefficient_n_5: Default::default(),
table_0x_filter_coefficient_n_6: Default::default(),
table_0y_filter_coefficient_n_6: Default::default(),
table_0x_filter_coefficient_n_7: Default::default(),
table_0y_filter_coefficient_n_7: Default::default(),
filter_coefficients: Default::default(),
}
}
}
impl Serialize for SfcAvsLumaCoeffTableBody {
type Out = [u32; 128];
fn pack_into(&self, out: &mut [u32; 128]) {
out[0] = __gen_sfixed(self.table_0x_filter_coefficient_n_0, 0, 7, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_0, 8, 15, 6) |
__gen_sfixed(self.table_0x_filter_coefficient_n_1, 16, 23, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_1, 24, 31, 6);
out[1] = __gen_sfixed(self.table_0x_filter_coefficient_n_2, 0, 7, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_2, 8, 15, 6) |
__gen_sfixed(self.table_0x_filter_coefficient_n_3, 16, 23, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_3, 24, 31, 6);
out[2] = __gen_sfixed(self.table_0x_filter_coefficient_n_4, 0, 7, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_4, 8, 15, 6) |
__gen_sfixed(self.table_0x_filter_coefficient_n_5, 16, 23, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_5, 24, 31, 6);
out[3] = __gen_sfixed(self.table_0x_filter_coefficient_n_6, 0, 7, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_6, 8, 15, 6) |
__gen_sfixed(self.table_0x_filter_coefficient_n_7, 16, 23, 6) |
__gen_sfixed(self.table_0y_filter_coefficient_n_7, 24, 31, 6);
{
let [_, _, _, _, ref mut out4_7 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[0].pack_into(out4_7);
}
{
let [_, _, _, _, _, _, _, _, ref mut out8_11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[1].pack_into(out8_11);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[2].pack_into(out12_15);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out16_19 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[3].pack_into(out16_19);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out20_23 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[4].pack_into(out20_23);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out24_27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[5].pack_into(out24_27);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out28_31 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[6].pack_into(out28_31);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out32_35 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[7].pack_into(out32_35);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out36_39 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[8].pack_into(out36_39);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out40_43 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[9].pack_into(out40_43);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out44_47 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[10].pack_into(out44_47);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out48_51 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[11].pack_into(out48_51);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out52_55 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[12].pack_into(out52_55);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out56_59 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[13].pack_into(out56_59);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out60_63 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[14].pack_into(out60_63);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out64_67 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[15].pack_into(out64_67);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out68_71 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[16].pack_into(out68_71);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out72_75 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[17].pack_into(out72_75);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out76_79 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[18].pack_into(out76_79);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out80_83 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[19].pack_into(out80_83);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out84_87 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[20].pack_into(out84_87);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out88_91 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[21].pack_into(out88_91);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out92_95 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[22].pack_into(out92_95);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out96_99 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[23].pack_into(out96_99);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out100_103 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[24].pack_into(out100_103);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out104_107 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[25].pack_into(out104_107);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out108_111 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[26].pack_into(out108_111);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out112_115 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[27].pack_into(out112_115);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out116_119 @ .., _, _, _, _, _, _, _, _] = out;
self.filter_coefficients[28].pack_into(out116_119);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out120_123 @ .., _, _, _, _] = out;
self.filter_coefficients[29].pack_into(out120_123);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out124_127 @ ..] = out;
self.filter_coefficients[30].pack_into(out124_127);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 128];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 128] as *const [u8; 512]) })
}
}
impl From<&[u32; 128]> for SfcAvsLumaCoeffTableBody {
fn from(input: &[u32; 128]) -> Self {
SfcAvsLumaCoeffTableBody {
table_0x_filter_coefficient_n_0: __gen_unsfixed(input[0], 0, 7, 6),
table_0y_filter_coefficient_n_0: __gen_unsfixed(input[0], 8, 15, 6),
table_0x_filter_coefficient_n_1: __gen_unsfixed(input[0], 16, 23, 6),
table_0y_filter_coefficient_n_1: __gen_unsfixed(input[0], 24, 31, 6),
table_0x_filter_coefficient_n_2: __gen_unsfixed(input[1], 0, 7, 6),
table_0y_filter_coefficient_n_2: __gen_unsfixed(input[1], 8, 15, 6),
table_0x_filter_coefficient_n_3: __gen_unsfixed(input[1], 16, 23, 6),
table_0y_filter_coefficient_n_3: __gen_unsfixed(input[1], 24, 31, 6),
table_0x_filter_coefficient_n_4: __gen_unsfixed(input[2], 0, 7, 6),
table_0y_filter_coefficient_n_4: __gen_unsfixed(input[2], 8, 15, 6),
table_0x_filter_coefficient_n_5: __gen_unsfixed(input[2], 16, 23, 6),
table_0y_filter_coefficient_n_5: __gen_unsfixed(input[2], 24, 31, 6),
table_0x_filter_coefficient_n_6: __gen_unsfixed(input[3], 0, 7, 6),
table_0y_filter_coefficient_n_6: __gen_unsfixed(input[3], 8, 15, 6),
table_0x_filter_coefficient_n_7: __gen_unsfixed(input[3], 16, 23, 6),
table_0y_filter_coefficient_n_7: __gen_unsfixed(input[3], 24, 31, 6),
filter_coefficients: [
{{
let [_, _, _, _, ref in4_7 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in4_7.into()
}},
{{
let [_, _, _, _, _, _, _, _, ref in8_11 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in8_11.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in12_15.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in16_19 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in16_19.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in20_23 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in20_23.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in24_27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in24_27.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in28_31 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in28_31.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in32_35 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in32_35.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in36_39 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in36_39.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in40_43 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in40_43.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in44_47 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in44_47.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in48_51 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in48_51.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in52_55 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in52_55.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in56_59 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in56_59.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in60_63 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in60_63.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in64_67 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in64_67.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in68_71 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in68_71.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in72_75 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in72_75.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in76_79 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in76_79.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in80_83 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in80_83.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in84_87 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in84_87.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in88_91 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in88_91.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in92_95 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in92_95.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in96_99 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in96_99.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in100_103 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in100_103.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in104_107 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in104_107.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in108_111 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in108_111.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in112_115 @ .., _, _, _, _, _, _, _, _, _, _, _, _] = input;
in112_115.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in116_119 @ .., _, _, _, _, _, _, _, _] = input;
in116_119.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in120_123 @ .., _, _, _, _] = input;
in120_123.into()
}},
{{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in124_127 @ ..] = input;
in124_127.into()
}}
],
}
}
}
impl Deserialize for SfcAvsLumaCoeffTableBody {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 128];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 128] as *mut [u8; 512]) })?;
Ok((&input).into())
}
}
pub struct SfcAvsState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub avs_state_body: SfcAvsStateBody,
}
impl SfcAvsState {
pub const DWORD_LENGTH: u32 = 49;
}
impl Default for SfcAvsState {
fn default() -> Self {
SfcAvsState {
dword_length: 1,
subopcode_b: 2,
subopcode_a: 0,
media_command_opcode: 10,
pipeline: 2,
command_type: 3,
avs_state_body: Default::default(),
}
}
}
impl Serialize for SfcAvsState {
type Out = [u32; 49];
fn pack_into(&self, out: &mut [u32; 49]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_2 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.avs_state_body.pack_into(out1_2);
}
out[3] = 0;
out[4] = 0;
out[5] = 0;
out[6] = 0;
out[7] = 0;
out[8] = 0;
out[9] = 0;
out[10] = 0;
out[11] = 0;
out[12] = 0;
out[13] = 0;
out[14] = 0;
out[15] = 0;
out[16] = 0;
out[17] = 0;
out[18] = 0;
out[19] = 0;
out[20] = 0;
out[21] = 0;
out[22] = 0;
out[23] = 0;
out[24] = 0;
out[25] = 0;
out[26] = 0;
out[27] = 0;
out[28] = 0;
out[29] = 0;
out[30] = 0;
out[31] = 0;
out[32] = 0;
out[33] = 0;
out[34] = 0;
out[35] = 0;
out[36] = 0;
out[37] = 0;
out[38] = 0;
out[39] = 0;
out[40] = 0;
out[41] = 0;
out[42] = 0;
out[43] = 0;
out[44] = 0;
out[45] = 0;
out[46] = 0;
out[47] = 0;
out[48] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 49];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 49] as *const [u8; 196]) })
}
}
impl From<&[u32; 49]> for SfcAvsState {
fn from(input: &[u32; 49]) -> Self {
SfcAvsState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
avs_state_body: {{
let [_, ref in1_2 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in1_2.into()
}},
}
}
}
impl Deserialize for SfcAvsState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 49];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 49] as *mut [u8; 196]) })?;
Ok((&input).into())
}
}
pub struct SfcAvsStateBody {
pub transition_area_with_8_pixels: u32,
pub transition_area_with_4_pixels: u32,
pub sharpness_level: u32,
pub max_derivative_8_pixels: u32,
pub max_derivative_4_pixels: u32,
}
impl SfcAvsStateBody {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for SfcAvsStateBody {
fn default() -> Self {
SfcAvsStateBody {
transition_area_with_8_pixels: Default::default(),
transition_area_with_4_pixels: Default::default(),
sharpness_level: Default::default(),
max_derivative_8_pixels: Default::default(),
max_derivative_4_pixels: Default::default(),
}
}
}
impl Serialize for SfcAvsStateBody {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.transition_area_with_8_pixels, 0, 2) |
__gen_uint(self.transition_area_with_4_pixels, 4, 6) |
__gen_uint(self.sharpness_level, 24, 31);
out[1] = __gen_uint(self.max_derivative_8_pixels, 0, 7) |
__gen_uint(self.max_derivative_4_pixels, 16, 23);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SfcAvsStateBody {
fn from(input: &[u32; 2]) -> Self {
SfcAvsStateBody {
transition_area_with_8_pixels: __gen_unuint(input[0], 0, 2),
transition_area_with_4_pixels: __gen_unuint(input[0], 4, 6),
sharpness_level: __gen_unuint(input[0], 24, 31),
max_derivative_8_pixels: __gen_unuint(input[1], 0, 7),
max_derivative_4_pixels: __gen_unuint(input[1], 16, 23),
}
}
}
impl Deserialize for SfcAvsStateBody {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SfcFrameStart {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub frame_start_body: u32,
}
impl SfcFrameStart {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for SfcFrameStart {
fn default() -> Self {
SfcFrameStart {
dword_length: 0,
subopcode_b: 4,
subopcode_a: 0,
media_command_opcode: 10,
pipeline: 2,
command_type: 3,
frame_start_body: Default::default(),
}
}
}
impl Serialize for SfcFrameStart {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.frame_start_body, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SfcFrameStart {
fn from(input: &[u32; 2]) -> Self {
SfcFrameStart {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
frame_start_body: __gen_unuint(input[1], 0, 31),
}
}
}
impl Deserialize for SfcFrameStart {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SfcIefState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub sfc_ief_state_body: SfcIefStateBody,
}
impl SfcIefState {
pub const DWORD_LENGTH: u32 = 24;
}
impl Default for SfcIefState {
fn default() -> Self {
SfcIefState {
dword_length: 22,
subopcode_b: 3,
subopcode_a: 0,
media_command_opcode: 10,
pipeline: 2,
command_type: 3,
sfc_ief_state_body: Default::default(),
}
}
}
impl Serialize for SfcIefState {
type Out = [u32; 24];
fn pack_into(&self, out: &mut [u32; 24]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_23 @ ..] = out;
self.sfc_ief_state_body.pack_into(out1_23);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 24];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 24] as *const [u8; 96]) })
}
}
impl From<&[u32; 24]> for SfcIefState {
fn from(input: &[u32; 24]) -> Self {
SfcIefState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
sfc_ief_state_body: {{
let [_, ref in1_23 @ ..] = input;
in1_23.into()
}},
}
}
}
impl Deserialize for SfcIefState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 24];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 24] as *mut [u8; 96]) })?;
Ok((&input).into())
}
}
pub struct SfcIefStateBody {
pub gain_factor: u32,
pub weak_edge_threshold: u32,
pub strong_edge_threshold: u32,
pub r3x_coefficient: f32,
pub r3c_coefficient: f32,
pub global_noise_estimation: u32,
pub non_edge_weight: u32,
pub regular_weight: u32,
pub strong_edge_weight: u32,
pub r5x_coefficient: f32,
pub r5cx_coefficient: f32,
pub r5c_coefficient: f32,
pub std_sin_alpha: f32,
pub std_cos_alpha: f32,
pub sat_max: u32,
pub hue_max: u32,
pub s3u: f32,
pub diamond_margin: u32,
pub vy_std_enable: bool,
pub u_mid: u32,
pub v_mid: u32,
pub diamond_dv: i32,
pub diamond_th: u32,
pub diamond_alpha: f32,
pub hs_margin: u32,
pub diamond_du: i32,
pub skin_detail_factor: u32,
pub y_point_1: u32,
pub y_point_2: u32,
pub y_point_3: u32,
pub y_point_4: u32,
pub inv_margin_vyl: f32,
pub inv_margin_vyu: f32,
pub p0l: u32,
pub p1l: u32,
pub p2l: u32,
pub p3l: u32,
pub b0l: u32,
pub b1l: u32,
pub b2l: u32,
pub b3l: u32,
pub s0l: f32,
pub y_slope_2: f32,
pub s1l: f32,
pub s2l: f32,
pub s3l: f32,
pub p0u: u32,
pub p1u: u32,
pub y_slope1: f32,
pub p2u: u32,
pub p3u: u32,
pub b0u: u32,
pub b1u: u32,
pub b2u: u32,
pub b3u: u32,
pub s0u: f32,
pub s1u: f32,
pub s2u: f32,
pub transform_enable: bool,
pub yuv_channel_swap: bool,
pub c0: f32,
pub c1: f32,
pub c2: f32,
pub c3: f32,
pub c4: f32,
pub c5: f32,
pub c6: f32,
pub c7: f32,
pub c8: f32,
pub offset_in_1: f32,
pub offset_out_1: f32,
pub offset_in_2: f32,
pub offset_out_2: f32,
pub offset_in_3: f32,
pub offset_out_3: f32,
}
impl SfcIefStateBody {
pub const DWORD_LENGTH: u32 = 23;
pub const DETAIL_REVEALED: u32 = 0;
pub const NOT_DETAIL_REVEALED: u32 = 1;
}
impl Default for SfcIefStateBody {
fn default() -> Self {
SfcIefStateBody {
gain_factor: 44,
weak_edge_threshold: 1,
strong_edge_threshold: 8,
r3x_coefficient: 5.0,
r3c_coefficient: 5.0,
global_noise_estimation: Default::default(),
non_edge_weight: Default::default(),
regular_weight: Default::default(),
strong_edge_weight: Default::default(),
r5x_coefficient: Default::default(),
r5cx_coefficient: Default::default(),
r5c_coefficient: Default::default(),
std_sin_alpha: Default::default(),
std_cos_alpha: Default::default(),
sat_max: Default::default(),
hue_max: Default::default(),
s3u: Default::default(),
diamond_margin: Default::default(),
vy_std_enable: Default::default(),
u_mid: Default::default(),
v_mid: Default::default(),
diamond_dv: Default::default(),
diamond_th: Default::default(),
diamond_alpha: Default::default(),
hs_margin: Default::default(),
diamond_du: Default::default(),
skin_detail_factor: Default::default(),
y_point_1: Default::default(),
y_point_2: Default::default(),
y_point_3: Default::default(),
y_point_4: Default::default(),
inv_margin_vyl: Default::default(),
inv_margin_vyu: Default::default(),
p0l: Default::default(),
p1l: Default::default(),
p2l: Default::default(),
p3l: Default::default(),
b0l: Default::default(),
b1l: Default::default(),
b2l: Default::default(),
b3l: Default::default(),
s0l: Default::default(),
y_slope_2: Default::default(),
s1l: Default::default(),
s2l: Default::default(),
s3l: Default::default(),
p0u: Default::default(),
p1u: Default::default(),
y_slope1: Default::default(),
p2u: Default::default(),
p3u: Default::default(),
b0u: Default::default(),
b1u: Default::default(),
b2u: Default::default(),
b3u: Default::default(),
s0u: Default::default(),
s1u: Default::default(),
s2u: Default::default(),
transform_enable: Default::default(),
yuv_channel_swap: Default::default(),
c0: Default::default(),
c1: Default::default(),
c2: Default::default(),
c3: Default::default(),
c4: Default::default(),
c5: Default::default(),
c6: Default::default(),
c7: Default::default(),
c8: Default::default(),
offset_in_1: Default::default(),
offset_out_1: Default::default(),
offset_in_2: Default::default(),
offset_out_2: Default::default(),
offset_in_3: Default::default(),
offset_out_3: Default::default(),
}
}
}
impl Serialize for SfcIefStateBody {
type Out = [u32; 23];
fn pack_into(&self, out: &mut [u32; 23]) {
out[0] = __gen_uint(self.gain_factor, 0, 5) |
__gen_uint(self.weak_edge_threshold, 6, 11) |
__gen_uint(self.strong_edge_threshold, 12, 17) |
__gen_ufixed(self.r3x_coefficient, 18, 22, 5) |
__gen_ufixed(self.r3c_coefficient, 23, 27, 5);
out[1] = __gen_uint(self.global_noise_estimation, 0, 7) |
__gen_uint(self.non_edge_weight, 8, 10) |
__gen_uint(self.regular_weight, 11, 13) |
__gen_uint(self.strong_edge_weight, 14, 16) |
__gen_ufixed(self.r5x_coefficient, 17, 21, 5) |
__gen_ufixed(self.r5cx_coefficient, 22, 26, 5) |
__gen_ufixed(self.r5c_coefficient, 27, 31, 5);
out[2] = __gen_sfixed(self.std_sin_alpha, 0, 7, 7) |
__gen_sfixed(self.std_cos_alpha, 8, 15, 7) |
__gen_uint(self.sat_max, 16, 21) |
__gen_uint(self.hue_max, 22, 27);
out[3] = __gen_sfixed(self.s3u, 0, 10, 8) |
__gen_uint(self.diamond_margin, 12, 14) |
__gen_uint(self.vy_std_enable.into(), 15, 15) |
__gen_uint(self.u_mid, 16, 23) |
__gen_uint(self.v_mid, 24, 31);
out[4] = __gen_uint(self.diamond_dv as u32, 0, 6) |
__gen_uint(self.diamond_th, 7, 12) |
__gen_ufixed(self.diamond_alpha, 13, 20, 6) |
__gen_uint(self.hs_margin, 21, 23) |
__gen_uint(self.diamond_du as u32, 24, 30) |
__gen_uint(self.skin_detail_factor, 31, 31);
out[5] = __gen_uint(self.y_point_1, 0, 7) |
__gen_uint(self.y_point_2, 8, 15) |
__gen_uint(self.y_point_3, 16, 23) |
__gen_uint(self.y_point_4, 24, 31);
out[6] = __gen_ufixed(self.inv_margin_vyl, 0, 15, 16);
out[7] = __gen_ufixed(self.inv_margin_vyu, 0, 15, 16) |
__gen_uint(self.p0l, 16, 23) |
__gen_uint(self.p1l, 24, 31);
out[8] = __gen_uint(self.p2l, 0, 7) |
__gen_uint(self.p3l, 8, 15) |
__gen_uint(self.b0l, 16, 23) |
__gen_uint(self.b1l, 24, 31);
out[9] = __gen_uint(self.b2l, 0, 7) |
__gen_uint(self.b3l, 8, 15) |
__gen_sfixed(self.s0l, 16, 26, 8) |
__gen_ufixed(self.y_slope_2, 27, 31, 3);
out[10] = __gen_sfixed(self.s1l, 0, 10, 8) |
__gen_sfixed(self.s2l, 11, 21, 8);
out[11] = __gen_sfixed(self.s3l, 0, 10, 8) |
__gen_uint(self.p0u, 11, 18) |
__gen_uint(self.p1u, 19, 26) |
__gen_ufixed(self.y_slope1, 27, 31, 3);
out[12] = __gen_uint(self.p2u, 0, 7) |
__gen_uint(self.p3u, 8, 15) |
__gen_uint(self.b0u, 16, 23) |
__gen_uint(self.b1u, 24, 31);
out[13] = __gen_uint(self.b2u, 0, 7) |
__gen_uint(self.b3u, 8, 15) |
__gen_sfixed(self.s0u, 16, 26, 8);
out[14] = __gen_sfixed(self.s1u, 0, 10, 8) |
__gen_sfixed(self.s2u, 11, 21, 8);
out[15] = __gen_uint(self.transform_enable.into(), 0, 0) |
__gen_uint(self.yuv_channel_swap.into(), 1, 1) |
__gen_sfixed(self.c0, 3, 15, 10) |
__gen_sfixed(self.c1, 16, 28, 10);
out[16] = __gen_sfixed(self.c2, 0, 12, 10) |
__gen_sfixed(self.c3, 13, 25, 10);
out[17] = __gen_sfixed(self.c4, 0, 12, 10) |
__gen_sfixed(self.c5, 13, 25, 10);
out[18] = __gen_sfixed(self.c6, 0, 12, 10) |
__gen_sfixed(self.c7, 13, 25, 10);
out[19] = __gen_sfixed(self.c8, 0, 12, 10);
out[20] = __gen_sfixed(self.offset_in_1, 0, 10, 8) |
__gen_sfixed(self.offset_out_1, 11, 21, 8);
out[21] = __gen_sfixed(self.offset_in_2, 0, 10, 8) |
__gen_sfixed(self.offset_out_2, 11, 21, 8);
out[22] = __gen_sfixed(self.offset_in_3, 0, 10, 8) |
__gen_sfixed(self.offset_out_3, 11, 21, 8);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 23];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 23] as *const [u8; 92]) })
}
}
impl From<&[u32; 23]> for SfcIefStateBody {
fn from(input: &[u32; 23]) -> Self {
SfcIefStateBody {
gain_factor: __gen_unuint(input[0], 0, 5),
weak_edge_threshold: __gen_unuint(input[0], 6, 11),
strong_edge_threshold: __gen_unuint(input[0], 12, 17),
r3x_coefficient: __gen_unufixed(input[0], 18, 22, 5),
r3c_coefficient: __gen_unufixed(input[0], 23, 27, 5),
global_noise_estimation: __gen_unuint(input[1], 0, 7),
non_edge_weight: __gen_unuint(input[1], 8, 10),
regular_weight: __gen_unuint(input[1], 11, 13),
strong_edge_weight: __gen_unuint(input[1], 14, 16),
r5x_coefficient: __gen_unufixed(input[1], 17, 21, 5),
r5cx_coefficient: __gen_unufixed(input[1], 22, 26, 5),
r5c_coefficient: __gen_unufixed(input[1], 27, 31, 5),
std_sin_alpha: __gen_unsfixed(input[2], 0, 7, 7),
std_cos_alpha: __gen_unsfixed(input[2], 8, 15, 7),
sat_max: __gen_unuint(input[2], 16, 21),
hue_max: __gen_unuint(input[2], 22, 27),
s3u: __gen_unsfixed(input[3], 0, 10, 8),
diamond_margin: __gen_unuint(input[3], 12, 14),
vy_std_enable: __gen_unuint(input[3], 15, 15) != 0,
u_mid: __gen_unuint(input[3], 16, 23),
v_mid: __gen_unuint(input[3], 24, 31),
diamond_dv: (__gen_unuint(input[4], 0, 6)) as i32,
diamond_th: __gen_unuint(input[4], 7, 12),
diamond_alpha: __gen_unufixed(input[4], 13, 20, 6),
hs_margin: __gen_unuint(input[4], 21, 23),
diamond_du: (__gen_unuint(input[4], 24, 30)) as i32,
skin_detail_factor: __gen_unuint(input[4], 31, 31),
y_point_1: __gen_unuint(input[5], 0, 7),
y_point_2: __gen_unuint(input[5], 8, 15),
y_point_3: __gen_unuint(input[5], 16, 23),
y_point_4: __gen_unuint(input[5], 24, 31),
inv_margin_vyl: __gen_unufixed(input[6], 0, 15, 16),
inv_margin_vyu: __gen_unufixed(input[7], 0, 15, 16),
p0l: __gen_unuint(input[7], 16, 23),
p1l: __gen_unuint(input[7], 24, 31),
p2l: __gen_unuint(input[8], 0, 7),
p3l: __gen_unuint(input[8], 8, 15),
b0l: __gen_unuint(input[8], 16, 23),
b1l: __gen_unuint(input[8], 24, 31),
b2l: __gen_unuint(input[9], 0, 7),
b3l: __gen_unuint(input[9], 8, 15),
s0l: __gen_unsfixed(input[9], 16, 26, 8),
y_slope_2: __gen_unufixed(input[9], 27, 31, 3),
s1l: __gen_unsfixed(input[10], 0, 10, 8),
s2l: __gen_unsfixed(input[10], 11, 21, 8),
s3l: __gen_unsfixed(input[11], 0, 10, 8),
p0u: __gen_unuint(input[11], 11, 18),
p1u: __gen_unuint(input[11], 19, 26),
y_slope1: __gen_unufixed(input[11], 27, 31, 3),
p2u: __gen_unuint(input[12], 0, 7),
p3u: __gen_unuint(input[12], 8, 15),
b0u: __gen_unuint(input[12], 16, 23),
b1u: __gen_unuint(input[12], 24, 31),
b2u: __gen_unuint(input[13], 0, 7),
b3u: __gen_unuint(input[13], 8, 15),
s0u: __gen_unsfixed(input[13], 16, 26, 8),
s1u: __gen_unsfixed(input[14], 0, 10, 8),
s2u: __gen_unsfixed(input[14], 11, 21, 8),
transform_enable: __gen_unuint(input[15], 0, 0) != 0,
yuv_channel_swap: __gen_unuint(input[15], 1, 1) != 0,
c0: __gen_unsfixed(input[15], 3, 15, 10),
c1: __gen_unsfixed(input[15], 16, 28, 10),
c2: __gen_unsfixed(input[16], 0, 12, 10),
c3: __gen_unsfixed(input[16], 13, 25, 10),
c4: __gen_unsfixed(input[17], 0, 12, 10),
c5: __gen_unsfixed(input[17], 13, 25, 10),
c6: __gen_unsfixed(input[18], 0, 12, 10),
c7: __gen_unsfixed(input[18], 13, 25, 10),
c8: __gen_unsfixed(input[19], 0, 12, 10),
offset_in_1: __gen_unsfixed(input[20], 0, 10, 8),
offset_out_1: __gen_unsfixed(input[20], 11, 21, 8),
offset_in_2: __gen_unsfixed(input[21], 0, 10, 8),
offset_out_2: __gen_unsfixed(input[21], 11, 21, 8),
offset_in_3: __gen_unsfixed(input[22], 0, 10, 8),
offset_out_3: __gen_unsfixed(input[22], 11, 21, 8),
}
}
}
impl Deserialize for SfcIefStateBody {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 23];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 23] as *mut [u8; 92]) })?;
Ok((&input).into())
}
}
pub struct SfcLock {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub sfc_lock_body: SfcLockBody,
}
impl SfcLock {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for SfcLock {
fn default() -> Self {
SfcLock {
dword_length: 0,
subopcode_b: 0,
subopcode_a: 0,
media_command_opcode: 10,
pipeline: 2,
command_type: 3,
sfc_lock_body: Default::default(),
}
}
}
impl Serialize for SfcLock {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1 @ ..] = out;
self.sfc_lock_body.pack_into(out1);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SfcLock {
fn from(input: &[u32; 2]) -> Self {
SfcLock {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
sfc_lock_body: {{
let [_, ref in1 @ ..] = input;
in1.into()
}},
}
}
}
impl Deserialize for SfcLock {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SfcLockBody {
pub ve_sfc_pipe_select: u32,
pub pre_scaled_output_surface_output_enable: bool,
}
impl SfcLockBody {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for SfcLockBody {
fn default() -> Self {
SfcLockBody {
ve_sfc_pipe_select: Default::default(),
pre_scaled_output_surface_output_enable: Default::default(),
}
}
}
impl Serialize for SfcLockBody {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.ve_sfc_pipe_select, 0, 0) |
__gen_uint(self.pre_scaled_output_surface_output_enable.into(), 1, 1);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for SfcLockBody {
fn from(input: &[u32; 1]) -> Self {
SfcLockBody {
ve_sfc_pipe_select: __gen_unuint(input[0], 0, 0),
pre_scaled_output_surface_output_enable: __gen_unuint(input[0], 1, 1) != 0,
}
}
}
impl Deserialize for SfcLockBody {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct SfcState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub sfc_pipe_mode: u32,
pub sfc_input_chroma_sub_sampling: u32,
pub vd_ve_input_ordering_mode: u32,
pub input_frame_resolution_width: u32,
pub input_frame_resolution_height: u32,
pub output_surface_format_type: u32,
pub rgba_channel_swap_enable: bool,
pub pre_avs_chroma_downsampling_enable: u32,
pub pre_avs_chroma_downsampling_co_siting_position_vertical_direction: u32,
pub pre_avs_chroma_downsampling_co_siting_position_horizontal_direction: u32,
pub ief_enable: bool,
pub skin_tone_tuned_ief_enable: bool,
pub ief4_smooth_enable: bool,
pub avs_filter_mode: u32,
pub adaptive_filter_for_all_channels: bool,
pub avs_scaling_enable: bool,
pub bypass_y_adaptive_filtering: bool,
pub bypass_x_adaptive_filtering: bool,
pub chroma_upsampling_enable: bool,
pub rotation_mode: u32,
pub color_fill_enable: bool,
pub csc_enable: bool,
pub source_region_width: u32,
pub source_region_height: u32,
pub source_region_horizontal_offset: u32,
pub source_region_vertical_offset: u32,
pub output_frame_width: u32,
pub output_frame_height: u32,
pub scaled_region_size_width: u32,
pub scaled_region_size_height: u32,
pub scaled_region_horizontal_offset: i32,
pub scaled_region_vertical_offset: i32,
pub gray_bar_pixel_u_g: u32,
pub gray_bar_pixel_y_r: u32,
pub gray_bar_pixel_a: u32,
pub gray_bar_pixel_v_b: u32,
pub uv_default_value_for_u_channel: u32,
pub uv_default_value_for_v_channel: u32,
pub alpha_default_value: u32,
pub scaling_factor_height: f32,
pub scaling_factor_width: f32,
pub output_frame_address: u64,
pub output_frame_mocs: u32,
pub output_frame_arbitration_priority_control: HevcArbitrationPriority,
pub output_frame_memory_compression_enable: bool,
pub output_frame_memory_compression_mode: u32,
pub output_frame_cache_select: bool,
pub output_frame_tiled_mode: u32,
pub avs_line_buffer_address: u64,
pub avs_line_buffer_mocs: u32,
pub avs_line_buffer_arbitration_priority_control: HevcArbitrationPriority,
pub avs_line_buffer_memory_compression_enable: bool,
pub avs_line_buffer_memory_compression_mode: u32,
pub avs_line_buffer_cache_select: u32,
pub avs_line_buffer_tiled_mode: u32,
pub ief_line_buffer_address: u64,
pub ief_line_buffer_mocs: u32,
pub ief_line_buffer_arbitration_priority_control: HevcArbitrationPriority,
pub ief_line_buffer_memory_compression_enable: bool,
pub ief_line_buffer_memory_compression_mode: u32,
pub ief_line_buffer_cache_select: u32,
pub ief_line_buffer_tiled_mode: u32,
pub output_surface_tile_walk: u32,
pub output_surface_tiled: bool,
pub output_surface_half_pitch_for_chroma: bool,
pub output_surface_pitch: u32,
pub output_surface_interleave_chroma_enable: bool,
pub output_surface_format: u32,
pub output_surface_y_offset_for_u: u32,
pub output_surface_x_offset_for_u: u32,
pub output_surface_y_offset_for_v: u32,
pub output_surface_x_offset_for_v: u32,
}
impl SfcState {
pub const DWORD_LENGTH: u32 = 32;
pub const BILINEAR_FILTER_ONLY: u32 = 2;
pub const HORIZONTAL_COMPRESSION_MODE: u32 = 0;
pub const LLC: u32 = 0;
pub const TRMODE_NONE: u32 = 0;
pub const TRMODE_TILEYF: u32 = 1;
pub const TRMODE_TILEYS: u32 = 2;
pub const XMAJOR: u32 = 0;
pub const YMAJOR: u32 = 1;
pub const _0: u32 = 0;
pub const _180_CW: u32 = 2;
pub const _270_CW: u32 = 3;
pub const _4_0_0: u32 = 0;
pub const _4_2_0: u32 = 1;
pub const _4_2_2_HORIZONATAL: u32 = 2;
pub const _4_4_4_PROGRESSIVE_INTERLEAVED: u32 = 4;
pub const _5X5_POLY_PHASE_FILTER_BILINEAR: u32 = 0;
pub const _8X8_POLY_PHASE_FILTER_BILINEAR: u32 = 1;
pub const _90_CW: u32 = 1;
}
impl Default for SfcState {
fn default() -> Self {
SfcState {
dword_length: 30,
subopcode_b: 1,
subopcode_a: 0,
media_command_opcode: 10,
pipeline: 2,
command_type: 3,
sfc_pipe_mode: Default::default(),
sfc_input_chroma_sub_sampling: Default::default(),
vd_ve_input_ordering_mode: Default::default(),
input_frame_resolution_width: Default::default(),
input_frame_resolution_height: Default::default(),
output_surface_format_type: Default::default(),
rgba_channel_swap_enable: Default::default(),
pre_avs_chroma_downsampling_enable: Default::default(),
pre_avs_chroma_downsampling_co_siting_position_vertical_direction: Default::default(),
pre_avs_chroma_downsampling_co_siting_position_horizontal_direction: Default::default(),
ief_enable: Default::default(),
skin_tone_tuned_ief_enable: Default::default(),
ief4_smooth_enable: Default::default(),
avs_filter_mode: Default::default(),
adaptive_filter_for_all_channels: Default::default(),
avs_scaling_enable: Default::default(),
bypass_y_adaptive_filtering: Default::default(),
bypass_x_adaptive_filtering: Default::default(),
chroma_upsampling_enable: Default::default(),
rotation_mode: Default::default(),
color_fill_enable: Default::default(),
csc_enable: Default::default(),
source_region_width: Default::default(),
source_region_height: Default::default(),
source_region_horizontal_offset: Default::default(),
source_region_vertical_offset: Default::default(),
output_frame_width: Default::default(),
output_frame_height: Default::default(),
scaled_region_size_width: Default::default(),
scaled_region_size_height: Default::default(),
scaled_region_horizontal_offset: Default::default(),
scaled_region_vertical_offset: Default::default(),
gray_bar_pixel_u_g: Default::default(),
gray_bar_pixel_y_r: Default::default(),
gray_bar_pixel_a: Default::default(),
gray_bar_pixel_v_b: Default::default(),
uv_default_value_for_u_channel: Default::default(),
uv_default_value_for_v_channel: Default::default(),
alpha_default_value: Default::default(),
scaling_factor_height: Default::default(),
scaling_factor_width: Default::default(),
output_frame_address: Default::default(),
output_frame_mocs: Default::default(),
output_frame_arbitration_priority_control: Default::default(),
output_frame_memory_compression_enable: Default::default(),
output_frame_memory_compression_mode: Default::default(),
output_frame_cache_select: Default::default(),
output_frame_tiled_mode: Default::default(),
avs_line_buffer_address: Default::default(),
avs_line_buffer_mocs: Default::default(),
avs_line_buffer_arbitration_priority_control: Default::default(),
avs_line_buffer_memory_compression_enable: Default::default(),
avs_line_buffer_memory_compression_mode: Default::default(),
avs_line_buffer_cache_select: Default::default(),
avs_line_buffer_tiled_mode: Default::default(),
ief_line_buffer_address: Default::default(),
ief_line_buffer_mocs: Default::default(),
ief_line_buffer_arbitration_priority_control: Default::default(),
ief_line_buffer_memory_compression_enable: Default::default(),
ief_line_buffer_memory_compression_mode: Default::default(),
ief_line_buffer_cache_select: Default::default(),
ief_line_buffer_tiled_mode: Default::default(),
output_surface_tile_walk: Default::default(),
output_surface_tiled: Default::default(),
output_surface_half_pitch_for_chroma: Default::default(),
output_surface_pitch: Default::default(),
output_surface_interleave_chroma_enable: Default::default(),
output_surface_format: Default::default(),
output_surface_y_offset_for_u: Default::default(),
output_surface_x_offset_for_u: Default::default(),
output_surface_y_offset_for_v: Default::default(),
output_surface_x_offset_for_v: Default::default(),
}
}
}
impl Serialize for SfcState {
type Out = [u32; 32];
fn pack_into(&self, out: &mut [u32; 32]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.sfc_pipe_mode, 0, 3) |
__gen_uint(self.sfc_input_chroma_sub_sampling, 4, 7) |
__gen_uint(self.vd_ve_input_ordering_mode, 8, 10);
out[2] = __gen_uint(self.input_frame_resolution_width, 0, 11) |
__gen_uint(self.input_frame_resolution_height, 16, 27);
out[3] = __gen_uint(self.output_surface_format_type, 0, 3) |
__gen_uint(self.rgba_channel_swap_enable.into(), 5, 5) |
__gen_uint(self.pre_avs_chroma_downsampling_enable, 6, 7) |
__gen_uint(self.pre_avs_chroma_downsampling_co_siting_position_vertical_direction, 8, 10) |
__gen_uint(self.pre_avs_chroma_downsampling_co_siting_position_horizontal_direction, 12, 14);
out[4] = __gen_uint(self.ief_enable.into(), 0, 0) |
__gen_uint(self.skin_tone_tuned_ief_enable.into(), 1, 1) |
__gen_uint(self.ief4_smooth_enable.into(), 2, 2) |
__gen_uint(self.avs_filter_mode, 4, 5) |
__gen_uint(self.adaptive_filter_for_all_channels.into(), 6, 6) |
__gen_uint(self.avs_scaling_enable.into(), 7, 7) |
__gen_uint(self.bypass_y_adaptive_filtering.into(), 8, 8) |
__gen_uint(self.bypass_x_adaptive_filtering.into(), 9, 9) |
__gen_uint(self.chroma_upsampling_enable.into(), 12, 12) |
__gen_uint(self.rotation_mode, 16, 17) |
__gen_uint(self.color_fill_enable.into(), 18, 18) |
__gen_uint(self.csc_enable.into(), 19, 19);
out[5] = __gen_uint(self.source_region_width, 0, 11) |
__gen_uint(self.source_region_height, 16, 27);
out[6] = __gen_uint(self.source_region_horizontal_offset, 0, 11) |
__gen_uint(self.source_region_vertical_offset, 16, 27);
out[7] = __gen_uint(self.output_frame_width, 0, 11) |
__gen_uint(self.output_frame_height, 16, 27);
out[8] = __gen_uint(self.scaled_region_size_width, 0, 11) |
__gen_uint(self.scaled_region_size_height, 16, 27);
out[9] = __gen_uint(self.scaled_region_horizontal_offset as u32, 0, 12) |
__gen_uint(self.scaled_region_vertical_offset as u32, 16, 28);
out[10] = __gen_uint(self.gray_bar_pixel_u_g, 0, 9) |
__gen_uint(self.gray_bar_pixel_y_r, 16, 25);
out[11] = __gen_uint(self.gray_bar_pixel_a, 0, 9) |
__gen_uint(self.gray_bar_pixel_v_b, 16, 25);
out[12] = __gen_uint(self.uv_default_value_for_u_channel, 0, 9) |
__gen_uint(self.uv_default_value_for_v_channel, 16, 25);
out[13] = __gen_uint(self.alpha_default_value, 0, 9);
out[14] = __gen_ufixed(self.scaling_factor_height, 0, 20, 17);
out[15] = __gen_ufixed(self.scaling_factor_width, 0, 20, 17);
out[16] = 0;
out[17] = __gen_uint(self.output_frame_address as u32, 12, 31);
out[18] = __gen_uint((self.output_frame_address >> 32) as u32, 0, 15);
let mut v19_0 = [0_u32; 1];
self.output_frame_arbitration_priority_control.pack_into(&mut v19_0);
out[19] = __gen_uint(self.output_frame_mocs, 1, 6) |
__gen_uint(v19_0[0], 7, 8) |
__gen_uint(self.output_frame_memory_compression_enable.into(), 9, 9) |
__gen_uint(self.output_frame_memory_compression_mode, 10, 10) |
__gen_uint(self.output_frame_cache_select.into(), 12, 12) |
__gen_uint(self.output_frame_tiled_mode, 13, 14);
out[20] = __gen_uint(self.avs_line_buffer_address as u32, 12, 31);
out[21] = __gen_uint((self.avs_line_buffer_address >> 32) as u32, 0, 15);
let mut v22_0 = [0_u32; 1];
self.avs_line_buffer_arbitration_priority_control.pack_into(&mut v22_0);
out[22] = __gen_uint(self.avs_line_buffer_mocs, 1, 6) |
__gen_uint(v22_0[0], 7, 8) |
__gen_uint(self.avs_line_buffer_memory_compression_enable.into(), 9, 9) |
__gen_uint(self.avs_line_buffer_memory_compression_mode, 10, 10) |
__gen_uint(self.avs_line_buffer_cache_select, 12, 12) |
__gen_uint(self.avs_line_buffer_tiled_mode, 13, 14);
out[23] = __gen_uint(self.ief_line_buffer_address as u32, 12, 31);
out[24] = __gen_uint((self.ief_line_buffer_address >> 32) as u32, 0, 15);
let mut v25_0 = [0_u32; 1];
self.ief_line_buffer_arbitration_priority_control.pack_into(&mut v25_0);
out[25] = __gen_uint(self.ief_line_buffer_mocs, 1, 6) |
__gen_uint(v25_0[0], 7, 8) |
__gen_uint(self.ief_line_buffer_memory_compression_enable.into(), 9, 9) |
__gen_uint(self.ief_line_buffer_memory_compression_mode, 10, 10) |
__gen_uint(self.ief_line_buffer_cache_select, 12, 12) |
__gen_uint(self.ief_line_buffer_tiled_mode, 13, 14);
out[26] = 0;
out[27] = 0;
out[28] = 0;
out[29] = __gen_uint(self.output_surface_tile_walk, 0, 0) |
__gen_uint(self.output_surface_tiled.into(), 1, 1) |
__gen_uint(self.output_surface_half_pitch_for_chroma.into(), 2, 2) |
__gen_uint(self.output_surface_pitch, 3, 19) |
__gen_uint(self.output_surface_interleave_chroma_enable.into(), 27, 27) |
__gen_uint(self.output_surface_format, 28, 31);
out[30] = __gen_uint(self.output_surface_y_offset_for_u, 0, 13) |
__gen_uint(self.output_surface_x_offset_for_u, 16, 29);
out[31] = __gen_uint(self.output_surface_y_offset_for_v, 0, 13) |
__gen_uint(self.output_surface_x_offset_for_v, 16, 29);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 32];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 32] as *const [u8; 128]) })
}
}
impl From<&[u32; 32]> for SfcState {
fn from(input: &[u32; 32]) -> Self {
SfcState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
sfc_pipe_mode: __gen_unuint(input[1], 0, 3),
sfc_input_chroma_sub_sampling: __gen_unuint(input[1], 4, 7),
vd_ve_input_ordering_mode: __gen_unuint(input[1], 8, 10),
input_frame_resolution_width: __gen_unuint(input[2], 0, 11),
input_frame_resolution_height: __gen_unuint(input[2], 16, 27),
output_surface_format_type: __gen_unuint(input[3], 0, 3),
rgba_channel_swap_enable: __gen_unuint(input[3], 5, 5) != 0,
pre_avs_chroma_downsampling_enable: __gen_unuint(input[3], 6, 7),
pre_avs_chroma_downsampling_co_siting_position_vertical_direction: __gen_unuint(input[3], 8, 10),
pre_avs_chroma_downsampling_co_siting_position_horizontal_direction: __gen_unuint(input[3], 12, 14),
ief_enable: __gen_unuint(input[4], 0, 0) != 0,
skin_tone_tuned_ief_enable: __gen_unuint(input[4], 1, 1) != 0,
ief4_smooth_enable: __gen_unuint(input[4], 2, 2) != 0,
avs_filter_mode: __gen_unuint(input[4], 4, 5),
adaptive_filter_for_all_channels: __gen_unuint(input[4], 6, 6) != 0,
avs_scaling_enable: __gen_unuint(input[4], 7, 7) != 0,
bypass_y_adaptive_filtering: __gen_unuint(input[4], 8, 8) != 0,
bypass_x_adaptive_filtering: __gen_unuint(input[4], 9, 9) != 0,
chroma_upsampling_enable: __gen_unuint(input[4], 12, 12) != 0,
rotation_mode: __gen_unuint(input[4], 16, 17),
color_fill_enable: __gen_unuint(input[4], 18, 18) != 0,
csc_enable: __gen_unuint(input[4], 19, 19) != 0,
source_region_width: __gen_unuint(input[5], 0, 11),
source_region_height: __gen_unuint(input[5], 16, 27),
source_region_horizontal_offset: __gen_unuint(input[6], 0, 11),
source_region_vertical_offset: __gen_unuint(input[6], 16, 27),
output_frame_width: __gen_unuint(input[7], 0, 11),
output_frame_height: __gen_unuint(input[7], 16, 27),
scaled_region_size_width: __gen_unuint(input[8], 0, 11),
scaled_region_size_height: __gen_unuint(input[8], 16, 27),
scaled_region_horizontal_offset: (__gen_unuint(input[9], 0, 12)) as i32,
scaled_region_vertical_offset: (__gen_unuint(input[9], 16, 28)) as i32,
gray_bar_pixel_u_g: __gen_unuint(input[10], 0, 9),
gray_bar_pixel_y_r: __gen_unuint(input[10], 16, 25),
gray_bar_pixel_a: __gen_unuint(input[11], 0, 9),
gray_bar_pixel_v_b: __gen_unuint(input[11], 16, 25),
uv_default_value_for_u_channel: __gen_unuint(input[12], 0, 9),
uv_default_value_for_v_channel: __gen_unuint(input[12], 16, 25),
alpha_default_value: __gen_unuint(input[13], 0, 9),
scaling_factor_height: __gen_unufixed(input[14], 0, 20, 17),
scaling_factor_width: __gen_unufixed(input[15], 0, 20, 17),
output_frame_address: (__gen_unuint(input[17], 12, 31) as u64) |
(__gen_unuint(input[18], 0, 15) as u64) << 20,
output_frame_mocs: __gen_unuint(input[19], 1, 6),
output_frame_arbitration_priority_control: {{
let i: [u32; 1] = [__gen_unuint(input[19], 7, 8)];
(&i).into()
}},
output_frame_memory_compression_enable: __gen_unuint(input[19], 9, 9) != 0,
output_frame_memory_compression_mode: __gen_unuint(input[19], 10, 10),
output_frame_cache_select: __gen_unuint(input[19], 12, 12) != 0,
output_frame_tiled_mode: __gen_unuint(input[19], 13, 14),
avs_line_buffer_address: (__gen_unuint(input[20], 12, 31) as u64) |
(__gen_unuint(input[21], 0, 15) as u64) << 20,
avs_line_buffer_mocs: __gen_unuint(input[22], 1, 6),
avs_line_buffer_arbitration_priority_control: {{
let i: [u32; 1] = [__gen_unuint(input[22], 7, 8)];
(&i).into()
}},
avs_line_buffer_memory_compression_enable: __gen_unuint(input[22], 9, 9) != 0,
avs_line_buffer_memory_compression_mode: __gen_unuint(input[22], 10, 10),
avs_line_buffer_cache_select: __gen_unuint(input[22], 12, 12),
avs_line_buffer_tiled_mode: __gen_unuint(input[22], 13, 14),
ief_line_buffer_address: (__gen_unuint(input[23], 12, 31) as u64) |
(__gen_unuint(input[24], 0, 15) as u64) << 20,
ief_line_buffer_mocs: __gen_unuint(input[25], 1, 6),
ief_line_buffer_arbitration_priority_control: {{
let i: [u32; 1] = [__gen_unuint(input[25], 7, 8)];
(&i).into()
}},
ief_line_buffer_memory_compression_enable: __gen_unuint(input[25], 9, 9) != 0,
ief_line_buffer_memory_compression_mode: __gen_unuint(input[25], 10, 10),
ief_line_buffer_cache_select: __gen_unuint(input[25], 12, 12),
ief_line_buffer_tiled_mode: __gen_unuint(input[25], 13, 14),
output_surface_tile_walk: __gen_unuint(input[29], 0, 0),
output_surface_tiled: __gen_unuint(input[29], 1, 1) != 0,
output_surface_half_pitch_for_chroma: __gen_unuint(input[29], 2, 2) != 0,
output_surface_pitch: __gen_unuint(input[29], 3, 19),
output_surface_interleave_chroma_enable: __gen_unuint(input[29], 27, 27) != 0,
output_surface_format: __gen_unuint(input[29], 28, 31),
output_surface_y_offset_for_u: __gen_unuint(input[30], 0, 13),
output_surface_x_offset_for_u: __gen_unuint(input[30], 16, 29),
output_surface_y_offset_for_v: __gen_unuint(input[31], 0, 13),
output_surface_x_offset_for_v: __gen_unuint(input[31], 16, 29),
}
}
}
impl Deserialize for SfcState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 32];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 32] as *mut [u8; 128]) })?;
Ok((&input).into())
}
}
pub struct SoDecl {
pub component_mask: u32,
pub register_index: u32,
pub hole_flag: bool,
pub output_buffer_slot: u32,
}
impl SoDecl {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for SoDecl {
fn default() -> Self {
SoDecl {
component_mask: 0,
register_index: Default::default(),
hole_flag: Default::default(),
output_buffer_slot: Default::default(),
}
}
}
impl Serialize for SoDecl {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.component_mask, 0, 3) |
__gen_uint(self.register_index, 4, 9) |
__gen_uint(self.hole_flag.into(), 11, 11) |
__gen_uint(self.output_buffer_slot, 12, 13);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for SoDecl {
fn from(input: &[u32; 1]) -> Self {
SoDecl {
component_mask: __gen_unuint(input[0], 0, 3),
register_index: __gen_unuint(input[0], 4, 9),
hole_flag: __gen_unuint(input[0], 11, 11) != 0,
output_buffer_slot: __gen_unuint(input[0], 12, 13),
}
}
}
impl Deserialize for SoDecl {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct SoDeclEntry {
pub stream_0_decl: SoDecl,
pub stream_1_decl: SoDecl,
pub stream_2_decl: SoDecl,
pub stream_3_decl: SoDecl,
}
impl SoDeclEntry {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for SoDeclEntry {
fn default() -> Self {
SoDeclEntry {
stream_0_decl: Default::default(),
stream_1_decl: Default::default(),
stream_2_decl: Default::default(),
stream_3_decl: Default::default(),
}
}
}
impl Serialize for SoDeclEntry {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
let mut v0_0 = [0_u32; 1];
self.stream_0_decl.pack_into(&mut v0_0);
let mut v0_1 = [0_u32; 1];
self.stream_1_decl.pack_into(&mut v0_1);
out[0] = __gen_uint(v0_0[0], 0, 15) |
__gen_uint(v0_1[0], 16, 31);
let mut v1_0 = [0_u32; 1];
self.stream_2_decl.pack_into(&mut v1_0);
let mut v1_1 = [0_u32; 1];
self.stream_3_decl.pack_into(&mut v1_1);
out[1] = __gen_uint(v1_0[0], 0, 15) |
__gen_uint(v1_1[0], 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SoDeclEntry {
fn from(input: &[u32; 2]) -> Self {
SoDeclEntry {
stream_0_decl: {{
let [ref in0 @ .., _] = input;
in0.into()
}},
stream_1_decl: {{
let i: [u32; 1] = [__gen_unuint(input[0], 16, 31)];
(&i).into()
}},
stream_2_decl: {{
let [_, ref in1 @ ..] = input;
in1.into()
}},
stream_3_decl: {{
let i: [u32; 1] = [__gen_unuint(input[1], 16, 31)];
(&i).into()
}},
}
}
}
impl Deserialize for SoDeclEntry {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SoNumPrimsWritten0 {
pub num_prims_written_count: u64,
}
impl SoNumPrimsWritten0 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x5200;
}
impl Default for SoNumPrimsWritten0 {
fn default() -> Self {
SoNumPrimsWritten0 {
num_prims_written_count: Default::default(),
}
}
}
impl Serialize for SoNumPrimsWritten0 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.num_prims_written_count as u32, 0, 31);
out[1] = __gen_uint((self.num_prims_written_count >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SoNumPrimsWritten0 {
fn from(input: &[u32; 2]) -> Self {
SoNumPrimsWritten0 {
num_prims_written_count: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for SoNumPrimsWritten0 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SoNumPrimsWritten1 {
pub num_prims_written_count: u64,
}
impl SoNumPrimsWritten1 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x5208;
}
impl Default for SoNumPrimsWritten1 {
fn default() -> Self {
SoNumPrimsWritten1 {
num_prims_written_count: Default::default(),
}
}
}
impl Serialize for SoNumPrimsWritten1 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.num_prims_written_count as u32, 0, 31);
out[1] = __gen_uint((self.num_prims_written_count >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SoNumPrimsWritten1 {
fn from(input: &[u32; 2]) -> Self {
SoNumPrimsWritten1 {
num_prims_written_count: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for SoNumPrimsWritten1 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SoNumPrimsWritten2 {
pub num_prims_written_count: u64,
}
impl SoNumPrimsWritten2 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x5210;
}
impl Default for SoNumPrimsWritten2 {
fn default() -> Self {
SoNumPrimsWritten2 {
num_prims_written_count: Default::default(),
}
}
}
impl Serialize for SoNumPrimsWritten2 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.num_prims_written_count as u32, 0, 31);
out[1] = __gen_uint((self.num_prims_written_count >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SoNumPrimsWritten2 {
fn from(input: &[u32; 2]) -> Self {
SoNumPrimsWritten2 {
num_prims_written_count: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for SoNumPrimsWritten2 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SoNumPrimsWritten3 {
pub num_prims_written_count: u64,
}
impl SoNumPrimsWritten3 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x5218;
}
impl Default for SoNumPrimsWritten3 {
fn default() -> Self {
SoNumPrimsWritten3 {
num_prims_written_count: Default::default(),
}
}
}
impl Serialize for SoNumPrimsWritten3 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.num_prims_written_count as u32, 0, 31);
out[1] = __gen_uint((self.num_prims_written_count >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SoNumPrimsWritten3 {
fn from(input: &[u32; 2]) -> Self {
SoNumPrimsWritten3 {
num_prims_written_count: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for SoNumPrimsWritten3 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SoPrimStorageNeeded0 {
pub prim_storage_needed_count: u64,
}
impl SoPrimStorageNeeded0 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x5240;
}
impl Default for SoPrimStorageNeeded0 {
fn default() -> Self {
SoPrimStorageNeeded0 {
prim_storage_needed_count: Default::default(),
}
}
}
impl Serialize for SoPrimStorageNeeded0 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.prim_storage_needed_count as u32, 0, 31);
out[1] = __gen_uint((self.prim_storage_needed_count >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SoPrimStorageNeeded0 {
fn from(input: &[u32; 2]) -> Self {
SoPrimStorageNeeded0 {
prim_storage_needed_count: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for SoPrimStorageNeeded0 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SoPrimStorageNeeded1 {
pub prim_storage_needed_count: u64,
}
impl SoPrimStorageNeeded1 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x5248;
}
impl Default for SoPrimStorageNeeded1 {
fn default() -> Self {
SoPrimStorageNeeded1 {
prim_storage_needed_count: Default::default(),
}
}
}
impl Serialize for SoPrimStorageNeeded1 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.prim_storage_needed_count as u32, 0, 31);
out[1] = __gen_uint((self.prim_storage_needed_count >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SoPrimStorageNeeded1 {
fn from(input: &[u32; 2]) -> Self {
SoPrimStorageNeeded1 {
prim_storage_needed_count: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for SoPrimStorageNeeded1 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SoPrimStorageNeeded2 {
pub prim_storage_needed_count: u64,
}
impl SoPrimStorageNeeded2 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x5250;
}
impl Default for SoPrimStorageNeeded2 {
fn default() -> Self {
SoPrimStorageNeeded2 {
prim_storage_needed_count: Default::default(),
}
}
}
impl Serialize for SoPrimStorageNeeded2 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.prim_storage_needed_count as u32, 0, 31);
out[1] = __gen_uint((self.prim_storage_needed_count >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SoPrimStorageNeeded2 {
fn from(input: &[u32; 2]) -> Self {
SoPrimStorageNeeded2 {
prim_storage_needed_count: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for SoPrimStorageNeeded2 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SoPrimStorageNeeded3 {
pub prim_storage_needed_count: u64,
}
impl SoPrimStorageNeeded3 {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x5258;
}
impl Default for SoPrimStorageNeeded3 {
fn default() -> Self {
SoPrimStorageNeeded3 {
prim_storage_needed_count: Default::default(),
}
}
}
impl Serialize for SoPrimStorageNeeded3 {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.prim_storage_needed_count as u32, 0, 31);
out[1] = __gen_uint((self.prim_storage_needed_count >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for SoPrimStorageNeeded3 {
fn from(input: &[u32; 2]) -> Self {
SoPrimStorageNeeded3 {
prim_storage_needed_count: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for SoPrimStorageNeeded3 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct SoWriteOffset0 {
pub write_offset: u64,
}
impl SoWriteOffset0 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x5280;
}
impl Default for SoWriteOffset0 {
fn default() -> Self {
SoWriteOffset0 {
write_offset: Default::default(),
}
}
}
impl Serialize for SoWriteOffset0 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_offset(self.write_offset as u32, 2, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for SoWriteOffset0 {
fn from(input: &[u32; 1]) -> Self {
SoWriteOffset0 {
write_offset: (__gen_unuint(input[0], 2, 31) as u64) << 2,
}
}
}
impl Deserialize for SoWriteOffset0 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct SoWriteOffset1 {
pub write_offset: u64,
}
impl SoWriteOffset1 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x5284;
}
impl Default for SoWriteOffset1 {
fn default() -> Self {
SoWriteOffset1 {
write_offset: Default::default(),
}
}
}
impl Serialize for SoWriteOffset1 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_offset(self.write_offset as u32, 2, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for SoWriteOffset1 {
fn from(input: &[u32; 1]) -> Self {
SoWriteOffset1 {
write_offset: (__gen_unuint(input[0], 2, 31) as u64) << 2,
}
}
}
impl Deserialize for SoWriteOffset1 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct SoWriteOffset2 {
pub write_offset: u64,
}
impl SoWriteOffset2 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x5288;
}
impl Default for SoWriteOffset2 {
fn default() -> Self {
SoWriteOffset2 {
write_offset: Default::default(),
}
}
}
impl Serialize for SoWriteOffset2 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_offset(self.write_offset as u32, 2, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for SoWriteOffset2 {
fn from(input: &[u32; 1]) -> Self {
SoWriteOffset2 {
write_offset: (__gen_unuint(input[0], 2, 31) as u64) << 2,
}
}
}
impl Deserialize for SoWriteOffset2 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct SoWriteOffset3 {
pub write_offset: u64,
}
impl SoWriteOffset3 {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x528c;
}
impl Default for SoWriteOffset3 {
fn default() -> Self {
SoWriteOffset3 {
write_offset: Default::default(),
}
}
}
impl Serialize for SoWriteOffset3 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_offset(self.write_offset as u32, 2, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for SoWriteOffset3 {
fn from(input: &[u32; 1]) -> Self {
SoWriteOffset3 {
write_offset: (__gen_unuint(input[0], 2, 31) as u64) << 2,
}
}
}
impl Deserialize for SoWriteOffset3 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct StateBaseAddress<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub general_state_base_address_modify_enable: bool,
pub general_state_mocs: u32,
pub general_state_base_address: A,
pub stateless_data_port_access_mocs: u32,
pub surface_state_base_address_modify_enable: bool,
pub surface_state_mocs: u32,
pub surface_state_base_address: A,
pub dynamic_state_base_address_modify_enable: bool,
pub dynamic_state_mocs: u32,
pub dynamic_state_base_address: A,
pub indirect_object_base_address_modify_enable: bool,
pub indirect_object_mocs: u32,
pub indirect_object_base_address: A,
pub instruction_base_address_modify_enable: bool,
pub instruction_mocs: u32,
pub instruction_base_address: A,
pub general_state_buffer_size_modify_enable: bool,
pub general_state_buffer_size: u32,
pub dynamic_state_buffer_size_modify_enable: bool,
pub dynamic_state_buffer_size: u32,
pub indirect_object_buffer_size_modify_enable: bool,
pub indirect_object_buffer_size: u32,
pub instruction_buffer_size_modify_enable: bool,
pub instruction_buffer_size: u32,
pub bindless_surface_state_base_address_modify_enable: bool,
pub bindless_surface_state_mocs: u32,
pub bindless_surface_state_base_address: A,
pub bindless_surface_state_size: u32,
pub bindless_sampler_state_base_address_modify_enable: bool,
pub bindless_sampler_state_mocs: u32,
pub bindless_sampler_state_base_address: A,
pub bindless_sampler_state_buffer_size: u32,
}
impl<A: Addr + Default> StateBaseAddress<A> {
pub const DWORD_LENGTH: u32 = 22;
}
impl<A: Addr + Default> Default for StateBaseAddress<A> {
fn default() -> Self {
StateBaseAddress {
dword_length: 20,
_3d_command_sub_opcode: 1,
_3d_command_opcode: 1,
command_subtype: 0,
command_type: 3,
general_state_base_address_modify_enable: Default::default(),
general_state_mocs: Default::default(),
general_state_base_address: Default::default(),
stateless_data_port_access_mocs: Default::default(),
surface_state_base_address_modify_enable: Default::default(),
surface_state_mocs: Default::default(),
surface_state_base_address: Default::default(),
dynamic_state_base_address_modify_enable: Default::default(),
dynamic_state_mocs: Default::default(),
dynamic_state_base_address: Default::default(),
indirect_object_base_address_modify_enable: Default::default(),
indirect_object_mocs: Default::default(),
indirect_object_base_address: Default::default(),
instruction_base_address_modify_enable: Default::default(),
instruction_mocs: Default::default(),
instruction_base_address: Default::default(),
general_state_buffer_size_modify_enable: Default::default(),
general_state_buffer_size: Default::default(),
dynamic_state_buffer_size_modify_enable: Default::default(),
dynamic_state_buffer_size: Default::default(),
indirect_object_buffer_size_modify_enable: Default::default(),
indirect_object_buffer_size: Default::default(),
instruction_buffer_size_modify_enable: Default::default(),
instruction_buffer_size: Default::default(),
bindless_surface_state_base_address_modify_enable: Default::default(),
bindless_surface_state_mocs: Default::default(),
bindless_surface_state_base_address: Default::default(),
bindless_surface_state_size: Default::default(),
bindless_sampler_state_base_address_modify_enable: Default::default(),
bindless_sampler_state_mocs: Default::default(),
bindless_sampler_state_base_address: Default::default(),
bindless_sampler_state_buffer_size: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for StateBaseAddress<A> {
type Out = [u32; 22];
fn pack_into(&self, out: &mut [u32; 22]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.general_state_base_address_modify_enable.into(), 0, 0) |
__gen_uint(self.general_state_mocs, 4, 10);
let v1_address = self.general_state_base_address.combine(v1);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.stateless_data_port_access_mocs, 16, 22);
let v4 = __gen_uint(self.surface_state_base_address_modify_enable.into(), 0, 0) |
__gen_uint(self.surface_state_mocs, 4, 10);
let v4_address = self.surface_state_base_address.combine(v4);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
let v6 = __gen_uint(self.dynamic_state_base_address_modify_enable.into(), 0, 0) |
__gen_uint(self.dynamic_state_mocs, 4, 10);
let v6_address = self.dynamic_state_base_address.combine(v6);
out[6] = v6_address as u32;
out[7] = (v6_address >> 32) as u32;
let v8 = __gen_uint(self.indirect_object_base_address_modify_enable.into(), 0, 0) |
__gen_uint(self.indirect_object_mocs, 4, 10);
let v8_address = self.indirect_object_base_address.combine(v8);
out[8] = v8_address as u32;
out[9] = (v8_address >> 32) as u32;
let v10 = __gen_uint(self.instruction_base_address_modify_enable.into(), 0, 0) |
__gen_uint(self.instruction_mocs, 4, 10);
let v10_address = self.instruction_base_address.combine(v10);
out[10] = v10_address as u32;
out[11] = (v10_address >> 32) as u32;
out[12] = __gen_uint(self.general_state_buffer_size_modify_enable.into(), 0, 0) |
__gen_uint(self.general_state_buffer_size, 12, 31);
out[13] = __gen_uint(self.dynamic_state_buffer_size_modify_enable.into(), 0, 0) |
__gen_uint(self.dynamic_state_buffer_size, 12, 31);
out[14] = __gen_uint(self.indirect_object_buffer_size_modify_enable.into(), 0, 0) |
__gen_uint(self.indirect_object_buffer_size, 12, 31);
out[15] = __gen_uint(self.instruction_buffer_size_modify_enable.into(), 0, 0) |
__gen_uint(self.instruction_buffer_size, 12, 31);
let v16 = __gen_uint(self.bindless_surface_state_base_address_modify_enable.into(), 0, 0) |
__gen_uint(self.bindless_surface_state_mocs, 4, 10);
let v16_address = self.bindless_surface_state_base_address.combine(v16);
out[16] = v16_address as u32;
out[17] = (v16_address >> 32) as u32;
out[18] = __gen_uint(self.bindless_surface_state_size, 12, 31);
let v19 = __gen_uint(self.bindless_sampler_state_base_address_modify_enable.into(), 0, 0) |
__gen_uint(self.bindless_sampler_state_mocs, 4, 10);
let v19_address = self.bindless_sampler_state_base_address.combine(v19);
out[19] = v19_address as u32;
out[20] = (v19_address >> 32) as u32;
out[21] = __gen_uint(self.bindless_sampler_state_buffer_size, 12, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 22];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 22] as *const [u8; 88]) })
}
}
impl From<&[u32; 22]> for StateBaseAddress<u64> {
fn from(input: &[u32; 22]) -> Self {
StateBaseAddress {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
general_state_base_address_modify_enable: __gen_unuint(input[1], 0, 0) != 0,
general_state_mocs: __gen_unuint(input[1], 4, 10),
general_state_base_address: (__gen_unuint(input[1], 12, 31) as u64) << 12 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
stateless_data_port_access_mocs: __gen_unuint(input[3], 16, 22),
surface_state_base_address_modify_enable: __gen_unuint(input[4], 0, 0) != 0,
surface_state_mocs: __gen_unuint(input[4], 4, 10),
surface_state_base_address: (__gen_unuint(input[4], 12, 31) as u64) << 12 |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
dynamic_state_base_address_modify_enable: __gen_unuint(input[6], 0, 0) != 0,
dynamic_state_mocs: __gen_unuint(input[6], 4, 10),
dynamic_state_base_address: (__gen_unuint(input[6], 12, 31) as u64) << 12 |
(__gen_unuint(input[7], 0, 31) as u64) << 32,
indirect_object_base_address_modify_enable: __gen_unuint(input[8], 0, 0) != 0,
indirect_object_mocs: __gen_unuint(input[8], 4, 10),
indirect_object_base_address: (__gen_unuint(input[8], 12, 31) as u64) << 12 |
(__gen_unuint(input[9], 0, 31) as u64) << 32,
instruction_base_address_modify_enable: __gen_unuint(input[10], 0, 0) != 0,
instruction_mocs: __gen_unuint(input[10], 4, 10),
instruction_base_address: (__gen_unuint(input[10], 12, 31) as u64) << 12 |
(__gen_unuint(input[11], 0, 31) as u64) << 32,
general_state_buffer_size_modify_enable: __gen_unuint(input[12], 0, 0) != 0,
general_state_buffer_size: __gen_unuint(input[12], 12, 31),
dynamic_state_buffer_size_modify_enable: __gen_unuint(input[13], 0, 0) != 0,
dynamic_state_buffer_size: __gen_unuint(input[13], 12, 31),
indirect_object_buffer_size_modify_enable: __gen_unuint(input[14], 0, 0) != 0,
indirect_object_buffer_size: __gen_unuint(input[14], 12, 31),
instruction_buffer_size_modify_enable: __gen_unuint(input[15], 0, 0) != 0,
instruction_buffer_size: __gen_unuint(input[15], 12, 31),
bindless_surface_state_base_address_modify_enable: __gen_unuint(input[16], 0, 0) != 0,
bindless_surface_state_mocs: __gen_unuint(input[16], 4, 10),
bindless_surface_state_base_address: (__gen_unuint(input[16], 12, 31) as u64) << 12 |
(__gen_unuint(input[17], 0, 31) as u64) << 32,
bindless_surface_state_size: __gen_unuint(input[18], 12, 31),
bindless_sampler_state_base_address_modify_enable: __gen_unuint(input[19], 0, 0) != 0,
bindless_sampler_state_mocs: __gen_unuint(input[19], 4, 10),
bindless_sampler_state_base_address: (__gen_unuint(input[19], 12, 31) as u64) << 12 |
(__gen_unuint(input[20], 0, 31) as u64) << 32,
bindless_sampler_state_buffer_size: __gen_unuint(input[21], 12, 31),
}
}
}
impl Deserialize for StateBaseAddress<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 22];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 22] as *mut [u8; 88]) })?;
Ok((&input).into())
}
}
pub struct StateSip {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub system_instruction_pointer: u64,
}
impl StateSip {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for StateSip {
fn default() -> Self {
StateSip {
dword_length: 1,
_3d_command_sub_opcode: 2,
_3d_command_opcode: 1,
command_subtype: 0,
command_type: 3,
system_instruction_pointer: Default::default(),
}
}
}
impl Serialize for StateSip {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.system_instruction_pointer as u32, 4, 31);
out[2] = __gen_offset((self.system_instruction_pointer >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for StateSip {
fn from(input: &[u32; 3]) -> Self {
StateSip {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
system_instruction_pointer: (__gen_unuint(input[1], 4, 31) as u64) << 4 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for StateSip {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct VcsInstdone {
pub ring_enable: bool,
pub usb_done: bool,
pub qrc_done: bool,
pub sec_done: bool,
pub mpc_done: bool,
pub vft_done: bool,
pub bsp_done: bool,
pub vlf_done: bool,
pub vop_done: bool,
pub vmc_done: bool,
pub vip_done: bool,
pub vit_done: bool,
pub vds_done: bool,
pub vmx_done: bool,
pub vcp_done: bool,
pub vcd_done: bool,
pub vad_done: bool,
pub vmd_done: bool,
pub vis_done: bool,
pub vac_done: bool,
pub vam_done: bool,
pub jpg_done: bool,
pub vbp_done: bool,
pub vhr_done: bool,
pub vci_done: bool,
pub vcr_done: bool,
pub vin_done: bool,
pub vpr_done: bool,
pub vtq_done: bool,
pub reserved: bool,
pub vcs_done: bool,
pub gac_done: bool,
}
impl VcsInstdone {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x1206c;
}
impl Default for VcsInstdone {
fn default() -> Self {
VcsInstdone {
ring_enable: Default::default(),
usb_done: Default::default(),
qrc_done: Default::default(),
sec_done: Default::default(),
mpc_done: Default::default(),
vft_done: Default::default(),
bsp_done: Default::default(),
vlf_done: Default::default(),
vop_done: Default::default(),
vmc_done: Default::default(),
vip_done: Default::default(),
vit_done: Default::default(),
vds_done: Default::default(),
vmx_done: Default::default(),
vcp_done: Default::default(),
vcd_done: Default::default(),
vad_done: Default::default(),
vmd_done: Default::default(),
vis_done: Default::default(),
vac_done: Default::default(),
vam_done: Default::default(),
jpg_done: Default::default(),
vbp_done: Default::default(),
vhr_done: Default::default(),
vci_done: Default::default(),
vcr_done: Default::default(),
vin_done: Default::default(),
vpr_done: Default::default(),
vtq_done: Default::default(),
reserved: Default::default(),
vcs_done: Default::default(),
gac_done: Default::default(),
}
}
}
impl Serialize for VcsInstdone {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.ring_enable.into(), 0, 0) |
__gen_uint(self.usb_done.into(), 1, 1) |
__gen_uint(self.qrc_done.into(), 2, 2) |
__gen_uint(self.sec_done.into(), 3, 3) |
__gen_uint(self.mpc_done.into(), 4, 4) |
__gen_uint(self.vft_done.into(), 5, 5) |
__gen_uint(self.bsp_done.into(), 6, 6) |
__gen_uint(self.vlf_done.into(), 7, 7) |
__gen_uint(self.vop_done.into(), 8, 8) |
__gen_uint(self.vmc_done.into(), 9, 9) |
__gen_uint(self.vip_done.into(), 10, 10) |
__gen_uint(self.vit_done.into(), 11, 11) |
__gen_uint(self.vds_done.into(), 12, 12) |
__gen_uint(self.vmx_done.into(), 13, 13) |
__gen_uint(self.vcp_done.into(), 14, 14) |
__gen_uint(self.vcd_done.into(), 15, 15) |
__gen_uint(self.vad_done.into(), 16, 16) |
__gen_uint(self.vmd_done.into(), 17, 17) |
__gen_uint(self.vis_done.into(), 18, 18) |
__gen_uint(self.vac_done.into(), 19, 19) |
__gen_uint(self.vam_done.into(), 20, 20) |
__gen_uint(self.jpg_done.into(), 21, 21) |
__gen_uint(self.vbp_done.into(), 22, 22) |
__gen_uint(self.vhr_done.into(), 23, 23) |
__gen_uint(self.vci_done.into(), 24, 24) |
__gen_uint(self.vcr_done.into(), 25, 25) |
__gen_uint(self.vin_done.into(), 26, 26) |
__gen_uint(self.vpr_done.into(), 27, 27) |
__gen_uint(self.vtq_done.into(), 28, 28) |
__gen_uint(self.reserved.into(), 29, 29) |
__gen_uint(self.vcs_done.into(), 30, 30) |
__gen_uint(self.gac_done.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for VcsInstdone {
fn from(input: &[u32; 1]) -> Self {
VcsInstdone {
ring_enable: __gen_unuint(input[0], 0, 0) != 0,
usb_done: __gen_unuint(input[0], 1, 1) != 0,
qrc_done: __gen_unuint(input[0], 2, 2) != 0,
sec_done: __gen_unuint(input[0], 3, 3) != 0,
mpc_done: __gen_unuint(input[0], 4, 4) != 0,
vft_done: __gen_unuint(input[0], 5, 5) != 0,
bsp_done: __gen_unuint(input[0], 6, 6) != 0,
vlf_done: __gen_unuint(input[0], 7, 7) != 0,
vop_done: __gen_unuint(input[0], 8, 8) != 0,
vmc_done: __gen_unuint(input[0], 9, 9) != 0,
vip_done: __gen_unuint(input[0], 10, 10) != 0,
vit_done: __gen_unuint(input[0], 11, 11) != 0,
vds_done: __gen_unuint(input[0], 12, 12) != 0,
vmx_done: __gen_unuint(input[0], 13, 13) != 0,
vcp_done: __gen_unuint(input[0], 14, 14) != 0,
vcd_done: __gen_unuint(input[0], 15, 15) != 0,
vad_done: __gen_unuint(input[0], 16, 16) != 0,
vmd_done: __gen_unuint(input[0], 17, 17) != 0,
vis_done: __gen_unuint(input[0], 18, 18) != 0,
vac_done: __gen_unuint(input[0], 19, 19) != 0,
vam_done: __gen_unuint(input[0], 20, 20) != 0,
jpg_done: __gen_unuint(input[0], 21, 21) != 0,
vbp_done: __gen_unuint(input[0], 22, 22) != 0,
vhr_done: __gen_unuint(input[0], 23, 23) != 0,
vci_done: __gen_unuint(input[0], 24, 24) != 0,
vcr_done: __gen_unuint(input[0], 25, 25) != 0,
vin_done: __gen_unuint(input[0], 26, 26) != 0,
vpr_done: __gen_unuint(input[0], 27, 27) != 0,
vtq_done: __gen_unuint(input[0], 28, 28) != 0,
reserved: __gen_unuint(input[0], 29, 29) != 0,
vcs_done: __gen_unuint(input[0], 30, 30) != 0,
gac_done: __gen_unuint(input[0], 31, 31) != 0,
}
}
}
impl Deserialize for VcsInstdone {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct VdPipelineFlush {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub hevc_pipeline_done: bool,
pub vd_enc_pipeline_done: bool,
pub mfx_pipeline_done: bool,
pub vd_command_message_parser_done: bool,
pub hevc_pipeline_command_flush: bool,
pub vd_enc_pipeline_command_flush: bool,
pub mfx_pipeline_command_flush: bool,
}
impl VdPipelineFlush {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for VdPipelineFlush {
fn default() -> Self {
VdPipelineFlush {
dword_length: 0,
subopcode_b: 0,
subopcode_a: 0,
media_command_opcode: 15,
pipeline: 2,
command_type: 3,
hevc_pipeline_done: Default::default(),
vd_enc_pipeline_done: Default::default(),
mfx_pipeline_done: Default::default(),
vd_command_message_parser_done: Default::default(),
hevc_pipeline_command_flush: Default::default(),
vd_enc_pipeline_command_flush: Default::default(),
mfx_pipeline_command_flush: Default::default(),
}
}
}
impl Serialize for VdPipelineFlush {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.hevc_pipeline_done.into(), 0, 0) |
__gen_uint(self.vd_enc_pipeline_done.into(), 1, 1) |
__gen_uint(self.mfx_pipeline_done.into(), 3, 3) |
__gen_uint(self.vd_command_message_parser_done.into(), 4, 4) |
__gen_uint(self.hevc_pipeline_command_flush.into(), 16, 16) |
__gen_uint(self.vd_enc_pipeline_command_flush.into(), 17, 17) |
__gen_uint(self.mfx_pipeline_command_flush.into(), 19, 19);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for VdPipelineFlush {
fn from(input: &[u32; 2]) -> Self {
VdPipelineFlush {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
hevc_pipeline_done: __gen_unuint(input[1], 0, 0) != 0,
vd_enc_pipeline_done: __gen_unuint(input[1], 1, 1) != 0,
mfx_pipeline_done: __gen_unuint(input[1], 3, 3) != 0,
vd_command_message_parser_done: __gen_unuint(input[1], 4, 4) != 0,
hevc_pipeline_command_flush: __gen_unuint(input[1], 16, 16) != 0,
vd_enc_pipeline_command_flush: __gen_unuint(input[1], 17, 17) != 0,
mfx_pipeline_command_flush: __gen_unuint(input[1], 19, 19) != 0,
}
}
}
impl Deserialize for VdPipelineFlush {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct VdencConstQptState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub qp_lambda_array_index_n: u32,
pub skip_threshold_array_index_n: u32,
pub sic_forward_transform_coeff_threshold_matrix0_array_index_n: u32,
pub sic_forward_transform_coeff_threshold_matrix1_3_5_array_index_n: u32,
pub sic_forward_transform_coeff_threshold_matrix2_array_index_n: u32,
pub sic_forward_transform_coeff_threshold_matrix4_6_array_index_n: u32,
}
impl VdencConstQptState {
pub const DWORD_LENGTH: u32 = 62;
}
impl Default for VdencConstQptState {
fn default() -> Self {
VdencConstQptState {
dword_length: 60,
subopcode_b: 6,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
qp_lambda_array_index_n: Default::default(),
skip_threshold_array_index_n: Default::default(),
sic_forward_transform_coeff_threshold_matrix0_array_index_n: Default::default(),
sic_forward_transform_coeff_threshold_matrix1_3_5_array_index_n: Default::default(),
sic_forward_transform_coeff_threshold_matrix2_array_index_n: Default::default(),
sic_forward_transform_coeff_threshold_matrix4_6_array_index_n: Default::default(),
}
}
}
impl Serialize for VdencConstQptState {
type Out = [u32; 62];
fn pack_into(&self, out: &mut [u32; 62]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.qp_lambda_array_index_n, 0, 7);
out[2] = 0;
out[3] = 0;
out[4] = 0;
out[5] = 0;
out[6] = 0;
out[7] = 0;
out[8] = 0;
out[9] = 0;
out[10] = 0;
out[11] = 0;
out[12] = __gen_uint(self.skip_threshold_array_index_n, 0, 15);
out[13] = 0;
out[14] = 0;
out[15] = 0;
out[16] = 0;
out[17] = 0;
out[18] = 0;
out[19] = 0;
out[20] = 0;
out[21] = 0;
out[22] = 0;
out[23] = 0;
out[24] = 0;
out[25] = 0;
out[26] = __gen_uint(self.sic_forward_transform_coeff_threshold_matrix0_array_index_n, 0, 15);
out[27] = 0;
out[28] = 0;
out[29] = 0;
out[30] = 0;
out[31] = 0;
out[32] = 0;
out[33] = 0;
out[34] = 0;
out[35] = 0;
out[36] = 0;
out[37] = 0;
out[38] = 0;
out[39] = 0;
out[40] = __gen_uint(self.sic_forward_transform_coeff_threshold_matrix1_3_5_array_index_n, 0, 7);
out[41] = 0;
out[42] = 0;
out[43] = 0;
out[44] = 0;
out[45] = 0;
out[46] = 0;
out[47] = __gen_uint(self.sic_forward_transform_coeff_threshold_matrix2_array_index_n, 0, 7);
out[48] = 0;
out[49] = 0;
out[50] = 0;
out[51] = 0;
out[52] = 0;
out[53] = 0;
out[54] = __gen_uint(self.sic_forward_transform_coeff_threshold_matrix4_6_array_index_n, 0, 7);
out[55] = 0;
out[56] = 0;
out[57] = 0;
out[58] = 0;
out[59] = 0;
out[60] = 0;
out[61] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 62];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 62] as *const [u8; 248]) })
}
}
impl From<&[u32; 62]> for VdencConstQptState {
fn from(input: &[u32; 62]) -> Self {
VdencConstQptState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
qp_lambda_array_index_n: __gen_unuint(input[1], 0, 7),
skip_threshold_array_index_n: __gen_unuint(input[12], 0, 15),
sic_forward_transform_coeff_threshold_matrix0_array_index_n: __gen_unuint(input[26], 0, 15),
sic_forward_transform_coeff_threshold_matrix1_3_5_array_index_n: __gen_unuint(input[40], 0, 7),
sic_forward_transform_coeff_threshold_matrix2_array_index_n: __gen_unuint(input[47], 0, 7),
sic_forward_transform_coeff_threshold_matrix4_6_array_index_n: __gen_unuint(input[54], 0, 7),
}
}
}
impl Deserialize for VdencConstQptState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 62];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 62] as *mut [u8; 248]) })?;
Ok((&input).into())
}
}
pub struct VdencDsRefSurfaceState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub _8x_surface_state: VdencSurfaceStateFields,
pub _4x_surface_state: VdencSurfaceStateFields,
}
impl VdencDsRefSurfaceState {
pub const DWORD_LENGTH: u32 = 10;
}
impl Default for VdencDsRefSurfaceState {
fn default() -> Self {
VdencDsRefSurfaceState {
dword_length: 4,
subopcode_b: 3,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
_8x_surface_state: Default::default(),
_4x_surface_state: Default::default(),
}
}
}
impl Serialize for VdencDsRefSurfaceState {
type Out = [u32; 10];
fn pack_into(&self, out: &mut [u32; 10]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = 0;
{
let [_, _, ref mut out2_5 @ .., _, _, _, _] = out;
self._8x_surface_state.pack_into(out2_5);
}
{
let [_, _, _, _, _, _, ref mut out6_9 @ ..] = out;
self._4x_surface_state.pack_into(out6_9);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 10];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 10] as *const [u8; 40]) })
}
}
impl From<&[u32; 10]> for VdencDsRefSurfaceState {
fn from(input: &[u32; 10]) -> Self {
VdencDsRefSurfaceState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
_8x_surface_state: {{
let [_, _, ref in2_5 @ .., _, _, _, _] = input;
in2_5.into()
}},
_4x_surface_state: {{
let [_, _, _, _, _, _, ref in6_9 @ ..] = input;
in6_9.into()
}},
}
}
}
impl Deserialize for VdencDsRefSurfaceState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 10];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 10] as *mut [u8; 40]) })?;
Ok((&input).into())
}
}
pub struct VdencImgState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub bidirectional_mix_disable: bool,
pub vdenc_perfmode: u32,
pub time_budget_overflow_check: bool,
pub vdenc_extended_pak_obj_cmd_enable: bool,
pub transform_8x8: bool,
pub vdenc_l1_cache_priority: u32,
pub lambda_value_for_trellis: u32,
pub unidirectional_mix_disable: bool,
pub picture_width: u32,
pub sub_pel_mode: u32,
pub forward_transform_skip_check_enable: bool,
pub block_based_skip_enable: bool,
pub inter_sad_measure_adjustment: u32,
pub intra_sad_measure_adjustment: u32,
pub sub_mb_sub_partition_mask: u32,
pub block_based_skip_type: u32,
pub picture_height: u32,
pub cre_prefetch_enable: bool,
pub hme_ref1_disable: bool,
pub mb_slice_threshold_value: u32,
pub constrained_intra_prediction: bool,
pub picture_type: u32,
pub slice_mb_height: u32,
pub hme0_x_offset: i32,
pub hme0_y_offset: i32,
pub hme1_x_offset: i32,
pub hme1_y_offset: i32,
pub luma_intra_partition_mask: u32,
pub non_skip_zero_mv_cost_added: u32,
pub non_skip_mb_mode_cost_added: u32,
pub mv_cost_scaling_factor: u32,
pub bilinear_filter_enable: bool,
pub refid_cost_mode_select: u32,
pub mode_0_cost: u32,
pub mode_1_cost: u32,
pub mode_2_cost: u32,
pub mode_3_cost: u32,
pub mode_4_cost: u32,
pub mode_5_cost: u32,
pub mode_6_cost: u32,
pub mode_7_cost: u32,
pub mode_8_cost: u32,
pub mode_9_cost: u32,
pub refid_cost: u32,
pub chroma_intra_mode_cost: u32,
pub mv_cost: ImageStateCost,
pub qpprimey: u32,
pub targetsizeinword: u32,
pub avc_intra_4x4_mode_mask: u32,
pub avc_intra_8x8_mode_mask: u32,
pub avc_intra_16x16_mode_mask: u32,
pub avc_intra_chroma_mode_mask: u32,
pub intra_compute_type: u32,
pub penalty_for_intra_16x16_non_dc_prediction: u32,
pub penalty_for_intra_8x8_non_dc_prediction: u32,
pub penalty_for_intra_4x4_non_dc_prediction: u32,
pub intra_refresh_mb_position: u32,
pub intra_refresh_mb_size: u32,
pub intra_refresh_enable_rolling_i_enable: bool,
pub intra_refresh_mode: u32,
pub qp_adjustment_for_rolling_i: i32,
pub panicmodembthreshold: u32,
pub smallmbsizeinword: u32,
pub largembsizeinword: u32,
pub l0_number_of_references: i32,
pub l1_number_of_references: i32,
pub macroblock_budget: u32,
pub initial_time: u32,
pub hme_ref_windows_combining_threshold: u32,
pub max_horizontal_mv_range: u32,
pub max_vertical_mv_range: u32,
pub hme_mv_cost: ImageStateCost,
pub roi_qp_adjustment_for_zone0: i32,
pub roi_qp_adjustment_for_zone1: i32,
pub roi_qp_adjustment_for_zone2: i32,
pub roi_qp_adjustment_for_zone3: i32,
pub qp_adjustment_for_shape_best_intra_4x4_winner: i32,
pub qp_adjustment_for_shape_best_intra_8x8_winner: i32,
pub qp_adjustment_for_shape_best_intra_16x16_winner: i32,
pub best_distortion_qp_adjustment_for_zone0: i32,
pub best_distortion_qp_adjustment_for_zone1: i32,
pub best_distortion_qp_adjustment_for_zone2: i32,
pub best_distortion_qp_adjustment_for_zone3: i32,
pub sad_haar_threshold_0: u32,
pub sad_haar_threshold_1: u32,
pub sad_haar_threshold_2: u32,
pub min_qp: u32,
pub max_qp: u32,
pub max_delta_qp: u32,
pub roi_enable: bool,
pub fwd_predictor0_mv_enable: bool,
pub bwd_predictor1_mv_enable: bool,
pub mb_level_qp_enable: bool,
pub targetsizeinwordsmb_maxsizeinwordsmb_enable: bool,
pub ppmv_disable: bool,
pub coefficient_clamp_enable: bool,
pub long_term_reference_frame_bwd_ref0_indicator: bool,
pub long_term_reference_frame_fwd_ref2_indicator: bool,
pub long_term_reference_frame_fwd_ref1_indicator: bool,
pub long_term_reference_frame_fwd_ref0_indicator: bool,
pub midpoint_sad_haar: u32,
}
impl VdencImgState {
pub const DWORD_LENGTH: u32 = 36;
pub const COLUMN_BASED: u32 = 1;
pub const HAAR_TRANSFORM_ADJUSTED: u32 = 2;
pub const HPEL: u32 = 1;
pub const I: u32 = 0;
pub const NONE: u32 = 0;
pub const P: u32 = 1;
pub const PEL: u32 = 2;
pub const QPEL: u32 = 0;
pub const ROW_BASED: u32 = 0;
pub const SPEED: u32 = 1;
pub const _2PEL: u32 = 3;
}
impl Default for VdencImgState {
fn default() -> Self {
VdencImgState {
dword_length: 34,
subopcode_b: 5,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
bidirectional_mix_disable: Default::default(),
vdenc_perfmode: Default::default(),
time_budget_overflow_check: Default::default(),
vdenc_extended_pak_obj_cmd_enable: Default::default(),
transform_8x8: Default::default(),
vdenc_l1_cache_priority: Default::default(),
lambda_value_for_trellis: Default::default(),
unidirectional_mix_disable: Default::default(),
picture_width: Default::default(),
sub_pel_mode: Default::default(),
forward_transform_skip_check_enable: Default::default(),
block_based_skip_enable: Default::default(),
inter_sad_measure_adjustment: Default::default(),
intra_sad_measure_adjustment: Default::default(),
sub_mb_sub_partition_mask: Default::default(),
block_based_skip_type: Default::default(),
picture_height: Default::default(),
cre_prefetch_enable: Default::default(),
hme_ref1_disable: Default::default(),
mb_slice_threshold_value: Default::default(),
constrained_intra_prediction: Default::default(),
picture_type: Default::default(),
slice_mb_height: Default::default(),
hme0_x_offset: Default::default(),
hme0_y_offset: Default::default(),
hme1_x_offset: Default::default(),
hme1_y_offset: Default::default(),
luma_intra_partition_mask: Default::default(),
non_skip_zero_mv_cost_added: Default::default(),
non_skip_mb_mode_cost_added: Default::default(),
mv_cost_scaling_factor: Default::default(),
bilinear_filter_enable: Default::default(),
refid_cost_mode_select: Default::default(),
mode_0_cost: Default::default(),
mode_1_cost: Default::default(),
mode_2_cost: Default::default(),
mode_3_cost: Default::default(),
mode_4_cost: Default::default(),
mode_5_cost: Default::default(),
mode_6_cost: Default::default(),
mode_7_cost: Default::default(),
mode_8_cost: Default::default(),
mode_9_cost: Default::default(),
refid_cost: Default::default(),
chroma_intra_mode_cost: Default::default(),
mv_cost: Default::default(),
qpprimey: Default::default(),
targetsizeinword: Default::default(),
avc_intra_4x4_mode_mask: Default::default(),
avc_intra_8x8_mode_mask: Default::default(),
avc_intra_16x16_mode_mask: Default::default(),
avc_intra_chroma_mode_mask: Default::default(),
intra_compute_type: Default::default(),
penalty_for_intra_16x16_non_dc_prediction: Default::default(),
penalty_for_intra_8x8_non_dc_prediction: Default::default(),
penalty_for_intra_4x4_non_dc_prediction: Default::default(),
intra_refresh_mb_position: Default::default(),
intra_refresh_mb_size: Default::default(),
intra_refresh_enable_rolling_i_enable: Default::default(),
intra_refresh_mode: Default::default(),
qp_adjustment_for_rolling_i: Default::default(),
panicmodembthreshold: Default::default(),
smallmbsizeinword: Default::default(),
largembsizeinword: Default::default(),
l0_number_of_references: Default::default(),
l1_number_of_references: Default::default(),
macroblock_budget: Default::default(),
initial_time: Default::default(),
hme_ref_windows_combining_threshold: Default::default(),
max_horizontal_mv_range: Default::default(),
max_vertical_mv_range: Default::default(),
hme_mv_cost: Default::default(),
roi_qp_adjustment_for_zone0: Default::default(),
roi_qp_adjustment_for_zone1: Default::default(),
roi_qp_adjustment_for_zone2: Default::default(),
roi_qp_adjustment_for_zone3: Default::default(),
qp_adjustment_for_shape_best_intra_4x4_winner: Default::default(),
qp_adjustment_for_shape_best_intra_8x8_winner: Default::default(),
qp_adjustment_for_shape_best_intra_16x16_winner: Default::default(),
best_distortion_qp_adjustment_for_zone0: Default::default(),
best_distortion_qp_adjustment_for_zone1: Default::default(),
best_distortion_qp_adjustment_for_zone2: Default::default(),
best_distortion_qp_adjustment_for_zone3: Default::default(),
sad_haar_threshold_0: Default::default(),
sad_haar_threshold_1: Default::default(),
sad_haar_threshold_2: Default::default(),
min_qp: Default::default(),
max_qp: Default::default(),
max_delta_qp: Default::default(),
roi_enable: Default::default(),
fwd_predictor0_mv_enable: Default::default(),
bwd_predictor1_mv_enable: Default::default(),
mb_level_qp_enable: Default::default(),
targetsizeinwordsmb_maxsizeinwordsmb_enable: Default::default(),
ppmv_disable: Default::default(),
coefficient_clamp_enable: Default::default(),
long_term_reference_frame_bwd_ref0_indicator: Default::default(),
long_term_reference_frame_fwd_ref2_indicator: Default::default(),
long_term_reference_frame_fwd_ref1_indicator: Default::default(),
long_term_reference_frame_fwd_ref0_indicator: Default::default(),
midpoint_sad_haar: Default::default(),
}
}
}
impl Serialize for VdencImgState {
type Out = [u32; 36];
fn pack_into(&self, out: &mut [u32; 36]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.bidirectional_mix_disable.into(), 2, 2) |
__gen_uint(self.vdenc_perfmode, 3, 3) |
__gen_uint(self.time_budget_overflow_check.into(), 4, 4) |
__gen_uint(self.vdenc_extended_pak_obj_cmd_enable.into(), 6, 6) |
__gen_uint(self.transform_8x8.into(), 7, 7) |
__gen_uint(self.vdenc_l1_cache_priority, 8, 9) |
__gen_uint(self.lambda_value_for_trellis, 16, 31);
out[2] = __gen_uint(self.unidirectional_mix_disable.into(), 28, 28);
out[3] = __gen_uint(self.picture_width, 16, 31);
out[4] = __gen_uint(self.sub_pel_mode, 12, 13) |
__gen_uint(self.forward_transform_skip_check_enable.into(), 17, 17) |
__gen_uint(self.block_based_skip_enable.into(), 19, 19) |
__gen_uint(self.inter_sad_measure_adjustment, 20, 21) |
__gen_uint(self.intra_sad_measure_adjustment, 22, 23) |
__gen_uint(self.sub_mb_sub_partition_mask, 24, 30) |
__gen_uint(self.block_based_skip_type, 31, 31);
out[5] = __gen_uint(self.picture_height, 0, 15) |
__gen_uint(self.cre_prefetch_enable.into(), 16, 16) |
__gen_uint(self.hme_ref1_disable.into(), 17, 17) |
__gen_uint(self.mb_slice_threshold_value, 18, 21) |
__gen_uint(self.constrained_intra_prediction.into(), 26, 26) |
__gen_uint(self.picture_type, 29, 30);
out[6] = __gen_uint(self.slice_mb_height, 0, 15);
out[7] = __gen_uint(self.hme0_x_offset as u32, 0, 7) |
__gen_uint(self.hme0_y_offset as u32, 8, 15) |
__gen_uint(self.hme1_x_offset as u32, 16, 23) |
__gen_uint(self.hme1_y_offset as u32, 24, 31);
out[8] = __gen_uint(self.luma_intra_partition_mask, 0, 4) |
__gen_uint(self.non_skip_zero_mv_cost_added, 5, 5) |
__gen_uint(self.non_skip_mb_mode_cost_added, 6, 6) |
__gen_uint(self.mv_cost_scaling_factor, 16, 17) |
__gen_uint(self.bilinear_filter_enable.into(), 18, 18) |
__gen_uint(self.refid_cost_mode_select, 22, 22);
out[9] = __gen_uint(self.mode_0_cost, 0, 7) |
__gen_uint(self.mode_1_cost, 8, 15) |
__gen_uint(self.mode_2_cost, 16, 23) |
__gen_uint(self.mode_3_cost, 24, 31);
out[10] = __gen_uint(self.mode_4_cost, 0, 7) |
__gen_uint(self.mode_5_cost, 8, 15) |
__gen_uint(self.mode_6_cost, 16, 23) |
__gen_uint(self.mode_7_cost, 24, 31);
out[11] = __gen_uint(self.mode_8_cost, 0, 7) |
__gen_uint(self.mode_9_cost, 8, 15) |
__gen_uint(self.refid_cost, 16, 23) |
__gen_uint(self.chroma_intra_mode_cost, 24, 31);
{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref mut out12_13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.mv_cost.pack_into(out12_13);
}
out[14] = __gen_uint(self.qpprimey, 0, 7) |
__gen_uint(self.targetsizeinword, 24, 31);
out[15] = 0;
out[16] = 0;
out[17] = __gen_uint(self.avc_intra_4x4_mode_mask, 0, 8) |
__gen_uint(self.avc_intra_8x8_mode_mask, 16, 24);
out[18] = __gen_uint(self.avc_intra_16x16_mode_mask, 0, 3) |
__gen_uint(self.avc_intra_chroma_mode_mask, 4, 7) |
__gen_uint(self.intra_compute_type, 8, 9);
out[19] = 0;
out[20] = __gen_uint(self.penalty_for_intra_16x16_non_dc_prediction, 0, 7) |
__gen_uint(self.penalty_for_intra_8x8_non_dc_prediction, 8, 15) |
__gen_uint(self.penalty_for_intra_4x4_non_dc_prediction, 16, 23);
out[21] = __gen_uint(self.intra_refresh_mb_position, 0, 7) |
__gen_uint(self.intra_refresh_mb_size, 8, 15) |
__gen_uint(self.intra_refresh_enable_rolling_i_enable.into(), 16, 16) |
__gen_uint(self.intra_refresh_mode, 17, 17) |
__gen_uint(self.qp_adjustment_for_rolling_i as u32, 24, 31);
out[22] = __gen_uint(self.panicmodembthreshold, 0, 15) |
__gen_uint(self.smallmbsizeinword, 16, 23) |
__gen_uint(self.largembsizeinword, 24, 31);
out[23] = __gen_uint(self.l0_number_of_references as u32, 0, 7) |
__gen_uint(self.l1_number_of_references as u32, 16, 23);
out[24] = __gen_uint(self.macroblock_budget, 0, 15) |
__gen_uint(self.initial_time, 16, 31);
out[25] = 0;
out[26] = __gen_uint(self.hme_ref_windows_combining_threshold, 8, 15);
out[27] = __gen_uint(self.max_horizontal_mv_range, 0, 15) |
__gen_uint(self.max_vertical_mv_range, 16, 31);
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out28_29 @ .., _, _, _, _, _, _] = out;
self.hme_mv_cost.pack_into(out28_29);
}
out[30] = __gen_uint(self.roi_qp_adjustment_for_zone0 as u32, 0, 3) |
__gen_uint(self.roi_qp_adjustment_for_zone1 as u32, 4, 7) |
__gen_uint(self.roi_qp_adjustment_for_zone2 as u32, 8, 11) |
__gen_uint(self.roi_qp_adjustment_for_zone3 as u32, 12, 15) |
__gen_uint(self.qp_adjustment_for_shape_best_intra_4x4_winner as u32, 16, 19) |
__gen_uint(self.qp_adjustment_for_shape_best_intra_8x8_winner as u32, 20, 23) |
__gen_uint(self.qp_adjustment_for_shape_best_intra_16x16_winner as u32, 24, 27);
out[31] = __gen_uint(self.best_distortion_qp_adjustment_for_zone0 as u32, 0, 3) |
__gen_uint(self.best_distortion_qp_adjustment_for_zone1 as u32, 4, 7) |
__gen_uint(self.best_distortion_qp_adjustment_for_zone2 as u32, 8, 11) |
__gen_uint(self.best_distortion_qp_adjustment_for_zone3 as u32, 12, 15) |
__gen_uint(self.sad_haar_threshold_0, 16, 31);
out[32] = __gen_uint(self.sad_haar_threshold_1, 0, 15) |
__gen_uint(self.sad_haar_threshold_2, 16, 31);
out[33] = __gen_uint(self.min_qp, 0, 7) |
__gen_uint(self.max_qp, 8, 15) |
__gen_uint(self.max_delta_qp, 24, 27);
out[34] = __gen_uint(self.roi_enable.into(), 0, 0) |
__gen_uint(self.fwd_predictor0_mv_enable.into(), 1, 1) |
__gen_uint(self.bwd_predictor1_mv_enable.into(), 2, 2) |
__gen_uint(self.mb_level_qp_enable.into(), 3, 3) |
__gen_uint(self.targetsizeinwordsmb_maxsizeinwordsmb_enable.into(), 4, 4) |
__gen_uint(self.ppmv_disable.into(), 8, 8) |
__gen_uint(self.coefficient_clamp_enable.into(), 9, 9) |
__gen_uint(self.long_term_reference_frame_bwd_ref0_indicator.into(), 10, 10) |
__gen_uint(self.long_term_reference_frame_fwd_ref2_indicator.into(), 11, 11) |
__gen_uint(self.long_term_reference_frame_fwd_ref1_indicator.into(), 12, 12) |
__gen_uint(self.long_term_reference_frame_fwd_ref0_indicator.into(), 13, 13) |
__gen_uint(self.midpoint_sad_haar, 16, 31);
out[35] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 36];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 36] as *const [u8; 144]) })
}
}
impl From<&[u32; 36]> for VdencImgState {
fn from(input: &[u32; 36]) -> Self {
VdencImgState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
bidirectional_mix_disable: __gen_unuint(input[1], 2, 2) != 0,
vdenc_perfmode: __gen_unuint(input[1], 3, 3),
time_budget_overflow_check: __gen_unuint(input[1], 4, 4) != 0,
vdenc_extended_pak_obj_cmd_enable: __gen_unuint(input[1], 6, 6) != 0,
transform_8x8: __gen_unuint(input[1], 7, 7) != 0,
vdenc_l1_cache_priority: __gen_unuint(input[1], 8, 9),
lambda_value_for_trellis: __gen_unuint(input[1], 16, 31),
unidirectional_mix_disable: __gen_unuint(input[2], 28, 28) != 0,
picture_width: __gen_unuint(input[3], 16, 31),
sub_pel_mode: __gen_unuint(input[4], 12, 13),
forward_transform_skip_check_enable: __gen_unuint(input[4], 17, 17) != 0,
block_based_skip_enable: __gen_unuint(input[4], 19, 19) != 0,
inter_sad_measure_adjustment: __gen_unuint(input[4], 20, 21),
intra_sad_measure_adjustment: __gen_unuint(input[4], 22, 23),
sub_mb_sub_partition_mask: __gen_unuint(input[4], 24, 30),
block_based_skip_type: __gen_unuint(input[4], 31, 31),
picture_height: __gen_unuint(input[5], 0, 15),
cre_prefetch_enable: __gen_unuint(input[5], 16, 16) != 0,
hme_ref1_disable: __gen_unuint(input[5], 17, 17) != 0,
mb_slice_threshold_value: __gen_unuint(input[5], 18, 21),
constrained_intra_prediction: __gen_unuint(input[5], 26, 26) != 0,
picture_type: __gen_unuint(input[5], 29, 30),
slice_mb_height: __gen_unuint(input[6], 0, 15),
hme0_x_offset: (__gen_unuint(input[7], 0, 7)) as i32,
hme0_y_offset: (__gen_unuint(input[7], 8, 15)) as i32,
hme1_x_offset: (__gen_unuint(input[7], 16, 23)) as i32,
hme1_y_offset: (__gen_unuint(input[7], 24, 31)) as i32,
luma_intra_partition_mask: __gen_unuint(input[8], 0, 4),
non_skip_zero_mv_cost_added: __gen_unuint(input[8], 5, 5),
non_skip_mb_mode_cost_added: __gen_unuint(input[8], 6, 6),
mv_cost_scaling_factor: __gen_unuint(input[8], 16, 17),
bilinear_filter_enable: __gen_unuint(input[8], 18, 18) != 0,
refid_cost_mode_select: __gen_unuint(input[8], 22, 22),
mode_0_cost: __gen_unuint(input[9], 0, 7),
mode_1_cost: __gen_unuint(input[9], 8, 15),
mode_2_cost: __gen_unuint(input[9], 16, 23),
mode_3_cost: __gen_unuint(input[9], 24, 31),
mode_4_cost: __gen_unuint(input[10], 0, 7),
mode_5_cost: __gen_unuint(input[10], 8, 15),
mode_6_cost: __gen_unuint(input[10], 16, 23),
mode_7_cost: __gen_unuint(input[10], 24, 31),
mode_8_cost: __gen_unuint(input[11], 0, 7),
mode_9_cost: __gen_unuint(input[11], 8, 15),
refid_cost: __gen_unuint(input[11], 16, 23),
chroma_intra_mode_cost: __gen_unuint(input[11], 24, 31),
mv_cost: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, ref in12_13 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in12_13.into()
}},
qpprimey: __gen_unuint(input[14], 0, 7),
targetsizeinword: __gen_unuint(input[14], 24, 31),
avc_intra_4x4_mode_mask: __gen_unuint(input[17], 0, 8),
avc_intra_8x8_mode_mask: __gen_unuint(input[17], 16, 24),
avc_intra_16x16_mode_mask: __gen_unuint(input[18], 0, 3),
avc_intra_chroma_mode_mask: __gen_unuint(input[18], 4, 7),
intra_compute_type: __gen_unuint(input[18], 8, 9),
penalty_for_intra_16x16_non_dc_prediction: __gen_unuint(input[20], 0, 7),
penalty_for_intra_8x8_non_dc_prediction: __gen_unuint(input[20], 8, 15),
penalty_for_intra_4x4_non_dc_prediction: __gen_unuint(input[20], 16, 23),
intra_refresh_mb_position: __gen_unuint(input[21], 0, 7),
intra_refresh_mb_size: __gen_unuint(input[21], 8, 15),
intra_refresh_enable_rolling_i_enable: __gen_unuint(input[21], 16, 16) != 0,
intra_refresh_mode: __gen_unuint(input[21], 17, 17),
qp_adjustment_for_rolling_i: (__gen_unuint(input[21], 24, 31)) as i32,
panicmodembthreshold: __gen_unuint(input[22], 0, 15),
smallmbsizeinword: __gen_unuint(input[22], 16, 23),
largembsizeinword: __gen_unuint(input[22], 24, 31),
l0_number_of_references: (__gen_unuint(input[23], 0, 7)) as i32,
l1_number_of_references: (__gen_unuint(input[23], 16, 23)) as i32,
macroblock_budget: __gen_unuint(input[24], 0, 15),
initial_time: __gen_unuint(input[24], 16, 31),
hme_ref_windows_combining_threshold: __gen_unuint(input[26], 8, 15),
max_horizontal_mv_range: __gen_unuint(input[27], 0, 15),
max_vertical_mv_range: __gen_unuint(input[27], 16, 31),
hme_mv_cost: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in28_29 @ .., _, _, _, _, _, _] = input;
in28_29.into()
}},
roi_qp_adjustment_for_zone0: (__gen_unuint(input[30], 0, 3)) as i32,
roi_qp_adjustment_for_zone1: (__gen_unuint(input[30], 4, 7)) as i32,
roi_qp_adjustment_for_zone2: (__gen_unuint(input[30], 8, 11)) as i32,
roi_qp_adjustment_for_zone3: (__gen_unuint(input[30], 12, 15)) as i32,
qp_adjustment_for_shape_best_intra_4x4_winner: (__gen_unuint(input[30], 16, 19)) as i32,
qp_adjustment_for_shape_best_intra_8x8_winner: (__gen_unuint(input[30], 20, 23)) as i32,
qp_adjustment_for_shape_best_intra_16x16_winner: (__gen_unuint(input[30], 24, 27)) as i32,
best_distortion_qp_adjustment_for_zone0: (__gen_unuint(input[31], 0, 3)) as i32,
best_distortion_qp_adjustment_for_zone1: (__gen_unuint(input[31], 4, 7)) as i32,
best_distortion_qp_adjustment_for_zone2: (__gen_unuint(input[31], 8, 11)) as i32,
best_distortion_qp_adjustment_for_zone3: (__gen_unuint(input[31], 12, 15)) as i32,
sad_haar_threshold_0: __gen_unuint(input[31], 16, 31),
sad_haar_threshold_1: __gen_unuint(input[32], 0, 15),
sad_haar_threshold_2: __gen_unuint(input[32], 16, 31),
min_qp: __gen_unuint(input[33], 0, 7),
max_qp: __gen_unuint(input[33], 8, 15),
max_delta_qp: __gen_unuint(input[33], 24, 27),
roi_enable: __gen_unuint(input[34], 0, 0) != 0,
fwd_predictor0_mv_enable: __gen_unuint(input[34], 1, 1) != 0,
bwd_predictor1_mv_enable: __gen_unuint(input[34], 2, 2) != 0,
mb_level_qp_enable: __gen_unuint(input[34], 3, 3) != 0,
targetsizeinwordsmb_maxsizeinwordsmb_enable: __gen_unuint(input[34], 4, 4) != 0,
ppmv_disable: __gen_unuint(input[34], 8, 8) != 0,
coefficient_clamp_enable: __gen_unuint(input[34], 9, 9) != 0,
long_term_reference_frame_bwd_ref0_indicator: __gen_unuint(input[34], 10, 10) != 0,
long_term_reference_frame_fwd_ref2_indicator: __gen_unuint(input[34], 11, 11) != 0,
long_term_reference_frame_fwd_ref1_indicator: __gen_unuint(input[34], 12, 12) != 0,
long_term_reference_frame_fwd_ref0_indicator: __gen_unuint(input[34], 13, 13) != 0,
midpoint_sad_haar: __gen_unuint(input[34], 16, 31),
}
}
}
impl Deserialize for VdencImgState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 36];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 36] as *mut [u8; 144]) })?;
Ok((&input).into())
}
}
pub struct VdencPicture<A: Addr + Default> {
pub address: A,
pub picture_fields: VdencSurfaceControlBits,
}
impl<A: Addr + Default> VdencPicture<A> {
pub const DWORD_LENGTH: u32 = 3;
}
impl<A: Addr + Default> Default for VdencPicture<A> {
fn default() -> Self {
VdencPicture {
address: Default::default(),
picture_fields: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for VdencPicture<A> {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
let v0_address = self.address.combine(0);
out[0] = v0_address as u32;
out[1] = (v0_address >> 32) as u32;
{
let [_, _, ref mut out2 @ ..] = out;
self.picture_fields.pack_into(out2);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for VdencPicture<u64> {
fn from(input: &[u32; 3]) -> Self {
VdencPicture {
address: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
picture_fields: {{
let [_, _, ref in2 @ ..] = input;
in2.into()
}},
}
}
}
impl Deserialize for VdencPicture<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct VdencPipeBufAddrState<A: Addr + Default> {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub ds_fwd_ref0: VdencPicture<A>,
pub ds_fwd_ref1: VdencPicture<A>,
pub original_uncompressed_picture: VdencPicture<A>,
pub stream_in_data_picture: VdencPicture<A>,
pub row_store_scratch_buffer: VdencPicture<A>,
pub colocated_mv_read_buffer: VdencPicture<A>,
pub fwd_ref0: VdencPicture<A>,
pub fwd_ref1: VdencPicture<A>,
pub fwd_ref2: VdencPicture<A>,
pub bwd_ref0: VdencPicture<A>,
pub vdenc_statistics_stream_out: VdencPicture<A>,
pub ds_fwd_ref0_4x: VdencPicture<A>,
pub ds_fwd_ref1_4x: VdencPicture<A>,
pub vdenc_lcu_pak_obj_cmd_buffer: VdencPicture<A>,
pub scaled_reference_surface_8x: VdencPicture<A>,
pub scaled_reference_surface_4x: VdencPicture<A>,
pub vp9_segmentation_map_stream_in_buffer: VdencPicture<A>,
pub vp9_segmentation_map_stream_out_buffer: VdencPicture<A>,
pub weights_histogram_stream_out_offset: u32,
}
impl<A: Addr + Default> VdencPipeBufAddrState<A> {
pub const DWORD_LENGTH: u32 = 62;
}
impl<A: Addr + Default> Default for VdencPipeBufAddrState<A> {
fn default() -> Self {
VdencPipeBufAddrState {
dword_length: 36,
subopcode_b: 4,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
ds_fwd_ref0: Default::default(),
ds_fwd_ref1: Default::default(),
original_uncompressed_picture: Default::default(),
stream_in_data_picture: Default::default(),
row_store_scratch_buffer: Default::default(),
colocated_mv_read_buffer: Default::default(),
fwd_ref0: Default::default(),
fwd_ref1: Default::default(),
fwd_ref2: Default::default(),
bwd_ref0: Default::default(),
vdenc_statistics_stream_out: Default::default(),
ds_fwd_ref0_4x: Default::default(),
ds_fwd_ref1_4x: Default::default(),
vdenc_lcu_pak_obj_cmd_buffer: Default::default(),
scaled_reference_surface_8x: Default::default(),
scaled_reference_surface_4x: Default::default(),
vp9_segmentation_map_stream_in_buffer: Default::default(),
vp9_segmentation_map_stream_out_buffer: Default::default(),
weights_histogram_stream_out_offset: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for VdencPipeBufAddrState<A> {
type Out = [u32; 62];
fn pack_into(&self, out: &mut [u32; 62]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.ds_fwd_ref0.pack_into(out1_3);
}
{
let [_, _, _, _, ref mut out4_6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.ds_fwd_ref1.pack_into(out4_6);
}
out[7] = 0;
out[8] = 0;
out[9] = 0;
{
let [_, _, _, _, _, _, _, _, _, _, ref mut out10_12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.original_uncompressed_picture.pack_into(out10_12);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out13_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.stream_in_data_picture.pack_into(out13_15);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out16_18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.row_store_scratch_buffer.pack_into(out16_18);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out19_21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.colocated_mv_read_buffer.pack_into(out19_21);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out22_24 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.fwd_ref0.pack_into(out22_24);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out25_27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.fwd_ref1.pack_into(out25_27);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out28_30 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.fwd_ref2.pack_into(out28_30);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out31_33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.bwd_ref0.pack_into(out31_33);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out34_36 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.vdenc_statistics_stream_out.pack_into(out34_36);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out37_39 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.ds_fwd_ref0_4x.pack_into(out37_39);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out40_42 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.ds_fwd_ref1_4x.pack_into(out40_42);
}
out[43] = 0;
out[44] = 0;
out[45] = 0;
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out46_48 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = out;
self.vdenc_lcu_pak_obj_cmd_buffer.pack_into(out46_48);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out49_51 @ .., _, _, _, _, _, _, _, _, _, _] = out;
self.scaled_reference_surface_8x.pack_into(out49_51);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out52_54 @ .., _, _, _, _, _, _, _] = out;
self.scaled_reference_surface_4x.pack_into(out52_54);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out55_57 @ .., _, _, _, _] = out;
self.vp9_segmentation_map_stream_in_buffer.pack_into(out55_57);
}
{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref mut out58_60 @ .., _] = out;
self.vp9_segmentation_map_stream_out_buffer.pack_into(out58_60);
}
out[61] = __gen_uint(self.weights_histogram_stream_out_offset, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 62];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 62] as *const [u8; 248]) })
}
}
impl From<&[u32; 62]> for VdencPipeBufAddrState<u64> {
fn from(input: &[u32; 62]) -> Self {
VdencPipeBufAddrState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
ds_fwd_ref0: {{
let [_, ref in1_3 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in1_3.into()
}},
ds_fwd_ref1: {{
let [_, _, _, _, ref in4_6 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in4_6.into()
}},
original_uncompressed_picture: {{
let [_, _, _, _, _, _, _, _, _, _, ref in10_12 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in10_12.into()
}},
stream_in_data_picture: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, ref in13_15 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in13_15.into()
}},
row_store_scratch_buffer: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in16_18 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in16_18.into()
}},
colocated_mv_read_buffer: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in19_21 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in19_21.into()
}},
fwd_ref0: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in22_24 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in22_24.into()
}},
fwd_ref1: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in25_27 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in25_27.into()
}},
fwd_ref2: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in28_30 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in28_30.into()
}},
bwd_ref0: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in31_33 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in31_33.into()
}},
vdenc_statistics_stream_out: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in34_36 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in34_36.into()
}},
ds_fwd_ref0_4x: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in37_39 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in37_39.into()
}},
ds_fwd_ref1_4x: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in40_42 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in40_42.into()
}},
vdenc_lcu_pak_obj_cmd_buffer: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in46_48 @ .., _, _, _, _, _, _, _, _, _, _, _, _, _] = input;
in46_48.into()
}},
scaled_reference_surface_8x: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in49_51 @ .., _, _, _, _, _, _, _, _, _, _] = input;
in49_51.into()
}},
scaled_reference_surface_4x: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in52_54 @ .., _, _, _, _, _, _, _] = input;
in52_54.into()
}},
vp9_segmentation_map_stream_in_buffer: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in55_57 @ .., _, _, _, _] = input;
in55_57.into()
}},
vp9_segmentation_map_stream_out_buffer: {{
let [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, ref in58_60 @ .., _] = input;
in58_60.into()
}},
weights_histogram_stream_out_offset: __gen_unuint(input[61], 0, 31),
}
}
}
impl Deserialize for VdencPipeBufAddrState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 62];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 62] as *mut [u8; 248]) })?;
Ok((&input).into())
}
}
pub struct VdencPipeModeSelect {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub standard_select: u32,
pub frame_statistics_stream_out_enable: bool,
pub vdenc_pak_obj_cmd_stream_out_enable: bool,
pub tlb_prefetch_enable: bool,
pub pak_threshold_check_enable: bool,
pub vdenc_stream_in_enable: bool,
pub downscaled_8x_write_disable: bool,
pub downscaled_4x_write_disable: bool,
pub bit_depth: u32,
pub pak_chroma_sub_sampling_type: u32,
pub output_range_control_after_color_space_conversion: bool,
pub disable_speed_mode_fetch_optimization: bool,
}
impl VdencPipeModeSelect {
pub const DWORD_LENGTH: u32 = 2;
pub const AVC: u32 = 2;
pub const HEVC: u32 = 0;
pub const VP9: u32 = 1;
pub const _10_BIT: u32 = 2;
pub const _4_2_0: u32 = 1;
pub const _4_4_4: u32 = 3;
pub const _8_BIT: u32 = 0;
}
impl Default for VdencPipeModeSelect {
fn default() -> Self {
VdencPipeModeSelect {
dword_length: 0,
subopcode_b: 0,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
standard_select: Default::default(),
frame_statistics_stream_out_enable: Default::default(),
vdenc_pak_obj_cmd_stream_out_enable: Default::default(),
tlb_prefetch_enable: Default::default(),
pak_threshold_check_enable: Default::default(),
vdenc_stream_in_enable: Default::default(),
downscaled_8x_write_disable: Default::default(),
downscaled_4x_write_disable: Default::default(),
bit_depth: Default::default(),
pak_chroma_sub_sampling_type: Default::default(),
output_range_control_after_color_space_conversion: Default::default(),
disable_speed_mode_fetch_optimization: Default::default(),
}
}
}
impl Serialize for VdencPipeModeSelect {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.standard_select, 0, 3) |
__gen_uint(self.frame_statistics_stream_out_enable.into(), 5, 5) |
__gen_uint(self.vdenc_pak_obj_cmd_stream_out_enable.into(), 6, 6) |
__gen_uint(self.tlb_prefetch_enable.into(), 7, 7) |
__gen_uint(self.pak_threshold_check_enable.into(), 8, 8) |
__gen_uint(self.vdenc_stream_in_enable.into(), 9, 9) |
__gen_uint(self.downscaled_8x_write_disable.into(), 10, 10) |
__gen_uint(self.downscaled_4x_write_disable.into(), 11, 11) |
__gen_uint(self.bit_depth, 12, 14) |
__gen_uint(self.pak_chroma_sub_sampling_type, 15, 16) |
__gen_uint(self.output_range_control_after_color_space_conversion.into(), 17, 17) |
__gen_uint(self.disable_speed_mode_fetch_optimization.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for VdencPipeModeSelect {
fn from(input: &[u32; 2]) -> Self {
VdencPipeModeSelect {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
standard_select: __gen_unuint(input[1], 0, 3),
frame_statistics_stream_out_enable: __gen_unuint(input[1], 5, 5) != 0,
vdenc_pak_obj_cmd_stream_out_enable: __gen_unuint(input[1], 6, 6) != 0,
tlb_prefetch_enable: __gen_unuint(input[1], 7, 7) != 0,
pak_threshold_check_enable: __gen_unuint(input[1], 8, 8) != 0,
vdenc_stream_in_enable: __gen_unuint(input[1], 9, 9) != 0,
downscaled_8x_write_disable: __gen_unuint(input[1], 10, 10) != 0,
downscaled_4x_write_disable: __gen_unuint(input[1], 11, 11) != 0,
bit_depth: __gen_unuint(input[1], 12, 14),
pak_chroma_sub_sampling_type: __gen_unuint(input[1], 15, 16),
output_range_control_after_color_space_conversion: __gen_unuint(input[1], 17, 17) != 0,
disable_speed_mode_fetch_optimization: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for VdencPipeModeSelect {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct VdencRefSurfaceState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub surface_state: VdencSurfaceStateFields,
}
impl VdencRefSurfaceState {
pub const DWORD_LENGTH: u32 = 6;
}
impl Default for VdencRefSurfaceState {
fn default() -> Self {
VdencRefSurfaceState {
dword_length: 4,
subopcode_b: 2,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
surface_state: Default::default(),
}
}
}
impl Serialize for VdencRefSurfaceState {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = 0;
{
let [_, _, ref mut out2_5 @ ..] = out;
self.surface_state.pack_into(out2_5);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for VdencRefSurfaceState {
fn from(input: &[u32; 6]) -> Self {
VdencRefSurfaceState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
surface_state: {{
let [_, _, ref in2_5 @ ..] = input;
in2_5.into()
}},
}
}
}
impl Deserialize for VdencRefSurfaceState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct VdencSrcSurfaceState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub surface_state: VdencSurfaceStateFields,
}
impl VdencSrcSurfaceState {
pub const DWORD_LENGTH: u32 = 6;
}
impl Default for VdencSrcSurfaceState {
fn default() -> Self {
VdencSrcSurfaceState {
dword_length: 4,
subopcode_b: 1,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
surface_state: Default::default(),
}
}
}
impl Serialize for VdencSrcSurfaceState {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = 0;
{
let [_, _, ref mut out2_5 @ ..] = out;
self.surface_state.pack_into(out2_5);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for VdencSrcSurfaceState {
fn from(input: &[u32; 6]) -> Self {
VdencSrcSurfaceState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
surface_state: {{
let [_, _, ref in2_5 @ ..] = input;
in2_5.into()
}},
}
}
}
impl Deserialize for VdencSrcSurfaceState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct VdencSurfaceControlBits {
pub mocs: u32,
pub arbitration_priority_control: u32,
pub memory_compression_enable: bool,
pub memory_compression_mode: u32,
pub cache_select: u32,
pub tiled_resource_mode: u32,
}
impl VdencSurfaceControlBits {
pub const DWORD_LENGTH: u32 = 1;
pub const HIGHEST_PRIORITY: u32 = 0;
pub const LOWEST_PRIORITY: u32 = 3;
pub const SECOND_HIGHEST_PRIORITY: u32 = 1;
pub const THIRD_HIGHEST_PRIORITY: u32 = 2;
pub const TRMODE_NONE: u32 = 0;
pub const TRMODE_TILEYF: u32 = 1;
pub const TRMODE_TILEYS: u32 = 2;
}
impl Default for VdencSurfaceControlBits {
fn default() -> Self {
VdencSurfaceControlBits {
mocs: Default::default(),
arbitration_priority_control: Default::default(),
memory_compression_enable: Default::default(),
memory_compression_mode: Default::default(),
cache_select: Default::default(),
tiled_resource_mode: Default::default(),
}
}
}
impl Serialize for VdencSurfaceControlBits {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.mocs, 1, 6) |
__gen_uint(self.arbitration_priority_control, 7, 8) |
__gen_uint(self.memory_compression_enable.into(), 9, 9) |
__gen_uint(self.memory_compression_mode, 10, 10) |
__gen_uint(self.cache_select, 12, 12) |
__gen_uint(self.tiled_resource_mode, 13, 14);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for VdencSurfaceControlBits {
fn from(input: &[u32; 1]) -> Self {
VdencSurfaceControlBits {
mocs: __gen_unuint(input[0], 1, 6),
arbitration_priority_control: __gen_unuint(input[0], 7, 8),
memory_compression_enable: __gen_unuint(input[0], 9, 9) != 0,
memory_compression_mode: __gen_unuint(input[0], 10, 10),
cache_select: __gen_unuint(input[0], 12, 12),
tiled_resource_mode: __gen_unuint(input[0], 13, 14),
}
}
}
impl Deserialize for VdencSurfaceControlBits {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct VdencSurfaceStateFields {
pub cr_v_cb_u_pixel_offset_v_direction: f32,
pub surface_format_byte_swizzle: bool,
pub color_space_selection: u32,
pub width: u32,
pub height: u32,
pub tile_walk: u32,
pub tiled_surface: u32,
pub half_pitch_for_chroma: bool,
pub surface_pitch: u32,
pub chroma_downsample_filter_control: u32,
pub format: u32,
pub surface_format: u32,
pub y_offset_for_u_cb: u32,
pub x_offset_for_u_cb: u32,
pub y_offset_for_v_cr: u32,
pub x_offset_for_v_cr: u32,
}
impl VdencSurfaceStateFields {
pub const DWORD_LENGTH: u32 = 4;
pub const NV21: u32 = 11;
pub const P010: u32 = 8;
pub const P010VARIANT: u32 = 12;
pub const PLANAR_420_8: u32 = 4;
pub const RGBA_10_BIT_PACKED: u32 = 9;
pub const RGBA_4_4_4_4: u32 = 1;
pub const XMAJOR: u32 = 0;
pub const Y410: u32 = 10;
pub const Y8_UNORM: u32 = 3;
pub const YCRCB_SWAPUVY_4_2_2: u32 = 7;
pub const YCRCB_SWAPUV_4_2_2: u32 = 6;
pub const YCRCB_SWAPY_4_2_2: u32 = 5;
pub const YMAJOR: u32 = 1;
pub const YUV_4_2_2: u32 = 0;
pub const YUV_4_4_4: u32 = 2;
}
impl Default for VdencSurfaceStateFields {
fn default() -> Self {
VdencSurfaceStateFields {
cr_v_cb_u_pixel_offset_v_direction: Default::default(),
surface_format_byte_swizzle: Default::default(),
color_space_selection: Default::default(),
width: Default::default(),
height: Default::default(),
tile_walk: Default::default(),
tiled_surface: Default::default(),
half_pitch_for_chroma: Default::default(),
surface_pitch: Default::default(),
chroma_downsample_filter_control: Default::default(),
format: Default::default(),
surface_format: Default::default(),
y_offset_for_u_cb: Default::default(),
x_offset_for_u_cb: Default::default(),
y_offset_for_v_cr: Default::default(),
x_offset_for_v_cr: Default::default(),
}
}
}
impl Serialize for VdencSurfaceStateFields {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_ufixed(self.cr_v_cb_u_pixel_offset_v_direction, 0, 1, 2) |
__gen_uint(self.surface_format_byte_swizzle.into(), 2, 2) |
__gen_uint(self.color_space_selection, 3, 3) |
__gen_uint(self.width, 4, 17) |
__gen_uint(self.height, 18, 31);
out[1] = __gen_uint(self.tile_walk, 0, 0) |
__gen_uint(self.tiled_surface, 1, 1) |
__gen_uint(self.half_pitch_for_chroma.into(), 2, 2) |
__gen_uint(self.surface_pitch, 3, 19) |
__gen_uint(self.chroma_downsample_filter_control, 20, 22) |
__gen_uint(self.format, 27, 31) |
__gen_uint(self.surface_format, 28, 31);
out[2] = __gen_uint(self.y_offset_for_u_cb, 0, 14) |
__gen_uint(self.x_offset_for_u_cb, 16, 30);
out[3] = __gen_uint(self.y_offset_for_v_cr, 0, 15) |
__gen_uint(self.x_offset_for_v_cr, 16, 28);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for VdencSurfaceStateFields {
fn from(input: &[u32; 4]) -> Self {
VdencSurfaceStateFields {
cr_v_cb_u_pixel_offset_v_direction: __gen_unufixed(input[0], 0, 1, 2),
surface_format_byte_swizzle: __gen_unuint(input[0], 2, 2) != 0,
color_space_selection: __gen_unuint(input[0], 3, 3),
width: __gen_unuint(input[0], 4, 17),
height: __gen_unuint(input[0], 18, 31),
tile_walk: __gen_unuint(input[1], 0, 0),
tiled_surface: __gen_unuint(input[1], 1, 1),
half_pitch_for_chroma: __gen_unuint(input[1], 2, 2) != 0,
surface_pitch: __gen_unuint(input[1], 3, 19),
chroma_downsample_filter_control: __gen_unuint(input[1], 20, 22),
format: __gen_unuint(input[1], 27, 31),
surface_format: __gen_unuint(input[1], 28, 31),
y_offset_for_u_cb: __gen_unuint(input[2], 0, 14),
x_offset_for_u_cb: __gen_unuint(input[2], 16, 30),
y_offset_for_v_cr: __gen_unuint(input[3], 0, 15),
x_offset_for_v_cr: __gen_unuint(input[3], 16, 28),
}
}
}
impl Deserialize for VdencSurfaceStateFields {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct VdencWalkerState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub mb_lcu_start_y_position: u32,
pub mb_lcu_start_x_position: u32,
pub first_super_slice: bool,
pub next_slice_mb_start_y_position: u32,
pub next_slice_mb_lcu_start_x_position: u32,
pub log2_weight_denominator_luma: u32,
pub hevc_vp9_log2_weight_denominator_luma: u32,
pub tile_start_ctb_y: u32,
pub tile_start_ctb_x: u32,
pub tile_width: u32,
pub tile_stream_in_offset_enable: bool,
pub tile_stream_in_offset: u32,
pub tile_row_store_offset_enable: bool,
pub tile_row_store_offset: u32,
pub tile_stream_out_offset_enable: bool,
pub tile_stream_out_offset: u32,
pub tile_lcu_stream_out_offset_enable: bool,
pub tile_lcu_stream_out_offset: u32,
}
impl VdencWalkerState {
pub const DWORD_LENGTH: u32 = 10;
}
impl Default for VdencWalkerState {
fn default() -> Self {
VdencWalkerState {
dword_length: 0,
subopcode_b: 7,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
mb_lcu_start_y_position: Default::default(),
mb_lcu_start_x_position: Default::default(),
first_super_slice: Default::default(),
next_slice_mb_start_y_position: Default::default(),
next_slice_mb_lcu_start_x_position: Default::default(),
log2_weight_denominator_luma: Default::default(),
hevc_vp9_log2_weight_denominator_luma: Default::default(),
tile_start_ctb_y: Default::default(),
tile_start_ctb_x: Default::default(),
tile_width: Default::default(),
tile_stream_in_offset_enable: Default::default(),
tile_stream_in_offset: Default::default(),
tile_row_store_offset_enable: Default::default(),
tile_row_store_offset: Default::default(),
tile_stream_out_offset_enable: Default::default(),
tile_stream_out_offset: Default::default(),
tile_lcu_stream_out_offset_enable: Default::default(),
tile_lcu_stream_out_offset: Default::default(),
}
}
}
impl Serialize for VdencWalkerState {
type Out = [u32; 10];
fn pack_into(&self, out: &mut [u32; 10]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.mb_lcu_start_y_position, 0, 8) |
__gen_uint(self.mb_lcu_start_x_position, 16, 24) |
__gen_uint(self.first_super_slice.into(), 28, 28);
out[2] = __gen_uint(self.next_slice_mb_start_y_position, 0, 9) |
__gen_uint(self.next_slice_mb_lcu_start_x_position, 16, 25);
out[3] = __gen_uint(self.log2_weight_denominator_luma, 0, 2) |
__gen_uint(self.hevc_vp9_log2_weight_denominator_luma, 4, 6);
out[4] = __gen_uint(self.tile_start_ctb_y, 0, 15) |
__gen_uint(self.tile_start_ctb_x, 16, 31);
out[5] = __gen_uint(self.tile_width, 0, 15);
out[6] = __gen_uint(self.tile_stream_in_offset_enable.into(), 0, 0) |
__gen_uint(self.tile_stream_in_offset, 6, 31);
out[7] = __gen_uint(self.tile_row_store_offset_enable.into(), 0, 0) |
__gen_uint(self.tile_row_store_offset, 6, 31);
out[8] = __gen_uint(self.tile_stream_out_offset_enable.into(), 0, 0) |
__gen_uint(self.tile_stream_out_offset, 6, 31);
out[9] = __gen_uint(self.tile_lcu_stream_out_offset_enable.into(), 0, 0) |
__gen_uint(self.tile_lcu_stream_out_offset, 6, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 10];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 10] as *const [u8; 40]) })
}
}
impl From<&[u32; 10]> for VdencWalkerState {
fn from(input: &[u32; 10]) -> Self {
VdencWalkerState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
mb_lcu_start_y_position: __gen_unuint(input[1], 0, 8),
mb_lcu_start_x_position: __gen_unuint(input[1], 16, 24),
first_super_slice: __gen_unuint(input[1], 28, 28) != 0,
next_slice_mb_start_y_position: __gen_unuint(input[2], 0, 9),
next_slice_mb_lcu_start_x_position: __gen_unuint(input[2], 16, 25),
log2_weight_denominator_luma: __gen_unuint(input[3], 0, 2),
hevc_vp9_log2_weight_denominator_luma: __gen_unuint(input[3], 4, 6),
tile_start_ctb_y: __gen_unuint(input[4], 0, 15),
tile_start_ctb_x: __gen_unuint(input[4], 16, 31),
tile_width: __gen_unuint(input[5], 0, 15),
tile_stream_in_offset_enable: __gen_unuint(input[6], 0, 0) != 0,
tile_stream_in_offset: __gen_unuint(input[6], 6, 31),
tile_row_store_offset_enable: __gen_unuint(input[7], 0, 0) != 0,
tile_row_store_offset: __gen_unuint(input[7], 6, 31),
tile_stream_out_offset_enable: __gen_unuint(input[8], 0, 0) != 0,
tile_stream_out_offset: __gen_unuint(input[8], 6, 31),
tile_lcu_stream_out_offset_enable: __gen_unuint(input[9], 0, 0) != 0,
tile_lcu_stream_out_offset: __gen_unuint(input[9], 6, 31),
}
}
}
impl Deserialize for VdencWalkerState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 10];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 10] as *mut [u8; 40]) })?;
Ok((&input).into())
}
}
pub struct VdencWeightsoffsetsState {
pub dword_length: u32,
pub subopcode_b: u32,
pub subopcode_a: u32,
pub media_command_opcode: u32,
pub pipeline: u32,
pub command_type: u32,
pub weights_forward_reference_0: i32,
pub offset_forward_reference_0: i32,
pub weights_forward_reference_1: i32,
pub offset_forward_reference_1: i32,
pub weights_forward_reference_2: i32,
pub offset_forward_reference_2: i32,
pub hevc_vp9_weights_backward_reference_0: i32,
pub hevc_vp9_offset_backward_reference_0: i32,
}
impl VdencWeightsoffsetsState {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for VdencWeightsoffsetsState {
fn default() -> Self {
VdencWeightsoffsetsState {
dword_length: 1,
subopcode_b: 8,
subopcode_a: 0,
media_command_opcode: 1,
pipeline: 2,
command_type: 3,
weights_forward_reference_0: Default::default(),
offset_forward_reference_0: Default::default(),
weights_forward_reference_1: Default::default(),
offset_forward_reference_1: Default::default(),
weights_forward_reference_2: Default::default(),
offset_forward_reference_2: Default::default(),
hevc_vp9_weights_backward_reference_0: Default::default(),
hevc_vp9_offset_backward_reference_0: Default::default(),
}
}
}
impl Serialize for VdencWeightsoffsetsState {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 11) |
__gen_uint(self.subopcode_b, 16, 20) |
__gen_uint(self.subopcode_a, 21, 22) |
__gen_uint(self.media_command_opcode, 23, 26) |
__gen_uint(self.pipeline, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.weights_forward_reference_0 as u32, 0, 7) |
__gen_uint(self.offset_forward_reference_0 as u32, 8, 15) |
__gen_uint(self.weights_forward_reference_1 as u32, 16, 23) |
__gen_uint(self.offset_forward_reference_1 as u32, 24, 31);
out[2] = __gen_uint(self.weights_forward_reference_2 as u32, 0, 7) |
__gen_uint(self.offset_forward_reference_2 as u32, 8, 15) |
__gen_uint(self.hevc_vp9_weights_backward_reference_0 as u32, 16, 23) |
__gen_uint(self.hevc_vp9_offset_backward_reference_0 as u32, 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for VdencWeightsoffsetsState {
fn from(input: &[u32; 3]) -> Self {
VdencWeightsoffsetsState {
dword_length: __gen_unuint(input[0], 0, 11),
subopcode_b: __gen_unuint(input[0], 16, 20),
subopcode_a: __gen_unuint(input[0], 21, 22),
media_command_opcode: __gen_unuint(input[0], 23, 26),
pipeline: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
weights_forward_reference_0: (__gen_unuint(input[1], 0, 7)) as i32,
offset_forward_reference_0: (__gen_unuint(input[1], 8, 15)) as i32,
weights_forward_reference_1: (__gen_unuint(input[1], 16, 23)) as i32,
offset_forward_reference_1: (__gen_unuint(input[1], 24, 31)) as i32,
weights_forward_reference_2: (__gen_unuint(input[2], 0, 7)) as i32,
offset_forward_reference_2: (__gen_unuint(input[2], 8, 15)) as i32,
hevc_vp9_weights_backward_reference_0: (__gen_unuint(input[2], 16, 23)) as i32,
hevc_vp9_offset_backward_reference_0: (__gen_unuint(input[2], 24, 31)) as i32,
}
}
}
impl Deserialize for VdencWeightsoffsetsState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct VecsInstdone {
pub ring_enable: bool,
pub vecs_done: bool,
pub gam_done: bool,
}
impl VecsInstdone {
pub const DWORD_LENGTH: u32 = 1;
pub const NUM: u64 = 0x1a06c;
}
impl Default for VecsInstdone {
fn default() -> Self {
VecsInstdone {
ring_enable: Default::default(),
vecs_done: Default::default(),
gam_done: Default::default(),
}
}
}
impl Serialize for VecsInstdone {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.ring_enable.into(), 0, 0) |
__gen_uint(self.vecs_done.into(), 30, 30) |
__gen_uint(self.gam_done.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for VecsInstdone {
fn from(input: &[u32; 1]) -> Self {
VecsInstdone {
ring_enable: __gen_unuint(input[0], 0, 0) != 0,
vecs_done: __gen_unuint(input[0], 30, 30) != 0,
gam_done: __gen_unuint(input[0], 31, 31) != 0,
}
}
}
impl Deserialize for VecsInstdone {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct VertexBufferState<A: Addr + Default> {
pub buffer_pitch: u32,
pub null_vertex_buffer: bool,
pub address_modify_enable: bool,
pub mocs: u32,
pub vertex_buffer_index: u32,
pub buffer_starting_address: A,
pub buffer_size: u32,
}
impl<A: Addr + Default> VertexBufferState<A> {
pub const DWORD_LENGTH: u32 = 4;
}
impl<A: Addr + Default> Default for VertexBufferState<A> {
fn default() -> Self {
VertexBufferState {
buffer_pitch: Default::default(),
null_vertex_buffer: Default::default(),
address_modify_enable: Default::default(),
mocs: Default::default(),
vertex_buffer_index: Default::default(),
buffer_starting_address: Default::default(),
buffer_size: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for VertexBufferState<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.buffer_pitch, 0, 11) |
__gen_uint(self.null_vertex_buffer.into(), 13, 13) |
__gen_uint(self.address_modify_enable.into(), 14, 14) |
__gen_uint(self.mocs, 16, 22) |
__gen_uint(self.vertex_buffer_index, 26, 31);
let v1_address = self.buffer_starting_address.combine(0);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.buffer_size, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for VertexBufferState<u64> {
fn from(input: &[u32; 4]) -> Self {
VertexBufferState {
buffer_pitch: __gen_unuint(input[0], 0, 11),
null_vertex_buffer: __gen_unuint(input[0], 13, 13) != 0,
address_modify_enable: __gen_unuint(input[0], 14, 14) != 0,
mocs: __gen_unuint(input[0], 16, 22),
vertex_buffer_index: __gen_unuint(input[0], 26, 31),
buffer_starting_address: (__gen_unuint(input[1], 0, 31) as u64) |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
buffer_size: __gen_unuint(input[3], 0, 31),
}
}
}
impl Deserialize for VertexBufferState<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct VertexElementState {
pub source_element_offset: u32,
pub edge_flag_enable: bool,
pub source_element_format: u32,
pub valid: bool,
pub vertex_buffer_index: u32,
pub component_3_control: _3dVertexComponentControl,
pub component_2_control: _3dVertexComponentControl,
pub component_1_control: _3dVertexComponentControl,
pub component_0_control: _3dVertexComponentControl,
}
impl VertexElementState {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for VertexElementState {
fn default() -> Self {
VertexElementState {
source_element_offset: Default::default(),
edge_flag_enable: Default::default(),
source_element_format: Default::default(),
valid: Default::default(),
vertex_buffer_index: Default::default(),
component_3_control: Default::default(),
component_2_control: Default::default(),
component_1_control: Default::default(),
component_0_control: Default::default(),
}
}
}
impl Serialize for VertexElementState {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.source_element_offset, 0, 11) |
__gen_uint(self.edge_flag_enable.into(), 15, 15) |
__gen_uint(self.source_element_format, 16, 24) |
__gen_uint(self.valid.into(), 25, 25) |
__gen_uint(self.vertex_buffer_index, 26, 31);
out[1] = __gen_uint(self.component_3_control.into(), 16, 18) |
__gen_uint(self.component_2_control.into(), 20, 22) |
__gen_uint(self.component_1_control.into(), 24, 26) |
__gen_uint(self.component_0_control.into(), 28, 30);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for VertexElementState {
fn from(input: &[u32; 2]) -> Self {
VertexElementState {
source_element_offset: __gen_unuint(input[0], 0, 11),
edge_flag_enable: __gen_unuint(input[0], 15, 15) != 0,
source_element_format: __gen_unuint(input[0], 16, 24),
valid: __gen_unuint(input[0], 25, 25) != 0,
vertex_buffer_index: __gen_unuint(input[0], 26, 31),
component_3_control: (__gen_unuint(input[1], 16, 18)).into(),
component_2_control: (__gen_unuint(input[1], 20, 22)).into(),
component_1_control: (__gen_unuint(input[1], 24, 26)).into(),
component_0_control: (__gen_unuint(input[1], 28, 30)).into(),
}
}
}
impl Deserialize for VertexElementState {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct VsInvocationCount {
pub vs_invocation_count_report: u64,
}
impl VsInvocationCount {
pub const DWORD_LENGTH: u32 = 2;
pub const NUM: u64 = 0x2320;
}
impl Default for VsInvocationCount {
fn default() -> Self {
VsInvocationCount {
vs_invocation_count_report: Default::default(),
}
}
}
impl Serialize for VsInvocationCount {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.vs_invocation_count_report as u32, 0, 31);
out[1] = __gen_uint((self.vs_invocation_count_report >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for VsInvocationCount {
fn from(input: &[u32; 2]) -> Self {
VsInvocationCount {
vs_invocation_count_report: (__gen_unuint(input[0], 0, 31) as u64) |
(__gen_unuint(input[1], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for VsInvocationCount {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dPrimitive {
pub dword_length: u32,
pub predicate_enable: bool,
pub uav_coherency_required: bool,
pub indirect_parameter_enable: bool,
pub extended_parameters_present: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub primitive_topology_type: _3dPrimTopoType,
pub vertex_access_type: u32,
pub end_offset_enable: bool,
pub vertex_count_per_instance: u32,
pub start_vertex_location: u32,
pub instance_count: u32,
pub start_instance_location: u32,
pub base_vertex_location: i32,
pub extended_parameter_0: u32,
pub extended_parameter_1: u32,
pub extended_parameter_2: u32,
}
impl _3dPrimitive {
pub const DWORD_LENGTH: u32 = 10;
pub const RANDOM: u32 = 1;
pub const SEQUENTIAL: u32 = 0;
}
impl Default for _3dPrimitive {
fn default() -> Self {
_3dPrimitive {
dword_length: 5,
predicate_enable: Default::default(),
uav_coherency_required: Default::default(),
indirect_parameter_enable: Default::default(),
extended_parameters_present: Default::default(),
_3d_command_sub_opcode: 0,
_3d_command_opcode: 3,
command_subtype: 3,
command_type: 3,
primitive_topology_type: Default::default(),
vertex_access_type: Default::default(),
end_offset_enable: Default::default(),
vertex_count_per_instance: Default::default(),
start_vertex_location: Default::default(),
instance_count: Default::default(),
start_instance_location: Default::default(),
base_vertex_location: Default::default(),
extended_parameter_0: Default::default(),
extended_parameter_1: Default::default(),
extended_parameter_2: Default::default(),
}
}
}
impl Serialize for _3dPrimitive {
type Out = [u32; 10];
fn pack_into(&self, out: &mut [u32; 10]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.predicate_enable.into(), 8, 8) |
__gen_uint(self.uav_coherency_required.into(), 9, 9) |
__gen_uint(self.indirect_parameter_enable.into(), 10, 10) |
__gen_uint(self.extended_parameters_present, 11, 11) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.primitive_topology_type.into(), 0, 5) |
__gen_uint(self.vertex_access_type, 8, 8) |
__gen_uint(self.end_offset_enable.into(), 9, 9);
out[2] = __gen_uint(self.vertex_count_per_instance, 0, 31);
out[3] = __gen_uint(self.start_vertex_location, 0, 31);
out[4] = __gen_uint(self.instance_count, 0, 31);
out[5] = __gen_uint(self.start_instance_location, 0, 31);
out[6] = __gen_uint(self.base_vertex_location as u32, 0, 31);
out[7] = __gen_uint(self.extended_parameter_0, 0, 31);
out[8] = __gen_uint(self.extended_parameter_1, 0, 31);
out[9] = __gen_uint(self.extended_parameter_2, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 10];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 10] as *const [u8; 40]) })
}
}
impl From<&[u32; 10]> for _3dPrimitive {
fn from(input: &[u32; 10]) -> Self {
_3dPrimitive {
dword_length: __gen_unuint(input[0], 0, 7),
predicate_enable: __gen_unuint(input[0], 8, 8) != 0,
uav_coherency_required: __gen_unuint(input[0], 9, 9) != 0,
indirect_parameter_enable: __gen_unuint(input[0], 10, 10) != 0,
extended_parameters_present: __gen_unuint(input[0], 11, 11),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
primitive_topology_type: (__gen_unuint(input[1], 0, 5)).into(),
vertex_access_type: __gen_unuint(input[1], 8, 8),
end_offset_enable: __gen_unuint(input[1], 9, 9) != 0,
vertex_count_per_instance: __gen_unuint(input[2], 0, 31),
start_vertex_location: __gen_unuint(input[3], 0, 31),
instance_count: __gen_unuint(input[4], 0, 31),
start_instance_location: __gen_unuint(input[5], 0, 31),
base_vertex_location: (__gen_unuint(input[6], 0, 31)) as i32,
extended_parameter_0: __gen_unuint(input[7], 0, 31),
extended_parameter_1: __gen_unuint(input[8], 0, 31),
extended_parameter_2: __gen_unuint(input[9], 0, 31),
}
}
}
impl Deserialize for _3dPrimitive {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 10];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 10] as *mut [u8; 40]) })?;
Ok((&input).into())
}
}
pub struct _3dStateAaLineParameters {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub aa_coverage_slope: f32,
pub aa_point_coverage_slope: f32,
pub aa_coverage_bias: f32,
pub aa_point_coverage_bias: f32,
pub aa_coverage_endcap_slope: f32,
pub aa_point_coverage_endcap_slope: f32,
pub aa_coverage_endcap_bias: f32,
pub aa_point_coverage_endcap_bias: f32,
}
impl _3dStateAaLineParameters {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for _3dStateAaLineParameters {
fn default() -> Self {
_3dStateAaLineParameters {
dword_length: 1,
_3d_command_sub_opcode: 10,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
aa_coverage_slope: Default::default(),
aa_point_coverage_slope: Default::default(),
aa_coverage_bias: Default::default(),
aa_point_coverage_bias: Default::default(),
aa_coverage_endcap_slope: Default::default(),
aa_point_coverage_endcap_slope: Default::default(),
aa_coverage_endcap_bias: Default::default(),
aa_point_coverage_endcap_bias: Default::default(),
}
}
}
impl Serialize for _3dStateAaLineParameters {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_ufixed(self.aa_coverage_slope, 0, 7, 8) |
__gen_ufixed(self.aa_point_coverage_slope, 8, 15, 8) |
__gen_ufixed(self.aa_coverage_bias, 16, 23, 8) |
__gen_ufixed(self.aa_point_coverage_bias, 24, 31, 8);
out[2] = __gen_ufixed(self.aa_coverage_endcap_slope, 0, 7, 8) |
__gen_ufixed(self.aa_point_coverage_endcap_slope, 8, 15, 8) |
__gen_ufixed(self.aa_coverage_endcap_bias, 16, 23, 8) |
__gen_ufixed(self.aa_point_coverage_endcap_bias, 24, 31, 8);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateAaLineParameters {
fn from(input: &[u32; 3]) -> Self {
_3dStateAaLineParameters {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
aa_coverage_slope: __gen_unufixed(input[1], 0, 7, 8),
aa_point_coverage_slope: __gen_unufixed(input[1], 8, 15, 8),
aa_coverage_bias: __gen_unufixed(input[1], 16, 23, 8),
aa_point_coverage_bias: __gen_unufixed(input[1], 24, 31, 8),
aa_coverage_endcap_slope: __gen_unufixed(input[2], 0, 7, 8),
aa_point_coverage_endcap_slope: __gen_unufixed(input[2], 8, 15, 8),
aa_coverage_endcap_bias: __gen_unufixed(input[2], 16, 23, 8),
aa_point_coverage_endcap_bias: __gen_unufixed(input[2], 24, 31, 8),
}
}
}
impl Deserialize for _3dStateAaLineParameters {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTableEditDs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub binding_table_edit_target: u32,
pub binding_table_block_clear: u32,
}
impl _3dStateBindingTableEditDs {
pub const DWORD_LENGTH: u32 = 2;
pub const ALL_CORES: u32 = 3;
pub const CORE_0: u32 = 1;
pub const CORE_1: u32 = 2;
}
impl Default for _3dStateBindingTableEditDs {
fn default() -> Self {
_3dStateBindingTableEditDs {
dword_length: 0,
_3d_command_sub_opcode: 70,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
binding_table_edit_target: Default::default(),
binding_table_block_clear: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTableEditDs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 8) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.binding_table_edit_target, 0, 1) |
__gen_uint(self.binding_table_block_clear, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTableEditDs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTableEditDs {
dword_length: __gen_unuint(input[0], 0, 8),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
binding_table_edit_target: __gen_unuint(input[1], 0, 1),
binding_table_block_clear: __gen_unuint(input[1], 16, 31),
}
}
}
impl Deserialize for _3dStateBindingTableEditDs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTableEditGs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub binding_table_edit_target: u32,
pub binding_table_block_clear: u32,
}
impl _3dStateBindingTableEditGs {
pub const DWORD_LENGTH: u32 = 2;
pub const ALL_CORES: u32 = 3;
pub const CORE_0: u32 = 1;
pub const CORE_1: u32 = 2;
}
impl Default for _3dStateBindingTableEditGs {
fn default() -> Self {
_3dStateBindingTableEditGs {
dword_length: 0,
_3d_command_sub_opcode: 68,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
binding_table_edit_target: Default::default(),
binding_table_block_clear: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTableEditGs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 8) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.binding_table_edit_target, 0, 1) |
__gen_uint(self.binding_table_block_clear, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTableEditGs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTableEditGs {
dword_length: __gen_unuint(input[0], 0, 8),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
binding_table_edit_target: __gen_unuint(input[1], 0, 1),
binding_table_block_clear: __gen_unuint(input[1], 16, 31),
}
}
}
impl Deserialize for _3dStateBindingTableEditGs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTableEditHs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub binding_table_edit_target: u32,
pub binding_table_block_clear: u32,
}
impl _3dStateBindingTableEditHs {
pub const DWORD_LENGTH: u32 = 2;
pub const ALL_CORES: u32 = 3;
pub const CORE_0: u32 = 1;
pub const CORE_1: u32 = 2;
}
impl Default for _3dStateBindingTableEditHs {
fn default() -> Self {
_3dStateBindingTableEditHs {
dword_length: 0,
_3d_command_sub_opcode: 69,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
binding_table_edit_target: Default::default(),
binding_table_block_clear: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTableEditHs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 8) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.binding_table_edit_target, 0, 1) |
__gen_uint(self.binding_table_block_clear, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTableEditHs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTableEditHs {
dword_length: __gen_unuint(input[0], 0, 8),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
binding_table_edit_target: __gen_unuint(input[1], 0, 1),
binding_table_block_clear: __gen_unuint(input[1], 16, 31),
}
}
}
impl Deserialize for _3dStateBindingTableEditHs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTableEditPs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub binding_table_edit_target: u32,
pub binding_table_block_clear: u32,
}
impl _3dStateBindingTableEditPs {
pub const DWORD_LENGTH: u32 = 2;
pub const ALL_CORES: u32 = 3;
pub const CORE_0: u32 = 1;
pub const CORE_1: u32 = 2;
}
impl Default for _3dStateBindingTableEditPs {
fn default() -> Self {
_3dStateBindingTableEditPs {
dword_length: 0,
_3d_command_sub_opcode: 71,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
binding_table_edit_target: Default::default(),
binding_table_block_clear: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTableEditPs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 8) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.binding_table_edit_target, 0, 1) |
__gen_uint(self.binding_table_block_clear, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTableEditPs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTableEditPs {
dword_length: __gen_unuint(input[0], 0, 8),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
binding_table_edit_target: __gen_unuint(input[1], 0, 1),
binding_table_block_clear: __gen_unuint(input[1], 16, 31),
}
}
}
impl Deserialize for _3dStateBindingTableEditPs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTableEditVs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub binding_table_edit_target: u32,
pub binding_table_block_clear: u32,
}
impl _3dStateBindingTableEditVs {
pub const DWORD_LENGTH: u32 = 2;
pub const ALL_CORES: u32 = 3;
pub const CORE_0: u32 = 1;
pub const CORE_1: u32 = 2;
}
impl Default for _3dStateBindingTableEditVs {
fn default() -> Self {
_3dStateBindingTableEditVs {
dword_length: 0,
_3d_command_sub_opcode: 67,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
binding_table_edit_target: Default::default(),
binding_table_block_clear: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTableEditVs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 8) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.binding_table_edit_target, 0, 1) |
__gen_uint(self.binding_table_block_clear, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTableEditVs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTableEditVs {
dword_length: __gen_unuint(input[0], 0, 8),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
binding_table_edit_target: __gen_unuint(input[1], 0, 1),
binding_table_block_clear: __gen_unuint(input[1], 16, 31),
}
}
}
impl Deserialize for _3dStateBindingTableEditVs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTablePointersDs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_ds_binding_table: u64,
}
impl _3dStateBindingTablePointersDs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateBindingTablePointersDs {
fn default() -> Self {
_3dStateBindingTablePointersDs {
dword_length: 0,
_3d_command_sub_opcode: 40,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_ds_binding_table: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTablePointersDs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_ds_binding_table as u32, 5, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTablePointersDs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTablePointersDs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_ds_binding_table: (__gen_unuint(input[1], 5, 15) as u64) << 5,
}
}
}
impl Deserialize for _3dStateBindingTablePointersDs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTablePointersGs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_gs_binding_table: u64,
}
impl _3dStateBindingTablePointersGs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateBindingTablePointersGs {
fn default() -> Self {
_3dStateBindingTablePointersGs {
dword_length: 0,
_3d_command_sub_opcode: 41,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_gs_binding_table: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTablePointersGs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_gs_binding_table as u32, 5, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTablePointersGs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTablePointersGs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_gs_binding_table: (__gen_unuint(input[1], 5, 15) as u64) << 5,
}
}
}
impl Deserialize for _3dStateBindingTablePointersGs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTablePointersHs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_hs_binding_table: u64,
}
impl _3dStateBindingTablePointersHs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateBindingTablePointersHs {
fn default() -> Self {
_3dStateBindingTablePointersHs {
dword_length: 0,
_3d_command_sub_opcode: 39,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_hs_binding_table: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTablePointersHs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_hs_binding_table as u32, 5, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTablePointersHs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTablePointersHs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_hs_binding_table: (__gen_unuint(input[1], 5, 15) as u64) << 5,
}
}
}
impl Deserialize for _3dStateBindingTablePointersHs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTablePointersPs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_ps_binding_table: u64,
}
impl _3dStateBindingTablePointersPs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateBindingTablePointersPs {
fn default() -> Self {
_3dStateBindingTablePointersPs {
dword_length: 0,
_3d_command_sub_opcode: 42,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_ps_binding_table: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTablePointersPs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_ps_binding_table as u32, 5, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTablePointersPs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTablePointersPs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_ps_binding_table: (__gen_unuint(input[1], 5, 15) as u64) << 5,
}
}
}
impl Deserialize for _3dStateBindingTablePointersPs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTablePointersVs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_vs_binding_table: u64,
}
impl _3dStateBindingTablePointersVs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateBindingTablePointersVs {
fn default() -> Self {
_3dStateBindingTablePointersVs {
dword_length: 0,
_3d_command_sub_opcode: 38,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_vs_binding_table: Default::default(),
}
}
}
impl Serialize for _3dStateBindingTablePointersVs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_vs_binding_table as u32, 5, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBindingTablePointersVs {
fn from(input: &[u32; 2]) -> Self {
_3dStateBindingTablePointersVs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_vs_binding_table: (__gen_unuint(input[1], 5, 15) as u64) << 5,
}
}
}
impl Deserialize for _3dStateBindingTablePointersVs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBindingTablePoolAlloc<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub mocs: u32,
pub binding_table_pool_enable: u32,
pub binding_table_pool_base_address: A,
pub binding_table_pool_buffer_size: u32,
}
impl<A: Addr + Default> _3dStateBindingTablePoolAlloc<A> {
pub const DWORD_LENGTH: u32 = 4;
pub const NO_VALID_DATA: u32 = 0;
}
impl<A: Addr + Default> Default for _3dStateBindingTablePoolAlloc<A> {
fn default() -> Self {
_3dStateBindingTablePoolAlloc {
dword_length: 2,
_3d_command_sub_opcode: 25,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
mocs: Default::default(),
binding_table_pool_enable: Default::default(),
binding_table_pool_base_address: Default::default(),
binding_table_pool_buffer_size: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateBindingTablePoolAlloc<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.mocs, 0, 6) |
__gen_uint(self.binding_table_pool_enable, 11, 11);
let v1_address = self.binding_table_pool_base_address.combine(v1);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.binding_table_pool_buffer_size, 12, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for _3dStateBindingTablePoolAlloc<u64> {
fn from(input: &[u32; 4]) -> Self {
_3dStateBindingTablePoolAlloc {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
mocs: __gen_unuint(input[1], 0, 6),
binding_table_pool_enable: __gen_unuint(input[1], 11, 11),
binding_table_pool_base_address: (__gen_unuint(input[1], 12, 31) as u64) << 12 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
binding_table_pool_buffer_size: __gen_unuint(input[3], 12, 31),
}
}
}
impl Deserialize for _3dStateBindingTablePoolAlloc<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct _3dStateBlendStatePointers {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub blend_state_pointer_valid: bool,
pub blend_state_pointer: u64,
}
impl _3dStateBlendStatePointers {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateBlendStatePointers {
fn default() -> Self {
_3dStateBlendStatePointers {
dword_length: 0,
_3d_command_sub_opcode: 36,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
blend_state_pointer_valid: Default::default(),
blend_state_pointer: Default::default(),
}
}
}
impl Serialize for _3dStateBlendStatePointers {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.blend_state_pointer_valid.into(), 0, 0) |
__gen_offset(self.blend_state_pointer as u32, 6, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateBlendStatePointers {
fn from(input: &[u32; 2]) -> Self {
_3dStateBlendStatePointers {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
blend_state_pointer_valid: __gen_unuint(input[1], 0, 0) != 0,
blend_state_pointer: (__gen_unuint(input[1], 6, 31) as u64) << 6,
}
}
}
impl Deserialize for _3dStateBlendStatePointers {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateCcStatePointers {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub color_calc_state_pointer_valid: bool,
pub color_calc_state_pointer: u64,
}
impl _3dStateCcStatePointers {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateCcStatePointers {
fn default() -> Self {
_3dStateCcStatePointers {
dword_length: 0,
_3d_command_sub_opcode: 14,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
color_calc_state_pointer_valid: Default::default(),
color_calc_state_pointer: Default::default(),
}
}
}
impl Serialize for _3dStateCcStatePointers {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.color_calc_state_pointer_valid.into(), 0, 0) |
__gen_offset(self.color_calc_state_pointer as u32, 6, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateCcStatePointers {
fn from(input: &[u32; 2]) -> Self {
_3dStateCcStatePointers {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
color_calc_state_pointer_valid: __gen_unuint(input[1], 0, 0) != 0,
color_calc_state_pointer: (__gen_unuint(input[1], 6, 31) as u64) << 6,
}
}
}
impl Deserialize for _3dStateCcStatePointers {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateChromaKey {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub chromakey_table_index: u32,
pub chromakey_low_value: u32,
pub chromakey_high_value: u32,
}
impl _3dStateChromaKey {
pub const DWORD_LENGTH: u32 = 4;
}
impl Default for _3dStateChromaKey {
fn default() -> Self {
_3dStateChromaKey {
dword_length: 2,
_3d_command_sub_opcode: 4,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
chromakey_table_index: Default::default(),
chromakey_low_value: Default::default(),
chromakey_high_value: Default::default(),
}
}
}
impl Serialize for _3dStateChromaKey {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.chromakey_table_index, 30, 31);
out[2] = __gen_uint(self.chromakey_low_value, 0, 31);
out[3] = __gen_uint(self.chromakey_high_value, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for _3dStateChromaKey {
fn from(input: &[u32; 4]) -> Self {
_3dStateChromaKey {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
chromakey_table_index: __gen_unuint(input[1], 30, 31),
chromakey_low_value: __gen_unuint(input[2], 0, 31),
chromakey_high_value: __gen_unuint(input[3], 0, 31),
}
}
}
impl Deserialize for _3dStateChromaKey {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct _3dStateClearParams {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub depth_clear_value: f32,
pub depth_clear_value_valid: bool,
}
impl _3dStateClearParams {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for _3dStateClearParams {
fn default() -> Self {
_3dStateClearParams {
dword_length: 1,
_3d_command_sub_opcode: 4,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
depth_clear_value: Default::default(),
depth_clear_value_valid: Default::default(),
}
}
}
impl Serialize for _3dStateClearParams {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = self.depth_clear_value.to_bits();
out[2] = __gen_uint(self.depth_clear_value_valid.into(), 0, 0);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateClearParams {
fn from(input: &[u32; 3]) -> Self {
_3dStateClearParams {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
depth_clear_value: f32::from_bits(input[1]),
depth_clear_value_valid: __gen_unuint(input[2], 0, 0) != 0,
}
}
}
impl Deserialize for _3dStateClearParams {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateClip {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub user_clip_distance_cull_test_enable_bitmask: u32,
pub statistics_enable: bool,
pub force_clip_mode: bool,
pub force_user_clip_distance_clip_test_enable_bitmask: bool,
pub early_cull_enable: bool,
pub vertex_sub_pixel_precision_select: u32,
pub force_user_clip_distance_cull_test_enable_bitmask: bool,
pub triangle_fan_provoking_vertex_select: u32,
pub line_strip_list_provoking_vertex_select: u32,
pub triangle_strip_list_provoking_vertex_select: u32,
pub non_perspective_barycentric_enable: bool,
pub perspective_divide_disable: bool,
pub clip_mode: u32,
pub user_clip_distance_clip_test_enable_bitmask: u32,
pub guardband_clip_test_enable: bool,
pub viewport_xy_clip_test_enable: bool,
pub api_mode: u32,
pub clip_enable: bool,
pub maximum_vp_index: u32,
pub force_zero_rta_index_enable: bool,
pub maximum_point_width: f32,
pub minimum_point_width: f32,
}
impl _3dStateClip {
pub const DWORD_LENGTH: u32 = 4;
pub const APIMODE_D3D: u32 = 1;
pub const APIMODE_OGL: u32 = 0;
pub const CLIPMODE_ACCEPT_ALL: u32 = 4;
pub const CLIPMODE_NORMAL: u32 = 0;
pub const CLIPMODE_REJECT_ALL: u32 = 3;
pub const _4_BIT: u32 = 1;
pub const _8_BIT: u32 = 0;
}
impl Default for _3dStateClip {
fn default() -> Self {
_3dStateClip {
dword_length: 2,
_3d_command_sub_opcode: 18,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
user_clip_distance_cull_test_enable_bitmask: Default::default(),
statistics_enable: Default::default(),
force_clip_mode: Default::default(),
force_user_clip_distance_clip_test_enable_bitmask: Default::default(),
early_cull_enable: Default::default(),
vertex_sub_pixel_precision_select: Default::default(),
force_user_clip_distance_cull_test_enable_bitmask: Default::default(),
triangle_fan_provoking_vertex_select: Default::default(),
line_strip_list_provoking_vertex_select: Default::default(),
triangle_strip_list_provoking_vertex_select: Default::default(),
non_perspective_barycentric_enable: Default::default(),
perspective_divide_disable: Default::default(),
clip_mode: Default::default(),
user_clip_distance_clip_test_enable_bitmask: Default::default(),
guardband_clip_test_enable: Default::default(),
viewport_xy_clip_test_enable: Default::default(),
api_mode: Default::default(),
clip_enable: Default::default(),
maximum_vp_index: Default::default(),
force_zero_rta_index_enable: Default::default(),
maximum_point_width: Default::default(),
minimum_point_width: Default::default(),
}
}
}
impl Serialize for _3dStateClip {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.user_clip_distance_cull_test_enable_bitmask, 0, 7) |
__gen_uint(self.statistics_enable.into(), 10, 10) |
__gen_uint(self.force_clip_mode.into(), 16, 16) |
__gen_uint(self.force_user_clip_distance_clip_test_enable_bitmask.into(), 17, 17) |
__gen_uint(self.early_cull_enable.into(), 18, 18) |
__gen_uint(self.vertex_sub_pixel_precision_select, 19, 19) |
__gen_uint(self.force_user_clip_distance_cull_test_enable_bitmask.into(), 20, 20);
out[2] = __gen_uint(self.triangle_fan_provoking_vertex_select, 0, 1) |
__gen_uint(self.line_strip_list_provoking_vertex_select, 2, 3) |
__gen_uint(self.triangle_strip_list_provoking_vertex_select, 4, 5) |
__gen_uint(self.non_perspective_barycentric_enable.into(), 8, 8) |
__gen_uint(self.perspective_divide_disable.into(), 9, 9) |
__gen_uint(self.clip_mode, 13, 15) |
__gen_uint(self.user_clip_distance_clip_test_enable_bitmask, 16, 23) |
__gen_uint(self.guardband_clip_test_enable.into(), 26, 26) |
__gen_uint(self.viewport_xy_clip_test_enable.into(), 28, 28) |
__gen_uint(self.api_mode, 30, 30) |
__gen_uint(self.clip_enable.into(), 31, 31);
out[3] = __gen_uint(self.maximum_vp_index, 0, 3) |
__gen_uint(self.force_zero_rta_index_enable.into(), 5, 5) |
__gen_ufixed(self.maximum_point_width, 6, 16, 3) |
__gen_ufixed(self.minimum_point_width, 17, 27, 3);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for _3dStateClip {
fn from(input: &[u32; 4]) -> Self {
_3dStateClip {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
user_clip_distance_cull_test_enable_bitmask: __gen_unuint(input[1], 0, 7),
statistics_enable: __gen_unuint(input[1], 10, 10) != 0,
force_clip_mode: __gen_unuint(input[1], 16, 16) != 0,
force_user_clip_distance_clip_test_enable_bitmask: __gen_unuint(input[1], 17, 17) != 0,
early_cull_enable: __gen_unuint(input[1], 18, 18) != 0,
vertex_sub_pixel_precision_select: __gen_unuint(input[1], 19, 19),
force_user_clip_distance_cull_test_enable_bitmask: __gen_unuint(input[1], 20, 20) != 0,
triangle_fan_provoking_vertex_select: __gen_unuint(input[2], 0, 1),
line_strip_list_provoking_vertex_select: __gen_unuint(input[2], 2, 3),
triangle_strip_list_provoking_vertex_select: __gen_unuint(input[2], 4, 5),
non_perspective_barycentric_enable: __gen_unuint(input[2], 8, 8) != 0,
perspective_divide_disable: __gen_unuint(input[2], 9, 9) != 0,
clip_mode: __gen_unuint(input[2], 13, 15),
user_clip_distance_clip_test_enable_bitmask: __gen_unuint(input[2], 16, 23),
guardband_clip_test_enable: __gen_unuint(input[2], 26, 26) != 0,
viewport_xy_clip_test_enable: __gen_unuint(input[2], 28, 28) != 0,
api_mode: __gen_unuint(input[2], 30, 30),
clip_enable: __gen_unuint(input[2], 31, 31) != 0,
maximum_vp_index: __gen_unuint(input[3], 0, 3),
force_zero_rta_index_enable: __gen_unuint(input[3], 5, 5) != 0,
maximum_point_width: __gen_unufixed(input[3], 6, 16, 3),
minimum_point_width: __gen_unufixed(input[3], 17, 27, 3),
}
}
}
impl Deserialize for _3dStateClip {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct _3dStateConstantBody<A: Addr + Default> {
pub read_length: [u32; 4],
pub buffer: [A; 4],
}
impl<A: Addr + Default> _3dStateConstantBody<A> {
pub const DWORD_LENGTH: u32 = 10;
}
impl<A: Addr + Default> Default for _3dStateConstantBody<A> {
fn default() -> Self {
_3dStateConstantBody {
read_length: Default::default(),
buffer: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateConstantBody<A> {
type Out = [u32; 10];
fn pack_into(&self, out: &mut [u32; 10]) {
out[0] = __gen_uint(self.read_length[0], 0, 15) |
__gen_uint(self.read_length[1], 16, 31);
out[1] = __gen_uint(self.read_length[2], 0, 15) |
__gen_uint(self.read_length[3], 16, 31);
let v2_address = self.buffer[0].combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
let v4_address = self.buffer[1].combine(0);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
let v6_address = self.buffer[2].combine(0);
out[6] = v6_address as u32;
out[7] = (v6_address >> 32) as u32;
let v8_address = self.buffer[3].combine(0);
out[8] = v8_address as u32;
out[9] = (v8_address >> 32) as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 10];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 10] as *const [u8; 40]) })
}
}
impl From<&[u32; 10]> for _3dStateConstantBody<u64> {
fn from(input: &[u32; 10]) -> Self {
_3dStateConstantBody {
read_length: [
__gen_unuint(input[0], 0, 15),
__gen_unuint(input[0], 16, 31),
__gen_unuint(input[1], 0, 15),
__gen_unuint(input[1], 16, 31)
],
buffer: [
(__gen_unuint(input[2], 5, 31) as u64) << 5 |
(__gen_unuint(input[3], 0, 31) as u64) << 32,
(__gen_unuint(input[4], 5, 31) as u64) << 5 |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
(__gen_unuint(input[6], 5, 31) as u64) << 5 |
(__gen_unuint(input[7], 0, 31) as u64) << 32,
(__gen_unuint(input[8], 5, 31) as u64) << 5 |
(__gen_unuint(input[9], 0, 31) as u64) << 32
],
}
}
}
impl Deserialize for _3dStateConstantBody<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 10];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 10] as *mut [u8; 40]) })?;
Ok((&input).into())
}
}
pub struct _3dStateConstantDs<A: Addr + Default> {
pub dword_length: u32,
pub mocs: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_body: _3dStateConstantBody<A>,
}
impl<A: Addr + Default> _3dStateConstantDs<A> {
pub const DWORD_LENGTH: u32 = 11;
}
impl<A: Addr + Default> Default for _3dStateConstantDs<A> {
fn default() -> Self {
_3dStateConstantDs {
dword_length: 9,
mocs: Default::default(),
_3d_command_sub_opcode: 26,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
constant_body: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateConstantDs<A> {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mocs, 8, 14) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_10 @ ..] = out;
self.constant_body.pack_into(out1_10);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for _3dStateConstantDs<u64> {
fn from(input: &[u32; 11]) -> Self {
_3dStateConstantDs {
dword_length: __gen_unuint(input[0], 0, 7),
mocs: __gen_unuint(input[0], 8, 14),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_body: {{
let [_, ref in1_10 @ ..] = input;
in1_10.into()
}},
}
}
}
impl Deserialize for _3dStateConstantDs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct _3dStateConstantGs<A: Addr + Default> {
pub dword_length: u32,
pub mocs: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_body: _3dStateConstantBody<A>,
}
impl<A: Addr + Default> _3dStateConstantGs<A> {
pub const DWORD_LENGTH: u32 = 11;
}
impl<A: Addr + Default> Default for _3dStateConstantGs<A> {
fn default() -> Self {
_3dStateConstantGs {
dword_length: 9,
mocs: Default::default(),
_3d_command_sub_opcode: 22,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
constant_body: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateConstantGs<A> {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mocs, 8, 14) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_10 @ ..] = out;
self.constant_body.pack_into(out1_10);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for _3dStateConstantGs<u64> {
fn from(input: &[u32; 11]) -> Self {
_3dStateConstantGs {
dword_length: __gen_unuint(input[0], 0, 7),
mocs: __gen_unuint(input[0], 8, 14),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_body: {{
let [_, ref in1_10 @ ..] = input;
in1_10.into()
}},
}
}
}
impl Deserialize for _3dStateConstantGs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct _3dStateConstantHs<A: Addr + Default> {
pub dword_length: u32,
pub mocs: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_body: _3dStateConstantBody<A>,
}
impl<A: Addr + Default> _3dStateConstantHs<A> {
pub const DWORD_LENGTH: u32 = 11;
}
impl<A: Addr + Default> Default for _3dStateConstantHs<A> {
fn default() -> Self {
_3dStateConstantHs {
dword_length: 9,
mocs: Default::default(),
_3d_command_sub_opcode: 25,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
constant_body: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateConstantHs<A> {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mocs, 8, 14) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_10 @ ..] = out;
self.constant_body.pack_into(out1_10);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for _3dStateConstantHs<u64> {
fn from(input: &[u32; 11]) -> Self {
_3dStateConstantHs {
dword_length: __gen_unuint(input[0], 0, 7),
mocs: __gen_unuint(input[0], 8, 14),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_body: {{
let [_, ref in1_10 @ ..] = input;
in1_10.into()
}},
}
}
}
impl Deserialize for _3dStateConstantHs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct _3dStateConstantPs<A: Addr + Default> {
pub dword_length: u32,
pub mocs: u32,
pub disable_gather_at_set_shader_hint: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_body: _3dStateConstantBody<A>,
}
impl<A: Addr + Default> _3dStateConstantPs<A> {
pub const DWORD_LENGTH: u32 = 11;
}
impl<A: Addr + Default> Default for _3dStateConstantPs<A> {
fn default() -> Self {
_3dStateConstantPs {
dword_length: 9,
mocs: Default::default(),
disable_gather_at_set_shader_hint: Default::default(),
_3d_command_sub_opcode: 23,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
constant_body: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateConstantPs<A> {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mocs, 8, 14) |
__gen_uint(self.disable_gather_at_set_shader_hint, 15, 15) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_10 @ ..] = out;
self.constant_body.pack_into(out1_10);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for _3dStateConstantPs<u64> {
fn from(input: &[u32; 11]) -> Self {
_3dStateConstantPs {
dword_length: __gen_unuint(input[0], 0, 7),
mocs: __gen_unuint(input[0], 8, 14),
disable_gather_at_set_shader_hint: __gen_unuint(input[0], 15, 15),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_body: {{
let [_, ref in1_10 @ ..] = input;
in1_10.into()
}},
}
}
}
impl Deserialize for _3dStateConstantPs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct _3dStateConstantVs<A: Addr + Default> {
pub dword_length: u32,
pub mocs: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_body: _3dStateConstantBody<A>,
}
impl<A: Addr + Default> _3dStateConstantVs<A> {
pub const DWORD_LENGTH: u32 = 11;
}
impl<A: Addr + Default> Default for _3dStateConstantVs<A> {
fn default() -> Self {
_3dStateConstantVs {
dword_length: 9,
mocs: Default::default(),
_3d_command_sub_opcode: 21,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
constant_body: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateConstantVs<A> {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.mocs, 8, 14) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
{
let [_, ref mut out1_10 @ ..] = out;
self.constant_body.pack_into(out1_10);
}
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for _3dStateConstantVs<u64> {
fn from(input: &[u32; 11]) -> Self {
_3dStateConstantVs {
dword_length: __gen_unuint(input[0], 0, 7),
mocs: __gen_unuint(input[0], 8, 14),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_body: {{
let [_, ref in1_10 @ ..] = input;
in1_10.into()
}},
}
}
}
impl Deserialize for _3dStateConstantVs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct _3dStateDepthBuffer<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub surface_pitch: u32,
pub surface_format: u32,
pub hierarchical_depth_buffer_enable: bool,
pub stencil_write_enable: bool,
pub depth_write_enable: bool,
pub surface_type: u32,
pub surface_base_address: A,
pub lod: u32,
pub width: u32,
pub height: u32,
pub mocs: u32,
pub minimum_array_element: u32,
pub depth: u32,
pub mip_tail_start_lod: u32,
pub tiled_resource_mode: u32,
pub surface_qpitch: u32,
pub render_target_view_extent: u32,
}
impl<A: Addr + Default> _3dStateDepthBuffer<A> {
pub const DWORD_LENGTH: u32 = 8;
pub const D16_UNORM: u32 = 5;
pub const D24_UNORM_X8_UINT: u32 = 3;
pub const D32_FLOAT: u32 = 1;
pub const NONE: u32 = 0;
pub const SURFTYPE_2D: u32 = 1;
pub const SURFTYPE_CUBE: u32 = 3;
pub const SURFTYPE_NULL: u32 = 7;
pub const TILEYF: u32 = 1;
pub const TILEYS: u32 = 2;
}
impl<A: Addr + Default> Default for _3dStateDepthBuffer<A> {
fn default() -> Self {
_3dStateDepthBuffer {
dword_length: 6,
_3d_command_sub_opcode: 5,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
surface_pitch: Default::default(),
surface_format: Default::default(),
hierarchical_depth_buffer_enable: Default::default(),
stencil_write_enable: Default::default(),
depth_write_enable: Default::default(),
surface_type: Default::default(),
surface_base_address: Default::default(),
lod: Default::default(),
width: Default::default(),
height: Default::default(),
mocs: Default::default(),
minimum_array_element: Default::default(),
depth: Default::default(),
mip_tail_start_lod: Default::default(),
tiled_resource_mode: Default::default(),
surface_qpitch: Default::default(),
render_target_view_extent: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateDepthBuffer<A> {
type Out = [u32; 8];
fn pack_into(&self, out: &mut [u32; 8]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.surface_pitch, 0, 17) |
__gen_uint(self.surface_format, 18, 20) |
__gen_uint(self.hierarchical_depth_buffer_enable.into(), 22, 22) |
__gen_uint(self.stencil_write_enable.into(), 27, 27) |
__gen_uint(self.depth_write_enable.into(), 28, 28) |
__gen_uint(self.surface_type, 29, 31);
let v2_address = self.surface_base_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
out[4] = __gen_uint(self.lod, 0, 3) |
__gen_uint(self.width, 4, 17) |
__gen_uint(self.height, 18, 31);
out[5] = __gen_uint(self.mocs, 0, 6) |
__gen_uint(self.minimum_array_element, 10, 20) |
__gen_uint(self.depth, 21, 31);
out[6] = __gen_uint(self.mip_tail_start_lod, 26, 29) |
__gen_uint(self.tiled_resource_mode, 30, 31);
out[7] = __gen_uint(self.surface_qpitch, 0, 14) |
__gen_uint(self.render_target_view_extent, 21, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 8];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 8] as *const [u8; 32]) })
}
}
impl From<&[u32; 8]> for _3dStateDepthBuffer<u64> {
fn from(input: &[u32; 8]) -> Self {
_3dStateDepthBuffer {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
surface_pitch: __gen_unuint(input[1], 0, 17),
surface_format: __gen_unuint(input[1], 18, 20),
hierarchical_depth_buffer_enable: __gen_unuint(input[1], 22, 22) != 0,
stencil_write_enable: __gen_unuint(input[1], 27, 27) != 0,
depth_write_enable: __gen_unuint(input[1], 28, 28) != 0,
surface_type: __gen_unuint(input[1], 29, 31),
surface_base_address: (__gen_unuint(input[2], 0, 31) as u64) |
(__gen_unuint(input[3], 0, 31) as u64) << 32,
lod: __gen_unuint(input[4], 0, 3),
width: __gen_unuint(input[4], 4, 17),
height: __gen_unuint(input[4], 18, 31),
mocs: __gen_unuint(input[5], 0, 6),
minimum_array_element: __gen_unuint(input[5], 10, 20),
depth: __gen_unuint(input[5], 21, 31),
mip_tail_start_lod: __gen_unuint(input[6], 26, 29),
tiled_resource_mode: __gen_unuint(input[6], 30, 31),
surface_qpitch: __gen_unuint(input[7], 0, 14),
render_target_view_extent: __gen_unuint(input[7], 21, 31),
}
}
}
impl Deserialize for _3dStateDepthBuffer<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 8];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 8] as *mut [u8; 32]) })?;
Ok((&input).into())
}
}
pub struct _3dStateDrawingRectangle {
pub dword_length: u32,
pub core_mode_select: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub clipped_drawing_rectangle_x_min: u32,
pub clipped_drawing_rectangle_y_min: u32,
pub clipped_drawing_rectangle_x_max: u32,
pub clipped_drawing_rectangle_y_max: u32,
pub drawing_rectangle_origin_x: i32,
pub drawing_rectangle_origin_y: i32,
}
impl _3dStateDrawingRectangle {
pub const DWORD_LENGTH: u32 = 4;
pub const CORE_0_ENABLED: u32 = 1;
pub const CORE_1_ENABLED: u32 = 2;
pub const LEGACY: u32 = 0;
}
impl Default for _3dStateDrawingRectangle {
fn default() -> Self {
_3dStateDrawingRectangle {
dword_length: 2,
core_mode_select: Default::default(),
_3d_command_sub_opcode: 0,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
clipped_drawing_rectangle_x_min: Default::default(),
clipped_drawing_rectangle_y_min: Default::default(),
clipped_drawing_rectangle_x_max: Default::default(),
clipped_drawing_rectangle_y_max: Default::default(),
drawing_rectangle_origin_x: Default::default(),
drawing_rectangle_origin_y: Default::default(),
}
}
}
impl Serialize for _3dStateDrawingRectangle {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.core_mode_select, 14, 15) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.clipped_drawing_rectangle_x_min, 0, 15) |
__gen_uint(self.clipped_drawing_rectangle_y_min, 16, 31);
out[2] = __gen_uint(self.clipped_drawing_rectangle_x_max, 0, 15) |
__gen_uint(self.clipped_drawing_rectangle_y_max, 16, 31);
out[3] = __gen_uint(self.drawing_rectangle_origin_x as u32, 0, 15) |
__gen_uint(self.drawing_rectangle_origin_y as u32, 16, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for _3dStateDrawingRectangle {
fn from(input: &[u32; 4]) -> Self {
_3dStateDrawingRectangle {
dword_length: __gen_unuint(input[0], 0, 7),
core_mode_select: __gen_unuint(input[0], 14, 15),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
clipped_drawing_rectangle_x_min: __gen_unuint(input[1], 0, 15),
clipped_drawing_rectangle_y_min: __gen_unuint(input[1], 16, 31),
clipped_drawing_rectangle_x_max: __gen_unuint(input[2], 0, 15),
clipped_drawing_rectangle_y_max: __gen_unuint(input[2], 16, 31),
drawing_rectangle_origin_x: (__gen_unuint(input[3], 0, 15)) as i32,
drawing_rectangle_origin_y: (__gen_unuint(input[3], 16, 31)) as i32,
}
}
}
impl Deserialize for _3dStateDrawingRectangle {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct _3dStateDs<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub kernel_start_pointer: u64,
pub software_exception_enable: bool,
pub illegal_opcode_exception_enable: bool,
pub accesses_uav: bool,
pub floating_point_mode: u32,
pub thread_dispatch_priority: u32,
pub binding_table_entry_count: u32,
pub sampler_count: u32,
pub vector_mask_enable: bool,
pub per_thread_scratch_space: u32,
pub scratch_space_base_pointer: A,
pub patch_urb_entry_read_offset: u32,
pub patch_urb_entry_read_length: u32,
pub dispatch_grf_start_register_for_urb_data: u32,
pub enable: bool,
pub cache_disable: bool,
pub compute_w_coordinate_enable: bool,
pub dispatch_mode: u32,
pub statistics_enable: bool,
pub maximum_number_of_threads: u32,
pub user_clip_distance_cull_test_enable_bitmask: u32,
pub user_clip_distance_clip_test_enable_bitmask: u32,
pub vertex_urb_entry_output_length: u32,
pub vertex_urb_entry_output_read_offset: u32,
pub dual_patch_kernel_start_pointer: u64,
}
impl<A: Addr + Default> _3dStateDs<A> {
pub const DWORD_LENGTH: u32 = 11;
pub const ALTERNATE: u32 = 1;
pub const HIGH: u32 = 1;
pub const IEEE_754: u32 = 0;
pub const NO_SAMPLERS: u32 = 0;
pub const SIMD4X2: u32 = 0;
pub const SIMD8_SINGLE_OR_DUAL_PATCH: u32 = 2;
pub const SIMD8_SINGLE_PATCH: u32 = 1;
pub const _13_16_SAMPLERS: u32 = 4;
pub const _1_4_SAMPLERS: u32 = 1;
pub const _5_8_SAMPLERS: u32 = 2;
pub const _9_12_SAMPLERS: u32 = 3;
}
impl<A: Addr + Default> Default for _3dStateDs<A> {
fn default() -> Self {
_3dStateDs {
dword_length: 9,
_3d_command_sub_opcode: 29,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
kernel_start_pointer: Default::default(),
software_exception_enable: Default::default(),
illegal_opcode_exception_enable: Default::default(),
accesses_uav: Default::default(),
floating_point_mode: Default::default(),
thread_dispatch_priority: Default::default(),
binding_table_entry_count: Default::default(),
sampler_count: Default::default(),
vector_mask_enable: Default::default(),
per_thread_scratch_space: Default::default(),
scratch_space_base_pointer: Default::default(),
patch_urb_entry_read_offset: Default::default(),
patch_urb_entry_read_length: Default::default(),
dispatch_grf_start_register_for_urb_data: Default::default(),
enable: Default::default(),
cache_disable: Default::default(),
compute_w_coordinate_enable: Default::default(),
dispatch_mode: Default::default(),
statistics_enable: Default::default(),
maximum_number_of_threads: Default::default(),
user_clip_distance_cull_test_enable_bitmask: Default::default(),
user_clip_distance_clip_test_enable_bitmask: Default::default(),
vertex_urb_entry_output_length: Default::default(),
vertex_urb_entry_output_read_offset: Default::default(),
dual_patch_kernel_start_pointer: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateDs<A> {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.kernel_start_pointer as u32, 6, 31);
out[2] = __gen_offset((self.kernel_start_pointer >> 32) as u32, 0, 31);
out[3] = __gen_uint(self.software_exception_enable.into(), 7, 7) |
__gen_uint(self.illegal_opcode_exception_enable.into(), 13, 13) |
__gen_uint(self.accesses_uav.into(), 14, 14) |
__gen_uint(self.floating_point_mode, 16, 16) |
__gen_uint(self.thread_dispatch_priority, 17, 17) |
__gen_uint(self.binding_table_entry_count, 18, 25) |
__gen_uint(self.sampler_count, 27, 29) |
__gen_uint(self.vector_mask_enable.into(), 30, 30);
let v4 = __gen_uint(self.per_thread_scratch_space, 0, 3);
let v4_address = self.scratch_space_base_pointer.combine(v4);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
out[6] = __gen_uint(self.patch_urb_entry_read_offset, 4, 9) |
__gen_uint(self.patch_urb_entry_read_length, 11, 17) |
__gen_uint(self.dispatch_grf_start_register_for_urb_data, 20, 24);
out[7] = __gen_uint(self.enable.into(), 0, 0) |
__gen_uint(self.cache_disable.into(), 1, 1) |
__gen_uint(self.compute_w_coordinate_enable.into(), 2, 2) |
__gen_uint(self.dispatch_mode, 3, 4) |
__gen_uint(self.statistics_enable.into(), 10, 10) |
__gen_uint(self.maximum_number_of_threads, 21, 30);
out[8] = __gen_uint(self.user_clip_distance_cull_test_enable_bitmask, 0, 7) |
__gen_uint(self.user_clip_distance_clip_test_enable_bitmask, 8, 15) |
__gen_uint(self.vertex_urb_entry_output_length, 16, 20) |
__gen_uint(self.vertex_urb_entry_output_read_offset, 21, 26);
out[9] = __gen_offset(self.dual_patch_kernel_start_pointer as u32, 6, 31);
out[10] = __gen_offset((self.dual_patch_kernel_start_pointer >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for _3dStateDs<u64> {
fn from(input: &[u32; 11]) -> Self {
_3dStateDs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
kernel_start_pointer: (__gen_unuint(input[1], 6, 31) as u64) << 6 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
software_exception_enable: __gen_unuint(input[3], 7, 7) != 0,
illegal_opcode_exception_enable: __gen_unuint(input[3], 13, 13) != 0,
accesses_uav: __gen_unuint(input[3], 14, 14) != 0,
floating_point_mode: __gen_unuint(input[3], 16, 16),
thread_dispatch_priority: __gen_unuint(input[3], 17, 17),
binding_table_entry_count: __gen_unuint(input[3], 18, 25),
sampler_count: __gen_unuint(input[3], 27, 29),
vector_mask_enable: __gen_unuint(input[3], 30, 30) != 0,
per_thread_scratch_space: __gen_unuint(input[4], 0, 3),
scratch_space_base_pointer: (__gen_unuint(input[4], 10, 31) as u64) << 10 |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
patch_urb_entry_read_offset: __gen_unuint(input[6], 4, 9),
patch_urb_entry_read_length: __gen_unuint(input[6], 11, 17),
dispatch_grf_start_register_for_urb_data: __gen_unuint(input[6], 20, 24),
enable: __gen_unuint(input[7], 0, 0) != 0,
cache_disable: __gen_unuint(input[7], 1, 1) != 0,
compute_w_coordinate_enable: __gen_unuint(input[7], 2, 2) != 0,
dispatch_mode: __gen_unuint(input[7], 3, 4),
statistics_enable: __gen_unuint(input[7], 10, 10) != 0,
maximum_number_of_threads: __gen_unuint(input[7], 21, 30),
user_clip_distance_cull_test_enable_bitmask: __gen_unuint(input[8], 0, 7),
user_clip_distance_clip_test_enable_bitmask: __gen_unuint(input[8], 8, 15),
vertex_urb_entry_output_length: __gen_unuint(input[8], 16, 20),
vertex_urb_entry_output_read_offset: __gen_unuint(input[8], 21, 26),
dual_patch_kernel_start_pointer: (__gen_unuint(input[9], 6, 31) as u64) << 6 |
(__gen_unuint(input[10], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for _3dStateDs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct _3dStateGatherConstantDs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub update_gather_table_only: u32,
pub constant_buffer_binding_table_block: u32,
pub constant_buffer_valid: u32,
pub on_die_table: u32,
pub constant_buffer_dx9_generate_stall: bool,
pub gather_buffer_offset: u64,
}
impl _3dStateGatherConstantDs {
pub const DWORD_LENGTH: u32 = 3;
pub const COMMIT_GATHER: u32 = 0;
pub const LOAD: u32 = 0;
pub const NON_COMMIT_GATHER: u32 = 1;
pub const READ: u32 = 1;
}
impl Default for _3dStateGatherConstantDs {
fn default() -> Self {
_3dStateGatherConstantDs {
dword_length: 1,
_3d_command_sub_opcode: 55,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
update_gather_table_only: Default::default(),
constant_buffer_binding_table_block: Default::default(),
constant_buffer_valid: Default::default(),
on_die_table: Default::default(),
constant_buffer_dx9_generate_stall: Default::default(),
gather_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStateGatherConstantDs {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.update_gather_table_only, 1, 1) |
__gen_uint(self.constant_buffer_binding_table_block, 12, 15) |
__gen_uint(self.constant_buffer_valid, 16, 31);
out[2] = __gen_uint(self.on_die_table, 3, 3) |
__gen_uint(self.constant_buffer_dx9_generate_stall.into(), 5, 5) |
__gen_offset(self.gather_buffer_offset as u32, 6, 22);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateGatherConstantDs {
fn from(input: &[u32; 3]) -> Self {
_3dStateGatherConstantDs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
update_gather_table_only: __gen_unuint(input[1], 1, 1),
constant_buffer_binding_table_block: __gen_unuint(input[1], 12, 15),
constant_buffer_valid: __gen_unuint(input[1], 16, 31),
on_die_table: __gen_unuint(input[2], 3, 3),
constant_buffer_dx9_generate_stall: __gen_unuint(input[2], 5, 5) != 0,
gather_buffer_offset: (__gen_unuint(input[2], 6, 22) as u64) << 6,
}
}
}
impl Deserialize for _3dStateGatherConstantDs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateGatherConstantGs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub update_gather_table_only: u32,
pub constant_buffer_binding_table_block: u32,
pub constant_buffer_valid: u32,
pub on_die_table: u32,
pub constant_buffer_dx9_generate_stall: bool,
pub gather_buffer_offset: u64,
}
impl _3dStateGatherConstantGs {
pub const DWORD_LENGTH: u32 = 3;
pub const COMMIT_GATHER: u32 = 0;
pub const LOAD: u32 = 0;
pub const NON_COMMIT_GATHER: u32 = 1;
pub const READ: u32 = 1;
}
impl Default for _3dStateGatherConstantGs {
fn default() -> Self {
_3dStateGatherConstantGs {
dword_length: 1,
_3d_command_sub_opcode: 53,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
update_gather_table_only: Default::default(),
constant_buffer_binding_table_block: Default::default(),
constant_buffer_valid: Default::default(),
on_die_table: Default::default(),
constant_buffer_dx9_generate_stall: Default::default(),
gather_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStateGatherConstantGs {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.update_gather_table_only, 1, 1) |
__gen_uint(self.constant_buffer_binding_table_block, 12, 15) |
__gen_uint(self.constant_buffer_valid, 16, 31);
out[2] = __gen_uint(self.on_die_table, 3, 3) |
__gen_uint(self.constant_buffer_dx9_generate_stall.into(), 5, 5) |
__gen_offset(self.gather_buffer_offset as u32, 6, 22);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateGatherConstantGs {
fn from(input: &[u32; 3]) -> Self {
_3dStateGatherConstantGs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
update_gather_table_only: __gen_unuint(input[1], 1, 1),
constant_buffer_binding_table_block: __gen_unuint(input[1], 12, 15),
constant_buffer_valid: __gen_unuint(input[1], 16, 31),
on_die_table: __gen_unuint(input[2], 3, 3),
constant_buffer_dx9_generate_stall: __gen_unuint(input[2], 5, 5) != 0,
gather_buffer_offset: (__gen_unuint(input[2], 6, 22) as u64) << 6,
}
}
}
impl Deserialize for _3dStateGatherConstantGs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateGatherConstantHs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub update_gather_table_only: u32,
pub constant_buffer_binding_table_block: u32,
pub constant_buffer_valid: u32,
pub on_die_table: u32,
pub constant_buffer_dx9_generate_stall: bool,
pub gather_buffer_offset: u64,
}
impl _3dStateGatherConstantHs {
pub const DWORD_LENGTH: u32 = 3;
pub const COMMIT_GATHER: u32 = 0;
pub const LOAD: u32 = 0;
pub const NON_COMMIT_GATHER: u32 = 1;
pub const READ: u32 = 1;
}
impl Default for _3dStateGatherConstantHs {
fn default() -> Self {
_3dStateGatherConstantHs {
dword_length: 1,
_3d_command_sub_opcode: 54,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
update_gather_table_only: Default::default(),
constant_buffer_binding_table_block: Default::default(),
constant_buffer_valid: Default::default(),
on_die_table: Default::default(),
constant_buffer_dx9_generate_stall: Default::default(),
gather_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStateGatherConstantHs {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.update_gather_table_only, 1, 1) |
__gen_uint(self.constant_buffer_binding_table_block, 12, 15) |
__gen_uint(self.constant_buffer_valid, 16, 31);
out[2] = __gen_uint(self.on_die_table, 3, 3) |
__gen_uint(self.constant_buffer_dx9_generate_stall.into(), 5, 5) |
__gen_offset(self.gather_buffer_offset as u32, 6, 22);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateGatherConstantHs {
fn from(input: &[u32; 3]) -> Self {
_3dStateGatherConstantHs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
update_gather_table_only: __gen_unuint(input[1], 1, 1),
constant_buffer_binding_table_block: __gen_unuint(input[1], 12, 15),
constant_buffer_valid: __gen_unuint(input[1], 16, 31),
on_die_table: __gen_unuint(input[2], 3, 3),
constant_buffer_dx9_generate_stall: __gen_unuint(input[2], 5, 5) != 0,
gather_buffer_offset: (__gen_unuint(input[2], 6, 22) as u64) << 6,
}
}
}
impl Deserialize for _3dStateGatherConstantHs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateGatherConstantPs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub dx9_on_die_register_read_enable: bool,
pub update_gather_table_only: u32,
pub constant_buffer_binding_table_block: u32,
pub constant_buffer_valid: u32,
pub on_die_table: u32,
pub constant_buffer_dx9_enable: bool,
pub constant_buffer_dx9_generate_stall: bool,
pub gather_buffer_offset: u64,
}
impl _3dStateGatherConstantPs {
pub const DWORD_LENGTH: u32 = 3;
pub const COMMIT_GATHER: u32 = 0;
pub const LOAD: u32 = 0;
pub const NON_COMMIT_GATHER: u32 = 1;
pub const READ: u32 = 1;
}
impl Default for _3dStateGatherConstantPs {
fn default() -> Self {
_3dStateGatherConstantPs {
dword_length: 1,
_3d_command_sub_opcode: 56,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
dx9_on_die_register_read_enable: Default::default(),
update_gather_table_only: Default::default(),
constant_buffer_binding_table_block: Default::default(),
constant_buffer_valid: Default::default(),
on_die_table: Default::default(),
constant_buffer_dx9_enable: Default::default(),
constant_buffer_dx9_generate_stall: Default::default(),
gather_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStateGatherConstantPs {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.dx9_on_die_register_read_enable.into(), 0, 0) |
__gen_uint(self.update_gather_table_only, 1, 1) |
__gen_uint(self.constant_buffer_binding_table_block, 12, 15) |
__gen_uint(self.constant_buffer_valid, 16, 31);
out[2] = __gen_uint(self.on_die_table, 3, 3) |
__gen_uint(self.constant_buffer_dx9_enable.into(), 4, 4) |
__gen_uint(self.constant_buffer_dx9_generate_stall.into(), 5, 5) |
__gen_offset(self.gather_buffer_offset as u32, 6, 22);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateGatherConstantPs {
fn from(input: &[u32; 3]) -> Self {
_3dStateGatherConstantPs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
dx9_on_die_register_read_enable: __gen_unuint(input[1], 0, 0) != 0,
update_gather_table_only: __gen_unuint(input[1], 1, 1),
constant_buffer_binding_table_block: __gen_unuint(input[1], 12, 15),
constant_buffer_valid: __gen_unuint(input[1], 16, 31),
on_die_table: __gen_unuint(input[2], 3, 3),
constant_buffer_dx9_enable: __gen_unuint(input[2], 4, 4) != 0,
constant_buffer_dx9_generate_stall: __gen_unuint(input[2], 5, 5) != 0,
gather_buffer_offset: (__gen_unuint(input[2], 6, 22) as u64) << 6,
}
}
}
impl Deserialize for _3dStateGatherConstantPs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateGatherConstantVs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub dx9_on_die_register_read_enable: bool,
pub update_gather_table_only: u32,
pub constant_buffer_binding_table_block: u32,
pub constant_buffer_valid: u32,
pub on_die_table: u32,
pub constant_buffer_dx9_enable: bool,
pub constant_buffer_dx9_generate_stall: bool,
pub gather_buffer_offset: u64,
}
impl _3dStateGatherConstantVs {
pub const DWORD_LENGTH: u32 = 3;
pub const COMMIT_GATHER: u32 = 0;
pub const LOAD: u32 = 0;
pub const NON_COMMIT_GATHER: u32 = 1;
pub const READ: u32 = 1;
}
impl Default for _3dStateGatherConstantVs {
fn default() -> Self {
_3dStateGatherConstantVs {
dword_length: 0,
_3d_command_sub_opcode: 52,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
dx9_on_die_register_read_enable: Default::default(),
update_gather_table_only: Default::default(),
constant_buffer_binding_table_block: Default::default(),
constant_buffer_valid: Default::default(),
on_die_table: Default::default(),
constant_buffer_dx9_enable: Default::default(),
constant_buffer_dx9_generate_stall: Default::default(),
gather_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStateGatherConstantVs {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.dx9_on_die_register_read_enable.into(), 0, 0) |
__gen_uint(self.update_gather_table_only, 1, 1) |
__gen_uint(self.constant_buffer_binding_table_block, 12, 15) |
__gen_uint(self.constant_buffer_valid, 16, 31);
out[2] = __gen_uint(self.on_die_table, 3, 3) |
__gen_uint(self.constant_buffer_dx9_enable.into(), 4, 4) |
__gen_uint(self.constant_buffer_dx9_generate_stall.into(), 5, 5) |
__gen_offset(self.gather_buffer_offset as u32, 6, 22);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateGatherConstantVs {
fn from(input: &[u32; 3]) -> Self {
_3dStateGatherConstantVs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
dx9_on_die_register_read_enable: __gen_unuint(input[1], 0, 0) != 0,
update_gather_table_only: __gen_unuint(input[1], 1, 1),
constant_buffer_binding_table_block: __gen_unuint(input[1], 12, 15),
constant_buffer_valid: __gen_unuint(input[1], 16, 31),
on_die_table: __gen_unuint(input[2], 3, 3),
constant_buffer_dx9_enable: __gen_unuint(input[2], 4, 4) != 0,
constant_buffer_dx9_generate_stall: __gen_unuint(input[2], 5, 5) != 0,
gather_buffer_offset: (__gen_unuint(input[2], 6, 22) as u64) << 6,
}
}
}
impl Deserialize for _3dStateGatherConstantVs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateGatherPoolAlloc<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub mocs: u32,
pub gather_pool_enable: bool,
pub gather_pool_base_address: A,
pub gather_pool_buffer_size: u32,
}
impl<A: Addr + Default> _3dStateGatherPoolAlloc<A> {
pub const DWORD_LENGTH: u32 = 4;
}
impl<A: Addr + Default> Default for _3dStateGatherPoolAlloc<A> {
fn default() -> Self {
_3dStateGatherPoolAlloc {
dword_length: 2,
_3d_command_sub_opcode: 26,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
mocs: Default::default(),
gather_pool_enable: Default::default(),
gather_pool_base_address: Default::default(),
gather_pool_buffer_size: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateGatherPoolAlloc<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let v1 = __gen_uint(self.mocs, 0, 6) |
__gen_uint(self.gather_pool_enable.into(), 11, 11);
let v1_address = self.gather_pool_base_address.combine(v1);
out[1] = v1_address as u32;
out[2] = (v1_address >> 32) as u32;
out[3] = __gen_uint(self.gather_pool_buffer_size, 12, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for _3dStateGatherPoolAlloc<u64> {
fn from(input: &[u32; 4]) -> Self {
_3dStateGatherPoolAlloc {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
mocs: __gen_unuint(input[1], 0, 6),
gather_pool_enable: __gen_unuint(input[1], 11, 11) != 0,
gather_pool_base_address: (__gen_unuint(input[1], 12, 31) as u64) << 12 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
gather_pool_buffer_size: __gen_unuint(input[3], 12, 31),
}
}
}
impl Deserialize for _3dStateGatherPoolAlloc<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct _3dStateGs<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub kernel_start_pointer: u64,
pub expected_vertex_count: u32,
pub software_exception_enable: bool,
pub mask_stack_exception_enable: bool,
pub accesses_uav: bool,
pub illegal_opcode_exception_enable: bool,
pub floating_point_mode: u32,
pub thread_dispatch_priority: u32,
pub binding_table_entry_count: u32,
pub sampler_count: u32,
pub vector_mask_enable: bool,
pub single_program_flow: bool,
pub per_thread_scratch_space: u32,
pub scratch_space_base_pointer: A,
pub dispatch_grf_start_register_for_urb_data: u32,
pub vertex_urb_entry_read_offset: u32,
pub include_vertex_handles: bool,
pub vertex_urb_entry_read_length: u32,
pub output_topology: _3dPrimTopoType,
pub output_vertex_size: u32,
pub dispatch_grf_start_register_for_urb_data_5_4: u32,
pub enable: bool,
pub discard_adjacency: bool,
pub reorder_mode: u32,
pub hint: u32,
pub include_primitive_id: bool,
pub invocations_increment_value: u32,
pub statistics_enable: bool,
pub dispatch_mode: u32,
pub default_stream_id: u32,
pub instance_control: u32,
pub control_data_header_size: u32,
pub maximum_number_of_threads: u32,
pub static_output_vertex_count: u32,
pub static_output: bool,
pub control_data_format: u32,
pub user_clip_distance_cull_test_enable_bitmask: u32,
pub user_clip_distance_clip_test_enable_bitmask: u32,
pub vertex_urb_entry_output_length: u32,
pub vertex_urb_entry_output_read_offset: u32,
}
impl<A: Addr + Default> _3dStateGs<A> {
pub const DWORD_LENGTH: u32 = 10;
pub const ALTERNATE: u32 = 1;
pub const CUT: u32 = 0;
pub const DUAL_INSTANCE: u32 = 1;
pub const DUAL_OBJECT: u32 = 2;
pub const HIGH: u32 = 1;
pub const IEEE_754: u32 = 0;
pub const LEADING: u32 = 0;
pub const NO_SAMPLERS: u32 = 0;
pub const SID: u32 = 1;
pub const SIMD8: u32 = 3;
pub const TRAILING: u32 = 1;
pub const _13_16_SAMPLERS: u32 = 4;
pub const _1_4_SAMPLERS: u32 = 1;
pub const _5_8_SAMPLERS: u32 = 2;
pub const _9_12_SAMPLERS: u32 = 3;
}
impl<A: Addr + Default> Default for _3dStateGs<A> {
fn default() -> Self {
_3dStateGs {
dword_length: 8,
_3d_command_sub_opcode: 17,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
kernel_start_pointer: Default::default(),
expected_vertex_count: Default::default(),
software_exception_enable: Default::default(),
mask_stack_exception_enable: Default::default(),
accesses_uav: Default::default(),
illegal_opcode_exception_enable: Default::default(),
floating_point_mode: Default::default(),
thread_dispatch_priority: Default::default(),
binding_table_entry_count: Default::default(),
sampler_count: Default::default(),
vector_mask_enable: Default::default(),
single_program_flow: Default::default(),
per_thread_scratch_space: Default::default(),
scratch_space_base_pointer: Default::default(),
dispatch_grf_start_register_for_urb_data: Default::default(),
vertex_urb_entry_read_offset: Default::default(),
include_vertex_handles: Default::default(),
vertex_urb_entry_read_length: Default::default(),
output_topology: Default::default(),
output_vertex_size: Default::default(),
dispatch_grf_start_register_for_urb_data_5_4: Default::default(),
enable: Default::default(),
discard_adjacency: Default::default(),
reorder_mode: Default::default(),
hint: Default::default(),
include_primitive_id: Default::default(),
invocations_increment_value: Default::default(),
statistics_enable: Default::default(),
dispatch_mode: Default::default(),
default_stream_id: Default::default(),
instance_control: Default::default(),
control_data_header_size: Default::default(),
maximum_number_of_threads: Default::default(),
static_output_vertex_count: Default::default(),
static_output: Default::default(),
control_data_format: Default::default(),
user_clip_distance_cull_test_enable_bitmask: Default::default(),
user_clip_distance_clip_test_enable_bitmask: Default::default(),
vertex_urb_entry_output_length: Default::default(),
vertex_urb_entry_output_read_offset: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateGs<A> {
type Out = [u32; 10];
fn pack_into(&self, out: &mut [u32; 10]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.kernel_start_pointer as u32, 6, 31);
out[2] = __gen_offset((self.kernel_start_pointer >> 32) as u32, 0, 31);
out[3] = __gen_uint(self.expected_vertex_count, 0, 5) |
__gen_uint(self.software_exception_enable.into(), 7, 7) |
__gen_uint(self.mask_stack_exception_enable.into(), 11, 11) |
__gen_uint(self.accesses_uav.into(), 12, 12) |
__gen_uint(self.illegal_opcode_exception_enable.into(), 13, 13) |
__gen_uint(self.floating_point_mode, 16, 16) |
__gen_uint(self.thread_dispatch_priority, 17, 17) |
__gen_uint(self.binding_table_entry_count, 18, 25) |
__gen_uint(self.sampler_count, 27, 29) |
__gen_uint(self.vector_mask_enable.into(), 30, 30) |
__gen_uint(self.single_program_flow.into(), 31, 31);
let v4 = __gen_uint(self.per_thread_scratch_space, 0, 3);
let v4_address = self.scratch_space_base_pointer.combine(v4);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
out[6] = __gen_uint(self.dispatch_grf_start_register_for_urb_data, 0, 3) |
__gen_uint(self.vertex_urb_entry_read_offset, 4, 9) |
__gen_uint(self.include_vertex_handles.into(), 10, 10) |
__gen_uint(self.vertex_urb_entry_read_length, 11, 16) |
__gen_uint(self.output_topology.into(), 17, 22) |
__gen_uint(self.output_vertex_size, 23, 28) |
__gen_uint(self.dispatch_grf_start_register_for_urb_data_5_4, 29, 30);
out[7] = __gen_uint(self.enable.into(), 0, 0) |
__gen_uint(self.discard_adjacency.into(), 1, 1) |
__gen_uint(self.reorder_mode, 2, 2) |
__gen_uint(self.hint, 3, 3) |
__gen_uint(self.include_primitive_id.into(), 4, 4) |
__gen_uint(self.invocations_increment_value, 5, 9) |
__gen_uint(self.statistics_enable.into(), 10, 10) |
__gen_uint(self.dispatch_mode, 11, 12) |
__gen_uint(self.default_stream_id, 13, 14) |
__gen_uint(self.instance_control, 15, 19) |
__gen_uint(self.control_data_header_size, 20, 23);
out[8] = __gen_uint(self.maximum_number_of_threads, 0, 8) |
__gen_uint(self.static_output_vertex_count, 16, 26) |
__gen_uint(self.static_output.into(), 30, 30) |
__gen_uint(self.control_data_format, 31, 31);
out[9] = __gen_uint(self.user_clip_distance_cull_test_enable_bitmask, 0, 7) |
__gen_uint(self.user_clip_distance_clip_test_enable_bitmask, 8, 15) |
__gen_uint(self.vertex_urb_entry_output_length, 16, 20) |
__gen_uint(self.vertex_urb_entry_output_read_offset, 21, 26);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 10];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 10] as *const [u8; 40]) })
}
}
impl From<&[u32; 10]> for _3dStateGs<u64> {
fn from(input: &[u32; 10]) -> Self {
_3dStateGs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
kernel_start_pointer: (__gen_unuint(input[1], 6, 31) as u64) << 6 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
expected_vertex_count: __gen_unuint(input[3], 0, 5),
software_exception_enable: __gen_unuint(input[3], 7, 7) != 0,
mask_stack_exception_enable: __gen_unuint(input[3], 11, 11) != 0,
accesses_uav: __gen_unuint(input[3], 12, 12) != 0,
illegal_opcode_exception_enable: __gen_unuint(input[3], 13, 13) != 0,
floating_point_mode: __gen_unuint(input[3], 16, 16),
thread_dispatch_priority: __gen_unuint(input[3], 17, 17),
binding_table_entry_count: __gen_unuint(input[3], 18, 25),
sampler_count: __gen_unuint(input[3], 27, 29),
vector_mask_enable: __gen_unuint(input[3], 30, 30) != 0,
single_program_flow: __gen_unuint(input[3], 31, 31) != 0,
per_thread_scratch_space: __gen_unuint(input[4], 0, 3),
scratch_space_base_pointer: (__gen_unuint(input[4], 10, 31) as u64) << 10 |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
dispatch_grf_start_register_for_urb_data: __gen_unuint(input[6], 0, 3),
vertex_urb_entry_read_offset: __gen_unuint(input[6], 4, 9),
include_vertex_handles: __gen_unuint(input[6], 10, 10) != 0,
vertex_urb_entry_read_length: __gen_unuint(input[6], 11, 16),
output_topology: (__gen_unuint(input[6], 17, 22)).into(),
output_vertex_size: __gen_unuint(input[6], 23, 28),
dispatch_grf_start_register_for_urb_data_5_4: __gen_unuint(input[6], 29, 30),
enable: __gen_unuint(input[7], 0, 0) != 0,
discard_adjacency: __gen_unuint(input[7], 1, 1) != 0,
reorder_mode: __gen_unuint(input[7], 2, 2),
hint: __gen_unuint(input[7], 3, 3),
include_primitive_id: __gen_unuint(input[7], 4, 4) != 0,
invocations_increment_value: __gen_unuint(input[7], 5, 9),
statistics_enable: __gen_unuint(input[7], 10, 10) != 0,
dispatch_mode: __gen_unuint(input[7], 11, 12),
default_stream_id: __gen_unuint(input[7], 13, 14),
instance_control: __gen_unuint(input[7], 15, 19),
control_data_header_size: __gen_unuint(input[7], 20, 23),
maximum_number_of_threads: __gen_unuint(input[8], 0, 8),
static_output_vertex_count: __gen_unuint(input[8], 16, 26),
static_output: __gen_unuint(input[8], 30, 30) != 0,
control_data_format: __gen_unuint(input[8], 31, 31),
user_clip_distance_cull_test_enable_bitmask: __gen_unuint(input[9], 0, 7),
user_clip_distance_clip_test_enable_bitmask: __gen_unuint(input[9], 8, 15),
vertex_urb_entry_output_length: __gen_unuint(input[9], 16, 20),
vertex_urb_entry_output_read_offset: __gen_unuint(input[9], 21, 26),
}
}
}
impl Deserialize for _3dStateGs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 10];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 10] as *mut [u8; 40]) })?;
Ok((&input).into())
}
}
pub struct _3dStateHierDepthBuffer<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub surface_pitch: u32,
pub mocs: u32,
pub surface_base_address: A,
pub surface_qpitch: u32,
}
impl<A: Addr + Default> _3dStateHierDepthBuffer<A> {
pub const DWORD_LENGTH: u32 = 5;
}
impl<A: Addr + Default> Default for _3dStateHierDepthBuffer<A> {
fn default() -> Self {
_3dStateHierDepthBuffer {
dword_length: 3,
_3d_command_sub_opcode: 7,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
surface_pitch: Default::default(),
mocs: Default::default(),
surface_base_address: Default::default(),
surface_qpitch: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateHierDepthBuffer<A> {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.surface_pitch, 0, 16) |
__gen_uint(self.mocs, 25, 31);
let v2_address = self.surface_base_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
out[4] = __gen_uint(self.surface_qpitch, 0, 14);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for _3dStateHierDepthBuffer<u64> {
fn from(input: &[u32; 5]) -> Self {
_3dStateHierDepthBuffer {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
surface_pitch: __gen_unuint(input[1], 0, 16),
mocs: __gen_unuint(input[1], 25, 31),
surface_base_address: (__gen_unuint(input[2], 0, 31) as u64) |
(__gen_unuint(input[3], 0, 31) as u64) << 32,
surface_qpitch: __gen_unuint(input[4], 0, 14),
}
}
}
impl Deserialize for _3dStateHierDepthBuffer<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct _3dStateHs<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub software_exception_enable: bool,
pub illegal_opcode_exception_enable: bool,
pub floating_point_mode: u32,
pub thread_dispatch_priority: u32,
pub binding_table_entry_count: u32,
pub sampler_count: u32,
pub instance_count: u32,
pub maximum_number_of_threads: u32,
pub statistics_enable: bool,
pub enable: bool,
pub kernel_start_pointer: u64,
pub per_thread_scratch_space: u32,
pub scratch_space_base_pointer: A,
pub include_primitive_id: bool,
pub vertex_urb_entry_read_offset: u32,
pub vertex_urb_entry_read_length: u32,
pub dispatch_mode: u32,
pub dispatch_grf_start_register_for_urb_data: u32,
pub include_vertex_handles: bool,
pub accesses_uav: bool,
pub vector_mask_enable: bool,
pub single_program_flow: bool,
pub dispatch_grf_start_register_for_urb_data_5: u32,
}
impl<A: Addr + Default> _3dStateHs<A> {
pub const DWORD_LENGTH: u32 = 9;
pub const ALTERNATE: u32 = 1;
pub const DUAL_PATCH: u32 = 1;
pub const HIGH: u32 = 1;
pub const IEEE_754: u32 = 0;
pub const NO_SAMPLERS: u32 = 0;
pub const SINGLE_PATCH: u32 = 0;
pub const _13_16_SAMPLERS: u32 = 4;
pub const _1_4_SAMPLERS: u32 = 1;
pub const _5_8_SAMPLERS: u32 = 2;
pub const _8_PATCH: u32 = 2;
pub const _9_12_SAMPLERS: u32 = 3;
}
impl<A: Addr + Default> Default for _3dStateHs<A> {
fn default() -> Self {
_3dStateHs {
dword_length: 7,
_3d_command_sub_opcode: 27,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
software_exception_enable: Default::default(),
illegal_opcode_exception_enable: Default::default(),
floating_point_mode: Default::default(),
thread_dispatch_priority: Default::default(),
binding_table_entry_count: Default::default(),
sampler_count: Default::default(),
instance_count: Default::default(),
maximum_number_of_threads: Default::default(),
statistics_enable: Default::default(),
enable: Default::default(),
kernel_start_pointer: Default::default(),
per_thread_scratch_space: Default::default(),
scratch_space_base_pointer: Default::default(),
include_primitive_id: Default::default(),
vertex_urb_entry_read_offset: Default::default(),
vertex_urb_entry_read_length: Default::default(),
dispatch_mode: Default::default(),
dispatch_grf_start_register_for_urb_data: Default::default(),
include_vertex_handles: Default::default(),
accesses_uav: Default::default(),
vector_mask_enable: Default::default(),
single_program_flow: Default::default(),
dispatch_grf_start_register_for_urb_data_5: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateHs<A> {
type Out = [u32; 9];
fn pack_into(&self, out: &mut [u32; 9]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.software_exception_enable.into(), 12, 12) |
__gen_uint(self.illegal_opcode_exception_enable.into(), 13, 13) |
__gen_uint(self.floating_point_mode, 16, 16) |
__gen_uint(self.thread_dispatch_priority, 17, 17) |
__gen_uint(self.binding_table_entry_count, 18, 25) |
__gen_uint(self.sampler_count, 27, 29);
out[2] = __gen_uint(self.instance_count, 0, 3) |
__gen_uint(self.maximum_number_of_threads, 8, 16) |
__gen_uint(self.statistics_enable.into(), 29, 29) |
__gen_uint(self.enable.into(), 31, 31);
out[3] = __gen_offset(self.kernel_start_pointer as u32, 6, 31);
out[4] = __gen_offset((self.kernel_start_pointer >> 32) as u32, 0, 31);
let v5 = __gen_uint(self.per_thread_scratch_space, 0, 3);
let v5_address = self.scratch_space_base_pointer.combine(v5);
out[5] = v5_address as u32;
out[6] = (v5_address >> 32) as u32;
out[7] = __gen_uint(self.include_primitive_id.into(), 0, 0) |
__gen_uint(self.vertex_urb_entry_read_offset, 4, 9) |
__gen_uint(self.vertex_urb_entry_read_length, 11, 16) |
__gen_uint(self.dispatch_mode, 17, 18) |
__gen_uint(self.dispatch_grf_start_register_for_urb_data, 19, 23) |
__gen_uint(self.include_vertex_handles.into(), 24, 24) |
__gen_uint(self.accesses_uav.into(), 25, 25) |
__gen_uint(self.vector_mask_enable.into(), 26, 26) |
__gen_uint(self.single_program_flow.into(), 27, 27) |
__gen_uint(self.dispatch_grf_start_register_for_urb_data_5, 28, 28);
out[8] = 0;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 9];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 9] as *const [u8; 36]) })
}
}
impl From<&[u32; 9]> for _3dStateHs<u64> {
fn from(input: &[u32; 9]) -> Self {
_3dStateHs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
software_exception_enable: __gen_unuint(input[1], 12, 12) != 0,
illegal_opcode_exception_enable: __gen_unuint(input[1], 13, 13) != 0,
floating_point_mode: __gen_unuint(input[1], 16, 16),
thread_dispatch_priority: __gen_unuint(input[1], 17, 17),
binding_table_entry_count: __gen_unuint(input[1], 18, 25),
sampler_count: __gen_unuint(input[1], 27, 29),
instance_count: __gen_unuint(input[2], 0, 3),
maximum_number_of_threads: __gen_unuint(input[2], 8, 16),
statistics_enable: __gen_unuint(input[2], 29, 29) != 0,
enable: __gen_unuint(input[2], 31, 31) != 0,
kernel_start_pointer: (__gen_unuint(input[3], 6, 31) as u64) << 6 |
(__gen_unuint(input[4], 0, 31) as u64) << 32,
per_thread_scratch_space: __gen_unuint(input[5], 0, 3),
scratch_space_base_pointer: (__gen_unuint(input[5], 10, 31) as u64) << 10 |
(__gen_unuint(input[6], 0, 31) as u64) << 32,
include_primitive_id: __gen_unuint(input[7], 0, 0) != 0,
vertex_urb_entry_read_offset: __gen_unuint(input[7], 4, 9),
vertex_urb_entry_read_length: __gen_unuint(input[7], 11, 16),
dispatch_mode: __gen_unuint(input[7], 17, 18),
dispatch_grf_start_register_for_urb_data: __gen_unuint(input[7], 19, 23),
include_vertex_handles: __gen_unuint(input[7], 24, 24) != 0,
accesses_uav: __gen_unuint(input[7], 25, 25) != 0,
vector_mask_enable: __gen_unuint(input[7], 26, 26) != 0,
single_program_flow: __gen_unuint(input[7], 27, 27) != 0,
dispatch_grf_start_register_for_urb_data_5: __gen_unuint(input[7], 28, 28),
}
}
}
impl Deserialize for _3dStateHs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 9];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 9] as *mut [u8; 36]) })?;
Ok((&input).into())
}
}
pub struct _3dStateIndexBuffer<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub mocs: u32,
pub index_format: u32,
pub buffer_starting_address: A,
pub buffer_size: u32,
}
impl<A: Addr + Default> _3dStateIndexBuffer<A> {
pub const DWORD_LENGTH: u32 = 5;
pub const BYTE: u32 = 0;
pub const DWORD: u32 = 2;
pub const WORD: u32 = 1;
}
impl<A: Addr + Default> Default for _3dStateIndexBuffer<A> {
fn default() -> Self {
_3dStateIndexBuffer {
dword_length: 3,
_3d_command_sub_opcode: 10,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
mocs: Default::default(),
index_format: Default::default(),
buffer_starting_address: Default::default(),
buffer_size: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateIndexBuffer<A> {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.mocs, 0, 6) |
__gen_uint(self.index_format, 8, 9);
let v2_address = self.buffer_starting_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
out[4] = __gen_uint(self.buffer_size, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for _3dStateIndexBuffer<u64> {
fn from(input: &[u32; 5]) -> Self {
_3dStateIndexBuffer {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
mocs: __gen_unuint(input[1], 0, 6),
index_format: __gen_unuint(input[1], 8, 9),
buffer_starting_address: (__gen_unuint(input[2], 0, 31) as u64) |
(__gen_unuint(input[3], 0, 31) as u64) << 32,
buffer_size: __gen_unuint(input[4], 0, 31),
}
}
}
impl Deserialize for _3dStateIndexBuffer<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct _3dStateLineStipple {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub line_stipple_pattern: u32,
pub current_stipple_index: u32,
pub current_repeat_counter: u32,
pub modify_enable_current_repeat_counter_current_stipple_index: bool,
pub line_stipple_repeat_count: u32,
pub line_stipple_inverse_repeat_count: f32,
}
impl _3dStateLineStipple {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for _3dStateLineStipple {
fn default() -> Self {
_3dStateLineStipple {
dword_length: 1,
_3d_command_sub_opcode: 8,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
line_stipple_pattern: Default::default(),
current_stipple_index: Default::default(),
current_repeat_counter: Default::default(),
modify_enable_current_repeat_counter_current_stipple_index: Default::default(),
line_stipple_repeat_count: Default::default(),
line_stipple_inverse_repeat_count: Default::default(),
}
}
}
impl Serialize for _3dStateLineStipple {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.line_stipple_pattern, 0, 15) |
__gen_uint(self.current_stipple_index, 16, 19) |
__gen_uint(self.current_repeat_counter, 21, 29) |
__gen_uint(self.modify_enable_current_repeat_counter_current_stipple_index.into(), 31, 31);
out[2] = __gen_uint(self.line_stipple_repeat_count, 0, 8) |
__gen_ufixed(self.line_stipple_inverse_repeat_count, 15, 31, 16);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateLineStipple {
fn from(input: &[u32; 3]) -> Self {
_3dStateLineStipple {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
line_stipple_pattern: __gen_unuint(input[1], 0, 15),
current_stipple_index: __gen_unuint(input[1], 16, 19),
current_repeat_counter: __gen_unuint(input[1], 21, 29),
modify_enable_current_repeat_counter_current_stipple_index: __gen_unuint(input[1], 31, 31) != 0,
line_stipple_repeat_count: __gen_unuint(input[2], 0, 8),
line_stipple_inverse_repeat_count: __gen_unufixed(input[2], 15, 31, 16),
}
}
}
impl Deserialize for _3dStateLineStipple {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateMonofilterSize {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub monochrome_filter_height: u32,
pub monochrome_filter_width: u32,
}
impl _3dStateMonofilterSize {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateMonofilterSize {
fn default() -> Self {
_3dStateMonofilterSize {
dword_length: 0,
_3d_command_sub_opcode: 17,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
monochrome_filter_height: Default::default(),
monochrome_filter_width: Default::default(),
}
}
}
impl Serialize for _3dStateMonofilterSize {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.monochrome_filter_height, 0, 2) |
__gen_uint(self.monochrome_filter_width, 3, 5);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateMonofilterSize {
fn from(input: &[u32; 2]) -> Self {
_3dStateMonofilterSize {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
monochrome_filter_height: __gen_unuint(input[1], 0, 2),
monochrome_filter_width: __gen_unuint(input[1], 3, 5),
}
}
}
impl Deserialize for _3dStateMonofilterSize {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateMultisample {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub number_of_multisamples: u32,
pub pixel_location: u32,
pub pixel_position_offset_enable: bool,
}
impl _3dStateMultisample {
pub const DWORD_LENGTH: u32 = 2;
pub const CENTER: u32 = 0;
pub const UL_CORNER: u32 = 1;
}
impl Default for _3dStateMultisample {
fn default() -> Self {
_3dStateMultisample {
dword_length: 0,
_3d_command_sub_opcode: 13,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
number_of_multisamples: Default::default(),
pixel_location: Default::default(),
pixel_position_offset_enable: Default::default(),
}
}
}
impl Serialize for _3dStateMultisample {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.number_of_multisamples, 1, 3) |
__gen_uint(self.pixel_location, 4, 4) |
__gen_uint(self.pixel_position_offset_enable.into(), 5, 5);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateMultisample {
fn from(input: &[u32; 2]) -> Self {
_3dStateMultisample {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
number_of_multisamples: __gen_unuint(input[1], 1, 3),
pixel_location: __gen_unuint(input[1], 4, 4),
pixel_position_offset_enable: __gen_unuint(input[1], 5, 5) != 0,
}
}
}
impl Deserialize for _3dStateMultisample {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePolyStippleOffset {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub polygon_stipple_y_offset: u32,
pub polygon_stipple_x_offset: u32,
}
impl _3dStatePolyStippleOffset {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStatePolyStippleOffset {
fn default() -> Self {
_3dStatePolyStippleOffset {
dword_length: 0,
_3d_command_sub_opcode: 6,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
polygon_stipple_y_offset: Default::default(),
polygon_stipple_x_offset: Default::default(),
}
}
}
impl Serialize for _3dStatePolyStippleOffset {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.polygon_stipple_y_offset, 0, 4) |
__gen_uint(self.polygon_stipple_x_offset, 8, 12);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStatePolyStippleOffset {
fn from(input: &[u32; 2]) -> Self {
_3dStatePolyStippleOffset {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
polygon_stipple_y_offset: __gen_unuint(input[1], 0, 4),
polygon_stipple_x_offset: __gen_unuint(input[1], 8, 12),
}
}
}
impl Deserialize for _3dStatePolyStippleOffset {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePolyStipplePattern {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pattern_row: [u32; 32],
}
impl _3dStatePolyStipplePattern {
pub const DWORD_LENGTH: u32 = 33;
}
impl Default for _3dStatePolyStipplePattern {
fn default() -> Self {
_3dStatePolyStipplePattern {
dword_length: 31,
_3d_command_sub_opcode: 7,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
pattern_row: Default::default(),
}
}
}
impl Serialize for _3dStatePolyStipplePattern {
type Out = [u32; 33];
fn pack_into(&self, out: &mut [u32; 33]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.pattern_row[0], 0, 31);
out[2] = __gen_uint(self.pattern_row[1], 0, 31);
out[3] = __gen_uint(self.pattern_row[2], 0, 31);
out[4] = __gen_uint(self.pattern_row[3], 0, 31);
out[5] = __gen_uint(self.pattern_row[4], 0, 31);
out[6] = __gen_uint(self.pattern_row[5], 0, 31);
out[7] = __gen_uint(self.pattern_row[6], 0, 31);
out[8] = __gen_uint(self.pattern_row[7], 0, 31);
out[9] = __gen_uint(self.pattern_row[8], 0, 31);
out[10] = __gen_uint(self.pattern_row[9], 0, 31);
out[11] = __gen_uint(self.pattern_row[10], 0, 31);
out[12] = __gen_uint(self.pattern_row[11], 0, 31);
out[13] = __gen_uint(self.pattern_row[12], 0, 31);
out[14] = __gen_uint(self.pattern_row[13], 0, 31);
out[15] = __gen_uint(self.pattern_row[14], 0, 31);
out[16] = __gen_uint(self.pattern_row[15], 0, 31);
out[17] = __gen_uint(self.pattern_row[16], 0, 31);
out[18] = __gen_uint(self.pattern_row[17], 0, 31);
out[19] = __gen_uint(self.pattern_row[18], 0, 31);
out[20] = __gen_uint(self.pattern_row[19], 0, 31);
out[21] = __gen_uint(self.pattern_row[20], 0, 31);
out[22] = __gen_uint(self.pattern_row[21], 0, 31);
out[23] = __gen_uint(self.pattern_row[22], 0, 31);
out[24] = __gen_uint(self.pattern_row[23], 0, 31);
out[25] = __gen_uint(self.pattern_row[24], 0, 31);
out[26] = __gen_uint(self.pattern_row[25], 0, 31);
out[27] = __gen_uint(self.pattern_row[26], 0, 31);
out[28] = __gen_uint(self.pattern_row[27], 0, 31);
out[29] = __gen_uint(self.pattern_row[28], 0, 31);
out[30] = __gen_uint(self.pattern_row[29], 0, 31);
out[31] = __gen_uint(self.pattern_row[30], 0, 31);
out[32] = __gen_uint(self.pattern_row[31], 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 33];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 33] as *const [u8; 132]) })
}
}
impl From<&[u32; 33]> for _3dStatePolyStipplePattern {
fn from(input: &[u32; 33]) -> Self {
_3dStatePolyStipplePattern {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pattern_row: [
__gen_unuint(input[1], 0, 31),
__gen_unuint(input[2], 0, 31),
__gen_unuint(input[3], 0, 31),
__gen_unuint(input[4], 0, 31),
__gen_unuint(input[5], 0, 31),
__gen_unuint(input[6], 0, 31),
__gen_unuint(input[7], 0, 31),
__gen_unuint(input[8], 0, 31),
__gen_unuint(input[9], 0, 31),
__gen_unuint(input[10], 0, 31),
__gen_unuint(input[11], 0, 31),
__gen_unuint(input[12], 0, 31),
__gen_unuint(input[13], 0, 31),
__gen_unuint(input[14], 0, 31),
__gen_unuint(input[15], 0, 31),
__gen_unuint(input[16], 0, 31),
__gen_unuint(input[17], 0, 31),
__gen_unuint(input[18], 0, 31),
__gen_unuint(input[19], 0, 31),
__gen_unuint(input[20], 0, 31),
__gen_unuint(input[21], 0, 31),
__gen_unuint(input[22], 0, 31),
__gen_unuint(input[23], 0, 31),
__gen_unuint(input[24], 0, 31),
__gen_unuint(input[25], 0, 31),
__gen_unuint(input[26], 0, 31),
__gen_unuint(input[27], 0, 31),
__gen_unuint(input[28], 0, 31),
__gen_unuint(input[29], 0, 31),
__gen_unuint(input[30], 0, 31),
__gen_unuint(input[31], 0, 31),
__gen_unuint(input[32], 0, 31)
],
}
}
}
impl Deserialize for _3dStatePolyStipplePattern {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 33];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 33] as *mut [u8; 132]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePs<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub kernel_start_pointer_0: u64,
pub software_exception_enable: bool,
pub mask_stack_exception_enable: bool,
pub illegal_opcode_exception_enable: bool,
pub rounding_mode: u32,
pub floating_point_mode: u32,
pub thread_dispatch_priority: u32,
pub binding_table_entry_count: u32,
pub single_precision_denormal_mode: u32,
pub sampler_count: u32,
pub vector_mask_enable: bool,
pub single_program_flow: bool,
pub per_thread_scratch_space: u32,
pub scratch_space_base_pointer: A,
pub _8_pixel_dispatch_enable: bool,
pub _16_pixel_dispatch_enable: bool,
pub _32_pixel_dispatch_enable: bool,
pub position_xy_offset_select: u32,
pub render_target_resolve_type: u32,
pub render_target_fast_clear_enable: bool,
pub push_constant_enable: bool,
pub maximum_number_of_threads_per_psd: u32,
pub dispatch_grf_start_register_for_constant_setup_data_2: u32,
pub dispatch_grf_start_register_for_constant_setup_data_1: u32,
pub dispatch_grf_start_register_for_constant_setup_data_0: u32,
pub kernel_start_pointer_1: u64,
pub kernel_start_pointer_2: u64,
}
impl<A: Addr + Default> _3dStatePs<A> {
pub const DWORD_LENGTH: u32 = 12;
pub const ALTERNATE: u32 = 1;
pub const FAST_CLEAR_0: u32 = 2;
pub const FLUSHED_TO_ZERO: u32 = 0;
pub const HIGH: u32 = 1;
pub const IEEE_754: u32 = 0;
pub const NO_SAMPLERS: u32 = 0;
pub const POSOFFSET_CENTROID: u32 = 2;
pub const POSOFFSET_NONE: u32 = 0;
pub const POSOFFSET_SAMPLE: u32 = 3;
pub const RD: u32 = 2;
pub const RESOLVE_DISABLED: u32 = 0;
pub const RESOLVE_FULL: u32 = 3;
pub const RESOLVE_PARTIAL: u32 = 1;
pub const RETAINED: u32 = 1;
pub const RTNE: u32 = 0;
pub const RTZ: u32 = 3;
pub const RU: u32 = 1;
pub const _13_16_SAMPLERS: u32 = 4;
pub const _1_4_SAMPLERS: u32 = 1;
pub const _5_8_SAMPLERS: u32 = 2;
pub const _9_12_SAMPLERS: u32 = 3;
}
impl<A: Addr + Default> Default for _3dStatePs<A> {
fn default() -> Self {
_3dStatePs {
dword_length: 10,
_3d_command_sub_opcode: 32,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
kernel_start_pointer_0: Default::default(),
software_exception_enable: Default::default(),
mask_stack_exception_enable: Default::default(),
illegal_opcode_exception_enable: Default::default(),
rounding_mode: Default::default(),
floating_point_mode: Default::default(),
thread_dispatch_priority: Default::default(),
binding_table_entry_count: Default::default(),
single_precision_denormal_mode: Default::default(),
sampler_count: Default::default(),
vector_mask_enable: Default::default(),
single_program_flow: Default::default(),
per_thread_scratch_space: Default::default(),
scratch_space_base_pointer: Default::default(),
_8_pixel_dispatch_enable: Default::default(),
_16_pixel_dispatch_enable: Default::default(),
_32_pixel_dispatch_enable: Default::default(),
position_xy_offset_select: Default::default(),
render_target_resolve_type: Default::default(),
render_target_fast_clear_enable: Default::default(),
push_constant_enable: Default::default(),
maximum_number_of_threads_per_psd: Default::default(),
dispatch_grf_start_register_for_constant_setup_data_2: Default::default(),
dispatch_grf_start_register_for_constant_setup_data_1: Default::default(),
dispatch_grf_start_register_for_constant_setup_data_0: Default::default(),
kernel_start_pointer_1: Default::default(),
kernel_start_pointer_2: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStatePs<A> {
type Out = [u32; 12];
fn pack_into(&self, out: &mut [u32; 12]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.kernel_start_pointer_0 as u32, 6, 31);
out[2] = __gen_offset((self.kernel_start_pointer_0 >> 32) as u32, 0, 31);
out[3] = __gen_uint(self.software_exception_enable.into(), 7, 7) |
__gen_uint(self.mask_stack_exception_enable.into(), 11, 11) |
__gen_uint(self.illegal_opcode_exception_enable.into(), 13, 13) |
__gen_uint(self.rounding_mode, 14, 15) |
__gen_uint(self.floating_point_mode, 16, 16) |
__gen_uint(self.thread_dispatch_priority, 17, 17) |
__gen_uint(self.binding_table_entry_count, 18, 25) |
__gen_uint(self.single_precision_denormal_mode, 26, 26) |
__gen_uint(self.sampler_count, 27, 29) |
__gen_uint(self.vector_mask_enable.into(), 30, 30) |
__gen_uint(self.single_program_flow.into(), 31, 31);
let v4 = __gen_uint(self.per_thread_scratch_space, 0, 3);
let v4_address = self.scratch_space_base_pointer.combine(v4);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
out[6] = __gen_uint(self._8_pixel_dispatch_enable.into(), 0, 0) |
__gen_uint(self._16_pixel_dispatch_enable.into(), 1, 1) |
__gen_uint(self._32_pixel_dispatch_enable.into(), 2, 2) |
__gen_uint(self.position_xy_offset_select, 3, 4) |
__gen_uint(self.render_target_resolve_type, 6, 7) |
__gen_uint(self.render_target_fast_clear_enable.into(), 8, 8) |
__gen_uint(self.push_constant_enable.into(), 11, 11) |
__gen_uint(self.maximum_number_of_threads_per_psd, 23, 31);
out[7] = __gen_uint(self.dispatch_grf_start_register_for_constant_setup_data_2, 0, 6) |
__gen_uint(self.dispatch_grf_start_register_for_constant_setup_data_1, 8, 14) |
__gen_uint(self.dispatch_grf_start_register_for_constant_setup_data_0, 16, 22);
out[8] = __gen_offset(self.kernel_start_pointer_1 as u32, 6, 31);
out[9] = __gen_offset((self.kernel_start_pointer_1 >> 32) as u32, 0, 31);
out[10] = __gen_offset(self.kernel_start_pointer_2 as u32, 6, 31);
out[11] = __gen_offset((self.kernel_start_pointer_2 >> 32) as u32, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 12];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 12] as *const [u8; 48]) })
}
}
impl From<&[u32; 12]> for _3dStatePs<u64> {
fn from(input: &[u32; 12]) -> Self {
_3dStatePs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
kernel_start_pointer_0: (__gen_unuint(input[1], 6, 31) as u64) << 6 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
software_exception_enable: __gen_unuint(input[3], 7, 7) != 0,
mask_stack_exception_enable: __gen_unuint(input[3], 11, 11) != 0,
illegal_opcode_exception_enable: __gen_unuint(input[3], 13, 13) != 0,
rounding_mode: __gen_unuint(input[3], 14, 15),
floating_point_mode: __gen_unuint(input[3], 16, 16),
thread_dispatch_priority: __gen_unuint(input[3], 17, 17),
binding_table_entry_count: __gen_unuint(input[3], 18, 25),
single_precision_denormal_mode: __gen_unuint(input[3], 26, 26),
sampler_count: __gen_unuint(input[3], 27, 29),
vector_mask_enable: __gen_unuint(input[3], 30, 30) != 0,
single_program_flow: __gen_unuint(input[3], 31, 31) != 0,
per_thread_scratch_space: __gen_unuint(input[4], 0, 3),
scratch_space_base_pointer: (__gen_unuint(input[4], 10, 31) as u64) << 10 |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
_8_pixel_dispatch_enable: __gen_unuint(input[6], 0, 0) != 0,
_16_pixel_dispatch_enable: __gen_unuint(input[6], 1, 1) != 0,
_32_pixel_dispatch_enable: __gen_unuint(input[6], 2, 2) != 0,
position_xy_offset_select: __gen_unuint(input[6], 3, 4),
render_target_resolve_type: __gen_unuint(input[6], 6, 7),
render_target_fast_clear_enable: __gen_unuint(input[6], 8, 8) != 0,
push_constant_enable: __gen_unuint(input[6], 11, 11) != 0,
maximum_number_of_threads_per_psd: __gen_unuint(input[6], 23, 31),
dispatch_grf_start_register_for_constant_setup_data_2: __gen_unuint(input[7], 0, 6),
dispatch_grf_start_register_for_constant_setup_data_1: __gen_unuint(input[7], 8, 14),
dispatch_grf_start_register_for_constant_setup_data_0: __gen_unuint(input[7], 16, 22),
kernel_start_pointer_1: (__gen_unuint(input[8], 6, 31) as u64) << 6 |
(__gen_unuint(input[9], 0, 31) as u64) << 32,
kernel_start_pointer_2: (__gen_unuint(input[10], 6, 31) as u64) << 6 |
(__gen_unuint(input[11], 0, 31) as u64) << 32,
}
}
}
impl Deserialize for _3dStatePs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 12];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 12] as *mut [u8; 48]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePsBlend {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub independent_alpha_blend_enable: bool,
pub alpha_test_enable: bool,
pub destination_blend_factor: _3dColorBufferBlendFactor,
pub source_blend_factor: _3dColorBufferBlendFactor,
pub destination_alpha_blend_factor: _3dColorBufferBlendFactor,
pub source_alpha_blend_factor: _3dColorBufferBlendFactor,
pub color_buffer_blend_enable: bool,
pub has_writeable_rt: bool,
pub alpha_to_coverage_enable: bool,
}
impl _3dStatePsBlend {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStatePsBlend {
fn default() -> Self {
_3dStatePsBlend {
dword_length: 0,
_3d_command_sub_opcode: 77,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
independent_alpha_blend_enable: Default::default(),
alpha_test_enable: Default::default(),
destination_blend_factor: Default::default(),
source_blend_factor: Default::default(),
destination_alpha_blend_factor: Default::default(),
source_alpha_blend_factor: Default::default(),
color_buffer_blend_enable: Default::default(),
has_writeable_rt: Default::default(),
alpha_to_coverage_enable: Default::default(),
}
}
}
impl Serialize for _3dStatePsBlend {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.independent_alpha_blend_enable.into(), 7, 7) |
__gen_uint(self.alpha_test_enable.into(), 8, 8) |
__gen_uint(self.destination_blend_factor.into(), 9, 13) |
__gen_uint(self.source_blend_factor.into(), 14, 18) |
__gen_uint(self.destination_alpha_blend_factor.into(), 19, 23) |
__gen_uint(self.source_alpha_blend_factor.into(), 24, 28) |
__gen_uint(self.color_buffer_blend_enable.into(), 29, 29) |
__gen_uint(self.has_writeable_rt.into(), 30, 30) |
__gen_uint(self.alpha_to_coverage_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStatePsBlend {
fn from(input: &[u32; 2]) -> Self {
_3dStatePsBlend {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
independent_alpha_blend_enable: __gen_unuint(input[1], 7, 7) != 0,
alpha_test_enable: __gen_unuint(input[1], 8, 8) != 0,
destination_blend_factor: (__gen_unuint(input[1], 9, 13)).into(),
source_blend_factor: (__gen_unuint(input[1], 14, 18)).into(),
destination_alpha_blend_factor: (__gen_unuint(input[1], 19, 23)).into(),
source_alpha_blend_factor: (__gen_unuint(input[1], 24, 28)).into(),
color_buffer_blend_enable: __gen_unuint(input[1], 29, 29) != 0,
has_writeable_rt: __gen_unuint(input[1], 30, 30) != 0,
alpha_to_coverage_enable: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for _3dStatePsBlend {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePsExtra {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub input_coverage_mask_state: u32,
pub pixel_shader_has_uav: bool,
pub pixel_shader_pulls_bary: bool,
pub pixel_shader_computes_stencil: bool,
pub pixel_shader_is_per_sample: bool,
pub pixel_shader_disables_alpha_to_coverage: bool,
pub attribute_enable: bool,
pub simple_ps_hint: bool,
pub pixel_shader_requires_subpixel_sample_offsets: bool,
pub pixel_shader_requires_non_perspective_bary_plane_coefficients: bool,
pub pixel_shader_requires_perspective_bary_plane_coefficients: bool,
pub pixel_shader_requires_source_depth_and_or_w_plane_coefficients: bool,
pub pixel_shader_uses_source_w: bool,
pub pixel_shader_uses_source_depth: bool,
pub force_computed_depth: bool,
pub pixel_shader_computed_depth_mode: u32,
pub pixel_shader_kills_pixel: bool,
pub omask_present_to_render_target: bool,
pub pixel_shader_does_not_write_to_rt: bool,
pub pixel_shader_valid: bool,
}
impl _3dStatePsExtra {
pub const DWORD_LENGTH: u32 = 2;
pub const DEPTH_COVERAGE: u32 = 3;
pub const INNER_CONSERVATIVE: u32 = 2;
pub const NONE: u32 = 0;
pub const NORMAL: u32 = 1;
pub const PSCDEPTH_OFF: u32 = 0;
pub const PSCDEPTH_ON: u32 = 1;
pub const PSCDEPTH_ON_GE: u32 = 2;
pub const PSCDEPTH_ON_LE: u32 = 3;
}
impl Default for _3dStatePsExtra {
fn default() -> Self {
_3dStatePsExtra {
dword_length: 0,
_3d_command_sub_opcode: 79,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
input_coverage_mask_state: Default::default(),
pixel_shader_has_uav: Default::default(),
pixel_shader_pulls_bary: Default::default(),
pixel_shader_computes_stencil: Default::default(),
pixel_shader_is_per_sample: Default::default(),
pixel_shader_disables_alpha_to_coverage: Default::default(),
attribute_enable: Default::default(),
simple_ps_hint: Default::default(),
pixel_shader_requires_subpixel_sample_offsets: Default::default(),
pixel_shader_requires_non_perspective_bary_plane_coefficients: Default::default(),
pixel_shader_requires_perspective_bary_plane_coefficients: Default::default(),
pixel_shader_requires_source_depth_and_or_w_plane_coefficients: Default::default(),
pixel_shader_uses_source_w: Default::default(),
pixel_shader_uses_source_depth: Default::default(),
force_computed_depth: Default::default(),
pixel_shader_computed_depth_mode: Default::default(),
pixel_shader_kills_pixel: Default::default(),
omask_present_to_render_target: Default::default(),
pixel_shader_does_not_write_to_rt: Default::default(),
pixel_shader_valid: Default::default(),
}
}
}
impl Serialize for _3dStatePsExtra {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.input_coverage_mask_state, 0, 1) |
__gen_uint(self.pixel_shader_has_uav.into(), 2, 2) |
__gen_uint(self.pixel_shader_pulls_bary.into(), 3, 3) |
__gen_uint(self.pixel_shader_computes_stencil.into(), 5, 5) |
__gen_uint(self.pixel_shader_is_per_sample.into(), 6, 6) |
__gen_uint(self.pixel_shader_disables_alpha_to_coverage.into(), 7, 7) |
__gen_uint(self.attribute_enable.into(), 8, 8) |
__gen_uint(self.simple_ps_hint.into(), 9, 9) |
__gen_uint(self.pixel_shader_requires_subpixel_sample_offsets.into(), 18, 18) |
__gen_uint(self.pixel_shader_requires_non_perspective_bary_plane_coefficients.into(), 19, 19) |
__gen_uint(self.pixel_shader_requires_perspective_bary_plane_coefficients.into(), 20, 20) |
__gen_uint(self.pixel_shader_requires_source_depth_and_or_w_plane_coefficients.into(), 21, 21) |
__gen_uint(self.pixel_shader_uses_source_w.into(), 23, 23) |
__gen_uint(self.pixel_shader_uses_source_depth.into(), 24, 24) |
__gen_uint(self.force_computed_depth.into(), 25, 25) |
__gen_uint(self.pixel_shader_computed_depth_mode, 26, 27) |
__gen_uint(self.pixel_shader_kills_pixel.into(), 28, 28) |
__gen_uint(self.omask_present_to_render_target.into(), 29, 29) |
__gen_uint(self.pixel_shader_does_not_write_to_rt.into(), 30, 30) |
__gen_uint(self.pixel_shader_valid.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStatePsExtra {
fn from(input: &[u32; 2]) -> Self {
_3dStatePsExtra {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
input_coverage_mask_state: __gen_unuint(input[1], 0, 1),
pixel_shader_has_uav: __gen_unuint(input[1], 2, 2) != 0,
pixel_shader_pulls_bary: __gen_unuint(input[1], 3, 3) != 0,
pixel_shader_computes_stencil: __gen_unuint(input[1], 5, 5) != 0,
pixel_shader_is_per_sample: __gen_unuint(input[1], 6, 6) != 0,
pixel_shader_disables_alpha_to_coverage: __gen_unuint(input[1], 7, 7) != 0,
attribute_enable: __gen_unuint(input[1], 8, 8) != 0,
simple_ps_hint: __gen_unuint(input[1], 9, 9) != 0,
pixel_shader_requires_subpixel_sample_offsets: __gen_unuint(input[1], 18, 18) != 0,
pixel_shader_requires_non_perspective_bary_plane_coefficients: __gen_unuint(input[1], 19, 19) != 0,
pixel_shader_requires_perspective_bary_plane_coefficients: __gen_unuint(input[1], 20, 20) != 0,
pixel_shader_requires_source_depth_and_or_w_plane_coefficients: __gen_unuint(input[1], 21, 21) != 0,
pixel_shader_uses_source_w: __gen_unuint(input[1], 23, 23) != 0,
pixel_shader_uses_source_depth: __gen_unuint(input[1], 24, 24) != 0,
force_computed_depth: __gen_unuint(input[1], 25, 25) != 0,
pixel_shader_computed_depth_mode: __gen_unuint(input[1], 26, 27),
pixel_shader_kills_pixel: __gen_unuint(input[1], 28, 28) != 0,
omask_present_to_render_target: __gen_unuint(input[1], 29, 29) != 0,
pixel_shader_does_not_write_to_rt: __gen_unuint(input[1], 30, 30) != 0,
pixel_shader_valid: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for _3dStatePsExtra {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePushConstantAllocDs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_buffer_size: u32,
pub constant_buffer_offset: u32,
}
impl _3dStatePushConstantAllocDs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStatePushConstantAllocDs {
fn default() -> Self {
_3dStatePushConstantAllocDs {
dword_length: 0,
_3d_command_sub_opcode: 20,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
constant_buffer_size: Default::default(),
constant_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStatePushConstantAllocDs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.constant_buffer_size, 0, 5) |
__gen_uint(self.constant_buffer_offset, 16, 20);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStatePushConstantAllocDs {
fn from(input: &[u32; 2]) -> Self {
_3dStatePushConstantAllocDs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_buffer_size: __gen_unuint(input[1], 0, 5),
constant_buffer_offset: __gen_unuint(input[1], 16, 20),
}
}
}
impl Deserialize for _3dStatePushConstantAllocDs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePushConstantAllocGs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_buffer_size: u32,
pub constant_buffer_offset: u32,
}
impl _3dStatePushConstantAllocGs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStatePushConstantAllocGs {
fn default() -> Self {
_3dStatePushConstantAllocGs {
dword_length: 0,
_3d_command_sub_opcode: 21,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
constant_buffer_size: Default::default(),
constant_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStatePushConstantAllocGs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.constant_buffer_size, 0, 5) |
__gen_uint(self.constant_buffer_offset, 16, 20);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStatePushConstantAllocGs {
fn from(input: &[u32; 2]) -> Self {
_3dStatePushConstantAllocGs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_buffer_size: __gen_unuint(input[1], 0, 5),
constant_buffer_offset: __gen_unuint(input[1], 16, 20),
}
}
}
impl Deserialize for _3dStatePushConstantAllocGs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePushConstantAllocHs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_buffer_size: u32,
pub constant_buffer_offset: u32,
}
impl _3dStatePushConstantAllocHs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStatePushConstantAllocHs {
fn default() -> Self {
_3dStatePushConstantAllocHs {
dword_length: 0,
_3d_command_sub_opcode: 19,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
constant_buffer_size: Default::default(),
constant_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStatePushConstantAllocHs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.constant_buffer_size, 0, 5) |
__gen_uint(self.constant_buffer_offset, 16, 20);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStatePushConstantAllocHs {
fn from(input: &[u32; 2]) -> Self {
_3dStatePushConstantAllocHs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_buffer_size: __gen_unuint(input[1], 0, 5),
constant_buffer_offset: __gen_unuint(input[1], 16, 20),
}
}
}
impl Deserialize for _3dStatePushConstantAllocHs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePushConstantAllocPs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_buffer_size: u32,
pub constant_buffer_offset: u32,
}
impl _3dStatePushConstantAllocPs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStatePushConstantAllocPs {
fn default() -> Self {
_3dStatePushConstantAllocPs {
dword_length: 0,
_3d_command_sub_opcode: 22,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
constant_buffer_size: Default::default(),
constant_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStatePushConstantAllocPs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.constant_buffer_size, 0, 5) |
__gen_uint(self.constant_buffer_offset, 16, 20);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStatePushConstantAllocPs {
fn from(input: &[u32; 2]) -> Self {
_3dStatePushConstantAllocPs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_buffer_size: __gen_unuint(input[1], 0, 5),
constant_buffer_offset: __gen_unuint(input[1], 16, 20),
}
}
}
impl Deserialize for _3dStatePushConstantAllocPs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStatePushConstantAllocVs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub constant_buffer_size: u32,
pub constant_buffer_offset: u32,
}
impl _3dStatePushConstantAllocVs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStatePushConstantAllocVs {
fn default() -> Self {
_3dStatePushConstantAllocVs {
dword_length: 0,
_3d_command_sub_opcode: 18,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
constant_buffer_size: Default::default(),
constant_buffer_offset: Default::default(),
}
}
}
impl Serialize for _3dStatePushConstantAllocVs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.constant_buffer_size, 0, 5) |
__gen_uint(self.constant_buffer_offset, 16, 20);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStatePushConstantAllocVs {
fn from(input: &[u32; 2]) -> Self {
_3dStatePushConstantAllocVs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
constant_buffer_size: __gen_unuint(input[1], 0, 5),
constant_buffer_offset: __gen_unuint(input[1], 16, 20),
}
}
}
impl Deserialize for _3dStatePushConstantAllocVs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateRaster {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub viewport_z_near_clip_test_enable: bool,
pub scissor_rectangle_enable: bool,
pub antialiasing_enable: bool,
pub back_face_fill_mode: u32,
pub front_face_fill_mode: u32,
pub global_depth_offset_enable_point: bool,
pub global_depth_offset_enable_wireframe: bool,
pub global_depth_offset_enable_solid: bool,
pub dx_multisample_rasterization_mode: u32,
pub dx_multisample_rasterization_enable: bool,
pub smooth_point_enable: bool,
pub force_multisampling: u32,
pub cull_mode: u32,
pub forced_sample_count: u32,
pub front_winding: u32,
pub api_mode: u32,
pub conservative_rasterization_enable: bool,
pub viewport_z_far_clip_test_enable: bool,
pub global_depth_offset_constant: f32,
pub global_depth_offset_scale: f32,
pub global_depth_offset_clamp: f32,
}
impl _3dStateRaster {
pub const DWORD_LENGTH: u32 = 5;
pub const BACK: u32 = 3;
pub const BOTH: u32 = 0;
pub const CLOCKWISE: u32 = 0;
pub const COUNTER_CLOCKWISE: u32 = 1;
pub const DX10_0: u32 = 1;
pub const DX10_1: u32 = 2;
pub const DX9_OGL: u32 = 0;
pub const FRONT: u32 = 2;
pub const MSRASTMODE_OFF_PATTERN: u32 = 1;
pub const MSRASTMODE_OFF_PIXEL: u32 = 0;
pub const MSRASTMODE_ON_PATTERN: u32 = 3;
pub const MSRASTMODE_ON_PIXEL: u32 = 2;
pub const NONE: u32 = 1;
pub const NUMRASTSAMPLES_0: u32 = 0;
pub const NUMRASTSAMPLES_1: u32 = 1;
pub const NUMRASTSAMPLES_16: u32 = 5;
pub const NUMRASTSAMPLES_2: u32 = 2;
pub const NUMRASTSAMPLES_4: u32 = 3;
pub const NUMRASTSAMPLES_8: u32 = 4;
pub const POINT: u32 = 2;
pub const SOLID: u32 = 0;
pub const WIREFRAME: u32 = 1;
}
impl Default for _3dStateRaster {
fn default() -> Self {
_3dStateRaster {
dword_length: 3,
_3d_command_sub_opcode: 80,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
viewport_z_near_clip_test_enable: Default::default(),
scissor_rectangle_enable: Default::default(),
antialiasing_enable: Default::default(),
back_face_fill_mode: Default::default(),
front_face_fill_mode: Default::default(),
global_depth_offset_enable_point: Default::default(),
global_depth_offset_enable_wireframe: Default::default(),
global_depth_offset_enable_solid: Default::default(),
dx_multisample_rasterization_mode: Default::default(),
dx_multisample_rasterization_enable: Default::default(),
smooth_point_enable: Default::default(),
force_multisampling: Default::default(),
cull_mode: Default::default(),
forced_sample_count: Default::default(),
front_winding: Default::default(),
api_mode: Default::default(),
conservative_rasterization_enable: Default::default(),
viewport_z_far_clip_test_enable: Default::default(),
global_depth_offset_constant: Default::default(),
global_depth_offset_scale: Default::default(),
global_depth_offset_clamp: Default::default(),
}
}
}
impl Serialize for _3dStateRaster {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.viewport_z_near_clip_test_enable.into(), 0, 0) |
__gen_uint(self.scissor_rectangle_enable.into(), 1, 1) |
__gen_uint(self.antialiasing_enable.into(), 2, 2) |
__gen_uint(self.back_face_fill_mode, 3, 4) |
__gen_uint(self.front_face_fill_mode, 5, 6) |
__gen_uint(self.global_depth_offset_enable_point.into(), 7, 7) |
__gen_uint(self.global_depth_offset_enable_wireframe.into(), 8, 8) |
__gen_uint(self.global_depth_offset_enable_solid.into(), 9, 9) |
__gen_uint(self.dx_multisample_rasterization_mode, 10, 11) |
__gen_uint(self.dx_multisample_rasterization_enable.into(), 12, 12) |
__gen_uint(self.smooth_point_enable.into(), 13, 13) |
__gen_uint(self.force_multisampling, 14, 14) |
__gen_uint(self.cull_mode, 16, 17) |
__gen_uint(self.forced_sample_count, 18, 20) |
__gen_uint(self.front_winding, 21, 21) |
__gen_uint(self.api_mode, 22, 23) |
__gen_uint(self.conservative_rasterization_enable.into(), 24, 24) |
__gen_uint(self.viewport_z_far_clip_test_enable.into(), 26, 26);
out[2] = self.global_depth_offset_constant.to_bits();
out[3] = self.global_depth_offset_scale.to_bits();
out[4] = self.global_depth_offset_clamp.to_bits();
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for _3dStateRaster {
fn from(input: &[u32; 5]) -> Self {
_3dStateRaster {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
viewport_z_near_clip_test_enable: __gen_unuint(input[1], 0, 0) != 0,
scissor_rectangle_enable: __gen_unuint(input[1], 1, 1) != 0,
antialiasing_enable: __gen_unuint(input[1], 2, 2) != 0,
back_face_fill_mode: __gen_unuint(input[1], 3, 4),
front_face_fill_mode: __gen_unuint(input[1], 5, 6),
global_depth_offset_enable_point: __gen_unuint(input[1], 7, 7) != 0,
global_depth_offset_enable_wireframe: __gen_unuint(input[1], 8, 8) != 0,
global_depth_offset_enable_solid: __gen_unuint(input[1], 9, 9) != 0,
dx_multisample_rasterization_mode: __gen_unuint(input[1], 10, 11),
dx_multisample_rasterization_enable: __gen_unuint(input[1], 12, 12) != 0,
smooth_point_enable: __gen_unuint(input[1], 13, 13) != 0,
force_multisampling: __gen_unuint(input[1], 14, 14),
cull_mode: __gen_unuint(input[1], 16, 17),
forced_sample_count: __gen_unuint(input[1], 18, 20),
front_winding: __gen_unuint(input[1], 21, 21),
api_mode: __gen_unuint(input[1], 22, 23),
conservative_rasterization_enable: __gen_unuint(input[1], 24, 24) != 0,
viewport_z_far_clip_test_enable: __gen_unuint(input[1], 26, 26) != 0,
global_depth_offset_constant: f32::from_bits(input[2]),
global_depth_offset_scale: f32::from_bits(input[3]),
global_depth_offset_clamp: f32::from_bits(input[4]),
}
}
}
impl Deserialize for _3dStateRaster {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct _3dStateRsConstantPointer<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub operation_load_or_store: u32,
pub shader_select: u32,
pub global_constant_buffer_address: A,
pub global_constant_buffer_address_high: A,
}
impl<A: Addr + Default> _3dStateRsConstantPointer<A> {
pub const DWORD_LENGTH: u32 = 4;
pub const LOAD: u32 = 1;
pub const PS: u32 = 4;
pub const STORE: u32 = 0;
pub const VS: u32 = 0;
}
impl<A: Addr + Default> Default for _3dStateRsConstantPointer<A> {
fn default() -> Self {
_3dStateRsConstantPointer {
dword_length: 2,
_3d_command_sub_opcode: 84,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
operation_load_or_store: Default::default(),
shader_select: Default::default(),
global_constant_buffer_address: Default::default(),
global_constant_buffer_address_high: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateRsConstantPointer<A> {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.operation_load_or_store, 12, 12) |
__gen_uint(self.shader_select, 28, 30);
let v2_address = self.global_constant_buffer_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
let v3_address = self.global_constant_buffer_address_high.combine(0);
out[3] = v3_address as u32;
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for _3dStateRsConstantPointer<u64> {
fn from(input: &[u32; 4]) -> Self {
_3dStateRsConstantPointer {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
operation_load_or_store: __gen_unuint(input[1], 12, 12),
shader_select: __gen_unuint(input[1], 28, 30),
global_constant_buffer_address: (__gen_unuint(input[2], 6, 31) as u64) << 6,
global_constant_buffer_address_high: (__gen_unuint(input[3], 0, 31) as u64),
}
}
}
impl Deserialize for _3dStateRsConstantPointer<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSampleMask {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub sample_mask: u32,
}
impl _3dStateSampleMask {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateSampleMask {
fn default() -> Self {
_3dStateSampleMask {
dword_length: 0,
_3d_command_sub_opcode: 24,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
sample_mask: Default::default(),
}
}
}
impl Serialize for _3dStateSampleMask {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.sample_mask, 0, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateSampleMask {
fn from(input: &[u32; 2]) -> Self {
_3dStateSampleMask {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
sample_mask: __gen_unuint(input[1], 0, 15),
}
}
}
impl Deserialize for _3dStateSampleMask {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSamplePattern {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub _16x_sample0_y_offset: f32,
pub _16x_sample0_x_offset: f32,
pub _16x_sample1_y_offset: f32,
pub _16x_sample1_x_offset: f32,
pub _16x_sample2_y_offset: f32,
pub _16x_sample2_x_offset: f32,
pub _16x_sample3_y_offset: f32,
pub _16x_sample3_x_offset: f32,
pub _16x_sample4_y_offset: f32,
pub _16x_sample4_x_offset: f32,
pub _16x_sample5_y_offset: f32,
pub _16x_sample5_x_offset: f32,
pub _16x_sample6_y_offset: f32,
pub _16x_sample6_x_offset: f32,
pub _16x_sample7_y_offset: f32,
pub _16x_sample7_x_offset: f32,
pub _16x_sample8_y_offset: f32,
pub _16x_sample8_x_offset: f32,
pub _16x_sample9_y_offset: f32,
pub _16x_sample9_x_offset: f32,
pub _16x_sample10_y_offset: f32,
pub _16x_sample10_x_offset: f32,
pub _16x_sample11_y_offset: f32,
pub _16x_sample11_x_offset: f32,
pub _16x_sample12_y_offset: f32,
pub _16x_sample12_x_offset: f32,
pub _16x_sample13_y_offset: f32,
pub _16x_sample13_x_offset: f32,
pub _16x_sample14_y_offset: f32,
pub _16x_sample14_x_offset: f32,
pub _16x_sample15_y_offset: f32,
pub _16x_sample15_x_offset: f32,
pub _8x_sample4_y_offset: f32,
pub _8x_sample4_x_offset: f32,
pub _8x_sample5_y_offset: f32,
pub _8x_sample5_x_offset: f32,
pub _8x_sample6_y_offset: f32,
pub _8x_sample6_x_offset: f32,
pub _8x_sample7_y_offset: f32,
pub _8x_sample7_x_offset: f32,
pub _8x_sample0_y_offset: f32,
pub _8x_sample0_x_offset: f32,
pub _8x_sample1_y_offset: f32,
pub _8x_sample1_x_offset: f32,
pub _8x_sample2_y_offset: f32,
pub _8x_sample2_x_offset: f32,
pub _8x_sample3_y_offset: f32,
pub _8x_sample3_x_offset: f32,
pub _4x_sample0_y_offset: f32,
pub _4x_sample0_x_offset: f32,
pub _4x_sample1_y_offset: f32,
pub _4x_sample1_x_offset: f32,
pub _4x_sample2_y_offset: f32,
pub _4x_sample2_x_offset: f32,
pub _4x_sample3_y_offset: f32,
pub _4x_sample3_x_offset: f32,
pub _2x_sample0_y_offset: f32,
pub _2x_sample0_x_offset: f32,
pub _2x_sample1_y_offset: f32,
pub _2x_sample1_x_offset: f32,
pub _1x_sample0_y_offset: f32,
pub _1x_sample0_x_offset: f32,
}
impl _3dStateSamplePattern {
pub const DWORD_LENGTH: u32 = 9;
}
impl Default for _3dStateSamplePattern {
fn default() -> Self {
_3dStateSamplePattern {
dword_length: 7,
_3d_command_sub_opcode: 28,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
_16x_sample0_y_offset: Default::default(),
_16x_sample0_x_offset: Default::default(),
_16x_sample1_y_offset: Default::default(),
_16x_sample1_x_offset: Default::default(),
_16x_sample2_y_offset: Default::default(),
_16x_sample2_x_offset: Default::default(),
_16x_sample3_y_offset: Default::default(),
_16x_sample3_x_offset: Default::default(),
_16x_sample4_y_offset: Default::default(),
_16x_sample4_x_offset: Default::default(),
_16x_sample5_y_offset: Default::default(),
_16x_sample5_x_offset: Default::default(),
_16x_sample6_y_offset: Default::default(),
_16x_sample6_x_offset: Default::default(),
_16x_sample7_y_offset: Default::default(),
_16x_sample7_x_offset: Default::default(),
_16x_sample8_y_offset: Default::default(),
_16x_sample8_x_offset: Default::default(),
_16x_sample9_y_offset: Default::default(),
_16x_sample9_x_offset: Default::default(),
_16x_sample10_y_offset: Default::default(),
_16x_sample10_x_offset: Default::default(),
_16x_sample11_y_offset: Default::default(),
_16x_sample11_x_offset: Default::default(),
_16x_sample12_y_offset: Default::default(),
_16x_sample12_x_offset: Default::default(),
_16x_sample13_y_offset: Default::default(),
_16x_sample13_x_offset: Default::default(),
_16x_sample14_y_offset: Default::default(),
_16x_sample14_x_offset: Default::default(),
_16x_sample15_y_offset: Default::default(),
_16x_sample15_x_offset: Default::default(),
_8x_sample4_y_offset: Default::default(),
_8x_sample4_x_offset: Default::default(),
_8x_sample5_y_offset: Default::default(),
_8x_sample5_x_offset: Default::default(),
_8x_sample6_y_offset: Default::default(),
_8x_sample6_x_offset: Default::default(),
_8x_sample7_y_offset: Default::default(),
_8x_sample7_x_offset: Default::default(),
_8x_sample0_y_offset: Default::default(),
_8x_sample0_x_offset: Default::default(),
_8x_sample1_y_offset: Default::default(),
_8x_sample1_x_offset: Default::default(),
_8x_sample2_y_offset: Default::default(),
_8x_sample2_x_offset: Default::default(),
_8x_sample3_y_offset: Default::default(),
_8x_sample3_x_offset: Default::default(),
_4x_sample0_y_offset: Default::default(),
_4x_sample0_x_offset: Default::default(),
_4x_sample1_y_offset: Default::default(),
_4x_sample1_x_offset: Default::default(),
_4x_sample2_y_offset: Default::default(),
_4x_sample2_x_offset: Default::default(),
_4x_sample3_y_offset: Default::default(),
_4x_sample3_x_offset: Default::default(),
_2x_sample0_y_offset: Default::default(),
_2x_sample0_x_offset: Default::default(),
_2x_sample1_y_offset: Default::default(),
_2x_sample1_x_offset: Default::default(),
_1x_sample0_y_offset: Default::default(),
_1x_sample0_x_offset: Default::default(),
}
}
}
impl Serialize for _3dStateSamplePattern {
type Out = [u32; 9];
fn pack_into(&self, out: &mut [u32; 9]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_ufixed(self._16x_sample0_y_offset, 0, 3, 4) |
__gen_ufixed(self._16x_sample0_x_offset, 4, 7, 4) |
__gen_ufixed(self._16x_sample1_y_offset, 8, 11, 4) |
__gen_ufixed(self._16x_sample1_x_offset, 12, 15, 4) |
__gen_ufixed(self._16x_sample2_y_offset, 16, 19, 4) |
__gen_ufixed(self._16x_sample2_x_offset, 20, 23, 4) |
__gen_ufixed(self._16x_sample3_y_offset, 24, 27, 4) |
__gen_ufixed(self._16x_sample3_x_offset, 28, 31, 4);
out[2] = __gen_ufixed(self._16x_sample4_y_offset, 0, 3, 4) |
__gen_ufixed(self._16x_sample4_x_offset, 4, 7, 4) |
__gen_ufixed(self._16x_sample5_y_offset, 8, 11, 4) |
__gen_ufixed(self._16x_sample5_x_offset, 12, 15, 4) |
__gen_ufixed(self._16x_sample6_y_offset, 16, 19, 4) |
__gen_ufixed(self._16x_sample6_x_offset, 20, 23, 4) |
__gen_ufixed(self._16x_sample7_y_offset, 24, 27, 4) |
__gen_ufixed(self._16x_sample7_x_offset, 28, 31, 4);
out[3] = __gen_ufixed(self._16x_sample8_y_offset, 0, 3, 4) |
__gen_ufixed(self._16x_sample8_x_offset, 4, 7, 4) |
__gen_ufixed(self._16x_sample9_y_offset, 8, 11, 4) |
__gen_ufixed(self._16x_sample9_x_offset, 12, 15, 4) |
__gen_ufixed(self._16x_sample10_y_offset, 16, 19, 4) |
__gen_ufixed(self._16x_sample10_x_offset, 20, 23, 4) |
__gen_ufixed(self._16x_sample11_y_offset, 24, 27, 4) |
__gen_ufixed(self._16x_sample11_x_offset, 28, 31, 4);
out[4] = __gen_ufixed(self._16x_sample12_y_offset, 0, 3, 4) |
__gen_ufixed(self._16x_sample12_x_offset, 4, 7, 4) |
__gen_ufixed(self._16x_sample13_y_offset, 8, 11, 4) |
__gen_ufixed(self._16x_sample13_x_offset, 12, 15, 4) |
__gen_ufixed(self._16x_sample14_y_offset, 16, 19, 4) |
__gen_ufixed(self._16x_sample14_x_offset, 20, 23, 4) |
__gen_ufixed(self._16x_sample15_y_offset, 24, 27, 4) |
__gen_ufixed(self._16x_sample15_x_offset, 28, 31, 4);
out[5] = __gen_ufixed(self._8x_sample4_y_offset, 0, 3, 4) |
__gen_ufixed(self._8x_sample4_x_offset, 4, 7, 4) |
__gen_ufixed(self._8x_sample5_y_offset, 8, 11, 4) |
__gen_ufixed(self._8x_sample5_x_offset, 12, 15, 4) |
__gen_ufixed(self._8x_sample6_y_offset, 16, 19, 4) |
__gen_ufixed(self._8x_sample6_x_offset, 20, 23, 4) |
__gen_ufixed(self._8x_sample7_y_offset, 24, 27, 4) |
__gen_ufixed(self._8x_sample7_x_offset, 28, 31, 4);
out[6] = __gen_ufixed(self._8x_sample0_y_offset, 0, 3, 4) |
__gen_ufixed(self._8x_sample0_x_offset, 4, 7, 4) |
__gen_ufixed(self._8x_sample1_y_offset, 8, 11, 4) |
__gen_ufixed(self._8x_sample1_x_offset, 12, 15, 4) |
__gen_ufixed(self._8x_sample2_y_offset, 16, 19, 4) |
__gen_ufixed(self._8x_sample2_x_offset, 20, 23, 4) |
__gen_ufixed(self._8x_sample3_y_offset, 24, 27, 4) |
__gen_ufixed(self._8x_sample3_x_offset, 28, 31, 4);
out[7] = __gen_ufixed(self._4x_sample0_y_offset, 0, 3, 4) |
__gen_ufixed(self._4x_sample0_x_offset, 4, 7, 4) |
__gen_ufixed(self._4x_sample1_y_offset, 8, 11, 4) |
__gen_ufixed(self._4x_sample1_x_offset, 12, 15, 4) |
__gen_ufixed(self._4x_sample2_y_offset, 16, 19, 4) |
__gen_ufixed(self._4x_sample2_x_offset, 20, 23, 4) |
__gen_ufixed(self._4x_sample3_y_offset, 24, 27, 4) |
__gen_ufixed(self._4x_sample3_x_offset, 28, 31, 4);
out[8] = __gen_ufixed(self._2x_sample0_y_offset, 0, 3, 4) |
__gen_ufixed(self._2x_sample0_x_offset, 4, 7, 4) |
__gen_ufixed(self._2x_sample1_y_offset, 8, 11, 4) |
__gen_ufixed(self._2x_sample1_x_offset, 12, 15, 4) |
__gen_ufixed(self._1x_sample0_y_offset, 16, 19, 4) |
__gen_ufixed(self._1x_sample0_x_offset, 20, 23, 4);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 9];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 9] as *const [u8; 36]) })
}
}
impl From<&[u32; 9]> for _3dStateSamplePattern {
fn from(input: &[u32; 9]) -> Self {
_3dStateSamplePattern {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
_16x_sample0_y_offset: __gen_unufixed(input[1], 0, 3, 4),
_16x_sample0_x_offset: __gen_unufixed(input[1], 4, 7, 4),
_16x_sample1_y_offset: __gen_unufixed(input[1], 8, 11, 4),
_16x_sample1_x_offset: __gen_unufixed(input[1], 12, 15, 4),
_16x_sample2_y_offset: __gen_unufixed(input[1], 16, 19, 4),
_16x_sample2_x_offset: __gen_unufixed(input[1], 20, 23, 4),
_16x_sample3_y_offset: __gen_unufixed(input[1], 24, 27, 4),
_16x_sample3_x_offset: __gen_unufixed(input[1], 28, 31, 4),
_16x_sample4_y_offset: __gen_unufixed(input[2], 0, 3, 4),
_16x_sample4_x_offset: __gen_unufixed(input[2], 4, 7, 4),
_16x_sample5_y_offset: __gen_unufixed(input[2], 8, 11, 4),
_16x_sample5_x_offset: __gen_unufixed(input[2], 12, 15, 4),
_16x_sample6_y_offset: __gen_unufixed(input[2], 16, 19, 4),
_16x_sample6_x_offset: __gen_unufixed(input[2], 20, 23, 4),
_16x_sample7_y_offset: __gen_unufixed(input[2], 24, 27, 4),
_16x_sample7_x_offset: __gen_unufixed(input[2], 28, 31, 4),
_16x_sample8_y_offset: __gen_unufixed(input[3], 0, 3, 4),
_16x_sample8_x_offset: __gen_unufixed(input[3], 4, 7, 4),
_16x_sample9_y_offset: __gen_unufixed(input[3], 8, 11, 4),
_16x_sample9_x_offset: __gen_unufixed(input[3], 12, 15, 4),
_16x_sample10_y_offset: __gen_unufixed(input[3], 16, 19, 4),
_16x_sample10_x_offset: __gen_unufixed(input[3], 20, 23, 4),
_16x_sample11_y_offset: __gen_unufixed(input[3], 24, 27, 4),
_16x_sample11_x_offset: __gen_unufixed(input[3], 28, 31, 4),
_16x_sample12_y_offset: __gen_unufixed(input[4], 0, 3, 4),
_16x_sample12_x_offset: __gen_unufixed(input[4], 4, 7, 4),
_16x_sample13_y_offset: __gen_unufixed(input[4], 8, 11, 4),
_16x_sample13_x_offset: __gen_unufixed(input[4], 12, 15, 4),
_16x_sample14_y_offset: __gen_unufixed(input[4], 16, 19, 4),
_16x_sample14_x_offset: __gen_unufixed(input[4], 20, 23, 4),
_16x_sample15_y_offset: __gen_unufixed(input[4], 24, 27, 4),
_16x_sample15_x_offset: __gen_unufixed(input[4], 28, 31, 4),
_8x_sample4_y_offset: __gen_unufixed(input[5], 0, 3, 4),
_8x_sample4_x_offset: __gen_unufixed(input[5], 4, 7, 4),
_8x_sample5_y_offset: __gen_unufixed(input[5], 8, 11, 4),
_8x_sample5_x_offset: __gen_unufixed(input[5], 12, 15, 4),
_8x_sample6_y_offset: __gen_unufixed(input[5], 16, 19, 4),
_8x_sample6_x_offset: __gen_unufixed(input[5], 20, 23, 4),
_8x_sample7_y_offset: __gen_unufixed(input[5], 24, 27, 4),
_8x_sample7_x_offset: __gen_unufixed(input[5], 28, 31, 4),
_8x_sample0_y_offset: __gen_unufixed(input[6], 0, 3, 4),
_8x_sample0_x_offset: __gen_unufixed(input[6], 4, 7, 4),
_8x_sample1_y_offset: __gen_unufixed(input[6], 8, 11, 4),
_8x_sample1_x_offset: __gen_unufixed(input[6], 12, 15, 4),
_8x_sample2_y_offset: __gen_unufixed(input[6], 16, 19, 4),
_8x_sample2_x_offset: __gen_unufixed(input[6], 20, 23, 4),
_8x_sample3_y_offset: __gen_unufixed(input[6], 24, 27, 4),
_8x_sample3_x_offset: __gen_unufixed(input[6], 28, 31, 4),
_4x_sample0_y_offset: __gen_unufixed(input[7], 0, 3, 4),
_4x_sample0_x_offset: __gen_unufixed(input[7], 4, 7, 4),
_4x_sample1_y_offset: __gen_unufixed(input[7], 8, 11, 4),
_4x_sample1_x_offset: __gen_unufixed(input[7], 12, 15, 4),
_4x_sample2_y_offset: __gen_unufixed(input[7], 16, 19, 4),
_4x_sample2_x_offset: __gen_unufixed(input[7], 20, 23, 4),
_4x_sample3_y_offset: __gen_unufixed(input[7], 24, 27, 4),
_4x_sample3_x_offset: __gen_unufixed(input[7], 28, 31, 4),
_2x_sample0_y_offset: __gen_unufixed(input[8], 0, 3, 4),
_2x_sample0_x_offset: __gen_unufixed(input[8], 4, 7, 4),
_2x_sample1_y_offset: __gen_unufixed(input[8], 8, 11, 4),
_2x_sample1_x_offset: __gen_unufixed(input[8], 12, 15, 4),
_1x_sample0_y_offset: __gen_unufixed(input[8], 16, 19, 4),
_1x_sample0_x_offset: __gen_unufixed(input[8], 20, 23, 4),
}
}
}
impl Deserialize for _3dStateSamplePattern {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 9];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 9] as *mut [u8; 36]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSamplerPaletteLoad0 {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
}
impl _3dStateSamplerPaletteLoad0 {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for _3dStateSamplerPaletteLoad0 {
fn default() -> Self {
_3dStateSamplerPaletteLoad0 {
dword_length: Default::default(),
_3d_command_sub_opcode: 2,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
}
}
}
impl Serialize for _3dStateSamplerPaletteLoad0 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for _3dStateSamplerPaletteLoad0 {
fn from(input: &[u32; 1]) -> Self {
_3dStateSamplerPaletteLoad0 {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for _3dStateSamplerPaletteLoad0 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSamplerPaletteLoad1 {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
}
impl _3dStateSamplerPaletteLoad1 {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for _3dStateSamplerPaletteLoad1 {
fn default() -> Self {
_3dStateSamplerPaletteLoad1 {
dword_length: 0,
_3d_command_sub_opcode: 12,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
}
}
}
impl Serialize for _3dStateSamplerPaletteLoad1 {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for _3dStateSamplerPaletteLoad1 {
fn from(input: &[u32; 1]) -> Self {
_3dStateSamplerPaletteLoad1 {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for _3dStateSamplerPaletteLoad1 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSamplerStatePointersDs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_ds_sampler_state: u64,
}
impl _3dStateSamplerStatePointersDs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateSamplerStatePointersDs {
fn default() -> Self {
_3dStateSamplerStatePointersDs {
dword_length: 0,
_3d_command_sub_opcode: 45,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_ds_sampler_state: Default::default(),
}
}
}
impl Serialize for _3dStateSamplerStatePointersDs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_ds_sampler_state as u32, 5, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateSamplerStatePointersDs {
fn from(input: &[u32; 2]) -> Self {
_3dStateSamplerStatePointersDs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_ds_sampler_state: (__gen_unuint(input[1], 5, 31) as u64) << 5,
}
}
}
impl Deserialize for _3dStateSamplerStatePointersDs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSamplerStatePointersGs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_gs_sampler_state: u64,
}
impl _3dStateSamplerStatePointersGs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateSamplerStatePointersGs {
fn default() -> Self {
_3dStateSamplerStatePointersGs {
dword_length: 0,
_3d_command_sub_opcode: 46,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_gs_sampler_state: Default::default(),
}
}
}
impl Serialize for _3dStateSamplerStatePointersGs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_gs_sampler_state as u32, 5, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateSamplerStatePointersGs {
fn from(input: &[u32; 2]) -> Self {
_3dStateSamplerStatePointersGs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_gs_sampler_state: (__gen_unuint(input[1], 5, 31) as u64) << 5,
}
}
}
impl Deserialize for _3dStateSamplerStatePointersGs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSamplerStatePointersHs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_hs_sampler_state: u64,
}
impl _3dStateSamplerStatePointersHs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateSamplerStatePointersHs {
fn default() -> Self {
_3dStateSamplerStatePointersHs {
dword_length: 0,
_3d_command_sub_opcode: 44,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_hs_sampler_state: Default::default(),
}
}
}
impl Serialize for _3dStateSamplerStatePointersHs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_hs_sampler_state as u32, 5, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateSamplerStatePointersHs {
fn from(input: &[u32; 2]) -> Self {
_3dStateSamplerStatePointersHs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_hs_sampler_state: (__gen_unuint(input[1], 5, 31) as u64) << 5,
}
}
}
impl Deserialize for _3dStateSamplerStatePointersHs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSamplerStatePointersPs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_ps_sampler_state: u64,
}
impl _3dStateSamplerStatePointersPs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateSamplerStatePointersPs {
fn default() -> Self {
_3dStateSamplerStatePointersPs {
dword_length: 0,
_3d_command_sub_opcode: 47,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_ps_sampler_state: Default::default(),
}
}
}
impl Serialize for _3dStateSamplerStatePointersPs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_ps_sampler_state as u32, 5, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateSamplerStatePointersPs {
fn from(input: &[u32; 2]) -> Self {
_3dStateSamplerStatePointersPs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_ps_sampler_state: (__gen_unuint(input[1], 5, 31) as u64) << 5,
}
}
}
impl Deserialize for _3dStateSamplerStatePointersPs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSamplerStatePointersVs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub pointer_to_vs_sampler_state: u64,
}
impl _3dStateSamplerStatePointersVs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateSamplerStatePointersVs {
fn default() -> Self {
_3dStateSamplerStatePointersVs {
dword_length: 0,
_3d_command_sub_opcode: 43,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
pointer_to_vs_sampler_state: Default::default(),
}
}
}
impl Serialize for _3dStateSamplerStatePointersVs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.pointer_to_vs_sampler_state as u32, 5, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateSamplerStatePointersVs {
fn from(input: &[u32; 2]) -> Self {
_3dStateSamplerStatePointersVs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
pointer_to_vs_sampler_state: (__gen_unuint(input[1], 5, 31) as u64) << 5,
}
}
}
impl Deserialize for _3dStateSamplerStatePointersVs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSbe {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub primitive_id_override_attribute_select: u32,
pub vertex_urb_entry_read_offset: u32,
pub vertex_urb_entry_read_length: u32,
pub primitive_id_override_component_x: bool,
pub primitive_id_override_component_y: bool,
pub primitive_id_override_component_z: bool,
pub primitive_id_override_component_w: bool,
pub point_sprite_texture_coordinate_origin: u32,
pub attribute_swizzle_enable: bool,
pub number_of_sf_output_attributes: u32,
pub force_vertex_urb_entry_read_offset: bool,
pub force_vertex_urb_entry_read_length: bool,
pub point_sprite_texture_coordinate_enable: u32,
pub constant_interpolation_enable: u32,
pub attribute_active_component_format: [u32; 32],
}
impl _3dStateSbe {
pub const DWORD_LENGTH: u32 = 6;
pub const DISABLED: u32 = 0;
pub const LOWERLEFT: u32 = 1;
pub const UPPERLEFT: u32 = 0;
pub const XY: u32 = 1;
pub const XYZ: u32 = 2;
pub const XYZW: u32 = 3;
}
impl Default for _3dStateSbe {
fn default() -> Self {
_3dStateSbe {
dword_length: 4,
_3d_command_sub_opcode: 31,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
primitive_id_override_attribute_select: Default::default(),
vertex_urb_entry_read_offset: Default::default(),
vertex_urb_entry_read_length: Default::default(),
primitive_id_override_component_x: Default::default(),
primitive_id_override_component_y: Default::default(),
primitive_id_override_component_z: Default::default(),
primitive_id_override_component_w: Default::default(),
point_sprite_texture_coordinate_origin: Default::default(),
attribute_swizzle_enable: Default::default(),
number_of_sf_output_attributes: Default::default(),
force_vertex_urb_entry_read_offset: Default::default(),
force_vertex_urb_entry_read_length: Default::default(),
point_sprite_texture_coordinate_enable: Default::default(),
constant_interpolation_enable: Default::default(),
attribute_active_component_format: Default::default(),
}
}
}
impl Serialize for _3dStateSbe {
type Out = [u32; 6];
fn pack_into(&self, out: &mut [u32; 6]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.primitive_id_override_attribute_select, 0, 4) |
__gen_uint(self.vertex_urb_entry_read_offset, 5, 10) |
__gen_uint(self.vertex_urb_entry_read_length, 11, 15) |
__gen_uint(self.primitive_id_override_component_x.into(), 16, 16) |
__gen_uint(self.primitive_id_override_component_y.into(), 17, 17) |
__gen_uint(self.primitive_id_override_component_z.into(), 18, 18) |
__gen_uint(self.primitive_id_override_component_w.into(), 19, 19) |
__gen_uint(self.point_sprite_texture_coordinate_origin, 20, 20) |
__gen_uint(self.attribute_swizzle_enable.into(), 21, 21) |
__gen_uint(self.number_of_sf_output_attributes, 22, 27) |
__gen_uint(self.force_vertex_urb_entry_read_offset.into(), 28, 28) |
__gen_uint(self.force_vertex_urb_entry_read_length.into(), 29, 29);
out[2] = __gen_uint(self.point_sprite_texture_coordinate_enable, 0, 31);
out[3] = __gen_uint(self.constant_interpolation_enable, 0, 31);
out[4] = __gen_uint(self.attribute_active_component_format[0], 0, 1) |
__gen_uint(self.attribute_active_component_format[1], 2, 3) |
__gen_uint(self.attribute_active_component_format[2], 4, 5) |
__gen_uint(self.attribute_active_component_format[3], 6, 7) |
__gen_uint(self.attribute_active_component_format[4], 8, 9) |
__gen_uint(self.attribute_active_component_format[5], 10, 11) |
__gen_uint(self.attribute_active_component_format[6], 12, 13) |
__gen_uint(self.attribute_active_component_format[7], 14, 15) |
__gen_uint(self.attribute_active_component_format[8], 16, 17) |
__gen_uint(self.attribute_active_component_format[9], 18, 19) |
__gen_uint(self.attribute_active_component_format[10], 20, 21) |
__gen_uint(self.attribute_active_component_format[11], 22, 23) |
__gen_uint(self.attribute_active_component_format[12], 24, 25) |
__gen_uint(self.attribute_active_component_format[13], 26, 27) |
__gen_uint(self.attribute_active_component_format[14], 28, 29) |
__gen_uint(self.attribute_active_component_format[15], 30, 31);
out[5] = __gen_uint(self.attribute_active_component_format[16], 0, 1) |
__gen_uint(self.attribute_active_component_format[17], 2, 3) |
__gen_uint(self.attribute_active_component_format[18], 4, 5) |
__gen_uint(self.attribute_active_component_format[19], 6, 7) |
__gen_uint(self.attribute_active_component_format[20], 8, 9) |
__gen_uint(self.attribute_active_component_format[21], 10, 11) |
__gen_uint(self.attribute_active_component_format[22], 12, 13) |
__gen_uint(self.attribute_active_component_format[23], 14, 15) |
__gen_uint(self.attribute_active_component_format[24], 16, 17) |
__gen_uint(self.attribute_active_component_format[25], 18, 19) |
__gen_uint(self.attribute_active_component_format[26], 20, 21) |
__gen_uint(self.attribute_active_component_format[27], 22, 23) |
__gen_uint(self.attribute_active_component_format[28], 24, 25) |
__gen_uint(self.attribute_active_component_format[29], 26, 27) |
__gen_uint(self.attribute_active_component_format[30], 28, 29) |
__gen_uint(self.attribute_active_component_format[31], 30, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 6];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 6] as *const [u8; 24]) })
}
}
impl From<&[u32; 6]> for _3dStateSbe {
fn from(input: &[u32; 6]) -> Self {
_3dStateSbe {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
primitive_id_override_attribute_select: __gen_unuint(input[1], 0, 4),
vertex_urb_entry_read_offset: __gen_unuint(input[1], 5, 10),
vertex_urb_entry_read_length: __gen_unuint(input[1], 11, 15),
primitive_id_override_component_x: __gen_unuint(input[1], 16, 16) != 0,
primitive_id_override_component_y: __gen_unuint(input[1], 17, 17) != 0,
primitive_id_override_component_z: __gen_unuint(input[1], 18, 18) != 0,
primitive_id_override_component_w: __gen_unuint(input[1], 19, 19) != 0,
point_sprite_texture_coordinate_origin: __gen_unuint(input[1], 20, 20),
attribute_swizzle_enable: __gen_unuint(input[1], 21, 21) != 0,
number_of_sf_output_attributes: __gen_unuint(input[1], 22, 27),
force_vertex_urb_entry_read_offset: __gen_unuint(input[1], 28, 28) != 0,
force_vertex_urb_entry_read_length: __gen_unuint(input[1], 29, 29) != 0,
point_sprite_texture_coordinate_enable: __gen_unuint(input[2], 0, 31),
constant_interpolation_enable: __gen_unuint(input[3], 0, 31),
attribute_active_component_format: [
__gen_unuint(input[4], 0, 1),
__gen_unuint(input[4], 2, 3),
__gen_unuint(input[4], 4, 5),
__gen_unuint(input[4], 6, 7),
__gen_unuint(input[4], 8, 9),
__gen_unuint(input[4], 10, 11),
__gen_unuint(input[4], 12, 13),
__gen_unuint(input[4], 14, 15),
__gen_unuint(input[4], 16, 17),
__gen_unuint(input[4], 18, 19),
__gen_unuint(input[4], 20, 21),
__gen_unuint(input[4], 22, 23),
__gen_unuint(input[4], 24, 25),
__gen_unuint(input[4], 26, 27),
__gen_unuint(input[4], 28, 29),
__gen_unuint(input[4], 30, 31),
__gen_unuint(input[5], 0, 1),
__gen_unuint(input[5], 2, 3),
__gen_unuint(input[5], 4, 5),
__gen_unuint(input[5], 6, 7),
__gen_unuint(input[5], 8, 9),
__gen_unuint(input[5], 10, 11),
__gen_unuint(input[5], 12, 13),
__gen_unuint(input[5], 14, 15),
__gen_unuint(input[5], 16, 17),
__gen_unuint(input[5], 18, 19),
__gen_unuint(input[5], 20, 21),
__gen_unuint(input[5], 22, 23),
__gen_unuint(input[5], 24, 25),
__gen_unuint(input[5], 26, 27),
__gen_unuint(input[5], 28, 29),
__gen_unuint(input[5], 30, 31)
],
}
}
}
impl Deserialize for _3dStateSbe {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 6];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 6] as *mut [u8; 24]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSbeSwiz {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub attribute: [SfOutputAttributeDetail; 16],
pub attribute_wrap_shortest_enables: [u32; 16],
}
impl _3dStateSbeSwiz {
pub const DWORD_LENGTH: u32 = 11;
}
impl Default for _3dStateSbeSwiz {
fn default() -> Self {
_3dStateSbeSwiz {
dword_length: 9,
_3d_command_sub_opcode: 81,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
attribute: Default::default(),
attribute_wrap_shortest_enables: Default::default(),
}
}
}
impl Serialize for _3dStateSbeSwiz {
type Out = [u32; 11];
fn pack_into(&self, out: &mut [u32; 11]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
let mut v1_0 = [0_u32; 1];
self.attribute[0].pack_into(&mut v1_0);
let mut v1_1 = [0_u32; 1];
self.attribute[1].pack_into(&mut v1_1);
out[1] = __gen_uint(v1_0[0], 0, 15) |
__gen_uint(v1_1[0], 16, 31);
let mut v2_0 = [0_u32; 1];
self.attribute[2].pack_into(&mut v2_0);
let mut v2_1 = [0_u32; 1];
self.attribute[3].pack_into(&mut v2_1);
out[2] = __gen_uint(v2_0[0], 0, 15) |
__gen_uint(v2_1[0], 16, 31);
let mut v3_0 = [0_u32; 1];
self.attribute[4].pack_into(&mut v3_0);
let mut v3_1 = [0_u32; 1];
self.attribute[5].pack_into(&mut v3_1);
out[3] = __gen_uint(v3_0[0], 0, 15) |
__gen_uint(v3_1[0], 16, 31);
let mut v4_0 = [0_u32; 1];
self.attribute[6].pack_into(&mut v4_0);
let mut v4_1 = [0_u32; 1];
self.attribute[7].pack_into(&mut v4_1);
out[4] = __gen_uint(v4_0[0], 0, 15) |
__gen_uint(v4_1[0], 16, 31);
let mut v5_0 = [0_u32; 1];
self.attribute[8].pack_into(&mut v5_0);
let mut v5_1 = [0_u32; 1];
self.attribute[9].pack_into(&mut v5_1);
out[5] = __gen_uint(v5_0[0], 0, 15) |
__gen_uint(v5_1[0], 16, 31);
let mut v6_0 = [0_u32; 1];
self.attribute[10].pack_into(&mut v6_0);
let mut v6_1 = [0_u32; 1];
self.attribute[11].pack_into(&mut v6_1);
out[6] = __gen_uint(v6_0[0], 0, 15) |
__gen_uint(v6_1[0], 16, 31);
let mut v7_0 = [0_u32; 1];
self.attribute[12].pack_into(&mut v7_0);
let mut v7_1 = [0_u32; 1];
self.attribute[13].pack_into(&mut v7_1);
out[7] = __gen_uint(v7_0[0], 0, 15) |
__gen_uint(v7_1[0], 16, 31);
let mut v8_0 = [0_u32; 1];
self.attribute[14].pack_into(&mut v8_0);
let mut v8_1 = [0_u32; 1];
self.attribute[15].pack_into(&mut v8_1);
out[8] = __gen_uint(v8_0[0], 0, 15) |
__gen_uint(v8_1[0], 16, 31);
out[9] = __gen_uint(self.attribute_wrap_shortest_enables[0], 0, 3) |
__gen_uint(self.attribute_wrap_shortest_enables[1], 4, 7) |
__gen_uint(self.attribute_wrap_shortest_enables[2], 8, 11) |
__gen_uint(self.attribute_wrap_shortest_enables[3], 12, 15) |
__gen_uint(self.attribute_wrap_shortest_enables[4], 16, 19) |
__gen_uint(self.attribute_wrap_shortest_enables[5], 20, 23) |
__gen_uint(self.attribute_wrap_shortest_enables[6], 24, 27) |
__gen_uint(self.attribute_wrap_shortest_enables[7], 28, 31);
out[10] = __gen_uint(self.attribute_wrap_shortest_enables[8], 0, 3) |
__gen_uint(self.attribute_wrap_shortest_enables[9], 4, 7) |
__gen_uint(self.attribute_wrap_shortest_enables[10], 8, 11) |
__gen_uint(self.attribute_wrap_shortest_enables[11], 12, 15) |
__gen_uint(self.attribute_wrap_shortest_enables[12], 16, 19) |
__gen_uint(self.attribute_wrap_shortest_enables[13], 20, 23) |
__gen_uint(self.attribute_wrap_shortest_enables[14], 24, 27) |
__gen_uint(self.attribute_wrap_shortest_enables[15], 28, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 11];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 11] as *const [u8; 44]) })
}
}
impl From<&[u32; 11]> for _3dStateSbeSwiz {
fn from(input: &[u32; 11]) -> Self {
_3dStateSbeSwiz {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
attribute: [
{{
let [_, ref in1 @ .., _, _, _, _, _, _, _, _, _] = input;
in1.into()
}},
{{
let i: [u32; 1] = [__gen_unuint(input[1], 16, 31)];
(&i).into()
}},
{{
let [_, _, ref in2 @ .., _, _, _, _, _, _, _, _] = input;
in2.into()
}},
{{
let i: [u32; 1] = [__gen_unuint(input[2], 16, 31)];
(&i).into()
}},
{{
let [_, _, _, ref in3 @ .., _, _, _, _, _, _, _] = input;
in3.into()
}},
{{
let i: [u32; 1] = [__gen_unuint(input[3], 16, 31)];
(&i).into()
}},
{{
let [_, _, _, _, ref in4 @ .., _, _, _, _, _, _] = input;
in4.into()
}},
{{
let i: [u32; 1] = [__gen_unuint(input[4], 16, 31)];
(&i).into()
}},
{{
let [_, _, _, _, _, ref in5 @ .., _, _, _, _, _] = input;
in5.into()
}},
{{
let i: [u32; 1] = [__gen_unuint(input[5], 16, 31)];
(&i).into()
}},
{{
let [_, _, _, _, _, _, ref in6 @ .., _, _, _, _] = input;
in6.into()
}},
{{
let i: [u32; 1] = [__gen_unuint(input[6], 16, 31)];
(&i).into()
}},
{{
let [_, _, _, _, _, _, _, ref in7 @ .., _, _, _] = input;
in7.into()
}},
{{
let i: [u32; 1] = [__gen_unuint(input[7], 16, 31)];
(&i).into()
}},
{{
let [_, _, _, _, _, _, _, _, ref in8 @ .., _, _] = input;
in8.into()
}},
{{
let i: [u32; 1] = [__gen_unuint(input[8], 16, 31)];
(&i).into()
}}
],
attribute_wrap_shortest_enables: [
__gen_unuint(input[9], 0, 3),
__gen_unuint(input[9], 4, 7),
__gen_unuint(input[9], 8, 11),
__gen_unuint(input[9], 12, 15),
__gen_unuint(input[9], 16, 19),
__gen_unuint(input[9], 20, 23),
__gen_unuint(input[9], 24, 27),
__gen_unuint(input[9], 28, 31),
__gen_unuint(input[10], 0, 3),
__gen_unuint(input[10], 4, 7),
__gen_unuint(input[10], 8, 11),
__gen_unuint(input[10], 12, 15),
__gen_unuint(input[10], 16, 19),
__gen_unuint(input[10], 20, 23),
__gen_unuint(input[10], 24, 27),
__gen_unuint(input[10], 28, 31)
],
}
}
}
impl Deserialize for _3dStateSbeSwiz {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 11];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 11] as *mut [u8; 44]) })?;
Ok((&input).into())
}
}
pub struct _3dStateScissorStatePointers {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub scissor_rect_pointer: u64,
}
impl _3dStateScissorStatePointers {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateScissorStatePointers {
fn default() -> Self {
_3dStateScissorStatePointers {
dword_length: 0,
_3d_command_sub_opcode: 15,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
scissor_rect_pointer: Default::default(),
}
}
}
impl Serialize for _3dStateScissorStatePointers {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.scissor_rect_pointer as u32, 5, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateScissorStatePointers {
fn from(input: &[u32; 2]) -> Self {
_3dStateScissorStatePointers {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
scissor_rect_pointer: (__gen_unuint(input[1], 5, 31) as u64) << 5,
}
}
}
impl Deserialize for _3dStateScissorStatePointers {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSf {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub viewport_transform_enable: bool,
pub statistics_enable: bool,
pub legacy_global_depth_bias_enable: bool,
pub line_width: f32,
pub line_end_cap_antialiasing_region_width: u32,
pub point_width: f32,
pub point_width_source: u32,
pub vertex_sub_pixel_precision_select: u32,
pub smooth_point_enable: bool,
pub aa_line_distance_mode: u32,
pub triangle_fan_provoking_vertex_select: u32,
pub line_strip_list_provoking_vertex_select: u32,
pub triangle_strip_list_provoking_vertex_select: u32,
pub last_pixel_enable: bool,
}
impl _3dStateSf {
pub const DWORD_LENGTH: u32 = 4;
pub const AALINEDISTANCE_TRUE: u32 = 1;
pub const STATE: u32 = 1;
pub const VERTEX: u32 = 0;
pub const _0_5_PIXELS: u32 = 0;
pub const _1_0_PIXELS: u32 = 1;
pub const _2_0_PIXELS: u32 = 2;
pub const _4_0_PIXELS: u32 = 3;
pub const _4_BIT: u32 = 1;
pub const _8_BIT: u32 = 0;
}
impl Default for _3dStateSf {
fn default() -> Self {
_3dStateSf {
dword_length: 2,
_3d_command_sub_opcode: 19,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
viewport_transform_enable: Default::default(),
statistics_enable: Default::default(),
legacy_global_depth_bias_enable: Default::default(),
line_width: Default::default(),
line_end_cap_antialiasing_region_width: Default::default(),
point_width: Default::default(),
point_width_source: Default::default(),
vertex_sub_pixel_precision_select: Default::default(),
smooth_point_enable: Default::default(),
aa_line_distance_mode: Default::default(),
triangle_fan_provoking_vertex_select: Default::default(),
line_strip_list_provoking_vertex_select: Default::default(),
triangle_strip_list_provoking_vertex_select: Default::default(),
last_pixel_enable: Default::default(),
}
}
}
impl Serialize for _3dStateSf {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.viewport_transform_enable.into(), 1, 1) |
__gen_uint(self.statistics_enable.into(), 10, 10) |
__gen_uint(self.legacy_global_depth_bias_enable.into(), 11, 11) |
__gen_ufixed(self.line_width, 12, 29, 7);
out[2] = __gen_uint(self.line_end_cap_antialiasing_region_width, 16, 17);
out[3] = __gen_ufixed(self.point_width, 0, 10, 3) |
__gen_uint(self.point_width_source, 11, 11) |
__gen_uint(self.vertex_sub_pixel_precision_select, 12, 12) |
__gen_uint(self.smooth_point_enable.into(), 13, 13) |
__gen_uint(self.aa_line_distance_mode, 14, 14) |
__gen_uint(self.triangle_fan_provoking_vertex_select, 25, 26) |
__gen_uint(self.line_strip_list_provoking_vertex_select, 27, 28) |
__gen_uint(self.triangle_strip_list_provoking_vertex_select, 29, 30) |
__gen_uint(self.last_pixel_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for _3dStateSf {
fn from(input: &[u32; 4]) -> Self {
_3dStateSf {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
viewport_transform_enable: __gen_unuint(input[1], 1, 1) != 0,
statistics_enable: __gen_unuint(input[1], 10, 10) != 0,
legacy_global_depth_bias_enable: __gen_unuint(input[1], 11, 11) != 0,
line_width: __gen_unufixed(input[1], 12, 29, 7),
line_end_cap_antialiasing_region_width: __gen_unuint(input[2], 16, 17),
point_width: __gen_unufixed(input[3], 0, 10, 3),
point_width_source: __gen_unuint(input[3], 11, 11),
vertex_sub_pixel_precision_select: __gen_unuint(input[3], 12, 12),
smooth_point_enable: __gen_unuint(input[3], 13, 13) != 0,
aa_line_distance_mode: __gen_unuint(input[3], 14, 14),
triangle_fan_provoking_vertex_select: __gen_unuint(input[3], 25, 26),
line_strip_list_provoking_vertex_select: __gen_unuint(input[3], 27, 28),
triangle_strip_list_provoking_vertex_select: __gen_unuint(input[3], 29, 30),
last_pixel_enable: __gen_unuint(input[3], 31, 31) != 0,
}
}
}
impl Deserialize for _3dStateSf {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSoBuffer<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub stream_output_buffer_offset_address_enable: bool,
pub stream_offset_write_enable: bool,
pub mocs: u32,
pub so_buffer_index: u32,
pub so_buffer_enable: bool,
pub surface_base_address: A,
pub surface_size: u32,
pub stream_output_buffer_offset_address: A,
pub stream_offset: u32,
}
impl<A: Addr + Default> _3dStateSoBuffer<A> {
pub const DWORD_LENGTH: u32 = 8;
}
impl<A: Addr + Default> Default for _3dStateSoBuffer<A> {
fn default() -> Self {
_3dStateSoBuffer {
dword_length: 6,
_3d_command_sub_opcode: 24,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
stream_output_buffer_offset_address_enable: Default::default(),
stream_offset_write_enable: Default::default(),
mocs: Default::default(),
so_buffer_index: Default::default(),
so_buffer_enable: Default::default(),
surface_base_address: Default::default(),
surface_size: Default::default(),
stream_output_buffer_offset_address: Default::default(),
stream_offset: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateSoBuffer<A> {
type Out = [u32; 8];
fn pack_into(&self, out: &mut [u32; 8]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.stream_output_buffer_offset_address_enable.into(), 20, 20) |
__gen_uint(self.stream_offset_write_enable.into(), 21, 21) |
__gen_uint(self.mocs, 22, 28) |
__gen_uint(self.so_buffer_index, 29, 30) |
__gen_uint(self.so_buffer_enable.into(), 31, 31);
let v2_address = self.surface_base_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
out[4] = __gen_uint(self.surface_size, 0, 29);
let v5_address = self.stream_output_buffer_offset_address.combine(0);
out[5] = v5_address as u32;
out[6] = (v5_address >> 32) as u32;
out[7] = __gen_uint(self.stream_offset, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 8];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 8] as *const [u8; 32]) })
}
}
impl From<&[u32; 8]> for _3dStateSoBuffer<u64> {
fn from(input: &[u32; 8]) -> Self {
_3dStateSoBuffer {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
stream_output_buffer_offset_address_enable: __gen_unuint(input[1], 20, 20) != 0,
stream_offset_write_enable: __gen_unuint(input[1], 21, 21) != 0,
mocs: __gen_unuint(input[1], 22, 28),
so_buffer_index: __gen_unuint(input[1], 29, 30),
so_buffer_enable: __gen_unuint(input[1], 31, 31) != 0,
surface_base_address: (__gen_unuint(input[2], 2, 31) as u64) << 2 |
(__gen_unuint(input[3], 0, 15) as u64) << 32,
surface_size: __gen_unuint(input[4], 0, 29),
stream_output_buffer_offset_address: (__gen_unuint(input[5], 2, 31) as u64) << 2 |
(__gen_unuint(input[6], 0, 15) as u64) << 32,
stream_offset: __gen_unuint(input[7], 0, 31),
}
}
}
impl Deserialize for _3dStateSoBuffer<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 8];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 8] as *mut [u8; 32]) })?;
Ok((&input).into())
}
}
pub struct _3dStateSoDeclList {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub stream_to_buffer_selects_0: u32,
pub stream_to_buffer_selects_1: u32,
pub stream_to_buffer_selects_2: u32,
pub stream_to_buffer_selects_3: u32,
pub num_entries_0: u32,
pub num_entries_1: u32,
pub num_entries_2: u32,
pub num_entries_3: u32,
}
impl _3dStateSoDeclList {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for _3dStateSoDeclList {
fn default() -> Self {
_3dStateSoDeclList {
dword_length: Default::default(),
_3d_command_sub_opcode: 23,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
stream_to_buffer_selects_0: Default::default(),
stream_to_buffer_selects_1: Default::default(),
stream_to_buffer_selects_2: Default::default(),
stream_to_buffer_selects_3: Default::default(),
num_entries_0: Default::default(),
num_entries_1: Default::default(),
num_entries_2: Default::default(),
num_entries_3: Default::default(),
}
}
}
impl Serialize for _3dStateSoDeclList {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 8) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.stream_to_buffer_selects_0, 0, 3) |
__gen_uint(self.stream_to_buffer_selects_1, 4, 7) |
__gen_uint(self.stream_to_buffer_selects_2, 8, 11) |
__gen_uint(self.stream_to_buffer_selects_3, 12, 15);
out[2] = __gen_uint(self.num_entries_0, 0, 7) |
__gen_uint(self.num_entries_1, 8, 15) |
__gen_uint(self.num_entries_2, 16, 23) |
__gen_uint(self.num_entries_3, 24, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateSoDeclList {
fn from(input: &[u32; 3]) -> Self {
_3dStateSoDeclList {
dword_length: __gen_unuint(input[0], 0, 8),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
stream_to_buffer_selects_0: __gen_unuint(input[1], 0, 3),
stream_to_buffer_selects_1: __gen_unuint(input[1], 4, 7),
stream_to_buffer_selects_2: __gen_unuint(input[1], 8, 11),
stream_to_buffer_selects_3: __gen_unuint(input[1], 12, 15),
num_entries_0: __gen_unuint(input[2], 0, 7),
num_entries_1: __gen_unuint(input[2], 8, 15),
num_entries_2: __gen_unuint(input[2], 16, 23),
num_entries_3: __gen_unuint(input[2], 24, 31),
}
}
}
impl Deserialize for _3dStateSoDeclList {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateStencilBuffer<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub surface_pitch: u32,
pub mocs: u32,
pub stencil_buffer_enable: bool,
pub surface_base_address: A,
pub surface_qpitch: u32,
}
impl<A: Addr + Default> _3dStateStencilBuffer<A> {
pub const DWORD_LENGTH: u32 = 5;
}
impl<A: Addr + Default> Default for _3dStateStencilBuffer<A> {
fn default() -> Self {
_3dStateStencilBuffer {
dword_length: 3,
_3d_command_sub_opcode: 6,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
surface_pitch: Default::default(),
mocs: Default::default(),
stencil_buffer_enable: Default::default(),
surface_base_address: Default::default(),
surface_qpitch: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateStencilBuffer<A> {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.surface_pitch, 0, 16) |
__gen_uint(self.mocs, 22, 28) |
__gen_uint(self.stencil_buffer_enable.into(), 31, 31);
let v2_address = self.surface_base_address.combine(0);
out[2] = v2_address as u32;
out[3] = (v2_address >> 32) as u32;
out[4] = __gen_uint(self.surface_qpitch, 0, 14);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for _3dStateStencilBuffer<u64> {
fn from(input: &[u32; 5]) -> Self {
_3dStateStencilBuffer {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
surface_pitch: __gen_unuint(input[1], 0, 16),
mocs: __gen_unuint(input[1], 22, 28),
stencil_buffer_enable: __gen_unuint(input[1], 31, 31) != 0,
surface_base_address: (__gen_unuint(input[2], 0, 31) as u64) |
(__gen_unuint(input[3], 0, 31) as u64) << 32,
surface_qpitch: __gen_unuint(input[4], 0, 14),
}
}
}
impl Deserialize for _3dStateStencilBuffer<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct _3dStateStreamout {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub force_rendering: u32,
pub so_statistics_enable: bool,
pub reorder_mode: u32,
pub render_stream_select: u32,
pub rendering_disable: bool,
pub so_function_enable: bool,
pub stream_0_vertex_read_length: u32,
pub stream_0_vertex_read_offset: u32,
pub stream_1_vertex_read_length: u32,
pub stream_1_vertex_read_offset: u32,
pub stream_2_vertex_read_length: u32,
pub stream_2_vertex_read_offset: u32,
pub stream_3_vertex_read_length: u32,
pub stream_3_vertex_read_offset: u32,
pub buffer_0_surface_pitch: u32,
pub buffer_1_surface_pitch: u32,
pub buffer_2_surface_pitch: u32,
pub buffer_3_surface_pitch: u32,
}
impl _3dStateStreamout {
pub const DWORD_LENGTH: u32 = 5;
pub const FORCE_OFF: u32 = 2;
pub const FORCE_ON: u32 = 3;
pub const LEADING: u32 = 0;
pub const RESREVED: u32 = 1;
pub const TRAILING: u32 = 1;
}
impl Default for _3dStateStreamout {
fn default() -> Self {
_3dStateStreamout {
dword_length: 3,
_3d_command_sub_opcode: 30,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
force_rendering: Default::default(),
so_statistics_enable: Default::default(),
reorder_mode: Default::default(),
render_stream_select: Default::default(),
rendering_disable: Default::default(),
so_function_enable: Default::default(),
stream_0_vertex_read_length: Default::default(),
stream_0_vertex_read_offset: Default::default(),
stream_1_vertex_read_length: Default::default(),
stream_1_vertex_read_offset: Default::default(),
stream_2_vertex_read_length: Default::default(),
stream_2_vertex_read_offset: Default::default(),
stream_3_vertex_read_length: Default::default(),
stream_3_vertex_read_offset: Default::default(),
buffer_0_surface_pitch: Default::default(),
buffer_1_surface_pitch: Default::default(),
buffer_2_surface_pitch: Default::default(),
buffer_3_surface_pitch: Default::default(),
}
}
}
impl Serialize for _3dStateStreamout {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.force_rendering, 23, 24) |
__gen_uint(self.so_statistics_enable.into(), 25, 25) |
__gen_uint(self.reorder_mode, 26, 26) |
__gen_uint(self.render_stream_select, 27, 28) |
__gen_uint(self.rendering_disable.into(), 30, 30) |
__gen_uint(self.so_function_enable.into(), 31, 31);
out[2] = __gen_uint(self.stream_0_vertex_read_length, 0, 4) |
__gen_uint(self.stream_0_vertex_read_offset, 5, 5) |
__gen_uint(self.stream_1_vertex_read_length, 8, 12) |
__gen_uint(self.stream_1_vertex_read_offset, 13, 13) |
__gen_uint(self.stream_2_vertex_read_length, 16, 20) |
__gen_uint(self.stream_2_vertex_read_offset, 21, 21) |
__gen_uint(self.stream_3_vertex_read_length, 24, 28) |
__gen_uint(self.stream_3_vertex_read_offset, 29, 29);
out[3] = __gen_uint(self.buffer_0_surface_pitch, 0, 11) |
__gen_uint(self.buffer_1_surface_pitch, 16, 27);
out[4] = __gen_uint(self.buffer_2_surface_pitch, 0, 11) |
__gen_uint(self.buffer_3_surface_pitch, 16, 27);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for _3dStateStreamout {
fn from(input: &[u32; 5]) -> Self {
_3dStateStreamout {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
force_rendering: __gen_unuint(input[1], 23, 24),
so_statistics_enable: __gen_unuint(input[1], 25, 25) != 0,
reorder_mode: __gen_unuint(input[1], 26, 26),
render_stream_select: __gen_unuint(input[1], 27, 28),
rendering_disable: __gen_unuint(input[1], 30, 30) != 0,
so_function_enable: __gen_unuint(input[1], 31, 31) != 0,
stream_0_vertex_read_length: __gen_unuint(input[2], 0, 4),
stream_0_vertex_read_offset: __gen_unuint(input[2], 5, 5),
stream_1_vertex_read_length: __gen_unuint(input[2], 8, 12),
stream_1_vertex_read_offset: __gen_unuint(input[2], 13, 13),
stream_2_vertex_read_length: __gen_unuint(input[2], 16, 20),
stream_2_vertex_read_offset: __gen_unuint(input[2], 21, 21),
stream_3_vertex_read_length: __gen_unuint(input[2], 24, 28),
stream_3_vertex_read_offset: __gen_unuint(input[2], 29, 29),
buffer_0_surface_pitch: __gen_unuint(input[3], 0, 11),
buffer_1_surface_pitch: __gen_unuint(input[3], 16, 27),
buffer_2_surface_pitch: __gen_unuint(input[4], 0, 11),
buffer_3_surface_pitch: __gen_unuint(input[4], 16, 27),
}
}
}
impl Deserialize for _3dStateStreamout {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct _3dStateTe {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub te_enable: bool,
pub te_mode: u32,
pub te_domain: u32,
pub output_topology: u32,
pub partitioning: u32,
pub maximum_tessellation_factor_odd: f32,
pub maximum_tessellation_factor_not_odd: f32,
}
impl _3dStateTe {
pub const DWORD_LENGTH: u32 = 4;
pub const EVEN_FRACTIONAL: u32 = 2;
pub const HW_TESS: u32 = 0;
pub const INTEGER: u32 = 0;
pub const ISOLINE: u32 = 2;
pub const LINE: u32 = 1;
pub const ODD_FRACTIONAL: u32 = 1;
pub const POINT: u32 = 0;
pub const QUAD: u32 = 0;
pub const TRI: u32 = 1;
pub const TRI_CCW: u32 = 3;
pub const TRI_CW: u32 = 2;
}
impl Default for _3dStateTe {
fn default() -> Self {
_3dStateTe {
dword_length: 2,
_3d_command_sub_opcode: 28,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
te_enable: Default::default(),
te_mode: Default::default(),
te_domain: Default::default(),
output_topology: Default::default(),
partitioning: Default::default(),
maximum_tessellation_factor_odd: Default::default(),
maximum_tessellation_factor_not_odd: Default::default(),
}
}
}
impl Serialize for _3dStateTe {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.te_enable.into(), 0, 0) |
__gen_uint(self.te_mode, 1, 2) |
__gen_uint(self.te_domain, 4, 5) |
__gen_uint(self.output_topology, 8, 9) |
__gen_uint(self.partitioning, 12, 13);
out[2] = self.maximum_tessellation_factor_odd.to_bits();
out[3] = self.maximum_tessellation_factor_not_odd.to_bits();
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for _3dStateTe {
fn from(input: &[u32; 4]) -> Self {
_3dStateTe {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
te_enable: __gen_unuint(input[1], 0, 0) != 0,
te_mode: __gen_unuint(input[1], 1, 2),
te_domain: __gen_unuint(input[1], 4, 5),
output_topology: __gen_unuint(input[1], 8, 9),
partitioning: __gen_unuint(input[1], 12, 13),
maximum_tessellation_factor_odd: f32::from_bits(input[2]),
maximum_tessellation_factor_not_odd: f32::from_bits(input[3]),
}
}
}
impl Deserialize for _3dStateTe {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct _3dStateUrbClear {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub urb_address: u64,
pub urb_clear_length: u32,
}
impl _3dStateUrbClear {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateUrbClear {
fn default() -> Self {
_3dStateUrbClear {
dword_length: 0,
_3d_command_sub_opcode: 29,
_3d_command_opcode: 1,
command_subtype: 3,
command_type: 3,
urb_address: Default::default(),
urb_clear_length: Default::default(),
}
}
}
impl Serialize for _3dStateUrbClear {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.urb_address as u32, 0, 14) |
__gen_uint(self.urb_clear_length, 16, 29);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateUrbClear {
fn from(input: &[u32; 2]) -> Self {
_3dStateUrbClear {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
urb_address: (__gen_unuint(input[1], 0, 14) as u64),
urb_clear_length: __gen_unuint(input[1], 16, 29),
}
}
}
impl Deserialize for _3dStateUrbClear {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateUrbDs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub ds_number_of_urb_entries: u32,
pub ds_urb_entry_allocation_size: u32,
pub ds_urb_starting_address: u32,
}
impl _3dStateUrbDs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateUrbDs {
fn default() -> Self {
_3dStateUrbDs {
dword_length: 0,
_3d_command_sub_opcode: 50,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
ds_number_of_urb_entries: Default::default(),
ds_urb_entry_allocation_size: Default::default(),
ds_urb_starting_address: Default::default(),
}
}
}
impl Serialize for _3dStateUrbDs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.ds_number_of_urb_entries, 0, 15) |
__gen_uint(self.ds_urb_entry_allocation_size, 16, 24) |
__gen_uint(self.ds_urb_starting_address, 25, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateUrbDs {
fn from(input: &[u32; 2]) -> Self {
_3dStateUrbDs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
ds_number_of_urb_entries: __gen_unuint(input[1], 0, 15),
ds_urb_entry_allocation_size: __gen_unuint(input[1], 16, 24),
ds_urb_starting_address: __gen_unuint(input[1], 25, 31),
}
}
}
impl Deserialize for _3dStateUrbDs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateUrbGs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub gs_number_of_urb_entries: u32,
pub gs_urb_entry_allocation_size: u32,
pub gs_urb_starting_address: u32,
}
impl _3dStateUrbGs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateUrbGs {
fn default() -> Self {
_3dStateUrbGs {
dword_length: 0,
_3d_command_sub_opcode: 51,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
gs_number_of_urb_entries: Default::default(),
gs_urb_entry_allocation_size: Default::default(),
gs_urb_starting_address: Default::default(),
}
}
}
impl Serialize for _3dStateUrbGs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.gs_number_of_urb_entries, 0, 15) |
__gen_uint(self.gs_urb_entry_allocation_size, 16, 24) |
__gen_uint(self.gs_urb_starting_address, 25, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateUrbGs {
fn from(input: &[u32; 2]) -> Self {
_3dStateUrbGs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
gs_number_of_urb_entries: __gen_unuint(input[1], 0, 15),
gs_urb_entry_allocation_size: __gen_unuint(input[1], 16, 24),
gs_urb_starting_address: __gen_unuint(input[1], 25, 31),
}
}
}
impl Deserialize for _3dStateUrbGs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateUrbHs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub hs_number_of_urb_entries: u32,
pub hs_urb_entry_allocation_size: u32,
pub hs_urb_starting_address: u32,
}
impl _3dStateUrbHs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateUrbHs {
fn default() -> Self {
_3dStateUrbHs {
dword_length: 0,
_3d_command_sub_opcode: 49,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
hs_number_of_urb_entries: Default::default(),
hs_urb_entry_allocation_size: Default::default(),
hs_urb_starting_address: Default::default(),
}
}
}
impl Serialize for _3dStateUrbHs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.hs_number_of_urb_entries, 0, 15) |
__gen_uint(self.hs_urb_entry_allocation_size, 16, 24) |
__gen_uint(self.hs_urb_starting_address, 25, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateUrbHs {
fn from(input: &[u32; 2]) -> Self {
_3dStateUrbHs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
hs_number_of_urb_entries: __gen_unuint(input[1], 0, 15),
hs_urb_entry_allocation_size: __gen_unuint(input[1], 16, 24),
hs_urb_starting_address: __gen_unuint(input[1], 25, 31),
}
}
}
impl Deserialize for _3dStateUrbHs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateUrbVs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub vs_number_of_urb_entries: u32,
pub vs_urb_entry_allocation_size: u32,
pub vs_urb_starting_address: u32,
}
impl _3dStateUrbVs {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateUrbVs {
fn default() -> Self {
_3dStateUrbVs {
dword_length: 0,
_3d_command_sub_opcode: 48,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
vs_number_of_urb_entries: Default::default(),
vs_urb_entry_allocation_size: Default::default(),
vs_urb_starting_address: Default::default(),
}
}
}
impl Serialize for _3dStateUrbVs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.vs_number_of_urb_entries, 0, 15) |
__gen_uint(self.vs_urb_entry_allocation_size, 16, 24) |
__gen_uint(self.vs_urb_starting_address, 25, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateUrbVs {
fn from(input: &[u32; 2]) -> Self {
_3dStateUrbVs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
vs_number_of_urb_entries: __gen_unuint(input[1], 0, 15),
vs_urb_entry_allocation_size: __gen_unuint(input[1], 16, 24),
vs_urb_starting_address: __gen_unuint(input[1], 25, 31),
}
}
}
impl Deserialize for _3dStateUrbVs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVertexBuffers {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
}
impl _3dStateVertexBuffers {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for _3dStateVertexBuffers {
fn default() -> Self {
_3dStateVertexBuffers {
dword_length: 3,
_3d_command_sub_opcode: 8,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
}
}
}
impl Serialize for _3dStateVertexBuffers {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for _3dStateVertexBuffers {
fn from(input: &[u32; 1]) -> Self {
_3dStateVertexBuffers {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for _3dStateVertexBuffers {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVertexElements {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
}
impl _3dStateVertexElements {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for _3dStateVertexElements {
fn default() -> Self {
_3dStateVertexElements {
dword_length: 1,
_3d_command_sub_opcode: 9,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
}
}
}
impl Serialize for _3dStateVertexElements {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for _3dStateVertexElements {
fn from(input: &[u32; 1]) -> Self {
_3dStateVertexElements {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for _3dStateVertexElements {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVf {
pub dword_length: u32,
pub indexed_draw_cut_index_enable: bool,
pub component_packing_enable: bool,
pub sequential_draw_cut_index_enable: bool,
pub vertexid_offset_enable: bool,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub cut_index: u32,
}
impl _3dStateVf {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateVf {
fn default() -> Self {
_3dStateVf {
dword_length: 0,
indexed_draw_cut_index_enable: Default::default(),
component_packing_enable: Default::default(),
sequential_draw_cut_index_enable: Default::default(),
vertexid_offset_enable: Default::default(),
_3d_command_sub_opcode: 12,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
cut_index: Default::default(),
}
}
}
impl Serialize for _3dStateVf {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self.indexed_draw_cut_index_enable.into(), 8, 8) |
__gen_uint(self.component_packing_enable.into(), 9, 9) |
__gen_uint(self.sequential_draw_cut_index_enable.into(), 10, 10) |
__gen_uint(self.vertexid_offset_enable.into(), 11, 11) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.cut_index, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateVf {
fn from(input: &[u32; 2]) -> Self {
_3dStateVf {
dword_length: __gen_unuint(input[0], 0, 7),
indexed_draw_cut_index_enable: __gen_unuint(input[0], 8, 8) != 0,
component_packing_enable: __gen_unuint(input[0], 9, 9) != 0,
sequential_draw_cut_index_enable: __gen_unuint(input[0], 10, 10) != 0,
vertexid_offset_enable: __gen_unuint(input[0], 11, 11) != 0,
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
cut_index: __gen_unuint(input[1], 0, 31),
}
}
}
impl Deserialize for _3dStateVf {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVfComponentPacking {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub vertex_element_00_enables: u32,
pub vertex_element_01_enables: u32,
pub vertex_element_02_enables: u32,
pub vertex_element_03_enables: u32,
pub vertex_element_04_enables: u32,
pub vertex_element_05_enables: u32,
pub vertex_element_06_enables: u32,
pub vertex_element_07_enables: u32,
pub vertex_element_08_enables: u32,
pub vertex_element_09_enables: u32,
pub vertex_element_10_enables: u32,
pub vertex_element_11_enables: u32,
pub vertex_element_12_enables: u32,
pub vertex_element_13_enables: u32,
pub vertex_element_14_enables: u32,
pub vertex_element_15_enables: u32,
pub vertex_element_16_enables: u32,
pub vertex_element_17_enables: u32,
pub vertex_element_18_enables: u32,
pub vertex_element_19_enables: u32,
pub vertex_element_20_enables: u32,
pub vertex_element_21_enables: u32,
pub vertex_element_22_enables: u32,
pub vertex_element_23_enables: u32,
pub vertex_element_24_enables: u32,
pub vertex_element_25_enables: u32,
pub vertex_element_26_enables: u32,
pub vertex_element_27_enables: u32,
pub vertex_element_28_enables: u32,
pub vertex_element_29_enables: u32,
pub vertex_element_30_enables: u32,
pub vertex_element_31_enables: u32,
}
impl _3dStateVfComponentPacking {
pub const DWORD_LENGTH: u32 = 5;
}
impl Default for _3dStateVfComponentPacking {
fn default() -> Self {
_3dStateVfComponentPacking {
dword_length: 3,
_3d_command_sub_opcode: 85,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
vertex_element_00_enables: Default::default(),
vertex_element_01_enables: Default::default(),
vertex_element_02_enables: Default::default(),
vertex_element_03_enables: Default::default(),
vertex_element_04_enables: Default::default(),
vertex_element_05_enables: Default::default(),
vertex_element_06_enables: Default::default(),
vertex_element_07_enables: Default::default(),
vertex_element_08_enables: Default::default(),
vertex_element_09_enables: Default::default(),
vertex_element_10_enables: Default::default(),
vertex_element_11_enables: Default::default(),
vertex_element_12_enables: Default::default(),
vertex_element_13_enables: Default::default(),
vertex_element_14_enables: Default::default(),
vertex_element_15_enables: Default::default(),
vertex_element_16_enables: Default::default(),
vertex_element_17_enables: Default::default(),
vertex_element_18_enables: Default::default(),
vertex_element_19_enables: Default::default(),
vertex_element_20_enables: Default::default(),
vertex_element_21_enables: Default::default(),
vertex_element_22_enables: Default::default(),
vertex_element_23_enables: Default::default(),
vertex_element_24_enables: Default::default(),
vertex_element_25_enables: Default::default(),
vertex_element_26_enables: Default::default(),
vertex_element_27_enables: Default::default(),
vertex_element_28_enables: Default::default(),
vertex_element_29_enables: Default::default(),
vertex_element_30_enables: Default::default(),
vertex_element_31_enables: Default::default(),
}
}
}
impl Serialize for _3dStateVfComponentPacking {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.vertex_element_00_enables, 0, 3) |
__gen_uint(self.vertex_element_01_enables, 4, 7) |
__gen_uint(self.vertex_element_02_enables, 8, 11) |
__gen_uint(self.vertex_element_03_enables, 12, 15) |
__gen_uint(self.vertex_element_04_enables, 16, 19) |
__gen_uint(self.vertex_element_05_enables, 20, 23) |
__gen_uint(self.vertex_element_06_enables, 24, 27) |
__gen_uint(self.vertex_element_07_enables, 28, 31);
out[2] = __gen_uint(self.vertex_element_08_enables, 0, 3) |
__gen_uint(self.vertex_element_09_enables, 4, 7) |
__gen_uint(self.vertex_element_10_enables, 8, 11) |
__gen_uint(self.vertex_element_11_enables, 12, 15) |
__gen_uint(self.vertex_element_12_enables, 16, 19) |
__gen_uint(self.vertex_element_13_enables, 20, 23) |
__gen_uint(self.vertex_element_14_enables, 24, 27) |
__gen_uint(self.vertex_element_15_enables, 28, 31);
out[3] = __gen_uint(self.vertex_element_16_enables, 0, 3) |
__gen_uint(self.vertex_element_17_enables, 4, 7) |
__gen_uint(self.vertex_element_18_enables, 8, 11) |
__gen_uint(self.vertex_element_19_enables, 12, 15) |
__gen_uint(self.vertex_element_20_enables, 16, 19) |
__gen_uint(self.vertex_element_21_enables, 20, 23) |
__gen_uint(self.vertex_element_22_enables, 24, 27) |
__gen_uint(self.vertex_element_23_enables, 28, 31);
out[4] = __gen_uint(self.vertex_element_24_enables, 0, 3) |
__gen_uint(self.vertex_element_25_enables, 4, 7) |
__gen_uint(self.vertex_element_26_enables, 8, 11) |
__gen_uint(self.vertex_element_27_enables, 12, 15) |
__gen_uint(self.vertex_element_28_enables, 16, 19) |
__gen_uint(self.vertex_element_29_enables, 20, 23) |
__gen_uint(self.vertex_element_30_enables, 24, 27) |
__gen_uint(self.vertex_element_31_enables, 28, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for _3dStateVfComponentPacking {
fn from(input: &[u32; 5]) -> Self {
_3dStateVfComponentPacking {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
vertex_element_00_enables: __gen_unuint(input[1], 0, 3),
vertex_element_01_enables: __gen_unuint(input[1], 4, 7),
vertex_element_02_enables: __gen_unuint(input[1], 8, 11),
vertex_element_03_enables: __gen_unuint(input[1], 12, 15),
vertex_element_04_enables: __gen_unuint(input[1], 16, 19),
vertex_element_05_enables: __gen_unuint(input[1], 20, 23),
vertex_element_06_enables: __gen_unuint(input[1], 24, 27),
vertex_element_07_enables: __gen_unuint(input[1], 28, 31),
vertex_element_08_enables: __gen_unuint(input[2], 0, 3),
vertex_element_09_enables: __gen_unuint(input[2], 4, 7),
vertex_element_10_enables: __gen_unuint(input[2], 8, 11),
vertex_element_11_enables: __gen_unuint(input[2], 12, 15),
vertex_element_12_enables: __gen_unuint(input[2], 16, 19),
vertex_element_13_enables: __gen_unuint(input[2], 20, 23),
vertex_element_14_enables: __gen_unuint(input[2], 24, 27),
vertex_element_15_enables: __gen_unuint(input[2], 28, 31),
vertex_element_16_enables: __gen_unuint(input[3], 0, 3),
vertex_element_17_enables: __gen_unuint(input[3], 4, 7),
vertex_element_18_enables: __gen_unuint(input[3], 8, 11),
vertex_element_19_enables: __gen_unuint(input[3], 12, 15),
vertex_element_20_enables: __gen_unuint(input[3], 16, 19),
vertex_element_21_enables: __gen_unuint(input[3], 20, 23),
vertex_element_22_enables: __gen_unuint(input[3], 24, 27),
vertex_element_23_enables: __gen_unuint(input[3], 28, 31),
vertex_element_24_enables: __gen_unuint(input[4], 0, 3),
vertex_element_25_enables: __gen_unuint(input[4], 4, 7),
vertex_element_26_enables: __gen_unuint(input[4], 8, 11),
vertex_element_27_enables: __gen_unuint(input[4], 12, 15),
vertex_element_28_enables: __gen_unuint(input[4], 16, 19),
vertex_element_29_enables: __gen_unuint(input[4], 20, 23),
vertex_element_30_enables: __gen_unuint(input[4], 24, 27),
vertex_element_31_enables: __gen_unuint(input[4], 28, 31),
}
}
}
impl Deserialize for _3dStateVfComponentPacking {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVfInstancing {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub vertex_element_index: u32,
pub instancing_enable: bool,
pub instance_data_step_rate: u32,
}
impl _3dStateVfInstancing {
pub const DWORD_LENGTH: u32 = 3;
}
impl Default for _3dStateVfInstancing {
fn default() -> Self {
_3dStateVfInstancing {
dword_length: 1,
_3d_command_sub_opcode: 73,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
vertex_element_index: Default::default(),
instancing_enable: Default::default(),
instance_data_step_rate: Default::default(),
}
}
}
impl Serialize for _3dStateVfInstancing {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.vertex_element_index, 0, 5) |
__gen_uint(self.instancing_enable.into(), 8, 8);
out[2] = __gen_uint(self.instance_data_step_rate, 0, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateVfInstancing {
fn from(input: &[u32; 3]) -> Self {
_3dStateVfInstancing {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
vertex_element_index: __gen_unuint(input[1], 0, 5),
instancing_enable: __gen_unuint(input[1], 8, 8) != 0,
instance_data_step_rate: __gen_unuint(input[2], 0, 31),
}
}
}
impl Deserialize for _3dStateVfInstancing {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVfSgvs {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub vertexid_element_offset: u32,
pub vertexid_component_number: u32,
pub vertexid_enable: bool,
pub instanceid_element_offset: u32,
pub instanceid_component_number: u32,
pub instanceid_enable: bool,
}
impl _3dStateVfSgvs {
pub const DWORD_LENGTH: u32 = 2;
pub const COMP_0: u32 = 0;
pub const COMP_1: u32 = 1;
pub const COMP_2: u32 = 2;
pub const COMP_3: u32 = 3;
}
impl Default for _3dStateVfSgvs {
fn default() -> Self {
_3dStateVfSgvs {
dword_length: 0,
_3d_command_sub_opcode: 74,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
vertexid_element_offset: Default::default(),
vertexid_component_number: Default::default(),
vertexid_enable: Default::default(),
instanceid_element_offset: Default::default(),
instanceid_component_number: Default::default(),
instanceid_enable: Default::default(),
}
}
}
impl Serialize for _3dStateVfSgvs {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.vertexid_element_offset, 0, 5) |
__gen_uint(self.vertexid_component_number, 13, 14) |
__gen_uint(self.vertexid_enable.into(), 15, 15) |
__gen_uint(self.instanceid_element_offset, 16, 21) |
__gen_uint(self.instanceid_component_number, 29, 30) |
__gen_uint(self.instanceid_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateVfSgvs {
fn from(input: &[u32; 2]) -> Self {
_3dStateVfSgvs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
vertexid_element_offset: __gen_unuint(input[1], 0, 5),
vertexid_component_number: __gen_unuint(input[1], 13, 14),
vertexid_enable: __gen_unuint(input[1], 15, 15) != 0,
instanceid_element_offset: __gen_unuint(input[1], 16, 21),
instanceid_component_number: __gen_unuint(input[1], 29, 30),
instanceid_enable: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for _3dStateVfSgvs {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVfSgvs2 {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub xp0_element_offset: u32,
pub xp0_source_select: u32,
pub xp0_component_number: u32,
pub xp0_enable: u32,
pub xp1_element_offset: u32,
pub xp1_source_select: u32,
pub xp1_component_number: u32,
pub xp1_enable: u32,
pub xp2_element_offset: u32,
pub xp2_component_number: u32,
pub xp2_enable: u32,
}
impl _3dStateVfSgvs2 {
pub const DWORD_LENGTH: u32 = 3;
pub const COMP_0: u32 = 0;
pub const COMP_1: u32 = 1;
pub const COMP_2: u32 = 2;
pub const COMP_3: u32 = 3;
pub const STARTING_INSTANCE_LOCATION: u32 = 1;
pub const VERTEX_LOCATION: u32 = 1;
pub const XP0_PARAMETER: u32 = 0;
pub const XP1_PARAMETER: u32 = 0;
}
impl Default for _3dStateVfSgvs2 {
fn default() -> Self {
_3dStateVfSgvs2 {
dword_length: 1,
_3d_command_sub_opcode: 86,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
xp0_element_offset: Default::default(),
xp0_source_select: Default::default(),
xp0_component_number: Default::default(),
xp0_enable: Default::default(),
xp1_element_offset: Default::default(),
xp1_source_select: Default::default(),
xp1_component_number: Default::default(),
xp1_enable: Default::default(),
xp2_element_offset: Default::default(),
xp2_component_number: Default::default(),
xp2_enable: Default::default(),
}
}
}
impl Serialize for _3dStateVfSgvs2 {
type Out = [u32; 3];
fn pack_into(&self, out: &mut [u32; 3]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.xp0_element_offset, 0, 5) |
__gen_uint(self.xp0_source_select, 12, 12) |
__gen_uint(self.xp0_component_number, 13, 14) |
__gen_uint(self.xp0_enable, 15, 15) |
__gen_uint(self.xp1_element_offset, 16, 21) |
__gen_uint(self.xp1_source_select, 28, 28) |
__gen_uint(self.xp1_component_number, 29, 30) |
__gen_uint(self.xp1_enable, 31, 31);
out[2] = __gen_uint(self.xp2_element_offset, 0, 5) |
__gen_uint(self.xp2_component_number, 13, 14) |
__gen_uint(self.xp2_enable, 15, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 3];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 3] as *const [u8; 12]) })
}
}
impl From<&[u32; 3]> for _3dStateVfSgvs2 {
fn from(input: &[u32; 3]) -> Self {
_3dStateVfSgvs2 {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
xp0_element_offset: __gen_unuint(input[1], 0, 5),
xp0_source_select: __gen_unuint(input[1], 12, 12),
xp0_component_number: __gen_unuint(input[1], 13, 14),
xp0_enable: __gen_unuint(input[1], 15, 15),
xp1_element_offset: __gen_unuint(input[1], 16, 21),
xp1_source_select: __gen_unuint(input[1], 28, 28),
xp1_component_number: __gen_unuint(input[1], 29, 30),
xp1_enable: __gen_unuint(input[1], 31, 31),
xp2_element_offset: __gen_unuint(input[2], 0, 5),
xp2_component_number: __gen_unuint(input[2], 13, 14),
xp2_enable: __gen_unuint(input[2], 15, 15),
}
}
}
impl Deserialize for _3dStateVfSgvs2 {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 3];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 3] as *mut [u8; 12]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVfStatistics {
pub statistics_enable: bool,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
}
impl _3dStateVfStatistics {
pub const DWORD_LENGTH: u32 = 1;
}
impl Default for _3dStateVfStatistics {
fn default() -> Self {
_3dStateVfStatistics {
statistics_enable: Default::default(),
_3d_command_sub_opcode: 11,
_3d_command_opcode: 0,
command_subtype: 1,
command_type: 3,
}
}
}
impl Serialize for _3dStateVfStatistics {
type Out = [u32; 1];
fn pack_into(&self, out: &mut [u32; 1]) {
out[0] = __gen_uint(self.statistics_enable.into(), 0, 0) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 1];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 1] as *const [u8; 4]) })
}
}
impl From<&[u32; 1]> for _3dStateVfStatistics {
fn from(input: &[u32; 1]) -> Self {
_3dStateVfStatistics {
statistics_enable: __gen_unuint(input[0], 0, 0) != 0,
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
}
}
}
impl Deserialize for _3dStateVfStatistics {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 1];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 1] as *mut [u8; 4]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVfTopology {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub primitive_topology_type: _3dPrimTopoType,
}
impl _3dStateVfTopology {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateVfTopology {
fn default() -> Self {
_3dStateVfTopology {
dword_length: 0,
_3d_command_sub_opcode: 75,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
primitive_topology_type: Default::default(),
}
}
}
impl Serialize for _3dStateVfTopology {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.primitive_topology_type.into(), 0, 5);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateVfTopology {
fn from(input: &[u32; 2]) -> Self {
_3dStateVfTopology {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
primitive_topology_type: (__gen_unuint(input[1], 0, 5)).into(),
}
}
}
impl Deserialize for _3dStateVfTopology {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateViewportStatePointersCc {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub cc_viewport_pointer: u64,
}
impl _3dStateViewportStatePointersCc {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateViewportStatePointersCc {
fn default() -> Self {
_3dStateViewportStatePointersCc {
dword_length: 0,
_3d_command_sub_opcode: 35,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
cc_viewport_pointer: Default::default(),
}
}
}
impl Serialize for _3dStateViewportStatePointersCc {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.cc_viewport_pointer as u32, 5, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateViewportStatePointersCc {
fn from(input: &[u32; 2]) -> Self {
_3dStateViewportStatePointersCc {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
cc_viewport_pointer: (__gen_unuint(input[1], 5, 31) as u64) << 5,
}
}
}
impl Deserialize for _3dStateViewportStatePointersCc {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateViewportStatePointersSfClip {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub sf_clip_viewport_pointer: u64,
}
impl _3dStateViewportStatePointersSfClip {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateViewportStatePointersSfClip {
fn default() -> Self {
_3dStateViewportStatePointersSfClip {
dword_length: 0,
_3d_command_sub_opcode: 33,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
sf_clip_viewport_pointer: Default::default(),
}
}
}
impl Serialize for _3dStateViewportStatePointersSfClip {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.sf_clip_viewport_pointer as u32, 6, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateViewportStatePointersSfClip {
fn from(input: &[u32; 2]) -> Self {
_3dStateViewportStatePointersSfClip {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
sf_clip_viewport_pointer: (__gen_unuint(input[1], 6, 31) as u64) << 6,
}
}
}
impl Deserialize for _3dStateViewportStatePointersSfClip {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateVs<A: Addr + Default> {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub kernel_start_pointer: u64,
pub software_exception_enable: bool,
pub accesses_uav: bool,
pub illegal_opcode_exception_enable: bool,
pub floating_point_mode: u32,
pub thread_dispatch_priority: u32,
pub binding_table_entry_count: u32,
pub sampler_count: u32,
pub vector_mask_enable: bool,
pub single_vertex_dispatch: bool,
pub per_thread_scratch_space: u32,
pub scratch_space_base_pointer: A,
pub vertex_urb_entry_read_offset: u32,
pub vertex_urb_entry_read_length: u32,
pub dispatch_grf_start_register_for_urb_data: u32,
pub enable: bool,
pub vertex_cache_disable: bool,
pub simd8_dispatch_enable: bool,
pub simd8_single_instance_dispatch_enable: bool,
pub statistics_enable: bool,
pub maximum_number_of_threads: u32,
pub user_clip_distance_cull_test_enable_bitmask: u32,
pub user_clip_distance_clip_test_enable_bitmask: u32,
pub vertex_urb_entry_output_length: u32,
pub vertex_urb_entry_output_read_offset: u32,
}
impl<A: Addr + Default> _3dStateVs<A> {
pub const DWORD_LENGTH: u32 = 9;
pub const ALTERNATE: u32 = 1;
pub const HIGH: u32 = 1;
pub const IEEE_754: u32 = 0;
pub const NO_SAMPLERS: u32 = 0;
pub const _13_16_SAMPLERS: u32 = 4;
pub const _1_4_SAMPLERS: u32 = 1;
pub const _5_8_SAMPLERS: u32 = 2;
pub const _9_12_SAMPLERS: u32 = 3;
}
impl<A: Addr + Default> Default for _3dStateVs<A> {
fn default() -> Self {
_3dStateVs {
dword_length: 7,
_3d_command_sub_opcode: 16,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
kernel_start_pointer: Default::default(),
software_exception_enable: Default::default(),
accesses_uav: Default::default(),
illegal_opcode_exception_enable: Default::default(),
floating_point_mode: Default::default(),
thread_dispatch_priority: Default::default(),
binding_table_entry_count: Default::default(),
sampler_count: Default::default(),
vector_mask_enable: Default::default(),
single_vertex_dispatch: Default::default(),
per_thread_scratch_space: Default::default(),
scratch_space_base_pointer: Default::default(),
vertex_urb_entry_read_offset: Default::default(),
vertex_urb_entry_read_length: Default::default(),
dispatch_grf_start_register_for_urb_data: Default::default(),
enable: Default::default(),
vertex_cache_disable: Default::default(),
simd8_dispatch_enable: Default::default(),
simd8_single_instance_dispatch_enable: Default::default(),
statistics_enable: Default::default(),
maximum_number_of_threads: Default::default(),
user_clip_distance_cull_test_enable_bitmask: Default::default(),
user_clip_distance_clip_test_enable_bitmask: Default::default(),
vertex_urb_entry_output_length: Default::default(),
vertex_urb_entry_output_read_offset: Default::default(),
}
}
}
impl<A: Addr + Default> Serialize for _3dStateVs<A> {
type Out = [u32; 9];
fn pack_into(&self, out: &mut [u32; 9]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_offset(self.kernel_start_pointer as u32, 6, 31);
out[2] = __gen_offset((self.kernel_start_pointer >> 32) as u32, 0, 31);
out[3] = __gen_uint(self.software_exception_enable.into(), 7, 7) |
__gen_uint(self.accesses_uav.into(), 12, 12) |
__gen_uint(self.illegal_opcode_exception_enable.into(), 13, 13) |
__gen_uint(self.floating_point_mode, 16, 16) |
__gen_uint(self.thread_dispatch_priority, 17, 17) |
__gen_uint(self.binding_table_entry_count, 18, 25) |
__gen_uint(self.sampler_count, 27, 29) |
__gen_uint(self.vector_mask_enable.into(), 30, 30) |
__gen_uint(self.single_vertex_dispatch.into(), 31, 31);
let v4 = __gen_uint(self.per_thread_scratch_space, 0, 3);
let v4_address = self.scratch_space_base_pointer.combine(v4);
out[4] = v4_address as u32;
out[5] = (v4_address >> 32) as u32;
out[6] = __gen_uint(self.vertex_urb_entry_read_offset, 4, 9) |
__gen_uint(self.vertex_urb_entry_read_length, 11, 16) |
__gen_uint(self.dispatch_grf_start_register_for_urb_data, 20, 24);
out[7] = __gen_uint(self.enable.into(), 0, 0) |
__gen_uint(self.vertex_cache_disable.into(), 1, 1) |
__gen_uint(self.simd8_dispatch_enable.into(), 2, 2) |
__gen_uint(self.simd8_single_instance_dispatch_enable.into(), 9, 9) |
__gen_uint(self.statistics_enable.into(), 10, 10) |
__gen_uint(self.maximum_number_of_threads, 22, 31);
out[8] = __gen_uint(self.user_clip_distance_cull_test_enable_bitmask, 0, 7) |
__gen_uint(self.user_clip_distance_clip_test_enable_bitmask, 8, 15) |
__gen_uint(self.vertex_urb_entry_output_length, 16, 20) |
__gen_uint(self.vertex_urb_entry_output_read_offset, 21, 26);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 9];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 9] as *const [u8; 36]) })
}
}
impl From<&[u32; 9]> for _3dStateVs<u64> {
fn from(input: &[u32; 9]) -> Self {
_3dStateVs {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
kernel_start_pointer: (__gen_unuint(input[1], 6, 31) as u64) << 6 |
(__gen_unuint(input[2], 0, 31) as u64) << 32,
software_exception_enable: __gen_unuint(input[3], 7, 7) != 0,
accesses_uav: __gen_unuint(input[3], 12, 12) != 0,
illegal_opcode_exception_enable: __gen_unuint(input[3], 13, 13) != 0,
floating_point_mode: __gen_unuint(input[3], 16, 16),
thread_dispatch_priority: __gen_unuint(input[3], 17, 17),
binding_table_entry_count: __gen_unuint(input[3], 18, 25),
sampler_count: __gen_unuint(input[3], 27, 29),
vector_mask_enable: __gen_unuint(input[3], 30, 30) != 0,
single_vertex_dispatch: __gen_unuint(input[3], 31, 31) != 0,
per_thread_scratch_space: __gen_unuint(input[4], 0, 3),
scratch_space_base_pointer: (__gen_unuint(input[4], 10, 31) as u64) << 10 |
(__gen_unuint(input[5], 0, 31) as u64) << 32,
vertex_urb_entry_read_offset: __gen_unuint(input[6], 4, 9),
vertex_urb_entry_read_length: __gen_unuint(input[6], 11, 16),
dispatch_grf_start_register_for_urb_data: __gen_unuint(input[6], 20, 24),
enable: __gen_unuint(input[7], 0, 0) != 0,
vertex_cache_disable: __gen_unuint(input[7], 1, 1) != 0,
simd8_dispatch_enable: __gen_unuint(input[7], 2, 2) != 0,
simd8_single_instance_dispatch_enable: __gen_unuint(input[7], 9, 9) != 0,
statistics_enable: __gen_unuint(input[7], 10, 10) != 0,
maximum_number_of_threads: __gen_unuint(input[7], 22, 31),
user_clip_distance_cull_test_enable_bitmask: __gen_unuint(input[8], 0, 7),
user_clip_distance_clip_test_enable_bitmask: __gen_unuint(input[8], 8, 15),
vertex_urb_entry_output_length: __gen_unuint(input[8], 16, 20),
vertex_urb_entry_output_read_offset: __gen_unuint(input[8], 21, 26),
}
}
}
impl Deserialize for _3dStateVs<u64> {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 9];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 9] as *mut [u8; 36]) })?;
Ok((&input).into())
}
}
pub struct _3dStateWm {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub force_kill_pixel_enable: u32,
pub point_rasterization_rule: u32,
pub line_stipple_enable: bool,
pub polygon_stipple_enable: bool,
pub line_antialiasing_region_width: u32,
pub line_end_cap_antialiasing_region_width: u32,
pub barycentric_interpolation_mode: u32,
pub position_zw_interpolation_mode: u32,
pub force_thread_dispatch_enable: u32,
pub early_depth_stencil_control: u32,
pub legacy_diamond_line_rasterization: bool,
pub legacy_hierarchical_depth_buffer_resolve_enable: bool,
pub legacy_depth_buffer_resolve_enable: bool,
pub legacy_depth_buffer_clear_enable: bool,
pub statistics_enable: bool,
}
impl _3dStateWm {
pub const DWORD_LENGTH: u32 = 2;
pub const BIM_LINEAR_CENTROID: u32 = 16;
pub const BIM_LINEAR_PIXEL: u32 = 8;
pub const BIM_LINEAR_SAMPLE: u32 = 32;
pub const BIM_PERSPECTIVE_CENTROID: u32 = 2;
pub const BIM_PERSPECTIVE_PIXEL: u32 = 1;
pub const BIM_PERSPECTIVE_SAMPLE: u32 = 4;
pub const EDSC_NORMAL: u32 = 0;
pub const EDSC_PREPS: u32 = 2;
pub const EDSC_PSEXEC: u32 = 1;
pub const FORCEOFF: u32 = 1;
pub const FORCEON: u32 = 2;
pub const INTERP_CENTROID: u32 = 2;
pub const INTERP_PIXEL: u32 = 0;
pub const INTERP_SAMPLE: u32 = 3;
pub const RASTRULE_UPPER_LEFT: u32 = 0;
pub const RASTRULE_UPPER_RIGHT: u32 = 1;
pub const _0_5_PIXELS: u32 = 0;
pub const _1_0_PIXELS: u32 = 1;
pub const _2_0_PIXELS: u32 = 2;
pub const _4_0_PIXELS: u32 = 3;
}
impl Default for _3dStateWm {
fn default() -> Self {
_3dStateWm {
dword_length: 0,
_3d_command_sub_opcode: 20,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
force_kill_pixel_enable: Default::default(),
point_rasterization_rule: Default::default(),
line_stipple_enable: Default::default(),
polygon_stipple_enable: Default::default(),
line_antialiasing_region_width: Default::default(),
line_end_cap_antialiasing_region_width: Default::default(),
barycentric_interpolation_mode: Default::default(),
position_zw_interpolation_mode: Default::default(),
force_thread_dispatch_enable: Default::default(),
early_depth_stencil_control: Default::default(),
legacy_diamond_line_rasterization: Default::default(),
legacy_hierarchical_depth_buffer_resolve_enable: Default::default(),
legacy_depth_buffer_resolve_enable: Default::default(),
legacy_depth_buffer_clear_enable: Default::default(),
statistics_enable: Default::default(),
}
}
}
impl Serialize for _3dStateWm {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.force_kill_pixel_enable, 0, 1) |
__gen_uint(self.point_rasterization_rule, 2, 2) |
__gen_uint(self.line_stipple_enable.into(), 3, 3) |
__gen_uint(self.polygon_stipple_enable.into(), 4, 4) |
__gen_uint(self.line_antialiasing_region_width, 6, 7) |
__gen_uint(self.line_end_cap_antialiasing_region_width, 8, 9) |
__gen_uint(self.barycentric_interpolation_mode, 11, 16) |
__gen_uint(self.position_zw_interpolation_mode, 17, 18) |
__gen_uint(self.force_thread_dispatch_enable, 19, 20) |
__gen_uint(self.early_depth_stencil_control, 21, 22) |
__gen_uint(self.legacy_diamond_line_rasterization.into(), 26, 26) |
__gen_uint(self.legacy_hierarchical_depth_buffer_resolve_enable.into(), 27, 27) |
__gen_uint(self.legacy_depth_buffer_resolve_enable.into(), 28, 28) |
__gen_uint(self.legacy_depth_buffer_clear_enable.into(), 30, 30) |
__gen_uint(self.statistics_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateWm {
fn from(input: &[u32; 2]) -> Self {
_3dStateWm {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
force_kill_pixel_enable: __gen_unuint(input[1], 0, 1),
point_rasterization_rule: __gen_unuint(input[1], 2, 2),
line_stipple_enable: __gen_unuint(input[1], 3, 3) != 0,
polygon_stipple_enable: __gen_unuint(input[1], 4, 4) != 0,
line_antialiasing_region_width: __gen_unuint(input[1], 6, 7),
line_end_cap_antialiasing_region_width: __gen_unuint(input[1], 8, 9),
barycentric_interpolation_mode: __gen_unuint(input[1], 11, 16),
position_zw_interpolation_mode: __gen_unuint(input[1], 17, 18),
force_thread_dispatch_enable: __gen_unuint(input[1], 19, 20),
early_depth_stencil_control: __gen_unuint(input[1], 21, 22),
legacy_diamond_line_rasterization: __gen_unuint(input[1], 26, 26) != 0,
legacy_hierarchical_depth_buffer_resolve_enable: __gen_unuint(input[1], 27, 27) != 0,
legacy_depth_buffer_resolve_enable: __gen_unuint(input[1], 28, 28) != 0,
legacy_depth_buffer_clear_enable: __gen_unuint(input[1], 30, 30) != 0,
statistics_enable: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for _3dStateWm {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateWmChromakey {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub chromakey_kill_enable: bool,
}
impl _3dStateWmChromakey {
pub const DWORD_LENGTH: u32 = 2;
}
impl Default for _3dStateWmChromakey {
fn default() -> Self {
_3dStateWmChromakey {
dword_length: 0,
_3d_command_sub_opcode: 76,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
chromakey_kill_enable: Default::default(),
}
}
}
impl Serialize for _3dStateWmChromakey {
type Out = [u32; 2];
fn pack_into(&self, out: &mut [u32; 2]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.chromakey_kill_enable.into(), 31, 31);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 2];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 2] as *const [u8; 8]) })
}
}
impl From<&[u32; 2]> for _3dStateWmChromakey {
fn from(input: &[u32; 2]) -> Self {
_3dStateWmChromakey {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
chromakey_kill_enable: __gen_unuint(input[1], 31, 31) != 0,
}
}
}
impl Deserialize for _3dStateWmChromakey {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 2];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 2] as *mut [u8; 8]) })?;
Ok((&input).into())
}
}
pub struct _3dStateWmDepthStencil {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub depth_buffer_write_enable: bool,
pub depth_test_enable: bool,
pub stencil_buffer_write_enable: bool,
pub stencil_test_enable: bool,
pub double_sided_stencil_enable: bool,
pub depth_test_function: _3dCompareFunction,
pub stencil_test_function: _3dCompareFunction,
pub backface_stencil_pass_depth_pass_op: _3dStencilOperation,
pub backface_stencil_pass_depth_fail_op: _3dStencilOperation,
pub backface_stencil_fail_op: _3dStencilOperation,
pub backface_stencil_test_function: _3dCompareFunction,
pub stencil_pass_depth_pass_op: _3dStencilOperation,
pub stencil_pass_depth_fail_op: _3dStencilOperation,
pub stencil_fail_op: _3dStencilOperation,
pub backface_stencil_write_mask: u32,
pub backface_stencil_test_mask: u32,
pub stencil_write_mask: u32,
pub stencil_test_mask: u32,
pub backface_stencil_reference_value: u32,
pub stencil_reference_value: u32,
}
impl _3dStateWmDepthStencil {
pub const DWORD_LENGTH: u32 = 4;
}
impl Default for _3dStateWmDepthStencil {
fn default() -> Self {
_3dStateWmDepthStencil {
dword_length: 2,
_3d_command_sub_opcode: 78,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
depth_buffer_write_enable: Default::default(),
depth_test_enable: Default::default(),
stencil_buffer_write_enable: Default::default(),
stencil_test_enable: Default::default(),
double_sided_stencil_enable: Default::default(),
depth_test_function: Default::default(),
stencil_test_function: Default::default(),
backface_stencil_pass_depth_pass_op: Default::default(),
backface_stencil_pass_depth_fail_op: Default::default(),
backface_stencil_fail_op: Default::default(),
backface_stencil_test_function: Default::default(),
stencil_pass_depth_pass_op: Default::default(),
stencil_pass_depth_fail_op: Default::default(),
stencil_fail_op: Default::default(),
backface_stencil_write_mask: Default::default(),
backface_stencil_test_mask: Default::default(),
stencil_write_mask: Default::default(),
stencil_test_mask: Default::default(),
backface_stencil_reference_value: Default::default(),
stencil_reference_value: Default::default(),
}
}
}
impl Serialize for _3dStateWmDepthStencil {
type Out = [u32; 4];
fn pack_into(&self, out: &mut [u32; 4]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.depth_buffer_write_enable.into(), 0, 0) |
__gen_uint(self.depth_test_enable.into(), 1, 1) |
__gen_uint(self.stencil_buffer_write_enable.into(), 2, 2) |
__gen_uint(self.stencil_test_enable.into(), 3, 3) |
__gen_uint(self.double_sided_stencil_enable.into(), 4, 4) |
__gen_uint(self.depth_test_function.into(), 5, 7) |
__gen_uint(self.stencil_test_function.into(), 8, 10) |
__gen_uint(self.backface_stencil_pass_depth_pass_op.into(), 11, 13) |
__gen_uint(self.backface_stencil_pass_depth_fail_op.into(), 14, 16) |
__gen_uint(self.backface_stencil_fail_op.into(), 17, 19) |
__gen_uint(self.backface_stencil_test_function.into(), 20, 22) |
__gen_uint(self.stencil_pass_depth_pass_op.into(), 23, 25) |
__gen_uint(self.stencil_pass_depth_fail_op.into(), 26, 28) |
__gen_uint(self.stencil_fail_op.into(), 29, 31);
out[2] = __gen_uint(self.backface_stencil_write_mask, 0, 7) |
__gen_uint(self.backface_stencil_test_mask, 8, 15) |
__gen_uint(self.stencil_write_mask, 16, 23) |
__gen_uint(self.stencil_test_mask, 24, 31);
out[3] = __gen_uint(self.backface_stencil_reference_value, 0, 7) |
__gen_uint(self.stencil_reference_value, 8, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 4];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 4] as *const [u8; 16]) })
}
}
impl From<&[u32; 4]> for _3dStateWmDepthStencil {
fn from(input: &[u32; 4]) -> Self {
_3dStateWmDepthStencil {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
depth_buffer_write_enable: __gen_unuint(input[1], 0, 0) != 0,
depth_test_enable: __gen_unuint(input[1], 1, 1) != 0,
stencil_buffer_write_enable: __gen_unuint(input[1], 2, 2) != 0,
stencil_test_enable: __gen_unuint(input[1], 3, 3) != 0,
double_sided_stencil_enable: __gen_unuint(input[1], 4, 4) != 0,
depth_test_function: (__gen_unuint(input[1], 5, 7)).into(),
stencil_test_function: (__gen_unuint(input[1], 8, 10)).into(),
backface_stencil_pass_depth_pass_op: (__gen_unuint(input[1], 11, 13)).into(),
backface_stencil_pass_depth_fail_op: (__gen_unuint(input[1], 14, 16)).into(),
backface_stencil_fail_op: (__gen_unuint(input[1], 17, 19)).into(),
backface_stencil_test_function: (__gen_unuint(input[1], 20, 22)).into(),
stencil_pass_depth_pass_op: (__gen_unuint(input[1], 23, 25)).into(),
stencil_pass_depth_fail_op: (__gen_unuint(input[1], 26, 28)).into(),
stencil_fail_op: (__gen_unuint(input[1], 29, 31)).into(),
backface_stencil_write_mask: __gen_unuint(input[2], 0, 7),
backface_stencil_test_mask: __gen_unuint(input[2], 8, 15),
stencil_write_mask: __gen_unuint(input[2], 16, 23),
stencil_test_mask: __gen_unuint(input[2], 24, 31),
backface_stencil_reference_value: __gen_unuint(input[3], 0, 7),
stencil_reference_value: __gen_unuint(input[3], 8, 15),
}
}
}
impl Deserialize for _3dStateWmDepthStencil {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 4];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 4] as *mut [u8; 16]) })?;
Ok((&input).into())
}
}
pub struct _3dStateWmHzOp {
pub dword_length: u32,
pub _3d_command_sub_opcode: u32,
pub _3d_command_opcode: u32,
pub command_subtype: u32,
pub command_type: u32,
pub number_of_multisamples: u32,
pub stencil_clear_value: u32,
pub full_surface_depth_and_stencil_clear: bool,
pub pixel_position_offset_enable: bool,
pub hierarchical_depth_buffer_resolve_enable: bool,
pub depth_buffer_resolve_enable: bool,
pub scissor_rectangle_enable: bool,
pub depth_buffer_clear_enable: bool,
pub stencil_buffer_clear_enable: bool,
pub clear_rectangle_x_min: u32,
pub clear_rectangle_y_min: u32,
pub clear_rectangle_x_max: u32,
pub clear_rectangle_y_max: u32,
pub sample_mask: u32,
}
impl _3dStateWmHzOp {
pub const DWORD_LENGTH: u32 = 5;
}
impl Default for _3dStateWmHzOp {
fn default() -> Self {
_3dStateWmHzOp {
dword_length: 3,
_3d_command_sub_opcode: 82,
_3d_command_opcode: 0,
command_subtype: 3,
command_type: 3,
number_of_multisamples: Default::default(),
stencil_clear_value: Default::default(),
full_surface_depth_and_stencil_clear: Default::default(),
pixel_position_offset_enable: Default::default(),
hierarchical_depth_buffer_resolve_enable: Default::default(),
depth_buffer_resolve_enable: Default::default(),
scissor_rectangle_enable: Default::default(),
depth_buffer_clear_enable: Default::default(),
stencil_buffer_clear_enable: Default::default(),
clear_rectangle_x_min: Default::default(),
clear_rectangle_y_min: Default::default(),
clear_rectangle_x_max: Default::default(),
clear_rectangle_y_max: Default::default(),
sample_mask: Default::default(),
}
}
}
impl Serialize for _3dStateWmHzOp {
type Out = [u32; 5];
fn pack_into(&self, out: &mut [u32; 5]) {
out[0] = __gen_uint(self.dword_length, 0, 7) |
__gen_uint(self._3d_command_sub_opcode, 16, 23) |
__gen_uint(self._3d_command_opcode, 24, 26) |
__gen_uint(self.command_subtype, 27, 28) |
__gen_uint(self.command_type, 29, 31);
out[1] = __gen_uint(self.number_of_multisamples, 13, 15) |
__gen_uint(self.stencil_clear_value, 16, 23) |
__gen_uint(self.full_surface_depth_and_stencil_clear.into(), 25, 25) |
__gen_uint(self.pixel_position_offset_enable.into(), 26, 26) |
__gen_uint(self.hierarchical_depth_buffer_resolve_enable.into(), 27, 27) |
__gen_uint(self.depth_buffer_resolve_enable.into(), 28, 28) |
__gen_uint(self.scissor_rectangle_enable.into(), 29, 29) |
__gen_uint(self.depth_buffer_clear_enable.into(), 30, 30) |
__gen_uint(self.stencil_buffer_clear_enable.into(), 31, 31);
out[2] = __gen_uint(self.clear_rectangle_x_min, 0, 15) |
__gen_uint(self.clear_rectangle_y_min, 16, 31);
out[3] = __gen_uint(self.clear_rectangle_x_max, 0, 15) |
__gen_uint(self.clear_rectangle_y_max, 16, 31);
out[4] = __gen_uint(self.sample_mask, 0, 15);
}
fn write_to<W: std::io::Write>(&self, write: &mut W) -> std::io::Result<()> {
let mut out = [0_u32; 5];
self.pack_into(&mut out);
write.write_all(unsafe { &*(&out as *const [u32; 5] as *const [u8; 20]) })
}
}
impl From<&[u32; 5]> for _3dStateWmHzOp {
fn from(input: &[u32; 5]) -> Self {
_3dStateWmHzOp {
dword_length: __gen_unuint(input[0], 0, 7),
_3d_command_sub_opcode: __gen_unuint(input[0], 16, 23),
_3d_command_opcode: __gen_unuint(input[0], 24, 26),
command_subtype: __gen_unuint(input[0], 27, 28),
command_type: __gen_unuint(input[0], 29, 31),
number_of_multisamples: __gen_unuint(input[1], 13, 15),
stencil_clear_value: __gen_unuint(input[1], 16, 23),
full_surface_depth_and_stencil_clear: __gen_unuint(input[1], 25, 25) != 0,
pixel_position_offset_enable: __gen_unuint(input[1], 26, 26) != 0,
hierarchical_depth_buffer_resolve_enable: __gen_unuint(input[1], 27, 27) != 0,
depth_buffer_resolve_enable: __gen_unuint(input[1], 28, 28) != 0,
scissor_rectangle_enable: __gen_unuint(input[1], 29, 29) != 0,
depth_buffer_clear_enable: __gen_unuint(input[1], 30, 30) != 0,
stencil_buffer_clear_enable: __gen_unuint(input[1], 31, 31) != 0,
clear_rectangle_x_min: __gen_unuint(input[2], 0, 15),
clear_rectangle_y_min: __gen_unuint(input[2], 16, 31),
clear_rectangle_x_max: __gen_unuint(input[3], 0, 15),
clear_rectangle_y_max: __gen_unuint(input[3], 16, 31),
sample_mask: __gen_unuint(input[4], 0, 15),
}
}
}
impl Deserialize for _3dStateWmHzOp {
fn read_from<R: std::io::Read>(read: &mut R) -> std::io::Result<Self> {
let mut input = [0_u32; 5];
read.read_exact(unsafe { &mut *(&mut input as *mut [u32; 5] as *mut [u8; 20]) })?;
Ok((&input).into())
}
}
}