MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / copyFrame

Method copyFrame

src/openni2/VideoStream.cpp:56–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void VideoStream::copyFrame(float* srcPix, int srcX, int srcY, int srcStride, uint16_t* dstPix, int dstX, int dstY, int dstStride, int width, int height, bool mirroring)
57{
58 srcPix += srcX + srcY * srcStride;
59 dstPix += dstX + dstY * dstStride;
60
61 for (int y = 0; y < height; y++) {
62 uint16_t* dst = dstPix + y * dstStride;
63 float* src = srcPix + y * srcStride;
64 if (mirroring) {
65 dst += width;
66 for (int x = 0; x < width; x++)
67 *dst-- = *src++;
68 } else {
69 for (int x = 0; x < width; x++)
70 *dst++ = *src++;
71 }
72 }
73}
74void VideoStream::raisePropertyChanged(int propertyId, const void* data, int dataSize) {
75 if (callPropertyChangedCallback)
76 StreamBase::raisePropertyChanged(propertyId, data, dataSize);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected