l10n: Updates to Russian (ru) translation
[pulseaudio-mirror.git] / src / pulsecore / ffmpeg / avcodec.h
blob696fc9864ce57952689c9f5fcf693c7c728b8f29
1 /*
2 * copyright (c) 2001 Fabrice Bellard
4 * This file is part of FFmpeg.
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef AVCODEC_H
22 #define AVCODEC_H
24 /* Just a heavily bastardized version of the original file from
25 * ffmpeg, just enough to get resample2.c to compile without
26 * modification -- Lennart */
28 #if !defined(PACKAGE) && defined(HAVE_CONFIG_H)
29 #include <config.h>
30 #endif
32 #include <sys/types.h>
33 #include <inttypes.h>
34 #include <math.h>
35 #include <string.h>
36 #include <stdlib.h>
37 #include <assert.h>
39 #define av_mallocz(l) calloc(1, (l))
40 #define av_malloc(l) malloc(l)
41 #define av_realloc(p,l) realloc((p),(l))
42 #define av_free(p) free(p)
44 static inline void av_freep(void *k) {
45 void **p = k;
47 if (p) {
48 free(*p);
49 *p = NULL;
53 static inline int av_clip(int a, int amin, int amax)
55 if (a < amin) return amin;
56 else if (a > amax) return amax;
57 else return a;
60 #define av_log(a,b,c)
62 #define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
63 #define FFSIGN(a) ((a) > 0 ? 1 : -1)
65 #define FFMAX(a,b) ((a) > (b) ? (a) : (b))
66 #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
68 struct AVResampleContext;
69 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
70 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
71 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
72 void av_resample_close(struct AVResampleContext *c);
73 void av_build_filter(int16_t *filter, double factor, int tap_count, int phase_count, int scale, int type);
76 * crude lrintf for non-C99 systems.
78 #ifndef HAVE_LRINTF
79 #define lrintf(x) ((long int)(x))
80 #endif
82 #endif /* AVCODEC_H */