Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libvpx
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
external
libvpx
Commits
a0fcbcfa
Commit
a0fcbcfa
authored
Sep 18, 2013
by
James Zern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix vp8-only build
Change-Id: Id9ce44f3364dd57b30ea491d956a2a0d6186be05
parent
84758960
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
31 deletions
+39
-31
examples.mk
examples.mk
+3
-3
variance_test.cc
test/variance_test.cc
+32
-28
vpxenc.c
vpxenc.c
+4
-0
No files found.
examples.mk
View file @
a0fcbcfa
...
...
@@ -49,9 +49,9 @@ vpxenc.DESCRIPTION = Full featured encoder
UTILS-$(CONFIG_VP8_ENCODER) += vp8_scalable_patterns.c
vp8_scalable_patterns.GUID = 0D6A210B-F482-4D6F-8570-4A9C01ACC88C
vp8_scalable_patterns.DESCRIPTION = Temporal Scalability Encoder
UTILS-$(CONFIG_VP
8
_ENCODER) += vp9_spatial_scalable_encoder.c
vp
8_scalable_patterns
.GUID = 4A38598D-627D-4505-9C7B-D4020C84100D
vp
8_scalable_patterns
.DESCRIPTION = Spatial Scalable Encoder
UTILS-$(CONFIG_VP
9
_ENCODER) += vp9_spatial_scalable_encoder.c
vp
9_spatial_scalable_encoder
.GUID = 4A38598D-627D-4505-9C7B-D4020C84100D
vp
9_spatial_scalable_encoder
.DESCRIPTION = Spatial Scalable Encoder
# Clean up old ivfenc, ivfdec binaries.
ifeq ($(CONFIG_MSVS),yes)
...
...
test/variance_test.cc
View file @
a0fcbcfa
...
...
@@ -78,34 +78,6 @@ static unsigned int subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
return
sse
-
(((
int64_t
)
se
*
se
)
>>
(
l2w
+
l2h
));
}
static
unsigned
int
subpel_avg_variance_ref
(
const
uint8_t
*
ref
,
const
uint8_t
*
src
,
const
uint8_t
*
second_pred
,
int
l2w
,
int
l2h
,
int
xoff
,
int
yoff
,
unsigned
int
*
sse_ptr
)
{
int
se
=
0
;
unsigned
int
sse
=
0
;
const
int
w
=
1
<<
l2w
,
h
=
1
<<
l2h
;
for
(
int
y
=
0
;
y
<
h
;
y
++
)
{
for
(
int
x
=
0
;
x
<
w
;
x
++
)
{
// bilinear interpolation at a 16th pel step
const
int
a1
=
ref
[(
w
+
1
)
*
(
y
+
0
)
+
x
+
0
];
const
int
a2
=
ref
[(
w
+
1
)
*
(
y
+
0
)
+
x
+
1
];
const
int
b1
=
ref
[(
w
+
1
)
*
(
y
+
1
)
+
x
+
0
];
const
int
b2
=
ref
[(
w
+
1
)
*
(
y
+
1
)
+
x
+
1
];
const
int
a
=
a1
+
(((
a2
-
a1
)
*
xoff
+
8
)
>>
4
);
const
int
b
=
b1
+
(((
b2
-
b1
)
*
xoff
+
8
)
>>
4
);
const
int
r
=
a
+
(((
b
-
a
)
*
yoff
+
8
)
>>
4
);
int
diff
=
((
r
+
second_pred
[
w
*
y
+
x
]
+
1
)
>>
1
)
-
src
[
w
*
y
+
x
];
se
+=
diff
;
sse
+=
diff
*
diff
;
}
}
*
sse_ptr
=
sse
;
return
sse
-
(((
int64_t
)
se
*
se
)
>>
(
l2w
+
l2h
));
}
template
<
typename
VarianceFunctionType
>
class
VarianceTest
:
public
::
testing
::
TestWithParam
<
tuple
<
int
,
int
,
VarianceFunctionType
>
>
{
...
...
@@ -190,6 +162,36 @@ void VarianceTest<VarianceFunctionType>::OneQuarterTest() {
EXPECT_EQ
(
expected
,
var
);
}
#if CONFIG_VP9_ENCODER
unsigned
int
subpel_avg_variance_ref
(
const
uint8_t
*
ref
,
const
uint8_t
*
src
,
const
uint8_t
*
second_pred
,
int
l2w
,
int
l2h
,
int
xoff
,
int
yoff
,
unsigned
int
*
sse_ptr
)
{
int
se
=
0
;
unsigned
int
sse
=
0
;
const
int
w
=
1
<<
l2w
,
h
=
1
<<
l2h
;
for
(
int
y
=
0
;
y
<
h
;
y
++
)
{
for
(
int
x
=
0
;
x
<
w
;
x
++
)
{
// bilinear interpolation at a 16th pel step
const
int
a1
=
ref
[(
w
+
1
)
*
(
y
+
0
)
+
x
+
0
];
const
int
a2
=
ref
[(
w
+
1
)
*
(
y
+
0
)
+
x
+
1
];
const
int
b1
=
ref
[(
w
+
1
)
*
(
y
+
1
)
+
x
+
0
];
const
int
b2
=
ref
[(
w
+
1
)
*
(
y
+
1
)
+
x
+
1
];
const
int
a
=
a1
+
(((
a2
-
a1
)
*
xoff
+
8
)
>>
4
);
const
int
b
=
b1
+
(((
b2
-
b1
)
*
xoff
+
8
)
>>
4
);
const
int
r
=
a
+
(((
b
-
a
)
*
yoff
+
8
)
>>
4
);
int
diff
=
((
r
+
second_pred
[
w
*
y
+
x
]
+
1
)
>>
1
)
-
src
[
w
*
y
+
x
];
se
+=
diff
;
sse
+=
diff
*
diff
;
}
}
*
sse_ptr
=
sse
;
return
sse
-
(((
int64_t
)
se
*
se
)
>>
(
l2w
+
l2h
));
}
template
<
typename
SubpelVarianceFunctionType
>
class
SubpelVarianceTest
:
public
::
testing
::
TestWithParam
<
tuple
<
int
,
int
,
...
...
@@ -280,6 +282,8 @@ void SubpelVarianceTest<vp9_subp_avg_variance_fn_t>::RefTest() {
}
}
#endif // CONFIG_VP9_ENCODER
// -----------------------------------------------------------------------------
// VP8 test cases.
...
...
vpxenc.c
View file @
a0fcbcfa
...
...
@@ -1765,9 +1765,13 @@ static void parse_global_config(struct global_config *global, char **argv) {
/* Validate global config */
if
(
global
->
passes
==
0
)
{
#if CONFIG_VP9_ENCODER
// Make default VP9 passes = 2 until there is a better quality 1-pass
// encoder
global
->
passes
=
(
global
->
codec
->
iface
==
vpx_codec_vp9_cx
?
2
:
1
);
#else
global
->
passes
=
1
;
#endif
}
if
(
global
->
pass
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment