269 |
const uint8_t *ReferenceB; |
const uint8_t *ReferenceB; |
270 |
VECTOR mvs, b_mvs; |
VECTOR mvs, b_mvs; |
271 |
|
|
272 |
if (( x > 31) || ( x < -31) || ( y > 31) || (y < -31)) return; |
if (( x > 31) || ( x < -32) || ( y > 31) || (y < -32)) return; |
273 |
|
|
274 |
sad = lambda_vec16[data->iQuant] * d_mv_bits(x, y, 1); |
sad = lambda_vec16[data->iQuant] * d_mv_bits(x, y, 1); |
275 |
|
|
1711 |
return 0; // B frame |
return 0; // B frame |
1712 |
|
|
1713 |
} |
} |
1714 |
|
|
1715 |
|
int |
1716 |
|
FindFcode( const MBParam * const pParam, |
1717 |
|
const FRAMEINFO * const current) |
1718 |
|
{ |
1719 |
|
uint32_t x, y; |
1720 |
|
int max = 0, min = 0, i; |
1721 |
|
|
1722 |
|
for (y = 0; y < pParam->mb_height; y++) { |
1723 |
|
for (x = 0; x < pParam->mb_width; x++) { |
1724 |
|
|
1725 |
|
MACROBLOCK *pMB = ¤t->mbs[x + y * pParam->mb_width]; |
1726 |
|
for(i = 0; i < (pMB->mode == MODE_INTER4V ? 4:1); i++) { |
1727 |
|
if (pMB->mvs[i].x > max) max = pMB->mvs[i].x; |
1728 |
|
if (pMB->mvs[i].y > max) max = pMB->mvs[i].y; |
1729 |
|
|
1730 |
|
if (pMB->mvs[i].x < min) min = pMB->mvs[i].x; |
1731 |
|
if (pMB->mvs[i].y < min) min = pMB->mvs[i].y; |
1732 |
|
} |
1733 |
|
} |
1734 |
|
} |
1735 |
|
|
1736 |
|
min = -min; |
1737 |
|
max += 1; |
1738 |
|
if (min > max) max = min; |
1739 |
|
|
1740 |
|
for (i = 1; (max > 32 << (i - 1)); i++); |
1741 |
|
return i; |
1742 |
|
} |