Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Video Editing/Mangling

Reply
 
Thread Tools Display Modes
Old 12-05-2018, 05:56 PM   #1
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,778
Default Developer notes for 5.963+dev1205 and later, and colorspaces

5.963+dev1205 overhauls the video colorspace management

This is a big internal update which simplifies things to prevent unnecessary colorspace conversions (conversions tend to be slow lossy so avoiding them when possible is a good thing).

The biggest difference from a preset authors perspective is that now in Auto mode, each time the video processor is executed, its 'colorspace' variable is initially set to 0.

If the 'colorspace' variable is set to 0, when reading or querying an input, 'colorspace' is set to the colorspace of the input.

If the script draws (via gfx_fillrect() or gfx_str_draw() etc), allocates or resizes any buffer (via gfx_img_alloc(), etc) when the 'colorspace' variable is set to 0, then 'YV12' (or project colorspace) is set.

If the project colorspace setting is set to something other than "Auto", then the old behavior of 'colorspace' being set to the project colorspace will remain (so if you have presets in projects that depend on this, you can manually set the project colorspace to override).

Having said this all -- using the "Auto" mode for project colorspace should make things a lot more efficient all around.

Another note about forcing particular colorspaces in presets:

As a rule of thumb if your preset knows which colorspace it will be outputting, it is preferable to set the colorspace before drawing anything. Converting the framebuffer to a new colorspace is not any slower than anything else, but using colorspace conversion when blitting from another source is preferable because that converted copy can be cached (in case another processor wants a colorspace-converted copy of the same image).

Last edited by Justin; 12-05-2018 at 06:01 PM.
Justin 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:57 AM.


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