pub struct MacroblockDecoder {
pub width: u32,
pub height: u32,
pub width_mb: u32,
pub height_mb: u32,
pub ref_frame: Option<YuvFrame>,
/* private fields */
}Fields§
§width: u32§height: u32§width_mb: u32§height_mb: u32§ref_frame: Option<YuvFrame>Reference frame for P/B decoding
Implementations§
Source§impl MacroblockDecoder
impl MacroblockDecoder
pub fn new(width: u32, height: u32) -> Self
pub fn decode_frame( &mut self, payload: &[u8], pic_hdr: &PictureHeader, seq: &SequenceHeader, frame: &mut YuvFrame, ) -> Result<()>
Source§impl MacroblockDecoder
impl MacroblockDecoder
Sourcepub fn wmv2_set_extradata(&mut self, extradata: &[u8])
pub fn wmv2_set_extradata(&mut self, extradata: &[u8])
Decode one WMV2 frame. hdr is the already-parsed per-frame header.
This is the public entry point called from main.rs.
Parse WMV2 ext-header from ASF extradata (upstream decode_ext_header).
If extradata is missing/short, we keep all flags at default false.
pub fn wmv2_copy_ref(&self, out: &mut YuvFrame) -> bool
pub fn decode_wmv2_frame( &mut self, payload: &[u8], hdr: &Wmv2FrameHeader, params: &Wmv2Params, frame: &mut YuvFrame, ) -> Result<()>
Sourcepub fn probe_wmv2_payload(&self, payload: &[u8], hdr: &Wmv2FrameHeader) -> usize
pub fn probe_wmv2_payload(&self, payload: &[u8], hdr: &Wmv2FrameHeader) -> usize
Heuristic probe: try to parse a few macroblock headers after hdr.header_bits.
Used to disambiguate ASF framing-byte offsets when the picture header can be
(mis-)parsed at multiple byte offsets.
Returns a “score” = number of MB headers successfully parsed (higher is better).
Auto Trait Implementations§
impl Freeze for MacroblockDecoder
impl RefUnwindSafe for MacroblockDecoder
impl Send for MacroblockDecoder
impl Sync for MacroblockDecoder
impl Unpin for MacroblockDecoder
impl UnwindSafe for MacroblockDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more