Changeset 03df4dc


Ignore:
Timestamp:
Oct 4, 2017, 1:12:02 PM (7 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/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
53457f6
Parents:
2e5c52e
Message:

src/spectral/dct_ipp.c: share buffers for Fwd and Inv

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/dct_ipp.c

    r2e5c52e r03df4dc  
    5353  Ipp8u* pSpecBuffer;
    5454  Ipp8u* pBuffer;
    55   Ipp8u* pSpecInv;
    56   Ipp8u* pSpecBufferInv;
    57   Ipp8u* pBufferInv;
    5855  aubio_ippsDCTFwdSpec* pFwdDCTSpec;
    5956  aubio_ippsDCTInvSpec* pInvDCTSpec;
     
    10198  //    pBufferSize);
    10299
    103   s->pSpecInv = ippsMalloc_8u(pSpecSize);
    104   if (pSpecSize > 0) {
    105     s->pSpecBufferInv = ippsMalloc_8u(pSpecBufferSize);
    106   } else {
    107     s->pSpecBufferInv = NULL;
    108   }
    109   s->pBufferInv = ippsMalloc_8u(pBufferSize);
    110 
    111100  status = aubio_ippsDCTFwdInit(&(s->pFwdDCTSpec), size, qualityHint, s->pSpec,
    112101      s->pSpecBuffer);
     
    116105  }
    117106
    118   status = aubio_ippsDCTInvInit(&(s->pInvDCTSpec), size, qualityHint,
    119       s->pSpecInv, s->pSpecBufferInv);
     107  status = aubio_ippsDCTInvInit(&(s->pInvDCTSpec), size, qualityHint, s->pSpec,
     108      s->pSpecBuffer);
    120109  if (status != ippStsNoErr) {
    121110    AUBIO_ERR("dct: failed to initialize inv dct. IPP error: %d\n", status);
     
    136125  ippFree(s->pSpecBuffer);
    137126  ippFree(s->pBuffer);
    138   ippFree(s->pSpecInv);
    139   ippFree(s->pSpecBufferInv);
    140   ippFree(s->pBufferInv);
    141127  AUBIO_FREE(s);
    142128}
Note: See TracChangeset for help on using the changeset viewer.