FFmpeg
Loading...
Searching...
No Matches
lcevcdec.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/refstruct.h"
#include "cbs.h"
#include "cbs_lcevc.h"
#include "decode.h"
#include "lcevc_parse.h"
#include "lcevcdec.h"
#include "lcevctab.h"

Go to the source code of this file.

Functions

static LCEVC_ColorFormat map_format (int format)
 
static int alloc_base_frame (FFLCEVCContext *lcevc, const AVFrame *frame, LCEVC_PictureHandle *picture)
 
static int alloc_enhanced_frame (FFLCEVCFrame *frame_ctx, LCEVC_PictureHandle *picture)
 
static int lcevc_send_frame (FFLCEVCFrame *frame_ctx, const AVFrame *in)
 
static int generate_output (FFLCEVCFrame *frame_ctx, AVFrame *out)
 
static int lcevc_flush_pictures (FFLCEVCContext *lcevc)
 
static int lcevc_receive_frame (FFLCEVCFrame *frame_ctx, AVFrame *out)
 
static void event_callback (LCEVC_DecoderHandle dec, LCEVC_Event event, LCEVC_PictureHandle pic, const LCEVC_DecodeInformation *info, const uint8_t *data, uint32_t size, void *logctx)
 
static void lcevc_free (AVRefStructOpaque unused, void *obj)
 
static av_cold int lcevc_frame_init_cb (AVRefStructOpaque unused, void *obj)
 
static void lcevc_frame_reset_cb (AVRefStructOpaque unused, void *obj)
 
static av_cold void lcevc_frame_free_entry_cb (AVRefStructOpaque unused, void *obj)
 
static int get_log_level (int level)
 
static int lcevc_init (FFLCEVCContext *lcevc)
 
int ff_lcevc_process (void *logctx, AVFrame *frame)
 
int ff_lcevc_parse_frame (FFLCEVCContext *lcevc, const AVFrame *frame, enum AVPixelFormat *format, int *width, int *height)
 
int ff_lcevc_alloc (FFLCEVCContext **plcevc, int loglevel)
 

Variables

static const uint8_t level_map [LCEVC_LogLevelCount]
 
static const CodedBitstreamUnitType decompose_unit_types []
 
static const AVClass lcevcdec_context_class
 

Function Documentation

◆ map_format()

static LCEVC_ColorFormat map_format ( int format)
static

Definition at line 33 of file lcevcdec.c.

Referenced by alloc_base_frame(), alloc_enhanced_frame(), and lcevc_send_frame().

◆ alloc_base_frame()

static int alloc_base_frame ( FFLCEVCContext * lcevc,
const AVFrame * frame,
LCEVC_PictureHandle * picture )
static

Definition at line 77 of file lcevcdec.c.

Referenced by lcevc_send_frame().

◆ alloc_enhanced_frame()

static int alloc_enhanced_frame ( FFLCEVCFrame * frame_ctx,
LCEVC_PictureHandle * picture )
static

Definition at line 112 of file lcevcdec.c.

Referenced by lcevc_send_frame().

◆ lcevc_send_frame()

static int lcevc_send_frame ( FFLCEVCFrame * frame_ctx,
const AVFrame * in )
static

Definition at line 139 of file lcevcdec.c.

Referenced by ff_lcevc_process().

◆ generate_output()

static int generate_output ( FFLCEVCFrame * frame_ctx,
AVFrame * out )
static

Definition at line 194 of file lcevcdec.c.

Referenced by lcevc_receive_frame().

◆ lcevc_flush_pictures()

static int lcevc_flush_pictures ( FFLCEVCContext * lcevc)
static

Definition at line 243 of file lcevcdec.c.

Referenced by lcevc_free(), and lcevc_receive_frame().

◆ lcevc_receive_frame()

static int lcevc_receive_frame ( FFLCEVCFrame * frame_ctx,
AVFrame * out )
static

Definition at line 268 of file lcevcdec.c.

Referenced by ff_lcevc_process().

