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
7f7e89f9
Commit
7f7e89f9
authored
Oct 17, 2017
by
Linfeng Zhang
Browse files
Clean get_eob_ctx()
Remove the unused argument. Change-Id: I4b7936e6c12a9d0a54c9d1cc281f96ec623e5cd8
parent
ce065ca3
Changes
3
Hide whitespace changes
Inline
Side-by-side
av1/common/txb_common.h
View file @
7f7e89f9
...
...
@@ -434,13 +434,11 @@ static INLINE int get_nz_map_ctx(const tran_low_t *tcoeffs, const int scan_idx,
return
get_nz_map_ctx_from_count
(
count
,
coeff_idx
,
bwl
,
tx_type
);
}
static
INLINE
int
get_eob_ctx
(
const
tran_low_t
*
tcoeffs
,
const
int
coeff_idx
,
// raster order
const
TX_SIZE
txs_ctx
,
TX_TYPE
tx_type
)
{
(
void
)
tcoeffs
;
static
INLINE
int
get_eob_ctx
(
const
int
coeff_idx
,
// raster order
const
TX_SIZE
txs_ctx
,
const
TX_TYPE
tx_type
)
{
int
offset
=
0
;
#if CONFIG_CTX1D
TX_CLASS
tx_class
=
get_tx_class
(
tx_type
);
const
TX_CLASS
tx_class
=
get_tx_class
(
tx_type
);
if
(
tx_class
==
TX_CLASS_VERT
)
offset
=
EOB_COEF_CONTEXTS_2D
;
else
if
(
tx_class
==
TX_CLASS_HORIZ
)
...
...
av1/decoder/decodetxb.c
View file @
7f7e89f9
...
...
@@ -72,7 +72,7 @@ static INLINE int read_nz_map(aom_reader *r, tran_low_t *tcoeffs, int plane,
for
(
c
=
0
;
c
<
seg_eob
;
++
c
)
{
int
is_nz
;
int
coeff_ctx
=
get_nz_map_ctx
(
tcoeffs
,
c
,
scan
,
bwl
,
height
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
tcoeffs
,
scan
[
c
],
txs_ctx
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
scan
[
c
],
txs_ctx
,
tx_type
);
if
(
c
<
seg_eob
-
1
)
{
#if LV_MAP_PROB
...
...
av1/encoder/encodetxb.c
View file @
7f7e89f9
...
...
@@ -117,7 +117,7 @@ static INLINE void write_nz_map(aom_writer *w, const tran_low_t *tcoeff,
for
(
int
c
=
0
;
c
<
eob
;
++
c
)
{
int
coeff_ctx
=
get_nz_map_ctx
(
tcoeff
,
c
,
scan
,
bwl
,
height
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
tcoeff
,
scan
[
c
],
txs_ctx
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
scan
[
c
],
txs_ctx
,
tx_type
);
tran_low_t
v
=
tcoeff
[
scan
[
c
]];
int
is_nz
=
(
v
!=
0
);
...
...
@@ -589,7 +589,7 @@ int get_nz_eob_map_cost(const LV_MAP_COEFF_COST *coeff_costs,
int
coeff_ctx
=
get_nz_map_ctx
(
qcoeff
,
c
,
scan
,
bwl
,
height
,
tx_type
);
cost
+=
coeff_costs
->
nz_map_cost
[
coeff_ctx
][
is_nz
];
if
(
is_nz
)
{
int
eob_ctx
=
get_eob_ctx
(
qcoeff
,
scan
[
c
],
txs_ctx
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
scan
[
c
],
txs_ctx
,
tx_type
);
cost
+=
coeff_costs
->
eob_cost
[
eob_ctx
][
c
==
(
eob
-
1
)];
}
}
...
...
@@ -1138,8 +1138,8 @@ static int try_self_level_down(tran_low_t *low_coeff, int coeff_idx,
}
if
(
scan_idx
<
txb_info
->
seg_eob
)
{
const
int
eob_ctx
=
get_eob_ctx
(
txb_info
->
qcoeff
,
coeff_idx
,
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
const
int
eob_ctx
=
get_eob_ctx
(
coeff_idx
,
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
cost_diff
-=
txb_costs
->
eob_cost
[
eob_ctx
][
scan_idx
==
(
txb_info
->
eob
-
1
)];
}
...
...
@@ -1378,8 +1378,8 @@ static int get_low_coeff_cost(int coeff_idx, const TxbCache *txb_cache,
cost
+=
get_base_cost
(
abs_qc
,
ctx
,
txb_costs
->
base_cost
[
base_idx
][
ctx
],
base_idx
);
if
(
scan_idx
<
txb_info
->
seg_eob
)
{
const
int
eob_ctx
=
get_eob_ctx
(
txb_info
->
qcoeff
,
coeff_idx
,
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
const
int
eob_ctx
=
get_eob_ctx
(
coeff_idx
,
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
cost
+=
txb_costs
->
eob_cost
[
eob_ctx
][
scan_idx
==
(
txb_info
->
eob
-
1
)];
}
cost
+=
get_sign_bit_cost
(
qc
,
coeff_idx
,
txb_costs
->
dc_sign_cost
,
...
...
@@ -1436,8 +1436,8 @@ int try_change_eob(int *new_eob, int coeff_idx, const TxbCache *txb_cache,
if
(
*
new_eob
>
0
)
{
// Note that get_eob_ctx does NOT actually account for qcoeff, so we don't
// need to lower down the qcoeff here
const
int
eob_ctx
=
get_eob_ctx
(
txb_info
->
qcoeff
,
scan
[
*
new_eob
-
1
],
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
const
int
eob_ctx
=
get_eob_ctx
(
scan
[
*
new_eob
-
1
],
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
cost_diff
-=
txb_costs
->
eob_cost
[
eob_ctx
][
0
];
cost_diff
+=
txb_costs
->
eob_cost
[
eob_ctx
][
1
];
}
else
{
...
...
@@ -1608,8 +1608,8 @@ static int get_coeff_cost(tran_low_t qc, int scan_idx, TxbInfo *txb_info,
}
if
(
scan_idx
<
txb_info
->
seg_eob
)
{
int
eob_ctx
=
get_eob_ctx
(
txb_info
->
qcoeff
,
scan
[
scan_idx
],
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
scan
[
scan_idx
],
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
cost
+=
txb_costs
->
eob_cost
[
eob_ctx
][
scan_idx
==
(
txb_info
->
eob
-
1
)];
}
}
...
...
@@ -2031,7 +2031,7 @@ static INLINE void av1_update_nz_eob_counts(FRAME_CONTEXT *fc,
tran_low_t
v
=
tcoeff
[
scan
[
c
]];
int
is_nz
=
(
v
!=
0
);
int
coeff_ctx
=
get_nz_map_ctx
(
tcoeff
,
c
,
scan
,
bwl
,
height
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
tcoeff
,
scan
[
c
],
txsize_ctx
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
scan
[
c
],
txsize_ctx
,
tx_type
);
if
(
c
==
seg_eob
-
1
)
break
;
...
...
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