diff options
| author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-03-01 03:05:13 +0100 |
|---|---|---|
| committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-03-01 03:05:13 +0100 |
| commit | 1d0b3b20c34517b9d1ddf3ea347776304b0c4b44 (patch) | |
| tree | 89f4fc640c2becc6f00ae08996754952ecf149c1 /contrib/ffmpeg/libavcodec/resample2.c | |
| parent | 09496ad3469a0ade8dbd9a351e639b78f20b7942 (diff) | |
| download | xine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.gz xine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.bz2 | |
Update internal FFmpeg copy.
Diffstat (limited to 'contrib/ffmpeg/libavcodec/resample2.c')
| -rw-r--r-- | contrib/ffmpeg/libavcodec/resample2.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/contrib/ffmpeg/libavcodec/resample2.c b/contrib/ffmpeg/libavcodec/resample2.c index 4209b9705..da1443d98 100644 --- a/contrib/ffmpeg/libavcodec/resample2.c +++ b/contrib/ffmpeg/libavcodec/resample2.c @@ -17,7 +17,6 @@ * 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 - * */ /** @@ -27,7 +26,6 @@ */ #include "avcodec.h" -#include "common.h" #include "dsputil.h" #ifndef CONFIG_RESAMPLE_HP @@ -95,7 +93,7 @@ static double bessel(double x){ * @param type 0->cubic, 1->blackman nuttall windowed sinc, 2..16->kaiser windowed sinc beta=2..16 */ void av_build_filter(FELEM *filter, double factor, int tap_count, int phase_count, int scale, int type){ - int ph, i, v; + int ph, i; double x, y, w, tab[tap_count]; const int center= (tap_count-1)/2; @@ -178,8 +176,8 @@ void av_build_filter(FELEM *filter, double factor, int tap_count, int phase_coun } /** - * initalizes a audio resampler. - * note, if either rate is not a integer then simply scale both rates up so they are + * Initializes an audio resampler. + * Note, if either rate is not an integer then simply scale both rates up so they are. */ AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff){ AVResampleContext *c= av_mallocz(sizeof(AVResampleContext)); @@ -281,7 +279,7 @@ int av_resample(AVResampleContext *c, short *dst, short *src, int *consumed, int } #ifdef CONFIG_RESAMPLE_AUDIOPHILE_KIDDY_MODE - dst[dst_index] = av_clip(lrintf(val), -32768, 32767); + dst[dst_index] = av_clip_int16(lrintf(val)); #else val = (val + (1<<(FILTER_SHIFT-1)))>>FILTER_SHIFT; dst[dst_index] = (unsigned)(val + 32768) > 65535 ? (val>>31) ^ 32767 : val; |
