FFmpeg
Loading...
Searching...
No Matches
vp9.c File Reference
#include "config_components.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "hwaccel_internal.h"
#include "hwconfig.h"
#include "profiles.h"
#include "progressframe.h"
#include "libavutil/refstruct.h"
#include "thread.h"
#include "pthread_internal.h"
#include "videodsp.h"
#include "vp89_rac.h"
#include "vp9.h"
#include "vp9data.h"
#include "vp9dec.h"
#include "vpx_rac.h"
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "libavutil/video_enc_params.h"

Go to the source code of this file.

Macros

#define VP9_SYNCCODE   0x498342
 
#define HWACCEL_MAX
 
#define assign(var, type, n)
 

Functions

static int vp9_alloc_entries (AVCodecContext *avctx, int n)
 
static void vp9_tile_data_free (VP9TileData *td)
 
static void vp9_frame_unref (VP9Frame *f)
 
static int vp9_frame_alloc (AVCodecContext *avctx, VP9Frame *f)
 
static void vp9_frame_replace (VP9Frame *dst, const VP9Frame *src)
 
static int update_size (AVCodecContext *avctx, int w, int h)
 
static int update_block_buffers (AVCodecContext *avctx)
 
static av_always_inline int get_sbits_inv (GetBitContext *gb, int n)
 
static av_always_inline int inv_recenter_nonneg (int v, int m)
 
static int update_prob (VPXRangeCoder *c, int p)
 
static int read_colorspace_details (AVCodecContext *avctx)
 
static int decode_frame_header (AVCodecContext *avctx, const uint8_t *data, int size, int *ref)
 
static void decode_sb (VP9TileData *td, int row, int col, VP9Filter *lflvl, ptrdiff_t yoff, ptrdiff_t uvoff, enum BlockLevel bl)
 
static void decode_sb_mem (VP9TileData *td, int row, int col, VP9Filter *lflvl, ptrdiff_t yoff, ptrdiff_t uvoff, enum BlockLevel bl)
 
static void set_tile_offset (int *start, int *end, int idx, int log2_n, int n)
 
static void free_buffers (VP9Context *s)
 
static av_cold int vp9_decode_free (AVCodecContext *avctx)
 
static int decode_tiles (AVCodecContext *avctx, const uint8_t *data, int size)
 
static int vp9_export_enc_params (VP9Context *s, VP9Frame *frame)
 
static void vp9_warn_unsupported_webm_alpha (AVCodecContext *avctx, const AVPacket *pkt)
 
static int vp9_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
 
static av_cold void vp9_decode_flush (AVCodecContext *avctx)
 
static av_cold int vp9_decode_init (AVCodecContext *avctx)
 

Variables

const FFCodec ff_vp9_decoder
 

Macro Definition Documentation

◆ VP9_SYNCCODE

#define VP9_SYNCCODE   0x498342

Definition at line 51 of file vp9.c.

Referenced by decode_frame_header(), and parse_bitstream().

◆ HWACCEL_MAX

#define HWACCEL_MAX
Value:
(CONFIG_VP9_DXVA2_HWACCEL + \
CONFIG_VP9_D3D11VA_HWACCEL * 2 + \
CONFIG_VP9_D3D12VA_HWACCEL + \
CONFIG_VP9_NVDEC_HWACCEL + \
CONFIG_VP9_NVDEC_CUARRAY_HWACCEL + \
CONFIG_VP9_VAAPI_HWACCEL + \
CONFIG_VP9_VDPAU_HWACCEL + \
CONFIG_VP9_VIDEOTOOLBOX_HWACCEL + \
CONFIG_VP9_VULKAN_HWACCEL)

◆ assign

#define assign ( var,
type,
n )
Value:
var = (type) p; p += s->sb_cols * (n) * sizeof(*var)
#define s(width, name)
Definition cbs_vp9.c:198
cl_device_type type

Referenced by update_size().

Function Documentation

◆ vp9_alloc_entries()

static int vp9_alloc_entries ( AVCodecContext * avctx,
int n )
static

Definition at line 89 of file vp9.c.

Referenced by decode_frame_header().

◆ vp9_tile_data_free()

static void vp9_tile_data_free ( VP9TileData * td)
static

Definition at line 92 of file vp9.c.

Referenced by decode_frame_header(), free_buffers(), update_block_buffers(), and update_size().

◆ vp9_frame_unref()

static void vp9_frame_unref ( VP9Frame * f)
static

Definition at line 99 of file vp9.c.

