Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to release tag: Libva 2.20.0 #26

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ ltmain.sh
/m4
missing
stamp-h1
/va/va_version.h
/va/wayland/wayland-drm-client-protocol.*
/doc/Doxyfile
/doc/html-out
123 changes: 123 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// Copyright (c) 2017-2023 Intel Corporation
//
// 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, sublicense, 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 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 NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS 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.

cc_library_headers {
name: "libva_headers",

export_include_dirs: [
".",
"va",
"va/drm"
],

vendor: true,
}

cc_library_shared {
name: "libva",

shared_libs: [
"libdl",
"libdrm",
"libcutils",
"liblog",
],

local_include_dirs: [
".",
"va"
],

header_libs: [
"libutils_headers",
],

export_include_dirs: [
".",
],

srcs: [
"va/va.c",
"va/va_trace.c",
"va/va_str.c",
"va/drm/va_drm.c",
"va/drm/va_drm_auth.c",
"va/drm/va_drm_utils.c",
],

cflags: [
"-Werror",
"-Wno-error",
"-DSYSCONFDIR=\"/vendor/etc\"",
"-DLOG_TAG=\"libva\"",
],

arch: {
x86: {
cflags: ["-DVA_DRIVERS_PATH=\"/vendor/lib\""],
},
x86_64: {
cflags: ["-DVA_DRIVERS_PATH=\"/vendor/lib64\""],
},
},

vendor: true,
}

cc_library_shared {
name: "libva-android",

static_libs: [
"libarect",
],

shared_libs: [
"libva",
"libdrm",
"liblog",
],

local_include_dirs: [
"va",
"va/drm",
],

header_libs: [
"libnativebase_headers",
"libutils_headers",
],

include_dirs: [
],

srcs: [
"va/android/va_android.cpp",
"va/drm/va_drm_utils.c",
],

cflags: [
"-Wall",
"-Werror",
"-Wunused-parameter",
"-Wno-error",
],

vendor: true,
}
4 changes: 0 additions & 4 deletions Android.mk

This file was deleted.

42 changes: 41 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
libva NEWS -- summary of user visible changes. 2023-03-19
libva NEWS -- summary of user visible changes. 2023-09-14
Copyright (C) 2009-2023 Intel Corporation

version 2.20.0 - 14.Sep.2023
* va: drop no longer applicable vaGetDriverNames check
* va: remove unreachable "DRIVER BUG"
* x11/dri2: limit the array handling to avoid out of range access
* va/backend: document the vaGetDriver* APIs
* va/backend: annotate vafool as deprecated
* win32: remove duplicate adapter_luid entry
* va: Added Q416 fourcc (three-plane 16-bit YUV 4:4:4)
* trace: fix minor issue about printf data type and value range
* jpeg: add support for crop and partial decode
* trace: Unlock mutex before return
* trace: Add trace for vaExportSurfaceHandle
* av1: Revise offsets comments for av1 encode
* va: Add new VADecodeErrorType to indicate the reset happended in the driver.
* drm: limit the array size to avoid out of range
* va: fix:set driver number to be zero if vaGetDriverNames failed
* va: fix:don't leak driver names, when override is set
* win32: Only print win32 driver messages in DEBUG builds
* va: Add vendor string on va_TraceInitialize
* va: remove legacy code paths
* drm: remove no longer used helpers
* x11: remove legacy code paths
* x11: allow disabling DRI3 via LIBVA_DRI3_DISABLE env var
* x11: implement vaGetDriverNames
* va/x11/va_nvctrl: remove some dead code
* va/x11/va_fglrx: remove some dead code
* va: optimize code of getting driver name for all protocols/os(wayland,x11,drm,win32,android)

version 2.19.0 - 04.Jul.2023
* docs: fix references and descriptions snf focyhrn mstkup
* ci: add build docs test
* win: change default driver search path to bindir
* win: rely on compiler to define link names
* add: Add mono_chrome to VAEncSequenceParameterBufferAV1
* add: Enable support for license acquisition of multiple protected playbacks
* fix: year for version 2.18.0 in NEWS
* fix: use secure_getenv instead of getenv
* trace: Improve and add VA trace log for AV1 encode
* trace: Unify va log message, replace va_TracePrint with va_TraceMsg.

