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
1168e29d
Commit
1168e29d
authored
12 years ago
by
Justin Ruggles
Browse files
Options
Downloads
Patches
Plain Diff
lavr: Add x86-optimized function for s16 to s32 conversion
parent
579fd87b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavresample/x86/audio_convert.asm
+23
-0
23 additions, 0 deletions
libavresample/x86/audio_convert.asm
libavresample/x86/audio_convert_init.c
+6
-0
6 additions, 0 deletions
libavresample/x86/audio_convert_init.c
with
29 additions
and
0 deletions
libavresample/x86/audio_convert.asm
+
23
−
0
View file @
1168e29d
;******************************************************************************
;******************************************************************************
;* x86 optimized Format Conversion Utils
;* x86 optimized Format Conversion Utils
;* Copyright (c) 2008 Loren Merritt
;* Copyright (c) 2008 Loren Merritt
;* Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com>
;*
;*
;* This file is part of Libav.
;* This file is part of Libav.
;*
;*
...
@@ -24,6 +25,28 @@
...
@@ -24,6 +25,28 @@
SECTION
_TEXT
SECTION
_TEXT
;------------------------------------------------------------------------------
; void ff_conv_s16_to_s32(int32_t *dst, const int16_t *src, int len);
;------------------------------------------------------------------------------
INIT_XMM
ss
e2
cglobal
conv_s16_to_s32
,
3
,
3
,
3
,
ds
t
,
src
,
len
lea
lenq
,
[
2
*
lend
]
lea
ds
tq
,
[
ds
tq
+
2
*
lenq
]
add
srcq
,
lenq
neg
lenq
.loop:
mova
m2
,
[
srcq
+
lenq
]
pxor
m0
,
m0
pxor
m1
,
m1
punpcklwd
m0
,
m2
punpckhwd
m1
,
m2
mova
[
ds
tq
+
2
*
lenq
],
m0
mova
[
ds
tq
+
2
*
lenq
+
mmsize
],
m1
add
lenq
,
mmsize
jl
.loop
REP_RET
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
; void ff_conv_fltp_to_flt_6ch(float *dst, float *const *src, int len,
; void ff_conv_fltp_to_flt_6ch(float *dst, float *const *src, int len,
; int channels);
; int channels);
...
...
This diff is collapsed.
Click to expand it.
libavresample/x86/audio_convert_init.c
+
6
−
0
View file @
1168e29d
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
#include
"libavutil/cpu.h"
#include
"libavutil/cpu.h"
#include
"libavresample/audio_convert.h"
#include
"libavresample/audio_convert.h"
extern
void
ff_conv_s16_to_s32_sse2
(
int16_t
*
dst
,
const
int32_t
*
src
,
int
len
);
extern
void
ff_conv_fltp_to_flt_6ch_mmx
(
float
*
dst
,
float
*
const
*
src
,
int
len
);
extern
void
ff_conv_fltp_to_flt_6ch_mmx
(
float
*
dst
,
float
*
const
*
src
,
int
len
);
extern
void
ff_conv_fltp_to_flt_6ch_sse4
(
float
*
dst
,
float
*
const
*
src
,
int
len
);
extern
void
ff_conv_fltp_to_flt_6ch_sse4
(
float
*
dst
,
float
*
const
*
src
,
int
len
);
extern
void
ff_conv_fltp_to_flt_6ch_avx
(
float
*
dst
,
float
*
const
*
src
,
int
len
);
extern
void
ff_conv_fltp_to_flt_6ch_avx
(
float
*
dst
,
float
*
const
*
src
,
int
len
);
...
@@ -43,5 +45,9 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
...
@@ -43,5 +45,9 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_FLT
,
AV_SAMPLE_FMT_FLTP
,
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_FLT
,
AV_SAMPLE_FMT_FLTP
,
6
,
16
,
4
,
"AVX"
,
ff_conv_fltp_to_flt_6ch_avx
);
6
,
16
,
4
,
"AVX"
,
ff_conv_fltp_to_flt_6ch_avx
);
}
}
if
(
mm_flags
&
AV_CPU_FLAG_SSE2
&&
HAVE_SSE
)
{
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_S32
,
AV_SAMPLE_FMT_S16
,
0
,
16
,
8
,
"SSE2"
,
ff_conv_s16_to_s32_sse2
);
}
#endif
#endif
}
}
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