FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
vp9.c File Reference
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "profiles.h"
#include "thread.h"
#include "videodsp.h"
#include "vp56.h"
#include "vp9.h"
#include "vp9data.h"
#include "vp9dec.h"
#include "libavutil/avassert.h"
#include "libavutil/pixdesc.h"

Go to the source code of this file.

Macros

#define VP9_SYNCCODE   0x498342
 
#define HWACCEL_MAX   (CONFIG_VP9_DXVA2_HWACCEL + CONFIG_VP9_D3D11VA_HWACCEL * 2 + CONFIG_VP9_VAAPI_HWACCEL)
 
#define assign(var, type, n)   var = (type) p; p += s->sb_cols * (n) * sizeof(*var)
 

Functions

static void vp9_free_entries (AVCodecContext *avctx)
 
static int vp9_alloc_entries (AVCodecContext *avctx, int n)
 
static void vp9_frame_unref (AVCodecContext *avctx, VP9Frame *f)
 
static int vp9_frame_alloc (AVCodecContext *avctx, VP9Frame *f)
 
static int vp9_frame_ref (AVCodecContext *avctx, VP9Frame *dst, 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 (VP56RangeCoder *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_decode_frame (AVCodecContext *avctx, void *frame, int *got_frame, AVPacket *pkt)
 
static void vp9_decode_flush (AVCodecContext *avctx)
 
static int init_frames (AVCodecContext *avctx)
 
static av_cold int vp9_decode_init (AVCodecContext *avctx)
 

Variables

AVCodec ff_vp9_decoder
 

Macro Definition Documentation

#define VP9_SYNCCODE   0x498342

Definition at line 37 of file vp9.c.

Referenced by decode_frame_header().

#define HWACCEL_MAX   (CONFIG_VP9_DXVA2_HWACCEL + CONFIG_VP9_D3D11VA_HWACCEL * 2 + CONFIG_VP9_VAAPI_HWACCEL)

Referenced by update_size().

#define assign (   var,
  type,
  n 
)    var = (type) p; p += s->sb_cols * (n) * sizeof(*var)

Referenced by update_size().

Function Documentation

static void vp9_free_entries ( AVCodecContext avctx)
static

Definition at line 91 of file vp9.c.

Referenced by decode_frame_header(), and vp9_decode_free().

static int vp9_alloc_entries ( AVCodecContext avctx,
int  n 
)
static

Definition at line 92 of file vp9.c.

Referenced by decode_frame_header().

static void vp9_frame_unref ( AVCodecContext avctx,
VP9Frame f 
)
static
static int vp9_frame_alloc ( AVCodecContext avctx,
VP9Frame f 
)
static

Definition at line 104 of file vp9.c.

Referenced by vp9_decode_frame().

static int vp9_frame_ref ( AVCodecContext avctx,
VP9Frame dst,
VP9Frame src 
)
static

Definition at line 140 of file vp9.c.

Referenced by vp9_decode_frame().

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

Definition at line 170 of file vp9.c.

Referenced by decode_frame_header().

static int update_block_buffers ( AVCodecContext avctx)
static

Definition at line 275 of file vp9.c.

Referenced by vp9_decode_frame().

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

Definition at line 328 of file vp9.c.

Referenced by decode_frame_header().

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

Definition at line 334 of file vp9.c.

Referenced by update_prob().

static int update_prob ( VP56RangeCoder c,
int  p 
)
static

Definition at line 344 of file vp9.c.

Referenced by decode_frame_header().

static int read_colorspace_details ( AVCodecContext avctx)
static

Definition at line 402 of file vp9.c.

Referenced by decode_frame_header().

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

Definition at line 464 of file vp9.c.

Referenced by vp9_decode_frame().

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 1042 of file vp9.c.

Referenced by decode_tiles().

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 1121 of file vp9.c.

Referenced by decode_tiles().

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

Definition at line 1170 of file vp9.c.

Referenced by decode_tiles().

static void free_buffers ( VP9Context s)
static

Definition at line 1178 of file vp9.c.

Referenced by vp9_decode_free().

static av_cold int vp9_decode_free ( AVCodecContext avctx)
static

Definition at line 1189 of file vp9.c.

Referenced by init_frames().

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

Definition at line 1214 of file vp9.c.

Referenced by vp9_decode_frame().

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

Definition at line 1454 of file vp9.c.

static void vp9_decode_flush ( AVCodecContext avctx)
static

Definition at line 1673 of file vp9.c.

static int init_frames ( AVCodecContext avctx)
static

Definition at line 1684 of file vp9.c.

Referenced by vp9_decode_init().

static av_cold int vp9_decode_init ( AVCodecContext avctx)
static

Definition at line 1710 of file vp9.c.

Variable Documentation

AVCodec ff_vp9_decoder
Initial value:
= {
.name = "vp9",
.long_name = NULL_IF_CONFIG_SMALL("Google VP9"),
.priv_data_size = sizeof(VP9Context),
.close = vp9_decode_free,
.init_thread_copy = ONLY_IF_THREADS_ENABLED(vp9_decode_init_thread_copy),
.update_thread_context = ONLY_IF_THREADS_ENABLED(vp9_decode_update_thread_context),
}
static void vp9_decode_flush(AVCodecContext *avctx)
Definition: vp9.c:1673
static void flush(AVCodecContext *avctx)
static int init_thread_copy(AVCodecContext *avctx)
Definition: tta.c:392
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int vp9_decode_init(AVCodecContext *avctx)
Definition: vp9.c:1710
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
static av_cold int vp9_decode_free(AVCodecContext *avctx)
Definition: vp9.c:1189
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:1065
#define ONLY_IF_THREADS_ENABLED(x)
Define a function with only the non-default version specified.
Definition: internal.h:218
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: avcodec.h:1069
#define FF_CODEC_CAP_SLICE_THREAD_HAS_MF
Codec initializes slice-based threading with a main function.
Definition: internal.h:70
static int vp9_decode_frame(AVCodecContext *avctx, void *frame, int *got_frame, AVPacket *pkt)
Definition: vp9.c:1454
const AVProfile ff_vp9_profiles[]
Definition: profiles.c:135
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:1002

Definition at line 1773 of file vp9.c.