1 /***************************************************************************** 2 3 Matrix2020CL.h 4 Author: Laurent de Soras, 2021 5 6 --- Legal stuff --- 7 8 This program is free software. It comes without any warranty, to 9 the extent permitted by applicable law. You can redistribute it 10 and/or modify it under the terms of the Do What The Fuck You Want 11 To Public License, Version 2, as published by Sam Hocevar. See 12 http://www.wtfpl.net/ for more details. 13 14 *Tab=3***********************************************************************/ 15 16 17 18 #pragma once 19 #if ! defined (fmtcavs_Matrix2020CL_HEADER_INCLUDED) 20 #define fmtcavs_Matrix2020CL_HEADER_INCLUDED 21 22 23 24 /*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ 25 26 #include "avsutl/VideoFilterBase.h" 27 #include "fmtcavs/FmtAvs.h" 28 #include "fmtcavs/ProcAlpha.h" 29 #include "fmtcl/Matrix2020CLProc.h" 30 31 #include <memory> 32 #include <string> 33 34 35 36 namespace fmtcavs 37 { 38 39 40 41 class Matrix2020CL 42 : public avsutl::VideoFilterBase 43 { 44 45 /*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ 46 47 public: 48 49 typedef avsutl::VideoFilterBase Inherited; 50 51 enum Param 52 { 53 Param_CLIP_SRC = 0, 54 Param_FULL, 55 Param_CSP, 56 Param_BITS, 57 Param_CPUOPT, 58 59 Param_NBR_ELT 60 }; 61 62 explicit Matrix2020CL (::IScriptEnvironment &env, const ::AVSValue &args); 63 virtual ~Matrix2020CL () = default; 64 65 // VideoFilterBase 66 ::PVideoFrame __stdcall 67 GetFrame (int n, ::IScriptEnvironment *env_ptr) override; 68 69 70 71 /*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ 72 73 protected: 74 75 76 77 /*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ 78 79 private: 80 81 static constexpr int _nbr_planes_proc = fmtcl::Matrix2020CLProc::_nbr_planes; 82 static constexpr int _rgb_int_bits = fmtcl::Matrix2020CLProc::_rgb_int_bits; 83 84 static FmtAvs get_output_colorspace (::IScriptEnvironment &env, const ::AVSValue &args, const FmtAvs &fmt_src); 85 86 ::PClip _clip_src_sptr; 87 const ::VideoInfo 88 _vi_src; 89 90 std::unique_ptr <fmtcl::Matrix2020CLProc> 91 _proc_uptr; 92 93 std::unique_ptr <fmtcavs::ProcAlpha> 94 _proc_alpha_uptr; 95 96 bool _range_set_flag = false; 97 bool _full_flag = false; 98 bool _to_yuv_flag = false; 99 100 101 102 /*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ 103 104 private: 105 106 Matrix2020CL () = delete; 107 Matrix2020CL (const Matrix2020CL &other) = delete; 108 Matrix2020CL (Matrix2020CL &&other) = delete; 109 Matrix2020CL & operator = (const Matrix2020CL &other) = delete; 110 Matrix2020CL & operator = (Matrix2020CL &&other) = delete; 111 bool operator == (const Matrix2020CL &other) const = delete; 112 bool operator != (const Matrix2020CL &other) const = delete; 113 114 }; // class Matrix2020CL 115 116 117 118 } // namespace fmtcavs 119 120 121 122 //#include "fmtcavs/Matrix2020CL.hpp" 123 124 125 126 #endif // fmtcavs_Matrix2020CL_HEADER_INCLUDED 127 128 129 130 /*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ 131