libavcodec/cavs.c File Reference

Chinese AVS video (AVS1-P2, JiZhun profile) decoder. More...

#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "mathops.h"
#include "cavs.h"
#include "cavsdata.h"

Go to the source code of this file.

Defines

#define SET_PARAMS
#define LOWPASS(ARRAY, INDEX)   (( ARRAY[(INDEX)-1] + 2*ARRAY[(INDEX)] + ARRAY[(INDEX)+1] + 2) >> 2)

Functions

static int get_bs (cavs_vector *mvP, cavs_vector *mvQ, int b)
void ff_cavs_filter (AVSContext *h, enum cavs_mb mb_type)
 in-loop deblocking filter for a single macroblock
void ff_cavs_load_intra_pred_luma (AVSContext *h, uint8_t *top, uint8_t **left, int block)
void ff_cavs_load_intra_pred_chroma (AVSContext *h)
static void intra_pred_vert (uint8_t *d, uint8_t *top, uint8_t *left, int stride)
static void intra_pred_horiz (uint8_t *d, uint8_t *top, uint8_t *left, int stride)
static void intra_pred_dc_128 (uint8_t *d, uint8_t *top, uint8_t *left, int stride)
static void intra_pred_plane (uint8_t *d, uint8_t *top, uint8_t *left, int stride)
static void intra_pred_lp (uint8_t *d, uint8_t *top, uint8_t *left, int stride)
static void intra_pred_down_left (uint8_t *d, uint8_t *top, uint8_t *left, int stride)
static void intra_pred_down_right (uint8_t *d, uint8_t *top, uint8_t *left, int stride)
static void intra_pred_lp_left (uint8_t *d, uint8_t *top, uint8_t *left, int stride)
static void intra_pred_lp_top (uint8_t *d, uint8_t *top, uint8_t *left, int stride)
void ff_cavs_modify_mb_i (AVSContext *h, int *pred_mode_uv)
static void mc_dir_part (AVSContext *h, Picture *pic, int chroma_height, int delta, int list, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int src_x_offset, int src_y_offset, qpel_mc_func *qpix_op, h264_chroma_mc_func chroma_op, cavs_vector *mv)
static void mc_part_std (AVSContext *h, int chroma_height, int delta, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int x_offset, int y_offset, qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, cavs_vector *mv)
void ff_cavs_inter (AVSContext *h, enum cavs_mb mb_type)
static void scale_mv (AVSContext *h, int *d_x, int *d_y, cavs_vector *src, int distp)
static void mv_pred_median (AVSContext *h, cavs_vector *mvP, cavs_vector *mvA, cavs_vector *mvB, cavs_vector *mvC)
void ff_cavs_mv (AVSContext *h, enum cavs_mv_loc nP, enum cavs_mv_loc nC, enum cavs_mv_pred mode, enum cavs_block size, int ref)
void ff_cavs_init_mb (AVSContext *h)
 initialise predictors for motion vectors and intra prediction
int ff_cavs_next_mb (AVSContext *h)
 save predictors for later macroblocks and increase macroblock address
void ff_cavs_init_pic (AVSContext *h)
void ff_cavs_init_top_lines (AVSContext *h)
 some predictions require data from the top-neighbouring macroblock.
av_cold int ff_cavs_init (AVCodecContext *avctx)
av_cold int ff_cavs_end (AVCodecContext *avctx)


Detailed Description

Chinese AVS video (AVS1-P2, JiZhun profile) decoder.

Author:
Stefan Gehrer <stefan.gehrer@gmx.de>

Definition in file cavs.c.


Define Documentation

#define LOWPASS ( ARRAY,
INDEX   )     (( ARRAY[(INDEX)-1] + 2*ARRAY[(INDEX)] + ARRAY[(INDEX)+1] + 2) >> 2)

#define SET_PARAMS

Value:

alpha = alpha_tab[av_clip(qp_avg + h->alpha_offset,0,63)];   \
    beta  =  beta_tab[av_clip(qp_avg + h->beta_offset, 0,63)];   \
    tc    =    tc_tab[av_clip(qp_avg + h->alpha_offset,0,63)];

Definition at line 58 of file cavs.c.

Referenced by ff_cavs_filter().


Function Documentation

av_cold int ff_cavs_end ( AVCodecContext avctx  ) 

Definition at line 701 of file cavs.c.

void ff_cavs_filter ( AVSContext h,
enum cavs_mb  mb_type 
)

in-loop deblocking filter for a single macroblock

boundary strength (bs) mapping:

--4---5-- 0 2 | | 6 | 7 | 1 3 | ---------

Definition at line 75 of file cavs.c.

Referenced by decode_mb_b(), decode_mb_i(), and decode_mb_p().

av_cold int ff_cavs_init ( AVCodecContext avctx  ) 

Definition at line 669 of file cavs.c.

void ff_cavs_init_mb ( AVSContext h  ) 

initialise predictors for motion vectors and intra prediction

Definition at line 536 of file cavs.c.

Referenced by decode_mb_b(), decode_mb_i(), and decode_mb_p().

void ff_cavs_init_pic ( AVSContext h  ) 

