00001 /* 00002 * Copyright (C) 2003 Ivan Kalvachev 00003 * 00004 * This file is part of FFmpeg. 00005 * 00006 * FFmpeg is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * FFmpeg is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with FFmpeg; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #ifndef FFMPEG_XVMC_RENDER_H 00022 #define FFMPEG_XVMC_RENDER_H 00023 00024 #include <X11/Xlib.h> 00025 #include <X11/Xutil.h> 00026 #include <X11/Xatom.h> 00027 #include <X11/extensions/Xv.h> 00028 #include <X11/extensions/Xvlib.h> 00029 #include <X11/extensions/XvMClib.h> 00030 00031 #ifdef HAVE_XVMC_VLD 00032 #include <stdint.h> 00033 #include <X11/extensions/vldXvMC.h> 00034 #endif 00035 00036 //the surface should be shown, video driver manipulates this 00037 #define MP_XVMC_STATE_DISPLAY_PENDING 1 00038 //the surface is needed for prediction, codec manipulates this 00039 #define MP_XVMC_STATE_PREDICTION 2 00040 //this surface is needed for subpicture rendering 00041 #define MP_XVMC_STATE_OSD_SOURCE 4 00042 // 1337 IDCT MCo 00043 #define MP_XVMC_RENDER_MAGIC 0x1DC711C0 00044 00045 typedef struct{ 00046 //these are not changed by the decoder! 00047 int magic; 00048 00049 short * data_blocks; 00050 XvMCMacroBlock * mv_blocks; 00051 int total_number_of_mv_blocks; 00052 int total_number_of_data_blocks; 00053 int mc_type;//XVMC_MPEG1/2/4,XVMC_H263 without XVMC_IDCT 00054 int idct;//Do we use IDCT acceleration? 00055 int chroma_format;//420,422,444 00056 int unsigned_intra;//+-128 for intra pictures after clip 00057 XvMCSurface* p_surface;//pointer to rendered surface, never changed 00058 00059 //these are changed by decoder 00060 //used by XvMCRenderSurface function 00061 XvMCSurface* p_past_surface;//pointer to the past surface 00062 XvMCSurface* p_future_surface;//pointer to the future prediction surface 00063 00064 unsigned int picture_structure;//top/bottom fields or frame! 00065 unsigned int flags;//XVMC_SECOND_FIELD - 1'st or 2'd field in the sequence 00066 unsigned int display_flags; //1,2 or 1+2 fields for XvMCPutSurface, 00067 00068 //these are internal communication ones 00069 int state;//0-free, 1 Waiting to Display, 2 Waiting for prediction 00070 int start_mv_blocks_num;//offset in the array for the current slice, updated by vo 00071 int filled_mv_blocks_num;//processed mv block in this slice, changed by decoder 00072 00073 int next_free_data_block_num;//used in add_mv_block, pointer to next free block 00074 //extensions 00075 void * p_osd_target_surface_render;//pointer to the surface where subpicture is rendered 00076 00077 int pict_type; //this is for skipping frames 00078 00079 // These are for the XVMC VLD slice interface 00080 int slice_code; 00081 unsigned char *slice_data; 00082 int slice_datalen; 00083 00084 Display *disp; 00085 XvMCContext *ctx; 00086 00087 } xvmc_render_state_t; 00088 00089 #endif /* FFMPEG_XVMC_RENDER_H */
1.5.5