1 /***************************************************************************** 2 * Copyright (C) 2013-2020 MulticoreWare, Inc 3 * 4 * Authors: Deepthi Nandakumar <deepthi@multicorewareinc.com> 5 * Praveen Kumar Tiwari <praveen@multicorewareinc.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 20 * 21 * This program is also available under a commercial proprietary license. 22 * For more information, contact us at license @ x265.com. 23 *****************************************************************************/ 24 25 #ifndef X265_PARAM_H 26 #define X265_PARAM_H 27 28 namespace X265_NS { 29 30 int x265_check_params(x265_param *param); 31 void x265_print_params(x265_param *param); 32 void x265_param_apply_fastfirstpass(x265_param *p); 33 char* x265_param2string(x265_param *param, int padx, int pady); 34 int x265_atoi(const char *str, bool& bError); 35 double x265_atof(const char *str, bool& bError); 36 int parseCpuName(const char *value, bool& bError, bool bEnableavx512); 37 void setParamAspectRatio(x265_param *p, int width, int height); 38 void getParamAspectRatio(x265_param *p, int& width, int& height); 39 bool parseLambdaFile(x265_param *param); 40 void x265_copy_params(x265_param* dst, x265_param* src); 41 42 /* this table is kept internal to avoid confusion, since log level indices start at -1 */ 43 static const char * const logLevelNames[] = { "none", "error", "warning", "info", "debug", "full", 0 }; 44 45 #if EXPORT_C_API 46 #define PARAM_NS 47 #else 48 /* declare param functions within private namespace */ 49 void x265_param_free(x265_param *); 50 x265_param* x265_param_alloc(); 51 void x265_param_default(x265_param *param); 52 int x265_param_default_preset(x265_param *, const char *preset, const char *tune); 53 int x265_param_apply_profile(x265_param *, const char *profile); 54 int x265_param_parse(x265_param *p, const char *name, const char *value); 55 int x265_zone_param_parse(x265_param* p, const char* name, const char* value); 56 #define PARAM_NS X265_NS 57 #endif 58 } 59 #endif // ifndef X265_PARAM_H 60