- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
Does anyone did /can help me with an scrolling algorithm for a given image buffer(RGB typically). I mean copying an image onto itself so an "shift" would be achived .Obviously I will have to fill in(overwrite) the new portions of an image, with new pixels...this is not the issue.
The operation must be done as efficiently as possible and without using an secondary buffer if possible, or with an very small secondary buffer, as the primary buffer is much likely to occupy the entire available memory.
By the way, ippiCopy can copy an image onto itself?
In what conditions?
What if the source and destination rectangles overlap?
Does anyone did /can help me with an scrolling algorithm for a given image buffer(RGB typically). I mean copying an image onto itself so an "shift" would be achived .Obviously I will have to fill in(overwrite) the new portions of an image, with new pixels...this is not the issue.
The operation must be done as efficiently as possible and without using an secondary buffer if possible, or with an very small secondary buffer, as the primary buffer is much likely to occupy the entire available memory.
By the way, ippiCopy can copy an image onto itself?
In what conditions?
What if the source and destination rectangles overlap?
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have ippsMove function which designed to work with overlapped memory buffers. Note, there is no ippiMove function.
Vladimir
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik (Intel)
We have ippsMove function which designed to work with overlapped memory buffers. Note, there is no ippiMove function.
Vladimir
Vladimir
I thought about how to do this - Choose the largest rectangle that can be copied without overlapping and do a repeated copy until the hole buffer is done- but if the amount by which I have to move is small, than the size of the largest non overlapping rectangle is also small, making the operation extremely slow. So a secondary buffer should be used. But..what is "small"? How big the secondary buffer needs to be to achieve some speed gain?
I could also use ippsMove one pixel row at a time but this will probably degrade performance just as well.
So this is not as easy as it looks!
PS: Main buffer is expected to currently have about 1GB or more. Further more, the image stored in it is usually limited in width but extremely high(or long if you prefer) so a row by row method will tend to process little information at a time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you may rely on performance of ippsMove function. Yes, it will lead to processing image row by row. But, hey, how do you think ippiCopy function do its job?
Vladimir
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik (Intel)
I think you may rely on performance of ippsMove function. Yes, it will lead to processing image row by row. But, hey, how do you think ippiCopy function do its job?
Vladimir
Vladimir
I do have, however, reasons to believe you rather than my assumptions. I am not good in assembler(or hardware for that matter).
Thank you for your answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Usually it is good to process 2D data in rows (better data locality). It also provide simple pattern for parallelization.
Vladimir
Vladimir

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