Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5362 → Rev 5366

/contrib/sdk/sources/vaapi/libva-1.4.1/test/basic/test_07.c
81,10 → 81,8
ASSERT( DEAD_SURFACE_ID == surfaces_16[16] ); /* bounds check */
test_unique_surfaces(surfaces_1, 1, surfaces_4, 4);
test_unique_surfaces(surfaces_4, 4, surfaces_16, 4);
test_unique_surfaces(surfaces_4, 4, surfaces_16, 16);
test_unique_surfaces(surfaces_4, 1, surfaces_16, 16);
test_unique_surfaces(surfaces_1, 16, surfaces_16, 16);
 
status("vaDestroySurface 4 surfaces\n");
va_status = vaDestroySurfaces(va_dpy, surfaces_4, 4);
98,7 → 96,7
 
test_unique_surfaces(surfaces_1, 1, surfaces_6, 6);
test_unique_surfaces(surfaces_6, 6, surfaces_16, 16);
test_unique_surfaces(surfaces_1, 6, surfaces_16, 6);
test_unique_surfaces(surfaces_1, 1, surfaces_16, 16);
 
status("vaDestroySurface 16 surfaces\n");
va_status = vaDestroySurfaces(va_dpy, surfaces_16, 16);
/contrib/sdk/sources/vaapi/libva-1.4.1/test/basic/test_11.c
116,7 → 116,7
/* Generate input data */
for(j = buffer_sizes[i] / 4; j--;)
{
input_data[i][j] = random();
input_data[i][j] = 20; //random();
}
/* Copy to secondary buffer */
/contrib/sdk/sources/vaapi/libva-1.4.1/test/basic/test_common.c
34,7 → 34,6
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <dlfcn.h>
 
#define ASSERT assert
 
45,11 → 44,10
#include "test_x11.c"
#endif
 
Display *dpy;
VADisplay va_dpy;
VAStatus va_status;
int major_version, minor_version;
int print_status = 0;
int print_status = 1;
int num_profiles;
VAProfile *profiles = NULL;
 
/contrib/sdk/sources/vaapi/libva-1.4.1/test/basic/test_x11.c
22,7 → 22,6
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
 
Display *dpy;
VADisplay va_dpy;
VAStatus va_status;
VAProfile *profiles ;
30,13 → 29,9
 
void test_init()
{
dpy = XOpenDisplay(NULL);
ASSERT( dpy );
status("XOpenDisplay: dpy = %08x\n", dpy);
va_dpy = vaGetDisplay(dpy);
va_dpy = va_open_display();
ASSERT( va_dpy );
status("vaGetDisplay: va_dpy = %08x\n", va_dpy);
status("va_open_display: va_dpy = %08x\n", va_dpy);
va_status = vaInitialize(va_dpy, &major_version, &minor_version);
ASSERT( VA_STATUS_SUCCESS == va_status );
49,9 → 44,6
ASSERT( VA_STATUS_SUCCESS == va_status );
status("vaTerminate\n");
 
XCloseDisplay(dpy);
status("XCloseDisplay\n");
 
if (profiles)
{
free(profiles);
/contrib/sdk/sources/vaapi/libva-1.4.1/test/common/va_display.c
30,26 → 30,11
#include <va/va.h>
#include "va_display.h"
 
extern const VADisplayHooks va_display_hooks_android;
extern const VADisplayHooks va_display_hooks_wayland;
extern const VADisplayHooks va_display_hooks_x11;
extern const VADisplayHooks va_display_hooks_drm;
 
static const VADisplayHooks *g_display_hooks;
static const VADisplayHooks *g_display_hooks_available[] = {
#ifdef ANDROID
&va_display_hooks_android,
#else
#ifdef HAVE_VA_WAYLAND
&va_display_hooks_wayland,
#endif
#ifdef HAVE_VA_X11
&va_display_hooks_x11,
#endif
#ifdef HAVE_VA_DRM
&va_display_hooks_drm,
#endif
#endif
NULL
};
 
/contrib/sdk/sources/vaapi/libva-1.4.1/test/common/va_display_drm.c
32,32 → 32,22
#endif
#include "va_display.h"
 
static int drm_fd = -1;
static int drm_fd = 0;
 
static VADisplay
va_open_display_drm(void)
{
VADisplay va_dpy;
int i;
 
static const char *drm_device_paths[] = {
"/dev/dri/renderD128",
"/dev/dri/card0",
NULL
};
drm_fd = get_service("DISPLAY");
if (drm_fd == 0)
return NULL;
 
for (i = 0; drm_device_paths[i]; i++) {
drm_fd = open(drm_device_paths[i], O_RDWR);
if (drm_fd < 0)
continue;
 
va_dpy = vaGetDisplayDRM(drm_fd);
if (va_dpy)
return va_dpy;
 
close(drm_fd);
drm_fd = -1;
}
drm_fd = 0;
return NULL;
}
 
64,11 → 54,7
static void
va_close_display_drm(VADisplay va_dpy)
{
if (drm_fd < 0)
return;
 
close(drm_fd);
drm_fd = -1;
drm_fd = 0;
}
 
 
/contrib/sdk/sources/vaapi/libva-1.4.1/va/va_x11.h
25,7 → 25,6
#define _VA_X11_H_
 
#include <va/va.h>
#include <X11/Xlib.h>
 
#ifdef __cplusplus
extern "C" {
34,9 → 33,7
/*
* Returns a suitable VADisplay for VA API
*/
VADisplay vaGetDisplay (
Display *dpy
);
VADisplay va_open_display(void);
 
/*
* Output rendering
49,7 → 46,6
VAStatus vaPutSurface (
VADisplay dpy,
VASurfaceID surface,
Drawable draw, /* X Drawable */
short srcx,
short srcy,
unsigned short srcw,