FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
vp6.c File Reference

VP6 compatible video decoder. More...

#include <stdlib.h>
#include "avcodec.h"
#include "get_bits.h"
#include "huffman.h"
#include "internal.h"
#include "vp56.h"
#include "vp56data.h"
#include "vp6data.h"

Go to the source code of this file.

Macros

#define VP6_MAX_HUFF_SIZE   12
 

Functions

static void vp6_parse_coeff (VP56Context *s)
 
static void vp6_parse_coeff_huffman (VP56Context *s)
 
static int vp6_parse_header (VP56Context *s, const uint8_t *buf, int buf_size)
 
static void vp6_coeff_order_table_init (VP56Context *s)
 
static void vp6_default_models_init (VP56Context *s)
 
static void vp6_parse_vector_models (VP56Context *s)
 
static int vp6_huff_cmp (const void *va, const void *vb)
 
static int vp6_build_huff_tree (VP56Context *s, uint8_t coeff_model[], const uint8_t *map, unsigned size, VLC *vlc)
 
static int vp6_parse_coeff_models (VP56Context *s)
 
static void vp6_parse_vector_adjustment (VP56Context *s, VP56mv *vect)
 
static unsigned vp6_get_nb_null (VP56Context *s)
 Read number of consecutive blocks with null DC or AC. More...
 
static int vp6_block_variance (uint8_t *src, int stride)
 
static void vp6_filter_hv4 (uint8_t *dst, uint8_t *src, int stride, int delta, const int16_t *weights)
 
static void vp6_filter_diag2 (VP56Context *s, uint8_t *dst, uint8_t *src, int stride, int h_weight, int v_weight)
 
static void vp6_filter (VP56Context *s, uint8_t *dst, uint8_t *src, int offset1, int offset2, int stride, VP56mv mv, int mask, int select, int luma)
 
static av_cold void vp6_decode_init_context (VP56Context *s)
 
static av_cold int vp6_decode_init (AVCodecContext *avctx)
 
static av_cold void vp6_decode_free_context (VP56Context *s)
 
static av_cold int vp6_decode_free (AVCodecContext *avctx)
 

Variables

AVCodec ff_vp6_decoder
 
AVCodec ff_vp6f_decoder
 
AVCodec ff_vp6a_decoder
 

Detailed Description

VP6 compatible video decoder.

The VP6F decoder accepts an optional 1 byte extradata. It is composed of:

Definition in file vp6.c.

Macro Definition Documentation

#define VP6_MAX_HUFF_SIZE   12

Definition at line 41 of file vp6.c.

Referenced by vp6_build_huff_tree().

Function Documentation

static void vp6_parse_coeff ( VP56Context *  s)
static

Definition at line 442 of file vp6.c.

Referenced by vp6_parse_header().

static void vp6_parse_coeff_huffman ( VP56Context *  s)
static

Definition at line 383 of file vp6.c.

Referenced by vp6_parse_header().

static int vp6_parse_header ( VP56Context *  s,
const uint8_t buf,
int  buf_size 
)
static

Definition at line 46 of file vp6.c.

Referenced by vp6_decode_init_context().

static void vp6_coeff_order_table_init ( VP56Context *  s)
static

Definition at line 178 of file vp6.c.

Referenced by vp6_default_models_init(), and vp6_parse_coeff_models().

static void vp6_default_models_init ( VP56Context *  s)
static

Definition at line 189 of file vp6.c.

Referenced by vp6_decode_init_context().

static void vp6_parse_vector_models ( VP56Context *  s)
static

Definition at line 207 of file vp6.c.

Referenced by vp6_decode_init_context().

static int vp6_huff_cmp ( const void va,
const void vb 
)
static

Definition at line 232 of file vp6.c.

Referenced by vp6_build_huff_tree().

static int vp6_build_huff_tree ( VP56Context *  s,
uint8_t  coeff_model[],
const uint8_t map,
unsigned  size,
VLC vlc 
)
static

