FFmpeg
Macros | Functions
qpeldsp.c File Reference
#include <stddef.h>
#include <stdint.h>
#include "config.h"
#include "libavutil/attributes.h"
#include "copy_block.h"
#include "qpeldsp.h"
#include "diracdsp.h"
#include "hpel_template.c"
#include "pel_template.c"
#include "qpel_template.c"

Go to the source code of this file.

Macros

#define BIT_DEPTH   8
 
#define QPEL_MC(r, OPNAME, RND, OP)
 
#define op_avg(a, b)   a = (((a) + cm[((b) + 16) >> 5] + 1) >> 1)
 
#define op_put(a, b)   a = cm[((b) + 16) >> 5]
 
#define op_put_no_rnd(a, b)   a = cm[((b) + 15) >> 5]
 
#define put_qpel8_mc00_c   ff_put_pixels8x8_c
 
#define avg_qpel8_mc00_c   ff_avg_pixels8x8_c
 
#define put_qpel16_mc00_c   ff_put_pixels16x16_c
 
#define avg_qpel16_mc00_c   ff_avg_pixels16x16_c
 
#define put_no_rnd_qpel8_mc00_c   ff_put_pixels8x8_c
 
#define put_no_rnd_qpel16_mc00_c   ff_put_pixels16x16_c
 
#define dspfunc(PFX, IDX, NUM)
 

Functions

void ff_put_pixels8x8_c (uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
 
void ff_avg_pixels8x8_c (uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
 
void ff_put_pixels16x16_c (uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
 
void ff_avg_pixels16x16_c (uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
 
void ff_put_pixels8_l2_8 (uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, int h)
 
av_cold void ff_qpeldsp_init (QpelDSPContext *c)
 

Detailed Description

quarterpel DSP functions

Definition in file qpeldsp.c.

Macro Definition Documentation

◆ BIT_DEPTH

#define BIT_DEPTH   8

Definition at line 37 of file qpeldsp.c.

◆ QPEL_MC

#define QPEL_MC (   r,
  OPNAME,
  RND,
  OP 
)

Definition at line 42 of file qpeldsp.c.

◆ op_avg

#define op_avg (   a,
  b 
)    a = (((a) + cm[((b) + 16) >> 5] + 1) >> 1)

Definition at line 691 of file qpeldsp.c.

◆ op_put

#define op_put (   a,
  b 
)    a = cm[((b) + 16) >> 5]

Definition at line 692 of file qpeldsp.c.

◆ op_put_no_rnd

#define op_put_no_rnd (   a,
  b 
)    a = cm[((b) + 15) >> 5]

Definition at line 693 of file qpeldsp.c.

◆ put_qpel8_mc00_c

#define put_qpel8_mc00_c   ff_put_pixels8x8_c

Definition at line 723 of file qpeldsp.c.

◆ avg_qpel8_mc00_c

#define avg_qpel8_mc00_c   ff_avg_pixels8x8_c

Definition at line 724 of file qpeldsp.c.

◆ put_qpel16_mc00_c

#define put_qpel16_mc00_c   ff_put_pixels16x16_c

Definition at line 725 of file qpeldsp.c.

◆ avg_qpel16_mc00_c

#define avg_qpel16_mc00_c   ff_avg_pixels16x16_c

Definition at line 726 of file qpeldsp.c.

◆ put_no_rnd_qpel8_mc00_c

#define put_no_rnd_qpel8_mc00_c   ff_put_pixels8x8_c

Definition at line 727 of file qpeldsp.c.

◆ put_no_rnd_qpel16_mc00_c

#define put_no_rnd_qpel16_mc00_c   ff_put_pixels16x16_c

Definition at line 728 of file qpeldsp.c.

◆ dspfunc

#define dspfunc (   PFX,
  IDX,
  NUM 
)
Value:
c->PFX ## _pixels_tab[IDX][0] = PFX ## NUM ## _mc00_c; \
c->PFX ## _pixels_tab[IDX][1] = PFX ## NUM ## _mc10_c; \
c->PFX ## _pixels_tab[IDX][2] = PFX ## NUM ## _mc20_c; \
c->PFX ## _pixels_tab[IDX][3] = PFX ## NUM ## _mc30_c; \
c->PFX ## _pixels_tab[IDX][4] = PFX ## NUM ## _mc01_c; \
c->PFX ## _pixels_tab[IDX][5] = PFX ## NUM ## _mc11_c; \
c->PFX ## _pixels_tab[IDX][6] = PFX ## NUM ## _mc21_c; \
c->PFX ## _pixels_tab[IDX][7] = PFX ## NUM ## _mc31_c; \
c->PFX ## _pixels_tab[IDX][8] = PFX ## NUM ## _mc02_c; \
c->PFX ## _pixels_tab[IDX][9] = PFX ## NUM ## _mc12_c; \
c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_c; \
c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_c; \
c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_c; \
c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_c; \
c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_c; \
c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_c

Function Documentation

◆ ff_put_pixels8x8_c()

void ff_put_pixels8x8_c ( uint8_t *  dst,
const uint8_t *  src,
ptrdiff_t  stride 
)

Definition at line 703 of file qpeldsp.c.

Referenced by ff_wmv2dsp_init().

◆ ff_avg_pixels8x8_c()

void ff_avg_pixels8x8_c ( uint8_t *  dst,
const uint8_t *  src,
ptrdiff_t  stride 
)

Definition at line 708 of file qpeldsp.c.

◆ ff_put_pixels16x16_c()

void ff_put_pixels16x16_c ( uint8_t *  dst,
const uint8_t *  src,
ptrdiff_t  stride 
)

Definition at line 713 of file qpeldsp.c.

◆ ff_avg_pixels16x16_c()

void ff_avg_pixels16x16_c ( uint8_t *  dst,
const uint8_t *  src,
ptrdiff_t  stride 
)

Definition at line 718 of file qpeldsp.c.

◆ ff_put_pixels8_l2_8()

void ff_put_pixels8_l2_8 ( uint8_t *  dst,
const uint8_t *  src1,
const uint8_t *  src2,
int  dst_stride,
int  src_stride1,
int  src_stride2,
int  h 
)

◆ ff_qpeldsp_init()

av_cold void ff_qpeldsp_init ( QpelDSPContext c)
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32