1 /*****************************************************************************
2 * Copyright (C) 2013-2018 MulticoreWare, Inc
3 *
4 * Authors: Radhakrishnan <radhakrishnan@multicorewareinc.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
19 *
20 * This program is also available under a commercial proprietary license.
21 * For more information, contact us at license @ x265.com.
22 *****************************************************************************/
23 
24 
25 #ifndef SVT_H
26 #define SVT_H
27 
28 #ifdef SVT_HEVC
29 
30 #include "EbApi.h"
31 #include "EbErrorCodes.h"
32 
33 namespace X265_NS {
34 
35 #define INPUT_SIZE_576p_TH     0x90000    // 0.58 Million
36 #define INPUT_SIZE_1080i_TH    0xB71B0    // 0.75 Million
37 #define INPUT_SIZE_1080p_TH    0x1AB3F0   // 1.75 Million
38 #define INPUT_SIZE_4K_TH       0x29F630   // 2.75 Million
39 
40 #define EB_OUTPUTSTREAMBUFFERSIZE_MACRO(ResolutionSize)    ((ResolutionSize) < (INPUT_SIZE_1080i_TH) ? 0x1E8480 : (ResolutionSize) < (INPUT_SIZE_1080p_TH) ? 0x2DC6C0 : (ResolutionSize) < (INPUT_SIZE_4K_TH) ? 0x2DC6C0 : 0x2DC6C0)
41 
42 void svt_param_default(x265_param* param);
43 int svt_set_preset(x265_param* param, const char* preset);
44 int svt_param_parse(x265_param* param, const char* name, const char* value);
45 void svt_initialise_app_context(x265_encoder *enc);
46 int svt_initialise_input_buffer(x265_encoder *enc);
47 }
48 
49 #endif // ifdef SVT_HEVC
50 
51 #endif // ifndef SVT_H
52