1 #ifndef __SPCA50X_AVI_HEADER_H
2 #define __SPCA50X_AVI_HEADER_H
4 #define SPCA50X_AVI_FRAME_HEADER_LENGTH 8
5 static const uint8_t SPCA50xAviFrameHeader[SPCA50X_AVI_FRAME_HEADER_LENGTH] = {
6 0x30, 0x30, 0x64, 0x63, /* 00dc */
7 0x00, 0x00, 0x00, 0x00 /* size of frame */
10 #define SPCA50X_AVI_HEADER_LENGTH 224
11 static const uint8_t SPCA50xAviHeader[SPCA50X_AVI_HEADER_LENGTH] = {
12 /* -- RIFF HEADER -- */
13 0x52, 0x49, 0x46, 0x46, /* 0x00; RIFF */
14 0x00, 0x00, 0x00, 0x00, /* 0x04; number of bytes following */
15 0x41, 0x56, 0x49, 0x20, /* 0x08; AVI */
16 0x4C, 0x49, 0x53, 0x54, /* 0x0c; LIST */
17 0xC0, 0x00, 0x00, 0x00, /* 0x10; length of list in bytes */
18 0x68, 0x64, 0x72, 0x6C, /* 0x14; hdrl */
19 0x61, 0x76, 0x69, 0x68, /* 0x18; avih */
20 0x38, 0x00, 0x00, 0x00, /* 0x1c; number of bytes to follow */
21 0xb5, 0x8c, 0x01, 0x00, /* 0x20; microseconds per frame */
22 0x00, 0x00, 0x06, 0x00, /* 0x24; max bytes per second */
23 0x00, 0x00, 0x00, 0x00, /* 0x28; PaddingGranularity (whatever that might be) */
24 /* Other sources call it 'reserved' */
25 0x10, 0x00, 0x01, 0x00, /* 0x2c; flags, WASCAPTUREFILE | HASINDEX */
26 0x00, 0x00, 0x00, 0x00, /* 0x30; total frames */
27 0x00, 0x00, 0x00, 0x00, /* 0x34: initial frames */
28 0x01, 0x00, 0x00, 0x00, /* 0x38: number of streams */
29 0x00, 0x00, 0x00, 0x00, /* 0x3c: suggested buffer size */
30 0x40, 0x01, 0x00, 0x00, /* 0x40: width */
31 0xf0, 0x00, 0x00, 0x00, /* 0x44: height */
32 0x00, 0x00, 0x00, 0x00, /* 0x48: some reserved long values */
33 0x00, 0x00, 0x00, 0x00, /* 0x4c: */
34 0x00, 0x00, 0x00, 0x00, /* 0x50: */
35 0x00, 0x00, 0x00, 0x00, /* 0x54: */
36 /* -- video stream list -- */
37 0x4C, 0x49, 0x53, 0x54, /* 0x58: LIST */
38 0x74, 0x00, 0x00, 0x00, /* 0x5c: length of list in bytes */
39 0x73, 0x74, 0x72, 0x6C, /* 0x60: strl */
40 /* -- video stream header -- */
41 0x73, 0x74, 0x72, 0x68, /* 0x64: strh */
42 0x38, 0x00, 0x00, 0x00, /* 0x68: # of bytes to follow */
43 0x76, 0x69, 0x64, 0x73, /* 0x6c: vids */
44 0x4D, 0x4A, 0x50, 0x47, /* 0x70: MJPG */
45 0x00, 0x00, 0x00, 0x00, /* 0x74: some more reserved longs */
46 0x00, 0x00, 0x00, 0x00, /* 0x78: */
47 0x00, 0x00, 0x00, 0x00, /* 0x7c: */
48 0x33, 0x18, 0x00, 0x00, /* 0x80: ms_per_frame scale */
49 0x48, 0xEE, 0x00, 0x00, /* 0x84: Rate: Rate/Scale == samples/second */
50 0x00, 0x00, 0x00, 0x00, /* 0x88: start */
51 0x00, 0x00, 0x00, 0x00, /* 0x8c: length (video_frames) */
52 0x00, 0x00, 0x00, 0x00, /* 0x90: suggested buffer size */
53 0xFF, 0xFF, 0xFF, 0xFF, /* 0x94: quality */
54 0x00, 0x00, 0x00, 0x00, /* 0x98: sample size */
55 0x00, 0x00, 0x00, 0x00, /* 0x9c: frame */
56 0x00, 0x00, 0x00, 0x00, /* 0xa0: frame */
57 /* -- video stream format -- */
58 0x73, 0x74, 0x72, 0x66, /* 0xa4: strf */
59 0x28, 0x00, 0x00, 0x00, /* 0xa8: number of bytes to follow (40) */
60 0x28, 0x00, 0x00, 0x00, /* 0xac: size (dito) */
61 0x40, 0x01, 0x00, 0x00, /* 0xb0: width */
62 0xf0, 0x00, 0x00, 0x00, /* 0xb4: height */
63 0x01, 0x00, 0x0C, 0x00, /* 0xb8: planes(1) : count(24) */
64 0x4D, 0x4A, 0x50, 0x47, /* 0xbc: encoder MJPG */
65 0x00, 0xC2, 0x01, 0x00, /* 0xc0: Size image */
66 0x00, 0x00, 0x00, 0x00, /* 0xc4: XPelsPerMeter */
67 0x00, 0x00, 0x00, 0x00, /* 0xc8: YPelsPerMeter */
68 0x00, 0x00, 0x00, 0x00, /* 0xcc: Number of colors used */
69 0x00, 0x00, 0x00, 0x00, /* 0xd0: Number of colors important */
70 /* do we have to pad with JUNK here ? */
71 0x4C, 0x49, 0x53, 0x54, /* 0xd4: LIST */
72 0x00, 0x00, 0x00, 0x00, /* 0xd8: size of list */
73 0x6D, 0x6F, 0x76, 0x69 /* 0xda: movi */
76 #endif /* __SPCA50X_AVI_HEADER_H */