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() |
23 |
/** MotionEstimation **/ |
/** MotionEstimation **/ |
24 |
|
|
25 |
bool MotionEstimation( |
bool MotionEstimation( |
|
MACROBLOCK * const pMBs, |
|
26 |
MBParam * const pParam, |
MBParam * const pParam, |
27 |
const IMAGE * const pRef, |
FRAMEINFO * const current, |
28 |
|
FRAMEINFO * const reference, |
29 |
const IMAGE * const pRefH, |
const IMAGE * const pRefH, |
30 |
const IMAGE * const pRefV, |
const IMAGE * const pRefV, |
31 |
const IMAGE * const pRefHV, |
const IMAGE * const pRefHV, |
|
IMAGE * const pCurrent, |
|
32 |
const uint32_t iLimit); |
const uint32_t iLimit); |
33 |
|
|
34 |
|
|
42 |
const IMAGE * const pRefV, |
const IMAGE * const pRefV, |
43 |
const IMAGE * const pRefHV, |
const IMAGE * const pRefHV, |
44 |
IMAGE * const pCurrent, |
IMAGE * const pCurrent, |
45 |
int16_t dct_codes[][64], |
int16_t dct_codes[6*64], |
46 |
const uint32_t width, |
const uint32_t width, |
47 |
const uint32_t height, |
const uint32_t height, |
48 |
const uint32_t edged_width, |
const uint32_t edged_width, |
53 |
|
|
54 |
|
|
55 |
void MBTransQuantIntra(const MBParam *pParam, |
void MBTransQuantIntra(const MBParam *pParam, |
56 |
|
FRAMEINFO * frame, |
57 |
MACROBLOCK * pMB, |
MACROBLOCK * pMB, |
58 |
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 */ |
59 |
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 */ |
60 |
int16_t data[][64], /* <-> the data of the MB to be coded */ |
int16_t data[6*64], /* <-> the data of the MB to be coded */ |
61 |
int16_t qcoeff[][64], /* <-> the quantized DCT coefficients */ |
int16_t qcoeff[6*64] /* <-> the quantized DCT coefficients */ |
|
IMAGE * const pCurrent /* <-> the reconstructed image ( function will update one |
|
|
MB in it with data from data[] ) */ |
|
62 |
); |
); |
63 |
|
|
64 |
|
|
65 |
uint8_t MBTransQuantInter(const MBParam *pParam, /* <-- the parameter for DCT transformation |
uint8_t MBTransQuantInter(const MBParam *pParam, /* <-- the parameter for DCT transformation and Quantization */ |
66 |
and Quantization */ |
FRAMEINFO * frame, |
67 |
MACROBLOCK * pMB, |
MACROBLOCK * pMB, |
68 |
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 */ |
69 |
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 */ |
70 |
int16_t data[][64], /* <-> the data of the MB to be coded */ |
int16_t data[6*64], /* <-> the data of the MB to be coded */ |
71 |
int16_t qcoeff[][64], /* <-> the quantized DCT coefficients */ |
int16_t qcoeff[6*64] /* <-> the quantized DCT coefficients */ |
|
IMAGE * const pCurrent /* <-> the reconstructed image ( function will |
|
|
update one MB in it with data from data[] ) */ |
|
72 |
); |
); |
73 |
|
|
74 |
|
|
75 |
/** interlacing **/ |
/** interlacing **/ |
76 |
|
|
77 |
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 |
78 |
for interlacing */ |
for interlacing */ |
79 |
|
|
80 |
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 */ |
|
81 |
|
|
82 |
|
|
83 |
/** MBCoding.c **/ |
/** MBCoding.c **/ |
84 |
|
|
85 |
void MBCoding(const MBParam *pParam, /* <-- the parameter for coding of the bitstream */ |
void MBCoding(const FRAMEINFO *frame, /* <-- the parameter for coding of the bitstream */ |
86 |
MACROBLOCK *pMB, /* <-- Info of the MB to be coded */ |
MACROBLOCK *pMB, /* <-- Info of the MB to be coded */ |
87 |
int16_t qcoeff[][64], /* <-- the quantized DCT coefficients */ |
int16_t qcoeff[6*64], /* <-- the quantized DCT coefficients */ |
88 |
Bitstream * bs, /* <-> the bitstream */ |
Bitstream * bs, /* <-> the bitstream */ |
89 |
Statistics * pStat /* <-> statistical data collected for current frame */ |
Statistics * pStat /* <-> statistical data collected for current frame */ |
90 |
); |
); |