Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
21ded9ce
Commit
21ded9ce
authored
Nov 20, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/imc: Use avpriv_float_dsp_alloc()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b054054c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
imc.c
libavcodec/imc.c
+10
-4
No files found.
libavcodec/imc.c
View file @
21ded9ce
...
...
@@ -96,7 +96,7 @@ typedef struct {
GetBitContext
gb
;
BswapDSPContext
bdsp
;
AVFloatDSPContext
fdsp
;
AVFloatDSPContext
*
fdsp
;
FFTContext
fft
;
DECLARE_ALIGNED
(
32
,
FFTComplex
,
samples
)[
COEFFS
/
2
];
float
*
out_samples
;
...
...
@@ -256,7 +256,13 @@ static av_cold int imc_decode_init(AVCodecContext *avctx)
return
ret
;
}
ff_bswapdsp_init
(
&
q
->
bdsp
);
avpriv_float_dsp_init
(
&
q
->
fdsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
q
->
fdsp
=
avpriv_float_dsp_alloc
(
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
if
(
!
q
->
fdsp
)
{
ff_fft_end
(
&
q
->
fft
);
return
AVERROR
(
ENOMEM
);
}
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_FLTP
;
avctx
->
channel_layout
=
avctx
->
channels
==
1
?
AV_CH_LAYOUT_MONO
:
AV_CH_LAYOUT_STEREO
;
...
...
@@ -1044,7 +1050,7 @@ static int imc_decode_frame(AVCodecContext *avctx, void *data,
}
if
(
avctx
->
channels
==
2
)
{
q
->
fdsp
.
butterflies_float
((
float
*
)
frame
->
extended_data
[
0
],
q
->
fdsp
->
butterflies_float
((
float
*
)
frame
->
extended_data
[
0
],
(
float
*
)
frame
->
extended_data
[
1
],
COEFFS
);
}
...
...
@@ -1053,12 +1059,12 @@ static int imc_decode_frame(AVCodecContext *avctx, void *data,
return
IMC_BLOCK_SIZE
*
avctx
->
channels
;
}
static
av_cold
int
imc_decode_close
(
AVCodecContext
*
avctx
)
{
IMCContext
*
q
=
avctx
->
priv_data
;
ff_fft_end
(
&
q
->
fft
);
av_freep
(
&
q
->
fdsp
);
return
0
;
}
...
...
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