On Wed, Apr 10, 2013 at 07:24:35PM +0300, Martin Storsjö wrote:
>
> --- a/libavcodec/sh4/dsputil_align.c
> +++ b/libavcodec/sh4/dsputil_align.c
> @@ -245,55 +245,15 @@ static void op##_##rnd##_pixels##sz##_##xy (uint8_t *
> dest, const uint8_t * ref,
>
> -#define OP put
> -
> -DEFFUNC(put, rnd,o,8,OP_C,avg32)
> -DEFFUNC(put, rnd,x,8,OP_X,avg32)
> -DEFFUNC(put,no_rnd,x,8,OP_X,avg32)
> -DEFFUNC(put, rnd,y,8,OP_Y,avg32)
> -DEFFUNC(put,no_rnd,y,8,OP_Y,avg32)
> -DEFFUNC(put, rnd,xy,8,OP_XY,PACK)
> -DEFFUNC(put,no_rnd,xy,8,OP_XY,PACK)
> -DEFFUNC(put, rnd,o,16,OP_C,avg32)
> -DEFFUNC(put, rnd,x,16,OP_X,avg32)
> -DEFFUNC(put,no_rnd,x,16,OP_X,avg32)
> -DEFFUNC(put, rnd,y,16,OP_Y,avg32)
> -DEFFUNC(put,no_rnd,y,16,OP_Y,avg32)
> -DEFFUNC(put, rnd,xy,16,OP_XY,PACK)
> -DEFFUNC(put,no_rnd,xy,16,OP_XY,PACK)
> -
> -#undef OP
> -#define OP avg
> -
> -DEFFUNC(avg, rnd,o,8,OP_C,avg32)
> -DEFFUNC(avg, rnd,x,8,OP_X,avg32)
> -DEFFUNC(avg, rnd,y,8,OP_Y,avg32)
> -DEFFUNC(avg, rnd,xy,8,OP_XY,PACK)
> -DEFFUNC(avg, rnd,o,16,OP_C,avg32)
> -DEFFUNC(avg, rnd,x,16,OP_X,avg32)
> -DEFFUNC(avg,no_rnd,x,16,OP_X,avg32)
> -DEFFUNC(avg, rnd,y,16,OP_Y,avg32)
> -DEFFUNC(avg,no_rnd,y,16,OP_Y,avg32)
> -DEFFUNC(avg, rnd,xy,16,OP_XY,PACK)
> -DEFFUNC(avg,no_rnd,xy,16,OP_XY,PACK)
The unused definition of DEFFUNC is left behind.
> -#define QPEL
> -
> -#ifdef QPEL
> +
> +#if CONFIG_H264QPEL
This is unrelated IMO.
> --- a/libavcodec/sh4/dsputil_sh4.h
> +++ b/libavcodec/sh4/dsputil_sh4.h
> @@ -21,8 +21,14 @@
>
> #include "libavcodec/avcodec.h"
> #include "libavcodec/dsputil.h"
> +#include "libavcodec/hpeldsp.h"
This is not needed in the header, maybe in the .c file.
> +void ff_put_rnd_pixels8_o (uint8_t * dest, const uint8_t * ref, const int
> stride, int height);
> +void ff_put_rnd_pixels16_o(uint8_t * dest, const uint8_t * ref, const int
> stride, int height);
> +void ff_avg_rnd_pixels8_o (uint8_t * dest, const uint8_t * ref, const int
> stride, int height);
> +void ff_avg_rnd_pixels16_o(uint8_t * dest, const uint8_t * ref, const int
> stride, int height);
*var
The type for the stride should likely be ptrdiff_t.
> diff --git a/libavcodec/sh4/dsputil_align.c b/libavcodec/sh4/hpeldsp.c
> similarity index 59%
> copy from libavcodec/sh4/dsputil_align.c
> copy to libavcodec/sh4/hpeldsp.c
> index 5c3e65b..8225523 100644
> --- a/libavcodec/sh4/dsputil_align.c
> +++ b/libavcodec/sh4/hpeldsp.c
> @@ -66,6 +66,34 @@
> +
> +static void put_pixels4_c(uint8_t *dest,const uint8_t *ref, const int
> stride,int height)
> +{
> +}
> +
> +static void avg_pixels4_c(uint8_t *dest,const uint8_t *ref, const int
> stride,int height)
> +{
> +}
These strides should be ptrdiff_t I think.
> @@ -233,9 +261,9 @@ if (sz==16) { \
>
> -#define DEFFUNC(op,rnd,xy,sz,OP_N,avgfunc) \
> -static void op##_##rnd##_pixels##sz##_##xy (uint8_t * dest, const uint8_t *
> ref, \
> - const ptrdiff_t stride, int height) \
> +#define DEFFUNC(prefix, op,rnd,xy,sz,OP_N,avgfunc) \
> +prefix void op##_##rnd##_pixels##sz##_##xy (uint8_t * dest, const uint8_t *
> ref, \
> + const int stride, int height) \
same here
I think I would need to reread the macro trickery to fully understand
what this patch does, but I'm not sure if it is worth the trouble, since
this code is slated for removal. If you wish to go ahead and push it,
you have my blessing.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel