1cabdff1aSopenharmony_ci/*
2cabdff1aSopenharmony_ci * Copyright (C) 2016 Open Broadcast Systems Ltd.
3cabdff1aSopenharmony_ci * Author        2016 Rostislav Pehlivanov <atomnuker@gmail.com>
4cabdff1aSopenharmony_ci *
5cabdff1aSopenharmony_ci * This file is part of FFmpeg.
6cabdff1aSopenharmony_ci *
7cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or
8cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public
9cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either
10cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version.
11cabdff1aSopenharmony_ci *
12cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful,
13cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of
14cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15cabdff1aSopenharmony_ci * Lesser General Public License for more details.
16cabdff1aSopenharmony_ci *
17cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public
18cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software
19cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20cabdff1aSopenharmony_ci */
21cabdff1aSopenharmony_ci
22cabdff1aSopenharmony_ci#ifndef AVCODEC_VC2ENC_DWT_H
23cabdff1aSopenharmony_ci#define AVCODEC_VC2ENC_DWT_H
24cabdff1aSopenharmony_ci
25cabdff1aSopenharmony_ci#include <stddef.h>
26cabdff1aSopenharmony_ci#include <stdint.h>
27cabdff1aSopenharmony_ci
28cabdff1aSopenharmony_citypedef int32_t dwtcoef;
29cabdff1aSopenharmony_ci
30cabdff1aSopenharmony_cienum VC2TransformType {
31cabdff1aSopenharmony_ci    VC2_TRANSFORM_9_7    = 0,   /* Deslauriers-Dubuc (9,7)  */
32cabdff1aSopenharmony_ci    VC2_TRANSFORM_5_3    = 1,   /* LeGall (5,3)             */
33cabdff1aSopenharmony_ci    VC2_TRANSFORM_13_7   = 2,   /* Deslauriers-Dubuc (13,7) */
34cabdff1aSopenharmony_ci    VC2_TRANSFORM_HAAR   = 3,   /* Haar without shift       */
35cabdff1aSopenharmony_ci    VC2_TRANSFORM_HAAR_S = 4,   /* Haar with 1 shift/lvl    */
36cabdff1aSopenharmony_ci    VC2_TRANSFORM_FIDEL  = 5,   /* Fidelity filter          */
37cabdff1aSopenharmony_ci    VC2_TRANSFORM_9_7_I  = 6,   /* Daubechies (9,7)         */
38cabdff1aSopenharmony_ci
39cabdff1aSopenharmony_ci    VC2_TRANSFORMS_NB
40cabdff1aSopenharmony_ci};
41cabdff1aSopenharmony_ci
42cabdff1aSopenharmony_citypedef struct VC2TransformContext {
43cabdff1aSopenharmony_ci    dwtcoef *buffer;
44cabdff1aSopenharmony_ci    int padding;
45cabdff1aSopenharmony_ci    void (*vc2_subband_dwt[VC2_TRANSFORMS_NB])(struct VC2TransformContext *t,
46cabdff1aSopenharmony_ci                                               dwtcoef *data, ptrdiff_t stride,
47cabdff1aSopenharmony_ci                                               int width, int height);
48cabdff1aSopenharmony_ci} VC2TransformContext;
49cabdff1aSopenharmony_ci
50cabdff1aSopenharmony_ciint  ff_vc2enc_init_transforms(VC2TransformContext *t, int p_stride, int p_height,
51cabdff1aSopenharmony_ci                               int slice_w, int slice_h);
52cabdff1aSopenharmony_civoid ff_vc2enc_free_transforms(VC2TransformContext *t);
53cabdff1aSopenharmony_ci
54cabdff1aSopenharmony_ci#endif /* AVCODEC_VC2ENC_DWT_H */
55