codec.h
1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _CODEC_H_
#define _CODEC_H_
#define CO_PROCESSOR_MASK_BITS 0x03
#if 1//def MP3_ENCODE_ENABLE
#define MAX_CODEC_MEM_SIZE (0xB400+0x6000+0x500-0x5000)//(0xB400+0x3800+0x4000) //please pay attention to moydifing the content of the elf32xtensa.x file
#else
#define MAX_CODEC_MEM_SIZE 0xA400
#endif
typedef struct{
U8 valid;
U8 busy;
U16 bytes;
} SECOND_OUTPUT;
extern SECOND_OUTPUT second;
extern U8 wNoMoreFrames;
extern U16 decoder_buf[];
static __inline__ void enableCoProcessor( unsigned int mask )
{
__asm__ __volatile__ (
"wsr.cpenable %0 \n\t"
"esync\n\t"
:
: "a" (mask)
);
}
long xa_ftell(void *ptr);
int xa_fseek( void *stream, long offset, int origin );
int xa_fread(void *buffer, int size, int count, void *fp);
int Decode_Wait_EnoughSpace(void);
int Decode_OutputBuffer(U32 *buffer,int out_bytes);
int Decode_ClearOutputBuffer(int out_bytes);
U32 codec_get_mem_used(void);
void codec_malloc_init (void);
U8 *codec_malloc ( U32 size);
#endif //_CODEC_H_