[svn] / branches / dev-api-4 / xvidcore / dshow / src / CXvidDecoder.cpp Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/dshow/src/CXvidDecoder.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1344, Fri Jan 30 18:53:50 2004 UTC revision 1345, Sat Jan 31 13:44:56 2004 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - XviD Decoder part of the DShow Filter  -   *  - XviD Decoder part of the DShow Filter  -
5   *   *
6   *  Copyright(C) 2002-2003 Peter Ross <pross@xvid.org>   *  Copyright(C) 2002-2004 Peter Ross <pross@xvid.org>
7   *   *
8   *  This program is free software ; you can redistribute it and/or modify   *  This program is free software ; you can redistribute it and/or modify
9   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 19  Line 19 
19   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   * $Id: CXvidDecoder.cpp,v 1.1.2.15 2004-01-30 13:13:10 syskin Exp $   * $Id: CXvidDecoder.cpp,v 1.1.2.16 2004-01-31 13:44:33 suxen_drol Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 60  Line 60 
60  #include "IXvidDecoder.h"  #include "IXvidDecoder.h"
61  #include "CXvidDecoder.h"  #include "CXvidDecoder.h"
62  #include "CAbout.h"  #include "CAbout.h"
63    #include "config.h"
64    #include "debug.h"
65    
 // Externs defined here  
 PostProcessing_Settings PPSettings;  
 unsigned int supported_4cc;  
 int rgb_flip;  
66    
67    static int rgb_flip;
68  bool USE_IYUV;  static bool USE_IYUV;
69  bool USE_YV12;  static bool USE_YV12;
70  bool USE_YUY2;  static bool USE_YUY2;
71  bool USE_YVYU;  static bool USE_YVYU;
72  bool USE_UYVY;  static bool USE_UYVY;
73  bool USE_RGB32;  static bool USE_RGB32;
74  bool USE_RGB24;  static bool USE_RGB24;
75  bool USE_RG555;  static bool USE_RG555;
76  bool USE_RG565;  static bool USE_RG565;
77    
78  const AMOVIESETUP_MEDIATYPE sudInputPinTypes[] =  const AMOVIESETUP_MEDIATYPE sudInputPinTypes[] =
79  {  {
# Line 152  Line 150 
150    
151  };  };
152    
153    
154    /* note: g_cTemplates must be global; used by strmbase.lib(dllentry.cpp,dllsetup.cpp) */
155  int g_cTemplates = sizeof(g_Templates) / sizeof(CFactoryTemplate);  int g_cTemplates = sizeof(g_Templates) / sizeof(CFactoryTemplate);
156    
157    
# Line 248  Line 248 
248          memset(&m_frame, 0, sizeof(m_frame));          memset(&m_frame, 0, sizeof(m_frame));
249          m_frame.version = XVID_VERSION;          m_frame.version = XVID_VERSION;
250    
251          HKEY hKey;          LoadRegistryInfo();
         DWORD size;  
         RegOpenKeyEx(XVID_REG_KEY, XVID_REG_SUBKEY, 0, KEY_READ, &hKey);  
   
         // Set the default post-processing settings  
         REG_GET_N("Brightness", PPSettings.nBrightness, 25)  
         REG_GET_N("Deblock_Y",  PPSettings.nDeblock_Y, 0)  
         REG_GET_N("Deblock_UV", PPSettings.nDeblock_UV, 0)  
         REG_GET_N("Dering",  PPSettings.nDering, 0)  
         REG_GET_N("FilmEffect", PPSettings.nFilmEffect, 0)  
         REG_GET_N("ForceColorspace", PPSettings.nForceColorspace, 0)  
         REG_GET_N("FlipVideo",  PPSettings.nFlipVideo, 0)  
         REG_GET_N("Supported_4CC",  supported_4cc, 0)  
   
         RegCloseKey(hKey);  
252    
253          USE_IYUV = false;          USE_IYUV = false;
254          USE_YV12 = false;          USE_YV12 = false;
# Line 274  Line 260 
260          USE_RG555 = false;          USE_RG555 = false;
261          USE_RG565 = false;          USE_RG565 = false;
262    
263          switch ( PPSettings.nForceColorspace )          switch ( g_config.nForceColorspace )
264          {          {
265          case FORCE_NONE:          case FORCE_NONE:
266                  USE_IYUV = true;                  USE_IYUV = true;
# Line 373  Line 359 
359          {          {
360    
361          case FOURCC_MP4V:          case FOURCC_MP4V:
362                  if (!(supported_4cc & SUPPORT_MP4V)) return VFW_E_TYPE_NOT_ACCEPTED;                  if (!(g_config.supported_4cc & SUPPORT_MP4V)) return VFW_E_TYPE_NOT_ACCEPTED;
363                  break;                  break;
364          case FOURCC_DIVX :          case FOURCC_DIVX :
365                  if (!(supported_4cc & SUPPORT_DIVX)) return VFW_E_TYPE_NOT_ACCEPTED;                  if (!(g_config.supported_4cc & SUPPORT_DIVX)) return VFW_E_TYPE_NOT_ACCEPTED;
366                  break;                  break;
367          case FOURCC_DX50 :          case FOURCC_DX50 :
368                  if (!(supported_4cc & SUPPORT_DX50)) return VFW_E_TYPE_NOT_ACCEPTED;                  if (!(g_config.supported_4cc & SUPPORT_DX50)) return VFW_E_TYPE_NOT_ACCEPTED;
369          case FOURCC_XVID :          case FOURCC_XVID :
370                  break;                  break;
371    
# Line 720  Line 706 
706          if (pIn->IsDiscontinuity() == S_OK)          if (pIn->IsDiscontinuity() == S_OK)
707                  m_frame.general = XVID_DISCONTINUITY;                  m_frame.general = XVID_DISCONTINUITY;
708    
709          if (PPSettings.nDeblock_Y)          if (g_config.nDeblock_Y)
710                  m_frame.general |= XVID_DEBLOCKY;                  m_frame.general |= XVID_DEBLOCKY;
711    
712          if (PPSettings.nDeblock_UV)          if (g_config.nDeblock_UV)
713                  m_frame.general |= XVID_DEBLOCKUV;                  m_frame.general |= XVID_DEBLOCKUV;
714  /*  /*
715          if (PPSettings.nDering)          if (g_config.nDering)
716                  m_frame.general |= XVID_DERING;                  m_frame.general |= XVID_DERING;
717  */  */
718          if (PPSettings.nFilmEffect)          if (g_config.nFilmEffect)
719                  m_frame.general |= XVID_FILMEFFECT;                  m_frame.general |= XVID_FILMEFFECT;
720    
721          m_frame.output.csp &= ~XVID_CSP_VFLIP;          m_frame.output.csp &= ~XVID_CSP_VFLIP;
722          m_frame.output.csp |= rgb_flip^(PPSettings.nFlipVideo ? XVID_CSP_VFLIP : 0);          m_frame.output.csp |= rgb_flip^(g_config.nFlipVideo ? XVID_CSP_VFLIP : 0);
723    
724  repeat :  repeat :
725    

Legend:
Removed from v.1344  
changed lines
  Added in v.1345

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4