Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
c62228f2
Commit
c62228f2
authored
Jul 31, 2015
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify model_rd_for_sb HBD ifdefs
Change-Id: Ic1ce346a053800ae3b2d77178f46e6a388357f6d
parent
da9c73c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_rdopt.c
+9
-18
No files found.
vp9/encoder/vp9_rdopt.c
View file @
c62228f2
...
...
@@ -172,6 +172,12 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
const
int
shift
=
6
;
int
rate
;
int64_t
dist
;
const
int
dequant_shift
=
#if CONFIG_VP9_HIGHBITDEPTH
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
?
xd
->
bd
-
5
:
#endif // CONFIG_VP9_HIGHBITDEPTH
3
;
x
->
pred_sse
[
ref
]
=
0
;
...
...
@@ -237,12 +243,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
if
(
cpi
->
sf
.
simple_model_rd_from_var
)
{
int64_t
rate
;
const
int64_t
square_error
=
sum_sse
;
int
quantizer
=
(
pd
->
dequant
[
1
]
>>
3
);
#if CONFIG_VP9_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
quantizer
>>=
(
xd
->
bd
-
8
);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
int
quantizer
=
(
pd
->
dequant
[
1
]
>>
dequant_shift
);
if
(
quantizer
<
120
)
rate
=
(
square_error
*
(
280
-
quantizer
))
>>
8
;
...
...
@@ -252,19 +253,9 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
rate_sum
+=
rate
;
dist_sum
+=
dist
;
}
else
{
#if CONFIG_VP9_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
vp9_model_rd_from_var_lapndz
(
sum_sse
,
num_pels_log2_lookup
[
bs
],
pd
->
dequant
[
1
]
>>
(
xd
->
bd
-
5
)
,
pd
->
dequant
[
1
]
>>
dequant_shift
,
&
rate
,
&
dist
);
}
else
{
vp9_model_rd_from_var_lapndz
(
sum_sse
,
num_pels_log2_lookup
[
bs
],
pd
->
dequant
[
1
]
>>
3
,
&
rate
,
&
dist
);
}
#else
vp9_model_rd_from_var_lapndz
(
sum_sse
,
num_pels_log2_lookup
[
bs
],
pd
->
dequant
[
1
]
>>
3
,
&
rate
,
&
dist
);
#endif // CONFIG_VP9_HIGHBITDEPTH
rate_sum
+=
rate
;
dist_sum
+=
dist
;
}
...
...
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