typedef struct{vc1_eBlkType eBlkType; /** Block type */FLAG Coded; /** Non zero AC coefficients for Intra,non zero AC/DC for Inter */union{vc1_sBlkIntra sIntra; /** Intra block state information */vc1_sBlkInter sInter; /** Inter block state information */} u; /** Intra/Inter union */} vc1_sBlk;
typedef struct{vc1_NumZeroCoef NZC; /** NUMZERO and NUMCOEF (excludes DC) */HWD16 DC; /** Quantized DC for prediction */HWD16 ACTop[7]; /** Quantized AC top row for prediction */HWD16 ACLeft[7]; /** Quantized AC left column for prediction */HWD16 SmoothRows[16]; /** Bottom two rows kept for overlap smoothing */} vc1_sBlkIntra;
[StructLayout(LayoutKind.Sequential)]public unsafe struct vc1_sBlkIntra{ushort NZC; /** NUMZERO and NUMCOEF (excludes DC) */short DC; /** Quantized DC for prediction */[MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] public short[] ACTop; /** Quantized AC top row for prediction */[MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] public short[] ACLeft; /** Quantized AC left column for prediction */[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public short[] moothRows; /** Bottom two rows kept for overlap smoothing */};
[StructLayout(LayoutKind.Explicit, CharSet = CharSet.Ansi)]public unsafe struct vc1_sBlk{[FieldOffset(0), MarshalAs(UnmanagedType.I4)]public vc1_eBlkType eBlkType; /** Block type */[FieldOffset(4), MarshalAs(UnmanagedType.AsAny)]public byte Coded; /** Non zero AC coefficients for Intra, non zero AC/DC for Inter */[FieldOffset(5), MarshalAs(UnmanagedType.Struct, SizeConst = 64)] public vc1_sBlkIntra sIntra; /** Intra block state information */[FieldOffset(5), MarshalAs(UnmanagedType.Struct, SizeConst = 64)] public vc1_sBlkIntra sInter; /** Inter block state information */} ;