forge
Explore
Log in

Don't you dare go Hollow

edith

Clone
★ 0

0 watching0 forksRust18.3 MiB2e2ed69Tahinli3 months ago69 commits

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