<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vDSP_vdbcon",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vDSP_vdbcon"
  },
  "title" : "vDSP_vdbcon"
}
-->

# vDSP_vdbcon

Converts single-precision power or amplitude values to decibel values.

```
extern void vDSP_vdbcon(const float *__A, vDSP_Stride __IA, const float *__B, float *__C, vDSP_Stride __IC, vDSP_Length __N, unsigned int __F);
```

## Parameters

`__A`

The input vector.

`__IA`

The distance between the elements in the input vector.

`__B`

The zero reference that the function uses for the conversion.

`__C`

The output vector.

`__IC`

The distance between the elements in the output vector.` `

`__N`

The number of elements that the function processes.

`__F`

A value that specifies whether the function converts from power values or amplitude values. Set to `0` to specify power or `1` to specify amplitude.

## Discussion

The function uses the following calculation to perform the conversion:

```swift
If Flag is 1:
    alpha = 20;
If Flag is 0:
    alpha = 10;

for (n = 0; n < N; ++n)
    C[n] = alpha * log10(A[n] / B[0]);
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)