X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=nageru%2Fav1_encoder.cpp;h=13f0e30e3e9162fd5689883290d448205ae07e22;hb=8bf76def09e0747734c33a21a8f94b3f462305c7;hp=ca9f7c3d4f34480727a238bfe2ad65dc7ebab7be;hpb=ca385fbb8f5035053e372e9f0aeaa5579aee83e2;p=nageru diff --git a/nageru/av1_encoder.cpp b/nageru/av1_encoder.cpp index ca9f7c3..13f0e30 100644 --- a/nageru/av1_encoder.cpp +++ b/nageru/av1_encoder.cpp @@ -155,6 +155,7 @@ void AV1Encoder::init_av1() config.frame_rate_numerator = global_flags.av1_fps_num; config.frame_rate_denominator = global_flags.av1_fps_den; config.encoder_bit_depth = global_flags.bit_depth; + config.rate_control_mode = 1; // VBR. config.target_bit_rate = global_flags.av1_bitrate * 1000; // NOTE: These should be in sync with the ones in quicksync_encoder.cpp (sps_rbsp()). @@ -308,7 +309,7 @@ void AV1Encoder::encode_frame(AV1Encoder::QueuedFrame qf) hdr.n_alloc_len = (global_flags.width * global_flags.height * 3 / 2) * bytes_per_pixel; hdr.n_filled_len = hdr.n_alloc_len; hdr.n_tick_count = 0; - hdr.p_app_private = reinterpret_cast(intptr_t(qf.duration)); + hdr.p_app_private = nullptr; hdr.pic_type = EB_AV1_INVALID_PICTURE; // Actually means auto, according to FFmpeg. hdr.metadata = nullptr; hdr.flags = 0;