]> git.sesse.net Git - x264/blob - common/set.h
lossless mode enabled at qp=0
[x264] / common / set.h
1 /*****************************************************************************
2  * set.h: h264 encoder
3  *****************************************************************************
4  * Copyright (C) 2003 Laurent Aimar
5  * $Id: set.h,v 1.1 2004/06/03 19:27:07 fenrir Exp $
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 #ifndef _SET_H
25 #define _SET_H 1
26
27 enum profile_e
28 {
29     PROFILE_BASELINE = 66,
30     PROFILE_MAIN     = 77,
31     PROFILE_EXTENTED = 88,
32     PROFILE_HIGH    = 100,
33     PROFILE_HIGH10  = 110,
34     PROFILE_HIGH422 = 122,
35     PROFILE_HIGH444 = 144
36 };
37
38 typedef struct
39 {
40     int i_id;
41
42     int i_profile_idc;
43     int i_level_idc;
44
45     int b_constraint_set0;
46     int b_constraint_set1;
47     int b_constraint_set2;
48
49     int i_log2_max_frame_num;
50
51     int i_poc_type;
52     /* poc 0 */
53     int i_log2_max_poc_lsb;
54     /* poc 1 */
55     int b_delta_pic_order_always_zero;
56     int i_offset_for_non_ref_pic;
57     int i_offset_for_top_to_bottom_field;
58     int i_num_ref_frames_in_poc_cycle;
59     int i_offset_for_ref_frame[256];
60
61     int i_num_ref_frames;
62     int b_gaps_in_frame_num_value_allowed;
63     int i_mb_width;
64     int i_mb_height;
65     int b_frame_mbs_only;
66     int b_mb_adaptive_frame_field;
67     int b_direct8x8_inference;
68
69     int b_crop;
70     struct
71     {
72         int i_left;
73         int i_right;
74         int i_top;
75         int i_bottom;
76     } crop;
77
78     int b_vui;
79     struct
80     {
81         int b_aspect_ratio_info_present;
82         int i_sar_width;
83         int i_sar_height;
84
85         int b_timing_info_present;
86         int i_num_units_in_tick;
87         int i_time_scale;
88         int b_fixed_frame_rate;
89
90         int b_bitstream_restriction;
91         int b_motion_vectors_over_pic_boundaries;
92         int i_max_bytes_per_pic_denom;
93         int i_max_bits_per_mb_denom;
94         int i_log2_max_mv_length_horizontal;
95         int i_log2_max_mv_length_vertical;
96         int i_num_reorder_frames;
97         int i_max_dec_frame_buffering;
98
99         /* FIXME to complete */
100     } vui;
101
102     int b_qpprime_y_zero_transform_bypass;
103
104 } x264_sps_t;
105
106 typedef struct
107 {
108     int i_id;
109     int i_sps_id;
110
111     int b_cabac;
112
113     int b_pic_order;
114     int i_num_slice_groups;
115
116 #if 0
117     /* FIXME: if this stuff is ever needed, move SPS/PPS from x264_t
118      * to the heap, to avoid excessive memcpy'ing with threads. */
119     int i_slice_group_map_type;
120     /* i_slice_group_map_type == 0 */
121     int i_run_length[256];      /* FIXME */
122     /* i_slice_group_map_type == 2 */
123     int i_top_left[256];        /* FIXME */
124     int i_bottom_right[256];    /* FIXME */
125     /* i_slice_group_map_type == 3, 4, 5 */
126     int b_slice_group_change_direction;
127     int i_slice_group_change_rate;
128     /* i_slice_group_map_type == 6 */
129     int i_pic_size_in_map_units;
130     int i_slice_group_id[256];  /* FIXME */
131 #endif
132
133     int i_num_ref_idx_l0_active;
134     int i_num_ref_idx_l1_active;
135
136     int b_weighted_pred;
137     int b_weighted_bipred;
138
139     int i_pic_init_qp;
140     int i_pic_init_qs;
141
142     int i_chroma_qp_index_offset;
143
144     int b_deblocking_filter_control;
145     int b_constrained_intra_pred;
146     int b_redundant_pic_cnt;
147
148     int b_transform_8x8_mode;
149
150 } x264_pps_t;
151
152 #endif