/**************************************************************************
- *
+ *
* Copyright 2009 Younes Manton.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include <assert.h>
+
#include <X11/Xlib.h>
#include <X11/extensions/Xvlib.h>
#include <X11/extensions/XvMClib.h>
+
#include <pipe/p_compiler.h>
PUBLIC
/**************************************************************************
- *
+ *
* Copyright 2009 Younes Manton.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include <assert.h>
+
#include <X11/Xlib.h>
#include <X11/extensions/XvMClib.h>
+
#include <util/u_memory.h>
+
#include "xvmc_private.h"
PUBLIC
**************************************************************************/
#include <assert.h>
+
#include <X11/Xlibint.h>
#include <X11/extensions/XvMClib.h>
+
#include <pipe/p_screen.h>
#include <pipe/p_video_context.h>
#include <pipe/p_video_state.h>
#include <pipe/p_state.h>
-#include <vl_winsys.h>
+
#include <util/u_memory.h>
+
#include <vl/vl_csc.h>
+#include <vl_winsys.h>
+
#include "xvmc_private.h"
static Status Validate(Display *dpy, XvPortID port, int surface_type_id,
**************************************************************************/
#include <assert.h>
+
#include <X11/Xlibint.h>
#include <X11/extensions/XvMClib.h>
#include <xorg/fourcc.h>
-#include <vl_winsys.h>
+
#include <pipe/p_screen.h>
#include <pipe/p_video_context.h>
#include <pipe/p_state.h>
+
#include <util/u_memory.h>
#include <util/u_math.h>
#include <util/u_format.h>
#include <util/u_sampler.h>
+
+#include <vl_winsys.h>
+
#include "xvmc_private.h"
#define FOURCC_RGB 0x0000003
#include <assert.h>
#include <stdio.h>
+
#include <X11/Xlibint.h>
-#include <vl_winsys.h>
+
#include <pipe/p_video_context.h>
#include <pipe/p_video_state.h>
#include <pipe/p_state.h>
+
#include <util/u_inlines.h>
#include <util/u_memory.h>
#include <util/u_math.h>
+
+#include <vl_winsys.h>
+
#include "xvmc_private.h"
static enum pipe_mpeg12_picture_type PictureToPipe(int xvmc_pic)
#include <X11/Xlib.h>
#include <X11/extensions/XvMClib.h>
+
#include <util/u_debug.h>
+#include <util/u_math.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 pipe_sampler_view;
struct pipe_fence_handle;
#define XVMC_ERR 1
#define XVMC_WARN 2
#define XVMC_TRACE 3
+
static INLINE void XVMC_MSG(unsigned int level, const char *fmt, ...)
{
- static boolean check_dbg_level = TRUE;
- static unsigned int debug_level;
+ static int debug_level = -1;
- if (check_dbg_level) {
- debug_level = debug_get_num_option("XVMC_DEBUG", 0);
- check_dbg_level = FALSE;
+ if (debug_level == -1) {
+ debug_level = MIN2(debug_get_num_option("XVMC_DEBUG", 0), 0);
}
if (level <= debug_level) {