UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
M4Global.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "vdecmpeg4_Types.h"
5
6namespace vdecmpeg4
7{
8
9// --------------------------------------------------------------------------------
10
23
39
40#ifndef M4MAX
41#define M4MAX(A,B) ((A)>(B)?(A):(B))
42#endif
43
44#ifndef M4MIN
45#define M4MIN(A,B) ((A)<(B)?(A):(B))
46#endif
47
48#define M4_MBPRED_SIZE 15
49
50
51
54{
55/* 4*/ uint32 mState;
56/* 12*/ uint16 mDcScaler[6];
57/*768*/ int16 mDctFromBitstream[6*64];
58};
59
68
71{
74};
75
76
77// ------------------------------------------------------------------------------
78// Macroblock structure
79//
80// There a sizeof check somewhere - dont enlarge this struct too much
81//
82// Currently, it 256 bytes. Having a 1920x1088p frame means
83//
84// !! 120 macroblocks per row x 68 rows = 8160 macroblocks !!
85// !! and this yields around 2 MB of macroblock only data !!
86// ------------------------------------------------------------------------------
87
104
105
106}
107
FPlatformTypes::int16 int16
A 16-bit signed integer.
Definition Platform.h:1123
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define M4_MBPRED_SIZE
Definition M4Global.h:48
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition M4Bitstream.h:9
MV_PREDICTION
Possible motion vector prediction.
Definition M4Global.h:62
@ MV_PREDICTION_B_FORWARD
Definition M4Global.h:65
@ MV_PREDICTION_NONE
Definition M4Global.h:63
@ MV_PREDICTION_B_BACKWARD
Definition M4Global.h:66
@ MV_PREDICTION_P_FORWARD
Definition M4Global.h:64
M4_MBMODE
supported macroblock coding types
Definition M4Global.h:13
@ M4_MBMODE_INTER4V
Definition M4Global.h:16
@ M4_MBMODE_INTER_Q
Definition M4Global.h:15
@ M4_MBMODE_INTRA
Definition M4Global.h:17
@ M4_MBMODE_NOT_CODED_PVOP
Definition M4Global.h:20
@ M4_MBMODE_INTRA_Q
Definition M4Global.h:18
@ M4_MBMODE_INTER
Definition M4Global.h:14
@ M4_MBMODE_STUFFING
Definition M4Global.h:19
@ M4_MBMODE_NOT_CODED_SVOP
Definition M4Global.h:21
M4_MBFLAGS
macroblock additional flags
Definition M4Global.h:26
@ M4_MBFLAG_MVTYPE_INTERPOLATE
Definition M4Global.h:28
@ M4_MBFLAG_FIELD_PREDICTION_BIT
Definition M4Global.h:34
@ M4_MBFLAG_MVTYPE_FORWARD
Definition M4Global.h:30
@ M4_MBFLAG_HAS_MOTION_VECTOR
Definition M4Global.h:37
@ M4_MBFLAG_FIELD_REF_FWD_MASK
Definition M4Global.h:36
@ M4_MBFLAG_MVTYPE_MASK
Definition M4Global.h:31
@ M4_MBFLAG_MVTYPE_BACKWARD
Definition M4Global.h:29
@ M4_MBFLAG_MVTYPE_DIRECT
Definition M4Global.h:27
@ M4_MBFLAG_FIELD_DCT_BIT
Definition M4Global.h:33
Information per macroblock filled-in by the bitstream parser.
Definition M4Global.h:54
uint16 mDcScaler[6]
temporary calculated dc prediction values
Definition M4Global.h:56
int16 mDctFromBitstream[6 *64]
parsed idct coefficients from the bitstream (6 blocks (4:1:1) by 8x8 values)
Definition M4Global.h:57
uint32 mState
a value != 0 means that this entry is currently used
Definition M4Global.h:55
Definition M4Global.h:89
uint8 mACPredDirections[6]
Definition M4Global.h:97
uint8 mModeIntra
Definition M4Global.h:91
M4_VECTOR mFMv[4]
forward motion vectors // 8 + (4*8)
Definition M4Global.h:98
uint8 _free
Definition M4Global.h:95
M4_VECTOR mBMv[4]
backward motion vectors
Definition M4Global.h:102
uint8 mCbp
Definition M4Global.h:101
uint8 mFlags
Definition M4Global.h:100
uint8 mMvResidual
Definition M4Global.h:94
uint8 mQuant
Definition M4Global.h:93
int16 mPredictedValues[6][M4_MBPRED_SIZE]
Definition M4Global.h:99
uint8 mMode
Definition M4Global.h:90
Motion vector.
Definition M4Global.h:71
int32 y
Definition M4Global.h:73
int32 x
Definition M4Global.h:72