Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Martres
aom-rav1e
Commits
961bafc3
Commit
961bafc3
authored
Jun 23, 2014
by
Jingning Han
Committed by
Gerrit Code Review
Jun 23, 2014
Browse files
Merge "Remove unused vp9_init_quant_tables function"
parents
5aae059c
3b9c19aa
Changes
4
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_quant_common.c
View file @
961bafc3
...
...
@@ -12,7 +12,6 @@
#include "vp9/common/vp9_quant_common.h"
#include "vp9/common/vp9_seg_common.h"
#if 1
static
const
int16_t
dc_qlookup
[
QINDEX_RANGE
]
=
{
4
,
8
,
8
,
9
,
10
,
11
,
12
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
19
,
...
...
@@ -83,44 +82,6 @@ static const int16_t ac_qlookup[QINDEX_RANGE] = {
1597
,
1628
,
1660
,
1692
,
1725
,
1759
,
1793
,
1828
,
};
void
vp9_init_quant_tables
(
void
)
{
}
#else
static
int16_t
dc_qlookup
[
QINDEX_RANGE
];
static
int16_t
ac_qlookup
[
QINDEX_RANGE
];
#define ACDC_MIN 8
// TODO(dkovalev) move to common and reuse
static
double
poly3
(
double
a
,
double
b
,
double
c
,
double
d
,
double
x
)
{
return
a
*
x
*
x
*
x
+
b
*
x
*
x
+
c
*
x
+
d
;
}
void
vp9_init_quant_tables
()
{
int
i
,
val
=
4
;
// A "real" q of 1.0 forces lossless mode.
// In practice non lossless Q's between 1.0 and 2.0 (represented here by
// integer values from 5-7 give poor rd results (lower psnr and often
// larger size than the lossless encode. To block out those "not very useful"
// values we increment the ac and dc q lookup values by 4 after position 0.
ac_qlookup
[
0
]
=
val
;
dc_qlookup
[
0
]
=
val
;
val
+=
4
;
for
(
i
=
1
;
i
<
QINDEX_RANGE
;
i
++
)
{
const
int
ac_val
=
val
;
val
=
(
int
)(
val
*
1
.
01
975
);
if
(
val
==
ac_val
)
++
val
;
ac_qlookup
[
i
]
=
(
int16_t
)
ac_val
;
dc_qlookup
[
i
]
=
(
int16_t
)
MAX
(
ACDC_MIN
,
poly3
(
0
.
000000305
,
-
0
.
00065
,
0
.
9
,
0
.
5
,
ac_val
));
}
}
#endif
int16_t
vp9_dc_quant
(
int
qindex
,
int
delta
)
{
return
dc_qlookup
[
clamp
(
qindex
+
delta
,
0
,
MAXQ
)];
}
...
...
vp9/common/vp9_quant_common.h
View file @
961bafc3
...
...
@@ -22,8 +22,6 @@ extern "C" {
#define QINDEX_RANGE (MAXQ - MINQ + 1)
#define QINDEX_BITS 8
void
vp9_init_quant_tables
();
int16_t
vp9_dc_quant
(
int
qindex
,
int
delta
);
int16_t
vp9_ac_quant
(
int
qindex
,
int
delta
);
...
...
vp9/decoder/vp9_decoder.c
View file @
961bafc3
...
...
@@ -37,7 +37,6 @@ static void initialize_dec() {
if
(
!
init_done
)
{
vp9_init_neighbors
();
vp9_init_quant_tables
();
init_done
=
1
;
}
}
...
...
vp9/encoder/vp9_encoder.c
View file @
961bafc3
...
...
@@ -145,8 +145,6 @@ void vp9_initialize_enc() {
if
(
!
init_done
)
{
vp9_init_neighbors
();
vp9_init_quant_tables
();
vp9_coef_tree_initialize
();
vp9_tokenize_initialize
();
vp9_init_me_luts
();
...
...
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