2 |
* |
* |
3 |
* Modifications: |
* Modifications: |
4 |
* |
* |
5 |
|
* 29.03.2002 removed MBFieldToFrame - no longer used (transfers instead) |
6 |
* 26.03.2002 interlacing support |
* 26.03.2002 interlacing support |
7 |
* 02.12.2001 motion estimation/compensation split |
* 02.12.2001 motion estimation/compensation split |
8 |
* 16.11.2001 const/uint32_t changes to MBMotionEstComp() |
* 16.11.2001 const/uint32_t changes to MBMotionEstComp() |
22 |
|
|
23 |
/** MotionEstimation **/ |
/** MotionEstimation **/ |
24 |
|
|
25 |
bool MotionEstimation( |
bool MotionEstimation(MBParam * const pParam, |
26 |
MACROBLOCK * const pMBs, |
FRAMEINFO * const current, |
27 |
MBParam * const pParam, |
FRAMEINFO * const reference, |
|
const IMAGE * const pRef, |
|
28 |
const IMAGE * const pRefH, |
const IMAGE * const pRefH, |
29 |
const IMAGE * const pRefV, |
const IMAGE * const pRefV, |
30 |
const IMAGE * const pRefHV, |
const IMAGE * const pRefHV, |
|
IMAGE * const pCurrent, |
|
31 |
const uint32_t iLimit); |
const uint32_t iLimit); |
32 |
|
|
33 |
|
|
34 |
/** MBMotionCompensation **/ |
/** MBMotionCompensation **/ |
35 |
void MBMotionCompensation( |
void MBMotionCompensation(MACROBLOCK * const pMB, |
|
MACROBLOCK * const pMB, |
|
36 |
const uint32_t j, |
const uint32_t j, |
37 |
const uint32_t i, |
const uint32_t i, |
38 |
const IMAGE * const pRef, |
const IMAGE * const pRef, |
40 |
const IMAGE * const pRefV, |
const IMAGE * const pRefV, |
41 |
const IMAGE * const pRefHV, |
const IMAGE * const pRefHV, |
42 |
IMAGE * const pCurrent, |
IMAGE * const pCurrent, |
43 |
int16_t dct_codes[][64], |
int16_t dct_codes[6 * 64], |
44 |
const uint32_t width, |
const uint32_t width, |
45 |
const uint32_t height, |
const uint32_t height, |
46 |
const uint32_t edged_width, |
const uint32_t edged_width, |
51 |
|
|
52 |
|
|
53 |
void MBTransQuantIntra(const MBParam *pParam, |
void MBTransQuantIntra(const MBParam *pParam, |
54 |
|
FRAMEINFO * frame, |
55 |
MACROBLOCK * pMB, |
MACROBLOCK * pMB, |
56 |
const uint32_t x_pos, /* <-- The x position of the MB to be searched */ |
const uint32_t x_pos, /* <-- The x position of the MB to be searched */ |
57 |
|
|
58 |
const uint32_t y_pos, /* <-- The y position of the MB to be searched */ |
const uint32_t y_pos, /* <-- The y position of the MB to be searched */ |
59 |
int16_t data[][64], /* <-> the data of the MB to be coded */ |
|
60 |
int16_t qcoeff[][64], /* <-> the quantized DCT coefficients */ |
int16_t data[6 * 64], /* <-> the data of the MB to be coded */ |
61 |
IMAGE * const pCurrent /* <-> the reconstructed image ( function will update one |
|
62 |
MB in it with data from data[] ) */ |
int16_t qcoeff[6 * 64] /* <-> the quantized DCT coefficients */ |
63 |
); |
); |
64 |
|
|
65 |
|
|
66 |
uint8_t MBTransQuantInter(const MBParam *pParam, /* <-- the parameter for DCT transformation |
uint8_t MBTransQuantInter(const MBParam * pParam, /* <-- the parameter for DCT transformation and Quantization */ |
67 |
and Quantization */ |
|
68 |
|
FRAMEINFO * frame, |
69 |
MACROBLOCK * pMB, |
MACROBLOCK * pMB, |
70 |
const uint32_t x_pos, /* <-- The x position of the MB to be searched */ |
const uint32_t x_pos, /* <-- The x position of the MB to be searched */ |
71 |
|
|
72 |
const uint32_t y_pos, /* <-- The y position of the MB to be searched */ |
const uint32_t y_pos, /* <-- The y position of the MB to be searched */ |
73 |
int16_t data[][64], /* <-> the data of the MB to be coded */ |
|
74 |
int16_t qcoeff[][64], /* <-> the quantized DCT coefficients */ |
int16_t data[6 * 64], /* <-> the data of the MB to be coded */ |
75 |
IMAGE * const pCurrent /* <-> the reconstructed image ( function will |
|
76 |
update one MB in it with data from data[] ) */ |
int16_t qcoeff[6 * 64] /* <-> the quantized DCT coefficients */ |
77 |
); |
); |
78 |
|
|
79 |
|
|
80 |
/** interlacing **/ |
/** interlacing **/ |
81 |
|
|
82 |
uint32_t MBDecideFieldDCT(int16_t data[][64]); /* <- decide whether to use field-based DCT |
uint32_t MBDecideFieldDCT(int16_t data[6 * 64]); /* <- decide whether to use field-based DCT |
83 |
for interlacing */ |
for interlacing */ |
84 |
|
|
85 |
void MBFrameToField(int16_t data[][64]); /* de-interlace vertical Y blocks */ |
void MBFrameToField(int16_t data[6 * 64]); /* de-interlace vertical Y blocks */ |
|
|
|
|
void MBFieldToFrame(int16_t data[][64]); /* re-interlace vertical Y blocks */ |
|
86 |
|
|
87 |
|
|
88 |
/** MBCoding.c **/ |
/** MBCoding.c **/ |
89 |
|
|
90 |
void MBCoding(const MBParam *pParam, /* <-- the parameter for coding of the bitstream */ |
void MBCoding(const FRAMEINFO * frame, /* <-- the parameter for coding of the bitstream */ |
91 |
|
|
92 |
MACROBLOCK *pMB, /* <-- Info of the MB to be coded */ |
MACROBLOCK *pMB, /* <-- Info of the MB to be coded */ |
93 |
int16_t qcoeff[][64], /* <-- the quantized DCT coefficients */ |
|
94 |
|
int16_t qcoeff[6 * 64], /* <-- the quantized DCT coefficients */ |
95 |
|
|
96 |
Bitstream * bs, /* <-> the bitstream */ |
Bitstream * bs, /* <-> the bitstream */ |
97 |
|
|
98 |
Statistics * pStat /* <-> statistical data collected for current frame */ |
Statistics * pStat /* <-> statistical data collected for current frame */ |
99 |
); |
); |
100 |
|
|