# Target architecture and optimization
#ARCH=
-#ARCH=MMX
+ARCH=MMX
#ARCH=PPC
# Decoder choice - ?? old decoder will be removed soon
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
$(input_obj) \
$(audio_output_obj) \
$(video_output_obj) \
+ $(ac3_decoder_obj) \
$(audio_decoder_obj) \
$(generic_decoder_obj) \
$(video_parser_obj) \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
[ -s $@ ] || rm -f $@'
-
-
* 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) */ \
/* sampling_frequency == `11' (reserved) */ \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \
}
+#endif
/******************************************************************************
* directement sur le flux PES ?
*/
+#define ADEC_FRAME_SIZE 384
+
+/******************************************************************************
+ * adec_frame_t
+ ******************************************************************************/
+typedef s16 adec_frame_t[ ADEC_FRAME_SIZE ];
+
/******************************************************************************
* adec_bank_t
******************************************************************************/
} adec_thread_t;
-#define AOUT_FRAME_SIZE 384
-
-/******************************************************************************
- * aout_frame_t
- ******************************************************************************/
-typedef s16 aout_frame_t[ AOUT_FRAME_SIZE ];
-
/******************************************************************************
* Prototypes
******************************************************************************/
#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.
} aout_increment_t;
-/******************************************************************************
- * aout_frame_t
- ******************************************************************************/
-/*typedef s16 aout_frame_t[ AOUT_FRAME_SIZE ];*/
-
/******************************************************************************
* aout_fifo_t
******************************************************************************/
/* Audio */
#include "audio_output.h"
#include "audio_decoder.h"
+#include "ac3_decoder.h"
/* Video */
#include "video.h"
#include "interface.h"
#include "main.h"
-
-
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 );
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
#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;
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 )