20 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
21 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
* |
* |
23 |
* $Id: estimation_rd_based.c,v 1.1.2.4 2003-10-01 23:23:01 edgomez Exp $ |
* $Id: estimation_rd_based.c,v 1.1.2.5 2003-10-03 14:23:00 syskin Exp $ |
24 |
* |
* |
25 |
****************************************************************************/ |
****************************************************************************/ |
26 |
|
|
69 |
|
|
70 |
if (sum > 0) { |
if (sum > 0) { |
71 |
*cbp |= 1 << (5 - block); |
*cbp |= 1 << (5 - block); |
72 |
bits = BITS_MULT * CodeCoeffInter_CalcBits(coeff, scan_tables[0]); |
bits = BITS_MULT * CodeCoeffInter_CalcBits(coeff, data->scan_table); |
73 |
|
|
74 |
if (quant_type) dequant_inter(dqcoeff, coeff, quant); |
if (quant_type) dequant_inter(dqcoeff, coeff, quant); |
75 |
else dequant4_inter(dqcoeff, coeff, quant); |
else dequant4_inter(dqcoeff, coeff, quant); |
112 |
*dcpred = b_dc; |
*dcpred = b_dc; |
113 |
} |
} |
114 |
|
|
115 |
bits = BITS_MULT*CodeCoeffIntra_CalcBits(coeff, scan_tables[0]); |
bits = BITS_MULT*CodeCoeffIntra_CalcBits(coeff, data->scan_table); |
116 |
if (bits != 0) *cbp |= 1 << (5 - block); |
if (bits != 0) *cbp |= 1 << (5 - block); |
117 |
|
|
118 |
if (block < 4) bits += BITS_MULT*dcy_tab[coeff[0] + 255].len; |
if (block < 4) bits += BITS_MULT*dcy_tab[coeff[0] + 255].len; |
524 |
VECTOR backup[5], *v; |
VECTOR backup[5], *v; |
525 |
Data->iQuant = iQuant; |
Data->iQuant = iQuant; |
526 |
Data->cbp = c; |
Data->cbp = c; |
527 |
|
Data->scan_table = VopFlags & XVID_VOP_ALTERNATESCAN ? |
528 |
|
scan_tables[2] : scan_tables[0]; |
529 |
|
|
530 |
pMB->mcsel = 0; |
pMB->mcsel = 0; |
531 |
|
|
632 |
int InterBias = MV16_INTER_BIAS; |
int InterBias = MV16_INTER_BIAS; |
633 |
int thresh = 0; |
int thresh = 0; |
634 |
int top = 0, top_right = 0, left = 0; |
int top = 0, top_right = 0, left = 0; |
635 |
|
Data->scan_table = VopFlags & XVID_VOP_ALTERNATESCAN ? |
636 |
|
scan_tables[2] : scan_tables[0]; |
637 |
|
|
638 |
pMB->mcsel = 0; |
pMB->mcsel = 0; |
639 |
|
|