On Mon, Jul 21, 2014 at 08:13:16PM -0300, James Almer wrote:
> On 21/07/14 6:21 PM, Diego Biurrun wrote:
> > ---
> > 
> > I'm slightly unsure about this one.  MMX does not require 16-byte aligned
> > buffers, nor does PowerPC IIRC, but SSE and AltiVec do, so I believe my
> > solution is closer to the original intention.  Please do correct me if I
> > am wrong...
> > 
> >  configure          | 2 ++
> >  libavcodec/utils.c | 2 +-
> >  2 files changed, 3 insertions(+), 1 deletion(-)
> > 
> > --- a/libavcodec/utils.c
> > +++ b/libavcodec/utils.c
> > @@ -189,7 +189,7 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame,
> >  
> > -#if HAVE_NEON || ARCH_PPC || HAVE_MMX
> > +#if HAVE_SIMD_ALIGN_16
> >  #   define STRIDE_ALIGN 16
> >  #else
> >  #   define STRIDE_ALIGN 8
> 
> #if HAVE_NEON || HAVE_ALTIVEC || HAVE_SSE
> #   define STRIDE_ALIGN 16
> #else
> #   define STRIDE_ALIGN 8
> #endif
> 
> is simpler than adding another HAVE_ define for this single use.

Such system-specific details have no place in the general C code.  configure
is a much better-suited place to deal with such architecture specifics.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to