diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-14 11:00:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-14 11:00:22 +0100 |
commit | 8bbb487e443a7979f223759a5d6c2d7662a5948d (patch) | |
tree | dfcc859ca0fb087b36c4f7961f6e9e252fea7fdd /libavcodec | |
parent | 9f16cb9e50a5a196af9244dc7d33ed193227528a (diff) | |
parent | 130cefc9dcedea5babc349251fbeec6f037144ac (diff) | |
download | ffmpeg-8bbb487e443a7979f223759a5d6c2d7662a5948d.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
doc/platform: Fix 10l typo
dsputil: Move STRIDE_ALIGN macro to the only place it is used
Conflicts:
libavcodec/dsputil.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dsputil.h | 6 | ||||
-rw-r--r-- | libavcodec/rectangle.h | 2 | ||||
-rw-r--r-- | libavcodec/utils.c | 7 |
3 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index b27e5a62d6..7d12fe3c7b 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -404,10 +404,4 @@ void ff_dsputil_init_vis(DSPContext* c, AVCodecContext *avctx); void ff_dsputil_init_dwt(DSPContext *c); -#if (ARCH_ARM && HAVE_NEON) || ARCH_PPC || HAVE_MMX -# define STRIDE_ALIGN 16 -#else -# define STRIDE_ALIGN 8 -#endif - #endif /* AVCODEC_DSPUTIL_H */ diff --git a/libavcodec/rectangle.h b/libavcodec/rectangle.h index 43f89c9e0f..2ce80e1608 100644 --- a/libavcodec/rectangle.h +++ b/libavcodec/rectangle.h @@ -47,7 +47,7 @@ static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride, w *= size; stride *= size; - av_assert2((((long)vp)&(FFMIN(w, STRIDE_ALIGN)-1)) == 0); + av_assert2((((long)vp)&(FFMIN(w, 8<<(HAVE_NEON|ARCH_PPC|HAVE_MMX))-1)) == 0); av_assert2((stride&(w-1))==0); if(w==2){ const uint16_t v= size==4 ? val : val*0x0101; diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0844b249ee..569f2ff6e4 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -25,6 +25,7 @@ * utils. */ +#include "config.h" #include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/bprint.h" @@ -177,6 +178,12 @@ void avcodec_set_dimensions(AVCodecContext *s, int width, int height) #define INTERNAL_BUFFER_SIZE (32 + 1) +#if (ARCH_ARM && HAVE_NEON) || ARCH_PPC || HAVE_MMX +# define STRIDE_ALIGN 16 +#else +# define STRIDE_ALIGN 8 +#endif + void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS]) { |