Recalculate point of interest considering format switching

Could you help me to solve problem with AVFoundation? I have to recalculate point of interest on camera frame considering format switching.


Example:

1. Camera switch to first format

<AVCaptureDeviceFormat: 0x17000cb70 'vide'/'420v' 3264x2448, { 2- 30 fps}, fov:58.080, max zoom:153.00 (upscales @1.00), AF System:1, ISO:34.0-2176.0, SS:0.000024-0.500000>

2. User defines control point on previe

3. Camera switches to another format

<AVCaptureDeviceFormat: 0x17000cb10 'vide'/'420v' 1280x720, { 3-120 fps}, fov:58.080, binned, supports vis, max zoom:52.00 (upscales @1.16), AF System:1, ISO:34.0-1088.0, SS:0.000012-0.333333>

Control point still on previous position but point of inteset does not match origin point anymore because image on preview now has offset. The problem is different aspect ratio in different formats 3264x2448 vs 1280x 720.


I've also played with different preview layer videoGravity values.