0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

17 Commits

Author SHA1 Message Date
jp9000
84ce1076f1 libobs: Fix field order of retro/linear 2x shaders
The field orders of retro 2x and linear 2x deinterlace shaders were
inverted.  Note that yadif 2x does not act the same in this regard, its
field ordering is correct due to how it operates.
2016-04-24 01:21:30 -07:00
jp9000
8a9f1bc7c1 libobs: Fix discard/retro deinterlace equations 2016-04-20 20:13:49 -07:00
jp9000
96d848f3d2 libobs: Add premultiplied alpha base effect 2016-03-26 21:41:49 -07:00
sam8641
a7ce53367c libobs: Fix lanczos scaling quality issue
Closes jp9000/obs-studio#526
2016-03-24 12:35:24 -07:00
jp9000
07c644c581 libobs: Add deinterlacing API functions
Adds deinterlacing API functions.  Both standard and 2x variants are
supported.  Deinterlacing is set via obs_source_set_deinterlace_mode and
obs_source_set_deinterlace_field_order.

This was implemented in to the core itself because deinterlacing should
happen before effect filters are processed, but after async filters are
processed.  If this were added as a filter, there is the possibility
that a different filter is processed before deinterlacing, which could
mess with the result.  It was also a bit easier to implement this way
due to the fact that that deinterlacing may need to have access to the
previous async frame.

Effects were split in to separate files to reduce load time (especially
for yadif shaders which take a significant amount of time to compile).
2016-03-21 21:22:32 -07:00
jp9000
9e15e3d8fd libobs: Remove need for DrawMatrix technique in effects
(Note: This commit also modifies obs-filters and text-freetype2)

This simplifies writing of effects.  DrawMatrix is no longer necessary
because there are no sources that require drawing with a color matrix
other than async sources, and async sources are automatically processed
and don't defer their initial render stage to filters.
2016-03-21 21:22:26 -07:00
jp9000
7bc8dc3471 libobs: Add Planar444 conversion to effect 2015-04-16 22:43:46 -07:00
jp9000
6e572d849f libobs: Don't use 'output' as a keyword in shader
The bilinear lowres scale effect was using 'output' for a variable,
which is apparently a reserved keyword in GLSL on macs.  This slipped
by me due to the fact that this didn't occur with OpenGL on my windows
machine.
2015-04-10 09:58:04 -07:00
jp9000
65517ea4cf libobs: Add low resolution bilinear scale effect
This effect preserves detail of images that are scaled below half size
by using sampling 9 pixels.
2015-04-10 07:27:24 -07:00
jp9000
9b238ef71e libobs: Add obs_get_opaque_effect function
This returns a common effect useful for rendering an image with the
alpha channel overridden to 1.0.
2015-03-22 19:18:04 -07:00
jp9000
2fa37a1f2e libobs-opengl: Fix render targets being flipped
When render targets are used, they output to the render target inverted
due to the way that opengl works.  This fixes that issue by inverting
the projection matrix so that it renders the image upside down and
inverting the front face from counterclockwise to clockwise.
2015-03-22 18:38:45 -07:00
Palana
1a53c8ca66 Rename parameters to avoid GLSL keyword conflicts
Refer to https://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf
for a list of current (reserved) keywords.

In the future the shader compiler in libobs-opengl should probably take
care of avoiding those name conflicts (bonus points for transparently
remapping the names of effect parameters)
2015-01-08 01:42:22 +01:00
jp9000
817a724dea libobs: Add NV12_Reverse shader 2014-12-21 10:14:18 -08:00
jp9000
c88220552f (API Change) libobs: Add bicubic/lanczos scaling
This adds bicubic and lanczos scaling capability to libobs to improve
scaling quality and sharpness when the output resolution has to be
scaled relative to the base resolution.  Bilinear is also available,
although bilinear has rather poor quality and causes scaling to appear
blurry.

If the output resolution is close to the base resolution, then bilinear
is used instead as an optimization, as there's no need to use these
shaders if scaling is not in use.

The Bicubic and Lanczos effects are also exposed via exported function
to allow the ability to use those shaders in plugin modules if desired.

The API change adds a variable 'scale_type' to the obs_video_info
structure that allows the user interface to choose what type of scaling
filter should be used.
2014-12-15 01:55:12 -08:00
jp9000
ca8a9fb5a7 libobs: Fix conversion shader D3D display bug
Just for a quick background: D3D's fmod intrinsic is very imprecise.
Naturally floating points aren't precise at all, and when the numbers
you're dealing with become very large, it can often be off by 0.1 or
more.

However, apparently 0.1 isn't enough of an offset to ensure a proper
value when using the fmod intrinsic and then flooring the value.  0.2
seems to fix the issue and make the image display properly.
2014-12-09 14:21:01 -08:00
Palana
0f15cc143e Add obs_get_default_rect_effect
This provides a default effect for users of GL_TEXTURE_RECTANGLE/textures
that return true for gs_texture_is_rect
2014-10-03 20:18:01 +02:00
BtbN
38c2fc87aa Move all data into the subdir it belongs to
Completely removes the build dir in favor of cmake based build layouting
2014-07-19 01:38:41 +02:00