r625 - in trunk: . avifile

jim at linuxfromscratch.org jim at linuxfromscratch.org
Thu Sep 2 22:17:29 PDT 2004


Author: jim
Date: 2004-09-02 23:17:27 -0600 (Thu, 02 Sep 2004)
New Revision: 625

Added:
   trunk/avifile/
   trunk/avifile/avifile-0.7.38-freetype_fix-1.patch
   trunk/avifile/avifile-0.7.38-gcc34-1.patch
   trunk/avifile/avifile-0.7.38-gcc34_ffmpeg-1.patch
Log:
Added: avifile patches

Added: trunk/avifile/avifile-0.7.38-freetype_fix-1.patch
===================================================================
--- trunk/avifile/avifile-0.7.38-freetype_fix-1.patch	2004-09-02 18:32:48 UTC (rev 624)
+++ trunk/avifile/avifile-0.7.38-freetype_fix-1.patch	2004-09-03 05:17:27 UTC (rev 625)
@@ -0,0 +1,20 @@
+Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
+Date:                    2004-09-01
+Initial Package Version: 0.7.38
+Upstream Status:         Not submitted 
+Origin:                  Self-created
+Description:             Fixes build problem with FreeType version >2.15
+
+diff -Naur avifile-0.7-0.7.38-orig/lib/video/sub_ft.cpp avifile-0.7-0.7.38/lib/video/sub_ft.cpp
+--- avifile-0.7-0.7.38-orig/lib/video/sub_ft.cpp	2002-11-01 11:08:06.000000000 +0000
++++ avifile-0.7-0.7.38/lib/video/sub_ft.cpp	2004-09-01 18:35:14.428759536 +0000
+@@ -6,6 +6,9 @@
+ 
+ #ifdef HAVE_LIBFREETYPE
+ 
++#include <ft2build.h>
++#include FT_FREETYPE_H
++
+ #include <freetype/freetype.h>
+ 
+ #if (FREETYPE_MAJOR > 2) || (FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 1)