Referenced by vp9_decode_flush(), vp9_decode_frame(), vp9_decode_free(), and vp9_frame_alloc().

◆ vp9_frame_alloc()

static int vp9_frame_alloc ( AVCodecContext * avctx,
VP9Frame * f )
static

Definition at line 108 of file vp9.c.

Referenced by vp9_decode_frame().

◆ vp9_frame_replace()

static void vp9_frame_replace ( VP9Frame * dst,
const VP9Frame * src )
static

Definition at line 149 of file vp9.c.

Referenced by vp9_decode_frame().

◆ update_size()

static int update_size ( AVCodecContext * avctx,
int w,
int h )
static

Definition at line 166 of file vp9.c.

Referenced by decode_frame_header().

◆ update_block_buffers()

static int update_block_buffers ( AVCodecContext * avctx)
static

Definition at line 332 of file vp9.c.

Referenced by vp9_decode_frame().

◆ get_sbits_inv()

static av_always_inline int get_sbits_inv ( GetBitContext * gb,
int n )
static

Definition at line 393 of file vp9.c.

Referenced by decode_frame_header().

◆ inv_recenter_nonneg()

static av_always_inline int inv_recenter_nonneg ( int v,
int m )
static

Definition at line 399 of file vp9.c.

Referenced by update_prob().

◆ update_prob()

static int update_prob ( VPXRangeCoder * c,
int p )
static

Definition at line 409 of file vp9.c.

Referenced by decode_frame_header().

◆ read_colorspace_details()

static int read_colorspace_details ( AVCodecContext * avctx)
static

Definition at line 467 of file vp9.c.

Referenced by decode_frame_header().

◆ decode_frame_header()

static int decode_frame_header ( AVCodecContext * avctx,
const uint8_t * data,
int size,
int * ref )
static

Definition at line 529 of file vp9.c.

Referenced by vp9_decode_frame().

◆ decode_sb()

static void decode_sb ( VP9TileData * td,
int row,
int col,
VP9Filter * lflvl,
ptrdiff_t yoff,
ptrdiff_t uvoff,
enum BlockLevel bl )
static

Definition at line 1120 of file vp9.c.

Referenced by decode_sb(), and decode_tiles().

◆ decode_sb_mem()

static void decode_sb_mem ( VP9TileData * td,
int row,
int col,
VP9Filter * lflvl,
ptrdiff_t yoff,
ptrdiff_t uvoff,
enum BlockLevel bl )
static

Definition at line 1200 of file vp9.c.

Referenced by decode_sb_mem(), and decode_tiles().

◆ set_tile_offset()

static void set_tile_offset ( int * start,
int * end,
int idx,
int log2_n,
int n )
static

Definition at line 1249 of file vp9.c.

Referenced by decode_tiles().

◆ free_buffers()

static void free_buffers ( VP9Context * s)
static

Definition at line 1257 of file vp9.c.

Referenced by vp9_decode_free().

◆ vp9_decode_free()

static av_cold int vp9_decode_free ( AVCodecContext * avctx)
static

Definition at line 1266 of file vp9.c.

◆ decode_tiles()

static int decode_tiles ( AVCodecContext * avctx,
const uint8_t * data,
int size )
static

Definition at line 1294 of file vp9.c.

Referenced by vp9_decode_frame().

◆ vp9_export_enc_params()

static int vp9_export_enc_params ( VP9Context * s,
VP9Frame * frame )
static

Definition at line 1533 of file vp9.c.

Referenced by vp9_decode_frame().

◆ vp9_warn_unsupported_webm_alpha()

static void vp9_warn_unsupported_webm_alpha ( AVCodecContext * avctx,
const AVPacket * pkt )
static

Definition at line 1585 of file vp9.c.

Referenced by vp9_decode_frame().

◆ vp9_decode_frame()

static int vp9_decode_frame ( AVCodecContext * avctx,
AVFrame * frame,
int * got_frame,
AVPacket * pkt )
static

Definition at line 1603 of file vp9.c.

◆ vp9_decode_flush()

static av_cold void vp9_decode_flush ( AVCodecContext * avctx)
static

Definition at line 1859 of file vp9.c.

◆ vp9_decode_init()

static av_cold int vp9_decode_init ( AVCodecContext * avctx)
static

Definition at line 1879 of file vp9.c.

Variable Documentation

◆ ff_vp9_decoder

const FFCodec ff_vp9_decoder

Definition at line 1946 of file vp9.c.