]> git.sesse.net Git - vlc/blobdiff - plugins/idct/idctclassic.c
Found bug in configure.in script Qt Embedded definition used $(QTDIR) i.s.o ${QTDIR}
[vlc] / plugins / idct / idctclassic.c
index 9b74a3144d852329492446952ca7252cf57cb57a..b1e0b8ec3523be42b43d9dd8b01acc16465b0128 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * idctclassic.c : Classic IDCT module
  *****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctclassic.c,v 1.11 2001/06/03 12:47:21 sam Exp $
+ * Copyright (C) 1999-2001 VideoLAN
+ * $Id: idctclassic.c,v 1.24 2002/05/18 17:47:46 sam Exp $
  *
  * Authors: GaĆ«l Hendryckx <jimmy@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME idctclassic
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
+#include <string.h>
 
-#include "config.h"
-#include "common.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "video.h"
-#include "video_output.h"
-
-#include "video_decoder.h"
-
-#include "modules.h"
-#include "modules_inner.h"
-
-#include "vdec_block.h"
-#include "vdec_idct.h"
+#include <videolan/vlc.h>
 
-#include "modules_export.h"
+#include "idct.h"
+#include "block_c.h"
 
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
 static void idct_getfunctions( function_list_t * p_function_list );
-static int  idct_Probe      ( probedata_t *p_data );
-static void vdec_NormScan   ( u8 ppi_scan[2][64] );
-
 
 /*****************************************************************************
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for classic IDCT module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_IDCT;
-    p_module->psz_longname = "classic IDCT module";
+    SET_DESCRIPTION( _("classic IDCT module") )
+    ADD_CAPABILITY( IDCT, 100 )
+    ADD_SHORTCUT( "classic" )
+    ADD_SHORTCUT( "idctclassic" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -81,52 +60,17 @@ MODULE_DEACTIVATE_STOP
 /* Following functions are local */
 
 /*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-static void idct_getfunctions( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = idct_Probe;
-#define F p_function_list->functions.idct
-    F.pf_idct_init = _M( vdec_InitIDCT );
-    F.pf_sparse_idct = _M( vdec_SparseIDCT );
-    F.pf_idct = _M( vdec_IDCT );
-    F.pf_norm_scan = vdec_NormScan;
-    F.pf_decode_init = _M( vdec_InitDecode );
-    F.pf_decode_mb_c = _M( vdec_DecodeMacroblockC );
-    F.pf_decode_mb_bw = _M( vdec_DecodeMacroblockBW );
-#undef F
-}
-
-/*****************************************************************************
- * idct_Probe: returns a preference score
+ * NormScan : Unused in this IDCT
  *****************************************************************************/
-static int idct_Probe( probedata_t *p_data )
-{
-    if( TestMethod( IDCT_METHOD_VAR, "idctclassic" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
-    return( 100 );
-}
-
-/*****************************************************************************
- * vdec_NormScan : Unused in this IDCT
- *****************************************************************************/
-static void vdec_NormScan( u8 ppi_scan[2][64] )
+static void NormScan( u8 ppi_scan[2][64] )
 {
 }
 
 /*****************************************************************************
- * vdec_IDCT : IDCT function for normal matrices
+ * IDCT : IDCT function for normal matrices
  *****************************************************************************/
-void _M( vdec_IDCT )( vdec_thread_t * p_vdec, dctelem_t * p_block,
-                int i_idontcare )
+static inline void IDCT( dctelem_t * p_block )
 {
-    /* dct classique: pour tester la meilleure entre la classique et la */
-    /* no classique */
     s32 tmp0, tmp1, tmp2, tmp3;
     s32 tmp10, tmp11, tmp12, tmp13;
     s32 z1, z2, z3, z4, z5;
@@ -248,7 +192,7 @@ void _M( vdec_IDCT )( vdec_thread_t * p_vdec, dctelem_t * p_block,
      * may be commented out.
      */
 
-#ifndef NO_ZERO_COLUMN_TEST /*ajoute un test mais evite des calculs */
+#ifndef NO_ZERO_COLUMN_TEST /* Adds a test but avoids calculus */
         if ((dataptr[DCTSIZE*1] | dataptr[DCTSIZE*2] | dataptr[DCTSIZE*3] |
             dataptr[DCTSIZE*4] | dataptr[DCTSIZE*5] | dataptr[DCTSIZE*6] |
             dataptr[DCTSIZE*7]) == 0)
@@ -343,3 +287,11 @@ void _M( vdec_IDCT )( vdec_thread_t * p_vdec, dctelem_t * p_block,
     }
 }
 
+static inline void RestoreCPUState( )
+{
+    ;
+}
+
+#include "idct_sparse.h"
+#include "idct_decl.h"
+