if (global_flags.x264_speedcontrol) {
param.i_frame_reference = 16; // Because speedcontrol is never allowed to change this above what we set at start.
}
+#if X264_BUILD >= 153
+ param.i_bitdepth = global_flags.x264_bit_depth;
+#endif
// NOTE: These should be in sync with the ones in quicksync_encoder.cpp (sps_rbsp()).
param.vui.i_vidformat = 5; // Unspecified.
}
if (speed_control) {
- speed_control->before_frame(float(free_frames.size()) / X264_QUEUE_LENGTH, X264_QUEUE_LENGTH, 1e6 * qf.duration / TIMEBASE);
+ float queue_fill_ratio;
+ {
+ lock_guard<mutex> lock(mu);
+ queue_fill_ratio = float(free_frames.size()) / X264_QUEUE_LENGTH;
+ }
+ speed_control->before_frame(queue_fill_ratio, X264_QUEUE_LENGTH, 1e6 * qf.duration / TIMEBASE);
}
dyn.x264_encoder_encode(x264, &nal, &num_nal, input_pic, &pic);
if (speed_control) {