comparison wc3movie.c @ 386:c152849ee643 libavformat

remove numerous definitions of BE_*/LE_* macros; convert FOURCC_TAG -> MKTAG/MKBETAG
author melanson
date Sun, 14 Mar 2004 04:04:08 +0000
parents 845f9de2c883
children b69898ffc92a
comparison
equal deleted inserted replaced
385:2f56d366a787 386:c152849ee643
25 * http://www.pcisys.net/~melanson/codecs/ 25 * http://www.pcisys.net/~melanson/codecs/
26 */ 26 */
27 27
28 #include "avformat.h" 28 #include "avformat.h"
29 29
30 #define LE_16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
31 #define LE_32(x) ((((uint8_t*)(x))[3] << 24) | \
32 (((uint8_t*)(x))[2] << 16) | \
33 (((uint8_t*)(x))[1] << 8) | \
34 ((uint8_t*)(x))[0])
35 #define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])
36 #define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \
37 (((uint8_t*)(x))[1] << 16) | \
38 (((uint8_t*)(x))[2] << 8) | \
39 ((uint8_t*)(x))[3])
40
41 #define WC3_PREAMBLE_SIZE 8 30 #define WC3_PREAMBLE_SIZE 8
42 31
43 #define FOURCC_TAG( ch0, ch1, ch2, ch3 ) \ 32 #define FORM_TAG MKTAG('F', 'O', 'R', 'M')
44 ( (long)(unsigned char)(ch0) | \ 33 #define MOVE_TAG MKTAG('M', 'O', 'V', 'E')
45 ( (long)(unsigned char)(ch1) << 8 ) | \ 34 #define _PC__TAG MKTAG('_', 'P', 'C', '_')
46 ( (long)(unsigned char)(ch2) << 16 ) | \ 35 #define SOND_TAG MKTAG('S', 'O', 'N', 'D')
47 ( (long)(unsigned char)(ch3) << 24 ) ) 36 #define BNAM_TAG MKTAG('B', 'N', 'A', 'M')
48 37 #define SIZE_TAG MKTAG('S', 'I', 'Z', 'E')
49 #define FORM_TAG FOURCC_TAG('F', 'O', 'R', 'M') 38 #define PALT_TAG MKTAG('P', 'A', 'L', 'T')
50 #define MOVE_TAG FOURCC_TAG('M', 'O', 'V', 'E') 39 #define INDX_TAG MKTAG('I', 'N', 'D', 'X')
51 #define _PC__TAG FOURCC_TAG('_', 'P', 'C', '_') 40 #define BRCH_TAG MKTAG('B', 'R', 'C', 'H')
52 #define SOND_TAG FOURCC_TAG('S', 'O', 'N', 'D') 41 #define SHOT_TAG MKTAG('S', 'H', 'O', 'T')
53 #define BNAM_TAG FOURCC_TAG('B', 'N', 'A', 'M') 42 #define VGA__TAG MKTAG('V', 'G', 'A', ' ')
54 #define SIZE_TAG FOURCC_TAG('S', 'I', 'Z', 'E') 43 #define TEXT_TAG MKTAG('T', 'E', 'X', 'T')
55 #define PALT_TAG FOURCC_TAG('P', 'A', 'L', 'T') 44 #define AUDI_TAG MKTAG('A', 'U', 'D', 'I')
56 #define INDX_TAG FOURCC_TAG('I', 'N', 'D', 'X')
57 #define BRCH_TAG FOURCC_TAG('B', 'R', 'C', 'H')
58 #define SHOT_TAG FOURCC_TAG('S', 'H', 'O', 'T')
59 #define VGA__TAG FOURCC_TAG('V', 'G', 'A', ' ')
60 #define TEXT_TAG FOURCC_TAG('T', 'E', 'X', 'T')
61 #define AUDI_TAG FOURCC_TAG('A', 'U', 'D', 'I')
62 45
63 /* video resolution unless otherwise specified */ 46 /* video resolution unless otherwise specified */
64 #define WC3_DEFAULT_WIDTH 320 47 #define WC3_DEFAULT_WIDTH 320
65 #define WC3_DEFAULT_HEIGHT 165 48 #define WC3_DEFAULT_HEIGHT 165
66 49