04 October 2016, 18:03 | #1 |
Registered User
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 105
|
genlock feature update
Sorry for taking you back to 3.2.0 release series, but the new Genlock feature is quite interresting for me.
As it once said: New Most Pointless Feature Ever: - Genlock emulation can now replace transparent pixels with noise pattern or static image. - Implements also ECS new genlock features (I still think there is no software that uses them..) - Transparency control. So, the question is if what if the Winuae Emulator window simply could become transparent instead? Allowing whatever users has on their desktop to shine through? Not sure how the window of winuae emulation is programmed (opengl, directx layer?) - but there is a transperancy function for regular microsoft windows of course to allow that. So, we could place a movie under the main winuae emulator window, with the background (instead of test card and noise) to be seen through. Just delete my question if I'm interrupting and otherwise fine thread of the beta 3.4.0 series, I see many others thought that genlock feature was useless and voted down, only to see it actually was implemented in some form of....well, useless way of testcard or noise pattern afterall, so hoping my wish could become part of a final 3.4.0 series, heh uhh. The reason for asking is because I'm currently programming a subtitle program to mimic 80-90's style of captions seen on tv and vhs videos from that time period, along supporting a timed Scala script export with intended use with real amiga and genlock, but thought trying it out first with Winuae software/coding wise, lazy way, (even just testcard and noise) DO something for me at least for now, so dont make a big deal out of it if not interresting :-) |
04 October 2016, 18:15 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Moved from beta thread. No non-beta topics in beta threads!
Interesting idea, I'll think about it |
04 October 2016, 19:54 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
I don't think this is possible. There does not appear to be any way to read pixel data "under" the window (DWM probably knows whats behind the window but I can't find any API to do it) and transparency features that Windows supports are useless for genlock emulation and do not work with D3D.
|
05 October 2016, 13:58 | #4 |
Amiga user since 1990
Join Date: Aug 2004
Location: Kingsport, TN / USA
Age: 44
Posts: 295
|
Potential to output RGBA AVI (at least when using uncompressed output, codes may complicate this) using the genlock emulation to construct the alpha channel?
This would allow for later compositing with non-Amiga elements without compicating emulator display, which would mesh better with a modern video production workflow than trying to do live "genlocking". Wouldn't necessarily fully help with StoneOakvalley's intended use case but could be used to make a demonstration video easily. Last edited by LocalH; 05 October 2016 at 14:07. |
05 October 2016, 17:26 | #5 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
I don't do any hacks. Transparency is done by emulation using hardware genlock emulation. Video support only happens if there is video API that returns full raw pixel data. Genlock transparency MUST be done by emulation, alpha channels are useless.
|
05 October 2016, 18:29 | #6 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,335
|
You could maybe have some hardware assistance by using Direct3D stencil buffer for real-time use: https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
The stencil mask would correspond to the transparent pixels in each Amiga frame. Given a frame of background video (e.g. from playing an AVI, assuming there's an API to render AVI frames to a D3D surface) you'd set that as the stencil reference to have it show through. The details could be fiddly; you'd need to scale background video to the emulated Amiga display but maybe Direct3D could handle that and pixel format conversion??? |
05 October 2016, 19:18 | #7 | |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,645
|
Quote:
Toni, maybe add the option to choose a color from a wheel to replace transparent pixels with? |
|
05 October 2016, 20:44 | #8 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
No. I only do full genlock emulation or I do nothing. Genlock is not just a colorkey if ECS chipset.
|
06 October 2016, 17:02 | #9 |
Registered User
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 105
|
Yeah, seems like a far fetched solution doing a WinAPI tricks since its D3D related. I'll just as well have to live with the currently nice noise and test pattern card or even more crazy: head over to a real amiga with genlock, yahoo.
By the way, is it possible to replace the test pattern card image by ourselves in any way? Or is it hardcoded by you inside the Winuae EXE? I might just go crazy and replace it with a animated gif, if its possible :-) Edit: ahh found it: https://github.com/tonioni/WinUAE/bl.../test_card.cpp |
06 October 2016, 20:17 | #10 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
There is config option: genlock_image=<path to image> but it does not work because it also expects non-existing genlockmode parameter.. (will be fixed in next beta)
Also apparently it is relatively easy to "capture" frames from video files with DirectShow. I found some examples, testing later.. |
06 October 2016, 20:26 | #11 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,645
|
I didn't mean you should do a colorkey, I meant that if you can insert your own image to genlock, you maybe also can generate bitmap data to put there, on the fly, by picking a color on a wheel. Of course I can make a solid color image on my own, but this would be handier/easier.
|
07 October 2016, 19:05 | #12 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Genlock video support implemented...
genlockmode=video (This can be changed using GUI) genlock_video=<path to video file> (config file only so far) Notes: - Uses old and obsolete DirectShow SampleGrabber filter which apparently works better (you get the raw data directly, not some D3D surface) and faster (real time, not some frames/second..).. - Not all video formats supported. Randomly chosen AVIs seem to work. Some randomly chosen WMV didn't. - Video to Amiga scaling only supports integer scaling. (1/4*, 1/2*, 1*, 2*, 4*) Technically same code can be used to show real time webcam video (or any other directshow compatible video stream) if really needed.. If not working: Check the log first! Static custom png image: genlockmode=image genlock_image=<path to png image file> (config file only) http://www.winuae.net/files/b/winuae.7z |
08 October 2016, 10:57 | #13 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
GUI updated. Show blue screen if video or image file fails to load. And probably something else.
EDIT: Default capture device option added (webcam etc).. Last edited by Toni Wilen; 08 October 2016 at 14:24. |
09 October 2016, 02:58 | #14 |
Amiga user since 1990
Join Date: Aug 2004
Location: Kingsport, TN / USA
Age: 44
Posts: 295
|
I was suggesting that WinUAE be able to output RGBA AVI with an alpha channel constructed by the genlock emulation, not any sort of live video overlay.
|
09 October 2016, 03:08 | #15 |
m68k all the way
Join Date: Aug 2011
Location: Koalaland
Posts: 523
|
When you hover over the checkbox that says Genlock connected, a tool tip says that "Genlock is not emulated". Ironic, then, that there are two options for this: "Noise" and "Test card".
|
09 October 2016, 03:28 | #16 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
This could actually come in handy for using old JacoSUB anime fansub scripts.
|
09 October 2016, 09:43 | #17 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
Only supported with "before filtering mode". Filters may or may not like it. Thats what happens when I attempt to do even tiny amount of documentation-like. |
|
09 October 2016, 16:05 | #18 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
since it is not just a beta issue, i moved it to this place
Quote:
pause single-frame +/- restart/loop enable/disable genlock is it possible? |
|
10 October 2016, 16:59 | #19 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Position setting by frame seems to be possible, even when paused. I can add some input events (with default mapping = none).
|
10 October 2016, 17:20 | #20 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Done. (Last 4 in input event list).
I think genlock features really should end here, pointlessness level will overflow soon. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Genlock Emulator #2 | emufan | request.UAE Wishlist | 15 | 02 December 2014 13:57 |
Hama genlock | willbloke | support.Hardware | 4 | 22 August 2014 18:25 |
Genlock's uploads | Genlock | project.Amiga File Server | 7 | 20 August 2010 23:24 |
Genlock emulator | Leandro Jardim | request.UAE Wishlist | 24 | 04 June 2010 07:47 |
Neriki Genlock | Geepster | support.Hardware | 1 | 17 April 2005 08:55 |
|
|