version 2.18.0 - 19.Mar.2023
* doc: Add build and install libva informatio in home page.
* fix: NULL check before calling strncmp.
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# - reset micro version to zero when minor version is incremented
# - reset minor version to zero when major version is incremented
m4_define([va_api_major_version], [1])
m4_define([va_api_minor_version], [19])
m4_define([va_api_minor_version], [20])
m4_define([va_api_micro_version], [0])

m4_define([va_api_version],
Expand All @@ -43,7 +43,7 @@ m4_define([va_api_version],
m4_define([libva_major_version], [m4_eval(va_api_major_version + 1)])
m4_define([libva_minor_version], [m4_eval(va_api_minor_version)])
m4_define([libva_micro_version], [0])
m4_define([libva_pre_version], [1])
m4_define([libva_pre_version], [0])

m4_define([libva_version],
[libva_major_version.libva_minor_version.libva_micro_version])
Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# - reset micro version to zero when VA-API major or minor version is changed
project(
'libva', 'c',
version : '2.19.0.1',
version : '2.20.0',
meson_version : '>= 0.53.0',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
Expand All @@ -19,7 +19,7 @@ project(
# - reset micro version to zero when minor version is incremented
# - reset minor version to zero when major version is incremented
va_api_major_version = 1
va_api_minor_version = 19
va_api_minor_version = 20
va_api_micro_version = 0

va_api_version = '@0@.@1@.@2@'.format(va_api_major_version,
Expand Down
102 changes: 0 additions & 102 deletions va/Android.mk

This file was deleted.

28 changes: 14 additions & 14 deletions va/android/va_android.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2007 Intel Corporation. All Rights Reserved.
* Copyright (c) 2023 Emil Velikov
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
Expand Down Expand Up @@ -61,38 +62,38 @@ static void va_DisplayContextDestroy(
free(pDisplayContext);
}

static VAStatus va_DisplayContextGetNumCandidates(
VADisplayContextP pDisplayContext,
int *num_candidates
static VAStatus va_DisplayContextConnect(
VADisplayContextP pDisplayContext
)
{
VADriverContextP const ctx = pDisplayContext->pDriverContext;
struct drm_state * drm_state = (struct drm_state *)ctx->drm_state;
struct drm_state * const drm_state = (struct drm_state *)ctx->drm_state;

memset(drm_state, 0, sizeof(*drm_state));
drm_state->fd = open(DEVICE_NAME, O_RDWR | O_CLOEXEC);

if (drm_state->fd < 0) {
fprintf(stderr, "Cannot open DRM device '%s': %d, %s\n",
DEVICE_NAME, errno, strerror(errno));
return VA_STATUS_ERROR_UNKNOWN;
}
drm_state->auth_type = VA_DRM_AUTH_CUSTOM;
return VA_DRM_GetNumCandidates(ctx, num_candidates);
return VA_STATUS_SUCCESS;
}

static VAStatus va_DisplayContextGetDriverNameByIndex(
static VAStatus
va_DisplayContextGetDriverNames(
VADisplayContextP pDisplayContext,
char **driver_name,
int candidate_index
char **drivers,
unsigned *num_drivers
)
{
VADriverContextP const ctx = pDisplayContext->pDriverContext;
VAStatus status = va_DisplayContextConnect(pDisplayContext);
if (status != VA_STATUS_SUCCESS)
return status;

return VA_DRM_GetDriverName(ctx, driver_name, candidate_index);
return VA_DRM_GetDriverNames(ctx, drivers, num_drivers);
}


VADisplay vaGetDisplay(
void *native_dpy /* implementation specific */
)
Expand All @@ -109,8 +110,7 @@ VADisplay vaGetDisplay(
return NULL;

pDisplayContext->vaDestroy = va_DisplayContextDestroy;
pDisplayContext->vaGetDriverNameByIndex = va_DisplayContextGetDriverNameByIndex;
pDisplayContext->vaGetNumCandidates = va_DisplayContextGetNumCandidates;
pDisplayContext->vaGetDriverNames = va_DisplayContextGetDriverNames;

pDriverContext = va_newDriverContext(pDisplayContext);
if (!pDriverContext) {
Expand Down
Loading
Loading