Menu

ResizeBilinear on Power8

Anonymous
2016-05-20
2016-05-30
  • Anonymous

    Anonymous - 2016-05-20

    I wanted to compare performance of bilinear resizing with OpenCV, so I wrote this function:

    void resize_simdlib(int scale, const cv::Mat &src, cv::Mat &dst)
    {
        dst = cv::Mat::zeros(src.rows*scale, src.cols*scale, src.type());
        typedef Simd::View<Simd::Allocator> View;
        View view_src = src;
        View view_dst = dst;
        Simd::ResizeBilinear(view_src, view_dst);
    }
    

    It works fine on Windows with MSVC and on x86 Linux with gcc. However, if built with gcc on a RHEL Power8 server (where it uses VMX, I guess?) color channels get messed up, the output image is mostly gray with some diagonal mosaic stripes, sort of what happens if a stride value is wrong. Am I using the resize function correctly?
    (I will attach the image, if necessary.)

     
  • Yermalayeu Ihar

    Yermalayeu Ihar - 2016-05-20

    As I can see you use Simd Library correctly. Especialy if you have correct result at x86. So I suppouse that there is an error in VMX version of function ResizeBilinear. I'm sorry but can't check this fact, and fix the error because I haven't got access to Power PC at the moment.

     
  • Anonymous

    Anonymous - 2016-05-30

    It seems to work correctly if the system is big endian (my previous attempt was on a little endian system). Probably some of those clever binary tricks need to be different for different ending.

     
    • Yermalayeu Ihar

      Yermalayeu Ihar - 2016-05-30

      Yes. It is similar to truth. When I was porting the algorithms to PowerPC platform, I was supposing that it was big endian.

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.