#53 Dirac-1.0.2 quant_chooser.cpp fails with gcc45

open
nobody
None
5
2010-04-09
2010-04-09
Dave Plater
No

I maintain dirac in openSUSE and it fails on :-
quant_chooser.cpp: In member function 'void dirac::QuantChooser::SetSkip(dirac::CodeBlock&, int)':
quant_chooser.cpp:343:49: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type' and 'int' to binary'operator<<'
in line 343 where [i] is column 49 :-
if ( (std::abs(m_coeff_data[j][i])<<2) >= u_threshold )
can_skip = false;
In function :-
void QuantChooser::SetSkip( CodeBlock& cblock , const int qidx)
{
const int u_threshold = dirac_quantiser_lists.QuantFactor4( qidx );
// Sets the skip flag for a codeblock
bool can_skip = true;
for (int j=cblock.Ystart(); j<cblock.Yend(); ++j )
{
for (int i=cblock.Xstart(); i<cblock.Xend(); ++i )
{
if ( (std::abs(m_coeff_data[j][i])<<2) >= u_threshold )
can_skip = false;
} }
cblock.SetSkip( can_skip );
}
> and also :-
> quant_chooser.cpp: In member function 'dirac::CoeffType> dirac::QuantChooser::BlockAbsMax(const dirac::Subband&)':
> quant_chooser.cpp:358:64: error: no matching function for call to
> 'max(int&, __gnu_cxx::__enable_if<true, double>::__type)'
> In line 358 where the last ) before ; is column 64:-
> val = std::max( val , std::abs(m_coeff_data[j][i]) );
> In function
> CoeffType QuantChooser::BlockAbsMax( const Subband& node )
> {
> int val( 0 );
>
> for (int j=node.Yp() ; j<node.Yp()+node.Yl(); ++j)
> {
> for (int i=node.Xp() ; i<node.Xp()+node.Xl(); ++i)
> { val = std::max( val , std::abs(m_coeff_data[j][i]) );
> }// i
> }// j
>
> return val;
> }

The -fpermissive flag doesn't work either but the suse 11.2 version builds with gcc44.

Discussion

  • Florin Braescu
    Florin Braescu
    2010-04-26

    I can confirm the bug for Lunar-Linux distro too.

     
  • Fixed.