42 |
* * |
* * |
43 |
* Revision history: * |
* Revision history: * |
44 |
* * |
* * |
45 |
|
* 29.06.2002 predict_acdc() bounding * |
46 |
* 12.12.2001 improved calc_acdc_prediction; removed need for memcpy * |
* 12.12.2001 improved calc_acdc_prediction; removed need for memcpy * |
47 |
* 15.12.2001 moved pmv displacement to motion estimation * |
* 15.12.2001 moved pmv displacement to motion estimation * |
48 |
* 30.11.2001 mmx cbp support * |
* 30.11.2001 mmx cbp support * |
91 |
int16_t qcoeff[64], |
int16_t qcoeff[64], |
92 |
uint32_t current_quant, |
uint32_t current_quant, |
93 |
int32_t iDcScaler, |
int32_t iDcScaler, |
94 |
int16_t predictors[8]) |
int16_t predictors[8], |
95 |
|
const unsigned int bound_x, |
96 |
|
const unsigned int bound_y) |
97 |
|
|
98 |
{ |
{ |
99 |
|
const unsigned bound = (bound_y * mb_width) + bound_x; |
100 |
|
const unsigned mbpos = (y * mb_width) + x; |
101 |
int16_t *left, *top, *diag, *current; |
int16_t *left, *top, *diag, *current; |
102 |
|
|
103 |
int32_t left_quant = current_quant; |
int32_t left_quant = current_quant; |
117 |
|
|
118 |
// left macroblock |
// left macroblock |
119 |
|
|
120 |
if (x && |
if (x && mbpos >= bound + 1 && |
121 |
(pMBs[index - 1].mode == MODE_INTRA || |
(pMBs[index - 1].mode == MODE_INTRA || |
122 |
pMBs[index - 1].mode == MODE_INTRA_Q)) { |
pMBs[index - 1].mode == MODE_INTRA_Q)) { |
123 |
|
|
127 |
} |
} |
128 |
// top macroblock |
// top macroblock |
129 |
|
|
130 |
if (y && |
if (mbpos >= bound + mb_width && |
131 |
(pMBs[index - mb_width].mode == MODE_INTRA || |
(pMBs[index - mb_width].mode == MODE_INTRA || |
132 |
pMBs[index - mb_width].mode == MODE_INTRA_Q)) { |
pMBs[index - mb_width].mode == MODE_INTRA_Q)) { |
133 |
|
|
136 |
} |
} |
137 |
// diag macroblock |
// diag macroblock |
138 |
|
|
139 |
if (x && y && |
if (x && mbpos >= bound + mb_width + 1 && |
140 |
(pMBs[index - 1 - mb_width].mode == MODE_INTRA || |
(pMBs[index - 1 - mb_width].mode == MODE_INTRA || |
141 |
pMBs[index - 1 - mb_width].mode == MODE_INTRA_Q)) { |
pMBs[index - 1 - mb_width].mode == MODE_INTRA_Q)) { |
142 |
|
|
385 |
iDcScaler = get_dc_scaler(iQuant, (j < 4) ? 1 : 0); |
iDcScaler = get_dc_scaler(iQuant, (j < 4) ? 1 : 0); |
386 |
|
|
387 |
predict_acdc(frame->mbs, x, y, mb_width, j, &qcoeff[j * 64], |
predict_acdc(frame->mbs, x, y, mb_width, j, &qcoeff[j * 64], |
388 |
iQuant, iDcScaler, predictors[j]); |
iQuant, iDcScaler, predictors[j], 0, 0); |
389 |
|
|
390 |
S += calc_acdc(pMB, j, &qcoeff[j * 64], iDcScaler, predictors[j]); |
S += calc_acdc(pMB, j, &qcoeff[j * 64], iDcScaler, predictors[j]); |
391 |
|
|