FFmpeg
Functions
scpr3.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/qsort.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "scpr.h"

Go to the source code of this file.

Functions

static void renew_table3 (uint32_t nsym, uint32_t *cntsum, uint16_t *freqs, uint16_t *freqs1, uint16_t *cnts, uint8_t *dectab)
 
static void reinit_tables3 (SCPRContext *s)
 
static int decode3 (GetByteContext *gb, RangeCoder *rc, uint32_t a, uint32_t b)
 
static void rescale (PixelModel3 *m, int *totfr)
 
static int add_symbol (PixelModel3 *m, int index, uint32_t symbol, int *totfr, int max)
 
static int decode_adaptive45 (PixelModel3 *m, int rccode, uint32_t *value, uint16_t *a, uint16_t *b, uint32_t *c, int max)
 
static int update_model6_to_7 (PixelModel3 *m)
 
static void calc_sum (PixelModel3 *m)
 
static void rescale_dec (PixelModel3 *m)
 
static int update_model5_to_6 (PixelModel3 *m, uint8_t value)
 
static void grow_dec (PixelModel3 *m)
 
static int add_dec (PixelModel3 *m, int sym, int f1, int f2)
 
static void incr_cntdec (PixelModel3 *m, int a)
 
static int decode_adaptive6 (PixelModel3 *m, uint32_t code, uint32_t *value, uint16_t *a, uint16_t *b)
 
static int cmpbytes (const void *p1, const void *p2)
 
static int update_model1_to_2 (PixelModel3 *m, uint32_t val)
 
static int update_model1_to_4 (PixelModel3 *m, uint32_t val)
 
static int update_model1_to_5 (PixelModel3 *m, uint32_t val)
 
static int decode_static1 (PixelModel3 *m, uint32_t val)
 
static int update_model2_to_6 (PixelModel3 *m, uint8_t value, int a4)
 
static int update_model2_to_3 (PixelModel3 *m, uint32_t val)
 
static int decode_static2 (PixelModel3 *m, uint32_t val)
 
static int update_model3_to_7 (PixelModel3 *m, uint8_t value)
 
static int decode_static3 (PixelModel3 *m, uint32_t val)
 
static void sync_code3 (GetByteContext *gb, RangeCoder *rc)
 
static int decode_value3 (SCPRContext *s, uint32_t max, uint32_t *cntsum, uint16_t *freqs1, uint16_t *freqs2, uint16_t *cnts, uint8_t *dectable, uint32_t *value)
 
static void calc_sum5 (PixelModel3 *m)
 
static int update_model4_to_5 (PixelModel3 *m, uint32_t value)
 
static int decode_unit3 (SCPRContext *s, PixelModel3 *m, uint32_t code, uint32_t *value)
 
static int decode_units3 (SCPRContext *s, uint32_t *red, uint32_t *green, uint32_t *blue, int *cx, int *cx1)
 
static void init_rangecoder3 (RangeCoder *rc, GetByteContext *gb)
 
static int decompress_i3 (AVCodecContext *avctx, uint32_t *dst, int linesize)
 
static int decompress_p3 (AVCodecContext *avctx, uint32_t *dst, int linesize, uint32_t *prev, int plinesize)
 

Function Documentation

◆ renew_table3()

static void renew_table3 ( uint32_t  nsym,
uint32_t *  cntsum,
uint16_t *  freqs,
uint16_t *  freqs1,
uint16_t *  cnts,
uint8_t *  dectab 
)
static

Definition at line 34 of file scpr3.c.

Referenced by reinit_tables3().

◆ reinit_tables3()

static void reinit_tables3 ( SCPRContext s)
static

Definition at line 53 of file scpr3.c.

Referenced by decompress_i3().

◆ decode3()

static int decode3 ( GetByteContext gb,
RangeCoder rc,
uint32_t  a,
uint32_t  b 
)
static

Definition at line 99 of file scpr3.c.

Referenced by decode_unit3(), and decode_value3().

◆ rescale()

static void rescale ( PixelModel3 m,
int totfr 
)
static

Definition at line 110 of file scpr3.c.

Referenced by add_symbol(), decode_adaptive45(), and update_model4_to_5().

◆ add_symbol()

static int add_symbol ( PixelModel3 m,
int  index,
uint32_t  symbol,
int totfr,
int  max 
)
static

Definition at line 123 of file scpr3.c.

Referenced by decode_adaptive45().

◆ decode_adaptive45()

static int decode_adaptive45 ( PixelModel3 m,
int  rccode,
uint32_t *  value,
uint16_t *  a,
uint16_t *  b,
uint32_t *  c,
int  max 
)
static

Definition at line 147 of file scpr3.c.

Referenced by decode_unit3().

◆ update_model6_to_7()

static int update_model6_to_7 ( PixelModel3 m)
static

Definition at line 204 of file scpr3.c.

Referenced by decode_unit3().

◆ calc_sum()

static void calc_sum ( PixelModel3 m)
static

Definition at line 249 of file scpr3.c.

Referenced by update_model2_to_6(), and update_model5_to_6().

◆ rescale_dec()

static void rescale_dec ( PixelModel3 m)
static

Definition at line 261 of file scpr3.c.

Referenced by incr_cntdec(), and update_model5_to_6().

