h->fenc->param = NULL;
}
}
+ x264_ratecontrol_zone_init( h );
// ok to call this before encoding any frames, since the initial values of fdec have b_kept_as_ref=0
if( x264_reference_update( h ) )
rc->accum_p_qp += qp;
}
+void x264_ratecontrol_zone_init( x264_t *h )
+{
+ x264_ratecontrol_t *rc = h->rc;
+ x264_zone_t *zone = get_zone( h, h->fenc->i_frame );
+ if( zone && (!rc->prev_zone || zone->param != rc->prev_zone->param) )
+ x264_encoder_reconfig_apply( h, zone->param );
+ rc->prev_zone = zone;
+}
+
/* Before encoding a frame, choose a QP for it */
void x264_ratecontrol_start( x264_t *h, int i_force_qp, int overhead )
{
x264_emms();
- if( zone && (!rc->prev_zone || zone->param != rc->prev_zone->param) )
- x264_encoder_reconfig_apply( h, zone->param );
- rc->prev_zone = zone;
-
if( h->param.rc.b_stat_read )
{
int frame = h->fenc->i_frame;
int x264_macroblock_tree_read( x264_t *h, x264_frame_t *frame, float *quant_offsets );
int x264_reference_build_list_optimal( x264_t *h );
void x264_thread_sync_ratecontrol( x264_t *cur, x264_t *prev, x264_t *next );
+void x264_ratecontrol_zone_init( x264_t * );
void x264_ratecontrol_start( x264_t *, int i_force_qp, int overhead );
int x264_ratecontrol_slice_type( x264_t *, int i_frame );
void x264_ratecontrol_set_weights( x264_t *h, x264_frame_t *frm );