Compare commits
425 Commits
forest
...
sandbox/de
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f708a843b7 | ||
![]() |
a2d6abacf7 | ||
![]() |
89b6d40690 | ||
![]() |
ae0e383d35 | ||
![]() |
d8557a052c | ||
![]() |
f71f581ba2 | ||
![]() |
02d5ebcfdc | ||
![]() |
2424ba3d8b | ||
![]() |
1b8b8b0d0d | ||
![]() |
bb12bbaefb | ||
![]() |
b46da98f3a | ||
![]() |
05d5332407 | ||
![]() |
9d754dcca8 | ||
![]() |
85770264ac | ||
![]() |
af416c4daf | ||
![]() |
ea8482fe74 | ||
![]() |
9e41d569d7 | ||
![]() |
b720ba165f | ||
![]() |
bbf53047b0 | ||
![]() |
ede392d765 | ||
![]() |
c6a1ff223b | ||
![]() |
ed90a176af | ||
![]() |
eb0c73b6e0 | ||
![]() |
ed7e3d2447 | ||
![]() |
0f512788c8 | ||
![]() |
d2f4940783 | ||
![]() |
941e0b6150 | ||
![]() |
7386bde9d2 | ||
![]() |
bb28520891 | ||
![]() |
074dc67277 | ||
![]() |
e903cacf5b | ||
![]() |
bd9a388a06 | ||
![]() |
ccffac2b06 | ||
![]() |
83baed0b6b | ||
![]() |
3df4d9f62d | ||
![]() |
1f919cf27d | ||
![]() |
36c4e27454 | ||
![]() |
07a28c77e3 | ||
![]() |
ef838c349c | ||
![]() |
9a005c994c | ||
![]() |
3cce464342 | ||
![]() |
50ec6311e6 | ||
![]() |
e71985632e | ||
![]() |
1e59cbf23b | ||
![]() |
3755be94ed | ||
![]() |
a3e919a4ba | ||
![]() |
332169d39c | ||
![]() |
5894e7ef50 | ||
![]() |
e883c7478d | ||
![]() |
bb7b4bad6d | ||
![]() |
865d5b83f2 | ||
![]() |
75cfadbd1f | ||
![]() |
fb53409d2a | ||
![]() |
b1d821704b | ||
![]() |
4f0a381b49 | ||
![]() |
25e5552630 | ||
![]() |
1a23a34419 | ||
![]() |
f00d4e0198 | ||
![]() |
4a535efcfd | ||
![]() |
fbada948fa | ||
![]() |
d0ee1fd797 | ||
![]() |
10f891696b | ||
![]() |
4d2d1591a3 | ||
![]() |
2aadc06e0d | ||
![]() |
c5aaf923d8 | ||
![]() |
b41574e379 | ||
![]() |
095b03231c | ||
![]() |
64cf398713 | ||
![]() |
33df4f0483 | ||
![]() |
f54b515797 | ||
![]() |
25da21b14e | ||
![]() |
d4b500d9d7 | ||
![]() |
84acc988eb | ||
![]() |
466cc94e7a | ||
![]() |
ec79db6086 | ||
![]() |
3aa75bcef6 | ||
![]() |
a793cf953f | ||
![]() |
df13e01665 | ||
![]() |
15a23c8131 | ||
![]() |
33859ad8e3 | ||
![]() |
2f9d118f21 | ||
![]() |
930ae71ef0 | ||
![]() |
da9f55c3fb | ||
![]() |
2ec473bb0a | ||
![]() |
8b73296d7b | ||
![]() |
15cf59605f | ||
![]() |
e121bf4c1d | ||
![]() |
178db94cd6 | ||
![]() |
934f0fbbcb | ||
![]() |
3b5a90bd86 | ||
![]() |
c2634188ce | ||
![]() |
52bf93479c | ||
![]() |
629fb85f17 | ||
![]() |
38536f6b1c | ||
![]() |
802fc78bd7 | ||
![]() |
994a552c09 | ||
![]() |
52b2d50db4 | ||
![]() |
1586bbf7f1 | ||
![]() |
2a6c7a1a9b | ||
![]() |
7edd5170b5 | ||
![]() |
1b92ab0ecb | ||
![]() |
efe5b28c09 | ||
![]() |
a4ccfadcc2 | ||
![]() |
b8dc52f4a3 | ||
![]() |
e79103166f | ||
![]() |
3897de6098 | ||
![]() |
e33855cc47 | ||
![]() |
9d6e7ce12d | ||
![]() |
cf83dfb283 | ||
![]() |
d62af81f6a | ||
![]() |
9460226acd | ||
![]() |
1339f3842c | ||
![]() |
dce5b82f12 | ||
![]() |
1f07e804f0 | ||
![]() |
a67e654b6c | ||
![]() |
8af3e6507e | ||
![]() |
f9d69bd0fd | ||
![]() |
3d7cc9d2d1 | ||
![]() |
345fbfef06 | ||
![]() |
3274fc30ee | ||
![]() |
021a15fe9f | ||
![]() |
098d13ba10 | ||
![]() |
014b9c70f7 | ||
![]() |
1048a7e314 | ||
![]() |
bcee73f7ae | ||
![]() |
020a1e7006 | ||
![]() |
e0f82c6ed6 | ||
![]() |
2dd20e468a | ||
![]() |
35b7b0b549 | ||
![]() |
19bbe41c71 | ||
![]() |
48088f210d | ||
![]() |
e18eb7721e | ||
![]() |
6c9dcae532 | ||
![]() |
0102f1d5ec | ||
![]() |
d2dad31e79 | ||
![]() |
af7b7ffb4e | ||
![]() |
d70a8c09c6 | ||
![]() |
9edd4d4db7 | ||
![]() |
ff2c96be1f | ||
![]() |
54040f94b9 | ||
![]() |
f92b5842bf | ||
![]() |
dad8dfe254 | ||
![]() |
08c48ddc01 | ||
![]() |
347df4ce55 | ||
![]() |
7293ef7ac0 | ||
![]() |
2c3120274a | ||
![]() |
45bac0c496 | ||
![]() |
267daddecc | ||
![]() |
a19d694f09 | ||
![]() |
1c3e04bb94 | ||
![]() |
cb92f4f042 | ||
![]() |
2341747805 | ||
![]() |
dcb17eaefc | ||
![]() |
44627a9677 | ||
![]() |
b6e5bb27c9 | ||
![]() |
af04bfa300 | ||
![]() |
f8c06fb2ac | ||
![]() |
18744fe3ab | ||
![]() |
b295092b8f | ||
![]() |
2da30a96d4 | ||
![]() |
52618d28e1 | ||
![]() |
63963f51ef | ||
![]() |
d6b159d4a6 | ||
![]() |
2dd730ccb3 | ||
![]() |
cf4dfdc8e7 | ||
![]() |
8eac2ca840 | ||
![]() |
5be34ba80f | ||
![]() |
de2046275d | ||
![]() |
ee02f3fbed | ||
![]() |
570b6d25c0 | ||
![]() |
937c3b990b | ||
![]() |
d77b9d1ce9 | ||
![]() |
4ac6a2552b | ||
![]() |
d72c847fe8 | ||
![]() |
377fa8aff8 | ||
![]() |
6fd71e1b09 | ||
![]() |
8de1d8bfe3 | ||
![]() |
da519166e9 | ||
![]() |
f7396f3394 | ||
![]() |
52d273674b | ||
![]() |
0d4b8d7e43 | ||
![]() |
2b95a05bf6 | ||
![]() |
bbf61e35e7 | ||
![]() |
93d8a3fd29 | ||
![]() |
3eb0170ea6 | ||
![]() |
6df9ec52a0 | ||
![]() |
bdf3f07677 | ||
![]() |
7ecf3bc91c | ||
![]() |
5eeffc9fc5 | ||
![]() |
a1123538a5 | ||
![]() |
8363349b84 | ||
![]() |
45aa6f15b0 | ||
![]() |
934e10d0f1 | ||
![]() |
61da0870b9 | ||
![]() |
4afd141a05 | ||
![]() |
cf8e3d2c5c | ||
![]() |
9ed616a56c | ||
![]() |
3712b58c2f | ||
![]() |
97b36b26e0 | ||
![]() |
16c3a25f71 | ||
![]() |
bc02079cb2 | ||
![]() |
c6ca5c5ad9 | ||
![]() |
ebb583d291 | ||
![]() |
d84c098417 | ||
![]() |
da2da79012 | ||
![]() |
beb35aba19 | ||
![]() |
475d1d60b8 | ||
![]() |
f6582d6928 | ||
![]() |
1470789927 | ||
![]() |
584c72992a | ||
![]() |
920a074e89 | ||
![]() |
30a5a07a71 | ||
![]() |
ff6d6a9f07 | ||
![]() |
ecc0a1ece8 | ||
![]() |
43110b2c29 | ||
![]() |
f00d157c12 | ||
![]() |
8e89e2f2e0 | ||
![]() |
33e5e35fdb | ||
![]() |
a0f77f6acb | ||
![]() |
3c34619125 | ||
![]() |
fd16baae25 | ||
![]() |
4585b9dbac | ||
![]() |
ac830b3970 | ||
![]() |
09577b8c8d | ||
![]() |
f63c75de84 | ||
![]() |
b88b49a7bc | ||
![]() |
8a4310b160 | ||
![]() |
f01ad926d0 | ||
![]() |
54b5deff77 | ||
![]() |
2360a5f093 | ||
![]() |
e4419ab691 | ||
![]() |
9f81a50c85 | ||
![]() |
5ab920d2ae | ||
![]() |
e7922a5b70 | ||
![]() |
8f182a1cac | ||
![]() |
5cf74bf10c | ||
![]() |
9144111296 | ||
![]() |
962fc2e1e7 | ||
![]() |
37e68aba55 | ||
![]() |
b9db869a3d | ||
![]() |
862c22cf7d | ||
![]() |
526a774adb | ||
![]() |
e237b7dea3 | ||
![]() |
56d9a4fcd5 | ||
![]() |
e924057d80 | ||
![]() |
8f05e70340 | ||
![]() |
d83d61d942 | ||
![]() |
a622ed554f | ||
![]() |
d17ac4feb2 | ||
![]() |
f9da823216 | ||
![]() |
e2f1d02eb3 | ||
![]() |
e9c19617bf | ||
![]() |
d3a2e55af4 | ||
![]() |
971112f965 | ||
![]() |
c5bdc9dfd2 | ||
![]() |
fc3c3303f1 | ||
![]() |
f4bf712fbb | ||
![]() |
b60293e1ce | ||
![]() |
4622cd14c2 | ||
![]() |
d7efe068d2 | ||
![]() |
08d6fa6de4 | ||
![]() |
099d27432b | ||
![]() |
20a7691c92 | ||
![]() |
f234136414 | ||
![]() |
5e4f4196a9 | ||
![]() |
b4874e2c82 | ||
![]() |
03094a5533 | ||
![]() |
7a5fd6a1bf | ||
![]() |
65f14b0067 | ||
![]() |
f97d91ab67 | ||
![]() |
f0339cc9cf | ||
![]() |
5488da280d | ||
![]() |
d5f6ca8255 | ||
![]() |
25f1195a25 | ||
![]() |
56d048c412 | ||
![]() |
7ba7a5f817 | ||
![]() |
204ff1c868 | ||
![]() |
249366b1ac | ||
![]() |
939b297ac7 | ||
![]() |
22216a8691 | ||
![]() |
3e72277272 | ||
![]() |
cfc1f91c9f | ||
![]() |
e8af3db88a | ||
![]() |
dd69337e6e | ||
![]() |
cc1e05ca5f | ||
![]() |
f547fb8e07 | ||
![]() |
644bd87e8e | ||
![]() |
3183135dd3 | ||
![]() |
0c54beb1ee | ||
![]() |
ba8b5e8d6d | ||
![]() |
12e5ec6aa8 | ||
![]() |
3173c21909 | ||
![]() |
86368faca9 | ||
![]() |
c6c7557f8e | ||
![]() |
87375e257b | ||
![]() |
2d50c8498d | ||
![]() |
9fe88870c5 | ||
![]() |
78d3adbb21 | ||
![]() |
f345da5238 | ||
![]() |
52b43a2876 | ||
![]() |
520aa705cb | ||
![]() |
8caeeb886a | ||
![]() |
28e44bbb0b | ||
![]() |
fb9c19c62d | ||
![]() |
350731e8f9 | ||
![]() |
52fa10a9a3 | ||
![]() |
75e4377d81 | ||
![]() |
86d2a9b978 | ||
![]() |
2117fe0593 | ||
![]() |
0a64f943fc | ||
![]() |
e0ec61187e | ||
![]() |
384089004d | ||
![]() |
ed36720b66 | ||
![]() |
16ad35f64e | ||
![]() |
d427fab587 | ||
![]() |
a64a192c90 | ||
![]() |
5576a4e1cb | ||
![]() |
f1781e86b7 | ||
![]() |
7c8cac3c21 | ||
![]() |
36dfb90c53 | ||
![]() |
65ac291f20 | ||
![]() |
70ffd5d055 | ||
![]() |
5925ba08a3 | ||
![]() |
49dc9cafa6 | ||
![]() |
ad3333e2cd | ||
![]() |
6042f781f7 | ||
![]() |
485682c30a | ||
![]() |
27e6b5b6bd | ||
![]() |
3aeebfb231 | ||
![]() |
fe847e7660 | ||
![]() |
8def766de2 | ||
![]() |
97d1258375 | ||
![]() |
b38e42fe9d | ||
![]() |
864e7c51b6 | ||
![]() |
ec2dbdd107 | ||
![]() |
4896d5c7ef | ||
![]() |
e002bb99a8 | ||
![]() |
370bf116a2 | ||
![]() |
2dd77580c0 | ||
![]() |
b5e6d6cccf | ||
![]() |
6c4964602a | ||
![]() |
98de15137e | ||
![]() |
c90b6bb101 | ||
![]() |
44dd3274da | ||
![]() |
77a865d970 | ||
![]() |
a218a96784 | ||
![]() |
d54893da1d | ||
![]() |
87ff7f2af3 | ||
![]() |
a84c5f0f64 | ||
![]() |
256cf7ee7d | ||
![]() |
79b5a2b142 | ||
![]() |
302c33e49f | ||
![]() |
1a69eed2c4 | ||
![]() |
4956fcd31b | ||
![]() |
82f8ae4c5b | ||
![]() |
6debc446e0 | ||
![]() |
25aae73a30 | ||
![]() |
5bbb0c6295 | ||
![]() |
9f26861147 | ||
![]() |
81b9fd4310 | ||
![]() |
03276bf6e6 | ||
![]() |
0ef63f596d | ||
![]() |
b00057c88a | ||
![]() |
c511f560bf | ||
![]() |
d486427cf1 | ||
![]() |
7a8a68e2bd | ||
![]() |
e8f8e77642 | ||
![]() |
75673cfc3d | ||
![]() |
e8346f8cf7 | ||
![]() |
dd04ff506b | ||
![]() |
82c32fe1b5 | ||
![]() |
d6667dd54f | ||
![]() |
a944deae97 | ||
![]() |
3d50da5397 | ||
![]() |
65cee2f01a | ||
![]() |
86b629efb6 | ||
![]() |
e55d3e6d1b | ||
![]() |
60aba6558f | ||
![]() |
df78fea166 | ||
![]() |
69541e1dec | ||
![]() |
f92cfa1ca6 | ||
![]() |
8cf352abac | ||
![]() |
ff4f1c4b76 | ||
![]() |
30b03050a2 | ||
![]() |
5b3a8563de | ||
![]() |
f6ec323906 | ||
![]() |
296b4be859 | ||
![]() |
f16fb829e6 | ||
![]() |
a7c7e78aa5 | ||
![]() |
2abe2d4664 | ||
![]() |
51490e5654 | ||
![]() |
953b1e9683 | ||
![]() |
9e1e7bee48 | ||
![]() |
b5c4520101 | ||
![]() |
220af9ac2c | ||
![]() |
613e2d2e90 | ||
![]() |
d8c06d23da | ||
![]() |
a782d63954 | ||
![]() |
a7c4209724 | ||
![]() |
f225b1e69b | ||
![]() |
040dc8c945 | ||
![]() |
a42ab027fd | ||
![]() |
e63aaf9ad1 | ||
![]() |
e813843b46 | ||
![]() |
1c61e1960d | ||
![]() |
46ce6ddec4 | ||
![]() |
bbe68fbd2a | ||
![]() |
e3168b0c54 | ||
![]() |
c8e38a6c69 | ||
![]() |
83eb1975df | ||
![]() |
5ae4ba5774 | ||
![]() |
64f728caef | ||
![]() |
7fb5e73897 | ||
![]() |
bdc4371174 | ||
![]() |
dc90541563 | ||
![]() |
7424492a0b | ||
![]() |
3b9befe52e | ||
![]() |
49cbe4580d | ||
![]() |
5380739a87 | ||
![]() |
6f25c15d23 | ||
![]() |
17084657e6 | ||
![]() |
00a35aab7c | ||
![]() |
49fbbf72fa | ||
![]() |
a638bdf4c4 | ||
![]() |
07ce775189 |
6
args.h
6
args.h
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ARGS_H
|
||||
#define ARGS_H
|
||||
#ifndef ARGS_H_
|
||||
#define ARGS_H_
|
||||
#include <stdio.h>
|
||||
|
||||
struct arg {
|
||||
@@ -48,4 +48,4 @@ unsigned int arg_parse_uint(const struct arg *arg);
|
||||
int arg_parse_int(const struct arg *arg);
|
||||
struct vpx_rational arg_parse_rational(const struct arg *arg);
|
||||
int arg_parse_enum_or_int(const struct arg *arg);
|
||||
#endif
|
||||
#endif // ARGS_H_
|
||||
|
@@ -321,7 +321,7 @@ bail:
|
||||
return 1;
|
||||
}
|
||||
|
||||
char *parse_elf_string_table(elf_obj_t *elf, int s_idx, int idx) {
|
||||
const char *parse_elf_string_table(elf_obj_t *elf, int s_idx, int idx) {
|
||||
if (elf->bits == 32) {
|
||||
Elf32_Shdr shdr;
|
||||
|
||||
|
@@ -24,7 +24,7 @@ sub FixThumbInstructions($$)
|
||||
# with left shift, addition and a right shift (to restore the
|
||||
# register to the original value). Currently the right shift
|
||||
# isn't necessary in the code base since the values in these
|
||||
# registers aren't used, but doing the shift for consitency.
|
||||
# registers aren't used, but doing the shift for consistency.
|
||||
# This converts instructions such as "add r12, r12, r5, lsl r4"
|
||||
# into the sequence "lsl r5, r4", "add r12, r12, r5", "lsr r5, r4".
|
||||
s/^(\s*)(add)(\s+)(r\d+),\s*(r\d+),\s*(r\d+),\s*lsl (r\d+)/$1lsl$3$6, $7\n$1$2$3$4, $5, $6\n$1lsr$3$6, $7/g;
|
||||
|
10
configure
vendored
10
configure
vendored
@@ -24,6 +24,7 @@ Advanced options:
|
||||
${toggle_examples} examples
|
||||
${toggle_docs} documentation
|
||||
${toggle_unit_tests} unit tests
|
||||
${toggle_decode_perf_tests} build decoder perf tests with unit tests
|
||||
--libc=PATH path to alternate libc
|
||||
--as={yasm|nasm|auto} use specified assembler [auto, yasm preferred]
|
||||
--sdk-path=PATH path to root of sdk (android builds only)
|
||||
@@ -255,7 +256,14 @@ EXPERIMENT_LIST="
|
||||
multiple_arf
|
||||
non420
|
||||
alpha
|
||||
masked_interinter
|
||||
interintra
|
||||
masked_interintra
|
||||
filterintra
|
||||
ext_tx
|
||||
ext_tx_dst32
|
||||
"
|
||||
|
||||
CONFIG_LIST="
|
||||
external_build
|
||||
install_docs
|
||||
@@ -302,6 +310,7 @@ CONFIG_LIST="
|
||||
postproc_visualizer
|
||||
os_support
|
||||
unit_tests
|
||||
decode_perf_tests
|
||||
multi_res_encoding
|
||||
temporal_denoising
|
||||
experimental
|
||||
@@ -355,6 +364,7 @@ CMDLINE_SELECT="
|
||||
small
|
||||
postproc_visualizer
|
||||
unit_tests
|
||||
decode_perf_tests
|
||||
multi_res_encoding
|
||||
temporal_denoising
|
||||
experimental
|
||||
|
18
examples.mk
18
examples.mk
@@ -23,7 +23,9 @@ vpxdec.SRCS += md5_utils.c md5_utils.h
|
||||
vpxdec.SRCS += vpx_ports/vpx_timer.h
|
||||
vpxdec.SRCS += vpx/vpx_integer.h
|
||||
vpxdec.SRCS += args.c args.h
|
||||
vpxdec.SRCS += ivfdec.c ivfdec.h
|
||||
vpxdec.SRCS += tools_common.c tools_common.h
|
||||
vpxdec.SRCS += webmdec.c webmdec.h
|
||||
vpxdec.SRCS += nestegg/halloc/halloc.h
|
||||
vpxdec.SRCS += nestegg/halloc/src/align.h
|
||||
vpxdec.SRCS += nestegg/halloc/src/halloc.c
|
||||
@@ -35,8 +37,11 @@ vpxdec.SRCS += $(LIBYUV_SRCS)
|
||||
vpxdec.GUID = BA5FE66F-38DD-E034-F542-B1578C5FB950
|
||||
vpxdec.DESCRIPTION = Full featured decoder
|
||||
UTILS-$(CONFIG_ENCODERS) += vpxenc.c
|
||||
vpxenc.SRCS += args.c args.h y4minput.c y4minput.h
|
||||
vpxenc.SRCS += args.c args.h y4minput.c y4minput.h vpxenc.h
|
||||
vpxenc.SRCS += ivfdec.c ivfdec.h
|
||||
vpxenc.SRCS += ivfenc.c ivfenc.h
|
||||
vpxenc.SRCS += tools_common.c tools_common.h
|
||||
vpxenc.SRCS += warnings.c warnings.h
|
||||
vpxenc.SRCS += webmenc.c webmenc.h
|
||||
vpxenc.SRCS += vpx_ports/mem_ops.h
|
||||
vpxenc.SRCS += vpx_ports/mem_ops_aligned.h
|
||||
@@ -53,18 +58,11 @@ vp8_scalable_patterns.GUID = 0D6A210B-F482-4D6F-8570-4A9C01ACC88C
|
||||
vp8_scalable_patterns.DESCRIPTION = Temporal Scalability Encoder
|
||||
UTILS-$(CONFIG_VP9_ENCODER) += vp9_spatial_scalable_encoder.c
|
||||
vp9_spatial_scalable_encoder.SRCS += args.c args.h
|
||||
vp9_spatial_scalable_encoder.SRCS += ivfenc.c ivfenc.h
|
||||
vp9_spatial_scalable_encoder.SRCS += tools_common.c tools_common.h
|
||||
vp9_spatial_scalable_encoder.GUID = 4A38598D-627D-4505-9C7B-D4020C84100D
|
||||
vp9_spatial_scalable_encoder.DESCRIPTION = Spatial Scalable Encoder
|
||||
|
||||
# Clean up old ivfenc, ivfdec binaries.
|
||||
ifeq ($(CONFIG_MSVS),yes)
|
||||
CLEAN-OBJS += $(foreach p,$(VS_PLATFORMS),$(p)/Release/ivfenc.exe)
|
||||
CLEAN-OBJS += $(foreach p,$(VS_PLATFORMS),$(p)/Release/ivfdec.exe)
|
||||
else
|
||||
CLEAN-OBJS += ivfenc{.c.o,.c.d,.dox,.exe,}
|
||||
CLEAN-OBJS += ivfdec{.c.o,.c.d,.dox,.exe,}
|
||||
endif
|
||||
|
||||
# XMA example disabled for now, not used in VP8
|
||||
#UTILS-$(CONFIG_DECODERS) += example_xma.c
|
||||
#example_xma.GUID = A955FC4A-73F1-44F7-135E-30D84D32F022
|
||||
|
119
ivfdec.c
Normal file
119
ivfdec.c
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "./ivfdec.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int file_is_ivf(struct VpxInputContext *input_ctx) {
|
||||
char raw_hdr[32];
|
||||
int is_ivf = 0;
|
||||
|
||||
// TODO(tomfinegan): This can eventually go away, but for now it's required
|
||||
// because the means by which file types are detected differ in vpxdec and
|
||||
// vpxenc.
|
||||
rewind(input_ctx->file);
|
||||
|
||||
if (fread(raw_hdr, 1, 32, input_ctx->file) == 32) {
|
||||
if (raw_hdr[0] == 'D' && raw_hdr[1] == 'K' &&
|
||||
raw_hdr[2] == 'I' && raw_hdr[3] == 'F') {
|
||||
is_ivf = 1;
|
||||
|
||||
if (mem_get_le16(raw_hdr + 4) != 0) {
|
||||
fprintf(stderr, "Error: Unrecognized IVF version! This file may not"
|
||||
" decode properly.");
|
||||
}
|
||||
|
||||
input_ctx->fourcc = mem_get_le32(raw_hdr + 8);
|
||||
input_ctx->width = mem_get_le16(raw_hdr + 12);
|
||||
input_ctx->height = mem_get_le16(raw_hdr + 14);
|
||||
input_ctx->framerate.numerator = mem_get_le32(raw_hdr + 16);
|
||||
input_ctx->framerate.denominator = mem_get_le32(raw_hdr + 20);
|
||||
|
||||
/* Some versions of vpxenc used 1/(2*fps) for the timebase, so
|
||||
* we can guess the framerate using only the timebase in this
|
||||
* case. Other files would require reading ahead to guess the
|
||||
* timebase, like we do for webm.
|
||||
*/
|
||||
if (input_ctx->framerate.numerator < 1000) {
|
||||
/* Correct for the factor of 2 applied to the timebase in the
|
||||
* encoder.
|
||||
*/
|
||||
if (input_ctx->framerate.numerator & 1)
|
||||
input_ctx->framerate.denominator <<= 1;
|
||||
else
|
||||
input_ctx->framerate.numerator >>= 1;
|
||||
} else {
|
||||
/* Don't know FPS for sure, and don't have readahead code
|
||||
* (yet?), so just default to 30fps.
|
||||
*/
|
||||
input_ctx->framerate.numerator = 30;
|
||||
input_ctx->framerate.denominator = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_ivf) {
|
||||
rewind(input_ctx->file);
|
||||
input_ctx->detect.buf_read = 0;
|
||||
} else {
|
||||
input_ctx->detect.position = 4;
|
||||
}
|
||||
return is_ivf;
|
||||
}
|
||||
|
||||
int ivf_read_frame(struct VpxInputContext *input_ctx,
|
||||
uint8_t **buffer,
|
||||
size_t *bytes_read,
|
||||
size_t *buffer_size) {
|
||||
char raw_header[IVF_FRAME_HDR_SZ] = {0};
|
||||
size_t frame_size = 0;
|
||||
FILE *infile = input_ctx->file;
|
||||
|
||||
if (input_ctx->file_type != FILE_TYPE_IVF)
|
||||
return 0;
|
||||
|
||||
if (fread(raw_header, IVF_FRAME_HDR_SZ, 1, infile) != 1) {
|
||||
if (!feof(infile))
|
||||
warn("Failed to read frame size\n");
|
||||
} else {
|
||||
frame_size = mem_get_le32(raw_header);
|
||||
|
||||
if (frame_size > 256 * 1024 * 1024) {
|
||||
warn("Read invalid frame size (%u)\n", (unsigned int)frame_size);
|
||||
frame_size = 0;
|
||||
}
|
||||
|
||||
if (frame_size > *buffer_size) {
|
||||
uint8_t *new_buffer = realloc(*buffer, 2 * frame_size);
|
||||
|
||||
if (new_buffer) {
|
||||
*buffer = new_buffer;
|
||||
*buffer_size = 2 * frame_size;
|
||||
} else {
|
||||
warn("Failed to allocate compressed data buffer\n");
|
||||
frame_size = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!feof(infile)) {
|
||||
if (fread(*buffer, 1, frame_size, infile) != frame_size) {
|
||||
warn("Failed to read full frame\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
*bytes_read = frame_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
30
ivfdec.h
Normal file
30
ivfdec.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#ifndef IVFDEC_H_
|
||||
#define IVFDEC_H_
|
||||
|
||||
#include "./tools_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int file_is_ivf(struct VpxInputContext *input);
|
||||
|
||||
int ivf_read_frame(struct VpxInputContext *input,
|
||||
uint8_t **buffer,
|
||||
size_t *bytes_read,
|
||||
size_t *buffer_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif // IVFDEC_H_
|
62
ivfenc.c
Normal file
62
ivfenc.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "./ivfenc.h"
|
||||
|
||||
#include "./tools_common.h"
|
||||
#include "vpx/vpx_encoder.h"
|
||||
#include "vpx_ports/mem_ops.h"
|
||||
|
||||
void ivf_write_file_header(FILE *outfile,
|
||||
const struct vpx_codec_enc_cfg *cfg,
|
||||
unsigned int fourcc,
|
||||
int frame_cnt) {
|
||||
char header[32];
|
||||
|
||||
if (cfg->g_pass != VPX_RC_ONE_PASS && cfg->g_pass != VPX_RC_LAST_PASS)
|
||||
return;
|
||||
|
||||
header[0] = 'D';
|
||||
header[1] = 'K';
|
||||
header[2] = 'I';
|
||||
header[3] = 'F';
|
||||
mem_put_le16(header + 4, 0); /* version */
|
||||
mem_put_le16(header + 6, 32); /* headersize */
|
||||
mem_put_le32(header + 8, fourcc); /* four CC */
|
||||
mem_put_le16(header + 12, cfg->g_w); /* width */
|
||||
mem_put_le16(header + 14, cfg->g_h); /* height */
|
||||
mem_put_le32(header + 16, cfg->g_timebase.den); /* rate */
|
||||
mem_put_le32(header + 20, cfg->g_timebase.num); /* scale */
|
||||
mem_put_le32(header + 24, frame_cnt); /* length */
|
||||
mem_put_le32(header + 28, 0); /* unused */
|
||||
|
||||
(void) fwrite(header, 1, 32, outfile);
|
||||
}
|
||||
|
||||
void ivf_write_frame_header(FILE *outfile, const struct vpx_codec_cx_pkt *pkt) {
|
||||
char header[12];
|
||||
vpx_codec_pts_t pts;
|
||||
|
||||
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
|
||||
return;
|
||||
|
||||
pts = pkt->data.frame.pts;
|
||||
mem_put_le32(header, (int)pkt->data.frame.sz);
|
||||
mem_put_le32(header + 4, pts & 0xFFFFFFFF);
|
||||
mem_put_le32(header + 8, pts >> 32);
|
||||
|
||||
(void) fwrite(header, 1, 12, outfile);
|
||||
}
|
||||
|
||||
void ivf_write_frame_size(FILE *outfile, size_t size) {
|
||||
char header[4];
|
||||
mem_put_le32(header, (int)size);
|
||||
(void) fwrite(header, 1, 4, outfile);
|
||||
}
|
33
ivfenc.h
Normal file
33
ivfenc.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#ifndef IVFENC_H_
|
||||
#define IVFENC_H_
|
||||
|
||||
#include "./tools_common.h"
|
||||
|
||||
struct vpx_codec_enc_cfg;
|
||||
struct vpx_codec_cx_pkt;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void ivf_write_file_header(FILE *outfile,
|
||||
const struct vpx_codec_enc_cfg *cfg,
|
||||
uint32_t fourcc,
|
||||
int frame_cnt);
|
||||
void ivf_write_frame_header(FILE *outfile, const struct vpx_codec_cx_pkt *pkt);
|
||||
void ivf_write_frame_size(FILE *outfile, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif // IVFENC_H_
|
1
libs.mk
1
libs.mk
@@ -183,6 +183,7 @@ CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
|
||||
|
||||
INSTALL-LIBS-yes += include/vpx/vpx_codec.h
|
||||
INSTALL-LIBS-yes += include/vpx/vpx_image.h
|
||||
INSTALL-LIBS-yes += include/vpx/vpx_external_frame_buffer.h
|
||||
INSTALL-LIBS-yes += include/vpx/vpx_integer.h
|
||||
INSTALL-LIBS-$(CONFIG_DECODERS) += include/vpx/vpx_decoder.h
|
||||
INSTALL-LIBS-$(CONFIG_ENCODERS) += include/vpx/vpx_encoder.h
|
||||
|
@@ -20,8 +20,8 @@
|
||||
* Still in the public domain.
|
||||
*/
|
||||
|
||||
#ifndef MD5_H
|
||||
#define MD5_H
|
||||
#ifndef MD5_UTILS_H_
|
||||
#define MD5_UTILS_H_
|
||||
|
||||
#define md5byte unsigned char
|
||||
#define UWORD32 unsigned int
|
||||
@@ -38,4 +38,4 @@ void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
|
||||
void MD5Final(unsigned char digest[16], struct MD5Context *context);
|
||||
void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
|
||||
|
||||
#endif /* !MD5_H */
|
||||
#endif // MD5_UTILS_H_
|
||||
|
@@ -26,6 +26,11 @@ class ACMRandom {
|
||||
void Reset(int seed) {
|
||||
random_.Reseed(seed);
|
||||
}
|
||||
uint16_t Rand16(void) {
|
||||
const uint32_t value =
|
||||
random_.Generate(testing::internal::Random::kMaxRange);
|
||||
return (value >> 16) & 0xffff;
|
||||
}
|
||||
|
||||
uint8_t Rand8(void) {
|
||||
const uint32_t value =
|
||||
|
@@ -67,7 +67,7 @@ TEST_P(BordersTest, TestLowBitrate) {
|
||||
|
||||
cfg_.g_lag_in_frames = 25;
|
||||
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
||||
cfg_.rc_2pass_vbr_minsection_pct = 2000;
|
||||
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
|
||||
cfg_.rc_target_bitrate = 200;
|
||||
cfg_.rc_min_quantizer = 40;
|
||||
|
||||
|
@@ -26,6 +26,8 @@ extern "C" {
|
||||
#include "test/encode_test_driver.h"
|
||||
namespace libvpx_test {
|
||||
|
||||
const int kCodecFactoryParam = 0;
|
||||
|
||||
class CodecFactory {
|
||||
public:
|
||||
CodecFactory() {}
|
||||
|
@@ -44,6 +44,8 @@ struct ConvolveFunctions {
|
||||
convolve_fn_t hv8_avg_;
|
||||
};
|
||||
|
||||
typedef std::tr1::tuple<int, int, const ConvolveFunctions*> convolve_param_t;
|
||||
|
||||
// Reference 8-tap subpixel filter, slightly modified to fit into this test.
|
||||
#define VP9_FILTER_WEIGHT 128
|
||||
#define VP9_FILTER_SHIFT 7
|
||||
@@ -169,7 +171,7 @@ void filter_average_block2d_8_c(const uint8_t *src_ptr,
|
||||
output_width, output_height);
|
||||
}
|
||||
|
||||
class ConvolveTest : public PARAMS(int, int, const ConvolveFunctions*) {
|
||||
class ConvolveTest : public ::testing::TestWithParam<convolve_param_t> {
|
||||
public:
|
||||
static void SetUpTestCase() {
|
||||
// Force input_ to be unaligned, output to be 16 byte aligned.
|
||||
|
@@ -193,7 +193,10 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest,
|
||||
|
||||
virtual void ResetModel() {
|
||||
last_pts_ = 0;
|
||||
bits_in_buffer_model_ = cfg_.rc_target_bitrate * cfg_.rc_buf_initial_sz;
|
||||
frame_number_ = 0;
|
||||
first_drop_ = 0;
|
||||
num_drops_ = 0;
|
||||
bits_total_ = 0;
|
||||
duration_ = 0.0;
|
||||
}
|
||||
@@ -209,8 +212,29 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest,
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
// Time since last timestamp = duration.
|
||||
vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_;
|
||||
|
||||
// Add to the buffer the bits we'd expect from a constant bitrate server.
|
||||
bits_in_buffer_model_ += duration * timebase_ * cfg_.rc_target_bitrate
|
||||
* 1000;
|
||||
|
||||
// Buffer should not go negative.
|
||||
ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame "
|
||||
<< pkt->data.frame.pts;
|
||||
|
||||
const int frame_size_in_bits = pkt->data.frame.sz * 8;
|
||||
bits_total_ += frame_size_in_bits;
|
||||
|
||||
// If first drop not set and we have a drop set it to this time.
|
||||
if (!first_drop_ && duration > 1)
|
||||
first_drop_ = last_pts_ + 1;
|
||||
|
||||
// Update the number of frame drops.
|
||||
if (duration > 1) {
|
||||
num_drops_+= (duration - 1);
|
||||
}
|
||||
|
||||
// Update the most recent pts.
|
||||
last_pts_ = pkt->data.frame.pts;
|
||||
++frame_number_;
|
||||
@@ -231,13 +255,17 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest,
|
||||
double duration_;
|
||||
double effective_datarate_;
|
||||
int set_cpu_used_;
|
||||
int bits_in_buffer_model_;
|
||||
int first_drop_;
|
||||
int num_drops_;
|
||||
};
|
||||
|
||||
// There is no buffer model/frame dropper in VP9 currently, so for now we
|
||||
// have separate test for VP9 rate targeting for 1-pass CBR. We only check
|
||||
// that effective datarate is within some range of target bitrate.
|
||||
// No frame dropper, so we can't go to low bitrates.
|
||||
// Check basic rate targeting,
|
||||
TEST_P(DatarateTestVP9, BasicRateTargeting) {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
cfg_.rc_dropframe_thresh = 1;
|
||||
cfg_.rc_min_quantizer = 0;
|
||||
cfg_.rc_max_quantizer = 63;
|
||||
cfg_.rc_end_usage = VPX_CBR;
|
||||
@@ -248,13 +276,58 @@ TEST_P(DatarateTestVP9, BasicRateTargeting) {
|
||||
cfg_.rc_target_bitrate = i;
|
||||
ResetModel();
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.9)
|
||||
ASSERT_GE(static_cast<double>(cfg_.rc_target_bitrate),
|
||||
effective_datarate_ * 0.85)
|
||||
<< " The datarate for the file exceeds the target by too much!";
|
||||
ASSERT_LE(cfg_.rc_target_bitrate, effective_datarate_ * 1.1)
|
||||
ASSERT_LE(static_cast<double>(cfg_.rc_target_bitrate),
|
||||
effective_datarate_ * 1.15)
|
||||
<< " The datarate for the file missed the target!";
|
||||
}
|
||||
}
|
||||
|
||||
// Check that (1) the first dropped frame gets earlier and earlier
|
||||
// as the drop frame threshold is increased, and (2) that the total number of
|
||||
// frame drops does not decrease as we increase frame drop threshold.
|
||||
// Use a lower qp-max to force some frame drops.
|
||||
TEST_P(DatarateTestVP9, ChangingDropFrameThresh) {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
cfg_.rc_undershoot_pct = 20;
|
||||
cfg_.rc_undershoot_pct = 20;
|
||||
cfg_.rc_dropframe_thresh = 10;
|
||||
cfg_.rc_min_quantizer = 0;
|
||||
cfg_.rc_max_quantizer = 50;
|
||||
cfg_.rc_end_usage = VPX_CBR;
|
||||
cfg_.rc_target_bitrate = 200;
|
||||
|
||||
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||
30, 1, 0, 140);
|
||||
|
||||
const int kDropFrameThreshTestStep = 30;
|
||||
int last_drop = 140;
|
||||
int last_num_drops = 0;
|
||||
for (int i = 10; i < 100; i += kDropFrameThreshTestStep) {
|
||||
cfg_.rc_dropframe_thresh = i;
|
||||
ResetModel();
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(effective_datarate_, cfg_.rc_target_bitrate * 0.85)
|
||||
<< " The datarate for the file is lower than target by too much!";
|
||||
ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.15)
|
||||
<< " The datarate for the file is greater than target by too much!";
|
||||
ASSERT_LE(first_drop_, last_drop)
|
||||
<< " The first dropped frame for drop_thresh " << i
|
||||
<< " > first dropped frame for drop_thresh "
|
||||
<< i - kDropFrameThreshTestStep;
|
||||
ASSERT_GE(num_drops_, last_num_drops)
|
||||
<< " The number of dropped frames for drop_thresh " << i
|
||||
<< " < number of dropped frames for drop_thresh "
|
||||
<< i - kDropFrameThreshTestStep;
|
||||
last_drop = first_drop_;
|
||||
last_num_drops = num_drops_;
|
||||
}
|
||||
}
|
||||
|
||||
VP8_INSTANTIATE_TEST_CASE(DatarateTest, ALL_TEST_MODES);
|
||||
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9,
|
||||
::testing::Values(::libvpx_test::kOnePassGood),
|
||||
|
@@ -264,6 +264,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
|
||||
typedef void (*iht_t) (const int16_t *in, uint8_t *out, int stride,
|
||||
int tx_type);
|
||||
|
||||
typedef std::tr1::tuple<fdct_t, idct_t, int> dct_16x16_param_t;
|
||||
typedef std::tr1::tuple<fht_t, iht_t, int> ht_16x16_param_t;
|
||||
|
||||
void fdct16x16_ref(const int16_t *in, int16_t *out, int stride, int tx_type) {
|
||||
vp9_fdct16x16_c(in, out, stride);
|
||||
}
|
||||
@@ -412,8 +415,9 @@ class Trans16x16TestBase {
|
||||
fht_t fwd_txfm_ref;
|
||||
};
|
||||
|
||||
class Trans16x16DCT : public Trans16x16TestBase,
|
||||
public PARAMS(fdct_t, idct_t, int) {
|
||||
class Trans16x16DCT
|
||||
: public Trans16x16TestBase,
|
||||
public ::testing::TestWithParam<dct_16x16_param_t> {
|
||||
public:
|
||||
virtual ~Trans16x16DCT() {}
|
||||
|
||||
@@ -454,8 +458,9 @@ TEST_P(Trans16x16DCT, InvAccuracyCheck) {
|
||||
RunInvAccuracyCheck();
|
||||
}
|
||||
|
||||
class Trans16x16HT : public Trans16x16TestBase,
|
||||
public PARAMS(fht_t, iht_t, int) {
|
||||
class Trans16x16HT
|
||||
: public Trans16x16TestBase,
|
||||
public ::testing::TestWithParam<ht_16x16_param_t> {
|
||||
public:
|
||||
virtual ~Trans16x16HT() {}
|
||||
|
||||
|
@@ -77,7 +77,9 @@ void reference_32x32_dct_2d(const int16_t input[kNumCoeffs],
|
||||
typedef void (*fwd_txfm_t)(const int16_t *in, int16_t *out, int stride);
|
||||
typedef void (*inv_txfm_t)(const int16_t *in, uint8_t *out, int stride);
|
||||
|
||||
class Trans32x32Test : public PARAMS(fwd_txfm_t, inv_txfm_t, int) {
|
||||
typedef std::tr1::tuple<fwd_txfm_t, inv_txfm_t, int> trans_32x32_param_t;
|
||||
|
||||
class Trans32x32Test : public ::testing::TestWithParam<trans_32x32_param_t> {
|
||||
public:
|
||||
virtual ~Trans32x32Test() {}
|
||||
virtual void SetUp() {
|
||||
@@ -258,4 +260,14 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fdct32x32_rd_sse2,
|
||||
&vp9_idct32x32_1024_add_sse2, 1)));
|
||||
#endif
|
||||
|
||||
#if HAVE_AVX2
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
AVX2, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_avx2,
|
||||
&vp9_idct32x32_1024_add_sse2, 0),
|
||||
make_tuple(&vp9_fdct32x32_rd_avx2,
|
||||
&vp9_idct32x32_1024_add_sse2, 1)));
|
||||
#endif
|
||||
} // namespace
|
||||
|
105
test/decode_perf_test.cc
Normal file
105
test/decode_perf_test.cc
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/decode_test_driver.h"
|
||||
#include "test/ivf_video_source.h"
|
||||
#include "test/md5_helper.h"
|
||||
#include "test/util.h"
|
||||
#include "test/webm_video_source.h"
|
||||
#include "vpx_ports/vpx_timer.h"
|
||||
#include "./vpx_version.h"
|
||||
|
||||
using std::tr1::make_tuple;
|
||||
|
||||
namespace {
|
||||
|
||||
#define VIDEO_NAME 0
|
||||
#define THREADS 1
|
||||
|
||||
const double kUsecsInSec = 1000000.0;
|
||||
|
||||
/*
|
||||
DecodePerfTest takes a tuple of filename + number of threads to decode with
|
||||
*/
|
||||
typedef std::tr1::tuple<const char *const, unsigned> decode_perf_param_t;
|
||||
|
||||
const decode_perf_param_t kVP9DecodePerfVectors[] = {
|
||||
make_tuple("vp90-2-bbb_426x240_tile_1x1_180kbps.webm", 1),
|
||||
make_tuple("vp90-2-bbb_640x360_tile_1x2_337kbps.webm", 2),
|
||||
make_tuple("vp90-2-bbb_854x480_tile_1x2_651kbps.webm", 2),
|
||||
make_tuple("vp90-2-bbb_1280x720_tile_1x4_1310kbps.webm", 4),
|
||||
make_tuple("vp90-2-bbb_1920x1080_tile_1x1_2581kbps.webm", 1),
|
||||
make_tuple("vp90-2-bbb_1920x1080_tile_1x4_2586kbps.webm", 4),
|
||||
make_tuple("vp90-2-bbb_1920x1080_tile_1x4_fpm_2304kbps.webm", 4),
|
||||
make_tuple("vp90-2-sintel_426x182_tile_1x1_171kbps.webm", 1),
|
||||
make_tuple("vp90-2-sintel_640x272_tile_1x2_318kbps.webm", 2),
|
||||
make_tuple("vp90-2-sintel_854x364_tile_1x2_621kbps.webm", 2),
|
||||
make_tuple("vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm", 4),
|
||||
make_tuple("vp90-2-sintel_1920x818_tile_1x4_fpm_2279kbps.webm", 4),
|
||||
make_tuple("vp90-2-tos_426x178_tile_1x1_181kbps.webm", 1),
|
||||
make_tuple("vp90-2-tos_640x266_tile_1x2_336kbps.webm", 2),
|
||||
make_tuple("vp90-2-tos_854x356_tile_1x2_656kbps.webm", 2),
|
||||
make_tuple("vp90-2-tos_1280x534_tile_1x4_1306kbps.webm", 4),
|
||||
make_tuple("vp90-2-tos_1920x800_tile_1x4_fpm_2335kbps.webm", 4),
|
||||
};
|
||||
|
||||
/*
|
||||
In order to reflect real world performance as much as possible, Perf tests
|
||||
*DO NOT* do any correctness checks. Please run them alongside correctness
|
||||
tests to ensure proper codec integrity. Furthermore, in this test we
|
||||
deliberately limit the amount of system calls we make to avoid OS
|
||||
preemption.
|
||||
|
||||
TODO(joshualitt) create a more detailed perf measurement test to collect
|
||||
power/temp/min max frame decode times/etc
|
||||
*/
|
||||
|
||||
class DecodePerfTest : public ::testing::TestWithParam<decode_perf_param_t> {
|
||||
};
|
||||
|
||||
TEST_P(DecodePerfTest, PerfTest) {
|
||||
const char *const video_name = GET_PARAM(VIDEO_NAME);
|
||||
const unsigned threads = GET_PARAM(THREADS);
|
||||
|
||||
libvpx_test::WebMVideoSource video(video_name);
|
||||
video.Init();
|
||||
|
||||
vpx_codec_dec_cfg_t cfg = {0};
|
||||
cfg.threads = threads;
|
||||
libvpx_test::VP9Decoder decoder(cfg, 0);
|
||||
|
||||
vpx_usec_timer t;
|
||||
vpx_usec_timer_start(&t);
|
||||
|
||||
for (video.Begin(); video.cxdata() != NULL; video.Next()) {
|
||||
decoder.DecodeFrame(video.cxdata(), video.frame_size());
|
||||
}
|
||||
|
||||
vpx_usec_timer_mark(&t);
|
||||
const double elapsed_secs = double(vpx_usec_timer_elapsed(&t))
|
||||
/ kUsecsInSec;
|
||||
const unsigned frames = video.frame_number();
|
||||
const double fps = double(frames) / elapsed_secs;
|
||||
|
||||
printf("{\n");
|
||||
printf("\t\"version\" : \"%s\",\n", VERSION_STRING_NOSP);
|
||||
printf("\t\"videoName\" : \"%s\",\n", video_name);
|
||||
printf("\t\"threadCount\" : %u,\n", threads);
|
||||
printf("\t\"decodeTimeSecs\" : %f,\n", elapsed_secs);
|
||||
printf("\t\"totalFrames\" : %u,\n", frames);
|
||||
printf("\t\"framesPerSecond\" : %f\n", fps);
|
||||
printf("}\n");
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VP9, DecodePerfTest,
|
||||
::testing::ValuesIn(kVP9DecodePerfVectors));
|
||||
|
||||
} // namespace
|
@@ -30,6 +30,7 @@ void DecoderTest::RunLoop(CompressedVideoSource *video) {
|
||||
|
||||
// Decode frames.
|
||||
for (video->Begin(); video->cxdata(); video->Next()) {
|
||||
PreDecodeFrameHook(*video, decoder);
|
||||
vpx_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(),
|
||||
video->frame_size());
|
||||
ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
|
||||
|
@@ -76,6 +76,16 @@ class Decoder {
|
||||
return detail ? detail : vpx_codec_error(&decoder_);
|
||||
}
|
||||
|
||||
// Passes the external frame buffer information to libvpx.
|
||||
vpx_codec_err_t SetExternalFrameBuffers(
|
||||
vpx_codec_frame_buffer_t *fb_list, int fb_count,
|
||||
vpx_realloc_frame_buffer_cb_fn_t cb, void *user_priv) {
|
||||
InitOnce();
|
||||
return vpx_codec_set_frame_buffers(&decoder_,
|
||||
fb_list, fb_count,
|
||||
cb, user_priv);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual const vpx_codec_iface_t* CodecInterface() const = 0;
|
||||
|
||||
@@ -101,6 +111,10 @@ class DecoderTest {
|
||||
// Main decoding loop
|
||||
virtual void RunLoop(CompressedVideoSource *video);
|
||||
|
||||
// Hook to be called before decompressing every frame.
|
||||
virtual void PreDecodeFrameHook(const CompressedVideoSource& video,
|
||||
Decoder *decoder) {}
|
||||
|
||||
// Hook to be called on every decompressed frame.
|
||||
virtual void DecompressedFrameHook(const vpx_image_t& img,
|
||||
const unsigned int frame_number) {}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
||||
|
||||
Use of this source code is governed by a BSD-style license
|
||||
that can be found in the LICENSE file in the root of the source
|
||||
tree. An additional intellectual property rights grant can be found
|
||||
in the file PATENTS. All contributing project authors may
|
||||
be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "test/codec_factory.h"
|
||||
|
322
test/external_frame_buffer_test.cc
Normal file
322
test/external_frame_buffer_test.cc
Normal file
@@ -0,0 +1,322 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/decode_test_driver.h"
|
||||
#include "test/ivf_video_source.h"
|
||||
#include "test/md5_helper.h"
|
||||
#include "test/test_vectors.h"
|
||||
#include "test/util.h"
|
||||
#include "test/webm_video_source.h"
|
||||
|
||||
namespace {
|
||||
|
||||
const int kVideoNameParam = 1;
|
||||
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
|
||||
|
||||
// Callback used by libvpx to request the application to allocate a frame
|
||||
// buffer of at least |new_size| in bytes.
|
||||
int realloc_vp9_frame_buffer(void *user_priv, size_t new_size,
|
||||
vpx_codec_frame_buffer_t *fb) {
|
||||
(void)user_priv;
|
||||
if (fb == NULL)
|
||||
return -1;
|
||||
|
||||
delete [] fb->data;
|
||||
fb->data = new uint8_t[new_size];
|
||||
fb->size = new_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Callback will not allocate data for frame buffer.
|
||||
int zero_realloc_vp9_frame_buffer(void *user_priv, size_t new_size,
|
||||
vpx_codec_frame_buffer_t *fb) {
|
||||
(void)user_priv;
|
||||
if (fb == NULL)
|
||||
return -1;
|
||||
|
||||
delete [] fb->data;
|
||||
fb->data = NULL;
|
||||
fb->size = new_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Callback will allocate one less byte.
|
||||
int one_less_byte_realloc_vp9_frame_buffer(void *user_priv, size_t new_size,
|
||||
vpx_codec_frame_buffer_t *fb) {
|
||||
(void)user_priv;
|
||||
if (fb == NULL)
|
||||
return -1;
|
||||
|
||||
delete [] fb->data;
|
||||
|
||||
const size_t error_size = new_size - 1;
|
||||
fb->data = new uint8_t[error_size];
|
||||
fb->size = error_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Class for testing passing in external frame buffers to libvpx.
|
||||
class ExternalFrameBufferMD5Test
|
||||
: public ::libvpx_test::DecoderTest,
|
||||
public ::libvpx_test::CodecTestWithParam<const char*> {
|
||||
protected:
|
||||
ExternalFrameBufferMD5Test()
|
||||
: DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)),
|
||||
md5_file_(NULL),
|
||||
num_buffers_(0),
|
||||
frame_buffers_(NULL) {}
|
||||
|
||||
virtual ~ExternalFrameBufferMD5Test() {
|
||||
for (int i = 0; i < num_buffers_; ++i) {
|
||||
delete [] frame_buffers_[i].data;
|
||||
}
|
||||
delete [] frame_buffers_;
|
||||
|
||||
if (md5_file_ != NULL)
|
||||
fclose(md5_file_);
|
||||
}
|
||||
|
||||
virtual void PreDecodeFrameHook(
|
||||
const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
if (num_buffers_ > 0 && video.frame_number() == 0) {
|
||||
// Have libvpx use frame buffers we create.
|
||||
frame_buffers_ = new vpx_codec_frame_buffer_t[num_buffers_];
|
||||
memset(frame_buffers_, 0, sizeof(frame_buffers_[0]) * num_buffers_);
|
||||
|
||||
ASSERT_EQ(VPX_CODEC_OK,
|
||||
decoder->SetExternalFrameBuffers(
|
||||
frame_buffers_, num_buffers_,
|
||||
realloc_vp9_frame_buffer, NULL));
|
||||
}
|
||||
}
|
||||
|
||||
void OpenMD5File(const std::string &md5_file_name_) {
|
||||
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
|
||||
ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: "
|
||||
<< md5_file_name_;
|
||||
}
|
||||
|
||||
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||
const unsigned int frame_number) {
|
||||
ASSERT_TRUE(md5_file_ != NULL);
|
||||
char expected_md5[33];
|
||||
char junk[128];
|
||||
|
||||
// Read correct md5 checksums.
|
||||
const int res = fscanf(md5_file_, "%s %s", expected_md5, junk);
|
||||
ASSERT_NE(EOF, res) << "Read md5 data failed";
|
||||
expected_md5[32] = '\0';
|
||||
|
||||
::libvpx_test::MD5 md5_res;
|
||||
md5_res.Add(&img);
|
||||
const char *const actual_md5 = md5_res.Get();
|
||||
|
||||
// Check md5 match.
|
||||
ASSERT_STREQ(expected_md5, actual_md5)
|
||||
<< "Md5 checksums don't match: frame number = " << frame_number;
|
||||
}
|
||||
|
||||
void set_num_buffers(int num_buffers) { num_buffers_ = num_buffers; }
|
||||
int num_buffers() const { return num_buffers_; }
|
||||
|
||||
private:
|
||||
FILE *md5_file_;
|
||||
int num_buffers_;
|
||||
vpx_codec_frame_buffer_t *frame_buffers_;
|
||||
};
|
||||
|
||||
class ExternalFrameBufferTest : public ::testing::Test {
|
||||
protected:
|
||||
ExternalFrameBufferTest()
|
||||
: video_(NULL),
|
||||
decoder_(NULL),
|
||||
num_buffers_(0),
|
||||
frame_buffers_(NULL) {}
|
||||
|
||||
virtual void SetUp() {
|
||||
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
|
||||
video_->Init();
|
||||
video_->Begin();
|
||||
|
||||
vpx_codec_dec_cfg_t cfg = {0};
|
||||
decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
for (int i = 0; i < num_buffers_; ++i) {
|
||||
delete [] frame_buffers_[i].data;
|
||||
}
|
||||
delete [] frame_buffers_;
|
||||
delete decoder_;
|
||||
delete video_;
|
||||
}
|
||||
|
||||
// Passes the external frame buffer information to libvpx.
|
||||
vpx_codec_err_t SetExternalFrameBuffers(
|
||||
int num_buffers,
|
||||
vpx_realloc_frame_buffer_cb_fn_t cb) {
|
||||
if (num_buffers > 0) {
|
||||
num_buffers_ = num_buffers;
|
||||
|
||||
// Have libvpx use frame buffers we create.
|
||||
frame_buffers_ = new vpx_codec_frame_buffer_t[num_buffers_];
|
||||
memset(frame_buffers_, 0, sizeof(frame_buffers_[0]) * num_buffers_);
|
||||
}
|
||||
|
||||
return decoder_->SetExternalFrameBuffers(frame_buffers_, num_buffers_,
|
||||
cb, NULL);
|
||||
}
|
||||
|
||||
// Pass Null frame buffer list to libvpx.
|
||||
vpx_codec_err_t SetNullFrameBuffers(
|
||||
int num_buffers,
|
||||
vpx_realloc_frame_buffer_cb_fn_t cb) {
|
||||
return decoder_->SetExternalFrameBuffers(NULL, num_buffers,
|
||||
cb, NULL);
|
||||
}
|
||||
|
||||
vpx_codec_err_t DecodeOneFrame() {
|
||||
const vpx_codec_err_t res =
|
||||
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
|
||||
if (res == VPX_CODEC_OK)
|
||||
video_->Next();
|
||||
return res;
|
||||
}
|
||||
|
||||
vpx_codec_err_t DecodeRemainingFrames() {
|
||||
for (; video_->cxdata(); video_->Next()) {
|
||||
const vpx_codec_err_t res =
|
||||
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
|
||||
if (res != VPX_CODEC_OK)
|
||||
return res;
|
||||
|
||||
libvpx_test::DxDataIterator dec_iter = decoder_->GetDxData();
|
||||
const vpx_image_t *img = NULL;
|
||||
|
||||
// Get decompressed data
|
||||
while ((img = dec_iter.Next())) {
|
||||
}
|
||||
}
|
||||
return VPX_CODEC_OK;
|
||||
}
|
||||
|
||||
libvpx_test::WebMVideoSource *video_;
|
||||
libvpx_test::VP9Decoder *decoder_;
|
||||
int num_buffers_;
|
||||
vpx_codec_frame_buffer_t *frame_buffers_;
|
||||
};
|
||||
|
||||
|
||||
// This test runs through the set of test vectors, and decodes them.
|
||||
// Libvpx will call into the application to allocate a frame buffer when
|
||||
// needed. The md5 checksums are computed for each frame in the video file.
|
||||
// If md5 checksums match the correct md5 data, then the test is passed.
|
||||
// Otherwise, the test failed.
|
||||
TEST_P(ExternalFrameBufferMD5Test, ExtFBMD5Match) {
|
||||
const std::string filename = GET_PARAM(kVideoNameParam);
|
||||
libvpx_test::CompressedVideoSource *video = NULL;
|
||||
|
||||
// Number of buffers equals number of possible reference buffers(8), plus
|
||||
// one working buffer, plus four jitter buffers.
|
||||
const int num_buffers = 13;
|
||||
set_num_buffers(num_buffers);
|
||||
|
||||
#if CONFIG_VP8_DECODER
|
||||
// Tell compiler we are not using kVP8TestVectors.
|
||||
(void)libvpx_test::kVP8TestVectors;
|
||||
#endif
|
||||
|
||||
// Open compressed video file.
|
||||
if (filename.substr(filename.length() - 3, 3) == "ivf") {
|
||||
video = new libvpx_test::IVFVideoSource(filename);
|
||||
} else if (filename.substr(filename.length() - 4, 4) == "webm") {
|
||||
video = new libvpx_test::WebMVideoSource(filename);
|
||||
}
|
||||
video->Init();
|
||||
|
||||
// Construct md5 file name.
|
||||
const std::string md5_filename = filename + ".md5";
|
||||
OpenMD5File(md5_filename);
|
||||
|
||||
// Decode frame, and check the md5 matching.
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||
delete video;
|
||||
}
|
||||
|
||||
TEST_F(ExternalFrameBufferTest, NineFrameBuffers) {
|
||||
// Minimum number of external frame buffers for VP9 is
|
||||
// #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS.
|
||||
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
|
||||
ASSERT_EQ(VPX_CODEC_OK,
|
||||
SetExternalFrameBuffers(num_buffers, realloc_vp9_frame_buffer));
|
||||
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames());
|
||||
}
|
||||
|
||||
TEST_F(ExternalFrameBufferTest, EightJitterBuffers) {
|
||||
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
|
||||
// #VPX_MAXIMUM_WORK_BUFFERS + eight jitter buffers.
|
||||
const int jitter_buffers = 8;
|
||||
const int num_buffers =
|
||||
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
|
||||
ASSERT_EQ(VPX_CODEC_OK,
|
||||
SetExternalFrameBuffers(num_buffers, realloc_vp9_frame_buffer));
|
||||
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames());
|
||||
}
|
||||
|
||||
TEST_F(ExternalFrameBufferTest, NotEnoughBuffers) {
|
||||
// Minimum number of external frame buffers for VP9 is
|
||||
// #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS. Set one less.
|
||||
const int num_buffers =
|
||||
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS - 1;
|
||||
ASSERT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
SetExternalFrameBuffers(num_buffers, realloc_vp9_frame_buffer));
|
||||
}
|
||||
|
||||
TEST_F(ExternalFrameBufferTest, NullFrameBufferList) {
|
||||
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
|
||||
// #VPX_MAXIMUM_WORK_BUFFERS + four jitter buffers.
|
||||
const int jitter_buffers = 4;
|
||||
const int num_buffers =
|
||||
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
|
||||
ASSERT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
SetNullFrameBuffers(num_buffers, realloc_vp9_frame_buffer));
|
||||
}
|
||||
|
||||
TEST_F(ExternalFrameBufferTest, NullRealloc) {
|
||||
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
|
||||
// #VPX_MAXIMUM_WORK_BUFFERS + four jitter buffers.
|
||||
const int jitter_buffers = 4;
|
||||
const int num_buffers =
|
||||
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
|
||||
ASSERT_EQ(VPX_CODEC_OK,
|
||||
SetExternalFrameBuffers(num_buffers,
|
||||
zero_realloc_vp9_frame_buffer));
|
||||
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame());
|
||||
}
|
||||
|
||||
TEST_F(ExternalFrameBufferTest, ReallocOneLessByte) {
|
||||
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
|
||||
// #VPX_MAXIMUM_WORK_BUFFERS + four jitter buffers.
|
||||
const int jitter_buffers = 4;
|
||||
const int num_buffers =
|
||||
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
|
||||
ASSERT_EQ(VPX_CODEC_OK,
|
||||
SetExternalFrameBuffers(num_buffers,
|
||||
one_less_byte_realloc_vp9_frame_buffer));
|
||||
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame());
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(ExternalFrameBufferMD5Test,
|
||||
::testing::ValuesIn(libvpx_test::kVP9TestVectors));
|
||||
} // namespace
|
@@ -36,6 +36,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
|
||||
typedef void (*iht_t) (const int16_t *in, uint8_t *out, int stride,
|
||||
int tx_type);
|
||||
|
||||
typedef std::tr1::tuple<fdct_t, idct_t, int> dct_4x4_param_t;
|
||||
typedef std::tr1::tuple<fht_t, iht_t, int> ht_4x4_param_t;
|
||||
|
||||
void fdct4x4_ref(const int16_t *in, int16_t *out, int stride, int tx_type) {
|
||||
vp9_fdct4x4_c(in, out, stride);
|
||||
}
|
||||
@@ -183,7 +186,7 @@ class Trans4x4TestBase {
|
||||
|
||||
class Trans4x4DCT
|
||||
: public Trans4x4TestBase,
|
||||
public PARAMS(fdct_t, idct_t, int) {
|
||||
public ::testing::TestWithParam<dct_4x4_param_t> {
|
||||
public:
|
||||
virtual ~Trans4x4DCT() {}
|
||||
|
||||
@@ -226,7 +229,7 @@ TEST_P(Trans4x4DCT, InvAccuracyCheck) {
|
||||
|
||||
class Trans4x4HT
|
||||
: public Trans4x4TestBase,
|
||||
public PARAMS(fht_t, iht_t, int) {
|
||||
public ::testing::TestWithParam<ht_4x4_param_t> {
|
||||
public:
|
||||
virtual ~Trans4x4HT() {}
|
||||
|
||||
|
@@ -35,6 +35,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
|
||||
typedef void (*iht_t) (const int16_t *in, uint8_t *out, int stride,
|
||||
int tx_type);
|
||||
|
||||
typedef std::tr1::tuple<fdct_t, idct_t, int> dct_8x8_param_t;
|
||||
typedef std::tr1::tuple<fht_t, iht_t, int> ht_8x8_param_t;
|
||||
|
||||
void fdct8x8_ref(const int16_t *in, int16_t *out, int stride, int tx_type) {
|
||||
vp9_fdct8x8_c(in, out, stride);
|
||||
}
|
||||
@@ -215,8 +218,9 @@ class FwdTrans8x8TestBase {
|
||||
fht_t fwd_txfm_ref;
|
||||
};
|
||||
|
||||
class FwdTrans8x8DCT : public FwdTrans8x8TestBase,
|
||||
public PARAMS(fdct_t, idct_t, int) {
|
||||
class FwdTrans8x8DCT
|
||||
: public FwdTrans8x8TestBase,
|
||||
public ::testing::TestWithParam<dct_8x8_param_t> {
|
||||
public:
|
||||
virtual ~FwdTrans8x8DCT() {}
|
||||
|
||||
@@ -254,8 +258,9 @@ TEST_P(FwdTrans8x8DCT, ExtremalCheck) {
|
||||
RunExtremalCheck();
|
||||
}
|
||||
|
||||
class FwdTrans8x8HT : public FwdTrans8x8TestBase,
|
||||
public PARAMS(fht_t, iht_t, int) {
|
||||
class FwdTrans8x8HT
|
||||
: public FwdTrans8x8TestBase,
|
||||
public ::testing::TestWithParam<ht_8x8_param_t> {
|
||||
public:
|
||||
virtual ~FwdTrans8x8HT() {}
|
||||
|
||||
|
207
test/lru_frame_buffer_test.cc
Normal file
207
test/lru_frame_buffer_test.cc
Normal file
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <queue>
|
||||
#include <string>
|
||||
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/decode_test_driver.h"
|
||||
#include "test/ivf_video_source.h"
|
||||
#include "test/md5_helper.h"
|
||||
#include "test/util.h"
|
||||
#include "test/webm_video_source.h"
|
||||
|
||||
namespace {
|
||||
|
||||
const int kVideoNameParam = 1;
|
||||
|
||||
const char *kLRUTestVectors[] = {
|
||||
"vp90-2-02-size-lf-1920x1080.webm",
|
||||
"vp90-2-05-resize.ivf",
|
||||
};
|
||||
|
||||
// Callback used by libvpx to request the application to allocate a frame
|
||||
// buffer of at least |new_size| in bytes.
|
||||
int realloc_vp9_frame_buffer(void *user_priv, size_t new_size,
|
||||
vpx_codec_frame_buffer_t *fb) {
|
||||
(void)user_priv;
|
||||
if (fb == NULL)
|
||||
return -1;
|
||||
|
||||
delete [] fb->data;
|
||||
fb->data = new uint8_t[new_size];
|
||||
fb->size = new_size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Class for testing libvpx is using the least recently
|
||||
// used frame buffer when a new buffer is requested.
|
||||
class LRUFrameBufferTest
|
||||
: public ::libvpx_test::DecoderTest,
|
||||
public ::libvpx_test::CodecTestWithParam<const char*> {
|
||||
protected:
|
||||
struct FrameBufferMD5Sum {
|
||||
int frame_buffer_index;
|
||||
vpx_image_t img;
|
||||
std::string md5;
|
||||
};
|
||||
|
||||
LRUFrameBufferTest()
|
||||
: DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)),
|
||||
num_buffers_(0),
|
||||
num_jitter_buffers_(0),
|
||||
frame_buffers_(NULL) {}
|
||||
|
||||
virtual ~LRUFrameBufferTest() {
|
||||
for (int i = 0; i < num_buffers_; ++i) {
|
||||
delete [] frame_buffers_[i].data;
|
||||
}
|
||||
delete [] frame_buffers_;
|
||||
}
|
||||
|
||||
virtual void PreDecodeFrameHook(
|
||||
const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
// Use external buffers for testing jitter buffers.
|
||||
if (num_jitter_buffers_ > 0 && video.frame_number() == 0) {
|
||||
const int max_reference_buffers = 8;
|
||||
|
||||
// Add 1 for a work buffer.
|
||||
num_buffers_ = max_reference_buffers + 1 + num_jitter_buffers_;
|
||||
|
||||
// Have libvpx use frame buffers we create.
|
||||
frame_buffers_ = new vpx_codec_frame_buffer_t[num_buffers_];
|
||||
memset(frame_buffers_, 0, sizeof(frame_buffers_[0]) * num_buffers_);
|
||||
|
||||
decoder->SetExternalFrameBuffers(frame_buffers_, num_buffers_,
|
||||
realloc_vp9_frame_buffer, NULL);
|
||||
}
|
||||
|
||||
// Turn on frame buffer LRU cache.
|
||||
decoder->Control(VP9D_SET_FRAME_BUFFER_LRU_CACHE, 1);
|
||||
}
|
||||
|
||||
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||
const unsigned int frame_number) {
|
||||
const uint32_t ximg_y_plane = 0;
|
||||
const uint8_t *const y_buffer = img.planes[ximg_y_plane];
|
||||
|
||||
// Find which external buffer contains the y_buffer.
|
||||
int i = 0;
|
||||
for (i = 0; i < num_buffers_; ++i) {
|
||||
if (y_buffer >= frame_buffers_[i].data &&
|
||||
y_buffer < (frame_buffers_[i].data + frame_buffers_[i].size)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
FrameBufferMD5Sum fb_md5;
|
||||
fb_md5.frame_buffer_index = i;
|
||||
fb_md5.img = img;
|
||||
|
||||
libvpx_test::MD5 md5;
|
||||
md5.Add(&img);
|
||||
fb_md5.md5 = md5.Get();
|
||||
jitter_buffer_md5_sums_.push(fb_md5);
|
||||
|
||||
// Check to see if any of the reconstructed image changed.
|
||||
if (jitter_buffer_md5_sums_.size() >
|
||||
static_cast<size_t>(num_jitter_buffers_)) {
|
||||
fb_md5 = jitter_buffer_md5_sums_.front();
|
||||
|
||||
libvpx_test::MD5 md5;
|
||||
md5.Add(&fb_md5.img);
|
||||
const std::string check_str = md5.Get();
|
||||
|
||||
ASSERT_EQ(fb_md5.md5, check_str);
|
||||
jitter_buffer_md5_sums_.pop();
|
||||
}
|
||||
}
|
||||
|
||||
libvpx_test::CompressedVideoSource *OpenCompressedFile(
|
||||
const std::string &filename) {
|
||||
if (filename.substr(filename.length() - 3, 3) == "ivf") {
|
||||
return new libvpx_test::IVFVideoSource(filename);
|
||||
} else if (filename.substr(filename.length() - 4, 4) == "webm") {
|
||||
return new libvpx_test::WebMVideoSource(filename);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void set_num_jitter_buffers(int num_buffers) {
|
||||
num_jitter_buffers_ = num_buffers;
|
||||
}
|
||||
|
||||
private:
|
||||
// Total number of external frame buffers.
|
||||
int num_buffers_;
|
||||
int num_jitter_buffers_;
|
||||
|
||||
// External frame buffers used by libvpx.
|
||||
vpx_codec_frame_buffer_t *frame_buffers_;
|
||||
|
||||
// Save the md5 checksums for later comparison.
|
||||
std::queue<FrameBufferMD5Sum> jitter_buffer_md5_sums_;
|
||||
};
|
||||
|
||||
// This test runs through a set of test vectors, and decodes them.
|
||||
// Libvpx will call into the application to allocate a frame buffer when
|
||||
// needed. The md5 checksums are computed for each frame after it is
|
||||
// decoded and stored to be checked later. After a jitter frame buffer
|
||||
// has expired, the md5 checksum is computed again for the expired jitter
|
||||
// buffer frame and checked against the md5 checksum after the frame was
|
||||
// decoded. If md5 checksums match, then the test is passed. Otherwise,
|
||||
// the test failed.
|
||||
TEST_P(LRUFrameBufferTest, CheckLRUOneJitterBuffer) {
|
||||
const std::string filename = GET_PARAM(kVideoNameParam);
|
||||
|
||||
set_num_jitter_buffers(1);
|
||||
|
||||
libvpx_test::CompressedVideoSource *const video =
|
||||
OpenCompressedFile(filename);
|
||||
video->Init();
|
||||
|
||||
// Decode frame, and check the md5 matching.
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||
delete video;
|
||||
}
|
||||
|
||||
TEST_P(LRUFrameBufferTest, CheckLRUFourJitterBuffers) {
|
||||
const std::string filename = GET_PARAM(kVideoNameParam);
|
||||
|
||||
set_num_jitter_buffers(4);
|
||||
|
||||
libvpx_test::CompressedVideoSource *const video =
|
||||
OpenCompressedFile(filename);
|
||||
video->Init();
|
||||
|
||||
// Decode frame, and check the md5 matching.
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||
delete video;
|
||||
}
|
||||
|
||||
TEST_P(LRUFrameBufferTest, CheckLRUEightJitterBuffers) {
|
||||
const std::string filename = GET_PARAM(kVideoNameParam);
|
||||
|
||||
set_num_jitter_buffers(8);
|
||||
|
||||
libvpx_test::CompressedVideoSource *const video =
|
||||
OpenCompressedFile(filename);
|
||||
video->Init();
|
||||
|
||||
// Decode frame, and check the md5 matching.
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||
delete video;
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(LRUFrameBufferTest,
|
||||
::testing::ValuesIn(kLRUTestVectors));
|
||||
} // namespace
|
172
test/partial_idct_test.cc
Normal file
172
test/partial_idct_test.cc
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "test/acm_random.h"
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
|
||||
extern "C" {
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_blockd.h"
|
||||
#include "vp9/common/vp9_scan.h"
|
||||
}
|
||||
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
using libvpx_test::ACMRandom;
|
||||
|
||||
namespace {
|
||||
typedef void (*fwd_txfm_t)(const int16_t *in, int16_t *out, int stride);
|
||||
typedef void (*inv_txfm_t)(const int16_t *in, uint8_t *out, int stride);
|
||||
typedef std::tr1::tuple<inv_txfm_t,
|
||||
inv_txfm_t,
|
||||
TX_SIZE, int> partial_itxfm_param_t;
|
||||
const int kMaxNumCoeffs = 1024;
|
||||
class PartialIDctTest : public ::testing::TestWithParam<partial_itxfm_param_t> {
|
||||
public:
|
||||
virtual ~PartialIDctTest() {}
|
||||
virtual void SetUp() {
|
||||
full_itxfm_ = GET_PARAM(0);
|
||||
partial_itxfm_ = GET_PARAM(1);
|
||||
tx_size_ = GET_PARAM(2);
|
||||
last_nonzero_ = GET_PARAM(3);
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
int last_nonzero_;
|
||||
TX_SIZE tx_size_;
|
||||
inv_txfm_t full_itxfm_;
|
||||
inv_txfm_t partial_itxfm_;
|
||||
};
|
||||
|
||||
TEST_P(PartialIDctTest, ResultsMatch) {
|
||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||
int size;
|
||||
switch (tx_size_) {
|
||||
case TX_4X4:
|
||||
size = 4;
|
||||
break;
|
||||
case TX_8X8:
|
||||
size = 8;
|
||||
break;
|
||||
case TX_16X16:
|
||||
size = 16;
|
||||
break;
|
||||
case TX_32X32:
|
||||
size = 32;
|
||||
break;
|
||||
default:
|
||||
FAIL() << "Wrong Size!";
|
||||
break;
|
||||
}
|
||||
DECLARE_ALIGNED_ARRAY(16, int16_t, test_coef_block1, kMaxNumCoeffs);
|
||||
DECLARE_ALIGNED_ARRAY(16, int16_t, test_coef_block2, kMaxNumCoeffs);
|
||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst1, kMaxNumCoeffs);
|
||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst2, kMaxNumCoeffs);
|
||||
const int count_test_block = 1000;
|
||||
const int max_coeff = 32766 / 4;
|
||||
const int block_size = size * size;
|
||||
int max_error = 0;
|
||||
for (int i = 0; i < count_test_block; ++i) {
|
||||
// clear out destination buffer
|
||||
memset(dst1, 0, sizeof(*dst1) * block_size);
|
||||
memset(dst2, 0, sizeof(*dst2) * block_size);
|
||||
memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size);
|
||||
memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size);
|
||||
int max_energy_leftover = max_coeff * max_coeff;
|
||||
for (int j = 0; j < last_nonzero_; ++j) {
|
||||
int16_t coef = static_cast<int16_t>(sqrt(max_energy_leftover) *
|
||||
(rnd.Rand16() - 32768) / 65536);
|
||||
max_energy_leftover -= coef * coef;
|
||||
if (max_energy_leftover < 0) {
|
||||
max_energy_leftover = 0;
|
||||
coef = 0;
|
||||
}
|
||||
test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]] = coef;
|
||||
}
|
||||
|
||||
memcpy(test_coef_block2, test_coef_block1,
|
||||
sizeof(*test_coef_block2) * block_size);
|
||||
|
||||
REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size));
|
||||
REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block2, dst2, size));
|
||||
|
||||
for (int j = 0; j < block_size; ++j) {
|
||||
const int diff = dst1[j] - dst2[j];
|
||||
const int error = diff * diff;
|
||||
if (max_error < error)
|
||||
max_error = error;
|
||||
}
|
||||
}
|
||||
|
||||
EXPECT_EQ(0, max_error)
|
||||
<< "Error: partial inverse transform produces different results";
|
||||
}
|
||||
using std::tr1::make_tuple;
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, PartialIDctTest,
|
||||
::testing::Values(
|
||||
make_tuple(vp9_idct32x32_1024_add_c,
|
||||
vp9_idct32x32_34_add_c,
|
||||
TX_32X32, 34),
|
||||
make_tuple(vp9_idct32x32_1024_add_c,
|
||||
vp9_idct32x32_1_add_c,
|
||||
TX_32X32, 1),
|
||||
make_tuple(vp9_idct16x16_256_add_c,
|
||||
vp9_idct16x16_10_add_c,
|
||||
TX_16X16, 10),
|
||||
make_tuple(vp9_idct16x16_256_add_c,
|
||||
vp9_idct16x16_1_add_c,
|
||||
TX_16X16, 1),
|
||||
make_tuple(vp9_idct8x8_64_add_c,
|
||||
vp9_idct8x8_10_add_c,
|
||||
TX_8X8, 10),
|
||||
make_tuple(vp9_idct8x8_64_add_c,
|
||||
vp9_idct8x8_1_add_c,
|
||||
TX_8X8, 1),
|
||||
make_tuple(vp9_idct4x4_16_add_c,
|
||||
vp9_idct4x4_1_add_c,
|
||||
TX_4X4, 1)));
|
||||
#if HAVE_SSE2
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, PartialIDctTest,
|
||||
::testing::Values(
|
||||
make_tuple(vp9_idct32x32_1024_add_c,
|
||||
vp9_idct32x32_34_add_sse2,
|
||||
TX_32X32, 34),
|
||||
make_tuple(vp9_idct32x32_1024_add_c,
|
||||
vp9_idct32x32_1_add_sse2,
|
||||
TX_32X32, 1),
|
||||
make_tuple(vp9_idct16x16_256_add_c,
|
||||
vp9_idct16x16_10_add_sse2,
|
||||
TX_16X16, 10),
|
||||
make_tuple(vp9_idct16x16_256_add_c,
|
||||
vp9_idct16x16_1_add_sse2,
|
||||
TX_16X16, 1),
|
||||
make_tuple(vp9_idct8x8_64_add_c,
|
||||
vp9_idct8x8_10_add_sse2,
|
||||
TX_8X8, 10),
|
||||
make_tuple(vp9_idct8x8_64_add_c,
|
||||
vp9_idct8x8_1_add_sse2,
|
||||
TX_8X8, 1),
|
||||
make_tuple(vp9_idct4x4_16_add_c,
|
||||
vp9_idct4x4_1_add_sse2,
|
||||
TX_4X4, 1)));
|
||||
#endif
|
||||
} // namespace
|
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
@@ -32,7 +32,10 @@ typedef void (*sixtap_predict_fn_t)(uint8_t *src_ptr,
|
||||
uint8_t *dst_ptr,
|
||||
int dst_pitch);
|
||||
|
||||
class SixtapPredictTest : public PARAMS(int, int, sixtap_predict_fn_t) {
|
||||
typedef std::tr1::tuple<int, int, sixtap_predict_fn_t> sixtap_predict_param_t;
|
||||
|
||||
class SixtapPredictTest
|
||||
: public ::testing::TestWithParam<sixtap_predict_param_t> {
|
||||
public:
|
||||
static void SetUpTestCase() {
|
||||
src_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kSrcSize));
|
||||
|
@@ -41,7 +41,6 @@ class SvcTest : public ::testing::Test {
|
||||
virtual ~SvcTest() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
svc_.first_frame_full_size = 1;
|
||||
svc_.encoding_mode = INTER_LAYER_PREDICTION_IP;
|
||||
svc_.log_level = SVC_LOG_DEBUG;
|
||||
svc_.log_print = 0;
|
||||
@@ -185,7 +184,6 @@ TEST_F(SvcTest, SetQuantizers) {
|
||||
res = vpx_svc_set_quantizers(&svc_, NULL);
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
|
||||
|
||||
svc_.first_frame_full_size = 0;
|
||||
svc_.spatial_layers = 2;
|
||||
res = vpx_svc_set_quantizers(&svc_, "40");
|
||||
EXPECT_EQ(VPX_CODEC_OK, res);
|
||||
@@ -206,7 +204,6 @@ TEST_F(SvcTest, SetScaleFactors) {
|
||||
res = vpx_svc_set_scale_factors(&svc_, NULL);
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
|
||||
|
||||
svc_.first_frame_full_size = 0;
|
||||
svc_.spatial_layers = 2;
|
||||
res = vpx_svc_set_scale_factors(&svc_, "4/16");
|
||||
EXPECT_EQ(VPX_CODEC_OK, res);
|
||||
@@ -220,11 +217,8 @@ TEST_F(SvcTest, SetScaleFactors) {
|
||||
codec_initialized_ = true;
|
||||
}
|
||||
|
||||
// test that decoder can handle an SVC frame as the first frame in a sequence
|
||||
// this test is disabled since it always fails because of a decoder issue
|
||||
// https://code.google.com/p/webm/issues/detail?id=654
|
||||
TEST_F(SvcTest, DISABLED_FirstFrameHasLayers) {
|
||||
svc_.first_frame_full_size = 0;
|
||||
// Test that decoder can handle an SVC frame as the first frame in a sequence.
|
||||
TEST_F(SvcTest, FirstFrameHasLayers) {
|
||||
svc_.spatial_layers = 2;
|
||||
vpx_svc_set_scale_factors(&svc_, "4/16,16/16");
|
||||
vpx_svc_set_quantizers(&svc_, "40,30");
|
||||
@@ -252,7 +246,6 @@ TEST_F(SvcTest, DISABLED_FirstFrameHasLayers) {
|
||||
}
|
||||
|
||||
TEST_F(SvcTest, EncodeThreeFrames) {
|
||||
svc_.first_frame_full_size = 1;
|
||||
svc_.spatial_layers = 2;
|
||||
vpx_svc_set_scale_factors(&svc_, "4/16,16/16");
|
||||
vpx_svc_set_quantizers(&svc_, "40,30");
|
||||
@@ -265,9 +258,9 @@ TEST_F(SvcTest, EncodeThreeFrames) {
|
||||
libvpx_test::I420VideoSource video(test_file_name_, kWidth, kHeight,
|
||||
codec_enc_.g_timebase.den,
|
||||
codec_enc_.g_timebase.num, 0, 30);
|
||||
// FRAME 1
|
||||
// FRAME 0
|
||||
video.Begin();
|
||||
// this frame is full size, with only one layer
|
||||
// This frame is a keyframe.
|
||||
res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
|
||||
video.duration(), VPX_DL_REALTIME);
|
||||
ASSERT_EQ(VPX_CODEC_OK, res);
|
||||
@@ -278,13 +271,13 @@ TEST_F(SvcTest, EncodeThreeFrames) {
|
||||
vpx_svc_get_frame_size(&svc_));
|
||||
ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder_->DecodeError();
|
||||
|
||||
// FRAME 2
|
||||
// FRAME 1
|
||||
video.Next();
|
||||
// this is an I-frame
|
||||
// This is a P-frame.
|
||||
res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
|
||||
video.duration(), VPX_DL_REALTIME);
|
||||
ASSERT_EQ(VPX_CODEC_OK, res);
|
||||
EXPECT_EQ(1, vpx_svc_is_keyframe(&svc_));
|
||||
EXPECT_EQ(0, vpx_svc_is_keyframe(&svc_));
|
||||
|
||||
res_dec = decoder_->DecodeFrame(
|
||||
static_cast<const uint8_t *>(vpx_svc_get_buffer(&svc_)),
|
||||
@@ -293,7 +286,7 @@ TEST_F(SvcTest, EncodeThreeFrames) {
|
||||
|
||||
// FRAME 2
|
||||
video.Next();
|
||||
// this is a P-frame
|
||||
// This is a P-frame.
|
||||
res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
|
||||
video.duration(), VPX_DL_REALTIME);
|
||||
ASSERT_EQ(VPX_CODEC_OK, res);
|
||||
@@ -306,7 +299,6 @@ TEST_F(SvcTest, EncodeThreeFrames) {
|
||||
}
|
||||
|
||||
TEST_F(SvcTest, GetLayerResolution) {
|
||||
svc_.first_frame_full_size = 0;
|
||||
svc_.spatial_layers = 2;
|
||||
vpx_svc_set_scale_factors(&svc_, "4/16,8/16");
|
||||
vpx_svc_set_quantizers(&svc_, "40,30");
|
||||
|
@@ -61,6 +61,7 @@ c87599cbecd72d4cd4f7ace3313b7a6bc6eb8163 vp80-05-sharpness-1438.ivf
|
||||
aff51d865c2621b60510459244ea83e958e4baed vp80-05-sharpness-1439.ivf
|
||||
da386e72b19b5485a6af199c5eb60ef25e510dd1 vp80-05-sharpness-1440.ivf
|
||||
6759a095203d96ccd267ce09b1b050b8cc4c2f1f vp80-05-sharpness-1443.ivf
|
||||
b95d3cc1d0df991e63e150a801710a72f20d9ba0 vp80-06-smallsize.ivf
|
||||
db55ec7fd02c864ba996ff060b25b1e08611330b vp80-00-comprehensive-001.ivf.md5
|
||||
29db0ad011cba1e45f856d5623cd38dac3e3bf19 vp80-00-comprehensive-002.ivf.md5
|
||||
e84f258f69e173e7d68f8f8c037a0a3766902182 vp80-00-comprehensive-003.ivf.md5
|
||||
@@ -122,6 +123,7 @@ f95eb6214571434f1f73ab7833b9ccdf47588020 vp80-03-segmentation-1437.ivf.md5
|
||||
086c56378df81b6cee264d7540a7b8f2b405c7a4 vp80-05-sharpness-1439.ivf.md5
|
||||
d32dc2c4165eb266ea4c23c14a45459b363def32 vp80-05-sharpness-1440.ivf.md5
|
||||
8c69dc3d8e563f56ffab5ad1e400d9e689dd23df vp80-05-sharpness-1443.ivf.md5
|
||||
d6f246df012c241b5fa6c1345019a3703d85c419 vp80-06-smallsize.ivf.md5
|
||||
ce881e567fe1d0fbcb2d3e9e6281a1a8d74d82e0 vp90-2-00-quantizer-00.webm
|
||||
ac5eda33407d0521c7afca43a63fd305c0cd9d13 vp90-2-00-quantizer-00.webm.md5
|
||||
2ca0463f2cfb93d25d7dded174db70b7cb87cb48 vp90-2-00-quantizer-01.webm
|
||||
@@ -542,3 +544,32 @@ c9b237dfcc01c1b414fbcaa481d014a906ef7998 vp90-2-08-tile_1x4.webm.md5
|
||||
ae7451810247fd13975cc257aa0301ff17102255 vp90-2-08-tile-4x4.webm.md5
|
||||
2ec6e15422ac7a61af072dc5f27fcaf1942ce116 vp90-2-08-tile-4x1.webm
|
||||
0094f5ee5e46345017c30e0aa4835b550212d853 vp90-2-08-tile-4x1.webm.md5
|
||||
edea45dac4a3c2e5372339f8851d24c9bef803d6 vp90-2-09-subpixel-00.ivf
|
||||
5428efc4bf92191faedf4a727fcd1d94966a7abc vp90-2-09-subpixel-00.ivf.md5
|
||||
8cdd435d89029987ee196896e21520e5f879f04d vp90-2-bbb_1280x720_tile_1x4_1310kbps.webm
|
||||
091b373aa2ecb59aa5c647affd5bcafcc7547364 vp90-2-bbb_1920x1080_tile_1x1_2581kbps.webm
|
||||
87ee28032b0963a44b73a850fcc816a6dc83efbb vp90-2-bbb_1920x1080_tile_1x4_2586kbps.webm
|
||||
c6ce25c4bfd4bdfc2932b70428e3dfe11210ec4f vp90-2-bbb_1920x1080_tile_1x4_fpm_2304kbps.webm
|
||||
2064bdb22aa71c2691e0469fb62e8087a43f08f8 vp90-2-bbb_426x240_tile_1x1_180kbps.webm
|
||||
8080eda22694910162f0996e8a962612f381a57f vp90-2-bbb_640x360_tile_1x2_337kbps.webm
|
||||
a484b335c27ea189c0f0d77babea4a510ce12d50 vp90-2-bbb_854x480_tile_1x2_651kbps.webm
|
||||
3eacf1f006250be4cc5c92a7ef146e385ee62653 vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm
|
||||
217f089a16447490823127b36ce0d945522accfd vp90-2-sintel_1920x818_tile_1x4_fpm_2279kbps.webm
|
||||
eedb3c641e60dacbe082491a16df529a5c9187df vp90-2-sintel_426x182_tile_1x1_171kbps.webm
|
||||
cb7e4955af183dff33bcba0c837f0922ab066400 vp90-2-sintel_640x272_tile_1x2_318kbps.webm
|
||||
48613f9380e2580002f8a09d6e412ea4e89a52b9 vp90-2-sintel_854x364_tile_1x2_621kbps.webm
|
||||
990a91f24dd284562d21d714ae773dff5452cad8 vp90-2-tos_1280x534_tile_1x4_1306kbps.webm
|
||||
b6dd558c90bca466b4bcbd03b3371648186465a7 vp90-2-tos_1920x800_tile_1x4_fpm_2335kbps.webm
|
||||
1a9c2914ba932a38f0a143efc1ad0e318e78888b vp90-2-tos_426x178_tile_1x1_181kbps.webm
|
||||
a3d2b09f24debad4747a1b3066f572be4273bced vp90-2-tos_640x266_tile_1x2_336kbps.webm
|
||||
c64b03b5c090e6888cb39685c31f00a6b79fa45c vp90-2-tos_854x356_tile_1x2_656kbps.webm
|
||||
0e7cd4135b231c9cea8d76c19f9e84b6fd77acec vp90-2-08-tile_1x8_frame_parallel.webm
|
||||
c9b6850af28579b031791066457f4cb40df6e1c7 vp90-2-08-tile_1x8_frame_parallel.webm.md5
|
||||
e448b6e83490bca0f8d58b4f4b1126a17baf4b0c vp90-2-08-tile_1x8.webm
|
||||
5e524165f0397e6141d914f4f0a66267d7658376 vp90-2-08-tile_1x8.webm.md5
|
||||
a34e14923d6d17b1144254d8187d7f85b700a63c vp90-2-02-size-lf-1920x1080.webm
|
||||
e3b28ddcfaeb37fb4d132b93f92642a9ad17c22d vp90-2-02-size-lf-1920x1080.webm.md5
|
||||
d48c5db1b0f8e60521a7c749696b8067886033a3 vp90-2-09-aq2.webm
|
||||
84c1599298aac78f2fc05ae2274575d10569dfa0 vp90-2-09-aq2.webm.md5
|
||||
55fc55ed73d578ed60fad05692579873f8bad758 vp90-2-09-lf_deltas.webm
|
||||
54638c38009198c38c8f3b25c182b709b6c1fd2e vp90-2-09-lf_deltas.webm.md5
|
||||
|
63
test/test.mk
63
test/test.mk
@@ -7,6 +7,8 @@ LIBVPX_TEST_SRCS-yes += codec_factory.h
|
||||
LIBVPX_TEST_SRCS-yes += test_libvpx.cc
|
||||
LIBVPX_TEST_SRCS-yes += util.h
|
||||
LIBVPX_TEST_SRCS-yes += video_source.h
|
||||
LIBVPX_TEST_SRCS-yes += test_vectors.h
|
||||
LIBVPX_TEST_SRCS-yes += test_vectors.cc
|
||||
|
||||
##
|
||||
## BLACK BOX TESTS
|
||||
@@ -32,6 +34,8 @@ LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../md5_utils.h ../md5_utils.c
|
||||
LIBVPX_TEST_SRCS-yes += decode_test_driver.cc
|
||||
LIBVPX_TEST_SRCS-yes += decode_test_driver.h
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ivf_video_source.h
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += external_frame_buffer_test.cc
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += lru_frame_buffer_test.cc
|
||||
|
||||
## WebM Parsing
|
||||
NESTEGG_SRCS += ../nestegg/halloc/halloc.h
|
||||
@@ -44,6 +48,10 @@ LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += $(NESTEGG_SRCS)
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += webm_video_source.h
|
||||
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += test_vector_test.cc
|
||||
# Currently we only support decoder perf tests for vp9
|
||||
ifeq ($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_VP9_DECODER), yesyes)
|
||||
LIBVPX_TEST_SRCS-yes += decode_perf_test.cc
|
||||
endif
|
||||
|
||||
##
|
||||
## WHITE BOX TESTS
|
||||
@@ -84,6 +92,7 @@ LIBVPX_TEST_SRCS-yes += vp9_boolcoder_test.cc
|
||||
|
||||
# IDCT test currently depends on FDCT function
|
||||
LIBVPX_TEST_SRCS-yes += idct8x8_test.cc
|
||||
LIBVPX_TEST_SRCS-yes += partial_idct_test.cc
|
||||
LIBVPX_TEST_SRCS-yes += superframe_test.cc
|
||||
LIBVPX_TEST_SRCS-yes += tile_independence_test.cc
|
||||
endif
|
||||
@@ -171,6 +180,7 @@ LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1438.ivf
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1439.ivf
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1440.ivf
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1443.ivf
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-06-smallsize.ivf
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-001.ivf.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-002.ivf.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-003.ivf.md5
|
||||
@@ -232,6 +242,7 @@ LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1438.ivf.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1439.ivf.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1440.ivf.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1443.ivf.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-06-smallsize.ivf.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-00.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-00.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-01.webm
|
||||
@@ -502,6 +513,8 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x196.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x196.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x198.webm
|
||||
@@ -646,9 +659,59 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4_frame_parallel.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4_frame_parallel.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8_frame_parallel.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8_frame_parallel.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x4.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x4.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x1.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x1.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-subpixel-00.ivf
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-subpixel-00.ivf.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-aq2.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-aq2.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-lf_deltas.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-lf_deltas.webm.md5
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm.md5
|
||||
|
||||
ifeq ($(CONFIG_DECODE_PERF_TESTS),yes)
|
||||
# BBB VP9 streams
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-bbb_426x240_tile_1x1_180kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-bbb_640x360_tile_1x2_337kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-bbb_854x480_tile_1x2_651kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-bbb_1280x720_tile_1x4_1310kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-bbb_1920x1080_tile_1x1_2581kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-bbb_1920x1080_tile_1x4_2586kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-bbb_1920x1080_tile_1x4_fpm_2304kbps.webm
|
||||
#Sintel VP9 streams
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-sintel_426x182_tile_1x1_171kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-sintel_640x272_tile_1x2_318kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-sintel_854x364_tile_1x2_621kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-sintel_1920x818_tile_1x4_fpm_2279kbps.webm
|
||||
# TOS VP9 streams
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-tos_426x178_tile_1x1_181kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-tos_640x266_tile_1x2_336kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-tos_854x356_tile_1x2_656kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-tos_1280x534_tile_1x4_1306kbps.webm
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
|
||||
vp90-2-tos_1920x800_tile_1x4_fpm_2335kbps.webm
|
||||
endif # CONFIG_DECODE_PERF_TESTS
|
||||
|
@@ -22,8 +22,10 @@ extern void vp9_rtcd();
|
||||
}
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
static void append_gtest_filter(const char *str) {
|
||||
static void append_negative_gtest_filter(const char *str) {
|
||||
std::string filter = ::testing::FLAGS_gtest_filter;
|
||||
// Negative patterns begin with one '-' followed by a ':' separated list.
|
||||
if (filter.find('-') == std::string::npos) filter += '-';
|
||||
filter += str;
|
||||
::testing::FLAGS_gtest_filter = filter;
|
||||
}
|
||||
@@ -34,21 +36,21 @@ int main(int argc, char **argv) {
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
const int simd_caps = x86_simd_caps();
|
||||
if (!(simd_caps & HAS_MMX))
|
||||
append_gtest_filter(":-MMX/*");
|
||||
append_negative_gtest_filter(":-MMX/*");
|
||||
if (!(simd_caps & HAS_SSE))
|
||||
append_gtest_filter(":-SSE/*");
|
||||
append_negative_gtest_filter(":-SSE/*");
|
||||
if (!(simd_caps & HAS_SSE2))
|
||||
append_gtest_filter(":-SSE2/*");
|
||||
append_negative_gtest_filter(":-SSE2/*");
|
||||
if (!(simd_caps & HAS_SSE3))
|
||||
append_gtest_filter(":-SSE3/*");
|
||||
append_negative_gtest_filter(":-SSE3/*");
|
||||
if (!(simd_caps & HAS_SSSE3))
|
||||
append_gtest_filter(":-SSSE3/*");
|
||||
append_negative_gtest_filter(":-SSSE3/*");
|
||||
if (!(simd_caps & HAS_SSE4_1))
|
||||
append_gtest_filter(":-SSE4_1/*");
|
||||
append_negative_gtest_filter(":-SSE4_1/*");
|
||||
if (!(simd_caps & HAS_AVX))
|
||||
append_gtest_filter(":-AVX/*");
|
||||
append_negative_gtest_filter(":AVX/*");
|
||||
if (!(simd_caps & HAS_AVX2))
|
||||
append_gtest_filter(":-AVX2/*");
|
||||
append_negative_gtest_filter(":AVX2/*");
|
||||
#endif
|
||||
|
||||
#if !CONFIG_SHARED
|
||||
|
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
||||
|
||||
Use of this source code is governed by a BSD-style license
|
||||
that can be found in the LICENSE file in the root of the source
|
||||
tree. An additional intellectual property rights grant can be found
|
||||
in the file PATENTS. All contributing project authors may
|
||||
be found in the AUTHORS file in the root of the source tree.
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
@@ -15,161 +15,15 @@
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/decode_test_driver.h"
|
||||
#include "test/ivf_video_source.h"
|
||||
#include "test/webm_video_source.h"
|
||||
#include "test/util.h"
|
||||
#include "test/md5_helper.h"
|
||||
#include "test/test_vectors.h"
|
||||
#include "test/util.h"
|
||||
#include "test/webm_video_source.h"
|
||||
extern "C" {
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
}
|
||||
|
||||
namespace {
|
||||
#if CONFIG_VP8_DECODER
|
||||
const char *kVP8TestVectors[] = {
|
||||
"vp80-00-comprehensive-001.ivf",
|
||||
"vp80-00-comprehensive-002.ivf", "vp80-00-comprehensive-003.ivf",
|
||||
"vp80-00-comprehensive-004.ivf", "vp80-00-comprehensive-005.ivf",
|
||||
"vp80-00-comprehensive-006.ivf", "vp80-00-comprehensive-007.ivf",
|
||||
"vp80-00-comprehensive-008.ivf", "vp80-00-comprehensive-009.ivf",
|
||||
"vp80-00-comprehensive-010.ivf", "vp80-00-comprehensive-011.ivf",
|
||||
"vp80-00-comprehensive-012.ivf", "vp80-00-comprehensive-013.ivf",
|
||||
"vp80-00-comprehensive-014.ivf", "vp80-00-comprehensive-015.ivf",
|
||||
"vp80-00-comprehensive-016.ivf", "vp80-00-comprehensive-017.ivf",
|
||||
"vp80-00-comprehensive-018.ivf", "vp80-01-intra-1400.ivf",
|
||||
"vp80-01-intra-1411.ivf", "vp80-01-intra-1416.ivf",
|
||||
"vp80-01-intra-1417.ivf", "vp80-02-inter-1402.ivf",
|
||||
"vp80-02-inter-1412.ivf", "vp80-02-inter-1418.ivf",
|
||||
"vp80-02-inter-1424.ivf", "vp80-03-segmentation-01.ivf",
|
||||
"vp80-03-segmentation-02.ivf", "vp80-03-segmentation-03.ivf",
|
||||
"vp80-03-segmentation-04.ivf", "vp80-03-segmentation-1401.ivf",
|
||||
"vp80-03-segmentation-1403.ivf", "vp80-03-segmentation-1407.ivf",
|
||||
"vp80-03-segmentation-1408.ivf", "vp80-03-segmentation-1409.ivf",
|
||||
"vp80-03-segmentation-1410.ivf", "vp80-03-segmentation-1413.ivf",
|
||||
"vp80-03-segmentation-1414.ivf", "vp80-03-segmentation-1415.ivf",
|
||||
"vp80-03-segmentation-1425.ivf", "vp80-03-segmentation-1426.ivf",
|
||||
"vp80-03-segmentation-1427.ivf", "vp80-03-segmentation-1432.ivf",
|
||||
"vp80-03-segmentation-1435.ivf", "vp80-03-segmentation-1436.ivf",
|
||||
"vp80-03-segmentation-1437.ivf", "vp80-03-segmentation-1441.ivf",
|
||||
"vp80-03-segmentation-1442.ivf", "vp80-04-partitions-1404.ivf",
|
||||
"vp80-04-partitions-1405.ivf", "vp80-04-partitions-1406.ivf",
|
||||
"vp80-05-sharpness-1428.ivf", "vp80-05-sharpness-1429.ivf",
|
||||
"vp80-05-sharpness-1430.ivf", "vp80-05-sharpness-1431.ivf",
|
||||
"vp80-05-sharpness-1433.ivf", "vp80-05-sharpness-1434.ivf",
|
||||
"vp80-05-sharpness-1438.ivf", "vp80-05-sharpness-1439.ivf",
|
||||
"vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf"
|
||||
};
|
||||
#endif
|
||||
#if CONFIG_VP9_DECODER
|
||||
const char *kVP9TestVectors[] = {
|
||||
"vp90-2-00-quantizer-00.webm", "vp90-2-00-quantizer-01.webm",
|
||||
"vp90-2-00-quantizer-02.webm", "vp90-2-00-quantizer-03.webm",
|
||||
"vp90-2-00-quantizer-04.webm", "vp90-2-00-quantizer-05.webm",
|
||||
"vp90-2-00-quantizer-06.webm", "vp90-2-00-quantizer-07.webm",
|
||||
"vp90-2-00-quantizer-08.webm", "vp90-2-00-quantizer-09.webm",
|
||||
"vp90-2-00-quantizer-10.webm", "vp90-2-00-quantizer-11.webm",
|
||||
"vp90-2-00-quantizer-12.webm", "vp90-2-00-quantizer-13.webm",
|
||||
"vp90-2-00-quantizer-14.webm", "vp90-2-00-quantizer-15.webm",
|
||||
"vp90-2-00-quantizer-16.webm", "vp90-2-00-quantizer-17.webm",
|
||||
"vp90-2-00-quantizer-18.webm", "vp90-2-00-quantizer-19.webm",
|
||||
"vp90-2-00-quantizer-20.webm", "vp90-2-00-quantizer-21.webm",
|
||||
"vp90-2-00-quantizer-22.webm", "vp90-2-00-quantizer-23.webm",
|
||||
"vp90-2-00-quantizer-24.webm", "vp90-2-00-quantizer-25.webm",
|
||||
"vp90-2-00-quantizer-26.webm", "vp90-2-00-quantizer-27.webm",
|
||||
"vp90-2-00-quantizer-28.webm", "vp90-2-00-quantizer-29.webm",
|
||||
"vp90-2-00-quantizer-30.webm", "vp90-2-00-quantizer-31.webm",
|
||||
"vp90-2-00-quantizer-32.webm", "vp90-2-00-quantizer-33.webm",
|
||||
"vp90-2-00-quantizer-34.webm", "vp90-2-00-quantizer-35.webm",
|
||||
"vp90-2-00-quantizer-36.webm", "vp90-2-00-quantizer-37.webm",
|
||||
"vp90-2-00-quantizer-38.webm", "vp90-2-00-quantizer-39.webm",
|
||||
"vp90-2-00-quantizer-40.webm", "vp90-2-00-quantizer-41.webm",
|
||||
"vp90-2-00-quantizer-42.webm", "vp90-2-00-quantizer-43.webm",
|
||||
"vp90-2-00-quantizer-44.webm", "vp90-2-00-quantizer-45.webm",
|
||||
"vp90-2-00-quantizer-46.webm", "vp90-2-00-quantizer-47.webm",
|
||||
"vp90-2-00-quantizer-48.webm", "vp90-2-00-quantizer-49.webm",
|
||||
"vp90-2-00-quantizer-50.webm", "vp90-2-00-quantizer-51.webm",
|
||||
"vp90-2-00-quantizer-52.webm", "vp90-2-00-quantizer-53.webm",
|
||||
"vp90-2-00-quantizer-54.webm", "vp90-2-00-quantizer-55.webm",
|
||||
"vp90-2-00-quantizer-56.webm", "vp90-2-00-quantizer-57.webm",
|
||||
"vp90-2-00-quantizer-58.webm", "vp90-2-00-quantizer-59.webm",
|
||||
"vp90-2-00-quantizer-60.webm", "vp90-2-00-quantizer-61.webm",
|
||||
"vp90-2-00-quantizer-62.webm", "vp90-2-00-quantizer-63.webm",
|
||||
"vp90-2-01-sharpness-1.webm", "vp90-2-01-sharpness-2.webm",
|
||||
"vp90-2-01-sharpness-3.webm", "vp90-2-01-sharpness-4.webm",
|
||||
"vp90-2-01-sharpness-5.webm", "vp90-2-01-sharpness-6.webm",
|
||||
"vp90-2-01-sharpness-7.webm", "vp90-2-02-size-08x08.webm",
|
||||
"vp90-2-02-size-08x10.webm", "vp90-2-02-size-08x16.webm",
|
||||
"vp90-2-02-size-08x18.webm", "vp90-2-02-size-08x32.webm",
|
||||
"vp90-2-02-size-08x34.webm", "vp90-2-02-size-08x64.webm",
|
||||
"vp90-2-02-size-08x66.webm", "vp90-2-02-size-10x08.webm",
|
||||
"vp90-2-02-size-10x10.webm", "vp90-2-02-size-10x16.webm",
|
||||
"vp90-2-02-size-10x18.webm", "vp90-2-02-size-10x32.webm",
|
||||
"vp90-2-02-size-10x34.webm", "vp90-2-02-size-10x64.webm",
|
||||
"vp90-2-02-size-10x66.webm", "vp90-2-02-size-16x08.webm",
|
||||
"vp90-2-02-size-16x10.webm", "vp90-2-02-size-16x16.webm",
|
||||
"vp90-2-02-size-16x18.webm", "vp90-2-02-size-16x32.webm",
|
||||
"vp90-2-02-size-16x34.webm", "vp90-2-02-size-16x64.webm",
|
||||
"vp90-2-02-size-16x66.webm", "vp90-2-02-size-18x08.webm",
|
||||
"vp90-2-02-size-18x10.webm", "vp90-2-02-size-18x16.webm",
|
||||
"vp90-2-02-size-18x18.webm", "vp90-2-02-size-18x32.webm",
|
||||
"vp90-2-02-size-18x34.webm", "vp90-2-02-size-18x64.webm",
|
||||
"vp90-2-02-size-18x66.webm", "vp90-2-02-size-32x08.webm",
|
||||
"vp90-2-02-size-32x10.webm", "vp90-2-02-size-32x16.webm",
|
||||
"vp90-2-02-size-32x18.webm", "vp90-2-02-size-32x32.webm",
|
||||
"vp90-2-02-size-32x34.webm", "vp90-2-02-size-32x64.webm",
|
||||
"vp90-2-02-size-32x66.webm", "vp90-2-02-size-34x08.webm",
|
||||
"vp90-2-02-size-34x10.webm", "vp90-2-02-size-34x16.webm",
|
||||
"vp90-2-02-size-34x18.webm", "vp90-2-02-size-34x32.webm",
|
||||
"vp90-2-02-size-34x34.webm", "vp90-2-02-size-34x64.webm",
|
||||
"vp90-2-02-size-34x66.webm", "vp90-2-02-size-64x08.webm",
|
||||
"vp90-2-02-size-64x10.webm", "vp90-2-02-size-64x16.webm",
|
||||
"vp90-2-02-size-64x18.webm", "vp90-2-02-size-64x32.webm",
|
||||
"vp90-2-02-size-64x34.webm", "vp90-2-02-size-64x64.webm",
|
||||
"vp90-2-02-size-64x66.webm", "vp90-2-02-size-66x08.webm",
|
||||
"vp90-2-02-size-66x10.webm", "vp90-2-02-size-66x16.webm",
|
||||
"vp90-2-02-size-66x18.webm", "vp90-2-02-size-66x32.webm",
|
||||
"vp90-2-02-size-66x34.webm", "vp90-2-02-size-66x64.webm",
|
||||
"vp90-2-02-size-66x66.webm", "vp90-2-03-size-196x196.webm",
|
||||
"vp90-2-03-size-196x198.webm", "vp90-2-03-size-196x200.webm",
|
||||
"vp90-2-03-size-196x202.webm", "vp90-2-03-size-196x208.webm",
|
||||
"vp90-2-03-size-196x210.webm", "vp90-2-03-size-196x224.webm",
|
||||
"vp90-2-03-size-196x226.webm", "vp90-2-03-size-198x196.webm",
|
||||
"vp90-2-03-size-198x198.webm", "vp90-2-03-size-198x200.webm",
|
||||
"vp90-2-03-size-198x202.webm", "vp90-2-03-size-198x208.webm",
|
||||
"vp90-2-03-size-198x210.webm", "vp90-2-03-size-198x224.webm",
|
||||
"vp90-2-03-size-198x226.webm", "vp90-2-03-size-200x196.webm",
|
||||
"vp90-2-03-size-200x198.webm", "vp90-2-03-size-200x200.webm",
|
||||
"vp90-2-03-size-200x202.webm", "vp90-2-03-size-200x208.webm",
|
||||
"vp90-2-03-size-200x210.webm", "vp90-2-03-size-200x224.webm",
|
||||
"vp90-2-03-size-200x226.webm", "vp90-2-03-size-202x196.webm",
|
||||
"vp90-2-03-size-202x198.webm", "vp90-2-03-size-202x200.webm",
|
||||
"vp90-2-03-size-202x202.webm", "vp90-2-03-size-202x208.webm",
|
||||
"vp90-2-03-size-202x210.webm", "vp90-2-03-size-202x224.webm",
|
||||
"vp90-2-03-size-202x226.webm", "vp90-2-03-size-208x196.webm",
|
||||
"vp90-2-03-size-208x198.webm", "vp90-2-03-size-208x200.webm",
|
||||
"vp90-2-03-size-208x202.webm", "vp90-2-03-size-208x208.webm",
|
||||
"vp90-2-03-size-208x210.webm", "vp90-2-03-size-208x224.webm",
|
||||
"vp90-2-03-size-208x226.webm", "vp90-2-03-size-210x196.webm",
|
||||
"vp90-2-03-size-210x198.webm", "vp90-2-03-size-210x200.webm",
|
||||
"vp90-2-03-size-210x202.webm", "vp90-2-03-size-210x208.webm",
|
||||
"vp90-2-03-size-210x210.webm", "vp90-2-03-size-210x224.webm",
|
||||
"vp90-2-03-size-210x226.webm", "vp90-2-03-size-224x196.webm",
|
||||
"vp90-2-03-size-224x198.webm", "vp90-2-03-size-224x200.webm",
|
||||
"vp90-2-03-size-224x202.webm", "vp90-2-03-size-224x208.webm",
|
||||
"vp90-2-03-size-224x210.webm", "vp90-2-03-size-224x224.webm",
|
||||
"vp90-2-03-size-224x226.webm", "vp90-2-03-size-226x196.webm",
|
||||
"vp90-2-03-size-226x198.webm", "vp90-2-03-size-226x200.webm",
|
||||
"vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm",
|
||||
"vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm",
|
||||
"vp90-2-03-size-226x226.webm", "vp90-2-03-deltaq.webm",
|
||||
"vp90-2-05-resize.ivf", "vp90-2-06-bilinear.webm",
|
||||
"vp90-2-07-frame_parallel.webm",
|
||||
"vp90-2-08-tile_1x2_frame_parallel.webm", "vp90-2-08-tile_1x2.webm",
|
||||
"vp90-2-08-tile_1x4_frame_parallel.webm", "vp90-2-08-tile_1x4.webm",
|
||||
"vp90-2-08-tile-4x4.webm", "vp90-2-08-tile-4x1.webm",
|
||||
#if CONFIG_NON420
|
||||
"vp91-2-04-yv444.webm"
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
class TestVectorTest : public ::libvpx_test::DecoderTest,
|
||||
public ::libvpx_test::CodecTestWithParam<const char*> {
|
||||
@@ -237,8 +91,8 @@ TEST_P(TestVectorTest, MD5Match) {
|
||||
}
|
||||
|
||||
VP8_INSTANTIATE_TEST_CASE(TestVectorTest,
|
||||
::testing::ValuesIn(kVP8TestVectors));
|
||||
::testing::ValuesIn(libvpx_test::kVP8TestVectors));
|
||||
VP9_INSTANTIATE_TEST_CASE(TestVectorTest,
|
||||
::testing::ValuesIn(kVP9TestVectors));
|
||||
::testing::ValuesIn(libvpx_test::kVP9TestVectors));
|
||||
|
||||
} // namespace
|
||||
|
169
test/test_vectors.cc
Normal file
169
test/test_vectors.cc
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "test/test_vectors.h"
|
||||
|
||||
namespace libvpx_test {
|
||||
|
||||
#if CONFIG_VP8_DECODER
|
||||
const char *kVP8TestVectors[kNumVp8TestVectors] = {
|
||||
"vp80-00-comprehensive-001.ivf",
|
||||
"vp80-00-comprehensive-002.ivf", "vp80-00-comprehensive-003.ivf",
|
||||
"vp80-00-comprehensive-004.ivf", "vp80-00-comprehensive-005.ivf",
|
||||
"vp80-00-comprehensive-006.ivf", "vp80-00-comprehensive-007.ivf",
|
||||
"vp80-00-comprehensive-008.ivf", "vp80-00-comprehensive-009.ivf",
|
||||
"vp80-00-comprehensive-010.ivf", "vp80-00-comprehensive-011.ivf",
|
||||
"vp80-00-comprehensive-012.ivf", "vp80-00-comprehensive-013.ivf",
|
||||
"vp80-00-comprehensive-014.ivf", "vp80-00-comprehensive-015.ivf",
|
||||
"vp80-00-comprehensive-016.ivf", "vp80-00-comprehensive-017.ivf",
|
||||
"vp80-00-comprehensive-018.ivf", "vp80-01-intra-1400.ivf",
|
||||
"vp80-01-intra-1411.ivf", "vp80-01-intra-1416.ivf",
|
||||
"vp80-01-intra-1417.ivf", "vp80-02-inter-1402.ivf",
|
||||
"vp80-02-inter-1412.ivf", "vp80-02-inter-1418.ivf",
|
||||
"vp80-02-inter-1424.ivf", "vp80-03-segmentation-01.ivf",
|
||||
"vp80-03-segmentation-02.ivf", "vp80-03-segmentation-03.ivf",
|
||||
"vp80-03-segmentation-04.ivf", "vp80-03-segmentation-1401.ivf",
|
||||
"vp80-03-segmentation-1403.ivf", "vp80-03-segmentation-1407.ivf",
|
||||
"vp80-03-segmentation-1408.ivf", "vp80-03-segmentation-1409.ivf",
|
||||
"vp80-03-segmentation-1410.ivf", "vp80-03-segmentation-1413.ivf",
|
||||
"vp80-03-segmentation-1414.ivf", "vp80-03-segmentation-1415.ivf",
|
||||
"vp80-03-segmentation-1425.ivf", "vp80-03-segmentation-1426.ivf",
|
||||
"vp80-03-segmentation-1427.ivf", "vp80-03-segmentation-1432.ivf",
|
||||
"vp80-03-segmentation-1435.ivf", "vp80-03-segmentation-1436.ivf",
|
||||
"vp80-03-segmentation-1437.ivf", "vp80-03-segmentation-1441.ivf",
|
||||
"vp80-03-segmentation-1442.ivf", "vp80-04-partitions-1404.ivf",
|
||||
"vp80-04-partitions-1405.ivf", "vp80-04-partitions-1406.ivf",
|
||||
"vp80-05-sharpness-1428.ivf", "vp80-05-sharpness-1429.ivf",
|
||||
"vp80-05-sharpness-1430.ivf", "vp80-05-sharpness-1431.ivf",
|
||||
"vp80-05-sharpness-1433.ivf", "vp80-05-sharpness-1434.ivf",
|
||||
"vp80-05-sharpness-1438.ivf", "vp80-05-sharpness-1439.ivf",
|
||||
"vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf",
|
||||
"vp80-06-smallsize.ivf"
|
||||
};
|
||||
#endif // CONFIG_VP8_DECODER
|
||||
#if CONFIG_VP9_DECODER
|
||||
const char *kVP9TestVectors[kNumVp9TestVectors] = {
|
||||
"vp90-2-00-quantizer-00.webm", "vp90-2-00-quantizer-01.webm",
|
||||
"vp90-2-00-quantizer-02.webm", "vp90-2-00-quantizer-03.webm",
|
||||
"vp90-2-00-quantizer-04.webm", "vp90-2-00-quantizer-05.webm",
|
||||
"vp90-2-00-quantizer-06.webm", "vp90-2-00-quantizer-07.webm",
|
||||
"vp90-2-00-quantizer-08.webm", "vp90-2-00-quantizer-09.webm",
|
||||
"vp90-2-00-quantizer-10.webm", "vp90-2-00-quantizer-11.webm",
|
||||
"vp90-2-00-quantizer-12.webm", "vp90-2-00-quantizer-13.webm",
|
||||
"vp90-2-00-quantizer-14.webm", "vp90-2-00-quantizer-15.webm",
|
||||
"vp90-2-00-quantizer-16.webm", "vp90-2-00-quantizer-17.webm",
|
||||
"vp90-2-00-quantizer-18.webm", "vp90-2-00-quantizer-19.webm",
|
||||
"vp90-2-00-quantizer-20.webm", "vp90-2-00-quantizer-21.webm",
|
||||
"vp90-2-00-quantizer-22.webm", "vp90-2-00-quantizer-23.webm",
|
||||
"vp90-2-00-quantizer-24.webm", "vp90-2-00-quantizer-25.webm",
|
||||
"vp90-2-00-quantizer-26.webm", "vp90-2-00-quantizer-27.webm",
|
||||
"vp90-2-00-quantizer-28.webm", "vp90-2-00-quantizer-29.webm",
|
||||
"vp90-2-00-quantizer-30.webm", "vp90-2-00-quantizer-31.webm",
|
||||
"vp90-2-00-quantizer-32.webm", "vp90-2-00-quantizer-33.webm",
|
||||
"vp90-2-00-quantizer-34.webm", "vp90-2-00-quantizer-35.webm",
|
||||
"vp90-2-00-quantizer-36.webm", "vp90-2-00-quantizer-37.webm",
|
||||
"vp90-2-00-quantizer-38.webm", "vp90-2-00-quantizer-39.webm",
|
||||
"vp90-2-00-quantizer-40.webm", "vp90-2-00-quantizer-41.webm",
|
||||
"vp90-2-00-quantizer-42.webm", "vp90-2-00-quantizer-43.webm",
|
||||
"vp90-2-00-quantizer-44.webm", "vp90-2-00-quantizer-45.webm",
|
||||
"vp90-2-00-quantizer-46.webm", "vp90-2-00-quantizer-47.webm",
|
||||
"vp90-2-00-quantizer-48.webm", "vp90-2-00-quantizer-49.webm",
|
||||
"vp90-2-00-quantizer-50.webm", "vp90-2-00-quantizer-51.webm",
|
||||
"vp90-2-00-quantizer-52.webm", "vp90-2-00-quantizer-53.webm",
|
||||
"vp90-2-00-quantizer-54.webm", "vp90-2-00-quantizer-55.webm",
|
||||
"vp90-2-00-quantizer-56.webm", "vp90-2-00-quantizer-57.webm",
|
||||
"vp90-2-00-quantizer-58.webm", "vp90-2-00-quantizer-59.webm",
|
||||
"vp90-2-00-quantizer-60.webm", "vp90-2-00-quantizer-61.webm",
|
||||
"vp90-2-00-quantizer-62.webm", "vp90-2-00-quantizer-63.webm",
|
||||
"vp90-2-01-sharpness-1.webm", "vp90-2-01-sharpness-2.webm",
|
||||
"vp90-2-01-sharpness-3.webm", "vp90-2-01-sharpness-4.webm",
|
||||
"vp90-2-01-sharpness-5.webm", "vp90-2-01-sharpness-6.webm",
|
||||
"vp90-2-01-sharpness-7.webm", "vp90-2-02-size-08x08.webm",
|
||||
"vp90-2-02-size-08x10.webm", "vp90-2-02-size-08x16.webm",
|
||||
"vp90-2-02-size-08x18.webm", "vp90-2-02-size-08x32.webm",
|
||||
"vp90-2-02-size-08x34.webm", "vp90-2-02-size-08x64.webm",
|
||||
"vp90-2-02-size-08x66.webm", "vp90-2-02-size-10x08.webm",
|
||||
"vp90-2-02-size-10x10.webm", "vp90-2-02-size-10x16.webm",
|
||||
"vp90-2-02-size-10x18.webm", "vp90-2-02-size-10x32.webm",
|
||||
"vp90-2-02-size-10x34.webm", "vp90-2-02-size-10x64.webm",
|
||||
"vp90-2-02-size-10x66.webm", "vp90-2-02-size-16x08.webm",
|
||||
"vp90-2-02-size-16x10.webm", "vp90-2-02-size-16x16.webm",
|
||||
"vp90-2-02-size-16x18.webm", "vp90-2-02-size-16x32.webm",
|
||||
"vp90-2-02-size-16x34.webm", "vp90-2-02-size-16x64.webm",
|
||||
"vp90-2-02-size-16x66.webm", "vp90-2-02-size-18x08.webm",
|
||||
"vp90-2-02-size-18x10.webm", "vp90-2-02-size-18x16.webm",
|
||||
"vp90-2-02-size-18x18.webm", "vp90-2-02-size-18x32.webm",
|
||||
"vp90-2-02-size-18x34.webm", "vp90-2-02-size-18x64.webm",
|
||||
"vp90-2-02-size-18x66.webm", "vp90-2-02-size-32x08.webm",
|
||||
"vp90-2-02-size-32x10.webm", "vp90-2-02-size-32x16.webm",
|
||||
"vp90-2-02-size-32x18.webm", "vp90-2-02-size-32x32.webm",
|
||||
"vp90-2-02-size-32x34.webm", "vp90-2-02-size-32x64.webm",
|
||||
"vp90-2-02-size-32x66.webm", "vp90-2-02-size-34x08.webm",
|
||||
"vp90-2-02-size-34x10.webm", "vp90-2-02-size-34x16.webm",
|
||||
"vp90-2-02-size-34x18.webm", "vp90-2-02-size-34x32.webm",
|
||||
"vp90-2-02-size-34x34.webm", "vp90-2-02-size-34x64.webm",
|
||||
"vp90-2-02-size-34x66.webm", "vp90-2-02-size-64x08.webm",
|
||||
"vp90-2-02-size-64x10.webm", "vp90-2-02-size-64x16.webm",
|
||||
"vp90-2-02-size-64x18.webm", "vp90-2-02-size-64x32.webm",
|
||||
"vp90-2-02-size-64x34.webm", "vp90-2-02-size-64x64.webm",
|
||||
"vp90-2-02-size-64x66.webm", "vp90-2-02-size-66x08.webm",
|
||||
"vp90-2-02-size-66x10.webm", "vp90-2-02-size-66x16.webm",
|
||||
"vp90-2-02-size-66x18.webm", "vp90-2-02-size-66x32.webm",
|
||||
"vp90-2-02-size-66x34.webm", "vp90-2-02-size-66x64.webm",
|
||||
"vp90-2-02-size-66x66.webm", "vp90-2-03-size-196x196.webm",
|
||||
"vp90-2-03-size-196x198.webm", "vp90-2-03-size-196x200.webm",
|
||||
"vp90-2-03-size-196x202.webm", "vp90-2-03-size-196x208.webm",
|
||||
"vp90-2-03-size-196x210.webm", "vp90-2-03-size-196x224.webm",
|
||||
"vp90-2-03-size-196x226.webm", "vp90-2-03-size-198x196.webm",
|
||||
"vp90-2-03-size-198x198.webm", "vp90-2-03-size-198x200.webm",
|
||||
"vp90-2-03-size-198x202.webm", "vp90-2-03-size-198x208.webm",
|
||||
"vp90-2-03-size-198x210.webm", "vp90-2-03-size-198x224.webm",
|
||||
"vp90-2-03-size-198x226.webm", "vp90-2-03-size-200x196.webm",
|
||||
"vp90-2-03-size-200x198.webm", "vp90-2-03-size-200x200.webm",
|
||||
"vp90-2-03-size-200x202.webm", "vp90-2-03-size-200x208.webm",
|
||||
"vp90-2-03-size-200x210.webm", "vp90-2-03-size-200x224.webm",
|
||||
"vp90-2-03-size-200x226.webm", "vp90-2-03-size-202x196.webm",
|
||||
"vp90-2-03-size-202x198.webm", "vp90-2-03-size-202x200.webm",
|
||||
"vp90-2-03-size-202x202.webm", "vp90-2-03-size-202x208.webm",
|
||||
"vp90-2-03-size-202x210.webm", "vp90-2-03-size-202x224.webm",
|
||||
"vp90-2-03-size-202x226.webm", "vp90-2-03-size-208x196.webm",
|
||||
"vp90-2-03-size-208x198.webm", "vp90-2-03-size-208x200.webm",
|
||||
"vp90-2-03-size-208x202.webm", "vp90-2-03-size-208x208.webm",
|
||||
"vp90-2-03-size-208x210.webm", "vp90-2-03-size-208x224.webm",
|
||||
"vp90-2-03-size-208x226.webm", "vp90-2-03-size-210x196.webm",
|
||||
"vp90-2-03-size-210x198.webm", "vp90-2-03-size-210x200.webm",
|
||||
"vp90-2-03-size-210x202.webm", "vp90-2-03-size-210x208.webm",
|
||||
"vp90-2-03-size-210x210.webm", "vp90-2-03-size-210x224.webm",
|
||||
"vp90-2-03-size-210x226.webm", "vp90-2-03-size-224x196.webm",
|
||||
"vp90-2-03-size-224x198.webm", "vp90-2-03-size-224x200.webm",
|
||||
"vp90-2-03-size-224x202.webm", "vp90-2-03-size-224x208.webm",
|
||||
"vp90-2-03-size-224x210.webm", "vp90-2-03-size-224x224.webm",
|
||||
"vp90-2-03-size-224x226.webm", "vp90-2-03-size-226x196.webm",
|
||||
"vp90-2-03-size-226x198.webm", "vp90-2-03-size-226x200.webm",
|
||||
"vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm",
|
||||
"vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm",
|
||||
"vp90-2-03-size-226x226.webm", "vp90-2-03-deltaq.webm",
|
||||
"vp90-2-05-resize.ivf", "vp90-2-06-bilinear.webm",
|
||||
"vp90-2-07-frame_parallel.webm",
|
||||
"vp90-2-08-tile_1x2_frame_parallel.webm", "vp90-2-08-tile_1x2.webm",
|
||||
"vp90-2-08-tile_1x4_frame_parallel.webm", "vp90-2-08-tile_1x4.webm",
|
||||
"vp90-2-08-tile_1x8_frame_parallel.webm", "vp90-2-08-tile_1x8.webm",
|
||||
"vp90-2-08-tile-4x4.webm", "vp90-2-08-tile-4x1.webm",
|
||||
"vp90-2-09-subpixel-00.ivf",
|
||||
"vp90-2-02-size-lf-1920x1080.webm",
|
||||
"vp90-2-09-aq2.webm",
|
||||
"vp90-2-09-lf_deltas.webm",
|
||||
#if CONFIG_NON420
|
||||
"vp91-2-04-yv444.webm"
|
||||
#endif
|
||||
};
|
||||
#endif // CONFIG_VP9_DECODER
|
||||
|
||||
} // namespace libvpx_test
|
35
test/test_vectors.h
Normal file
35
test/test_vectors.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef TEST_TEST_VECTORS_H_
|
||||
#define TEST_TEST_VECTORS_H_
|
||||
|
||||
#include "./vpx_config.h"
|
||||
|
||||
namespace libvpx_test {
|
||||
|
||||
#if CONFIG_VP8_DECODER
|
||||
const int kNumVp8TestVectors = 62;
|
||||
extern const char *kVP8TestVectors[kNumVp8TestVectors];
|
||||
#endif
|
||||
|
||||
#if CONFIG_VP9_DECODER
|
||||
#if CONFIG_NON420
|
||||
const int kNumVp9TestVectors = 216;
|
||||
#else
|
||||
const int kNumVp9TestVectors = 215;
|
||||
#endif
|
||||
|
||||
extern const char *kVP9TestVectors[kNumVp9TestVectors];
|
||||
#endif // CONFIG_VP9_DECODER
|
||||
|
||||
} // namespace libvpx_test
|
||||
|
||||
#endif // TEST_TEST_VECTORS_H_
|
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
||||
|
||||
Use of this source code is governed by a BSD-style license
|
||||
that can be found in the LICENSE file in the root of the source
|
||||
tree. An additional intellectual property rights grant can be found
|
||||
in the file PATENTS. All contributing project authors may
|
||||
be found in the AUTHORS file in the root of the source tree.
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#include "vpx/vpx_image.h"
|
||||
|
||||
// Macros
|
||||
#define PARAMS(...) ::testing::TestWithParam< std::tr1::tuple< __VA_ARGS__ > >
|
||||
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
|
||||
|
||||
static double compute_psnr(const vpx_image_t *img1,
|
||||
|
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stddef.h>
|
||||
@@ -16,7 +15,6 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
extern "C" {
|
||||
#include "./vp8_rtcd.h"
|
||||
}
|
||||
@@ -25,7 +23,6 @@ extern "C" {
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
const int cospi8sqrt2minus1 = 20091;
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
||||
|
||||
Use of this source code is governed by a BSD-style license
|
||||
that can be found in the LICENSE file in the root of the source
|
||||
tree. An additional intellectual property rights grant can be found
|
||||
in the file PATENTS. All contributing project authors may
|
||||
be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "test/codec_factory.h"
|
||||
@@ -66,7 +66,7 @@ TEST_P(LossLessTest, TestLossLessEncoding) {
|
||||
|
||||
// intentionally changed the dimension for better testing coverage
|
||||
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||
timebase.den, timebase.num, 0, 30);
|
||||
timebase.den, timebase.num, 0, 10);
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
const double psnr_lossless = GetMinPsnr();
|
||||
EXPECT_GE(psnr_lossless, kMaxPsnr);
|
||||
|
@@ -41,8 +41,8 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
|
||||
// FIXME(rbultje) split in its own file
|
||||
for (BLOCK_SIZE bsize = BLOCK_4X4; bsize < BLOCK_SIZES;
|
||||
bsize = static_cast<BLOCK_SIZE>(static_cast<int>(bsize) + 1)) {
|
||||
const int block_width = 4 << b_width_log2(bsize);
|
||||
const int block_height = 4 << b_height_log2(bsize);
|
||||
const int block_width = 4 * num_4x4_blocks_wide_lookup[bsize];
|
||||
const int block_height = 4 * num_4x4_blocks_high_lookup[bsize];
|
||||
int16_t *diff = reinterpret_cast<int16_t *>(
|
||||
vpx_memalign(16, sizeof(*diff) * block_width * block_height * 2));
|
||||
uint8_t *pred = reinterpret_cast<uint8_t *>(
|
||||
|
@@ -141,10 +141,12 @@ TEST(VP9DecodeMTTest, MTDecode2) {
|
||||
"68ede6abd66bae0a2edf2eb9232241b6" },
|
||||
{ "vp90-2-08-tile_1x4_frame_parallel.webm",
|
||||
"368ebc6ebf3a5e478d85b2c3149b2848" },
|
||||
{ "vp90-2-08-tile_1x8_frame_parallel.webm",
|
||||
"17e439da2388aff3a0f69cb22579c6c1" },
|
||||
};
|
||||
|
||||
for (int i = 0; i < static_cast<int>(sizeof(files) / sizeof(files[0])); ++i) {
|
||||
for (int t = 2; t <= 4; ++t) {
|
||||
for (int t = 2; t <= 8; ++t) {
|
||||
EXPECT_STREQ(files[i].expected_md5, DecodeFile(files[i].name, t).c_str())
|
||||
<< "threads = " << t;
|
||||
}
|
||||
|
@@ -90,8 +90,12 @@ class WebMVideoSource : public CompressedVideoSource {
|
||||
virtual ~WebMVideoSource() {
|
||||
if (input_file_)
|
||||
fclose(input_file_);
|
||||
if (nestegg_ctx_)
|
||||
if (nestegg_ctx_ != NULL) {
|
||||
if (pkt_ != NULL) {
|
||||
nestegg_free_packet(pkt_);
|
||||
}
|
||||
nestegg_destroy(nestegg_ctx_);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Init() {
|
||||
@@ -136,8 +140,10 @@ class WebMVideoSource : public CompressedVideoSource {
|
||||
|
||||
do {
|
||||
/* End of this packet, get another. */
|
||||
if (pkt_)
|
||||
if (pkt_ != NULL) {
|
||||
nestegg_free_packet(pkt_);
|
||||
pkt_ = NULL;
|
||||
}
|
||||
|
||||
int again = nestegg_read_packet(nestegg_ctx_, &pkt_);
|
||||
ASSERT_GE(again, 0) << "nestegg_read_packet failed";
|
||||
|
@@ -7,10 +7,13 @@
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "tools_common.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(_WIN32) || defined(__OS2__)
|
||||
#include <io.h>
|
||||
@@ -56,3 +59,74 @@ void fatal(const char *fmt, ...) {
|
||||
void warn(const char *fmt, ...) {
|
||||
LOG_ERROR("Warning");
|
||||
}
|
||||
|
||||
uint16_t mem_get_le16(const void *data) {
|
||||
uint16_t val;
|
||||
const uint8_t *mem = (const uint8_t*)data;
|
||||
|
||||
val = mem[1] << 8;
|
||||
val |= mem[0];
|
||||
return val;
|
||||
}
|
||||
|
||||
uint32_t mem_get_le32(const void *data) {
|
||||
uint32_t val;
|
||||
const uint8_t *mem = (const uint8_t*)data;
|
||||
|
||||
val = mem[3] << 24;
|
||||
val |= mem[2] << 16;
|
||||
val |= mem[1] << 8;
|
||||
val |= mem[0];
|
||||
return val;
|
||||
}
|
||||
|
||||
int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame) {
|
||||
FILE *f = input_ctx->file;
|
||||
struct FileTypeDetectionBuffer *detect = &input_ctx->detect;
|
||||
int plane = 0;
|
||||
int shortread = 0;
|
||||
|
||||
for (plane = 0; plane < 3; ++plane) {
|
||||
uint8_t *ptr;
|
||||
const int w = (plane ? (1 + yuv_frame->d_w) / 2 : yuv_frame->d_w);
|
||||
const int h = (plane ? (1 + yuv_frame->d_h) / 2 : yuv_frame->d_h);
|
||||
int r;
|
||||
|
||||
/* Determine the correct plane based on the image format. The for-loop
|
||||
* always counts in Y,U,V order, but this may not match the order of
|
||||
* the data on disk.
|
||||
*/
|
||||
switch (plane) {
|
||||
case 1:
|
||||
ptr = yuv_frame->planes[
|
||||
yuv_frame->fmt == VPX_IMG_FMT_YV12 ? VPX_PLANE_V : VPX_PLANE_U];
|
||||
break;
|
||||
case 2:
|
||||
ptr = yuv_frame->planes[
|
||||
yuv_frame->fmt == VPX_IMG_FMT_YV12 ? VPX_PLANE_U : VPX_PLANE_V];
|
||||
break;
|
||||
default:
|
||||
ptr = yuv_frame->planes[plane];
|
||||
}
|
||||
|
||||
for (r = 0; r < h; ++r) {
|
||||
size_t needed = w;
|
||||
size_t buf_position = 0;
|
||||
const size_t left = detect->buf_read - detect->position;
|
||||
if (left > 0) {
|
||||
const size_t more = (left < needed) ? left : needed;
|
||||
memcpy(ptr, detect->buf + detect->position, more);
|
||||
buf_position = more;
|
||||
needed -= more;
|
||||
detect->position += more;
|
||||
}
|
||||
if (needed > 0) {
|
||||
shortread |= (fread(ptr + buf_position, 1, needed, f) < needed);
|
||||
}
|
||||
|
||||
ptr += yuv_frame->stride[plane];
|
||||
}
|
||||
}
|
||||
|
||||
return shortread;
|
||||
}
|
||||
|
@@ -13,6 +13,12 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "vpx/vpx_image.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
#if CONFIG_ENCODERS
|
||||
#include "./y4minput.h"
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
/* MSVS doesn't define off_t, and uses _f{seek,tell}i64. */
|
||||
@@ -52,11 +58,55 @@ typedef long off_t; /* NOLINT */
|
||||
#define PATH_MAX 512
|
||||
#endif
|
||||
|
||||
#define IVF_FRAME_HDR_SZ (4 + 8) /* 4 byte size + 8 byte timestamp */
|
||||
#define IVF_FILE_HDR_SZ 32
|
||||
|
||||
#define RAW_FRAME_HDR_SZ sizeof(uint32_t)
|
||||
|
||||
#define VP8_FOURCC (0x30385056)
|
||||
#define VP9_FOURCC (0x30395056)
|
||||
#define VP8_FOURCC_MASK (0x00385056)
|
||||
#define VP9_FOURCC_MASK (0x00395056)
|
||||
|
||||
enum VideoFileType {
|
||||
FILE_TYPE_RAW,
|
||||
FILE_TYPE_IVF,
|
||||
FILE_TYPE_Y4M,
|
||||
FILE_TYPE_WEBM
|
||||
};
|
||||
|
||||
struct FileTypeDetectionBuffer {
|
||||
char buf[4];
|
||||
size_t buf_read;
|
||||
size_t position;
|
||||
};
|
||||
|
||||
struct VpxRational {
|
||||
int numerator;
|
||||
int denominator;
|
||||
};
|
||||
|
||||
struct VpxInputContext {
|
||||
const char *filename;
|
||||
FILE *file;
|
||||
off_t length;
|
||||
struct FileTypeDetectionBuffer detect;
|
||||
enum VideoFileType file_type;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
int use_i420;
|
||||
int only_i420;
|
||||
uint32_t fourcc;
|
||||
struct VpxRational framerate;
|
||||
#if CONFIG_ENCODERS
|
||||
y4m_input y4m;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Sets a stdio stream into binary mode */
|
||||
FILE *set_binary_mode(FILE *stream);
|
||||
|
||||
@@ -67,4 +117,13 @@ void warn(const char *fmt, ...);
|
||||
/* The tool including this file must define usage_exit() */
|
||||
void usage_exit();
|
||||
|
||||
uint16_t mem_get_le16(const void *data);
|
||||
uint32_t mem_get_le32(const void *data);
|
||||
|
||||
int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif // TOOLS_COMMON_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_ALLOCCOMMON_H
|
||||
#define __INC_ALLOCCOMMON_H
|
||||
#ifndef VP8_COMMON_ALLOCCOMMON_H_
|
||||
#define VP8_COMMON_ALLOCCOMMON_H_
|
||||
|
||||
#include "onyxc_int.h"
|
||||
|
||||
@@ -20,4 +20,4 @@ void vp8_de_alloc_frame_buffers(VP8_COMMON *oci);
|
||||
int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height);
|
||||
void vp8_setup_version(VP8_COMMON *oci);
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_ALLOCCOMMON_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BILINEARFILTER_ARM_H
|
||||
#define BILINEARFILTER_ARM_H
|
||||
#ifndef VP8_COMMON_ARM_BILINEARFILTER_ARM_H_
|
||||
#define VP8_COMMON_ARM_BILINEARFILTER_ARM_H_
|
||||
|
||||
extern void vp8_filter_block2d_bil_first_pass_armv6
|
||||
(
|
||||
@@ -32,4 +32,4 @@ extern void vp8_filter_block2d_bil_second_pass_armv6
|
||||
const short *vp8_filter
|
||||
);
|
||||
|
||||
#endif /* BILINEARFILTER_ARM_H */
|
||||
#endif // VP8_COMMON_ARM_BILINEARFILTER_ARM_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_BLOCKD_H
|
||||
#define __INC_BLOCKD_H
|
||||
#ifndef VP8_COMMON_BLOCKD_H_
|
||||
#define VP8_COMMON_BLOCKD_H_
|
||||
|
||||
void vpx_log(const char *format, ...);
|
||||
|
||||
@@ -297,4 +297,4 @@ typedef struct macroblockd
|
||||
extern void vp8_build_block_doffsets(MACROBLOCKD *x);
|
||||
extern void vp8_setup_block_dptrs(MACROBLOCKD *x);
|
||||
|
||||
#endif /* __INC_BLOCKD_H */
|
||||
#endif // VP8_COMMON_BLOCKD_H_
|
||||
|
@@ -8,6 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_COMMON_COEFUPDATEPROBS_H_
|
||||
#define VP8_COMMON_COEFUPDATEPROBS_H_
|
||||
|
||||
/* Update probabilities for the nodes in the token entropy tree.
|
||||
Generated file included by entropy.c */
|
||||
@@ -183,3 +185,5 @@ const vp8_prob vp8_coef_update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTE
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
#endif // VP8_COMMON_COEFUPDATEPROBS_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef common_h
|
||||
#define common_h 1
|
||||
#ifndef VP8_COMMON_COMMON_H_
|
||||
#define VP8_COMMON_COMMON_H_
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -37,4 +37,4 @@
|
||||
#define vp8_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest));
|
||||
|
||||
|
||||
#endif /* common_h */
|
||||
#endif // VP8_COMMON_COMMON_H_
|
||||
|
@@ -8,6 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_COMMON_DEFAULT_COEF_PROBS_H_
|
||||
#define VP8_COMMON_DEFAULT_COEF_PROBS_H_
|
||||
|
||||
/*Generated file, included by entropy.c*/
|
||||
|
||||
@@ -186,3 +188,5 @@ static const vp8_prob default_coef_probs [BLOCK_TYPES]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif // VP8_COMMON_DEFAULT_COEF_PROBS_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_ENTROPY_H
|
||||
#define __INC_ENTROPY_H
|
||||
#ifndef VP8_COMMON_ENTROPY_H_
|
||||
#define VP8_COMMON_ENTROPY_H_
|
||||
|
||||
#include "treecoder.h"
|
||||
#include "blockd.h"
|
||||
@@ -98,4 +98,4 @@ extern DECLARE_ALIGNED(16, const short, vp8_default_zig_zag_mask[16]);
|
||||
extern const int vp8_mb_feature_data_bits[MB_LVL_MAX];
|
||||
|
||||
void vp8_coef_tree_initialize(void);
|
||||
#endif
|
||||
#endif // VP8_COMMON_ENTROPY_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_ENTROPYMODE_H
|
||||
#define __INC_ENTROPYMODE_H
|
||||
#ifndef VP8_COMMON_ENTROPYMODE_H_
|
||||
#define VP8_COMMON_ENTROPYMODE_H_
|
||||
|
||||
#include "onyxc_int.h"
|
||||
#include "treecoder.h"
|
||||
@@ -77,4 +77,4 @@ void vp8_init_mbmode_probs(VP8_COMMON *x);
|
||||
void vp8_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES-1]);
|
||||
void vp8_kf_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES-1]);
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_ENTROPYMODE_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_ENTROPYMV_H
|
||||
#define __INC_ENTROPYMV_H
|
||||
#ifndef VP8_COMMON_ENTROPYMV_H_
|
||||
#define VP8_COMMON_ENTROPYMV_H_
|
||||
|
||||
#include "treecoder.h"
|
||||
|
||||
@@ -41,4 +41,4 @@ typedef struct mv_context
|
||||
|
||||
extern const MV_CONTEXT vp8_mv_update_probs[2], vp8_default_mv_context[2];
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_ENTROPYMV_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_EXTEND_H
|
||||
#define __INC_EXTEND_H
|
||||
#ifndef VP8_COMMON_EXTEND_H_
|
||||
#define VP8_COMMON_EXTEND_H_
|
||||
|
||||
#include "vpx_scale/yv12config.h"
|
||||
|
||||
@@ -22,4 +22,4 @@ void vp8_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
|
||||
int srcy, int srcx,
|
||||
int srch, int srcw);
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_EXTEND_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef FILTER_H
|
||||
#define FILTER_H
|
||||
#ifndef VP8_COMMON_FILTER_H_
|
||||
#define VP8_COMMON_FILTER_H_
|
||||
|
||||
#include "vpx_ports/mem.h"
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters[8][2]);
|
||||
extern DECLARE_ALIGNED(16, const short, vp8_sub_pel_filters[8][6]);
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_FILTER_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_FINDNEARMV_H
|
||||
#define __INC_FINDNEARMV_H
|
||||
#ifndef VP8_COMMON_FINDNEARMV_H_
|
||||
#define VP8_COMMON_FINDNEARMV_H_
|
||||
|
||||
#include "mv.h"
|
||||
#include "blockd.h"
|
||||
@@ -179,4 +179,4 @@ static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b, int mi
|
||||
return (cur_mb->bmi + b - 4)->as_mode;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_FINDNEARMV_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_HEADER_H
|
||||
#define __INC_HEADER_H
|
||||
#ifndef VP8_COMMON_HEADER_H_
|
||||
#define VP8_COMMON_HEADER_H_
|
||||
|
||||
/* 24 bits total */
|
||||
typedef struct
|
||||
@@ -40,4 +40,4 @@ typedef struct
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_HEADER_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_INVTRANS_H
|
||||
#define __INC_INVTRANS_H
|
||||
#ifndef VP8_COMMON_INVTRANS_H_
|
||||
#define VP8_COMMON_INVTRANS_H_
|
||||
|
||||
#include "vpx_config.h"
|
||||
#include "vp8_rtcd.h"
|
||||
@@ -59,4 +59,4 @@ static void vp8_inverse_transform_mby(MACROBLOCKD *xd)
|
||||
xd->dst.y_buffer,
|
||||
xd->dst.y_stride, xd->eobs);
|
||||
}
|
||||
#endif
|
||||
#endif // VP8_COMMON_INVTRANS_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef loopfilter_h
|
||||
#define loopfilter_h
|
||||
#ifndef VP8_COMMON_LOOPFILTER_H_
|
||||
#define VP8_COMMON_LOOPFILTER_H_
|
||||
|
||||
#include "vpx_ports/mem.h"
|
||||
#include "vpx_config.h"
|
||||
@@ -102,4 +102,4 @@ void vp8_loop_filter_row_simple(struct VP8Common *cm,
|
||||
int mb_row, int post_ystride, int post_uvstride,
|
||||
unsigned char *y_ptr, unsigned char *u_ptr,
|
||||
unsigned char *v_ptr);
|
||||
#endif
|
||||
#endif // VP8_COMMON_LOOPFILTER_H_
|
||||
|
@@ -9,9 +9,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_MODECONT_H
|
||||
#define __INC_MODECONT_H
|
||||
#ifndef VP8_COMMON_MODECONT_H_
|
||||
#define VP8_COMMON_MODECONT_H_
|
||||
|
||||
extern const int vp8_mode_contexts[6][4];
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_MODECONT_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_MV_H
|
||||
#define __INC_MV_H
|
||||
#ifndef VP8_COMMON_MV_H_
|
||||
#define VP8_COMMON_MV_H_
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
typedef struct
|
||||
@@ -25,4 +25,4 @@ typedef union int_mv
|
||||
MV as_mv;
|
||||
} int_mv; /* facilitates faster equality tests and copies */
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_MV_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_VP8_H
|
||||
#define __INC_VP8_H
|
||||
#ifndef VP8_COMMON_ONYX_H_
|
||||
#define VP8_COMMON_ONYX_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@@ -267,4 +267,4 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_ONYX_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_VP8C_INT_H
|
||||
#define __INC_VP8C_INT_H
|
||||
#ifndef VP8_COMMON_ONYXC_INT_H_
|
||||
#define VP8_COMMON_ONYXC_INT_H_
|
||||
|
||||
#include "vpx_config.h"
|
||||
#include "vp8_rtcd.h"
|
||||
@@ -174,4 +174,4 @@ typedef struct VP8Common
|
||||
int cpu_caps;
|
||||
} VP8_COMMON;
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_ONYXC_INT_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_VP8D_H
|
||||
#define __INC_VP8D_H
|
||||
#ifndef VP8_COMMON_ONYXD_H_
|
||||
#define VP8_COMMON_ONYXD_H_
|
||||
|
||||
|
||||
/* Create/destroy static data structures. */
|
||||
@@ -60,4 +60,4 @@ extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_ONYXD_H_
|
||||
|
@@ -71,11 +71,6 @@ static const unsigned char MV_REFERENCE_FRAME_colors[MAX_REF_FRAMES][3] =
|
||||
};
|
||||
#endif
|
||||
|
||||
static const short kernel5[] =
|
||||
{
|
||||
1, 1, 4, 1, 1
|
||||
};
|
||||
|
||||
const short vp8_rv[] =
|
||||
{
|
||||
8, 5, 2, 2, 8, 12, 4, 9, 8, 3,
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef POSTPROC_H
|
||||
#define POSTPROC_H
|
||||
#ifndef VP8_COMMON_POSTPROC_H_
|
||||
#define VP8_COMMON_POSTPROC_H_
|
||||
|
||||
#include "vpx_ports/mem.h"
|
||||
struct postproc_state
|
||||
@@ -47,4 +47,4 @@ void vp8_deblock(struct VP8Common *oci,
|
||||
#define MFQE_PRECISION 4
|
||||
|
||||
void vp8_multiframe_quality_enhance(struct VP8Common *cm);
|
||||
#endif
|
||||
#endif // VP8_COMMON_POSTPROC_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_PPFLAGS_H
|
||||
#define __INC_PPFLAGS_H
|
||||
#ifndef VP8_COMMON_PPFLAGS_H_
|
||||
#define VP8_COMMON_PPFLAGS_H_
|
||||
enum
|
||||
{
|
||||
VP8D_NOFILTERING = 0,
|
||||
@@ -38,4 +38,4 @@ typedef struct
|
||||
int display_mv_flag;
|
||||
} vp8_ppflags_t;
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_PPFLAGS_H_
|
||||
|
@@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef VP8_COMMON_PRAGMAS_H_
|
||||
#define VP8_COMMON_PRAGMAS_H_
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
#pragma warning(disable:997 1011 170)
|
||||
@@ -17,3 +17,5 @@
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4799)
|
||||
#endif
|
||||
|
||||
#endif // VP8_COMMON_PRAGMAS_H_
|
||||
|
@@ -8,6 +8,9 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_COMMON_QUANT_COMMON_H_
|
||||
#define VP8_COMMON_QUANT_COMMON_H_
|
||||
|
||||
|
||||
#include "string.h"
|
||||
#include "blockd.h"
|
||||
@@ -19,3 +22,5 @@ extern int vp8_dc2quant(int QIndex, int Delta);
|
||||
extern int vp8_ac2quant(int QIndex, int Delta);
|
||||
extern int vp8_dc_uv_quant(int QIndex, int Delta);
|
||||
extern int vp8_ac_uv_quant(int QIndex, int Delta);
|
||||
|
||||
#endif // VP8_COMMON_QUANT_COMMON_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_RECONINTER_H
|
||||
#define __INC_RECONINTER_H
|
||||
#ifndef VP8_COMMON_RECONINTER_H_
|
||||
#define VP8_COMMON_RECONINTER_H_
|
||||
|
||||
extern void vp8_build_inter_predictors_mb(MACROBLOCKD *x);
|
||||
extern void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x,
|
||||
@@ -32,4 +32,4 @@ extern void vp8_build_inter_predictors_b(BLOCKD *d, int pitch,
|
||||
extern void vp8_build_inter16x16_predictors_mbuv(MACROBLOCKD *x);
|
||||
extern void vp8_build_inter4x4_predictors_mbuv(MACROBLOCKD *x);
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_RECONINTER_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_RECONINTRA4x4_H
|
||||
#define __INC_RECONINTRA4x4_H
|
||||
#ifndef VP8_COMMON_RECONINTRA4X4_H_
|
||||
#define VP8_COMMON_RECONINTRA4X4_H_
|
||||
#include "vp8/common/blockd.h"
|
||||
|
||||
static void intra_prediction_down_copy(MACROBLOCKD *xd,
|
||||
@@ -29,4 +29,4 @@ static void intra_prediction_down_copy(MACROBLOCKD *xd,
|
||||
*dst_ptr2 = *src_ptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_RECONINTRA4X4_H_
|
||||
|
@@ -8,6 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_COMMON_SETUPINTRARECON_H_
|
||||
#define VP8_COMMON_SETUPINTRARECON_H_
|
||||
|
||||
#include "vpx_scale/yv12config.h"
|
||||
extern void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf);
|
||||
@@ -31,3 +33,5 @@ void setup_intra_recon_left(unsigned char *y_buffer,
|
||||
for (i = 0; i < 8; i++)
|
||||
v_buffer[uv_stride *i] = (unsigned char) 129;
|
||||
}
|
||||
|
||||
#endif // VP8_COMMON_SETUPINTRARECON_H_
|
||||
|
@@ -9,11 +9,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SWAPYV12_BUFFER_H
|
||||
#define SWAPYV12_BUFFER_H
|
||||
#ifndef VP8_COMMON_SWAPYV12BUFFER_H_
|
||||
#define VP8_COMMON_SWAPYV12BUFFER_H_
|
||||
|
||||
#include "vpx_scale/yv12config.h"
|
||||
|
||||
void vp8_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, YV12_BUFFER_CONFIG *last_frame);
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_SWAPYV12BUFFER_H_
|
||||
|
@@ -8,8 +8,12 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_COMMON_SYSTEMDEPENDENT_H_
|
||||
#define VP8_COMMON_SYSTEMDEPENDENT_H_
|
||||
|
||||
#include "vpx_config.h"
|
||||
|
||||
struct VP8Common;
|
||||
void vp8_machine_specific_config(struct VP8Common *);
|
||||
|
||||
#endif // VP8_COMMON_SYSTEMDEPENDENT_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _PTHREAD_EMULATION
|
||||
#define _PTHREAD_EMULATION
|
||||
#ifndef VP8_COMMON_THREADING_H_
|
||||
#define VP8_COMMON_THREADING_H_
|
||||
|
||||
#if CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD
|
||||
|
||||
@@ -183,4 +183,4 @@ static inline int sem_destroy(sem_t * sem)
|
||||
|
||||
#endif /* CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD */
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_THREADING_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_TREECODER_H
|
||||
#define __INC_TREECODER_H
|
||||
#ifndef VP8_COMMON_TREECODER_H_
|
||||
#define VP8_COMMON_TREECODER_H_
|
||||
|
||||
typedef unsigned char vp8bc_index_t; /* probability index */
|
||||
|
||||
@@ -87,4 +87,4 @@ void vp8bc_tree_probs_from_distribution(
|
||||
);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_TREECODER_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef VARIANCE_H
|
||||
#define VARIANCE_H
|
||||
#ifndef VP8_COMMON_VARIANCE_H_
|
||||
#define VP8_COMMON_VARIANCE_H_
|
||||
|
||||
#include "vpx_config.h"
|
||||
|
||||
@@ -112,4 +112,4 @@ typedef struct variance_vtable
|
||||
#endif
|
||||
} vp8_variance_fn_ptr_t;
|
||||
|
||||
#endif
|
||||
#endif // VP8_COMMON_VARIANCE_H_
|
||||
|
@@ -8,6 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_COMMON_VP8_ENTROPYMODEDATA_H_
|
||||
#define VP8_COMMON_VP8_ENTROPYMODEDATA_H_
|
||||
|
||||
/*Generated file, included by entropymode.c*/
|
||||
|
||||
@@ -240,3 +242,5 @@ const vp8_prob vp8_kf_bmode_prob
|
||||
{ 112, 19, 12, 61, 195, 128, 48, 4, 24 }
|
||||
}
|
||||
};
|
||||
|
||||
#endif // VP8_COMMON_VP8_ENTROPYMODEDATA_H_
|
||||
|
@@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef FILTER_X86_H
|
||||
#define FILTER_X86_H
|
||||
#ifndef VP8_COMMON_X86_FILTER_X86_H_
|
||||
#define VP8_COMMON_X86_FILTER_X86_H_
|
||||
|
||||
#include "vpx_ports/mem.h"
|
||||
|
||||
@@ -22,4 +22,4 @@ extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters_x86_4[8][8]);
|
||||
/* duplicated 8x */
|
||||
extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters_x86_8[8][16]);
|
||||
|
||||
#endif /* FILTER_X86_H */
|
||||
#endif // VP8_COMMON_X86_FILTER_X86_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DBOOLHUFF_H_
|
||||
#define DBOOLHUFF_H_
|
||||
#ifndef VP8_DECODER_DBOOLHUFF_H_
|
||||
#define VP8_DECODER_DBOOLHUFF_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <limits.h>
|
||||
@@ -135,4 +135,4 @@ static int vp8dx_bool_error(BOOL_DECODER *br)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // DBOOLHUFF_H_
|
||||
#endif // VP8_DECODER_DBOOLHUFF_H_
|
||||
|
@@ -680,7 +680,6 @@ static void decode_mb_rows(VP8D_COMP *pbi)
|
||||
vp8_loop_filter_row_simple(pc, lf_mic, mb_row-1,
|
||||
recon_y_stride, recon_uv_stride,
|
||||
lf_dst[0], lf_dst[1], lf_dst[2]);
|
||||
|
||||
if(mb_row > 1)
|
||||
{
|
||||
yv12_extend_frame_left_right_c(yv12_fb_new,
|
||||
@@ -691,10 +690,6 @@ static void decode_mb_rows(VP8D_COMP *pbi)
|
||||
eb_dst[0] += recon_y_stride * 16;
|
||||
eb_dst[1] += recon_uv_stride * 8;
|
||||
eb_dst[2] += recon_uv_stride * 8;
|
||||
|
||||
if(mb_row == 2)
|
||||
yv12_extend_frame_top_c(yv12_fb_new);
|
||||
|
||||
}
|
||||
|
||||
lf_dst[0] += recon_y_stride * 16;
|
||||
@@ -713,13 +708,9 @@ static void decode_mb_rows(VP8D_COMP *pbi)
|
||||
eb_dst[0],
|
||||
eb_dst[1],
|
||||
eb_dst[2]);
|
||||
|
||||
eb_dst[0] += recon_y_stride * 16;
|
||||
eb_dst[1] += recon_uv_stride * 8;
|
||||
eb_dst[2] += recon_uv_stride * 8;
|
||||
|
||||
if(mb_row == 1)
|
||||
yv12_extend_frame_top_c(yv12_fb_new);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -747,7 +738,7 @@ static void decode_mb_rows(VP8D_COMP *pbi)
|
||||
eb_dst[0],
|
||||
eb_dst[1],
|
||||
eb_dst[2]);
|
||||
|
||||
yv12_extend_frame_top_c(yv12_fb_new);
|
||||
yv12_extend_frame_bottom_c(yv12_fb_new);
|
||||
|
||||
}
|
@@ -8,11 +8,11 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef DECODEMV_H_
|
||||
#define DECODEMV_H_
|
||||
#ifndef VP8_DECODER_DECODEMV_H_
|
||||
#define VP8_DECODER_DECODEMV_H_
|
||||
|
||||
#include "onyxd_int.h"
|
||||
|
||||
void vp8_decode_mode_mvs(VP8D_COMP *);
|
||||
|
||||
#endif // DECODEMV_H_
|
||||
#endif // VP8_DECODER_DECODEMV_H_
|
||||
|
@@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef DECODERTHREADING_H_
|
||||
#define DECODERTHREADING_H_
|
||||
#ifndef VP8_DECODER_DECODERTHREADING_H_
|
||||
#define VP8_DECODER_DECODERTHREADING_H_
|
||||
|
||||
#if CONFIG_MULTITHREAD
|
||||
void vp8mt_decode_mb_rows(VP8D_COMP *pbi, MACROBLOCKD *xd);
|
||||
@@ -19,4 +19,4 @@ void vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows);
|
||||
void vp8mt_de_alloc_temp_buffers(VP8D_COMP *pbi, int mb_rows);
|
||||
#endif
|
||||
|
||||
#endif // DECODERTHREADING_H_
|
||||
#endif // VP8_DECODER_DECODERTHREADING_H_
|
||||
|
@@ -8,12 +8,12 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef DETOKENIZE_H_
|
||||
#define DETOKENIZE_H_
|
||||
#ifndef VP8_DECODER_DETOKENIZE_H_
|
||||
#define VP8_DECODER_DETOKENIZE_H_
|
||||
|
||||
#include "onyxd_int.h"
|
||||
|
||||
void vp8_reset_mb_tokens_context(MACROBLOCKD *x);
|
||||
int vp8_decode_mb_tokens(VP8D_COMP *, MACROBLOCKD *);
|
||||
|
||||
#endif // DETOKENIZE_H
|
||||
#endif // VP8_DECODER_DETOKENIZE_H_
|
||||
|
@@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_DEC_EC_TYPES_H
|
||||
#define VP8_DEC_EC_TYPES_H
|
||||
#ifndef VP8_DECODER_EC_TYPES_H_
|
||||
#define VP8_DECODER_EC_TYPES_H_
|
||||
|
||||
#define MAX_OVERLAPS 16
|
||||
|
||||
@@ -47,4 +47,4 @@ typedef struct
|
||||
MV_REFERENCE_FRAME ref_frame;
|
||||
} EC_BLOCK;
|
||||
|
||||
#endif // VP8_DEC_EC_TYPES_H
|
||||
#endif // VP8_DECODER_EC_TYPES_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ERROR_CONCEALMENT_H_
|
||||
#define ERROR_CONCEALMENT_H_
|
||||
#ifndef VP8_DECODER_ERROR_CONCEALMENT_H_
|
||||
#define VP8_DECODER_ERROR_CONCEALMENT_H_
|
||||
|
||||
#include "onyxd_int.h"
|
||||
#include "ec_types.h"
|
||||
@@ -38,4 +38,4 @@ void vp8_interpolate_motion(MACROBLOCKD *mb,
|
||||
*/
|
||||
void vp8_conceal_corrupt_mb(MACROBLOCKD *xd);
|
||||
|
||||
#endif // ERROR_CONCEALMENT_H_
|
||||
#endif // VP8_DECODER_ERROR_CONCEALMENT_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ONYXD_INT_H_
|
||||
#define ONYXD_INT_H_
|
||||
#ifndef VP8_DECODER_ONYXD_INT_H_
|
||||
#define VP8_DECODER_ONYXD_INT_H_
|
||||
|
||||
#include "vpx_config.h"
|
||||
#include "vp8/common/onyxd.h"
|
||||
@@ -148,4 +148,4 @@ int vp8_remove_decoder_instances(struct frame_buffers *fb);
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#endif // ONYXD_INT_H_
|
||||
#endif // VP8_DECODER_ONYXD_INT_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TREEREADER_H_
|
||||
#define TREEREADER_H_
|
||||
#ifndef VP8_DECODER_TREEREADER_H_
|
||||
#define VP8_DECODER_TREEREADER_H_
|
||||
|
||||
#include "vp8/common/treecoder.h"
|
||||
#include "dboolhuff.h"
|
||||
@@ -37,4 +37,4 @@ static int vp8_treed_read(
|
||||
return -i;
|
||||
}
|
||||
|
||||
#endif // TREEREADER_H_
|
||||
#endif // VP8_DECODER_TREEREADER_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_BITSTREAM_H
|
||||
#define __INC_BITSTREAM_H
|
||||
#ifndef VP8_ENCODER_BITSTREAM_H_
|
||||
#define VP8_ENCODER_BITSTREAM_H_
|
||||
|
||||
#if HAVE_EDSP
|
||||
void vp8cx_pack_tokens_armv5(vp8_writer *w, const TOKENEXTRA *p, int xcount,
|
||||
@@ -43,4 +43,4 @@ void vp8_pack_tokens_c(vp8_writer *w, const TOKENEXTRA *p, int xcount);
|
||||
# define pack_mb_row_tokens(a,b) pack_mb_row_tokens_c(a,b)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // VP8_ENCODER_BITSTREAM_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_BLOCK_H
|
||||
#define __INC_BLOCK_H
|
||||
#ifndef VP8_ENCODER_BLOCK_H_
|
||||
#define VP8_ENCODER_BLOCK_H_
|
||||
|
||||
#include "vp8/common/onyx.h"
|
||||
#include "vp8/common/blockd.h"
|
||||
@@ -160,4 +160,4 @@ typedef struct macroblock
|
||||
} MACROBLOCK;
|
||||
|
||||
|
||||
#endif
|
||||
#endif // VP8_ENCODER_BLOCK_H_
|
||||
|
@@ -16,8 +16,8 @@
|
||||
* Description : Bool Coder header file.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef __INC_BOOLHUFF_H
|
||||
#define __INC_BOOLHUFF_H
|
||||
#ifndef VP8_ENCODER_BOOLHUFF_H_
|
||||
#define VP8_ENCODER_BOOLHUFF_H_
|
||||
|
||||
#include "vpx_ports/mem.h"
|
||||
#include "vpx/internal/vpx_codec_internal.h"
|
||||
@@ -125,4 +125,4 @@ static void vp8_encode_bool(BOOL_CODER *br, int bit, int probability)
|
||||
br->range = range;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // VP8_ENCODER_BOOLHUFF_H_
|
||||
|
@@ -8,6 +8,9 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_ENCODER_DCT_VALUE_COST_H_
|
||||
#define VP8_ENCODER_DCT_VALUE_COST_H_
|
||||
|
||||
/* Generated file, included by tokenize.c */
|
||||
/* Values generated by fill_value_tokens() */
|
||||
|
||||
@@ -356,3 +359,5 @@ static const short dct_value_cost[2048*2] =
|
||||
8134, 8140, 8148, 8170, 8178, 8184, 8192, 8202, 8210, 8216, 8224, 8243,
|
||||
8251, 8257, 8265, 8275
|
||||
};
|
||||
|
||||
#endif // VP8_ENCODER_DCT_VALUE_COST_H_
|
||||
|
@@ -8,6 +8,9 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_ENCODER_DCT_VALUE_TOKENS_H_
|
||||
#define VP8_ENCODER_DCT_VALUE_TOKENS_H_
|
||||
|
||||
/* Generated file, included by tokenize.c */
|
||||
/* Values generated by fill_value_tokens() */
|
||||
|
||||
@@ -697,3 +700,5 @@ static const TOKENVALUE dct_value_tokens[2048*2] =
|
||||
{10, 3942}, {10, 3944}, {10, 3946}, {10, 3948}, {10, 3950}, {10, 3952},
|
||||
{10, 3954}, {10, 3956}, {10, 3958}, {10, 3960}
|
||||
};
|
||||
|
||||
#endif // VP8_ENCODER_DCT_VALUE_TOKENS_H_
|
||||
|
@@ -8,6 +8,9 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef VP8_ENCODER_DEFAULTCOEFCOUNTS_H_
|
||||
#define VP8_ENCODER_DEFAULTCOEFCOUNTS_H_
|
||||
|
||||
/* Generated file, included by entropy.c */
|
||||
|
||||
static const unsigned int default_coef_counts[BLOCK_TYPES]
|
||||
@@ -221,3 +224,5 @@ static const unsigned int default_coef_counts[BLOCK_TYPES]
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
#endif // VP8_ENCODER_DEFAULTCOEFCOUNTS_H_
|
||||
|
@@ -39,4 +39,4 @@ void vp8_denoiser_denoise_mb(VP8_DENOISER *denoiser,
|
||||
int recon_yoffset,
|
||||
int recon_uvoffset);
|
||||
|
||||
#endif /* VP8_ENCODER_DENOISING_H_ */
|
||||
#endif // VP8_ENCODER_DENOISING_H_
|
||||
|
@@ -7,8 +7,8 @@
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#ifndef ENCODEFRAME_H
|
||||
#define ENCODEFRAME_H
|
||||
#ifndef VP8_ENCODER_ENCODEFRAME_H_
|
||||
#define VP8_ENCODER_ENCODEFRAME_H_
|
||||
extern void vp8_activity_masking(VP8_COMP *cpi, MACROBLOCK *x);
|
||||
|
||||
extern void vp8_build_block_offsets(MACROBLOCK *x);
|
||||
@@ -24,4 +24,4 @@ extern int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
|
||||
|
||||
extern int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
|
||||
TOKENEXTRA **t);
|
||||
#endif
|
||||
#endif // VP8_ENCODER_ENCODEFRAME_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ENCODEINTRA_H_
|
||||
#define _ENCODEINTRA_H_
|
||||
#ifndef VP8_ENCODER_ENCODEINTRA_H_
|
||||
#define VP8_ENCODER_ENCODEINTRA_H_
|
||||
#include "onyx_int.h"
|
||||
|
||||
int vp8_encode_intra(VP8_COMP *cpi, MACROBLOCK *x, int use_dc_pred);
|
||||
@@ -18,4 +18,4 @@ void vp8_encode_intra16x16mby(MACROBLOCK *x);
|
||||
void vp8_encode_intra16x16mbuv(MACROBLOCK *x);
|
||||
void vp8_encode_intra4x4mby(MACROBLOCK *mb);
|
||||
void vp8_encode_intra4x4block(MACROBLOCK *x, int ib);
|
||||
#endif
|
||||
#endif // VP8_ENCODER_ENCODEINTRA_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_ENCODEMB_H
|
||||
#define __INC_ENCODEMB_H
|
||||
#ifndef VP8_ENCODER_ENCODEMB_H_
|
||||
#define VP8_ENCODER_ENCODEMB_H_
|
||||
|
||||
#include "onyx_int.h"
|
||||
void vp8_encode_inter16x16(MACROBLOCK *x);
|
||||
@@ -23,4 +23,4 @@ void vp8_transform_intra_mby(MACROBLOCK *x);
|
||||
void vp8_optimize_mby(MACROBLOCK *x);
|
||||
void vp8_optimize_mbuv(MACROBLOCK *x);
|
||||
void vp8_encode_inter16x16y(MACROBLOCK *x);
|
||||
#endif
|
||||
#endif // VP8_ENCODER_ENCODEMB_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_ENCODEMV_H
|
||||
#define __INC_ENCODEMV_H
|
||||
#ifndef VP8_ENCODER_ENCODEMV_H_
|
||||
#define VP8_ENCODER_ENCODEMV_H_
|
||||
|
||||
#include "onyx_int.h"
|
||||
|
||||
@@ -18,4 +18,4 @@ void vp8_write_mvprobs(VP8_COMP *);
|
||||
void vp8_encode_motion_vector(vp8_writer *, const MV *, const MV_CONTEXT *);
|
||||
void vp8_build_component_cost_table(int *mvcost[2], const MV_CONTEXT *mvc, int mvc_flag[2]);
|
||||
|
||||
#endif
|
||||
#endif // VP8_ENCODER_ENCODEMV_H_
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#if !defined __INC_FIRSTPASS_H
|
||||
#define __INC_FIRSTPASS_H
|
||||
#ifndef VP8_ENCODER_FIRSTPASS_H_
|
||||
#define VP8_ENCODER_FIRSTPASS_H_
|
||||
|
||||
extern void vp8_init_first_pass(VP8_COMP *cpi);
|
||||
extern void vp8_first_pass(VP8_COMP *cpi);
|
||||
@@ -21,4 +21,4 @@ extern void vp8_second_pass(VP8_COMP *cpi);
|
||||
extern void vp8_end_second_pass(VP8_COMP *cpi);
|
||||
|
||||
extern size_t vp8_firstpass_stats_sz(unsigned int mb_count);
|
||||
#endif
|
||||
#endif // VP8_ENCODER_FIRSTPASS_H_
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user