libobs: Add ability to use scale filters on scene items

Allows the ability to use scale filters such as point, bicubic, lanczos
on specific scene items, disabled by default.  When using one of the
latter two options, if the item's scale is under half of the source's
original size, it uses the bilinear low resolution downscale shader
instead.
This commit is contained in:
jp9000
2016-06-29 06:08:54 -07:00
parent 9413a43869
commit d49833830c
6 changed files with 133 additions and 26 deletions

View File

@@ -112,6 +112,8 @@ enum obs_allow_direct_render {
};
enum obs_scale_type {
OBS_SCALE_DISABLE,
OBS_SCALE_POINT,
OBS_SCALE_BICUBIC,
OBS_SCALE_BILINEAR,
OBS_SCALE_LANCZOS
@@ -1253,6 +1255,11 @@ EXPORT void obs_sceneitem_set_crop(obs_sceneitem_t *item,
EXPORT void obs_sceneitem_get_crop(const obs_sceneitem_t *item,
struct obs_sceneitem_crop *crop);
EXPORT void obs_sceneitem_set_scale_filter(obs_sceneitem_t *item,
enum obs_scale_type filter);
EXPORT enum obs_scale_type obs_sceneitem_get_scale_filter(
obs_sceneitem_t *item);
EXPORT void obs_sceneitem_defer_update_begin(obs_sceneitem_t *item);
EXPORT void obs_sceneitem_defer_update_end(obs_sceneitem_t *item);