Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
isp:hsl-_rgb [2021/07/24 11:07] – [Step-by-step algorithm] Igor Yefmov | isp:hsl-_rgb [2021/07/24 11:40] – [HSL->RGB] Igor Yefmov |
---|
====== HSL->RGB ====== | ====== HSL->RGB ====== |
The text below is based on an Excel workbook attached to this page: {{ :isp:hsl-rgb.xlsm |}}. That Excel file provides a sort of playground where you can try various input data and see the final results, both "precise" and "optimized", as well as the discrepancy between the two methods. | The text below is based on a {{ https://docs.google.com/spreadsheets/d/1K3kp-Ofc46DEjLrNZLLeVAv1sQBafWe9N2UWncYa6CM/edit?usp=sharing | SUB2r ISP Excel workbook}}. That workbook provides a sort of playground where you can try various input data and see the final results, both "precise" and "optimized", as well as the discrepancy between the two methods. |
===== Preface ===== | ===== Preface ===== |
Much is written and is available on the color space conversion from HSL to RGB (for example this [[https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB|Wikipedia article]]). However, not only this is not meant to be used with integer arithmetics, but is also very costly due to division operations. And once you realize that a 4K video running at 60FPS needs to do this conversion half a billion times a second(!) you see why this needs to be heavily optimized ;-) | Much is written and is available on the color space conversion from HSL to RGB (for example this [[https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB|Wikipedia article]]). However, not only this is not meant to be used with integer arithmetics, but is also very costly due to division operations. And once you realize that a 4K video running at 60FPS needs to do this conversion half a billion times a second(!) you see why this needs to be heavily optimized ;-) |