diff options
author | Niklas Haas <git@haasn.xyz> | 2020-05-18 03:34:24 +0300 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2020-05-18 09:24:26 +0300 |
commit | cbe05cf439807d872fc35b2c5fbed5eb3d2f51a9 (patch) | |
tree | 23186d0c18c28d35d10099f9eba2debf9daa1cf4 /examples/dp_renderer.h | |
parent | 7bbebdb4639ee20fa3213396b223ebdc1db91210 (diff) |
dav1dplay: support on-GPU film grain synthesis
Annoying minor differences in this struct layout mean we can't just
memcpy the entire thing. Oh well.
Note: technically, PL_API_VER 33 added this API, but PL_API_VER 63 is
the minimum version of libplacebo that doesn't have glaring bugs when
generating chroma grain, so we require that as a minimum instead.
(I tested this version on some 4:2:2 and 4:2:0, 8-bit and 10-bit grain
samples I had lying around and made sure the output was identical up to
differences in rounding / dithering.)
Diffstat (limited to 'examples/dp_renderer.h')
-rw-r--r-- | examples/dp_renderer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/dp_renderer.h b/examples/dp_renderer.h index c3b2378..4c6f295 100644 --- a/examples/dp_renderer.h +++ b/examples/dp_renderer.h @@ -60,6 +60,7 @@ typedef struct { int highquality; int untimed; int zerocopy; + int gpugrain; } Dav1dPlaySettings; #define WINDOW_WIDTH 910 @@ -89,6 +90,8 @@ typedef struct rdr_info // Callback for alloc/release pictures (optional) int (*alloc_pic)(Dav1dPicture *pic, void *cookie); void (*release_pic)(Dav1dPicture *pic, void *cookie); + // Whether or not this renderer can apply on-GPU film grain synthesis + int supports_gpu_grain; } Dav1dPlayRenderInfo; extern const Dav1dPlayRenderInfo rdr_placebo_vk; |