Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glur: there may be a mistake when backwards from right to left? #1

Closed
tonykwok opened this issue May 4, 2016 · 4 comments
Closed
Labels

Comments

@tonykwok
Copy link

tonykwok commented May 4, 2016

Hi, If my understanding is correct

for (j = width - 1; j >= 0; j--) {
    curr_out_r = curr_src_r * coeff_a0 + curr_src_r * coeff_a1 + prev_out_r * coeff_b1 + prev_prev_out_r * coeff_b2;
    curr_out_g = curr_src_g * coeff_a0 + curr_src_g * coeff_a1 + prev_out_g * coeff_b1 + prev_prev_out_g * coeff_b2;
    curr_out_b = curr_src_b * coeff_a0 + curr_src_b * coeff_a1 + prev_out_b * coeff_b1 + prev_prev_out_b * coeff_b2;
    curr_out_a = curr_src_a * coeff_a0 + curr_src_a * coeff_a1 + prev_out_a * coeff_b1 + prev_prev_out_a * coeff_b2;
}

should be:

for (j = width - 1; j >= 0; j--) {
    curr_out_r = curr_src_r * coeff_a0 + prev_src_r * coeff_a1 + prev_out_r * coeff_b1 + prev_prev_out_r * coeff_b2;
    curr_out_g = curr_src_g * coeff_a0 + prev_src_g * coeff_a1 + prev_out_g * coeff_b1 + prev_prev_out_g * coeff_b2;
    curr_out_b = curr_src_b * coeff_a0 + prev_src_b * coeff_a1 + prev_out_b * coeff_b1 + prev_prev_out_b * coeff_b2;
    curr_out_a = curr_src_a * coeff_a0 + prev_src_a * coeff_a1 + prev_out_a * coeff_b1 + prev_prev_out_a * coeff_b2;
}

'cause you use two curr_src_* in these formulas, is it right?

@puzrin
Copy link
Member

puzrin commented May 4, 2016

Ups... seems you are right.

@a-rodin x & y passes become asymmetric after your commit 410b49b. Typo/bug?

@puzrin puzrin added the bug label May 4, 2016
@puzrin
Copy link
Member

puzrin commented May 4, 2016

BTW we use mono16 blur only in pica and i don't see such problem there.

@ghost
Copy link

ghost commented May 4, 2016

@puzrin yes, it seems to be a typo.

@puzrin puzrin closed this as completed in e566467 May 5, 2016
@puzrin
Copy link
Member

puzrin commented May 5, 2016

Released fixed version. Thank you for report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants