Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Traud
Opus
Commits
854e9bd4
Commit
854e9bd4
authored
11 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Using the maximum frequency response of pitch taps instead of maxabs
parent
c63fb978
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
silk/VQ_WMat_EC.c
+2
-5
2 additions, 5 deletions
silk/VQ_WMat_EC.c
silk/main.h
+1
-0
1 addition, 0 deletions
silk/main.h
silk/quant_LTP_gains.c
+3
-0
3 additions, 0 deletions
silk/quant_LTP_gains.c
silk/tables.h
+2
-0
2 additions, 0 deletions
silk/tables.h
silk/tables_LTP.c
+24
-0
24 additions, 0 deletions
silk/tables_LTP.c
with
32 additions
and
5 deletions
silk/VQ_WMat_EC.c
+
2
−
5
View file @
854e9bd4
...
...
@@ -39,6 +39,7 @@ void silk_VQ_WMat_EC(
const
opus_int16
*
in_Q14
,
/* I input vector to be quantized */
const
opus_int32
*
W_Q18
,
/* I weighting matrix */
const
opus_int8
*
cb_Q7
,
/* I codebook */
const
opus_uint8
*
cb_gain_Q7
,
/* I codebook effective gain */
const
opus_uint8
*
cl_Q5
,
/* I code length for each codebook vector */
const
opus_int
mu_Q9
,
/* I tradeoff betw. weighted error and rate */
const
opus_int32
max_gain_Q7
,
/* I maximum sum of absolute LTP coefficients */
...
...
@@ -54,11 +55,7 @@ void silk_VQ_WMat_EC(
*
rate_dist_Q14
=
silk_int32_MAX
;
cb_row_Q7
=
cb_Q7
;
for
(
k
=
0
;
k
<
L
;
k
++
)
{
gain_tmp_Q7
=
silk_abs
(
cb_row_Q7
[
0
]
)
+
silk_abs
(
cb_row_Q7
[
1
]
)
+
silk_abs
(
cb_row_Q7
[
2
]
)
+
silk_abs
(
cb_row_Q7
[
3
]
)
+
silk_abs
(
cb_row_Q7
[
4
]
);
gain_tmp_Q7
=
cb_gain_Q7
[
k
];
diff_Q14
[
0
]
=
in_Q14
[
0
]
-
silk_LSHIFT
(
cb_row_Q7
[
0
],
7
);
diff_Q14
[
1
]
=
in_Q14
[
1
]
-
silk_LSHIFT
(
cb_row_Q7
[
1
],
7
);
...
...
This diff is collapsed.
Click to expand it.
silk/main.h
+
1
−
0
View file @
854e9bd4
...
...
@@ -219,6 +219,7 @@ void silk_VQ_WMat_EC(
const
opus_int16
*
in_Q14
,
/* I input vector to be quantized */
const
opus_int32
*
W_Q18
,
/* I weighting matrix */
const
opus_int8
*
cb_Q7
,
/* I codebook */
const
opus_uint8
*
cb_gain_Q7
,
/* I codebook effective gain */
const
opus_uint8
*
cl_Q5
,
/* I code length for each codebook vector */
const
opus_int
mu_Q9
,
/* I tradeoff betw. weighted error and rate */
const
opus_int32
max_gain_Q7
,
/* I maximum sum of absolute LTP coefficients */
...
...
This diff is collapsed.
Click to expand it.
silk/quant_LTP_gains.c
+
3
−
0
View file @
854e9bd4
...
...
@@ -47,6 +47,7 @@ void silk_quant_LTP_gains(
opus_int8
temp_idx
[
MAX_NB_SUBFR
];
const
opus_uint8
*
cl_ptr_Q5
;
const
opus_int8
*
cbk_ptr_Q7
;
const
opus_uint8
*
cbk_gain_ptr_Q7
;
const
opus_int16
*
b_Q14_ptr
;
const
opus_int32
*
W_Q18_ptr
;
opus_int32
rate_dist_Q14_subfr
,
rate_dist_Q14
,
min_rate_dist_Q14
;
...
...
@@ -61,6 +62,7 @@ void silk_quant_LTP_gains(
for
(
k
=
0
;
k
<
3
;
k
++
)
{
cl_ptr_Q5
=
silk_LTP_gain_BITS_Q5_ptrs
[
k
];
cbk_ptr_Q7
=
silk_LTP_vq_ptrs_Q7
[
k
];
cbk_gain_ptr_Q7
=
silk_LTP_vq_gain_ptrs_Q7
[
k
];
cbk_size
=
silk_LTP_vq_sizes
[
k
];
/* Set up pointer to first subframe */
...
...
@@ -80,6 +82,7 @@ void silk_quant_LTP_gains(
b_Q14_ptr
,
/* I input vector to be quantized */
W_Q18_ptr
,
/* I weighting matrix */
cbk_ptr_Q7
,
/* I codebook */
cbk_gain_ptr_Q7
,
/* I codebook effective gains */
cl_ptr_Q5
,
/* I code length for each codebook vector */
mu_Q9
,
/* I tradeoff between weighted error and rate */
max_gain_Q7
,
/* I maximum sum of absolute LTP coefficients */
...
...
This diff is collapsed.
Click to expand it.
silk/tables.h
+
2
−
0
View file @
854e9bd4
...
...
@@ -78,6 +78,8 @@ extern const opus_uint8 * const silk_LTP_gain_iCDF_ptrs[ NB_LTP_CBKS ];
extern
const
opus_uint8
*
const
silk_LTP_gain_BITS_Q5_ptrs
[
NB_LTP_CBKS
];
/* 3 */
extern
const
opus_int16
silk_LTP_gain_middle_avg_RD_Q14
;
extern
const
opus_int8
*
const
silk_LTP_vq_ptrs_Q7
[
NB_LTP_CBKS
];
/* 168 */
extern
const
opus_uint8
*
const
silk_LTP_vq_gain_ptrs_Q7
[
NB_LTP_CBKS
];
extern
const
opus_int8
silk_LTP_vq_sizes
[
NB_LTP_CBKS
];
/* 3 */
extern
const
opus_uint8
silk_LTPscale_iCDF
[
3
];
/* 4 */
...
...
This diff is collapsed.
Click to expand it.
silk/tables_LTP.c
+
24
−
0
View file @
854e9bd4
...
...
@@ -267,6 +267,30 @@ const opus_int8 * const silk_LTP_vq_ptrs_Q7[NB_LTP_CBKS] = {
(
opus_int8
*
)
&
silk_LTP_gain_vq_2
[
0
][
0
]
};
/* Maximum frequency-dependent response of the pitch taps above,
computed as max(abs(freqz(taps))) */
static
const
opus_uint8
silk_LTP_gain_vq_0_gain
[
8
]
=
{
46
,
2
,
90
,
87
,
93
,
91
,
82
,
98
};
static
const
opus_uint8
silk_LTP_gain_vq_1_gain
[
16
]
=
{
109
,
120
,
118
,
12
,
113
,
115
,
117
,
119
,
99
,
59
,
87
,
111
,
63
,
111
,
112
,
80
};
static
const
opus_uint8
silk_LTP_gain_vq_2_gain
[
32
]
=
{
126
,
124
,
125
,
124
,
129
,
121
,
126
,
23
,
132
,
127
,
127
,
127
,
126
,
127
,
122
,
133
,
130
,
134
,
101
,
118
,
119
,
145
,
126
,
86
,
124
,
120
,
123
,
119
,
170
,
173
,
107
,
109
};
const
opus_uint8
*
const
silk_LTP_vq_gain_ptrs_Q7
[
NB_LTP_CBKS
]
=
{
&
silk_LTP_gain_vq_0_gain
[
0
],
&
silk_LTP_gain_vq_1_gain
[
0
],
&
silk_LTP_gain_vq_2_gain
[
0
]
};
const
opus_int8
silk_LTP_vq_sizes
[
NB_LTP_CBKS
]
=
{
8
,
16
,
32
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment