Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
b9802238
Commit
b9802238
authored
Feb 21, 2017
by
Yushin Cho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change PVQ's K=1 symbols to use dyadic and ec_adapt adaptation
Change-Id: I7b855a68c5fedda4e34bfcbbabafa9ba52c09735
parent
a0d6f117
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
8 deletions
+4
-8
av1/common/pvq.c
av1/common/pvq.c
+1
-2
av1/common/pvq.h
av1/common/pvq.h
+1
-2
av1/decoder/laplace_decoder.c
av1/decoder/laplace_decoder.c
+1
-2
av1/encoder/laplace_encoder.c
av1/encoder/laplace_encoder.c
+1
-2
No files found.
av1/common/pvq.c
View file @
b9802238
...
...
@@ -196,8 +196,7 @@ void od_adapt_pvq_ctx_reset(od_pvq_adapt_ctx *state, int is_keyframe) {
ctx
->
pvq_adapt
[
4
*
i
+
OD_ADAPT_COUNT_Q8
]
=
104
;
ctx
->
pvq_adapt
[
4
*
i
+
OD_ADAPT_COUNT_EX_Q8
]
=
128
;
}
ctx
->
pvq_k1_increment
=
128
;
OD_CDFS_INIT
(
ctx
->
pvq_k1_cdf
,
ctx
->
pvq_k1_increment
);
OD_CDFS_INIT
(
ctx
->
pvq_k1_cdf
,
0
);
for
(
pli
=
0
;
pli
<
OD_NPLANES_MAX
;
pli
++
)
{
for
(
bs
=
0
;
bs
<
OD_TXSIZES
;
bs
++
)
for
(
i
=
0
;
i
<
PVQ_MAX_PARTITIONS
;
i
++
)
{
...
...
av1/common/pvq.h
View file @
b9802238
...
...
@@ -121,9 +121,8 @@ typedef struct od_pvq_codeword_ctx od_pvq_codeword_ctx;
struct
od_pvq_codeword_ctx
{
int
pvq_adapt
[
2
*
OD_TXSIZES
*
OD_NSB_ADAPT_CTXS
];
int
pvq_k1_increment
;
/* CDFs are size 16 despite the fact that we're using less than that. */
uint16_t
pvq_k1_cdf
[
12
][
16
];
uint16_t
pvq_k1_cdf
[
12
][
CDF_SIZE
(
16
)
];
uint16_t
pvq_split_cdf
[
22
*
7
][
CDF_SIZE
(
8
)];
};
...
...
av1/decoder/laplace_decoder.c
View file @
b9802238
...
...
@@ -63,8 +63,7 @@ void aom_decode_band_pvq_splits(aom_reader *r, od_pvq_codeword_ctx *adapt,
int
pos
;
cdf_id
=
od_pvq_k1_ctx
(
n
,
level
==
0
);
OD_CLEAR
(
y
,
n
);
pos
=
aom_decode_cdf_adapt
(
r
,
adapt
->
pvq_k1_cdf
[
cdf_id
],
n
,
adapt
->
pvq_k1_increment
,
"pvq:k1"
);
pos
=
aom_read_symbol_pvq
(
r
,
adapt
->
pvq_k1_cdf
[
cdf_id
],
n
,
"pvq:k1"
);
y
[
pos
]
=
1
;
}
else
{
...
...
av1/encoder/laplace_encoder.c
View file @
b9802238
...
...
@@ -51,8 +51,7 @@ void aom_encode_band_pvq_splits(aom_writer *w, od_pvq_codeword_ctx *adapt,
cdf_id
=
od_pvq_k1_ctx
(
n
,
level
==
0
);
for
(
pos
=
0
;
!
y
[
pos
];
pos
++
);
OD_ASSERT
(
pos
<
n
);
aom_encode_cdf_adapt
(
w
,
pos
,
adapt
->
pvq_k1_cdf
[
cdf_id
],
n
,
adapt
->
pvq_k1_increment
);
aom_write_symbol_pvq
(
w
,
pos
,
adapt
->
pvq_k1_cdf
[
cdf_id
],
n
);
}
else
{
mid
=
n
>>
1
;
...
...
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