Comments (11)
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 :)
from flashcap.
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:
be698df
Let me know if it's worth merging this modification.
from flashcap.
I will see later!
from flashcap.
@flat-eric147 Ouch! I forgot it... Sorry will be released 1.7.0 package shorty.
So, it will be merged next release. Please fork latest develop branch and apply it?
from flashcap.
ok, it looks good to me. Thank you so much!
from flashcap.
That is an excellent insight!
Indeed, when doing a YUV conversion, the color space conversion matrix is affected.
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:
R = clip(( 298 * C + 409 * E + 128) >> 8)
G = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8)
B = clip(( 298 * C + 516 * D + 128) >> 8)
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.
from flashcap.
Thank you, please consider also a small fix on that 761ce5d
from flashcap.
Merged, I will release next version.
from flashcap.
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.
from flashcap.
create pull request and while reviewing the code spotted a bug as well.
from flashcap.
Thanks! If no other problems are found, I will release it as 1.0.8.
from flashcap.
Related Issues (20)
- run wpf sample app HOT 3
- Avalonia 11: MVVM Community Toolkit: ObservableCollection<CaptureDeviceDescriptor> is null HOT 2
- Added ShowPropertyPage method to DirectShowDevice class HOT 1
- Need support with Avalonia Sample HOT 9
- Is there any way to set camera parameters like white balance, exposure on linux? HOT 1
- Blue screen error without stopping HOT 1
- Capture Error event handler HOT 1
- SET the power line frequency property HOT 1
- After running StartAsync() on linux, executing StopAsync() and then StartAsync(), pixelBufferArrived will not be executed again. HOT 4
- VideoCharacteristics not detected HOT 17
- Typo in Linux device enumeration HOT 3
- Reversed logic when enumerating Linux device capabilities HOT 3
- 执行OpenAsync时发生异常 HOT 1
- Elgato CamLink 4K DirectShow Pixel Format HOT 4
- Capture works first time on Linux, but not subsequent times HOT 4
- How to do shrink memory when capturing from WebCam to WPF HOT 2
- Avalonia aot 启动失败
- Is there a camera snapshot event handler? HOT 1
- AutoPixelBufferScope set PixelBuffer to null, cause allocate new PixelBuffer for every frame HOT 3
- Possible leaks in AsyncLock HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flashcap.