xvmc_render.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include <X11/Xlib.h>
  2. #include <X11/Xutil.h>
  3. #include <X11/Xatom.h>
  4. #include <X11/extensions/Xv.h>
  5. #include <X11/extensions/Xvlib.h>
  6. #include <X11/extensions/XvMClib.h>
  7. //the surface should be shown, video driver manipulate this
  8. #define MP_XVMC_STATE_DISPLAY_PENDING 1
  9. //the surface is needed for prediction, codec manipulate this
  10. #define MP_XVMC_STATE_PREDICTION 2
  11. // 1337 IDCT MCo
  12. #define MP_XVMC_RENDER_MAGIC 0x1DC711C0
  13. typedef struct{
  14. //these are not changed by decoder!
  15. int magic;
  16. short * data_blocks;
  17. XvMCMacroBlock * mv_blocks;
  18. int total_number_of_mv_blocks;
  19. int total_number_of_data_blocks;
  20. int mc_type;//XVMC_MPEG1/2/4,XVMC_H263 without XVMC_IDCT
  21. int idct;//does we use IDCT acceleration?
  22. int chroma_format;//420,422,444
  23. int unsigned_intra;//+-128 for intra pictures after clip
  24. int reserved1[13];//future extenstions (e.g. gmc,qpel)
  25. XvMCSurface* p_surface;//pointer to rendered surface, never changed
  26. //these are changed by decoder
  27. //used by XvMCRenderSurface function
  28. XvMCSurface* p_past_surface;//pointer to the past surface
  29. XvMCSurface* p_future_surface;//pointer to the future prediction surface
  30. unsigned int picture_structure;//top/bottom fields or frame !
  31. unsigned int flags;//XVMC_SECOND_FIELD - 1'st or 2'd field in the sequence
  32. unsigned int display_flags; //1,2 or 1+2 fields for XvMCPutSurface,
  33. //these are internal communication one
  34. int state;//0-free,1 Waiting to Display,2 Waiting for prediction
  35. int start_mv_blocks_num;//offset in the array for the current slice,updated by vo
  36. int filled_mv_blocks_num;//processed mv block in this slice,change by decoder
  37. int next_free_data_block_num;//used in add_mv_block, pointer to next free block
  38. } xvmc_render_state_t;