#include "libavutil/avassert.h"
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "cavs.h"
Go to the source code of this file.
Defines | |
| #define | EOB 0,0,0 |
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 | dequant (AVSContext *h, DCTELEM *level_buf, uint8_t *run_buf, DCTELEM *dst, int mul, int shift, int coeff_num) |
| 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 void | set_mv_intra (AVSContext *h) |
| static int | decode_mb_i (AVSContext *h, int cbp_code) |
| static void | set_intra_mode_default (AVSContext *h) |
| static void | decode_mb_p (AVSContext *h, enum cavs_mb mb_type) |
| static int | 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] |
| static const uint8_t | scan3x3 [4] = { 4, 5, 7, 8 } |
| static const uint8_t | cavs_chroma_qp [64] |
| static const uint8_t | dequant_shift [64] |
| static const uint16_t | dequant_mul [64] |
| static struct dec_2dvlc | intra_dec [7] |
| static struct dec_2dvlc | inter_dec [7] |
| static struct dec_2dvlc | chroma_dec [5] |
| AVCodec | ff_cavs_decoder |
Definition in file cavsdec.c.
| static int cavs_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| AVPacket * | avpkt | |||
| ) | [static] |
| static void cavs_flush | ( | AVCodecContext * | avctx | ) | [static] |
| static int check_for_slice | ( | AVSContext * | h | ) | [inline, static] |
| static int decode_mb_b | ( | AVSContext * | h, | |
| enum cavs_mb | mb_type | |||
| ) | [static] |
| static int decode_mb_i | ( | AVSContext * | h, | |
| int | cbp_code | |||
| ) | [static] |
| static void decode_mb_p | ( | AVSContext * | h, | |
| enum cavs_mb | mb_type | |||
| ) | [static] |
| static int decode_pic | ( | AVSContext * | h | ) | [static] |
| 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
| 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 544 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] |
| static int decode_residual_inter | ( | AVSContext * | h | ) | [inline, static] |
| static int decode_seq_header | ( | AVSContext * | h | ) | [static] |
| static int decode_slice_header | ( | AVSContext * | h, | |
| GetBitContext * | gb | |||
| ) | [inline, static] |
Definition at line 872 of file cavsdec.c.
Referenced by cavs_decode_frame(), check_for_slice(), decode_nal_units(), and decode_slice().
| static int dequant | ( | AVSContext * | h, | |
| DCTELEM * | level_buf, | |||
| uint8_t * | run_buf, | |||
| DCTELEM * | dst, | |||
| int | mul, | |||
| int | shift, | |||
| int | coeff_num | |||
| ) | [inline, static] |
Definition at line 515 of file cavsdec.c.
Referenced by decode_residual_block(), lsf_decode_fp(), lsf_decode_fp_16k(), and read_and_decode_spectrum().
| static int get_ue_code | ( | GetBitContext * | gb, | |
| int | order | |||
| ) | [inline, static] |
kth-order exponential golomb code
Definition at line 507 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] |
| static void mv_pred_sym | ( | AVSContext * | h, | |
| cavs_vector * | src, | |||
| enum cavs_block | size | |||
| ) | [inline, static] |
| static void set_intra_mode_default | ( | AVSContext * | h | ) | [inline, static] |
| static void set_mv_intra | ( | AVSContext * | h | ) | [inline, static] |
| static void store_mvs | ( | AVSContext * | h | ) | [inline, static] |
const uint8_t cavs_chroma_qp[64] [static] |
Initial value:
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
32,33,34,35,36,37,38,39,40,41,42,42,43,43,44,44,
45,45,46,46,47,47,48,48,48,49,49,49,50,50,50,51
}
Definition at line 52 of file cavsdec.c.
Referenced by decode_residual_chroma().
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 39 of file cavsdec.c.
Referenced by decode_mb_i(), and decode_residual_inter().
struct dec_2dvlc chroma_dec[5] [static] |
const uint16_t dequant_mul[64] [static] |
Initial value:
{
32768,36061,38968,42495,46341,50535,55437,60424,
32932,35734,38968,42495,46177,50535,55109,59933,
65535,35734,38968,42577,46341,50617,55027,60097,
32809,35734,38968,42454,46382,50576,55109,60056,
65535,35734,38968,42495,46320,50515,55109,60076,
65535,35744,38968,42495,46341,50535,55099,60087,
65535,35734,38973,42500,46341,50535,55109,60097,
32771,35734,38965,42497,46341,50535,55109,60099
}
Definition at line 70 of file cavsdec.c.
Referenced by decode_residual_block().
const uint8_t dequant_shift[64] [static] |
Initial value:
{
14,14,14,14,14,14,14,14,
13,13,13,13,13,13,13,13,
13,12,12,12,12,12,12,12,
11,11,11,11,11,11,11,11,
11,10,10,10,10,10,10,10,
10, 9, 9, 9, 9, 9, 9, 9,
9, 8, 8, 8, 8, 8, 8, 8,
7, 7, 7, 7, 7, 7, 7, 7
}
Definition at line 59 of file cavsdec.c.
Referenced by decode_residual_block().
Initial value:
{
.name = "cavs",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_CAVS,
.priv_data_size = sizeof(AVSContext),
.init = ff_cavs_init,
.close = ff_cavs_end,
.decode = cavs_decode_frame,
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY,
.flush = cavs_flush,
.long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"),
}
1.5.8