blob: 01f6e08034e949fb5b8895b713fc9619d3b3bdd3 (
plain) (
blame)
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
|
Testing av_parse_video_rate()
'-inf' -> -1/0 ERROR
'inf' -> 1/0 ERROR
'nan' -> 0/0 ERROR
'123/0' -> 1/0 ERROR
'-123 / 0' -> -1/0 ERROR
'' -> 0/0 ERROR
'/' -> 0/0 ERROR
' 123 / 321' -> 41/107 OK
'foo/foo' -> 0/0 ERROR
'foo/1' -> 0/0 ERROR
'1/foo' -> 0/0 ERROR
'0/0' -> 0/0 ERROR
'/0' -> 0/0 ERROR
'1/' -> 0/0 ERROR
'1' -> 1/1 OK
'0' -> 0/1 ERROR
'-123/123' -> -1/1 ERROR
'-foo' -> 0/0 ERROR
'123.23' -> 12323/100 OK
'.23' -> 23/100 OK
'-.23' -> -23/100 ERROR
'-0.234' -> -117/500 ERROR
'-0.0000001' -> 0/1 ERROR
' 21332.2324 ' -> 917286/43 OK
' -21332.2324 ' -> -917286/43 ERROR
Testing av_parse_color()
red -> R(255) G(0) B(0) A(255)
RED -> R(255) G(0) B(0) A(255)
Violet -> R(238) G(130) B(238) A(255)
Yellow -> R(255) G(255) B(0) A(255)
Red -> R(255) G(0) B(0) A(255)
0x000000 -> R(0) G(0) B(0) A(255)
0xff000000 -> R(255) G(0) B(0) A(0)
0x3e34ff -> R(62) G(52) B(255) A(255)
0x3e34ffaa -> R(62) G(52) B(255) A(170)
#ff0000 -> R(255) G(0) B(0) A(255)
ff0000 -> R(255) G(0) B(0) A(255)
0xff0000@1.0 -> R(255) G(0) B(0) A(255)
red@0xf -> R(255) G(0) B(0) A(15)
red@0.1 -> R(255) G(0) B(0) A(25)
red@0.5 -> R(255) G(0) B(0) A(127)
red@1.0 -> R(255) G(0) B(0) A(255)
red@-0.0 -> R(255) G(0) B(0) A(0)
|