Libav
Macros | Functions | Variables
vp9.c File Reference
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "videodsp.h"
#include "vp56.h"
#include "vp9.h"
#include "vp9data.h"

Go to the source code of this file.

Macros

#define VP9_SYNCCODE   0x498342
 
#define MAX_PROB   255
 
#define assign(var, type, n)   var = (type)p; p += s->sb_cols * n * sizeof(*var)
 

Functions

static void vp9_frame_unref (AVCodecContext *avctx, VP9Frame *f)
 
static int vp9_frame_alloc (AVCodecContext *avctx, VP9Frame *f)
 
static int vp9_frame_ref (VP9Frame *dst, VP9Frame *src)
 
static void vp9_decode_flush (AVCodecContext *avctx)
 
static int update_size (AVCodecContext *avctx, int w, int h)
 
static av_always_inline int get_bits_with_sign (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 decode_frame_header (AVCodecContext *avctx, const uint8_t *data, int size, int *ref)
 
static int decode_subblock (AVCodecContext *avctx, int row, int col, VP9Filter *lflvl, ptrdiff_t yoff, ptrdiff_t uvoff, enum BlockLevel bl)
 
static int decode_superblock_mem (AVCodecContext *avctx, int row, int col, struct VP9Filter *lflvl, ptrdiff_t yoff, ptrdiff_t uvoff, enum BlockLevel bl)
 
static void loopfilter_subblock (AVCodecContext *avctx, VP9Filter *lflvl, int row, int col, ptrdiff_t yoff, ptrdiff_t uvoff)
 
static void set_tile_offset (int *start, int *end, int idx, int log2_n, int n)
 
static int update_refs (AVCodecContext *avctx)
 
static int vp9_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, const uint8_t *data, int size, int can_finish_setup)
 
static int vp9_decode_packet (AVCodecContext *avctx, void *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int vp9_decode_free (AVCodecContext *avctx)
 
static av_cold int vp9_decode_init (AVCodecContext *avctx)
 
static int vp9_decode_update_thread_context (AVCodecContext *dst, const AVCodecContext *src)
 

Variables

AVCodec ff_vp9_decoder
 

Macro Definition Documentation

◆ VP9_SYNCCODE

#define VP9_SYNCCODE   0x498342

Definition at line 34 of file vp9.c.

Referenced by decode_frame_header().

◆ MAX_PROB

#define MAX_PROB   255

Definition at line 35 of file vp9.c.

Referenced by update_prob().

◆ assign

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

Referenced by update_size().

Function Documentation

◆ vp9_frame_unref()

static void vp9_frame_unref ( AVCodecContext avctx,
VP9Frame f 
)
static

◆ vp9_frame_alloc()

static int vp9_frame_alloc ( AVCodecContext avctx,
VP9Frame f 
)
static

Definition at line 46 of file vp9.c.

Referenced by vp9_decode_frame().

◆ vp9_frame_ref()

static int vp9_frame_ref ( VP9Frame dst,
VP9Frame src 
)
static

Definition at line 73 of file vp9.c.

Referenced by vp9_decode_frame(), and vp9_decode_update_thread_context().

◆ vp9_decode_flush()

static void vp9_decode_flush ( AVCodecContext avctx)
static

Definition at line 98 of file vp9.c.

Referenced by update_size().

◆ update_size()

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

Definition at line 115 of file vp9.c.

Referenced by decode_frame_header(), and vp9_decode_update_thread_context().

◆ get_bits_with_sign()

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

Definition at line 188 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 194 of file vp9.c.

Referenced by update_prob().

◆ update_prob()

static int update_prob ( VP56RangeCoder c,
int  p 
)
static

Definition at line 204 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 264 of file vp9.c.

Referenced by vp9_decode_frame().

◆ decode_subblock()

static int decode_subblock ( AVCodecContext avctx,
int  row,
int  col,
VP9Filter lflvl,
ptrdiff_t  yoff,
ptrdiff_t  uvoff,
enum BlockLevel  bl 
)
static

Definition at line 765 of file vp9.c.

Referenced by vp9_decode_frame().

◆ decode_superblock_mem()

static int decode_superblock_mem ( AVCodecContext avctx,
int  row,
int  col,
struct VP9Filter lflvl,
ptrdiff_t  yoff,
ptrdiff_t  uvoff,
enum BlockLevel  bl 
)
static

Definition at line 869 of file vp9.c.

Referenced by vp9_decode_frame().

◆ loopfilter_subblock()

static void loopfilter_subblock ( AVCodecContext avctx,
VP9Filter lflvl,
int  row,
int  col,
ptrdiff_t  yoff,
ptrdiff_t  uvoff 
)
static

Definition at line 924 of file vp9.c.

Referenced by vp9_decode_frame().

◆ set_tile_offset()

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

Definition at line 1167 of file vp9.c.

Referenced by vp9_decode_frame().

◆ update_refs()

static int update_refs ( AVCodecContext avctx)
static

Definition at line 1175 of file vp9.c.

Referenced by vp9_decode_frame(), and vp9_decode_update_thread_context().

◆ vp9_decode_frame()

static int vp9_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int *  got_frame,
const uint8_t data,
int  size,
int  can_finish_setup 
)
static

Definition at line 1191 of file vp9.c.

Referenced by vp9_decode_packet().

◆ vp9_decode_packet()

static int vp9_decode_packet ( AVCodecContext avctx,
void frame,
int *  got_frame,
AVPacket avpkt 
)
static

Definition at line 1434 of file vp9.c.

◆ vp9_decode_free()

static av_cold int vp9_decode_free ( AVCodecContext avctx)
static

Definition at line 1487 of file vp9.c.

Referenced by vp9_decode_init().

◆ vp9_decode_init()

static av_cold int vp9_decode_init ( AVCodecContext avctx)
static

Definition at line 1510 of file vp9.c.

◆ vp9_decode_update_thread_context()

static int vp9_decode_update_thread_context ( AVCodecContext dst,
const AVCodecContext src 
)
static

Definition at line 1543 of file vp9.c.

Variable Documentation

◆ ff_vp9_decoder

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 = vp9_decode_init,
.update_thread_context = vp9_decode_update_thread_context,
}
static void vp9_decode_flush(AVCodecContext *avctx)
Definition: vp9.c:98
static int vp9_decode_packet(AVCodecContext *avctx, void *frame, int *got_frame, AVPacket *avpkt)
Definition: vp9.c:1434
static av_cold int vp9_decode_init(AVCodecContext *avctx)
Definition: vp9.c:1510
static int vp9_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
Definition: vp9.c:1543
static av_cold int vp9_decode_free(AVCodecContext *avctx)
Definition: vp9.c:1487
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:893
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: avconv.c:1288
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
Definition: alsdec.c:1797
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:582
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:838

Definition at line 1586 of file vp9.c.