diff mbox

[FFmpeg-devel] speedhq: Align blocks variable properly.

Message ID E1cS6rG-0009eQ-Rm@pannekake.samfundet.no
State Accepted
Headers show

Commit Message

Steinar H. Gunderson Jan. 13, 2017, 6:04 p.m. UTC
Seemingly ff_clear_block_sse assumed that the block array is aligned,
so make sure it is.
---
 libavcodec/speedhq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Almer Jan. 13, 2017, 7:51 p.m. UTC | #1
On 1/13/2017 3:04 PM, Steinar H. Gunderson wrote:
> Seemingly ff_clear_block_sse assumed that the block array is aligned,
> so make sure it is.

And so does IDCTDSPContext.idct_put()

> ---
>  libavcodec/speedhq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c
> index 9c21c0b1be..30160dd3f2 100644
> --- a/libavcodec/speedhq.c
> +++ b/libavcodec/speedhq.c
> @@ -224,7 +224,7 @@ static inline int decode_dct_block(const SHQContext *s, GetBitContext *gb, int l
>  {
>      const int *quant_matrix = s->quant_matrix;
>      const uint8_t *scantable = s->intra_scantable.permutated;
> -    int16_t block[64];
> +    DECLARE_ALIGNED(16, int16_t, block)[64];

Changed to use LOCAL_ALIGNED_16() instead and pushed.

Thanks.
diff mbox

Patch

diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c
index 9c21c0b1be..30160dd3f2 100644
--- a/libavcodec/speedhq.c
+++ b/libavcodec/speedhq.c
@@ -224,7 +224,7 @@  static inline int decode_dct_block(const SHQContext *s, GetBitContext *gb, int l
 {
     const int *quant_matrix = s->quant_matrix;
     const uint8_t *scantable = s->intra_scantable.permutated;
-    int16_t block[64];
+    DECLARE_ALIGNED(16, int16_t, block)[64];
     int dc_offset;
 
     s->bdsp.clear_block(block);