cros_codecs/encoder/
h265.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::h265::parser::Level;
6use crate::codec::h265::parser::Profile;
7use crate::encoder::PredictionStructure;
8use crate::Resolution;
9
10pub struct H265;
11
12#[derive(Clone)]
13pub struct EncoderConfig {
14    pub resolution: Resolution,
15    pub profile: Profile,
16    pub level: Level,
17    pub pred_structure: PredictionStructure,
18}
19
20impl Default for EncoderConfig {
21    fn default() -> Self {
22        // Artificially encoder configuration with intent to be widely supported.
23        Self {
24            resolution: Resolution {
25                width: 320,
26                height: 240,
27            },
28            profile: Profile::Main,
29            level: Level::L4,
30            pred_structure: PredictionStructure::LowDelay { limit: 2048 },
31        }
32    }
33}