Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Martres
aom-rav1e
Commits
219a006b
Commit
219a006b
authored
Apr 17, 2014
by
Dmitry Kovalev
Browse files
Adding get_pass() function.
Change-Id: I43de248615b79828d5164b670e7358b8a520d075
parent
69009e73
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_onyx_if.c
View file @
219a006b
...
...
@@ -679,6 +679,23 @@ static void init_config(struct VP9_COMP *cpi, VP9_CONFIG *oxcf) {
cpi
->
fixed_divide
[
i
]
=
0x80000
/
i
;
}
static
int
get_pass
(
MODE
mode
)
{
switch
(
mode
)
{
case
REALTIME
:
case
ONE_PASS_GOOD
:
case
ONE_PASS_BEST
:
return
0
;
case
TWO_PASS_FIRST
:
return
1
;
case
TWO_PASS_SECOND_GOOD
:
case
TWO_PASS_SECOND_BEST
:
return
2
;
}
return
-
1
;
}
void
vp9_change_config
(
struct
VP9_COMP
*
cpi
,
const
VP9_CONFIG
*
oxcf
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
RATE_CONTROL
*
const
rc
=
&
cpi
->
rc
;
...
...
@@ -693,34 +710,9 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9_CONFIG *oxcf) {
assert
(
cm
->
bit_depth
>
BITS_8
);
cpi
->
oxcf
=
*
oxcf
;
switch
(
cpi
->
oxcf
.
mode
)
{
// Real time and one pass deprecated in test code base
case
ONE_PASS_GOOD
:
cpi
->
pass
=
0
;
break
;
case
ONE_PASS_BEST
:
cpi
->
pass
=
0
;
break
;
case
TWO_PASS_FIRST
:
cpi
->
pass
=
1
;
break
;
case
TWO_PASS_SECOND_GOOD
:
cpi
->
pass
=
2
;
break
;
case
TWO_PASS_SECOND_BEST
:
cpi
->
pass
=
2
;
break
;
case
REALTIME
:
cpi
->
pass
=
0
;
cpi
->
oxcf
.
play_alternate
=
0
;
break
;
}
cpi
->
pass
=
get_pass
(
cpi
->
oxcf
.
mode
);
if
(
cpi
->
oxcf
.
mode
==
REALTIME
)
cpi
->
oxcf
.
play_alternate
=
0
;
cpi
->
oxcf
.
lossless
=
oxcf
->
lossless
;
if
(
cpi
->
oxcf
.
lossless
)
{
...
...
Write
Preview
Supports
Markdown
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