Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
8bce5c8e
Commit
8bce5c8e
authored
10 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
avcodec/ac3dec: Use avpriv_float_dsp_alloc()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
17b7f99d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/ac3dec.c
+3
-5
3 additions, 5 deletions
libavcodec/ac3dec.c
libavcodec/ac3dec.h
+1
-1
1 addition, 1 deletion
libavcodec/ac3dec.h
with
4 additions
and
6 deletions
libavcodec/ac3dec.c
+
3
−
5
View file @
8bce5c8e
...
@@ -195,7 +195,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
...
@@ -195,7 +195,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
#if (USE_FIXED)
#if (USE_FIXED)
s
->
fdsp
=
avpriv_alloc_fixed_dsp
(
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
s
->
fdsp
=
avpriv_alloc_fixed_dsp
(
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
#else
#else
avpriv_float_dsp_
init
(
&
s
->
fdsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
s
->
fdsp
=
avpriv_float_dsp_
alloc
(
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
#endif
#endif
ff_ac3dsp_init
(
&
s
->
ac3dsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
ff_ac3dsp_init
(
&
s
->
ac3dsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
...
@@ -688,7 +688,7 @@ static inline void do_imdct(AC3DecodeContext *s, int channels)
...
@@ -688,7 +688,7 @@ static inline void do_imdct(AC3DecodeContext *s, int channels)
s
->
fdsp
->
vector_fmul_window_scaled
(
s
->
outptr
[
ch
-
1
],
s
->
delay
[
ch
-
1
],
s
->
fdsp
->
vector_fmul_window_scaled
(
s
->
outptr
[
ch
-
1
],
s
->
delay
[
ch
-
1
],
s
->
tmp_output
,
s
->
window
,
128
,
8
);
s
->
tmp_output
,
s
->
window
,
128
,
8
);
#else
#else
s
->
fdsp
.
vector_fmul_window
(
s
->
outptr
[
ch
-
1
],
s
->
delay
[
ch
-
1
],
s
->
fdsp
->
vector_fmul_window
(
s
->
outptr
[
ch
-
1
],
s
->
delay
[
ch
-
1
],
s
->
tmp_output
,
s
->
window
,
128
);
s
->
tmp_output
,
s
->
window
,
128
);
#endif
#endif
for
(
i
=
0
;
i
<
128
;
i
++
)
for
(
i
=
0
;
i
<
128
;
i
++
)
...
@@ -700,7 +700,7 @@ static inline void do_imdct(AC3DecodeContext *s, int channels)
...
@@ -700,7 +700,7 @@ static inline void do_imdct(AC3DecodeContext *s, int channels)
s
->
fdsp
->
vector_fmul_window_scaled
(
s
->
outptr
[
ch
-
1
],
s
->
delay
[
ch
-
1
],
s
->
fdsp
->
vector_fmul_window_scaled
(
s
->
outptr
[
ch
-
1
],
s
->
delay
[
ch
-
1
],
s
->
tmp_output
,
s
->
window
,
128
,
8
);
s
->
tmp_output
,
s
->
window
,
128
,
8
);
#else
#else
s
->
fdsp
.
vector_fmul_window
(
s
->
outptr
[
ch
-
1
],
s
->
delay
[
ch
-
1
],
s
->
fdsp
->
vector_fmul_window
(
s
->
outptr
[
ch
-
1
],
s
->
delay
[
ch
-
1
],
s
->
tmp_output
,
s
->
window
,
128
);
s
->
tmp_output
,
s
->
window
,
128
);
#endif
#endif
memcpy
(
s
->
delay
[
ch
-
1
],
s
->
tmp_output
+
128
,
128
*
sizeof
(
FFTSample
));
memcpy
(
s
->
delay
[
ch
-
1
],
s
->
tmp_output
+
128
,
128
*
sizeof
(
FFTSample
));
...
@@ -1635,9 +1635,7 @@ static av_cold int ac3_decode_end(AVCodecContext *avctx)
...
@@ -1635,9 +1635,7 @@ static av_cold int ac3_decode_end(AVCodecContext *avctx)
AC3DecodeContext
*
s
=
avctx
->
priv_data
;
AC3DecodeContext
*
s
=
avctx
->
priv_data
;
ff_mdct_end
(
&
s
->
imdct_512
);
ff_mdct_end
(
&
s
->
imdct_512
);
ff_mdct_end
(
&
s
->
imdct_256
);
ff_mdct_end
(
&
s
->
imdct_256
);
#if (USE_FIXED)
av_freep
(
&
s
->
fdsp
);
av_freep
(
&
s
->
fdsp
);
#endif
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
libavcodec/ac3dec.h
+
1
−
1
View file @
8bce5c8e
...
@@ -218,7 +218,7 @@ typedef struct AC3DecodeContext {
...
@@ -218,7 +218,7 @@ typedef struct AC3DecodeContext {
#if USE_FIXED
#if USE_FIXED
AVFixedDSPContext
*
fdsp
;
AVFixedDSPContext
*
fdsp
;
#else
#else
AVFloatDSPContext
fdsp
;
AVFloatDSPContext
*
fdsp
;
#endif
#endif
AC3DSPContext
ac3dsp
;
AC3DSPContext
ac3dsp
;
FmtConvertContext
fmt_conv
;
///< optimized conversion functions
FmtConvertContext
fmt_conv
;
///< optimized conversion functions
...
...
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