FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
mss3.c File Reference

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

#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "mathops.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
 

Macros

#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, ptrdiff_t stride, int block_size)
 
static void decode_image_block (RangeCoder *c, ImageBlockCoder *ic, uint8_t *dst, ptrdiff_t 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, ptrdiff_t stride, int block_size, int *block, int mb_x, int mb_y)
 
static void decode_haar_block (RangeCoder *c, HaarBlockCoder *hc, uint8_t *dst, ptrdiff_t 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 *got_frame, AVPacket *avpkt)
 
static av_cold int mss3_decode_end (AVCodecContext *avctx)
 
static av_cold int mss3_decode_init (AVCodecContext *avctx)
 

Variables

AVCodec ff_msa1_decoder
 

Detailed Description

Microsoft Screen 3 (aka Microsoft ATC Screen) decoder.

Definition in file mss3.c.

Macro Definition Documentation

#define HEADER_SIZE   27

Definition at line 33 of file mss3.c.

Referenced by mss3_decode_frame().

#define MODEL2_SCALE   13

Definition at line 35 of file mss3.c.

Referenced by rac_get_model2_sym().

#define MODEL_SCALE   15

Definition at line 36 of file mss3.c.

Referenced by rac_get_model256_sym(), and rac_get_model_sym().

#define MODEL256_SEC_SCALE   9

Definition at line 37 of file mss3.c.

Referenced by model256_update(), and rac_get_model256_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 68 of file mss3.c.

Function Documentation

static void model2_reset ( Model2 m)
static

Definition at line 126 of file mss3.c.

Referenced by reset_coders().

static void model2_update ( Model2 m,
int  bit 
)
static

Definition at line 136 of file mss3.c.

Referenced by rac_get_model2_sym().

static void model_update ( Model m,
int  val 
)
static

Definition at line 162 of file mss3.c.

Referenced by model_reset(), and rac_get_model_sym().

static void model_reset ( Model m)
static

Definition at line 192 of file mss3.c.

Referenced by model_init(), and reset_coders().

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

Definition at line 208 of file mss3.c.

Referenced by init_coders().

static void model256_update ( Model256 m,
int  val 
)
static

Definition at line 216 of file mss3.c.

Referenced by model256_reset(), and rac_get_model256_sym().

static void model256_reset ( Model256 m)
static

Definition at line 253 of file mss3.c.

Referenced by model256_init(), and reset_coders().

static av_cold void model256_init ( Model256 m)
static

Definition at line 269 of file mss3.c.

Referenced by init_coders().

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

Definition at line 277 of file mss3.c.

Referenced by mss3_decode_frame().

static void rac_normalise ( RangeCoder c)
static
static int rac_get_bit ( RangeCoder c)
static

Definition at line 306 of file mss3.c.

Referenced by decode_coeff().

static int rac_get_bits ( RangeCoder c,
int  nbits 
)
static

Definition at line 322 of file mss3.c.

Referenced by decode_coeff(), and decode_dct().

static int rac_get_model2_sym ( RangeCoder c,
Model2 m 
)
static

Definition at line 336 of file mss3.c.

Referenced by decode_dct().

static int rac_get_model_sym ( RangeCoder c,
Model m 
)
static

Definition at line 357 of file mss3.c.

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

static int rac_get_model256_sym ( RangeCoder c,
Model256 m 
)
static

Definition at line 390 of file mss3.c.

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

static int decode_block_type ( RangeCoder c,
BlockTypeContext bt 
)
static

Definition at line 429 of file mss3.c.

Referenced by mss3_decode_frame().

static int decode_coeff ( RangeCoder c,
Model m 
)
static

Definition at line 436 of file mss3.c.

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

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

Definition at line 454 of file mss3.c.

Referenced by mss3_decode_frame().

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

Definition at line 465 of file mss3.c.

Referenced by mss3_decode_frame().

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

Definition at line 499 of file mss3.c.

Referenced by decode_dct_block().

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

Definition at line 561 of file mss3.c.

Referenced by mss3_decode_frame().

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

Definition at line 584 of file mss3.c.

Referenced by mss3_decode_frame().

static void reset_coders ( MSS3Context ctx,
int  quality 
)
static

Definition at line 625 of file mss3.c.

Referenced by mss3_decode_frame().

static av_cold void init_coders ( MSS3Context ctx)
static

Definition at line 660 of file mss3.c.

Referenced by mss3_decode_init().

static int mss3_decode_frame ( AVCodecContext avctx,
void data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 680 of file mss3.c.

static av_cold int mss3_decode_end ( AVCodecContext avctx)
static

Definition at line 808 of file mss3.c.

Referenced by mss3_decode_init().

static av_cold int mss3_decode_init ( AVCodecContext avctx)
static

Definition at line 820 of file mss3.c.

Variable Documentation

AVCodec ff_msa1_decoder
Initial value:
= {
.name = "msa1",
.long_name = NULL_IF_CONFIG_SMALL("MS ATC Screen"),
.priv_data_size = sizeof(MSS3Context),
.close = mss3_decode_end,
.capabilities = AV_CODEC_CAP_DR1,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static int mss3_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: mss3.c:680
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int mss3_decode_init(AVCodecContext *avctx)
Definition: mss3.c:820
static av_cold int mss3_decode_end(AVCodecContext *avctx)
Definition: mss3.c:808
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:968

Definition at line 865 of file mss3.c.