File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
examples/protonect/include/libfreenect2 Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2929
3030#include < cstddef>
3131#include < stdint.h>
32+ #include < stdlib.h>
3233#include < libfreenect2/config.h>
3334
3435namespace libfreenect2
@@ -46,19 +47,21 @@ struct LIBFREENECT2_API Frame
4647 uint32_t timestamp;
4748 uint32_t sequence;
4849 size_t width, height, bytes_per_pixel;
50+ unsigned char * rawdata;
4951 unsigned char * data;
5052
5153 Frame (size_t width, size_t height, size_t bytes_per_pixel) :
5254 width (width),
5355 height (height),
5456 bytes_per_pixel (bytes_per_pixel)
5557 {
56- data = new unsigned char [width * height * bytes_per_pixel];
58+ rawdata = new unsigned char [width * height * bytes_per_pixel + 128 ];
59+ data = (unsigned char *)((unsigned long long )(rawdata+64 ) & (unsigned long long )(0xFFFFFFFFFFFFFFC0ULL ));
5760 }
5861
5962 ~Frame ()
6063 {
61- delete[] data ;
64+ delete[] rawdata ;
6265 }
6366};
6467
You can’t perform that action at this time.
0 commit comments