Dear James22,
Could you please refer to the following NvMedia related docs for your topic?
Affine transform:
https://docs.nvidia.com/drive/drive_os_5.1.6.1L/nvvib_docs/index.html#page/DRIVE_OS_Linux_SDK_Development_Guide/NvMedia/nvmedia_concept_ipp.html