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
93a802cf
Commit
93a802cf
authored
Aug 28, 2017
by
Angie Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass tx_type into get_eob_ctx()
Change-Id: I3209d0074bf3ed1fda260dc2f5cacbfa616ad6ae
parent
682e67e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
av1/common/txb_common.h
av1/common/txb_common.h
+2
-1
av1/decoder/decodetxb.c
av1/decoder/decodetxb.c
+1
-1
av1/encoder/encodetxb.c
av1/encoder/encodetxb.c
+11
-11
No files found.
av1/common/txb_common.h
View file @
93a802cf
...
...
@@ -365,8 +365,9 @@ static INLINE int get_nz_map_ctx(const tran_low_t *tcoeffs,
static
INLINE
int
get_eob_ctx
(
const
tran_low_t
*
tcoeffs
,
const
int
coeff_idx
,
// raster order
const
TX_SIZE
txs_ctx
)
{
const
TX_SIZE
txs_ctx
,
TX_TYPE
tx_type
)
{
(
void
)
tcoeffs
;
(
void
)
tx_type
;
if
(
txs_ctx
==
TX_4X4
)
return
av1_coeff_band_4x4
[
coeff_idx
];
if
(
txs_ctx
==
TX_8X8
)
return
av1_coeff_band_8x8
[
coeff_idx
];
if
(
txs_ctx
==
TX_16X16
)
return
av1_coeff_band_16x16
[
coeff_idx
];
...
...
av1/decoder/decodetxb.c
View file @
93a802cf
...
...
@@ -101,7 +101,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
for
(
c
=
0
;
c
<
seg_eob
;
++
c
)
{
int
is_nz
;
int
coeff_ctx
=
get_nz_map_ctx
(
tcoeffs
,
scan
[
c
],
bwl
,
height
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
tcoeffs
,
scan
[
c
],
txs_ctx
);
int
eob_ctx
=
get_eob_ctx
(
tcoeffs
,
scan
[
c
],
txs_ctx
,
tx_type
);
if
(
c
<
seg_eob
-
1
)
{
#if LV_MAP_PROB
...
...
av1/encoder/encodetxb.c
View file @
93a802cf
...
...
@@ -138,7 +138,7 @@ void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
for
(
c
=
0
;
c
<
eob
;
++
c
)
{
int
coeff_ctx
=
get_nz_map_ctx
(
tcoeff
,
scan
[
c
],
bwl
,
height
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
tcoeff
,
scan
[
c
],
txs_ctx
);
int
eob_ctx
=
get_eob_ctx
(
tcoeff
,
scan
[
c
],
txs_ctx
,
tx_type
);
tran_low_t
v
=
tcoeff
[
scan
[
c
]];
is_nz
=
(
v
!=
0
);
...
...
@@ -498,7 +498,7 @@ int av1_cost_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCK *x, int plane,
}
if
(
c
<
seg_eob
)
{
int
eob_ctx
=
get_eob_ctx
(
qcoeff
,
scan
[
c
],
txs_ctx
);
int
eob_ctx
=
get_eob_ctx
(
qcoeff
,
scan
[
c
],
txs_ctx
,
tx_type
);
cost
+=
coeff_costs
->
eob_cost
[
eob_ctx
][
c
==
(
eob
-
1
)];
}
}
...
...
@@ -810,8 +810,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
);
const
int
eob_ctx
=
get_eob_ctx
(
txb_info
->
qcoeff
,
coeff_idx
,
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
cost_diff
-=
txb_costs
->
eob_cost
[
eob_ctx
][
scan_idx
==
(
txb_info
->
eob
-
1
)];
}
...
...
@@ -1013,8 +1013,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
);
const
int
eob_ctx
=
get_eob_ctx
(
txb_info
->
qcoeff
,
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
,
...
...
@@ -1069,8 +1069,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
);
const
int
eob_ctx
=
get_eob_ctx
(
txb_info
->
qcoeff
,
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
{
...
...
@@ -1241,8 +1241,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
);
int
eob_ctx
=
get_eob_ctx
(
txb_info
->
qcoeff
,
scan
[
scan_idx
],
txb_info
->
txs_ctx
,
txb_info
->
tx_type
);
cost
+=
txb_costs
->
eob_cost
[
eob_ctx
][
scan_idx
==
(
txb_info
->
eob
-
1
)];
}
}
...
...
@@ -1693,7 +1693,7 @@ void av1_update_and_record_txb_context(int plane, int block, int blk_row,
tran_low_t
v
=
qcoeff
[
scan
[
c
]];
int
is_nz
=
(
v
!=
0
);
int
coeff_ctx
=
get_nz_map_ctx
(
tcoeff
,
scan
[
c
],
bwl
,
height
,
tx_type
);
int
eob_ctx
=
get_eob_ctx
(
tcoeff
,
scan
[
c
],
txsize_ctx
);
int
eob_ctx
=
get_eob_ctx
(
tcoeff
,
scan
[
c
],
txsize_ctx
,
tx_type
);
if
(
c
==
seg_eob
-
1
)
break
;
...
...
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