Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
a8c8bf1c
Commit
a8c8bf1c
authored
Jun 03, 2016
by
Jacky Chen
Committed by
Gerrit Code Review
Jun 03, 2016
Browse files
Merge "vp9: Fix valgrind failure for short circuit on low temporal vaiance block."
parents
7aef9790
891dbe1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_encodeframe.c
View file @
a8c8bf1c
...
...
@@ -1027,31 +1027,6 @@ static int choose_partitioning(VP9_COMP *cpi,
force_split
[
0
]
=
1
;
}
if
(
cpi
->
sf
.
short_circuit_low_temp_var
)
{
// Set low variance flag, only for blocks >= 32x32 and if LAST_FRAME was
// selected.
if
(
ref_frame_partition
==
LAST_FRAME
)
{
// 64x64
if
(
vt
.
part_variances
.
none
.
variance
<
(
thresholds
[
0
]
>>
1
))
x
->
variance_low
[
0
]
=
1
;
// 64x32
if
(
vt
.
part_variances
.
horz
[
0
].
variance
<
(
thresholds
[
0
]
>>
2
))
x
->
variance_low
[
1
]
=
1
;
if
(
vt
.
part_variances
.
horz
[
1
].
variance
<
(
thresholds
[
0
]
>>
2
))
x
->
variance_low
[
2
]
=
1
;
// 32x64
if
(
vt
.
part_variances
.
vert
[
0
].
variance
<
(
thresholds
[
0
]
>>
2
))
x
->
variance_low
[
3
]
=
1
;
if
(
vt
.
part_variances
.
vert
[
1
].
variance
<
(
thresholds
[
0
]
>>
2
))
x
->
variance_low
[
4
]
=
1
;
// 32x32
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
vt
.
split
[
i
].
part_variances
.
none
.
variance
<
(
thresholds
[
1
]
>>
1
))
x
->
variance_low
[
i
+
5
]
=
1
;
}
}
}
// Now go through the entire structure, splitting every block size until
// we get to one that's got a variance lower than our threshold.
if
(
mi_col
+
8
>
cm
->
mi_cols
||
mi_row
+
8
>
cm
->
mi_rows
||
...
...
@@ -1106,6 +1081,34 @@ static int choose_partitioning(VP9_COMP *cpi,
}
}
}
if
(
cpi
->
sf
.
short_circuit_low_temp_var
)
{
// Set low variance flag, only for blocks >= 32x32 and if LAST_FRAME was
// selected.
if
(
ref_frame_partition
==
LAST_FRAME
)
{
if
(
xd
->
mi
[
0
]
->
sb_type
==
BLOCK_64X64
&&
vt
.
part_variances
.
none
.
variance
<
(
thresholds
[
0
]
>>
1
))
{
x
->
variance_low
[
0
]
=
1
;
}
else
if
(
xd
->
mi
[
0
]
->
sb_type
==
BLOCK_64X32
)
{
if
(
vt
.
part_variances
.
horz
[
0
].
variance
<
(
thresholds
[
0
]
>>
2
))
x
->
variance_low
[
1
]
=
1
;
if
(
vt
.
part_variances
.
horz
[
1
].
variance
<
(
thresholds
[
0
]
>>
2
))
x
->
variance_low
[
2
]
=
1
;
}
else
if
(
xd
->
mi
[
0
]
->
sb_type
==
BLOCK_32X64
)
{
if
(
vt
.
part_variances
.
vert
[
0
].
variance
<
(
thresholds
[
0
]
>>
2
))
x
->
variance_low
[
3
]
=
1
;
if
(
vt
.
part_variances
.
vert
[
1
].
variance
<
(
thresholds
[
0
]
>>
2
))
x
->
variance_low
[
4
]
=
1
;
}
else
{
// 32x32
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
!
force_split
[
i
+
1
]
&&
vt
.
split
[
i
].
part_variances
.
none
.
variance
<
(
thresholds
[
1
]
>>
1
))
x
->
variance_low
[
i
+
5
]
=
1
;
}
}
}
}
return
0
;
}
...
...
vp9/encoder/vp9_speed_features.c
View file @
a8c8bf1c
...
...
@@ -431,8 +431,8 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
sf
->
skip_encode_sb
=
0
;
if
(
!
cpi
->
use_svc
&&
cpi
->
oxcf
.
rc_mode
==
VPX_CBR
&&
cpi
->
oxcf
.
pass
==
0
&&
content
!=
VP9E_CONTENT_SCREEN
)
{
//
Dis
able short circuit for low temporal variance.
sf
->
short_circuit_low_temp_var
=
0
;
//
En
able short circuit for low temporal variance.
sf
->
short_circuit_low_temp_var
=
1
;
}
}
...
...
Write
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!
Cancel
Please
register
or
sign in
to comment