forked from HandBrake/HandBrake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
encx264.h
65 lines (58 loc) · 2.49 KB
/
encx264.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* encx264.h
Copyright (c) 2003-2016 HandBrake Team
This file is part of the HandBrake source code
Homepage: <http://handbrake.fr/>.
It may be used under the terms of the GNU General Public License v2.
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/
#ifndef HB_ENCX264_H
#define HB_ENCX264_H
#include "x264.h"
#include "h264_common.h"
/* x264 preferred option names (left) and synonyms (right).
* The "preferred" names match names used in x264's param2string function more
* closely than their corresponding synonyms, or are just shorter. */
static const char * const hb_x264_encopt_synonyms[][2] =
{
{ "deterministic", "n-deterministic", },
{ "level", "level-idc", },
{ "ref", "frameref", },
{ "keyint-min", "min-keyint", },
{ "no-deblock", "nf", },
{ "deblock", "filter", },
{ "cqm", "cqmfile", },
{ "analyse", "partitions", },
{ "weightb", "weight-b", },
{ "direct", "direct-pred", },
{ "merange", "me-range", },
{ "mvrange", "mv-range", },
{ "mvrange-thread", "mv-range-thread", },
{ "subme", "subq", },
{ "qp", "qp_constant", },
{ "qpmin", "qp-min", },
{ "qpmax", "qp-max", },
{ "qpstep", "qp-step", },
{ "ipratio", "ip-factor", },
{ "pbratio", "pb-factor", },
{ "cplxblur", "cplx-blur", },
{ NULL, NULL, },
};
typedef struct x264_api_s
{
int bit_depth;
void (*param_default)(x264_param_t*);
int (*param_default_preset)(x264_param_t*, const char*, const char*);
int (*param_apply_profile)(x264_param_t*, const char*);
void (*param_apply_fastfirstpass)(x264_param_t*);
int (*param_parse)(x264_param_t*, const char*, const char*);
x264_t* (*encoder_open)(x264_param_t*);
int (*encoder_headers)(x264_t*, x264_nal_t**, int*);
int (*encoder_encode)(x264_t*, x264_nal_t**, int*,
x264_picture_t*, x264_picture_t*);
int (*encoder_delayed_frames)(x264_t*);
void (*encoder_close)(x264_t*);
void (*picture_init)(x264_picture_t*);
} x264_api_t;
void hb_x264_global_init(void);
const x264_api_t * hb_x264_api_get(int bit_depth);
#endif // HB_ENCX264_H