X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fav1_encoder.cpp;h=f4af4b0c4031e918fe282c15e943c13cf36104b9;hb=cecd32b340ef23498d31095bfb4bb17f5877af7e;hp=da18c6d79dd079823b09d0e32e970b1dc9a6cd88;hpb=f34a3e1bbc207541842e0b54d5418d95bafc8e5b;p=nageru diff --git a/nageru/av1_encoder.cpp b/nageru/av1_encoder.cpp index da18c6d..f4af4b0 100644 --- a/nageru/av1_encoder.cpp +++ b/nageru/av1_encoder.cpp @@ -138,6 +138,8 @@ void AV1Encoder::init_av1() exit(EXIT_FAILURE); } + // NOTE: We don't set CBR, as it requires low-delay mode, which is + // generally problematic wrt. quality and performance. config.enc_mode = global_flags.av1_preset; config.intra_period_length = 63; // Approx. one second, conforms to the (n % 8) - 1 == 0 rule. config.source_width = global_flags.width; @@ -145,8 +147,6 @@ 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 = 2; // CBR. - config.pred_structure = 1; // PRED_LOW_DELAY_B (needed for CBR). config.target_bit_rate = global_flags.av1_bitrate * 1000; // NOTE: These should be in sync with the ones in quicksync_encoder.cpp (sps_rbsp()). @@ -292,8 +292,8 @@ void AV1Encoder::encode_frame(AV1Encoder::QueuedFrame qf) pic.cr_stride = global_flags.width / 2; // Likewise. pic.width = global_flags.width; pic.height = global_flags.height; - pic.origin_x = 0; - pic.origin_y = 0; + pic.org_x = 0; + pic.org_y = 0; pic.color_fmt = EB_YUV420; pic.bit_depth = global_flags.bit_depth > 8 ? EB_TEN_BIT : EB_EIGHT_BIT;