Commit b278b2a6 authored by Michel Kaempf's avatar Michel Kaempf

* Makefile :

- rajout de ac3_decoder ;
- rajout de l'option MMX ;

* Makefile.dep :
- suppression de lignes vides ;

* include/audio_decoder.h, audio_decoder/audio_decoder.c :
- remplacement de AOUT_FRAME_SIZE par ADEC_FRAME_SIZE et aout_frame_t par
adec_frame_t ;

* include/audio_constants.h :
- mise en commentaire du tableau inutilis� ADEC_FRAME_SIZE ;

* include/audio_output.h :
- corrections typographiques ;

* include/vlc.h :
- rajout de ac3_decoder.h ;
parent 8204a960
......@@ -22,7 +22,7 @@ VIDEO=X11
# Target architecture and optimization
#ARCH=
#ARCH=MMX
ARCH=MMX
#ARCH=PPC
# Decoder choice - ?? old decoder will be removed soon
......@@ -175,6 +175,8 @@ audio_output_obj = audio_output/audio_output.o \
video_output_obj = video_output/video_output.o \
video_output/video_$(video).o
ac3_decoder_obj = ac3_decoder/ac3_decoder.o
audio_decoder_obj = audio_decoder/audio_decoder.o \
audio_decoder/audio_math.o
......@@ -219,6 +221,7 @@ C_OBJ = $(interface_obj) \
$(input_obj) \
$(audio_output_obj) \
$(video_output_obj) \
$(ac3_decoder_obj) \
$(audio_decoder_obj) \
$(generic_decoder_obj) \
$(video_parser_obj) \
......
......@@ -33,5 +33,3 @@ $(dependancies): dep/%.d: %.c
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
[ -s $@ ] || rm -f $@'
......@@ -113,6 +113,7 @@
* The frame sizes are stored in the following array :
* frame_size = ADEC_FRAME_SIZE[ 128*layer + 64*padding_bit + 16*sampling_frequency + bitrate_index ]
******************************************************************************/
#if 0
#define ADEC_FRAME_SIZE \
{ \
/* Layer == `00' (reserved) */ \
......@@ -214,6 +215,7 @@
/* sampling_frequency == `11' (reserved) */ \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \
}
#endif
/******************************************************************************
......
......@@ -26,6 +26,13 @@
* directement sur le flux PES ?
*/
#define ADEC_FRAME_SIZE 384
/******************************************************************************
* adec_frame_t
******************************************************************************/
typedef s16 adec_frame_t[ ADEC_FRAME_SIZE ];
/******************************************************************************
* adec_bank_t
******************************************************************************/
......@@ -73,13 +80,6 @@ typedef struct adec_thread_s
} adec_thread_t;
#define AOUT_FRAME_SIZE 384
/******************************************************************************
* aout_frame_t
******************************************************************************/
typedef s16 aout_frame_t[ AOUT_FRAME_SIZE ];
/******************************************************************************
* Prototypes
******************************************************************************/
......
......@@ -36,13 +36,6 @@
#define AOUT_DEFAULT_RATE 44100
#define AOUT_MAX_RATE 48000
/* Number of audio samples (s16 integers) contained in an audio output frame...
* - Layer I : a decoded frame contains 384 samples
* - Layer II & III : a decoded frame contains 1152 = 3*384 samples */
/*
#define AOUT_FRAME_SIZE 384
*/
/* Number of audio output frames contained in an audio output fifo.
* (AOUT_FIFO_SIZE + 1) must be a power of 2, in order to optimise the
* %(AOUT_FIFO_SIZE + 1) operation with an &AOUT_FIFO_SIZE.
......@@ -116,11 +109,6 @@ typedef struct
} aout_increment_t;
/******************************************************************************
* aout_frame_t
******************************************************************************/
/*typedef s16 aout_frame_t[ AOUT_FRAME_SIZE ];*/
/******************************************************************************
* aout_fifo_t
******************************************************************************/
......
......@@ -65,6 +65,7 @@
/* Audio */
#include "audio_output.h"
#include "audio_decoder.h"
#include "ac3_decoder.h"
/* Video */
#include "video.h"
......@@ -77,5 +78,3 @@
#include "interface.h"
#include "main.h"
......@@ -47,6 +47,7 @@ static void RunThread ( adec_thread_t * p_adec );
static void ErrorThread ( adec_thread_t * p_adec );
static void EndThread ( adec_thread_t * p_adec );
/*
static int adec_Layer1_Mono ( adec_thread_t * p_adec );
static int adec_Layer1_Stereo ( adec_thread_t * p_adec );
static int adec_Layer2_Mono ( adec_thread_t * p_adec );
......@@ -56,6 +57,7 @@ static byte_t GetByte ( bit_stream_t * p_bit_stream );
static void NeedBits ( bit_stream_t * p_bit_stream, int i_bits );
static void DumpBits ( bit_stream_t * p_bit_stream, int i_bits );
static int FindHeader ( adec_thread_t * p_adec );
*/
/******************************************************************************
* adec_CreateThread: creates an audio decoder thread
......@@ -489,7 +491,7 @@ static __inline__ int adec_Layer2_Stereo( adec_thread_t * p_adec )
#define NEXT_BUF \
/* fprintf(stderr, "%p\n", p_adec->p_aout_fifo->buffer); */ \
/* fprintf(stderr, "l_end_frame == %li, %p\n", l_end_frame, (aout_frame_t *)p_adec->p_aout_fifo->buffer + l_end_frame); */ \
p_s16 = ((aout_frame_t *)p_adec->p_aout_fifo->buffer)[ l_end_frame ]; \
p_s16 = ((adec_frame_t *)p_adec->p_aout_fifo->buffer)[ l_end_frame ]; \
/* fprintf(stderr, "p_s16 == %p\n", p_s16); */ \
l_end_frame += 1; \
l_end_frame &= AOUT_FIFO_SIZE;
......@@ -762,7 +764,7 @@ static int InitThread( adec_thread_t * p_adec )
return( -1 );
}
aout_fifo.l_frame_size = AOUT_FRAME_SIZE;
aout_fifo.l_frame_size = ADEC_FRAME_SIZE;
/* Creating the audio output fifo */
if ( (p_adec->p_aout_fifo = aout_CreateFifo(p_adec->p_aout, &aout_fifo)) == NULL )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment