diff options
author | John Stebbins <[email protected]> | 2015-11-03 09:46:28 -0800 |
---|---|---|
committer | John Stebbins <[email protected]> | 2015-11-09 11:06:59 -0800 |
commit | a986f54a4109bb8c3b2fb57849b4b0ea01e3c522 (patch) | |
tree | 7add9d007dc8bdd72114637c8f3f7361621ad4a5 /libhb/enctheora.c | |
parent | 63b340ebc33d57aeda22e340dab48b1df2106541 (diff) |
libhb: make muxer, sync, and reader behave like other work objects
simplify job initialization sequence, clean up code, and document
dependencies in the sequence better.
Make hb_add set job->sequence_id. It is no longer necessary for the
frontend to do this. If the frontend needs the sequence_id, it is
returned by hb_add().
Clean up use of interjob. do_job() now uses sequence_id to detect when
a new sequence of related jobs is running and automatically clears
interjob.
Diffstat (limited to 'libhb/enctheora.c')
-rw-r--r-- | libhb/enctheora.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/libhb/enctheora.c b/libhb/enctheora.c index a49d7ff6b..376b442ba 100644 --- a/libhb/enctheora.c +++ b/libhb/enctheora.c @@ -71,18 +71,8 @@ int enctheoraInit( hb_work_object_t * w, hb_job_t * job ) ti.frame_width = (job->width + 0xf) & ~0xf; ti.frame_height = (job->height + 0xf) & ~0xf; ti.pic_x = ti.pic_y = 0; - - if( job->pass_id == HB_PASS_ENCODE_2ND ) - { - hb_interjob_t * interjob = hb_interjob_get( job->h ); - ti.fps_numerator = interjob->vrate.num; - ti.fps_denominator = interjob->vrate.den; - } - else - { - ti.fps_numerator = job->vrate.num; - ti.fps_denominator = job->vrate.den; - } + ti.fps_numerator = job->vrate.num; + ti.fps_denominator = job->vrate.den; ti.aspect_numerator = job->par.num; ti.aspect_denominator = job->par.den; ti.colorspace = TH_CS_UNSPECIFIED; @@ -98,7 +88,8 @@ int enctheoraInit( hb_work_object_t * w, hb_job_t * job ) ti.quality = job->vquality; } - keyframe_frequency = 10 * ((double)job->vrate.num / job->vrate.den + 0.5); + keyframe_frequency = ((double)job->orig_vrate.num / job->orig_vrate.den + + 0.5) * 10; hb_log("theora: keyint: %i", keyframe_frequency); |