Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
128f5ba7
Commit
128f5ba7
authored
Jan 22, 2003
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverse stereo option.
parent
dba14611
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
20 deletions
+68
-20
include/audio_output.h
include/audio_output.h
+2
-1
modules/audio_filter/channel_mixer/trivial.c
modules/audio_filter/channel_mixer/trivial.c
+12
-1
modules/audio_filter/converter/a52tofloat32.c
modules/audio_filter/converter/a52tofloat32.c
+23
-1
src/audio_output/common.c
src/audio_output/common.c
+21
-12
src/audio_output/output.c
src/audio_output/output.c
+10
-5
No files found.
include/audio_output.h
View file @
128f5ba7
...
...
@@ -2,7 +2,7 @@
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.h,v 1.7
4 2002/12/07 23:50:30
massiot Exp $
* $Id: audio_output.h,v 1.7
5 2003/01/22 18:31:46
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -116,6 +116,7 @@ typedef int32_t vlc_fixed_t;
/* Values available for original channels only */
#define AOUT_CHAN_DOLBYSTEREO 0x10000
#define AOUT_CHAN_DUALMONO 0x20000
#define AOUT_CHAN_REVERSESTEREO 0x40000
#define AOUT_CHAN_PHYSMASK 0xFFFF
...
...
modules/audio_filter/channel_mixer/trivial.c
View file @
128f5ba7
...
...
@@ -2,7 +2,7 @@
* trivial.c : trivial channel mixer plug-in (drops unwanted channels)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: trivial.c,v 1.
9 2003/01/14 14:51:02
massiot Exp $
* $Id: trivial.c,v 1.
10 2003/01/22 18:31:47
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -134,6 +134,17 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
p_src
+=
2
;
}
}
else
if
(
p_filter
->
output
.
i_original_channels
&
AOUT_CHAN_REVERSESTEREO
)
{
/* Reverse-stereo mode */
for
(
i
=
p_in_buf
->
i_nb_samples
;
i
-=
2
;
)
{
*
p_dest
++
=
p_src
[
1
];
*
p_dest
++
=
p_src
[
0
];
p_src
+=
2
;
}
}
else
{
/* Fake-stereo mode */
...
...
modules/audio_filter/converter/a52tofloat32.c
View file @
128f5ba7
...
...
@@ -4,7 +4,7 @@
* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: a52tofloat32.c,v 1.1
1 2003/01/22 09:54:28
massiot Exp $
* $Id: a52tofloat32.c,v 1.1
2 2003/01/22 18:31:47
massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -278,6 +278,22 @@ static void Duplicate( float * p_out, const float * p_in )
}
}
/*****************************************************************************
* Exchange: helper function to exchange left & right channels
*****************************************************************************/
static
void
Exchange
(
float
*
p_out
,
const
float
*
p_in
)
{
int
i
;
const
float
*
p_first
=
p_in
+
256
;
const
float
*
p_second
=
p_in
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
*
p_out
++
=
*
p_first
++
;
*
p_out
++
=
*
p_second
++
;
}
}
/*****************************************************************************
* DoWork: decode an ATSC A/52 frame.
*****************************************************************************/
...
...
@@ -331,6 +347,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
Duplicate
(
(
float
*
)(
p_out_buf
->
p_buffer
+
i
*
i_bytes_per_block
),
p_samples
);
}
else
if
(
p_filter
->
output
.
i_original_channels
&
AOUT_CHAN_REVERSESTEREO
)
{
Exchange
(
(
float
*
)(
p_out_buf
->
p_buffer
+
i
*
i_bytes_per_block
),
p_samples
);
}
else
{
/* Interleave the *$% samples. */
...
...
src/audio_output/common.c
View file @
128f5ba7
...
...
@@ -2,7 +2,7 @@
* common.c : audio output management of common data structures
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: common.c,v 1.1
4 2003/01/20 10:59:29
massiot Exp $
* $Id: common.c,v 1.1
5 2003/01/22 18:31:47
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -166,17 +166,26 @@ const char * aout_FormatPrintChannels( const audio_sample_format_t * p_format )
return
"Left"
;
return
"Right"
;
case
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
:
if
(
p_format
->
i_original_channels
&
AOUT_CHAN_DOLBYSTEREO
)
return
"Dolby"
;
else
if
(
p_format
->
i_original_channels
&
AOUT_CHAN_DUALMONO
)
return
"Dual-mono"
;
else
if
(
p_format
->
i_original_channels
==
AOUT_CHAN_CENTER
)
return
"Stereo/Mono"
;
else
if
(
!
(
p_format
->
i_original_channels
&
AOUT_CHAN_RIGHT
)
)
return
"Stereo/Left"
;
else
if
(
!
(
p_format
->
i_original_channels
&
AOUT_CHAN_LEFT
)
)
return
"Stereo/Right"
;
return
"Stereo"
;
if
(
p_format
->
i_original_channels
&
AOUT_CHAN_REVERSESTEREO
)
{
if
(
p_format
->
i_original_channels
&
AOUT_CHAN_DOLBYSTEREO
)
return
"Dolby/Reverse"
;
return
"Stereo/Reverse"
;
}
else
{
if
(
p_format
->
i_original_channels
&
AOUT_CHAN_DOLBYSTEREO
)
return
"Dolby"
;
else
if
(
p_format
->
i_original_channels
&
AOUT_CHAN_DUALMONO
)
return
"Dual-mono"
;
else
if
(
p_format
->
i_original_channels
==
AOUT_CHAN_CENTER
)
return
"Stereo/Mono"
;
else
if
(
!
(
p_format
->
i_original_channels
&
AOUT_CHAN_RIGHT
)
)
return
"Stereo/Left"
;
else
if
(
!
(
p_format
->
i_original_channels
&
AOUT_CHAN_LEFT
)
)
return
"Stereo/Right"
;
return
"Stereo"
;
}
case
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
:
return
"3F"
;
case
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_REARCENTER
:
...
...
src/audio_output/output.c
View file @
128f5ba7
...
...
@@ -2,7 +2,7 @@
* output.c : internal management of output streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: output.c,v 1.3
0 2003/01/22 09:54:29
massiot Exp $
* $Id: output.c,v 1.3
1 2003/01/22 18:31:47
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -69,7 +69,12 @@ int aout_OutputNew( aout_instance_t * p_aout,
/* The user may have selected a different channels configuration. */
var_Get
(
p_aout
,
"audio-channels"
,
&
val
);
if
(
!
strcmp
(
val
.
psz_string
,
N_
(
"Both"
)
)
)
if
(
!
strcmp
(
val
.
psz_string
,
N_
(
"Reverse stereo"
)
)
)
{
p_aout
->
output
.
output
.
i_original_channels
|=
AOUT_CHAN_REVERSESTEREO
;
}
else
if
(
!
strcmp
(
val
.
psz_string
,
N_
(
"Both"
)
)
)
{
p_aout
->
output
.
output
.
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
;
...
...
@@ -113,9 +118,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
NULL
);
}
else
if
(
p_aout
->
output
.
output
.
i_physical_channels
==
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
)
&&
(
p_aout
->
output
.
output
.
i_original_channels
&
AOUT_CHAN_PHYSMASK
)
==
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
)
)
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
)
)
{
/* Stereo - create the audio-channels variable. */
var_Create
(
p_aout
,
"audio-channels"
,
VLC_VAR_STRING
|
VLC_VAR_HASCHOICE
);
...
...
@@ -132,6 +135,8 @@ int aout_OutputNew( aout_instance_t * p_aout,
var_Change
(
p_aout
,
"audio-channels"
,
VLC_VAR_ADDCHOICE
,
&
val
);
val
.
psz_string
=
N_
(
"Right"
);
var_Change
(
p_aout
,
"audio-channels"
,
VLC_VAR_ADDCHOICE
,
&
val
);
val
.
psz_string
=
N_
(
"Reverse stereo"
);
var_Change
(
p_aout
,
"audio-channels"
,
VLC_VAR_ADDCHOICE
,
&
val
);
var_AddCallback
(
p_aout
,
"audio-channels"
,
aout_ChannelsRestart
,
NULL
);
}
...
...
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