From 2a1839451135c71d9c2c96b0c1012ab8ab31fe11 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 13 Sep 2021 17:57:37 +0200 Subject: Expose dav1d_apply_grain as part of the public API This change is motivated by a desire to be able to toggle between CPU and GPU film gain synthesis in players such as VLC. Because VLC initializes the codec before the vout (and, indeed, the active vout module may change in the middle of decoding), it cannot make the decision of whether to apply film grain in libdav1d as part of codec initialization. It needs to be decided on a frame-by-frame basis depending on whether the currently active vout supports film grain synthesis or not. Using the new API, users like VLC can simply set `apply_grain` to 0 and then manually call `dav1d_apply_grain` whenever the vout does not support GPU film grain synthesis. As a side note, `dav1d_apply_grain` could also technically be called from dedicated worker threads, something that libdav1d does not currently do internally. The alternative to this solution would have been to allow changing Dav1dSettings at runtime, but that would be more invasive and a proper API would also need to take other settings into consideration, some of which can't be changed as easily as `apply_grain`. This commit represents a stop-gap solution. Bump the minor version to allow clients to depend on this API. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 6d5178a..7b10612 100644 --- a/meson.build +++ b/meson.build @@ -30,7 +30,7 @@ project('dav1d', ['c'], 'b_ndebug=if-release'], meson_version: '>= 0.49.0') -dav1d_soname_version = '6.0.0' +dav1d_soname_version = '6.1.0' dav1d_api_version_array = dav1d_soname_version.split('.') dav1d_api_version_major = dav1d_api_version_array[0] dav1d_api_version_minor = dav1d_api_version_array[1] -- cgit v1.2.3