Function libdav1d_sys::dav1d_apply_grain

source ยท
pub unsafe extern "C" fn dav1d_apply_grain(
    c: *mut Dav1dContext,
    out: *mut Dav1dPicture,
    in_: *const Dav1dPicture,
) -> c_int
Expand description

Apply film grain to a previously decoded picture. If the picture contains no film grain metadata, then this function merely returns a new reference.

@param c Input decoder instance. @param out Output frame. The caller assumes ownership of the returned reference. @param in Input frame. No ownership is transferred.

@return 0: Success, and a frame is returned. Other negative DAV1D_ERR codes: Error due to lack of memory or because of invalid passed-in arguments.

@note If Dav1dSettings.apply_grain is true, film grain was already applied by dav1d_get_picture, and so calling this function leads to double application of film grain. Users should only call this when needed.