Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 11-07-2018, 07:22 AM   #1
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default Video-processor: parameter 1 of gfx_keyedblit (kv1) sets yellow-factor not green

In the docs of video-processor it is stated:
Quote:
gfx_keyedblit(input[,x,y,w,h,srcx,srcy,kv1,kv2,kv3,kv4])
chroma-key blits, using the source color as key. kv1-kv4 meaning depends on colorspace:

YV12/YUY2: kv1 is U target (-0.5 default), kv2 is V target (-0.5 default), kv3 is closeness-factor (0.4 default), kv4 is the gain (2.0 default)
RGBA: kv1 is green-factor (1.0 default), kv2 is blue-factor (-1.0 default), kv3 is offset (-1.0 default), kv4 enables spill removal (1.0 default)
In contrary kv1 adjusts yellow here (Linux native 64bit) if video output is set to RGBA mode.
This would make it hard (impossible?) to chroma-key green screens in RGBA mode.

reproduce:
  1. download a color-wheel image or similar (e.g. this post attachment) and insert on track in empty project
  2. set video colorspace to RGB in project settings
  3. insert video processor and open "simple source chroma-key" preset
  4. set k1 all the way to the right (16)
  5. set k2 (blue-factor) to 0
  6. adjust k3 (offset)

You'll notice that yellow is faded out first.
Attached Images
File Type: jpeg colorwheel2.jpeg (29.1 KB, 353 views)

Last edited by wwwmaze; 11-07-2018 at 08:07 AM.
wwwmaze is offline   Reply With Quote
Old 11-07-2018, 08:27 AM   #2
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

There is definitely something wrong because the base colors shift in RGBA rather then get transparent. So if I turn k2 to -16 and turn k1 slowly to the right, yellow turns red and green turns to black. If I go further the red and black turn transparent.
Eliseat is offline   Reply With Quote
Old 11-07-2018, 09:16 AM   #3
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Quote:
Originally Posted by Eliseat View Post
yellow turns red
This may be a feature (spill removal), not sure. Turn it off by setting k4 to 0.
wwwmaze is offline   Reply With Quote
Old 11-27-2018, 09:33 PM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 16,117
Default

Hmm yeah the RGBA mode is completely broken... It completely ignores the red channel when keying, oops.
Justin is offline   Reply With Quote
Old 11-29-2018, 01:03 PM   #5
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Hey, thank you. Also for the new preset. Having a short glimpse at it I think I also misunderstood how to use gfx_keyedblit.
wwwmaze is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 -7. The time now is 02:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.