◆ event_callback()

static void event_callback ( LCEVC_DecoderHandle dec,
LCEVC_Event event,
LCEVC_PictureHandle pic,
const LCEVC_DecodeInformation * info,
const uint8_t * data,
uint32_t size,
void * logctx )
static

Definition at line 289 of file lcevcdec.c.

Referenced by lcevc_init().

◆ lcevc_free()

static void lcevc_free ( AVRefStructOpaque unused,
void * obj )
static

Definition at line 307 of file lcevcdec.c.

Referenced by ff_lcevc_alloc().

◆ lcevc_frame_init_cb()

static av_cold int lcevc_frame_init_cb ( AVRefStructOpaque unused,
void * obj )
static

Definition at line 323 of file lcevcdec.c.

Referenced by ff_lcevc_alloc().

◆ lcevc_frame_reset_cb()

static void lcevc_frame_reset_cb ( AVRefStructOpaque unused,
void * obj )
static

Definition at line 333 of file lcevcdec.c.

Referenced by ff_lcevc_alloc().

◆ lcevc_frame_free_entry_cb()

static av_cold void lcevc_frame_free_entry_cb ( AVRefStructOpaque unused,
void * obj )
static

Definition at line 341 of file lcevcdec.c.

Referenced by ff_lcevc_alloc().

◆ get_log_level()

static int get_log_level ( int level)
static

Definition at line 348 of file lcevcdec.c.

Referenced by libplacebo_activate().

◆ lcevc_init()

static int lcevc_init ( FFLCEVCContext * lcevc)
static

Definition at line 366 of file lcevcdec.c.

Referenced by ff_lcevc_process().

◆ ff_lcevc_process()

int ff_lcevc_process ( void * logctx,
AVFrame * frame )

Definition at line 394 of file lcevcdec.c.

Referenced by ff_attach_decode_data().

◆ ff_lcevc_parse_frame()

int ff_lcevc_parse_frame ( FFLCEVCContext * lcevc,
const AVFrame * frame,
enum AVPixelFormat * format,
int * width,
int * height )

Definition at line 423 of file lcevcdec.c.

Referenced by ff_attach_decode_data(), and ff_decode_frame_props().

◆ ff_lcevc_alloc()

int ff_lcevc_alloc ( FFLCEVCContext ** plcevc,
int loglevel )

Definition at line 475 of file lcevcdec.c.

Referenced by ff_decode_preinit().

Variable Documentation

◆ level_map

const uint8_t level_map[LCEVC_LogLevelCount]
static
Initial value:
= {
[LCEVC_LogFatal] = AV_LOG_FATAL,
[LCEVC_LogError] = AV_LOG_ERROR,
[LCEVC_LogWarning] = AV_LOG_WARNING,
[LCEVC_LogInfo] = AV_LOG_INFO,
[LCEVC_LogDebug] = AV_LOG_DEBUG,
[LCEVC_LogTrace] = AV_LOG_TRACE,
}
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
Definition log.h:236
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition log.h:231
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition log.h:216
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
Definition log.h:204
#define AV_LOG_INFO
Standard information.
Definition log.h:221
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition log.h:210

Definition at line 280 of file lcevcdec.c.

Referenced by event_callback(), guess_palette(), X264_log(), and XAVS_log().

◆ decompose_unit_types

const CodedBitstreamUnitType decompose_unit_types[]
static
Initial value:
= {
}
@ LCEVC_NON_IDR_NUT
Definition lcevc.h:60
@ LCEVC_IDR_NUT
Definition lcevc.h:61

Definition at line 462 of file lcevcdec.c.

◆ lcevcdec_context_class

const AVClass lcevcdec_context_class
static
Initial value:
= {
.class_name = "liblcevc_dec",
.item_name = av_default_item_name,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
@ AV_CLASS_CATEGORY_DECODER
Definition log.h:35

Definition at line 468 of file lcevcdec.c.

Referenced by ff_lcevc_alloc().