Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
f2975c71
Commit
f2975c71
authored
Apr 26, 2001
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fixed the ac3dec compilation under BeOS. * Removed a useless #include in aout_sdl.c.
parent
fdd0e7d3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
25 deletions
+28
-25
plugins/sdl/aout_sdl.c
plugins/sdl/aout_sdl.c
+1
-2
src/ac3_decoder/ac3_bit_allocate.c
src/ac3_decoder/ac3_bit_allocate.c
+19
-19
src/ac3_decoder/ac3_imdct.c
src/ac3_decoder/ac3_imdct.c
+5
-1
src/ac3_decoder/ac3_rematrix.c
src/ac3_decoder/ac3_rematrix.c
+3
-3
No files found.
plugins/sdl/aout_sdl.c
View file @
f2975c71
...
...
@@ -2,7 +2,7 @@
* aout_sdl.c : audio sdl functions library
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: aout_sdl.c,v 1.1
0 2001/03/21 13:42:34
sam Exp $
* $Id: aout_sdl.c,v 1.1
1 2001/04/26 11:23:16
sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -33,7 +33,6 @@
#include <errno.h>
/* ENOMEM */
#include <fcntl.h>
/* open(), O_WRONLY */
#include <sys/ioctl.h>
/* ioctl() */
#include <string.h>
/* strerror() */
#include <unistd.h>
/* write(), close() */
#include <stdio.h>
/* "intf_msg.h" */
...
...
src/ac3_decoder/ac3_bit_allocate.c
View file @
f2975c71
...
...
@@ -2,7 +2,7 @@
* ac3_bit_allocate.c: ac3 allocation tables
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: ac3_bit_allocate.c,v 1.1
8 2001/04/20 12:14:34 reno
Exp $
* $Id: ac3_bit_allocate.c,v 1.1
9 2001/04/26 11:23:16 sam
Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
...
...
@@ -152,12 +152,12 @@ static const s16 baptab[] = { 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4,
10
,
10
,
10
,
11
,
11
,
11
,
11
,
12
,
12
,
12
,
12
,
13
,
13
,
13
,
13
,
14
,
14
,
14
,
14
,
14
,
14
,
14
,
14
,
15
,
15
,
15
,
15
,
15
,
15
,
15
,
15
,
15
};
static
__inline__
u16
max
(
s16
a
,
s16
b
)
static
__inline__
u16
max
_value
(
s16
a
,
s16
b
)
{
return
(
a
>
b
?
a
:
b
);
}
static
__inline__
u16
min
(
s16
a
,
s16
b
)
static
__inline__
u16
min
_value
(
s16
a
,
s16
b
)
{
return
(
a
<
b
?
a
:
b
);
}
...
...
@@ -167,9 +167,9 @@ static __inline__ s16 logadd (s16 a, s16 b)
s16
c
;
if
((
c
=
a
-
b
)
>=
0
)
{
return
(
a
+
latab
[
min
(((
c
)
>>
1
),
255
)]);
return
(
a
+
latab
[
min
_value
(((
c
)
>>
1
),
255
)]);
}
else
{
return
(
b
+
latab
[
min
(((
-
c
)
>>
1
),
255
)]);
return
(
b
+
latab
[
min
_value
(((
-
c
)
>>
1
),
255
)]);
}
}
...
...
@@ -179,14 +179,14 @@ static __inline__ s16 calc_lowcomp (s16 a, s16 b0, s16 b1, s16 bin)
if
((
b0
+
256
)
==
b1
)
a
=
384
;
else
if
(
b0
>
b1
)
a
=
max
(
0
,
a
-
64
);
a
=
max
_value
(
0
,
a
-
64
);
}
else
if
(
bin
<
20
)
{
if
((
b0
+
256
)
==
b1
)
a
=
320
;
else
if
(
b0
>
b1
)
a
=
max
(
0
,
a
-
64
)
;
a
=
max
_value
(
0
,
a
-
64
)
;
}
else
a
=
max
(
0
,
a
-
128
);
a
=
max
_value
(
0
,
a
-
128
);
return
a
;
}
...
...
@@ -306,7 +306,7 @@ static void ba_compute_psd (bit_allocate_t * p_bit, s16 start, s16 end, s16 exps
k
=
masktab
[
start
];
do
{
lastbin
=
min
(
bndtab
[
k
]
+
bndsz
[
k
],
end
);
lastbin
=
min
_value
(
bndtab
[
k
]
+
bndsz
[
k
],
end
);
p_bit
->
bndpsd
[
k
]
=
p_bit
->
psd
[
j
];
j
++
;
...
...
@@ -356,15 +356,15 @@ static void ba_compute_excitation (bit_allocate_t * p_bit, s16 start, s16 end,
}
}
for
(
bin
=
begin
;
bin
<
min
(
bndend
,
22
);
bin
++
)
{
for
(
bin
=
begin
;
bin
<
min
_value
(
bndend
,
22
);
bin
++
)
{
if
(
!
(
is_lfe
&&
(
bin
==
6
)))
lowcomp
=
calc_lowcomp
(
lowcomp
,
p_bit
->
bndpsd
[
bin
],
p_bit
->
bndpsd
[
bin
+
1
],
bin
);
fastleak
-=
p_bit
->
fdecay
;
fastleak
=
max
(
fastleak
,
p_bit
->
bndpsd
[
bin
]
-
fgain
);
fastleak
=
max
_value
(
fastleak
,
p_bit
->
bndpsd
[
bin
]
-
fgain
);
slowleak
-=
p_bit
->
sdecay
;
slowleak
=
max
(
slowleak
,
p_bit
->
bndpsd
[
bin
]
-
p_bit
->
sgain
);
p_bit
->
excite
[
bin
]
=
max
(
fastleak
-
lowcomp
,
slowleak
);
slowleak
=
max
_value
(
slowleak
,
p_bit
->
bndpsd
[
bin
]
-
p_bit
->
sgain
);
p_bit
->
excite
[
bin
]
=
max
_value
(
fastleak
-
lowcomp
,
slowleak
);
}
begin
=
22
;
}
else
{
/* For coupling channel */
...
...
@@ -373,10 +373,10 @@ static void ba_compute_excitation (bit_allocate_t * p_bit, s16 start, s16 end,
for
(
bin
=
begin
;
bin
<
bndend
;
bin
++
)
{
fastleak
-=
p_bit
->
fdecay
;
fastleak
=
max
(
fastleak
,
p_bit
->
bndpsd
[
bin
]
-
fgain
);
fastleak
=
max
_value
(
fastleak
,
p_bit
->
bndpsd
[
bin
]
-
fgain
);
slowleak
-=
p_bit
->
sdecay
;
slowleak
=
max
(
slowleak
,
p_bit
->
bndpsd
[
bin
]
-
p_bit
->
sgain
);
p_bit
->
excite
[
bin
]
=
max
(
fastleak
,
slowleak
)
;
slowleak
=
max
_value
(
slowleak
,
p_bit
->
bndpsd
[
bin
]
-
p_bit
->
sgain
);
p_bit
->
excite
[
bin
]
=
max
_value
(
fastleak
,
slowleak
)
;
}
}
...
...
@@ -397,7 +397,7 @@ static void ba_compute_mask (bit_allocate_t * p_bit, s16 start, s16 end, u16 fsc
if
(
p_bit
->
bndpsd
[
bin
]
<
p_bit
->
dbknee
)
{
p_bit
->
excite
[
bin
]
+=
((
p_bit
->
dbknee
-
p_bit
->
bndpsd
[
bin
])
>>
2
);
}
p_bit
->
mask
[
bin
]
=
max
(
p_bit
->
excite
[
bin
],
hth
[
fscod
][
bin
]);
p_bit
->
mask
[
bin
]
=
max
_value
(
p_bit
->
excite
[
bin
],
hth
[
fscod
][
bin
]);
}
/* Perform delta bit modulation if necessary */
...
...
@@ -432,7 +432,7 @@ static void ba_compute_bap (bit_allocate_t * p_bit, s16 start, s16 end, s16 snro
j
=
masktab
[
start
];
do
{
lastbin
=
min
(
bndtab
[
j
]
+
bndsz
[
j
],
end
);
lastbin
=
min
_value
(
bndtab
[
j
]
+
bndsz
[
j
],
end
);
p_bit
->
mask
[
j
]
-=
snroffset
;
p_bit
->
mask
[
j
]
-=
p_bit
->
floor
;
...
...
@@ -443,7 +443,7 @@ static void ba_compute_bap (bit_allocate_t * p_bit, s16 start, s16 end, s16 snro
p_bit
->
mask
[
j
]
+=
p_bit
->
floor
;
for
(
k
=
i
;
k
<
lastbin
;
k
++
)
{
address
=
(
p_bit
->
psd
[
i
]
-
p_bit
->
mask
[
j
])
>>
5
;
address
=
min
(
63
,
max
(
0
,
address
));
address
=
min
_value
(
63
,
max_value
(
0
,
address
));
bap
[
i
]
=
baptab
[
address
];
i
++
;
}
...
...
src/ac3_decoder/ac3_imdct.c
View file @
f2975c71
...
...
@@ -2,7 +2,7 @@
* ac3_imdct.c: ac3 DCT
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: ac3_imdct.c,v 1.1
5 2001/04/20 12:14:34 reno
Exp $
* $Id: ac3_imdct.c,v 1.1
6 2001/04/26 11:23:16 sam
Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
...
...
@@ -41,6 +41,10 @@
#include "ac3_downmix.h"
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
void
imdct_do_256
(
imdct_t
*
p_imdct
,
float
x
[],
float
y
[],
int
id
);
void
imdct_do_512
(
imdct_t
*
p_imdct
,
float
x
[],
float
y
[],
int
id
);
...
...
src/ac3_decoder/ac3_rematrix.c
View file @
f2975c71
...
...
@@ -2,7 +2,7 @@
* ac3_rematrix.c: ac3 audio rematrixing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: ac3_rematrix.c,v 1.1
3 2001/04/20 12:14:34 reno
Exp $
* $Id: ac3_rematrix.c,v 1.1
4 2001/04/26 11:23:16 sam
Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
...
...
@@ -41,7 +41,7 @@ struct rematrix_band_s {
static
const
struct
rematrix_band_s
rematrix_band
[]
=
{
{
13
,
24
},
{
25
,
36
},
{
37
,
60
},
{
61
,
252
}};
static
__inline__
u32
min
(
u32
a
,
u32
b
)
static
__inline__
u32
min
_value
(
u32
a
,
u32
b
)
{
return
(
a
<
b
?
a
:
b
);
}
...
...
@@ -68,7 +68,7 @@ void rematrix (ac3dec_t * p_ac3dec)
continue
;
start
=
rematrix_band
[
i
].
start
;
end
=
min
(
rematrix_band
[
i
].
end
,
12
*
p_ac3dec
->
audblk
.
cplbegf
+
36
);
end
=
min
_value
(
rematrix_band
[
i
].
end
,
12
*
p_ac3dec
->
audblk
.
cplbegf
+
36
);
for
(
j
=
start
;
j
<
end
;
j
++
)
{
left
=
0
.
5
f
*
(
p_ac3dec
->
coeffs
.
fbw
[
0
][
j
]
+
p_ac3dec
->
coeffs
.
fbw
[
1
][
j
]);
...
...
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