summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2009-06-05 16:39:32 +0000
committerjbrjake <[email protected]>2009-06-05 16:39:32 +0000
commit259bc9a5dd14e07b3fd6b5e7a6aa3cf06caf9b59 (patch)
tree16de7c84f4d107e3f45c7a935a9468b4175ecc5b /libhb
parentdfaa966ad3ef68c86db85eb47cddd7eec4a817a4 (diff)
CLI: Implements custom anamorphic. No more -p or -P. Choices are --strict-anamorphic, --loose-anamorphic, and the new --custom-anamorphic. The last of which also handles --pixel-aspect, --display-width, --itu-par, --modulus, and --keep-display-aspect options. Loose will also obey the pixel aspect and ITU PAR options.
Libhb: Fixed a small bug with custom anamorphic working off the source's display aspect even when dealing with a custom display aspect, and made the job config display aware that custom anamorphic exists. Scripts: Updated manicure to write the new anamorphic option names. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2487 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/hb.c14
-rw-r--r--libhb/work.c2
2 files changed, 9 insertions, 7 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index f5caa8cd6..f7e3c9dae 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -796,12 +796,14 @@ void hb_set_anamorphic_size( hb_job_t * job,
}
else
{
- /* We first need the display ar.
- That's the source display width divided by the source height after cropping.
- Then we multiple the output height by that to get the pixel aspect width,
- and the pixel aspect height is the storage width.*/
- pixel_aspect_width = height * source_display_width / cropped_height;
- pixel_aspect_height = width;
+ /* If we're doing ana 3 and not specifying a DAR, care needs to be taken.
+ This indicates a PAR is potentially being set by the interface. But
+ this is an output PAR, to correct a source, and it should not be assumed
+ that it properly creates a display aspect ratio when applied to the source,
+ which could easily be stored in a different resolution. */
+
+ int output_display_width = width * (double)pixel_aspect_width /
+ (double)pixel_aspect_height ;
}
/* Back to caller */
diff --git a/libhb/work.c b/libhb/work.c
index 92f04f483..e99feaa8c 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -204,7 +204,7 @@ void hb_display_job_info( hb_job_t * job )
if( job->anamorphic.mode )
{
- hb_log( " + %s anamorphic", job->anamorphic.mode == 1 ? "strict" : "loose" );
+ hb_log( " + %s anamorphic", job->anamorphic.mode == 1 ? "strict" : job->anamorphic.mode == 2? "loose" : "custom" );
hb_log( " + storage dimensions: %d * %d -> %d * %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] );