1 |
Isibaar |
1.1 |
/************************************************************************** |
2 |
|
|
* |
3 |
|
|
* Modifications: |
4 |
|
|
* |
5 |
h |
1.2 |
* 26.03.2002 interlacing support |
6 |
Isibaar |
1.1 |
* 02.12.2001 motion estimation/compensation split |
7 |
|
|
* 16.11.2001 const/uint32_t changes to MBMotionEstComp() |
8 |
|
|
* 26.08.2001 added inter4v_mode parameter to MBMotionEstComp() |
9 |
|
|
* |
10 |
|
|
* Michael Militzer <isibaar@videocoding.de> |
11 |
|
|
* |
12 |
|
|
**************************************************************************/ |
13 |
|
|
|
14 |
|
|
#ifndef _ENCORE_BLOCK_H |
15 |
|
|
#define _ENCORE_BLOCK_H |
16 |
|
|
|
17 |
|
|
#include "../encoder.h" |
18 |
|
|
#include "../bitstream/bitstream.h" |
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
/** MotionEstimation **/ |
23 |
|
|
|
24 |
|
|
bool MotionEstimation( |
25 |
edgomez |
1.3 |
MACROBLOCK * const pMBs, |
26 |
|
|
MBParam * const pParam, |
27 |
|
|
const IMAGE * const pRef, |
28 |
|
|
const IMAGE * const pRefH, |
29 |
|
|
const IMAGE * const pRefV, |
30 |
|
|
const IMAGE * const pRefHV, |
31 |
|
|
IMAGE * const pCurrent, |
32 |
|
|
const uint32_t iLimit); |
33 |
Isibaar |
1.1 |
|
34 |
|
|
|
35 |
|
|
/** MBMotionCompensation **/ |
36 |
|
|
void MBMotionCompensation( |
37 |
edgomez |
1.3 |
MACROBLOCK * const pMB, |
38 |
|
|
const uint32_t j, |
39 |
|
|
const uint32_t i, |
40 |
|
|
const IMAGE * const pRef, |
41 |
|
|
const IMAGE * const pRefH, |
42 |
|
|
const IMAGE * const pRefV, |
43 |
|
|
const IMAGE * const pRefHV, |
44 |
|
|
IMAGE * const pCurrent, |
45 |
|
|
int16_t dct_codes[6*64], |
46 |
|
|
const uint32_t width, |
47 |
|
|
const uint32_t height, |
48 |
|
|
const uint32_t edged_width, |
49 |
|
|
const uint32_t rounding); |
50 |
Isibaar |
1.1 |
|
51 |
|
|
|
52 |
|
|
/** MBTransQuant.c **/ |
53 |
|
|
|
54 |
|
|
|
55 |
|
|
void MBTransQuantIntra(const MBParam *pParam, |
56 |
edgomez |
1.3 |
MACROBLOCK * pMB, |
57 |
|
|
const uint32_t x_pos, /* <-- The x position of the MB to be searched */ |
58 |
|
|
const uint32_t y_pos, /* <-- The y position of the MB to be searched */ |
59 |
|
|
int16_t data[6*64], /* <-> the data of the MB to be coded */ |
60 |
|
|
int16_t qcoeff[6*64], /* <-> the quantized DCT coefficients */ |
61 |
|
|
IMAGE * const pCurrent /* <-> the reconstructed image */ |
62 |
|
|
/* (function will update one MB in it with data from data[]) */ |
63 |
Isibaar |
1.1 |
); |
64 |
|
|
|
65 |
|
|
|
66 |
|
|
uint8_t MBTransQuantInter(const MBParam *pParam, /* <-- the parameter for DCT transformation |
67 |
edgomez |
1.3 |
and Quantization */ |
68 |
|
|
MACROBLOCK * pMB, |
69 |
|
|
const uint32_t x_pos, /* <-- The x position of the MB to be searched */ |
70 |
|
|
const uint32_t y_pos, /* <-- The y position of the MB to be searched */ |
71 |
|
|
int16_t data[6*64], /* <-> the data of the MB to be coded */ |
72 |
|
|
int16_t qcoeff[6*64], /* <-> the quantized DCT coefficients */ |
73 |
|
|
IMAGE * const pCurrent /* <-> the reconstructed image ( function will |
74 |
|
|
update one MB in it with data from data[] ) */ |
75 |
Isibaar |
1.1 |
); |
76 |
h |
1.2 |
|
77 |
|
|
|
78 |
|
|
/** interlacing **/ |
79 |
|
|
|
80 |
edgomez |
1.3 |
uint32_t MBDecideFieldDCT(int16_t data[6*64]); /* <- decide whether to use field-based DCT |
81 |
|
|
for interlacing */ |
82 |
h |
1.2 |
|
83 |
edgomez |
1.3 |
void MBFrameToField(int16_t data[6*64]); /* de-interlace vertical Y blocks */ |
84 |
h |
1.2 |
|
85 |
edgomez |
1.3 |
void MBFieldToFrame(int16_t data[6*64]); /* re-interlace vertical Y blocks */ |
86 |
Isibaar |
1.1 |
|
87 |
|
|
|
88 |
|
|
/** MBCoding.c **/ |
89 |
|
|
|
90 |
edgomez |
1.3 |
void MBCoding(const MBParam *pParam, /* <-- the parameter for coding of the bitstream */ |
91 |
|
|
MACROBLOCK *pMB, /* <-- Info of the MB to be coded */ |
92 |
|
|
int16_t qcoeff[6*64], /* <-- the quantized DCT coefficients */ |
93 |
|
|
Bitstream * bs, /* <-> the bitstream */ |
94 |
|
|
Statistics * pStat /* <-> statistical data collected for current frame */ |
95 |
Isibaar |
1.1 |
); |
96 |
|
|
|
97 |
|
|
#endif |