Skip to content

Commit 2113b0d

Browse files
OpenEXRCore Deep pixel unpacking optimisation (#2049)
* Refactor UNPACK_SAMPLES macro to allow code reuse. Breaking each case of the UNPACK_SAMPLES macro into seperate smaller macros that can be reused to avoid code duplication. Signed-off-by: Nikolaos Koutsikos <nikolaos.koutsikos@foundry.com> * Refactor some common code out in a macro Signed-off-by: Nikolaos Koutsikos <nikolaos.koutsikos@foundry.com> * Optimise EXRCore Deep pixel unpacking The functions for doing Deep pixel unpacking, had two branch checks (switch statements) for checking the pixel and requested data type within the inner most loop that goes over the pixels of each line. This is definitely unnecessary, since the data types remain the same. However the compiler is not able to optimise this, and the generated assembly for the pixel for loop is massive since it contains all these branch checks. This commit fixes this issue by moving the two switch statements outside of the pixel for loop, which makes the compiler able to generate much more efficient assembly for the pixel unpacking operations. Signed-off-by: Nikolaos Koutsikos <nikolaos.koutsikos@foundry.com> --------- Signed-off-by: Nikolaos Koutsikos <nikolaos.koutsikos@foundry.com> Co-authored-by: Cary Phillips <cary@ilm.com>
1 parent 7ec1cf5 commit 2113b0d

1 file changed

Lines changed: 364 additions & 85 deletions

File tree

0 commit comments

Comments
 (0)