Added: trunk/avifile/avifile-0.7.38-gcc34-1.patch
===================================================================
--- trunk/avifile/avifile-0.7.38-gcc34-1.patch	2004-09-02 18:32:48 UTC (rev 624)
+++ trunk/avifile/avifile-0.7.38-gcc34-1.patch	2004-09-03 05:17:27 UTC (rev 625)
@@ -0,0 +1,179 @@
+Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
+Date:                    2004-09-01
+Initial Package Version: 0.7.38
+Upstream Status:         Not submitted
+Origin:                  http://ftp.belnet.be/linux/gentoo-portage/media-video/avifile/files/avifile-gcc34.patch
+Description:             Fixes GCC-3.4.x related build problems
+
+diff -urd avifile-0.7-0.7.38.old/include/aviplay.h avifile-0.7-0.7.38/include/aviplay.h
+--- avifile-0.7-0.7.38.old/include/aviplay.h	2003-05-24 18:51:30.000000000 -0400
++++ avifile-0.7-0.7.38/include/aviplay.h	2004-04-28 14:08:02.520535288 -0400
+@@ -12,8 +12,8 @@
+ #include "image.h"
+ #include "avm_args.h"
+ 
+-typedef void (*KILLHANDLER)(int, void* p = 0);
+-typedef int (*AUDIOFUNC)(void* srcdata, unsigned int size, void* p = 0);
++typedef void (*KILLHANDLER)(int, void* p);
++typedef int (*AUDIOFUNC)(void* srcdata, unsigned int size, void* p);
+ 
+ AVM_BEGIN_NAMESPACE;
+ 
+diff -urd avifile-0.7-0.7.38.old/include/avm_map.h avifile-0.7-0.7.38/include/avm_map.h
+--- avifile-0.7-0.7.38.old/include/avm_map.h	2003-03-26 20:01:22.000000000 -0500
++++ avifile-0.7-0.7.38/include/avm_map.h	2004-04-28 14:08:29.592419736 -0400
+@@ -198,7 +198,8 @@
+ {
+     // cast to the needed type - used to prevent internal compiler error
+     // for old egcc
+-    avm_map<Key, Value, Compare, Equal>::_Tnode* node = (avm_map<Key, Value, Compare, Equal>::_Tnode*) n;
++    //avm_map<Key, Value, Compare, Equal>::_Tnode* node = (avm_map<Key, Value, Compare, Equal>::_Tnode*) n;
++    _Tnode* node = (_Tnode*) n;
+ 
+     if(node->entry)
+     {
+diff -urd avifile-0.7-0.7.38.old/include/avm_stl.h avifile-0.7-0.7.38/include/avm_stl.h
+--- avifile-0.7-0.7.38.old/include/avm_stl.h	2003-06-08 11:57:05.000000000 -0400
++++ avifile-0.7-0.7.38/include/avm_stl.h	2004-04-28 14:08:24.074258624 -0400
+@@ -74,6 +74,10 @@
+ 	m_Type = new Type[m_uiCapacity];
+     }
+     ~qring() { delete[] m_Type; }
++    qring<Type>(const qring<Type>& t) : m_Type(0)
++    {
++	operator=(t);
++    }
+     qring<Type>& operator=(const qring<Type>& t)
+     {
+ 	if (this != &t)
+@@ -149,7 +153,6 @@
+ 
+     // disabled for now
+     qring<Type>() {}
+-    qring<Type>(const qring<Type>& t) {}
+ 
+     uint_t bpos() const { return (m_uiPos > 0) ? m_uiPos - 1 : m_uiCapacity - 1; }
+     uint_t fpos() const { return (m_uiSize > m_uiPos) ? m_uiPos + m_uiCapacity - m_uiSize: m_uiPos - m_uiSize; }
+@@ -167,9 +170,21 @@
+     static const uint_t invalid=(uint_t)(~0);
+     typedef Type* iterator;
+     typedef const Type* const_iterator;
+-    vector<Type>(int prealloc = 0);
++    vector<Type>()
++	:m_Type(0), m_uiCapacity(0), m_uiSize(0)
++    {
++    }
++
++    vector<Type>(int prealloc)
++	:m_Type(0), m_uiCapacity(prealloc), m_uiSize(prealloc)
++    {
++	if (m_uiCapacity > 0 )
++	    m_Type = new Type[m_uiCapacity];
++	//printf("vector %p   (%d)\n", this, m_uiSize);
++    }
++
+     // we will not count references - we have to program with this in mind!
+-    vector<Type>(const vector<Type>& t) :m_Type(0), m_uiCapacity(0), m_uiSize(0)
++    vector<Type>(const vector<Type>& t) :m_Type(0)
+     {
+ 	operator=(t);
+     }
+@@ -272,15 +287,6 @@
+ };
+ 
+ template <class Type>
+-vector<Type>::vector<Type>(int prealloc)
+-    :m_Type(0), m_uiCapacity(prealloc), m_uiSize(prealloc)
+-{
+-    if (m_uiCapacity > 0 )
+-	m_Type = new Type[m_uiCapacity];
+-    //printf("vector %p   (%d)\n", this, m_uiSize);
+-}
+-
+-template <class Type>
+ void vector<Type>::remove(const Type& t)
+ {
+     int d = 0;
+diff -urd avifile-0.7-0.7.38.old/lib/aviread/AsfNetworkInputStream.cpp avifile-0.7-0.7.38/lib/aviread/AsfNetworkInputStream.cpp
+--- avifile-0.7-0.7.38.old/lib/aviread/AsfNetworkInputStream.cpp	2003-05-27 11:26:31.000000000 -0400
++++ avifile-0.7-0.7.38/lib/aviread/AsfNetworkInputStream.cpp	2004-04-28 14:08:13.148919528 -0400
+@@ -793,22 +793,24 @@
+     return -1;
+ }
+ 
+-int AsfNetworkInputStream::write(const void* buffer, uint_t size)
++int AsfNetworkInputStream::write(const void* b, uint_t size)
+ {
++    const char* buffer = (const char*) b;
+     int wsize = size;
+     while (wsize > 0)
+     {
+ 	int i = ::write(m_iSocket, buffer, wsize);
+ 	if (i <= 0)
+             return i;
+-	(const char*)buffer += i;
++	buffer += i;
+         wsize -= i;
+     }
+     return size;
+ }
+ 
+-int AsfNetworkInputStream::dwrite(const void* buffer, uint_t size)
++int AsfNetworkInputStream::dwrite(const void* b, uint_t size)
+ {
++    const char* buffer = (const char*) b;
+     if (m_lfd < 0)
+     {
+ 	if (m_lfd == -12345)
+@@ -843,7 +845,7 @@
+ 	int i = ::write(m_lfd, buffer, size);
+ 	if (i < 0)
+             return i;
+-	(const char*)buffer += i;
++	buffer += i;
+ 	size -= i;
+     }
+     fsync(m_lfd);
+Only in avifile-0.7-0.7.38/lib/aviread: AsfNetworkInputStream.cpp.orig
+diff -urd avifile-0.7-0.7.38.old/lib/common/image.cpp avifile-0.7-0.7.38/lib/common/image.cpp
+--- avifile-0.7-0.7.38.old/lib/common/image.cpp	2003-05-24 19:00:58.000000000 -0400
++++ avifile-0.7-0.7.38/lib/common/image.cpp	2004-04-28 14:09:07.337681584 -0400
+@@ -954,7 +954,7 @@
+     fillMembers();
+     if (!copy)
+     {
+-	(const uint8_t*) m_pPlane[0] = data;
++	m_pPlane[0] = (uint8_t*) data;
+     }
+     else
+     {
+diff -urd avifile-0.7-0.7.38.old/plugins/libvorbis/libvorbis.cpp avifile-0.7-0.7.38/plugins/libvorbis/libvorbis.cpp
+--- avifile-0.7-0.7.38.old/plugins/libvorbis/libvorbis.cpp	2003-05-20 10:33:13.000000000 -0400
++++ avifile-0.7-0.7.38/plugins/libvorbis/libvorbis.cpp	2004-04-28 14:08:38.700035168 -0400
+@@ -96,7 +96,7 @@
+ 	op.packet = NULL;
+ 	op.b_o_s  = 1; /* beginning of stream for first packet */
+ 	op.bytes  = hdrsizes[0];
+-	(const void*) op.packet = vorbishdr;
++	op.packet = (unsigned char*) vorbishdr;
+ 	vorbishdr += op.bytes;
+ 	if (vorbis_synthesis_headerin(&vi, &vc, &op) < 0)
+ 	{
+@@ -106,7 +106,7 @@
+ 
+ 	op.b_o_s  = 0;
+ 	op.bytes  = hdrsizes[1];
+-	(const void*) op.packet = vorbishdr;
++	op.packet = (unsigned char*) vorbishdr;
+ 	vorbishdr += op.bytes;
+ 	if (vorbis_synthesis_headerin(&vi, &vc, &op) < 0)
+ 	{
+@@ -115,7 +115,7 @@
+ 	}
+ 
+ 	op.bytes  = hdrsizes[2];
+-	(const void*) op.packet = vorbishdr;
++	op.packet = (unsigned char*) vorbishdr;
+ 	vorbishdr += op.bytes;
+ 	if (vorbis_synthesis_headerin(&vi, &vc, &op) < 0)
+ 	{

Added: trunk/avifile/avifile-0.7.38-gcc34_ffmpeg-1.patch
===================================================================
--- trunk/avifile/avifile-0.7.38-gcc34_ffmpeg-1.patch	2004-09-02 18:32:48 UTC (rev 624)
+++ trunk/avifile/avifile-0.7.38-gcc34_ffmpeg-1.patch	2004-09-03 05:17:27 UTC (rev 625)
@@ -0,0 +1,92 @@
+Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
+Date:                    2004-09-01
+Initial Package Version: 0.7.38
+Upstream Status:         Not submitted
+Origin:                  Self-created
+Description:             Fixes GCC-3.4.x related build problems with FFmpeg plugin
+
+diff -Naur avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/liba52/resample_mmx.c avifile-0.7-0.7.38/ffmpeg/libavcodec/liba52/resample_mmx.c
+--- avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/liba52/resample_mmx.c	2003-04-16 20:03:07.000000000 +0000
++++ avifile-0.7-0.7.38/ffmpeg/libavcodec/liba52/resample_mmx.c	2004-09-01 19:24:55.421579744 +0000
+@@ -7,10 +7,10 @@
+ 	and it would mean (C / MMX2 / MMX / 3DNOW) versions 
+ */
+ 
+-static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL;
+-static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL;
+-static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
+-static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
++const uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL;
++const uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL;
++const uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
++const uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
+ 
+ static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){
+     int32_t * f = (int32_t *) _f;
+
+diff -Naur avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/i386/motion_est_mmx.c avifile-0.7-0.7.38/ffmpeg/libavcodec/i386/motion_est_mmx.c
+--- avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/i386/motion_est_mmx.c	2003-03-03 17:07:35.000000000 +0000
++++ avifile-0.7-0.7.38/ffmpeg/libavcodec/i386/motion_est_mmx.c	2004-09-01 19:34:08.637478144 +0000
+@@ -20,13 +20,13 @@
+  */
+ #include "../dsputil.h"
+ 
+-static const __attribute__ ((aligned(8))) uint64_t round_tab[3]={
++const __attribute__ ((aligned(8))) uint64_t round_tab[3]={
+ 0x0000000000000000,
+ 0x0001000100010001,
+ 0x0002000200020002,
+ };
+ 
+-static __attribute__ ((aligned(8))) uint64_t bone= 0x0101010101010101LL;
++const __attribute__ ((aligned(8))) uint64_t bone= 0x0101010101010101LL;
+ 
+ static inline void sad8_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
+ {
+
+diff -Naur avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/i386/dsputil_mmx.c avifile-0.7-0.7.38/ffmpeg/libavcodec/i386/dsputil_mmx.c
+--- avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/i386/dsputil_mmx.c	2003-06-23 18:52:34.000000000 +0000
++++ avifile-0.7-0.7.38/ffmpeg/libavcodec/i386/dsputil_mmx.c	2004-09-01 19:20:28.653134712 +0000
+@@ -25,14 +25,14 @@
+ int mm_flags; /* multimedia extension flags */
+ 
+ /* pixel operations */
+-static const uint64_t mm_bone __attribute__ ((aligned(8))) = 0x0101010101010101ULL;
+-static const uint64_t mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL;
+-static const uint64_t mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002ULL;
+-
+-static const uint64_t ff_pw_20 __attribute__ ((aligned(8))) = 0x0014001400140014ULL;
+-static const uint64_t ff_pw_3  __attribute__ ((aligned(8))) = 0x0003000300030003ULL;
+-static const uint64_t ff_pw_16 __attribute__ ((aligned(8))) = 0x0010001000100010ULL;
+-static const uint64_t ff_pw_15 __attribute__ ((aligned(8))) = 0x000F000F000F000FULL;
++const uint64_t mm_bone __attribute__ ((aligned(8))) = 0x0101010101010101ULL;
++const uint64_t mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL;
++const uint64_t mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002ULL;
++
++const uint64_t ff_pw_20 __attribute__ ((aligned(8))) = 0x0014001400140014ULL;
++const uint64_t ff_pw_3  __attribute__ ((aligned(8))) = 0x0003000300030003ULL;
++const uint64_t ff_pw_16 __attribute__ ((aligned(8))) = 0x0010001000100010ULL;
++const uint64_t ff_pw_15 __attribute__ ((aligned(8))) = 0x000F000F000F000FULL;
+ 
+ #define JUMPALIGN() __asm __volatile (".balign 8"::)
+ #define MOVQ_ZERO(regd)  __asm __volatile ("pxor %%" #regd ", %%" #regd ::)
+
+diff -Naur avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/i386/simple_idct_mmx.c avifile-0.7-0.7.38/ffmpeg/libavcodec/i386/simple_idct_mmx.c
+--- avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/i386/simple_idct_mmx.c	2003-02-14 13:58:00.000000000 +0000
++++ avifile-0.7-0.7.38/ffmpeg/libavcodec/i386/simple_idct_mmx.c	2004-09-01 19:43:30.809015080 +0000
+@@ -45,10 +45,10 @@
+ #define ROW_SHIFT 11
+ #define COL_SHIFT 20 // 6
+ 
+-static const uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL;
+-static const uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL;
+-static int16_t __attribute__((aligned(8))) temp[64];
+-static int16_t __attribute__((aligned(8))) coeffs[]= {
++static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL;
++const uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL;
++const int16_t __attribute__((aligned(8))) temp[64];
++const int16_t __attribute__((aligned(8))) coeffs[]= {
+ 	1<<(ROW_SHIFT-1), 0, 1<<(ROW_SHIFT-1), 0,
+ //	1<<(COL_SHIFT-1), 0, 1<<(COL_SHIFT-1), 0,
+ //	0, 1<<(COL_SHIFT-1-16), 0, 1<<(COL_SHIFT-1-16),
+




More information about the patches mailing list