|
FFmpeg
|
On2 VP3/VP4 Video Decoder. More...
#include "config_components.h"#include <stddef.h>#include <string.h>#include "libavutil/attributes.h"#include "libavutil/imgutils.h"#include "libavutil/mem.h"#include "libavutil/mem_internal.h"#include "libavutil/thread.h"#include "avcodec.h"#include "codec_internal.h"#include "decode.h"#include "get_bits.h"#include "hpeldsp.h"#include "jpegquanttables.h"#include "mathops.h"#include "progressframe.h"#include "libavutil/refstruct.h"#include "thread.h"#include "videodsp.h"#include "vp3data.h"#include "vp4data.h"#include "vp3dsp.h"#include "xiph.h"Go to the source code of this file.
Data Structures | |
| struct | Vp3Fragment |
| struct | VP4Predictor |
| struct | HuffEntry |
| struct | HuffTable |
| struct | CoeffVLCs |
| struct | Vp3DecodeContext |
Macros | |
| #define | VP3_MV_VLC_BITS 6 |
| #define | VP4_MV_VLC_BITS 6 |
| #define | SUPERBLOCK_VLC_BITS 6 |
| #define | FRAGMENT_PIXELS 8 |
| #define | SB_NOT_CODED 0 |
| #define | SB_PARTIALLY_CODED 1 |
| #define | SB_FULLY_CODED 2 |
| #define | MAXIMUM_LONG_BIT_RUN 4129 |
| #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 | TOKEN_EOB(eob_run) |
| #define | TOKEN_ZERO_RUN(coeff, zero_run) |
| #define | TOKEN_COEFF(coeff) |
| #define | BLOCK_X (2 * mb_x + (k & 1)) |
| #define | BLOCK_Y (2 * mb_y + (k >> 1)) |
| #define | SET_CHROMA_MODES |
| #define | COMPATIBLE_FRAME(x) |
| #define | DC_COEFF(u) |
| #define | PUL 8 |
| #define | PU 4 |
| #define | PUR 2 |
| #define | PL 1 |
| #define | TRANSPOSE(x) |
Enumerations | |
| enum | { VP4_DC_INTRA = 0 , VP4_DC_INTER = 1 , VP4_DC_GOLDEN = 2 , NB_VP4_DC_TYPES , VP4_DC_UNDEFINED = NB_VP4_DC_TYPES } |
Functions | |
| static int | theora_decode_header (AVCodecContext *avctx, GetBitContext *gb) |
| static int | theora_decode_tables (AVCodecContext *avctx, GetBitContext *gb) |
| static av_cold void | free_tables (AVCodecContext *avctx) |
| static av_cold void | vp3_decode_flush (AVCodecContext *avctx) |
| static av_cold int | vp3_decode_end (AVCodecContext *avctx) |
| static int | init_block_mapping (Vp3DecodeContext *s) |
| This function sets up all of the various blocks mappings: superblocks <-> fragments, macroblocks <-> fragments, superblocks <-> macroblocks. | |
| static void | init_dequantizer (Vp3DecodeContext *s, int qpi) |
| 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 | vp4_get_mv (GetBitContext *gb, int axis, int last_motion) |
| static int | unpack_vectors (Vp3DecodeContext *s, GetBitContext *gb) |
| static int | unpack_block_qpis (Vp3DecodeContext *s, GetBitContext *gb) |
| static int | get_eob_run (GetBitContext *gb, int token) |
| static int | get_coeff (GetBitContext *gb, int token, int16_t *coeff) |
| static int | unpack_vlcs (Vp3DecodeContext *s, GetBitContext *gb, const VLCElem *vlc_table, int coeff_index, int plane, int eob_run) |
| static void | reverse_dc_prediction (Vp3DecodeContext *s, int first_fragment, int fragment_width, int fragment_height) |
| static int | unpack_dct_coeffs (Vp3DecodeContext *s, GetBitContext *gb) |
| static void | apply_loop_filter (Vp3DecodeContext *s, int plane, int ystart, int yend) |
| static int | vp3_dequant (Vp3DecodeContext *s, const Vp3Fragment *frag, int plane, int inter, int16_t block[64]) |
| Pull DCT tokens from the 64 levels to decode and dequant the coefficients for the next block in coding order. | |
| static void | vp3_draw_horiz_band (Vp3DecodeContext *s, int y) |
| called when all pixels up to row y are complete | |
| static void | await_reference_row (Vp3DecodeContext *s, const Vp3Fragment *fragment, int motion_y, int y) |
| Wait for the reference frame of the current fragment. | |
| static void | render_slice (Vp3DecodeContext *s, int slice) |
| static av_cold void | init_tables_once (void) |
| static av_cold int | allocate_tables (AVCodecContext *avctx) |
| Allocate tables for per-frame data in Vp3DecodeContext. | |
| static av_cold void | free_vlc_tables (AVRefStructOpaque unused, void *obj) |
| static av_cold int | vp3_decode_init (AVCodecContext *avctx) |
| static int | vp3_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt) |
| static int | read_huffman_tree (HuffTable *huff, GetBitContext *gb, int length, AVCodecContext *avctx) |
Variables | |
| static const int | ModeAlphabet [6][CODING_MODE_COUNT] |
| static const uint8_t | hilbert_offset [16][2] |
| static const uint8_t | vp4_pred_block_type_map [8] |
| static VLCElem | superblock_run_length_vlc [88] |
| static VLCElem | fragment_run_length_vlc [56] |
| static VLCElem | motion_vector_vlc [112] |
| static VLCElem | mode_code_vlc [24+2108 *CONFIG_VP4_DECODER] |
| const FFCodec | ff_vp3_decoder |
On2 VP3/VP4 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 VP3_MV_VLC_BITS 6 |
Definition at line 60 of file vp3.c.
Referenced by init_tables_once(), and unpack_vectors().
| #define VP4_MV_VLC_BITS 6 |
Definition at line 61 of file vp3.c.
Referenced by init_tables_once(), and vp4_get_mv().
| #define SUPERBLOCK_VLC_BITS 6 |
Definition at line 62 of file vp3.c.
Referenced by init_tables_once(), unpack_block_qpis(), and unpack_superblocks().
| #define FRAGMENT_PIXELS 8 |
Definition at line 64 of file vp3.c.
Referenced by vp3_decode_init().
| #define SB_NOT_CODED 0 |
Definition at line 73 of file vp3.c.
Referenced by unpack_superblocks().
| #define SB_PARTIALLY_CODED 1 |
Definition at line 74 of file vp3.c.
Referenced by unpack_superblocks().
| #define SB_FULLY_CODED 2 |
Definition at line 75 of file vp3.c.
Referenced by unpack_superblocks().
| #define MAXIMUM_LONG_BIT_RUN 4129 |
Definition at line 80 of file vp3.c.
Referenced by unpack_block_qpis(), and unpack_superblocks().
| #define MODE_INTER_NO_MV 0 |
Definition at line 82 of file vp3.c.
Referenced by unpack_modes(), and unpack_superblocks().
| #define MODE_INTRA 1 |
Definition at line 83 of file vp3.c.
Referenced by deblock_bs(), derive_scale_m(), derive_transform_type(), ff_hevc_hls_residual_coding(), ff_hevc_part_mode_decode(), ff_vvc_non_inter_flag(), ff_vvc_pred_mode_flag(), has_inter_luma(), hls_coding_unit(), hls_coding_unit(), hls_transform_tree(), hls_transform_unit(), hls_transform_unit(), intra_prediction_unit_default_value(), lfnst_idx_decode(), luma_intra_pred_mode(), mts_idx_decode(), pred_flag_to_mode(), pred_mode_decode(), predict_intra(), render_slice(), tu_y_coded_flag_decode(), unpack_modes(), and vvc_deblock_bs_luma().
| #define MODE_INTER_PLUS_MV 2 |
Definition at line 84 of file vp3.c.
Referenced by unpack_vectors().
| #define MODE_INTER_LAST_MV 3 |
Definition at line 85 of file vp3.c.
Referenced by unpack_vectors().
| #define MODE_INTER_PRIOR_LAST 4 |
Definition at line 86 of file vp3.c.
Referenced by unpack_vectors().
| #define MODE_USING_GOLDEN 5 |
Definition at line 87 of file vp3.c.
Referenced by await_reference_row(), and render_slice().
| #define MODE_GOLDEN_MV 6 |
Definition at line 88 of file vp3.c.
Referenced by await_reference_row(), render_slice(), and unpack_vectors().
| #define MODE_INTER_FOURMV 7 |
Definition at line 89 of file vp3.c.
Referenced by unpack_vectors().
| #define CODING_MODE_COUNT 8 |
Definition at line 90 of file vp3.c.
Referenced by unpack_modes().
| #define MODE_COPY 8 |
Definition at line 93 of file vp3.c.
Referenced by apply_loop_filter(), init_filter(), render_slice(), reverse_dc_prediction(), unpack_modes(), unpack_superblocks(), and unpack_vectors().
| #define TOKEN_EOB | ( | eob_run | ) |
| #define TOKEN_ZERO_RUN | ( | coeff, | |
| zero_run ) |
Definition at line 280 of file vp3.c.
Referenced by unpack_vlcs().
| #define TOKEN_COEFF | ( | coeff | ) |
| #define BLOCK_X (2 * mb_x + (k & 1)) |
Definition at line 640 of file vp3.c.
Referenced by call_kernel(), cuda_pad_pad(), overlay_cuda_call_kernel(), unpack_modes(), and unpack_vectors().
| #define BLOCK_Y (2 * mb_y + (k >> 1)) |
Definition at line 641 of file vp3.c.
Referenced by call_kernel(), cuda_pad_pad(), overlay_cuda_call_kernel(), unpack_modes(), and unpack_vectors().
| #define SET_CHROMA_MODES |
Referenced by unpack_modes().
| #define COMPATIBLE_FRAME | ( | x | ) |
Definition at line 1629 of file vp3.c.
Referenced by reverse_dc_prediction().
| #define DC_COEFF | ( | u | ) |
| #define PUL 8 |
Referenced by reverse_dc_prediction().
| #define PU 4 |
| #define PUR 2 |
Referenced by reverse_dc_prediction().
| #define PL 1 |
| #define TRANSPOSE | ( | x | ) |
Referenced by vp3_decode_init().
| anonymous enum |
|
static |
Referenced by vp3_decode_frame().
|
static |
Referenced by vp3_decode_frame().
|
static |
Definition at line 334 of file vp3.c.
Referenced by allocate_tables(), and vp3_decode_end().
|
static |
Definition at line 350 of file vp3.c.
Referenced by vp3_decode_end().
|
static |
Definition at line 359 of file vp3.c.
Referenced by vp3_decode_frame().
|
static |
This function sets up all of the various blocks mappings: superblocks <-> fragments, macroblocks <-> fragments, superblocks <-> macroblocks.
Definition at line 383 of file vp3.c.
Referenced by allocate_tables().
|
static |
Definition at line 416 of file vp3.c.
Referenced by vp3_decode_frame().
|
static |
Definition at line 458 of file vp3.c.
Referenced by vp3_decode_frame().
|
static |
Definition at line 467 of file vp3.c.
Referenced by vp3_decode_frame().
|
static |
Definition at line 783 of file vp3.c.
Referenced by vp3_decode_frame().
|
static |
Definition at line 886 of file vp3.c.
Referenced by unpack_vectors().
|
static |
Definition at line 901 of file vp3.c.
Referenced by vp3_decode_frame().
|
static |
Definition at line 1099 of file vp3.c.
Referenced by vp3_decode_frame().
|
inlinestatic |
Definition at line 1142 of file vp3.c.
Referenced by unpack_vlcs().
|
inlinestatic |
Definition at line 1150 of file vp3.c.
Referenced by unpack_vlcs().
|
static |
Definition at line 1178 of file vp3.c.
Referenced by unpack_dct_coeffs().
|
static |
Definition at line 1633 of file vp3.c.
Referenced by unpack_dct_coeffs().
|
static |
Definition at line 1298 of file vp3.c.
Referenced by vp3_decode_frame().
|
static |
Definition at line 1782 of file vp3.c.
Referenced by render_slice(), vc1_decode_p_blocks(), and vp3_decode_frame().
|
inlinestatic |
Pull DCT tokens from the 64 levels to decode and dequant the coefficients for the next block in coding order.
Definition at line 1848 of file vp3.c.
Referenced by render_slice().
|
static |
called when all pixels up to row y are complete
Definition at line 1893 of file vp3.c.
Referenced by render_slice(), and vp3_decode_frame().
|
static |
Wait for the reference frame of the current fragment.
The progress value is in luma pixel rows.
Definition at line 1933 of file vp3.c.
Referenced by render_slice().
|
static |
Definition at line 2054 of file vp3.c.
Referenced by vp3_decode_frame().
|
static |
Definition at line 2260 of file vp3.c.
Referenced by vp3_decode_init().
|
static |
Allocate tables for per-frame data in Vp3DecodeContext.
Definition at line 2303 of file vp3.c.
Referenced by vp3_decode_init().
|
static |
Definition at line 2347 of file vp3.c.
Referenced by vp3_decode_init().
|
static |
Definition at line 2355 of file vp3.c.
Referenced by vp3_decode_frame().
|
static |
|
static |
Definition at line 2799 of file vp3.c.
Referenced by read_huffman_tree().
|
static |
Definition at line 100 of file vp3.c.
Referenced by unpack_modes().
|
static |
Definition at line 138 of file vp3.c.
Referenced by init_block_mapping(), and render_slice().
|
static |
|
static |
Definition at line 164 of file vp3.c.
Referenced by init_tables_once(), unpack_block_qpis(), and unpack_superblocks().
|
static |
Definition at line 165 of file vp3.c.
Referenced by init_tables_once(), and unpack_superblocks().
|
static |
Definition at line 166 of file vp3.c.
Referenced by init_tables_once(), and unpack_vectors().
|
static |
Definition at line 169 of file vp3.c.
Referenced by init_tables_once(), and unpack_modes().
| const FFCodec ff_vp3_decoder |