X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-realmedia%2Fsrc%2Fcodecs%2Frv3040.rs;h=e4d8420bb3b51c6922e764c329b440c8c4a79a78;hp=f9a1817ec677eafcc7f4979d9f8afcca5ac1cb90;hb=ac818eac7671fa8ddfea5aa4fb86fc0b5ab82d2e;hpb=73f0f89ff3a3616a8e65b5a31c2303725994c56a diff --git a/nihav-realmedia/src/codecs/rv3040.rs b/nihav-realmedia/src/codecs/rv3040.rs index f9a1817..e4d8420 100644 --- a/nihav-realmedia/src/codecs/rv3040.rs +++ b/nihav-realmedia/src/codecs/rv3040.rs @@ -532,7 +532,7 @@ fn parse_slice_offsets(src: &[u8], offsets: &mut Vec) -> DecoderResult<() Ok(()) } -fn decode_slice_header(br: &mut BitReader, bd: &mut RV34BitstreamDecoder, slice_no: usize, slice_offs: &[usize], old_width: usize, old_height: usize) -> DecoderResult { +fn decode_slice_header(br: &mut BitReader, bd: &mut dyn RV34BitstreamDecoder, slice_no: usize, slice_offs: &[usize], old_width: usize, old_height: usize) -> DecoderResult { validate!(slice_no < slice_offs.len()); br.seek((slice_offs[slice_no] * 8) as u32)?; let mut shdr = bd.decode_slice_header(br, old_width, old_height)?; @@ -777,7 +777,7 @@ impl RV34Decoder { base_ts: 0, } } - fn decode_mb_header_intra(&mut self, bd: &mut RV34BitstreamDecoder, br: &mut BitReader, is_i16: bool, im: &mut IntraModeState, q: u8, has_top: bool, has_dq: bool) -> DecoderResult { + fn decode_mb_header_intra(&mut self, bd: &mut dyn RV34BitstreamDecoder, br: &mut BitReader, is_i16: bool, im: &mut IntraModeState, q: u8, has_top: bool, has_dq: bool) -> DecoderResult { if is_i16 { let imode = br.read(2)? as i8; im.fill_block(imode); @@ -793,7 +793,7 @@ impl RV34Decoder { Ok(MBInfo { mbtype: MBType::MBIntra, skip_run: 0, dquant: dq }) } } - fn decode_mb_header_inter(&mut self, bd: &mut RV34BitstreamDecoder, br: &mut BitReader, ftype: FrameType, mbtype: MBType, im: &mut IntraModeState, q: u8, has_top: bool) -> DecoderResult { + fn decode_mb_header_inter(&mut self, bd: &mut dyn RV34BitstreamDecoder, br: &mut BitReader, ftype: FrameType, mbtype: MBType, im: &mut IntraModeState, q: u8, has_top: bool) -> DecoderResult { let hdr = bd.decode_inter_mb_hdr(br, ftype, mbtype)?; validate!(hdr.mbtype != MBType::Invalid); if hdr.dquant { @@ -1096,7 +1096,7 @@ impl RV34Decoder { } #[allow(clippy::cyclomatic_complexity)] - pub fn parse_frame(&mut self, supp: &mut NADecoderSupport, src: &[u8], bd: &mut RV34BitstreamDecoder) -> DecoderResult<(NABufferType, FrameType, u64)> { + pub fn parse_frame(&mut self, supp: &mut NADecoderSupport, src: &[u8], bd: &mut dyn RV34BitstreamDecoder) -> DecoderResult<(NABufferType, FrameType, u64)> { let mut slice_offs: Vec = Vec::new(); parse_slice_offsets(src, &mut slice_offs)?; let ini_off = slice_offs.len() * 8 + 1;