• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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::vp9::parser::BitDepth;
6 use crate::encoder::PredictionStructure;
7 use crate::encoder::Tunings;
8 use crate::Resolution;
9 
10 pub struct VP9;
11 
12 #[derive(Clone)]
13 pub struct EncoderConfig {
14     pub bit_depth: BitDepth,
15     pub resolution: Resolution,
16     pub pred_structure: PredictionStructure,
17     /// Initial tunings values
18     pub initial_tunings: Tunings,
19 }
20 
21 impl Default for EncoderConfig {
default() -> Self22     fn default() -> Self {
23         // Artificially encoder configuration with intent to be widely supported.
24         Self {
25             bit_depth: BitDepth::Depth8,
26             resolution: Resolution { width: 320, height: 240 },
27             pred_structure: PredictionStructure::LowDelay { limit: 2048 },
28             initial_tunings: Default::default(),
29         }
30     }
31 }
32