[x265] v1.3+362: More or less detailed warnings with GCC 4.8.2

Steve Borho steve at borho.org
Mon Oct 6 18:16:34 CEST 2014


On 10/06, Mario *LigH* Rohkrämer wrote:
> The Win32 8-bit compile has more detailed warnings than the other variants
> (Win64 or 16-bit).
> 
> 
> [Win32 8-bit]
> 
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp: In member
> function 'void x265::Analysis::compressCTU(x265::TComDataCU*, const
> x265::Entropy&)':
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp:717:55: warning:
> array subscript is above array bounds [-Warray-bounds]
>          TComDataCU* subBestPartCU = m_bestCU[nextDepth];
>                                                        ^
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp:718:55: warning:
> array subscript is above array bounds [-Warray-bounds]
>          TComDataCU* subTempPartCU = m_tempCU[nextDepth];
>                                                        ^
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp:717:55: warning:
> array subscript is above array bounds [-Warray-bounds]
>          TComDataCU* subBestPartCU = m_bestCU[nextDepth];
>                                                        ^
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp:718:55: warning:
> array subscript is above array bounds [-Warray-bounds]
>          TComDataCU* subTempPartCU = m_tempCU[nextDepth];
>                                                        ^
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp:750:64: warning:
> array subscript is above array bounds [-Warray-bounds]
>                  zOrder += g_depthInc[ctuToDepthIndex][nextDepth];
>                                                                 ^
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp:750:64: warning:
> array subscript is above array bounds [-Warray-bounds]
>                  zOrder += g_depthInc[ctuToDepthIndex][nextDepth];
>                                                                 ^
> 
> [Win64 8-bit: nothing here]
> 
> [Win32/Win64 16-bit]
> 
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp: In member
> function 'void x265::Analysis::compressCTU(x265::TComDataCU*, const
> x265::Entropy&)':
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp:590:55: warning:
> array subscript is above array bounds [-Warray-bounds]
>          TComDataCU* subBestPartCU = m_bestCU[nextDepth];
>                                                        ^
> h:/MSYS/home/Entwicklung/x265/source/encoder/analysis.cpp:591:55: warning:
> array subscript is above array bounds [-Warray-bounds]
>          TComDataCU* subTempPartCU = m_tempCU[nextDepth];
>                                                        ^

I find it quite interesting that GCC can claim to know that nextDepth is
out of bounds. The logic involved in knowing whether another split is
possible is fairly complicated (and distant from this code). It's pretty
likely GCC is wrong in this case.  But in any event I am working on some
patches at this moment that replace all the lines listed above. We'll
have to revisit this after those are pushed.

> [all]
> 
> h:/MSYS/home/Entwicklung/x265/source/encoder/ratecontrol.cpp: In member
> function 'double x265::RateControl::rateEstimateQscale(x265::Frame*,
> x265::RateControlEntry*)':
> h:/MSYS/home/Entwicklung/x265/source/encoder/ratecontrol.cpp:1342:8:
> warning: 'minVal' may be used uninitialized in this function
> [-Wmaybe-uninitialized]
>  double RateControl::rateEstimateQscale(Frame* pic, RateControlEntry *rce)
>         ^
> h:/MSYS/home/Entwicklung/x265/source/encoder/ratecontrol.cpp:1342:8:
> warning: 'maxVal' may be used uninitialized in this function
> [-Wmaybe-uninitialized]
> h:/MSYS/home/Entwicklung/x265/source/encoder/ratecontrol.cpp:1342:8:
> warning: 'a' may be used uninitialized in this function
> [-Wmaybe-uninitialized]

ah, the old warnings from Clip3 are back. those warnings were definitely
bogus, but we have hacked around them before.

-- 
Steve Borho


More information about the x265-devel mailing list