On2 VP3 Video Decoder. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "avcodec.h"
#include "dsputil.h"
#include "bitstream.h"
#include "vp3data.h"
#include "xiph.h"
Go to the source code of this file.
Data Structures | |
struct | Coeff |
struct | Vp3Fragment |
struct | Vp3DecodeContext |
Defines | |
#define | FRAGMENT_PIXELS 8 |
#define | SB_NOT_CODED 0 |
#define | SB_PARTIALLY_CODED 1 |
#define | SB_FULLY_CODED 2 |
#define | MODE_INTER_NO_MV 0 |
#define | MODE_INTRA 1 |
#define | MODE_INTER_PLUS_MV 2 |
#define | MODE_INTER_LAST_MV 3 |
#define | MODE_INTER_PRIOR_LAST 4 |
#define | MODE_USING_GOLDEN 5 |
#define | MODE_GOLDEN_MV 6 |
#define | MODE_INTER_FOURMV 7 |
#define | CODING_MODE_COUNT 8 |
#define | MODE_COPY 8 |
#define | MIN_DEQUANT_VAL 2 |
#define | COMPATIBLE_FRAME(x) (compatible_frame[s->all_fragments[x].coding_method] == current_frame_type) |
#define | FRAME_CODED(x) (s->all_fragments[x].coding_method != MODE_COPY) |
#define | DC_COEFF(u) (s->coeffs[u].index ? 0 : s->coeffs[u].coeff) |
#define | PUL 8 |
#define | PU 4 |
#define | PUR 2 |
#define | PL 1 |
#define | Y_INITIAL(chroma_shift) s->flipped_image ? 1 : s->fragment_height >> chroma_shift |
#define | Y_FINISHED(chroma_shift) s->flipped_image ? y <= s->fragment_height >> chroma_shift : y > 0 |
Typedefs | |
typedef struct Coeff | Coeff |
typedef struct Vp3Fragment | Vp3Fragment |
typedef struct Vp3DecodeContext | Vp3DecodeContext |
Functions | |
static av_cold int | vp3_decode_end (AVCodecContext *avctx) |
static int | init_block_mapping (Vp3DecodeContext *s) |
static void | init_frame (Vp3DecodeContext *s, GetBitContext *gb) |
static void | init_dequantizer (Vp3DecodeContext *s) |
static void | init_loop_filter (Vp3DecodeContext *s) |
static int | unpack_superblocks (Vp3DecodeContext *s, GetBitContext *gb) |
static int | unpack_modes (Vp3DecodeContext *s, GetBitContext *gb) |
static int | unpack_vectors (Vp3DecodeContext *s, GetBitContext *gb) |
static int | unpack_vlcs (Vp3DecodeContext *s, GetBitContext *gb, VLC *table, int coeff_index, int first_fragment, int last_fragment, int eob_run) |
static int | unpack_dct_coeffs (Vp3DecodeContext *s, GetBitContext *gb) |
static void | reverse_dc_prediction (Vp3DecodeContext *s, int first_fragment, int fragment_width, int fragment_height) |
static void | render_slice (Vp3DecodeContext *s, int slice) |
static void | apply_loop_filter (Vp3DecodeContext *s) |
static void | vp3_calculate_pixel_addresses (Vp3DecodeContext *s) |
static av_cold int | vp3_decode_init (AVCodecContext *avctx) |
static int | vp3_decode_frame (AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) |
static int | read_huffman_tree (AVCodecContext *avctx, GetBitContext *gb) |
Variables | |
static const int | ModeAlphabet [6][CODING_MODE_COUNT] |
AVCodec | vp3_decoder |
On2 VP3 Video Decoder.
VP3 Video Decoder by Mike Melanson (mike at multimedia.cx) For more information about the VP3 coding process, visit: http://wiki.multimedia.cx/index.php?title=On2_VP3
Theora decoder by Alex Beregszaszi
Definition in file vp3.c.
#define COMPATIBLE_FRAME | ( | x | ) | (compatible_frame[s->all_fragments[x].coding_method] == current_frame_type) |
Definition at line 1145 of file vp3.c.
Referenced by reverse_dc_prediction().
#define DC_COEFF | ( | u | ) | (s->coeffs[u].index ? 0 : s->coeffs[u].coeff) |
Definition at line 1148 of file vp3.c.
Referenced by reverse_dc_prediction().
#define FRAGMENT_PIXELS 8 |
Definition at line 44 of file vp3.c.
Referenced by render_slice(), and vp3_calculate_pixel_addresses().
#define FRAME_CODED | ( | x | ) | (s->all_fragments[x].coding_method != MODE_COPY) |
Definition at line 1147 of file vp3.c.
Referenced by reverse_dc_prediction().
#define MODE_COPY 8 |
Definition at line 82 of file vp3.c.
Referenced by apply_loop_filter(), render_slice(), reverse_dc_prediction(), unpack_modes(), unpack_superblocks(), and unpack_vectors().
#define MODE_GOLDEN_MV 6 |
Definition at line 77 of file vp3.c.
Referenced by render_slice(), and unpack_vectors().
#define MODE_INTER_FOURMV 7 |
Definition at line 78 of file vp3.c.
Referenced by unpack_vectors().
#define MODE_INTER_LAST_MV 3 |
Definition at line 74 of file vp3.c.
Referenced by unpack_vectors().
#define MODE_INTER_NO_MV 0 |
Definition at line 71 of file vp3.c.
Referenced by unpack_modes().
#define MODE_INTER_PLUS_MV 2 |
Definition at line 73 of file vp3.c.
Referenced by unpack_vectors().
#define MODE_INTER_PRIOR_LAST 4 |
Definition at line 75 of file vp3.c.
Referenced by unpack_vectors().
#define MODE_INTRA 1 |
Definition at line 72 of file vp3.c.
Referenced by render_slice(), and unpack_modes().
#define MODE_USING_GOLDEN 5 |
Definition at line 76 of file vp3.c.
Referenced by render_slice().
#define PL 1 |
#define PU 4 |
#define PUL 8 |
#define PUR 2 |
#define SB_FULLY_CODED 2 |
Definition at line 69 of file vp3.c.
Referenced by unpack_superblocks().
#define SB_NOT_CODED 0 |
Definition at line 67 of file vp3.c.
Referenced by unpack_superblocks().
#define SB_PARTIALLY_CODED 1 |
Definition at line 68 of file vp3.c.
Referenced by unpack_superblocks().
#define Y_FINISHED | ( | chroma_shift | ) | s->flipped_image ? y <= s->fragment_height >> chroma_shift : y > 0 |
Referenced by vp3_calculate_pixel_addresses().
#define Y_INITIAL | ( | chroma_shift | ) | s->flipped_image ? 1 : s->fragment_height >> chroma_shift |
Referenced by vp3_calculate_pixel_addresses().
typedef struct Vp3DecodeContext Vp3DecodeContext |
typedef struct Vp3Fragment Vp3Fragment |
static void apply_loop_filter | ( | Vp3DecodeContext * | s | ) | [static] |
Definition at line 1517 of file vp3.c.
Referenced by vp3_decode_frame().
static int init_block_mapping | ( | Vp3DecodeContext * | s | ) | [static] |
Definition at line 248 of file vp3.c.
Referenced by vp3_decode_init().
static void init_dequantizer | ( | Vp3DecodeContext * | s | ) | [static] |
Definition at line 484 of file vp3.c.
Referenced by vp3_decode_frame().
static void init_frame | ( | Vp3DecodeContext * | s, | |
GetBitContext * | gb | |||
) | [static] |
Definition at line 463 of file vp3.c.
Referenced by vp3_decode_frame().
static void init_loop_filter | ( | Vp3DecodeContext * | s | ) | [static] |
Definition at line 522 of file vp3.c.
Referenced by vp3_decode_frame().
static int read_huffman_tree | ( | AVCodecContext * | avctx, | |
GetBitContext * | gb | |||
) | [static] |
static void render_slice | ( | Vp3DecodeContext * | s, | |
int | slice | |||
) | [static] |
Definition at line 1315 of file vp3.c.
Referenced by vp3_decode_frame().
static void reverse_dc_prediction | ( | Vp3DecodeContext * | s, | |
int | first_fragment, | |||
int | fragment_width, | |||
int | fragment_height | |||
) | [static] |
Definition at line 1150 of file vp3.c.
Referenced by vp3_decode_frame().
static int unpack_dct_coeffs | ( | Vp3DecodeContext * | s, | |
GetBitContext * | gb | |||
) | [static] |
Definition at line 1058 of file vp3.c.
Referenced by vp3_decode_frame().
static int unpack_modes | ( | Vp3DecodeContext * | s, | |
GetBitContext * | gb | |||
) | [static] |
Definition at line 726 of file vp3.c.
Referenced by vp3_decode_frame().
static int unpack_superblocks | ( | Vp3DecodeContext * | s, | |
GetBitContext * | gb | |||
) | [static] |
Definition at line 545 of file vp3.c.
Referenced by vp3_decode_frame().
static int unpack_vectors | ( | Vp3DecodeContext * | s, | |
GetBitContext * | gb | |||
) | [static] |
Definition at line 804 of file vp3.c.
Referenced by vp3_decode_frame().
static int unpack_vlcs | ( | Vp3DecodeContext * | s, | |
GetBitContext * | gb, | |||
VLC * | table, | |||
int | coeff_index, | |||
int | first_fragment, | |||
int | last_fragment, | |||
int | eob_run | |||
) | [static] |
Definition at line 982 of file vp3.c.
Referenced by unpack_dct_coeffs().
static void vp3_calculate_pixel_addresses | ( | Vp3DecodeContext * | s | ) | [static] |
Definition at line 1604 of file vp3.c.
Referenced by vp3_decode_frame().
static av_cold int vp3_decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 1998 of file vp3.c.
Referenced by vp3_decode_init().
static int vp3_decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | data_size, | |||
const uint8_t * | buf, | |||
int | buf_size | |||
) | [static] |
static av_cold int vp3_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
const int ModeAlphabet[6][CODING_MODE_COUNT] [static] |
Definition at line 85 of file vp3.c.
Referenced by unpack_modes().
{ "vp3", CODEC_TYPE_VIDEO, CODEC_ID_VP3, sizeof(Vp3DecodeContext), vp3_decode_init, NULL, vp3_decode_end, vp3_decode_frame, 0, NULL, .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"), }