IMG_sad_8x8


Detailed Description


Functions

unsigned IMG_sad_8x8 (const unsigned char *restrict srcImg, const unsigned char *restrict refImg, int pitch)


Function Documentation

unsigned IMG_sad_8x8 ( const unsigned char *restrict  srcImg,
const unsigned char *restrict  refImg,
int  pitch 
)

Description:
The algorithm takes the difference between the pixel values in the source image block and the corresponding pixels in the reference image. It then takes the absolute values of these differences, and accumulates them over the entire 8x8 region. It returns the final accumulation.
Parameters:
srcImg Source 8x8 image block
refImg Reference image to search
pitch Width of reference image
The code accepts a pointer to the 8x8 source block (srcImg), and a pointer to the upper-left corner of a target position in a reference image (refImg). The width of the reference image is given by the pitch argument.
The function returns the sum of the absolute differences between the source block and the 8x8 region pointed to in the reference image.
Assumptions:
  • srcImg should be 32-bit aligned
Implementation Notes:
  • This code is compatible with C66x processors (though not optimized)
  • No bank conflicts occur for this kernel
  • This code suppresses interrupts for 25 cycles
  • This kernel is Endian neutral
Benchmarks:
See IMGLIB_Test_Report.html for cycle and memory information.


Copyright 2012, Texas Instruments Incorporated