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

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

#include "libavutil/intfloat.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "mss12.h"

Go to the source code of this file.

Enumerations

enum  SplitMode { SPLIT_VERT = 0, SPLIT_HOR, SPLIT_NONE }
 
enum  ContextDirection { TOP_LEFT = 0, TOP, TOP_RIGHT, LEFT }
 

Functions

static int model_calc_threshold (Model *m)
 
static void model_reset (Model *m)
 
static av_cold void model_init (Model *m, int num_syms, int thr_weight)
 
static void model_rescale_weights (Model *m)
 
void ff_mss12_model_update (Model *m, int val)
 
static void pixctx_reset (PixContext *ctx)
 
static av_cold void pixctx_init (PixContext *ctx, int cache_size, int full_model_syms, int special_initial_cache)
 
static av_always_inline int decode_pixel (ArithCoder *acoder, PixContext *pctx, uint8_t *ngb, int num_ngb, int any_ngb)
 
static int decode_pixel_in_context (ArithCoder *acoder, PixContext *pctx, uint8_t *src, int stride, int x, int y, int has_right)
 
static int decode_region (ArithCoder *acoder, uint8_t *dst, uint8_t *rgb_pic, int x, int y, int width, int height, int stride, int rgb_stride, PixContext *pctx, const uint32_t *pal)
 
static void copy_rectangles (MSS12Context const *c, int x, int y, int width, int height)
 
static int motion_compensation (MSS12Context const *c, int x, int y, int width, int height)
 
static int decode_region_masked (MSS12Context const *c, ArithCoder *acoder, uint8_t *dst, int stride, uint8_t *mask, int mask_stride, int x, int y, int width, int height, PixContext *pctx)
 
static av_cold void slicecontext_init (SliceContext *sc, int version, int full_model_syms)
 
void ff_mss12_slicecontext_reset (SliceContext *sc)
 
static int decode_pivot (SliceContext *sc, ArithCoder *acoder, int base)
 
static int decode_region_intra (SliceContext *sc, ArithCoder *acoder, int x, int y, int width, int height)
 
static int decode_region_inter (SliceContext *sc, ArithCoder *acoder, int x, int y, int width, int height)
 
int ff_mss12_decode_rect (SliceContext *sc, ArithCoder *acoder, int x, int y, int width, int height)
 
av_cold int ff_mss12_decode_init (MSS12Context *c, int version, SliceContext *sc1, SliceContext *sc2)
 
av_cold int ff_mss12_decode_end (MSS12Context *c)
 

Variables

static const int sec_order_sizes [4] = { 1, 7, 6, 1 }
 

Detailed Description

Common functions for Microsoft Screen 1 and 2.

Definition in file mss12.c.

Enumeration Type Documentation

enum SplitMode
Enumerator:
SPLIT_VERT 
SPLIT_HOR 
SPLIT_NONE 

Definition at line 31 of file mss12.c.

Enumerator:
TOP_LEFT 
TOP 
TOP_RIGHT 
LEFT 

Definition at line 39 of file mss12.c.

Function Documentation

static int model_calc_threshold ( Model m)
static

Definition at line 46 of file mss12.c.

Referenced by model_rescale_weights().

static void model_reset ( Model m)
static

Definition at line 56 of file mss12.c.

Referenced by ff_mss12_slicecontext_reset().

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

Definition at line 69 of file mss12.c.

Referenced by pixctx_init(), and slicecontext_init().

static void model_rescale_weights ( Model m)
static

Definition at line 76 of file mss12.c.

Referenced by ff_mss12_model_update().

void ff_mss12_model_update ( Model m,
int  val 
)

Definition at line 93 of file mss12.c.

static void pixctx_reset ( PixContext ctx)
static

Definition at line 117 of file mss12.c.

Referenced by ff_mss12_slicecontext_reset().

static av_cold void pixctx_init ( PixContext ctx,
int  cache_size,
int  full_model_syms,
int  special_initial_cache 
)
static

Definition at line 138 of file mss12.c.

Referenced by slicecontext_init().

static av_always_inline int decode_pixel ( ArithCoder acoder,
PixContext pctx,
uint8_t ngb,
int  num_ngb,
int  any_ngb 
)
static
static int decode_pixel_in_context ( ArithCoder acoder,
PixContext pctx,
uint8_t src,
int  stride,
int  x,
int  y,
int  has_right 
)
static

Definition at line 197 of file mss12.c.

Referenced by decode_region(), and decode_region_masked().

static int decode_region ( ArithCoder acoder,
uint8_t dst,
uint8_t rgb_pic,
int  x,
int  y,
int  width,
int  height,
int  stride,
int  rgb_stride,
PixContext pctx,
const uint32_t *  pal 
)
static

Definition at line 290 of file mss12.c.

Referenced by decode_region_inter(), and decode_region_intra().

static void copy_rectangles ( MSS12Context const *  c,
int  x,
int  y,
int  width,
int  height 
)
static

Definition at line 318 of file mss12.c.

Referenced by decode_region_inter(), and decode_region_masked().

static int motion_compensation ( MSS12Context const *  c,
int  x,
int  y,
int  width,
int  height 
)
static

Definition at line 334 of file mss12.c.

Referenced by decode_region_inter(), and decode_region_masked().

static int decode_region_masked ( MSS12Context const *  c,
ArithCoder acoder,
uint8_t dst,
int  stride,
uint8_t mask,
int  mask_stride,
int  x,
int  y,
int  width,
int  height,
PixContext pctx 
)
static

Definition at line 368 of file mss12.c.

Referenced by decode_region_inter().

static av_cold void slicecontext_init ( SliceContext sc,
int  version,
int  full_model_syms 
)
static

Definition at line 411 of file mss12.c.

Referenced by ff_mss12_decode_init().

void ff_mss12_slicecontext_reset ( SliceContext sc)

Definition at line 426 of file mss12.c.

Referenced by mss1_decode_frame(), and mss2_decode_frame().

static int decode_pivot ( SliceContext sc,
ArithCoder acoder,
int  base 
)
static

Definition at line 437 of file mss12.c.

Referenced by ff_mss12_decode_rect().

static int decode_region_intra ( SliceContext sc,
ArithCoder acoder,
int  x,
int  y,
int  width,
int  height 
)
static

Definition at line 457 of file mss12.c.

Referenced by decode_region_inter(), and ff_mss12_decode_rect().

static int decode_region_inter ( SliceContext sc,
ArithCoder acoder,
int  x,
int  y,
int  width,
int  height 
)
static

Definition at line 489 of file mss12.c.

Referenced by ff_mss12_decode_rect().

int ff_mss12_decode_rect ( SliceContext sc,
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().

av_cold 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().

av_cold int ff_mss12_decode_end ( MSS12Context c)

Definition at line 674 of file mss12.c.

Referenced by mss1_decode_end(), and mss2_decode_end().

Variable Documentation

const int sec_order_sizes[4] = { 1, 7, 6, 1 }
static

Definition at line 37 of file mss12.c.

Referenced by pixctx_init().