Changeset bbfa9a4 for src/spectral/dct.c


Ignore:
Timestamp:
Nov 26, 2018, 6:53:43 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
adc6e02
Parents:
8a11e2f (diff), db3eb5c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into feature/pytest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/dct.c

    r8a11e2f rbbfa9a4  
    8282aubio_dct_t* new_aubio_dct (uint_t size) {
    8383  aubio_dct_t * s = AUBIO_NEW(aubio_dct_t);
    84   if ((sint_t)size <= 0) goto beach;
    8584#if defined(HAVE_ACCELERATE)
    8685  // vDSP supports sizes = f * 2 ** n, where n >= 4 and f in [1, 3, 5, 15]
     
    8988    uint_t radix = size;
    9089    uint_t order = 0;
    91     while ((radix / 2) * 2 == radix) {
     90    while ((radix >= 1) && ((radix / 2) * 2 == radix)) {
    9291      radix /= 2;
    9392      order++;
     
    113112    return s;
    114113  } else {
    115     AUBIO_WRN("dct: unexcepected error while creating dct_fftw with size %d",
     114    AUBIO_WRN("dct: unexpected error while creating dct_fftw with size %d\n",
    116115        size);
    117116    goto plain;
     
    126125    return s;
    127126  } else {
    128     AUBIO_WRN("dct: unexcepected error while creating dct_ipp with size %d",
     127    AUBIO_WRN("dct: unexpected error while creating dct_ipp with size %d\n",
    129128        size);
    130129    goto plain;
     
    144143#endif
    145144  // falling back to plain mode
    146   AUBIO_WRN("dct: d no optimised implementation could be created for size %d",
     145  AUBIO_WRN("dct: no optimised implementation could be created for size %d\n",
    147146      size);
    148147plain:
     
    157156  }
    158157beach:
    159   AUBIO_ERROR("dct: failed creating with size %d, should be > 0", size);
    160   AUBIO_FREE (s);
     158  AUBIO_ERROR("dct: failed creating with size %d, should be > 0\n", size);
     159  del_aubio_dct(s);
    161160  return NULL;
    162161}
Note: See TracChangeset for help on using the changeset viewer.