Skip to content

Add MMX/SSE2 optimizations #3

@SuNNjek

Description

@SuNNjek

The original version of the plugin has MMX optimized code when dealing with non-planar (RGB) frames. In order to achieve the best performance these would have to be implemented in this version too. However, when trying to do this myself I stumbled upon a few problems:

  • I don't actually have any experience with optimizing code for SIMD 😅
  • The templates are getting in the way. Not sure if it is best practice, but I would prefer having actual classes that are actual comilation units (not just one plugin class that uses templates defined in headers). That way there could be classes that use optimizations and classes that don't. Currently I can only set the GCC flags for SSE2 on everything or nothing, without templates this could be done on a class to class (i.e. file to file) basis.
  • GCC doesn't seem to like inline assembly (I would prefer SIMD intrinsics anyway)
  • MMX has been superseded by SSE2. This means the old code would have to be adapted. From what I can see, they mostly have the same instructions though, so this isn't going to be a problem I think.

If you have any ideas to improve the above situations or would like to have a look at doing the optimizations yourself, feel free to leave a comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hacktoberfestIssues for Hacktoberfesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions