summaryrefslogtreecommitdiffstats
path: root/thirdparties/android/common/include/x264.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparties/android/common/include/x264.h')
-rwxr-xr-xthirdparties/android/common/include/x264.h56
1 files changed, 20 insertions, 36 deletions
diff --git a/thirdparties/android/common/include/x264.h b/thirdparties/android/common/include/x264.h
index 225a269..16019ab 100755
--- a/thirdparties/android/common/include/x264.h
+++ b/thirdparties/android/common/include/x264.h
@@ -62,8 +62,7 @@ typedef struct x264_t x264_t;
* NAL structure and functions
****************************************************************************/
-enum nal_unit_type_e
-{
+enum nal_unit_type_e {
NAL_UNKNOWN = 0,
NAL_SLICE = 1,
NAL_SLICE_DPA = 2,
@@ -77,8 +76,7 @@ enum nal_unit_type_e
NAL_FILLER = 12,
/* ref_idc == 0 for 6,9,10,11,12 */
};
-enum nal_priority_e
-{
+enum nal_priority_e {
NAL_PRIORITY_DISPOSABLE = 0,
NAL_PRIORITY_LOW = 1,
NAL_PRIORITY_HIGH = 2,
@@ -90,8 +88,7 @@ enum nal_priority_e
* All data returned in an x264_nal_t, including the data in p_payload, is no longer
* valid after the next call to x264_encoder_encode. Thus it must be used or copied
* before calling x264_encoder_encode or x264_encoder_headers again. */
-typedef struct
-{
+typedef struct {
int i_ref_idc; /* nal_priority_e */
int i_type; /* nal_unit_type_e */
int b_long_startcode;
@@ -202,7 +199,8 @@ static const char * const x264_vidformat_names[] = { "component", "pal", "ntsc",
static const char * const x264_fullrange_names[] = { "off", "on", 0 };
static const char * const x264_colorprim_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m", "smpte240m", "film", "bt2020", 0 };
static const char * const x264_transfer_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m", "smpte240m", "linear", "log100", "log316",
- "iec61966-2-4", "bt1361e", "iec61966-2-1", "bt2020-10", "bt2020-12", 0 };
+ "iec61966-2-4", "bt1361e", "iec61966-2-1", "bt2020-10", "bt2020-12", 0
+ };
static const char * const x264_colmatrix_names[] = { "GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m", "smpte240m", "YCgCo", "bt2020nc", "bt2020c", 0 };
static const char * const x264_nal_hrd_names[] = { "none", "vbr", "cbr", 0 };
@@ -255,8 +253,7 @@ static const char * const x264_nal_hrd_names[] = { "none", "vbr", "cbr", 0 };
/* Zones: override ratecontrol or other options for specific sections of the video.
* See x264_encoder_reconfig() for which options can be changed.
* If zones overlap, whichever comes later in the list takes precedence. */
-typedef struct
-{
+typedef struct {
int i_start, i_end; /* range of frame numbers */
int b_force_qp; /* whether to use qp vs bitrate factor */
int i_qp;
@@ -264,8 +261,7 @@ typedef struct
struct x264_param_t *param;
} x264_zone_t;
-typedef struct x264_param_t
-{
+typedef struct x264_param_t {
/* CPU flags */
unsigned int cpu;
int i_threads; /* encode multiple frames in parallel */
@@ -290,8 +286,7 @@ typedef struct x264_param_t
* will currently generate invalid HRD. */
int i_nal_hrd;
- struct
- {
+ struct {
/* they will be reduced to be 0 < x <= 65535 and prime */
int i_sar_height;
int i_sar_width;
@@ -353,8 +348,7 @@ typedef struct x264_param_t
char *psz_dump_yuv; /* filename (in UTF-8) for reconstructed frames */
/* Encoder analyser parameters */
- struct
- {
+ struct {
unsigned int intra; /* intra partitions */
unsigned int inter; /* inter partitions */
@@ -390,8 +384,7 @@ typedef struct x264_param_t
} analyse;
/* Rate control parameters */
- struct
- {
+ struct {
int i_rc_method; /* X264_RC_* */
int i_qp_constant; /* 0 to (51 + 6*(x264_bit_depth-8)). 0=lossless */
@@ -435,8 +428,7 @@ typedef struct x264_param_t
/* Cropping Rectangle parameters: added to those implicitly defined by
non-mod16 video resolutions. */
- struct
- {
+ struct {
unsigned int i_left;
unsigned int i_top;
unsigned int i_right;
@@ -549,8 +541,7 @@ void x264_nal_encode( x264_t *h, uint8_t *dst, x264_nal_t *nal );
* H.264 level restriction information
****************************************************************************/
-typedef struct
-{
+typedef struct {
int level_idc;
int mbps; /* max macroblock processing rate (macroblocks/sec) */
int frame_size; /* max frame size (macroblocks) */
@@ -673,8 +664,7 @@ X264_API extern const int x264_bit_depth;
* there are no restrictions. */
X264_API extern const int x264_chroma_format;
-enum pic_struct_e
-{
+enum pic_struct_e {
PIC_STRUCT_AUTO = 0, // automatically decide (default)
PIC_STRUCT_PROGRESSIVE = 1, // progressive frame
// "TOP" and "BOTTOM" are not supported in x264 (PAFF only)
@@ -686,8 +676,7 @@ enum pic_struct_e
PIC_STRUCT_TRIPLE = 9, // triple frame
};
-typedef struct
-{
+typedef struct {
double cpb_initial_arrival_time;
double cpb_final_arrival_time;
double cpb_removal_time;
@@ -704,31 +693,27 @@ typedef struct
* Payloads are written first in order of input, apart from in the case when HRD
* is enabled where payloads are written after the Buffering Period SEI. */
-typedef struct
-{
+typedef struct {
int payload_size;
int payload_type;
uint8_t *payload;
} x264_sei_payload_t;
-typedef struct
-{
+typedef struct {
int num_payloads;
x264_sei_payload_t *payloads;
/* In: optional callback to free each payload AND x264_sei_payload_t when used. */
void (*sei_free)( void* );
} x264_sei_t;
-typedef struct
-{
+typedef struct {
int i_csp; /* Colorspace */
int i_plane; /* Number of image planes */
int i_stride[4]; /* Strides for each plane */
uint8_t *plane[4]; /* Pointers to each plane */
} x264_image_t;
-typedef struct
-{
+typedef struct {
/* All arrays of data here are ordered as follows:
* each array contains one offset per macroblock, in raster scan order. In interlaced
* mode, top-field MBs and bottom-field MBs are interleaved at the row level.
@@ -769,7 +754,7 @@ typedef struct
void (*mb_info_free)( void* );
/* The macroblock is constant and remains unchanged from the previous frame. */
- #define X264_MBINFO_CONSTANT (1<<0)
+#define X264_MBINFO_CONSTANT (1<<0)
/* More flags may be added in the future. */
/* Out: SSIM of the the frame luma (if x264_param_t.b_ssim is set) */
@@ -783,8 +768,7 @@ typedef struct
double f_crf_avg;
} x264_image_properties_t;
-typedef struct
-{
+typedef struct {
/* In: force picture type (if not auto)
* If x264 encoding parameters are violated in the forcing of picture types,
* x264 will correct the input picture type and log a warning.
OpenPOWER on IntegriCloud