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
79c763bf
Commit
79c763bf
authored
Jan 18, 2018
by
Hui Su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ext_intra experimental flag
Change-Id: I69e07309b708caa59c313ae2156828d8c089cf4d
parent
4ef06b5d
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
21 additions
and
141 deletions
+21
-141
av1/common/blockd.c
av1/common/blockd.c
+0
-2
av1/common/blockd.h
av1/common/blockd.h
+0
-4
av1/common/enums.h
av1/common/enums.h
+0
-2
av1/common/pred_common.c
av1/common/pred_common.c
+0
-2
av1/common/reconinter.c
av1/common/reconinter.c
+0
-2
av1/common/reconintra.c
av1/common/reconintra.c
+13
-53
av1/common/reconintra.h
av1/common/reconintra.h
+0
-2
av1/decoder/decodemv.c
av1/decoder/decodemv.c
+0
-10
av1/encoder/bitstream.c
av1/encoder/bitstream.c
+0
-8
av1/encoder/block.h
av1/encoder/block.h
+2
-2
av1/encoder/encodeframe.c
av1/encoder/encodeframe.c
+4
-4
av1/encoder/rd.c
av1/encoder/rd.c
+2
-2
av1/encoder/rdopt.c
av1/encoder/rdopt.c
+0
-47
build/cmake/aom_config_defaults.cmake
build/cmake/aom_config_defaults.cmake
+0
-1
No files found.
av1/common/blockd.c
View file @
79c763bf
...
...
@@ -173,7 +173,6 @@ void av1_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y) {
}
}
#if CONFIG_EXT_INTRA
#if CONFIG_EXT_INTRA_MOD2
const
int16_t
dr_intra_derivative
[
90
]
=
{
// More evenly spread out angles and limited to 10-bit
...
...
@@ -219,4 +218,3 @@ const int16_t dr_intra_derivative[90] = {
54
,
49
,
45
,
40
,
35
,
31
,
26
,
22
,
17
,
13
,
8
,
4
,
};
#endif // CONFIG_EXT_INTRA_MOD2
#endif // CONFIG_EXT_INTRA
av1/common/blockd.h
View file @
79c763bf
...
...
@@ -267,10 +267,8 @@ typedef struct MB_MODE_INFO {
#if CONFIG_FILTER_INTRA
FILTER_INTRA_MODE_INFO
filter_intra_mode_info
;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
// The actual prediction angle is the base angle + (angle_delta * step).
int8_t
angle_delta
[
2
];
#endif // CONFIG_EXT_INTRA
// interintra members
INTERINTRA_MODE
interintra_mode
;
...
...
@@ -855,12 +853,10 @@ static INLINE TX_SIZE tx_size_from_tx_mode(BLOCK_SIZE bsize, TX_MODE tx_mode,
return
largest_tx_size
;
}
#if CONFIG_EXT_INTRA
extern
const
int16_t
dr_intra_derivative
[
90
];
static
const
uint8_t
mode_to_angle_map
[]
=
{
0
,
90
,
180
,
45
,
135
,
113
,
157
,
203
,
67
,
0
,
0
,
0
,
0
,
};
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
static
INLINE
int
av1_filter_intra_allowed_txsize
(
TX_SIZE
tx
)
{
...
...
av1/common/enums.h
View file @
79c763bf
...
...
@@ -550,11 +550,9 @@ typedef enum ATTRIBUTE_PACKED {
#define COEFF_LEVELS 18
#endif
#if CONFIG_EXT_INTRA
#define DIRECTIONAL_MODES 8
#define MAX_ANGLE_DELTA 3
#define ANGLE_STEP 3
#endif // CONFIG_EXT_INTRA
#define INTER_MODES (1 + NEWMV - NEARESTMV)
...
...
av1/common/pred_common.c
View file @
79c763bf
...
...
@@ -12,9 +12,7 @@
#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
...
...
av1/common/reconinter.c
View file @
79c763bf
...
...
@@ -1909,10 +1909,8 @@ void av1_build_intra_predictors_for_interintra(const AV1_COMMON *cm,
BLOCK_SIZE
plane_bsize
=
get_plane_block_size
(
bsize
,
&
xd
->
plane
[
plane
]);
PREDICTION_MODE
mode
=
interintra_to_intra_mode
[
xd
->
mi
[
0
]
->
mbmi
.
interintra_mode
];
#if CONFIG_EXT_INTRA
xd
->
mi
[
0
]
->
mbmi
.
angle_delta
[
0
]
=
0
;
xd
->
mi
[
0
]
->
mbmi
.
angle_delta
[
1
]
=
0
;
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
xd
->
mi
[
0
]
->
mbmi
.
filter_intra_mode_info
.
use_filter_intra
=
0
;
#endif // CONFIG_FILTER_INTRA
...
...
av1/common/reconintra.c
View file @
79c763bf
...
...
@@ -573,9 +573,7 @@ static intra_high_pred_fn pred_high[INTRA_MODES][TX_SIZES_ALL];
static
intra_high_pred_fn
dc_pred_high
[
2
][
2
][
TX_SIZES_ALL
];
static
void
av1_init_intra_predictors_internal
(
void
)
{
#if CONFIG_EXT_INTRA
assert
(
NELEMENTS
(
mode_to_angle_map
)
==
INTRA_MODES
);
#endif // CONFIG_EXT_INTRA
#if CONFIG_TX64X64
#define INIT_RECTANGULAR(p, type) \
...
...
@@ -666,7 +664,6 @@ static void av1_init_intra_predictors_internal(void) {
#undef intra_pred_allsizes
}
#if CONFIG_EXT_INTRA
// Directional prediction, zone 1: 0 < angle < 90
static
void
dr_prediction_z1
(
uint8_t
*
dst
,
ptrdiff_t
stride
,
int
bw
,
int
bh
,
const
uint8_t
*
above
,
const
uint8_t
*
left
,
...
...
@@ -1122,7 +1119,6 @@ static void highbd_dr_predictor(uint16_t *dst, ptrdiff_t stride,
pred_high
[
H_PRED
][
tx_size
](
dst
,
stride
,
above
,
left
,
bd
);
}
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
static
int
filter_intra_taps_4x2procunit
[
FILTER_INTRA_MODES
][
8
][
7
]
=
{
...
...
@@ -1641,10 +1637,8 @@ static void build_intra_predictors_high(
int
need_above_left
=
extend_modes
[
mode
]
&
NEED_ABOVELEFT
;
const
uint16_t
*
above_ref
=
ref
-
ref_stride
;
const
uint16_t
*
left_ref
=
ref
-
1
;
#if CONFIG_EXT_INTRA
int
p_angle
=
0
;
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
int
use_filter_intra
=
plane
>
0
?
0
:
xd
->
mi
[
0
]
->
mbmi
.
filter_intra_mode_info
.
use_filter_intra
;
...
...
@@ -1653,14 +1647,13 @@ static void build_intra_predictors_high(
#endif // CONFIG_FILTER_INTRA
int
base
=
128
<<
(
xd
->
bd
-
8
);
// The default values if ref pixels are not available:
// base-1 base-1 base-1 .. base-1 base-1 base-1 base-1 base-1 base-1
// base+1 A B .. Y Z
// base+1 C D .. W X
// base+1 E F .. U V
// base+1 G H .. S T T T T T
// The default values if ref pixels are not available:
// base-1 base-1 base-1 .. base-1 base-1 base-1 base-1 base-1 base-1
// base+1 A B .. Y Z
// base+1 C D .. W X
// base+1 E F .. U V
// base+1 G H .. S T T T T T
#if CONFIG_EXT_INTRA
if
(
is_dr_mode
)
{
p_angle
=
mode_to_angle_map
[
mode
]
+
xd
->
mi
[
0
]
->
mbmi
.
angle_delta
[
plane
!=
0
]
*
ANGLE_STEP
;
...
...
@@ -1671,7 +1664,6 @@ static void build_intra_predictors_high(
else
need_above
=
0
,
need_left
=
1
,
need_above_left
=
1
;
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
if
(
use_filter_intra
)
need_left
=
need_above
=
need_above_left
=
1
;
#endif // CONFIG_FILTER_INTRA
...
...
@@ -1702,17 +1694,11 @@ static void build_intra_predictors_high(
// NEED_LEFT
if
(
need_left
)
{
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
int
need_bottom
=
!!
(
extend_modes
[
mode
]
&
NEED_BOTTOMLEFT
);
#if CONFIG_FILTER_INTRA
if
(
use_filter_intra
)
need_bottom
=
0
;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if
(
is_dr_mode
)
need_bottom
=
p_angle
>
180
;
#endif // CONFIG_EXT_INTRA
#else
const
int
need_bottom
=
!!
(
extend_modes
[
mode
]
&
NEED_BOTTOMLEFT
);
#endif // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
const
int
num_left_pixels_needed
=
txhpx
+
(
need_bottom
?
txwpx
:
0
);
i
=
0
;
if
(
n_left_px
>
0
)
{
...
...
@@ -1739,17 +1725,11 @@ static void build_intra_predictors_high(
// NEED_ABOVE
if
(
need_above
)
{
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
int
need_right
=
!!
(
extend_modes
[
mode
]
&
NEED_ABOVERIGHT
);
#if CONFIG_FILTER_INTRA
if
(
use_filter_intra
)
need_right
=
0
;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if
(
is_dr_mode
)
need_right
=
p_angle
<
90
;
#endif // CONFIG_EXT_INTRA
#else
const
int
need_right
=
!!
(
extend_modes
[
mode
]
&
NEED_ABOVERIGHT
);
#endif // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
const
int
num_top_pixels_needed
=
txwpx
+
(
need_right
?
txhpx
:
0
);
if
(
n_top_px
>
0
)
{
memcpy
(
above_row
,
above_ref
,
n_top_px
*
sizeof
(
above_ref
[
0
]));
...
...
@@ -1802,7 +1782,6 @@ static void build_intra_predictors_high(
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if
(
is_dr_mode
)
{
#if CONFIG_INTRA_EDGE
const
int
need_right
=
p_angle
<
90
;
...
...
@@ -1849,7 +1828,6 @@ static void build_intra_predictors_high(
p_angle
,
xd
->
bd
);
return
;
}
#endif // CONFIG_EXT_INTRA
// predict
if
(
mode
==
DC_PRED
)
{
...
...
@@ -1878,11 +1856,9 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
int
need_left
=
extend_modes
[
mode
]
&
NEED_LEFT
;
int
need_above
=
extend_modes
[
mode
]
&
NEED_ABOVE
;
int
need_above_left
=
extend_modes
[
mode
]
&
NEED_ABOVELEFT
;
#if CONFIG_EXT_INTRA
int
p_angle
=
0
;
const
MB_MODE_INFO
*
const
mbmi
=
&
xd
->
mi
[
0
]
->
mbmi
;
const
int
is_dr_mode
=
av1_is_directional_mode
(
mode
,
mbmi
->
sb_type
);
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
const
int
use_filter_intra
=
plane
>
0
?
0
:
xd
->
mi
[
0
]
->
mbmi
.
filter_intra_mode_info
.
use_filter_intra
;
...
...
@@ -1890,15 +1866,14 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
xd
->
mi
[
0
]
->
mbmi
.
filter_intra_mode_info
.
filter_intra_mode
;
#endif // CONFIG_FILTER_INTRA
// The default values if ref pixels are not available:
// 127 127 127 .. 127 127 127 127 127 127
// 129 A B .. Y Z
// 129 C D .. W X
// 129 E F .. U V
// 129 G H .. S T T T T T
// ..
// The default values if ref pixels are not available:
// 127 127 127 .. 127 127 127 127 127 127
// 129 A B .. Y Z
// 129 C D .. W X
// 129 E F .. U V
// 129 G H .. S T T T T T
// ..
#if CONFIG_EXT_INTRA
if
(
is_dr_mode
)
{
p_angle
=
mode_to_angle_map
[
mode
]
+
xd
->
mi
[
0
]
->
mbmi
.
angle_delta
[
plane
!=
0
]
*
ANGLE_STEP
;
...
...
@@ -1909,7 +1884,6 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
else
need_above
=
0
,
need_left
=
1
,
need_above_left
=
1
;
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
if
(
use_filter_intra
)
need_left
=
need_above
=
need_above_left
=
1
;
#endif // CONFIG_FILTER_INTRA
...
...
@@ -1941,17 +1915,11 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
// NEED_LEFT
if
(
need_left
)
{
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
int
need_bottom
=
!!
(
extend_modes
[
mode
]
&
NEED_BOTTOMLEFT
);
#if CONFIG_FILTER_INTRA
if
(
use_filter_intra
)
need_bottom
=
0
;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if
(
is_dr_mode
)
need_bottom
=
p_angle
>
180
;
#endif // CONFIG_EXT_INTRA
#else
const
int
need_bottom
=
!!
(
extend_modes
[
mode
]
&
NEED_BOTTOMLEFT
);
#endif // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
const
int
num_left_pixels_needed
=
txhpx
+
(
need_bottom
?
txwpx
:
0
);
i
=
0
;
if
(
n_left_px
>
0
)
{
...
...
@@ -1978,17 +1946,11 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
// NEED_ABOVE
if
(
need_above
)
{
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
int
need_right
=
!!
(
extend_modes
[
mode
]
&
NEED_ABOVERIGHT
);
#if CONFIG_FILTER_INTRA
if
(
use_filter_intra
)
need_right
=
0
;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if
(
is_dr_mode
)
need_right
=
p_angle
<
90
;
#endif // CONFIG_EXT_INTRA
#else
const
int
need_right
=
!!
(
extend_modes
[
mode
]
&
NEED_ABOVERIGHT
);
#endif // CONFIG_EXT_INTRA || CONFIG_FITLER_INTRA
const
int
num_top_pixels_needed
=
txwpx
+
(
need_right
?
txhpx
:
0
);
if
(
n_top_px
>
0
)
{
memcpy
(
above_row
,
above_ref
,
n_top_px
);
...
...
@@ -2038,7 +2000,6 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if
(
is_dr_mode
)
{
#if CONFIG_INTRA_EDGE
const
int
need_right
=
p_angle
<
90
;
...
...
@@ -2085,7 +2046,6 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
p_angle
);
return
;
}
#endif // CONFIG_EXT_INTRA
// predict
if
(
mode
==
DC_PRED
)
{
...
...
av1/common/reconintra.h
View file @
79c763bf
...
...
@@ -47,7 +47,6 @@ static const INTERINTRA_MODE intra_to_interintra_mode[INTRA_MODES] = {
#define CONFIG_USE_ANGLE_DELTA_SUB8X8 0
#if CONFIG_EXT_INTRA
static
INLINE
int
av1_is_directional_mode
(
PREDICTION_MODE
mode
,
BLOCK_SIZE
bsize
)
{
#if CONFIG_INTRA_EDGE
...
...
@@ -66,7 +65,6 @@ static INLINE int av1_use_angle_delta(BLOCK_SIZE bsize) {
return
bsize
>=
BLOCK_8X8
;
#endif
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_INTRABC
static
INLINE
int
av1_allow_intrabc
(
const
AV1_COMMON
*
const
cm
)
{
...
...
av1/decoder/decodemv.c
View file @
79c763bf
...
...
@@ -18,9 +18,7 @@
#include "av1/common/mvref_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"
#include "av1/common/warped_motion.h"
...
...
@@ -840,7 +838,6 @@ static void read_filter_intra_mode_info(MACROBLOCKD *const xd, aom_reader *r) {
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
#if CONFIG_EXT_INTRA_MOD
static
int
read_angle_delta
(
aom_reader
*
r
,
aom_cdf_prob
*
cdf
)
{
const
int
sym
=
aom_read_symbol
(
r
,
cdf
,
2
*
MAX_ANGLE_DELTA
+
1
,
ACCT_STR
);
...
...
@@ -879,7 +876,6 @@ static void read_intra_angle_info(MACROBLOCKD *const xd, aom_reader *r) {
#endif // CONFIG_EXT_INTRA_MOD
}
}
#endif // CONFIG_EXT_INTRA
void
av1_read_tx_type
(
const
AV1_COMMON
*
const
cm
,
MACROBLOCKD
*
xd
,
#if CONFIG_TXK_SEL
...
...
@@ -1152,9 +1148,7 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm,
#endif
}
#if CONFIG_EXT_INTRA
read_intra_angle_info
(
xd
,
r
);
#endif // CONFIG_EXT_INTRA
mbmi
->
palette_mode_info
.
palette_size
[
0
]
=
0
;
mbmi
->
palette_mode_info
.
palette_size
[
1
]
=
0
;
if
(
av1_allow_palette
(
cm
->
allow_screen_content_tools
,
bsize
))
...
...
@@ -1468,9 +1462,7 @@ static void read_intra_block_mode_info(AV1_COMMON *const cm, const int mi_row,
// ext-intra, palette and filter-intra are enabled.
(
void
)
cm
;
#if CONFIG_EXT_INTRA
read_intra_angle_info
(
xd
,
r
);
#endif // CONFIG_EXT_INTRA
mbmi
->
palette_mode_info
.
palette_size
[
0
]
=
0
;
mbmi
->
palette_mode_info
.
palette_size
[
1
]
=
0
;
if
(
av1_allow_palette
(
cm
->
allow_screen_content_tools
,
bsize
))
...
...
@@ -2006,10 +1998,8 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
read_interintra_mode
(
xd
,
r
,
bsize_group
);
mbmi
->
ref_frame
[
1
]
=
INTRA_FRAME
;
mbmi
->
interintra_mode
=
interintra_mode
;
#if CONFIG_EXT_INTRA
mbmi
->
angle_delta
[
0
]
=
0
;
mbmi
->
angle_delta
[
1
]
=
0
;
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
mbmi
->
filter_intra_mode_info
.
use_filter_intra
=
0
;
#endif // CONFIG_FILTER_INTRA
...
...
av1/encoder/bitstream.c
View file @
79c763bf
...
...
@@ -35,9 +35,7 @@
#include "av1/common/odintrin.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"
#include "av1/common/tile_common.h"
...
...
@@ -779,7 +777,6 @@ static void write_filter_intra_mode_info(const MACROBLOCKD *xd,
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
static
void
write_intra_angle_info
(
const
MACROBLOCKD
*
xd
,
FRAME_CONTEXT
*
const
ec_ctx
,
aom_writer
*
w
)
{
const
MB_MODE_INFO
*
const
mbmi
=
&
xd
->
mi
[
0
]
->
mbmi
;
...
...
@@ -809,7 +806,6 @@ static void write_intra_angle_info(const MACROBLOCKD *xd,
#endif
}
}
#endif // CONFIG_EXT_INTRA
static
void
write_mb_interp_filter
(
AV1_COMP
*
cpi
,
const
MACROBLOCKD
*
xd
,
aom_writer
*
w
)
{
...
...
@@ -1335,9 +1331,7 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row,
#endif
}
#if CONFIG_EXT_INTRA
write_intra_angle_info
(
xd
,
ec_ctx
,
w
);
#endif // CONFIG_EXT_INTRA
if
(
av1_allow_palette
(
cm
->
allow_screen_content_tools
,
bsize
))
write_palette_mode_info
(
cm
,
xd
,
mi
,
mi_row
,
mi_col
,
w
);
#if CONFIG_FILTER_INTRA
...
...
@@ -1641,9 +1635,7 @@ static void write_mb_modes_kf(AV1_COMP *cpi, MACROBLOCKD *xd,
#endif
}
#if CONFIG_EXT_INTRA
write_intra_angle_info
(
xd
,
ec_ctx
,
w
);
#endif // CONFIG_EXT_INTRA
if
(
av1_allow_palette
(
cm
->
allow_screen_content_tools
,
bsize
))
write_palette_mode_info
(
cm
,
xd
,
mi
,
mi_row
,
mi_col
,
w
);
#if CONFIG_FILTER_INTRA
...
...
av1/encoder/block.h
View file @
79c763bf
...
...
@@ -326,9 +326,9 @@ struct macroblock {
int
inter_tx_type_costs
[
EXT_TX_SETS_INTER
][
EXT_TX_SIZES
][
TX_TYPES
];
int
intra_tx_type_costs
[
EXT_TX_SETS_INTRA
][
EXT_TX_SIZES
][
INTRA_MODES
]
[
TX_TYPES
];
#if
CONFIG_EXT_INTRA &&
CONFIG_EXT_INTRA_MOD
#if CONFIG_EXT_INTRA_MOD
int
angle_delta_cost
[
DIRECTIONAL_MODES
][
2
*
MAX_ANGLE_DELTA
+
1
];
#endif //
CONFIG_EXT_INTRA &&
CONFIG_EXT_INTRA_MOD
#endif // CONFIG_EXT_INTRA_MOD
#if CONFIG_LOOP_RESTORATION
int
switchable_restore_cost
[
RESTORE_SWITCHABLE_TYPES
];
int
wiener_restore_cost
[
2
];
...
...
av1/encoder/encodeframe.c
View file @
79c763bf
...
...
@@ -827,7 +827,7 @@ static void sum_intra_stats(FRAME_COUNTS *counts, MACROBLOCKD *xd,
}
}
#endif // CONFIG_FILTER_INTRA
#if
CONFIG_EXT_INTRA &&
CONFIG_EXT_INTRA_MOD
#if CONFIG_EXT_INTRA_MOD
if
(
av1_is_directional_mode
(
mbmi
->
mode
,
bsize
)
&&
av1_use_angle_delta
(
bsize
))
{
#if CONFIG_ENTROPY_STATS
...
...
@@ -839,12 +839,12 @@ static void sum_intra_stats(FRAME_COUNTS *counts, MACROBLOCKD *xd,
mbmi
->
angle_delta
[
0
]
+
MAX_ANGLE_DELTA
,
2
*
MAX_ANGLE_DELTA
+
1
);
}
#endif //
CONFIG_EXT_INTRA &&
CONFIG_EXT_INTRA_MOD
#endif // CONFIG_EXT_INTRA_MOD
if
(
!
is_chroma_reference
(
mi_row
,
mi_col
,
bsize
,
xd
->
plane
[
1
].
subsampling_x
,
xd
->
plane
[
1
].
subsampling_y
))
return
;
#if
CONFIG_EXT_INTRA &&
CONFIG_EXT_INTRA_MOD
#if CONFIG_EXT_INTRA_MOD
if
(
av1_is_directional_mode
(
get_uv_mode
(
mbmi
->
uv_mode
),
bsize
)
&&
av1_use_angle_delta
(
bsize
))
{
#if CONFIG_ENTROPY_STATS
...
...
@@ -856,7 +856,7 @@ static void sum_intra_stats(FRAME_COUNTS *counts, MACROBLOCKD *xd,
mbmi
->
angle_delta
[
1
]
+
MAX_ANGLE_DELTA
,
2
*
MAX_ANGLE_DELTA
+
1
);
}
#endif //
CONFIG_EXT_INTRA &&
CONFIG_EXT_INTRA_MOD
#endif // CONFIG_EXT_INTRA_MOD
#if CONFIG_ENTROPY_STATS
#if CONFIG_CFL
++
counts
->
uv_mode
[
is_cfl_allowed
(
mbmi
)][
y_mode
][
uv_mode
];
...
...
av1/encoder/rd.c
View file @
79c763bf
...
...
@@ -239,12 +239,12 @@ void av1_fill_mode_rates(AV1_COMMON *const cm, MACROBLOCK *x,
}
}
}
#if
CONFIG_EXT_INTRA &&
CONFIG_EXT_INTRA_MOD
#if CONFIG_EXT_INTRA_MOD
for
(
i
=
0
;
i
<
DIRECTIONAL_MODES
;
++
i
)
{
av1_cost_tokens_from_cdf
(
x
->
angle_delta_cost
[
i
],
fc
->
angle_delta_cdf
[
i
],
NULL
);
}
#endif //
CONFIG_EXT_INTRA &&
CONFIG_EXT_INTRA_MOD
#endif // CONFIG_EXT_INTRA_MOD
#if CONFIG_LOOP_RESTORATION
av1_cost_tokens_from_cdf
(
x
->
switchable_restore_cost
,
fc
->
switchable_restore_cdf
,
NULL
);
...
...
av1/encoder/rdopt.c
View file @
79c763bf
...
...
@@ -109,9 +109,7 @@ static const int filter_sets[DUAL_FILTER_SET_SIZE][2] = {
#define NEW_MV_DISCOUNT_FACTOR 8
#if CONFIG_EXT_INTRA
#define ANGLE_SKIP_THRESH 10
#endif // CONFIG_EXT_INTRA
static const double ADST_FLIP_SVM[8] = {
/* vertical */
...
...
@@ -2549,7 +2547,6 @@ static int intra_mode_info_cost_y(const AV1_COMP *cpi, const MACROBLOCK *x,
}
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if (av1_is_directional_mode(mbmi->mode, bsize)) {
if (av1_use_angle_delta(bsize)) {
#if CONFIG_EXT_INTRA_MOD
...
...
@@ -2561,7 +2558,6 @@ static int intra_mode_info_cost_y(const AV1_COMP *cpi, const MACROBLOCK *x,
#endif // CONFIG_EXT_INTRA_MOD
}
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_INTRABC
if (av1_allow_intrabc(&cpi->common))
total_rate += x->intrabc_cost[use_intrabc];
...
...
@@ -2617,7 +2613,6 @@ static int64_t intra_model_yrd(const AV1_COMP *const cpi, MACROBLOCK *const x,
// RD estimation.
model_rd_for_sb(cpi, bsize, x, xd, 0, 0, &this_rd_stats.rate,
&this_rd_stats.dist, &this_rd_stats.skip, &temp_sse);
#if CONFIG_EXT_INTRA
if (av1_is_directional_mode(mbmi->mode, bsize) &&
av1_use_angle_delta(bsize)) {
#if CONFIG_EXT_INTRA_MOD
...
...
@@ -2628,7 +2623,6 @@ static int64_t intra_model_yrd(const AV1_COMP *const cpi, MACROBLOCK *const x,
MAX_ANGLE_DELTA + mbmi->angle_delta[0]);
#endif // CONFIG_EXT_INTRA_MOD
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
if (mbmi->mode == DC_PRED && av1_filter_intra_allowed_txsize(mbmi->tx_size)) {
if (mbmi->filter_intra_mode_info.use_filter_intra) {
...
...
@@ -2956,7 +2950,6 @@ static int rd_pick_filter_intra_sby(const AV1_COMP *const cpi, MACROBLOCK *x,
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
// Run RD calculation with given luma intra prediction angle., and return
// the RD cost. Update the best mode info. if the RD cost is the best so far.
static int64_t calc_rd_given_intra_angle(
...
...
@@ -3227,7 +3220,6 @@ static void highbd_angle_estimation(const uint8_t *src8, int src_stride,
}
}
}
#endif // CONFIG_EXT_INTRA
// Given selected prediction mode, search for the best tx type and size.
static void intra_block_yrd(const AV1_COMP *const cpi, MACROBLOCK *x,
...
...
@@ -3275,14 +3267,12 @@ static int64_t rd_pick_intra_sby_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
MB_MODE_INFO *const mbmi = &mic->mbmi;
assert(!is_inter_block(mbmi));
int64_t best_model_rd = INT64_MAX;
#if CONFIG_EXT_INTRA
const int rows = block_size_high[bsize];
const int cols = block_size_wide[bsize];
int is_directional_mode;
uint8_t directional_mode_skip_mask[INTRA_MODES];
const int src_stride = x->plane[0].src.stride;
const uint8_t *src = x->plane[0].src.buf;
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
int beat_best_rd = 0;
#endif // CONFIG_FILTER_INTRA
...
...
@@ -3305,7 +3295,6 @@ static int64_t rd_pick_intra_sby_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
bmode_costs = x->y_mode_costs[A][L];
#endif
#if CONFIG_EXT_INTRA
mbmi->angle_delta[0] = 0;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
highbd_angle_estimation(src, src_stride, rows, cols, bsize,
...
...
@@ -3313,7 +3302,6 @@ static int64_t rd_pick_intra_sby_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
else
angle_estimation(src, src_stride, rows, cols, bsize,
directional_mode_skip_mask);
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
mbmi->filter_intra_mode_info.use_filter_intra = 0;
#endif // CONFIG_FILTER_INTRA
...
...
@@ -3331,15 +3319,12 @@ static int64_t rd_pick_intra_sby_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
int this_rate, this_rate_tokenonly, s;
int64_t this_distortion, this_rd, this_model_rd;
mbmi->mode = intra_rd_search_mode_order[mode_idx];
#if CONFIG_EXT_INTRA
mbmi->angle_delta[0] = 0;
#endif // CONFIG_EXT_INTRA
this_model_rd = intra_model_yrd(cpi, x, bsize, bmode_costs[mbmi->mode]);
if (best_model_rd != INT64_MAX &&
this_model_rd > best_model_rd + (best_model_rd >> 1))
continue;
if (this_model_rd < best_model_rd) best_model_rd = this_model_rd;
#if CONFIG_EXT_INTRA
is_directional_mode = av1_is_directional_mode(mbmi->mode, bsize);
if (is_directional_mode && directional_mode_skip_mask[mbmi->mode]) continue;
if (is_directional_mode && av1_use_angle_delta(bsize)) {
...
...
@@ -3349,9 +3334,6 @@ static int64_t rd_pick_intra_sby_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
} else {
super_block_yrd(cpi, x, &this_rd_stats, bsize, best_rd);
}
#else
super_block_yrd(cpi, x, &this_rd_stats, bsize, best_rd);
#endif // CONFIG_EXT_INTRA
this_rate_tokenonly = this_rd_stats.rate;
this_distortion = this_rd_stats.dist;
s = this_rd_stats.skip;
...
...
@@ -5076,7 +5058,6 @@ static void rd_pick_palette_intra_sbuv(const AV1_COMP *const cpi, MACROBLOCK *x,
}
}
#if CONFIG_EXT_INTRA
// Run RD calculation with given chroma intra prediction angle., and return
// the RD cost. Update the best mode info. if the RD cost is the best so far.
static int64_t pick_intra_angle_routine_sbuv(
...
...
@@ -5164,7 +5145,6 @@ static int rd_pick_intra_angle_sbuv(const AV1_COMP *const cpi, MACROBLOCK *x,
mbmi->angle_delta[1] = best_angle_delta;
return rd_stats->rate != INT_MAX;
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_CFL
#define PLANE_SIGN_TO_JOINT_SIGN(plane, a, b) \
...
...
@@ -5307,10 +5287,8 @@ static int64_t rd_pick_intra_sbuv_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
int this_rate;
RD_STATS tokenonly_rd_stats;
UV_PREDICTION_MODE mode = uv_rd_search_mode_order[mode_idx];
#if CONFIG_EXT_INTRA
const int is_directional_mode =
av1_is_directional_mode(get_uv_mode(mode), mbmi->sb_type);
#endif // CONFIG_EXT_INTRA
if (!(cpi->sf.intra_uv_mode_mask[txsize_sqr_up_map[max_tx_size]] &
(1 << mode)))
continue;
...
...
@@ -5326,7 +5304,6 @@ static int64_t rd_pick_intra_sbuv_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
if (cfl_alpha_rate == INT_MAX) continue;
}
#endif
#if CONFIG_EXT_INTRA
mbmi->angle_delta[1] = 0;
if (is_directional_mode && av1_use_angle_delta(mbmi->sb_type)) {
#if CONFIG_CFL
...
...
@@ -5344,13 +5321,10 @@ static int64_t rd_pick_intra_sbuv_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
&this_rate, &tokenonly_rd_stats))
continue;
} else {
#endif // CONFIG_EXT_INTRA
if (!super_block_uvrd(cpi, x, &tokenonly_rd_stats, bsize, best_rd)) {
continue;
}
#if CONFIG_EXT_INTRA
}
#endif // CONFIG_EXT_INTRA
this_rate = tokenonly_rd_stats.rate +
#if CONFIG_CFL
x->intra_uv_mode_cost[is_cfl_allowed(mbmi)][mbmi->mode][mode] +
...
...
@@ -5367,7 +5341,6 @@ static int64_t rd_pick_intra_sbuv_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
#endif // CONFIG_DEBUG
}
#endif
#if CONFIG_EXT_INTRA
if (is_directional_mode && av1_use_angle_delta(mbmi->sb_type)) {
#if CONFIG_EXT_INTRA_MOD
this_rate += x->angle_delta_cost[mode - V_PRED]
...
...
@@ -5377,7 +5350,6 @@ static int64_t rd_pick_intra_sbuv_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
MAX_ANGLE_DELTA + mbmi->angle_delta[1]);
#endif // CONFIG_EXT_INTRA_MOD
}
#endif // CONFIG_EXT_INTRA
if (try_palette && mode == UV_DC_PRED)
this_rate += x->palette_uv_mode_cost[pmi->palette_size[0] > 0][0];
...
...
@@ -9083,11 +9055,9 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
int skip_uvs[TX_SIZES_ALL];
UV_PREDICTION_MODE mode_uv[TX_SIZES_ALL];
PALETTE_MODE_INFO pmi_uv[TX_SIZES_ALL];
#if CONFIG_EXT_INTRA
int8_t uv_angle_delta[TX_SIZES_ALL];
int is_directional_mode, angle_stats_ready = 0;
uint8_t directional_mode_skip_mask[INTRA_MODES];
#endif // CONFIG_EXT_INTRA
const int intra_cost_penalty = av1_get_intra_cost_penalty(
cm->base_qindex, cm->y_dc_delta_q, cm->bit_depth);
const int *const intra_mode_cost = x->mbmode_cost[size_group_lookup[bsize]];
...
...
@@ -9591,7 +9561,6 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
if (ref_frame == INTRA_FRAME) {
RD_STATS rd_stats_y;
TX_SIZE uv_tx;
#if CONFIG_EXT_INTRA
is_directional_mode = av1_is_directional_mode(mbmi->mode, bsize);