[poppler] Poppler Fix #bug Number 25578

amit aggarwal amitcs06 at gmail.com
Thu Dec 10 22:57:04 PST 2009


poppler/goo/FixedPoint.cc

Old Code
---int FixedPoint::mul(int x, int y) {
#if 1 //~tmp
  return ((FixPtInt64)x * y) >> fixptShift;

New Changes
+++
FixPtInt64 FixedPoint::mul(FixPtInt64 x, FixPtInt64 y) {
#if 1 //~tmp
  FixPtInt64 val;
  val =((FixPtInt64)(x * y))>>fixptShift;

  return val;


poppler/goo/FixedPoint.h

OldCode
--static FixedPoint make(int valA) { FixedPoint x; x.val = valA; return x; }

New changes
++  static FixedPoint make(FixPtInt64 valA) { FixedPoint x; x.val = valA;
return x; }

--  static int mul(int x, int y);
++  static FixPtInt64 mul(FixPtInt64 x, FixPtInt64 y);


--  static int div(int x, int y);
++  static FixPtInt64 div(FixPtInt64 x, FixPtInt64 y);

--  int val;            // 16.16 fixed point
++  FixPtInt64 val;        // 16.16 fixed point

-- 
Thanks
Amit Aggarwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/poppler/attachments/20091211/44f47fdb/attachment.htm 
-------------- next part --------------
poppler/goo/FixedPoint.cc

Old Code
---int FixedPoint::mul(int x, int y) {
#if 1 //~tmp
  return ((FixPtInt64)x * y) >> fixptShift;

New Changes
+++
FixPtInt64 FixedPoint::mul(FixPtInt64 x, FixPtInt64 y) {
#if 1 //~tmp
  FixPtInt64 val;
  val =((FixPtInt64)(x * y))>>fixptShift;

  return val;


poppler/goo/FixedPoint.h

OldCode
--static FixedPoint make(int valA) { FixedPoint x; x.val = valA; return x; }

New changes
++  static FixedPoint make(FixPtInt64 valA) { FixedPoint x; x.val = valA; return x; }

--  static int mul(int x, int y);
++  static FixPtInt64 mul(FixPtInt64 x, FixPtInt64 y);


--  static int div(int x, int y);
++  static FixPtInt64 div(FixPtInt64 x, FixPtInt64 y);

--  int val;			// 16.16 fixed point
++  FixPtInt64 val;		// 16.16 fixed point



More information about the poppler mailing list