Definition at line 238 of file vp6.c.

Referenced by vp6_parse_coeff_models().

static int vp6_parse_coeff_models ( VP56Context *  s)
static

Definition at line 260 of file vp6.c.

Referenced by vp6_decode_init_context().

static void vp6_parse_vector_adjustment ( VP56Context *  s,
VP56mv vect 
)
static

Definition at line 329 of file vp6.c.

Referenced by vp6_decode_init_context().

static unsigned vp6_get_nb_null ( VP56Context *  s)
static

Read number of consecutive blocks with null DC or AC.

This value is < 74.

Definition at line 371 of file vp6.c.

Referenced by vp6_parse_coeff_huffman().

static int vp6_block_variance ( uint8_t src,
int  stride 
)
static

Definition at line 517 of file vp6.c.

Referenced by vp6_filter().

static void vp6_filter_hv4 ( uint8_t dst,
uint8_t src,
int  stride,
int  delta,
const int16_t *  weights 
)
static

Definition at line 532 of file vp6.c.

Referenced by vp6_filter().

static void vp6_filter_diag2 ( VP56Context *  s,
uint8_t dst,
uint8_t src,
int  stride,
int  h_weight,
int  v_weight 
)
static

Definition at line 549 of file vp6.c.

Referenced by vp6_filter().

static void vp6_filter ( VP56Context *  s,
uint8_t dst,
uint8_t src,
int  offset1,
int  offset2,
int  stride,
VP56mv  mv,
int  mask,
int  select,
int  luma 
)
static

Definition at line 557 of file vp6.c.

Referenced by vp6_decode_init_context().

static av_cold void vp6_decode_init_context ( VP56Context *  s)
static

Definition at line 630 of file vp6.c.

Referenced by vp6_decode_init().

static av_cold int vp6_decode_init ( AVCodecContext avctx)
static

Definition at line 609 of file vp6.c.

static av_cold void vp6_decode_free_context ( VP56Context *  s)
static

Definition at line 660 of file vp6.c.

Referenced by vp6_decode_free().

static av_cold int vp6_decode_free ( AVCodecContext avctx)
static

Definition at line 644 of file vp6.c.

Variable Documentation

AVCodec ff_vp6_decoder
Initial value:
= {
.name = "vp6",
.long_name = NULL_IF_CONFIG_SMALL("On2 VP6"),
.priv_data_size = sizeof(VP56Context),
.close = vp6_decode_free,
.capabilities = AV_CODEC_CAP_DR1,
}
static av_cold int vp6_decode_init(AVCodecContext *avctx)
Definition: vp6.c:609
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: vp56.c:499
static av_cold int vp6_decode_free(AVCodecContext *avctx)
Definition: vp6.c:644
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: ffmpeg.c:2035
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 673 of file vp6.c.

AVCodec ff_vp6f_decoder
Initial value:
= {
.name = "vp6f",
.long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version)"),
.priv_data_size = sizeof(VP56Context),
.close = vp6_decode_free,
.capabilities = AV_CODEC_CAP_DR1,
}
static av_cold int vp6_decode_init(AVCodecContext *avctx)
Definition: vp6.c:609
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: vp56.c:499
static av_cold int vp6_decode_free(AVCodecContext *avctx)
Definition: vp6.c:644
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: ffmpeg.c:2035
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 686 of file vp6.c.

AVCodec ff_vp6a_decoder
Initial value:
= {
.name = "vp6a",
.long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version, with alpha channel)"),
.priv_data_size = sizeof(VP56Context),
.close = vp6_decode_free,
}
static av_cold int vp6_decode_init(AVCodecContext *avctx)
Definition: vp6.c:609
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: vp56.c:499
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: avcodec.h:1026
static av_cold int vp6_decode_free(AVCodecContext *avctx)
Definition: vp6.c:644
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: ffmpeg.c:2035
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 699 of file vp6.c.