Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2020-05-18 03:34:24 +0300
committerNiklas Haas <git@haasn.xyz>2020-05-18 09:24:26 +0300
commitcbe05cf439807d872fc35b2c5fbed5eb3d2f51a9 (patch)
tree23186d0c18c28d35d10099f9eba2debf9daa1cf4 /examples/dp_renderer.h
parent7bbebdb4639ee20fa3213396b223ebdc1db91210 (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.h3
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;