-
Notifications
You must be signed in to change notification settings - Fork 8
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
[WIP] transformation-redux #51
base: master
Are you sure you want to change the base?
Conversation
updated the code to get rid of dynamic dispatch and restore the original API, but now there are more failures and it actually performs worse :/. I suspect I messed up YCoCg somehow. |
I've spent some time optimizing this and I still can't get it faster than the dynamic dispatch implementation of transformations. @newpavlov you're better at optimization than me is there anything obvious I've missed? |
I have several minor ideas how code can be improved, but not sure why you get a slowdown. It will be hard to tell without playing with the code. My current suggestions are:
|
I have the last field in the transformation set as a small optimization. We're guaranteed to have at least one transformation so it removes one bounds check. |
Making transformations general over pixel type has some issues. The first commit in this PR used that and ran into a problem: the last field of the second header is stored after the transformations, so we wouldn't be able to expose that to users. |
Yes, I've wrote about it in my comment. IIUC currently you expose only transformation names and their order, without any internal information. If you think that it's worth to expose this information (personally I don't care about it, and AFAIK |
It's probably worth it to evaluate what information needs to be exposed to the user. The reason I exposed transformation data is that I sorely missed having it available when trying to implement this decoder. That's probably a very specific use-case though so I can see why it wouldn't be necessary. Perhaps it's better just to put it into a debug log. |
This is a heavy WIP PR to redo the underlying transformation system. Currently the branch has test failure for the flif_logo, some features were regressed and performance hasn't improved. I'll be evolving this PR in public to hopefully get some useful feedback.