Converts a conventional order to the zigzag order.
IppStatus ippiZigzagFwd8x8_16s_C1(const Ipp16s* pSrc, Ipp16s* pDst);
pSrc |
Pointer to the source data. |
pDst |
Pointer to the destination data. |
The function ippiZigzagFwd8x8 is declared in the ippi.h file. This function rearranges data in an 8x8 block from a conventional order (left-to-right, top-to-bottom) to the zigzag sequence.
Figure Zigzag Sequence specifies the resulting zigzag sequence.
Example “Using ippiZigzagFwd8x8” shows how to use the ippiZigzagFwd8x8_16s_C1 function.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when any of the specified pointers is NULL. |
Ipp16s src[8*8] = {
0, 1, 5, 7, 9, 2, 4, 1,
5, 4, 8, 6, 3, 8, 0, 3,
6, 2, 6, 8, 1, 4, 2, 8,
4, 3, 2, 9, 3, 0, 6, 6,
7, 7, 3, 0, 4, 1, 0, 9,
5, 1, 9, 2, 5, 7, 1, 7,
0, 3, 5, 0, 7, 5, 9, 8,
2, 9, 1, 4, 6, 8, 2, 3
};
Ipp16s dst[8*8];
ippiZigzagFwd8x8_16s_C1 ( src, dst );
Result:
0 1 5 7 9 2 4 1
5 4 8 6 3 8 0 3
6 2 6 8 1 4 2 8
4 3 2 9 3 0 6 6 src //conventional order
7 7 3 0 4 1 0 9
5 1 9 2 5 7 1 7
0 3 5 0 7 5 9 8
2 9 1 4 6 8 2 3
0 1 5 6 4 5 7 8
2 4 7 3 6 6 9 2
3 8 2 7 5 0 1 3
9 1 8 4 1 0 4 3 dst //zigzag order
0 9 3 2 9 5 2 4
0 2 3 8 6 1 5 0
1 4 7 7 0 6 9 1
5 6 8 9 7 8 2 3
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.