> Date: Mon, 2 May 2005 10:17:57 -0700 (PDT)
> From: "Steven M. Schultz" <[EMAIL PROTECTED]>
> To: mjpeg-users@lists.sourceforge.net
> Subject: Re: [Mjpeg-users] re Compiling Mjpegtools under Cyqwin
> 
> 
> On Mon, 2 May 2005 [EMAIL PROTECTED] wrote:
> 
> > /home/pjk/mjpegplay/y4mdenoise/DoublyLinkedList.hh: undefined reference to 
> > `Limits<unsigned>::Log2Bits'
> > 
> > This arises from the use of "unsigned int" in file  
> > y4mdenoise/BitmapRegion2D.hh class 
> > function
> > BitmapRegion2D<INDEX,SIZE>::IteratorForward
> > if this is replace with "uint32_t" then  everything compiles.
> > The problem is I do not understand this code well enough to know if this is 
> > reasonable. 
> > Unsigned int is used frequently throughout this file, perhaps all should be 
> > addressed?
> 
>       Yes, I noticed that as well - other uses of 'unsigned int' are not
>       causing any problem.  I hesitate to change things that aren't causing
>       problems - often that's a way to create new problems ;)
> 
>       In BitmapRegion2D.hh I see 4 uses of 'unsigned int' with Log2Bits:
> 
> BitmapRegion2D.hh:      tnWordIndex = tnBitIndex >> Limits<unsigned 
> int>::Log2Bits;
> BitmapRegion2D.hh:      tnBitIndex -= tnWordIndex << Limits<unsigned 
> int>::Log2Bits;
> BitmapRegion2D.hh:      tnLastWordIndex = tnLastBitIndex >> Limits<unsigned 
> int>::Log2Bits;
> BitmapRegion2D.hh:      tnLastBitIndex -= tnLastWordIndex << Limits<unsigned 
> int>::Log2Bits;
> 
>       Are those the same 4 that you needed to change?
> 
>       For now even the x86_64 systems have 'unsigned int' as 32bits - offhand
>       I do not know of a (popular) system that has 'unsigned int' being
>       64bits so it's probably OK to change those 4 uses of unsigned in
>       to be uint32_t.
> 
>       Cheers,
>       Steven Schultz
Actually I was a little premature with my last post. There are a couple more 
uses of 
Limits<unsigned int> All are to provide constants for manipulation of unsigned 
int bit 
fields. I have appended a patch file for my current position. I still haven't 
changed a 
number of variable declarations because I am not sure how far the consequences 
flow.
But I now have the whole mjpegplay tree compiling, but have not tested any 
funcionality.

diff  cvs20050422\mjpeg_play\y4mdenoise\BitmapRegion2D.hh 
pjk\mjpegplay\y4mdenoise\BitmapRegion2D.hh
1090c1090
<       unsigned int nWord;
---
>       uint32_t nWord;
1092c1092
<       unsigned int nMask;
---
>       uint32_t nMask;
1099,1100c1099,1100
<       tnWordIndex = tnBitIndex >> Limits<unsigned int>::Log2Bits;
<       tnBitIndex -= tnWordIndex << Limits<unsigned int>::Log2Bits;
---
>       tnWordIndex = tnBitIndex >> Limits<uint32_t>::Log2Bits;
>       tnBitIndex -= tnWordIndex << Limits<uint32_t>::Log2Bits;
1132c1132
<       tnLastBitIndex = tnWordIndex * Limits<unsigned int>::Bits
---
>       tnLastBitIndex = tnWordIndex * Limits<uint32_t>::Bits
1139,1140c1139,1140
<       tnLastWordIndex = tnLastBitIndex >> Limits<unsigned int>::Log2Bits;
<       tnLastBitIndex -= tnLastWordIndex << Limits<unsigned int>::Log2Bits;
---
>       tnLastWordIndex = tnLastBitIndex >> Limits<uint32_t>::Log2Bits;
>       tnLastBitIndex -= tnLastWordIndex << Limits<uint32_t>::Log2Bits;
1178c1178
<       tnLastBitIndex = tnWordIndex * Limits<unsigned int>::Bits
---
>       tnLastBitIndex = tnWordIndex * Limits<uint32_t>::Bits
1217c1217
<       nHigh = Limits<unsigned int>::Bits - 1;
---
>       nHigh = Limits<uint32_t>::Bits - 1;
1259c1259
<       nHigh = Limits<unsigned int>::Bits - 1;
---
>       nHigh = Limits<uint32_t>::Bits - 1;
[EMAIL PROTECTED]
Peter King



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to