Skip to main content

DecState

Struct DecState 

Source
struct DecState {
Show 21 fields yuv: DecodedYuv, blk_w: usize, nnz_luma: Vec<u8>, mode_luma: Vec<i8>, decoded: Vec<bool>, cblk_w: usize, nnz_chroma: [Vec<u8>; 2], mb_w: usize, mb_qp: Vec<i32>, mv: [Vec<[i16; 2]>; 2], is_inter: Vec<bool>, blk_h: usize, refi: [Vec<i8>; 2], refp: [Vec<i32>; 2], num_ref: [u32; 2], mb_slice: Vec<u32>, cur_slice: u32, mb_db: Vec<MbDeblock>, mb_t8: Vec<bool>, wp: WpMode, cur_poc: i32,
}
Expand description

デコーダ状態。YUV 平面に加え、4x4 ブロック単位の近傍情報グリッドを持つ。

Fields§

§yuv: DecodedYuv§blk_w: usize§nnz_luma: Vec<u8>§mode_luma: Vec<i8>§decoded: Vec<bool>§cblk_w: usize§nnz_chroma: [Vec<u8>; 2]§mb_w: usize§mb_qp: Vec<i32>§mv: [Vec<[i16; 2]>; 2]§is_inter: Vec<bool>§blk_h: usize§refi: [Vec<i8>; 2]§refp: [Vec<i32>; 2]§num_ref: [u32; 2]§mb_slice: Vec<u32>§cur_slice: u32§mb_db: Vec<MbDeblock>§mb_t8: Vec<bool>§wp: WpMode§cur_poc: i32

Implementations§

Source§

impl DecState

Source

fn li(&self, bx4: usize, by4: usize) -> usize

Source

fn has_coeffs(&self, li: usize) -> bool

4x4 ブロック li を含む変換ブロックに 0 でない係数があるか(デブロックの bS = 2)。 8x8 変換の MB では 8x8 単位で見る(8.7.2.1)。

Source

fn avail_px(&self, x: isize, y: isize) -> bool

輝度画素 (x, y) を含む MB が画面内にあり、復号中のスライスに属するか(6.4 の可用性)。 【2026-10-17】複数スライス対応。従来は画面内かどうかだけで判定しており、前のスライスの MB まで予測(イントラ・MV・nC)に使っていた。

Source

fn avail_blk(&self, bx4: isize, by4: isize) -> bool

輝度 4x4 ブロック (bx4,by4) が可用か(所属 MB が同じスライス)。

Source

fn luma_nc(&self, bx4: usize, by4: usize) -> i32

輝度 4x4 ブロック (bx4,by4) の nC(左/上ブロックの nnz から)。

Source

fn pred_i4x4_mode(&self, bx4: usize, by4: usize) -> i32

Intra4x4 予測モードの予測値(左/上ブロックのモードの min)。

Source

fn predict_luma_4x4(&self, px: usize, py: usize, mode: u8) -> [i32; 16]

輝度 4x4 ブロックの近傍サンプルを収集し intra_4x4_predict で予測を返す。 px,py はフレーム画素座標(ブロック左上)。

Source§

impl DecState

Source

fn predict_luma_8x8(&self, px: usize, py: usize, mode: u8) -> [i32; 64]

Intra8x8 予測(8.3.2.2)。参照画素を [1, 2, 1] で平滑化してから 9 モードで予測する。

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.