From owner-freebsd-multimedia@FreeBSD.ORG Mon May 13 22:37:47 2013 Return-Path: Delivered-To: multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4FDC4DE5 for ; Mon, 13 May 2013 22:37:47 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.com) Received: from smtp.rcn.com (smtp.rcn.com [69.168.97.78]) by mx1.freebsd.org (Postfix) with ESMTP id EF8FDEC9 for ; Mon, 13 May 2013 22:37:46 +0000 (UTC) X_CMAE_Category: 0,0 Undefined,Undefined X-CNFS-Analysis: v=2.0 cv=EMiEIilC c=1 sm=0 a=fEl05wXzeJCkBz9gs2itqQ==:17 a=FtuzIWGT4-YA:10 a=owsjQEjaMGoA:10 a=YNqtyO0l_hcA:10 a=LaogzpLLAAAA:8 a=X8MPi3fWYVwA:10 a=K3kzJQaFSC7c9JXdwSwA:9 a=wPNLvfGTeEIA:10 a=EIY2Xhy64AMDXZx6HGYA:9 a=_W_S_7VecoQA:10 a=C0-GoLs2URe1xsBaRbYA:9 a=sOKxrc_Uve4A:10 a=xNf9USuDAAAA:8 a=FP58Ms26AAAA:8 a=lCVXOeqqE5Y-9PGZPVkA:9 a=zlCbrPHyOO0A:10 a=gxOmRULAtWIc43L8yigA:9 a=xbtMIHYz6iGzu9_M:21 a=fEl05wXzeJCkBz9gs2itqQ==:117 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: smtp02.rcn.cmh.synacor.com smtp.mail=mi+thun@aldan.algebra.com; spf=neutral; sender-id=neutral Authentication-Results: smtp02.rcn.cmh.synacor.com header.from=mi+thun@aldan.algebra.com; sender-id=neutral Authentication-Results: smtp02.rcn.cmh.synacor.com smtp.user=anat; auth=pass (PLAIN) Received-SPF: neutral (smtp02.rcn.cmh.synacor.com: 209.6.63.29 is neither permitted nor denied by domain of aldan.algebra.com) Received: from [209.6.63.29] ([209.6.63.29:13943] helo=utka.zajac) by smtp.rcn.com (envelope-from ) (ecelerity 2.2.3.49 r(42060/42061)) with ESMTPA id 4A/5C-26387-93B61915; Mon, 13 May 2013 18:37:45 -0400 Message-ID: <51916B38.6010806@aldan.algebra.com> Date: Mon, 13 May 2013 18:37:44 -0400 From: "Mikhail T." User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130325 Thunderbird/17.0.4 MIME-Version: 1.0 To: multimedia@FreeBSD.org Subject: multimedia/dirac and gcc4[78] Content-Type: multipart/mixed; boundary="------------040002010808090806040208" X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: bms@FreeBSD.org X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 May 2013 22:37:47 -0000 This is a multi-part message in MIME format. --------------040002010808090806040208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------040002010808090806040208 Content-Type: text/plain; charset=KOI8-U; name="patch-no-march" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-no-march" --- 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; } --------------040002010808090806040208 Content-Type: text/plain; charset=KOI8-U; name="patch-quant-chooser" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-quant-chooser" 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= 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> (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* 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( 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; } --------------040002010808090806040208--