MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / addTonalComponents

Function addTonalComponents

libavcodec/atrac3.c:524–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522 */
523
524static int addTonalComponents (float *pSpectrum, int numComponents, tonal_component *pComponent)
525{
526 int cnt, i, lastPos = -1;
527 float *pIn, *pOut;
528
529 for (cnt = 0; cnt < numComponents; cnt++){
530 lastPos = FFMAX(pComponent[cnt].pos + pComponent[cnt].numCoefs, lastPos);
531 pIn = pComponent[cnt].coef;
532 pOut = &(pSpectrum[pComponent[cnt].pos]);
533
534 for (i=0 ; i<pComponent[cnt].numCoefs ; i++)
535 pOut[i] += pIn[i];
536 }
537
538 return lastPos;
539}
540
541
542#define INTERPOLATE(old,new,nsample) ((old) + (nsample)*0.125*((new)-(old)))

Callers 1

decodeChannelSoundUnitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected