dav1d 1.5.0-30-gf772f3e
dav1d is an AV1 decoder
|
#include <picture.h>
Data Fields | |
void * | cookie |
custom data to pass to the allocator callbacks. | |
int(* | alloc_picture_callback )(Dav1dPicture *pic, void *cookie) |
void(* | release_picture_callback )(Dav1dPicture *pic, void *cookie) |
int(* Dav1dPicAllocator::alloc_picture_callback) (Dav1dPicture *pic, void *cookie) |
Allocate the picture buffer based on the Dav1dPictureParameters.
The data[0], data[1] and data[2] must be DAV1D_PICTURE_ALIGNMENT byte aligned and with a pixel width/height multiple of 128 pixels. Any allocated memory area should also be padded by DAV1D_PICTURE_ALIGNMENT bytes. data[1] and data[2] must share the same stride[1].
This function will be called on the main thread (the thread which calls dav1d_get_picture()).
pic | The picture to allocate the buffer for. The callback needs to fill the picture data[0], data[1], data[2], stride[0] and stride[1]. The allocator can fill the pic allocator_data pointer with a custom pointer that will be passed to release_picture_callback(). |
cookie | Custom pointer passed to all calls. |
void* Dav1dPicAllocator::cookie |
custom data to pass to the allocator callbacks.
void(* Dav1dPicAllocator::release_picture_callback) (Dav1dPicture *pic, void *cookie) |
Release the picture buffer.
If frame threading is used, this function may be called by the main thread (the thread which calls dav1d_get_picture()) or any of the frame threads and thus must be thread-safe. If frame threading is not used, this function will only be called on the main thread.
pic | The picture that was filled by alloc_picture_callback(). |
cookie | Custom pointer passed to all calls. |