Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
4eb8c565
Commit
4eb8c565
authored
11 years ago
by
Ronald S. Bultje
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Allocate memory using appropriate expected alignment in unit tests."
parents
0c8e13d2
ac6ea2ab
v1.14.0-linphone
1.4.X
experimental
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m29-baseline
m31-baseline
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
pcs-2013
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
stable-vp9-decoder
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
v1.3.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/variance_test.cc
+6
-4
test/variance_test.cc
test/vp9_subtract_test.cc
+10
-6
test/vp9_subtract_test.cc
with
16 additions
and
10 deletions
test/variance_test.cc
+
6
−
4
View file @
4eb8c565
...
...
@@ -18,6 +18,7 @@
#include
"vpx/vpx_integer.h"
#include
"vpx_config.h"
extern
"C"
{
#include
"vpx_mem/vpx_mem.h"
#if CONFIG_VP8_ENCODER
# include "vp8/common/variance.h"
# include "vp8_rtcd.h"
...
...
@@ -205,17 +206,18 @@ class SubpelVarianceTest :
rnd
(
ACMRandom
::
DeterministicSeed
());
block_size_
=
width_
*
height_
;
src_
=
new
uint8_t
[
block_size_
]
;
sec_
=
new
uint8_t
[
block_size_
]
;
src_
=
reinterpret_cast
<
uint8_t
*>
(
vpx_memalign
(
16
,
block_size_
))
;
sec_
=
reinterpret_cast
<
uint8_t
*>
(
vpx_memalign
(
16
,
block_size_
))
;
ref_
=
new
uint8_t
[
block_size_
+
width_
+
height_
+
1
];
ASSERT_TRUE
(
src_
!=
NULL
);
ASSERT_TRUE
(
sec_
!=
NULL
);
ASSERT_TRUE
(
ref_
!=
NULL
);
}
virtual
void
TearDown
()
{
delete
[]
src_
;
vpx_free
(
src_
)
;
delete
[]
ref_
;
delete
[]
sec_
;
vpx_free
(
sec_
)
;
}
protected
:
...
...
This diff is collapsed.
Click to expand it.
test/vp9_subtract_test.cc
+
10
−
6
View file @
4eb8c565
...
...
@@ -16,6 +16,7 @@ extern "C" {
#include
"./vpx_config.h"
#include
"./vp9_rtcd.h"
#include
"vp9/common/vp9_blockd.h"
#include
"vpx_mem/vpx_mem.h"
}
typedef
void
(
*
subtract_fn_t
)(
int
rows
,
int
cols
,
...
...
@@ -42,9 +43,12 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
bsize
=
static_cast
<
BLOCK_SIZE_TYPE
>
(
static_cast
<
int
>
(
bsize
)
+
1
))
{
const
int
block_width
=
4
<<
b_width_log2
(
bsize
);
const
int
block_height
=
4
<<
b_height_log2
(
bsize
);
int16_t
*
diff
=
new
int16_t
[
block_width
*
block_height
*
2
];
uint8_t
*
pred
=
new
uint8_t
[
block_width
*
block_height
*
2
];
uint8_t
*
src
=
new
uint8_t
[
block_width
*
block_height
*
2
];
int16_t
*
diff
=
reinterpret_cast
<
int16_t
*>
(
vpx_memalign
(
16
,
sizeof
(
*
diff
)
*
block_width
*
block_height
*
2
));
uint8_t
*
pred
=
reinterpret_cast
<
uint8_t
*>
(
vpx_memalign
(
16
,
block_width
*
block_height
*
2
));
uint8_t
*
src
=
reinterpret_cast
<
uint8_t
*>
(
vpx_memalign
(
16
,
block_width
*
block_height
*
2
));
for
(
int
n
=
0
;
n
<
100
;
n
++
)
{
for
(
int
r
=
0
;
r
<
block_height
;
++
r
)
{
...
...
@@ -80,9 +84,9 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
}
}
}
delete
[]
diff
;
delete
[]
pred
;
delete
[]
src
;
vpx_free
(
diff
)
;
vpx_free
(
pred
)
;
vpx_free
(
src
)
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets