]> git.sesse.net Git - vlc/blobdiff - plugins/idct/idctclassic.c
* Ported Glide and MGA plugins to the new module API. MGA never worked,
[vlc] / plugins / idct / idctclassic.c
index 1c6928a2c010a53f174c0e1155893d2f42aa3c23..51941455efa1c14a62f76163a03832f769b74979 100644 (file)
@@ -2,7 +2,7 @@
  * idctclassic.c : Classic IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctclassic.c,v 1.4 2001/01/16 05:04:25 sam Exp $
+ * $Id: idctclassic.c,v 1.7 2001/02/20 07:49:13 sam Exp $
  *
  * Authors: GaĆ«l Hendryckx <jimmy@via.ecp.fr>
  *
  * 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_InitIDCT   ( vdec_thread_t * p_vdec);
-       void vdec_SparseIDCT ( vdec_thread_t * p_vdec, dctelem_t * p_block,
-                              int i_sparse_pos);
-static void vdec_IDCT       ( vdec_thread_t * p_vdec, dctelem_t * p_block,
-                              int i_idontcare );
+static void vdec_NormScan   ( u8 ppi_scan[2][64] );
 
 
 /*****************************************************************************
@@ -75,10 +70,10 @@ MODULE_CONFIG_END
  * be unloaded later to save memory, and we want to be able to access this
  * data even after the module has been unloaded.
  *****************************************************************************/
-int InitModule( module_t * p_module )
+MODULE_INIT
 {
     p_module->psz_name = MODULE_STRING;
-    p_module->psz_longname = "classic IDCT module";
+    p_module->psz_longname = "classic IDCT module";
     p_module->psz_version = VERSION;
 
     p_module->i_capabilities = MODULE_CAPABILITY_NULL
@@ -95,7 +90,7 @@ int InitModule( module_t * p_module )
  * be set to 0 and calls to NeedModule() be made to increment it. To unload
  * the module, one has to wait until i_usage == 0 and call DeactivateModule().
  *****************************************************************************/
-int ActivateModule( module_t * p_module )
+MODULE_ACTIVATE
 {
     p_module->p_functions = malloc( sizeof( module_functions_t ) );
     if( p_module->p_functions == NULL )
@@ -117,7 +112,7 @@ int ActivateModule( module_t * p_module )
  * returns, i_usage can be set to -1 and the module unloaded. Be careful to
  * lock usage_lock during the whole process.
  *****************************************************************************/
-int DeactivateModule( module_t * p_module )
+MODULE_DEACTIVATE
 {
     free( p_module->p_functions );
 
@@ -136,6 +131,7 @@ static void idct_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.idct.pf_init = vdec_InitIDCT;
     p_function_list->functions.idct.pf_sparse_idct = vdec_SparseIDCT;
     p_function_list->functions.idct.pf_idct = vdec_IDCT;
+    p_function_list->functions.idct.pf_norm_scan = vdec_NormScan;
 }
 
 /*****************************************************************************
@@ -153,28 +149,17 @@ static int idct_Probe( probedata_t *p_data )
 }
 
 /*****************************************************************************
- * vdec_InitIDCT : initialize datas for vdec_SparseIDCT
+ * vdec_NormScan : Unused in this IDCT
  *****************************************************************************/
-static void vdec_InitIDCT (vdec_thread_t * p_vdec)
+static void vdec_NormScan( u8 ppi_scan[2][64] )
 {
-    int i;
-
-    dctelem_t * p_pre = p_vdec->p_pre_idct;
-    memset( p_pre, 0, 64*64*sizeof(dctelem_t) );
-
-    for( i=0 ; i < 64 ; i++ )
-    {
-        p_pre[i*64+i] = 1 << SPARSE_SCALE_FACTOR;
-        vdec_IDCT( p_vdec, &p_pre[i*64], 0) ;
-    }
-    return;
 }
 
 /*****************************************************************************
  * vdec_IDCT : IDCT function for normal matrices
  *****************************************************************************/
-static void vdec_IDCT( vdec_thread_t * p_vdec, dctelem_t * p_block,
-                       int i_idontcare )
+void vdec_IDCT( vdec_thread_t * p_vdec, dctelem_t * p_block,
+                int i_idontcare )
 {
     /* dct classique: pour tester la meilleure entre la classique et la */
     /* no classique */