-
Notifications
You must be signed in to change notification settings - Fork 29
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
Question about TranscodeFromUYVY method #107
Comments
That is an excellent insight! As shown on the source code, this is implemented based on the MS Article. The reason is that specific instructions were given to use realistic integer arithmetic (I wanted to avoid floating point arithmetic for speed). Since I do not have a deep understanding of color space, I adopted my decision about the validity of these calculations in comparison to the miscellaneous other blog posts on the topic. The actual calculations are exactly as the formulas here. That is:
and although not clearly shown, I believe this is BT.709 based. Returning to FlashCap, I think the idea of giving the format assumed in the YUV transcoding as an argument is a good one, so I will adopt it. However, the only known format type is BT.709, so if you know of other formats that could be added (e.g., BT.601, BT.2020, etc.), please help me out. |
Thank you for the information and all the references. From what I could see it "felt" like BT.709, which nowadays is ok in most cases I would guess. I will try to have a closer look and try to help you out :) |
Hi, I had a closer look at the code, and it looked like the current conversion is using the standard BT.601. I pushed a change to my forked repository adding all possible conversion standards: |
I will see later! |
Thank you, please consider also a small fix on that 761ce5d |
Merged, I will release next version. |
Thank you! The only thing I see is missing is the patch I attached manually. If you prefer I can re-fork from here and make a merge request. |
@flat-eric147 Ouch! I forgot it... Sorry will be released 1.7.0 package shorty. |
create pull request and while reviewing the code spotted a bug as well. |
Thanks! If no other problems are found, I will release it as 1.0.8. |
ok, it looks good to me. Thank you so much! |
The method TranscodeFromUYVY in BitmapTranscoder.cs:22 contains a YUV to RGB conversion.
As everything in the method is converted to integer arithmetic it is not obvious to me which color space
conversion is in use. There are two main standards BT.709 (usually used for HD formats) and BT.601 (usually used for SD formats).
Can anybody tell me which standard is used here? It would be cool to provide a parameter to the method or make different methods for the various color spaces, also in view of 4k/UHD which is coming with yet another standard (BT.2020).
Thank you!
The text was updated successfully, but these errors were encountered: