1 // Copyright 2024 The ChromiumOS Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 use crate::codec::av1::parser::BitDepth; 6 use crate::codec::av1::parser::Profile; 7 use crate::encoder::PredictionStructure; 8 use crate::encoder::Tunings; 9 use crate::Resolution; 10 11 pub struct AV1; 12 13 #[derive(Clone)] 14 pub struct EncoderConfig { 15 pub profile: Profile, 16 pub bit_depth: BitDepth, 17 pub resolution: Resolution, 18 pub pred_structure: PredictionStructure, 19 /// Initial tunings values 20 pub initial_tunings: Tunings, 21 } 22 23 impl Default for EncoderConfig { default() -> Self24 fn default() -> Self { 25 // Artificially encoder configuration with intent to be widely supported. 26 Self { 27 profile: Profile::Profile0, 28 bit_depth: BitDepth::Depth8, 29 resolution: Resolution { width: 320, height: 240 }, 30 pred_structure: PredictionStructure::LowDelay { limit: 1024 }, 31 initial_tunings: Default::default(), 32 } 33 } 34 } 35