cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Inco
Journeyman III

ATIStream and 24bgr image =(

Hi everyone! 😃 (sorry for english )
I got a question:
I want to use the video card to speed up the code for image processing.
But the problem is that: both CUDA and AMDStream minimum can handle only int type (32 bits), but i have the image 24bgr =(
How can I map(convert) 24bgt image quickly to proccess them on video card? or how to handle?

Now i use next sample code:

int* gpu_data ...
byte* image = ...
for (int i = 0; i < imageSize; i++)
{
  gpu_data = image;
}

and then i map gpu_data on int3 array, that each position in the matrix was the color-point? ... but one thing is already converting spend a lot of time =(((
What can i do?

0 Likes
4 Replies
gaurav_garg
Adept I

Not sure if you are using Brook+ or CAL. CAL already has support for 8-bit, 16-bit datatypes. Brook+ will be having support for 8-bit, 16-bit in next release.

0 Likes

I have SDK v1.3-beta for Brook+, but i cant create

::brook::Stream<byte> gpuBuffer(2, inputDim);

of

::brook::Stream<char> gpuBuffer(2, inputDim);

error LNK2001: unresolved external symbol "enum brook::BRformat * __cdecl brook::getStreamType<char>(char *,unsigned int &"

=((

0 Likes

Brook+ will support 8-bit, 16-bit datatype in next 1.4 release.

0 Likes

Hello everyone!
I have a similar problem - converting bitmap data from ubyte4 to float4. I use next code:

dcl_cb cb0[1]
dcl_output_generic o0
dcl_resource_id(0)_type(2d,unnorm)_fmtx(float)_fmty(float)_fmtz(float)_fmtw(float)
sample_resource(0)_sampler(0) o0, cb0[0].xy

But if source data stored in the global memory, then how can i do it? (CAL v1.4 beta)

0 Likes