Commit 3c7650a8 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 75a37b57 ea91e771
...@@ -22,8 +22,10 @@ ...@@ -22,8 +22,10 @@
#ifndef FFMPEG_CMDUTILS_H #ifndef FFMPEG_CMDUTILS_H
#define FFMPEG_CMDUTILS_H #define FFMPEG_CMDUTILS_H
#include <inttypes.h> #include <stdint.h>
#include "libavcodec/avcodec.h" #include "libavcodec/avcodec.h"
#include "libavfilter/avfilter.h"
#include "libavformat/avformat.h" #include "libavformat/avformat.h"
#include "libswscale/swscale.h" #include "libswscale/swscale.h"
...@@ -255,9 +257,6 @@ int read_file(const char *filename, char **bufptr, size_t *size); ...@@ -255,9 +257,6 @@ int read_file(const char *filename, char **bufptr, size_t *size);
FILE *get_preset_file(char *filename, size_t filename_size, FILE *get_preset_file(char *filename, size_t filename_size,
const char *preset_name, int is_path, const char *codec_name); const char *preset_name, int is_path, const char *codec_name);
#if CONFIG_AVFILTER
#include "libavfilter/avfilter.h"
typedef struct { typedef struct {
enum PixelFormat pix_fmt; enum PixelFormat pix_fmt;
} FFSinkContext; } FFSinkContext;
...@@ -273,6 +272,4 @@ extern AVFilter ffsink; ...@@ -273,6 +272,4 @@ extern AVFilter ffsink;
int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame,
AVFilterBufferRef **picref, AVRational *pts_tb); AVFilterBufferRef **picref, AVRational *pts_tb);
#endif /* CONFIG_AVFILTER */
#endif /* FFMPEG_CMDUTILS_H */ #endif /* FFMPEG_CMDUTILS_H */
/*
* G.729 decoder
* Copyright (c) 2008 Vladimir Voroshilov
*
* This file is part of FFmpeg.
*
* FFmpeg 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.
*
* FFmpeg 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 FFmpeg; 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
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "libavutil/avutil.h" #include "libavutil/avutil.h"
#include "get_bits.h" #include "get_bits.h"
#include "g729.h"
#include "lsp.h" #include "lsp.h"
#include "celp_math.h" #include "celp_math.h"
#include "acelp_filters.h" #include "acelp_filters.h"
...@@ -71,6 +70,12 @@ ...@@ -71,6 +70,12 @@
*/ */
#define SHARP_MAX 13017 #define SHARP_MAX 13017
/**
* subframe size
*/
#define SUBFRAME_SIZE 40
typedef struct { typedef struct {
uint8_t ac_index_bits[2]; ///< adaptive codebook index for second subframe (size in bits) uint8_t ac_index_bits[2]; ///< adaptive codebook index for second subframe (size in bits)
uint8_t parity_bit; ///< parity bit for pitch delay 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,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); 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_mmx(float *dst, const float **src, unsigned int len);
void ff_float_interleave2_sse(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, ...@@ -262,13 +263,16 @@ static void float_interleave_sse(float *dst, const float **src,
else else
ff_float_interleave_c(dst, src, len, channels); ff_float_interleave_c(dst, src, len, channels);
} }
#endif
void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx) void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx)
{ {
int mm_flags = av_get_cpu_flags(); int mm_flags = av_get_cpu_flags();
if (mm_flags & AV_CPU_FLAG_MMX) { if (mm_flags & AV_CPU_FLAG_MMX) {
#if HAVE_YASM
c->float_interleave = float_interleave_mmx; c->float_interleave = float_interleave_mmx;
#endif
if(mm_flags & AV_CPU_FLAG_3DNOW){ if(mm_flags & AV_CPU_FLAG_3DNOW){
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
...@@ -285,7 +289,9 @@ void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx) ...@@ -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->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse;
c->float_to_int16 = float_to_int16_sse; c->float_to_int16 = float_to_int16_sse;
c->float_to_int16_interleave = float_to_int16_interleave_sse; c->float_to_int16_interleave = float_to_int16_interleave_sse;
#if HAVE_YASM
c->float_interleave = float_interleave_sse; c->float_interleave = float_interleave_sse;
#endif
} }
if(mm_flags & AV_CPU_FLAG_SSE2){ if(mm_flags & AV_CPU_FLAG_SSE2){
c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse2; c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment