]> git.sesse.net Git - vlc/blobdiff - include/video_decoder.h
* Fixed the BeOS compile typo.
[vlc] / include / video_decoder.h
index 44bc01827293c377cbeab69d4fa226a1ac2cf8cb..11c5be774745bb5a288b2d155a3686c18c57e8d5 100644 (file)
@@ -1,13 +1,32 @@
 /*****************************************************************************
  * video_decoder.h : video decoder thread
- * (c)1999 VideoLAN
- *****************************************************************************
  *****************************************************************************
+ * Copyright (C) 1999, 2000 VideoLAN
+ * $Id: video_decoder.h,v 1.24 2001/05/30 17:03:11 sam Exp $
+ *
+ * Authors: Christophe Massiot <massiot@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+/*****************************************************************************
  * Requires:
  *  "config.h"
  *  "common.h"
  *  "mtime.h"
- *  "vlc_thread.h"
+ *  "threads.h"
  *  "input.h"
  *  "video.h"
  *  "video_output.h"
@@ -17,7 +36,7 @@
 /*****************************************************************************
  * vdec_thread_t: video decoder thread descriptor
  *****************************************************************************
- * ??
+ * XXX??
  *****************************************************************************/
 typedef struct vdec_thread_s
 {
@@ -29,36 +48,40 @@ typedef struct vdec_thread_s
     vlc_thread_t        thread_id;                /* id for thread functions */
 
     /* Thread configuration */
-    /* ?? */
- /*??*/
+    /* XXX?? */
 //    int *pi_status;
-    
+
+    /* idct iformations */
+    dctelem_t              p_pre_idct[64*64];
+
+    /* Macroblock copy functions */
+    void ( * pf_decode_init ) ( struct vdec_thread_s * );
+    void ( * pf_decode_mb_c ) ( struct vdec_thread_s *, struct macroblock_s * );
+    void ( * pf_decode_mb_bw )( struct vdec_thread_s *, struct macroblock_s * );
 
     /* Input properties */
-    video_parser_t *   p_vpar;                       /* video_parser thread */
-    short int           p_pre_idct[64*64];        /* initialization of sparse idct routines */
+    struct vpar_thread_s * p_vpar;                    /* video_parser thread */
 
-#ifdef STATS
-    /* Statistics */
-    count_t         c_loops;                              /* number of loops */
-    count_t         c_idle_loops;                    /* number of idle loops */
-    count_t         c_decoded_pictures;        /* number of pictures decoded */
-    count_t         c_decoded_i_pictures;    /* number of I pictures decoded */
-    count_t         c_decoded_p_pictures;    /* number of P pictures decoded */
-    count_t         c_decoded_b_pictures;    /* number of B pictures decoded */
-#endif
 } vdec_thread_t;
 
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
+struct vpar_thread_s;
+struct macroblock_s;
 
 /* Thread management functions */
-vdec_thread_t * vdec_CreateThread       ( vpar_thread_t *p_vpar /*, int *pi_status */ );
-void            vdec_DestroyThread      ( vdec_thread_t *p_vdec /*, int *pi_status */ );
-
-/* Time management functions */
-/* ?? */
+#ifndef VDEC_SMP
+int             vdec_InitThread         ( struct vdec_thread_s *p_vdec );
+#endif
+void            vdec_DecodeMacroblock   ( struct vdec_thread_s *p_vdec,
+                                          struct macroblock_s *p_mb );
+void            vdec_DecodeMacroblockC  ( struct vdec_thread_s *p_vdec,
+                                          struct macroblock_s *p_mb );
+void            vdec_DecodeMacroblockBW ( struct vdec_thread_s *p_vdec,
+                                          struct macroblock_s *p_mb );
+vdec_thread_t * vdec_CreateThread       ( struct vpar_thread_s *p_vpar /*,
+                                          int *pi_status */ );
+void            vdec_DestroyThread      ( vdec_thread_t *p_vdec /*,
+                                          int *pi_status */ );
 
-/* Dynamic thread settings */
-/* ?? */