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
Guillaume Martres
aom-rav1e
Commits
828119d6
Commit
828119d6
authored
Jul 29, 2013
by
Dmitry Kovalev
Browse files
Renaming txfm to tx for consistency in some places.
Change-Id: I2a6a646570e2af66315e7c658d00d99f80c4b127
parent
730a3441
Changes
4
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_entropy.c
View file @
828119d6
...
...
@@ -609,16 +609,16 @@ void vp9_coef_tree_initialize() {
#define COEF_COUNT_SAT_AFTER_KEY 24
#define COEF_MAX_UPDATE_FACTOR_AFTER_KEY 128
static
void
adapt_coef_probs
(
VP9_COMMON
*
cm
,
TX_SIZE
tx
fm
_size
,
static
void
adapt_coef_probs
(
VP9_COMMON
*
cm
,
TX_SIZE
tx_size
,
unsigned
int
count_sat
,
unsigned
int
update_factor
)
{
FRAME_CONTEXT
*
pre_fc
=
&
cm
->
frame_contexts
[
cm
->
frame_context_idx
];
vp9_coeff_probs_model
*
dst_coef_probs
=
cm
->
fc
.
coef_probs
[
tx
fm
_size
];
vp9_coeff_probs_model
*
pre_coef_probs
=
pre_fc
->
coef_probs
[
tx
fm
_size
];
vp9_coeff_count_model
*
coef_counts
=
cm
->
counts
.
coef
[
tx
fm
_size
];
vp9_coeff_probs_model
*
dst_coef_probs
=
cm
->
fc
.
coef_probs
[
tx_size
];
vp9_coeff_probs_model
*
pre_coef_probs
=
pre_fc
->
coef_probs
[
tx_size
];
vp9_coeff_count_model
*
coef_counts
=
cm
->
counts
.
coef
[
tx_size
];
unsigned
int
(
*
eob_branch_count
)[
REF_TYPES
][
COEF_BANDS
][
PREV_COEF_CONTEXTS
]
=
cm
->
counts
.
eob_branch
[
tx
fm
_size
];
cm
->
counts
.
eob_branch
[
tx_size
];
int
t
,
i
,
j
,
k
,
l
;
unsigned
int
branch_ct
[
UNCONSTRAINED_NODES
][
2
];
vp9_prob
coef_probs
[
UNCONSTRAINED_NODES
];
...
...
vp9/decoder/vp9_detokenize.c
View file @
828119d6
...
...
@@ -75,7 +75,7 @@ DECLARE_ALIGNED(16, extern const uint8_t,
#define WRITE_COEF_CONTINUE(val, token) \
{ \
qcoeff_ptr[scan[c]] = vp9_read_and_apply_sign(r, val) * \
dq[c > 0] / (1 + (tx
fm
_size == TX_32X32)); \
dq[c > 0] / (1 + (tx_size == TX_32X32)); \
INCREMENT_COUNT(token); \
c++; \
continue; \
...
...
@@ -90,7 +90,7 @@ DECLARE_ALIGNED(16, extern const uint8_t,
static
int
decode_coefs
(
VP9_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
,
vp9_reader
*
r
,
int
block_idx
,
PLANE_TYPE
type
,
int
seg_eob
,
int16_t
*
qcoeff_ptr
,
TX_SIZE
tx
fm
_size
,
const
int16_t
*
dq
,
TX_SIZE
tx_size
,
const
int16_t
*
dq
,
ENTROPY_CONTEXT
*
A
,
ENTROPY_CONTEXT
*
L
)
{
FRAME_CONTEXT
*
const
fc
=
&
cm
->
fc
;
FRAME_COUNTS
*
const
counts
=
&
cm
->
counts
;
...
...
@@ -98,16 +98,16 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
const
int
ref
=
xd
->
mode_info_context
->
mbmi
.
ref_frame
[
0
]
!=
INTRA_FRAME
;
int
band
,
pt
,
c
=
0
;
vp9_prob
(
*
coef_probs
)[
PREV_COEF_CONTEXTS
][
UNCONSTRAINED_NODES
]
=
fc
->
coef_probs
[
tx
fm
_size
][
type
][
ref
];
fc
->
coef_probs
[
tx_size
][
type
][
ref
];
vp9_prob
coef_probs_full
[
COEF_BANDS
][
PREV_COEF_CONTEXTS
][
ENTROPY_NODES
];
uint8_t
load_map
[
COEF_BANDS
][
PREV_COEF_CONTEXTS
]
=
{
{
0
}
};
vp9_prob
*
prob
;
vp9_coeff_count_model
*
coef_counts
=
counts
->
coef
[
tx
fm
_size
];
vp9_coeff_count_model
*
coef_counts
=
counts
->
coef
[
tx_size
];
const
int16_t
*
scan
,
*
nb
;
uint8_t
token_cache
[
1024
];
const
uint8_t
*
band_translate
;
switch
(
tx
fm
_size
)
{
switch
(
tx_size
)
{
default:
case
TX_4X4
:
{
scan
=
get_scan_4x4
(
get_tx_type_4x4
(
type
,
xd
,
block_idx
));
...
...
@@ -150,7 +150,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
pt
=
get_coef_context
(
nb
,
token_cache
,
c
);
band
=
get_coef_band
(
band_translate
,
c
);
prob
=
coef_probs
[
band
][
pt
];
counts
->
eob_branch
[
tx
fm
_size
][
type
][
ref
][
band
][
pt
]
++
;
counts
->
eob_branch
[
tx_size
][
type
][
ref
][
band
][
pt
]
++
;
if
(
!
vp9_read
(
r
,
prob
[
EOB_CONTEXT_NODE
]))
break
;
...
...
vp9/encoder/vp9_bitstream.c
View file @
828119d6
...
...
@@ -200,8 +200,8 @@ static void update_mbintra_mode_probs(VP9_COMP* const cpi,
(
unsigned
int
*
)
cpi
->
y_mode_count
[
j
]);
}
static
void
write_selected_tx
fm
_size
(
const
VP9_COMP
*
cpi
,
TX_SIZE
tx_size
,
BLOCK_SIZE_TYPE
bsize
,
vp9_writer
*
w
)
{
static
void
write_selected_tx_size
(
const
VP9_COMP
*
cpi
,
TX_SIZE
tx_size
,
BLOCK_SIZE_TYPE
bsize
,
vp9_writer
*
w
)
{
const
MACROBLOCKD
*
const
xd
=
&
cpi
->
mb
.
e_mbd
;
const
vp9_prob
*
tx_probs
=
get_tx_probs2
(
xd
,
&
cpi
->
common
.
fc
.
tx_probs
);
vp9_write
(
w
,
tx_size
!=
TX_4X4
,
tx_probs
[
0
]);
...
...
@@ -434,7 +434,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
if
(
bsize
>=
BLOCK_SIZE_SB8X8
&&
pc
->
tx_mode
==
TX_MODE_SELECT
&&
!
(
rf
!=
INTRA_FRAME
&&
(
skip_coeff
||
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_SKIP
))))
{
write_selected_tx
fm
_size
(
cpi
,
mi
->
txfm_size
,
bsize
,
bc
);
write_selected_tx_size
(
cpi
,
mi
->
txfm_size
,
bsize
,
bc
);
}
if
(
rf
==
INTRA_FRAME
)
{
...
...
@@ -541,7 +541,7 @@ static void write_mb_modes_kf(const VP9_COMP *cpi,
write_skip_coeff
(
cpi
,
segment_id
,
m
,
bc
);
if
(
m
->
mbmi
.
sb_type
>=
BLOCK_SIZE_SB8X8
&&
c
->
tx_mode
==
TX_MODE_SELECT
)
write_selected_tx
fm
_size
(
cpi
,
m
->
mbmi
.
txfm_size
,
m
->
mbmi
.
sb_type
,
bc
);
write_selected_tx_size
(
cpi
,
m
->
mbmi
.
txfm_size
,
m
->
mbmi
.
sb_type
,
bc
);
if
(
m
->
mbmi
.
sb_type
>=
BLOCK_SIZE_SB8X8
)
{
const
MB_PREDICTION_MODE
A
=
above_block_mode
(
m
,
0
,
mis
);
...
...
@@ -724,12 +724,12 @@ static void print_prob_tree(vp9_coeff_probs *coef_probs, int block_types) {
fclose
(
f
);
}
static
void
build_tree_distribution
(
VP9_COMP
*
cpi
,
TX_SIZE
tx
fm
_size
)
{
vp9_coeff_probs_model
*
coef_probs
=
cpi
->
frame_coef_probs
[
tx
fm
_size
];
vp9_coeff_count
*
coef_counts
=
cpi
->
coef_counts
[
tx
fm
_size
];
static
void
build_tree_distribution
(
VP9_COMP
*
cpi
,
TX_SIZE
tx_size
)
{
vp9_coeff_probs_model
*
coef_probs
=
cpi
->
frame_coef_probs
[
tx_size
];
vp9_coeff_count
*
coef_counts
=
cpi
->
coef_counts
[
tx_size
];
unsigned
int
(
*
eob_branch_ct
)[
REF_TYPES
][
COEF_BANDS
][
PREV_COEF_CONTEXTS
]
=
cpi
->
common
.
counts
.
eob_branch
[
tx
fm
_size
];
vp9_coeff_stats
*
coef_branch_ct
=
cpi
->
frame_branch_ct
[
tx
fm
_size
];
cpi
->
common
.
counts
.
eob_branch
[
tx_size
];
vp9_coeff_stats
*
coef_branch_ct
=
cpi
->
frame_branch_ct
[
tx_size
];
vp9_prob
full_probs
[
ENTROPY_NODES
];
int
i
,
j
,
k
,
l
;
...
...
@@ -754,9 +754,9 @@ static void build_tree_distribution(VP9_COMP *cpi, TX_SIZE txfm_size) {
if
(
!
cpi
->
dummy_packing
)
{
int
t
;
for
(
t
=
0
;
t
<
MAX_ENTROPY_TOKENS
;
++
t
)
context_counters
[
tx
fm
_size
][
i
][
j
][
k
][
l
][
t
]
+=
context_counters
[
tx_size
][
i
][
j
][
k
][
l
][
t
]
+=
coef_counts
[
i
][
j
][
k
][
l
][
t
];
context_counters
[
tx
fm
_size
][
i
][
j
][
k
][
l
][
MAX_ENTROPY_TOKENS
]
+=
context_counters
[
tx_size
][
i
][
j
][
k
][
l
][
MAX_ENTROPY_TOKENS
]
+=
eob_branch_ct
[
i
][
j
][
k
][
l
];
}
#endif
...
...
vp9/encoder/vp9_tokenize.c
View file @
828119d6
...
...
@@ -257,8 +257,7 @@ void vp9_tokenize_sb(VP9_COMP *cpi, TOKENEXTRA **t, int dry_run,
const
int
mb_skip_context
=
vp9_get_pred_context_mbskip
(
xd
);
const
int
skip_inc
=
!
vp9_segfeature_active
(
&
xd
->
seg
,
mbmi
->
segment_id
,
SEG_LVL_SKIP
);
const
TX_SIZE
txfm_size
=
mbmi
->
txfm_size
;
struct
tokenize_b_args
arg
=
{
cpi
,
xd
,
t
,
txfm_size
,
dry_run
};
struct
tokenize_b_args
arg
=
{
cpi
,
xd
,
t
,
mbmi
->
txfm_size
,
dry_run
};
mbmi
->
mb_skip_coeff
=
vp9_sb_is_skippable
(
xd
,
bsize
);
if
(
mbmi
->
mb_skip_coeff
)
{
...
...
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