FFmpeg
Loading...
Searching...
No Matches
snow.c File Reference
#include <assert.h>
#include "libavutil/avassert.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "snow_dwt.h"
#include "snow.h"
#include "snowdata.h"
#include "h264qpel_template.c"

Go to the source code of this file.

Macros

#define pixeltmp   int16_t
 
#define BIT_DEPTH   8
 
#define SNOW
 
#define MC_STRIDE(x)
 
#define mca(dx, dy, b_w)
 
#define mcfh(dx, dy)
 

Functions

static void put_snow_qpel2_h_lowpass_8 (uint8_t *dst, const uint8_t *restrict src, int dstStride, int srcStride)
 
static void put_snow_qpel2_v_lowpass_8 (uint8_t *dst, const uint8_t *restrict src, int dstStride, int srcStride)
 
static void put_snow_qpel2_hv_lowpass_8 (uint8_t *dst, pixeltmp *tmp, const uint8_t *restrict src, int dstStride, int tmpStride, int srcStride)
 
static av_cold void init_qpel (SnowContext *const s)
 
void ff_snow_inner_add_yblock_c (const uint8_t *obmc, const int obmc_stride, uint8_t **block, int b_w, int b_h, int src_x, int src_stride, IDWTELEM *const *lines, int add, uint8_t *dst8)
 
void ff_snow_reset_contexts (SnowContext *s)
 
int ff_snow_alloc_blocks (SnowContext *s)
 
static void mc_block (Plane *p, uint8_t *dst, const uint8_t *src, int stride, int b_w, int b_h, int dx, int dy)
 
void ff_snow_pred_block (SnowContext *s, uint8_t *dst, uint8_t *tmp, ptrdiff_t stride, int sx, int sy, int b_w, int b_h, const BlockNode *block, int plane_index, int w, int h)
 
 mca (mca(8, mca(0, 16)
 
av_cold int ff_snow_common_init (AVCodecContext *avctx)
 
int ff_snow_common_init_after_header (AVCodecContext *avctx)
 
int ff_snow_frames_prepare (SnowContext *s)
 
av_cold void ff_snow_common_end (SnowContext *s)
 

Macro Definition Documentation

◆ pixeltmp

#define pixeltmp   int16_t

Definition at line 32 of file snow.c.

◆ BIT_DEPTH

#define BIT_DEPTH   8

Definition at line 33 of file snow.c.

◆ SNOW

#define SNOW

Definition at line 34 of file snow.c.

◆ MC_STRIDE

#define MC_STRIDE ( x)
Value:
(needs[x] ? 64 : stride)
#define stride

Referenced by mc_block().

◆ mca

#define mca ( dx,
dy,
b_w )
Value:
static void mc_block_hpel ## dx ## dy ## b_w(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h){\
av_assert2(h==b_w);\
mc_block(NULL, dst, src-(HTAPS_MAX/2-1)-(HTAPS_MAX/2-1)*stride, stride, b_w, b_w, dx, dy);\
}
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
#define NULL
Definition coverity.c:32
#define HTAPS_MAX
Definition snow.h:75
#define src
Definition vp8dsp.c:248

Definition at line 467 of file snow.c.

Referenced by mca().

◆ mcfh

#define mcfh ( dx,
dy )
Value:
s->hdsp.put_pixels_tab [0][dy/4+dx/8]=\
s->hdsp.put_no_rnd_pixels_tab[0][dy/4+dx/8]=\
mc_block_hpel ## dx ## dy ## 16;\
s->hdsp.put_pixels_tab [1][dy/4+dx/8]=\
s->hdsp.put_no_rnd_pixels_tab[1][dy/4+dx/8]=\
mc_block_hpel ## dx ## dy ## 8;
#define s(width, name)
Definition cbs_vp9.c:198

Referenced by ff_snow_common_init().

Function Documentation

◆ put_snow_qpel2_h_lowpass_8()

static void put_snow_qpel2_h_lowpass_8 ( uint8_t * dst,
const uint8_t *restrict src,
int dstStride,
int srcStride )
static

Definition at line 37 of file snow.c.

◆ put_snow_qpel2_v_lowpass_8()

static void put_snow_qpel2_v_lowpass_8 ( uint8_t * dst,
const uint8_t *restrict src,
int dstStride,
int srcStride )
static

Definition at line 48 of file snow.c.

◆ put_snow_qpel2_hv_lowpass_8()

static void put_snow_qpel2_hv_lowpass_8 ( uint8_t * dst,
pixeltmp * tmp,
const uint8_t *restrict src,
int dstStride,
int tmpStride,
int srcStride )
static

Definition at line 66 of file snow.c.

◆ init_qpel()

static av_cold void init_qpel ( SnowContext *const s)
static

Definition at line 95 of file snow.c.

Referenced by ff_snow_common_init(), and init_qpel().

◆ ff_snow_inner_add_yblock_c()

void ff_snow_inner_add_yblock_c ( const uint8_t * obmc,
const int obmc_stride,
uint8_t ** block,
int b_w,
int b_h,
int src_x,
int src_stride,
IDWTELEM *const * lines,
int add,
uint8_t * dst8 )

Definition at line 118 of file snow.c.

Referenced by ff_dwt_init().

◆ ff_snow_reset_contexts()

void ff_snow_reset_contexts ( SnowContext * s)

Definition at line 157 of file snow.c.

Referenced by decode_header(), and encode_header().

◆ ff_snow_alloc_blocks()

int ff_snow_alloc_blocks ( SnowContext * s)

Definition at line 171 of file snow.c.

Referenced by decode_frame(), and encode_init().

◆ mc_block()

static void mc_block ( Plane * p,
uint8_t * dst,
const uint8_t * src,
int stride,
int b_w,
int b_h,
int dx,
int dy )
static

Definition at line 186 of file snow.c.

Referenced by ff_snow_pred_block().

◆ ff_snow_pred_block()

void ff_snow_pred_block ( SnowContext * s,
uint8_t * dst,
uint8_t * tmp,
ptrdiff_t stride,
int sx,
int sy,
int b_w,
int b_h,
const BlockNode * block,
int plane_index,
int w,
int h )

Definition at line 379 of file snow.c.

Referenced by add_yblock(), and get_block_rd().

◆ mca()

mca ( mca( 8,
mca( 0,
16  )

Definition at line 473 of file snow.c.

◆ ff_snow_common_init()

av_cold int ff_snow_common_init ( AVCodecContext * avctx)

Definition at line 487 of file snow.c.

Referenced by encode_init().

◆ ff_snow_common_init_after_header()

int ff_snow_common_init_after_header ( AVCodecContext * avctx)

Definition at line 542 of file snow.c.

Referenced by decode_frame(), and encode_frame().

◆ ff_snow_frames_prepare()

int ff_snow_frames_prepare ( SnowContext * s)

Definition at line 603 of file snow.c.

Referenced by decode_frame(), and encode_frame().

◆ ff_snow_common_end()

av_cold void ff_snow_common_end ( SnowContext * s)

Definition at line 634 of file snow.c.

Referenced by decode_end(), and encode_end().