Browse code

Merge remote-tracking branch 'qatar/master'

This early morning merge should fix --disable-yasm

* qatar/master:
Clean up #includes in cmdutils.h.
g729: Merge g729.h into g729dec.c.
10l: wrap float_interleave functions in HAVE_YASM.

Conflicts:
libavcodec/g729.h

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

Michael Niedermayer authored on 2011/05/19 20:00:31
Showing 4 changed files
... ...
@@ -22,8 +22,10 @@
22 22
 #ifndef FFMPEG_CMDUTILS_H
23 23
 #define FFMPEG_CMDUTILS_H
24 24
 
25
-#include <inttypes.h>
25
+#include <stdint.h>
26
+
26 27
 #include "libavcodec/avcodec.h"
28
+#include "libavfilter/avfilter.h"
27 29
 #include "libavformat/avformat.h"
28 30
 #include "libswscale/swscale.h"
29 31
 
... ...
@@ -255,9 +257,6 @@ int read_file(const char *filename, char **bufptr, size_t *size);
255 255
 FILE *get_preset_file(char *filename, size_t filename_size,
256 256
                       const char *preset_name, int is_path, const char *codec_name);
257 257
 
258
-#if CONFIG_AVFILTER
259
-#include "libavfilter/avfilter.h"
260
-
261 258
 typedef struct {
262 259
     enum PixelFormat pix_fmt;
263 260
 } FFSinkContext;
... ...
@@ -273,6 +272,4 @@ extern AVFilter ffsink;
273 273
 int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame,
274 274
                              AVFilterBufferRef **picref, AVRational *pts_tb);
275 275
 
276
-#endif /* CONFIG_AVFILTER */
277
-
278 276
 #endif /* FFMPEG_CMDUTILS_H */
279 277
deleted file mode 100644
... ...
@@ -1,29 +0,0 @@
1
-/*
2
- * G.729 decoder
3
- * Copyright (c) 2008 Vladimir Voroshilov
4
- *
5
- * This file is part of FFmpeg.
6
- *
7
- * FFmpeg is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU Lesser General Public
9
- * License as published by the Free Software Foundation; either
10
- * version 2.1 of the License, or (at your option) any later version.
11
- *
12
- * FFmpeg is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
- * Lesser General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU Lesser General Public
18
- * License along with FFmpeg; if not, write to the Free Software
19
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
- */
21
-#ifndef AVCODEC_G729_H
22
-#define AVCODEC_G729_H
23
-
24
-/**
25
- * subframe size
26
- */
27
-#define SUBFRAME_SIZE 40
28
-
29
-#endif // AVCODEC_G729_H
... ...
@@ -30,7 +30,6 @@
30 30
 #include "libavutil/avutil.h"
31 31
 #include "get_bits.h"
32 32
 
33
-#include "g729.h"
34 33
 #include "lsp.h"
35 34
 #include "celp_math.h"
36 35
 #include "acelp_filters.h"
... ...
@@ -71,6 +70,12 @@
71 71
  */
72 72
 #define SHARP_MAX                  13017
73 73
 
74
+/**
75
+ * subframe size
76
+ */
77
+#define SUBFRAME_SIZE              40
78
+
79
+
74 80
 typedef struct {
75 81
     uint8_t ac_index_bits[2];   ///< adaptive codebook index for second subframe (size in bits)
76 82
     uint8_t parity_bit;         ///< parity bit for pitch delay
... ...
@@ -235,6 +235,7 @@ static void float_to_int16_interleave_3dn2(int16_t *dst, const float **src, long
235 235
         float_to_int16_interleave_3dnow(dst, src, len, channels);
236 236
 }
237 237
 
238
+#if HAVE_YASM
238 239
 void ff_float_interleave2_mmx(float *dst, const float **src, unsigned int len);
239 240
 void ff_float_interleave2_sse(float *dst, const float **src, unsigned int len);
240 241
 
... ...
@@ -262,13 +263,16 @@ static void float_interleave_sse(float *dst, const float **src,
262 262
     else
263 263
         ff_float_interleave_c(dst, src, len, channels);
264 264
 }
265
+#endif
265 266
 
266 267
 void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx)
267 268
 {
268 269
     int mm_flags = av_get_cpu_flags();
269 270
 
270 271
     if (mm_flags & AV_CPU_FLAG_MMX) {
272
+#if HAVE_YASM
271 273
         c->float_interleave = float_interleave_mmx;
274
+#endif
272 275
 
273 276
         if(mm_flags & AV_CPU_FLAG_3DNOW){
274 277
             if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
... ...
@@ -285,7 +289,9 @@ void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx)
285 285
             c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse;
286 286
             c->float_to_int16 = float_to_int16_sse;
287 287
             c->float_to_int16_interleave = float_to_int16_interleave_sse;
288
+#if HAVE_YASM
288 289
             c->float_interleave = float_interleave_sse;
290
+#endif
289 291
         }
290 292
         if(mm_flags & AV_CPU_FLAG_SSE2){
291 293
             c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse2;