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
d5647376
Commit
d5647376
authored
Dec 05, 2017
by
Linfeng Zhang
Committed by
James Zern
Dec 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetic: paded to padded
Change-Id: I11e57afd02b355e29be3ec4e216d2c6910120467
parent
f91f3ca1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
av1/common/txb_common.h
av1/common/txb_common.h
+3
-3
av1/decoder/decodetxb.c
av1/decoder/decodetxb.c
+6
-6
av1/encoder/encodetxb.c
av1/encoder/encodetxb.c
+2
-2
No files found.
av1/common/txb_common.h
View file @
d5647376
...
...
@@ -167,7 +167,7 @@ static INLINE uint8_t *set_levels(uint8_t *const levels_buf, const int width) {
return
levels_buf
+
TX_PAD_TOP
*
(
width
+
TX_PAD_HOR
);
}
static
INLINE
int
get_paded_idx
(
const
int
idx
,
const
int
bwl
)
{
static
INLINE
int
get_pad
d
ed_idx
(
const
int
idx
,
const
int
bwl
)
{
return
idx
+
((
idx
>>
bwl
)
<<
TX_PAD_HOR_LOG2
);
}
...
...
@@ -557,9 +557,9 @@ static INLINE int get_nz_map_ctx(const uint8_t *const levels,
const
TX_CLASS
tx_class
=
tx_type_to_class
[
tx_type
];
const
int
stats
=
#if USE_CAUSAL_BASE_CTX
get_nz_mag
(
levels
+
get_paded_idx
(
coeff_idx
,
bwl
),
bwl
,
tx_class
);
get_nz_mag
(
levels
+
get_pad
d
ed_idx
(
coeff_idx
,
bwl
),
bwl
,
tx_class
);
#else
get_nz_count
(
levels
+
get_paded_idx
(
coeff_idx
,
bwl
),
bwl
,
tx_class
);
get_nz_count
(
levels
+
get_pad
d
ed_idx
(
coeff_idx
,
bwl
),
bwl
,
tx_class
);
#endif
return
get_nz_map_ctx_from_stats
(
stats
,
coeff_idx
,
bwl
,
height
,
tx_class
);
}
...
...
av1/decoder/decodetxb.c
View file @
d5647376
...
...
@@ -203,7 +203,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
// ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][1]>>7,
// ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][2]>>7);
if
(
level
)
{
levels
[
get_paded_idx
(
pos
,
bwl
)]
=
level
;
levels
[
get_pad
d
ed_idx
(
pos
,
bwl
)]
=
level
;
*
max_scan_line
=
AOMMAX
(
*
max_scan_line
,
pos
);
if
(
level
<
3
)
{
cul_level
+=
level
;
...
...
@@ -241,7 +241,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
break
;
}
}
levels
[
get_paded_idx
(
pos
,
bwl
)]
=
k
+
1
;
levels
[
get_pad
d
ed_idx
(
pos
,
bwl
)]
=
k
+
1
;
*
max_scan_line
=
AOMMAX
(
*
max_scan_line
,
pos
);
if
(
k
==
NUM_BASE_LEVELS
)
{
update_pos
[
num_updates
++
]
=
pos
;
...
...
@@ -251,7 +251,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
// set non-zero coefficient map.
unsigned
int
(
*
nz_map_count
)[
SIG_COEF_CONTEXTS
][
2
]
=
(
counts
)
?
&
counts
->
nz_map
[
txs_ctx
][
plane_type
]
:
NULL
;
levels
[
get_paded_idx
(
pos
,
bwl
)]
=
is_nz
;
levels
[
get_pad
d
ed_idx
(
pos
,
bwl
)]
=
is_nz
;
if
(
counts
)
++
(
*
nz_map_count
)[
coeff_ctx
][
is_nz
];
#endif
#endif
...
...
@@ -263,7 +263,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
av1_get_base_level_counts
(
levels
,
i
,
width
,
height
,
level_counts
);
for
(
c
=
*
eob
-
1
;
c
>=
0
;
--
c
)
{
const
int
pos
=
scan
[
c
];
uint8_t
*
const
level
=
&
levels
[
get_paded_idx
(
pos
,
bwl
)];
uint8_t
*
const
level
=
&
levels
[
get_pad
d
ed_idx
(
pos
,
bwl
)];
int
ctx
;
if
(
*
level
<=
i
)
continue
;
...
...
@@ -293,7 +293,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
for
(
c
=
0
;
c
<
*
eob
;
++
c
)
{
const
int
pos
=
scan
[
c
];
int8_t
*
const
sign
=
&
signs
[
pos
];
if
(
levels
[
get_paded_idx
(
pos
,
bwl
)]
==
0
)
continue
;
if
(
levels
[
get_pad
d
ed_idx
(
pos
,
bwl
)]
==
0
)
continue
;
if
(
c
==
0
)
{
const
int
dc_sign_ctx
=
txb_ctx
->
dc_sign_ctx
;
#if LV_MAP_PROB
...
...
@@ -316,7 +316,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
#endif
for
(
c
=
0
;
c
<
num_updates
;
++
c
)
{
const
int
pos
=
update_pos
[
c
];
uint8_t
*
const
level
=
&
levels
[
get_paded_idx
(
pos
,
bwl
)];
uint8_t
*
const
level
=
&
levels
[
get_pad
d
ed_idx
(
pos
,
bwl
)];
int
idx
;
int
ctx
;
...
...
av1/encoder/encodetxb.c
View file @
d5647376
...
...
@@ -282,7 +282,7 @@ static void get_dist_cost_stats(LevelDownStats *const stats, const int scan_idx,
static
INLINE
void
update_qcoeff
(
const
int
coeff_idx
,
const
tran_low_t
qc
,
const
TxbInfo
*
const
txb_info
)
{
txb_info
->
qcoeff
[
coeff_idx
]
=
qc
;
txb_info
->
levels
[
get_paded_idx
(
coeff_idx
,
txb_info
->
bwl
)]
=
txb_info
->
levels
[
get_pad
d
ed_idx
(
coeff_idx
,
txb_info
->
bwl
)]
=
(
uint8_t
)
clamp
(
abs
(
qc
),
0
,
INT8_MAX
);
}
...
...
@@ -867,7 +867,7 @@ void gen_txb_cache(TxbCache *txb_cache, TxbInfo *txb_info) {
const
int
col
=
coeff_idx
-
(
row
<<
bwl
);
txb_cache
->
nz_count_arr
[
coeff_idx
]
=
get_nz_count
(
levels
+
get_paded_idx
(
coeff_idx
,
bwl
),
bwl
,
get_nz_count
(
levels
+
get_pad
d
ed_idx
(
coeff_idx
,
bwl
),
bwl
,
tx_type_to_class
[
txb_info
->
tx_type
]);
txb_cache
->
nz_ctx_arr
[
coeff_idx
]
=
get_nz_map_ctx_from_stats
(
...
...
Write
Preview
Markdown
is supported
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