[FFmpeg-devel] [PATCH] Use tkhd matrix for proper display in mov

Michael Niedermayer michaelni
Tue May 27 23:09:19 CEST 2008


On Tue, May 27, 2008 at 02:49:24PM -0400, John Schmiederer wrote:
> > > Attached is a patch to account for the transformation matrix contained in the tkhd atom for proper display width/height.
> >
> > > The video
> > > http://samples.mplayerhq.hu/mov/tkhd_matrix/white_zombie_scrunch.mov
> > > plays at 160x240 when it should really be scaled to 320x240.
> >
> > > +    int i;
> > > +    int width;
> > > +    int height;
> > > +    float disp_transform[3];
> > > +    float display_matrix[3][3];
> >
> > please use integers, there is no need for floats.
> >
> Ok, I changed display_matrix to int, but left disp_transform as float to avoid any possible overflow from multiplying large ints.

use a*(int64_t)b

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080527/e2e24e02/attachment.pgp>



More information about the ffmpeg-devel mailing list