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
4b1da9cc
Commit
4b1da9cc
authored
Feb 22, 2001
by
Renaud Dartus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fix bug in ac3dec for mono streams
parent
9067002c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
44 additions
and
20 deletions
+44
-20
src/ac3_decoder/ac3_bit_stream.h
src/ac3_decoder/ac3_bit_stream.h
+4
-1
src/ac3_decoder/ac3_decoder.c
src/ac3_decoder/ac3_decoder.c
+1
-1
src/ac3_decoder/ac3_decoder_thread.c
src/ac3_decoder/ac3_decoder_thread.c
+2
-2
src/ac3_decoder/ac3_downmix.c
src/ac3_decoder/ac3_downmix.c
+2
-4
src/ac3_decoder/ac3_downmix_c.c
src/ac3_decoder/ac3_downmix_c.c
+1
-3
src/ac3_decoder/ac3_exponent.c
src/ac3_decoder/ac3_exponent.c
+8
-3
src/ac3_decoder/ac3_imdct.c
src/ac3_decoder/ac3_imdct.c
+2
-0
src/ac3_decoder/ac3_mantissa.c
src/ac3_decoder/ac3_mantissa.c
+10
-2
src/ac3_decoder/ac3_parse.c
src/ac3_decoder/ac3_parse.c
+14
-4
No files found.
src/ac3_decoder/ac3_bit_stream.h
View file @
4b1da9cc
...
...
@@ -30,8 +30,11 @@ static __inline__ u32 bitstream_get (ac3_bit_stream_t * p_bit_stream,
{
if
(
p_bit_stream
->
byte_stream
.
p_byte
>=
p_bit_stream
->
byte_stream
.
p_end
)
{
ac3dec_thread_t
*
p_ac3dec
=
p_bit_stream
->
byte_stream
.
info
;
/* no, switch to next buffer */
ac3_byte_stream_next
(
&
p_bit_stream
->
byte_stream
);
if
(
!
p_ac3dec
->
p_fifo
->
b_die
)
ac3_byte_stream_next
(
&
p_bit_stream
->
byte_stream
);
}
p_bit_stream
->
buffer
|=
((
u32
)
*
(
p_bit_stream
->
byte_stream
.
p_byte
++
))
<<
(
24
-
p_bit_stream
->
i_available
);
...
...
src/ac3_decoder/ac3_decoder.c
View file @
4b1da9cc
...
...
@@ -45,7 +45,7 @@ int ac3_init (ac3dec_t * p_ac3dec)
int
ac3_decode_frame
(
ac3dec_t
*
p_ac3dec
,
s16
*
buffer
)
{
int
i
;
if
(
parse_bsi
(
p_ac3dec
))
return
1
;
...
...
src/ac3_decoder/ac3_decoder_thread.c
View file @
4b1da9cc
...
...
@@ -2,7 +2,7 @@
* ac3_decoder_thread.c: ac3 decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: ac3_decoder_thread.c,v 1.2
5 2001/02/20 12:06:28
reno Exp $
* $Id: ac3_decoder_thread.c,v 1.2
6 2001/02/22 05:31:55
reno Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
...
...
@@ -231,7 +231,7 @@ static void RunThread (ac3dec_thread_t * p_ac3dec)
{
p_ac3dec
->
p_aout_fifo
->
date
[
p_ac3dec
->
p_aout_fifo
->
l_end_frame
]
=
LAST_MDATE
;
}
if
(
ac3_sync_frame
(
&
p_ac3dec
->
ac3_decoder
,
&
sync_info
))
{
sync
=
0
;
...
...
src/ac3_decoder/ac3_downmix.c
View file @
4b1da9cc
...
...
@@ -41,7 +41,6 @@ int __inline__ downmix (ac3dec_t * p_ac3dec, s16 * out_buf)
{
dm_par_t
dm_par
;
float
*
center
=
0
;
dm_par
.
clev
=
0
.
0
;
dm_par
.
slev
=
0
.
0
;
...
...
@@ -83,12 +82,11 @@ int __inline__ downmix (ac3dec_t * p_ac3dec, s16 * out_buf)
case
2
:
break
;
default:
// 1/0
/* FIXME
if (p_ac3dec->bsi.acmod == 1)
center = p_ac3dec->samples.channel[0];
else if (p_ac3dec->bsi.acmod == 0)
center
=
p_ac3dec
->
samples
.
channel
[
0
];
/* FIXME */
stream_sample_1ch_to_s16_c
(
out_buf
,
center
);
center = p_ac3dec->samples.channel[0]; */
return
1
;
}
return
0
;
...
...
src/ac3_decoder/ac3_downmix_c.c
View file @
4b1da9cc
...
...
@@ -27,10 +27,8 @@
#include "ac3_decoder.h"
#include "ac3_internal.h"
#include "ac3_bit_stream.h"
#include "ac3_downmix.h"
void
__inline__
downmix_3f_2r_to_2ch_c
(
float
*
samples
,
dm_par_t
*
dm_par
)
{
int
i
;
...
...
@@ -145,6 +143,6 @@ void __inline__ stream_sample_1ch_to_s16_c (s16 *out_buf, float *center)
for
(
i
=
0
;
i
<
256
;
i
++
)
{
*
out_buf
++
=
tmp
=
(
s16
)
(
0
.
7071
f
*
*
center
++
*
NORM
);
*
out_buf
++
=
tmp
*
NORM
;
*
out_buf
++
=
tmp
;
}
}
src/ac3_decoder/ac3_exponent.c
View file @
4b1da9cc
...
...
@@ -23,16 +23,21 @@
*****************************************************************************/
#include "defs.h"
#include <stdio.h>
/* "intf_msg.h" */
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "intf_msg.h"
#include "stream_control.h"
#include "input_ext-dec.h"
#include "audio_output.h"
#include "ac3_decoder.h"
#include "ac3_decoder_thread.h"
#include "intf_msg.h"
#include "ac3_bit_stream.h"
#include "ac3_internal.h"
...
...
src/ac3_decoder/ac3_imdct.c
View file @
4b1da9cc
...
...
@@ -201,6 +201,8 @@ void imdct (ac3dec_t * p_ac3dec, s16 * buffer)
{
stream_sample_2ch_to_s16_c
(
buffer
,
p_ac3dec
->
samples
.
channel
[
0
],
p_ac3dec
->
samples
.
channel
[
1
]);
}
else
{
stream_sample_1ch_to_s16_c
(
buffer
,
p_ac3dec
->
samples
.
channel
[
0
]);
}
/* XXX?? We don't bother with the IMDCT for the LFE as it's currently
...
...
src/ac3_decoder/ac3_mantissa.c
View file @
4b1da9cc
...
...
@@ -24,11 +24,19 @@
#include "defs.h"
#include <stdio.h>
/* "intf_msg.h" */
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "stream_control.h"
#include "input_ext-dec.h"
#include "audio_output.h"
#include "ac3_decoder.h"
#include "ac3_decoder_thread.h"
#include "ac3_internal.h"
#include "ac3_bit_stream.h"
...
...
src/ac3_decoder/ac3_parse.c
View file @
4b1da9cc
...
...
@@ -24,10 +24,21 @@
#include "defs.h"
#include "config.h"
#include "common.h"
#include "intf_msg.h"
#include "threads.h"
#include "mtime.h"
#include "stream_control.h"
#include "input_ext-dec.h"
#include "audio_output.h"
#include "intf_msg.h"
#include "ac3_decoder.h"
#include "ac3_decoder_thread.h"
#include "ac3_internal.h"
#include "ac3_bit_stream.h"
...
...
@@ -94,10 +105,9 @@ int ac3_sync_frame (ac3dec_t * p_ac3dec, ac3_sync_info_t * p_sync_info)
p_ac3dec
->
bit_stream
.
total_bits_read
=
0
;
p_ac3dec
->
bit_stream
.
i_available
=
0
;
/* sync word - should be 0x0b77 */
buf
=
bitstream_get
(
&
(
p_ac3dec
->
bit_stream
),
16
);
if
(
buf
!=
0x0b77
)
if
(
(
buf
=
bitstream_get
(
&
(
p_ac3dec
->
bit_stream
),
16
))
!=
0x0b77
)
{
return
1
;
}
...
...
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