Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.

## Replacement for ippiAddRotateShift()?

Beginner
209 Views

I have to port some legacy code from IPP 7.0 to current IPP 9.0. Unfortunately the former function

```ippiAddRotateShift (double xCenter, double yCenter, double angle, double * xShift, double * yShift)
```

is deleted without replacement in IPP 9.0:

https://software.intel.com/en-us/ipp-dev-reference-appendix-c-removed-functions-for-image-and-video-...

What's the calculation rule of that function? How can i calculate xShift and yShift?

1 Solution
Employee
209 Views

Hi Stefan,

Please use the following code to compute xShift and yShift:

```void AddRotateShift(double xCenter, double yCenter, double angle, double *xShift, double *yShift)
{
double  sx, sy;

ippiGetRotateShift(xCenter, yCenter, angle, &sx, &sy);
*xShift += sx;
*yShift += sy;

return;
}```

Thanks,
Valentin

2 Replies
Employee
210 Views

Hi Stefan,

Please use the following code to compute xShift and yShift:

```void AddRotateShift(double xCenter, double yCenter, double angle, double *xShift, double *yShift)
{
double  sx, sy;

ippiGetRotateShift(xCenter, yCenter, angle, &sx, &sy);
*xShift += sx;
*yShift += sy;

return;
}```

Thanks,
Valentin

Beginner
209 Views

Thank you very much Valentin for your quick answer. Your suggestion works great!