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"
Include dependency graph for mss12.h:
This graph shows which files directly or indirectly include this file:

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 ARITH_GET_BIT(VERSION)
 
#define ARITH_GET_MODEL_SYM(VERSION)
 

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.

Definition in file mss12.h.

Macro Definition Documentation

#define ARITH_GET_BIT (   VERSION)
Value:
static int arith ## VERSION ## _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; \
c->high = c->low + (range >> 1) - 1; \
\
arith ## VERSION ## _normalise(c); \
\
return bit; \
}
location of range
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
static double c[64]
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return

Definition at line 102 of file mss12.h.

Referenced by arith2_normalise(), and arith_normalise().

#define ARITH_GET_MODEL_SYM (   VERSION)
Value:
static int arith ## VERSION ## _get_model_sym(ArithCoder *c, Model *m) \
{ \
int idx, val; \
\
idx = arith ## VERSION ## _get_prob(c, m->cum_prob); \
\
val = m->idx2sym[idx]; \
\
arith ## VERSION ## _normalise(c); \
\
}
Definition: mss12.h:40
window constants for m
static double c[64]
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return
void ff_mss12_model_update(Model *m, int val)
Definition: mss12.c:93

Definition at line 118 of file mss12.h.

Referenced by arith2_get_prob(), and arith_get_prob().

#define MODEL_MAX_SYMS   256

Definition at line 35 of file mss12.h.

#define MODEL_MIN_SYMS   2

Definition at line 34 of file mss12.h.

#define THRESH_ADAPTIVE   -1

Definition at line 36 of file mss12.h.

Referenced by model_rescale_weights(), pixctx_init(), and slicecontext_init().

#define THRESH_HIGH   50

Definition at line 38 of file mss12.h.

Referenced by pixctx_init(), and slicecontext_init().

#define THRESH_LOW   15

Definition at line 37 of file mss12.h.

Referenced by pixctx_init(), and slicecontext_init().

Typedef Documentation

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

Function Documentation

int ff_mss12_decode_end ( MSS12Context ctx)

Definition at line 674 of file mss12.c.

Referenced by mss1_decode_end(), and mss2_decode_end().

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

Definition at line 562 of file mss12.c.

Referenced by mss1_decode_init(), and mss2_decode_init().

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

Definition at line 526 of file mss12.c.

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

void ff_mss12_model_update ( Model m,
int  val 
)

Definition at line 93 of file mss12.c.

void ff_mss12_slicecontext_reset ( SliceContext sc)

Definition at line 426 of file mss12.c.

Referenced by mss1_decode_frame(), and mss2_decode_frame().