[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-video-cvs
Subject:    [Video-cvs] sitelib minisurf.cpp,1.28,1.29
From:       eluevano () helixcommunity ! org
Date:       2005-12-08 17:03:32
[Download RAW message or body]

Update of /cvsroot/video/sitelib
In directory cvs:/tmp/cvs-serv27560/sitelib

Modified Files:
	minisurf.cpp 
Log Message:
changes to allow RGB565 resoluciton

Index: minisurf.cpp
===================================================================
RCS file: /cvsroot/video/sitelib/minisurf.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- minisurf.cpp	1 Apr 2005 16:27:04 -0000	1.28
+++ minisurf.cpp	8 Dec 2005 17:03:30 -0000	1.29
@@ -1,8 +1,8 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Source last modified: $Id$
- * 
+ *
  * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
- * 
+ *
  * The contents of this file, and the files included with this file,
  * are subject to the current version of the RealNetworks Public
  * Source License (the "RPSL") available at
@@ -16,7 +16,7 @@
  * to this file, the RCSL.  Please see the applicable RPSL or RCSL for
  * the rights, obligations and limitations governing use of the
  * contents of the file.
- * 
+ *
  * Alternatively, the contents of this file may be used under the
  * terms of the GNU General Public License Version 2 or later (the
  * "GPL") in which case the provisions of the GPL are applicable
@@ -28,23 +28,23 @@
  * the GPL. If you do not delete the provisions above, a recipient may
  * use your version of this file under the terms of any one of the
  * RPSL, the RCSL or the GPL.
- * 
+ *
  * This file is part of the Helix DNA Technology. RealNetworks is the
  * developer of the Original Code and owns the copyrights in the
  * portions it created.
- * 
+ *
  * This file, and the files included with this file, is distributed
  * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
  * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
  * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
  * ENJOYMENT OR NON-INFRINGEMENT.
- * 
+ *
  * Technology Compatibility Kit Test Suite(s) Location:
  *    http://www.helixcommunity.org/content/tck
- * 
+ *
  * Contributor(s):
- * 
+ *
  * ***** END LICENSE BLOCK ***** */
 
 #include "minisite.h"
@@ -53,7 +53,7 @@
 #include "ciddefs.h"
 
 #if defined(HELIX_CONFIG_NOSTATICS)
-//On Symbian we don't use a colorconvert DLL. We compile in 
+//On Symbian we don't use a colorconvert DLL. We compile in
 //one and use slightly different color converter calls that
 //don't use static data.
 # include "nostatic/yuv.h" //for the color_data_t struct.
@@ -159,7 +159,7 @@
  */
 STDMETHODIMP CMiniBaseSurface::BeginOptimizedBlt(HXBitmapInfoHeader* pBitmapInfo)
 {
-    HX_ASSERT(pBitmapInfo);    
+    HX_ASSERT(pBitmapInfo);
     if(m_pOptimizedFormat && IsCompatible(m_pOptimizedFormat, pBitmapInfo))
     {
         // current optimized format bitmap info (as well as info we derive from it) is valid
@@ -199,9 +199,9 @@
            m_nSrcPitch = m_pImageHelper->GetBitmapPitch((HXBitmapInfo*)pBitmapInfo);
            break;
 #endif //HELIX_FEATURE_SMIL_SITE
-           
+
        case CID_I420:
-        
+
 #if defined (HELIX_FEATURE_CC_YV12out)
            if (nDstCID == CID_YV12)
                m_fpColorConverter = I420toYV12;
@@ -212,7 +212,7 @@
                m_fpColorConverter = I420toYUY2;
 #endif //HELIX_FEATURE_CC_YUY2out
 
-#if defined (HELIX_FEATURE_CC_RGB32out)                     
+#if defined (HELIX_FEATURE_CC_RGB32out)
            if (nDstCID == CID_RGB32)
                m_fpColorConverter = I420toRGB32;
 #endif //HELIX_FEATURE_CC_RGB32out
@@ -245,6 +245,7 @@
            m_nSrcPitch = pBitmapInfo->biWidth;
            break;
 
+#ifndef HELIX_CONFIG_NOSTATICS
        case CID_XING:
 #if defined (HELIX_FEATURE_CC_YV12out)
            if (nDstCID == CID_YV12)
@@ -260,7 +261,7 @@
            if (nDstCID == CID_RGB32)
                m_fpColorConverter = XINGtoRGB32;
 #endif //HELIX_FEATURE_CC_YUY2out
-        
+
 #if defined (HELIX_FEATURE_CC_RGB565out)
            if (nDstCID == CID_RGB565)
                m_fpColorConverter = XINGtoRGB565;
@@ -268,18 +269,19 @@
 
            m_nSrcPitch = 768;
            break;
+#endif //HELIX_CONFIG_NOSTATICS
     }
 
     HX_ASSERT(m_fpColorConverter);
-    
+
 #if defined(HELIX_CONFIG_NOSTATICS)
     SetSrcI420Colors (0, 0, 0, 0, GetColorData());
-#else    
-    SetSrcI420Colors (0, 0, 0, 0); 
+#else
+    SetSrcI420Colors (0, 0, 0, 0);
     SetDestI420Colors (0, 0, 0, 0);
     SetI420ChromaResamplingMode (0);
-#endif    
-    
+#endif
+
     return m_fpColorConverter ? HXR_OK : HXR_FAIL;
 }
 
@@ -294,13 +296,13 @@
                                    REF(HXxRect)        rDestRect,
                                    REF(HXxRect)        rSrcRect)
 {
-    
+
     HX_RESULT hr = BeginOptimizedBlt(pBitmapInfo);
     if (FAILED(hr))
     {
         return hr;
     }
-        
+
     int nDstWidth   = rDestRect.right - rDestRect.left;
     int nDstHeight  = rDestRect.bottom - rDestRect.top;
 
@@ -311,7 +313,7 @@
     }
     else
     {
-        // we stretch during the transfer from source to dest 
+        // we stretch during the transfer from source to dest
         // buffer; dest buffer must be same size as dest rect.
         hr = AllocateDestBuffers(nDstWidth, nDstHeight);
     }
@@ -338,10 +340,10 @@
 
     // If the dest buffer dimensions do not match the dest rect,
     // map the dest rect to the dest buffer for video transfer.
-    if ((m_dstBufSize.cx != nDstWidth) | 
+    if ((m_dstBufSize.cx != nDstWidth) |
         (m_dstBufSize.cy != nDstHeight))
     {
- 
+
         rcDst.left = (rcDst.left*m_dstBufSize.cx) / nDstWidth;
         rcDst.right = (rcDst.right*m_dstBufSize.cx) / nDstWidth;
         rcDst.top = (rcDst.top*m_dstBufSize.cy) / nDstHeight;
@@ -355,15 +357,15 @@
                                &rcDst,
                                pDestBuffer,
                                nDestPitch);
-    
+
     _UnlockDestBuffer(pDestBuffer);
 
     if (SUCCEEDED(hr))
         hr = _RenderDestBuffer(&rcDst, &rDestRect);
-    
+
     //Give the device a chance to keep the screen alive.
     _KeepScreenAlive();
-    
+
     return hr;
 }
 
@@ -375,10 +377,10 @@
                                             REF(HXxRect) rDestRect,
                                             REF(HXxRect) rSrcRect)
 {
-    return Blt(pSrcBuffer, 
+    return Blt(pSrcBuffer,
                m_pOptimizedFormat,
                rDestRect,
-               rSrcRect); 
+               rSrcRect);
 }
 
 /************************************************************************
@@ -409,13 +411,13 @@
  *    IHXVideoSurface::GetPreferredFormat
  */
 STDMETHODIMP CMiniBaseSurface::GetPreferredFormat(REF(HX_COMPRESSION_TYPE) ulType)
-{                             
+{
     ulType = 0;
     return HXR_OK;
-}                                                        
-                                      
+}
 
-HX_RESULT 
+
+HX_RESULT
 CMiniBaseSurface::_TransferToDestBuffer(UCHAR* pSrcBuffer,
                                         HXBitmapInfoHeader* pBitmapInfo,
                                         HXxRect* prSrcRect,
@@ -431,18 +433,18 @@
                                    m_dstBufSize.cy,
                                    nDstPitch,
                                    prDstRect->left, prDstRect->top,
-                                   prDstRect->right-prDstRect->left, 
+                                   prDstRect->right-prDstRect->left,
                                    prDstRect->bottom-prDstRect->top,
                                    pSrcBuffer,
                                    pBitmapInfo->biWidth,
                                    pBitmapInfo->biHeight,
                                    m_nSrcPitch,
                                    prSrcRect->left, prSrcRect->top,
-                                   prSrcRect->right-prSrcRect->left, 
+                                   prSrcRect->right-prSrcRect->left,
                                    prSrcRect->bottom-prSrcRect->top
-#if defined(HELIX_CONFIG_NOSTATICS)    
+#if defined(HELIX_CONFIG_NOSTATICS)
                                    ,GetColorData()
-#endif    
+#endif
                                    );
     if (nRet < 0)
         return HXR_FAIL;
@@ -457,7 +459,7 @@
     // must be done during rendering.
     //
     // Our XXXtoRGB do scaling
-    return (nCID == CID_DVPF) | 
+    return (nCID == CID_DVPF) |
            (nCID >= CID_I420 && nCID <= CID_UYVY);
 }
 
@@ -495,7 +497,7 @@
 
     if (m_dstBufSize.cx || m_dstBufSize.cy)
     {
-        hr = _DestroyDestBuffer(m_nSrcCID, nCount); 
+        hr = _DestroyDestBuffer(m_nSrcCID, nCount);
 
         memset(&m_dstBufSize, 0, sizeof(m_dstBufSize));
         m_nDstBuffers = 0;



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic