libavcodec/mss3.c File Reference

Microsoft Screen 3 (aka Microsoft ATC Screen) decoder. More...

#include "avcodec.h"
#include "bytestream.h"
#include "dsputil.h"
#include "mss34dsp.h"

Go to the source code of this file.

Data Structures

struct  Model2
struct  Model
struct  Model256
struct  RangeCoder
struct  BlockTypeContext
struct  FillBlockCoder
struct  ImageBlockCoder
struct  DCTBlockCoder
struct  HaarBlockCoder
struct  MSS3Context

Defines

#define HEADER_SIZE   27
#define MODEL2_SCALE   13
#define MODEL_SCALE   15
#define MODEL256_SEC_SCALE   9
#define RAC_BOTTOM   0x01000000

Enumerations

enum  BlockType {
  FILL_BLOCK = 0, IMAGE_BLOCK, DCT_BLOCK, HAAR_BLOCK,
  SKIP_BLOCK, SKIP_BLOCK = 0, DCT_BLOCK, IMAGE_BLOCK
}

Functions

static void model2_reset (Model2 *m)
static void model2_update (Model2 *m, int bit)
static void model_update (Model *m, int val)
static void model_reset (Model *m)
static av_cold void model_init (Model *m, int num_syms)
static void model256_update (Model256 *m, int val)
static void model256_reset (Model256 *m)
static av_cold void model256_init (Model256 *m)
static void rac_init (RangeCoder *c, const uint8_t *src, int size)
static void rac_normalise (RangeCoder *c)
static int rac_get_bit (RangeCoder *c)
static int rac_get_bits (RangeCoder *c, int nbits)
static int rac_get_model2_sym (RangeCoder *c, Model2 *m)
static int rac_get_model_sym (RangeCoder *c, Model *m)
static int rac_get_model256_sym (RangeCoder *c, Model256 *m)
static int decode_block_type (RangeCoder *c, BlockTypeContext *bt)
static int decode_coeff (RangeCoder *c, Model *m)
static void decode_fill_block (RangeCoder *c, FillBlockCoder *fc, uint8_t *dst, int stride, int block_size)
static void decode_image_block (RangeCoder *c, ImageBlockCoder *ic, uint8_t *dst, int stride, int block_size)
static int decode_dct (RangeCoder *c, DCTBlockCoder *bc, int *block, int bx, int by)
static void decode_dct_block (RangeCoder *c, DCTBlockCoder *bc, uint8_t *dst, int stride, int block_size, int *block, int mb_x, int mb_y)
static void decode_haar_block (RangeCoder *c, HaarBlockCoder *hc, uint8_t *dst, int stride, int block_size, int *block)
static void reset_coders (MSS3Context *ctx, int quality)
static av_cold void init_coders (MSS3Context *ctx)
static int mss3_decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int mss3_decode_init (AVCodecContext *avctx)
static av_cold int mss3_decode_end (AVCodecContext *avctx)

Variables

AVCodec ff_msa1_decoder


Detailed Description

Microsoft Screen 3 (aka Microsoft ATC Screen) decoder.

Definition in file mss3.c.


Define Documentation

#define HEADER_SIZE   27

Definition at line 32 of file mss3.c.

#define MODEL256_SEC_SCALE   9

Definition at line 36 of file mss3.c.

Referenced by model256_update(), and rac_get_model256_sym().

#define MODEL2_SCALE   13

Definition at line 34 of file mss3.c.

Referenced by rac_get_model2_sym().

#define MODEL_SCALE   15

Definition at line 35 of file mss3.c.

Referenced by rac_get_model256_sym(), and rac_get_model_sym().

#define RAC_BOTTOM   0x01000000


Enumeration Type Documentation

enum BlockType

Enumerator:
FILL_BLOCK 
IMAGE_BLOCK 
DCT_BLOCK 
HAAR_BLOCK 
SKIP_BLOCK 
SKIP_BLOCK 
DCT_BLOCK 
IMAGE_BLOCK 

Definition at line 67 of file mss3.c.


Function Documentation

static int decode_block_type ( RangeCoder c,
BlockTypeContext bt 
) [static]

Definition at line 426 of file mss3.c.

Referenced by mss3_decode_frame().

static int decode_coeff ( RangeCoder c,
Model m 
) [static]

static int decode_dct ( RangeCoder c,
DCTBlockCoder bc,
int block,
int  bx,
int  by 
) [static]

Definition at line 496 of file mss3.c.

Referenced by decode_dct_block().

static void decode_dct_block ( RangeCoder c,
DCTBlockCoder bc,
uint8_t dst,
int  stride,
int  block_size,
int block,
int  mb_x,
int  mb_y 
) [static]

Definition at line 558 of file mss3.c.

Referenced by mss3_decode_frame().

static void decode_fill_block ( RangeCoder c,
FillBlockCoder fc,
uint8_t dst,
int  stride,
int  block_size 
) [static]

Definition at line 451 of file mss3.c.

Referenced by mss3_decode_frame().

static void decode_haar_block ( RangeCoder c,
HaarBlockCoder hc,
uint8_t dst,
int  stride,
int  block_size,
int block 
) [static]

Definition at line 581 of file mss3.c.

Referenced by mss3_decode_frame().

static void decode_image_block ( RangeCoder c,
ImageBlockCoder ic,
uint8_t dst,
int  stride,
int  block_size 
) [static]

Definition at line 462 of file mss3.c.

Referenced by mss3_decode_frame().

static av_cold void init_coders ( MSS3Context ctx  )  [static]

Definition at line 657 of file mss3.c.

Referenced by mss3_decode_init().

static av_cold void model256_init ( Model256 m  )  [static]

Definition at line 268 of file mss3.c.

Referenced by init_coders().

static void model256_reset ( Model256 m  )  [static]

Definition at line 252 of file mss3.c.

Referenced by model256_init(), and reset_coders().

static void model256_update ( Model256 m,
int  val 
) [static]

Definition at line 215 of file mss3.c.

Referenced by model256_reset(), and rac_get_model256_sym().

static void model2_reset ( Model2 m  )  [static]

Definition at line 125 of file mss3.c.

Referenced by reset_coders().

static void model2_update ( Model2 m,
int  bit 
) [static]

Definition at line 135 of file mss3.c.

Referenced by rac_get_model2_sym().

static av_cold void model_init ( Model m,
int  num_syms 
) [static]

Definition at line 207 of file mss3.c.

static void model_reset ( Model m  )  [static]

Definition at line 191 of file mss3.c.

static void model_update ( Model m,
int  val 
) [static]

Definition at line 161 of file mss3.c.

Referenced by model_reset(), and rac_get_model_sym().

static av_cold int mss3_decode_end ( AVCodecContext avctx  )  [static]

Definition at line 846 of file mss3.c.

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

Definition at line 677 of file mss3.c.

static av_cold int mss3_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 807 of file mss3.c.

static int rac_get_bit ( RangeCoder c  )  [static]

Definition at line 305 of file mss3.c.

Referenced by decode_coeff().

static int rac_get_bits ( RangeCoder c,
int  nbits 
) [static]

Definition at line 321 of file mss3.c.

Referenced by decode_coeff(), and decode_dct().

static int rac_get_model256_sym ( RangeCoder c,
Model256 m 
) [static]

Definition at line 388 of file mss3.c.

Referenced by decode_dct(), decode_haar_block(), and decode_image_block().

static int rac_get_model2_sym ( RangeCoder c,
Model2 m 
) [static]

Definition at line 335 of file mss3.c.

Referenced by decode_dct().

static int rac_get_model_sym ( RangeCoder c,
Model m 
) [static]

Definition at line 356 of file mss3.c.

Referenced by decode_block_type(), decode_coeff(), and decode_image_block().

static void rac_init ( RangeCoder c,
const uint8_t src,
int  size 
) [static]

Definition at line 276 of file mss3.c.

Referenced by mss3_decode_frame().

static void rac_normalise ( RangeCoder c  )  [static]

static void reset_coders ( MSS3Context ctx,
int  quality 
) [static]

Definition at line 622 of file mss3.c.

Referenced by mss3_decode_frame().


Variable Documentation

Initial value:

 {
    .name           = "msa1",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = AV_CODEC_ID_MSA1,
    .priv_data_size = sizeof(MSS3Context),
    .init           = mss3_decode_init,
    .close          = mss3_decode_end,
    .decode         = mss3_decode_frame,
    .capabilities   = CODEC_CAP_DR1,
    .long_name      = NULL_IF_CONFIG_SMALL("MS ATC Screen"),
}

Definition at line 859 of file mss3.c.


Generated on Fri Oct 26 02:50:07 2012 for FFmpeg by  doxygen 1.5.8