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
efec2d7b
Commit
efec2d7b
authored
Apr 05, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Template alsa reordering functions.
parent
9c09dead
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
32 deletions
+37
-32
alsa-audio-common.c
libavdevice/alsa-audio-common.c
+37
-32
No files found.
libavdevice/alsa-audio-common.c
View file @
efec2d7b
...
...
@@ -43,42 +43,47 @@ static av_cold snd_pcm_format_t codec_id_to_pcm_format(int codec_id)
}
}
static
void
alsa_reorder_s16_out_51
(
const
void
*
in_v
,
void
*
out_v
,
int
n
)
{
const
int16_t
*
in
=
in_v
;
int16_t
*
out
=
out_v
;
while
(
n
--
>
0
)
{
out
[
0
]
=
in
[
0
];
out
[
1
]
=
in
[
1
];
out
[
2
]
=
in
[
4
];
out
[
3
]
=
in
[
5
];
out
[
4
]
=
in
[
2
];
out
[
5
]
=
in
[
3
];
in
+=
6
;
out
+=
6
;
}
#define REORDER_OUT_51(NAME, TYPE) \
static void alsa_reorder_ ## NAME ## _out_51(const void *in_v, void *out_v, int n) \
{ \
const TYPE *in = in_v; \
TYPE * out = out_v; \
\
while (n-- > 0) { \
out[0] = in[0]; \
out[1] = in[1]; \
out[2] = in[4]; \
out[3] = in[5]; \
out[4] = in[2]; \
out[5] = in[3]; \
in += 6; \
out += 6; \
} \
}
static
void
alsa_reorder_s16_out_71
(
const
void
*
in_v
,
void
*
out_v
,
int
n
)
{
const
int16_t
*
in
=
in_v
;
int16_t
*
out
=
out_v
;
while
(
n
--
>
0
)
{
out
[
0
]
=
in
[
0
];
out
[
1
]
=
in
[
1
];
out
[
2
]
=
in
[
4
];
out
[
3
]
=
in
[
5
];
out
[
4
]
=
in
[
2
];
out
[
5
]
=
in
[
3
];
out
[
6
]
=
in
[
6
];
out
[
7
]
=
in
[
7
];
in
+=
8
;
out
+=
8
;
}
#define REORDER_OUT_71(NAME, TYPE) \
static void alsa_reorder_ ## NAME ## _out_71(const void *in_v, void *out_v, int n) \
{ \
const TYPE *in = in_v; \
TYPE * out = out_v; \
\
while (n-- > 0) { \
out[0] = in[0]; \
out[1] = in[1]; \
out[2] = in[4]; \
out[3] = in[5]; \
out[4] = in[2]; \
out[5] = in[3]; \
out[6] = in[6]; \
out[7] = in[7]; \
in += 8; \
out += 8; \
} \
}
REORDER_OUT_51
(
s16
,
int16_t
)
REORDER_OUT_71
(
s16
,
int16_t
)
#define REORDER_DUMMY ((void *)1)
static
av_cold
ff_reorder_func
find_reorder_func
(
int
codec_id
,
...
...
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