Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
00d47591
Commit
00d47591
authored
Dec 01, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/opus_celt: Use avpriv_float_dsp_alloc()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
3384d765
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
opus_celt.c
libavcodec/opus_celt.c
+9
-4
No files found.
libavcodec/opus_celt.c
View file @
00d47591
...
...
@@ -62,7 +62,7 @@ struct CeltContext {
// constant values that do not change during context lifetime
AVCodecContext
*
avctx
;
CeltIMDCTContext
*
imdct
[
4
];
AVFloatDSPContext
dsp
;
AVFloatDSPContext
*
dsp
;
int
output_channels
;
// values that have inter-frame effect and must be reset on flush
...
...
@@ -2072,7 +2072,7 @@ int ff_celt_decode_frame(CeltContext *s, OpusRangeCoder *rc,
/* stereo -> mono downmix */
if
(
s
->
output_channels
<
s
->
coded_channels
)
{
s
->
dsp
.
vector_fmac_scalar
(
s
->
coeffs
[
0
],
s
->
coeffs
[
1
],
1
.
0
,
FFALIGN
(
frame_size
,
16
));
s
->
dsp
->
vector_fmac_scalar
(
s
->
coeffs
[
0
],
s
->
coeffs
[
1
],
1
.
0
,
FFALIGN
(
frame_size
,
16
));
imdct_scale
=
0
.
5
;
}
else
if
(
s
->
output_channels
>
s
->
coded_channels
)
memcpy
(
s
->
coeffs
[
1
],
s
->
coeffs
[
0
],
frame_size
*
sizeof
(
float
));
...
...
@@ -2098,7 +2098,7 @@ int ff_celt_decode_frame(CeltContext *s, OpusRangeCoder *rc,
imdct
->
imdct_half
(
imdct
,
dst
+
CELT_OVERLAP
/
2
,
s
->
coeffs
[
i
]
+
j
,
s
->
blocks
,
imdct_scale
);
s
->
dsp
.
vector_fmul_window
(
dst
,
dst
,
dst
+
CELT_OVERLAP
/
2
,
s
->
dsp
->
vector_fmul_window
(
dst
,
dst
,
dst
+
CELT_OVERLAP
/
2
,
celt_window
,
CELT_OVERLAP
/
2
);
}
...
...
@@ -2181,6 +2181,7 @@ void ff_celt_free(CeltContext **ps)
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
s
->
imdct
);
i
++
)
ff_celt_imdct_uninit
(
&
s
->
imdct
[
i
]);
av_freep
(
&
s
->
dsp
);
av_freep
(
ps
);
}
...
...
@@ -2208,7 +2209,11 @@ int ff_celt_init(AVCodecContext *avctx, CeltContext **ps, int output_channels)
goto
fail
;
}
avpriv_float_dsp_init
(
&
s
->
dsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
s
->
dsp
=
avpriv_float_dsp_alloc
(
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
if
(
!
s
->
dsp
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
ff_celt_flush
(
s
);
...
...
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