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.10 2010-11-16 14:42:07 Isibaar Exp $ |
* $Id: plugin_2pass2.c,v 1.11 2010-12-28 19:19:43 Isibaar Exp $ |
29 |
* |
* |
30 |
*****************************************************************************/ |
*****************************************************************************/ |
31 |
|
|
467 |
|
|
468 |
/* vbv_size==0 switches VBV check off */ |
/* vbv_size==0 switches VBV check off */ |
469 |
if (rc->param.vbv_size > 0) { |
if (rc->param.vbv_size > 0) { |
470 |
const double fps = (double)create->fbase/(double)create->fincr; |
const float fps = (float) ((double)create->fbase/(double)create->fincr); |
471 |
int status = check_curve_for_vbv_compliancy(rc, fps); |
int status = check_curve_for_vbv_compliancy(rc, fps); |
472 |
|
|
473 |
if (status) { |
if (status) { |
1361 |
if (rc->count[i] == 0 || rc->pb_iboost_tax_ratio == 0) { |
if (rc->count[i] == 0 || rc->pb_iboost_tax_ratio == 0) { |
1362 |
rc->avg_length[i] = 1; |
rc->avg_length[i] = 1; |
1363 |
} else { |
} else { |
1364 |
rc->avg_length[i] = rc->tot_scaled_length[i]; |
rc->avg_length[i] = (double) rc->tot_scaled_length[i]; |
1365 |
|
|
1366 |
if (i == (XVID_TYPE_IVOP-1)) { |
if (i == (XVID_TYPE_IVOP-1)) { |
1367 |
/* I Frames total has to be added the boost total */ |
/* I Frames total has to be added the boost total */ |
1544 |
const float vbv_size = (float)rc->param.vbv_size/8.f; |
const float vbv_size = (float)rc->param.vbv_size/8.f; |
1545 |
const float vbv_initial = (float)rc->param.vbv_initial/8.f; |
const float vbv_initial = (float)rc->param.vbv_initial/8.f; |
1546 |
|
|
1547 |
const float maxrate = 0.9*rc->param.vbv_maxrate; |
const float maxrate = 0.9f*rc->param.vbv_maxrate; |
1548 |
const float vbv_low = 0.10f*vbv_size; |
const float vbv_low = 0.10f*vbv_size; |
1549 |
const float r0 = (int)(maxrate/fps+0.5)/8.f; |
const float r0 = (int)(maxrate/fps+0.5)/8.f; |
1550 |
|
|