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
a0d6f117
Commit
a0d6f117
authored
Feb 21, 2017
by
Yushin Cho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change PVQ's partition split symbols to use dyadic and ec_adapt adaptation
Change-Id: I2fd1d6f32b1b395dfdbe556b96dddf65f3cabbbe
parent
0077927b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
11 deletions
+28
-11
av1/common/generic_code.h
av1/common/generic_code.h
+0
-3
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
+2
-2
av1/decoder/pvq_decoder.c
av1/decoder/pvq_decoder.c
+7
-0
av1/decoder/pvq_decoder.h
av1/decoder/pvq_decoder.h
+6
-0
av1/encoder/laplace_encoder.c
av1/encoder/laplace_encoder.c
+1
-2
av1/encoder/pvq_encoder.c
av1/encoder/pvq_encoder.c
+7
-0
av1/encoder/pvq_encoder.h
av1/encoder/pvq_encoder.h
+3
-0
No files found.
av1/common/generic_code.h
View file @
a0d6f117
...
...
@@ -40,9 +40,6 @@ void generic_model_init(generic_encoder *model);
#define OD_CDFS_INIT(cdf, val) aom_cdf_init(&cdf[0][0], \
sizeof(cdf)/sizeof(cdf[0]), sizeof(cdf[0])/sizeof(cdf[0][0]), val, val)
#define OD_CDFS_INIT_FIRST(cdf, val, first) aom_cdf_init(&cdf[0][0], \
sizeof(cdf)/sizeof(cdf[0]), sizeof(cdf[0])/sizeof(cdf[0][0]), val, first)
#define OD_SINGLE_CDF_INIT(cdf, val) aom_cdf_init(cdf, \
1, sizeof(cdf)/sizeof(cdf[0]), val, val)
...
...
av1/common/pvq.c
View file @
a0d6f117
...
...
@@ -211,8 +211,7 @@ void od_adapt_pvq_ctx_reset(od_pvq_adapt_ctx *state, int is_keyframe) {
OD_CDFS_INIT
(
state
->
pvq_gaintheta_cdf
,
state
->
pvq_gaintheta_increment
>>
2
);
state
->
pvq_skip_dir_increment
=
128
;
OD_CDFS_INIT
(
state
->
pvq_skip_dir_cdf
,
state
->
pvq_skip_dir_increment
>>
2
);
ctx
->
pvq_split_increment
=
128
;
OD_CDFS_INIT
(
ctx
->
pvq_split_cdf
,
ctx
->
pvq_split_increment
>>
1
);
OD_CDFS_INIT
(
ctx
->
pvq_split_cdf
,
0
);
}
/* QMs are arranged from smallest to largest blocksizes, first for
...
...
av1/common/pvq.h
View file @
a0d6f117
...
...
@@ -124,8 +124,7 @@ struct od_pvq_codeword_ctx {
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_split_cdf
[
22
*
7
][
8
];
int
pvq_split_increment
;
uint16_t
pvq_split_cdf
[
22
*
7
][
CDF_SIZE
(
8
)];
};
struct
od_pvq_adapt_ctx
{
...
...
av1/decoder/laplace_decoder.c
View file @
a0d6f117
...
...
@@ -33,8 +33,8 @@ static int aom_decode_pvq_split_(aom_reader *r, od_pvq_codeword_ctx *adapt,
if
(
sum
==
0
)
return
0
;
shift
=
OD_MAXI
(
0
,
OD_ILOG
(
sum
)
-
3
);
fctx
=
7
*
ctx
+
(
sum
>>
shift
)
-
1
;
msbs
=
aom_
decode_cdf_adapt
(
r
,
adapt
->
pvq_split_cdf
[
fctx
]
,
(
sum
>>
shift
)
+
1
,
adapt
->
pvq_split_increment
,
ACCT_STR_NAME
);
msbs
=
aom_
read_symbol_pvq
(
r
,
adapt
->
pvq_split_cdf
[
fctx
],
(
sum
>>
shift
)
+
1
,
ACCT_STR_NAME
);
if
(
shift
)
count
=
aom_read_literal
(
r
,
shift
,
ACCT_STR_NAME
);
count
+=
msbs
<<
shift
;
if
(
count
>
sum
)
{
...
...
av1/decoder/pvq_decoder.c
View file @
a0d6f117
...
...
@@ -28,6 +28,13 @@
#include "av1/decoder/pvq_decoder.h"
#include "aom_ports/system_state.h"
int
aom_read_symbol_pvq_
(
aom_reader
*
r
,
aom_cdf_prob
*
cdf
,
int
nsymbs
ACCT_STR_PARAM
)
{
if
(
cdf
[
0
]
==
0
)
aom_cdf_init_q15_1D
(
cdf
,
nsymbs
,
CDF_SIZE
(
nsymbs
));
return
aom_read_symbol
(
r
,
cdf
,
nsymbs
,
ACCT_STR_NAME
);
}
static
void
aom_decode_pvq_codeword
(
aom_reader
*
r
,
od_pvq_codeword_ctx
*
ctx
,
od_coeff
*
y
,
int
n
,
int
k
)
{
int
i
;
...
...
av1/decoder/pvq_decoder.h
View file @
a0d6f117
...
...
@@ -18,6 +18,12 @@
# include "av1/common/pvq.h"
# include "av1/decoder/decint.h"
#define aom_read_symbol_pvq(r, cdf, nsymbs, ACCT_STR_NAME) \
aom_read_symbol_pvq_(r, cdf, nsymbs ACCT_STR_ARG(ACCT_STR_NAME))
int
aom_read_symbol_pvq_
(
aom_reader
*
r
,
aom_cdf_prob
*
cdf
,
int
nsymbs
ACCT_STR_PARAM
);
void
aom_decode_band_pvq_splits
(
aom_reader
*
r
,
od_pvq_codeword_ctx
*
adapt
,
od_coeff
*
y
,
int
n
,
int
k
,
int
level
);
...
...
av1/encoder/laplace_encoder.c
View file @
a0d6f117
...
...
@@ -35,8 +35,7 @@ static void aom_encode_pvq_split(aom_writer *w, od_pvq_codeword_ctx *adapt,
sum
>>=
shift
;
}
fctx
=
7
*
ctx
+
sum
-
1
;
aom_encode_cdf_adapt
(
w
,
count
,
adapt
->
pvq_split_cdf
[
fctx
],
sum
+
1
,
adapt
->
pvq_split_increment
);
aom_write_symbol_pvq
(
w
,
count
,
adapt
->
pvq_split_cdf
[
fctx
],
sum
+
1
);
if
(
shift
)
aom_write_literal
(
w
,
rest
,
shift
);
}
...
...
av1/encoder/pvq_encoder.c
View file @
a0d6f117
...
...
@@ -32,6 +32,13 @@
dot-product of the 1st band of chroma with the luma ref doesn't overflow.*/
#define OD_CFL_FLIP_SHIFT (OD_LIMIT_BSIZE_MAX + 0)
void
aom_write_symbol_pvq
(
aom_writer
*
w
,
int
symb
,
aom_cdf_prob
*
cdf
,
int
nsymbs
)
{
if
(
cdf
[
0
]
==
0
)
aom_cdf_init_q15_1D
(
cdf
,
nsymbs
,
CDF_SIZE
(
nsymbs
));
aom_write_symbol
(
w
,
symb
,
cdf
,
nsymbs
);
}
static
void
aom_encode_pvq_codeword
(
aom_writer
*
w
,
od_pvq_codeword_ctx
*
adapt
,
const
od_coeff
*
in
,
int
n
,
int
k
)
{
int
i
;
...
...
av1/encoder/pvq_encoder.h
View file @
a0d6f117
...
...
@@ -19,6 +19,9 @@
# include "av1/common/pvq.h"
# include "av1/encoder/encint.h"
void
aom_write_symbol_pvq
(
aom_writer
*
w
,
int
symb
,
aom_cdf_prob
*
cdf
,
int
nsymbs
);
void
aom_encode_band_pvq_splits
(
aom_writer
*
w
,
od_pvq_codeword_ctx
*
adapt
,
const
int
*
y
,
int
n
,
int
k
,
int
level
);
...
...
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