Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
52e27901
Commit
52e27901
authored
Feb 16, 2018
by
Angie Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused parameter from get_br_ctx
Change-Id: I49e6425819b819cf604778688f44df886a44b162
parent
f8a68225
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
19 deletions
+8
-19
av1/common/txb_common.h
av1/common/txb_common.h
+1
-3
av1/decoder/decodetxb.c
av1/decoder/decodetxb.c
+2
-5
av1/encoder/encodetxb.c
av1/encoder/encodetxb.c
+5
-11
No files found.
av1/common/txb_common.h
View file @
52e27901
...
...
@@ -359,14 +359,12 @@ static INLINE int get_br_ctx_from_count_mag(const int row, const int col,
static
INLINE
int
get_br_ctx
(
const
uint8_t
*
const
levels
,
const
int
c
,
// raster order
const
int
bwl
,
const
int
count
,
const
TX_TYPE
tx_type
)
{
const
int
bwl
,
const
TX_TYPE
tx_type
)
{
const
int
row
=
c
>>
bwl
;
const
int
col
=
c
-
(
row
<<
bwl
);
const
int
stride
=
(
1
<<
bwl
)
+
TX_PAD_HOR
;
int
mag
=
0
;
int
nb_mag
[
3
]
=
{
0
};
(
void
)
count
;
const
TX_CLASS
tx_class
=
tx_type_to_class
[
tx_type
];
get_level_mag_with_txclass
(
levels
,
stride
,
row
,
col
,
nb_mag
,
tx_class
);
...
...
av1/decoder/decodetxb.c
View file @
52e27901
...
...
@@ -86,7 +86,6 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
int
cul_level
=
0
;
uint8_t
levels_buf
[
TX_PAD_2D
];
uint8_t
*
const
levels
=
set_levels
(
levels_buf
,
width
);
DECLARE_ALIGNED
(
16
,
uint8_t
,
level_counts
[
MAX_TX_SQUARE
]);
uint16_t
update_pos
[
MAX_TX_SQUARE
];
const
int
all_zero
=
aom_read_symbol
(
...
...
@@ -206,8 +205,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
ec_ctx
->
coeff_base_eob_cdf
[
txs_ctx
][
plane_type
][
coeff_ctx
];
int
level
=
aom_read_symbol
(
r
,
cdf
,
nsymbs
,
ACCT_STR
)
+
1
;
if
(
level
>
NUM_BASE_LEVELS
)
{
const
int
br_ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
level_counts
[
pos
],
tx_type
);
const
int
br_ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
tx_type
);
for
(
int
idx
=
0
;
idx
<
COEFF_BASE_RANGE
;
idx
+=
BR_CDF_SIZE
-
1
)
{
const
int
k
=
aom_read_symbol
(
r
,
...
...
@@ -232,8 +230,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
const
int
nsymbs
=
4
;
int
level
=
aom_read_symbol
(
r
,
cdf
,
nsymbs
,
ACCT_STR
);
if
(
level
>
NUM_BASE_LEVELS
)
{
const
int
br_ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
level_counts
[
pos
],
tx_type
);
const
int
br_ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
tx_type
);
for
(
int
idx
=
0
;
idx
<
COEFF_BASE_RANGE
;
idx
+=
BR_CDF_SIZE
-
1
)
{
const
int
k
=
aom_read_symbol
(
r
,
...
...
av1/encoder/encodetxb.c
View file @
52e27901
...
...
@@ -411,7 +411,6 @@ void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
FRAME_CONTEXT
*
ec_ctx
=
xd
->
tile_ctx
;
uint8_t
levels_buf
[
TX_PAD_2D
];
uint8_t
*
const
levels
=
set_levels
(
levels_buf
,
width
);
DECLARE_ALIGNED
(
16
,
uint8_t
,
level_counts
[
MAX_TX_SQUARE
]);
DECLARE_ALIGNED
(
16
,
int8_t
,
coeff_contexts
[
MAX_TX_SQUARE
]);
uint16_t
update_pos
[
MAX_TX_SQUARE
];
int
num_updates
=
0
;
...
...
@@ -501,8 +500,7 @@ void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
if
(
level
>
NUM_BASE_LEVELS
)
{
// level is above 1.
const
int
base_range
=
level
-
1
-
NUM_BASE_LEVELS
;
const
int
br_ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
level_counts
[
pos
],
tx_type
);
const
int
br_ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
tx_type
);
for
(
int
idx
=
0
;
idx
<
COEFF_BASE_RANGE
;
idx
+=
BR_CDF_SIZE
-
1
)
{
const
int
k
=
AOMMIN
(
base_range
-
idx
,
BR_CDF_SIZE
-
1
);
aom_write_symbol
(
w
,
k
,
...
...
@@ -645,7 +643,6 @@ int av1_cost_coeffs_txb(const AV1_COMMON *const cm, const MACROBLOCK *x,
const
int16_t
*
const
scan
=
scan_order
->
scan
;
uint8_t
levels_buf
[
TX_PAD_2D
];
uint8_t
*
const
levels
=
set_levels
(
levels_buf
,
width
);
DECLARE_ALIGNED
(
16
,
uint8_t
,
level_counts
[
MAX_TX_SQUARE
]);
DECLARE_ALIGNED
(
16
,
int8_t
,
coeff_contexts
[
MAX_TX_SQUARE
]);
const
LV_MAP_COEFF_COST
*
const
coeff_costs
=
&
x
->
coeff_costs
[
txs_ctx
][
plane_type
];
...
...
@@ -693,7 +690,7 @@ int av1_cost_coeffs_txb(const AV1_COMMON *const cm, const MACROBLOCK *x,
}
if
(
level
>
NUM_BASE_LEVELS
)
{
int
ctx
;
ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
level_counts
[
pos
],
tx_type
);
ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
tx_type
);
const
int
base_range
=
level
-
1
-
NUM_BASE_LEVELS
;
if
(
base_range
<
COEFF_BASE_RANGE
)
{
cost
+=
coeff_costs
->
lps_cost
[
ctx
][
base_range
];
...
...
@@ -1317,9 +1314,8 @@ static int get_coeff_cost(const tran_low_t qc, const int scan_idx,
const
int
col
=
pos
-
(
row
<<
txb_info
->
bwl
);
(
void
)
col
;
const
int
count
=
0
;
const
int
ctx
=
get_br_ctx
(
txb_info
->
levels
,
pos
,
txb_info
->
bwl
,
count
,
txb_info
->
tx_type
);
const
int
ctx
=
get_br_ctx
(
txb_info
->
levels
,
pos
,
txb_info
->
bwl
,
txb_info
->
tx_type
);
cost
+=
get_br_cost
(
abs_qc
,
ctx
,
txb_costs
->
lps_cost
[
ctx
]);
cost
+=
get_golomb_cost
(
abs_qc
);
}
...
...
@@ -2187,7 +2183,6 @@ void av1_update_and_record_txb_context(int plane, int block, int blk_row,
const
int
height
=
get_txb_high
(
tx_size
);
uint8_t
levels_buf
[
TX_PAD_2D
];
uint8_t
*
const
levels
=
set_levels
(
levels_buf
,
width
);
DECLARE_ALIGNED
(
16
,
uint8_t
,
level_counts
[
MAX_TX_SQUARE
]);
const
uint8_t
allow_update_cdf
=
args
->
allow_update_cdf
;
TX_SIZE
txsize_ctx
=
get_txsize_entropy_ctx
(
tx_size
);
...
...
@@ -2254,8 +2249,7 @@ void av1_update_and_record_txb_context(int plane, int block, int blk_row,
}
if
(
level
>
NUM_BASE_LEVELS
)
{
const
int
base_range
=
level
-
1
-
NUM_BASE_LEVELS
;
const
int
br_ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
level_counts
[
pos
],
tx_type
);
const
int
br_ctx
=
get_br_ctx
(
levels
,
pos
,
bwl
,
tx_type
);
for
(
int
idx
=
0
;
idx
<
COEFF_BASE_RANGE
;
idx
+=
BR_CDF_SIZE
-
1
)
{
const
int
k
=
AOMMIN
(
base_range
-
idx
,
BR_CDF_SIZE
-
1
);
if
(
allow_update_cdf
)
{
...
...
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