summaryrefslogtreecommitdiff
path: root/va
diff options
context:
space:
mode:
Diffstat (limited to 'va')
-rw-r--r--va/Makefile.am20
-rw-r--r--va/egl/Makefile.am43
-rw-r--r--va/egl/va_backend_egl.h41
-rw-r--r--va/egl/va_egl.c81
-rw-r--r--va/va_backend_tpi.h69
-rw-r--r--va/va_egl.h (renamed from va/egl/va_egl.h)23
-rw-r--r--va/va_tpi.c96
-rw-r--r--va/va_tpi.h76
8 files changed, 4 insertions, 445 deletions
diff --git a/va/Makefile.am b/va/Makefile.am
index d74f1c1..7430b3e 100644
--- a/va/Makefile.am
+++ b/va/Makefile.am
@@ -39,7 +39,6 @@ libva_source_c = \
libva_source_h = \
va.h \
va_backend.h \
- va_backend_tpi.h \
va_backend_vpp.h \
va_compat.h \
va_dec_hevc.h \
@@ -47,6 +46,7 @@ libva_source_h = \
va_dec_vp8.h \
va_dec_vp9.h \
va_drmcommon.h \
+ va_egl.h \
va_enc_hevc.h \
va_enc_h264.h \
va_enc_jpeg.h \
@@ -80,12 +80,6 @@ libva_la_LDFLAGS = $(libva_ldflags)
libva_la_DEPENDENCIES = libva.syms
libva_la_LIBADD = $(LIBVA_LIBS) -ldl
-lib_LTLIBRARIES += libva-tpi.la
-libva_tpi_la_SOURCES = va_tpi.c
-libva_tpi_la_LDFLAGS = $(LDADD) -no-undefined
-libva_tpi_la_DEPENDENCIES = libva.la
-libva_tpi_la_LIBADD = libva.la -ldl
-
if USE_DRM
SUBDIRS += drm
lib_LTLIBRARIES += libva-drm.la
@@ -117,16 +111,6 @@ libva_glx_la_LIBADD = libva.la glx/libva_glx.la libva-x11.la \
$(GLX_LIBS) -ldl
endif
-if USE_EGL
-SUBDIRS += egl
-lib_LTLIBRARIES += libva-egl.la
-libva_egl_la_SOURCES =
-libva_egl_la_LDFLAGS = $(LDADD)
-libva_egl_la_DEPENDENCIES = libva.la egl/libva_egl.la
-libva_egl_la_LIBADD = libva.la egl/libva_egl.la \
- $(EGL_LIBS) -ldl
-endif
-
if USE_WAYLAND
SUBDIRS += wayland
lib_LTLIBRARIES += libva-wayland.la
@@ -137,7 +121,7 @@ libva_wayland_la_LIBADD = libva.la wayland/libva_wayland.la \
$(WAYLAND_LIBS) $(DRM_LIBS) -ldl
endif
-DIST_SUBDIRS = x11 glx egl drm wayland
+DIST_SUBDIRS = x11 glx drm wayland
DISTCLEANFILES = \
va_version.h \
diff --git a/va/egl/Makefile.am b/va/egl/Makefile.am
deleted file mode 100644
index aee4975..0000000
--- a/va/egl/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (C) 2009 Splitted-Desktop Systems. 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
-# without limitation the rights to use, copy, modify, merge, publish,
-# 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.
-# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-# 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.
-
-AM_CPPFLAGS = \
- -DLINUX \
- -I$(top_srcdir) \
- -I$(top_srcdir)/va \
- $(EGL_CFLAGS) \
- $(NULL)
-
-source_c = \
- va_egl.c
-
-source_h = \
- va_egl.h \
- va_backend_egl.h
-
-source_h_priv =
-
-noinst_LTLIBRARIES = libva_egl.la
-libva_eglincludedir = ${includedir}/va
-libva_eglinclude_HEADERS = $(source_h)
-libva_egl_la_SOURCES = $(source_c)
-noinst_HEADERS = $(source_h_priv)
diff --git a/va/egl/va_backend_egl.h b/va/egl/va_backend_egl.h
deleted file mode 100644
index 925d933..0000000
--- a/va/egl/va_backend_egl.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2009 Splitted-Desktop Systems. 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
- * without limitation the rights to use, copy, modify, merge, publish,
- * 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.
- * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
- * 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.
- */
-
-#ifndef VA_BACKEND_EGL_H
-#define VA_BACKEND_EGL_H
-
-#include <va/va.h>
-#include <va/va_backend.h>
-
-struct VADriverVTableEGL {
- /* Get EGL ClientBufer buffer index and device id from surface id*/
- VAStatus (*vaGetEGLClientBufferFromSurface) (
- VADriverContextP ctx,
- VASurfaceID surface,
- void **buffer
- );
- /* TBD: more APIs for EGL */
-};
-
-#endif /* VA_BACKEND_EGL_H */
diff --git a/va/egl/va_egl.c b/va/egl/va_egl.c
deleted file mode 100644
index 3462183..0000000
--- a/va/egl/va_egl.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2007 Intel Corporation. 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
- * without limitation the rights to use, copy, modify, merge, publish,
- * 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.
- * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
- * 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.
- */
-
-/*
- * Initial EGL backend, and subject to change
- *
- * Gstreamer gst-gltexture has a framework to support associating a buffer
- * to a texture via EGL_KHR_image_base and GL_OES_EGL_image_external.
- *
- * EGL_KHR_image_base:
- * EGLImageKHR eglCreateImageKHR(
- * EGLDisplay dpy,
- * EGLContext ctx,
- * EGLenum target,
- * EGLClientBuffer buffer,
- * const EGLint *attrib_list)
- *
- * GL_OES_EGL_image_external:
- * This extension provides a mechanism for creating EGLImage texture targets
- * from EGLImages. This extension defines a new texture target TEXTURE_EXTERNAL_OES.
- * This texture target can only be specified using an EGLImage.
- * The first eglCreateImageKHR will create an EGLImage from an EGLClientBufferm, and with
- * an EGLImage, gst-gltexture can use GL_OES_EGL_image_external extension to create textures.
- *
- * eglCreateImageKHR and GL_OES_EGL_image_external are all called directly from gst-gltexture,
- * thus the simplest way to support gst-gltexture is defining a new API to pass EGLClientBuffer
- * to gst-gltexture.
- *
- * EGLClientBuffer is gfx/video driver implementation specific (?). It means we need to pass up
- * the low-level buffer ID (or handle) of the decoded surface to gst-gltexture, and gst-gltexture
- * then pass down it to gfx driver.
- *
- * Bellow API vaGetEGLClientBufferFromSurface is for this purpose
- */
-
-#include "va.h"
-#include "va_backend_egl.h"
-#include "va_egl.h"
-#include "va_internal.h"
-
-
-VAStatus vaGetEGLClientBufferFromSurface (
- VADisplay dpy,
- VASurfaceID surface,
- EGLClientBuffer *buffer /* out*/
-)
-{
- VADriverContextP ctx;
- struct VADriverVTableEGL *va_egl;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- va_egl = (struct VADriverVTableEGL *)ctx->vtable_egl;
- if (va_egl && va_egl->vaGetEGLClientBufferFromSurface) {
- return va_egl->vaGetEGLClientBufferFromSurface(ctx, surface, buffer);
- } else
- return VA_STATUS_ERROR_UNIMPLEMENTED;
-}
-
-
diff --git a/va/va_backend_tpi.h b/va/va_backend_tpi.h
deleted file mode 100644
index 141eb75..0000000
--- a/va/va_backend_tpi.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2007 Intel Corporation. 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
- * without limitation the rights to use, copy, modify, merge, publish,
- * 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.
- * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
- * 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.
- */
-
-/*
- * Video Decode Acceleration -Backend API
- */
-
-#ifndef _VA_BACKEND_TPI_H_
-#define _VA_BACKEND_TPI_H_
-
-#include <va/va.h>
-#include <va/va_backend.h>
-#include <va/va_tpi.h>
-
-struct VADriverVTableTPI
-{
- VAStatus (*vaCreateSurfacesWithAttribute) (
- VADisplay dpy,
- int width,
- int height,
- int format,
- int num_surfaces,
- VASurfaceID *surfaces, /* out */
- VASurfaceAttributeTPI *attribute_tpi
- );
-
-
- VAStatus (*vaPutSurfaceBuf) (
- VADriverContextP ctx,
- VASurfaceID surface,
- unsigned char* data,
- int* data_len,
- short srcx,
- short srcy,
- unsigned short srcw,
- unsigned short srch,
- short destx,
- short desty,
- unsigned short destw,
- unsigned short desth,
- VARectangle *cliprects, /* client supplied clip list */
- unsigned int number_cliprects, /* number of clip rects in the clip list */
- unsigned int flags /* de-interlacing flags */
- );
-};
-
-
-#endif /* _VA_BACKEND_TPI_H_ */
diff --git a/va/egl/va_egl.h b/va/va_egl.h
index 93781c1..d6acb7d 100644
--- a/va/egl/va_egl.h
+++ b/va/va_egl.h
@@ -24,27 +24,6 @@
#ifndef _VA_EGL_H_
#define _VA_EGL_H_
-#include <va/va.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void* EGLClientBuffer;
-
-/*This function is used to get EGLClientBuffer
- * (lower 16bits is buffer index, upper 16bits
- * is BC device id.) from surface id. Application
- * should maintain EGLClientBuffer itself.*/
-
-VAStatus vaGetEGLClientBufferFromSurface (
- VADisplay dpy,
- VASurfaceID surface,
- EGLClientBuffer *buffer /* out*/
-);
-
-#ifdef __cplusplus
-}
-#endif
+#warning The APIs / data structures included in this file are deprecated
#endif /* _VA_EGL_H_ */
diff --git a/va/va_tpi.c b/va/va_tpi.c
deleted file mode 100644
index 46cf384..0000000
--- a/va/va_tpi.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2007 Intel Corporation. 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
- * without limitation the rights to use, copy, modify, merge, publish,
- * 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.
- * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
- * 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.
- */
-
-#define _GNU_SOURCE 1
-#include "sysdeps.h"
-#include "va.h"
-#include "va_backend.h"
-#include "va_backend_tpi.h"
-#include "va_internal.h"
-
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <dlfcn.h>
-#include <unistd.h>
-
-
-/*
- * Create surfaces with special inputs/requirements
- */
-VAStatus vaCreateSurfacesWithAttribute (
- VADisplay dpy,
- int width,
- int height,
- int format,
- int num_surfaces,
- VASurfaceID *surfaces, /* out */
- VASurfaceAttributeTPI *attribute_tpi
-)
-{
- VADriverContextP ctx;
- struct VADriverVTableTPI *tpi;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- tpi = (struct VADriverVTableTPI *)ctx->vtable_tpi;
- if (tpi && tpi->vaCreateSurfacesWithAttribute) {
- return tpi->vaCreateSurfacesWithAttribute( ctx, width, height, format, num_surfaces, surfaces, attribute_tpi);
- } else
- return VA_STATUS_ERROR_UNIMPLEMENTED;
-}
-
-
-VAStatus vaPutSurfaceBuf (
- VADisplay dpy,
- VASurfaceID surface,
- unsigned char* data,
- int* data_len,
- short srcx,
- short srcy,
- unsigned short srcw,
- unsigned short srch,
- short destx,
- short desty,
- unsigned short destw,
- unsigned short desth,
- VARectangle *cliprects, /* client supplied clip list */
- unsigned int number_cliprects, /* number of clip rects in the clip list */
- unsigned int flags /* de-interlacing flags */
-)
-{
- VADriverContextP ctx;
- struct VADriverVTableTPI *tpi;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- tpi = ( struct VADriverVTableTPI *)ctx->vtable_tpi;
- if (tpi && tpi->vaPutSurfaceBuf) {
- return tpi->vaPutSurfaceBuf( ctx, surface, data, data_len, srcx, srcy, srcw, srch,
- destx, desty, destw, desth, cliprects, number_cliprects, flags );
- } else
- return VA_STATUS_ERROR_UNIMPLEMENTED;
-}
diff --git a/va/va_tpi.h b/va/va_tpi.h
index d4a9d06..12e0379 100644
--- a/va/va_tpi.h
+++ b/va/va_tpi.h
@@ -24,80 +24,6 @@
#ifndef _VA_TPI_H_
#define _VA_TPI_H_
-#include <va/va.h>
+#warning The APIs / data structures included in this file are deprecated
-#ifdef __cplusplus
-extern "C" {
#endif
-
-
-typedef enum {
- VAExternalMemoryNULL, /* it is not external buffer, but requires the implementation allocates
- * the surface with the input attribute
- */
- VAExternalMemoryV4L2Buffer,
- VAExternalMemoryCIFrame, /* the memory is from camera frames and buffers points the frame ID list */
- VAExternalMemoryUserPointer, /* the memory is malloc-ed and buffers points to the buffers */
- VAExternalMemoryKernelDRMBufffer, /* the memory is from kernel DRM buffers and buffers points the
- * DRM buffer handle list
- */
- VAExternalMemoryAndroidGrallocBuffer, /* the memory is from Android Gralloc memory, and buffers points
- * the gralloc native_handle_t list
- */
-} VASurfaceMemoryType;
-
-typedef struct _VASurfaceAttributeTPI {
- VASurfaceMemoryType type;
- unsigned int width;
- unsigned int height;
- unsigned int size;
- unsigned int pixel_format; /* buffer format */
- unsigned int tiling; /* the memory is tiling or not */
- unsigned int luma_stride; /* luma stride, could be width aligned with a special value */
- unsigned int chroma_u_stride; /* chroma stride */
- unsigned int chroma_v_stride;
- unsigned int luma_offset; /* could be 0 */
- unsigned int chroma_u_offset; /* U offset from the beginning of the memory */
- unsigned int chroma_v_offset; /* V offset from the beginning of the memory */
- unsigned int count; /* buffer count for surface creation */
- unsigned int *buffers; /* buffer handles or user pointers */
- unsigned int reserved[4]; /* used to pass additional information, like
- * Android native window pointer
- */
-} VASurfaceAttributeTPI;
-
-
-VAStatus vaPutSurfaceBuf (
- VADisplay dpy,
- VASurfaceID surface,
- unsigned char* data,
- int* data_len,
- short srcx,
- short srcy,
- unsigned short srcw,
- unsigned short srch,
- short destx,
- short desty,
- unsigned short destw,
- unsigned short desth,
- VARectangle *cliprects, /* client supplied clip list */
- unsigned int number_cliprects, /* number of clip rects in the clip list */
- unsigned int flags /* de-interlacing flags */
-);
-
-
-VAStatus vaCreateSurfacesWithAttribute (
- VADisplay dpy,
- int width,
- int height,
- int format,
- int num_surfaces,
- VASurfaceID *surfaces, /* out */
- VASurfaceAttributeTPI *attribute_tpi
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif