Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-16.03 362 lines 19 kB view raw
1diff -aur dirac-1.0.2/libdirac_byteio/parseunit_byteio.cpp dirac-1.0.2-modif/libdirac_byteio/parseunit_byteio.cpp 2--- dirac-1.0.2/libdirac_byteio/parseunit_byteio.cpp 2008-05-02 09:57:19.000000000 +0400 3+++ dirac-1.0.2-modif/libdirac_byteio/parseunit_byteio.cpp 2016-02-10 19:39:09.838443767 +0300 4@@ -124,12 +124,9 @@ 5 6 if(prefix==PU_PREFIX) 7 { 8- unsigned char next_parse_code; 9- 10- next_parse_code = InputUnByte(); 11+ (void)InputUnByte(); 12 // input next unit parse-offsets 13- int next_unit_next_parse_offset; 14- next_unit_next_parse_offset = ReadUintLit(PU_NEXT_PARSE_OFFSET_SIZE); 15+ (void)ReadUintLit(PU_NEXT_PARSE_OFFSET_SIZE); 16 17 int next_unit_previous_parse_offset; 18 next_unit_previous_parse_offset = ReadUintLit(PU_PREVIOUS_PARSE_OFFSET_SIZE); 19diff -aur dirac-1.0.2/libdirac_common/mot_comp.cpp dirac-1.0.2-modif/libdirac_common/mot_comp.cpp 20--- dirac-1.0.2/libdirac_common/mot_comp.cpp 2008-10-01 05:26:47.000000000 +0400 21+++ dirac-1.0.2-modif/libdirac_common/mot_comp.cpp 2016-02-10 19:50:18.453051800 +0300 22@@ -1064,10 +1064,10 @@ 23 // We're doing bounds checking because we'll fall off the edge of the reference otherwise. 24 25 //weights for doing linear interpolation, calculated from the remainder values 26- const ValueType linear_wts[4] = { (2 - rmdr.x) * (2 - rmdr.y), //tl 27- rmdr.x * (2 - rmdr.y), //tr 28- (2 - rmdr.x) * rmdr.y, //bl 29- rmdr.x * rmdr.y }; //br 30+ const ValueType linear_wts[4] = { ValueType((2 - rmdr.x) * (2 - rmdr.y)), //tl 31+ ValueType(rmdr.x * (2 - rmdr.y)), //tr 32+ ValueType((2 - rmdr.x) * rmdr.y), //bl 33+ ValueType(rmdr.x * rmdr.y) }; //br 34 35 36 for(int c = 0, uY = ref_start.y,BuY=BChk(uY,trueRefYlen),BuY1=BChk(uY+1,trueRefYlen); 37@@ -1116,10 +1116,10 @@ 38 const ImageCoords ref_start( ( start_pos.x<<1 ) + roundvec.x ,( start_pos.y<<1 ) + roundvec.y ); 39 40 //weights for doing linear interpolation, calculated from the remainder values 41- const ValueType linear_wts[4] = { (4 - rmdr.x) * (4 - rmdr.y), //tl 42- rmdr.x * (4 - rmdr.y), //tr 43- (4 - rmdr.x) * rmdr.y, //bl 44- rmdr.x * rmdr.y }; //br 45+ const ValueType linear_wts[4] = { ValueType((4 - rmdr.x) * (4 - rmdr.y)), //tl 46+ ValueType(rmdr.x * (4 - rmdr.y)), //tr 47+ ValueType((4 - rmdr.x) * rmdr.y), //bl 48+ ValueType(rmdr.x * rmdr.y) }; //br 49 50 //An additional stage to make sure the block to be copied does not fall outside 51 //the reference image. 52diff -aur dirac-1.0.2/libdirac_common/mot_comp_mmx.cpp dirac-1.0.2-modif/libdirac_common/mot_comp_mmx.cpp 53--- dirac-1.0.2/libdirac_common/mot_comp_mmx.cpp 2008-01-09 13:50:23.000000000 +0300 54+++ dirac-1.0.2-modif/libdirac_common/mot_comp_mmx.cpp 2016-02-10 19:59:51.792793538 +0300 55@@ -244,10 +244,10 @@ 56 // We're 2doing bounds checking because we'll fall off the edge of the reference otherwise. 57 58 //weights for doing linear interpolation, calculated from the remainder values 59- const ValueType linear_wts[4] = { (2 - rmdr.x) * (2 - rmdr.y), //tl 60- rmdr.x * (2 - rmdr.y), //tr 61- (2 - rmdr.x) * rmdr.y, //bl 62- rmdr.x * rmdr.y }; //br 63+ const ValueType linear_wts[4] = { ValueType((2 - rmdr.x) * (2 - rmdr.y)), //tl 64+ ValueType(rmdr.x * (2 - rmdr.y)), //tr 65+ ValueType((2 - rmdr.x) * rmdr.y), //bl 66+ ValueType(rmdr.x * rmdr.y) }; //br 67 68 ValueType act_cols1[4], act_cols2[4]; 69 int uX, uY, c, l; 70diff -aur dirac-1.0.2/libdirac_common/mv_codec.cpp dirac-1.0.2-modif/libdirac_common/mv_codec.cpp 71--- dirac-1.0.2/libdirac_common/mv_codec.cpp 2008-10-01 05:26:47.000000000 +0400 72+++ dirac-1.0.2-modif/libdirac_common/mv_codec.cpp 2016-02-10 19:51:57.634838245 +0300 73@@ -159,7 +159,7 @@ 74 // Main code function 75 void PredModeCodec::DoWorkCode( MvData& in_data ) 76 { 77- int step,max; 78+ int step; 79 int split_depth; 80 81 for (m_sb_yp = 0, m_sb_tlb_y = 0; m_sb_yp < in_data.SBSplit().LengthY(); ++m_sb_yp, m_sb_tlb_y += 4) 82@@ -169,7 +169,7 @@ 83 split_depth = in_data.SBSplit()[m_sb_yp][m_sb_xp]; 84 85 step = 4 >> (split_depth); 86- max = (1 << split_depth); 87+ //max = (1 << split_depth); 88 89 //now do all the block modes and mvs in the mb 90 for (m_b_yp = m_sb_tlb_y; m_b_yp < m_sb_tlb_y+4; m_b_yp += step) 91@@ -334,7 +334,7 @@ 92 // Main code function 93 void VectorElementCodec::DoWorkCode( MvData& in_data ) 94 { 95- int step,max; 96+ int step; 97 int split_depth; 98 99 for (m_sb_yp = 0, m_sb_tlb_y = 0; m_sb_yp < in_data.SBSplit().LengthY(); ++m_sb_yp, m_sb_tlb_y += 4) 100@@ -344,7 +344,7 @@ 101 split_depth = in_data.SBSplit()[m_sb_yp][m_sb_xp]; 102 103 step = 4 >> (split_depth); 104- max = (1 << split_depth); 105+ //max = (1 << split_depth); 106 107 //now do all the block modes and mvs in the mb 108 for (m_b_yp = m_sb_tlb_y; m_b_yp < m_sb_tlb_y+4; m_b_yp += step) 109@@ -500,7 +500,7 @@ 110 // Main code function 111 void DCCodec::DoWorkCode( MvData& in_data ) 112 { 113- int step,max; 114+ int step; 115 int split_depth; 116 117 for (m_sb_yp = 0, m_sb_tlb_y = 0; m_sb_yp < in_data.SBSplit().LengthY(); ++m_sb_yp, m_sb_tlb_y += 4) 118@@ -510,7 +510,7 @@ 119 split_depth = in_data.SBSplit()[m_sb_yp][m_sb_xp]; 120 121 step = 4 >> (split_depth); 122- max = (1 << split_depth); 123+ //max = (1 << split_depth); 124 125 //now do all the block modes and mvs in the mb 126 for (m_b_yp = m_sb_tlb_y; m_b_yp < m_sb_tlb_y+4; m_b_yp += step) 127diff -aur dirac-1.0.2/libdirac_common/wavelet_utils.cpp dirac-1.0.2-modif/libdirac_common/wavelet_utils.cpp 128--- dirac-1.0.2/libdirac_common/wavelet_utils.cpp 2008-10-20 08:21:02.000000000 +0400 129+++ dirac-1.0.2-modif/libdirac_common/wavelet_utils.cpp 2016-02-10 19:58:16.205006445 +0300 130@@ -198,7 +198,6 @@ 131 const bool field_coding = encparams.FieldCoding(); 132 const ChromaFormat cformat = pparams.CFormat(); 133 const float cpd = encparams.CPD()*cpd_scale_factor; 134- const PictureSort psort = pparams.PicSort(); 135 136 int xlen, ylen, xl, yl, xp, yp; 137 float xfreq, yfreq; 138diff -aur dirac-1.0.2/libdirac_encoder/picture_compress.cpp dirac-1.0.2-modif/libdirac_encoder/picture_compress.cpp 139--- dirac-1.0.2/libdirac_encoder/picture_compress.cpp 2009-01-21 08:20:57.000000000 +0300 140+++ dirac-1.0.2-modif/libdirac_encoder/picture_compress.cpp 2016-02-10 20:08:17.935731263 +0300 141@@ -413,14 +413,12 @@ 142 143 const int depth=m_encparams.TransformDepth(); 144 145- PicArray* comp_data[3]; 146 CoeffArray* coeff_data[3]; 147 OneDArray<unsigned int>* est_bits[3]; 148 float lambda[3]; 149 150 // Construction and definition of objects 151 for (int c=0;c<3;++c){ 152- comp_data[c] = &my_picture.Data((CompSort) c ); 153 coeff_data[c] = &my_picture.WltData((CompSort) c ); 154 est_bits[c] = new OneDArray<unsigned int>( Range( 1, 3*depth+1 ) ); 155 }// c 156diff -aur dirac-1.0.2/libdirac_encoder/quant_chooser.cpp dirac-1.0.2-modif/libdirac_encoder/quant_chooser.cpp 157--- dirac-1.0.2/libdirac_encoder/quant_chooser.cpp 2009-01-21 08:22:05.000000000 +0300 158+++ dirac-1.0.2-modif/libdirac_encoder/quant_chooser.cpp 2016-02-10 20:15:43.792954708 +0300 159@@ -340,7 +340,7 @@ 160 { 161 for (int i=cblock.Xstart(); i<cblock.Xend(); ++i ) 162 { 163- if ( (std::abs(m_coeff_data[j][i])<<2) >= u_threshold ) 164+ if ( (int(std::abs(m_coeff_data[j][i]))<<2) >= u_threshold ) 165 can_skip = false; 166 } 167 } 168@@ -349,13 +349,13 @@ 169 170 CoeffType QuantChooser::BlockAbsMax( const Subband& node ) 171 { 172- int val( 0 ); 173+ CoeffType val( 0 ); 174 175 for (int j=node.Yp() ; j<node.Yp()+node.Yl(); ++j) 176 { 177 for (int i=node.Xp() ; i<node.Xp()+node.Xl(); ++i) 178 { 179- val = std::max( val , std::abs(m_coeff_data[j][i]) ); 180+ val = std::max( val , CoeffType(std::abs(m_coeff_data[j][i])) ); 181 }// i 182 }// j 183 184diff -aur dirac-1.0.2/libdirac_encoder/seq_compress.cpp dirac-1.0.2-modif/libdirac_encoder/seq_compress.cpp 185--- dirac-1.0.2/libdirac_encoder/seq_compress.cpp 2008-10-29 05:42:06.000000000 +0300 186+++ dirac-1.0.2-modif/libdirac_encoder/seq_compress.cpp 2016-02-10 20:16:24.108885403 +0300 187@@ -663,7 +663,6 @@ 188 189 int FrameSequenceCompressor::CodedToDisplay( const int cnum ) 190 { 191- int div; 192 193 if (m_L1_sep>0) 194 { 195@@ -672,7 +671,6 @@ 196 return 0; 197 else if ((cnum-1)% m_L1_sep==0) 198 {//we have L1 or subsequent I pictures 199- div=(cnum-1)/m_L1_sep; 200 return cnum+m_L1_sep-1; 201 } 202 else//we have L2 pictures 203diff -aur dirac-1.0.2/libdirac_motionest/me_utils.cpp dirac-1.0.2-modif/libdirac_motionest/me_utils.cpp 204--- dirac-1.0.2/libdirac_motionest/me_utils.cpp 2008-10-21 08:55:46.000000000 +0400 205+++ dirac-1.0.2-modif/libdirac_motionest/me_utils.cpp 2016-02-10 20:04:40.068175649 +0300 206@@ -684,10 +684,10 @@ 207 // We're doing bounds checking because we'll fall off the edge of the reference otherwise. 208 209 // weights for doing linear interpolation, calculated from the remainder values 210- const ValueType linear_wts[4] = { (2 - rmdr.x) * (2 - rmdr.y), //tl 211- rmdr.x * (2 - rmdr.y), //tr 212- (2 - rmdr.x) * rmdr.y, //bl 213- rmdr.x * rmdr.y }; //br 214+ const ValueType linear_wts[4] = { ValueType((2 - rmdr.x) * (2 - rmdr.y)), //tl 215+ ValueType(rmdr.x * (2 - rmdr.y)), //tr 216+ ValueType((2 - rmdr.x) * rmdr.y), //bl 217+ ValueType(rmdr.x * rmdr.y) }; //br 218 219 const int refXlen( m_ref_data.LengthX() ); 220 const int refYlen( m_ref_data.LengthY() ); 221@@ -848,10 +848,10 @@ 222 // We're doing bounds checking because we'll fall off the edge of the reference otherwise. 223 224 // weights for doing linear interpolation, calculated from the remainder values 225- const ValueType linear_wts[4] = { (2 - rmdr.x) * (2 - rmdr.y), //tl 226- rmdr.x * (2 - rmdr.y), //tr 227- (2 - rmdr.x) * rmdr.y, //bl 228- rmdr.x * rmdr.y }; //br 229+ const ValueType linear_wts[4] = { ValueType((2 - rmdr.x) * (2 - rmdr.y)), //tl 230+ ValueType(rmdr.x * (2 - rmdr.y)), //tr 231+ ValueType((2 - rmdr.x) * rmdr.y), //bl 232+ ValueType(rmdr.x * rmdr.y) }; //br 233 234 const int refXlen( m_ref_data.LengthX() ); 235 const int refYlen( m_ref_data.LengthY() ); 236@@ -908,10 +908,10 @@ 237 const int pic_next( m_pic_data.LengthX() - dparams.Xl() );// go down a row and back up 238 239 //weights for doing linear interpolation, calculated from the remainder values 240- const ValueType linear_wts[4] = { (4 - rmdr.x) * (4 - rmdr.y), //tl 241- rmdr.x * (4 - rmdr.y), //tr 242- (4 - rmdr.x) * rmdr.y, //bl 243- rmdr.x * rmdr.y }; //br 244+ const ValueType linear_wts[4] = { ValueType((4 - rmdr.x) * (4 - rmdr.y)), //tl 245+ ValueType(rmdr.x * (4 - rmdr.y)), //tr 246+ ValueType((4 - rmdr.x) * rmdr.y), //bl 247+ ValueType(rmdr.x * rmdr.y) }; //br 248 249 bool bounds_check( false ); 250 251@@ -1039,10 +1039,10 @@ 252 const int pic_next( m_pic_data.LengthX() - dparams.Xl() );// go down a row and back up 253 254 //weights for doing linear interpolation, calculated from the remainder values 255- const ValueType linear_wts[4] = { (4 - rmdr.x) * (4 - rmdr.y), //tl 256- rmdr.x * (4 - rmdr.y), //tr 257- (4 - rmdr.x) * rmdr.y, //bl 258- rmdr.x * rmdr.y }; //br 259+ const ValueType linear_wts[4] = { ValueType((4 - rmdr.x) * (4 - rmdr.y)), //tl 260+ ValueType(rmdr.x * (4 - rmdr.y)), //tr 261+ ValueType((4 - rmdr.x) * rmdr.y), //bl 262+ ValueType(rmdr.x * rmdr.y) }; //br 263 264 bool bounds_check( false ); 265 266@@ -1403,10 +1403,10 @@ 267 } 268 else 269 { 270- const ValueType linear_wts[4] = { (2 - rmdr1.x) * (2 - rmdr1.y), //tl 271- rmdr1.x * (2 - rmdr1.y), //tr 272- (2 - rmdr1.x) * rmdr1.y, //bl 273- rmdr1.x * rmdr1.y }; //br 274+ const ValueType linear_wts[4] = { ValueType((2 - rmdr1.x) * (2 - rmdr1.y)), //tl 275+ ValueType(rmdr1.x * (2 - rmdr1.y)), //tr 276+ ValueType((2 - rmdr1.x) * rmdr1.y), //bl 277+ ValueType(rmdr1.x * rmdr1.y) }; //br 278 279 // We're doing bounds checking because we'll fall off the edge of the reference otherwise. 280 for( int y=dparams.Yl(), ry=ref_start1.y, by=BChk(ry,m_ref_data1.LengthY()), by1=BChk(ry+1,m_ref_data1.LengthY()); 281@@ -1513,10 +1513,10 @@ 282 } 283 else 284 { 285- const ValueType linear_wts[4] = { (2 - rmdr2.x) * (2 - rmdr2.y), //tl 286- rmdr2.x * (2 - rmdr2.y), //tr 287- (2 - rmdr2.x) * rmdr2.y, //bl 288- rmdr2.x * rmdr2.y }; //br 289+ const ValueType linear_wts[4] = { ValueType((2 - rmdr2.x) * (2 - rmdr2.y)), //tl 290+ ValueType(rmdr2.x * (2 - rmdr2.y)), //tr 291+ ValueType((2 - rmdr2.x) * rmdr2.y), //bl 292+ ValueType(rmdr2.x * rmdr2.y) }; //br 293 294 // We're doing bounds checking because we'll fall off the edge of the reference otherwise. 295 for( int y=dparams.Yl(), ry=ref_start2.y, by=BChk(ry,m_ref_data2.LengthY()),by1=BChk(ry+1,m_ref_data2.LengthY()); 296@@ -1564,14 +1564,14 @@ 297 const MVector rmdr2( mv2.x & 3 , mv2.y & 3 ); 298 299 //weights for doing linear interpolation, calculated from the remainder values 300- const ValueType linear_wts1[4] = { (4 - rmdr1.x) * (4 - rmdr1.y), //tl 301- rmdr1.x * (4 - rmdr1.y), //tr 302- (4 - rmdr1.x) * rmdr1.y, //bl 303- rmdr1.x * rmdr1.y }; //br 304- const ValueType linear_wts2[4] = { (4 - rmdr2.x) * (4 - rmdr2.y), //tl 305- rmdr2.x * (4 - rmdr2.y), //tr 306- (4 - rmdr2.x) * rmdr2.y, //bl 307- rmdr2.x * rmdr2.y }; //br 308+ const ValueType linear_wts1[4] = { ValueType((4 - rmdr1.x) * (4 - rmdr1.y)), //tl 309+ ValueType(rmdr1.x * (4 - rmdr1.y)), //tr 310+ ValueType((4 - rmdr1.x) * rmdr1.y), //bl 311+ ValueType(rmdr1.x * rmdr1.y) }; //br 312+ const ValueType linear_wts2[4] = { ValueType((4 - rmdr2.x) * (4 - rmdr2.y)), //tl 313+ ValueType(rmdr2.x * (4 - rmdr2.y)), //tr 314+ ValueType((4 - rmdr2.x) * rmdr2.y), //bl 315+ ValueType(rmdr2.x * rmdr2.y) }; //br 316 317 //Where to start in the upconverted images 318 const ImageCoords ref_start1( ( dparams.Xp()<<1 ) + roundvec1.x ,( dparams.Yp()<<1 ) + roundvec1.y ); 319diff -aur dirac-1.0.2/util/conversion/common/bitmap.cpp dirac-1.0.2-modif/util/conversion/common/bitmap.cpp 320--- dirac-1.0.2/util/conversion/common/bitmap.cpp 2004-06-30 20:44:52.000000000 +0400 321+++ dirac-1.0.2-modif/util/conversion/common/bitmap.cpp 2016-02-10 20:19:58.355494888 +0300 322@@ -142,14 +142,9 @@ 323 char signature[2]; 324 int fileSize; 325 int dataOffset; 326- int size; 327 int planes; 328 int bitCount; 329 int compression; 330- int imageSize; 331- int xPixelsPerM, yPixelsPerM; 332- int coloursUsed; 333- int coloursImportant; 334 //Define buffer to read bytes into. 335 const int bufferSize = 54; 336 char buffer[bufferSize]; 337@@ -175,7 +170,7 @@ 338 //Reposition input buffer to skip over extra header data if necessary 339 //Should check success of operation (see The C++ Stand Lib, Josuttis, p665) 340 if (dataOffset>54) inbuf.pubseekoff(dataOffset-54, std::ios_base::cur, std::ios_base::in); 341- size = read4bytes(buffer+14); 342+ (void)read4bytes(buffer+14); // size 343 w = read4bytes(buffer+18); 344 h = read4bytes(buffer+22); 345 if ( fileSize != (dataOffset + height()*lineBufferSize()) ) input.setstate(std::ios::failbit); 346@@ -185,11 +180,11 @@ 347 if ( bitCount != 24 ) input.setstate(std::ios::failbit); 348 compression = read4bytes(buffer+30); 349 if ( compression != 0 ) input.setstate(std::ios::failbit); 350- imageSize = read4bytes(buffer+34); 351- xPixelsPerM = read4bytes(buffer+38); 352- yPixelsPerM = read4bytes(buffer+42); 353- coloursUsed = read4bytes(buffer+46); 354- coloursImportant = read4bytes(buffer+50); 355+ (void)read4bytes(buffer+34); // imageSize 356+ (void)read4bytes(buffer+38); // xPixelsPerM 357+ (void)read4bytes(buffer+42); // yPixelsPerM 358+ (void)read4bytes(buffer+46); // coloursUsed 359+ (void)read4bytes(buffer+50); // coloursImportant 360 return input; } 361 362 } // end namespace dirac_vu