truemotion2.c File Reference


Detailed Description

Duck TrueMotion2 decoder.

Definition in file truemotion2.c.

Go to the source code of this file.

Classes

struct  TM2Context
struct  TM2Codes
 Huffman codes for each of streams. More...
struct  TM2Huff
 structure for gathering Huffman codes information More...

Enumerations

enum  TM2_STREAMS {
  TM2_C_HI = 0, TM2_C_LO, TM2_L_HI, TM2_L_LO,
  TM2_UPD, TM2_MOT, TM2_TYPE, TM2_NUM_STREAMS
}
enum  TM2_BLOCKS {
  TM2_HI_RES = 0, TM2_MED_RES, TM2_LOW_RES, TM2_NULL_RES,
  TM2_UPDATE, TM2_STILL, TM2_MOTION
}

Functions

static int tm2_read_tree (TM2Context *ctx, uint32_t prefix, int length, TM2Huff *huff)
static int tm2_build_huff_table (TM2Context *ctx, TM2Codes *code)
static void tm2_free_codes (TM2Codes *code)
static int tm2_get_token (GetBitContext *gb, TM2Codes *code)
static int tm2_read_header (TM2Context *ctx, uint8_t *buf)
static int tm2_read_deltas (TM2Context *ctx, int stream_id)
static int tm2_read_stream (TM2Context *ctx, uint8_t *buf, int stream_id)
static int GET_TOK (TM2Context *ctx, int type)
static void tm2_apply_deltas (TM2Context *ctx, int *Y, int stride, int *deltas, int *last)
static void tm2_high_chroma (int *data, int stride, int *last, int *CD, int *deltas)
static void tm2_low_chroma (int *data, int stride, int *clast, int *CD, int *deltas, int bx)
static void tm2_hi_res_block (TM2Context *ctx, AVFrame *pic, int bx, int by)
static void tm2_med_res_block (TM2Context *ctx, AVFrame *pic, int bx, int by)
static void tm2_low_res_block (TM2Context *ctx, AVFrame *pic, int bx, int by)
static void tm2_null_res_block (TM2Context *ctx, AVFrame *pic, int bx, int by)
static void tm2_still_block (TM2Context *ctx, AVFrame *pic, int bx, int by)
static void tm2_update_block (TM2Context *ctx, AVFrame *pic, int bx, int by)
static void tm2_motion_block (TM2Context *ctx, AVFrame *pic, int bx, int by)
static int tm2_decode_blocks (TM2Context *ctx, AVFrame *p)
static int decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
static int decode_init (AVCodecContext *avctx)
static int decode_end (AVCodecContext *avctx)

Variables

AVCodec truemotion2_decoder


Enumeration Type Documentation

Enumerator:
TM2_C_HI 
TM2_C_LO 
TM2_L_HI 
TM2_L_LO 
TM2_UPD 
TM2_MOT 
TM2_TYPE 
TM2_NUM_STREAMS 

Definition at line 34 of file truemotion2.c.

enum TM2_BLOCKS

Enumerator:
TM2_HI_RES 
TM2_MED_RES 
TM2_LOW_RES 
TM2_NULL_RES 
TM2_UPDATE 
TM2_STILL 
TM2_MOTION 

Definition at line 37 of file truemotion2.c.


Function Documentation

static int tm2_read_tree ( TM2Context ctx,
uint32_t  prefix,
int  length,
TM2Huff huff 
) [static]

Definition at line 88 of file truemotion2.c.

Referenced by tm2_build_huff_table().

static int tm2_build_huff_table ( TM2Context ctx,
TM2Codes code 
) [static]

Definition at line 117 of file truemotion2.c.

Referenced by tm2_read_stream().

static void tm2_free_codes ( TM2Codes code  )  [static]

Definition at line 186 of file truemotion2.c.

Referenced by tm2_read_stream().

static int tm2_get_token ( GetBitContext gb,
TM2Codes code 
) [inline, static]

Definition at line 194 of file truemotion2.c.

Referenced by tm2_read_stream().

static int tm2_read_header ( TM2Context ctx,
uint8_t *  buf 
) [inline, static]

Definition at line 201 of file truemotion2.c.

Referenced by decode_frame().

static int tm2_read_deltas ( TM2Context ctx,
int  stream_id 
) [static]

Definition at line 238 of file truemotion2.c.

Referenced by tm2_read_stream().

static int tm2_read_stream ( TM2Context ctx,
uint8_t *  buf,
int  stream_id 
) [static]

Definition at line 263 of file truemotion2.c.

Referenced by decode_frame().

static int GET_TOK ( TM2Context ctx,
int  type 
) [inline, static]

static void tm2_apply_deltas ( TM2Context ctx,
int *  Y,
int  stride,
int *  deltas,
int *  last 
) [inline, static]

static void tm2_high_chroma ( int *  data,
int  stride,
int *  last,
int *  CD,
int *  deltas 
) [inline, static]

Definition at line 392 of file truemotion2.c.

Referenced by tm2_hi_res_block(), and tm2_low_chroma().

static void tm2_low_chroma ( int *  data,
int  stride,
int *  clast,
int *  CD,
int *  deltas,
int  bx 
) [inline, static]

Definition at line 405 of file truemotion2.c.

Referenced by tm2_low_res_block(), tm2_med_res_block(), and tm2_null_res_block().

static void tm2_hi_res_block ( TM2Context ctx,
AVFrame pic,
int  bx,
int  by 
) [inline, static]

Definition at line 424 of file truemotion2.c.

Referenced by tm2_decode_blocks().

static void tm2_med_res_block ( TM2Context ctx,
AVFrame pic,
int  bx,
int  by 
) [inline, static]

Definition at line 445 of file truemotion2.c.

Referenced by tm2_decode_blocks().

static void tm2_low_res_block ( TM2Context ctx,
AVFrame pic,
int  bx,
int  by 
) [inline, static]

Definition at line 467 of file truemotion2.c.

Referenced by tm2_decode_blocks().

static void tm2_null_res_block ( TM2Context ctx,
AVFrame pic,
int  bx,
int  by 
) [inline, static]

Definition at line 508 of file truemotion2.c.

Referenced by tm2_decode_blocks().

static void tm2_still_block ( TM2Context ctx,
AVFrame pic,
int  bx,
int  by 
) [inline, static]

Definition at line 554 of file truemotion2.c.

Referenced by tm2_decode_blocks().

static void tm2_update_block ( TM2Context ctx,
AVFrame pic,
int  bx,
int  by 
) [inline, static]

Definition at line 589 of file truemotion2.c.

Referenced by tm2_decode_blocks().

static void tm2_motion_block ( TM2Context ctx,
AVFrame pic,
int  bx,
int  by 
) [inline, static]

Definition at line 627 of file truemotion2.c.

Referenced by tm2_decode_blocks().

static int tm2_decode_blocks ( TM2Context ctx,
AVFrame p 
) [static]

Definition at line 672 of file truemotion2.c.

Referenced by decode_frame().

static int decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 760 of file truemotion2.c.

static int decode_init ( AVCodecContext avctx  )  [static]

Definition at line 821 of file truemotion2.c.

static int decode_end ( AVCodecContext avctx  )  [static]

Definition at line 858 of file truemotion2.c.


Variable Documentation

Initial value:

 {
    "truemotion2",
    CODEC_TYPE_VIDEO,
    CODEC_ID_TRUEMOTION2,
    sizeof(TM2Context),
    decode_init,
    NULL,
    decode_end,
    decode_frame,
    CODEC_CAP_DR1,
}

Definition at line 880 of file truemotion2.c.


Generated on Sat Dec 18 05:15:56 2010 for MythTV by  doxygen 1.5.5