accel_xvmc.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * xvmc.c : Common acceleration definitions for XvMC
00003  *****************************************************************************
00004  * Copyright (C) 2006 VideoLAN
00005  * $Id$
00006  *
00007  * Authors: Christophe Burgalat <c _dot_ burgalat _at_ broadcastavenue _dot_ com>
00008  *          Jean-Paul Saman <jpsaman _at_ videolan _dot_ org>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00023  *****************************************************************************/
00024 
00025 /*****************************************************************************
00026  * Preamble
00027  *****************************************************************************/
00028 
00029 /*
00030  * Common acceleration definitions for XvMC
00031  *
00032  *
00033  */
00034 
00035 #ifndef HAVE_VLC_ACCEL_H
00036 #define HAVE_VLC_ACCEL_H
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00042 typedef struct vlc_macroblock_s
00043 {
00044     short  *blockptr;          /* pointer to current dct block */
00045     short  *blockbaseptr;      /* pointer to base of dct block array in blocks */
00046     short   xvmc_accel;        /* type of acceleration supported */
00047 } vlc_macroblocks_t;
00048 
00049 typedef struct vlc_vld_frame_s
00050 {
00051     int version;              /* Backward compatibility */
00052     int mv_ranges[2][2];
00053     int picture_structure;
00054     int picture_coding_type;
00055     int intra_dc_precision;
00056     int mpeg_coding;
00057     int progressive_sequence;
00058     int scan;
00059     int pred_dct_frame;
00060     int concealment_motion_vectors;
00061     int q_scale_type;
00062     int intra_vlc_format;
00063     int second_field;
00064     int load_intra_quantizer_matrix;
00065     int load_non_intra_quantizer_matrix;
00066     uint8_t intra_quantizer_matrix[64];
00067     uint8_t non_intra_quantizer_matrix[64];
00068     picture_t *backward_reference_picture;
00069     picture_t *forward_reference_picture;
00070 } vlc_vld_frame_t;
00071 
00072 
00073 typedef struct vlc_xvmc_s
00074 {
00075     vlc_macroblocks_t *macroblocks;
00076     void (*proc_macro_block)(int x,int y,int mb_type,
00077     int motion_type,int (*mv_field_sel)[2],
00078     int *dmvector,int cbp,int dct_type,
00079     picture_t *current_picture,picture_t *forward_ref_picture,
00080     picture_t *backward_ref_picture,int picture_structure,
00081     int second_field,int (*f_mot_pmv)[2],int (*b_mot_pmv)[2]);
00082 } vlc_xvmc_t ;
00083 
00084 typedef struct vlc_xxmc_s
00085 {
00086     /*
00087     * We inherit the xine_xvmc_t properties.
00088     */
00089     vlc_xvmc_t xvmc;
00090 
00091     unsigned mpeg;
00092     unsigned acceleration;
00093     vlc_fourcc_t fallback_format;
00094     vlc_vld_frame_t vld_frame;
00095     uint8_t *slice_data;
00096     unsigned slice_data_size;
00097     unsigned slice_code;
00098     int result;
00099     int decoded;
00100     float sleep;
00101     void (*proc_xxmc_update_frame) (picture_t *picture_gen,
00102                 uint32_t width, uint32_t height, double ratio,
00103                 int format, int flags);
00104     void (*proc_xxmc_begin) (picture_t *vo_img);
00105     void (*proc_xxmc_slice) (picture_t *vo_img);
00106     void (*proc_xxmc_flush) (picture_t *vo_img);
00107     void (*proc_xxmc_flushsync) (picture_t *vo_img);
00108 } vlc_xxmc_t;
00109 
00110 #define VLC_IMGFMT_XXMC VLC_FOURCC('X','x','M','C')
00111 
00112   /*
00113    * Register XvMC stream types here.
00114    */
00115 #define VLC_XVMC_MPEG_1 0x00000001
00116 #define VLC_XVMC_MPEG_2 0x00000002
00117 #define VLC_XVMC_MPEG_4 0x00000004
00118 
00119   /*
00120    * Register XvMC acceleration levels here.
00121    */
00122 #define VLC_XVMC_ACCEL_MOCOMP 0x00000001
00123 #define VLC_XVMC_ACCEL_IDCT   0x00000002
00124 #define VLC_XVMC_ACCEL_VLD    0x00000004
00125 
00126 /* xvmc acceleration types */
00127 #define VLC_VO_MOTION_ACCEL   1
00128 #define VLC_VO_IDCT_ACCEL     2
00129 #define VLC_VO_SIGNED_INTRA   4
00130 
00131 /* motion types */
00132 #define VLC_MC_FIELD 1
00133 #define VLC_MC_FRAME 2
00134 #define VLC_MC_16X8  2
00135 #define VLC_MC_DMV   3
00136 
00137 /* picture coding type */
00138 #define VLC_PICT_I_TYPE 1
00139 #define VLC_PICT_P_TYPE 2
00140 #define VLC_PICT_B_TYPE 3
00141 #define VLC_PICT_D_TYPE 4
00142 
00143 /* macroblock modes */
00144 #define VLC_MACROBLOCK_INTRA 1
00145 #define VLC_MACROBLOCK_PATTERN 2
00146 #define VLC_MACROBLOCK_MOTION_BACKWARD 4
00147 #define VLC_MACROBLOCK_MOTION_FORWARD 8
00148 #define VLC_MACROBLOCK_QUANT 16
00149 #define VLC_MACROBLOCK_DCT_TYPE_INTERLACED 32
00150 
00151 #ifdef __cplusplus
00152 }
00153 #endif
00154 
00155 #endif

Generated on Wed Mar 31 08:05:20 2010 for VLC by  doxygen 1.5.6