PROFILE_HIGH444 = 144
};
+enum cqm4_e
+{
+ CQM_4IY = 0,
+ CQM_4PY = 1,
+ CQM_4IC = 2,
+ CQM_4PC = 3
+};
+enum cqm8_e
+{
+ CQM_8IY = 0,
+ CQM_8PY = 1
+};
+
typedef struct
{
int i_id;
int b_aspect_ratio_info_present;
int i_sar_width;
int i_sar_height;
+
+ int b_overscan_info_present;
+ int b_overscan_info;
+
+ int b_signal_type_present;
+ int i_vidformat;
+ int b_fullrange;
+ int b_color_description_present;
+ int i_colorprim;
+ int i_transfer;
+ int i_colmatrix;
+
+ int b_chroma_loc_info_present;
+ int i_chroma_loc_top;
+ int i_chroma_loc_bottom;
int b_timing_info_present;
int i_num_units_in_tick;
int b_pic_order;
int i_num_slice_groups;
-#if 0
- /* FIXME: if this stuff is ever needed, move SPS/PPS from x264_t
- * to the heap, to avoid excessive memcpy'ing with threads. */
- int i_slice_group_map_type;
- /* i_slice_group_map_type == 0 */
- int i_run_length[256]; /* FIXME */
- /* i_slice_group_map_type == 2 */
- int i_top_left[256]; /* FIXME */
- int i_bottom_right[256]; /* FIXME */
- /* i_slice_group_map_type == 3, 4, 5 */
- int b_slice_group_change_direction;
- int i_slice_group_change_rate;
- /* i_slice_group_map_type == 6 */
- int i_pic_size_in_map_units;
- int i_slice_group_id[256]; /* FIXME */
-#endif
-
int i_num_ref_idx_l0_active;
int i_num_ref_idx_l1_active;
int b_transform_8x8_mode;
+ int i_cqm_preset;
+ const uint8_t *scaling_list[6]; /* could be 8, but we don't allow separate Cb/Cr lists */
+
} x264_pps_t;
+/* default quant matrices */
+static const uint8_t x264_cqm_jvt4i[16] =
+{
+ 6,13,20,28,
+ 13,20,28,32,
+ 20,28,32,37,
+ 28,32,37,42
+};
+static const uint8_t x264_cqm_jvt4p[16] =
+{
+ 10,14,20,24,
+ 14,20,24,27,
+ 20,24,27,30,
+ 24,27,30,34
+};
+static const uint8_t x264_cqm_jvt8i[64] =
+{
+ 6,10,13,16,18,23,25,27,
+ 10,11,16,18,23,25,27,29,
+ 13,16,18,23,25,27,29,31,
+ 16,18,23,25,27,29,31,33,
+ 18,23,25,27,29,31,33,36,
+ 23,25,27,29,31,33,36,38,
+ 25,27,29,31,33,36,38,40,
+ 27,29,31,33,36,38,40,42
+};
+static const uint8_t x264_cqm_jvt8p[64] =
+{
+ 9,13,15,17,19,21,22,24,
+ 13,13,17,19,21,22,24,25,
+ 15,17,19,21,22,24,25,27,
+ 17,19,21,22,24,25,27,28,
+ 19,21,22,24,25,27,28,30,
+ 21,22,24,25,27,28,30,32,
+ 22,24,25,27,28,30,32,33,
+ 24,25,27,28,30,32,33,35
+};
+static const uint8_t x264_cqm_flat16[64] =
+{
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16
+};
+static const uint8_t * const x264_cqm_jvt[6] =
+{
+ x264_cqm_jvt4i, x264_cqm_jvt4p,
+ x264_cqm_jvt4i, x264_cqm_jvt4p,
+ x264_cqm_jvt8i, x264_cqm_jvt8p
+};
+
+void x264_cqm_init( x264_t *h );
+int x264_cqm_parse_file( x264_t *h, const char *filename );
+
#endif