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.19 2003-06-09 01:22:58 edgomez Exp $ |
* $Id: plugin_2pass2.c,v 1.1.2.23 2003-10-01 23:23:01 edgomez Exp $ |
29 |
* |
* |
30 |
*****************************************************************************/ |
*****************************************************************************/ |
31 |
|
|
96 |
double movie_curve; |
double movie_curve; |
97 |
|
|
98 |
/* dynamic */ |
/* dynamic */ |
|
|
|
99 |
int * keyframe_locations; |
int * keyframe_locations; |
100 |
stat_t * stats; |
stat_t * stats; |
101 |
|
|
243 |
} |
} |
244 |
|
|
245 |
/* Compute the target filesize */ |
/* Compute the target filesize */ |
246 |
if (rc->num_frames < create->fbase/create->fincr) { |
if (rc->param.bitrate<0) { |
247 |
|
/* if negative, bitrate equals the target (in kbytes) */ |
248 |
|
rc->target = (-rc->param.bitrate) * 1024; |
249 |
|
} else if (rc->num_frames < create->fbase/create->fincr) { |
250 |
/* Source sequence is less than 1s long, we do as if it was 1s long */ |
/* Source sequence is less than 1s long, we do as if it was 1s long */ |
251 |
rc->target = rc->param.bitrate / 8; |
rc->target = rc->param.bitrate / 8; |
252 |
} else { |
} else { |
411 |
rc->curve_comp_error += dbytes - (int)dbytes; |
rc->curve_comp_error += dbytes - (int)dbytes; |
412 |
} |
} |
413 |
|
|
|
|
|
414 |
/* |
/* |
415 |
* We can't do bigger frames than first pass, this would be stupid as first |
* We can't do bigger frames than first pass, this would be stupid as first |
416 |
* pass is quant=2 and that reaching quant=1 is not worth it. We would lose |
* pass is quant=2 and that reaching quant=1 is not worth it. We would lose |