Skip to content
Snippets Groups Projects
  • Petter Reinholdtsen's avatar
    877ac811
    Adjusted macros to avoid working outside OC_IDCT_CONSTS array. · 877ac811
    Petter Reinholdtsen authored
    The OC_IDCT_CONSTS array in x86/sse2idct.c is 64 elements long, so
    not use trying to pretend it is 128 elements long.
    
    This avoid the following copmiler message:
    
    In function 'oc_idct8x8_slow_mmx',
        inlined from 'oc_idct8x8_mmx' at ../../lib/x86/mmxidct.c:555:8:
    ../../lib/x86/mmxidct.c:290:3: warning: array subscript 'const struct <anonymous>[0]' is partly outside array bounds of 'const short unsigned int[64]' [-Warray-bounds]
      290 |   __asm__ __volatile__(
          |   ^~~~~~~
    In file included from ../../lib/x86/mmxidct.c:20:
    ../../lib/x86/x86int.h: In function 'oc_idct8x8_mmx':
    ../../lib/x86/x86int.h:95:58: note: object 'OC_IDCT_CONSTS' of size 128
       95 | extern const unsigned short __attribute__((aligned(16))) OC_IDCT_CONSTS[64];
          |                                                          ^~~~~~~~~~~~~~
    In function 'oc_idct8x8_10_mmx',
        inlined from 'oc_idct8x8_mmx' at ../../lib/x86/mmxidct.c:554:20:
    ../../lib/x86/mmxidct.c:492:3: warning: array subscript 'const struct <anonymous>[0]' is partly outside array bounds of 'const short unsigned int[64]' [-Warray-bounds]
      492 |   __asm__ __volatile__(
          |   ^~~~~~~
    ../../lib/x86/x86int.h: In function 'oc_idct8x8_mmx':
    ../../lib/x86/x86int.h:95:58: note: object 'OC_IDCT_CONSTS' of size 128
       95 | extern const unsigned short __attribute__((aligned(16))) OC_IDCT_CONSTS[64];
          |                                                          ^~~~~~~~~~~~~~
      CC       x86/sse2idct.lo
    In function 'oc_idct8x8_slow_sse2',
        inlined from 'oc_idct8x8_sse2' at ../../lib/x86/sse2idct.c:453:8:
    ../../lib/x86/sse2idct.c:213:3: warning: array subscript 'const struct <anonymous>[0]' is partly outside array bounds of 'const short unsigned int[64]' [-Warray-bounds]
      213 |   __asm__ __volatile__(
          |   ^~~~~~~
    ../../lib/x86/sse2idct.c: In function 'oc_idct8x8_sse2':
    ../../lib/x86/sse2idct.c:26:56: note: object 'OC_IDCT_CONSTS' of size 128
       26 | const unsigned short __attribute__((aligned(16),used)) OC_IDCT_CONSTS[64]={
          |                                                        ^~~~~~~~~~~~~~
    In function 'oc_idct8x8_10_sse2',
        inlined from 'oc_idct8x8_sse2' at ../../lib/x86/sse2idct.c:452:20:
    ../../lib/x86/sse2idct.c:398:3: warning: array subscript 'const struct <anonymous>[0]' is partly outside array bounds of 'const short unsigned int[64]' [-Warray-bounds]
      398 |   __asm__ __volatile__(
          |   ^~~~~~~
    ../../lib/x86/sse2idct.c: In function 'oc_idct8x8_sse2':
    ../../lib/x86/sse2idct.c:26:56: note: object 'OC_IDCT_CONSTS' of size 128
       26 | const unsigned short __attribute__((aligned(16),used)) OC_IDCT_CONSTS[64]={
          |                                                        ^~~~~~~~~~~~~~
    877ac811
    History
    Adjusted macros to avoid working outside OC_IDCT_CONSTS array.
    Petter Reinholdtsen authored
    The OC_IDCT_CONSTS array in x86/sse2idct.c is 64 elements long, so
    not use trying to pretend it is 128 elements long.
    
    This avoid the following copmiler message:
    
    In function 'oc_idct8x8_slow_mmx',
        inlined from 'oc_idct8x8_mmx' at ../../lib/x86/mmxidct.c:555:8:
    ../../lib/x86/mmxidct.c:290:3: warning: array subscript 'const struct <anonymous>[0]' is partly outside array bounds of 'const short unsigned int[64]' [-Warray-bounds]
      290 |   __asm__ __volatile__(
          |   ^~~~~~~
    In file included from ../../lib/x86/mmxidct.c:20:
    ../../lib/x86/x86int.h: In function 'oc_idct8x8_mmx':
    ../../lib/x86/x86int.h:95:58: note: object 'OC_IDCT_CONSTS' of size 128
       95 | extern const unsigned short __attribute__((aligned(16))) OC_IDCT_CONSTS[64];
          |                                                          ^~~~~~~~~~~~~~
    In function 'oc_idct8x8_10_mmx',
        inlined from 'oc_idct8x8_mmx' at ../../lib/x86/mmxidct.c:554:20:
    ../../lib/x86/mmxidct.c:492:3: warning: array subscript 'const struct <anonymous>[0]' is partly outside array bounds of 'const short unsigned int[64]' [-Warray-bounds]
      492 |   __asm__ __volatile__(
          |   ^~~~~~~
    ../../lib/x86/x86int.h: In function 'oc_idct8x8_mmx':
    ../../lib/x86/x86int.h:95:58: note: object 'OC_IDCT_CONSTS' of size 128
       95 | extern const unsigned short __attribute__((aligned(16))) OC_IDCT_CONSTS[64];
          |                                                          ^~~~~~~~~~~~~~
      CC       x86/sse2idct.lo
    In function 'oc_idct8x8_slow_sse2',
        inlined from 'oc_idct8x8_sse2' at ../../lib/x86/sse2idct.c:453:8:
    ../../lib/x86/sse2idct.c:213:3: warning: array subscript 'const struct <anonymous>[0]' is partly outside array bounds of 'const short unsigned int[64]' [-Warray-bounds]
      213 |   __asm__ __volatile__(
          |   ^~~~~~~
    ../../lib/x86/sse2idct.c: In function 'oc_idct8x8_sse2':
    ../../lib/x86/sse2idct.c:26:56: note: object 'OC_IDCT_CONSTS' of size 128
       26 | const unsigned short __attribute__((aligned(16),used)) OC_IDCT_CONSTS[64]={
          |                                                        ^~~~~~~~~~~~~~
    In function 'oc_idct8x8_10_sse2',
        inlined from 'oc_idct8x8_sse2' at ../../lib/x86/sse2idct.c:452:20:
    ../../lib/x86/sse2idct.c:398:3: warning: array subscript 'const struct <anonymous>[0]' is partly outside array bounds of 'const short unsigned int[64]' [-Warray-bounds]
      398 |   __asm__ __volatile__(
          |   ^~~~~~~
    ../../lib/x86/sse2idct.c: In function 'oc_idct8x8_sse2':
    ../../lib/x86/sse2idct.c:26:56: note: object 'OC_IDCT_CONSTS' of size 128
       26 | const unsigned short __attribute__((aligned(16),used)) OC_IDCT_CONSTS[64]={
          |                                                        ^~~~~~~~~~~~~~
sse2idct.c 17.14 KiB