HEVC Test Model With OpenCL Motion Estimation
HEVC Test Model version 16.4 with a module for performing the Motion Estimation process using a GPU. In this proyect is used OpenCL as parallel programming framework.
- TEncOpenCL class: Module for Motion Estimation with OpenCL and it was included in source/Lib/TLibEncoder/ path. This class performs two task:
- Check the OpenCL conditions for the system (search a OpenCL device support, init OpenCL variables)
- Execute the module in the GPU
- TEncOpenCL::findDevices method:verify that the system meets the conditions for running OpenCL (search OpenCL platform and search OpenCL device)
- TEncOpenCL::compileKernelSource method: initialize the OpenCL variables. Moreover read and compile the OpenCl kernel
- TEncOpenCL::calcMotionVectors method: Load the pixels of CTU and search area into the input buffers, calculate the sum of absolute differences for one CTU and store the information into temporal buffers for the calculus of motion vectors and rate-distortion cost
- sad.cl file: Kernel source code for Sum of Absolute differences calculation. This file was included in cl/ path
- EncTop class: function for calling the OpenCL methods was added. Based of system verification show a activation of OpenCL message
- TAppEncCfg class: Options OpenCL, OpenCLDevice and KernelOpenCL was added in the class in order to configuration file recognize them
- TEncSearch class: two 3d-array was added:
- TComMv allMotionVectors[2][33][NUM_CTU_PARTS]
- Distortion allRuiCost[2][33][NUM_CTU_PARTS]
- TComDataCU class: The method getIndexBlock was created for mapping the CU index with motion vectors and distortion cost 3D-arrays
- TEncSearch::xMotionEstimation Method: a condicitonal was added in order to select either motion estimation is performed for the GPU or performed in CPU (no parallel)
- OpenCL: int (0: disabled - 1: enabled)
- OpenCLDevice: int (OpenCL device ID)
- KernelOpenCL: : string (path of file "sad.cl")
For more information of HEVC Test Model can to visit the next link:
https://hevc.hhi.fraunhofer.de/