FFmpeg
Data Structures | Macros | Functions
mss12.h File Reference
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"

Go to the source code of this file.

Data Structures

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 MAX_OVERREAD   16
 
#define ARITH_GET_BIT(prefix)
 
#define ARITH_GET_MODEL_SYM(prefix)
 

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

Definition in file mss12.h.

Macro Definition Documentation

◆ MODEL_MIN_SYMS

#define MODEL_MIN_SYMS   2

Definition at line 34 of file mss12.h.

◆ MODEL_MAX_SYMS

#define MODEL_MAX_SYMS   256

Definition at line 35 of file mss12.h.

◆ THRESH_ADAPTIVE

#define THRESH_ADAPTIVE   -1

Definition at line 36 of file mss12.h.

◆ THRESH_LOW

#define THRESH_LOW   15

Definition at line 37 of file mss12.h.

◆ THRESH_HIGH

#define THRESH_HIGH   50

Definition at line 38 of file mss12.h.

◆ MAX_OVERREAD

#define MAX_OVERREAD   16

Definition at line 51 of file mss12.h.

◆ 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 at line 104 of file mss12.h.

◆ 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 at line 120 of file mss12.h.

Function Documentation

◆ ff_mss12_decode_rect()

int ff_mss12_decode_rect ( SliceContext ctx,
ArithCoder acoder,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 542 of file mss12.c.

Referenced by ff_mss12_decode_rect(), mss1_decode_frame(), and mss2_decode_frame().

◆ ff_mss12_model_update()

void ff_mss12_model_update ( Model m,
int  val 
)

Definition at line 95 of file mss12.c.

◆ ff_mss12_slicecontext_reset()

void ff_mss12_slicecontext_reset ( SliceContext sc)

Definition at line 436 of file mss12.c.

Referenced by mss1_decode_frame(), and mss2_decode_frame().

◆ ff_mss12_decode_init()

int ff_mss12_decode_init ( MSS12Context c,
int  version,
SliceContext sc1,
SliceContext sc2 
)

Definition at line 580 of file mss12.c.

Referenced by mss1_decode_init(), and mss2_decode_init().

◆ ff_mss12_decode_end()

int ff_mss12_decode_end ( MSS12Context ctx)

Definition at line 692 of file mss12.c.

Referenced by mss1_decode_end(), and mss2_decode_end().

bit
#define bit(string, value)
Definition: cbs_mpeg2.c:56
val
static double val(void *priv, double ch)
Definition: aeval.c:78
ArithCoder
Definition: dstdec.c:57
if
if(ret)
Definition: filter_design.txt:179
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
range
enum AVColorRange range
Definition: mediacodec_wrapper.c:2646
Model
Definition: mss12.h:40