Skip to main content

RefFrames

Struct RefFrames 

Source
pub struct RefFrames {
    frames: Vec<RefPic>,
    poc: PocState,
}
Expand description

短期参照フレームのスライディングウィンドウ(8.2.5.3)と POC の状態。復号の新しい順に持つ。 IDR で空にする。長期参照・MMCO は未対応(スライスヘッダの解析で失敗を返す)。 【2026-10-17】B スライス対応で POC と動き情報を持つようにした。B の参照リストは POC の 大小で組み(8.2.4.2.3)、空間ダイレクトは RefPicList1[0] の co-located の動きを見る。

Fields§

§frames: Vec<RefPic>§poc: PocState

Implementations§

Source§

impl RefFrames

Source

pub fn new() -> Self

Source

fn lists( &self, cur_poc: i32, cur_frame_num: u32, max_frame_num: i32, ) -> RefLists<'_>

現在のピクチャ(POC = cur_poc、frame_num = cur_frame_num)から見た初期参照リスト。

Source

pub fn decode( &mut self, sps: &Sps, pps: &Pps, slices: &[&[u8]], is_idr: bool, nal_ref_idc: u8, ) -> Result<(DecodedYuv, i32), &'static str>

1 フレーム(同じピクチャのスライス群)を復号して DPB を更新する。戻り値は (フレーム, POC)。 フレームは復号順に返るので、B を含むストリームの表示は POC 順に並べ替えること。

Trait Implementations§

Source§

impl Default for RefFrames

Source§

fn default() -> RefFrames

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.