xine-lib: xine-lib-1.2.12/src/video_dec/dav1d.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
dav1d.c File Reference
`#include <errno.h>`
`#include <stdlib.h>`
`#include <dav1d/dav1d.h>`
`#include <xine/xine_internal.h>`
`#include <xine/video_out.h>`
`#include <xine/buffer.h>`
`#include <xine/xineutils.h>`

## Data Structures
struct | dav1d_decoder_s

## Macros
#define | LOG_MODULE "dav1d_video_decoder"
#define | LOG_VERBOSE

## Typedefs
typedef struct dav1d_decoder_s | dav1d_decoder_t

## Functions
static void | _free_frame_cb (Dav1dPicture *pic, void *cookie)
static int | _alloc_frame_cb (Dav1dPicture *pic, void *cookie)
static void | _copy_plane (uint8_t *dst, const uint8_t *src, int dst_pitch, int src_pitch, int width, int height, int shift)
static void | _copy_planes (vo_frame_t *img, const Dav1dPicture *pic, int width, int height, int shift)
static void | _merge_planes (uint8_t *dst, int dst_pitch, const Dav1dPicture *pic, int width, int height, int shift, int subsamp)
static vo_frame_t * | _copy_image (dav1d_decoder_t *this, Dav1dPicture *pic)
static void | _draw_image (dav1d_decoder_t *this, Dav1dPicture *pic)
static void | _decode (dav1d_decoder_t *this, Dav1dData *data)
static void | _data_free_wrapper (const uint8_t *data, void *opaque)
static void | _dav1d_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
static void | _dav1d_flush (video_decoder_t *this_gen)
static void | _dav1d_discontinuity (video_decoder_t *this_gen)
static void | _dav1d_reset (video_decoder_t *this_gen)
static void | _dav1d_dispose (video_decoder_t *this_gen)
static video_decoder_t * | _open_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream)
static void * | init_plugin_dav1d (xine_t *xine, const void *data)

## Variables
static const uint32_t | video_types_dav1d []
static const decoder_info_t | dec_info_video_dav1d
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ LOG_MODULE

#define LOG_MODULE "dav1d_video_decoder"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Typedef Documentation

## ◆ dav1d_decoder_t

typedef struct dav1d_decoder_s dav1d_decoder_t

## Function Documentation

## ◆ _alloc_frame_cb()

static int _alloc_frame_cb | ( | Dav1dPicture * | pic,
|  | void * | cookie
| ) |  |
| static

References _x_assert, vo_frame_s::base, vo_frame_s::crop_bottom, vo_frame_s::crop_right, vo_frame_s::free, vo_frame_s::height, height, LOG_MODULE, vo_frame_s::pitches, VO_BOTH_FIELDS, VO_GET_FRAME_MAY_FAIL, VO_SET_FLAGS_DEPTH, vo_frame_s::width, width, XINE_IMGFMT_YV12, XINE_IMGFMT_YV12_DEEP, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _open_plugin().

## ◆ _copy_image()

static vo_frame_t * _copy_image | ( | dav1d_decoder_t * | this,
|  | Dav1dPicture * | pic
| ) |  |
| static

References _copy_planes(), _merge_planes(), vo_frame_s::base, vo_frame_s::free, vo_frame_s::height, height, LOG_MODULE, NULL, vo_frame_s::pitches, VO_BOTH_FIELDS, VO_GET_FRAME_MAY_FAIL, vo_frame_s::width, width, XINE_IMGFMT_YUY2, XINE_IMGFMT_YV12, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _draw_image().

## ◆ _copy_plane()

static void _copy_plane | ( | uint8_t * | dst,
|  | const uint8_t * | src,
|  | int | dst_pitch,
|  | int | src_pitch,
|  | int | width,
|  | int | height,
|  | int | shift
| ) |  |
| static

References height, restrict, width, and xine_fast_memcpy.

Referenced by _copy_planes().

## ◆ _copy_planes()

static void _copy_planes | ( | vo_frame_t * | img,
|  | const Dav1dPicture * | pic,
|  | int | width,
|  | int | height,
|  | int | shift
| ) |  |
| static

References _copy_plane(), vo_frame_s::base, vo_frame_s::height, height, vo_frame_s::pitches, and width.

Referenced by _copy_image().

## ◆ _data_free_wrapper()

static void _data_free_wrapper | ( | const uint8_t * | data,
|  | void * | opaque
| ) |  |
| static

Referenced by _dav1d_decode_data().

## ◆ _dav1d_decode_data()

static void _dav1d_decode_data | ( | video_decoder_t * | this_gen,
|  | buf_element_t * | buf
| ) |  |
| static

References _data_free_wrapper(), _decode(), BUF_FLAG_ASPECT, BUF_FLAG_FRAME_END, BUF_FLAG_PREVIEW, BUF_FLAG_SPECIAL, BUF_FLAG_STDHEADER, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, NULL, buf_element_s::pts, buf_element_s::size, xine_container_of, and xine_fast_memcpy.

Referenced by _open_plugin().

## ◆ _dav1d_discontinuity()

static void _dav1d_discontinuity | ( | video_decoder_t * | this_gen | ) |
| static

References xine_container_of.

Referenced by _open_plugin().

## ◆ _dav1d_dispose()

static void _dav1d_dispose | ( | video_decoder_t * | this_gen | ) |
| static

References _dav1d_reset(), _x_freep(), and xine_container_of.

Referenced by _open_plugin().

## ◆ _dav1d_flush()

static void _dav1d_flush | ( | video_decoder_t * | this_gen | ) |
| static

References _draw_image(), and xine_container_of.

Referenced by _open_plugin().

## ◆ _dav1d_reset()

static void _dav1d_reset | ( | video_decoder_t * | this_gen | ) |
| static

References xine_container_of.

Referenced by _dav1d_dispose(), and _open_plugin().

## ◆ _decode()

static void _decode | ( | dav1d_decoder_t * | this,
|  | Dav1dData * | data
| ) |  |
| static

References _draw_image(), LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _dav1d_decode_data().

## ◆ _draw_image()

static void _draw_image | ( | dav1d_decoder_t * | this,
|  | Dav1dPicture * | pic
| ) |  |
| static

References _copy_image(), _x_meta_info_set_utf8(), _x_stream_info_set(), vo_frame_s::bad_frame, vo_frame_s::draw, vo_frame_s::flags, vo_frame_s::free, vo_frame_s::picture_coding_type, vo_frame_s::progressive_frame, vo_frame_s::pts, VO_SET_FLAGS_CM, XINE_META_INFO_VIDEOCODEC, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_RATIO, and XINE_STREAM_INFO_VIDEO_WIDTH.

Referenced by _dav1d_flush(), and _decode().

## ◆ _free_frame_cb()

static void _free_frame_cb | ( | Dav1dPicture * | pic,
|  | void * | cookie
| ) |  |
| static

References vo_frame_s::free.

Referenced by _open_plugin().

## ◆ _merge_planes()

static void _merge_planes | ( | uint8_t * | dst,
|  | int | dst_pitch,
|  | const Dav1dPicture * | pic,
|  | int | width,
|  | int | height,
|  | int | shift,
|  | int | subsamp
| ) |  |
| static

References height, restrict, and width.

Referenced by _copy_image().

## ◆ _open_plugin()

static video_decoder_t * _open_plugin | ( | video_decoder_class_t * | class_gen,
|  | xine_stream_t * | stream
| ) |  |
| static

References _alloc_frame_cb(), _dav1d_decode_data(), _dav1d_discontinuity(), _dav1d_dispose(), _dav1d_flush(), _dav1d_reset(), _free_frame_cb(), xine_video_port_s::get_capabilities, LOG_MODULE, MAX, NULL, xine_stream_s::video_out, VO_CAP_YV12_DEEP, xine_stream_s::xine, xine_cpu_count(), xine_log(), XINE_LOG_MSG, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by init_plugin_dav1d().

## ◆ init_plugin_dav1d()

static void * init_plugin_dav1d | ( | xine_t * | xine,
|  | const void * | data
| ) |  |
| static

References _open_plugin(), N_, NULL, and video_decoder_class_s::open_plugin.

## Variable Documentation

## ◆ dec_info_video_dav1d

const decoder_info_t dec_info_video_dav1d
| static

Initial value:
= {
.supported_types = video_types_dav1d,
.priority = 10,
}
video_types_dav1d
static const uint32_t video_types_dav1d[]
Definition: dav1d.c:587

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_VIDEO_DECODER, 19, "dav1d", XINE_VERSION_CODE, &dec_info_video_dav1d, init_plugin_dav1d },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
dec_info_video_dav1d
static const decoder_info_t dec_info_video_dav1d
Definition: dav1d.c:592
init_plugin_dav1d
static void * init_plugin_dav1d(xine_t *xine, const void *data)
Definition: dav1d.c:568
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_VIDEO_DECODER
#define PLUGIN_VIDEO_DECODER
Definition: xine_plugin.h:33

## ◆ video_types_dav1d

const uint32_t video_types_dav1d[]
| static

Initial value:
= {
BUF_VIDEO_AV1,
0
}
BUF_VIDEO_AV1
#define BUF_VIDEO_AV1
Definition: buffer.h:197