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
Xiph.Org
aom-rav1e
Commits
0c628e64
Commit
0c628e64
authored
Nov 30, 2016
by
hui su
Committed by
Hui Su
Dec 01, 2016
Browse files
Make alt-intra work with ext-intra
Change-Id: I2a814ba878a57c6b73f8f9e29bea6c7edfe7c789
parent
e166e25f
Changes
4
Hide whitespace changes
Inline
Side-by-side
av1/common/pred_common.c
View file @
0c628e64
...
...
@@ -12,6 +12,9 @@
#include "av1/common/common.h"
#include "av1/common/pred_common.h"
#include "av1/common/reconinter.h"
#if CONFIG_EXT_INTRA
#include "av1/common/reconintra.h"
#endif // CONFIG_EXT_INTRA
#include "av1/common/seg_common.h"
// Returns a context number for the given MB prediction signal
...
...
@@ -112,7 +115,7 @@ static INTRA_FILTER get_ref_intra_filter(const MB_MODE_INFO *ref_mbmi) {
default:
break
;
}
}
else
{
if
(
mode
!=
DC_PRED
&&
mode
!=
TM_PRED
)
{
if
(
av1_is_directional_mode
(
mode
,
ref_mbmi
->
sb_type
)
)
{
int
p_angle
=
mode_to_angle_map
[
mode
]
+
ref_mbmi
->
angle_delta
[
0
]
*
ANGLE_STEP
;
if
(
av1_is_intra_filter_switchable
(
p_angle
))
{
...
...
av1/common/reconintra.c
View file @
0c628e64
...
...
@@ -1251,8 +1251,7 @@ static void build_intra_predictors_high(
const
uint16_t
*
above_ref
=
ref
-
ref_stride
;
#if CONFIG_EXT_INTRA
int
p_angle
=
0
;
const
int
is_dr_mode
=
mode
!=
DC_PRED
&&
mode
!=
TM_PRED
&&
xd
->
mi
[
0
]
->
mbmi
.
sb_type
>=
BLOCK_8X8
;
const
int
is_dr_mode
=
av1_is_directional_mode
(
mode
,
xd
->
mi
[
0
]
->
mbmi
.
sb_type
);
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
const
FILTER_INTRA_MODE_INFO
*
filter_intra_mode_info
=
...
...
@@ -1411,8 +1410,7 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
int
need_above_left
=
extend_modes
[
mode
]
&
NEED_ABOVELEFT
;
#if CONFIG_EXT_INTRA
int
p_angle
=
0
;
const
int
is_dr_mode
=
mode
!=
DC_PRED
&&
mode
!=
TM_PRED
&&
xd
->
mi
[
0
]
->
mbmi
.
sb_type
>=
BLOCK_8X8
;
const
int
is_dr_mode
=
av1_is_directional_mode
(
mode
,
xd
->
mi
[
0
]
->
mbmi
.
sb_type
);
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
const
FILTER_INTRA_MODE_INFO
*
filter_intra_mode_info
=
...
...
@@ -1531,8 +1529,7 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if
(
mode
!=
DC_PRED
&&
mode
!=
TM_PRED
&&
xd
->
mi
[
0
]
->
mbmi
.
sb_type
>=
BLOCK_8X8
)
{
if
(
is_dr_mode
)
{
INTRA_FILTER
filter
=
INTRA_FILTER_LINEAR
;
if
(
plane
==
0
&&
av1_is_intra_filter_switchable
(
p_angle
))
filter
=
xd
->
mi
[
0
]
->
mbmi
.
intra_filter
;
...
...
av1/common/reconintra.h
View file @
0c628e64
...
...
@@ -48,4 +48,15 @@ static const INTERINTRA_MODE intra_to_interintra_mode[INTRA_MODES] = {
extern
int
av1_filter_intra_taps_4
[
TX_SIZES
][
INTRA_MODES
][
4
];
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
static
INLINE
int
av1_is_directional_mode
(
PREDICTION_MODE
mode
,
BLOCK_SIZE
bsize
)
{
return
mode
!=
DC_PRED
&&
mode
!=
TM_PRED
&&
#if CONFIG_ALT_INTRA
mode
!=
SMOOTH_PRED
&&
#endif // CONFIG_ALT_INTRA
bsize
>=
BLOCK_8X8
;
}
#endif // CONFIG_EXT_INTRA
#endif // AV1_COMMON_RECONINTRA_H_
av1/encoder/rdopt.c
View file @
0c628e64
...
...
@@ -4079,11 +4079,11 @@ static int64_t rd_pick_intra_sbuv_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
mbmi->uv_mode = mode;
#if CONFIG_EXT_INTRA
is_directional_mode =
(mode != DC_PRED && mode != TM_PRED
);
is_directional_mode =
av1_is_directional_mode(mode, mbmi->sb_type
);
rate_overhead = cpi->intra_uv_mode_cost[mbmi->mode][mode] +
write_uniform_cost(2 * MAX_ANGLE_DELTAS + 1, 0);
mbmi->angle_delta[1] = 0;
if (
mbmi->sb_type >= BLOCK_8X8 &&
is_directional_mode) {
if (is_directional_mode) {
if (!rd_pick_intra_angle_sbuv(
cpi, x, &this_rate, &tokenonly_rd_stats.rate,
&tokenonly_rd_stats.dist, &tokenonly_rd_stats.skip, bsize,
...
...
@@ -4099,7 +4099,7 @@ static int64_t rd_pick_intra_sbuv_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
}
this_rate =
tokenonly_rd_stats.rate + cpi->intra_uv_mode_cost[mbmi->mode][mode];
if (
mbmi->sb_type >= BLOCK_8X8 &&
is_directional_mode)
if (is_directional_mode)
this_rate += write_uniform_cost(2 * MAX_ANGLE_DELTAS + 1,
MAX_ANGLE_DELTAS + mbmi->angle_delta[1]);
#else
...
...
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