- hb_log( "starting job" );
- 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];
- }
- else if ( job->pixel_ratio == 2 )
- {
-
- /* While keeping the DVD storage aspect, resize the job width and height
- so they fit into the user's specified dimensions. */
- hb_set_anamorphic_size(job, &job->width, &job->height, &job->pixel_aspect_width, &job->pixel_aspect_height);
- }
-
- /* Keep width and height within these boundaries,
- but ignore for "loose" anamorphic encodes, for
- which this stuff is covered in the pixel_ratio
- section right above.*/
- if (job->maxHeight && (job->height > job->maxHeight) && (job->pixel_ratio != 2))
- {
- job->height = job->maxHeight;
- hb_fix_aspect( job, HB_KEEP_HEIGHT );
- hb_log("Height out of bounds, scaling down to %i", job->maxHeight);
- hb_log("New dimensions %i * %i", job->width, job->height);
- }
- if (job->maxWidth && (job->width > job->maxWidth) && (job->pixel_ratio != 2))
- {
- job->width = job->maxWidth;
- hb_fix_aspect( job, HB_KEEP_WIDTH );
- hb_log("Width out of bounds, scaling down to %i", job->maxWidth);
- hb_log("New dimensions %i * %i", job->width, job->height);
- }
-
- 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] );