X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fx264_encoder.cpp;h=6c46c98c689dbdd99e16275e9d3466a883e8dd9e;hb=f34a3e1bbc207541842e0b54d5418d95bafc8e5b;hp=8351bdd346f3f5526f3faf49ecc9d6cd322d9ed7;hpb=d92973cb0206e84529011bc8edd644e1a25374bd;p=nageru diff --git a/nageru/x264_encoder.cpp b/nageru/x264_encoder.cpp index 8351bdd..6c46c98 100644 --- a/nageru/x264_encoder.cpp +++ b/nageru/x264_encoder.cpp @@ -77,7 +77,7 @@ void update_vbv_settings(x264_param_t *param) 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, []{ @@ -107,7 +107,7 @@ X264Encoder::X264Encoder(const AVOutputFormat *oformat, bool use_separate_disk_p }); } - 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)); @@ -152,7 +152,7 @@ void X264Encoder::add_frame(int64_t pts, int64_t duration, YCbCrLumaCoefficients 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); { @@ -179,7 +179,7 @@ void X264Encoder::init_x264() 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; @@ -190,7 +190,7 @@ void X264Encoder::init_x264() 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()). @@ -265,7 +265,7 @@ void X264Encoder::init_x264() } } - 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"); @@ -361,7 +361,7 @@ void X264Encoder::encode_frame(X264Encoder::QueuedFrame qf) 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;