Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
5ff7862f
Commit
5ff7862f
authored
Dec 19, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: drop remnants of foreign endian support (refs #7764)
Endianess is now converted by the raw decoder/encoder.
parent
d95e65c6
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
171 deletions
+5
-171
modules/audio_filter/Modules.am
modules/audio_filter/Modules.am
+0
-2
modules/audio_filter/converter/endian.c
modules/audio_filter/converter/endian.c
+0
-79
po/POTFILES.in
po/POTFILES.in
+0
-1
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+1
-2
src/audio_output/common.c
src/audio_output/common.c
+0
-40
src/audio_output/filters.c
src/audio_output/filters.c
+4
-47
No files found.
modules/audio_filter/Modules.am
View file @
5ff7862f
...
...
@@ -51,12 +51,10 @@ SOURCES_a52tofloat32 = converter/a52tofloat32.c
SOURCES_dtstospdif = converter/dtstospdif.c
SOURCES_dtstofloat32 = converter/dtstofloat32.c
SOURCES_mpgatofixed32 = converter/mpgatofixed32.c
SOURCES_audio_endian = converter/endian.c
SOURCES_audio_format = converter/format.c
libvlc_LTLIBRARIES += \
liba52tospdif_plugin.la \
libaudio_endian_plugin.la \
libaudio_format_plugin.la \
libdtstospdif_plugin.la
...
...
modules/audio_filter/converter/endian.c
deleted
100644 → 0
View file @
d95e65c6
/*****************************************************************************
* endian.c : PCM endian converter
*****************************************************************************
* Copyright (C) 2002-2005 VLC authors and VideoLAN
* Copyright (C) 2010 Laurent Aimar
* Copyright (C) 2012 Rémi Denis-Courmont
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gildas Bazin <gbazin@videolan.org>
* Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_aout.h>
#include <vlc_block.h>
#include <vlc_filter.h>
static
int
Open
(
vlc_object_t
*
);
vlc_module_begin
()
set_description
(
N_
(
"Audio filter for endian conversion"
))
set_category
(
CAT_AUDIO
)
set_subcategory
(
SUBCAT_AUDIO_MISC
)
set_capability
(
"audio converter"
,
2
)
set_callbacks
(
Open
,
NULL
)
vlc_module_end
()
static
const
vlc_fourcc_t
list
[][
2
]
=
{
};
static
int
Open
(
vlc_object_t
*
object
)
{
filter_t
*
filter
=
(
filter_t
*
)
object
;
const
audio_sample_format_t
*
src
=
&
filter
->
fmt_in
.
audio
;
const
audio_sample_format_t
*
dst
=
&
filter
->
fmt_out
.
audio
;
if
(
!
AOUT_FMTS_SIMILAR
(
src
,
dst
))
return
VLC_EGENERIC
;
for
(
size_t
i
=
0
;
i
<
sizeof
(
list
)
/
sizeof
(
list
[
0
]);
i
++
)
{
if
(
src
->
i_format
==
list
[
i
][
0
])
{
if
(
dst
->
i_format
==
list
[
i
][
1
])
goto
ok
;
break
;
}
if
(
src
->
i_format
==
list
[
i
][
1
])
{
if
(
dst
->
i_format
==
list
[
i
][
0
])
goto
ok
;
break
;
}
}
return
VLC_EGENERIC
;
ok:
switch
(
src
->
i_bitspersample
)
{
}
return
VLC_SUCCESS
;
}
po/POTFILES.in
View file @
5ff7862f
...
...
@@ -295,7 +295,6 @@ modules/audio_filter/converter/a52tofloat32.c
modules/audio_filter/converter/a52tospdif.c
modules/audio_filter/converter/dtstofloat32.c
modules/audio_filter/converter/dtstospdif.c
modules/audio_filter/converter/endian.c
modules/audio_filter/converter/format.c
modules/audio_filter/converter/mpgatofixed32.c
modules/audio_filter/equalizer.c
...
...
src/audio_output/aout_internal.h
View file @
5ff7862f
...
...
@@ -29,7 +29,7 @@
/* Max input rate factor (1/4 -> 4) */
# define AOUT_MAX_INPUT_RATE (4)
# define AOUT_MAX_FILTERS 1
2
# define AOUT_MAX_FILTERS 1
0
enum
{
AOUT_RESAMPLING_NONE
=
0
,
...
...
@@ -123,7 +123,6 @@ void aout_OutputDelete( audio_output_t * p_aout );
/* From common.c : */
vlc_fourcc_t
aout_NativeEndian
(
vlc_fourcc_t
);
void
aout_FormatsPrint
(
vlc_object_t
*
,
const
char
*
,
const
audio_sample_format_t
*
,
const
audio_sample_format_t
*
);
...
...
src/audio_output/common.c
View file @
5ff7862f
...
...
@@ -79,46 +79,6 @@ unsigned int aout_BitsPerSample( vlc_fourcc_t i_format )
}
}
vlc_fourcc_t
aout_NativeEndian
(
vlc_fourcc_t
i_format
)
{
switch
(
i_format
)
{
case
VLC_CODEC_F64B
:
case
VLC_CODEC_F64L
:
return
VLC_CODEC_FL64
;
case
VLC_CODEC_F32B
:
case
VLC_CODEC_F32L
:
return
VLC_CODEC_FL32
;
case
VLC_CODEC_S32B
:
case
VLC_CODEC_S32L
:
return
VLC_CODEC_S32N
;
case
VLC_CODEC_U32B
:
case
VLC_CODEC_U32L
:
return
VLC_CODEC_U32N
;
case
VLC_CODEC_S24B
:
case
VLC_CODEC_S24L
:
return
VLC_CODEC_S24N
;
case
VLC_CODEC_U24B
:
case
VLC_CODEC_U24L
:
return
VLC_CODEC_U24N
;
case
VLC_CODEC_S16B
:
case
VLC_CODEC_S16L
:
return
VLC_CODEC_S16N
;
case
VLC_CODEC_U16B
:
case
VLC_CODEC_U16L
:
return
VLC_CODEC_U16N
;
}
return
0
;
}
/*****************************************************************************
* aout_FormatPrepare : compute the number of bytes per frame & frame length
*****************************************************************************/
...
...
src/audio_output/filters.c
View file @
5ff7862f
...
...
@@ -155,32 +155,9 @@ static int aout_FiltersPipelineCreate(vlc_object_t *obj, filter_t **filters,
}
assert
(
AOUT_FMT_LINEAR
(
&
input
));
bool
same_mix
=
infmt
->
i_physical_channels
==
outfmt
->
i_physical_channels
&&
infmt
->
i_original_channels
==
outfmt
->
i_original_channels
;
/* Native endianess */
if
(
input
.
i_format
!=
outfmt
->
i_format
||
!
same_mix
)
{
vlc_fourcc_t
native
=
aout_NativeEndian
(
input
.
i_format
);
if
(
native
!=
0
&&
native
!=
input
.
i_format
)
{
if
(
n
==
max
)
goto
overflow
;
filter_t
*
f
=
TryFormat
(
obj
,
native
,
&
input
);
if
(
f
==
NULL
)
{
msg_Err
(
obj
,
"cannot find %s for conversion pipeline"
,
"native endian converter"
);
goto
error
;
}
filters
[
n
++
]
=
f
;
}
}
/* Remix channels */
if
(
!
same_mix
)
if
(
infmt
->
i_physical_channels
!=
outfmt
->
i_physical_channels
||
infmt
->
i_original_channels
!=
outfmt
->
i_original_channels
)
{
/* Remixing currently requires FL32... TODO: S16N */
if
(
input
.
i_format
!=
VLC_CODEC_FL32
)
{
...
...
@@ -242,38 +219,18 @@ static int aout_FiltersPipelineCreate(vlc_object_t *obj, filter_t **filters,
}
/* Format */
vlc_fourcc_t
native
=
aout_NativeEndian
(
outfmt
->
i_format
);
if
(
native
==
0
)
native
=
outfmt
->
i_format
;
if
(
input
.
i_format
!=
native
)
if
(
input
.
i_format
!=
outfmt
->
i_format
)
{
if
(
max
==
0
)
goto
overflow
;
filter_t
*
f
=
TryFormat
(
obj
,
native
,
&
input
);
if
(
f
==
NULL
)
{
msg_Err
(
obj
,
"cannot find %s for conversion pipeline"
,
"post-mix converter"
);
goto
error
;
}
filters
[
n
++
]
=
f
;
}
/* Foreign endianess */
if
(
native
!=
outfmt
->
i_format
)
{
if
(
n
==
max
)
goto
overflow
;
filter_t
*
f
=
TryFormat
(
obj
,
outfmt
->
i_format
,
&
input
);
if
(
f
==
NULL
)
{
msg_Err
(
obj
,
"cannot find %s for conversion pipeline"
,
"
foreign endian
converter"
);
"
post-mix
converter"
);
goto
error
;
}
filters
[
n
++
]
=
f
;
}
...
...
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