From 9084dafc40f3cbb056a0099395eaa77484f8c43f Mon Sep 17 00:00:00 2001 From: jbrjake Date: Sun, 17 Feb 2008 06:15:29 +0000 Subject: Signal anamorphic in the MP4 container though the pixel aspect atom as well as the transformation matrix. This allows anamorphic on the iPhone and iPod Touch. One day, if Apple fixes a QuickTime Player bug, the only way to get it to display right in QuickTime might be to remove the transformation matrix the AppleTV still depends upon. It's a gamble. Oh well. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1278 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/muxmp4.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'libhb/muxmp4.c') diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index ff30bd9fe..3f043dbdd 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -232,10 +232,21 @@ static int MP4Init( hb_mux_object_t * m ) } } - /* apply the anamorphic transformation matrix if needed */ + if( job->pixel_ratio ) + { + /* PASP atom for anamorphic video */ + float width, height; - if( job->pixel_ratio ) { + width = job->pixel_aspect_width; + height = job->pixel_aspect_height; + + MP4AddPixelAspectRatio(m->file, mux_data->track, (uint32_t)width, (uint32_t)height); + } + + + if( job->pixel_ratio ) { + /* apply the anamorphic transformation matrix as well */ uint8_t* val; uint8_t nval[38]; uint32_t *ptr32 = (uint32_t*) (nval + 2); -- cgit v1.2.3