Browse code

Merge remote-tracking branch 'qatar/master'

* qatar/master:
configure: sanitise sparc vis check
configure: recognise more sparc variants as --cpu argument
build: Include HEADERS-yes in the HEADERS variable
pcm: change references to raw to pcm
ffv1: set the range coder state in decode_slice_header
pcmdec: change default of channels parameter to 1

Conflicts:
libavformat/pcmdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2012/10/26 21:55:15
Showing 5 changed files
... ...
@@ -68,7 +68,7 @@ config.h: .config
68 68
 	@-tput sgr0 2>/dev/null
69 69
 
70 70
 SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS      \
71
-               ARCH_HEADERS BUILT_HEADERS SKIPHEADERS                    \
71
+               HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS            \
72 72
                ARMV5TE-OBJS ARMV6-OBJS ARMVFP-OBJS NEON-OBJS             \
73 73
                ALTIVEC-OBJS VIS-OBJS                                     \
74 74
                MMX-OBJS YASM-OBJS                                        \
... ...
@@ -94,6 +94,7 @@ HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
94 94
 TOOLS     += $(TOOLS-yes)
95 95
 TOOLOBJS  := $(TOOLS:%=tools/%.o)
96 96
 TOOLS     := $(TOOLS:%=tools/%$(EXESUF))
97
+HEADERS   += $(HEADERS-yes)
97 98
 
98 99
 DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
99 100
 
... ...
@@ -2855,12 +2855,12 @@ elif enabled x86; then
2855 2855
 elif enabled sparc; then
2856 2856
 
2857 2857
     case $cpu in
2858
-        niagara)
2858
+        cypress|f93[04]|tsc701|sparcl*|supersparc|hypersparc|niagara|v[789])
2859 2859
             cpuflags="-mcpu=$cpu"
2860 2860
             disable vis
2861 2861
         ;;
2862
-        sparc64)
2863
-            cpuflags="-mcpu=v9"
2862
+        ultrasparc*|niagara[234])
2863
+            cpuflags="-mcpu=$cpu"
2864 2864
         ;;
2865 2865
     esac
2866 2866
 
... ...
@@ -3446,9 +3446,7 @@ EOF
3446 3446
 
3447 3447
 elif enabled sparc; then
3448 3448
 
3449
-    enabled vis &&
3450
-        check_inline_asm vis '"pdist %f0, %f0, %f0"' -mcpu=ultrasparc &&
3451
-            add_cflags -mcpu=ultrasparc -mtune=ultrasparc
3449
+    enabled vis && check_inline_asm vis '"pdist %f0, %f0, %f0"'
3452 3450
 
3453 3451
 elif enabled x86; then
3454 3452
 
... ...
@@ -28,15 +28,15 @@
28 28
 
29 29
 #define RAW_SAMPLES     1024
30 30
 
31
-typedef struct RawAudioDemuxerContext {
31
+typedef struct PCMAudioDemuxerContext {
32 32
     AVClass *class;
33 33
     int sample_rate;
34 34
     int channels;
35
-} RawAudioDemuxerContext;
35
+} PCMAudioDemuxerContext;
36 36
 
37
-static int raw_read_header(AVFormatContext *s)
37
+static int pcm_read_header(AVFormatContext *s)
38 38
 {
39
-    RawAudioDemuxerContext *s1 = s->priv_data;
39
+    PCMAudioDemuxerContext *s1 = s->priv_data;
40 40
     AVStream *st;
41 41
 
42 42
     st = avformat_new_stream(s, NULL);
... ...
@@ -61,7 +61,7 @@ static int raw_read_header(AVFormatContext *s)
61 61
     return 0;
62 62
 }
63 63
 
64
-static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
64
+static int pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
65 65
 {
66 66
     int ret, size, bps;
67 67
     //    AVStream *st = s->streams[0];
... ...
@@ -84,8 +84,8 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
84 84
 }
85 85
 
86 86
 static const AVOption pcm_options[] = {
87
-    { "sample_rate", "", offsetof(RawAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 44100}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
88
-    { "channels",    "", offsetof(RawAudioDemuxerContext, channels),    AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
87
+    { "sample_rate", "", offsetof(PCMAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 44100}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
88
+    { "channels",    "", offsetof(PCMAudioDemuxerContext, channels),    AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
89 89
     { NULL },
90 90
 };
91 91
 
... ...
@@ -99,9 +99,9 @@ static const AVClass name_ ## _demuxer_class = {            \
99 99
 AVInputFormat ff_pcm_ ## name_ ## _demuxer = {              \
100 100
     .name           = #name_,                               \
101 101
     .long_name      = NULL_IF_CONFIG_SMALL(long_name_),     \
102
-    .priv_data_size = sizeof(RawAudioDemuxerContext),       \
103
-    .read_header    = raw_read_header,                      \
104
-    .read_packet    = raw_read_packet,                      \
102
+    .priv_data_size = sizeof(PCMAudioDemuxerContext),       \
103
+    .read_header    = pcm_read_header,                      \
104
+    .read_packet    = pcm_read_packet,                      \
105 105
     .read_seek      = ff_pcm_read_seek,                     \
106 106
     .flags          = AVFMT_GENERIC_INDEX,                  \
107 107
     .extensions     = ext,                                  \
... ...
@@ -2,8 +2,6 @@ include $(SUBDIR)../config.mak
2 2
 
3 3
 NAME = avutil
4 4
 
5
-HEADERS-$(CONFIG_LZO)                   += lzo.h
6
-
7 5
 HEADERS = adler32.h                                                     \
8 6
           aes.h                                                         \
9 7
           attributes.h                                                  \
... ...
@@ -47,7 +45,8 @@ HEADERS = adler32.h                                                     \
47 47
           timestamp.h                                                   \
48 48
           version.h                                                     \
49 49
           xtea.h                                                        \
50
-          $(HEADERS-yes)                                                \
50
+
51
+HEADERS-$(CONFIG_LZO)                   += lzo.h
51 52
 
52 53
 ARCH_HEADERS = bswap.h                                                  \
53 54
                intmath.h                                                \