FFmpeg
Classes | Macros | Typedefs | Functions
mss12.h File Reference

Common header for Microsoft Screen 1 and 2. More...

#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"

Go to the source code of this file.

Classes

struct  Model
 
struct  ArithCoder
 
struct  PixContext
 
struct  SliceContext
 
struct  MSS12Context
 

Macros

#define MODEL_MIN_SYMS   2
 
#define MODEL_MAX_SYMS   256
 
#define THRESH_ADAPTIVE   -1
 
#define THRESH_LOW   15
 
#define THRESH_HIGH   50
 
#define ARITH_GET_BIT(prefix)
 
#define ARITH_GET_MODEL_SYM(prefix)
 

Typedefs

typedef struct Model Model
 
typedef struct ArithCoder ArithCoder
 
typedef struct PixContext PixContext
 
typedef struct SliceContext SliceContext
 
typedef struct MSS12Context MSS12Context
 

Functions

int ff_mss12_decode_rect (SliceContext *ctx, ArithCoder *acoder, int x, int y, int width, int height)
 
void ff_mss12_model_update (Model *m, int val)
 
void ff_mss12_slicecontext_reset (SliceContext *sc)
 
int ff_mss12_decode_init (MSS12Context *c, int version, SliceContext *sc1, SliceContext *sc2)
 
int ff_mss12_decode_end (MSS12Context *ctx)
 

Detailed Description

Common header for Microsoft Screen 1 and 2.

Macro Definition Documentation

§ ARITH_GET_BIT

#define ARITH_GET_BIT (   prefix)
Value:
static int prefix ## _get_bit(ArithCoder *c) \
{ \
int range = c->high - c->low + 1; \
int bit = 2 * c->value - c->low >= c->high; \
\
if (bit) \
c->low += range >> 1; \
else \
c->high = c->low + (range >> 1) - 1; \
\
prefix ## _normalise(c); \
\
return bit; \
}
Definition: dstdec.c:56

§ ARITH_GET_MODEL_SYM

#define ARITH_GET_MODEL_SYM (   prefix)
Value:
static int prefix ## _get_model_sym(ArithCoder *c, Model *m) \
{ \
int idx, val; \
\
idx = prefix ## _get_prob(c, m->cum_prob); \
\
val = m->idx2sym[idx]; \
ff_mss12_model_update(m, idx); \
\
prefix ## _normalise(c); \
\
return val; \
}
Definition: mss12.h:40
Definition: dstdec.c:56