1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2003 Laurent Aimar
5 * $Id: set.h,v 1.1 2004/06/03 19:27:07 fenrir Exp $
7 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
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.
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.
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 *****************************************************************************/
29 PROFILE_BASELINE = 66,
31 PROFILE_EXTENTED = 88,
34 PROFILE_HIGH422 = 122,
58 int b_constraint_set0;
59 int b_constraint_set1;
60 int b_constraint_set2;
62 int i_log2_max_frame_num;
66 int i_log2_max_poc_lsb;
68 int b_delta_pic_order_always_zero;
69 int i_offset_for_non_ref_pic;
70 int i_offset_for_top_to_bottom_field;
71 int i_num_ref_frames_in_poc_cycle;
72 int i_offset_for_ref_frame[256];
75 int b_gaps_in_frame_num_value_allowed;
79 int b_mb_adaptive_frame_field;
80 int b_direct8x8_inference;
94 int b_aspect_ratio_info_present;
98 int b_overscan_info_present;
101 int b_signal_type_present;
104 int b_color_description_present;
109 int b_chroma_loc_info_present;
110 int i_chroma_loc_top;
111 int i_chroma_loc_bottom;
113 int b_timing_info_present;
114 int i_num_units_in_tick;
116 int b_fixed_frame_rate;
118 int b_bitstream_restriction;
119 int b_motion_vectors_over_pic_boundaries;
120 int i_max_bytes_per_pic_denom;
121 int i_max_bits_per_mb_denom;
122 int i_log2_max_mv_length_horizontal;
123 int i_log2_max_mv_length_vertical;
124 int i_num_reorder_frames;
125 int i_max_dec_frame_buffering;
127 /* FIXME to complete */
130 int b_qpprime_y_zero_transform_bypass;
142 int i_num_slice_groups;
144 int i_num_ref_idx_l0_active;
145 int i_num_ref_idx_l1_active;
148 int b_weighted_bipred;
153 int i_chroma_qp_index_offset;
155 int b_deblocking_filter_control;
156 int b_constrained_intra_pred;
157 int b_redundant_pic_cnt;
159 int b_transform_8x8_mode;
162 const uint8_t *scaling_list[6]; /* could be 8, but we don't allow separate Cb/Cr lists */
166 /* default quant matrices */
167 static const uint8_t x264_cqm_jvt4i[16] =
174 static const uint8_t x264_cqm_jvt4p[16] =
181 static const uint8_t x264_cqm_jvt8i[64] =
183 6,10,13,16,18,23,25,27,
184 10,11,16,18,23,25,27,29,
185 13,16,18,23,25,27,29,31,
186 16,18,23,25,27,29,31,33,
187 18,23,25,27,29,31,33,36,
188 23,25,27,29,31,33,36,38,
189 25,27,29,31,33,36,38,40,
190 27,29,31,33,36,38,40,42
192 static const uint8_t x264_cqm_jvt8p[64] =
194 9,13,15,17,19,21,22,24,
195 13,13,17,19,21,22,24,25,
196 15,17,19,21,22,24,25,27,
197 17,19,21,22,24,25,27,28,
198 19,21,22,24,25,27,28,30,
199 21,22,24,25,27,28,30,32,
200 22,24,25,27,28,30,32,33,
201 24,25,27,28,30,32,33,35
203 static const uint8_t x264_cqm_flat16[64] =
205 16,16,16,16,16,16,16,16,
206 16,16,16,16,16,16,16,16,
207 16,16,16,16,16,16,16,16,
208 16,16,16,16,16,16,16,16,
209 16,16,16,16,16,16,16,16,
210 16,16,16,16,16,16,16,16,
211 16,16,16,16,16,16,16,16,
212 16,16,16,16,16,16,16,16
214 static const uint8_t * const x264_cqm_jvt[6] =
216 x264_cqm_jvt4i, x264_cqm_jvt4p,
217 x264_cqm_jvt4i, x264_cqm_jvt4p,
218 x264_cqm_jvt8i, x264_cqm_jvt8p
221 int x264_cqm_init( x264_t *h );
222 void x264_cqm_delete( x264_t *h );
223 int x264_cqm_parse_file( x264_t *h, const char *filename );