multimedia/dirac and gcc4[78]

Chris Rees utisoft at gmail.com
Thu May 16 17:16:52 UTC 2013


Hm, does removing -Werror help?

Chris
On 13 May 2013 23:37, "Mikhail T." <mi+thun at aldan.algebra.com> wrote:

> Gentlemen!
>
> In order to build the dirac port with gcc47 or gcc48, I had to apply the
> attached patches. Please, commit or allow me to. Thank you very much. Yours,
>
>    -mi
>
>
> --- configure   2009-02-10 20:43:40.000000000 -0500
> +++ configure   2013-05-13 17:57:06.000000000 -0400
> @@ -20349,11 +20349,4 @@
>         :
>      fi
> -                               case "$host" in
> -                       i386-*) TRY_CFLAGS="$OPT_CFLAGS -march=i386";;
> -                       i486-*) TRY_CFLAGS="$OPT_CFLAGS -march=i486";;
> -                       i586-*) TRY_CFLAGS="$OPT_CFLAGS -march=pentium";;
> -                       i686-*) TRY_CFLAGS="$OPT_CFLAGS
> -march=pentiumpro";;
> -                       k6-*)   TRY_CFLAGS="$OPT_CFLAGS -march=k6";;
> -               esac
>                 { $as_echo "$as_me:$LINENO: checking if $CXX supports
> $TRY_CFLAGS $CXXFLAGS flags" >&5
>  $as_echo_n "checking if $CXX supports $TRY_CFLAGS $CXXFLAGS flags... "
> >&6; }
>
> From:
>         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564976#10
>
> http://sourceforge.net/tracker/index.php?func=detail&aid=2984304&group_id=102564&atid=632200
>
> --- libdirac_encoder/quant_chooser.cpp  2009-01-21 05:22:05.000000000 +0000
> +++ libdirac_encoder/quant_chooser.cpp  2010-07-03 17:40:12.000000000 +0000
> @@ -340,7 +340,7 @@
>      {
>          for (int i=cblock.Xstart(); i<cblock.Xend(); ++i )
>          {
> -            if ( (std::abs(m_coeff_data[j][i])<<2) >= u_threshold )
> +            if ( (std::abs(int(m_coeff_data[j][i]))<<2) >= u_threshold )
>                  can_skip = false;
>          }
>      }
> @@ -355,7 +355,7 @@
>      {
>          for (int i=node.Xp() ; i<node.Xp()+node.Xl(); ++i)
>          {
> -            val = std::max( val , std::abs(m_coeff_data[j][i]) );
> +            val = std::max( val , std::abs(int(m_coeff_data[j][i])) );
>          }// i
>      }// j
>
>
> --- libdirac_byteio/parseunit_byteio.cpp        2008-05-02
> 01:57:19.000000000 -0400
> +++ libdirac_byteio/parseunit_byteio.cpp        2013-05-13
> 16:20:30.000000000 -0400
> @@ -125,10 +125,7 @@
>      if(prefix==PU_PREFIX)
>      {
> -        unsigned char next_parse_code;
> -
> -        next_parse_code = InputUnByte();
> +        InputUnByte();
>          // input next unit parse-offsets
> -        int next_unit_next_parse_offset;
> -        next_unit_next_parse_offset =
> ReadUintLit(PU_NEXT_PARSE_OFFSET_SIZE);
> +        ReadUintLit(PU_NEXT_PARSE_OFFSET_SIZE);
>
>          int next_unit_previous_parse_offset;
> --- libdirac_common/mot_comp.cpp        2008-09-30 21:26:47.000000000 -0400
> +++ libdirac_common/mot_comp.cpp        2013-05-13 16:24:08.000000000 -0400
> @@ -1117,8 +1117,8 @@
>
>      //weights for doing linear interpolation, calculated from the
> remainder values
> -    const ValueType linear_wts[4] = {  (4 - rmdr.x) * (4 - rmdr.y),
>  //tl
> -                                    rmdr.x * (4 - rmdr.y),          //tr
> -                                    (4 - rmdr.x) * rmdr.y,          //bl
> -                                    rmdr.x * rmdr.y };              //br
> +    const ValueType linear_wts[4] = {  (ValueType)((4 - rmdr.x) * (4 -
> rmdr.y)),    //tl
> +                                    (ValueType)(rmdr.x * (4 - rmdr.y)),
>        //tr
> +                                    (ValueType)((4 - rmdr.x) * rmdr.y),
>        //bl
> +                                    (ValueType)(rmdr.x * rmdr.y) };
>        //br
>
>      //An additional stage to make sure the block to be copied does not
> fall outside
> --- libdirac_common/mv_codec.cpp        2008-09-30 21:26:47.000000000 -0400
> +++ libdirac_common/mv_codec.cpp        2013-05-13 16:27:46.000000000 -0400
> @@ -160,5 +160,5 @@
>  void PredModeCodec::DoWorkCode( MvData& in_data )
>  {
> -    int step,max;
> +    int step;
>      int split_depth;
>
> @@ -170,6 +170,5 @@
>
>              step = 4  >>  (split_depth);
> -            max = (1 << split_depth);
> -
> +
>              //now do all the block modes and mvs in the mb
>              for (m_b_yp = m_sb_tlb_y; m_b_yp < m_sb_tlb_y+4; m_b_yp +=
> step)
> @@ -335,5 +334,5 @@
>  void VectorElementCodec::DoWorkCode( MvData& in_data )
>  {
> -    int step,max;
> +    int step;
>      int split_depth;
>
> @@ -345,6 +344,5 @@
>
>              step = 4  >>  (split_depth);
> -            max = (1 << split_depth);
> -
> +
>              //now do all the block modes and mvs in the mb
>              for (m_b_yp = m_sb_tlb_y; m_b_yp < m_sb_tlb_y+4; m_b_yp +=
> step)
> @@ -501,5 +499,5 @@
>  void DCCodec::DoWorkCode( MvData& in_data )
>  {
> -    int step,max;
> +    int step;
>      int split_depth;
>
> @@ -511,6 +509,5 @@
>
>              step = 4  >>  (split_depth);
> -            max = (1 << split_depth);
> -
> +
>              //now do all the block modes and mvs in the mb
>              for (m_b_yp = m_sb_tlb_y; m_b_yp < m_sb_tlb_y+4; m_b_yp +=
> step)
> --- libdirac_common/wavelet_utils.cpp   2008-10-20 00:21:02.000000000 -0400
> +++ libdirac_common/wavelet_utils.cpp   2013-05-13 16:33:00.000000000 -0400
> @@ -199,5 +199,4 @@
>      const ChromaFormat cformat = pparams.CFormat();
>      const float cpd = encparams.CPD()*cpd_scale_factor;
> -    const PictureSort psort = pparams.PicSort();
>
>      int xlen, ylen, xl, yl, xp, yp;
> --- libdirac_common/mot_comp_mmx.cpp    2008-01-09 05:50:23.000000000 -0500
> +++ libdirac_common/mot_comp_mmx.cpp    2013-05-13 16:34:58.000000000 -0400
> @@ -245,8 +245,8 @@
>
>          //weights for doing linear interpolation, calculated from the
> remainder values
> -        const ValueType linear_wts[4] = {  (2 - rmdr.x) * (2 - rmdr.y),
>  //tl
> -                                           rmdr.x * (2 - rmdr.y),
>  //tr
> -                                           (2 - rmdr.x) * rmdr.y,
>  //bl
> -                                           rmdr.x * rmdr.y };
>  //br
> +        const ValueType linear_wts[4] = { (ValueType)((2 - rmdr.x) * (2 -
> rmdr.y)),   //tl
> +                                          (ValueType)(rmdr.x * (2 -
> rmdr.y)),         //tr
> +                                          (ValueType)((2 - rmdr.x) *
> rmdr.y),         //bl
> +                                          (ValueType)(rmdr.x * rmdr.y) };
>             //br
>
>          ValueType act_cols1[4], act_cols2[4];
> --- libdirac_motionest/me_utils.cpp     2008-10-21 00:55:46.000000000 -0400
> +++ libdirac_motionest/me_utils.cpp     2013-05-13 16:49:34.000000000 -0400
> @@ -685,8 +685,8 @@
>
>         // weights for doing linear interpolation, calculated from the
> remainder values
> -        const ValueType linear_wts[4] = {  (2 - rmdr.x) * (2 - rmdr.y),
>  //tl
> -                                           rmdr.x * (2 - rmdr.y),
>  //tr
> -                                           (2 - rmdr.x) * rmdr.y,
>  //bl
> -                                           rmdr.x * rmdr.y };
>  //br
> +        const ValueType linear_wts[4] = { (ValueType)((2 - rmdr.x) * (2 -
> rmdr.y)),    //tl
> +                                          (ValueType)(rmdr.x * (2 -
> rmdr.y)),          //tr
> +                                          (ValueType)((2 - rmdr.x) *
> rmdr.y),          //bl
> +                                          (ValueType)(rmdr.x * rmdr.y) };
>              //br
>
>          const int refXlen( m_ref_data.LengthX() );
> @@ -849,8 +849,8 @@
>
>         // weights for doing linear interpolation, calculated from the
> remainder values
> -        const ValueType linear_wts[4] = {  (2 - rmdr.x) * (2 - rmdr.y),
>  //tl
> -                                           rmdr.x * (2 - rmdr.y),
>  //tr
> -                                           (2 - rmdr.x) * rmdr.y,
>  //bl
> -                                           rmdr.x * rmdr.y };
>  //br
> +        const ValueType linear_wts[4] = { (ValueType)((2 - rmdr.x) * (2 -
> rmdr.y)),    //tl
> +                                          (ValueType)(rmdr.x * (2 -
> rmdr.y)),          //tr
> +                                          (ValueType)((2 - rmdr.x) *
> rmdr.y),          //bl
> +                                          (ValueType)(rmdr.x * rmdr.y) };
>              //br
>
>          const int refXlen( m_ref_data.LengthX() );
> @@ -909,8 +909,8 @@
>
>      //weights for doing linear interpolation, calculated from the
> remainder values
> -    const ValueType linear_wts[4] = {  (4 - rmdr.x) * (4 - rmdr.y),
>  //tl
> -                                       rmdr.x * (4 - rmdr.y),
>  //tr
> -                                       (4 - rmdr.x) * rmdr.y,
>  //bl
> -                                       rmdr.x * rmdr.y };
>  //br
> +    const ValueType linear_wts[4] = { (ValueType)((4 - rmdr.x) * (4 -
> rmdr.y)),    //tl
> +                                      (ValueType)(rmdr.x * (4 - rmdr.y)),
>          //tr
> +                                      (ValueType)((4 - rmdr.x) * rmdr.y),
>          //bl
> +                                      (ValueType)(rmdr.x * rmdr.y) };
>          //br
>
>      bool bounds_check( false );
> @@ -1040,8 +1040,8 @@
>
>      //weights for doing linear interpolation, calculated from the
> remainder values
> -    const ValueType linear_wts[4] = {  (4 - rmdr.x) * (4 - rmdr.y),
>  //tl
> -                                       rmdr.x * (4 - rmdr.y),
>  //tr
> -                                       (4 - rmdr.x) * rmdr.y,
>  //bl
> -                                       rmdr.x * rmdr.y };
>  //br
> +    const ValueType linear_wts[4] = { (ValueType)((4 - rmdr.x) * (4 -
> rmdr.y)),    //tl
> +                                      (ValueType)(rmdr.x * (4 - rmdr.y)),
>          //tr
> +                                      (ValueType)((4 - rmdr.x) * rmdr.y),
>          //bl
> +                                      (ValueType)(rmdr.x * rmdr.y) };
>          //br
>
>      bool bounds_check( false );
> @@ -1404,8 +1404,8 @@
>      else
>      {
> -        const ValueType linear_wts[4] = {  (2 - rmdr1.x) * (2 - rmdr1.y),
>    //tl
> -                                           rmdr1.x * (2 - rmdr1.y),
>    //tr
> -                                           (2 - rmdr1.x) * rmdr1.y,
>    //bl
> -                                           rmdr1.x * rmdr1.y };
>    //br
> +        const ValueType linear_wts[4] = { (ValueType)((2 - rmdr1.x) * (2
> - rmdr1.y)),    //tl
> +                                          (ValueType)(rmdr1.x * (2 -
> rmdr1.y)),          //tr
> +                                          (ValueType)((2 - rmdr1.x) *
> rmdr1.y),          //bl
> +                                          (ValueType)(rmdr1.x * rmdr1.y)
> };              //br
>
>          // We're doing bounds checking because we'll fall off the edge of
> the reference otherwise.
> @@ -1514,8 +1514,8 @@
>      else
>      {
> -        const ValueType linear_wts[4] = {  (2 - rmdr2.x) * (2 - rmdr2.y),
>    //tl
> -                                           rmdr2.x * (2 - rmdr2.y),
>    //tr
> -                                           (2 - rmdr2.x) * rmdr2.y,
>    //bl
> -                                           rmdr2.x * rmdr2.y };
>    //br
> +        const ValueType linear_wts[4] = { (ValueType)((2 - rmdr2.x) * (2
> - rmdr2.y)),    //tl
> +                                          (ValueType)(rmdr2.x * (2 -
> rmdr2.y)),          //tr
> +                                          (ValueType)((2 - rmdr2.x) *
> rmdr2.y),          //bl
> +                                          (ValueType)(rmdr2.x * rmdr2.y)
> };              //br
>
>          // We're doing bounds checking because we'll fall off the edge of
> the reference otherwise.
> @@ -1565,12 +1565,12 @@
>
>      //weights for doing linear interpolation, calculated from the
> remainder values
> -    const ValueType linear_wts1[4] = {  (4 - rmdr1.x) * (4 - rmdr1.y),
>  //tl
> -                                       rmdr1.x * (4 - rmdr1.y),
>  //tr
> -                                       (4 - rmdr1.x) * rmdr1.y,
>  //bl
> -                                       rmdr1.x * rmdr1.y };
>  //br
> -    const ValueType linear_wts2[4] = {  (4 - rmdr2.x) * (4 - rmdr2.y),
>  //tl
> -                                       rmdr2.x * (4 - rmdr2.y),
>  //tr
> -                                       (4 - rmdr2.x) * rmdr2.y,
>  //bl
> -                                       rmdr2.x * rmdr2.y };
>  //br
> +    const ValueType linear_wts1[4] = { (ValueType)((4 - rmdr1.x) * (4 -
> rmdr1.y)),    //tl
> +                                       (ValueType)(rmdr1.x * (4 -
> rmdr1.y)),          //tr
> +                                       (ValueType)((4 - rmdr1.x) *
> rmdr1.y),          //bl
> +                                       (ValueType)(rmdr1.x * rmdr1.y) };
>              //br
> +    const ValueType linear_wts2[4] = { (ValueType)((4 - rmdr2.x) * (4 -
> rmdr2.y)),    //tl
> +                                       (ValueType)(rmdr2.x * (4 -
> rmdr2.y)),          //tr
> +                                       (ValueType)((4 - rmdr2.x) *
> rmdr2.y),          //bl
> +                                       (ValueType)(rmdr2.x * rmdr2.y) };
>              //br
>
>      //Where to start in the upconverted images
> --- libdirac_encoder/picture_compress.cpp       2009-01-21
> 00:20:57.000000000 -0500
> +++ libdirac_encoder/picture_compress.cpp       2013-05-13
> 16:51:58.000000000 -0400
> @@ -414,5 +414,4 @@
>          const int depth=m_encparams.TransformDepth();
>
> -        PicArray* comp_data[3];
>          CoeffArray* coeff_data[3];
>          OneDArray<unsigned int>* est_bits[3];
> @@ -421,5 +420,4 @@
>          // Construction and definition of objects
>          for (int c=0;c<3;++c){
> -            comp_data[c] = &my_picture.Data((CompSort) c );
>             coeff_data[c] = &my_picture.WltData((CompSort) c );
>              est_bits[c] =  new OneDArray<unsigned int>( Range( 1,
> 3*depth+1 ) );
> --- libdirac_encoder/seq_compress.cpp   2008-10-28 22:42:06.000000000 -0400
> +++ libdirac_encoder/seq_compress.cpp   2013-05-13 17:21:17.000000000 -0400
> @@ -664,6 +664,4 @@
>  int FrameSequenceCompressor::CodedToDisplay( const int cnum )
>  {
> -    int div;
> -
>      if (m_L1_sep>0)
>      {
> @@ -673,5 +671,4 @@
>          else if ((cnum-1)% m_L1_sep==0)
>          {//we have L1 or subsequent I pictures
> -            div=(cnum-1)/m_L1_sep;
>              return cnum+m_L1_sep-1;
>          }
> --- util/conversion/common/bitmap.cpp   2004-06-30 12:44:52.000000000 -0400
> +++ util/conversion/common/bitmap.cpp   2013-05-13 17:26:34.000000000 -0400
> @@ -143,12 +143,7 @@
>          int fileSize;
>          int dataOffset;
> -        int size;
>          int planes;
>          int bitCount;
>          int compression;
> -        int imageSize;
> -        int xPixelsPerM, yPixelsPerM;
> -        int coloursUsed;
> -        int coloursImportant;
>          //Define buffer to read bytes into.
>          const int bufferSize = 54;
> @@ -176,5 +171,5 @@
>          //Should check success of operation (see The C++ Stand Lib,
> Josuttis, p665)
>          if (dataOffset>54) inbuf.pubseekoff(dataOffset-54,
> std::ios_base::cur, std::ios_base::in);
> -        size = read4bytes(buffer+14);
> +        read4bytes(buffer+14); /* size */
>          w = read4bytes(buffer+18);
>          h = read4bytes(buffer+22);
> @@ -186,9 +181,9 @@
>          compression = read4bytes(buffer+30);
>          if ( compression != 0 ) input.setstate(std::ios::failbit);
> -        imageSize = read4bytes(buffer+34);
> -        xPixelsPerM = read4bytes(buffer+38);
> -        yPixelsPerM = read4bytes(buffer+42);
> -        coloursUsed = read4bytes(buffer+46);
> -        coloursImportant = read4bytes(buffer+50);
> +        read4bytes(buffer+34); /* imageSize */
> +        read4bytes(buffer+38); /* xPixelsPerM */
> +        read4bytes(buffer+42); /* yPixelsPerM */
> +        read4bytes(buffer+46); /* coloursUsed */
> +        read4bytes(buffer+50); /* coloursImportant */
>          return input; }
>
>
> _______________________________________________
> freebsd-multimedia at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
> To unsubscribe, send any mail to "
> freebsd-multimedia-unsubscribe at freebsd.org"
>


More information about the freebsd-multimedia mailing list