X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=video_stream.h;h=b86d271e0c473e7ec98874abdec639970ddc31df;hb=d2664bbfbd09f04b25f94fefbf1ac890edbb4486;hp=925cace4c62f5465c7bfb4d21bd0e64aca17a3c3;hpb=8deea0eee4f9b18540463ba253747c232873527b;p=nageru diff --git a/video_stream.h b/video_stream.h index 925cace..b86d271 100644 --- a/video_stream.h +++ b/video_stream.h @@ -19,6 +19,7 @@ extern "C" { #include "ref_counted_gl_sync.h" +class ChromaSubsampler; class DISComputeFlow; class Interpolate; class Mux; @@ -48,6 +49,7 @@ private: struct InterpolatedFrameResources { GLuint input_tex; // Layered (contains both input frames). GLuint gray_tex; // Same. + GLuint cb_tex, cr_tex; GLuint input_fbos[2]; // For rendering to the two layers of input_tex. GLuint pbo; // For reading the data back. void *pbo_contents; // Persistently mapped. @@ -66,7 +68,7 @@ private: float alpha; InterpolatedFrameResources resources; RefCountedGLsync fence; // Set when the interpolated image is read back to the CPU. - GLuint flow_tex, output_tex; // Released in the receiving thread; not really used for anything else. + GLuint flow_tex, output_tex, cbcr_tex; // Released in the receiving thread; not really used for anything else. }; std::deque frame_queue; // Under . std::mutex queue_lock; @@ -80,14 +82,17 @@ private: // Effectively only converts from 4:2:2 to 4:4:4. // TODO: Have a separate version with ResampleEffect, for scaling? - std::unique_ptr ycbcr_convert_chain; + std::unique_ptr ycbcr_planar_convert_chain; + std::unique_ptr ycbcr_semiplanar_convert_chain; - movit::YCbCrInput *ycbcr_input; + movit::YCbCrInput *ycbcr_planar_input; + movit::YCbCrInput *ycbcr_semiplanar_input; movit::YCbCrFormat ycbcr_format; // Frame interpolation. std::unique_ptr compute_flow; std::unique_ptr interpolate; + std::unique_ptr chroma_subsampler; }; #endif // !defined(_VIDEO_STREAM_H)