IMG_sad_16x16


Detailed Description


Functions

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


Function Documentation

unsigned IMG_sad_16x16 ( 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 16x16 region. It returns the final accumulation.
Parameters:
srcImg 16x16 block image to look for
refImg Reference image
pitch Width of reference image
The code accepts a pointer to the 16x16 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 16x16 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)
  • This code blocks interrupts for 61 cycles
  • No bank conflicts occur
  • This code is Endian neutral
Benchmarks:
See IMGLIB_Test_Report.html for cycle and memory information.


Copyright 2012, Texas Instruments Incorporated