symphonia_codec_aac/aac/ics/ltp.rs
1// Symphonia
2// Copyright (c) 2019-2022 The Project Symphonia Developers.
3//
4// Previous Author: Kostya Shishkov <kostya.shiskov@gmail.com>
5//
6// This source file includes code originally written for the NihAV
7// project. With the author's permission, it has been relicensed for,
8// and ported to the Symphonia project.
9//
10// This Source Code Form is subject to the terms of the Mozilla Public
11// License, v. 2.0. If a copy of the MPL was not distributed with this
12// file, You can obtain one at https://mozilla.org/MPL/2.0/.
13
14use symphonia_core::errors::{unsupported_error, Result};
15use symphonia_core::io::ReadBitsLtr;
16
17#[derive(Clone, Copy)]
18pub struct LtpData {}
19
20impl LtpData {
21 pub fn read<B: ReadBitsLtr>(bs: &mut B) -> Result<Option<Self>> {
22 let predictor_data_present = bs.read_bool()?;
23
24 if !predictor_data_present {
25 return Ok(None);
26 }
27
28 /*
29 if is_main {
30 let predictor_reset = bs.read_bit()?;
31 if predictor_reset {
32 let predictor_reset_group_number = bs.read_bits_leq32(5)?;
33 }
34 for sfb in 0..max_sfb.min(PRED_SFB_MAX) {
35 prediction_used[sfb] = bs.read_bit()?;
36 }
37 }
38 else {
39 let ltp_data_present = bs.read_bit()?;
40 if ltp_data_present {
41 //ltp data
42 }
43 if common_window {
44 let ltp_data_present = bs.read_bit()?;
45 if ltp_data_present {
46 //ltp data
47 }
48 }
49 }
50 Ok(Some(Self { }))
51 */
52
53 unsupported_error("aac: predictor data")
54 }
55}