Merge branch 'gallium-polygon-stipple'
[mesa.git] / src / gallium / state_trackers / xorg / xvmc / xvmc_private.h
index b0239f4c46d33f748f21504d6f96b06060bd6b73..5f8d9d13cb341a3a6af5ae43e13bf94fd938baad 100644 (file)
 #include <X11/Xlib.h>
 #include <X11/extensions/XvMClib.h>
 
+#include <pipe/p_video_state.h>
+
 #include <util/u_debug.h>
 #include <util/u_math.h>
 
+#include <vl/vl_csc.h>
+#include <vl/vl_compositor.h>
+
 #define BLOCK_SIZE_SAMPLES 64
 #define BLOCK_SIZE_BYTES (BLOCK_SIZE_SAMPLES * 2)
 
 struct vl_context;
 
 struct pipe_video_decoder;
-struct pipe_video_compositor;
 struct pipe_video_decode_buffer;
 struct pipe_video_buffer;
 
@@ -51,10 +55,17 @@ typedef struct
 {
    struct vl_context *vctx;
    struct pipe_video_decoder *decoder;
-   struct pipe_video_compositor *compositor;
+
+   enum VL_CSC_COLOR_STANDARD color_standard;
+   struct vl_procamp procamp;
+   struct vl_compositor compositor;
 
    unsigned short subpicture_max_width;
    unsigned short subpicture_max_height;
+
+   struct pipe_video_rect dst_rect;
+   struct pipe_surface *drawable_surface;
+
 } XvMCContextPrivate;
 
 typedef struct
@@ -64,18 +75,22 @@ typedef struct
 
    bool mapped; // are we still mapped to memory?
 
-   XvMCSurface *ref_surfaces[2];
+   struct {
+      unsigned num_blocks_added;
+      struct pipe_ycbcr_block *stream;
+      short *buffer;
+   } ycbcr[3];
+
+   unsigned mv_stride;
+   struct {
+      XvMCSurface *surface;
+      struct pipe_motionvector *mv;
+   } ref[2];
 
-   struct pipe_fence_handle *flush_fence;
-   struct pipe_fence_handle *render_fence;
-   struct pipe_fence_handle *disp_fence;
+   struct pipe_fence_handle *fence;
 
    /* The subpicture associated with this surface, if any. */
    XvMCSubpicture *subpicture;
-   short subx, suby;
-   unsigned short subw, subh;
-   short surfx, surfy;
-   unsigned short surfw, surfh;
 
    /* Some XvMC functions take a surface but not a context,
       so we keep track of which context each surface belongs to. */
@@ -89,6 +104,9 @@ typedef struct
    /* optional palette for this subpicture */
    struct pipe_sampler_view *palette;
 
+   struct pipe_video_rect src_rect;
+   struct pipe_video_rect dst_rect;
+
    /* The surface this subpicture is currently associated with, if any. */
    XvMCSurface *surface;
 
@@ -107,7 +125,7 @@ static INLINE void XVMC_MSG(unsigned int level, const char *fmt, ...)
    static int debug_level = -1;
 
    if (debug_level == -1) {
-      debug_level = MIN2(debug_get_num_option("XVMC_DEBUG", 0), 0);
+      debug_level = MAX2(debug_get_num_option("XVMC_DEBUG", 0), 0);
    }
 
    if (level <= debug_level) {