cros_codecs/encoder/
vp9.rs

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//
5use crate::codec::vp9::parser::BitDepth;
6use crate::encoder::PredictionStructure;
7use crate::encoder::Tunings;
8use crate::Resolution;
9
10pub struct VP9;
11
12#[derive(Clone)]
13pub 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
21impl Default for EncoderConfig {
22    fn default() -> Self {
23        // Artificially encoder configuration with intent to be widely supported.
24        Self {
25            bit_depth: BitDepth::Depth8,
26            resolution: Resolution {
27                width: 320,
28                height: 240,
29            },
30            pred_structure: PredictionStructure::LowDelay { limit: 2048 },
31            initial_tunings: Default::default(),
32        }
33    }
34}