[FFmpeg-devel,7/9] hevc: Fix aligned array declarations

Submitted by Mark Thompson on Oct. 17, 2017, 9:12 p.m.

Details

Message ID 20171017211225.3175-7-sw@jkqxz.net
State New
Headers show

Commit Message

Mark Thompson Oct. 17, 2017, 9:12 p.m.
(cherry picked from commit d41e10c1485ec34aa342f7bc2e5bf4f9b6e66414)
---
This and the following patches were found with the TI ARM compiler.


 libavcodec/hevcdsp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer Oct. 18, 2017, 11:43 p.m.
On Tue, Oct 17, 2017 at 10:12:23PM +0100, Mark Thompson wrote:
> (cherry picked from commit d41e10c1485ec34aa342f7bc2e5bf4f9b6e66414)
> ---
> This and the following patches were found with the TI ARM compiler.
> 
> 
>  libavcodec/hevcdsp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

ok

also theres a
DECLARE_ALIGNED(32, int16_t, tmp [MAX_PB_SIZE * MAX_PB_SIZE]);
in libavcodec/hevcdec.h

which seems to have the same issue

[...]
Mark Thompson Oct. 19, 2017, 11:21 a.m.
On 19/10/17 00:43, Michael Niedermayer wrote:
> On Tue, Oct 17, 2017 at 10:12:23PM +0100, Mark Thompson wrote:
>> (cherry picked from commit d41e10c1485ec34aa342f7bc2e5bf4f9b6e66414)
>> ---
>> This and the following patches were found with the TI ARM compiler.
>>
>>
>>  libavcodec/hevcdsp.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> ok
> 
> also theres a
> DECLARE_ALIGNED(32, int16_t, tmp [MAX_PB_SIZE * MAX_PB_SIZE]);
> in libavcodec/hevcdec.h
> 
> which seems to have the same issue

The TI compiler doesn't seem to mind that one (single-dimensional?), but I'll fix it anyway in the same patch in case something else does.

A bit of grep finds some more cases in libavcodec/mips/*_mmi.c and libavutil/lls.h, I'll send some more patches for those later.

Thanks,

- Mark

Patch hide | download patch | download mbox

diff --git a/libavcodec/hevcdsp.c b/libavcodec/hevcdsp.c
index 76ae72b6d4..e432aa3cf9 100644
--- a/libavcodec/hevcdsp.c
+++ b/libavcodec/hevcdsp.c
@@ -91,7 +91,7 @@  static const int8_t transform[32][32] = {
       90, -90,  88, -85,  82, -78,  73, -67,  61, -54,  46, -38,  31, -22,  13,  -4 },
 };
 
-DECLARE_ALIGNED(16, const int8_t, ff_hevc_epel_filters[7][4]) = {
+DECLARE_ALIGNED(16, const int8_t, ff_hevc_epel_filters)[7][4] = {
     { -2, 58, 10, -2},
     { -4, 54, 16, -2},
     { -6, 46, 28, -4},
@@ -101,7 +101,7 @@  DECLARE_ALIGNED(16, const int8_t, ff_hevc_epel_filters[7][4]) = {
     { -2, 10, 58, -2},
 };
 
-DECLARE_ALIGNED(16, const int8_t, ff_hevc_qpel_filters[3][16]) = {
+DECLARE_ALIGNED(16, const int8_t, ff_hevc_qpel_filters)[3][16] = {
     { -1,  4,-10, 58, 17, -5,  1,  0, -1,  4,-10, 58, 17, -5,  1,  0},
     { -1,  4,-11, 40, 40,-11,  4, -1, -1,  4,-11, 40, 40,-11,  4, -1},
     {  0,  1, -5, 17, 58,-10,  4, -1,  0,  1, -5, 17, 58,-10,  4, -1}