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
bf778e7d
Commit
bf778e7d
authored
Aug 28, 2014
by
Dmitry Kovalev
Browse files
Initializing intra modes without vpx_once().
Change-Id: I0a9d52432f2500f1bd8f43f229e70e38bb9a0343
parent
0ecc75c8
Changes
4
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_reconintra.c
View file @
bf778e7d
...
...
@@ -9,11 +9,9 @@
*/
#include
"./vpx_config.h"
#include
"./vp9_rtcd.h"
#include
"vpx_mem/vpx_mem.h"
#include
"vpx_ports/vpx_once.h"
#include
"./vp9_rtcd.h"
#include
"vp9/common/vp9_reconintra.h"
#include
"vp9/common/vp9_onyxc_int.h"
...
...
@@ -292,32 +290,32 @@ intra_pred_allsizes(dc)
typedef
void
(
*
intra_pred_fn
)(
uint8_t
*
dst
,
ptrdiff_t
stride
,
const
uint8_t
*
above
,
const
uint8_t
*
left
);
static
intra_pred_fn
pred
[
INTRA_MODES
][
4
];
static
intra_pred_fn
dc_pred
[
2
][
2
][
4
];
static
void
init_intra_pred
_fn_ptrs
(
void
)
{
#define
intra_pred_allsizes(l
, type) \
l[0
] = vp9_##type##_predictor_4x4; \
l[1
] = vp9_##type##_predictor_8x8; \
l[2
] = vp9_##type##_predictor_16x16; \
l[3
] = vp9_##type##_predictor_32x32
intra_pred_allsizes
(
pred
[
V_PRED
],
v
);
intra_pred_allsizes
(
pred
[
H_PRED
],
h
);
intra_pred_allsizes
(
pred
[
D207_PRED
],
d207
);
intra_pred_allsizes
(
pred
[
D45_PRED
],
d45
);
intra_pred_allsizes
(
pred
[
D63_PRED
],
d63
);
intra_pred_allsizes
(
pred
[
D117_PRED
],
d117
);
intra_pred_allsizes
(
pred
[
D135_PRED
],
d135
);
intra_pred_allsizes
(
pred
[
D153_PRED
],
d153
);
intra_pred_allsizes
(
pred
[
TM_PRED
],
tm
);
intra_pred_allsizes
(
dc_pred
[
0
][
0
],
dc_128
);
intra_pred_allsizes
(
dc_pred
[
0
][
1
],
dc_top
);
intra_pred_allsizes
(
dc_pred
[
1
][
0
],
dc_left
);
intra_pred_allsizes
(
dc_pred
[
1
][
1
],
dc
);
#undef
intra_pred_allsizes
static
intra_pred_fn
pred
[
INTRA_MODES
][
TX_SIZES
];
static
intra_pred_fn
dc_pred
[
2
][
2
][
TX_SIZES
];
void
vp9_
init_intra_pred
ictors
(
)
{
#define
INIT_ALL_SIZES(p
, type) \
p[TX_4X4
] = vp9_##type##_predictor_4x4; \
p[TX_8X8
] = vp9_##type##_predictor_8x8; \
p[TX_16X16
] = vp9_##type##_predictor_16x16; \
p[TX_32X32
] = vp9_##type##_predictor_32x32
INIT_ALL_SIZES
(
pred
[
V_PRED
],
v
);
INIT_ALL_SIZES
(
pred
[
H_PRED
],
h
);
INIT_ALL_SIZES
(
pred
[
D207_PRED
],
d207
);
INIT_ALL_SIZES
(
pred
[
D45_PRED
],
d45
);
INIT_ALL_SIZES
(
pred
[
D63_PRED
],
d63
);
INIT_ALL_SIZES
(
pred
[
D117_PRED
],
d117
);
INIT_ALL_SIZES
(
pred
[
D135_PRED
],
d135
);
INIT_ALL_SIZES
(
pred
[
D153_PRED
],
d153
);
INIT_ALL_SIZES
(
pred
[
TM_PRED
],
tm
);
INIT_ALL_SIZES
(
dc_pred
[
0
][
0
],
dc_128
);
INIT_ALL_SIZES
(
dc_pred
[
0
][
1
],
dc_top
);
INIT_ALL_SIZES
(
dc_pred
[
1
][
0
],
dc_left
);
INIT_ALL_SIZES
(
dc_pred
[
1
][
1
],
dc
);
#undef
INIT_ALL_SIZES
}
static
void
build_intra_predictors
(
const
MACROBLOCKD
*
xd
,
const
uint8_t
*
ref
,
...
...
@@ -343,8 +341,6 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
// 129 G H .. S T T T T T
// ..
once
(
init_intra_pred_fn_ptrs
);
// Get current frame pointer, width and height.
if
(
plane
==
0
)
{
frame_width
=
xd
->
cur_buf
->
y_width
;
...
...
vp9/common/vp9_reconintra.h
View file @
bf778e7d
...
...
@@ -18,6 +18,8 @@
extern
"C"
{
#endif
void
vp9_init_intra_predictors
();
void
vp9_predict_intra_block
(
const
MACROBLOCKD
*
xd
,
int
block_idx
,
int
bwl_in
,
TX_SIZE
tx_size
,
PREDICTION_MODE
mode
,
const
uint8_t
*
ref
,
int
ref_stride
,
...
...
vp9/decoder/vp9_decoder.c
View file @
bf778e7d
...
...
@@ -25,6 +25,7 @@
#include
"vp9/common/vp9_postproc.h"
#endif
#include
"vp9/common/vp9_quant_common.h"
#include
"vp9/common/vp9_reconintra.h"
#include
"vp9/common/vp9_systemdependent.h"
#include
"vp9/decoder/vp9_decodeframe.h"
...
...
@@ -36,7 +37,9 @@ static void initialize_dec() {
static
int
init_done
=
0
;
if
(
!
init_done
)
{
vp9_rtcd
();
vp9_init_neighbors
();
vp9_init_intra_predictors
();
init_done
=
1
;
}
}
...
...
@@ -59,8 +62,6 @@ VP9Decoder *vp9_decoder_create() {
cm
->
error
.
setjmp
=
1
;
initialize_dec
();
vp9_rtcd
();
// Initialize the references to not point to any frame buffers.
vpx_memset
(
&
cm
->
ref_frame_map
,
-
1
,
sizeof
(
cm
->
ref_frame_map
));
...
...
vp9/encoder/vp9_encoder.c
View file @
bf778e7d
...
...
@@ -24,6 +24,7 @@
#include
"vp9/common/vp9_postproc.h"
#endif
#include
"vp9/common/vp9_reconinter.h"
#include
"vp9/common/vp9_reconintra.h"
#include
"vp9/common/vp9_systemdependent.h"
#include
"vp9/common/vp9_tile_common.h"
...
...
@@ -142,7 +143,9 @@ void vp9_initialize_enc() {
static
int
init_done
=
0
;
if
(
!
init_done
)
{
vp9_rtcd
();
vp9_init_neighbors
();
vp9_init_intra_predictors
();
vp9_coef_tree_initialize
();
vp9_tokenize_initialize
();
vp9_init_me_luts
();
...
...
@@ -764,8 +767,6 @@ VP9_COMP *vp9_create_compressor(VP9EncoderConfig *oxcf) {
cm
->
error
.
setjmp
=
1
;
vp9_rtcd
();
cpi
->
use_svc
=
0
;
init_config
(
cpi
,
oxcf
);
...
...
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