Libav 0.7.1
libavcodec/fmtconvert.h
Go to the documentation of this file.
00001 /*
00002  * Format Conversion Utils
00003  * Copyright (c) 2000, 2001 Fabrice Bellard
00004  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
00005  *
00006  * This file is part of Libav.
00007  *
00008  * Libav is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * Libav is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with Libav; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00021  */
00022 
00023 #ifndef AVCODEC_FMTCONVERT_H
00024 #define AVCODEC_FMTCONVERT_H
00025 
00026 #include "avcodec.h"
00027 
00028 typedef struct FmtConvertContext {
00038     void (*int32_to_float_fmul_scalar)(float *dst, const int *src, float mul, int len);
00039 
00053     void (*float_to_int16)(int16_t *dst, const float *src, long len);
00054 
00069     void (*float_to_int16_interleave)(int16_t *dst, const float **src,
00070                                       long len, int channels);
00071 
00075     void (*float_interleave)(float *dst, const float **src, unsigned int len,
00076                              int channels);
00077 } FmtConvertContext;
00078 
00079 void ff_float_interleave_c(float *dst, const float **src, unsigned int len,
00080                            int channels);
00081 
00082 void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx);
00083 
00084 void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx);
00085 void ff_fmt_convert_init_altivec(FmtConvertContext *c, AVCodecContext *avctx);
00086 void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx);
00087 
00088 #endif /* AVCODEC_FMTCONVERT_H */