minor improvements to comments and order of exec

pull/3471/head
kallaballa 2 years ago
parent 933c189460
commit 95ef103fe6
  1. 2
      src/nanovg/nanovg-demo.cpp
  2. 4
      src/tetra/tetra-demo.cpp
  3. 4
      src/video/video-demo.cpp

@ -248,7 +248,7 @@ int main(int argc, char **argv) {
//Activate the OpenCL context for VAAPI
va::bind();
//The frameBuffer is upside-down. Flip videoFrame. (OpenCL)
//The videoFrame is upside-down. Flip. (OpenCL)
cv::flip(videoFrame, videoFrame, 0);
//Encode the frame using VAAPI on the GPU.
writer.write(videoFrame);

@ -125,8 +125,6 @@ int main(int argc, char **argv) {
glow_effect(frameBuffer);
//Color-conversion from BGRA to RGB. OpenCV/OpenCL.
cv::cvtColor(frameBuffer, videoFrame, cv::COLOR_BGRA2RGB);
//Video frame is upside down -> flip it (OpenCL)
cv::flip(videoFrame, videoFrame, 0);
//Release the frame buffer for use by OpenGL
gl::release_to_gl(frameBuffer);
@ -144,6 +142,8 @@ int main(int argc, char **argv) {
//Activate the OpenCL context for VAAPI
va::bind();
//Video frame is upside down because the frameBuffer is. -> flip it (OpenCL)
cv::flip(videoFrame, videoFrame, 0);
//Encode the frame using VAAPI on the GPU.
encoder.write(videoFrame);

@ -168,8 +168,6 @@ int main(int argc, char **argv) {
glow_effect(frameBuffer);
//Color-conversion from BGRA to RGB. (OpenCL)
cv::cvtColor(frameBuffer, videoFrame, cv::COLOR_BGRA2RGB);
//Video frame is upside down -> flip it (OpenCL)
cv::flip(videoFrame, videoFrame, 0);
//Release the frame buffer for use by OpenGL
gl::release_to_gl(frameBuffer);
@ -187,6 +185,8 @@ int main(int argc, char **argv) {
//Activate the OpenCL context for VAAPI
va::bind();
//Video frame is upside down -> flip it (OpenCL)
cv::flip(videoFrame, videoFrame, 0);
//Encode the frame using VAAPI on the GPU.
writer.write(videoFrame);

Loading…
Cancel
Save