]> granicus.if.org Git - handbrake/commitdiff
PixelRatio Test branch with mp4 working and latest contrib libs
authorprigaux <pri@nopapers.org>
Thu, 18 Jan 2007 10:26:35 +0000 (10:26 +0000)
committerprigaux <pri@nopapers.org>
Thu, 18 Jan 2007 10:26:35 +0000 (10:26 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/PixelRatioWorking@122 b64f7644-9d1e-0410-96f1-a4d463321fa5

work.c

diff --git a/work.c b/work.c
index 127ff8315448641a4d43b62171a8ea86e499fc89..8afff0aec581006d742dc8cb413f8c4a90e8a13e 100644 (file)
--- a/work.c
+++ b/work.c
@@ -103,6 +103,12 @@ static void do_job( hb_job_t * job, int cpu_count )
     hb_log( " + device %s", title->dvd );
     hb_log( " + title %d, chapter(s) %d to %d", title->index,
             job->chapter_start, job->chapter_end );
+    if ( job->pixel_ratio == 1 )
+    {
+       /* Correct the geometry of the output movie when using PixelRatio */
+       job->height=title->height-job->crop[0]-job->crop[1];
+       job->width=title->width-job->crop[2]-job->crop[3];
+    }
     hb_log( " + %dx%d -> %dx%d, crop %d/%d/%d/%d",
             title->width, title->height, job->width, job->height,
             job->crop[0], job->crop[1], job->crop[2], job->crop[3] );
@@ -119,7 +125,7 @@ static void do_job( hb_job_t * job, int cpu_count )
                 (float) job->vrate / (float) job->vrate_base,
                 job->vbitrate, job->pass );
     }
-
+    hb_log ("PixelRatio: %d, width:%d, height: %d",job->pixel_ratio,job->width, job->height);
     job->fifo_mpeg2  = hb_fifo_init( 2048, "mpeg2" );
     job->fifo_raw    = hb_fifo_init( 8, "raw"  );
     job->fifo_sync   = hb_fifo_init( 8, "sync"  );