Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
ff840042
Commit
ff840042
authored
Aug 11, 2002
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Definition of vlc_fixed_t.
parent
fec0d40b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
4 deletions
+32
-4
include/audio_output.h
include/audio_output.h
+29
-1
modules/codec/a52.c
modules/codec/a52.c
+3
-3
No files found.
include/audio_output.h
View file @
ff840042
...
...
@@ -2,7 +2,7 @@
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.h,v 1.5
5 2002/08/09 23:52:31 sam
Exp $
* $Id: audio_output.h,v 1.5
6 2002/08/11 22:46:34 massiot
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -67,6 +67,34 @@ struct audio_sample_format_t
|| ((p_format)->i_format == AOUT_FMT_A52) \
|| ((p_format)->i_format == AOUT_FMT_DTS) )
/* This is heavily borrowed from libmad, by Robert Leslie <rob@mars.org> */
/*
* Fixed-point format: 0xABBBBBBB
* A == whole part (sign + 3 bits)
* B == fractional part (28 bits)
*
* Values are signed two's complement, so the effective range is:
* 0x80000000 to 0x7fffffff
* -8.0 to +7.9999999962747097015380859375
*
* The smallest representable value is:
* 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9)
*
* 28 bits of fractional accuracy represent about
* 8.6 digits of decimal accuracy.
*
* Fixed-point numbers can be added or subtracted as normal
* integers, but multiplication requires shifting the 64-bit result
* from 56 fractional bits back to 28 (and rounding.)
*/
typedef
s32
vlc_fixed_t
;
#define FIXED32_FRACBITS 28
#define FIXED32_MIN ((vlc_fixed_t) -0x80000000L)
#define FIXED32_MAX ((vlc_fixed_t) +0x7fffffffL)
#define FIXED32_ONE ((vlc_fixed_t) 0x10000000)
/*****************************************************************************
* aout_buffer_t : audio output buffer
*****************************************************************************/
...
...
modules/codec/a52.c
View file @
ff840042
...
...
@@ -4,7 +4,7 @@
* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: a52.c,v 1.
1 2002/08/11 01:27:01
massiot Exp $
* $Id: a52.c,v 1.
2 2002/08/11 22:46:34
massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -81,7 +81,7 @@ typedef struct a52_thread_s
*****************************************************************************/
static
int
OpenDecoder
(
vlc_object_t
*
);
static
int
RunDecoder
(
decoder_fifo_t
*
);
static
int
DecodeFrame
(
a52_thread_t
*
,
const
byte_t
*
);
static
int
DecodeFrame
(
a52_thread_t
*
,
byte_t
*
);
static
int
InitThread
(
a52_thread_t
*
,
decoder_fifo_t
*
);
static
void
EndThread
(
a52_thread_t
*
);
...
...
@@ -282,7 +282,7 @@ static void Interleave( float * p_out, const float * p_in, int i_channels )
/*****************************************************************************
* DecodeFrame: decode an ATSC A/52 frame.
*****************************************************************************/
static
int
DecodeFrame
(
a52_thread_t
*
p_dec
,
const
byte_t
*
p_frame_buffer
)
static
int
DecodeFrame
(
a52_thread_t
*
p_dec
,
byte_t
*
p_frame_buffer
)
{
sample_t
i_sample_level
=
1
;
aout_buffer_t
*
p_buffer
;
...
...
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