Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
dbbb4fad
Commit
dbbb4fad
authored
Dec 19, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: drop support for U16B, U16L and S16I
parent
a944af6d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
113 deletions
+14
-113
modules/audio_filter/channel_mixer/remap.c
modules/audio_filter/channel_mixer/remap.c
+0
-5
modules/audio_filter/converter/endian.c
modules/audio_filter/converter/endian.c
+0
-16
modules/audio_filter/converter/format.c
modules/audio_filter/converter/format.c
+0
-47
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+2
-11
modules/audio_output/file.c
modules/audio_output/file.c
+3
-12
modules/audio_output/oss.c
modules/audio_output/oss.c
+4
-8
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+2
-5
modules/audio_output/sndio.c
modules/audio_output/sndio.c
+3
-9
No files found.
modules/audio_filter/channel_mixer/remap.c
View file @
dbbb4fad
...
...
@@ -215,7 +215,6 @@ static void RemapAdd##name( filter_t *p_filter, \
}
DEFINE_REMAP
(
S16N
,
int16_t
)
DEFINE_REMAP
(
U16N
,
uint16_t
)
DEFINE_REMAP
(
S32N
,
int32_t
)
DEFINE_REMAP
(
FL32
,
float
)
DEFINE_REMAP
(
FL64
,
double
)
...
...
@@ -230,8 +229,6 @@ static inline remap_fun_t GetRemapFun( audio_format_t *p_format, bool b_add )
{
case
VLC_CODEC_S16N
:
return
RemapAddS16N
;
case
VLC_CODEC_U16N
:
return
RemapAddU16N
;
case
VLC_CODEC_S32N
:
return
RemapAddS32N
;
case
VLC_CODEC_FL32
:
...
...
@@ -246,8 +243,6 @@ static inline remap_fun_t GetRemapFun( audio_format_t *p_format, bool b_add )
{
case
VLC_CODEC_S16N
:
return
RemapCopyS16N
;
case
VLC_CODEC_U16N
:
return
RemapCopyU16N
;
case
VLC_CODEC_S32N
:
return
RemapCopyS32N
;
case
VLC_CODEC_FL32
:
...
...
modules/audio_filter/converter/endian.c
View file @
dbbb4fad
...
...
@@ -44,17 +44,6 @@ vlc_module_begin()
set_callbacks
(
Open
,
NULL
)
vlc_module_end
()
static
block_t
*
Filter16
(
filter_t
*
filter
,
block_t
*
block
)
{
uint16_t
*
data
=
(
uint16_t
*
)
block
->
p_buffer
;
for
(
size_t
i
=
0
;
i
<
block
->
i_buffer
/
2
;
i
++
)
data
[
i
]
=
bswap16
(
data
[
i
]);
(
void
)
filter
;
return
block
;
}
static
block_t
*
Filter24
(
filter_t
*
filter
,
block_t
*
block
)
{
uint8_t
*
data
=
(
uint8_t
*
)
block
->
p_buffer
;
...
...
@@ -94,10 +83,8 @@ static block_t *Filter64(filter_t *filter, block_t *block)
static
const
vlc_fourcc_t
list
[][
2
]
=
{
{
VLC_CODEC_F64B
,
VLC_CODEC_F64L
},
{
VLC_CODEC_F32B
,
VLC_CODEC_F32L
},
{
VLC_CODEC_S16B
,
VLC_CODEC_S16L
},
{
VLC_CODEC_S24B
,
VLC_CODEC_S24L
},
{
VLC_CODEC_S32B
,
VLC_CODEC_S32L
},
{
VLC_CODEC_S16B
,
VLC_CODEC_S16L
},
{
VLC_CODEC_S24B
,
VLC_CODEC_S24L
},
{
VLC_CODEC_S32B
,
VLC_CODEC_S32L
},
};
...
...
@@ -128,9 +115,6 @@ static int Open(vlc_object_t *object)
ok:
switch
(
src
->
i_bitspersample
)
{
case
16
:
filter
->
pf_audio_filter
=
Filter16
;
break
;
case
24
:
filter
->
pf_audio_filter
=
Filter24
;
break
;
...
...
modules/audio_filter/converter/format.c
View file @
dbbb4fad
...
...
@@ -190,40 +190,6 @@ static block_t *S16toU8(filter_t *filter, block_t *b)
return
b
;
}
static
block_t
*
U16toU8
(
filter_t
*
filter
,
block_t
*
b
)
{
VLC_UNUSED
(
filter
);
uint16_t
*
src
=
(
uint16_t
*
)
b
->
p_buffer
;
uint8_t
*
dst
=
(
uint8_t
*
)
src
;
for
(
int
i
=
b
->
i_buffer
/
2
;
i
--
;)
*
dst
++
=
(
*
src
++
)
>>
8
;
b
->
i_buffer
/=
2
;
return
b
;
}
static
block_t
*
S16toU16
(
filter_t
*
filter
,
block_t
*
b
)
{
VLC_UNUSED
(
filter
);
int16_t
*
src
=
(
int16_t
*
)
b
->
p_buffer
;
uint16_t
*
dst
=
(
uint16_t
*
)
src
;
for
(
int
i
=
b
->
i_buffer
/
2
;
i
--
;)
*
dst
++
=
(
*
src
++
)
+
32768
;
return
b
;
}
static
block_t
*
U16toS16
(
filter_t
*
filter
,
block_t
*
b
)
{
VLC_UNUSED
(
filter
);
uint16_t
*
src
=
(
uint16_t
*
)
b
->
p_buffer
;
int16_t
*
dst
=
(
int16_t
*
)
src
;
for
(
int
i
=
b
->
i_buffer
/
2
;
i
--
;)
*
dst
++
=
(
int
)(
*
src
++
)
-
32768
;
return
b
;
}
static
block_t
*
S24toS16
(
filter_t
*
filter
,
block_t
*
b
)
{
VLC_UNUSED
(
filter
);
...
...
@@ -339,14 +305,6 @@ static block_t *Fi32toS16(filter_t *filter, block_t *b)
}
/* */
static
void
X8toX16
(
block_t
*
bdst
,
const
block_t
*
bsrc
)
{
uint8_t
*
src
=
(
uint8_t
*
)
bsrc
->
p_buffer
;
uint16_t
*
dst
=
(
uint16_t
*
)
bdst
->
p_buffer
;
for
(
int
i
=
bsrc
->
i_buffer
;
i
--
;)
*
dst
++
=
(
*
src
++
)
<<
8
;
}
static
void
U8toS16
(
block_t
*
bdst
,
const
block_t
*
bsrc
)
{
uint8_t
*
src
=
(
uint8_t
*
)
bsrc
->
p_buffer
;
...
...
@@ -428,10 +386,6 @@ static const struct {
{
VLC_CODEC_FL32
,
VLC_CODEC_S16N
,
Fl32toS16
},
{
VLC_CODEC_S16N
,
VLC_CODEC_U8
,
S16toU8
},
{
VLC_CODEC_S16N
,
VLC_CODEC_U16N
,
S16toU16
},
{
VLC_CODEC_U16N
,
VLC_CODEC_U8
,
U16toU8
},
{
VLC_CODEC_U16N
,
VLC_CODEC_S16N
,
U16toS16
},
{
0
,
0
,
NULL
}
};
...
...
@@ -447,7 +401,6 @@ static const struct {
{
VLC_CODEC_S16N
,
VLC_CODEC_S32N
,
S16toS32
},
{
VLC_CODEC_S16N
,
VLC_CODEC_FL32
,
S16toFl32
},
{
VLC_CODEC_U8
,
VLC_CODEC_U16N
,
X8toX16
},
{
VLC_CODEC_U8
,
VLC_CODEC_S16N
,
U8toS16
},
{
0
,
0
,
NULL
}
};
...
...
modules/audio_output/alsa.c
View file @
dbbb4fad
...
...
@@ -336,17 +336,8 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
case
VLC_CODEC_U24L
:
pcm_format
=
SND_PCM_FORMAT_U24_3LE
;
break
;
case
VLC_CODEC_S16B
:
pcm_format
=
SND_PCM_FORMAT_S16_BE
;
break
;
case
VLC_CODEC_S16L
:
pcm_format
=
SND_PCM_FORMAT_S16_LE
;
break
;
case
VLC_CODEC_U16B
:
pcm_format
=
SND_PCM_FORMAT_U16_BE
;
break
;
case
VLC_CODEC_U16L
:
pcm_format
=
SND_PCM_FORMAT_U16_LE
;
case
VLC_CODEC_S16N
:
pcm_format
=
SND_PCM_FORMAT_S16
;
break
;
case
VLC_CODEC_U8
:
pcm_format
=
SND_PCM_FORMAT_U8
;
...
...
modules/audio_output/file.c
View file @
dbbb4fad
...
...
@@ -87,17 +87,9 @@ static void Flush ( audio_output_t *, bool );
#define WAV_LONGTEXT N_("Instead of writing a raw file, you can add a WAV " \
"header to the file.")
static
const
char
*
const
format_list
[]
=
{
"u8"
,
"u16"
,
"s16"
,
"u16_le"
,
"s16_le"
,
"u16_be"
,
"s16_be"
,
"float32"
,
"spdif"
};
static
const
int
format_int
[]
=
{
VLC_CODEC_U8
,
VLC_CODEC_U16N
,
VLC_CODEC_S16N
,
VLC_CODEC_U16L
,
VLC_CODEC_S16L
,
VLC_CODEC_U16B
,
VLC_CODEC_S16B
,
VLC_CODEC_F32L
,
VLC_CODEC_SPDIFL
};
static
const
char
*
const
format_list
[]
=
{
"u8"
,
"s16"
,
"float32"
,
"spdif"
};
static
const
int
format_int
[]
=
{
VLC_CODEC_U8
,
VLC_CODEC_S16N
,
VLC_CODEC_F32L
,
VLC_CODEC_SPDIFL
};
#define FILE_TEXT N_("Output file")
#define FILE_LONGTEXT N_("File to which the audio samples will be written to. (\"-\" for stdout")
...
...
@@ -217,7 +209,6 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
wh
->
Format
=
WAVE_FORMAT_PCM
;
wh
->
BitsPerSample
=
8
;
break
;
case
VLC_CODEC_S16L
:
default:
wh
->
Format
=
WAVE_FORMAT_PCM
;
wh
->
BitsPerSample
=
16
;
...
...
modules/audio_output/oss.c
View file @
dbbb4fad
...
...
@@ -124,11 +124,8 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
case
VLC_CODEC_S32L
:
format
=
AFMT_S32_LE
;
break
;
case
VLC_CODEC_S16B
:
format
=
AFMT_S16_BE
;
break
;
case
VLC_CODEC_S16L
:
format
=
AFMT_S16_LE
;
case
VLC_CODEC_S16N
:
format
=
AFMT_S16
;
break
;
case
VLC_CODEC_U8
:
format
=
AFMT_U8
;
...
...
@@ -154,9 +151,8 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
switch
(
format
)
{
case
AFMT_U8
:
fmt
->
i_format
=
VLC_CODEC_U8
;
break
;
case
AFMT_S16_BE
:
fmt
->
i_format
=
VLC_CODEC_S16B
;
break
;
case
AFMT_S16_LE
:
fmt
->
i_format
=
VLC_CODEC_S16L
;
break
;
case
AFMT_U8
:
fmt
->
i_format
=
VLC_CODEC_U8
;
break
;
case
AFMT_S16
:
fmt
->
i_format
=
VLC_CODEC_S16N
;
break
;
//case AFMT_S24_BE:
//case AFMT_S24_LE:
case
AFMT_S32_BE
:
fmt
->
i_format
=
VLC_CODEC_S32B
;
break
;
...
...
modules/audio_output/pulse.c
View file @
dbbb4fad
...
...
@@ -676,11 +676,8 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
case
VLC_CODEC_S24L
:
ss
.
format
=
PA_SAMPLE_S24LE
;
break
;
case
VLC_CODEC_S16B
:
ss
.
format
=
PA_SAMPLE_S16BE
;
break
;
case
VLC_CODEC_S16L
:
ss
.
format
=
PA_SAMPLE_S16LE
;
case
VLC_CODEC_S16N
:
ss
.
format
=
PA_SAMPLE_S16NE
;
break
;
case
VLC_CODEC_U8
:
ss
.
format
=
PA_SAMPLE_U8
;
...
...
modules/audio_output/sndio.c
View file @
dbbb4fad
...
...
@@ -122,19 +122,13 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
fmt
->
i_format
=
VLC_CODEC_U8
;
break
;
case
16
:
fmt
->
i_format
=
par
.
sig
?
(
par
.
le
?
VLC_CODEC_S16L
:
VLC_CODEC_S16B
)
:
(
par
.
le
?
VLC_CODEC_U16L
:
VLC_CODEC_U16B
);
fmt
->
i_format
=
VLC_CODEC_S16N
;
break
;
case
24
:
fmt
->
i_format
=
par
.
sig
?
(
par
.
le
?
VLC_CODEC_S24L
:
VLC_CODEC_S24B
)
:
(
par
.
le
?
VLC_CODEC_U24L
:
VLC_CODEC_U24B
);
fmt
->
i_format
=
VLC_CODEC_S24N
;
break
;
case
32
:
fmt
->
i_format
=
par
.
sig
?
(
par
.
le
?
VLC_CODEC_S32L
:
VLC_CODEC_S32B
)
:
(
par
.
le
?
VLC_CODEC_U32L
:
VLC_CODEC_U32B
);
fmt
->
i_format
=
VLC_CODEC_S32N
;
break
;
default:
msg_Err
(
obj
,
"unsupported audio sample format (%u bits)"
,
...
...
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