#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "golomb.h"
#include "rv34.h"
#include "rv40vlc2.h"
#include "rv40data.h"
Go to the source code of this file.
Defines | |
#define | CLIP_SYMM(a, b) av_clip(a, -(b), b) |
#define | MASK_CUR 0x0001 |
#define | MASK_RIGHT 0x0008 |
#define | MASK_BOTTOM 0x0010 |
#define | MASK_TOP 0x1000 |
#define | MASK_Y_TOP_ROW 0x000F |
#define | MASK_Y_LAST_ROW 0xF000 |
#define | MASK_Y_LEFT_COL 0x1111 |
#define | MASK_Y_RIGHT_COL 0x8888 |
#define | MASK_C_TOP_ROW 0x0003 |
#define | MASK_C_LAST_ROW 0x000C |
#define | MASK_C_LEFT_COL 0x0005 |
#define | MASK_C_RIGHT_COL 0x000A |
Enumerations | |
enum | RV40BlockPos { POS_CUR, POS_TOP, POS_LEFT, POS_BOTTOM } |
Functions | |
static av_cold void | rv40_init_tables (void) |
Initialize all tables. | |
static int | get_dimension (GetBitContext *gb, const int *dim) |
Get stored dimension from bitstream. | |
static void | rv40_parse_picture_size (GetBitContext *gb, int *w, int *h) |
Get encoded picture size - usually this is called from rv40_parse_slice_header. | |
static int | rv40_parse_slice_header (RV34DecContext *r, GetBitContext *gb, SliceInfo *si) |
static int | rv40_decode_intra_types (RV34DecContext *r, GetBitContext *gb, int8_t *dst) |
Decode 4x4 intra types array. | |
static int | rv40_decode_mb_info (RV34DecContext *r) |
Decode macroblock information. | |
static void | rv40_weak_loop_filter (uint8_t *src, const int step, const int filter_p1, const int filter_q1, const int alpha, const int beta, const int lim_p0q0, const int lim_q1, const int lim_p1, const int diff_p1p0, const int diff_q1q0, const int diff_p1p2, const int diff_q1q2) |
weaker deblocking very similar to the one described in 4.4.2 of JVT-A003r1 | |
static void | rv40_adaptive_loop_filter (uint8_t *src, const int step, const int stride, const int dmode, const int lim_q1, const int lim_p1, const int alpha, const int beta, const int beta2, const int chroma, const int edge) |
static void | rv40_v_loop_filter (uint8_t *src, int stride, int dmode, int lim_q1, int lim_p1, int alpha, int beta, int beta2, int chroma, int edge) |
static void | rv40_h_loop_filter (uint8_t *src, int stride, int dmode, int lim_q1, int lim_p1, int alpha, int beta, int beta2, int chroma, int edge) |
static void | rv40_loop_filter (RV34DecContext *r, int row) |
RV40 loop filtering function. | |
static av_cold int | rv40_decode_init (AVCodecContext *avctx) |
Initialize decoder. | |
Variables | |
static VLC | aic_top_vlc |
static VLC | aic_mode1_vlc [AIC_MODE1_NUM] |
static VLC | aic_mode2_vlc [AIC_MODE2_NUM] |
static VLC | ptype_vlc [NUM_PTYPE_VLCS] |
static VLC | btype_vlc [NUM_BTYPE_VLCS] |
static const int16_t | mode2_offs [] |
static const int | neighbour_offs_x [4] = { 0, 0, -1, 0 } |
static const int | neighbour_offs_y [4] = { 0, -1, 0, 1 } |
AVCodec | rv40_decoder |
Definition in file rv40.c.
#define CLIP_SYMM | ( | a, | |||
b | ) | av_clip(a, -(b), b) |
#define MASK_BOTTOM 0x0010 |
#define MASK_C_LAST_ROW 0x000C |
#define MASK_C_LEFT_COL 0x0005 |
#define MASK_C_RIGHT_COL 0x000A |
#define MASK_C_TOP_ROW 0x0003 |
#define MASK_CUR 0x0001 |
#define MASK_RIGHT 0x0008 |
#define MASK_TOP 0x1000 |
#define MASK_Y_LAST_ROW 0xF000 |
#define MASK_Y_LEFT_COL 0x1111 |
#define MASK_Y_RIGHT_COL 0x8888 |
#define MASK_Y_TOP_ROW 0x000F |
enum RV40BlockPos |
static int get_dimension | ( | GetBitContext * | gb, | |
const int * | dim | |||
) | [static] |
Get stored dimension from bitstream.
If the width/height is the standard one then it's coded as a 3-bit index. Otherwise it is coded as escaped 8-bit portions.
Definition at line 102 of file rv40.c.
Referenced by rv40_parse_picture_size().
static void rv40_adaptive_loop_filter | ( | uint8_t * | src, | |
const int | step, | |||
const int | stride, | |||
const int | dmode, | |||
const int | lim_q1, | |||
const int | lim_p1, | |||
const int | alpha, | |||
const int | beta, | |||
const int | beta2, | |||
const int | chroma, | |||
const int | edge | |||
) | [inline, static] |
Definition at line 310 of file rv40.c.
Referenced by rv40_h_loop_filter(), and rv40_v_loop_filter().
static av_cold int rv40_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
static int rv40_decode_intra_types | ( | RV34DecContext * | r, | |
GetBitContext * | gb, | |||
int8_t * | dst | |||
) | [static] |
Decode 4x4 intra types array.
Definition at line 159 of file rv40.c.
Referenced by rv40_decode_init().
static int rv40_decode_mb_info | ( | RV34DecContext * | r | ) | [static] |
Decode macroblock information.
Definition at line 222 of file rv40.c.
Referenced by rv40_decode_init().
static void rv40_h_loop_filter | ( | uint8_t * | src, | |
int | stride, | |||
int | dmode, | |||
int | lim_q1, | |||
int | lim_p1, | |||
int | alpha, | |||
int | beta, | |||
int | beta2, | |||
int | chroma, | |||
int | edge | |||
) | [static] |
static av_cold void rv40_init_tables | ( | void | ) | [static] |
static void rv40_loop_filter | ( | RV34DecContext * | r, | |
int | row | |||
) | [static] |
RV40 loop filtering function.
< current macroblock and its neighbours types
flags indicating that macroblock can be filtered with strong filter it is set only for intra coded MB and MB with DCs coded separately
< MB filter clipping value calculated from filtering strength
coded block patterns for luma part of current macroblock and its neighbours Format: LSB corresponds to the top left block, each nibble represents one row of subblocks.
coded block patterns for chroma part of current macroblock and its neighbours Format is the same as for luma with two subblocks in a row.
This mask represents the pattern of luma subblocks that should be filtered in addition to the coded ones because because they lie at the edge of 8x8 block with different enough motion vectors
Definition at line 440 of file rv40.c.
Referenced by rv40_decode_init().
static void rv40_parse_picture_size | ( | GetBitContext * | gb, | |
int * | w, | |||
int * | h | |||
) | [static] |
Get encoded picture size - usually this is called from rv40_parse_slice_header.
Definition at line 120 of file rv40.c.
Referenced by rv40_parse_slice_header().
static int rv40_parse_slice_header | ( | RV34DecContext * | r, | |
GetBitContext * | gb, | |||
SliceInfo * | si | |||
) | [static] |
static void rv40_v_loop_filter | ( | uint8_t * | src, | |
int | stride, | |||
int | dmode, | |||
int | lim_q1, | |||
int | lim_p1, | |||
int | alpha, | |||
int | beta, | |||
int | beta2, | |||
int | chroma, | |||
int | edge | |||
) | [static] |
static void rv40_weak_loop_filter | ( | uint8_t * | src, | |
const int | step, | |||
const int | filter_p1, | |||
const int | filter_q1, | |||
const int | alpha, | |||
const int | beta, | |||
const int | lim_p0q0, | |||
const int | lim_q1, | |||
const int | lim_p1, | |||
const int | diff_p1p0, | |||
const int | diff_q1q0, | |||
const int | diff_p1p2, | |||
const int | diff_q1q2 | |||
) | [inline, static] |
weaker deblocking very similar to the one described in 4.4.2 of JVT-A003r1
Definition at line 276 of file rv40.c.
Referenced by rv40_adaptive_loop_filter().
VLC aic_mode1_vlc[AIC_MODE1_NUM] [static] |
VLC aic_mode2_vlc[AIC_MODE2_NUM] [static] |
VLC aic_top_vlc [static] |
const int16_t mode2_offs[] [static] |
Initial value:
{ 0, 614, 1222, 1794, 2410, 3014, 3586, 4202, 4792, 5382, 5966, 6542, 7138, 7716, 8292, 8864, 9444, 10030, 10642, 11212, 11814 }
Definition at line 40 of file rv40.c.
Referenced by rv40_init_tables().
const int neighbour_offs_x[4] = { 0, 0, -1, 0 } [static] |
const int neighbour_offs_y[4] = { 0, -1, 0, 1 } [static] |
Initial value:
{ "rv40", AVMEDIA_TYPE_VIDEO, CODEC_ID_RV40, sizeof(RV34DecContext), rv40_decode_init, NULL, ff_rv34_decode_end, ff_rv34_decode_frame, CODEC_CAP_DR1 | CODEC_CAP_DELAY, .flush = ff_mpeg_flush, .long_name = NULL_IF_CONFIG_SMALL("RealVideo 4.0"), .pix_fmts= ff_pixfmt_list_420, }