Commit 5e628a47 authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge

Use luma PlaneConfig for half res and quarter res.

parent dfa0a625
...@@ -451,19 +451,17 @@ impl FrameState { ...@@ -451,19 +451,17 @@ impl FrameState {
pub fn new_with_frame(fi: &FrameInvariants, frame: Arc<Frame>) -> FrameState { pub fn new_with_frame(fi: &FrameInvariants, frame: Arc<Frame>) -> FrameState {
let rs = RestorationState::new(fi, &frame); let rs = RestorationState::new(fi, &frame);
let (luma_width, luma_height, luma_xpad, luma_ypad) = (
frame.planes[0].cfg.width,
frame.planes[0].cfg.height,
frame.planes[0].cfg.xpad,
frame.planes[0].cfg.ypad
);
FrameState { FrameState {
input: frame, input: frame,
input_hres: Plane::new( input_hres: Plane::new(luma_width/2, luma_height/2, 1, 1, luma_xpad/2, luma_ypad/2),
fi.padded_w/2, fi.padded_h/2, input_qres: Plane::new(luma_width/4, luma_height/4, 2, 2, luma_xpad/4, luma_ypad/4),
1, 1, rec: Frame::new(luma_width, luma_height, fi.sequence.chroma_sampling),
(MAX_SB_SIZE + FRAME_MARGIN) / 2, (MAX_SB_SIZE + FRAME_MARGIN) / 2
),
input_qres: Plane::new(
fi.padded_w/4, fi.padded_h/4,
2, 2,
(MAX_SB_SIZE + FRAME_MARGIN) / 4, (MAX_SB_SIZE + FRAME_MARGIN) / 4
),
rec: Frame::new(fi.padded_w, fi.padded_h, fi.sequence.chroma_sampling),
qc: Default::default(), qc: Default::default(),
cdfs: CDFContext::new(0), cdfs: CDFContext::new(0),
deblock: Default::default(), deblock: Default::default(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment