User Profile

Collapse

Profile Sidebar

Collapse
jamesSharp007
jamesSharp007
Last Activity: Mar 17 '10, 12:42 AM
Joined: Mar 16 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jamesSharp007
    replied to Fastest byte[,,] to byte[] copy
    No, there is no multiplication.

    Arrays looks like:

    data3D[0, 0, 0] = 0
    data3D[0, 0, 1] = 128
    data3D[0, 0, 2] = 255
    data3D[0, 0, 3] = 255

    data3D[0, 1, 0] = 0
    data3D[0, 1, 1] = 32
    data3D[0, 1, 2] = 64
    data3D[0, 1, 3] = 255
    ...

    and

    data1D[0] = 0
    data1D[1] = 128
    data1D[2] = 255
    data1D[3] = 255
    data1D[4]...
    See more | Go to post

    Leave a comment:


  • jamesSharp007
    started a topic Fastest byte[,,] to byte[] copy

    Fastest byte[,,] to byte[] copy

    Hi,

    I'm doing some video processing and need to copy 3d array of bytes to 1d array of bytes where:

    3d array is [width, height, layers] and
    1d array is [width * height * layers]

    Now i have:
    Code:
    int index = -1;
    
    for (int j = 0; j < h; ++j)
        for (int i = 0; i < w; ++i)
        {
            data1D[++index] = data3D[j, i, 0];
            data1D[++index] = data3D[j,
    ...
    See more | Go to post
No activity results to display
Show More
Working...