Jump to content

  • Log In with Google      Sign In   
  • Create Account


transfer byte[] to effect


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
28 replies to this topic

#21 begemot   Members   -  Reputation: 103

Like
0Likes
Like

Posted 27 April 2012 - 06:05 AM

My problem is in copying a lot of memory in textures. I need execute operation of updating for 36 images with rate 25 times per second. If I have images 300x200 size I takes about 60 ms for copying and display. But if my pictures reach 700x500 size it takes just 150 ms (I tested with 16bpp format). I think to resize my images before copying, but I don't know how to do it. can ipp libs do it? Is it realy?

Sponsor:

#22 begemot   Members   -  Reputation: 103

Like
0Likes
Like

Posted 27 April 2012 - 06:11 AM

Also YUV->RGB conversion was discussed. Can you help me in this? Can I get frames from my video files in YUV format or I must do any convertions between getting frame and copying steps?

#23 Nik02   Crossbones+   -  Reputation: 2742

Like
0Likes
Like

Posted 27 April 2012 - 06:36 AM

have you profiled your application? Do you have actual knowledge of where your performance bottleneck is?


Niko Suni


#24 begemot   Members   -  Reputation: 103

Like
0Likes
Like

Posted 27 April 2012 - 06:49 AM

the function CopyMemory costs 52%

#25 Nik02   Crossbones+   -  Reputation: 2742

Like
0Likes
Like

Posted 27 April 2012 - 06:49 AM

The YUV to RGB conversion can be done in pixel shader, by using the conversion formula found here: http://en.wikipedia.org/wiki/YUV

Because of the simple logic, GPU can perform this operation very fast per pixel.

Some hardware is capable of using YUV format textures directly; they will perform the conversion to RGB automatically.

Whether or not you have YUV data available to begin with, depends entirely on your video codec of choice.

Niko Suni


#26 Nik02   Crossbones+   -  Reputation: 2742

Like
0Likes
Like

Posted 27 April 2012 - 06:50 AM

the function CopyMemory costs 52%


What about Marshal.Copy?

Niko Suni


#27 begemot   Members   -  Reputation: 103

Like
0Likes
Like

Posted 27 April 2012 - 07:31 AM

I use line per line CopyMemory from kernel32.dll because I don't understand how copy data from IntPtr to IntPtr by Marshal.Copy. It seems to me, It works a little bit faster then primary unsafe code.

#28 Nik02   Crossbones+   -  Reputation: 2742

Like
0Likes
Like

Posted 27 April 2012 - 07:45 AM

When you get a video frame from your codec, can you specify a destination address for the decompressed frame? You could decompress directly to a locked surface buffer, if this was the case.

Niko Suni


#29 begemot   Members   -  Reputation: 103

Like
0Likes
Like

Posted 12 May 2012 - 06:49 AM

Thank you very much




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS