gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/libbase container.h image_filters.cpp log...


From: Vitaly Alexeev
Subject: [Gnash-commit] gnash/libbase container.h image_filters.cpp log...
Date: Fri, 01 Dec 2006 10:22:12 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Vitaly Alexeev <alexeev>        06/12/01 10:22:12

Modified files:
        libbase        : container.h image_filters.cpp log.cpp 
                         network.cpp tu_config.h 

Log message:
        Cleaning of Vitaly dust from comments

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/container.h?cvsroot=gnash&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/image_filters.cpp?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.cpp?cvsroot=gnash&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/network.cpp?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/tu_config.h?cvsroot=gnash&r1=1.11&r2=1.12

Patches:
Index: container.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/container.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- container.h 14 Nov 2006 13:15:10 -0000      1.48
+++ container.h 1 Dec 2006 10:22:12 -0000       1.49
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: container.h,v 1.48 2006/11/14 13:15:10 strk Exp $ */
+/* $Id: container.h,v 1.49 2006/12/01 10:22:12 alexeev Exp $ */
 
 #ifndef __CONTAINER_H__
 #define __CONTAINER_H__
@@ -109,7 +109,7 @@
 //#define StlAlloc(size) malloc(size)
 //#define StlFree(ptr, size) free(ptr)
 
-// Vitaly: hash from gameSWF. There are compiler problems with stdext:hash in 
Visual C
+// hash from gameSWF. There are compiler problems with stdext:hash in Visual C
 // Markus: As well as with other compilers...
 namespace gnash{
 

Index: image_filters.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/image_filters.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- image_filters.cpp   8 Oct 2006 16:11:37 -0000       1.13
+++ image_filters.cpp   1 Dec 2006 10:22:12 -0000       1.14
@@ -11,7 +11,7 @@
 // converted from K&R C to C-like C++, changed the interfaces a bit,
 // etc.
 
-/* $Id: image_filters.cpp,v 1.13 2006/10/08 16:11:37 nihilus Exp $ */
+/* $Id: image_filters.cpp,v 1.14 2006/12/01 10:22:12 alexeev Exp $ */
 
 #include "image.h"
 #include "utility.h"
@@ -700,119 +700,6 @@
     delete tmp;
 }
 
-
-
-// tulrich: some interesting scaling code from Vitaly.  Looks like a
-// fast bilinear scale using fixed point.  I haven't validated this
-// myself.  Note: I would see about losing the sax & say arrays, and
-// fold that stuff directly into the pixel loops, to get rid of the
-// mallocs.
-
-void   zoom(image::rgba* src, image::rgba* dst)
-{
-    GNASH_REPORT_FUNCTION;
-    typedef struct
-    {
-       uint8_t r;
-       uint8_t g;
-       uint8_t b;
-       uint8_t a;
-    }
-    rgba;
-
-    int x, y;
-
-    /* For interpolation: assume source dimension is one pixel */
-    /* smaller to avoid overflow on right and bottom edge.     */
-    int sx = static_cast<int>((65536.0 * (float) (src->m_width - 1) / (float) 
dst->m_width));
-    int sy = static_cast<int>((65536.0 * (float) (src->m_height - 1) / (float) 
dst->m_height));
-
-    /* Allocate memory for row increments */
-    int *sax = new int[(dst->m_width + 1)];
-    int *say = new int[(dst->m_height + 1)];
-
-    /* Precalculate row increments */
-    int csx = 0;
-    int *csax = sax;
-    for (x = 0; x <= dst->m_width; x++)
-       {
-           *csax = csx;
-           csax++;
-           csx &= 0xffff;
-           csx += sx;
-       }
-    int csy = 0;
-    int *csay = say;
-    for (y = 0; y <= dst->m_height; y++)
-       {
-           *csay = csy;
-           csay++;
-           csy &= 0xffff;
-           csy += sy;
-       }
-
-    /* Pointer setup */
-    rgba *csp = (rgba *) src->m_data;
-    rgba *dp = (rgba *) dst->m_data;
-    //int sgap = src->m_pitch - src->m_width * 4;
-    int dgap = dst->m_pitch - dst->m_width * 4;
-
-    /* Interpolating Zoom */
-    /* Scan destination */
-    csay = say;
-    for (y = 0; y < dst->m_height; y++)
-       {
-           /* Setup color source pointers */
-           rgba *c00 = csp;
-           rgba *c01 = csp;
-           c01++;
-           rgba *c10 = (rgba *) ((uint8_t *) csp + src->m_pitch);
-           rgba *c11 = c10;
-           c11++;
-           csax = sax;
-           for (x = 0; x < dst->m_width; x++)
-               {
-                   /* ABGR ordering */
-                   /* Interpolate colors */
-                   int ex = (*csax & 0xffff);
-                   int ey = (*csay & 0xffff);
-                   int t1 = ((((c01->r - c00->r) * ex) >> 16) + c00->r) & 0xff;
-                   int t2 = ((((c11->r - c10->r) * ex) >> 16) + c10->r) & 0xff;
-                   dp->r = (((t2 - t1) * ey) >> 16) + t1;
-                   t1 = ((((c01->g - c00->g) * ex) >> 16) + c00->g) & 0xff;
-                   t2 = ((((c11->g - c10->g) * ex) >> 16) + c10->g) & 0xff;
-                   dp->g = (((t2 - t1) * ey) >> 16) + t1;
-                   t1 = ((((c01->b - c00->b) * ex) >> 16) + c00->b) & 0xff;
-                   t2 = ((((c11->b - c10->b) * ex) >> 16) + c10->b) & 0xff;
-                   dp->b = (((t2 - t1) * ey) >> 16) + t1;
-                   t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff;
-                   t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff;
-                   dp->a = (((t2 - t1) * ey) >> 16) + t1;
-
-                   /* Advance source pointers */
-                   csax++;
-                   int sstep = (*csax >> 16);
-                   c00 += sstep;
-                   c01 += sstep;
-                   c10 += sstep;
-                   c11 += sstep;
-                   /* Advance destination pointer */
-                   dp++;
-               }
-           /* Advance source pointer */
-           csay++;
-           csp = (rgba *) ((uint8_t *) csp + (*csay >> 16) * src->m_pitch);
-           /* Advance destination pointers */
-           dp = (rgba *) ((uint8_t *) dp + dgap);
-       }
-
-    /* Remove temp arrays */
-    delete[] sax;
-    delete[] say;
-}
-
-
-
 } // end namespace image
 
 

Index: log.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- log.cpp     11 Nov 2006 14:36:33 -0000      1.36
+++ log.cpp     1 Dec 2006 10:22:12 -0000       1.37
@@ -18,7 +18,7 @@
 //
 //
 
-/* $Id: log.cpp,v 1.36 2006/11/11 14:36:33 strk Exp $ */
+/* $Id: log.cpp,v 1.37 2006/12/01 10:22:12 alexeev Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -164,26 +164,6 @@
     va_list ap;
     char tmp[BUFFER_SIZE];
     
-    // Vitaly: 
-    // macro 'va_start' sets 'ap' to beginning of list of optional arguments 
-    // newfmt is not those
-    
-    //memset(tmp, 0, BUFFER_SIZE);
-    
-    // Drop any newlines on the end of the string. We'll supply
-    // endl later so it works correctly anyway.
-
-    //char *newfmt = strdup(fmt);
-    //char *ptr = strrchr(newfmt, '\n');
-               //if (ptr)
-               //{
-               //      *ptr = 0;
-               //}
-
-    //va_start (ap, newfmt);
-    //vsnprintf (tmp, BUFFER_SIZE, newfmt, ap);
-    //free(newfmt);
-
     va_start (ap, fmt);
     vsnprintf (tmp, BUFFER_SIZE, fmt, ap);
     tmp[BUFFER_SIZE-1] = '\0';

Index: network.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/network.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- network.cpp 11 Nov 2006 15:25:27 -0000      1.18
+++ network.cpp 1 Dec 2006 10:22:12 -0000       1.19
@@ -735,7 +735,7 @@
     _debug = val;
 
     // Turn on debugging for the utility methods
-               // Vitaly: recursive on all control paths,
+               // recursive on all control paths,
                // function will cause runtime stack overflow
 
                // toggleDebug(true);

Index: tu_config.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/tu_config.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- tu_config.h 15 Sep 2006 09:50:49 -0000      1.11
+++ tu_config.h 1 Dec 2006 10:22:12 -0000       1.12
@@ -67,7 +67,7 @@
        #ifdef BUILDING_DLL
                #define DSOEXPORT __declspec(dllexport)
        #else
-               //Vitaly: Temporarily commented because of VC++ compiler 
problems 
+               // Temporarily commented because of VC++ compiler problems 
                #define DSOEXPORT // __declspec(dllimport)
        #endif
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]