[svn] / branches / dev-api-4 / xvidcore / src / utils / mbfunctions.h Repository:
ViewVC logotype

Annotation of /branches/dev-api-4/xvidcore/src/utils/mbfunctions.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 914 - (view) (download)

1 : edgomez 851 /**************************************************************************
2 : Isibaar 3 *
3 : edgomez 851 * Modifications:
4 : Isibaar 3 *
5 : edgomez 851 * 29.03.2002 removed MBFieldToFrame - no longer used (transfers instead)
6 :     * 26.03.2002 interlacing support
7 :     * 02.12.2001 motion estimation/compensation split
8 :     * 16.11.2001 const/uint32_t changes to MBMotionEstComp()
9 :     * 26.08.2001 added inter4v_mode parameter to MBMotionEstComp()
10 : Isibaar 3 *
11 : edgomez 851 * Michael Militzer <isibaar@videocoding.de>
12 : Isibaar 3 *
13 : edgomez 851 **************************************************************************/
14 : Isibaar 3
15 : edgomez 851 #ifndef _ENCORE_BLOCK_H
16 :     #define _ENCORE_BLOCK_H
17 : Isibaar 3
18 :     #include "../encoder.h"
19 :     #include "../bitstream/bitstream.h"
20 :    
21 :    
22 :    
23 : edgomez 851 /** MotionEstimation **/
24 : Isibaar 3
25 : edgomez 195 bool MotionEstimation(MBParam * const pParam,
26 :     FRAMEINFO * const current,
27 :     FRAMEINFO * const reference,
28 :     const IMAGE * const pRefH,
29 :     const IMAGE * const pRefV,
30 :     const IMAGE * const pRefHV,
31 :     const uint32_t iLimit);
32 : Isibaar 3
33 :    
34 : edgomez 851 bool SMP_MotionEstimation(MBParam * const pParam,
35 :     FRAMEINFO * const current,
36 :     FRAMEINFO * const reference,
37 :     const IMAGE * const pRefH,
38 :     const IMAGE * const pRefV,
39 :     const IMAGE * const pRefHV,
40 :     const uint32_t iLimit);
41 : chl 259
42 :    
43 :    
44 : edgomez 851 /** MBMotionCompensation **/
45 : edgomez 420
46 : edgomez 851 void
47 :     MBMotionCompensation(MACROBLOCK * const mb,
48 :     const uint32_t i,
49 :     const uint32_t j,
50 :     const IMAGE * const ref,
51 :     const IMAGE * const refh,
52 :     const IMAGE * const refv,
53 :     const IMAGE * const refhv,
54 :     const IMAGE * const refGMC,
55 :     IMAGE * const cur,
56 :     int16_t * dct_codes,
57 :     const uint32_t width,
58 :     const uint32_t height,
59 :     const uint32_t edged_width,
60 :     const int32_t quarterpel,
61 :     const int reduced_resolution,
62 :     const int32_t rounding);
63 : Isibaar 3
64 : edgomez 851 /** MBTransQuant.c **/
65 : Isibaar 3
66 :    
67 : edgomez 195 void MBTransQuantIntra(const MBParam * pParam,
68 :     FRAMEINFO * frame,
69 :     MACROBLOCK * pMB,
70 : edgomez 851 const uint32_t x_pos, /* <-- The x position of the MB to be searched */
71 : Isibaar 3
72 : edgomez 851 const uint32_t y_pos, /* <-- The y position of the MB to be searched */
73 : Isibaar 3
74 : edgomez 851 int16_t data[6 * 64], /* <-> the data of the MB to be coded */
75 :    
76 :     int16_t qcoeff[6 * 64] /* <-> the quantized DCT coefficients */
77 :     );
78 :    
79 :    
80 : chl 368 void MBTransQuantIntra2(const MBParam * pParam,
81 : edgomez 851 FRAMEINFO * frame,
82 :     MACROBLOCK * pMB,
83 :     const uint32_t x_pos, /* <-- The x position of the MB to be searched */
84 : edgomez 195
85 : edgomez 851 const uint32_t y_pos, /* <-- The y position of the MB to be searched */
86 : chl 368
87 : edgomez 851 int16_t data[6 * 64], /* <-> the data of the MB to be coded */
88 :    
89 :     int16_t qcoeff[6 * 64] /* <-> the quantized DCT coefficients */
90 :     );
91 :    
92 :    
93 : chl 368 uint8_t MBTransQuantInter(const MBParam * pParam,
94 : suxen_drol 136 FRAMEINFO * frame,
95 : edgomez 195 MACROBLOCK * pMB,
96 : chl 368 const uint32_t x_pos,
97 :     const uint32_t y_pos,
98 :     int16_t data[6 * 64],
99 :     int16_t qcoeff[6 * 64]);
100 : Isibaar 3
101 :    
102 : chl 368 uint8_t MBTransQuantInter2(const MBParam * pParam,
103 : edgomez 851 FRAMEINFO * frame,
104 :     MACROBLOCK * pMB,
105 :     const uint32_t x_pos,
106 :     const uint32_t y_pos,
107 :     int16_t data[6 * 64],
108 :     int16_t qcoeff[6 * 64]);
109 : edgomez 195
110 : chl 368 uint8_t MBTransQuantInterBVOP(const MBParam * pParam,
111 : edgomez 851 FRAMEINFO * frame,
112 :     MACROBLOCK * pMB,
113 : edgomez 914 const uint32_t x_pos,
114 :     const uint32_t y_pos,
115 : edgomez 851 int16_t data[6 * 64],
116 :     int16_t qcoeff[6 * 64]);
117 : edgomez 195
118 : chl 368 void MBTrans(const MBParam * pParam,
119 : edgomez 851 FRAMEINFO * frame,
120 :     MACROBLOCK * pMB,
121 :     const uint32_t x_pos,
122 :     const uint32_t y_pos,
123 :     int16_t data[6 * 64]);
124 : edgomez 195
125 : chl 368 void MBfDCT(const MBParam * pParam,
126 :     FRAMEINFO * frame,
127 :     MACROBLOCK * pMB,
128 :     int16_t data[6 * 64]);
129 :    
130 : edgomez 851 uint8_t MBQuantInter( const MBParam * pParam,
131 :     const int iQuant,
132 :     int16_t data[6 * 64],
133 :     int16_t qcoeff[6 * 64]);
134 : chl 368
135 :     void MBQuantDeQuantIntra(const MBParam * pParam,
136 :     FRAMEINFO * frame,
137 :     MACROBLOCK *pMB,
138 :     int16_t qcoeff[6 * 64],
139 :     int16_t data[6*64]);
140 :    
141 : edgomez 851 void MBQuantIntra( const MBParam * pParam,
142 :     FRAMEINFO * frame,
143 :     MACROBLOCK *pMB,
144 :     int16_t qcoeff[6 * 64],
145 :     int16_t data[6*64]);
146 : chl 368
147 :     void MBDeQuantIntra(const MBParam * pParam,
148 :     const int iQuant,
149 :     int16_t qcoeff[6 * 64],
150 :     int16_t data[6*64]);
151 :    
152 :     void MBDeQuantInter(const MBParam * pParam,
153 :     const int iQuant,
154 :     int16_t data[6 * 64],
155 :     int16_t qcoeff[6 * 64],
156 :     const uint8_t cbp);
157 :    
158 :    
159 : edgomez 851 void MBiDCT( int16_t data[6 * 64],
160 :     const uint8_t cbp);
161 : chl 368
162 :    
163 : edgomez 851 void MBTransAdd( const MBParam * pParam,
164 :     FRAMEINFO * frame,
165 :     MACROBLOCK * pMB,
166 :     const uint32_t x_pos,
167 :     const uint32_t y_pos,
168 :     int16_t data[6 * 64],
169 :     const uint8_t cbp);
170 : chl 368
171 :    
172 :    
173 : edgomez 851 /** interlacing **/
174 : h 69
175 : edgomez 851 uint32_t MBDecideFieldDCT(int16_t data[6 * 64]); /* <- decide whether to use field-based DCT
176 :     for interlacing */
177 : h 69
178 : edgomez 851 typedef uint32_t (MBFIELDTEST) (int16_t data[6 * 64]); /* function pointer for field test */
179 :     typedef MBFIELDTEST *MBFIELDTEST_PTR;
180 : h 69
181 : edgomez 851 /* global field test pointer for xvid.c */
182 :     extern MBFIELDTEST_PTR MBFieldTest;
183 : h 69
184 : edgomez 851 /* field test implementations */
185 :     MBFIELDTEST MBFieldTest_c;
186 :     MBFIELDTEST MBFieldTest_mmx;
187 : Isibaar 3
188 : edgomez 851 void MBFrameToField(int16_t data[6 * 64]); /* de-interlace vertical Y blocks */
189 : chl 347
190 :    
191 : edgomez 851 /** MBCoding.c **/
192 : Isibaar 3
193 : edgomez 851 /* void MBSkip(Bitstream * bs); just the bitstream. Since MB is skipped, no info is needed */
194 :    
195 :    
196 :     void MBCoding(const FRAMEINFO * const frame, /* <-- the parameter for coding of the bitstream */
197 :    
198 :     MACROBLOCK * pMB, /* <-- Info of the MB to be coded */
199 :    
200 :     int16_t qcoeff[6 * 64], /* <-- the quantized DCT coefficients */
201 :    
202 :     Bitstream * bs, /* <-> the bitstream */
203 :    
204 :     Statistics * pStat /* <-> statistical data collected for current frame */
205 :     );
206 :    
207 : Isibaar 3 #endif

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4