- profile, ftype, qp, osvquant, ts, width, height, two_f_refs, qp_off_type,
- deblock, deblock_chroma,
+ profile, ftype, qp, osvquant, ts, width, height, awidth, aheight,
+ two_f_refs, qp_off_type, deblock, deblock_chroma,
}
#[allow(clippy::cognitive_complexity)]
fn decode_cb_tree(&mut self, buf: &mut NASimpleVideoFrame<u8>, hdr: &FrameHeader, br: &mut BitReader, xpos: usize, ypos: usize, log_size: u8) -> DecoderResult<()> {
}
#[allow(clippy::cognitive_complexity)]
fn decode_cb_tree(&mut self, buf: &mut NASimpleVideoFrame<u8>, hdr: &FrameHeader, br: &mut BitReader, xpos: usize, ypos: usize, log_size: u8) -> DecoderResult<()> {
self.populate_ipred(hdr, dst, soff, dstride, 0, 0, size >> 1, false);
self.populate_ipred(hdr, dst, soff, dstride, 0, 0, size >> 1, false);
- let mut dst = &mut buf.data;
- self.dsp.add_block(&mut dst, off, dstride, &self.y_coeffs[i*16..][..16], 4);
+ let dst = &mut buf.data;
+ self.dsp.add_block(dst, off, dstride, &self.y_coeffs[i*16..][..16], 4);
- let mut dst = &mut buf.data;
- self.dsp.add_block(&mut dst, off, dstride, &self.u_coeffs[i * 16..][..16], 4);
+ let dst = &mut buf.data;
+ self.dsp.add_block(dst, off, dstride, &self.u_coeffs[i * 16..][..16], 4);
}
if ((cbp16 >> (20 + i)) & 1) != 0 {
self.dsp.transform4x4(&mut self.v_coeffs[i * 16..][..16]);
let dstride = buf.stride[2];
let off = buf.offset[2] + xoff + yoff * dstride;
}
if ((cbp16 >> (20 + i)) & 1) != 0 {
self.dsp.transform4x4(&mut self.v_coeffs[i * 16..][..16]);
let dstride = buf.stride[2];
let off = buf.offset[2] + xoff + yoff * dstride;
- let mut dst = &mut buf.data;
- self.dsp.add_block(&mut dst, off, dstride, &self.v_coeffs[i * 16..][..16], 4);
+ let dst = &mut buf.data;
+ self.dsp.add_block(dst, off, dstride, &self.v_coeffs[i * 16..][..16], 4);
self.populate_ipred(hdr, dst, 0, dstride, xoff, yoff, 4, true);
let itype = self.blk_info[self.blk_pos + (i & 1) + (i >> 1) * self.blk_stride].imode;
self.populate_ipred(hdr, dst, 0, dstride, xoff, yoff, 4, true);
let itype = self.blk_info[self.blk_pos + (i & 1) + (i >> 1) * self.blk_stride].imode;
}
if ((cbp8 >> 5) & 1) != 0 {
self.dsp.transform4x4(&mut self.v_coeffs);
let dstride = buf.stride[2];
let soff = buf.offset[2];
let off = soff + (xpos >> 1) + (ypos >> 1) * dstride;
}
if ((cbp8 >> 5) & 1) != 0 {
self.dsp.transform4x4(&mut self.v_coeffs);
let dstride = buf.stride[2];
let soff = buf.offset[2];
let off = soff + (xpos >> 1) + (ypos >> 1) * dstride;
}
if ((cbp8 >> 4) & 1) != 0 {
self.dsp.transform4x4(&mut self.u_coeffs);
let dstride = buf.stride[1];
let soff = buf.offset[1];
let off = soff + (xpos >> 1) + (ypos >> 1) * dstride;
}
if ((cbp8 >> 4) & 1) != 0 {
self.dsp.transform4x4(&mut self.u_coeffs);
let dstride = buf.stride[1];
let soff = buf.offset[1];
let off = soff + (xpos >> 1) + (ypos >> 1) * dstride;
}
if ((cbp8 >> 5) & 1) != 0 {
self.dsp.transform4x4(&mut self.v_coeffs);
let dstride = buf.stride[2];
let soff = buf.offset[2];
let off = soff + (xpos >> 1) + (ypos >> 1) * dstride;
}
if ((cbp8 >> 5) & 1) != 0 {
self.dsp.transform4x4(&mut self.v_coeffs);
let dstride = buf.stride[2];
let soff = buf.offset[2];
let off = soff + (xpos >> 1) + (ypos >> 1) * dstride;
}
if ((super_cbp >> 16) & 0xF) != 0 {
self.dsp.transform8x8(&mut self.u_coeffs);
let dstride = buf.stride[1];
let soff = buf.offset[1];
let off = soff + (xpos >> 1) + x * 8 + ((ypos >> 1) + y * 8) * dstride;
}
if ((super_cbp >> 16) & 0xF) != 0 {
self.dsp.transform8x8(&mut self.u_coeffs);
let dstride = buf.stride[1];
let soff = buf.offset[1];
let off = soff + (xpos >> 1) + x * 8 + ((ypos >> 1) + y * 8) * dstride;
}
if ((super_cbp >> 20) & 0xF) != 0 {
self.dsp.transform8x8(&mut self.v_coeffs);
let dstride = buf.stride[2];
let soff = buf.offset[2];
let off = soff + (xpos >> 1) + x * 8 + ((ypos >> 1) + y * 8) * dstride;
}
if ((super_cbp >> 20) & 0xF) != 0 {
self.dsp.transform8x8(&mut self.v_coeffs);
let dstride = buf.stride[2];
let soff = buf.offset[2];
let off = soff + (xpos >> 1) + x * 8 + ((ypos >> 1) + y * 8) * dstride;
test_decoding("realmedia", "realvideo6", "assets/RV/RV60.rmhd", Some(1000), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x2b1f1807, 0x09edef33, 0x0e6c78c1, 0x3b3c8179],
test_decoding("realmedia", "realvideo6", "assets/RV/RV60.rmhd", Some(1000), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x2b1f1807, 0x09edef33, 0x0e6c78c1, 0x3b3c8179],
- [0xb04e2626, 0x976e16f5, 0xc41a7a78, 0x2d8765da],
- [0xf4f30d97, 0x7f2876eb, 0x265ffad4, 0x3542a7c4],
- [0xa5082524, 0x38a86952, 0x35bf1fee, 0xfc830d3f],
- [0x75eab1a2, 0x62e2222f, 0xe96a20d9, 0x652140b4],
- [0x7590fa49, 0x78c83490, 0x239eeff9, 0x64282ac7],
- [0x70b19e9f, 0x66c1f866, 0xb8d7142a, 0xf3e424b2],
- [0xc2934123, 0x3bf72fc4, 0x12d8d123, 0x1f39525b],
- [0x13344919, 0xecd01190, 0x2f69079b, 0xbf4d7026],
- [0xcefb3284, 0xa9b36d4d, 0xf1aa6752, 0xaae17d44],
- [0x57f01275, 0xf8e883ea, 0x4865752e, 0xc760a777]]));
+ [0x3db0f7ea, 0xbbf24a80, 0x54c0dd7c, 0xbdea881a],
+ [0x24134118, 0xeece4c59, 0x3f319c04, 0xd04951fd],
+ [0xe5f1a7a5, 0x204ab47b, 0x678277b3, 0x179f3007],
+ [0x61fb5e14, 0x47cce437, 0xaeeed91f, 0x03f727aa],
+ [0x46c71f20, 0x8e6ee603, 0xb68965ee, 0xf5bf3c45],
+ [0xf87589a4, 0xd9cc9120, 0xff27a8e6, 0xc1cc1dd5],
+ [0x12ea3288, 0x810b766b, 0x9a83ac11, 0x88f9996a],
+ [0xe1a8020f, 0x972fadbb, 0x771f0f7e, 0x7a3a3e41],
+ [0xed041308, 0x3112b04e, 0xcb39b23b, 0x5f73798c],
+ [0xb0a2db76, 0x56dd7f97, 0x87e4f6d4, 0xe69ecfd8]]));