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

bugs and solutions #6

Open
MichealRay opened this issue Oct 25, 2020 · 0 comments
Open

bugs and solutions #6

MichealRay opened this issue Oct 25, 2020 · 0 comments

Comments

@MichealRay
Copy link

Hi, Fig1024, your optimization is awesome, it means a lot to me. thanks!
However, i found some bugs there, and below is some of my solutions

First, according to the comment statements from https://github.com/nothings/stb.git. Maybe we should add
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
at the begining of RecursiveBilateralFilter.cpp. In some situation, it couldnot pass the compile if we don't.

Second, it crash in RBFilter_SSE2.cpp,when i run your code. After debug, I found it's because out_pix4 is not defined before used in function verticalFilter
pixB = _mm_shuffle_epi8(pixB, mask_pack);

out_pix4 = _mm_srli_si128(out_pix4, 4); // shift
out_pix4 = _mm_or_si128(out_pix4, pixB);
I try to change the codes to be
if (i == 0) //
{
out_pix4 = _mm_shuffle_epi8(pixB, mask_pack);
}
else
{
pixB = _mm_shuffle_epi8(pixB, mask_pack);

out_pix4 = _mm_srli_si128(out_pix4, 4); // shift 
out_pix4 = _mm_or_si128(out_pix4, pixB);

}
It seem to work. But i'm not sure it this change is right.

Can you check here,please?
Thank you.

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

No branches or pull requests

1 participant