25 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
26 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
27 |
* |
* |
28 |
* $Id: plugin_2pass2.c,v 1.1.2.35 2004-01-21 06:59:23 syskin Exp $ |
* $Id: plugin_2pass2.c,v 1.1.2.36 2004-01-22 20:54:31 edgomez Exp $ |
29 |
* |
* |
30 |
*****************************************************************************/ |
*****************************************************************************/ |
31 |
|
|
617 |
#ifdef PASS_SMALLER |
#ifdef PASS_SMALLER |
618 |
if (dbytes > s->length) { |
if (dbytes > s->length) { |
619 |
dbytes = s->length; |
dbytes = s->length; |
620 |
} else |
} |
621 |
|
#endif |
622 |
|
|
623 |
|
/* Prevent stupid desired sizes under logical values */ |
624 |
if (dbytes < rc->min_length[s->type-1]) { |
if (dbytes < rc->min_length[s->type-1]) { |
625 |
dbytes = rc->min_length[s->type-1]; |
dbytes = rc->min_length[s->type-1]; |
|
} else if (dbytes > rc->max_length) { |
|
|
/* ToDo: this condition is always wrong as max_length == maximum frame |
|
|
* length of first pass, so the first condition already caps the frame |
|
|
* size... */ |
|
|
capped_to_max_framesize = 1; |
|
|
dbytes = rc->max_length; |
|
|
DPRINTF(XVID_DEBUG_RC,"[xvid rc] -- frame:%d Capped to maximum frame size\n", |
|
|
data->frame_num); |
|
626 |
} |
} |
627 |
#endif |
|
628 |
/*------------------------------------------------------------------------ |
/*------------------------------------------------------------------------ |
629 |
* Desired frame length <-> quantizer mapping |
* Desired frame length <-> quantizer mapping |
630 |
*-----------------------------------------------------------------------*/ |
*-----------------------------------------------------------------------*/ |