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
Sam James
Opus
Commits
5607d5d1
Commit
5607d5d1
authored
11 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Annotating pointer arguments with OPUS_RESTRICT and const
parent
32ada84b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
celt/bands.c
+7
-7
7 additions, 7 deletions
celt/bands.c
celt/bands.h
+3
-3
3 additions, 3 deletions
celt/bands.h
celt/vq.c
+1
-1
1 addition, 1 deletion
celt/vq.c
celt/vq.h
+1
-1
1 addition, 1 deletion
celt/vq.h
with
12 additions
and
12 deletions
celt/bands.c
+
7
−
7
View file @
5607d5d1
...
...
@@ -253,8 +253,8 @@ void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X,
/* This prevents energy collapse for transients with multiple short MDCTs */
void
anti_collapse
(
const
CELTMode
*
m
,
celt_norm
*
X_
,
unsigned
char
*
collapse_masks
,
int
LM
,
int
C
,
int
size
,
int
start
,
int
end
,
opus_val16
*
logE
,
opus_val16
*
prev1logE
,
opus_val16
*
prev2logE
,
int
*
pulses
,
opus_uint32
seed
)
int
start
,
int
end
,
const
opus_val16
*
logE
,
const
opus_val16
*
prev1logE
,
const
opus_val16
*
prev2logE
,
const
int
*
pulses
,
opus_uint32
seed
)
{
int
c
,
i
,
j
,
k
;
for
(
i
=
start
;
i
<
end
;
i
++
)
...
...
@@ -347,7 +347,7 @@ void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_mas
}
}
static
void
intensity_stereo
(
const
CELTMode
*
m
,
celt_norm
*
X
,
celt_norm
*
Y
,
const
celt_ener
*
bandE
,
int
bandID
,
int
N
)
static
void
intensity_stereo
(
const
CELTMode
*
m
,
celt_norm
*
OPUS_RESTRICT
X
,
const
celt_norm
*
OPUS_RESTRICT
Y
,
const
celt_ener
*
bandE
,
int
bandID
,
int
N
)
{
int
i
=
bandID
;
int
j
;
...
...
@@ -372,7 +372,7 @@ static void intensity_stereo(const CELTMode *m, celt_norm *X, celt_norm *Y, cons
}
}
static
void
stereo_split
(
celt_norm
*
X
,
celt_norm
*
Y
,
int
N
)
static
void
stereo_split
(
celt_norm
*
OPUS_RESTRICT
X
,
celt_norm
*
OPUS_RESTRICT
Y
,
int
N
)
{
int
j
;
for
(
j
=
0
;
j
<
N
;
j
++
)
...
...
@@ -385,7 +385,7 @@ static void stereo_split(celt_norm *X, celt_norm *Y, int N)
}
}
static
void
stereo_merge
(
celt_norm
*
X
,
celt_norm
*
Y
,
opus_val16
mid
,
int
N
)
static
void
stereo_merge
(
celt_norm
*
OPUS_RESTRICT
X
,
celt_norm
*
OPUS_RESTRICT
Y
,
opus_val16
mid
,
int
N
)
{
int
j
;
opus_val32
xp
=
0
,
side
=
0
;
...
...
@@ -438,7 +438,7 @@ static void stereo_merge(celt_norm *X, celt_norm *Y, opus_val16 mid, int N)
}
/* Decide whether we should spread the pulses in the current frame */
int
spreading_decision
(
const
CELTMode
*
m
,
celt_norm
*
X
,
int
*
average
,
int
spreading_decision
(
const
CELTMode
*
m
,
const
celt_norm
*
X
,
int
*
average
,
int
last_decision
,
int
*
hf_average
,
int
*
tapset_decision
,
int
update_hf
,
int
end
,
int
C
,
int
M
)
{
...
...
@@ -459,7 +459,7 @@ int spreading_decision(const CELTMode *m, celt_norm *X, int *average,
{
int
j
,
N
,
tmp
=
0
;
int
tcount
[
3
]
=
{
0
,
0
,
0
};
celt_norm
*
OPUS_RESTRICT
x
=
X
+
M
*
eBands
[
i
]
+
c
*
N0
;
const
celt_norm
*
OPUS_RESTRICT
x
=
X
+
M
*
eBands
[
i
]
+
c
*
N0
;
N
=
M
*
(
eBands
[
i
+
1
]
-
eBands
[
i
]);
if
(
N
<=
8
)
continue
;
...
...
This diff is collapsed.
Click to expand it.
celt/bands.h
+
3
−
3
View file @
5607d5d1
...
...
@@ -66,7 +66,7 @@ void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X,
#define SPREAD_NORMAL (2)
#define SPREAD_AGGRESSIVE (3)
int
spreading_decision
(
const
CELTMode
*
m
,
celt_norm
*
X
,
int
*
average
,
int
spreading_decision
(
const
CELTMode
*
m
,
const
celt_norm
*
X
,
int
*
average
,
int
last_decision
,
int
*
hf_average
,
int
*
tapset_decision
,
int
update_hf
,
int
end
,
int
C
,
int
M
);
...
...
@@ -104,8 +104,8 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
opus_int32
total_bits
,
opus_int32
balance
,
ec_ctx
*
ec
,
int
M
,
int
codedBands
,
opus_uint32
*
seed
);
void
anti_collapse
(
const
CELTMode
*
m
,
celt_norm
*
X_
,
unsigned
char
*
collapse_masks
,
int
LM
,
int
C
,
int
size
,
int
start
,
int
end
,
opus_val16
*
logE
,
opus_val16
*
prev1logE
,
opus_val16
*
prev2logE
,
int
*
pulses
,
opus_uint32
seed
);
int
start
,
int
end
,
const
opus_val16
*
logE
,
const
opus_val16
*
prev1logE
,
const
opus_val16
*
prev2logE
,
const
int
*
pulses
,
opus_uint32
seed
);
opus_uint32
celt_lcg_rand
(
opus_uint32
seed
);
...
...
This diff is collapsed.
Click to expand it.
celt/vq.c
+
1
−
1
View file @
5607d5d1
...
...
@@ -371,7 +371,7 @@ void renormalise_vector(celt_norm *X, int N, opus_val16 gain)
/*return celt_sqrt(E);*/
}
int
stereo_itheta
(
celt_norm
*
X
,
celt_norm
*
Y
,
int
stereo
,
int
N
)
int
stereo_itheta
(
const
celt_norm
*
X
,
const
celt_norm
*
Y
,
int
stereo
,
int
N
)
{
int
i
;
int
itheta
;
...
...
This diff is collapsed.
Click to expand it.
celt/vq.h
+
1
−
1
View file @
5607d5d1
...
...
@@ -65,6 +65,6 @@ unsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B,
void
renormalise_vector
(
celt_norm
*
X
,
int
N
,
opus_val16
gain
);
int
stereo_itheta
(
celt_norm
*
X
,
celt_norm
*
Y
,
int
stereo
,
int
N
);
int
stereo_itheta
(
const
celt_norm
*
X
,
const
celt_norm
*
Y
,
int
stereo
,
int
N
);
#endif
/* VQ_H */
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