'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_VideoSumAbsDiff 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_VideoSumAbsDiff \- motion estimation .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_s32\fR \fBmlib_VideoSumAbsDiff\fR(\fBmlib_u8 *\fR\fIcurr_block\fR, \fBconst mlib_u8 *\fR\fIref_block\fR, \fBmlib_s32\fR \fIwidth\fR, \fBmlib_s32\fR \fIheight\fR, \fBmlib_s32\fR \fIstride\fR); .fi .SH DESCRIPTION .sp .LP The \fBmlib_VideoSumAbsDiff()\fR function computes the sum of absolute differences between the pixels in the current block and the corresponding pixels in the reference block. .sp .LP Both the current block and the reference block belong to frames with the same dimension. (The stride is applicable to both.) Motion estimation computes the sum of the absolute differences between the current block and reference blocks at different locations in the reference frame, choosing the best fit (least sum of absolute difference) to calculate the motion vector. .SH PARAMETERS .sp .LP The function takes the following arguments: .sp .ne 2 .mk .na \fB\fIcurr_block\fR\fR .ad .RS 14n .rt Pointer to the current block. curr_block must be 8-byte aligned. .RE .sp .ne 2 .mk .na \fB\fIref_block\fR\fR .ad .RS 14n .rt Pointer to the reference block. .RE .sp .ne 2 .mk .na \fB\fIwidth\fR\fR .ad .RS 14n .rt Width of the block. .RE .sp .ne 2 .mk .na \fB\fIheight\fR\fR .ad .RS 14n .rt Height of the block. .RE .sp .ne 2 .mk .na \fB\fIstride\fR\fR .ad .RS 14n .rt Stride, in bytes, between adjacent rows in a block. stride must be a multiple of eight. .RE .SH RETURN VALUES .sp .LP The function returns a value of type \fBmlib_s32\fR. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBattributes\fR(5)