FFmpeg
Macros | Functions | Variables
snowdec.c File Reference
#include "libavutil/emms.h"
#include "libavutil/intmath.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "snow_dwt.h"
#include "snow.h"
#include "rangecoder.h"
#include "mathops.h"

Go to the source code of this file.

Macros

#define GET_S(dst, check)
 

Functions

static int get_symbol (RangeCoder *c, uint8_t *state, int is_signed)
 
static int get_symbol2 (RangeCoder *c, uint8_t *state, int log2)
 
static void unpack_coeffs (SnowContext *s, SubBand *b, SubBand *parent, int orientation)
 
static av_always_inline void predict_slice_buffered (SnowContext *s, slice_buffer *sb, IDWTELEM *old_buffer, int plane_index, int add, int mb_y)
 
static void decode_subband_slice_buffered (SnowContext *s, SubBand *b, slice_buffer *sb, int start_y, int h, int save_state[1])
 
static int decode_q_branch (SnowContext *s, int level, int x, int y)
 
static void dequantize_slice_buffered (SnowContext *s, slice_buffer *sb, SubBand *b, IDWTELEM *src, int stride, int start_y, int end_y)
 
static void correlate_slice_buffered (SnowContext *s, slice_buffer *sb, SubBand *b, IDWTELEM *src, int stride, int inverse, int use_median, int start_y, int end_y)
 
static void decode_qlogs (SnowContext *s)
 
static int decode_header (SnowContext *s)
 
static int decode_blocks (SnowContext *s)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *picture, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_snow_decoder
 

Macro Definition Documentation

◆ GET_S

#define GET_S (   dst,
  check 
)
Value:
tmp= get_symbol(&s->c, s->header_state, 0);\
if(!(check)){\
av_log(s->avctx, AV_LOG_ERROR, "Error " #dst " is %d\n", tmp);\
}\
dst= tmp;

Definition at line 440 of file snowdec.c.

Function Documentation

◆ get_symbol()

static int get_symbol ( RangeCoder c,
uint8_t *  state,
int  is_signed 
)
inlinestatic

Definition at line 34 of file snowdec.c.

Referenced by decode_header(), decode_q_branch(), and decode_qlogs().

◆ get_symbol2()

static int get_symbol2 ( RangeCoder c,
uint8_t *  state,
int  log2 
)
inlinestatic

Definition at line 57 of file snowdec.c.

Referenced by unpack_coeffs().

◆ unpack_coeffs()

static void unpack_coeffs ( SnowContext s,
SubBand b,
SubBand parent,
int  orientation 
)
static

Definition at line 76 of file snowdec.c.

Referenced by decode_frame().

◆ predict_slice_buffered()

static av_always_inline void predict_slice_buffered ( SnowContext s,
slice_buffer *  sb,
IDWTELEM old_buffer,
int  plane_index,
int  add,
int  mb_y 
)
static

Definition at line 181 of file snowdec.c.

Referenced by decode_frame().

◆ decode_subband_slice_buffered()

static void decode_subband_slice_buffered ( SnowContext s,
SubBand b,
slice_buffer *  sb,
int  start_y,
int  h,
int  save_state[1] 
)
inlinestatic

Definition at line 263 of file snowdec.c.

Referenced by decode_frame().

◆ decode_q_branch()

static int decode_q_branch ( SnowContext s,
int  level,
int  x,
int  y 
)
static

Definition at line 304 of file snowdec.c.

Referenced by decode_blocks().

◆ dequantize_slice_buffered()

static void dequantize_slice_buffered ( SnowContext s,
slice_buffer *  sb,
SubBand b,
IDWTELEM src,
int  stride,
int  start_y,
int  end_y 
)
static

Definition at line 371 of file snowdec.c.

Referenced by decode_frame().

◆ correlate_slice_buffered()

static void correlate_slice_buffered ( SnowContext s,
slice_buffer *  sb,
SubBand b,
IDWTELEM src,
int  stride,
int  inverse,
int  use_median,
int  start_y,
int  end_y 
)
static

Definition at line 394 of file snowdec.c.

Referenced by decode_frame().

◆ decode_qlogs()

static void decode_qlogs ( SnowContext s)
static

Definition at line 424 of file snowdec.c.

Referenced by decode_header().

◆ decode_header()

static int decode_header ( SnowContext s)
static

Definition at line 448 of file snowdec.c.

Referenced by decode_frame().

◆ decode_blocks()

static int decode_blocks ( SnowContext s)
static

Definition at line 571 of file snowdec.c.

Referenced by decode_frame().

◆ decode_frame()

static int decode_frame ( AVCodecContext avctx,
AVFrame picture,
int *  got_frame,
AVPacket avpkt 
)
static

Definition at line 588 of file snowdec.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 808 of file snowdec.c.

Variable Documentation

◆ ff_snow_decoder

const FFCodec ff_snow_decoder
Initial value:
= {
.p.name = "snow",
CODEC_LONG_NAME("Snow"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(SnowContext),
.close = decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 822 of file snowdec.c.

FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:43
tmp
static uint8_t tmp[11]
Definition: aes_ctr.c:28
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *picture, int *got_frame, AVPacket *avpkt)
Definition: snowdec.c:588
SnowContext
Definition: snow.h:113
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:209
check
#define check(x, y, S, v)
Definition: motion_est_template.c:405
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
s
#define s(width, name)
Definition: cbs_vp9.c:198
ff_snow_common_init
av_cold int ff_snow_common_init(AVCodecContext *avctx)
Definition: snow.c:395
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
get_symbol
static int get_symbol(RangeCoder *c, uint8_t *state, int is_signed)
Definition: snowdec.c:34
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:83
AV_CODEC_ID_SNOW
@ AV_CODEC_ID_SNOW
Definition: codec_id.h:263
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: snowdec.c:808