◆ update_model5_to_6()

static int update_model5_to_6 ( PixelModel3 m,
uint8_t  value 
)
static

Definition at line 295 of file scpr3.c.

Referenced by decode_unit3().

◆ grow_dec()

static void grow_dec ( PixelModel3 m)
static

Definition at line 369 of file scpr3.c.

Referenced by decode_adaptive6().

◆ add_dec()

static int add_dec ( PixelModel3 m,
int  sym,
int  f1,
int  f2 
)
static

Definition at line 378 of file scpr3.c.

Referenced by decode_adaptive6().

◆ incr_cntdec()

static void incr_cntdec ( PixelModel3 m,
int  a 
)
static

Definition at line 395 of file scpr3.c.

Referenced by decode_adaptive6().

◆ decode_adaptive6()

static int decode_adaptive6 ( PixelModel3 m,
uint32_t  code,
uint32_t *  value,
uint16_t *  a,
uint16_t *  b 
)
static

Definition at line 420 of file scpr3.c.

Referenced by decode_unit3().

◆ cmpbytes()

static int cmpbytes ( const void *  p1,
const void *  p2 
)
static

Definition at line 475 of file scpr3.c.

Referenced by update_model1_to_4(), and update_model2_to_6().

◆ update_model1_to_2()

static int update_model1_to_2 ( PixelModel3 m,
uint32_t  val 
)
static

Definition at line 482 of file scpr3.c.

Referenced by decode_static1().

◆ update_model1_to_4()

static int update_model1_to_4 ( PixelModel3 m,
uint32_t  val 
)
static

Definition at line 499 of file scpr3.c.

Referenced by decode_static1(), and update_model1_to_5().

◆ update_model1_to_5()

static int update_model1_to_5 ( PixelModel3 m,
uint32_t  val 
)
static

Definition at line 525 of file scpr3.c.

Referenced by decode_static1().

◆ decode_static1()

static int decode_static1 ( PixelModel3 m,
uint32_t  val 
)
static

Definition at line 541 of file scpr3.c.

Referenced by decode_unit3().

◆ update_model2_to_6()

static int update_model2_to_6 ( PixelModel3 m,
uint8_t  value,
int  a4 
)
static

Definition at line 563 of file scpr3.c.

Referenced by decode_static2().

◆ update_model2_to_3()

static int update_model2_to_3 ( PixelModel3 m,
uint32_t  val 
)
static

Definition at line 622 of file scpr3.c.

Referenced by decode_static2().

◆ decode_static2()

static int decode_static2 ( PixelModel3 m,
uint32_t  val 
)
static

Definition at line 640 of file scpr3.c.

Referenced by decode_unit3().

◆ update_model3_to_7()

static int update_model3_to_7 ( PixelModel3 m,
uint8_t  value 
)
static

Definition at line 666 of file scpr3.c.

Referenced by decode_static3().

◆ decode_static3()

static int decode_static3 ( PixelModel3 m,
uint32_t  val 
)
static

Definition at line 706 of file scpr3.c.

Referenced by decode_unit3().

◆ sync_code3()

static void sync_code3 ( GetByteContext gb,
RangeCoder rc 
)
static

Definition at line 723 of file scpr3.c.

Referenced by decode_unit3(), decode_value3(), and decompress_p3().

◆ decode_value3()

static int decode_value3 ( SCPRContext s,
uint32_t  max,
uint32_t *  cntsum,
uint16_t *  freqs1,
uint16_t *  freqs2,
uint16_t *  cnts,
uint8_t *  dectable,
uint32_t *  value 
)
static

Definition at line 732 of file scpr3.c.

Referenced by decode_unit3(), decompress_i3(), and decompress_p3().

◆ calc_sum5()

static void calc_sum5 ( PixelModel3 m)
static

Definition at line 783 of file scpr3.c.

Referenced by update_model4_to_5().

◆ update_model4_to_5()

static int update_model4_to_5 ( PixelModel3 m,
uint32_t  value 
)
static

Definition at line 793 of file scpr3.c.

Referenced by decode_unit3().

◆ decode_unit3()

static int decode_unit3 ( SCPRContext s,
PixelModel3 m,
uint32_t  code,
uint32_t *  value 
)
static

Definition at line 823 of file scpr3.c.

Referenced by decode_units3().

◆ decode_units3()

static int decode_units3 ( SCPRContext s,
uint32_t *  red,
uint32_t *  green,
uint32_t *  blue,
int cx,
int cx1 
)
static

Definition at line 892 of file scpr3.c.

Referenced by decompress_i3(), and decompress_p3().

◆ init_rangecoder3()

static void init_rangecoder3 ( RangeCoder rc,
GetByteContext gb 
)
static

Definition at line 923 of file scpr3.c.

Referenced by decompress_i3(), and decompress_p3().

◆ decompress_i3()

static int decompress_i3 ( AVCodecContext avctx,
uint32_t *  dst,
int  linesize 
)
static

Definition at line 929 of file scpr3.c.

Referenced by decode_frame().

◆ decompress_p3()

static int decompress_p3 ( AVCodecContext avctx,
uint32_t *  dst,
int  linesize,
uint32_t *  prev,
int  plinesize 
)
static

Definition at line 1012 of file scpr3.c.

Referenced by decode_frame().