Mercurial > libavcodec.hg
annotate liba52/resample.c @ 3735:6c407dc6ab4a libavcodec
Inform the user that a certain AVOption is out of range.
| author | takis |
|---|---|
| date | Wed, 20 Sep 2006 08:28:24 +0000 |
| parents | e2aafe2aa2df |
| children | 2d53ef5a97cb |
| rev | line source |
|---|---|
| 3696 | 1 /* |
| 2 * copyright (C) 2001 Arpad Gereoffy | |
| 3 * | |
| 4 * This file is part of a52dec, a free ATSC A-52 stream decoder. | |
| 5 * See http://liba52.sourceforge.net/ for updates. | |
| 6 * | |
| 7 * a52dec is free software; you can redistribute it and/or modify | |
| 8 * it under the terms of the GNU General Public License as published by | |
| 9 * the Free Software Foundation; either version 2 of the License, or | |
| 10 * (at your option) any later version. | |
| 11 * | |
| 12 * a52dec is distributed in the hope that it will be useful, | |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 * GNU General Public License for more details. | |
| 16 * | |
| 17 * You should have received a copy of the GNU General Public License | |
| 18 * along with this program; if not, write to the Free Software | |
| 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 20 */ | |
| 1193 | 21 |
| 22 // a52_resample_init should find the requested converter (from type flags -> | |
| 23 // given number of channels) and set up some function pointers... | |
| 24 | |
| 25 // a52_resample() should do the conversion. | |
| 26 | |
| 27 #include "a52.h" | |
| 28 #include "mm_accel.h" | |
| 29 #include "config.h" | |
| 3330 | 30 #include "../../libpostproc/mangle.h" |
| 1193 | 31 |
| 32 int (* a52_resample) (float * _f, int16_t * s16)=NULL; | |
| 33 | |
| 34 #include "resample_c.c" | |
| 35 | |
| 36 #ifdef ARCH_X86 | |
| 37 #include "resample_mmx.c" | |
| 38 #endif | |
| 39 | |
| 40 void* a52_resample_init(uint32_t mm_accel,int flags,int chans){ | |
| 41 void* tmp; | |
| 42 | |
| 43 #ifdef ARCH_X86 | |
| 44 if(mm_accel&MM_ACCEL_X86_MMX){ | |
| 45 tmp=a52_resample_MMX(flags,chans); | |
| 46 if(tmp){ | |
|
1602
fdb8244da1e5
av_log patch(2 of ?) by (Michel Bardiaux <mbardiaux at peaktime dot be>)
michael
parents:
1412
diff
changeset
|
47 if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "Using MMX optimized resampler\n"); |
| 1193 | 48 a52_resample=tmp; |
| 49 return tmp; | |
| 50 } | |
| 51 } | |
| 52 #endif | |
| 53 | |
| 54 tmp=a52_resample_C(flags,chans); | |
| 55 if(tmp){ | |
|
1602
fdb8244da1e5
av_log patch(2 of ?) by (Michel Bardiaux <mbardiaux at peaktime dot be>)
michael
parents:
1412
diff
changeset
|
56 if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "No accelerated resampler found\n"); |
| 1193 | 57 a52_resample=tmp; |
| 58 return tmp; | |
| 59 } | |
| 2967 | 60 |
|
1602
fdb8244da1e5
av_log patch(2 of ?) by (Michel Bardiaux <mbardiaux at peaktime dot be>)
michael
parents:
1412
diff
changeset
|
61 av_log(NULL, AV_LOG_ERROR, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans); |
| 1193 | 62 return NULL; |
| 63 } |
