[x265] silence VS 2013 warning about g_scan4x4

Mateusz mateuszb at poczta.onet.pl
Thu Jul 21 08:35:04 CEST 2016


W dniu 2016-07-21 o 06:08, Pradeep Ramachandran pisze:
> 
> On Wed, Jul 20, 2016 at 12:50 AM, Mateusz <mateuszb at poczta.onet.pl <mailto:mateuszb at poczta.onet.pl>> wrote:
> 
>     # HG changeset patch
>     # User Ma0 <mateuszb at poczta.onet.pl <mailto:mateuszb at poczta.onet.pl>>
>     # Date 1468955593 -7200
>     #      Tue Jul 19 21:13:13 2016 +0200
>     # Node ID 88fc302ae8ae5a6191ca6115e371f0777dacc0bb
>     # Parent  669dc9bfe7ebe40705cc055483d49d82c3fd9977
>     silence VS 2013 warning about g_scan4x4
> 
>     diff -r 669dc9bfe7eb -r 88fc302ae8ae source/common/constants.h
>     --- a/source/common/constants.h    Tue Jul 19 10:33:18 2016 +0530
>     +++ b/source/common/constants.h    Tue Jul 19 21:13:13 2016 +0200
>     @@ -81,7 +81,7 @@
>      extern const uint16_t* const g_scanOrder[NUM_SCAN_TYPE][NUM_SCAN_SIZE];
>      extern const uint16_t* const g_scanOrderCG[NUM_SCAN_TYPE][NUM_SCAN_SIZE];
>      extern const uint16_t g_scan8x8diag[8 * 8];
>     -extern const uint16_t g_scan4x4[NUM_SCAN_TYPE + 1][4 * 4];  // +1 for safe buffer area for codeCoeffNxN assembly optimize, there have up to 15 bytes beyond bound read
>     +ALIGN_VAR_16(extern const uint16_t, g_scan4x4[NUM_SCAN_TYPE + 1][4 * 4]);  // +1 for safe buffer area for codeCoeffNxN assembly optimize, there have up to 15 bytes beyond bound read
> 
> 
> We do specify the array as being aligned in the cpp file, but guessing that isn't sufficient for VS2013?

Yes, the difference between declaration and definition gives warnings:

LINK : warning C4742: 'unsigned short const (* x265::g_scan4x4)[16]' has different alignment in 'C:\x265\source\encoder\entropy
.cpp' and 'C:\x265\source\common\constants.cpp': 2 and 16 [C:\x265\ma\12b\cli.vcxproj]
LINK : warning C4744: 'unsigned short const (* x265::g_scan4x4)[16]' has different type in 'C:\x265\source\encoder\entropy.cpp'
 and 'C:\x265\source\common\constants.cpp': 'array (128 bytes)' and '__declspec(align(16)) array (128 bytes)' [C:\x265\ma\12b\c
li.vcxproj]
LINK : warning C4742: 'unsigned short const (* x265::g_scan4x4)[16]' has different alignment in 'C:\x265\source\common\quant.cp
p' and 'C:\x265\source\common\constants.cpp': 2 and 16 [C:\x265\ma\12b\cli.vcxproj]
LINK : warning C4744: 'unsigned short const (* x265::g_scan4x4)[16]' has different type in 'C:\x265\source\common\quant.cpp' an
d 'C:\x265\source\common\constants.cpp': 'array (128 bytes)' and '__declspec(align(16)) array (128 bytes)' [C:\x265\ma\12b\cli.
vcxproj]


> 
> 
>      extern const uint8_t g_lastCoeffTable[32];
>      extern const uint8_t g_goRiceRange[5]; // maximum value coded with Rice codes
> 
>     _______________________________________________
>     x265-devel mailing list
>     x265-devel at videolan.org <mailto:x265-devel at videolan.org>
>     https://mailman.videolan.org/listinfo/x265-devel
> 
> 
> 
> 
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
> 



More information about the x265-devel mailing list