Definition at line 620 of file cavs.c.

Referenced by decode_pic().

void ff_cavs_init_top_lines ( AVSContext h  ) 

some predictions require data from the top-neighbouring macroblock.

this data has to be stored for one complete row of macroblocks and this storage space is allocated here

Definition at line 653 of file cavs.c.

Referenced by decode_seq_header().

void ff_cavs_inter ( AVSContext h,
enum cavs_mb  mb_type 
)

Definition at line 413 of file cavs.c.

Referenced by decode_mb_b(), and decode_mb_p().

void ff_cavs_load_intra_pred_chroma ( AVSContext h  ) 

Definition at line 197 of file cavs.c.

Referenced by decode_mb_i().

void ff_cavs_load_intra_pred_luma ( AVSContext h,
uint8_t top,
uint8_t **  left,
int  block 
)

Definition at line 147 of file cavs.c.

Referenced by decode_mb_i().

void ff_cavs_modify_mb_i ( AVSContext h,
int *  pred_mode_uv 
)

Definition at line 301 of file cavs.c.

Referenced by decode_mb_i().

void ff_cavs_mv ( AVSContext h,
enum cavs_mv_loc  nP,
enum cavs_mv_loc  nC,
enum cavs_mv_pred  mode,
enum cavs_block  size,
int  ref 
)

Definition at line 483 of file cavs.c.

Referenced by decode_mb_b(), and decode_mb_p().

int ff_cavs_next_mb ( AVSContext h  ) 

save predictors for later macroblocks and increase macroblock address

Returns:
0 if end of frame is reached, 1 otherwise

Definition at line 576 of file cavs.c.

Referenced by decode_pic().

static int get_bs ( cavs_vector mvP,
cavs_vector mvQ,
int  b 
) [inline, static]

Definition at line 41 of file cavs.c.

Referenced by ff_cavs_filter().

static void intra_pred_dc_128 ( uint8_t d,
uint8_t top,
uint8_t left,
int  stride 
) [static]

Definition at line 231 of file cavs.c.

Referenced by ff_cavs_init().

static void intra_pred_down_left ( uint8_t d,
uint8_t top,
uint8_t left,
int  stride 
) [static]

Definition at line 266 of file cavs.c.

Referenced by ff_cavs_init().

static void intra_pred_down_right ( uint8_t d,
uint8_t top,
uint8_t left,
int  stride 
) [static]

Definition at line 273 of file cavs.c.

Referenced by ff_cavs_init().

static void intra_pred_horiz ( uint8_t d,
uint8_t top,
uint8_t left,
int  stride 
) [static]

Definition at line 222 of file cavs.c.

Referenced by ff_cavs_init().

static void intra_pred_lp ( uint8_t d,
uint8_t top,
uint8_t left,
int  stride 
) [static]

Definition at line 259 of file cavs.c.

Referenced by ff_cavs_init().

static void intra_pred_lp_left ( uint8_t d,
uint8_t top,
uint8_t left,
int  stride 
) [static]

Definition at line 285 of file cavs.c.

Referenced by ff_cavs_init().

static void intra_pred_lp_top ( uint8_t d,
uint8_t top,
uint8_t left,
int  stride 
) [static]

Definition at line 292 of file cavs.c.

Referenced by ff_cavs_init().

static void intra_pred_plane ( uint8_t d,
uint8_t top,
uint8_t left,
int  stride 
) [static]

Definition at line 238 of file cavs.c.

Referenced by ff_cavs_init().

static void intra_pred_vert ( uint8_t d,
uint8_t top,
uint8_t left,
int  stride 
) [static]

Definition at line 214 of file cavs.c.

Referenced by ff_cavs_init().

static void mc_dir_part ( AVSContext h,
Picture pic,
int  chroma_height,
int  delta,
int  list,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  src_x_offset,
int  src_y_offset,
qpel_mc_func qpix_op,
h264_chroma_mc_func  chroma_op,
cavs_vector mv 
) [inline, static]

Definition at line 327 of file cavs.c.

Referenced by mc_part_std(), and mc_part_weighted().

static void mc_part_std ( AVSContext h,
int  chroma_height,
int  delta,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  x_offset,
int  y_offset,
qpel_mc_func qpix_put,
h264_chroma_mc_func  chroma_put,
qpel_mc_func qpix_avg,
h264_chroma_mc_func  chroma_avg,
cavs_vector mv 
) [inline, static]

Definition at line 380 of file cavs.c.

Referenced by ff_cavs_inter(), and mc_part().

static void mv_pred_median ( AVSContext h,
cavs_vector mvP,
cavs_vector mvA,
cavs_vector mvB,
cavs_vector mvC 
) [inline, static]

Definition at line 457 of file cavs.c.

Referenced by ff_cavs_mv().

static void scale_mv ( AVSContext h,
int *  d_x,
int *  d_y,
cavs_vector src,
int  distp 
) [inline, static]

Definition at line 450 of file cavs.c.

Referenced by mv_pred_median(), and vc1_pred_b_mv().


Generated on Fri Oct 26 02:47:55 2012 for FFmpeg by  doxygen 1.5.8