21 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 |
* |
* |
24 |
* $Id: mbtransquant.c,v 1.21.2.14 2003-06-09 13:55:36 edgomez Exp $ |
* $Id: mbtransquant.c,v 1.21.2.15 2003-07-24 13:09:14 Isibaar Exp $ |
25 |
* |
* |
26 |
****************************************************************************/ |
****************************************************************************/ |
27 |
|
|
201 |
sum = quant_inter(&qcoeff[i*64], &data[i*64], pMB->quant); |
sum = quant_inter(&qcoeff[i*64], &data[i*64], pMB->quant); |
202 |
if ( (sum) && (frame->vop_flags & XVID_VOP_TRELLISQUANT) ) { |
if ( (sum) && (frame->vop_flags & XVID_VOP_TRELLISQUANT) ) { |
203 |
sum = dct_quantize_trellis_h263_c(&qcoeff[i*64], &data[i*64], pMB->quant, &scan_tables[0][0], 63)+1; |
sum = dct_quantize_trellis_h263_c(&qcoeff[i*64], &data[i*64], pMB->quant, &scan_tables[0][0], 63)+1; |
204 |
limit = 1; |
/* limit = 1; // Isibaar: why? deactivated so far - so please complain! ;-) */ |
205 |
} |
} |
206 |
} else { |
} else { |
207 |
sum = quant4_inter(&qcoeff[i * 64], &data[i * 64], pMB->quant); |
sum = quant4_inter(&qcoeff[i * 64], &data[i * 64], pMB->quant); |
441 |
/* Set the limit threshold */ |
/* Set the limit threshold */ |
442 |
limit = PVOP_TOOSMALL_LIMIT + ((pMB->quant == 1)? 1 : 0); |
limit = PVOP_TOOSMALL_LIMIT + ((pMB->quant == 1)? 1 : 0); |
443 |
|
|
444 |
|
if (frame->vop_flags & XVID_VOP_CARTOON) |
445 |
|
limit *= 3; |
446 |
|
|
447 |
/* Quantize the block */ |
/* Quantize the block */ |
448 |
cbp = MBQuantInter(pParam, frame, pMB, data, qcoeff, 0, limit); |
cbp = MBQuantInter(pParam, frame, pMB, data, qcoeff, 0, limit); |
449 |
|
|
482 |
/* Set the limit threshold */ |
/* Set the limit threshold */ |
483 |
limit = BVOP_TOOSMALL_LIMIT; |
limit = BVOP_TOOSMALL_LIMIT; |
484 |
|
|
485 |
|
if (frame->vop_flags & XVID_VOP_CARTOON) |
486 |
|
limit *= 2; |
487 |
|
|
488 |
/* Quantize the block */ |
/* Quantize the block */ |
489 |
cbp = MBQuantInter(pParam, frame, pMB, data, qcoeff, 1, limit); |
cbp = MBQuantInter(pParam, frame, pMB, data, qcoeff, 1, limit); |
490 |
|
|