From: Kostya Shishkov Date: Mon, 23 Mar 2020 17:59:08 +0000 (+0100) Subject: realmedia/rv3040: pass mb_h into loop filter X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=16cbd8c0f1508886caf521710e0ab14e55c089a9;p=nihav.git realmedia/rv3040: pass mb_h into loop filter --- diff --git a/nihav-realmedia/src/codecs/rv3040.rs b/nihav-realmedia/src/codecs/rv3040.rs index e45b62b..c352619 100644 --- a/nihav-realmedia/src/codecs/rv3040.rs +++ b/nihav-realmedia/src/codecs/rv3040.rs @@ -503,7 +503,7 @@ pub trait RV34BitstreamDecoder { } pub trait RV34DSP { - fn loop_filter(&self, frame: &mut NAVideoBuffer, ftype: FrameType, mbinfo: &[RV34MBInfo], mb_w: usize, row: usize); + fn loop_filter(&self, frame: &mut NAVideoBuffer, ftype: FrameType, mbinfo: &[RV34MBInfo], mb_w: usize, mb_h: usize, row: usize); fn do_luma_mc(&self, frame: &mut NAVideoBuffer, prev_frame: &NAVideoBuffer, x: usize, y: usize, mv: MV, use16: bool, avg: bool); fn do_chroma_mc(&self, frame: &mut NAVideoBuffer, prev_frame: &NAVideoBuffer, x: usize, y: usize, comp: usize, mv: MV, use8: bool, avg: bool); } @@ -1265,12 +1265,12 @@ impl RV34Decoder { mb_pos += 1; } if hdr0.deblock && (mb_y >= 1) { - self.dsp.loop_filter(&mut buf, hdr0.ftype, &mbinfo, mb_w, mb_y - 1); + self.dsp.loop_filter(&mut buf, hdr0.ftype, &mbinfo, mb_w, mb_h, mb_y - 1); } imode.update(); } if hdr0.deblock { - self.dsp.loop_filter(&mut buf, hdr0.ftype, &mbinfo, mb_w, mb_h - 1); + self.dsp.loop_filter(&mut buf, hdr0.ftype, &mbinfo, mb_w, mb_h, mb_h - 1); } if !self.is_b { self.ipbs.add_frame(buf.clone()); diff --git a/nihav-realmedia/src/codecs/rv30dsp.rs b/nihav-realmedia/src/codecs/rv30dsp.rs index 1961890..fbe0360 100644 --- a/nihav-realmedia/src/codecs/rv30dsp.rs +++ b/nihav-realmedia/src/codecs/rv30dsp.rs @@ -238,7 +238,7 @@ const RV30_EDGE1: [isize; 3] = [ 0, 1, 1 ]; const RV30_EDGE2: [isize; 3] = [ 0, 2, 2 ]; impl RV34DSP for RV30DSP { - fn loop_filter(&self, frame: &mut NAVideoBuffer, _ftype: FrameType, mbinfo: &[RV34MBInfo], mb_w: usize, row: usize) { + fn loop_filter(&self, frame: &mut NAVideoBuffer, _ftype: FrameType, mbinfo: &[RV34MBInfo], mb_w: usize, _mb_h: usize, row: usize) { let mut offs: [usize; 3] = [0; 3]; let mut stride: [usize; 3] = [0; 3]; diff --git a/nihav-realmedia/src/codecs/rv40dsp.rs b/nihav-realmedia/src/codecs/rv40dsp.rs index 0dfec47..b40ef53 100644 --- a/nihav-realmedia/src/codecs/rv40dsp.rs +++ b/nihav-realmedia/src/codecs/rv40dsp.rs @@ -566,7 +566,7 @@ const RV40_EDGE1: [isize; 4] = [ 0, 2, 2, 2 ]; const RV40_EDGE2: [isize; 4] = [ 0, 3, 3, 3 ]; impl RV34DSP for RV40DSP { - fn loop_filter(&self, frame: &mut NAVideoBuffer, _ftype: FrameType, mbinfo: &[RV34MBInfo], mb_w: usize, row: usize) { + fn loop_filter(&self, frame: &mut NAVideoBuffer, _ftype: FrameType, mbinfo: &[RV34MBInfo], mb_w: usize, mb_h: usize, row: usize) { // todo proper B-frame filtering? let mut offs: [usize; 3] = [0; 3]; let mut stride: [usize; 3] = [0; 3];