1 /*****************************************************************************
2 * video_decoder.h : video decoder thread
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
6 * Authors: Christophe Massiot <massiot@via.ecp.fr>
8 * 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
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
21 *****************************************************************************/
23 /*****************************************************************************
33 *****************************************************************************/
35 /*****************************************************************************
36 * vdec_thread_t: video decoder thread descriptor
37 *****************************************************************************
39 *****************************************************************************/
40 typedef struct vdec_thread_s
42 /* Thread properties and locks */
43 boolean_t b_die; /* `die' flag */
44 boolean_t b_run; /* `run' flag */
45 boolean_t b_error; /* `error' flag */
46 boolean_t b_active; /* `active' flag */
47 vlc_thread_t thread_id; /* id for thread functions */
49 /* Thread configuration */
53 /* idct iformations */
54 dctelem_t p_pre_idct[64*64];
56 /* Input properties */
57 struct vpar_thread_s * p_vpar; /* video_parser thread */
60 //#ifdef MPEG2_COMPLIANT
61 u8 pi_crop_buf[VDEC_CROPRANGE];
67 count_t c_loops; /* number of loops */
68 count_t c_idle_loops; /* number of idle loops */
69 count_t c_decoded_pictures; /* number of pictures decoded */
70 count_t c_decoded_i_pictures; /* number of I pictures decoded */
71 count_t c_decoded_p_pictures; /* number of P pictures decoded */
72 count_t c_decoded_b_pictures; /* number of B pictures decoded */
76 /*****************************************************************************
78 *****************************************************************************/
82 /* Thread management functions */
84 int vdec_InitThread ( struct vdec_thread_s *p_vdec );
85 void vdec_DecodeMacroblock ( struct vdec_thread_s *p_vdec,
86 struct macroblock_s *p_mb );
88 vdec_thread_t * vdec_CreateThread ( struct vpar_thread_s *p_vpar /*,
90 void vdec_DestroyThread ( vdec_thread_t *p_vdec /*,