[FFmpeg-devel] [PATCH] Remove some unnecessary alignment specifiers

Michael Niedermayer michaelni
Wed Aug 26 13:02:53 CEST 2009


_On Wed, Aug 26, 2009 at 12:32:48AM +0100, Mans Rullgard wrote:
> None of these arrays are used in ways requiring extra alignment.
> ---
>  libavcodec/asv1.c      |    4 ++--
>  libavcodec/dnxhddec.c  |    2 +-
>  libavcodec/dv.c        |    4 ++--
>  libavcodec/mpegaudio.h |    2 +-
>  4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c
> index 10fbac2..c9a3d24 100644
> --- a/libavcodec/asv1.c
> +++ b/libavcodec/asv1.c
> @@ -49,8 +49,8 @@ typedef struct ASV1Context{
>      int mb_width2;
>      int mb_height2;
>      DECLARE_ALIGNED_16(DCTELEM, block[6][64]);
> -    DECLARE_ALIGNED_8(uint16_t, intra_matrix[64]);
> -    DECLARE_ALIGNED_8(int, q_intra_matrix[64]);
> +    uint16_t intra_matrix[64];
> +    int q_intra_matrix[64];
>      uint8_t *bitstream_buffer;
>      unsigned int bitstream_buffer_size;
>  } ASV1Context;

ok


[...] 
> diff --git a/libavcodec/mpegaudio.h b/libavcodec/mpegaudio.h
> index 65a2283..cd10dbc 100644
> --- a/libavcodec/mpegaudio.h
> +++ b/libavcodec/mpegaudio.h
> @@ -108,7 +108,7 @@ typedef struct MPADecodeHeader {
>  
>  typedef struct MPADecodeContext {
>      MPA_DECODE_HEADER
> -    DECLARE_ALIGNED_8(uint8_t, last_buf[2*BACKSTEP_SIZE + EXTRABYTES]);
> +    uint8_t last_buf[2*BACKSTEP_SIZE + EXTRABYTES];
>      int last_buf_size;
>      /* next header (used in free format parsing) */
>      uint32_t free_format_next_header;

i guess that was written originally with the thught of init_get_bits
needing aligned memory...
as it seems init_get_bits does not have such a requirement anymore
it should be ok




[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090826/5f73f316/attachment.pgp>



More information about the ffmpeg-devel mailing list