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
36d616b1
Commit
36d616b1
authored
Mar 22, 2017
by
Angie Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement update_txb_context for lv_map
Change-Id: I6bedc3a1a40e551ce4b3989382b7706a589c08f2
parent
a2d5c948
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
av1/encoder/encodetxb.c
av1/encoder/encodetxb.c
+25
-3
No files found.
av1/encoder/encodetxb.c
View file @
36d616b1
...
...
@@ -378,14 +378,35 @@ static void update_txb_context(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE
plane_bsize
,
TX_SIZE
tx_size
,
void
*
arg
)
{
TxbParams
*
const
args
=
arg
;
const
AV1_COMP
*
cpi
=
args
->
cpi
;
const
AV1_COMMON
*
cm
=
&
cpi
->
common
;
ThreadData
*
const
td
=
args
->
td
;
MACROBLOCK
*
const
x
=
&
td
->
mb
;
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
MB_MODE_INFO
*
mbmi
=
&
xd
->
mi
[
0
]
->
mbmi
;
struct
macroblock_plane
*
p
=
&
x
->
plane
[
plane
];
struct
macroblockd_plane
*
pd
=
&
xd
->
plane
[
plane
];
const
uint16_t
eob
=
p
->
eobs
[
block
];
const
tran_low_t
*
qcoeff
=
BLOCK_OFFSET
(
p
->
qcoeff
,
block
);
const
PLANE_TYPE
plane_type
=
pd
->
plane_type
;
const
TX_TYPE
tx_type
=
get_tx_type
(
plane_type
,
xd
,
block
,
tx_size
);
const
SCAN_ORDER
*
const
scan_order
=
get_scan
(
cm
,
tx_size
,
tx_type
,
is_inter_block
(
mbmi
));
const
int16_t
*
scan
=
scan_order
->
scan
;
(
void
)
plane_bsize
;
av1_set_contexts
(
xd
,
pd
,
plane
,
tx_size
,
p
->
eobs
[
block
]
>
0
,
blk_col
,
blk_row
);
int
cul_level
=
0
;
int
c
;
for
(
c
=
0
;
c
<
eob
;
++
c
)
{
cul_level
+=
abs
(
qcoeff
[
scan
[
c
]]);
}
cul_level
=
AOMMIN
(
COEFF_CONTEXT_MASK
,
cul_level
);
// DC value
set_dc_sign
(
&
cul_level
,
qcoeff
[
0
]);
av1_set_contexts
(
xd
,
pd
,
plane
,
tx_size
,
cul_level
,
blk_col
,
blk_row
);
}
static
void
update_and_record_txb_context
(
int
plane
,
int
block
,
int
blk_row
,
...
...
@@ -508,7 +529,8 @@ static void update_and_record_txb_context(int plane, int block, int blk_row,
// use 0-th order Golomb code to handle the residual level.
}
cul_level
=
AOMMIN
(
63
,
cul_level
);
cul_level
=
AOMMIN
(
COEFF_CONTEXT_MASK
,
cul_level
);
// DC value
set_dc_sign
(
&
cul_level
,
tcoeff
[
0
]);
...
...
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