Commit 2ad5fa64 authored by Sam Hocevar's avatar Sam Hocevar

Je vous avais pr�venu. Le demoronifier a frapp�.

 D�sol� pour le flood. Les en-t�tes de fonctions ne font plus 81
caract�res, et il n'y a plus d'espaces inutiles, Tous les trailing
spaces ont disparu, j'ai essay� de v�rifier que �a ne p�tait rien,
mais j'ai pu oublier un truc con. J'accepte tous types de ch�timents
� base d'orties fra�ches.

 D�sol� d'avoir aussi modifi� les fichiers de ceux qui formataient
bien proprement leurs en-t�tes � 80 et pas 79 sans emb�ter personne,
mais j'ai d� choisir entre les deux.

 Dor�navant ce serait bien de formater les en-t�tes et les commentaires
justifi�s � droite � 79 colonnes, ou au pire � 80.

 . 1343 moronic long lines destroyed
 . 12893 trailing spaces eradicated
 . 115 ugly macros fixed
 . 959 innocent a_bit_long lines shortened
 But hey, 40054 lines were OK !
parent db2b7d18
/****************************************************************************** /*****************************************************************************
* audio_constants.h : defines the MPEG1 Layer I-II audio constants and tables * audio_constants.h : defines the MPEG1 Layer I-II audio constants and tables
* (c)1999 VideoLAN * (c)1999 VideoLAN
******************************************************************************/ *****************************************************************************/
/****************************************************************************** /*****************************************************************************
* 32 bits (4 bytes) audio frame header definitions * 32 bits (4 bytes) audio frame header definitions
******************************************************************************/ *****************************************************************************/
/* /*
* syncword == `1111 1111 1111' * syncword == `1111 1111 1111'
*/ */
...@@ -91,9 +91,9 @@ ...@@ -91,9 +91,9 @@
#define ADEC_HEADER_EMPHASIS_SHIFT 0 #define ADEC_HEADER_EMPHASIS_SHIFT 0
/****************************************************************************** /*****************************************************************************
* frame sizes = f( layer, padding_bit, sampling_frequency, bitrate_index ) * frame sizes = f( layer, padding_bit, sampling_frequency, bitrate_index )
****************************************************************************** *****************************************************************************
* ISO/IEC 11172-3 2.4.3.1 explains how to find out the number of bytes between * ISO/IEC 11172-3 2.4.3.1 explains how to find out the number of bytes between
* two consecutive syncwords. In order to work out the body size of the frame, * two consecutive syncwords. In order to work out the body size of the frame,
* we just have to substract 4 bytes for the header size. * we just have to substract 4 bytes for the header size.
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
* *
* The frame sizes are stored in the following array : * The frame sizes are stored in the following array :
* frame_size = ADEC_FRAME_SIZE[ 128*layer + 64*padding_bit + 16*sampling_frequency + bitrate_index ] * frame_size = ADEC_FRAME_SIZE[ 128*layer + 64*padding_bit + 16*sampling_frequency + bitrate_index ]
******************************************************************************/ *****************************************************************************/
#if 0 #if 0
#define ADEC_FRAME_SIZE \ #define ADEC_FRAME_SIZE \
{ \ { \
...@@ -218,41 +218,41 @@ ...@@ -218,41 +218,41 @@
#endif #endif
/****************************************************************************** /*****************************************************************************
* scale factors = f( scalefactor ) (Layer I & II, see ISO/IEC 11172-3 2.4.1) * scale factors = f( scalefactor ) (Layer I & II, see ISO/IEC 11172-3 2.4.1)
****************************************************************************** *****************************************************************************
* Theses values are 2^(1 - index/3) (see ISO/IEC 11172-3 2.4.2.5) * Theses values are 2^(1 - index/3) (see ISO/IEC 11172-3 2.4.2.5)
******************************************************************************/ *****************************************************************************/
#define ADEC_SCALE_FACTOR \ #define ADEC_SCALE_FACTOR \
{ \ { \
/* 0*/ 2.00000000000000, /* 1*/ 1.58740105196820, /* 2*/ 1.25992104989487, \ /* 0*/ 2.00000000000000, /* 1*/ 1.58740105196820, /* 2*/ 1.25992104989487,\
/* 3*/ 1.00000000000000, /* 4*/ 0.79370052598410, /* 5*/ 0.62996052494744, \ /* 3*/ 1.00000000000000, /* 4*/ 0.79370052598410, /* 5*/ 0.62996052494744,\
/* 6*/ 0.50000000000000, /* 7*/ 0.39685026299205, /* 8*/ 0.31498026247372, \ /* 6*/ 0.50000000000000, /* 7*/ 0.39685026299205, /* 8*/ 0.31498026247372,\
/* 9*/ 0.25000000000000, /*10*/ 0.19842513149602, /*11*/ 0.15749013123686, \ /* 9*/ 0.25000000000000, /*10*/ 0.19842513149602, /*11*/ 0.15749013123686,\
/*12*/ 0.12500000000000, /*13*/ 0.09921256574801, /*14*/ 0.07874506561843, \ /*12*/ 0.12500000000000, /*13*/ 0.09921256574801, /*14*/ 0.07874506561843,\
/*15*/ 0.06250000000000, /*16*/ 0.04960628287401, /*17*/ 0.03937253280921, \ /*15*/ 0.06250000000000, /*16*/ 0.04960628287401, /*17*/ 0.03937253280921,\
/*18*/ 0.03125000000000, /*19*/ 0.02480314143700, /*20*/ 0.01968626640461, \ /*18*/ 0.03125000000000, /*19*/ 0.02480314143700, /*20*/ 0.01968626640461,\
/*21*/ 0.01562500000000, /*22*/ 0.01240157071850, /*23*/ 0.00984313320230, \ /*21*/ 0.01562500000000, /*22*/ 0.01240157071850, /*23*/ 0.00984313320230,\
/*24*/ 0.00781250000000, /*25*/ 0.00620078535925, /*26*/ 0.00492156660115, \ /*24*/ 0.00781250000000, /*25*/ 0.00620078535925, /*26*/ 0.00492156660115,\
/*27*/ 0.00390625000000, /*28*/ 0.00310039267963, /*29*/ 0.00246078330058, \ /*27*/ 0.00390625000000, /*28*/ 0.00310039267963, /*29*/ 0.00246078330058,\
/*30*/ 0.00195312500000, /*31*/ 0.00155019633981, /*32*/ 0.00123039165029, \ /*30*/ 0.00195312500000, /*31*/ 0.00155019633981, /*32*/ 0.00123039165029,\
/*33*/ 0.00097656250000, /*34*/ 0.00077509816991, /*35*/ 0.00061519582514, \ /*33*/ 0.00097656250000, /*34*/ 0.00077509816991, /*35*/ 0.00061519582514,\
/*36*/ 0.00048828125000, /*37*/ 0.00038754908495, /*38*/ 0.00030759791257, \ /*36*/ 0.00048828125000, /*37*/ 0.00038754908495, /*38*/ 0.00030759791257,\
/*39*/ 0.00024414062500, /*40*/ 0.00019377454248, /*41*/ 0.00015379895629, \ /*39*/ 0.00024414062500, /*40*/ 0.00019377454248, /*41*/ 0.00015379895629,\
/*42*/ 0.00012207031250, /*43*/ 0.00009688727124, /*44*/ 0.00007689947814, \ /*42*/ 0.00012207031250, /*43*/ 0.00009688727124, /*44*/ 0.00007689947814,\
/*45*/ 0.00006103515625, /*46*/ 0.00004844363562, /*47*/ 0.00003844973907, \ /*45*/ 0.00006103515625, /*46*/ 0.00004844363562, /*47*/ 0.00003844973907,\
/*48*/ 0.00003051757813, /*49*/ 0.00002422181781, /*50*/ 0.00001922486954, \ /*48*/ 0.00003051757813, /*49*/ 0.00002422181781, /*50*/ 0.00001922486954,\
/*51*/ 0.00001525878906, /*52*/ 0.00001211090890, /*53*/ 0.00000961243477, \ /*51*/ 0.00001525878906, /*52*/ 0.00001211090890, /*53*/ 0.00000961243477,\
/*54*/ 0.00000762939453, /*55*/ 0.00000605545445, /*56*/ 0.00000480621738, \ /*54*/ 0.00000762939453, /*55*/ 0.00000605545445, /*56*/ 0.00000480621738,\
/*57*/ 0.00000381469727, /*58*/ 0.00000302772723, /*59*/ 0.00000240310869, \ /*57*/ 0.00000381469727, /*58*/ 0.00000302772723, /*59*/ 0.00000240310869,\
/*60*/ 0.00000190734863, /*61*/ 0.00000151386361, /*62*/ 0.00000120155435, \ /*60*/ 0.00000190734863, /*61*/ 0.00000151386361, /*62*/ 0.00000120155435,\
/*63*/ 0.0 /* ?? invalid scale factor ?? */ \ /*63*/ 0.0 /* ?? invalid scale factor ?? */ \
} }
/****************************************************************************** /*****************************************************************************
* Layer I definitions * Layer I definitions
******************************************************************************/ *****************************************************************************/
/* /*
* slope table = f( allocation[ch][sb] (see ISO/IEC 11171-3 2.4.1) ) * slope table = f( allocation[ch][sb] (see ISO/IEC 11171-3 2.4.1) )
...@@ -301,9 +301,9 @@ ...@@ -301,9 +301,9 @@
} }
/****************************************************************************** /*****************************************************************************
* Layer II definitions * Layer II definitions
******************************************************************************/ *****************************************************************************/
/* /*
* Bitrate PER CHANNEL index = f( mode, bitrate_index ) * Bitrate PER CHANNEL index = f( mode, bitrate_index )
...@@ -1307,102 +1307,102 @@ ...@@ -1307,102 +1307,102 @@
*/ */
#define ADEC_LAYER2_REQUANTIZATION_CD \ #define ADEC_LAYER2_REQUANTIZATION_CD \
{ \ { \
{ 0, NULL, .0 , .0 }, /* allocation == 0 */ \ { 0, NULL, .0 , .0 }, /* allocation 0 */ \
{ 5, pf_ungroup3, .0 , .0 }, /* allocation == 1 */ \ { 5, pf_ungroup3, .0 , .0 }, /* allocation 1 */ \
{ 7, pf_ungroup5, .0 , .0 }, /* allocation == 2 */ \ { 7, pf_ungroup5, .0 , .0 }, /* allocation 2 */ \
{10, pf_ungroup9, .0 , .0 }, /* allocation == 3 */ \ {10, pf_ungroup9, .0 , .0 }, /* allocation 3 */ \
{ 4, NULL, .133333333332 , -.933333333328}, /* allocation == 4 */ \ { 4, NULL, .133333333332 , -.933333333328}, /* allocation 4 */ \
{ 5, NULL, .0645161290325 , -.967741935488}, /* allocation == 5 */ \ { 5, NULL, .0645161290325 , -.967741935488}, /* allocation 5 */ \
{ 6, NULL, .0317460317459 , -.984126984124}, /* allocation == 6 */ \ { 6, NULL, .0317460317459 , -.984126984124}, /* allocation 6 */ \
{ 7, NULL, .0157480314961 , -.992125984254}, /* allocation == 7 */ \ { 7, NULL, .0157480314961 , -.992125984254}, /* allocation 7 */ \
{ 8, NULL, .00784313725492 , -.996078431375}, /* allocation == 8 */ \ { 8, NULL, .00784313725492 , -.996078431375}, /* allocation 8 */ \
{ 9, NULL, .00391389432484 , -.998043052835}, /* allocation == 9 */ \ { 9, NULL, .00391389432484 , -.998043052835}, /* allocation 9 */ \
{10, NULL, .00195503421311 , -.999022482897}, /* allocation == 10 */ \ {10, NULL, .00195503421311 , -.999022482897}, /* allocation 10 */ \
{11, NULL, .000977039570107 , -.99951148022 }, /* allocation == 11 */ \ {11, NULL, .000977039570107 , -.99951148022 }, /* allocation 11 */ \
{12, NULL, .000488400488398 , -.999755799752}, /* allocation == 12 */ \ {12, NULL, .000488400488398 , -.999755799752}, /* allocation 12 */ \
{13, NULL, .000244170430962 , -.999877914789}, /* allocation == 13 */ \ {13, NULL, .000244170430962 , -.999877914789}, /* allocation 13 */ \
{14, NULL, .000122077763535 , -.999938961117}, /* allocation == 14 */ \ {14, NULL, .000122077763535 , -.999938961117}, /* allocation 14 */ \
{15, NULL, .000061037018952 , -.999969481491} /* allocation == 15 */ \ {15, NULL, .000061037018952 , -.999969481491} /* allocation 15 */ \
} }
#define ADEC_LAYER2_REQUANTIZATION_AB1 \ #define ADEC_LAYER2_REQUANTIZATION_AB1 \
{ \ { \
{ 0, NULL, .0 , .0 }, /* allocation == 0 */ \ { 0, NULL, .0 , .0 }, /* allocation 0 */ \
{ 5, pf_ungroup3, .0 , .0 }, /* allocation == 1 */ \ { 5, pf_ungroup3, .0 , .0 }, /* allocation 1 */ \
{ 3, NULL, .285714285715 , -.857142857145}, /* allocation == 2 */ \ { 3, NULL, .285714285715 , -.857142857145}, /* allocation 2 */ \
{ 4, NULL, .133333333332 , -.933333333328}, /* allocation == 3 */ \ { 4, NULL, .133333333332 , -.933333333328}, /* allocation 3 */ \
{ 5, NULL, .0645161290325 , -.967741935488}, /* allocation == 4 */ \ { 5, NULL, .0645161290325 , -.967741935488}, /* allocation 4 */ \
{ 6, NULL, .0317460317459 , -.984126984124}, /* allocation == 5 */ \ { 6, NULL, .0317460317459 , -.984126984124}, /* allocation 5 */ \
{ 7, NULL, .0157480314961 , -.992125984254}, /* allocation == 6 */ \ { 7, NULL, .0157480314961 , -.992125984254}, /* allocation 6 */ \
{ 8, NULL, .00784313725492 , -.996078431375}, /* allocation == 7 */ \ { 8, NULL, .00784313725492 , -.996078431375}, /* allocation 7 */ \
{ 9, NULL, .00391389432484 , -.998043052835}, /* allocation == 8 */ \ { 9, NULL, .00391389432484 , -.998043052835}, /* allocation 8 */ \
{10, NULL, .00195503421311 , -.999022482897}, /* allocation == 9 */ \ {10, NULL, .00195503421311 , -.999022482897}, /* allocation 9 */ \
{11, NULL, .000977039570107 , -.99951148022 }, /* allocation == 10 */ \ {11, NULL, .000977039570107 , -.99951148022 }, /* allocation 10 */ \
{12, NULL, .000488400488398 , -.999755799752}, /* allocation == 11 */ \ {12, NULL, .000488400488398 , -.999755799752}, /* allocation 11 */ \
{13, NULL, .000244170430962 , -.999877914789}, /* allocation == 12 */ \ {13, NULL, .000244170430962 , -.999877914789}, /* allocation 12 */ \
{14, NULL, .000122077763535 , -.999938961117}, /* allocation == 13 */ \ {14, NULL, .000122077763535 , -.999938961117}, /* allocation 13 */ \
{15, NULL, .000061037018952 , -.999969481491}, /* allocation == 14 */ \ {15, NULL, .000061037018952 , -.999969481491}, /* allocation 14 */ \
{16, NULL, .0000305180437933, -.999984740976} /* allocation == 15 */ \ {16, NULL, .0000305180437933, -.999984740976} /* allocation 15 */ \
} }
#define ADEC_LAYER2_REQUANTIZATION_AB2 \ #define ADEC_LAYER2_REQUANTIZATION_AB2 \
{ \ { \
{ 0, NULL, .0 , .0 }, /* allocation == 0 */ \ { 0, NULL, .0 , .0 }, /* allocation 0 */ \
{ 5, pf_ungroup3, .0 , .0 }, /* allocation == 1 */ \ { 5, pf_ungroup3, .0 , .0 }, /* allocation 1 */ \
{ 7, pf_ungroup5, .0 , .0 }, /* allocation == 2 */ \ { 7, pf_ungroup5, .0 , .0 }, /* allocation 2 */ \
{ 3, NULL, .285714285715 , -.857142857145}, /* allocation == 3 */ \ { 3, NULL, .285714285715 , -.857142857145}, /* allocation 3 */ \
{10, pf_ungroup9, .0 , .0 }, /* allocation == 4 */ \ {10, pf_ungroup9, .0 , .0 }, /* allocation 4 */ \
{ 4, NULL, .133333333332 , -.933333333328}, /* allocation == 5 */ \ { 4, NULL, .133333333332 , -.933333333328}, /* allocation 5 */ \
{ 5, NULL, .0645161290325 , -.967741935488}, /* allocation == 6 */ \ { 5, NULL, .0645161290325 , -.967741935488}, /* allocation 6 */ \
{ 6, NULL, .0317460317459 , -.984126984124}, /* allocation == 7 */ \ { 6, NULL, .0317460317459 , -.984126984124}, /* allocation 7 */ \
{ 7, NULL, .0157480314961 , -.992125984254}, /* allocation == 8 */ \ { 7, NULL, .0157480314961 , -.992125984254}, /* allocation 8 */ \
{ 8, NULL, .00784313725492 , -.996078431375}, /* allocation == 9 */ \ { 8, NULL, .00784313725492 , -.996078431375}, /* allocation 9 */ \
{ 9, NULL, .00391389432484 , -.998043052835}, /* allocation == 10 */ \ { 9, NULL, .00391389432484 , -.998043052835}, /* allocation 10 */ \
{10, NULL, .00195503421311 , -.999022482897}, /* allocation == 11 */ \ {10, NULL, .00195503421311 , -.999022482897}, /* allocation 11 */ \
{11, NULL, .000977039570107 , -.99951148022 }, /* allocation == 12 */ \ {11, NULL, .000977039570107 , -.99951148022 }, /* allocation 12 */ \
{12, NULL, .000488400488398 , -.999755799752}, /* allocation == 13 */ \ {12, NULL, .000488400488398 , -.999755799752}, /* allocation 13 */ \
{13, NULL, .000244170430962 , -.999877914789}, /* allocation == 14 */ \ {13, NULL, .000244170430962 , -.999877914789}, /* allocation 14 */ \
{16, NULL, .0000305180437933, -.999984740976} /* allocation == 15 */ \ {16, NULL, .0000305180437933, -.999984740976} /* allocation 15 */ \
} }
#define ADEC_LAYER2_REQUANTIZATION_AB3 \ #define ADEC_LAYER2_REQUANTIZATION_AB3 \
{ \ { \
{ 0, NULL, .0 , .0 }, /* allocation == 0 */ \ { 0, NULL, .0 , .0 }, /* allocation 0 */ \
{ 5, pf_ungroup3, .0 , .0 }, /* allocation == 1 */ \ { 5, pf_ungroup3, .0 , .0 }, /* allocation 1 */ \
{ 7, pf_ungroup5, .0 , .0 }, /* allocation == 2 */ \ { 7, pf_ungroup5, .0 , .0 }, /* allocation 2 */ \
{ 3, NULL, .285714285715 , -.857142857145}, /* allocation == 3 */ \ { 3, NULL, .285714285715 , -.857142857145}, /* allocation 3 */ \
{10, pf_ungroup9, .0 , .0 }, /* allocation == 4 */ \ {10, pf_ungroup9, .0 , .0 }, /* allocation 4 */ \
{ 4, NULL, .133333333332 , -.933333333328}, /* allocation == 5 */ \ { 4, NULL, .133333333332 , -.933333333328}, /* allocation 5 */ \
{ 5, NULL, .0645161290325 , -.967741935488}, /* allocation == 6 */ \ { 5, NULL, .0645161290325 , -.967741935488}, /* allocation 6 */ \
{16, NULL, .0000305180437933, -.999984740976}, /* allocation == 7 */ \ {16, NULL, .0000305180437933, -.999984740976}, /* allocation 7 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 8 */ \ { 0, NULL, .0 , .0 }, /* allocation 8 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 9 */ \ { 0, NULL, .0 , .0 }, /* allocation 9 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 10 */ \ { 0, NULL, .0 , .0 }, /* allocation 10 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 11 */ \ { 0, NULL, .0 , .0 }, /* allocation 11 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 12 */ \ { 0, NULL, .0 , .0 }, /* allocation 12 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 13 */ \ { 0, NULL, .0 , .0 }, /* allocation 13 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 14 */ \ { 0, NULL, .0 , .0 }, /* allocation 14 */ \
{ 0, NULL, .0 , .0 } /* allocation == 15 */ \ { 0, NULL, .0 , .0 } /* allocation 15 */ \
} }
#define ADEC_LAYER2_REQUANTIZATION_AB4 \ #define ADEC_LAYER2_REQUANTIZATION_AB4 \
{ \ { \
{ 0, NULL, .0 , .0 }, /* allocation == 0 */ \ { 0, NULL, .0 , .0 }, /* allocation 0 */ \
{ 5, pf_ungroup3, .0 , .0 }, /* allocation == 1 */ \ { 5, pf_ungroup3, .0 , .0 }, /* allocation 1 */ \
{ 7, pf_ungroup5, .0 , .0 }, /* allocation == 2 */ \ { 7, pf_ungroup5, .0 , .0 }, /* allocation 2 */ \
{16, NULL, .0000305180437933, -.999984740976}, /* allocation == 3 */ \ {16, NULL, .0000305180437933, -.999984740976}, /* allocation 3 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 4 */ \ { 0, NULL, .0 , .0 }, /* allocation 4 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 5 */ \ { 0, NULL, .0 , .0 }, /* allocation 5 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 6 */ \ { 0, NULL, .0 , .0 }, /* allocation 6 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 7 */ \ { 0, NULL, .0 , .0 }, /* allocation 7 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 8 */ \ { 0, NULL, .0 , .0 }, /* allocation 8 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 9 */ \ { 0, NULL, .0 , .0 }, /* allocation 9 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 10 */ \ { 0, NULL, .0 , .0 }, /* allocation 10 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 11 */ \ { 0, NULL, .0 , .0 }, /* allocation 11 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 12 */ \ { 0, NULL, .0 , .0 }, /* allocation 12 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 13 */ \ { 0, NULL, .0 , .0 }, /* allocation 13 */ \
{ 0, NULL, .0 , .0 }, /* allocation == 14 */ \ { 0, NULL, .0 , .0 }, /* allocation 14 */ \
{ 0, NULL, .0 , .0 } /* allocation == 15 */ \ { 0, NULL, .0 , .0 } /* allocation 15 */ \
} }
#define ADEC_LAYER2_REQUANTIZATION_AB \ #define ADEC_LAYER2_REQUANTIZATION_AB \
......
/****************************************************************************** /*****************************************************************************
* audio_decoder.h : audio decoder thread interface * audio_decoder.h : audio decoder thread interface
* (c)1999 VideoLAN * (c)1999 VideoLAN
****************************************************************************** *****************************************************************************
* = Prototyped functions are implemented in audio_decoder/audio_decoder.c * = Prototyped functions are implemented in audio_decoder/audio_decoder.c
* *
* = Required headers : * = Required headers :
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* = - MSb = Most Significant bit * = - MSb = Most Significant bit
* - MSB = Most Significant Byte * - MSB = Most Significant Byte
******************************************************************************/ *****************************************************************************/
/* /*
* TODO : * TODO :
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
#define ADEC_FRAME_SIZE 384 #define ADEC_FRAME_SIZE 384
/****************************************************************************** /*****************************************************************************
* adec_frame_t * adec_frame_t
******************************************************************************/ *****************************************************************************/
typedef s16 adec_frame_t[ ADEC_FRAME_SIZE ]; typedef s16 adec_frame_t[ ADEC_FRAME_SIZE ];
/****************************************************************************** /*****************************************************************************
* adec_bank_t * adec_bank_t
******************************************************************************/ *****************************************************************************/
typedef struct adec_bank_s typedef struct adec_bank_s
{ {
float v1[512]; float v1[512];
...@@ -45,11 +45,11 @@ typedef struct adec_bank_s ...@@ -45,11 +45,11 @@ typedef struct adec_bank_s
} adec_bank_t; } adec_bank_t;
/****************************************************************************** /*****************************************************************************
* adec_thread_t : audio decoder thread descriptor * adec_thread_t : audio decoder thread descriptor
****************************************************************************** *****************************************************************************
* This type describes an audio decoder thread * This type describes an audio decoder thread
******************************************************************************/ *****************************************************************************/
typedef struct adec_thread_s typedef struct adec_thread_s
{ {
/* /*
...@@ -80,8 +80,8 @@ typedef struct adec_thread_s ...@@ -80,8 +80,8 @@ typedef struct adec_thread_s
} adec_thread_t; } adec_thread_t;
/****************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
******************************************************************************/ *****************************************************************************/
adec_thread_t * adec_CreateThread ( input_thread_t * p_input /* !! , aout_thread_t * p_aout !! */ ); adec_thread_t * adec_CreateThread ( input_thread_t * p_input /* !! , aout_thread_t * p_aout !! */ );
void adec_DestroyThread ( adec_thread_t * p_adec ); void adec_DestroyThread ( adec_thread_t * p_adec );
/****************************************************************************** /*****************************************************************************
* audio_dsp.h : header of the dsp functions library * audio_dsp.h : header of the dsp functions library
* (c)1999 VideoLAN * (c)1999 VideoLAN
****************************************************************************** *****************************************************************************
* Required headers: * Required headers:
* - "common.h" ( byte_t ) * - "common.h" ( byte_t )
* - "audio_output.h" ( aout_dsp_t ) * - "audio_output.h" ( aout_dsp_t )
******************************************************************************/ *****************************************************************************/
/****************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
******************************************************************************/ *****************************************************************************/
int aout_dspOpen ( aout_dsp_t *p_dsp ); int aout_dspOpen ( aout_dsp_t *p_dsp );
int aout_dspReset ( aout_dsp_t *p_dsp ); int aout_dspReset ( aout_dsp_t *p_dsp );
int aout_dspSetFormat ( aout_dsp_t *p_dsp ); int aout_dspSetFormat ( aout_dsp_t *p_dsp );
......
/****************************************************************************** /*****************************************************************************
* audio_math.h : PCM and DCT * audio_math.h : PCM and DCT
* (c)1999 VideoLAN * (c)1999 VideoLAN
******************************************************************************/ *****************************************************************************/
/****************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
******************************************************************************/ *****************************************************************************/
void DCT32(float *x, adec_bank_t *b); void DCT32(float *x, adec_bank_t *b);
void PCM(adec_bank_t *b, s16 **pcm, int jump); void PCM(adec_bank_t *b, s16 **pcm, int jump);
/****************************************************************************** /*****************************************************************************
* audio_output.h : audio output thread interface * audio_output.h : audio output thread interface
* (c)1999 VideoLAN * (c)1999 VideoLAN
****************************************************************************** *****************************************************************************
* Required headers: * Required headers:
* - <sys/soundcard.h> ( audio_buf_info ) * - <sys/soundcard.h> ( audio_buf_info )
* - "common.h" ( boolean_t ) * - "common.h" ( boolean_t )
* - "mtime.h" ( mtime_t ) * - "mtime.h" ( mtime_t )
* - "vlc_thread.h" ( vlc_thread_t ) * - "vlc_thread.h" ( vlc_thread_t )
******************************************************************************/ *****************************************************************************/
/* TODO : /* TODO :
* *
...@@ -59,9 +59,9 @@ ...@@ -59,9 +59,9 @@
#define AOUT_FIFO_ISEMPTY( fifo ) ( (fifo).l_end_frame == (fifo).i_start_frame ) #define AOUT_FIFO_ISEMPTY( fifo ) ( (fifo).l_end_frame == (fifo).i_start_frame )
#define AOUT_FIFO_ISFULL( fifo ) ( ((((fifo).l_end_frame + 1) - (fifo).l_start_frame) & AOUT_FIFO_SIZE) == 0 ) #define AOUT_FIFO_ISFULL( fifo ) ( ((((fifo).l_end_frame + 1) - (fifo).l_start_frame) & AOUT_FIFO_SIZE) == 0 )
/****************************************************************************** /*****************************************************************************
* aout_dsp_t * aout_dsp_t
******************************************************************************/ *****************************************************************************/
typedef struct typedef struct
{ {
/* Path to the audio output device (default is set to "/dev/dsp") */ /* Path to the audio output device (default is set to "/dev/dsp") */
...@@ -81,13 +81,13 @@ typedef struct ...@@ -81,13 +81,13 @@ typedef struct
} aout_dsp_t; } aout_dsp_t;
/****************************************************************************** /*****************************************************************************
* aout_increment_t * aout_increment_t
****************************************************************************** *****************************************************************************
* This structure is used to keep the progression of an index up-to-date, in * This structure is used to keep the progression of an index up-to-date, in
* order to avoid rounding problems and heavy computations, as the function * order to avoid rounding problems and heavy computations, as the function
* that handles this structure only uses additions. * that handles this structure only uses additions.
******************************************************************************/ *****************************************************************************/
typedef struct typedef struct
{ {
/* The remainder is used to keep track of the fractional part of the /* The remainder is used to keep track of the fractional part of the
...@@ -109,9 +109,9 @@ typedef struct ...@@ -109,9 +109,9 @@ typedef struct
} aout_increment_t; } aout_increment_t;
/****************************************************************************** /*****************************************************************************
* aout_fifo_t * aout_fifo_t
******************************************************************************/ *****************************************************************************/
typedef struct typedef struct
{ {
/* See the fifo types below */ /* See the fifo types below */
...@@ -155,9 +155,9 @@ typedef struct ...@@ -155,9 +155,9 @@ typedef struct
#define AOUT_ADEC_MONO_FIFO 3 #define AOUT_ADEC_MONO_FIFO 3
#define AOUT_ADEC_STEREO_FIFO 4 #define AOUT_ADEC_STEREO_FIFO 4
/****************************************************************************** /*****************************************************************************
* aout_thread_t * aout_thread_t
******************************************************************************/ *****************************************************************************/
typedef struct aout_thread_s typedef struct aout_thread_s
{ {
vlc_thread_t thread_id; vlc_thread_t thread_id;
...@@ -184,9 +184,9 @@ typedef struct aout_thread_s ...@@ -184,9 +184,9 @@ typedef struct aout_thread_s
} aout_thread_t; } aout_thread_t;
/****************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
******************************************************************************/ *****************************************************************************/
aout_thread_t * aout_CreateThread ( int *pi_status ); aout_thread_t * aout_CreateThread ( int *pi_status );
void aout_DestroyThread ( aout_thread_t *p_aout, int *pi_status ); void aout_DestroyThread ( aout_thread_t *p_aout, int *pi_status );
......
/******************************************************************************* /*****************************************************************************
* common.h: common definitions * common.h: common definitions
* (c)1998 VideoLAN * (c)1998 VideoLAN
******************************************************************************* *****************************************************************************
* Collection of usefull common types and macros definitions * Collection of usefull common types and macros definitions
******************************************************************************* *****************************************************************************
* required headers: * required headers:
* config.h * config.h
*******************************************************************************/ *****************************************************************************/
/******************************************************************************* /*****************************************************************************
* Basic types definitions * Basic types definitions
*******************************************************************************/ *****************************************************************************/
/* Basic types definitions */ /* Basic types definitions */
typedef signed char s8; typedef signed char s8;
...@@ -30,9 +30,9 @@ typedef int boolean_t; ...@@ -30,9 +30,9 @@ typedef int boolean_t;
/* Counter for statistics and profiling */ /* Counter for statistics and profiling */
typedef unsigned long count_t; typedef unsigned long count_t;