dav1d 1.5.0-30-gf772f3e
dav1d is an AV1 decoder
Loading...
Searching...
No Matches
Data Fields
Dav1dPicAllocator Struct Reference

#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)
 

Field Documentation

◆ alloc_picture_callback

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()).

Parameters
picThe 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().
cookieCustom pointer passed to all calls.
Note
No fields other than data, stride and allocator_data must be filled by this callback.
Returns
0 on success. A negative DAV1D_ERR value on error.

◆ cookie

void* Dav1dPicAllocator::cookie

custom data to pass to the allocator callbacks.

◆ release_picture_callback

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.

Parameters
picThe picture that was filled by alloc_picture_callback().
cookieCustom pointer passed to all calls.

The documentation for this struct was generated from the following file: