Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Artoriuz/glsl-joint-bilateral
JointBilateral chroma upscaler shader for mpv
https://github.com/Artoriuz/glsl-joint-bilateral
Last synced: 3 months ago
JSON representation
JointBilateral chroma upscaler shader for mpv
- Host: GitHub
- URL: https://github.com/Artoriuz/glsl-joint-bilateral
- Owner: Artoriuz
- License: mit
- Created: 2023-07-16T17:34:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-19T23:03:51.000Z (9 months ago)
- Last Synced: 2024-06-30T14:50:30.666Z (5 months ago)
- Language: GLSL
- Size: 88.8 MB
- Stars: 15
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mpv - JointBilateral & FastBilateral - Chroma upsamplers that use the luma plane as a guide to achieve sharper transitions without introducing any ringing. (Other)
README
# GLSL Joint Bilateral
## Overview
This is a simple implementation of joint bilateral chroma upsampling. It uses the luma plane as a guide to achieve sharper edges without introducing any ringing.The repo contains 2 distinct shaders:
- `JointBilateral.glsl`: ["Classic version"](https://en.wikipedia.org/wiki/Bilateral_filter) of what is known as "joint-bilateral". This uses gaussian functions to weight spatial and intensity distances. To understand how this works feel free to read ["this paper"](https://johanneskopf.de/publications/jbu/paper/FinalPaper_0185.pdf).
- `FastBilateral.glsl`: This is a simplified version of the shader.## Instructions
Add something like this to your mpv config:
```
vo=gpu-next
glsl-shader="path/to/shader/JointBilateral.glsl"
```
gpu-next is required due to the usage of tunable parameters.## Parameters
You can set the following parameters:
- `distance_coeff`: Controls the shape of the spatial Gaussian filter. Higher values decrease the contribution of pixels more distant to the centre.
- `intensity_coeff`: Controls the shape of the Gaussian filter used for intensity-distance weighting. Higher values decrease the contribution of pixels with distant luminosities.On `vo=gpu-next`, you can set these settings with `--glsl-shader-opts=param1=value1,param2=value2,...`.
The shaders have very aggressive defaults, which may not work well on all content. If you find the output too harsh, try reducing the coefficients.
## Example
![JointBilateral Example](./example.png "JointBilateral Example")