libavcodec/cavsdec.c File Reference

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

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

Go to the source code of this file.

Functions

static void store_mvs (AVSContext *h)
static void mv_pred_direct (AVSContext *h, cavs_vector *pmv_fw, cavs_vector *col_mv)
static void mv_pred_sym (AVSContext *h, cavs_vector *src, enum cavs_block size)
static int get_ue_code (GetBitContext *gb, int order)
 kth-order exponential golomb code
static int decode_residual_block (AVSContext *h, GetBitContext *gb, const struct dec_2dvlc *r, int esc_golomb_order, int qp, uint8_t *dst, int stride)
 decode coefficients from one 8x8 block, dequantize, inverse transform and add them to sample block
static void decode_residual_chroma (AVSContext *h)
static int decode_residual_inter (AVSContext *h)
static int decode_mb_i (AVSContext *h, int cbp_code)
static void decode_mb_p (AVSContext *h, enum cavs_mb mb_type)
static void decode_mb_b (AVSContext *h, enum cavs_mb mb_type)
static int decode_slice_header (AVSContext *h, GetBitContext *gb)
static int check_for_slice (AVSContext *h)
static int decode_pic (AVSContext *h)
static int decode_seq_header (AVSContext *h)
static void cavs_flush (AVCodecContext *avctx)
static int cavs_decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)

Variables

static const uint8_t mv_scan [4]
static const uint8_t cbp_tab [64][2]
AVCodec cavs_decoder


Detailed Description

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

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

Definition in file cavsdec.c.


Function Documentation

static int cavs_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 641 of file cavsdec.c.

static void cavs_flush ( AVCodecContext avctx  )  [static]

Definition at line 636 of file cavsdec.c.

static int check_for_slice ( AVSContext h  )  [inline, static]

Definition at line 438 of file cavsdec.c.

Referenced by decode_pic().

static void decode_mb_b ( AVSContext h,
enum cavs_mb  mb_type 
) [static]

Definition at line 303 of file cavsdec.c.

Referenced by decode_pic().

static int decode_mb_i ( AVSContext h,
int  cbp_code 
) [static]

Definition at line 192 of file cavsdec.c.

Referenced by decode_pic().

static void decode_mb_p ( AVSContext h,
enum cavs_mb  mb_type 
) [static]

Definition at line 259 of file cavsdec.c.

Referenced by decode_pic().

static int decode_pic ( AVSContext h  )  [static]

Definition at line 465 of file cavsdec.c.

Referenced by cavs_decode_frame().

static int decode_residual_block ( AVSContext h,
GetBitContext gb,
const struct dec_2dvlc r,
int  esc_golomb_order,
int  qp,
uint8_t *  dst,
int  stride 
) [static]

decode coefficients from one 8x8 block, dequantize, inverse transform and add them to sample block

Parameters:
r pointer to 2D VLC table
esc_golomb_order escape codes are k-golomb with this order k
qp quantizer
dst location of sample block
stride line stride in frame buffer

Definition at line 115 of file cavsdec.c.

Referenced by decode_mb_i(), decode_residual_chroma(), and decode_residual_inter().

static void decode_residual_chroma ( AVSContext h  )  [inline, static]

Definition at line 154 of file cavsdec.c.

Referenced by decode_mb_i(), and decode_residual_inter().

static int decode_residual_inter ( AVSContext h  )  [inline, static]

Definition at line 163 of file cavsdec.c.

Referenced by decode_mb_b(), and decode_mb_p().

static int decode_seq_header ( AVSContext h  )  [static]

Definition at line 608 of file cavsdec.c.

Referenced by cavs_decode_frame().

static int decode_slice_header ( AVSContext h,
GetBitContext gb 
) [inline, static]

Definition at line 417 of file cavsdec.c.

Referenced by cavs_decode_frame(), check_for_slice(), and decode_nal_units().

static int get_ue_code ( GetBitContext gb,
int  order 
) [inline, static]

kth-order exponential golomb code

Definition at line 98 of file cavsdec.c.

Referenced by decode_residual_block().

static void mv_pred_direct ( AVSContext h,
cavs_vector pmv_fw,
cavs_vector col_mv 
) [inline, static]

Definition at line 62 of file cavsdec.c.

Referenced by decode_mb_b().

static void mv_pred_sym ( AVSContext h,
cavs_vector src,
enum cavs_block  size 
) [inline, static]

Definition at line 80 of file cavsdec.c.

Referenced by decode_mb_b().

static void store_mvs ( AVSContext h  )  [inline, static]

Definition at line 55 of file cavsdec.c.

Referenced by decode_mb_p().


Variable Documentation

Initial value:

 {
    "cavs",
    AVMEDIA_TYPE_VIDEO,
    CODEC_ID_CAVS,
    sizeof(AVSContext),
    ff_cavs_init,
    NULL,
    ff_cavs_end,
    cavs_decode_frame,
    CODEC_CAP_DR1 | CODEC_CAP_DELAY,
    .flush= cavs_flush,
    .long_name= NULL_IF_CONFIG_SMALL("Chinese AVS video (AVS1-P2, JiZhun profile)"),
}

Definition at line 717 of file cavsdec.c.

const uint8_t cbp_tab[64][2] [static]

Initial value:

 {
  {63, 0},{15,15},{31,63},{47,31},{ 0,16},{14,32},{13,47},{11,13},
  { 7,14},{ 5,11},{10,12},{ 8, 5},{12,10},{61, 7},{ 4,48},{55, 3},
  { 1, 2},{ 2, 8},{59, 4},{ 3, 1},{62,61},{ 9,55},{ 6,59},{29,62},
  {45,29},{51,27},{23,23},{39,19},{27,30},{46,28},{53, 9},{30, 6},
  {43,60},{37,21},{60,44},{16,26},{21,51},{28,35},{19,18},{35,20},
  {42,24},{26,53},{44,17},{32,37},{58,39},{24,45},{20,58},{17,43},
  {18,42},{48,46},{22,36},{33,33},{25,34},{49,40},{40,52},{36,49},
  {34,50},{50,56},{52,25},{54,22},{41,54},{56,57},{38,41},{57,38}
}

Definition at line 38 of file cavsdec.c.

Referenced by decode_mb_i(), and decode_residual_inter().

const uint8_t mv_scan[4] [static]

Initial value:

Definition at line 33 of file cavsdec.c.

Referenced by decode_mb_b().


Generated on Fri Oct 26 02:36:51 2012 for FFmpeg by  doxygen 1.5.8