English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 04 October 2016, 18:03   #1
StoneOakvalley
Registered User
 
Join Date: Jan 2009
Location: Norway
Age: 43
Posts: 69
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 :-)
StoneOakvalley is offline  
AdSense AdSense  
Old 04 October 2016, 18:15   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
Moved from beta thread. No non-beta topics in beta threads!

Interesting idea, I'll think about it
Toni Wilen is online now  
Old 04 October 2016, 19:54   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
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.
Toni Wilen is online now  
Old 05 October 2016, 13:58   #4
LocalH
Amiga user since 1990
LocalH's Avatar
 
Join Date: Aug 2004
Location: Kingsport, TN / USA
Age: 37
Posts: 276
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.
LocalH is offline  
Old 05 October 2016, 17:26   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
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.
Toni Wilen is online now  
Old 05 October 2016, 18:29   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,481
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???
mark_k is offline  
Old 05 October 2016, 19:18   #7
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 17,678
Quote:
Originally Posted by LocalH View Post
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.
Just use a solid color screen as background image for chromakeying in your favorite way.

Toni, maybe add the option to choose a color from a wheel to replace transparent pixels with?
Akira is offline  
Old 05 October 2016, 20:44   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
No. I only do full genlock emulation or I do nothing. Genlock is not just a colorkey if ECS chipset.
Toni Wilen is online now  
Old 06 October 2016, 17:02   #9
StoneOakvalley
Registered User
 
Join Date: Jan 2009
Location: Norway
Age: 43
Posts: 69
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
StoneOakvalley is offline  
Old 06 October 2016, 20:17   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
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..
Toni Wilen is online now  
Old 06 October 2016, 20:26   #11
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 17,678
Quote:
Originally Posted by Toni Wilen View Post
No. I only do full genlock emulation or I do nothing. Genlock is not just a colorkey if ECS chipset.
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.
Akira is offline  
Old 07 October 2016, 19:05   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
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
Toni Wilen is online now  
Old 08 October 2016, 10:57   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
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.
Toni Wilen is online now  
Old 09 October 2016, 02:58   #14
LocalH
Amiga user since 1990
LocalH's Avatar
 
Join Date: Aug 2004
Location: Kingsport, TN / USA
Age: 37
Posts: 276
Quote:
Originally Posted by Toni Wilen View Post
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.
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.
LocalH is offline  
Old 09 October 2016, 03:08   #15
B14ck W01f
m68k all the way
 
Join Date: Aug 2011
Location: Koalaland
Posts: 473
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".
B14ck W01f is offline  
Old 09 October 2016, 03:28   #16
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 2,982
This could actually come in handy for using old JacoSUB anime fansub scripts.
idrougge is offline  
Old 09 October 2016, 09:43   #17
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
Quote:
Originally Posted by LocalH View Post
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.
Boring solution but done. If genlock is active, both screenshots and avioutput include genlock transparency in alpha channel.

Only supported with "before filtering mode". Filters may or may not like it.

Quote:
Originally Posted by B14ck W01f View Post
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".
Thats what happens when I attempt to do even tiny amount of documentation-like.
Toni Wilen is online now  
Old 09 October 2016, 16:05   #18
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 3,632
since it is not just a beta issue, i moved it to this place
Quote:
Originally Posted by emufan View Post
- Genlock custom video file, ...
so we can do now some rotoscoping - maybe we need some sort of pause/resume/loop button for the video file.
any chance you can create some sort of remote control buttons (key combo)?
pause
single-frame +/-
restart/loop
enable/disable genlock

is it possible?
emufan is offline  
Old 10 October 2016, 16:59   #19
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
Quote:
Originally Posted by emufan View Post
any chance you can create some sort of remote control buttons (key combo)?
pause
single-frame +/-
restart/loop
enable/disable genlock

is it possible?
Position setting by frame seems to be possible, even when paused. I can add some input events (with default mapping = none).
Toni Wilen is online now  
Old 10 October 2016, 17:20   #20
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
Done. (Last 4 in input event list).

I think genlock features really should end here, pointlessness level will overflow soon.
Toni Wilen is online now  
AdSense AdSense  
 


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.EAB 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:01.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.21786 seconds with 11 queries