[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Re: JPEGs offset

From: Andrew Webster
Subject: [Gnash-dev] Re: JPEGs offset
Date: Thu, 16 Oct 2008 14:44:13 -0400

On Tue, Oct 14, 2008 at 5:36 PM, Andrew Webster <address@hidden> wrote:
> I'm trying out the 0.8.4 release with a swf v7 movie that has jpeg
> images.  When I build the gtk/agg version for my desktop PC, the movie
> renders very nicely, however when I build the fb/agg version for my
> embedded device, all of the jpeg images are rendered with the top-left
> corner starting where the center of the jpeg appears on the gtk/agg
> desktop build (they are all translated by [width/2,height/2]).  I
> suppose this means I have a problem with one of my dependencies, but
> I'm not sure where to start looking.  I was hoping that someone who is
> more familiar with the code might be able to point me at a good place
> to start.  I do not have the swf source.

On my embedded (arm) target, all negative floating point numbers
passed to PIXELS_TO_TWIPS are being converted to 0, which is not the
case on my PC.  If I use the "safe" version of PIXELS_TO_TWIPS (when
TRUST_FLOAT_TO_UINT32_CONVERSION is not defined), then the movie is
rendered properly on the arm.

This solution seems acceptable to me, but I'm curious if anyone can
shed some light on the floating point conversion:

return static_cast<boost::int32_t>(static_cast<boost::uint32_t>(a * 20));

used in PIXELS_TO_TWIPS.  Is there a compiler flag or something that
allows negative floating point numbers to be converted to a non-zero
unsigned int that I'm missing for my cross compile?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]