set_aspect_ratio( h, &h->param, 1 );
x264_sps_init( h->sps, h->param.i_sps_id, &h->param );
+ x264_sps_init_scaling_list( h->sps, &h->param );
x264_pps_init( h->pps, h->param.i_sps_id, &h->param, h->sps );
x264_validate_levels( h, 1 );
sps->b_avcintra = !!param->i_avcintra_class;
sps->i_cqm_preset = param->i_cqm_preset;
+}
+
+void x264_sps_init_reconfigurable( x264_sps_t *sps, x264_param_t *param )
+{
+ sps->crop.i_left = param->crop_rect.i_left;
+ sps->crop.i_top = param->crop_rect.i_top;
+ sps->crop.i_right = param->crop_rect.i_right + sps->i_mb_width*16 - param->i_width;
+ sps->crop.i_bottom = (param->crop_rect.i_bottom + sps->i_mb_height*16 - param->i_height) >> !sps->b_frame_mbs_only;
+ sps->b_crop = sps->crop.i_left || sps->crop.i_top ||
+ sps->crop.i_right || sps->crop.i_bottom;
+
+ sps->vui.b_aspect_ratio_info_present = 0;
+ if( param->vui.i_sar_width > 0 && param->vui.i_sar_height > 0 )
+ {
+ sps->vui.b_aspect_ratio_info_present = 1;
+ sps->vui.i_sar_width = param->vui.i_sar_width;
+ sps->vui.i_sar_height= param->vui.i_sar_height;
+ }
+}
+void x264_sps_init_scaling_list( x264_sps_t *sps, x264_param_t *param )
+{
switch( sps->i_cqm_preset )
{
case X264_CQM_FLAT:
}
}
-void x264_sps_init_reconfigurable( x264_sps_t *sps, x264_param_t *param )
-{
- sps->crop.i_left = param->crop_rect.i_left;
- sps->crop.i_top = param->crop_rect.i_top;
- sps->crop.i_right = param->crop_rect.i_right + sps->i_mb_width*16 - param->i_width;
- sps->crop.i_bottom = (param->crop_rect.i_bottom + sps->i_mb_height*16 - param->i_height) >> !sps->b_frame_mbs_only;
- sps->b_crop = sps->crop.i_left || sps->crop.i_top ||
- sps->crop.i_right || sps->crop.i_bottom;
-
- sps->vui.b_aspect_ratio_info_present = 0;
- if( param->vui.i_sar_width > 0 && param->vui.i_sar_height > 0 )
- {
- sps->vui.b_aspect_ratio_info_present = 1;
- sps->vui.i_sar_width = param->vui.i_sar_width;
- sps->vui.i_sar_height= param->vui.i_sar_height;
- }
-}
-
void x264_sps_write( bs_t *s, x264_sps_t *sps )
{
bs_realign( s );
void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param );
#define x264_sps_init_reconfigurable x264_template(sps_init_reconfigurable)
void x264_sps_init_reconfigurable( x264_sps_t *sps, x264_param_t *param );
+#define x264_sps_init_scaling_list x264_template(sps_init_scaling_list)
+void x264_sps_init_scaling_list( x264_sps_t *sps, x264_param_t *param );
#define x264_sps_write x264_template(sps_write)
void x264_sps_write( bs_t *s, x264_sps_t *sps );
#define x264_pps_init x264_template(pps_init)