- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you give a sample to show the functionality, for example, the input data type and size, the output date type? Convert_8u1u or ReduceBit 8u1u just convert, no rotate
If shift by bit, intel compiler's intrinsics function seems be able to do this. for example
unsigned int _rotl(unsigned int value, int shift) | Implements 32-bit left rotate of value by shift positions. |
unsigned int _rotr(unsigned int value, int shift) | Implements 32-bit right rotate of value by shift positions. |
Intrinsics for IA-32 and Intel 64 Architectures | |
---|---|
unsigned short _rotwl(unsigned short value, int shift) | Implements 16-bit left rotate of value by shift positions. |
unsigned short _rotwr(unsigned short value, int shift) | Implements 16-bit right rotate of value by shift positions. |
Best Regards,
Ying H.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
is there a simple way of rotating content of resulting byte of hose functions ? (bit 7 becomes 0 ... 0 -> 7 etc)
A lookup table of 255 reversed bytes.Speaking about performance nothing would compare with it.
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...
const int iSize = < some value >;
unsigned byte ubData[ iSize ] = { 0x0 };
unsigned byte ubLUT[ 256 ] =
{
//Lookup Table ( LUT )of 256 unsigned bytes initialized with the bit reversed values
...
};
...
// ubData initialization / usage code / etc
...
for(inti = 0;i <iSize; i++ )
{
ubData = ubLUT[ ubData ];
}
...
Best regards,
Sergey

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page