1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * Header file for block handling functions. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifndef __BLKFUNC_H |
|
23 #define __BLKFUNC_H |
|
24 |
|
25 #include "epoclib.h" |
|
26 |
|
27 // General-purpose clip tables for signed and unsigned chars. |
|
28 // Both of these tables range from -2048 to +2047. |
|
29 |
|
30 extern const u_char unsignedCharClip[]; |
|
31 extern const char signedCharClip[]; // MH |
|
32 |
|
33 /* |
|
34 * |
|
35 * blcAddBlock |
|
36 * |
|
37 * Parameters: |
|
38 * block block array |
|
39 * frame_p pointer to present frame in the place, |
|
40 * where the block is added |
|
41 * xSize X size of the frame. |
|
42 * mbPlace flag that indicates the place for the current |
|
43 * macroblock inside the macroblock row: |
|
44 * -1 beginning of row |
|
45 * 0 middle of row |
|
46 * 1 end of row |
|
47 * fourMVs 1 if Advanced Prediction Mode is used, otherwise 0 |
|
48 * prevDiffBlock if fourMVs == 1 and mbPlace <= 0 the difference |
|
49 * block is stored to prevDiffBlock for later use |
|
50 * |
|
51 * Function: |
|
52 * This function sums the given block into block being currently decoded in |
|
53 * present frame. Parameters are the table consisting a block, a pointer to |
|
54 * the frame at the correct place and the width of the frame. |
|
55 * |
|
56 * Returns: |
|
57 * Nothing. |
|
58 * |
|
59 * Error codes: |
|
60 * None. |
|
61 * |
|
62 */ |
|
63 |
|
64 void __cdecl blcAddBlockAsm(int *block, u_char *frame_p, int xSize, |
|
65 int mbPlace, u_char fourMVs, int *prevDiffBlock); |
|
66 |
|
67 /* |
|
68 * |
|
69 * blcMixBlocks |
|
70 * |
|
71 * Parameters: |
|
72 * dest Destination pointer |
|
73 * src Source pointer |
|
74 * yn Y size of the block |
|
75 * xn X size of the block (0-16) |
|
76 * ydiff X line length of the destination block |
|
77 * sydiff X line length of the source block |
|
78 * |
|
79 * Function: |
|
80 * This function replaces all the pixels in the destination block with |
|
81 * an average calculated from the corresponding source and destination |
|
82 * block pixels. |
|
83 * |
|
84 * Returns: |
|
85 * Nothing. |
|
86 * |
|
87 * Error codes: |
|
88 * None. |
|
89 * |
|
90 */ |
|
91 |
|
92 void __cdecl blcMixBlocks( u_char *dest, u_char *src, int yn, int xn, |
|
93 int ydiff, int sydiff ); |
|
94 |
|
95 /* |
|
96 * |
|
97 * blcMixOverlapped |
|
98 * |
|
99 * Parameters: |
|
100 * blkBuf Source blocks: |
|
101 * 64b whole, 32b left, 32b right, 32b up, 32b down |
|
102 * dest Destination pointer |
|
103 * ddelta Delta for destination lines |
|
104 * |
|
105 * Function: |
|
106 * Calculates weighted averages of several macroblock pieces - see |
|
107 * function blcOverlappedMC in block.c for more detailed description. |
|
108 * |
|
109 * Returns: |
|
110 * Nothing. |
|
111 * |
|
112 * Error codes: |
|
113 * None. |
|
114 * |
|
115 */ |
|
116 |
|
117 void __cdecl blcMixOverlapped( u_char *blkBuf, u_char *dest, int ddelta ); |
|
118 |
|
119 /* |
|
120 * |
|
121 * blcInvQuant |
|
122 * |
|
123 * Parameters: |
|
124 * block Block pointer |
|
125 * quant Quantization value |
|
126 * count Number of values to process |
|
127 * |
|
128 * Function: |
|
129 * Does inverse quantization for a block for idct. |
|
130 * |
|
131 * Returns: |
|
132 * Nothing. |
|
133 * |
|
134 * Error codes: |
|
135 * None. |
|
136 * |
|
137 */ |
|
138 |
|
139 void __cdecl blcInvQuant( int *block, int quant, int count ); |
|
140 |
|
141 #endif |
|
142 |
|
143 // End of File |
|