]> git.sesse.net Git - nageru/commitdiff
Use VBR for AV1.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 5 Aug 2022 20:07:08 +0000 (22:07 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 5 Aug 2022 20:10:43 +0000 (22:10 +0200)
CBR isn't really ready yet; it requires low-delay mode, which limits
SVT-AV1 to three cores and also is pretty bad for quality in general.
(Also, its CBR isn't really CBR yet; see SVT-AV1 bug 1959.)

nageru/av1_encoder.cpp

index da18c6d79dd079823b09d0e32e970b1dc9a6cd88..371eb0d82232afff7096f7c5d29d1362697b0aed 100644 (file)
@@ -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()).