-
Notifications
You must be signed in to change notification settings - Fork 3
/
vpx.txt
53 lines (42 loc) · 1.26 KB
/
vpx.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
1000010010010000000000100000000111100001100000000001000
122234444444444444444444
00000000
0000000000000000
000000000000000000000000
000000000000000000000000000000000000000000000000
Start code byte 0 0x9d
Start code byte 1 0x01
Start code byte 2 0x2a
42480100f0c0099d012a000a8007050708858588
[ ] [ ]
[ ] [ ]
[ ]
At the highest level, every compressed frame has three or more pieces. It begins with an uncompressed data
chunk comprising 10 bytes in the case of key frames and 3-bytes for inter frames. This is followed by two or
more blocks of compressed data (called partitions). These compressed data partitions begin and end on byte
boundaries.
frame_tag f(24)
if (key_frame) {
start_code f(24)
horizontal_size_code f(16)
vertical_size_code f(16)
}
unsigned char *c = pbi->Source;
unsigned int tmp;
tmp = (c[2] << 16) | (c[1] << 8) | c[0];
key_frame = tmp & 0x1;
version = (tmp >> 1) & 0x7;
show_frame = (tmp >> 4) & 0x1;
first_part_size = (tmp >> 5) & 0x7FFFF;
16383
9d 01 2a 00 0a 80 07
05 07 08 85 85 88
unsigned char *c = pbi->Source + 6;
unsigned int tmp;
tmp = (c[1] << 8) | c[0];
width = tmp & 0x3FFF;
horizontal_scale = tmp >> 14;
tmp = (c[3] << 8) | c[2];
height = tmp & 0x3FFF;
vertical_scale = tmp >> 14;
"000a8007050708858588"