On Fri, Nov 09, 2012 at 03:24:44AM +0100, Diego Biurrun wrote:
> On Sat, Nov 03, 2012 at 10:14:05PM +0100, Jordi Ortiz wrote:
> > ---
> > libavcodec/dirac_dwt.c | 614
> > ++++++++++++++++++++++++++++++++++++++++++++++++
> > libavcodec/dirac_dwt.h | 132 +++++++++++
> > libavcodec/diracdsp.c | 301 ++++++++++++++++++++++++
> > libavcodec/diracdsp.h | 95 ++++++++
> > 4 files changed, 1142 insertions(+)
> > create mode 100644 libavcodec/dirac_dwt.c
> > create mode 100644 libavcodec/dirac_dwt.h
> > create mode 100644 libavcodec/diracdsp.c
> > create mode 100644 libavcodec/diracdsp.h
>
> This adds no less than 32 warnings, did you investigate them?
Here's why:
> --- /dev/null
> +++ b/libavcodec/dirac_dwt.c
> @@ -0,0 +1,614 @@
> +
> +static void vertical_compose53iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2,
> + int width)
> +
> +static void vertical_compose_dirac53iH0(IDWTELEM *b0, IDWTELEM *b1,
> + IDWTELEM *b2, int width)
> +
> +static void vertical_compose_dd97iH0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM
> *b2,
> + IDWTELEM *b3, IDWTELEM *b4, int width)
> +
> +static void vertical_compose_dd137iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM
> *b2,
> + IDWTELEM *b3, IDWTELEM *b4, int width)
> +
> +static void vertical_compose_haar(IDWTELEM *b0, IDWTELEM *b1, int width)
> +
> +static void vertical_compose_fidelityiH0(IDWTELEM *dst, IDWTELEM *b[8],
> + int width)
> +
> +static void vertical_compose_fidelityiL0(IDWTELEM *dst, IDWTELEM *b[8],
> + int width)
> +
> +static void vertical_compose_daub97iH0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM
> *b2,
> + int width)
> +
> +static void vertical_compose_daub97iH1(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM
> *b2,
> + int width)
> +
> +static void vertical_compose_daub97iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM
> *b2,
> + int width)
> +
> +static void vertical_compose_daub97iL1(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM
> *b2,
> + int width)
> +
> +int ff_spatial_idwt_init2(DiracDWTContext *d, IDWTELEM *buffer, int width,
> + int height, int stride, enum dwt_type type,
> + int decomposition_count, IDWTELEM *temp)
> +{
> +
> + switch (type) {
> + case DWT_DIRAC_DD9_7:
> + d->vertical_compose_l0 = vertical_compose53iL0;
> + d->vertical_compose_h0 = vertical_compose_dd97iH0;
> + case DWT_DIRAC_LEGALL5_3:
> + d->vertical_compose_l0 = vertical_compose53iL0;
> + d->vertical_compose_h0 = vertical_compose_dirac53iH0;
> + case DWT_DIRAC_DD13_7:
> + d->vertical_compose_l0 = vertical_compose_dd137iL0;
> + d->vertical_compose_h0 = vertical_compose_dd97iH0;
> + case DWT_DIRAC_HAAR0:
> + case DWT_DIRAC_HAAR1:
> + d->vertical_compose = vertical_compose_haar;
> + case DWT_DIRAC_FIDELITY:
> + d->vertical_compose_l0 = vertical_compose_fidelityiL0;
> + d->vertical_compose_h0 = vertical_compose_fidelityiH0;
> + case DWT_DIRAC_DAUB9_7:
> + d->vertical_compose_l0 = vertical_compose_daub97iL0;
> + d->vertical_compose_h0 = vertical_compose_daub97iH0;
> + d->vertical_compose_l1 = vertical_compose_daub97iL1;
> + d->vertical_compose_h1 = vertical_compose_daub97iH1;
> --- /dev/null
> +++ b/libavcodec/dirac_dwt.h
> @@ -0,0 +1,132 @@
> +
> +typedef struct DiracDWTContext {
> + void (*spatial_compose)(struct DiracDWTContext *cs, int level, int width,
> + int height, int stride);
> + void (*vertical_compose_l0)(void);
> + void (*vertical_compose_h0)(void);
> + void (*vertical_compose_l1)(void);
> + void (*vertical_compose_h1)(void);
> + void (*vertical_compose)(void);
> + void (*horizontal_compose)(IDWTELEM *b, IDWTELEM *tmp, int width);
The signatures of the function pointers and the signatures of the functions
assigned to them very much disagree.
> --- /dev/null
> +++ b/libavcodec/diracdsp.c
> @@ -0,0 +1,301 @@
> +
> +#define PIXOP_BILINEAR(PFX, OP, WIDTH) \
> +static void ff_ ## PFX ## _dirac_pixels ## WIDTH ## _bilinear_c( \
> + uint8_t *dst, const uint8_t *src[5], int stride, int h) \
> +{ \
> +
> +#define PIXFUNC(PFX, WIDTH)
> \
> +c->PFX ## _dirac_pixels_tab[WIDTH >> 4][0] = ff_ ## PFX ## _dirac_pixels ##
> WIDTH ## _c; \
> +c->PFX ## _dirac_pixels_tab[WIDTH >> 4][1] = ff_ ## PFX ## _dirac_pixels ##
> WIDTH ## _l2_c; \
> +c->PFX ## _dirac_pixels_tab[WIDTH >> 4][2] = ff_ ## PFX ## _dirac_pixels ##
> WIDTH ## _l4_c; \
> +c->PFX ## _dirac_pixels_tab[WIDTH >> 4][3] = ff_ ## PFX ## _dirac_pixels ##
> WIDTH ## _bilinear_c
> +
> +void ff_diracdsp_init(DiracDSPContext *c, AVCodecContext *avctx)
> +{
> + PIXFUNC(put, 8);
> + PIXFUNC(put, 16);
> + PIXFUNC(put, 32);
> --- /dev/null
> +++ b/libavcodec/diracdsp.h
> @@ -0,0 +1,95 @@
> +typedef struct DiracDSPContext{
> + /**
> + * dirac_pixels_tab[width][subpel]
> + * width is 2 for 32, 1 for 16, 0 for 8
> + void (*put_dirac_pixels_tab[3][4]) (struct DiracDSPContext *dc,
> + uint8_t *dst, const uint8_t *src[5],
> + int stride, int h);
The signature of the function disagrees with the signature of the
function pointer.
I'll create a gitorious tree with all the issues I noticed fixed for you
to review over the weekend. Please answer my questions from the other
mails though.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel