FFmpeg
Macros | Functions | Variables
av1dec.c File Reference
#include "libavutil/film_grain_params.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "av1dec.h"
#include "bytestream.h"
#include "hwconfig.h"
#include "internal.h"
#include "profiles.h"

Go to the source code of this file.

Macros

#define HWACCEL_MAX
 
#define OFFSET(x)   offsetof(AV1DecContext, x)
 
#define VD   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
 

Functions

static uint32_t inverse_recenter (int r, uint32_t v)
 
static uint32_t decode_unsigned_subexp_with_ref (uint32_t sub_exp, int mx, int r)
 
static int32_t decode_signed_subexp_with_ref (uint32_t sub_exp, int low, int high, int r)
 
static void read_global_param (AV1DecContext *s, int type, int ref, int idx)
 
static void global_motion_params (AV1DecContext *s)
 update gm type/params, since cbs already implemented part of this funcation, so we don't need to full implement spec. More...
 
static int get_relative_dist (const AV1RawSequenceHeader *seq, unsigned int a, unsigned int b)
 
static void skip_mode_params (AV1DecContext *s)
 
static void coded_lossless_param (AV1DecContext *s)
 
static void load_grain_params (AV1DecContext *s)
 
static int init_tile_data (AV1DecContext *s)
 
static int get_tiles_info (AVCodecContext *avctx, const AV1RawTileGroup *tile_group)
 
static int get_pixel_format (AVCodecContext *avctx)
 
static void av1_frame_unref (AVCodecContext *avctx, AV1Frame *f)
 
static int av1_frame_ref (AVCodecContext *avctx, AV1Frame *dst, const AV1Frame *src)
 
static av_cold int av1_decode_free (AVCodecContext *avctx)
 
static int set_context_with_sequence (AVCodecContext *avctx, const AV1RawSequenceHeader *seq)
 
static int update_context_with_frame_header (AVCodecContext *avctx, const AV1RawFrameHeader *header)
 
static av_cold int av1_decode_init (AVCodecContext *avctx)
 
static int av1_frame_alloc (AVCodecContext *avctx, AV1Frame *f)
 
static int export_film_grain (AVCodecContext *avctx, AVFrame *frame)
 
static int set_output_frame (AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt, int *got_frame)
 
static int update_reference_list (AVCodecContext *avctx)
 
static int get_current_frame (AVCodecContext *avctx)
 
static int av1_decode_frame (AVCodecContext *avctx, void *frame, int *got_frame, AVPacket *pkt)
 
static void av1_decode_flush (AVCodecContext *avctx)
 

Variables

static const AVOption av1_options []
 
static const AVClass av1_class
 
AVCodec ff_av1_decoder
 

Macro Definition Documentation

#define HWACCEL_MAX
Value:
(CONFIG_AV1_DXVA2_HWACCEL + \
CONFIG_AV1_D3D11VA_HWACCEL * 2 + \
CONFIG_AV1_NVDEC_HWACCEL + \
CONFIG_AV1_VAAPI_HWACCEL)

Referenced by get_pixel_format().

#define OFFSET (   x)    offsetof(AV1DecContext, x)

Definition at line 1109 of file av1dec.c.

Definition at line 1110 of file av1dec.c.

Referenced by decode_flush().

Function Documentation

static uint32_t inverse_recenter ( int  r,
uint32_t  v 
)
static

Definition at line 31 of file av1dec.c.

Referenced by decode_unsigned_subexp_with_ref().

static uint32_t decode_unsigned_subexp_with_ref ( uint32_t  sub_exp,
int  mx,
int  r 
)
static

Definition at line 41 of file av1dec.c.

Referenced by decode_signed_subexp_with_ref().

static int32_t decode_signed_subexp_with_ref ( uint32_t  sub_exp,
int  low,
int  high,
int  r 
)
static

Definition at line 51 of file av1dec.c.

Referenced by read_global_param().

static void read_global_param ( AV1DecContext s,
int  type,
int  ref,
int  idx 
)
static

Definition at line 58 of file av1dec.c.

Referenced by global_motion_params().

static void global_motion_params ( AV1DecContext s)
static

update gm type/params, since cbs already implemented part of this funcation, so we don't need to full implement spec.

