From a75a8e649f8c116abfa51df9dccacc0d5f4efd42 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 6 Oct 2018 00:27:20 +0200 Subject: [PATCH] Fix some Clang warnings. --- flow.cpp | 7 ++----- flow.h | 5 ++--- flow_main.cpp | 2 +- video_stream.cpp | 2 +- video_stream.h | 2 -- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/flow.cpp b/flow.cpp index 71b0b23..68392dc 100644 --- a/flow.cpp +++ b/flow.cpp @@ -953,11 +953,8 @@ void Blend::exec(GLuint image_tex, GLuint flow_tex, GLuint output_tex, GLuint ou glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); } -Interpolate::Interpolate(int width, int height, const OperatingPoint &op, bool split_ycbcr_output) - : width(width), - height(height), - flow_level(op.finest_level), - op(op), +Interpolate::Interpolate(const OperatingPoint &op, bool split_ycbcr_output) + : flow_level(op.finest_level), split_ycbcr_output(split_ycbcr_output), splat(op), blend(split_ycbcr_output) { diff --git a/flow.h b/flow.h index 9536a38..af3f810 100644 --- a/flow.h +++ b/flow.h @@ -541,7 +541,7 @@ private: class Interpolate { public: - Interpolate(int width, int height, const OperatingPoint &op, bool split_ycbcr_output); + Interpolate(const OperatingPoint &op, bool split_ycbcr_output); // Returns a texture (or two, if split_ycbcr_output is true) that must // be released with release_texture() after use. image_tex must be a @@ -553,10 +553,9 @@ public: } private: - int width, height, flow_level; + int flow_level; GLuint vertex_vbo, vao; TexturePool pool; - const OperatingPoint op; const bool split_ycbcr_output; Splat splat; diff --git a/flow_main.cpp b/flow_main.cpp index a961a60..ecaee05 100644 --- a/flow_main.cpp +++ b/flow_main.cpp @@ -379,7 +379,7 @@ void interpolate_image(int argc, char **argv, int optind) } DISComputeFlow compute_flow(width1, height1, op); GrayscaleConversion gray; - Interpolate interpolate(width1, height1, op, /*split_ycbcr_output=*/false); + Interpolate interpolate(op, /*split_ycbcr_output=*/false); GLuint tex_gray; glCreateTextures(GL_TEXTURE_2D_ARRAY, 1, &tex_gray); diff --git a/video_stream.cpp b/video_stream.cpp index aa93dc7..2a75e20 100644 --- a/video_stream.cpp +++ b/video_stream.cpp @@ -243,7 +243,7 @@ VideoStream::VideoStream() check_error(); compute_flow.reset(new DISComputeFlow(width, height, operating_point2)); - interpolate.reset(new Interpolate(width, height, operating_point2, /*split_ycbcr_output=*/true)); + interpolate.reset(new Interpolate(operating_point2, /*split_ycbcr_output=*/true)); chroma_subsampler.reset(new ChromaSubsampler); check_error(); } diff --git a/video_stream.h b/video_stream.h index b86d271..5b8df26 100644 --- a/video_stream.h +++ b/video_stream.h @@ -78,8 +78,6 @@ private: std::string stream_mux_header; bool seen_sync_markers = false; - QSurface *gl_surface; - // Effectively only converts from 4:2:2 to 4:4:4. // TODO: Have a separate version with ResampleEffect, for scaling? std::unique_ptr ycbcr_planar_convert_chain; -- 2.39.2