FFmpeg
Macros | Functions
qpeldsp_init.c File Reference
#include <stddef.h>
#include <stdint.h>
#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/attributes_internal.h"
#include "libavutil/cpu.h"
#include "libavutil/mem_internal.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/qpeldsp.h"
#include "fpel.h"
#include "qpel.h"

Go to the source code of this file.

Macros

#define QPEL_H(OPNAME, RND, SIZE, UNUSED1, XMM, UNUSED2, UNUSED3, L2)
 
#define QPEL_V(OPNAME, RND, SIZE, UNUSED1, UNUSED2, XMM, UNUSED3, L2)
 
#define QPEL_HV(OPNAME, RND, SIZE, SIZEP1, HXMM, VXMM, HVXMM, L2)
 
#define QPEL3(MACRO, SIZE, SIZEP1, HXMM, VXMM, HVXMM, L2)
 
#define SET_QPEL_FUNC(OP, X, Y, SIZE, CPU, PREFIX)   c->OP ## _qpel_pixels_tab[SIZE == 8][X+4*Y] = PREFIX ## OP ## _qpel ## SIZE ## _mc ## X ## Y ## _ ## CPU
 
#define SET_QPEL_FUNCS3(X, Y, SIZE, CPU, PREFIX)
 
#define SET_H_QPEL_FUNCS(SIZE, CPU, PREFIX)
 
#define SET_V_QPEL_FUNCS(SIZE, CPU, PREFIX)
 
#define SET_HV_QPEL_FUNCS(SIZE, CPU, PREFIX)
 

Functions

FF_VISIBILITY_PUSH_HIDDEN void ff_put_no_rnd_pixels8x8_l2_mmxext (uint8_t *dst, const uint8_t *src1, const uint8_t *src2, ptrdiff_t dstStride, ptrdiff_t src1Stride)
 
void ff_put_no_rnd_pixels16x16_l2_sse2 (uint8_t *dst, const uint8_t *src1, const uint8_t *src2, ptrdiff_t dstStride, ptrdiff_t src1Stride)
 
av_cold void ff_qpeldsp_init_x86 (QpelDSPContext *c)
 

Macro Definition Documentation

◆ QPEL_H

#define QPEL_H (   OPNAME,
  RND,
  SIZE,
  UNUSED1,
  XMM,
  UNUSED2,
  UNUSED3,
  L2 
)

Definition at line 44 of file qpeldsp_init.c.

◆ QPEL_V

#define QPEL_V (   OPNAME,
  RND,
  SIZE,
  UNUSED1,
  UNUSED2,
  XMM,
  UNUSED3,
  L2 
)

Definition at line 80 of file qpeldsp_init.c.

◆ QPEL_HV

#define QPEL_HV (   OPNAME,
  RND,
  SIZE,
  SIZEP1,
  HXMM,
  VXMM,
  HVXMM,
  L2 
)

Definition at line 115 of file qpeldsp_init.c.

◆ QPEL3

#define QPEL3 (   MACRO,
  SIZE,
  SIZEP1,
  HXMM,
  VXMM,
  HVXMM,
  L2 
)
Value:
MACRO(put,, SIZE, SIZEP1, HXMM, VXMM, HVXMM, L2) \
MACRO(avg,, SIZE, SIZEP1, HXMM, VXMM, HVXMM, L2) \
MACRO(put_no_rnd, no_rnd_, SIZE, SIZEP1, HXMM, VXMM, HVXMM, L2)

Definition at line 239 of file qpeldsp_init.c.

◆ SET_QPEL_FUNC

#define SET_QPEL_FUNC (   OP,
  X,
  Y,
  SIZE,
  CPU,
  PREFIX 
)    c->OP ## _qpel_pixels_tab[SIZE == 8][X+4*Y] = PREFIX ## OP ## _qpel ## SIZE ## _mc ## X ## Y ## _ ## CPU

Definition at line 251 of file qpeldsp_init.c.

◆ SET_QPEL_FUNCS3

#define SET_QPEL_FUNCS3 (   X,
  Y,
  SIZE,
  CPU,
  PREFIX 
)
Value:
SET_QPEL_FUNC(avg, X, Y, SIZE, CPU, PREFIX); \
SET_QPEL_FUNC(put, X, Y, SIZE, CPU, PREFIX); \
SET_QPEL_FUNC(put_no_rnd, X, Y, SIZE, CPU, PREFIX)

Definition at line 254 of file qpeldsp_init.c.

◆ SET_H_QPEL_FUNCS

#define SET_H_QPEL_FUNCS (   SIZE,
  CPU,
  PREFIX 
)
Value:
SET_QPEL_FUNCS3(1, 0, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(2, 0, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(3, 0, SIZE, CPU, PREFIX)

Definition at line 259 of file qpeldsp_init.c.

◆ SET_V_QPEL_FUNCS

#define SET_V_QPEL_FUNCS (   SIZE,
  CPU,
  PREFIX 
)
Value:
SET_QPEL_FUNCS3(0, 1, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(0, 2, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(0, 3, SIZE, CPU, PREFIX)

Definition at line 264 of file qpeldsp_init.c.

◆ SET_HV_QPEL_FUNCS

#define SET_HV_QPEL_FUNCS (   SIZE,
  CPU,
  PREFIX 
)
Value:
SET_QPEL_FUNCS3(1, 1, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(1, 2, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(1, 3, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(2, 1, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(2, 2, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(2, 3, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(3, 1, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(3, 2, SIZE, CPU, PREFIX); \
SET_QPEL_FUNCS3(3, 3, SIZE, CPU, PREFIX)

Definition at line 269 of file qpeldsp_init.c.

Function Documentation

◆ ff_put_no_rnd_pixels8x8_l2_mmxext()

FF_VISIBILITY_PUSH_HIDDEN void ff_put_no_rnd_pixels8x8_l2_mmxext ( uint8_t *  dst,
const uint8_t *  src1,
const uint8_t *  src2,
ptrdiff_t  dstStride,
ptrdiff_t  src1Stride 
)

◆ ff_put_no_rnd_pixels16x16_l2_sse2()

void ff_put_no_rnd_pixels16x16_l2_sse2 ( uint8_t *  dst,
const uint8_t *  src1,
const uint8_t *  src2,
ptrdiff_t  dstStride,
ptrdiff_t  src1Stride 
)

◆ ff_qpeldsp_init_x86()

av_cold void ff_qpeldsp_init_x86 ( QpelDSPContext c)

Definition at line 280 of file qpeldsp_init.c.

Referenced by ff_qpeldsp_init().

L2
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2 ^ ^ ^ F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horizontally or diagonally adjacent halfpel points shall be interpolatedlinearly with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v \/v \/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O ^/\ ^/\ ^ h2--> O q O<--h3-> O q O<--h2 v \/v \/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O ^/\ ^/\ ^ F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0. To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){ for(x=0;x< width;x++){ sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][ *]=sample[ *][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantization:===============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and an integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform) --------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one. --------------- --------------- --------------- ---------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 L2
Definition: snow.txt:554
SET_QPEL_FUNC
#define SET_QPEL_FUNC(OP, X, Y, SIZE, CPU, PREFIX)
Definition: qpeldsp_init.c:251
SIZE
#define SIZE
Definition: bitstream_template.c:36
avg
#define avg(a, b, c, d)
Definition: colorspacedsp_template.c:28
Y
#define Y
Definition: boxblur.h:37
SET_QPEL_FUNCS3
#define SET_QPEL_FUNCS3(X, Y, SIZE, CPU, PREFIX)
Definition: qpeldsp_init.c:254
X
@ X
Definition: vf_addroi.c:27