Skip to content

Commit 511ed3f

Browse files
committed
Update mxv-container.hexpat
1 parent e734dae commit 511ed3f

2 files changed

Lines changed: 44 additions & 10 deletions

File tree

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"cSpell.words": [
33
"AFTE",
44
"Avidemux",
5+
"bitfield",
56
"Chans",
67
"Dadido",
78
"demux",
@@ -10,6 +11,7 @@
1011
"earthboundkid",
1112
"hexinator",
1213
"hexpat",
14+
"IYUV",
1315
"Magix",
1416
"moutend",
1517
"Muxing",
@@ -34,6 +36,8 @@
3436
"versioninfo",
3537
"VFTE",
3638
"Vogel",
37-
"wfmt"
39+
"wfmt",
40+
"YUNV",
41+
"YUYV"
3842
]
3943
}

documentation/mxv-container.hexpat

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ enum MXContentType64 : u64 {
5252
MXJVTL32 = 0x32334C54564A584D, // List of offsets of the respective video and audio chunks.
5353
};
5454

55+
// Color formats.
56+
enum ColorFormat : u32 {
57+
ColorFormatZero = 0,
58+
ColorFormatThree = 3,
59+
ColorFormatI420 = 0x30323449,
60+
ColorFormatIYUV = 0x56555949,
61+
ColorFormatY411 = 0x31313459,
62+
ColorFormatY422 = 0x32323456,
63+
ColorFormatYUNV = 0x564e5559,
64+
ColorFormatYUY2 = 0x32595559,
65+
ColorFormatYUYV = 0x56595559,
66+
ColorFormatYV12 = 0x32315659,
67+
};
68+
5569
using Chunk64;
5670

5771
struct ChunkMXAFTE {
@@ -122,6 +136,21 @@ struct ChunkMXJVFT64 {
122136
MXJVFT64Entries += parent.Length/8;
123137
};
124138

139+
bitfield ChunkMXJVH264Flags {
140+
A : 1;
141+
B : 1;
142+
C : 1; // Is set in all test files i have.
143+
D : 1; // Guess: Something about interlacing. I haven't seen a file with this flag set, but the software queries this flag with code that's related to (de)interlacing.
144+
E : 1;
145+
F : 1;
146+
G : 1;
147+
H : 1;
148+
I : 1;
149+
J : 1;
150+
K : 1;
151+
padding : 21;
152+
};
153+
125154
struct ChunkMXJVH264 {
126155
u32; // Seems to be always 112, may be the size of this struct.
127156
u32; // Guess: May be some sort of version. (File or encoding software)
@@ -133,15 +162,16 @@ struct ChunkMXJVH264 {
133162
double Framerate; // Number of frames per second. For interlaced video it will store the number of full frames per second. I.e. PAL has 50 fields/s and therefore 25 full frames/s.
134163
u32 FrameWidth;
135164
u32 FrameHeight;
136-
u32 FrameWidth2; // Maybe needed when the video is anamorphic? It's the same as the above width in all my test files.
137-
u32 FrameHeight2; // Maybe needed when the video is anamorphic? It's the same as the above height in all my test files.
165+
u32 FrameWidth2; // Maybe needed when the video is anamorphic? It's the same as the above width in all my test files.
166+
u32 FrameHeight2; // Maybe needed when the video is anamorphic? It's the same as the above height in all my test files.
167+
ChunkMXJVH264Flags Flags;
168+
u32 MaxJPEGSize; // The JPEG data size of the largest MXJVVF64 chunk. (The size only includes the JPEG data)
169+
u64 AudioFrames; // Number of AFTE entries (These point to MXJVAF64 chunks that contain waveform data)
170+
u64 MaxAudioChunkSize; // The size of the largest MXJVAF64 chunk. (The size includes the chunk identifier and length field and all its data)
171+
double AspectRatio; // Final image aspect ratio. If this ratio != FrameWidth / FrameHeight the video doesn't have square pixels.
172+
ColorFormat ColorFormat; // Color format.
138173
u32;
139-
u32 MaxJPEGSize; // The JPEG data size of the largest MXJVVF64 chunk. (The size only includes the JPEG data)
140-
u64 AudioFrames; // Number of AFTE entries (These point to MXJVAF64 chunks that contain waveform data)
141-
u64 MaxAudioChunkSize; // The size of the largest MXJVAF64 chunk. (The size includes the chunk identifier and length field and all its data)
142-
double AspectRatio; // Final image aspect ratio. If this ratio != FrameWidth / FrameHeight the video doesn't have square pixels.
143-
u64; // Guess: This could be audio related stuff.
144-
u64 AudioSamples; // Total number of audio samples.
174+
u64 AudioSamples; // Total number of audio samples.
145175
};
146176

147177
struct ChunkMXJVHD64 {
@@ -157,7 +187,7 @@ struct ChunkMXJVHD64 {
157187
u32 FrameHeight;
158188
u32 FrameWidth2;
159189
u32 FrameHeight2;
160-
u32;
190+
ChunkMXJVH264Flags Flags;
161191
u32 MaxJPEGSize;
162192
};
163193

0 commit comments

Comments
 (0)