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

Method flipYBuffer

examples/viewer.h:124–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 }
123
124 void flipYBuffer(unsigned char *data)
125 {
126 typedef unsigned char type;
127
128 size_t linestep = width * bytes_per_pixel / sizeof(type);
129
130 type *first_line = reinterpret_cast<type *>(data), *last_line = reinterpret_cast<type *>(data) + (height - 1) * linestep;
131
132 for (size_t y = 0; y < height / 2; ++y)
133 {
134 for (size_t x = 0; x < linestep; ++x, ++first_line, ++last_line)
135 {
136 std::swap(*first_line, *last_line);
137 }
138 last_line -= 2 * linestep;
139 }
140 }
141
142 libfreenect2::Frame *downloadToNewFrame()
143 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected