summaryrefslogtreecommitdiffstats
path: root/libhb/render.c
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2009-06-04 17:52:01 +0000
committerjbrjake <[email protected]>2009-06-04 17:52:01 +0000
commita9eb0fba5299b12a951f2116276ef3382c1ff50a (patch)
treea4ee5ec78bca4077b8de2c522ee600824ff1696e /libhb/render.c
parent2c5699a0b597b55a6c6f7cc663e473dd4a7345e1 (diff)
Adds an interjob structure to preserve some encode data across jobs within an instance of libhb. This allows correcting the estimated bitrate/filesize of 2-pass encodes of variable framerate content, as the actual frame count is known after the first pass. Thanks for putting the idea into code, Shaya.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2482 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/render.c')
-rw-r--r--libhb/render.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libhb/render.c b/libhb/render.c
index fefec7792..34928d906 100644
--- a/libhb/render.c
+++ b/libhb/render.c
@@ -668,6 +668,11 @@ void renderClose( hb_work_object_t * w )
pv->count_frames, pv->drops, pv->dups );
}
+ hb_interjob_t * interjob = hb_interjob_get( w->private_data->job->h );
+
+ /* Preserve dropped frame count for more accurate framerates in 2nd passes. */
+ interjob->render_dropped = pv->dropped_frames;
+
hb_log("render: lost time: %lld (%i frames)", pv->total_lost_time, pv->dropped_frames);
hb_log("render: gained time: %lld (%i frames) (%lld not accounted for)", pv->total_gained_time, pv->extended_frames, pv->total_lost_time - pv->total_gained_time);
if (pv->dropped_frames)