X264Encoder::X264Encoder(const AVOutputFormat *oformat, bool use_separate_disk_params)
: wants_global_headers(oformat->flags & AVFMT_GLOBALHEADER),
use_separate_disk_params(use_separate_disk_params),
- dyn(load_x264_for_bit_depth(global_flags.x264_bit_depth))
+ dyn(load_x264_for_bit_depth(global_flags.bit_depth))
{
if (use_separate_disk_params) {
call_once(x264_disk_metrics_inited, []{
});
}
- size_t bytes_per_pixel = global_flags.x264_bit_depth > 8 ? 2 : 1;
+ size_t bytes_per_pixel = global_flags.bit_depth > 8 ? 2 : 1;
frame_pool.reset(new uint8_t[global_flags.width * global_flags.height * 2 * bytes_per_pixel * X264_QUEUE_LENGTH]);
for (unsigned i = 0; i < X264_QUEUE_LENGTH; ++i) {
free_frames.push(frame_pool.get() + i * (global_flags.width * global_flags.height * 2 * bytes_per_pixel));
free_frames.pop();
}
- size_t bytes_per_pixel = global_flags.x264_bit_depth > 8 ? 2 : 1;
+ size_t bytes_per_pixel = global_flags.bit_depth > 8 ? 2 : 1;
memcpy(qf.data, data, global_flags.width * global_flags.height * 2 * bytes_per_pixel);
{
param.i_width = global_flags.width;
param.i_height = global_flags.height;
param.i_csp = X264_CSP_NV12;
- if (global_flags.x264_bit_depth > 8) {
+ if (global_flags.bit_depth > 8) {
param.i_csp |= X264_CSP_HIGH_DEPTH;
}
param.b_vfr_input = 1;
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;
+ param.i_bitdepth = global_flags.bit_depth;
#endif
// NOTE: These should be in sync with the ones in quicksync_encoder.cpp (sps_rbsp()).
}
}
- if (global_flags.x264_bit_depth > 8) {
+ if (global_flags.bit_depth > 8) {
dyn.x264_param_apply_profile(¶m, "high10");
} else {
dyn.x264_param_apply_profile(¶m, "high");
dyn.x264_picture_init(&pic);
pic.i_pts = qf.pts;
- if (global_flags.x264_bit_depth > 8) {
+ if (global_flags.bit_depth > 8) {
pic.img.i_csp = X264_CSP_NV12 | X264_CSP_HIGH_DEPTH;
pic.img.i_plane = 2;
pic.img.plane[0] = qf.data;