Definition at line 104 of file av1dec.c.

Referenced by get_current_frame().

static int get_relative_dist ( const AV1RawSequenceHeader seq,
unsigned int  a,
unsigned int  b 
)
static

Definition at line 150 of file av1dec.c.

Referenced by skip_mode_params().

static void skip_mode_params ( AV1DecContext s)
static

Definition at line 158 of file av1dec.c.

Referenced by get_current_frame().

static void coded_lossless_param ( AV1DecContext s)
static

Definition at line 222 of file av1dec.c.

Referenced by get_current_frame().

static void load_grain_params ( AV1DecContext s)
static

Definition at line 252 of file av1dec.c.

Referenced by get_current_frame().

static int init_tile_data ( AV1DecContext s)
static

Definition at line 272 of file av1dec.c.

Referenced by get_current_frame().

static int get_tiles_info ( AVCodecContext avctx,
const AV1RawTileGroup tile_group 
)
static

Definition at line 290 of file av1dec.c.

Referenced by av1_decode_frame().

static int get_pixel_format ( AVCodecContext avctx)
static

check if the HW accel is inited correctly. If not, return un-implemented. Since now the av1 decoder doesn't support native decode, if it will be implemented in the future, need remove this check.

Definition at line 335 of file av1dec.c.

Referenced by av1_decode_frame().

static void av1_frame_unref ( AVCodecContext avctx,
AV1Frame f 
)
static
static int av1_frame_ref ( AVCodecContext avctx,
AV1Frame dst,
const AV1Frame src 
)
static

Definition at line 489 of file av1dec.c.

Referenced by av1_decode_frame(), and update_reference_list().

static av_cold int av1_decode_free ( AVCodecContext avctx)
static

Definition at line 533 of file av1dec.c.

static int set_context_with_sequence ( AVCodecContext avctx,
const AV1RawSequenceHeader seq 
)
static

Definition at line 554 of file av1dec.c.

Referenced by av1_decode_frame(), and av1_decode_init().

static int update_context_with_frame_header ( AVCodecContext avctx,
const AV1RawFrameHeader header 
)
static

Definition at line 598 of file av1dec.c.

Referenced by av1_frame_alloc().

static av_cold int av1_decode_init ( AVCodecContext avctx)
static

Definition at line 628 of file av1dec.c.

static int av1_frame_alloc ( AVCodecContext avctx,
AV1Frame f 
)
static

Definition at line 687 of file av1dec.c.

Referenced by get_current_frame().

static int export_film_grain ( AVCodecContext avctx,
AVFrame frame 
)
static

Definition at line 744 of file av1dec.c.

Referenced by set_output_frame().

static int set_output_frame ( AVCodecContext avctx,
AVFrame frame,
const AVPacket pkt,
int got_frame 
)
static

Definition at line 804 of file av1dec.c.

Referenced by av1_decode_frame().

static int update_reference_list ( AVCodecContext avctx)
static

Definition at line 837 of file av1dec.c.

Referenced by av1_decode_frame().

static int get_current_frame ( AVCodecContext avctx)
static

Definition at line 857 of file av1dec.c.

Referenced by av1_decode_frame().

static int av1_decode_frame ( AVCodecContext avctx,
void frame,
int got_frame,
AVPacket pkt 
)
static

Definition at line 886 of file av1dec.c.

static void av1_decode_flush ( AVCodecContext avctx)
static

Definition at line 1094 of file av1dec.c.

Variable Documentation

const AVOption av1_options[]
static
Initial value:
= {
{ "operating_point", "Select an operating point of the scalable bitstream",
OFFSET(operating_point), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, AV1_MAX_OPERATING_POINTS - 1, VD },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define VD
Definition: av1dec.c:1110
#define OFFSET(x)
Definition: av1dec.c:1109

Definition at line 1111 of file av1dec.c.

const AVClass av1_class
static
Initial value:
= {
.class_name = "AV1 decoder",
.item_name = av_default_item_name,
.option = av1_options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
static const AVOption av1_options[]
Definition: av1dec.c:1111

Definition at line 1117 of file av1dec.c.

AVCodec ff_av1_decoder

Definition at line 1124 of file av1dec.c.