Changeset 347 for pjproject/trunk/pjmedia/src/pjmedia/resample.c
- Timestamp:
- Mar 21, 2006 11:59:15 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/resample.c
r323 r347 66 66 #include <pjmedia/errno.h> 67 67 #include <pj/assert.h> 68 #include <pj/log.h> 68 69 #include <pj/pool.h> 69 70 71 72 #define THIS_FILE "resample.c" 70 73 71 74 … … 192 195 #endif 193 196 194 #include "smallfilter.h" 195 #include "largefilter.h" 197 #if defined(PJMEDIA_HAS_SMALL_FILTER) && PJMEDIA_HAS_SMALL_FILTER!=0 198 # include "smallfilter.h" 199 #else 200 # define SMALL_FILTER_NMULT 0 201 # define SMALL_FILTER_SCALE 0 202 # define SMALL_FILTER_NWING 0 203 # define SMALL_FILTER_IMP NULL 204 # define SMALL_FILTER_IMPD NULL 205 #endif 206 207 #if defined(PJMEDIA_HAS_LARGE_FILTER) && PJMEDIA_HAS_LARGE_FILTER!=0 208 # include "largefilter.h" 209 #else 210 # define LARGE_FILTER_NMULT 0 211 # define LARGE_FILTER_SCALE 0 212 # define LARGE_FILTER_NWING 0 213 # define LARGE_FILTER_IMP NULL 214 # define LARGE_FILTER_IMPD NULL 215 #endif 216 196 217 197 218 #undef INLINE … … 481 502 } 482 503 504 #if !defined(PJMEDIA_HAS_LARGE_FILTER) || PJMEDIA_HAS_LARGE_FILTER==0 505 /* 506 * If large filter is excluded in the build, then prevent application 507 * from using it. 508 */ 509 if (high_quality && large_filter) { 510 large_filter = PJ_FALSE; 511 PJ_LOG(5,(THIS_FILE, 512 "Resample uses small filter because large filter is " 513 "disabled")); 514 } 515 #endif 516 517 #if !defined(PJMEDIA_HAS_SMALL_FILTER) || PJMEDIA_HAS_SMALL_FILTER==0 518 /* 519 * If small filter is excluded in the build and application wants to 520 * use it, then drop to linear conversion. 521 */ 522 if (high_quality && large_filter == 0) { 523 high_quality = PJ_FALSE; 524 PJ_LOG(4,(THIS_FILE, 525 "Resample uses linear because small filter is disabled")); 526 } 527 #endif 528 483 529 resample->factor = rate_out * 1.0 / rate_in; 484 530 resample->large_filter = large_filter;
Note: See TracChangeset
for help on using the changeset viewer.