On 1/22/2016 3:15 PM, Rostislav Pehlivanov wrote: > diff --git a/libavcodec/diracenc_transforms.h > b/libavcodec/diracenc_transforms.h > new file mode 100644 > index 0000000..3b723b2 > --- /dev/null > +++ b/libavcodec/diracenc_transforms.h > @@ -0,0 +1,53 @@ > +/* > + * Copyright (C) 2016 Open Broadcast Systems Ltd. > + * Author (C) 2016 Rostislav Pehlivanov <atomnu...@gmail.com> > + * > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > + */ > + > +#ifndef AVCODEC_DIRAC_WAVELET_H > +#define AVCODEC_DIRAC_WAVELET_H
Changed your mind about the name mid development? :P > + > +#include <stdint.h> > + > +typedef int16_t dwtcoef; > +typedef int32_t qcoef; /* Quantization needs more precision */ > + > +/* Only Deslauriers-Dubuc (9,7) and LeGall (5,3) supported! */ > + > +enum DiracTransformType { > + DIRAC_TRANSFORM_9_7 = 0, /* Deslauriers-Dubuc (9,7) */ > + DIRAC_TRANSFORM_5_3 = 1, /* LeGall (5,3) */ > + DIRAC_TRANSFORM_13_7 = 2, /* Deslauriers-Dubuc (13,7) */ > + DIRAC_TRANSFORM_HAAR = 3, /* Haar without shift */ > + DIRAC_TRANSFORM_HAAR_S = 4, /* Haar with 1 shift/lvl */ > + DIRAC_TRANSFORM_FIDEL = 5, /* Fidelity filter */ > + DIRAC_TRANSFORM_9_7_I = 6, /* Daubechies (9,7) */ > + DIRAC_TRANSFORMS_NB > +}; This seems to partially duplicate the dwt_type enum in dirac_dwt.h Maybe you could share all this dwt code from both decoder and encoder in some way? > + > +typedef struct DiracTransforms { > + dwtcoef *buffer; > + void (*dirac_subband_dwt[DIRAC_TRANSFORMS_NB])(struct DiracTransforms *t, > + dwtcoef *data, int stride, > + int width, int height); > +} DiracTransforms; > + > +int ff_diracenc_init_transforms(DiracTransforms *t, int p_width, int > p_height); > +void ff_diracenc_deinit_transforms(DiracTransforms *t); > + > +#endif /* AVCODEC_DIRACWAVELET_H */ _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel