1mlib_VideoSumAbsDiff(3MLIB)mediaLib Library Functionsmlib_VideoSumAbsDiff(3MLIB)
2
3
4
6 mlib_VideoSumAbsDiff - motion estimation
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_s32 mlib_VideoSumAbsDiff(mlib_u8 *curr_block,
13 const mlib_u8 *ref_block, mlib_s32 width, mlib_s32 height,
14 mlib_s32 stride);
15
16
18 The mlib_VideoSumAbsDiff() function computes the sum of absolute dif‐
19 ferences between the pixels in the current block and the corresponding
20 pixels in the reference block.
21
22
23 Both the current block and the reference block belong to frames with
24 the same dimension. (The stride is applicable to both.) Motion estima‐
25 tion computes the sum of the absolute differences between the current
26 block and reference blocks at different locations in the reference
27 frame, choosing the best fit (least sum of absolute difference) to cal‐
28 culate the motion vector.
29
31 The function takes the following arguments:
32
33 curr_block Pointer to the current block. curr_block must be 8-byte
34 aligned.
35
36
37 ref_block Pointer to the reference block.
38
39
40 width Width of the block.
41
42
43 height Height of the block.
44
45
46 stride Stride, in bytes, between adjacent rows in a block.
47 stride must be a multiple of eight.
48
49
51 The function returns a value of type mlib_s32.
52
54 See attributes(5) for descriptions of the following attributes:
55
56
57
58
59 ┌─────────────────────────────┬─────────────────────────────┐
60 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
61 ├─────────────────────────────┼─────────────────────────────┤
62 │Interface Stability │Committed │
63 ├─────────────────────────────┼─────────────────────────────┤
64 │MT-Level │MT-Safe │
65 └─────────────────────────────┴─────────────────────────────┘
66
68 attributes(5)
69
70
71
72SunOS 5.11 2 Mar 2007 mlib_VideoSumAbsDiff(3MLIB)