Questions tagged [vdsp]

vDSP is the (vector) digital signal processing portion of Apple’s Accelerate framework.

vDSP is the (vector) digital signal processing portion of Apple’s Accelerate framework, part of OS X and iOS. It provides a variety of vector and array functions for signal processing and other applications. vDSP uses hardware features such as SIMD (Single Instruction Multiple Data) to provide high performance.

121 questions
3
votes
2 answers

DFT result in Swift is different than that of MATLAB

import Cocoa import Accelerate let filePath = Bundle.main.path(forResource: "sinusoid", ofType: "txt") let contentData = FileManager.default.contents(atPath: filePath!) var content = NSString(data: contentData!, encoding:…
SwiftMatt
  • 949
  • 1
  • 9
  • 19
3
votes
1 answer

packing real-to-complex FFT 2d using vDSP

I'm trying to do 2d phase correlation in iOS using vDSP. I have 2 images of the same size (width and height are powers of 2). I want to do fft on both images using vDSP_fft2d_zrip and then multiply one with the conjugate of the other. how to do…
Eran Asa
  • 31
  • 1
3
votes
1 answer

Audio Processing with Accelerate and vDSP_desamp()

I am totally new to the vdsp framework and I am trying to learn by building. My goal is for the signal to be processed in the following way: 100th order Band Pass FIR Downsampling by factor: 2 From what I could understand from Apple's…
Kaitis
  • 628
  • 9
  • 21
3
votes
2 answers

Is using a stride of 1 still critical to vDSP performance today?

In a helpful but somewhat dated November, 2006 article on vectorizing code with vDSP, the author makes the statement: Important to keep in mind is the fact that only operations with strides equal to one will deliver blazingly fast vectorized…
Kaelin Colclasure
  • 3,925
  • 1
  • 26
  • 36
3
votes
3 answers

C versus vDSP versus NEON - How could NEON be as slow as C?

How could NEON be as slow as C? I have been trying to build a fast Histogram function that would bucket incoming values into ranges by assigning them a value - which is the range threshold they are closest to. This is something that would be applied…
Khaled Barazi
  • 8,681
  • 6
  • 42
  • 62
3
votes
2 answers

FFT with iOS vDSP not symmetrical

I'm using Apples vDSP APIs to calculate the FFT of audio. However, my results (in amp[]) aren't symmetrical around N/2, which they should be, from my understanding of FFTs on real inputs? In the below frame is an array[128] of floats containing the…
Mark
  • 1,754
  • 3
  • 26
  • 43
3
votes
2 answers

Noise/distortion after doing filters with vDSP_deq22 (biquad IIR filter)

I'm working on a DSP class (obj-c++) for Novocaine, but my filters only seem to cause noise/distortion on the signal. I've posted my full code and coefficients here: https://gist.github.com/2702844 But it basically boils down to: //…
sougonde
  • 3,438
  • 3
  • 26
  • 35
2
votes
0 answers

detect light pulse from camera

I'm trying to implement an heart beat detector algorithm for iPhone It's for educational purposes considering the fact that there are already several apps doing that... I've got this functions to get the variation of colors in my frames... -…
Progeny
  • 672
  • 1
  • 11
  • 25
2
votes
1 answer

Swift. frequency of sound got from vDSP.DCT output differs from iPhone and iPad

I'm trying to figure out the amplitude of each frequency of sound captured by microphone. Just like this example https://developer.apple.com/documentation/accelerate/visualizing_sound_as_an_audio_spectrogram I captured sample from microphone to…
dpr
  • 319
  • 1
  • 6
2
votes
0 answers

Using Swift Generics to Call a Non-Generic Library

I'm trying to write a generic Swift wrapper for some of the vector operations in the Accelerate vDSP framework and I'm running into a problem calling the functions in a generic way. My vector struct looks like: public struct Vector { let array:…
jkanji
  • 21
  • 1
2
votes
1 answer

How to include the vDSP-Framework (iOS)?

I have problems to include the vDSP-Framework. I thought it is just that steps todo: #include void test() { float a[1024], b[1024], c[1024]; vDSP_vmul( a, 1, b, 1, c, 1, 1024 ); } but if i try to build,I get an…
user770961
  • 55
  • 3
2
votes
1 answer

Implementing an FFT using vDSP

I have data regarding the redness of the user's finger that is currently quite noisy, so I'd like to run it through an FFT to reduce the noise. The data on the left side of this image is similar to my data currently. I've familiarized myself with…
fi12
  • 495
  • 11
  • 30
2
votes
1 answer

Better way to use ArraySlice with Accelerate functions?

I have some very large arrays that I have to perform millions of computations on. In Objective-C, the arrays would be stored as NSData and I'd abstract them to C arrays to use the Accelerate functions on (sum, add, etc). However, (given the obvious…
Adam Jones
  • 775
  • 6
  • 23
2
votes
3 answers

Incorrect results with vDSP_conv()

I am getting inconsitent results when attempting to do convolution using vDSP_conv() from Accelerate when compared to the MATLAB implementation. There have been a couple of StackOverflow posts about weird results when using this function to…
hyperdelia
  • 1,105
  • 6
  • 26
2
votes
0 answers

iOS - Simple Resampling audio function for iOS

I am using Novocaine for recording audio, for an audio processing iOS app. I have a custom audio filter, which I apply after recording. Now I want the Audio to be resampled at 8kHz. So basically I need a simple module/function in which I pass the…
Muhammad Sadiq Alvi
  • 1,099
  • 1
  • 13
  • 23
1
2
3
8 9