diff options
author | jbrjake <[email protected]> | 2007-10-16 19:00:41 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2007-10-16 19:00:41 +0000 |
commit | c832b1edbbff5692fdc6b55ec245e013d1b1dce9 (patch) | |
tree | 25ab3d8313fad66b1fb3284eebbfca0ab7649740 /libhb/work.c | |
parent | 3a86ddf273f92ad057e40f4b6f08545d3cef86a4 (diff) |
"Loose" anamorphic:
- Scales the storage frame size to arbitrary widths, like 640 for the iPod.
- Uses dimensions that divide cleanly by an arbitrary number (default: 16) and adjusts the SAR to match
- Uses ITU PAR values when the video is meant to be overscanned ( 7+ pixels cropped on left+right)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1029 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r-- | libhb/work.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libhb/work.c b/libhb/work.c index 72d12d75a..22e081532 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -128,16 +128,26 @@ static void do_job( hb_job_t * job, int cpu_count ) 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); + } - /* Keep width and height within these boundaries */ - if (job->maxHeight && (job->height > job->maxHeight) ) + /* 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) ) + if (job->maxWidth && (job->width > job->maxWidth) && (job->pixel_ratio != 2)) { job->width = job->maxWidth; hb_fix_aspect( job, HB_KEEP_WIDTH ); |