[FFmpeg-devel] [PATCH 4/5] wma lossless: pad coeff buffer with 0

Michael Niedermayer michaelni at gmx.at
Sat May 31 04:25:11 CEST 2014


On Fri, May 30, 2014 at 07:51:29PM +0200, Christophe Gisquet wrote:
> Resurrecting an old thread...
> 
> 2014-02-10 21:43 GMT+01:00 Michael Niedermayer <michaelni at gmx.at>:
> > this is safe but not the most efficint
> > I should have been more specific, what i suggest is for example to
> > make the buffer that is written into, 8 elements larger
> > then adding 8 element padding should always be safe independant of
> > what order or max order is
> 
> I'm attaching 2 patches:
> 1) split back apedsp into a llauddsp (modelled after the ugly llviddsp)
> 2) use this new dsp in wma lossless
> 
> Patch 2 does what you suggest: declare a larger than needed array to
> simplify the memsetting.
> 
> While the needed padding size is known, this makes the array kind of
> ugly. I could have written " + 8" instead (but magic numbers are bad)
> or "+ WMALL_COEFF_PAD_SIZE" (but this is incorrect).
> 
> Also I used memset instead of AV_ZERO128 because the later expects an
> aligned address. This is the case currently. Maybe using 2 AV_ZERO64
> then?
> 
> -- 
> Christophe
[...]

> @@ -16,6 +16,7 @@ OBJS-$(CONFIG_H264PRED)                += arm/h264pred_init_arm.o
>  OBJS-$(CONFIG_H264QPEL)                += arm/h264qpel_init_arm.o
>  OBJS-$(CONFIG_HPELDSP)                 += arm/hpeldsp_init_arm.o        \
>                                            arm/hpeldsp_arm.o

> +OBJS-$(CONFIG_LLAUDDSP)                += arm/lossless_audidsp_init_arm.o

audIdsp ?


[...]

> --- a/libavcodec/ppc/apedsp_altivec.c
> +++ b/libavcodec/ppc/lossless_audiodsp_altivec.c
> @@ -25,7 +25,7 @@
>  
>  #include "libavutil/attributes.h"
>  #include "libavutil/ppc/types_altivec.h"
> -#include "libavcodec/apedsp.h"
> +#include "libavcodec/llauddsp.h"

this file doesnt exist


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140531/18f7c87f/attachment.asc>


More information about the ffmpeg-devel mailing list