Hello community, here is the log from the commit of package libyami-utils for openSUSE:Factory checked in at 2019-12-24 14:30:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyami-utils (Old) and /work/SRC/openSUSE:Factory/.libyami-utils.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyami-utils" Tue Dec 24 14:30:31 2019 rev:6 rq:759047 version:1.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/libyami-utils/libyami-utils.changes 2019-06-26 16:05:17.123735632 +0200 +++ /work/SRC/openSUSE:Factory/.libyami-utils.new.6675/libyami-utils.changes 2019-12-24 14:30:50.370601353 +0100 @@ -1,0 +2,6 @@ +Mon Dec 23 23:33:28 UTC 2019 - Sean Kelley <[email protected]> + +- Update for release 1.3.2 and removed export CXXFLAGS="-Wno-error" + * Support for gcc9 + +------------------------------------------------------------------- Old: ---- libyami-utils-1.3.1.tar.gz New: ---- libyami-utils-1.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libyami-utils.spec ++++++ --- /var/tmp/diff_new_pack.2Da1Fi/_old 2019-12-24 14:30:51.006601676 +0100 +++ /var/tmp/diff_new_pack.2Da1Fi/_new 2019-12-24 14:30:51.010601678 +0100 @@ -1,7 +1,7 @@ # # spec file for package libyami-utils # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,8 +17,7 @@ Name: libyami-utils -Version: 1.3.1 -### FIXME ### On next version bump, please remove export CXXFLAGS="-Wno-error" -- WIP progress upstream to fix gcc9 buildfail +Version: 1.3.2 Release: 0 Summary: Collection of tools for development and testing of Libyami License: Apache-2.0 @@ -39,7 +38,7 @@ BuildRequires: pkgconfig(libv4l2) BuildRequires: pkgconfig(libva-drm) BuildRequires: pkgconfig(libva-x11) -BuildRequires: pkgconfig(libyami) >= 0.5.5 +BuildRequires: pkgconfig(libyami) >= 0.6.1 # Intel graphics hardware only available on these platforms ExclusiveArch: x86_64 @@ -69,7 +68,6 @@ %setup -q %build -export CXXFLAGS="-Wno-error" autoreconf -fiv %configure \ --disable-static \ ++++++ libyami-utils-1.3.1.tar.gz -> libyami-utils-1.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyami-utils-1.3.1/configure.ac new/libyami-utils-1.3.2/configure.ac --- old/libyami-utils-1.3.1/configure.ac 2018-09-25 07:18:02.000000000 +0200 +++ new/libyami-utils-1.3.2/configure.ac 2018-12-12 07:32:17.000000000 +0100 @@ -254,7 +254,7 @@ AC_DEFINE(HAVE_LIBBSD, 1, [Define if libbsd is available]) fi -PKG_CHECK_MODULES([LIBYAMI], [libyami >= 0.5.5]) +PKG_CHECK_MODULES([LIBYAMI], [libyami >= 0.6.1]) # Checks for library functions. AC_FUNC_MALLOC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyami-utils-1.3.1/examples/Android.mk new/libyami-utils-1.3.2/examples/Android.mk --- old/libyami-utils-1.3.1/examples/Android.mk 2018-09-25 07:18:02.000000000 +0200 +++ new/libyami-utils-1.3.2/examples/Android.mk 2018-12-12 07:32:17.000000000 +0100 @@ -22,8 +22,10 @@ libva \ libva-android \ libgui \ + libui \ libhardware \ libyami \ +LOCAL_PROPRIETARY_MODULE := true LOCAL_MODULE := androidplayer include $(BUILD_EXECUTABLE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyami-utils-1.3.1/examples/androidplayer.cpp new/libyami-utils-1.3.2/examples/androidplayer.cpp --- old/libyami-utils-1.3.1/examples/androidplayer.cpp 2018-09-25 07:18:02.000000000 +0200 +++ new/libyami-utils-1.3.2/examples/androidplayer.cpp 2018-12-12 07:32:17.000000000 +0100 @@ -33,10 +33,12 @@ #include <hardware/gralloc1.h> #include <va/va_android.h> #include <va/va.h> +#include <va/va_drmcommon.h> #include <map> #include <vector> using namespace YamiMediaCodec; +using namespace android; #ifndef CHECK_EQ #define CHECK_EQ(a, b) do { \ @@ -48,6 +50,18 @@ #define ANDROID_DISPLAY 0x18C34078 +typedef int32_t (*GRALLOC1_PFN_SET_INTERLACE)(gralloc1_device_t *device, buffer_handle_t buffer, uint32_t interlace); +#define GRALLOC1_FUNCTION_SET_INTERLACE 104 + +typedef int32_t /*gralloc1_error_t*/ (*GRALLOC1_PFN_GET_PRIME)( + gralloc1_device_t *device, buffer_handle_t buffer, uint32_t *prime); +#define GRALLOC1_FUNCTION_GET_PRIME 103 + + +typedef int32_t /*gralloc1_error_t*/ (*GRALLOC1_PFN_GET_BYTE_STRIDE)( + gralloc1_device_t *device, buffer_handle_t buffer, uint32_t *outStride, uint32_t size); +#define GRALLOC1_FUNCTION_GET_BYTE_STRIDE 102 + class Gralloc1 { public: @@ -58,9 +72,21 @@ g.reset(); return g; } - bool getPitch(buffer_handle_t handle, uint32_t& pitch) + + bool getByteStride(buffer_handle_t handle, uint32_t *outStride, uint32_t size) { - return m_getStride(m_device, handle, &pitch) == 0; + return m_getByteStride(m_device, handle, outStride, size) == 0; + } + + bool getPrime(buffer_handle_t handle, uint32_t* prime) + { + return m_getPrime(m_device, handle, prime) == 0; + } + + bool setInterlace(buffer_handle_t handle, bool interlace) + { + uint32_t i = interlace; + return m_setInterlace(m_device, handle, i) == 0; } ~Gralloc1() @@ -76,12 +102,16 @@ { CHECK_EQ(0, hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &m_module)); CHECK_EQ(0, gralloc1_open(m_module, &m_device)); - m_getStride = (GRALLOC1_PFN_GET_STRIDE)m_device->getFunction(m_device, GRALLOC1_FUNCTION_GET_STRIDE); - return m_getStride; + m_setInterlace = (GRALLOC1_PFN_SET_INTERLACE)m_device->getFunction(m_device, GRALLOC1_FUNCTION_SET_INTERLACE); + m_getPrime = (GRALLOC1_PFN_GET_PRIME)m_device->getFunction(m_device, GRALLOC1_FUNCTION_GET_PRIME); + m_getByteStride = (GRALLOC1_PFN_GET_BYTE_STRIDE)m_device->getFunction(m_device, GRALLOC1_FUNCTION_GET_BYTE_STRIDE); + return m_setInterlace && m_getPrime && m_getByteStride; } const struct hw_module_t* m_module = NULL; gralloc1_device_t* m_device = NULL; - GRALLOC1_PFN_GET_STRIDE m_getStride = NULL; + GRALLOC1_PFN_SET_INTERLACE m_setInterlace = NULL; + GRALLOC1_PFN_GET_PRIME m_getPrime = NULL; + GRALLOC1_PFN_GET_BYTE_STRIDE m_getByteStride = NULL; }; class AndroidPlayer @@ -223,11 +253,11 @@ static sp<SurfaceControl> surfaceCtl = client->createSurface(String8("testsurface"), 800, 600, HAL_PIXEL_FORMAT_NV12_Y_TILED_INTEL, 0); // configure surface - SurfaceComposerClient::openGlobalTransaction(); - surfaceCtl->setLayer(100000); - surfaceCtl->setPosition(100, 100); - surfaceCtl->setSize(1920, 1080); - SurfaceComposerClient::closeGlobalTransaction(); + SurfaceComposerClient::Transaction{} + .setLayer(surfaceCtl, 100000) + .setPosition(surfaceCtl, 100, 100) + .setSize(surfaceCtl, 1920, 1080) + .apply(); m_surface = surfaceCtl->getSurface(); @@ -270,8 +300,8 @@ { SharedPtr<VideoFrame> frame; - uint32_t pitch; - if (!m_gralloc->getPitch(buf->handle, pitch)) + uint32_t pitch[2]; + if (!m_gralloc->getByteStride(buf->handle, pitch, 2)) return frame; VASurfaceAttrib attrib; @@ -283,12 +313,19 @@ external.pixel_format = VA_FOURCC_NV12; external.width = buf->width; external.height = buf->height; - external.pitches[0] = pitch; + external.pitches[0] = pitch[0]; + external.pitches[1] = pitch[1]; + external.offsets[0] = 0; + external.offsets[1] = pitch[0] * buf->height; external.num_planes = 2; external.num_buffers = 1; - uint8_t* handle = (uint8_t*)buf->handle; + uint32_t handle; + if (!m_gralloc->getPrime(buf->handle, &handle)) { + ERROR("get prime failed"); + return frame; + } external.buffers = (long unsigned int*)&handle; //graphic handel - external.flags = VA_SURFACE_ATTRIB_MEM_TYPE_ANDROID_GRALLOC; + external.flags = VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME; attrib.flags = VA_SURFACE_ATTRIB_SETTABLE; attrib.type = (VASurfaceAttribType)VASurfaceAttribExternalBufferDescriptor; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyami-utils-1.3.1/examples/blend.cpp new/libyami-utils-1.3.2/examples/blend.cpp --- old/libyami-utils-1.3.1/examples/blend.cpp 2018-09-25 07:18:02.000000000 +0200 +++ new/libyami-utils-1.3.2/examples/blend.cpp 2018-12-12 07:32:17.000000000 +0100 @@ -35,8 +35,8 @@ #include <va/va_x11.h> struct timespec start, end; -#define PERF_START(block) clock_gettime(CLOCK_REALTIME, &start); -#define PERF_STOP(block) clock_gettime(CLOCK_REALTIME, &end); \ +#define PERF_START(block) clock_gettime(CLOCK_REALTIME, &::start); +#define PERF_STOP(block) clock_gettime(CLOCK_REALTIME, &::end); \ INFO("%s used %f ms\n", block, \ (end.tv_sec - start.tv_sec) * 1000 \ + (end.tv_nsec - start.tv_nsec) / 1E6); @@ -404,9 +404,9 @@ uint8_t r = rand() % 256; uint8_t g = rand() % 256; uint8_t b = rand() % 256; - uint8_t a = rand() % 256; + uint8_t a = (rand() % 128) + 128; //low alpha value will introduce trasparent block - uint32_t pixel = (r << 24) | (g << 16) | (b << 8) | a; + uint32_t pixel = (a << 24) | (b << 16) | (g << 8) | r; char* ptr = buf + image.offsets[0]; for (int i = 0; i < image.height; i++) { uint32_t* dest = (uint32_t*)(ptr + image.pitches[0] * i); @@ -490,14 +490,14 @@ { m_dest = createSurface(VA_RT_FORMAT_YUV420, VA_FOURCC_NV12, targetWidth, targetHeight); m_dest->fourcc = YAMI_FOURCC_NV12; - return m_dest; + return (bool)m_dest; } bool createDisplaySurface(uint32_t targetWidth, uint32_t targetHeight) { m_displaySurface = createSurface(VA_RT_FORMAT_YUV420, VA_FOURCC_NV12, targetWidth, targetHeight); m_displaySurface->fourcc = YAMI_FOURCC_NV12; - return m_displaySurface; + return (bool)m_displaySurface; } bool createVpp() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyami-utils-1.3.1/tests/vpp.cpp new/libyami-utils-1.3.2/tests/vpp.cpp --- old/libyami-utils-1.3.1/tests/vpp.cpp 2018-09-25 07:18:02.000000000 +0200 +++ new/libyami-utils-1.3.2/tests/vpp.cpp 2018-12-12 07:32:17.000000000 +0100 @@ -254,10 +254,13 @@ VPPDeinterlaceParameters deinterlace; memset(&deinterlace, 0, sizeof(deinterlace)); deinterlace.size = sizeof(deinterlace); - if (strcasecmp(m_deinterlaceMode, "bob") == 0) { + if (!strcasecmp(m_deinterlaceMode, "bob")) { deinterlace.mode = DEINTERLACE_MODE_BOB; - } - else { + } else if (!strcasecmp(m_deinterlaceMode, "motion_adaptive")) { + deinterlace.mode = DEINTERLACE_MODE_MOTION_ADAPTIVE; + } else if (!strcasecmp(m_deinterlaceMode, "motion_compensated")) { + deinterlace.mode = DEINTERLACE_MODE_MOTION_COMPENSATED; + } else { ERROR("wrong mode deinterlace mode %s", m_deinterlaceMode); return false; } @@ -323,7 +326,7 @@ printf("usage: yamivpp <option> input_1920x1080.i420 output_320x240.yv12\n"); printf(" -s <level> optional, sharpening level\n"); printf(" --dn <level> optional, denoise level\n"); - printf(" --di <mode>, optional, deinterlace mode, only support bob\n"); + printf(" --di <mode>, optional, deinterlace mode, support bob, motion_adaptive and motion_compensated\n"); printf(" --hue <level>, optional, hue level, range [0, 100] or -1, -1: delete this filter\n"); printf(" --sat <level>, optional, saturation level, range [0, 100] or -1, -1: delete this filter\n"); printf(" --br <level>, optional, brightness level, range [0, 100] or -1, -1: delete this filter\n"); ++++++ libyami-utils-rpmlintrc ++++++ --- /var/tmp/diff_new_pack.2Da1Fi/_old 2019-12-24 14:30:51.186601767 +0100 +++ /var/tmp/diff_new_pack.2Da1Fi/_new 2019-12-24 14:30:51.186601767 +0100 @@ -1,3 +1,4 @@ # Filter out rpmlint warning about shlib-policy-missing-lib, package # is called libyami-utils upstream addFilter("libyami-utils\..*W: shlib-policy-missing-lib"); +addFilter("libyami-utils\..*W: position-independent-executable-suggested");
