1 /***************************************************************************** 2 3 fnc.h 4 Author: Laurent de Soras, 2012 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://sam.zoy.org/wtfpl/COPYING for more details. 13 14 *Tab=3***********************************************************************/ 15 16 17 18 #if ! defined (vsutl_fnc_HEADER_INCLUDED) 19 #define vsutl_fnc_HEADER_INCLUDED 20 21 #if defined (_MSC_VER) 22 #pragma once 23 #pragma warning (4 : 4250) 24 #endif 25 26 27 28 /*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ 29 30 #include "vswrap.h" 31 32 #include <string> 33 34 35 36 namespace vsutl 37 { 38 39 40 bool is_vs_gray (int cf); 41 bool is_vs_rgb (int cf); 42 bool is_vs_yuv (int cf); 43 bool is_vs_same_colfam (int lhs, int rhs); 44 45 bool is_constant_format (const ::VSVideoInfo &vi); 46 bool has_chroma (int cf); 47 bool has_chroma (const ::VSFormat &fmt); 48 bool is_chroma_plane (const ::VSFormat &fmt, int plane_index); 49 bool is_full_range_default (const ::VSFormat &fmt); 50 double compute_pix_scale (const ::VSFormat &fmt, int plane_index, bool full_flag); 51 double get_pix_min (const ::VSFormat &fmt, int plane_index, bool full_flag); 52 void compute_fmt_mac_cst (double &gain, double &add_cst, const ::VSFormat &fmt_dst, bool full_dst_flag, const ::VSFormat &fmt_src, bool full_src_flag, int plane_index); 53 int compute_plane_width (const ::VSFormat &fmt, int plane_index, int base_w); 54 int compute_plane_height (const ::VSFormat &fmt, int plane_index, int base_h); 55 56 57 58 } // namespace vsutl 59 60 61 62 //#include "vsutl/fnc.hpp" 63 64 65 66 #endif // vsutl_fnc_HEADER_INCLUDED 67 68 69 70 /*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ 71