FFmpeg
Loading...
Searching...
No Matches
wavelet97.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 Michael Niedermayer <michaelni@gmx.at>
3 * Copyright (c) 2013 Clément Bœsch <u pkh me>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef AVFILTER_WAVELET97_H
23#define AVFILTER_WAVELET97_H
24
25/**
26 * Undecimated 9/7 wavelet transform
27 */
28
29/**
30 * Analysis lowpass and highpass filters, both symmetric around tap 0
31 */
32extern const double ff_wavelet97_coeff[2][5];
33
34/**
35 * Undecimated analysis of lines line0..line1-1 along one direction.
36 * Line y, sample x is at src[y * ylinesize + x * xlinesize], x < w, w >= 2.
37 *
38 * @param dst_l lowpass output, same layout as src
39 * @param dst_h highpass output, same layout as src
40 * @param coeff lowpass and highpass filters, normally ff_wavelet97_coeff
41 * @param step dilation of the filters, 1 << level
42 */
43void ff_wavelet97_decompose_lines(float *dst_l, float *dst_h, const float *src,
44 const double coeff[2][5],
45 int xlinesize, int ylinesize,
46 int step, int w, int line0, int line1);
47
48/**
49 * Inverse of ff_wavelet97_decompose_lines() with ff_wavelet97_coeff.
50 */
51void ff_wavelet97_compose_lines(float *dst, const float *src_l, const float *src_h,
52 int xlinesize, int ylinesize,
53 int step, int w, int line0, int line1);
54
55/**
56 * Decimated analysis of lines line0..line1-1 along one direction.
57 * Line y, sample x is at src[y * ystride + x * xstride], x < len, len >= 2.
58 * Lowpass coefficients are written to even, highpass ones to odd x of dst.
59 *
60 * @param coeff lowpass and highpass filters, normally ff_wavelet97_coeff
61 */
62void ff_wavelet97_decompose_decimated_lines(float *dst, const float *src,
63 const double coeff[2][5],
64 int xstride, int ystride,
65 int len, int line0, int line1);
66
67/**
68 * Inverse of ff_wavelet97_decompose_decimated_lines() with ff_wavelet97_coeff.
69 */
70void ff_wavelet97_compose_decimated_lines(float *dst, const float *src,
71 int xstride, int ystride,
72 int len, int line0, int line1);
73
74/**
75 * One level of undecimated 2D analysis, filters are mirrored at the plane borders.
76 *
77 * @param dst output bands LL, LH, HL, HH (horizontal/vertical filter)
78 * @param src input plane
79 * @param temp two scratch planes
80 * @param coeff lowpass and highpass filters, normally ff_wavelet97_coeff
81 * @param linesize distance between lines in floats, same for all planes
82 * @param step dilation of the filters, 1 << level
83 */
84void ff_wavelet97_decompose(float *dst[4], const float *src, float *temp[2],
85 const double coeff[2][5],
86 int linesize, int step, int w, int h);
87
88/**
89 * One level of 2D synthesis, the inverse of ff_wavelet97_decompose() with
90 * ff_wavelet97_coeff.
91 */
92void ff_wavelet97_compose(float *dst, float *const src[4], float *temp[2],
93 int linesize, int step, int w, int h);
94
95#endif /* AVFILTER_WAVELET97_H */
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:97
uint8_t w
Definition llvidencdsp.c:39
#define src
Definition vp8dsp.c:248
else temp
Definition vf_mcdeint.c:275
int len
const double ff_wavelet97_coeff[2][5]
Undecimated 9/7 wavelet transform.
Definition wavelet97.c:26
void ff_wavelet97_decompose_decimated_lines(float *dst, const float *src, const double coeff[2][5], int xstride, int ystride, int len, int line0, int line1)
Decimated analysis of lines line0..line1-1 along one direction.
Definition wavelet97.c:147
void ff_wavelet97_decompose_lines(float *dst_l, float *dst_h, const float *src, const double coeff[2][5], int xlinesize, int ylinesize, int step, int w, int line0, int line1)
Undecimated analysis of lines line0..line1-1 along one direction.
Definition wavelet97.c:120
void ff_wavelet97_compose_lines(float *dst, const float *src_l, const float *src_h, int xlinesize, int ylinesize, int step, int w, int line0, int line1)
Inverse of ff_wavelet97_decompose_lines() with ff_wavelet97_coeff.
Definition wavelet97.c:134
void ff_wavelet97_decompose(float *dst[4], const float *src, float *temp[2], const double coeff[2][5], int linesize, int step, int w, int h)
One level of undecimated 2D analysis, filters are mirrored at the plane borders.
Definition wavelet97.c:164
void ff_wavelet97_compose_decimated_lines(float *dst, const float *src, int xstride, int ystride, int len, int line0, int line1)
Inverse of ff_wavelet97_decompose_decimated_lines() with ff_wavelet97_coeff.
Definition wavelet97.c:156
void ff_wavelet97_compose(float *dst, float *const src[4], float *temp[2], int linesize, int step, int w, int h)
One level of 2D synthesis, the inverse of ff_wavelet97_decompose() with ff_wavelet97_coeff.
Definition wavelet97.c:173