From e98a95e7792f9452bc790f2552d9ea24d0f7818e Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 18 May 2011 20:18:08 -0400 Subject: [PATCH 1/3] 10l: wrap float_interleave functions in HAVE_YASM. fixes compilation with --disable-yasm --- libavcodec/x86/fmtconvert_mmx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/x86/fmtconvert_mmx.c b/libavcodec/x86/fmtconvert_mmx.c index 61a4272a69..253f60bfc2 100644 --- a/libavcodec/x86/fmtconvert_mmx.c +++ b/libavcodec/x86/fmtconvert_mmx.c @@ -235,6 +235,7 @@ static void float_to_int16_interleave_3dn2(int16_t *dst, const float **src, long float_to_int16_interleave_3dnow(dst, src, len, channels); } +#if HAVE_YASM void ff_float_interleave2_mmx(float *dst, const float **src, unsigned int len); void ff_float_interleave2_sse(float *dst, const float **src, unsigned int len); @@ -262,13 +263,16 @@ static void float_interleave_sse(float *dst, const float **src, else ff_float_interleave_c(dst, src, len, channels); } +#endif void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx) { int mm_flags = av_get_cpu_flags(); if (mm_flags & AV_CPU_FLAG_MMX) { +#if HAVE_YASM c->float_interleave = float_interleave_mmx; +#endif if(mm_flags & AV_CPU_FLAG_3DNOW){ if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ @@ -285,7 +289,9 @@ void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx) c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse; c->float_to_int16 = float_to_int16_sse; c->float_to_int16_interleave = float_to_int16_interleave_sse; +#if HAVE_YASM c->float_interleave = float_interleave_sse; +#endif } if(mm_flags & AV_CPU_FLAG_SSE2){ c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse2; From a2077b85da5bf71167b11925aabbb738558a134d Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 17 May 2011 15:29:58 +0200 Subject: [PATCH 2/3] g729: Merge g729.h into g729dec.c. The header contains just a single define that is only used in g729dec.c. --- libavcodec/g729.h | 29 ----------------------------- libavcodec/g729dec.c | 7 ++++++- 2 files changed, 6 insertions(+), 30 deletions(-) delete mode 100644 libavcodec/g729.h diff --git a/libavcodec/g729.h b/libavcodec/g729.h deleted file mode 100644 index 9cae471bc2..0000000000 --- a/libavcodec/g729.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * G.729 decoder - * Copyright (c) 2008 Vladimir Voroshilov - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -#ifndef AVCODEC_G729_H -#define AVCODEC_G729_H - -/** - * subframe size - */ -#define SUBFRAME_SIZE 40 - -#endif // AVCODEC_G729_H diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c index 5763108d71..979b87fd27 100644 --- a/libavcodec/g729dec.c +++ b/libavcodec/g729dec.c @@ -30,7 +30,6 @@ #include "libavutil/avutil.h" #include "get_bits.h" -#include "g729.h" #include "lsp.h" #include "celp_math.h" #include "acelp_filters.h" @@ -71,6 +70,12 @@ */ #define SHARP_MAX 13017 +/** + * subframe size + */ +#define SUBFRAME_SIZE 40 + + typedef struct { uint8_t ac_index_bits[2]; ///< adaptive codebook index for second subframe (size in bits) uint8_t parity_bit; ///< parity bit for pitch delay From ea91e77127229015d23a046f1797d3fc6a33e54d Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 15 May 2011 17:09:25 +0200 Subject: [PATCH 3/3] Clean up #includes in cmdutils.h. inttypes.h is not necessary, just stdint.h is enough. Unconditionally #include avfilter.h in cmdutils.h. It is an installed header with no non-standard external dependencies, so it is safe. --- cmdutils.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cmdutils.h b/cmdutils.h index bb8d779a75..c99c8653fa 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -22,8 +22,10 @@ #ifndef FFMPEG_CMDUTILS_H #define FFMPEG_CMDUTILS_H -#include +#include + #include "libavcodec/avcodec.h" +#include "libavfilter/avfilter.h" #include "libavformat/avformat.h" #include "libswscale/swscale.h" @@ -278,9 +280,6 @@ int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t pts, int64_t dts); FILE *get_preset_file(char *filename, size_t filename_size, const char *preset_name, int is_path, const char *codec_name); -#if CONFIG_AVFILTER -#include "libavfilter/avfilter.h" - typedef struct { enum PixelFormat pix_fmt; } FFSinkContext; @@ -296,6 +295,4 @@ extern AVFilter ffsink; int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, AVFilterBufferRef **picref, AVRational *pts_tb); -#endif /* CONFIG_AVFILTER */ - #endif /* FFMPEG_CMDUTILS_H */