annotate libao2/afmt.h @ 14179:f3d36778fe89

Handle raw yv12 video as I420 to fix some Broadcast 2000 created samples. patch by Reza Jelveh, approval by Roberto
author diego
date Sat, 18 Dec 2004 01:12:02 +0000
parents a92101a7eb49
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1058
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
1
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
2 /* Defines that AFMT_ stuff */
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
3
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
4 #ifdef HAVE_SYS_SOUNDCARD_H
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
5 #include <sys/soundcard.h> /* For AFMT_* on linux */
5872
02576893af2a OpenBSD, NetBSD portability patches by
arpi
parents: 1058
diff changeset
6 #else
02576893af2a OpenBSD, NetBSD portability patches by
arpi
parents: 1058
diff changeset
7 #ifdef HAVE_SOUNDCARD_H
02576893af2a OpenBSD, NetBSD portability patches by
arpi
parents: 1058
diff changeset
8 #include <soundcard.h> /* OpenBSD have this instead of <sys/soundcard> */
02576893af2a OpenBSD, NetBSD portability patches by
arpi
parents: 1058
diff changeset
9 #endif
1058
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
10 #endif
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
11
14123
a92101a7eb49 Make include paths consistent.
diego
parents: 13741
diff changeset
12 #include "config.h" /* for native endianness */
8741
46d21c0f36aa (nicer) endianness fix for every plugin except pl_format
colin
parents: 8222
diff changeset
13
1058
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
14 /* standard, old OSS audio formats */
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
15 #ifndef AFMT_MU_LAW
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
16 # define AFMT_MU_LAW 0x00000001
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
17 # define AFMT_A_LAW 0x00000002
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
18 # define AFMT_IMA_ADPCM 0x00000004
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
19 # define AFMT_U8 0x00000008
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
20 # define AFMT_S16_LE 0x00000010 /* Little endian signed 16*/
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
21 # define AFMT_S16_BE 0x00000020 /* Big endian signed 16 */
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
22 # define AFMT_S8 0x00000040
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
23 # define AFMT_U16_LE 0x00000080 /* Little endian U16 */
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
24 # define AFMT_U16_BE 0x00000100 /* Big endian U16 */
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
25 #endif
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
26
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
27 #ifndef AFMT_MPEG
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
28 # define AFMT_MPEG 0x00000200 /* MPEG (2) audio */
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
29 #endif
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
30
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
31 #ifndef AFMT_AC3
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
32 # define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
33 #endif
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
34
13548
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
35 /* 24 bit formats from the linux kernel */
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
36 #ifndef AFMT_S24_LE
13741
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
37
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
38 // FreeBSD fix...
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
39 #if AFMT_S32_LE == 0x1000
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
40
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
41 #define AFMT_S24_LE 0x00010000
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
42 #define AFMT_S24_BE 0x00020000
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
43 #define AFMT_U24_LE 0x00040000
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
44 #define AFMT_U24_BE 0x00080000
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
45
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
46 #else
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
47
13548
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
48 #define AFMT_S24_LE 0x00000800
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
49 #define AFMT_S24_BE 0x00001000
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
50 #define AFMT_U24_LE 0x00002000
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
51 #define AFMT_U24_BE 0x00004000
13741
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
52
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
53 #endif
f7d95487255b FreeBSD compilation fix
reimar
parents: 13548
diff changeset
54
1058
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
55 #endif
cab5ba9ffc6c fixed AFMT_ stuff (inclue afmt.h)
arpi_esp
parents:
diff changeset
56
13548
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
57 /* 32 bit formats from the linux kernel */
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
58 #ifndef AFMT_S32_LE
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
59 #define AFMT_S32_LE 0x00008000
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
60 #define AFMT_S32_BE 0x00010000
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
61 #define AFMT_U32_LE 0x00020000
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
62 #define AFMT_U32_BE 0x00040000
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
63 #endif
7719
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
64
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
65 /* native endian formats */
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
66 #ifndef AFMT_S16_NE
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
67 # if WORDS_BIGENDIAN
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
68 # define AFMT_S16_NE AFMT_S16_BE
13548
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
69 # define AFMT_S24_NE AFMT_S24_BE
7719
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
70 # define AFMT_S32_NE AFMT_S32_BE
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
71 # else
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
72 # define AFMT_S16_NE AFMT_S16_LE
13548
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
73 # define AFMT_S24_NE AFMT_S24_LE
7719
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
74 # define AFMT_S32_NE AFMT_S32_LE
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
75 # endif
41e8d0916c60 Fix for audio filters on big endian cpus. It's working now on Solaris SPARC &
jkeil
parents: 5872
diff changeset
76 #endif
8222
c8677169cc2c added float
alex
parents: 7719
diff changeset
77
c8677169cc2c added float
alex
parents: 7719
diff changeset
78 #ifndef AFMT_FLOAT
13548
661718721c92 introducing 24bit formats and make the values compliant to OSS
alex
parents: 12478
diff changeset
79 # define AFMT_FLOAT 0x00100000
8222
c8677169cc2c added float
alex
parents: 7719
diff changeset
80 #endif
12478
7f8eb5f6814a support for 24 bit pcm/wav files
reimar
parents: 8741
diff changeset
81
7f8eb5f6814a support for 24 bit pcm/wav files
reimar
parents: 8741
diff changeset
82 /* for formats that don't have a corresponding AFMT_* type,
7f8eb5f6814a support for 24 bit pcm/wav files
reimar
parents: 8741
diff changeset
83 * use the flags from libaf/af_format.h or'ed with this */
7f8eb5f6814a support for 24 bit pcm/wav files
reimar
parents: 8741
diff changeset
84 #define AFMT_AF_FLAGS 0x70000000