From e69e8b1d09fb579316595b4e6a850e717358a8b1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 19 Jun 2011 19:03:33 +0000 Subject: TQt4 port kdegraphics This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../plugins/djvu/libdjvu/IW44EncodeCodec.cpp | 90 +++++++++++----------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'kviewshell/plugins/djvu/libdjvu/IW44EncodeCodec.cpp') diff --git a/kviewshell/plugins/djvu/libdjvu/IW44EncodeCodec.cpp b/kviewshell/plugins/djvu/libdjvu/IW44EncodeCodec.cpp index c63eda7d..eb429563 100644 --- a/kviewshell/plugins/djvu/libdjvu/IW44EncodeCodec.cpp +++ b/kviewshell/plugins/djvu/libdjvu/IW44EncodeCodec.cpp @@ -160,9 +160,9 @@ public: Encode(void); /** Initializes an IWBitmap with image #bm#. This constructor performs the wavelet decomposition of image #bm# and records the - corresponding wavelet coefficient. Argument #mask# is an optional - bilevel image specifying the masked pixels (see \Ref{IW44Image.h}). */ - void init(const GBitmap &bm, const GP mask=0); + corresponding wavelet coefficient. Argument #tqmask# is an optional + bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). */ + void init(const GBitmap &bm, const GP tqmask=0); // CODER /** Encodes one data chunk into ByteStream #bs#. Parameter #parms# controls how much data is generated. The chunk data is written to ByteStream @@ -211,11 +211,11 @@ public: Encode(void); /** Initializes an IWPixmap with color image #bm#. This constructor performs the wavelet decomposition of image #bm# and records the - corresponding wavelet coefficient. Argument #mask# is an optional - bilevel image specifying the masked pixels (see \Ref{IW44Image.h}). + corresponding wavelet coefficient. Argument #tqmask# is an optional + bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). Argument #crcbmode# specifies how the chrominance information should be encoded (see \Ref{CRCBMode}). */ - void init(const GPixmap &bm, const GP mask=0, CRCBMode crcbmode=CRCBnormal); + void init(const GPixmap &bm, const GP tqmask=0, CRCBMode crcbmode=CRCBnormal); // CODER /** Encodes one data chunk into ByteStream #bs#. Parameter #parms# controls how much data is generated. The chunk data is written to ByteStream @@ -720,17 +720,17 @@ IW44Image::Transform::Encode::RGB_to_Cr(const GPixel *p, int w, int h, int rowsi static void -interpolate_mask(short *data16, int w, int h, int rowsize, - const signed char *mask8, int mskrowsize) +interpolate_tqmask(short *data16, int w, int h, int rowsize, + const signed char *tqmask8, int mskrowsize) { int i,j; - // count masked bits + // count tqmasked bits short *count; GPBuffer gcount(count,w*h); short *cp = count; - for (i=0; i gsdata(sdata,w*h); @@ -820,8 +820,8 @@ interpolate_mask(short *data16, int w, int h, int rowsize, static void -forward_mask(short *data16, int w, int h, int rowsize, int begin, int end, - const signed char *mask8, int mskrowsize ) +forward_tqmask(short *data16, int w, int h, int rowsize, int begin, int end, + const signed char *tqmask8, int mskrowsize ) { int i,j; signed char *m; @@ -830,12 +830,12 @@ forward_mask(short *data16, int w, int h, int rowsize, int begin, int end, // Allocate buffers short *sdata; GPBuffer gsdata(sdata,w*h); - signed char *smask; - GPBuffer gsmask(smask,w*h); - // Copy mask - m = smask; - for (i=0; i gstqmask(stqmask,w*h); + // Copy tqmask + m = stqmask; + for (i=0; i -IW44Image::create_encode(const GBitmap &bm, const GP mask) +IW44Image::create_encode(const GBitmap &bm, const GP tqmask) { IWBitmap::Encode *bit=new IWBitmap::Encode(); GP retval=bit; - bit->init(bm, mask); + bit->init(bm, tqmask); return retval; } @@ -1412,7 +1412,7 @@ IWBitmap::Encode::~Encode() } void -IWBitmap::Encode::init(const GBitmap &bm, const GP gmask) +IWBitmap::Encode::init(const GBitmap &bm, const GP gtqmask) { // Free close_codec(); @@ -1430,14 +1430,14 @@ IWBitmap::Encode::init(const GBitmap &bm, const GP gmask) for (i=0; i<256; i++) bconv[i] = max(0,min(255,i*255/g)) - 128; // Perform decomposition - // Prepare mask information + // Prepare tqmask information const signed char *msk8 = 0; int mskrowsize = 0; - GBitmap *mask=gmask; - if (gmask) + GBitmap *tqmask=gtqmask; + if (gtqmask) { - msk8 = (const signed char*)((*mask)[0]); - mskrowsize = mask->rowsize(); + msk8 = (const signed char*)((*tqmask)[0]); + mskrowsize = tqmask->rowsize(); } // Prepare a buffer of signed bytes for (i=0; i IW44Image::create_encode( - const GPixmap &pm, const GP gmask, CRCBMode crcbmode) + const GPixmap &pm, const GP gtqmask, CRCBMode crcbmode) { IWPixmap::Encode *pix=new IWPixmap::Encode(); GP retval=pix; - pix->init(pm, gmask,(IWPixmap::Encode::CRCBMode)crcbmode); + pix->init(pm, gtqmask,(IWPixmap::Encode::CRCBMode)crcbmode); return retval; } @@ -1574,7 +1574,7 @@ IWPixmap::Encode::~Encode() } void -IWPixmap::Encode::init(const GPixmap &pm, const GP gmask, CRCBMode crcbmode) +IWPixmap::Encode::init(const GPixmap &pm, const GP gtqmask, CRCBMode crcbmode) { /* Free */ close_codec(); @@ -1598,14 +1598,14 @@ IWPixmap::Encode::init(const GPixmap &pm, const GP gmask, CRCBMode crcb case CRCBnormal: crcb_half=0; crcb_delay=10; break; case CRCBfull: crcb_half=0; crcb_delay= 0; break; } - // Prepare mask information + // Prepare tqmask information const signed char *msk8 = 0; int mskrowsize = 0; - GBitmap *mask=gmask; - if (mask) + GBitmap *tqmask=gtqmask; + if (tqmask) { - msk8 = (signed char const *)((*mask)[0]); - mskrowsize = mask->rowsize(); + msk8 = (signed char const *)((*tqmask)[0]); + mskrowsize = tqmask->rowsize(); } // Fill buffer with luminance information DJVU_PROGRESS_TASK(create,"initialize pixmap",3); -- cgit v1.2.3