]> git.sesse.net Git - vlc/blobdiff - plugins/idct/idctclassic.c
The motion compensation routines are now modules as well ; choose your
[vlc] / plugins / idct / idctclassic.c
index ef148665c160112f21f2749052209c5110ad42c7..4d09620077f83e2f4f75f9af25f95444eb442355 100644 (file)
@@ -2,7 +2,7 @@
  * idctclassic.c : Classic IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctclassic.c,v 1.3 2001/01/16 02:16:38 sam Exp $
+ * $Id: idctclassic.c,v 1.6 2001/01/18 05:13:22 sam Exp $
  *
  * Authors: GaĆ«l Hendryckx <jimmy@via.ecp.fr>
  *
@@ -34,6 +34,7 @@
 #include "common.h"
 #include "threads.h"
 #include "mtime.h"
+#include "tests.h"
 
 #include "video.h"
 #include "video_output.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_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] );
 
 
 /*****************************************************************************
@@ -77,7 +73,7 @@ MODULE_CONFIG_END
 int InitModule( module_t * p_module )
 {
     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
@@ -135,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;
 }
 
 /*****************************************************************************
@@ -142,33 +139,27 @@ static void idct_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
+    if( TestMethod( IDCT_METHOD_VAR, "idctclassic" ) )
+    {
+        return( 999 );
+    }
+
     /* This plugin always works */
     return( 100 );
 }
 
 /*****************************************************************************
- * 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 */