#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;
{
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
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. */
/* 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;
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) {