[mingw-dirac: 2/11] Initial import in devel

epienbro epienbro at fedoraproject.org
Wed Mar 7 16:39:38 UTC 2012


commit c1e05755deb431ba1fe675c1197e858ee5f34117
Author: Nicolas Chauvet <kwizart at gmail.com>
Date:   Sun Nov 7 17:10:43 2010 +0100

    Initial import in devel

 .gitignore                      |    1 +
 dirac-1.0.2-mingw32-gcc44.patch |  450 +++++++++++++++++++++++++++++++++++++++
 mingw32-dirac.spec              |   78 +++++++
 sources                         |    1 +
 4 files changed, 530 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..0204527 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/dirac-1.0.2.tar.gz
diff --git a/dirac-1.0.2-mingw32-gcc44.patch b/dirac-1.0.2-mingw32-gcc44.patch
new file mode 100644
index 0000000..fcd95c7
--- /dev/null
+++ b/dirac-1.0.2-mingw32-gcc44.patch
@@ -0,0 +1,450 @@
+diff -up dirac-1.0.2/util/conversion/BMPtoRGB.cpp.gcc44 dirac-1.0.2/util/conversion/BMPtoRGB.cpp
+--- dirac-1.0.2/util/conversion/BMPtoRGB.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/BMPtoRGB.cpp	2009-07-09 12:34:33.390233615 +0200
+@@ -102,9 +102,9 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     for (int frame = firstFrame; frame<(firstFrame+frames); ++frame) {
+ 
+diff -up dirac-1.0.2/util/conversion/common/setstdiomode.h.gcc44 dirac-1.0.2/util/conversion/common/setstdiomode.h
+--- dirac-1.0.2/util/conversion/common/setstdiomode.h.gcc44	2004-06-30 18:44:52.000000000 +0200
++++ dirac-1.0.2/util/conversion/common/setstdiomode.h	2009-07-09 12:34:50.417234715 +0200
+@@ -62,13 +62,11 @@ Original author: Tim Borer
+ #ifndef dirac_utilities_setstdiomode
+ #define dirac_utilities_setstdiomode
+ 
+-#include <ios>      //Defines std::ios_base
+-
++#ifdef _WIN32
+ namespace dirac_vu { //dirac video utilities namespace
+-
+-    int setstdinmode(std::ios_base::openmode);
+-    int setstdoutmode(std::ios_base::openmode);
+-
+-}  // end namespace dirac_vu
++#include <fcntl.h>
++int _CRT_fmode = _O_BINARY;
++}
++#endif
+ 
+ #endif // dirac_utilities_setstdiomode
+diff -up dirac-1.0.2/util/conversion/RGBtoBMP.cpp.gcc44 dirac-1.0.2/util/conversion/RGBtoBMP.cpp
+--- dirac-1.0.2/util/conversion/RGBtoBMP.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/RGBtoBMP.cpp	2009-07-09 12:34:33.391233743 +0200
+@@ -98,9 +98,9 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Get command line arguments
+     const string prefix = argv[1];
+diff -up dirac-1.0.2/util/conversion/RGBtoUYVY.cpp.gcc44 dirac-1.0.2/util/conversion/RGBtoUYVY.cpp
+--- dirac-1.0.2/util/conversion/RGBtoUYVY.cpp.gcc44	2008-05-27 03:29:55.000000000 +0200
++++ dirac-1.0.2/util/conversion/RGBtoUYVY.cpp	2009-07-09 12:34:33.391985515 +0200
+@@ -84,12 +84,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //   cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int RGBBufferSize = 3*height*width;
+diff -up dirac-1.0.2/util/conversion/RGBtoYUV411.cpp.gcc44 dirac-1.0.2/util/conversion/RGBtoYUV411.cpp
+--- dirac-1.0.2/util/conversion/RGBtoYUV411.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/RGBtoYUV411.cpp	2009-07-09 12:34:33.391985515 +0200
+@@ -84,12 +84,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int RGBBufferSize = 3*height*width;
+diff -up dirac-1.0.2/util/conversion/RGBtoYUV420.cpp.gcc44 dirac-1.0.2/util/conversion/RGBtoYUV420.cpp
+--- dirac-1.0.2/util/conversion/RGBtoYUV420.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/RGBtoYUV420.cpp	2009-07-09 12:34:33.392985922 +0200
+@@ -87,12 +87,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int inBufferSize = 3*height*width;
+diff -up dirac-1.0.2/util/conversion/RGBtoYUV422.cpp.gcc44 dirac-1.0.2/util/conversion/RGBtoYUV422.cpp
+--- dirac-1.0.2/util/conversion/RGBtoYUV422.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/RGBtoYUV422.cpp	2009-07-09 12:34:33.393985770 +0200
+@@ -84,12 +84,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int inBufferSize = 3*height*width;
+diff -up dirac-1.0.2/util/conversion/RGBtoYUV444.cpp.gcc44 dirac-1.0.2/util/conversion/RGBtoYUV444.cpp
+--- dirac-1.0.2/util/conversion/RGBtoYUV444.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/RGBtoYUV444.cpp	2009-07-09 12:34:33.393985770 +0200
+@@ -83,12 +83,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output line buffers.
+     //Conversion takes place a line at a time
+diff -up dirac-1.0.2/util/conversion/UYVYtoRGB.cpp.gcc44 dirac-1.0.2/util/conversion/UYVYtoRGB.cpp
+--- dirac-1.0.2/util/conversion/UYVYtoRGB.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/UYVYtoRGB.cpp	2009-07-09 12:34:33.394985619 +0200
+@@ -86,12 +86,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int RGBBufferSize = 3*height*width;
+diff -up dirac-1.0.2/util/conversion/UYVYtoYUV422.cpp.gcc44 dirac-1.0.2/util/conversion/UYVYtoYUV422.cpp
+--- dirac-1.0.2/util/conversion/UYVYtoYUV422.cpp.gcc44	2008-02-04 14:43:02.000000000 +0100
++++ dirac-1.0.2/util/conversion/UYVYtoYUV422.cpp	2009-07-09 12:34:33.394985619 +0200
+@@ -84,12 +84,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV411toRGB.cpp.gcc44 dirac-1.0.2/util/conversion/YUV411toRGB.cpp
+--- dirac-1.0.2/util/conversion/YUV411toRGB.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/YUV411toRGB.cpp	2009-07-09 12:34:33.395985746 +0200
+@@ -87,12 +87,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV420Down2x2.cpp.gcc44 dirac-1.0.2/util/conversion/YUV420Down2x2.cpp
+--- dirac-1.0.2/util/conversion/YUV420Down2x2.cpp.gcc44	2008-10-01 02:50:27.000000000 +0200
++++ dirac-1.0.2/util/conversion/YUV420Down2x2.cpp	2009-07-09 12:34:33.396985315 +0200
+@@ -240,12 +240,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int ybuffersizein = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV420ItoYUV422I.cpp.gcc44 dirac-1.0.2/util/conversion/YUV420ItoYUV422I.cpp
+--- dirac-1.0.2/util/conversion/YUV420ItoYUV422I.cpp.gcc44	2008-11-19 00:25:21.000000000 +0100
++++ dirac-1.0.2/util/conversion/YUV420ItoYUV422I.cpp	2009-07-09 12:34:33.396985315 +0200
+@@ -80,12 +80,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV420pt75filter.cpp.gcc44 dirac-1.0.2/util/conversion/YUV420pt75filter.cpp
+--- dirac-1.0.2/util/conversion/YUV420pt75filter.cpp.gcc44	2008-08-14 04:35:04.000000000 +0200
++++ dirac-1.0.2/util/conversion/YUV420pt75filter.cpp	2009-07-09 12:34:33.397985722 +0200
+@@ -132,12 +132,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = Yheight*Ywidth;
+diff -up dirac-1.0.2/util/conversion/YUV420toRGB.cpp.gcc44 dirac-1.0.2/util/conversion/YUV420toRGB.cpp
+--- dirac-1.0.2/util/conversion/YUV420toRGB.cpp.gcc44	2004-12-01 15:13:17.000000000 +0100
++++ dirac-1.0.2/util/conversion/YUV420toRGB.cpp	2009-07-09 12:34:33.397985722 +0200
+@@ -87,12 +87,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV420toYUV422.cpp.gcc44 dirac-1.0.2/util/conversion/YUV420toYUV422.cpp
+--- dirac-1.0.2/util/conversion/YUV420toYUV422.cpp.gcc44	2008-05-27 03:29:55.000000000 +0200
++++ dirac-1.0.2/util/conversion/YUV420toYUV422.cpp	2009-07-09 12:34:33.398985850 +0200
+@@ -80,12 +80,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV422ItoYUV420I.cpp.gcc44 dirac-1.0.2/util/conversion/YUV422ItoYUV420I.cpp
+--- dirac-1.0.2/util/conversion/YUV422ItoYUV420I.cpp.gcc44	2008-11-19 00:25:21.000000000 +0100
++++ dirac-1.0.2/util/conversion/YUV422ItoYUV420I.cpp	2009-07-09 12:34:33.399985698 +0200
+@@ -83,12 +83,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV422toRGB.cpp.gcc44 dirac-1.0.2/util/conversion/YUV422toRGB.cpp
+--- dirac-1.0.2/util/conversion/YUV422toRGB.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/YUV422toRGB.cpp	2009-07-09 12:34:33.399985698 +0200
+@@ -86,12 +86,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV422toUYVY.cpp.gcc44 dirac-1.0.2/util/conversion/YUV422toUYVY.cpp
+--- dirac-1.0.2/util/conversion/YUV422toUYVY.cpp.gcc44	2008-05-27 03:29:56.000000000 +0200
++++ dirac-1.0.2/util/conversion/YUV422toUYVY.cpp	2009-07-09 12:34:33.400986664 +0200
+@@ -84,12 +84,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV422toYUV420.cpp.gcc44 dirac-1.0.2/util/conversion/YUV422toYUV420.cpp
+--- dirac-1.0.2/util/conversion/YUV422toYUV420.cpp.gcc44	2008-02-04 14:43:02.000000000 +0100
++++ dirac-1.0.2/util/conversion/YUV422toYUV420.cpp	2009-07-09 12:34:33.400986664 +0200
+@@ -80,12 +80,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output buffers.
+     const int YBufferSize = height*width;
+diff -up dirac-1.0.2/util/conversion/YUV444toRGB.cpp.gcc44 dirac-1.0.2/util/conversion/YUV444toRGB.cpp
+--- dirac-1.0.2/util/conversion/YUV444toRGB.cpp.gcc44	2004-06-30 18:44:51.000000000 +0200
++++ dirac-1.0.2/util/conversion/YUV444toRGB.cpp	2009-07-09 12:34:33.401985674 +0200
+@@ -83,12 +83,12 @@ int main(int argc, char * argv[] ) {
+ 
+     //Set standard input and standard output to binary mode.
+     //Only relevant for Windows (*nix is always binary)
+-    if ( setstdinmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard input to binary mode" << endl;
+-        return EXIT_FAILURE; }
+-    if ( setstdoutmode(std::ios_base::binary) == -1 ) {
+-        cerr << "Error: could not set standard output to binary mode" << endl;
+-        return EXIT_FAILURE; }
++    //if ( setstdinmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard input to binary mode" << endl;
++    //    return EXIT_FAILURE; }
++    //if ( setstdoutmode(std::ios_base::binary) == -1 ) {
++    //    cerr << "Error: could not set standard output to binary mode" << endl;
++    //    return EXIT_FAILURE; }
+ 
+     //Allocate memory for input and output line buffers.
+     //Conversion takes place a line at a time
diff --git a/mingw32-dirac.spec b/mingw32-dirac.spec
new file mode 100644
index 0000000..ab6bc22
--- /dev/null
+++ b/mingw32-dirac.spec
@@ -0,0 +1,78 @@
+%global __strip %{_mingw32_strip}
+%global __objdump %{_mingw32_objdump}
+%global _use_internal_dependency_generator 0
+%global __find_requires %{_mingw32_findrequires}
+%global __find_provides %{_mingw32_findprovides}
+
+Name:           mingw32-dirac
+Version:        1.0.2
+Release:        2%{?dist}
+Summary:        Dirac is an open source video codec
+
+Group:          System Environment/Libraries
+License:        MPLv1.1 or GPLv2+ or LGPLv2+
+URL:            http://dirac.sourceforge.net/
+Source0:        http://downloads.sourceforge.net/dirac/dirac-%{version}.tar.gz
+Patch0:         dirac-1.0.2-mingw32-gcc44.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+BuildRequires:  mingw32-filesystem >= 23
+BuildRequires:  mingw32-gcc
+BuildRequires:  mingw32-gcc-c++
+BuildRequires:  mingw32-binutils
+BuildRequires:  mingw32-dlfcn
+
+%description
+MinGW Windows dirac compression library.
+
+
+%prep
+%setup -q -n dirac-%{version}
+%patch0 -p1 -b .gcc44
+rm util/conversion/common/setstdiomode.cpp
+touch util/conversion/common/setstdiomode.cpp
+
+%build
+%_mingw32_configure \
+  --program-prefix=dirac_ \
+  --program-transform-name=s,dirac_dirac_,dirac_, \
+  --enable-overlay \
+  --disable-static
+
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README TODO
+%exclude %{_mingw32_bindir}/dirac_create_dirac_testfile.pl            
+%{_mingw32_bindir}/dirac_*.exe                        
+%{_mingw32_includedir}/dirac/
+%{_mingw32_bindir}/libdirac_decoder-0.dll
+%{_mingw32_bindir}/libdirac_encoder-0.dll
+%{_mingw32_libdir}/pkgconfig/dirac.pc
+%{_mingw32_libdir}/libdirac_decoder.dll.a
+%{_mingw32_libdir}/libdirac_decoder.la
+%{_mingw32_libdir}/libdirac_encoder.dll.a
+%{_mingw32_libdir}/libdirac_encoder.la
+
+%changelog
+* Thu Jul  9 2009 kwizart < kwizart at gmail.com > - 1.0.2-2
+- Fix for mingw32-gcc 4.4.0 and binary mode
+
+* Tue Mar 24 2009 kwizart < kwizart at gmail.com > - 1.0.2-1
+- Update to 1.0.2
+
+* Mon Jan  5 2009 kwizart < kwizart at gmail.com > - 1.0.0-1
+- Initial package based on original dirac.spec
+
diff --git a/sources b/sources
index e69de29..ebf2d84 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a57c2c5e58062d437d9ab13dffb28f0f  dirac-1.0.2.tar.gz


More information about the scm-commits mailing list