384 |
pass2.max_overflow_improvement = codec->config.twopass_max_overflow_improvement; |
pass2.max_overflow_improvement = codec->config.twopass_max_overflow_improvement; |
385 |
pass2.max_overflow_degradation = codec->config.twopass_max_overflow_degradation; |
pass2.max_overflow_degradation = codec->config.twopass_max_overflow_degradation; |
386 |
pass2.kfreduction = codec->config.kfreduction; |
pass2.kfreduction = codec->config.kfreduction; |
387 |
pass2.min_key_interval = codec->config.min_key_interval; |
pass2.kfthreshold = codec->config.kfthreshold; |
388 |
pass2.container_frame_overhead = 24; /* AVI */ |
pass2.container_frame_overhead = 24; /* AVI */ |
389 |
|
|
390 |
plugins[create.num_plugins].func = xvid_plugin_2pass2; |
plugins[create.num_plugins].func = xvid_plugin_2pass2; |
489 |
int i; |
int i; |
490 |
|
|
491 |
for (i=0; i<config->num_zones && config->zones[i].frame <= framenum; i++) ; |
for (i=0; i<config->num_zones && config->zones[i].frame <= framenum; i++) ; |
|
i--; |
|
492 |
|
|
493 |
|
if (--i < 0) return; /* there are no zones, or we're before the first zone */ |
494 |
|
|
495 |
|
if (framenum == config->zones[i].frame) |
496 |
frame->type = config->zones[i].type; |
frame->type = config->zones[i].type; |
497 |
|
|
498 |
if (config->zones[i].greyscale) { |
if (config->zones[i].greyscale) { |
639 |
|
|
640 |
// force keyframe spacing in 2-pass 1st pass |
// force keyframe spacing in 2-pass 1st pass |
641 |
if (codec->config.motion_search == 0) |
if (codec->config.motion_search == 0) |
|
{ |
|
642 |
frame.type = XVID_TYPE_IVOP; |
frame.type = XVID_TYPE_IVOP; |
|
} |
|
|
else if (codec->keyspacing < codec->config.min_key_interval && codec->framenum) |
|
|
{ |
|
|
DPRINTF("current frame forced to p-frame"); |
|
|
frame.type = XVID_TYPE_PVOP; |
|
|
} |
|
643 |
|
|
644 |
/* frame-based stuff */ |
/* frame-based stuff */ |
645 |
apply_zone_modifiers(&frame, &codec->config, codec->framenum); |
apply_zone_modifiers(&frame, &codec->config, codec->framenum); |