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
d9c981cf
Commit
d9c981cf
authored
Dec 05, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/stream_out/transcode.c: proper order for downmixed channels.
parent
b4b9f772
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+13
-2
No files found.
modules/stream_out/transcode.c
View file @
d9c981cf
...
...
@@ -2,7 +2,7 @@
* transcode.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: transcode.c,v 1.5
7 2003/11/30 22:47:55
gbazin Exp $
* $Id: transcode.c,v 1.5
8 2003/12/05 00:03:54
gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -891,6 +891,16 @@ static int transcode_audio_ffmpeg_process( sout_stream_t *p_stream,
{
int
i
,
j
;
/* This is for liba52 which is what ffmpeg uses to decode ac3 */
static
const
int
translation
[
7
][
6
]
=
{{
0
,
0
,
0
,
0
,
0
,
0
},
/* 0 channels (rarely used) */
{
0
,
0
,
0
,
0
,
0
,
0
},
/* 1 ch */
{
0
,
1
,
0
,
0
,
0
,
0
},
/* 2 */
{
1
,
2
,
0
,
0
,
0
,
0
},
/* 3 */
{
1
,
3
,
2
,
0
,
0
,
0
},
/* 4 */
{
1
,
3
,
4
,
2
,
0
,
0
},
/* 5 */
{
1
,
3
,
4
,
5
,
2
,
0
}};
/* 6 */
/* dumb downmixing */
for
(
i
=
0
;
i
<
aout_buf
.
i_nb_samples
;
i
++
)
{
...
...
@@ -898,7 +908,8 @@ static int transcode_audio_ffmpeg_process( sout_stream_t *p_stream,
for
(
j
=
0
;
j
<
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
;
j
++
)
{
p_buffer
[
i
*
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
+
j
]
=
p_buffer
[
i
*
id
->
f_src
.
audio
.
i_channels
+
j
];
p_buffer
[
i
*
id
->
f_src
.
audio
.
i_channels
+
translation
[
id
->
f_src
.
audio
.
i_channels
][
j
]];
}
}
aout_buf
.
i_nb_bytes
=
i
*
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
*
2
;
...
...
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