Commit 3ba6d445 authored by Monty's avatar Monty Committed by Monty Montgomery
Browse files

Correct confusing not-a-bug in CDEF bounds

Block boundary calculation is correct by accident-- make it correct on purpose.
parent 4ab7e7ac
......@@ -257,8 +257,8 @@ pub fn cdef_filter_superblock(fi: &FrameInvariants,
// Each direction block is 8x8 in y, potentially smaller if subsampled in chroma
for by in 0..8 {
for bx in 0..8 {
let global_block_offset = sbo_global.block_offset(bx, by);
if global_block_offset.x+bx < bc_global.cols && global_block_offset.y+by < bc_global.rows {
let global_block_offset = sbo_global.block_offset(bx<<1, by<<1);
if global_block_offset.x < bc_global.cols && global_block_offset.y < bc_global.rows {
let skip = bc_global.at(&global_block_offset).skip;
if !skip {
let dir = cdef_dirs.dir[bx][by];
......
......@@ -525,8 +525,8 @@ pub fn rdo_cdef_decision(sbo: &SuperBlockOffset, fi: &FrameInvariants,
let mut err:u64 = 0;
for by in 0..8 {
for bx in 0..8 {
let bo = sbo.block_offset(bx, by);
if bo.x+bx < bc.cols && bo.y+by < bc.rows {
let bo = sbo.block_offset(bx<<1, by<<1);
if bo.x < bc.cols && bo.y < bc.rows {
let skip = bc.at(&bo).skip;
if !skip {
for p in 0..3 {
......
Supports Markdown
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